text
stringlengths
2.85k
2.55M
label
class label
11 classes
PREDICTION OF MUSCLE ACTIVATIONS FOR REACHING MOVEMENTS USING DEEP NEURAL NETWORKS Najeeb Khan and Ian Stavness University of Saskatchewan, Saskatoon, SK, Canada email: [email protected], web: http://biglab.ca/ INTRODUCTION Muscle Activation Trajectories The motor control problem involves determining the time-varying muscle activation trajectories required to accomplish a given movement. Muscle redundancy makes motor control a challenging task: there are many possible activation trajectories that accomplish the same movement. Despite this redundancy, most movements are accomplished in highly stereotypical ways. For example, point-topoint reaching movements are almost universally performed with very similar smooth trajectories [1]. a1 Optimization methods are commonly used to predict muscle forces for measured movements [2]. However, these approaches require computationally expensive simulations and are sensitive to the chosen optimality criteria and regularization. Linear dimensionality reduction has also been proposed to identify low-dimensional motor modules that can account for stereotyped movements [3]. However, musculoskeletal systems are highly non-linear, making linear methods less reliable. Deep neural networks (DNNs) are biologically inspired models that can be employed for non-linear dimensionality reduction. Deep autoencoders are DNN models that can automatically learn successively low dimensional features by transforming the input data through different layers of non-linearity. DNNs have been used to predict torque trajectories from initial and final state information in [4]. However, DNNs have yet to be applied to predict time varying muscle activations, in which the redundancy problem exists. In this work, we investigate deep autoencoders for the prediction of muscle activation trajectories for point-to-point reaching movements. We evaluate our DNN predictions with simulated reaches and two methods to generate the muscle activations: Low Dimensional Features . Reconstructed Activation Trajectories a1 . . . . . . . . . . . a6n Predicted Activation Trajectories Intial & Final Hand Positions Xi Xf . . . . . a6n (a) Pre-training using a deep autoencoder a1 . a6n (b) DNN for predicting activations from initial and final positions Figure 1: A deep autoencoder is trained to learn low-dimensional features that are used to map initial and final hand positions to muscle activations. inverse dynamics (ID) and optimal control (OC) criteria. We also investigate optimal network parameters and training criteria to improve the accuracy of the predictions. METHODS Simulated reaches: Random initial points for the end-effector of a two-link, six-muscle arm [5] were uniformly sampled in a 50 cm x 20 cm rectangular region in the hand-space. A random direction was chosen for each initial point and a final point for the reaching movement was uniformly selected in that direction within 10 cm. The data set consisted of 4500 pairs of initial/final points for training and 500 pairs for testing. Inverse Dynamics: The initial and final points were connected by a time sampled minimum-jerk trajectory with a duration of 1 second. A sampling rate of 50 samples per second was used for sampling the min-jerk path. For each of the points in the minimum-jerk trajectory a torque control vector was calculated by using inverse kinematics and inverse dynamics of the arm model. 300dimensional muscle activations for the six muscles were computed by minimizing the quadratic norm of the activations under the target torque constraint. 41st Annual Meeting of the American Society of Biomechanics, Boulder, CO, USA, August 8th – 11th, 2017 Network Training: For each control type, we trained an autoencoder with layer dimensions 300-150-504-50-150-300 (Figure 1a). Layer-wise pre-training [6] was used to train the network with the muscle activation trajectories as the inputs and outputs. The decoder part of the autoencoder (Figure 1b) with dimensions 4-50-150-300 was then retrained on the inputs as the initial/final end-effector positions, and outputs as the muscle activations. Both the networks were trained by minimizing the cross-entropy loss between predicted and desired output using the conjugate gradient descent method. Shoulder Extensor Elbow Flexor Biarticular Extensor Muscle Activation (%) Optimal Control: For each pair of initial/final points, 50-dimensional torque control signals were generated for each joint using the iterative LinearQuadratic-Gaussian (iLQG) method [5]. Muscle activations were computed using static optimization with a quadratic cost. Predicted Actual Figure 2: DNN predicted activations for 3 muscles for a reaching movement generated by inversedynamics (top) and optimal control (bottom). RESULTS AND DISCUSSION Muscle activations predicted with the DNN matched well with the actual trajectories for both the ID and OC conditions (Figure 2). RMS error in the activation trajectories was 0.0048 and 0.0067 for the ID and OC reaches, respectively. Simulated hand trajectories, when the arm model is driven with DNN-predicted muscle activations, also matched well with the original hand trajectories (Figure 3). The average error in reaching the target was 0.125 cm and 0.127 cm for the ID and OC reaches, respectively. Previously, DNNs for predicting joint torques used mean squared error (MSE) as the training criteria and canonical optimization for minimization [4]. We found that using cross entropy loss instead of MSE as the training criteria and using conjugate gradient descent for minimization with mini-batch training outperformed [4]. Even with the problem extended from torques to activations, our predictions resulted in an average endpoint error of 0.127 cm, whereas [4] reported an endpoint error of 0.347 cm. Also, we performed a comprehensive evaluation of our methods and reported our results with 500 samples as compared to only 14 in [4]. Predicted Actual Figure 3: Hand trajectories (from center outward) driven by DNN predicted activations for inversedynamics (left) and optimal control (right). SUMMARY In this study, we demonstrated that with proper learning criteria and training methods, DNNs can accurately generate simulated muscle-driven reaches with both inverse-dynamics and optimal control based activation trajectories. Our work provides a proof of concept that DNNs can be used for more complex biomechanical models. As future work, we plan to investigate recurrent neural networks to model variable duration reaches. REFERENCES 1.Sabes, CO in Neurobio 10.6, 740-746, 2000 2.Erdemir et al. Clin Biomech, 22(2), 131-54, 2007 3.Ting et al. CO in Neurobio 17.6, 622-628, 2007. 4.Berniker et al. Front in Comp Neurosci 9 2015. 5.Todorov et al. IEEE Am Control Conf, 2005. 6.Bengio, Y, et al. NIPS 19, 153, 2007. 41st Annual Meeting of the American Society of Biomechanics, Boulder, CO, USA, August 8th – 11th, 2017
9cs.NE
Learning Disentangled Representations with Semi-Supervised Deep Generative Models arXiv:1706.00400v2 [stat.ML] 13 Nov 2017 N. Siddharth University of Oxford [email protected] Brooks Paige Alan Turing Institute University of Cambridge Jan-Willem van de Meent Northeastern University [email protected] [email protected] Alban Desmaison University of Oxford Noah D. Goodman Stanford University Pushmeet Kohli ∗ Deepmind [email protected] [email protected] [email protected] Frank Wood University of Oxford Philip H.S. Torr University of Oxford [email protected] [email protected] Abstract Variational autoencoders (VAEs) learn representations of data by jointly training a probabilistic encoder and decoder network. Typically these models encode all features of the data into a single variable. Here we are interested in learning disentangled representations that encode distinct aspects of the data into separate variables. We propose to learn such representations using model architectures that generalise from standard VAEs, employing a general graphical model structure in the encoder and decoder. This allows us to train partially-specified models that make relatively strong assumptions about a subset of interpretable variables and rely on the flexibility of neural networks to learn representations for the remaining variables. We further define a general objective for semi-supervised learning in this model class, which can be approximated using an importance sampling procedure. We evaluate our framework’s ability to learn disentangled representations, both by qualitative exploration of its generative capacity, and quantitative evaluation of its discriminative ability on a variety of models and datasets. 1 Introduction Learning representations from data is one of the fundamental challenges in machine learning and artificial intelligence. Characteristics of learned representations can depend on their intended use. For the purposes of solving a single task, the primary characteristic required is suitability for that task. However, learning separate representations for each and every such task involves a large amount of wasteful repetitive effort. A representation that has some factorisable structure, and consistent semantics associated to different parts, is more likely to generalise to a new task. Probabilistic generative models provide a general framework for learning representations: a model is specified by a joint probability distribution both over the data and over latent random variables, and a representation can be found by considering the posterior on latent variables given specific data. The learned representation — that is, inferred values of latent variables — depends then not just on the data, but also on the generative model in its choice of latent variables and the relationships between the latent variables and the data. There are two extremes of approaches to constructing generative models. At one end are fully-specified probabilistic graphical models [18, 21], in which a practitioner decides on all latent variables present in the joint distribution, the relationships between them, and the functional form of the conditional distributions which define the model. At the other end are ∗ Author was at Microsoft Research during this project. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. deep generative models [7, 16, 19, 20], which impose very few assumptions on the structure of the model, instead employing neural networks as flexible function approximators that can be used to train a conditional distribution on the data, rather than specify it by hand. The tradeoffs are clear. In an explicitly constructed graphical model, the structure and form of the joint distribution ensures that latent variables will have particular semantics, yielding a disentangled representation. Unfortunately, defining a good probabilistic model is hard: in complex perceptual domains such as vision, extensive feature engineering (e.g. Berant et al. [1], Siddharth et al. [30]) may be necessary to define a suitable likelihood function. Deep generative models completely sidestep the difficulties of feature engineering. Although they address learning representations which then enable them to better reconstruct data, the representations themselves do not always exhibit consistent meaning along axes of variation: they produce entangled representations. While such approaches have considerable merit, particularly when faced with the absence of any side information about data, there are often situations when aspects of variation in data can be, or are desired to be characterised. Bridging this gap is challenging. One way to enforce a disentangled representation is to hold different axes of variation fixed during training [20]. Johnson et al. [13] combine a neural net likelihood with a conjugate exponential family model for the latent variables. In this class of models, efficient marginalisation over the latent variables can be performed by learning a projection onto the same conjugate exponential family in the encoder. Here we propose a more general class of partiallyspecified graphical models: probabilistic graphical models in which the modeller only needs specify the exact relationship for some subset of the random variables in the model. Factors left undefined in the model definition are then learned, parametrised by flexible neural networks. This provides the ability to situate oneself at a particular point on a spectrum, by specifying precisely those axes of variations (and their dependencies) we have information about or would like to extract, and learning disentangled representations for them, while leaving the rest to be learned in an entangled manner. A subclass of partially-specified models that is particularly common is that where we can obtain supervision data for some subset of the variables. In practice, there is often variation in the data which is (at least conceptually) easy to explain, and therefore annotate, whereas other variation is less clear. For example, consider the MNIST dataset of handwritten digits: the images vary both in terms of content (which digit is present), and style (how the digit is written), as is visible in the right-hand side of Fig. 1. Having an explicit “digit” latent variable captures a meaningful and consistent axis of variation, independent of style; using a partially-specified graphical model means we can define a “digit” variable even while leaving unspecified the semantics of the different styles, and the process of rendering a digit to an image. In a fully unsupervised learning procedure there is generally no guarantee that inference on a model with 10 classes will in fact recover the 10 digits. However, given a small amount of labelled examples, this task becomes significantly easier. Beyond the ability to encode variation along some particular axes, we may also want to interpret the same data in different ways. For example, when considering images of people’s faces, we might wish to capture the person’s identity in one context, and the lighting conditions on the faces in another. In this paper we introduce a recipe for learning and inference in partially-specified models, a flexible framework that learns disentangled representations of data by using graphical model structures to encode constraints to interpret the data. We present this framework in the context of variational autoencoders (VAEs), developing a generalised formulation of semi-supervised learning with DGMs that enables our framework to automatically employ the correct factorisation of the objective for any given choice of model and set of latents taken to be observed. In this respect our work extends previous efforts to introduce supervision into variational autoencoders [17, 23, 31]. We introduce a variational objective which is applicable to a more general class of models, allowing us to consider graphical-model structures with arbitrary dependencies between latents, continuous-domain latents, and those with dynamically changing dependencies. We provide a characterisation of how to compile partially-supervised generative models into stochastic computation graphs, suitable for end-to-end training. This approach allows us also amortise inference [6, 22, 28, 33], simultaneously learning a network that performs approximate inference over representations at the same time we learn the unknown factors of the model itself. We demonstrate the efficacy of our framework on a variety of tasks, involving classification, regression, and predictive synthesis, including its ability to encode latents of variable dimensionality. 2 z p η z p θ Generative Model φ x q y φ y x Disentangled Representation y (partial labels) (a) λ Recognition Model z θ Stochastic Computation Graph for VAE x (data) y z η (c) y (digit label) (b) (d) Figure 2: (a) Visual analogies for the MNIST data, with inferred style latent variable fixed and εthe label η varied. (b) Exploration in “style” space for a 2D latent gaussian random variable. Visual analogies for the SVHN data when (c) fully supervised, and (d) partially supervised with just 100 p labels/digit. z (handwriting style) ε 126 To train deep generative models in a semi-supervised manner, we need to incorporate labelled data θ λ127 into ε the η variational η bound. In a fully unsupervised setting, the contribution of a particular data i 128 point x to the ELBO can be expressed, with minor adjustments of Equation (1), whose Monte-Carlo q129 approximation p samples z x platents z and y from the recognition distribution q z, y | xi . " # p✓ xi | z, y p(z, y) i L ✓, ; x = Eq (z,y|xi ) log . (2) q (z, y | xi ) Figure 1: Semi-supervised learning in structured variational autoencoders, illustrated on MNIST 130 By contrast, in the fully supervised setting the values y are treated as observed and become fixed digits. Top-Left: Generative model. Bottom-Left: Recognition model. Middle: Stochastic com-the label y is observed 131 inputs into the computation graph, instead of being sampled from q . When putation graph, showing expansion of each tofor itsfixed corresponding Generative-model 132 along with node the data, (xi , yi ) pairs, sub-graph. the lower bound on the conditional log-marginal likelihood dependencies are shown in blue dependencies are shown in orange. See 133 and log precognition-model ✓ (x | y) is " # Section 2.2 for a detailed explanation. Right: learned representation. i i i 2 Framework and Formulation 134 Lx|y ✓, z; x i , y i = Eq z (z|x i ,yi ) log p✓ x | z, y p z | y q z (z | xi , yi ) This quantity can be optimized directly to learn model parameters ✓ and z . (3) simultaneously via SGD. VAEs [16, 27] are a class of deep generative models that simultaneously train both a probabilistic 135 However, it does not contain the encoder parameters y . This difficulty was also encountered in a 1 encoder and decoder for a elements of acontext data set D = {x . . xN }. The central is that 136 related by Kingma et al., .[17]. Their solution was toanalogy augment the loss function by including 137 aan explicit additional term forthe learning a classifier directly on theprobability supervised points. an encoding z can be considered latent variable, casting decoder as a conditional density pθ (x|z). The parameters of propose this distribution areapproach. the output of a deterministic θ (z)we 138 ηHere an alternative We extend the model withneural an auxiliary variable ỹ with network with parameters θ (most MLPs or CNNs) which takes z as input. By placing a 139 commonly likelihood p(ỹ | y) = densities ỹ (y) to define weak prior over z, the decoder defines a posterior and jointp(ỹ, distribution pθ (z| y)p | x)✓ (x∝| py,θ (x | z)p(z). y, z, x) = p(ỹ z)p(y, z) q(ỹ, y, z that | x) = p(ỹ | y)q(y, zthe | x). Inference in VAEs can be performed using a variational method approximates φ zn θ posterior distribution pθ (z | x) 140 using an encoder q (z | x), whose parameters λ (x) are When we marginalize the ELBO for this model overφ ỹ, we recover the expression in Equation (2). φ i 141 Treatingφ)ỹ that = y isasreferred observed to results in “inference the supervised objective the output of a network (with parameters as an network” " by solid # or a “recognition network”. The generative and inference networks, denoted p✓ xi | z, i xny p(z, y) . i i L ✓, ; x = E (y) log (4) and dashed lines respectively in the graphical model, are trained jointly q (z,y|xby ) performing y ỹ=yi q (z, yN | xi ) stochastic gradient ascent on the evidence lower bound (ELBO) L(φ, θ; D) ≤ log pθ (D), Integration over an observed y is then replaced with evaluation of the ELBO and the density q y at iN yX . A Monte Carlo estimator of Equation (4) can be constructed automatically for any factorization n latentpθvariables and weighting n [log L(φ, θ; D) = L(φ, θ; xn144) =of q by Eqsampling (xn | z)z+ log p(z) −the logresulting qφ (z|xELBO )]. estimate (1) by the conditional φ (z|x ) 145 density terms q (y|·). y n=1 n=1 142 N X 143 146 Note that the exact functional form of the Monte Carlo estimator will vary depending on the 150 tioned on the selected class. The computation graph for a model with this factorization is shown in Fig- n n ) [log pθ (x | z)] is approximated by Typically, the first term Eqφ (z|x147 Monte Carlofor estimate the dependency structure of q z, y | xi .a For example, discreteand y, choosing q (z, y | x) = n remaining two terms are expressed as a divergence −KL(q (z|x )kp(z)), which can be computed 148 q z (z | y, x)q y (y | x), decomposes the problem into simultaneously learning a classifier φ 149 q yand (y | prior x) alongside the generative model parameters ✓ and encoder q z (z|x, y) which is condianalytically when the encoder model are Gaussian. In this paper, we will consider generative (x, y, z) andthethe 151 models ure 1. Ininit,which the valueboth y of the the distribution q ymodel (· | x) ispθobserved, while distribution q z (· | x, y) approximate posterior qφ (y, z | x) can have arbitrary conditional dependency structures involving random variables defined over a number of different distribution types. We are interested in defining 4 VAE architectures in which a subset of variables y are interpretable. For these variables, we assume that supervision labels are available for some fraction of the data. The VAE will additionally retain some set of variables z for which inference is performed in a fully unsupervised manner. This is in keeping with our central goal of defining and learning in partially-specified models. In the running example for MNIST, y corresponds to the classification label, whereas z captures all other implicit features, such as the pen type and handwriting style. This class of models is more general than the models in the work by Kingma et al. [17], who consider three model designs with a specific conditional dependence structure. We also do not require p(y, z) to be a conjugate exponential family model, as in the work by Johnson et al. [14]. To perform semi-supervised learning in this class of models, we need to i) define an objective that is suitable to general dependency graphs, and ii) define a method for constructing a stochastic computation graph [29] that incorporates both the conditional dependence structure in the generative model and that of the recognition model into this objective. 3 2.1 Objective Function Previous work on semi-supervised learning for deep generative models [17] defines an objective over N unsupervised data points D = {x1 , . . . , xN } and M supervised data points Dsup = {(x1 , y1 ), . . . , (xM , yM )}, L(θ, φ; D, Dsup ) = N X n=1 L(θ, φ; xn ) + γ M X m=1 Lsup (θ, φ; xm , ym ). (2) θ z n φ yn zm ym Our model’s joint distribution factorises into unsupervised and supervised xn xm collections of terms over D and Dsup as shown in the graphical model. The N M standard variational bound on the joint evidence of all observed data (including supervision) also factorises as shown in Eq. (2). As the factor corresponding to the unsupervised part of the graphical model is exactly that as Eq. (1), we focus on the supervised term in Eq. (2), expanded below, incorporating an additional weighted component as in Kingma et al. [17].   pθ (xm , ym , z) Lsup (θ, φ; xm , ym ) = Eqφ (z|xm ,ym ) log + α log qφ (ym | xm ). (3) qφ (z | xm , ym ) Note that the formulation in Eq. (2) introduces an constant γ that controls the relative strength of the supervised term. While the joint distribution in our model implicitly weights the two terms, in situations where the relative sizes of D and Dsup are vastly different, having control over the relative weights of the terms can help ameliorate such discrepancies. This definition in Eq. (3) implicitly assumes that we can evaluate the conditional probability R qφ (z|x, y) and the marginal qφ (y|x) = dz qφ (y, z|x). This was indeed the case for the models considered by Kingma et al. [17], which have a factorisation qφ (y, z|x) = qφ (z|x, y)qφ (y|x). Here we will derive an estimator for Lsup that generalises to models in which qφ (y, z | x) can have an arbitrary conditional dependence structure. For purposes of exposition, we will for the moment consider the case where qφ (y, z | x) = qφ (y | x, z)qφ (z | x). For this factorisation, generating samples zm,s ∼ qφ (z | xm , ym ) requires inference, which means we can no longer compute a simple Monte Carlo estimator by sampling from the unconditioned distribution qφ (z | xm ). Moreover, we also cannot evaluate the density qφ (z | xm , ym ). In order to address these difficulties, we re-express the supervised terms in the objective as   p(xm , ym , z) Lsup (θ, φ; xm , ym ) = Eqφ (z|xm ,ym ) log + (1 + α) log qφ (ym | xm ), qφ (ym , z | xm ) (4) which removes the need to evaluate qφ (z | xm , ym ). We can then use (self-normalised) importance sampling to approximate the expectation. To do so, we sample proposals zm,s ∼ qφ (z | xm ) from the unconditioned encoder distribution, and define the estimator   S pθ (xm , ym , z) 1 X wm,s pθ (xm , ym , zm,s ) Eqφ (z|xm ,ym ) log ' log , (5) qφ (ym , z | xm ) S s=1 Z m qφ (ym , zm,s | xm ) where the unnormalised importance weights wm,s and normaliser Z m are defined as wm,s := qφ (ym , zm,s | xm ) , qφ (zm,s | xm ) Zm = S 1 X m,s w . S s=1 (6) To approximate log qφ (ym | xm ), we use a Monte Carlo estimator of the lower bound that is normally used in maximum likelihood estimation,   S qφ (ym , z | xm ) 1X m m log qφ (y | x ) ≥ Eqφ (z|xm ) log ' log wm,s , (7) qφ (z | xm ) S s=1 using the same samples zm,s and weights wm,s as in Eq. (5). When we combine the terms in Eqs. (5) and (7), we obtain the estimator L̂sup (θ, φ; xm, ym ) := S 1 X wm,s pθ (xm , ym , zm,s ) log + (1 + α) log wm,s . m S s=1 Z qφ (ym , zm,s | xm ) 4 (8) We note that this estimator applies to any conditional dependence structure. Suppose that we were to define an encoder qφ (z 2 , y 1 , z 1 | x) with factorisation qφ (z 2 | y 1 , z 1 , x)qφ (y 1 | z 1 , x)qφ (z 1 | x). If we propose z 2 ∼ qφ (z 2 | y 1 , z 1 , x) and z 1 ∼ qφ (z 1 | x), then the importance weights wm,s for the estimator in Eq. (8) are defined as m m,s qφ (zm,s | xm ) m 2 , y 1 , z1 wm,s := = qφ (y1m | zm,s m,s m,s 1 , x ). m m qφ (z2 | y1 , z1 , x )qφ (zm,s | xm ) 1 In general, the importance weights are simply the product of conditional probabilities of the supervised variables y in the model. Note that this also applies to the models in Kingma et al. [17], whose objective we can recover by taking the weights to be constants wm,s = qφ (ym | xm ). We can also define an objective analogous to the one used in importance-weighted autoencoders [2], in which we compute the logarithm of a Monte Carlo estimate, rather than the Monte Carlo estimate of a logarithm. This objective takes the form " # " # S S 1 X m,s 1 X pθ (xm , ym , zm,s ) sup,iw m m + α log L̂ (θ, φ; x , y ) := log w , (9) S s=1 qφ (zm,s | xm ) S s=1 which can be derived by moving the sums in Eq. (8) into the logarithms and applying the substitution wm,s /qφ (ym , zm,s | xm ) = 1/qφ (zm,s | xm ). 2.2 Construction of the Stochastic Computation Graph To perform gradient ascent on the objective in Eq. (8), we map the graphical models for pθ (x, y, z) and qφ (y, z|x) onto a stochastic computation graph in which each stochastic node forms a sub-graph. Figure 1 shows this expansion for the simple VAE for MNIST digits from [16]. In this model, y is a discrete variable that represents the underlying digit, our latent variable of interest, for which we have partial supervision data. An unobserved Gaussian-distributed variable z captures the remainder of the latent information. This includes features such as the hand-writing style and stroke thickness. In the generative model (Fig. 1 top-left), we assume a factorisation pθ (x, y, z) = pθ (x | y, z)p(y)p(z) in which y and z are independent under the prior. In the recognition model (Fig. 1 bottom-left), we use a conditional dependency structure qφ (y, z | x) = qφz (z | y, x)qφy (y|x) to disentangle the digit label y from the handwriting style z (Fig. 1 right). The generative and recognition model are jointly form a stochastic computation graph (Fig. 1 centre) containing a sub-graph for each stochastic variable. These can correspond to fully supervised, partially supervised and unsupervised variables. This example graph contains three types of subgraphs, corresponding to the three possibilities for supervision and gradient estimation: • For the fully supervised variable x, we compute the likelihood p under the generative model, that is pθ (x | y, z) = N (x ; ηθ (y, z)). Here ηθ (y, z) is a neural net with parameters θ that returns the parameters of a normal distribution (i.e. a mean vector and a diagonal covariance). • For the unobserved variable z, we compute both the prior probability p(z) = N (z ; ηz ), and the conditional probability qφ (z | x, y) = N (z ; λφz (x, y)). Here the usual reparametrisation is used to sample z from qφ (z | x, y) by first sampling  ∼ N (0, I) using the usual reparametrisation trick z = g(, λφ (x, y)). • For the partially observed variable y, we also compute probabilities p(y) = Discrete(y; ηy ) and qφy (y|x) = Discrete(y; λφz (x)). The value y is treated as observed when available, and sampled otherwise. In this particular example, we sample y from a qφy (y|x) using a Gumbel-softmax [12, 24] relaxation of the discrete distribution. The example in Fig. 1 illustrates a general framework for defining VAEs with arbitrary dependency structures. We begin by defining a node for each random variable. For each node we then specify a distribution type and parameter function η, which determines how the probability under the generative model depends on the other variables in the network. This function can be a constant, fully deterministic, or a neural network whose parameters are learned from the data. For each unsupervised and semi-supervised variable we must additionally specify a function λ that returns the parameter values in the recognition model, along with a (reparametrised) sampling procedure. Given this specification of a computation graph, we can now compute the importance sampling estimate in Eq. (8) by simply running the network forward repeatedly to obtain samples from qφ (·|λ) for all unobserved variables. We then calculate pθ (x, y, z), qφ (y|x), qφ (y, z|x), and the importance weight w, which is the joint probability of all semi-supervised variable for which labels are available. This estimate can then be optimised with respect to the variables θ and φ to train the autoencoder. 5 (a) (b) (c) (d) Figure 2: (a) Visual analogies for the MNIST data, partially supervised with just 100 labels (out of 50000). We infer the style variable z and then vary the label y. (b) Exploration in style space with label y held fixed and (2D) style z varied. Visual analogies for the SVHN data when (c) partially supervised with just 1000 labels, and (d) fully supervised. 3 Experiments We evaluate our framework along a number of different axes pertaining to its ability to learn disentangled representations through the provision of partial graphical-model structures for the latents and weak supervision. In particular, we evaluate its ability to (i) function as a classifier/regressor for particular latents under the given dataset, (ii) learn the generative model in a manner that preserves the semantics of the latents with respect to the data generated, and (iii) perform these tasks, in a flexible manner, for a variety of different models and data. For all the experiments run, we choose architecture and parameters that are considered standard for the type and size of the respective datasets. Where images are concerned (with the exception of MNIST), we employ (de)convolutional architectures, and employ a standard GRU recurrence in the Multi-MNIST case. For learning, we used AdaM [15] with a learning rate and momentumcorrection terms set to their default values. As for the mini batch sizes, they varied from 100-700 depending on the dataset being used and the sizes of the labelled subset Dsup . All of the above, including further details of precise parameter values and the source code, including our PyTorchbased library for specifying arbitrary graphical models in the VAE framework, is available at – https://github.com/probtorch/probtorch. 3.1 MNIST and SVHN We begin with an experiment involving a simple dependency structure, in fact the very same as that in Kingma et al. [17], to validate the performance of our importance-sampled objective in the special case where the recognition network and generative models factorise as indicated in Fig. 1(left), giving us importance weights that are constant wm,s = qφ (y m |xm ). The model is tested on it’s ability to classify digits and perform conditional generation on the MNIST and Google Street-View House Numbers (SVHN) datasets. As Fig. 1(left) shows, the generative and recognition models have the “digit” label, denoted y, partially specified (and partially supervised) and the “style” factor, denoted z, assumed to be an unobserved (and unsupervised) variable. Figure 2(a) and (c) illustrate the conditional generation capabilities of the learned model, where we show the effect of first transforming a given input (leftmost column) into the disentangled latent space, and with the style latent variable fixed, manipulating the digit through the generative model to generate data with expected visual characteristics. Note that both these results were obtained with partial supervision – 100 (out of 50000) labelled data points in the case of MNIST and 1000 (out of 70000) labelled data points in the case of SVHN. The style latent variable z was taken to be a diagonal-covariance Gaussian of 10 and 15 dimensions respectively. Figure 2(d) shows the same for SVHN with full supervision. Figure 2(b) illustrates the alternate mode of conditional generation, where the style latent, here taken to be a 2D Gaussian, is varied with the digit held fixed. Next, we evaluate our model’s ability to effectively learn a classifier from partial supervision. We compute the classification error on the label-prediction task on both datasets, and the results are reported in the table in Fig. 3. Note that there are a few minor points of difference in the setup between our method and those we compare against [17]. We always run our models directly on the data, with no pre-processing or pre-learning on the data. Thus, for MNIST, we compare against 6 Effect of Supervision Rate ( ) 1.0 60 MNIST 40 20 0.6 0 60 SVHN M = 1000 M = 3000 0.4 SVHN N = 70000 Classification Error (%) 0.8 MNIST N = 50000 M = 100 M = 600 M = 1000 M = 3000 40 0.2 20 0.0 0 0.0 0.0 0.2 0.2 0.4 0.4 0.60.6 Supervision Rate ( ) 0.80.8 1.0 M Ours M2 [17] 100 600 1000 3000 9.71 (± 0.91) 3.84 (± 0.86) 2.88 (± 0.79) 1.57 (± 0.93) 11.97 (± 1.71) 4.94 (± 0.13) 3.60 (± 0.56) 3.92 (± 0.63) M Ours M1+M2 [17] 1000 38.91 (± 1.06) 3000 29.07 (± 0.83) 36.02 (± 0.10) — 1.0 Figure 3: Right: Classification error rates for different labelled-set sizes M over multiple runs, with supervision rate ρ = NγM +γM , γ = 1. For SVHN, we compare against a multi-stage process (M1+M2) [17], where our model only uses a single stage. Left: Classification error over different labelled set sizes and supervision rates for MNIST (top) and SVHN (bottom). Here, scaling of the classification objective is held fixed at α = 50 (MNIST) and α = 70 (SVHN). Note that for sparsely labelled data (M  N ), a modicum of over-representation (γ > 1) helps improve generalisation with better performance on the test set. Conversely, too much over-representation leads to overfitting. model M2 from the baseline which does just the same. However, for SVHN, the baseline method does not report errors for the M2 model; only the two-stage M1+M2 model which involves a separate feature-extraction step on the data before learning a semi-supervised classifier. As the results indicate, our model and objective does indeed perform on par with the setup considered in Kingma et al. [17], serving as basic validation of our framework. We note however, that from the perspective of achieving the lowest possible classification error, one could adopt any number of alternate factorisations [23] and innovations in neural-network architectures [26, 32]. Supervision rate: As discussed in Section 2.1, we formulate our objective to provide a handle on the relative weight between the supervised and unsupervised terms. For a given unsupervised set size N , supervised set size M , and scaling term γ, the relative weight is ρ = γM/(N + γM ). Figure 3 shows exploration of this relative weight parameter over the MNIST and SVHN datasets and over different supervised set sizes M . Each line in the graph measures the classification error for a given M , over ρ, starting at γ = 1, i.e. ρ = M/(N + M ). In line with Kingma et al.[17], we use α = 0.1/ρ. When the labelled data is very sparse (M  N ), over-representing the labelled examples during training can help aid generalisation by improving performance on the test data. In our experiments, for the most part, choosing this factor to be ρ = M/(N + M ) provides good results. However, as is to be expected, over-fitting occurs when ρ is increased beyond a certain point. 3.2 Intrinsic Faces We next move to a more complex domain involving generative models of faces. Here, we use the “Yale B” dataset [5] as processed by Jampani et al. [11] for the results in Fig. 4. As can be seen in the graphical models for this experiment in Fig. 5, the dependency structures employed here are more complex in comparison to those from the previous experiment. We are interested in showing that our model can learn disentangled representations of identity and lighting and evaluate it’s performance on the tasks of (i) classification of person identity, and (ii) regression for lighting direction. Note that our generative model assumes no special structure – we simply specify a model where all latent variables are independent under the prior. Previous work [11] assumed a generative model with latent variables identity i, lighting l, shading s, and reflectance r, following the relationship (n · l) × r +  for the pixel data. Here, we wish to demonstrate that our generative model still learns the correct relationship over these latent variables, by virtue of the structure in the recognition model and given (partial) supervision. Note that in the recognition model (Fig. 5), the lighting l is a latent variable with continuous domain, and one that we partially supervise. Further, we encode identity i as a categorical random variable, instead of constructing a pixel-wise surface-normal map (each assumed to be independent Gaussian) as is customary. This formulation allows us to address the task of predicting identity directly, instead of applying surrogate evaluation methods (e.g. nearest-neighbour classification based on inferred reflectance). Figure 4 presents both qualitative and quantitative evaluation of the framework to jointly learn both the structured recognition model, and the generative model parameters. 7 Input Recon. Varying Identity Input Recon. Ours (Full Supervision) Ours (Semi-Supervised) Jampani et al. [11] (plot asymptotes) Varying Lighting Identity Lighting 1.9% (± 1.5) 3.1% (± 3.8) 3.5% (± 3.4) 17.6% (± 1.8) ≈ 30 ≈ 10 Figure 4: Left: Exploring the generative capacity of the supervised model by manipulating identity and lighting given a fixed (inferred) value of the other latent variables. Right: Classification and regression error rates for identity and lighting latent variables, fully-supervised, and semi-supervised (with 6 labelled example images for each of the 38 individuals, a supervision rate of ρ = 0.5, and α = 10). Classification is a direct 1-out-of-38 choice, whereas for the comparison, error is a nearest-neighbour loss based on the inferred reflectance. Regression loss is angular distance. 3.3 Multi-MNIST Finally, we conduct an experiment that extends the complexity from the prior models even further. Particularly, we explore the capacity of our framework to handle models with stochastic dimensionality – having the number of latent variables itself determined by a random variable, and models that can be composed of other smaller (sub-)models. We conduct this experiment in the domain of multi-MNIST. This is an apposite choice as it satisfies both the requirements above – each image can have a varying number of individual digits, which essentially dictates that the model must learn to count, and as each image is itself composed of (scaled and translated) exemplars from the MNIST data, we can employ the MNIST model itself within the multi-MNIST model. The model structure that we assume for the generative and recognition networks is shown in Fig. 5. We extend the models from the MNIST experiment by composing it with a stochastic sequence generator, in which the loop length K is a random variable. For each loop iteration k = 1, . . . , K, the generative model iteratively samples a digit yk , style zk , and uses these to generate a digit image xk in the same manner as in the earlier MNIST example. Additionally, an affine tranformation is also sampled for each digit in each iteration to transform the digit images xk into a common, combined canvas that represents the final generated image x, using a spatial transformer network [10]. In the recognition model, we predict the number of digits K from the pixels in the image. For each loop iteration k = 1, . . . , K, we define a Bernoulli-distributed digit image xk . When supervision is available, we compute the probability of xk from the binary cross-entropy in the same manner as in the likelihood term for the MNIST model. When no supervision is available, we deterministically set xk to the mean of the distribution. This can be seen akin to providing bounding-boxes around the constituent digits as supervision for the labelled data, which must be taken into account when learning the affine transformations that decompose a multi-MNIST image into its constituent MNIST-like images. This model design is similar to the one used in DRAW [9], recurrent VAEs [3], and AIR [4]. In the absence of a canonical multi-MNIST dataset, we created our own from the MNIST dataset by manipulating the scale and positioning of the standard digits into a combined canvas, evenly balanced across the counts (1-3) and digits. We then conducted two experiments within this domain. In the first experiment, we seek to measure how well the stochastic sequence generator learns to count on its own, with no heed paid to disentangling the latent representations for the underlying digits. Intrinsic Faces Multi-MNIST s s i x ` r Generative Model i ` x zk xk K yk ak x hk−1 r Recognition Model K Generative Model zk xk K yk ak x hk K Recognition Model Figure 5: Generative and recognition models for the intrinsic-faces and multi-MNIST experiments. 8 Input Reconstruction Decomposition M M +N 0.1 0.5 1.0 Count Error (%) w/o MNIST w/ MNIST 85.45 (± 5.77) 93.27 (± 2.15) 99.81 (± 1.81) 76.33 (± 8.91) 80.27 (± 5.45) 84.79 (± 5.11) Figure 6: Left: Example input multi-MNIST images and reconstructions. Top-Right: Decomposition of Multi-MNIST images into constituent MNIST digits. Bottom-Right: Count accuracy over different supervised set sizes M for given dataset size M + N = 82000. Here, the generative model presumes the availability of individual MNIST-digit images, generating combinations under sampled affine transformations. In the second experiment, we extend the above model to now also incorporate the same pre-trained MNIST model from the previous section, which allows the generative model to sample MNIST-digit images, while also being able to predict the underlying digits. This also demonstrates how we can leverage compositionality of models: when a complex model has a known simpler model as a substructure, the simpler model and its learned weights can be dropped in directly. The count accuracy errors across different supervised set sizes, reconstructions for a random set of inputs, and the decomposition of a given set of inputs into their constituent individual digits, are shown in Fig. 6. All reconstructions and image decompositions shown correspond to the nested-model configuration. We observe that not only are we able to reliably infer the counts of the digits in the given images, we are able to simultaneously reconstruct the inputs as well as its constituent parts. 4 Discussion and Conclusion In this paper we introduce a framework for learning disentangled representations of data using partially-specified graphical model structures and semi-supervised learning schemes in the domain of variational autoencoders (VAEs). This is accomplished by defining hybrid generative models which incorporate both structured graphical models and unstructured random variables in the same latent space. We demonstrate the flexibility of this approach by applying it to a variety of different tasks in the visual domain, and evaluate its efficacy at learning disentangled representations in a semisupervised manner, showing strong performance. Such partially-specified models yield recognition networks that make predictions in an interpretable and disentangled space, constrained by the structure provided by the graphical model and the weak supervision. The framework is implemented as a PyTorch library [25], enabling the construction of stochastic computation graphs which encode the requisite structure and computation. This provides another direction to explore in the future — the extension of the stochastic computation graph framework to probabilistic programming [8, 34, 35]. Probabilistic programs go beyond the presented framework to permit more expressive models, incorporating recursive structures and higher-order functions. The combination of such frameworks with neural networks has recently been studied in Le et al. [22] and Ritchie et al. [28], indicating a promising avenue for further exploration. Acknowledgements This work was supported by the EPSRC, ERC grant ERC-2012-AdG 321162-HELIOS, EPSRC grant Seebibyte EP/M013774/1, and EPSRC/MURI grant EP/N019474/1. BP & FW were supported by The Alan Turing Institute under the EPSRC grant EP/N510129/1. FW & NDG were supported under DARPA PPAML through the U.S. AFRL under Cooperative Agreement FA8750-14-2-0006. FW was additionally supported by Intel and DARPA D3M, under Cooperative Agreement FA8750-17-2-0093. 9 References [1] Jonathan Berant, Vivek Srikumar, Pei-Chun Chen, Abby Vander Linden, Brittany Harding, Brad Huang, Peter Clark, and Christopher D Manning. Modeling biological processes for reading comprehension. In EMNLP, 2014. [2] Yuri Burda, Roger Grosse, and Ruslan Salakhutdinov. Importance weighted autoencoders. arXiv preprint arXiv:1509.00519, 2015. [3] Junyoung Chung, Kyle Kastner, Laurent Dinh, Kratarth Goel, Aaron C Courville, and Yoshua Bengio. A recurrent latent variable model for sequential data. In Advances in neural information processing systems, pages 2980–2988, 2015. [4] S. M. Ali Eslami, Nicolas Heess, Theophane Weber, Yuval Tassa, Koray Kavukcuoglu, and Geoffrey. E Hinton. Attend, infer, repeat: Fast scene understanding with generative models. arXiv preprint arXiv:1603.08575, 2016. [5] A.S. Georghiades, P.N. Belhumeur, and D.J. Kriegman. From few to many: Illumination cone models for face recognition under variable lighting and pose. IEEE Trans. Pattern Anal. Mach. Intelligence, 23(6):643–660, 2001. [6] Samuel Gershman and Noah Goodman. Amortized inference in probabilistic reasoning. In CogSci, 2014. [7] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. [8] ND Goodman, VK Mansinghka, D Roy, K Bonawitz, and JB Tenenbaum. Church: A language for generative models. In Uncertainty in Artificial Intelligence, pages 220–229, 2008. [9] Karol Gregor, Ivo Danihelka, Alex Graves, Danilo Rezende, and Daan Wierstra. Draw: A recurrent neural network for image generation. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 1462–1471, 2015. [10] Max Jaderberg, Karen Simonyan, Andrew Zisserman, et al. Spatial transformer networks. In Advances in Neural Information Processing Systems, pages 2017–2025, 2015. [11] Varun Jampani, S. M. Ali Eslami, Daniel Tarlow, Pushmeet Kohli, and John Winn. Consensus message passing for layered graphical models. In International Conference on Artificial Intelligence and Statistics, pages 425–433, 2015. [12] E. Jang, S. Gu, and B. Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. [13] Matthew Johnson, David K Duvenaud, Alex Wiltschko, Ryan P Adams, and Sandeep R Datta. Composing graphical models with neural networks for structured representations and fast inference. In Advances in Neural Information Processing Systems, pages 2946–2954, 2016. [14] Matthew J. Johnson, David K. Duvenaud, Alex B. Wiltschko, Sandeep R. Datta, and Ryan P. Adams. Composing graphical models with neural networks for structured representations and fast inference. In Advances in Neural Information Processing Systems, 2016. [15] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. [16] Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In Proceedings of the 2nd International Conference on Learning Representations, 2014. [17] Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semisupervised learning with deep generative models. In Advances in Neural Information Processing Systems, pages 3581–3589, 2014. [18] Daphne Koller and Nir Friedman. Probabilistic graphical models: principles and techniques. MIT press, 2009. 10 [19] Tejas D Kulkarni, Pushmeet Kohli, Joshua B Tenenbaum, and Vikash Mansinghka. Picture: A probabilistic programming language for scene perception. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4390–4399, 2015. [20] Tejas D Kulkarni, William F Whitney, Pushmeet Kohli, and Josh Tenenbaum. Deep convolutional inverse graphics network. In Advances in Neural Information Processing Systems, pages 2530–2538, 2015. [21] Steffen L Lauritzen and David J Spiegelhalter. Local computations with probabilities on graphical structures and their application to expert systems. Journal of the Royal Statistical Society. Series B (Methodological), pages 157–224, 1988. [22] Tuan Anh Le, Atilim Gunes Baydin, and Frank Wood. Inference compilation and universal probabilistic programming. arXiv preprint arXiv:1610.09900, 2016. [23] L. Maaløe, C. K. Sønderby, S. K. Sønderby, and O. Winther. Auxiliary deep generative models. arXiv preprint arXiv:1602.05473, 2016. [24] C. J. Maddison, A. Mnih, and Y. W. Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016. [25] PyTorch. PyTorch. http://pytorch.org/, 2017. Accessed: 2017-11-4. [26] A. Rasmus, H. Valpola, M. Honkala, M. Berglund, and Raiko. T. Semi-supervised learning with ladder networks. In Advances in Neural Information Processing Systems, pages 3532–3540, 2015. [27] Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of The 31st International Conference on Machine Learning, pages 1278–1286, 2014. [28] Daniel Ritchie, Paul Horsfall, and Noah D Goodman. Deep amortized inference for probabilistic programs. arXiv preprint arXiv:1610.05735, 2016. [29] John Schulman, Nicolas Heess, Theophane Weber, and Pieter Abbeel. Gradient estimation using stochastic computation graphs. In Advances in Neural Information Processing Systems, pages 3510–3522, 2015. [30] N. Siddharth, A. Barbu, and J. M. Siskind. Seeing what you’re told: Sentence-guided activity recognition in video. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 732–39, June 2014. [31] Kihyuk Sohn, Honglak Lee, and Xinchen Yan. Learning structured output representation using deep conditional generative models. In Advances in Neural Information Processing Systems, pages 3465–3473, 2015. [32] C. K. Sønderby, T. Raiko, L. Maaløe, S. K. Sønderby, and O. Winther. Ladder variational autoencoders. In Advances in Neural Information Processing Systems, 2016. [33] Andreas Stuhlmüller, Jacob Taylor, and Noah Goodman. Learning stochastic inverses. In Advances in neural information processing systems, pages 3048–3056, 2013. [34] David Wingate, Andreas Stuhlmueller, and Noah D Goodman. Lightweight implementations of probabilistic programming languages via transformational compilation. In International Conference on Artificial Intelligence and Statistics, pages 770–778, 2011. [35] Frank Wood, Jan Willem van de Meent, and Vikash Mansinghka. A new approach to probabilistic programming inference. In Artificial Intelligence and Statistics, pages 1024–1032, 2014. 11
2cs.AI
arXiv:1711.05252v2 [math.AC] 7 Mar 2018 Lifting zero-dimensional schemes and divided powers Adrian Langer March 8, 2018 A DDRESS : Institute of Mathematics, University of Warsaw, ul. Banacha 2, 02-097 Warszawa, Poland e-mail: [email protected] Abstract We study divided power structures on finitely generated k-algebras, where k is a field of positive characteristic p. As an application we show examples of 0-dimensional Gorenstein k-schemes that do not lift to a fixed noetherian local ring of non-equal characteristic. We also show that Frobenius neighbourhoods of a singular point of a general hypersurface of large dimension have no liftings to mildly ramified rings of non-equal characteristic. 2010 Mathematics Subject Classification. Primary 13D10; Secondary 13C40, 14B07 Introduction It is well-known that smooth projective curves defined over an algebraically closed field of positive characteristic can be lifted to characteristic zero. This is no longer the case for higher dimensional projective varieties. However, every smooth scheme defined in positive characteristic can be locally lifted to characteristic zero. Such local lifting properties hold also for all locally complete intersections as affine complete intersections are unobstructed. Unfortunately, the lifting property does not hold for affine schemes and in fact R. Vakil in [7, Theorem 1.1, M7] shows that the versal deformation spaces of isolated normal Cohen– Macaulay threefold singularities satisfy Murphy’s law, i.e., every singularity type of finite type over Z appears on these spaces. This result depends on Schlessinger’s theorem, which says that under some mild assumptions every deformation of a cone over a normal projective variety X of dimension ≥ 2 is a cone over a deformation of X. If we take as X a smooth projective surface that does not lift to characteristic zero, then we obtain examples of singularities that do not lift to characteristic zero. Clearly, this method does not work for lower dimensional singularities and hence one could still hope for the local lifting property for low dimensional schemes satisfying some nice properties like being Cohen-Macaulay or Gorenstein. In fact, it is a well-known problem whether there exist nonliftable zero-dimensional schemes or nonliftable singular curves (see, e.g., [4, p. 148] or [1, Problem 1.2]). Although we cannot answer this question in full generality, we show the following theorem (see Corollary 5.2): T HEOREM 0.1. Let R be a noetherian local ring with residue field k of characteristic p. If pR 6= 0 then there exist 0-dimensional Gorenstein k-schemes that are not liftable to R. The constructed schemes depend on R (more precisely, they depend only on the smallest e such that meR ⊂ pR). So in principle these schemes could be liftable to characteristic zero over some more ramified rings but we are unable to check whether this really happens. As a substitute we can find a direct system {Xn }n∈N of 0-dimensional k-schemes such that for every noetherian local ring R with residue field k and pR 6= 0 the schemes Xn do not lift to R for large n (see Corollary 4.9). Author’s work was partially supported by Polish National Science Centre (NCN) contract number 2015/17/B/ST1/02634. 1 2 A. Langer Let k be an algebraically closed field of characteristic p > 0. If X is a k-variety, the Frobenius neighbourhood of a k-point x ∈ X is the subscheme (FrX )−1 (x) ⊂ X, where FrX : X → X is the absolute Frobenius morphism. Set-theoretically it is equal to x but its ideal sheaf in OX equals to mxp · OX . For r ≥ 1 an rth Frobenius neighbourhood of x ∈ X is defined similarly with the Frobenius morphism FrX being replaced by (FrX )r . We construct our examples by linkage from high Frobenius neighbourhoods of a singular point of a hypersurface. Unfortunately, deformations of Frobenius neighbourhoods of a vertex of a cone over a projective variety X are difficult to control and they are not easily related to deformations of X. Still these neighbourhoods seem to be “less liftable” than the original variety, so it is an interesting question if they give unliftable schemes for examples considered by Vakil. The basic tools that we use are elementary deformation theory and divided power algebra. In the simplest case of rings with small ramification (e.g., R = W2 (k)) existence of lifting is related to the study of divided power structures on an ideal of a ring of positive characteristic and we show a simple criterion that allows us to check its existence. In this case one can use Koblitz’s example [2, Example 3.2.4] to get a non-liftable example (see below for more details). Lifting to other rings is more complicated and although it is not directly related to existence of divided power structures we can still give a numerical criterion that in some cases allows us to check that lifting does not exist (see Theorem 3.3). We show a criterion allowing us to check when higher Frobenius neighbourhoods of singular points lift to some local rings with pR 6= 0 (see Theorem 3.3). As a corollary we show the following theorem (see Corollary 4.4 and Corollary 4.8): T HEOREM 0.2. Let k be an algebraically closed field of characteristic p > 0. 1. The first Frobenius neighbourhood of a singular point of a general hypersurface in An , where n ≥ 6, does not have a divided power structure and it does not lift to W2 (k). 2. Let X ⊂ Ank be a general hypersurface with multiplicity ≥ q = pr at 0. If n ≥ 3q then the r-th Frobenius neighbourhood of 0 ∈ X is not liftable to any local ring R with residue field k and such q that pR 6= 0 and mR = 0. The only previous results related to Theorems 0.1 and 0.2 are folklore. Namely, it was known that if k is perfect then there exists a zero-dimensional k-scheme which does not lift to ring W2 (k) of Witt vectors of length at most 2. In fact, in [2, Example 3.2.4] the authors state (without proof) N. Koblitz’s example of an ideal J in a characteristic p ring with J (p) = 0 and with no divided power structure. The corresponding ring was known to have no lifting to W2 (k). The author learnt this fact from B. Bhatt, who learnt it from J. de Jong. The proof was published in [8, Proposition 3.4] by the author’s student, M. Zdanowicz (who learnt the fact from the author). In characteristic 2 we show that although this 0-dimensional k-scheme does not lift to W2 (k), it lifts to a discrete valuation ring of characteristic zero with absolute ramification 2 (see Example 4.3). So in general one cannot expect that schemes from Theorem 0.2 do not lift to characteristic zero. This explains why Frobenius neighbourhoods of Vakil’s examples seem more likely to produce nonliftable examples of 0-dimensional schemes. The structure of the article is as follows. In Section 1 we recall and state a few preliminary results. In Section 2 we study divided power structure on ideals close to Frobenius neighbourhoods. Then in Section 3 we prove the main technical criterion that allows to check liftability of zero-dimensional rings. In Section 4 we apply these results to obtain 0-dimensional schemes that are not liftable to a fixed ring. In Section 5 we show how to change these examples to obtain Gorenstein schemes. 1 Preliminaries 1.1 Simple lifting results Let us recall the following well-known lemma (see, e.g., [5, Corollary to Theorem 22.5]): L EMMA 1.1. Let R → S be a flat and local ring homomorphism of noetherian local rings. Denote by m the maximal ideal of R. Let us assume that f1 , ..., fs is a sequence of elements of S such that their images form Lifting zero-dimensional schemes and divided powers 3 a regular sequence in S/mS. Then f1 , ..., fs is a regular sequence in S and the quotient S/( f1 , ..., fs ) is flat over R. A sequence f1 , ..., fs of elements of some ring T determines a T -linear homomorphism t : T s → T (or equivalently a section t ∈ (T s )∗ = T s ). Let us recall that t is called a regular section if for all i > 0 the homology groups Hi (t) of the Koszul complex of t vanish. A sequence f1 , ..., fs determines a regular section if and only if ( f1 , ..., fs ) is a regular sequence in TP for each prime ideal P of T that contains f1 , ..., fs . Let us also recall that if ( f1 , ..., fs ) is a regular sequence in T then f1 , ..., fs determines a regular section (see [5, Theorem 16.5]). C OROLLARY 1.2. Let R be a local Artin ring with a maximal ideal m and let ϕ : R → S be a flat homomorphism of noetherian rings. Assume that ( f1 , ..., fs ) is a sequence of elements of S such that their images ( f¯1 , ..., f¯s ) in T = S/mS form a regular section of T s . Then S/( f1 , ..., fs ) is flat over R. Proof. The canonical projection S → S/( f1 , ..., fs ) is denoted by ψ . Let us recall that S/( f1 , ..., fs ) is flat over R if and only if for every prime ideal P of S/( f1 , ..., fs ), the localization (S/( f1 , ..., fs ))P is flat over RQ , where Q = (ψϕ )−1 (P). Let us fix prime ideal P as above. Since R is local and Artin, every prime ideal in R is equal to m and hence Spec k → Spec R is a bijection. Since T = S/mS ≃ S ⊗R k, the canonical projection π : S → T also induces a bijection Spec T → Spec S. In particular, there exists a prime ideal P̄ in T such that P′ := π −1 (P̄) = ψ −1 (P) = P + ( f1 , ..., fs ). By construction P̄ contains f¯1 , ..., f¯s . Since ( f¯1 , ..., f¯s ) determines a regular section of T s , the sequence ( f¯1 , ..., f¯s ) is regular in TP̄ . Then by Lemma 1.1 f1 , ..., fs is a regular sequence in SP′ and the quotient SP′ /( f1 , ..., fs ) = (S/( f1 , ..., fs ))P is flat over RQ = R. Let us consider 0 → I → R̃ → R → 0, where R̃ and R are local Artin rings with residue field k and ideal I satisfies mR̃ I = 0. The following lemma is contained in the proof of [4, Theorem 10.1, p.80]: L EMMA 1.3. Let A be a finitely generated R-algebra and let us assume that there exists a flat lifting of A to R̃ → R. Let us choose a presentation of A as a quotient R[x1 , ..., xn ]/( f1 , ..., fs ). Then there exist elements f˜1 , ..., f˜s in R̃[x1 , ..., xn ] lifting f1 , ..., fs and such that à = R̃[x1 , ..., xn ]/( f˜1 , ..., f˜s ) is a flat lifting of A to R̃ → R. Let k be a field and let R → k be a surjective morphism from a ring R. We say that a k-scheme X is liftable to R → k if there exists a flat R-scheme X̃ and a closed embedding X ֒→ X̃ inducing an isomorphism X → X̃ ×R k. We say that a k-algebra A is s liftable to R → k if the corresponding k-scheme Spec A is liftable to R → k. 1.2 Divided power algebra Let (A, I) be a commutative ring and an ideal. Let us recall that a divided power structure on I is a sequence of maps γn : I → A that behave like operations x → xn /n!. More precisely, this sequence is required to satisfy the following properties for all n, m ≥ 0, x, y ∈ I and a ∈ A: 1. γ0 (x) = 1, γ1 (x) = x and γn (x) ∈ I, 2. γn (x + y) = ∑i+ j=n γi (x)γ j (y), 3. γn (ax) = an γn (x), 4. γn (x)γm (x) = 5. γn (γm (x)) = n+m n γn+m (x), (nm)! γ (x). n!(m!)n nm 4 A. Langer For basic properties of divided power structures see [2, §3] and [6, Tag 09PD]. The following lemma can be found in [6, Tag 09PD, Lemma 5.3]. Z(p) in the lemma stands for the ring of p-adic integers, i.e., the localization of Z along the multiplicative system Z − (p). We avoid notation Z p as in algebraic geometry this could be confused with the localization of Z along the multiplicative system {pn }n≥0 . L EMMA 1.4. Let p be a prime number and let A be a Z(p) -algebra with an ideal I. Then we have a natural bijection between the set of divided power structures γ on I and maps δ : I → I such that 1. p! δ (x) = x p for all x ∈ I, 2. δ (ax) = a p δ (x) for all a ∈ A and x ∈ I, p−1 1 i p−i for all x, y ∈ I. 3. δ (x + y) = δ (x) + δ (y) + ∑i=1 i!(p−i)! x y The correspondence is given by δ = γ p . C OROLLARY 1.5. Let p be a prime number and let A be a Z(p) -algebra. Let (A, I, γ ) and (B, J, η ) be divided power rings and let ϕ : A → B be a homomorphism of rings such that ϕ (I) ⊂ J. Let T ⊂ I be a set of generators of I. Then ϕ induces a homomorphism of divided power rings (A, I, γ ) → (B, J, η ) if and only if η p (ϕ (t)) = ϕ (γ p (t)) for all t ∈ T . The above corollary follows easily from the definition of divided power structures together with the fact that for Z(p) -algebras γn is determined by γ p (which is the content of Lemma 1.4). Let M be an A-module. Let us recall that a map τ : M → M is called p-linear if it is additive and τ (ax) = a p τ (x) for all a ∈ A and x ∈ M. For an ideal I in A we denote by I (p) the ideal in A generated by x p for all x ∈ I. C OROLLARY 1.6. Let p be a prime number and let A be a Z(p) -algebra with an ideal I. Let us assume that pI = 0 and I admits a divided power structure. Then I (p) = 0 and the set of all divided power structures on I forms a torsor over the group of p-linear maps τ : I → I. In particular, if pA = 0 then the set of divided power structures on (A, I) is isomorphic to HomA (I/I 2 , F∗ I). Proof. Vanishing of I (p) follows from condition 1 in Lemma 1.4. If γ and γ ′ are divided power structures on I then the difference τ = γ p − γ p ′ is p-linear. Lemma 1.4 implies that if γ is a divided power structure on I and τ : I → I is a p-linear map then there exists a unique divided power structure γ ′ on I such that γ p ′ = γ p + τ . The second assertion follows from the fact that if pA = 0 then p-linear maps I → I correspond to A-linear maps τ : I → F∗ I and τ (I 2 ) = 0 as I (p) = 0. 1.3 Combinatorics Let us recall the following easy facts. The following lemma can be found, e.g., in [3, Theorem 1]. L EMMA 1.7. (Lucas’s theorem) Let p be a prime number and let m and n are non-negative integers. Let us write m = ∑ ai pi and n = ∑ bi pi , with 0 ≤ ai , bi < p. Then     m ai mod p, ≡∏ bi n  where ab = 0 if b > a. The next lemma is even more standard and it can be found in any book containing combinatorial formulas: L EMMA 1.8. (Vandermonde’s identity) Let l, m, n be non-negative integers. Then we have    l   m n m+n . =∑ l−i l i=0 i Lifting zero-dimensional schemes and divided powers 5 2 Locally complete intersections and divided powers (p) Let k be a field of characteristic p. Let us set S0 = k[x1 , ..., xn ] and m0 = (x1 , ..., xn ) in S0 . Since m0 6= 0 Corollary 1.6 implies that (S0 , m0 ) does not have a divided power structure. However, we have the following lemma. L EMMA 2.1. Let (R, I, γ ) be a divided power ring. Let us assume that (p − 1)! is invertible in R and pI = 0. Let us set S = R[x1 , ..., xn ], IS = IS + (x1 , ..., xn ) and A = S/(xi11 , ..., xinn ), where i j ≤ p for all j. Then for any y1 , ..., yn ∈ IS A there exists a unique divided power structure γ̃ on IS A such that γ̃ p (xi ) = yi for i = 1, ..., n and the canonical map (R, I, γ ) → (A, IS A, γ̃ ) is a homomorphism of divided power rings. Proof. Let Rhx1 , ..., xn i be the divided power polynomial algebra (see [6, Tag 09PD, Lemma 5.1]). This is an R-algebra with an R-module structure given by Rhx1 , ..., xn i = M [m ] [mn ] Rx1 1 ...xn m1 ,...,mn ≥0 and multiplication given by (∗) [m ] [mn ] x1 1 ...xn [m′ ] [m′n ] · x1 1 ...xn   mi + m′i [m1 +m′1 ] [mn +m′n ] x1 ...xn . mi i=1 n =∏ [m] In particular, as an R-algebra ring Rhx1 , ..., xn i is generated by xi , where m ≥ 0 and i = 1, ..., n. Let Rhx1 , ..., xn i+ be the kernel of the canonical map Rhx1 , ..., xn i → R sending xm i to zero for m > 0. Let us set J = IRhx1 , ..., xn i + Rhx1 , ..., xn i+ . Then there exists a unique divided power structure δ on J such [1] [m] that (R, I, γ ) → (Rhx1 , ..., xn i, J, δ ) is a homomorphism of divided power rings and δm (xi ) = xi for all m ≥ 0 and i = 1, .., n. [m ] [m ] Let us define a surjective homomorphism of R-modules ϕ : Rhx1 , ..., xn i → A by sending x1 1 ...xn n to m1 1 mn m1 !...mn ! x1 ...xn if m j < i j for all j = 1, ..., n and to 0 otherwise. (∗) implies that this map is a homomor[m] phism of R-algebras. The kernel of ϕ is an ideal generated by x j for m ≥ i j and j = 1, ..., n. Since [m] [1] δl (xi ) = δl (δm (xi )) = (lm)! (lm)! [lm] [1] δlm (xi ) = x , l l!(m!) l!(m!)l i [2, Lemma 3.6] implies that the kernel of ϕ is a sub-D.P. ideal of J. Therefore by [2, Lemma 3.5] we [1] [p] have an induced divided power structure γ̃ 0 on IS A. Since δ p (xi ) = xi ∈ ker ϕ , we have γ̃ p0 (xi ) = 0 for i = 1, ..., n. Now for any y1 , ..., yn ∈ IS A there exists a p-linear map δ̃ such that δ̃ p (xi ) = yi for i = 1, ..., n. Then γ̃ = γ̃ 0 + δ̃ is the required divided power structure on IS A. Uniqueness of γ̃ follows from Lemma 1.4. Example 2.2. Let k be a field of characteristic p > 0 and assume i1 , ..., in ≤ p. The above lemma fails for a general lifting A of k[x1 , .., xn ]/(xi11 , ..., xinn ) to R → k. This is clear if pR = 0. For example if A is a lifting of A0 = k[x]/(x p ) to R → k then we can write A = R[x]/(x p + g) for some g ∈ mR A and any such ring is a lifting of A0 to R → k. But existence of a divided power structure on any ideal in A containing x implies that x p = 0 in A which is usually not the case. The lemma fails also for liftings if pR 6= 0. For example let us take as (R, I, γ ) the ring W2 (k) with I = (p) and γ p = 0. Let us consider A = W2 (k)[x]/(x p − p). This ring is a flat lifting of k[x]/(x p ) to R → k. Let us assume that there exists a divided power structure γ̃ on ideal (p, x). Then we have p!γ̃ p (x) = x p = p, which implies p((p − 1)!γ̃ p (x) − 1) = 0. But W2 (k)-flatness of A implies that pA ≃ A/(p) and hence ((p − 1)!γ̃ p(x) − 1) ∈ (p). Since γ̃ p (x) ∈ (p, x), this gives 1 ∈ (p, x), a contradiction. Let k be a field of characteristic p. Let us set A = k[x1 , ..., xn ]/(xi11 , ..., xinn ), where 2 ≤ i j ≤ p for all j. Lemma 2.1 implies that there exists a unique divided power structure γ on IA = (x1 , ..., xn )A such that γ p (xi ) = 0 for i = 1, ..., n. Let us consider B = k[y1,1 , ..., y1,i1 −1 , ..., yn,1 , ..., yn,in −1 ]/(y2i, j )i=1,...,n, j=1,...,in −1 . This ring also comes with a unique divided power structure δ on IB = (yl, j )l=1,...,n, j=1,...,il −1 B such that δ p (yi, j ) = 0 for all i, j. 6 A. Langer i −1 l P ROPOSITION 2.3. The map xl → ∑ j=1 yl, j for l = 1, .., n defines an injective homomorphism of divided power rings ϕ : (A, IA , γ ) → (B, IB , δ ). Proof. Let us take an integer 2 ≤ m < p and note that if Sm acts on Cm = k[z1 , ..., zm ]/(z21 , ..., z2m ) by permutation of variables then the subring of invariants CmSm is spanned by (z1 + ... + zm ). Moreover, this subring is isomorphic to k[t]/(t m+1 ) with isomorphism given by mapping t to (z1 + ... + zm ). To see this one needs to note that in Cm we have (z1 + ... + zm )s = s! ∑ zl11 ...zlmm , l1 +...+lm =s l1 ,...,lm ≤1 which is zero precisely for s > m. Now we have an action of Si1 −1 × ... × Sin −1 on B ≃ Ci1 −1 ⊗ ... ⊗ Cin −1 and the ring of invariants is Si −1 S n −1 1 with the isomorphism induced by ϕ : A → B. Clearly, we have isomorphic to A ≃ Ci1 −1 ⊗ ... ⊗ Cini−1 ϕ (IA ) ⊂ IB . By Corollary 1.5 to check that ϕ is a homomorphism of divided power rings it is sufficient to check that δ p (ϕ (xl )) = ϕ (γ p (xl )) = 0 for l = 1, ..., n. But since il ≤ p we have il −1 il −1 j=1 j=1 δ p (ϕ (xl )) = δ p ( ∑ yl, j ) = ∑ δ p (yl, j ) + ∑ s1 +...+sil −1 =p s1 ,...,sil −1 ≤1 si −1 1 ysl,1 ...yl,ill −1 = 0. 3 General results on divided power rings in equi-characteristic case Let R be a ring in which (p − 1)! is invertible and let f ∈ R[x1 , ..., xn ] be a polynomial. Let us write f as a Ji sum ∑m i=1 ai x of distinct monomials (where Ji are multi-indices). Then we set w p ( f ) := ∑ ∑mj=1 l j =p, l j <p 1 (a1 xJ1 )l1 ...(am xJm )lm . l1 !...lm ! This polynomial appears naturally in the computation of f p and it plays an important role in the study of divided power structures. P ROPOSITION 3.1. Let k be a ring of characteristic p > 0. Let m0 be the maximal ideal (x1 , ..., xn ) in k[x1 , ..., xn ] and and let us take an ideal I ⊂ m20 . Let us consider A0 = k[x1 , ..., xn ]/((xi11 , ..., xinn ) + I), where i j ≤ p for all j. Then the following conditions are equivalent: 1. m0 A0 admits a divided power structure, 2. w p ( f0 ) ∈ (xi11 , ..., xinn ) + I for all f0 ∈ I, 3. if I is generated by some subset T0 then w p ( f0 ) ∈ (xi11 , ..., xinn ) + I for all f0 ∈ T0 . Ji Proof. Let us take some f0 ∈ I and write f0 = ∑m i=1 ai x , where Ji are distinct multiindices with |Ji | ≥ 2. Assume that m0 A0 has a divided power structure γ . Note that γ p (xi x j ) = xip γ p (x j ) = 0. Similarly, since |Ji | ≥ 2 we get γ p (xJi ) = 0. Then 0 = γ p ( f0 ) = ∑ γ p (ai xJi ) + w p ( f0 ) = ∑ aip γ p (xJi ) + w p ( f0 ) = w p ( f0 ) in A0 . Hence w p ( f0 ) ∈ (xi11 , ..., xinn ) + I, which proves that 1 implies 2. Obviously 2 implies 3. To prove that 3 implies 1 let us set B0 = k[x1 , ..., xn ]/(xi11 , ..., xinn ) and assume that w p ( f0 ) ∈ (xi11 , ..., xinn ) + I for all f0 ∈ T . By Lemma 2.1 the ideal m0 B0 has a unique divided power structure γ̃ such that γ̃ (xi ) = 0 and the canonical map (k, 0, 0) → (B0 , m0 B0 , γ̃ ) is a homomorphism of divided power rings. By the same computation as above we have γ̃ p ( f0 ) = ∑ γ̃ p (ai xJi ) + w p ( f0 ) = w p ( f0 ) ∈ IB0 Lifting zero-dimensional schemes and divided powers 7 and hence [2, Lemma 3.6] implies that IB0 is a sub-D.P. ideal of m0 B. Therefore by [2, Lemma 3.5] there exists a unique divided power structure γ on m0 A0 such that (B0 , m0 B0 , γ̃ ) → (A0 , m0 A0 , γ ) is a homomorphism of divided power algebras. C OROLLARY 3.2. Let k be a ring of characteristic p > 0. Let I ⊂ (x1 , ..., xn )2 ⊂ k[x1 , ..., xn ] and J ⊂ (y1 , ..., yn′ )2 ⊂ k[y1 , ..., yn′ ] be ideals and let πx : k[x1 , ..., xn , y1 , ..., yn′ ] → k[x1 , ..., xn ] and πy : k[x1 , ..., xn , y1 , ..., yn′ ] → k[y1 , ..., yn′ ] be the canonical projections. Let i1 , ..., in , j1 , ..., jn′ be positive integers less or equal to p. If j ′ j the ideal (x1 , ..., xn , y1 , ..., yn′ ) in k[x1 , ..., xn , y1 , ..., yn′ ]/((xi11 , ..., xinn , y11 , ..., ynn′ )+ πx−1 I + πy−1 J) admits a dij j ′ vided power structure then (x1 , ..., xn ) in k[x1 , ..., xn ]/((xi11 , ..., xinn )+I) and (y1 , ..., yn′ ) in k[y1 , ..., yn′ ]/((y11 , ..., ynn )+ J) also admit a divided power structure. Proof. Let us take some polynomials f (x) ∈ I and g(y) ∈ J. The canonical projection πx maps w p ( f (x) + g(y)) to w p ( f (x)) and πy maps w p ( f (x) + g(y)) to w p (g(y)), so the corollary follows directly from Proposition 3.1. T HEOREM 3.3. Let (R, mR ) be a local ring with residue field k of characteristic p > 0.. Let us assume that pR 6= 0, pmR = 0 and me+1 = 0 for some 1 ≤ e ≤ q − 1. Let us take an ideal I ⊂ k[x1 , ..., xn ] and some R polynomial f0 ∈ I such that for each multiindex (l1 , ..., ln ) of a monomial occurring in f0 we have     ql1 qln ≥ e + 1. + ... + i1 in Let us set A0 = k[x1 , ..., xn ]/((xi11 , ..., xinn ) + I), where i j ≤ q = pr for all j. If A0 is liftable to the canonical projection R → k = R/mR then w p ( f0p r−1 ) ∈ (xi11 , ..., xinn ) + I. Proof. Assume that A0 is liftable to R → k and let π : A → A/mR A = A0 denote the corresponding projection. By Lemma 1.3 we can assume that A is a quotient of R[x1 , ..., xn ] and π lifts to a map R[x1 , ..., xn ] → Ji k[x1 , ..., xn ]. Let us write f0 as a sum of monomials ∑m i=1 ai x . Let us choose some bi ∈ R lifting ai ∈ k m J and let us set f = ∑i=1 bi x i . By construction we have π ( f ) = f0 = 0 in A0 , so f ∈ mR A. This implies i i f q ∈ mqR A = 0. Similarly, we have x jj ∈ mR A as x jj = 0 in A0 . Then our assumptions on e and Ji imply that xqJi ∈ me+1 R A = 0 for i = 1, ..., m. Hence computing in A we get !q 0 = fq = m m = ( ∑ bip x pJi + p!w p( f )) p ∑ bixJi . i=1 i=1 If r = 1 then we have r−1 m 0 = ( ∑ bipx pJi + p!w p ( f )) p r−1 = p!w p ( f ). i=1 Note that pR ⊂ mR and pmR = 0, so p2 R = 0. So if r > 1 then we obtain m p 0 = ( ∑ bi x pJi + p!w p ( f )) p r−1 m p = ( ∑ bi x pJi ) p r−1 . i=1 i=1 p pJi m Ji we eventually get By induction replacing q = pr by pr−1 and ∑m i=1 bi x by ∑i=1 bi x p!w p ( f (x1p r−1 , ..., xnp r−1 )) = 0 Note that p : R → R factors through k = R/mR → R and this last map is injective as pR 6= 0. Therefore from R-flatness of A, the map τ : A0 ≃ k ⊗R A → A is also injective and by construction τπ = p. But we have τ ((p − 1)! w p ( f0 (x1p So we have w p ( f0p r−1 r−1 , ..., xnp r−1 ))) = τπ ((p − 1)! w p( f (x1p ) = w p ( f0 (x1p r−1 , ..., xnp r−1 r−1 , ..., xnp r−1 )) = p!w p ( f (x1p )) = 0 in A0 and hence w p ( f0p r−1 r−1 , ..., xnp r−1 ) ∈ (xi11 , ..., xinn ) + I. )) = 0. 8 A. Langer Remark 3.4. In the special case when I is a principal ideal and i1 = ... = in = q the above theorem has the following geometric reformulation. Let X := ( f0 = 0) ⊂ Ank be a hypersurface with multiplicity ≥ (e + 1) at 0. If q = pr and the r-th Frobenius neighbourhood Yr := Spec k[x1 , ..., xn ]/(xq1 , ..., xqn , f0 ) of 0 is liftable to any local ring R → k then w p ( f0p r−1 ) = 0 ∈ k[Yr ]. C OROLLARY 3.5. Let (R, mR ) be a noetherian local ring with pR 6= 0 and residue field k. Let us assume that me+1 = 0 for some 1 ≤ e ≤ p − 1. Let T0 be a set generating some ideal I ⊂ k[x1 , ..., xn ] and let us R assume that for each f0 ∈ T0 and each multiindex (l1 , ..., ln ) of a monomial occurring in f0 we have     pln pl1 ≥ e + 1. + ... + i1 in Let us set A0 = k[x1 , ..., xn ]/((xi11 , ..., xinn ) + I), where i j ≤ p for all j. If A0 is liftable to R → k then m0 A0 has a divided power structure. Proof. Replacing R by R/pmR and using Nakayama’s lemma we can assume that pmR = 0. Then the required assertion follows from Proposition 3.1 and the above theorem. Note that if A0 is liftable to R → k then the proof of Proposition 3.1 gives the same divided power structure on m0 A0 independently of a lifting. Let V be a discrete valuation ring of unequal characteristic p and with uniformizing parameter π . Let us assume that (π ) has a divided power structure. By [2, Example 3.2.3] this is equivalent to e ≤ p − 1, where e is the absolute ramification index of V . Then R = V /(π e+1 ) is a local ring satisfying pR = (π e ) 6= 0 and me+1 R = 0. Let k be a field of characteristic p > 0 and let R be some ring with surjection R → k. Assume that some k-algebra A0 is liftable to R → k. Since flatness is preserved under localization, A0 is liftable to the localization R′ = R(p−1)! → k. If (R, mR ) is as in Corollary 3.5 then (p − 1)! is invertible in R′ and (mR R′ ) p = 0, so mR R′ has a not necessarily unique divided power structure (cf. [2, Example 3.2.4]). In the following we show examples of rings A0 as in Corollary 3.5 such that m0 A0 does not have a divided power structure. However, in some examples of Corollary 4.2 one can see that TA10 /k is large, i.e., A0 has many non-trivial deformations over the ring k[t]/(t 2 ) of dual numbers. Since (t) in k[t]/(t 2 ) has a divided power structure, this show that assumption pR 6= 0 in Corollary 3.5 is essential. 4 Examples In this section k is a field of characteristic p > 0. L EMMA 4.1. Let q = pr , where r ≥ 1. Let f0 = y1 + y2 + y3 ∈ k[x1 , ..., xn ] be a sum of non-zero monomials, each of total degree ≥ 2 and such that each variable xi appears in product y1q−p degree less than q. Then r−1 w p ( f0p ) 6∈ (xq1 , ..., xqn , f0 ). Proof. Let us assume that w p ( f0p note that (p − 1)! f0q−1w p ( f0p r−1 )= r−1 q q q−1 ) ∈ (x1 , ..., xn , f0 ). It follows that f0 ∑ j1 + j2 + j3 =q−1 q  q−1 j1 , j2 , j3  ∑ w p ( f0p r−1 r−1 y2q−p r−1 q y2p 3 r−1 −1 q ) ∈ (x1 , ..., xn ). Let us (p − 1)! j1 +pr−1 l1 j2 +pr−1 l2 j3 +pr−1 l3 y1 y2 y3 . =p l1 !l2 !l3 ! l1 +l2 +l3 l1 ,l2 ,l3 <p q q−pr−1 q−pr−1 2pr−1 −1 y3 y2 If this polynomial belongs to the ideal (x1 , ..., xn ) then the coefficient α at the monomial y1 is 0. This coefficient is equal to   q−1 (p − 1)! . α= ∑ ∑ j1 , j2 , j3 j1 + j2 + j3 =q−1 l +l +l =p l1 !l2 !l3 ! 1 2 3 l1 ,l2 ,l3 <p with pr−1 l1 + j1 =q−pr−1 ,pr−1 l2 + j2 =q−pr−1 ,pr−1 l3 + j3 =2pr−1 −1 Lifting zero-dimensional schemes and divided powers 9 Let us note that j1 = pr−1 (p − 1 − l1) and j2 = pr−1 (p − 1 − l2) are p-adic expansions. Since pr−1 l3 + j3 = 2pr−1 − 1 we have l3 ≤ 1 and j3 = (p − 1) + ... + (p − 1)pr−2 + (1 − l3)pr−1 is a p-adic expansion of j3 . Note also that q − 1 = (p − 1) + ... + (p − 1)pr−1. So by Lucas’s theorem (see Lemma 1.7) we have         q−1 q − 1 q − 1 − j3 p−1 p − 2 + l3 = ≡ mod p. j1 , j2 , j3 j3 j1 1 − l3 p − 1 − l1 Using Vandermonde’s identity (see Lemma 1.8) we get       (p − 1)! p − 1 p−1 p−2 (p − 1)! p − 1 α= + ∑ ∑ 0 1 p − 1 − l1 p − 1 − l1 l +l =p−1 l1 !l2 ! l +l =p l1 !l2 ! 1 2 1 2 l1 ,l2 <p p−1    p−1 p−1 (p − 1)! p−1 (p − 1)! = ∑ +∑ l p − 1 − l l !(p − l )! (p − 1 − l1)!(l1 − 1)! 1 1 1 l1 =0 l1 =1 1              p p−1 p−1 2p − 2 2p − 2 2p − 2 2p − 1 (p − 1) + p = +∑ = + = = = 1, l1 p − l1 p−1 p−1 p p p l =0 1 where in the last line we again use Lucas’s theorem. This contradicts our assumption. C OROLLARY 4.2. Let A0 = k[x1 , ..., xn ]/(x1p , ..., xnp , f0 ), where f0 = y1 + y2 + y3 is a sum of non-zero monomials, each of total degree ≥ 2 and such that each variable xi appears in product y1 (y2 y3 ) p−1 with degree less than p. Then the ideal (x1 , ..., xn ) ⊂ A0 does not have a divided power structure. Proof. If (x1 , ..., xn ) ⊂ A0 has a divided power structure then Proposition 3.1 implies that w p ( f0 ) ∈ (x1p , ..., xnp , f0 ). But this contradicts Lemma 4.1. Example 4.3. As a special case of the above corollary we obtain Koblitz’s example [2, Example 3.2.4]: the ideal (x1 , ..., x6 ) in A0 = k[x1 , ..., x6 ]/(x1p , ..., x6p , x1 x2 + x3 x4 + x5 x6 ) does not have a divided power structure. In this case Corollary 3.5 implies that A0 does not lift to W2 (k) recovering [8, Proposition 3.4]. Below we show that if k has characteristic 2 then this ring lifts to characteristic zero. For simplicity we take k = F2 although the same construction √ works for an arbitrary field of characteristic 2. Let us consider R = Z[ 2] = Z[t]/(t 2 − 2). This ring has a canonical surjection R → R ⊗ F2 = F2 [t]/(t 2) → F2 . Let us set A = R[x1 , ..., x6 ]/(x21 + tx4 x5 x6 , x22 + tx3, x23 , x24 , x25 , x26 , x1 x2 + x3 x4 + x5 x6 ). Note that we divide by a non-homogeneous ideal, so unlike A0 ring A does not have a canonical grading (but it has a weighted grading, e.g., we can assign (x1 , ..., √x6 ) weights (3, 1, 2, 2, 2, 2)). Using any computer √ algebra system one can check that A ⊗R Q( 2) is a Q( 2)-algebra of length 36. One can also check that  A ⊗R F2 = A0 is an F2 -algebra of the same length. Therefore after localization we see that A 12 is a flat   R 21 -module lifting A0 to characteristic zero. In fact, with some more work one can probably check that A is a flat R-module but we will not need that. This gives the first known example of a 0-dimensional scheme defined over a field k of positive characteristic that does not lift to W2 (k) but it lifts to characteristic zero. C OROLLARY 4.4. Let k be an algebraically closed field of characteristic p > 0. Let X ⊂ Ank be a general hypersurface singular at 0. Let us assume that n ≥ 5 if p ≥ 3 or n ≥ 6 if p = 2. Then the first Frobenius neighbourhood of 0 ∈ X has no divided power structure and it does not lift to W2 (k). Proof. Let us choose coordinates x1 , ..., xn in Ank and let m0 be the maximal ideal (x1 , ..., xn ) ⊂ k[Ank ] = k[x1 , ..., xn ]. Let f = 0 be an equation of a hypersurface singular at 0. Note that M( f ) := (p − 1)! f p−1 w p ( f ) p p is an integer polynomial in coefficients of f and hence the condition M( f ) ∈ (x1 , ..., xn ) defines a closed p p subset in the space m20 /(x1 , ..., xn ) parameterizing the first Frobenius neighbourhoods of hypersurfaces singular at 0. Clearly, this subset does not correspond to all hypersurfaces and it is non-obvious that it is non-empty. But the proof of Lemma 4.1 shows that there exists f for which M( f ) 6∈ (x1p , ..., xnp ). More 10 A. Langer precisely, one can take f = x21 + x2 x3 + x4 x5 if p ≥ 3 or f = x1 x2 + x3 x4 + x5 x6 if p = 2. So a general hypersurface also satisfies this condition and by Proposition 3.1 its first Frobenius neighbourhood has no divided power structure. By Corollary 3.5 such schemes do not lift to W2 (k). Remark 4.5. In the above corollary the notion of “general” is used in the usual sense, i.e., it corresponds to a general point in the parameter space of all hypersurfaces singular at 0. However, the proof shows that the assertion holds also for a cone over a general projective hypersurface of degree 2 in Pn−1 (under the same assumptions on n). One can also obtain a similar statement for hypersurfaces of higher degree at the cost of increasing the number of variables and degree of hypersurfaces (see the proof of Corollary 4.8). The next proposition gives for any local ring R an example of a 0-dimensional scheme Z ⊂ Ank given by only quadratic equations but non-liftable to R. P ROPOSITION 4.6. Let (R, mR ) be a local ring with pR 6= 0 and residue field k = R/mR of characteristic p. p−1 Let us assume that mR = 0. Let us take n = 6(p−1) and consider the ring C = k[y1,1 , ..., y6,p−1 ]/(y21,1 , ..., y26,p−1 , g), where p−1 p−1 g= ∑ ∑ (y1,i y2, j + y3,iy4, j + y5,iy6, j ). i=1 j=1 Then Z := Spec C is not liftable to R → k. Proof. By Proposition 2.3 we have an injective homomorphism of divided power rings ϕ : (A = k[x1 , ..., x6 ]/(x1p , ..., x6p ), IA , γ ) → (B = k[y1,1 , ..., y6,p−1 ]/(y21,1 , ..., y26,p−1 ), IB , δ ) p−1 given by xl → ∑ j=1 yl, j . Let us set f = x1 x2 +x3 x4 +x5 x6 . Then ϕ ( f ) = g and hence ϕ (w p ( f )) = w p (g). By Lemma 4.2 and Proposition 3.1 we have w p ( f ) 6∈ f A. Using the group action as in proof of Proposition 2.3 one can easily see that this implies that w p (g) 6∈ gB and hence the ideal (yi, j )i=1,...,6, j=1,...,p−1 in C = B/gB does not have a divided power structure. Hence the required assertion follows from Corollary 3.5. P ROPOSITION 4.7. Let (R, mR ) be a local ring with pR 6= 0 and residue field k = R/mR of characteristic q p. Let us assume that mR = 0 for some q = pr with r ≥ 1. Let us take n = 3q and consider the ring q A0 = k[x1 , ..., xn ]/(x1 , ..., xqn , f0 ), where f0 = x1 x2 ...xq + xq+1 xq+2 ...x2q + x2q+1x2q+2 ...x3q . Then A0 is not liftable to R → k. Proof. As in proof of Corollary 3.5 we can assume that pmR = 0. Then by Theorem 3.3 it is sufficient to r−1 show that w p ( f0p ) 6∈ (xq1 , ..., xqn , f0 ). This is a direct corollary of Lemma 4.1. C OROLLARY 4.8. Let k be an algebraically closed field of characteristic p > 0 and let (R, mR ) be a local ring with pR 6= 0 and residue field k. Let us assume that mqR = 0, where q = pr . Let X ⊂ Ank be a general hypersurface with multiplicity ≥ q at 0. If n ≥ 3q then the r-th Frobenius neighbourhood of 0 ∈ X is not liftable to R → k. Proof. The proof is analogous to the proof of Corollary 4.4, with Proposition 4.7 giving an example of a r−1 q q polynomial f for which f q−1 w p ( f p ) 6∈ (x1 , ..., xn ). C OROLLARY 4.9. Let k be a field of characteristic p > 0. There exists a direct system {Xn }n∈N of 0dimensional k-schemes such that for any noetherian local ring (R, mR ) with pR 6= 0 and residue field k = R/mR the schemes Xn do not lift to R → k for all sufficiently large n. Lifting zero-dimensional schemes and divided powers 11 Proof. We construct the required system inductively starting with X0 = Spec k. Suppose that we coni structed Xn and it is of the form Spec k[x1 , ..., xmn ]/(xi11 , ..., xmmnn , f ). Let us set i n n p An+1 := k[x1 , ..., xmn , y1 , ..., y3pn ]/(xi11 , ..., xmmnn , y1p , ..., y3p n , f (x) + g(y)), where g(y) = y1 ...y pn + y pn +1 ...y2pn + y2pn +1 ...y3pn ). By construction we have a surjective homomorphism n n p ϕn+1 : An+1 → Bn+1 := k[y1 , ..., y3pn ]/(y1p , ..., y3p n , g(y)), n−1 n−1 n−1 which maps w p (( f (x) + g(y)) p ) to w p (g(y)) p ). Since w p (g(y)) p ) 6= 0 in Bn+1 , we also have n−1 w p (( f (x) + g(y)) p ) 6= 0 in An+1 . So by Theorem 3.3 if we set Xn+1 := Spec An+1 then Xn+1 does not lift n to local rings (R, mR ) with mRp = 0 and pR 6= 0. Now if (R, mR ) is any noetherian local ring with pR 6= 0 and residue field k = R/mR then by Krull’s intersection theorem we can find some e such that me+1 ⊂ pR. If e ≤ pn then Xn+1 does not lift to R/meR R and hence it also does not lift to R → k. 5 Liftability of 0-dimensional Gorenstein schemes Let X ⊂ Z be a subscheme. Define a sheaf of ideals IY = H omOZ (OX , OZ ), and let Y ⊂ Z be the subscheme defined by IY . Then we say that Y is linked to X by Z. Let us set S = k[x1 , . . . , xn ] and B0 = S/(x1p , . . . , xnp ). Let us fix some f ∈ S and set A0 = B0 / f B0 . Let us consider a local Artin ring R with residue field k. The second part of the next proposition is a special case of a variant of [4, Exercise 9.4]. P ROPOSITION 5.1. The scheme Y0 = Spec C0 , where C0 = B0 /(0 :B0 f ), is a 0-dimensional Gorenstein k-scheme. If Y0 has a lifting to R → k then X0 = Spec A0 also has a lifting to R → k. Proof. We have an exact sequence of B0 -modules ·f 0 −→ J −→ B0 −→ B0 −→ B0 / f B0 −→ 0, where J = (0 :B0 f ). Since B0 is 0-dimensional and Gorenstein, we have (0 :B0 J) = f B0 ≃ B0 /J. Therefore ωB0 /J = HomB0 (B0 /J, B0 ) ≃ B0 /J and C0 = B0 /J is Gorenstein. Let us set Z0 = Spec B0 and let P0 be the spectrum of the localization of S at the maximal ideal (x0 , ..., xn ). Then Z0 is a 0-dimensional complete intersection k-subscheme of P0 and Y0 ⊂ Z0 is a Gorenstein k-subscheme linked to X0 by Z0 . Assume that Y0 is liftable to R → k. By Lemma 1.3 there exists a lifting Y ⊂ P of Y0 ⊂ P0 to R → k, where P is the localization of R[x0 , .., xn ] at the maximal ideal lying over (x0 , ..., xn ). Then there exists a lifting Z of Z0 to R → k that contains Y (see [4, Exercise 9.4]). In fact, by Lemma 1.1 one can take as Z a subscheme of P cut out by some lifts of generators of the ideal of Z0 in P0 taken from the ideal of Y in P. But then the scheme X, linked to Y by Z, is a lifting of X0 to R → k. C OROLLARY 5.2. Let R be a noetherian local ring with residue field k of characteristic p > 0. If pR 6= 0 then there exists a zero-dimensional Gorenstein k-scheme Z that cannot be lifted to R. Proof. Let mR be the maximal ideal of R. By Krull’s intersection theorem mnR = 0, so we can find the smallest positive integer e such that meR ⊂ pR. If a k-scheme is liftable to R then it is also liftable to R′ = R/pmR. Let us set mR′ = mR R′ . Then pmR′ = 0 and meR′ ⊂ pR′ , so me+1 R′ = 0. Moreover, we have pR′ 6= 0. Indeed, if pR′ = 0 then pR = pmR , so by Nakayama’s lemma pR = 0, a contradiction. Now the required assertion follows from Propositions 4.7 and 5.1. T Acknowledgements The author would like to thank P. Achinger, J. Jelisiejew and M. Zdanowicz for useful comments on earlier versions of the paper. 12 A. Langer References [1] American Institute of Mathematics Problem List. Components of Hilbert schemes, available at http://aimpl.org/hilbertschemes, 2010. [2] P. Berthelot, A. Ogus, Notes on crystalline cohomology. Princeton University Press, Princeton, N.J.; University of Tokyo Press, Tokyo, 1978. vi+243 pp. [3] N. J. Fine, Binomial coefficients modulo a prime, Amer. Math. Monthly 54 (1947), 589–592. [4] R. Hartshorne, Deformation theory. Graduate Texts in Mathematics 257. Springer, New York, 2010. viii+234 pp. [5] H. Matsumura, Commutative ring theory, Translated from the Japanese by M. Reid. Second edition. Cambridge Studies in Advanced Mathematics 8. Cambridge University Press, Cambridge, 1989. xiv+320 pp. [6] Stacks project, http://stacks.math.columbia.edu/, 2017. [7] R. Vakil, Murphy’s law in algebraic geometry: badly-behaved deformation spaces. Invent. Math. 164 (2006), 569–590. [8] M. Zdanowicz, Liftability of singularities and their Frobenius morphism modulo p2 , Int. Math. Res. Not. (2017), DOI: https://doi.org/10.1093/imrn/rnw297.
0math.AC
CONVOLUTIONAL NEURAL NETWORKS VIA NODE-VARYING GRAPH FILTERS Fernando Gama† , Geert Leus‡ , Antonio G. Marques∗ and Alejandro Ribeiro† arXiv:1710.10355v2 [cs.LG] 23 Feb 2018 † Department of Electrical and Systems Engineering, University of Pennsylvania, Philadelphia, USA ‡ Department of Microelectronics, Delft University of Technology, Delft, The Netherlands ∗ Department of Signal Theory and Communications, King Juan Carlos University, Madrid, Spain ABSTRACT Convolutional neural networks (CNNs) are being applied to an increasing number of problems and fields due to their superior performance in classification and regression tasks. Since two of the key operations that CNNs implement are convolution and pooling, this type of networks is implicitly designed to act on data described by regular structures such as images. Motivated by the recent interest in processing signals defined in irregular domains, we advocate a CNN architecture that operates on signals supported on graphs. The proposed design replaces the classical convolution not with a nodeinvariant graph filter (GF), which is the natural generalization of convolution to graph domains, but with a node-varying GF. This filter extracts different local features without increasing the output dimension of each layer and, as a result, bypasses the need for a pooling stage while involving only local operations. A second contribution is to replace the node-varying GF with a hybrid node-varying GF, which is a new type of GF introduced in this paper. While the alternative architecture can still be run locally without requiring a pooling stage, the number of trainable parameters is smaller and can be rendered independent of the data dimension. Tests are run on a synthetic source localization problem and on the 20NEWS dataset. Index Terms— Convolutional neural networks, network data, graph signal processing, node-varying graph filters. 1. INTRODUCTION Convolutional neural networks (CNNs) have shown remarkable performance in a wide array of inference and reconstruction tasks [1], in fields as diverse as pattern recognition, computer vision and medicine [2–4]. The objective of CNNs is to find a computationally feasible architecture capable of reproducing the behavior of a certain unknown function. Typically, CNNs consist of a succession of layers, each of which performs three simple operations – usually on the output of the previous layer – and feed the result into the next layer. These three operations are: 1) convolution, 2) application of a nonlinearity, and 3) pooling or downsampling. Because the classical convolution and downsampling operations are defined for regular (grid-based) domains, CNNs have been applied to act on data modeled by such a regular structure, like time or images. However, an accurate description of modern datasets such as those in social networks or genetics [5, 6] calls for more general irregular structures. A framework that has been gaining traction to tackle these problems is that of graph signal processing (GSP) [7–9]. GSP postulates that data can be modeled as a collection of values associated with the nodes of a graph, whose edges describe pairwise relationships between the data. By exploiting the interplay between the data and the graph, traditional signal processing concepts such Supported by USA NSF CCF 1717120 and ARO W911NF1710438, and Spanish MINECO TEC2013-41604-R and TEC2016-75361-R. as the Fourier transform, sampling and filtering have been generalized under the GSP framework to operate on a broader array of datasets [10–12]. Motivated by the success of CNNs and the need to deal with irregular domains, recent efforts have been made to extend CNNs to work with data (signals) defined on manifolds and graphs [13]. Since in the GSP literature the notion of convolution is generalized to that of node-invariant graph filters (GFs) –matrix polynomials of the graph Laplacian–, existing CNN works operating on graph signals have replaced classical convolutions with such node-invariant GFs [14]. Nonetheless, how to generalize pooling remains elusive. Attempts using hierarchical multilayer clustering algorithms have been made [15], but clustering is usually a computationally intensive operation [16]. This paper proposes a new architecture for CNNs operating on graph signals upon replacing convolutions with node-varying GFs, which are more flexible local graph-signal operators described in [17]. This not only introduces additional degrees of freedom, but also avoids the pooling stage and, as a result, the need to compute a cluster for each of the layers disappears. A second architecture is also proposed, that replaces convolutions with a hybrid node-varying GF, a new graph-signal operator introduced in this paper that can be viewed as an intermediate design between node-varying and classical GFs. Our node-varying GF based architectures are able to extract different local features at varying resolutions, do not increase the dimension of the output of each layer, and can be implemented using only local exchanges. Paper outline: Sec. 2 reviews traditional CNNs and GSP and introduces the definition of node-varying and node-invariant GFs. Sec. 3 presents the new local graph CNN architectures using node-varying GFs. Sec. 4 runs tests on a synthetic source localization problem and on the 20NEWS dataset. 2. PRELIMINARIES: CNN AND GSP Let x ∈ X be the input data or signal, defined on a field X , and let y ∈ Y be the output data, defined on a field Y. Let f : X → Y be a function such that y = f (x). Generically, the objective of CNNs is to design a function fˆ : X → Y such that a problem-dependent loss function L(y, fˆ(x)) is minimized. Standard choices for such a loss are the cross-entropy (for classification) or the mean square error (for regression). The function fˆ is built from a concatenation of L layers fˆ = fL ◦ · · · ◦ f2 ◦ f1 where each layer is a function f` : X`−1 → X` , ` = 1, . . . , L with X0 = X and XL = Y. Each one of these layers is computed from three basic operations x` = f` (x`−1 ) = P` {ρ` (A` (x`−1 ))}, where A` : X`−1 → X`0 is a linear function, ρ` : X`0 → X`0 is a nonlinear function, and P` : X`0 → X` is the pooling operator, and where x0 = x and xL = ŷ = fˆ(x) is the estimated output after L layers. It is noted that this architecture is computationally straightforward since it is comprised of simple operations, and it is also amenable to be efficiently trained by means of a back-propagation algorithm [18]. In a CNN, the first operation of each layer is a convolution with a filter A` (x`−1 ) = a` ∗ x`−1 . Filter a` has small support so that it acts as a computationally efficient local feature extractor by relating only a few nearby values of the signal. In order to extract several different features within the same region, a collection of F` filters F` {a`,k }k=1 is used, resulting in a F` -times increase in the dimension of the output. To illustrate this with an example, consider that x = x0 is an image of size 16 × 16, X = X0 = R16×16 and that, in the first layer, {a1,1 , . . . , a1,4 } is a collection of F1 = 4 filters of support 2 × 2 pixels. Then, X10 = R16×16×4 and A1 : R16×16 → R16×16×4 with A1 (x) = {a1,1 ∗ x, . . . , a1,4 ∗ x}. The second operation is to apply a (pointwise) nonlinear function ρ` (·) to the output of the linear step to yield ρ` (A` (x`−1 )) ∈ X`0 . The objective behind applying these nonlinearities at each layer is to create a structure flexible enough to reproduce general nonlinear behaviors. Typical choices for ρ` include rectified linear units (ReLUs) max{0, x} and the absolute value |x| [19]. Continuing with the previous example, now that the output of the convolution layer is A1 (x0 ) ∈ R16×16×4 , we apply a ReLU so that ρ` : R16×16×4 → R16×16×4 with [ρ` (A1 x0 )]i,j,k = max(0, [A1 (x0 )]i,j,k ) for i, j = 1, . . . , 16 and k = 1, . . . , 4. The third operation is pooling, whose objective is twofold; i) given that each convolution operation increases the number of features, pooling keeps the output dimension under control; and ii) since it is desirable to analyze the data at different resolution levels, pooling reduces the distance between datapoints that were originally far away (with the reduction being more significant as more layers are added). It is noted that a better way to aggregate data in nonbandlimited signals is to do max-pooling or average-pooling instead of traditional downsampling [19]. Returning to the ongoing example, assume that we consider max-pooling of size 2. Then, P1 : R16×16×4 → R8×8×4 so that X10 = R16×16×4 and X1 = R8×8×4 and where each element of x1 is obtained from computing the maximum value of ρ1 (A1 (x0 )) within pixel masks of size 2 × 2. As already explained, those three operations are subsequently repeated by concatenating layers. The idea is to change the representation of the data by progressively trading samples for features [20]. The target representation should be more useful for the specific task at hand as measured by the loss function L. The last step is typically a readout layer implementing a (linear) map from XL−1 to Y. Remark: Albeit fairly typical, modifications to the described CNN architecture have been developed. These range from using outputs of different layers as input to the next layer [21], to assuming that the useful output is collected at every layer instead of the last one [2], to adding fully-connected layers after reaching the all-feature vector [22]. Also, avoiding the pooling stage has been discussed [23]. 2.1. Graph signals and filters In this paper, we consider each datapoint in the dataset to be modeled as a graph signal. To be specific, let G = (V, E, W) be a graph with a node set V with cardinality N , a set of edges E ⊆ V × V, and a weight function W : E → R. A graph signal is then a mapping x : V → R that assigns a real number to each node and can be conveniently represented as a vector x ∈ RN , with element [x]k being the signal value at node k. Modeling a dataset as a graph signal allows for arbitrary pairwise relationships between the elements of the datapoint (i.e. between the elements of the vector). This relationship is brought to the fore by means of a graph shift operator (GSO) S ∈ RN ×N which is the matrix that relates the signal with the un- derlying graph support. More specifically, S is such that [S]ij 6= 0 only if (i, j) ∈ E or if i = j. This means that Sx is a local computation that can be carried out by operating only on the neighborhood. Examples of GSOs are the adjacency matrix, the graph Laplacian and their normalized counterparts [8, 9]. The GSO is the key to define the graph Fourier transform (GFT) and the different types of GFs. Assuming first that S = VΛVH is a normal matrix diagonalized by a unitary matrix V, the GFT of a signal x is defined as x̃ = VH x. Moreover, node-invariant and node-varying GFs are defined, respectively, as [17] PT −1 P −1 diag(ht )St , (1) ht S t , Hnv := t=0 Hni := Tt=0 T −1 −1 where T is the order of the filter, and {ht }t=0 and {ht }Tt=0 are N the filter coefficients. Furthermore, if ht ∈ R is set such that [ht ]k = ht for all k and t, then filter Hnv reduces to Hni . Two interesting properties of the GFs in (1) are: i) they are linear operators that account for the structure of the graph via S, and ii) since S is a local (one-hop) operator and the output of either Hnv or Hni can be viewed as a linear combination of successive applications of S to the input, it follows that Hnv or Hni are local operators as well. The main difference is that while S takes into account information within the one-hop neighborhood of the nodes, the operators in (1) consider information that is within their T−1 neighborhood [17]. 2.2. CNNs using node-invariant GFs Recent efforts have been made towards extending CNNs to operate on graph signals in the hope of carrying over their excellent performance to a broader class of problems (see [13] for a general survey). The existing works typically set the GSO as the graph Laplacian matrix and, more importantly, replace the classical convolutions with node-invariant GFs [cf. Hni in (1)]. The main reason for this is that node-invariant GFs allow for the generalization of the convolution theorem to graph signals in the sense that filtering in the (node) domain implies multiplication in the frequency domain given by the GFT. To see why this is the case, consider the graph signal y = Hni x, recall the eigendecomposition of the GSO S, and note that since Hni is a matrix polynomial on S, its eigenvectors are also V. With these considerations, after applying the GFT to the input-output equation y = Hni x we have that ỹ = diag(h̃)x̃ with P −1 diag(h̃) := Tt=0 ht Λt being the filter’s frequency response. Building on this interpretation, [14] designed the filter coefficients to be used at each layer in the spectral domain. To avoid the (expensive) computation of eigendecompositions, a Chebyshev approximation which operates in the node domain using a low-order node-invariant GF was adopted in [15]. While convolutions have been replaced with node-invariant GFs and point-wise nonlinearities with node-wise nonlinearities applied locally at each node of the graph, there is no consensus on how pooling must be implemented. The suggestion in [14] was to use multiscale hierarchical algorithms to create a collection of related graphs with less and less nodes. In that context, [15] adopted the Graclus algorithm [24] and suggested an innovative pooling system by means of a binary tree partition. It is noted that clustering is in itself an ill-posed problem and that there exist several criteria for determining good clusters [25, 26]. Moreover, it is usually a computationally intensive operation [16, 27, 28]. 3. CNN ARCHITECTURE USING NODE-VARYING GF Starting from the CNN architecture described in Sec. 2, we propose a new architecture for CNNs that at each layer `: 1) replaces convolutions with node-varying GFs [cf. Hnv in (1)]; 2) applies a local node-wise nonlinearity; and 3) does not apply a pooling stage, thus avoiding the computation of clusters for each of the layers. To motivate the proposed design, recall that the idea in the convolution stage is to get several features per region and, for that, F` filters are employed. This naturally increases the dimension of the signal by a factor of F` and pooling becomes necessary to prevent a geometric growth of the size of the data. That is, there is a tradeoff between the availability of multi-resolution features extracted from the data and the size of the information passed onto the next layer. Our proposed architecture tries to extract local features at different locations of the graph without increasing dimensionality. Being more specific, by adopting the node-varying GF in (1), each node gains the ability to weight their local neighborhood differently, and because nodes within a neighborhood weight differently their respective neighborhoods, each of them acts as a different feature within the region. Since the output of a node-varying GF is another graph signal, then the dimensionality of the data at each layer is not increased while local features are captured respectively by each node. The data analysis at different resolutions comes naturally with the adoption of this kind of filters and is adjusted by the length of the filters on each layer. Concretely, by applying a filter of length T1 each node gathers information of up to the T1 − 1 neighborhood; then, in the following layer, when another filter of length T2 is applied, then nodes actually disseminate information up to the T2 − 1 neighborhood from the previous layer, so that the total information processed goes up to the T1 +T2 −2 neighborhood. Therefore, as the local graph CNN goes deeper, it gathers more global information. 3.1. CNN via hybrid node-varying GFs A key aspect of any CNN architecture is the number of parameters that need to be optimized in the training phase [21]. Based on this criterion, it is observed that adopting a node-varying GF results in a number of parameters proportional to the number of nodes, the P length of the filter at each layer and the number of layers L l=1 N Tl . This might be an undesirable characteristic of the architecture, especially for high-dimensional datasets. In order to overcome this, we propose an alternative design where the convolution is replaced with a hybrid node-varying GF. To define this new type of GF, start by considering a tall binary matrix CB ∈ {0, 1}N ×B with exactly one non-zero entry per row. Define now the reduced vector of filter coefficients as hB,t ∈ RB . Then a hybrid node-varying GF is a graph signal operator of the form Hhv := PT −1 t=0 diag(CB hB,t )St . (2) Clearly the GF above is linear, accounts for the structure of the graph, and can be implemented locally. The name “hybrid” is due to the fact that i) if B = N and CB = I, then Hhv is equivalent to Hnv ; and ii) if B = 1, then Hhv reduces to Hni . While basis expansion models other than ht = CB hB,t could have been used, CB was selected to be binary to facilitate intuition and keep implementation simple. In particular, the columns of CB can be viewed as membership indicators that map nodes into dif−1 ferent groups. With this interpretation, {[hB,t ]b }Tt=0 represents the common filter coefficients that each node of the bth group will use. This demonstrates that the selection of the method to group the nodes offers a new degree of freedom for the design of (2) and the corresponding CNN. Different from the multi-resolution clustering algorithms associated with the pooling stage, this algorithm performs a single grouping. In the simulations presented in the next section, the grouping implicit in CB is carried out in two steps. First, we form the set B = {v1 , . . . , vB } containing the B nodes with the highest degree (ties are broken uniformly at random) and set [CB ]vb ,b = 1 Algorithm 1 (Hybrid) Node-varying GF CNN. Input: {x}: test dataset, {(x0 , y0 )}: train dataset S: GSO, {T1 , . . . , TL−1 }: degrees of layer B: number of nodes to select for weights Output: {ŷ}: estimates 1: procedure NVGF CNN({x},{(x0 , y0 )},S,{T1 , . . . , TL−1 },B) 2: Create set B by selecting B nodes with highest degree 3: Compute CB . See (3) 4: Create the L − 1 layers: 5: for ` = 1 : L − 1 do 6: Create B filter taps {hB,0 , . . . , hB,T` −1 } P ` −1 diag(CB hB,t )St . See (2) 7: Obtain H` = Tt=0 8: Apply non-linearity ρ` (H` ·) 9: end for 10: Create readout layer AL · 0 0 11: Learn {hB,0 , . . . , hB,T`−1 }L−1 `=1 and AL from {(x , y )} 12: Obtain ŷ = f̂ (x) using trained coefficients 13: end procedure for all b = 1, ..., B. Second, for all the nodes that do not belong to B we set the membership matrix as [CB ]ij = 1 if j ∈ argmaxb:vb ∈B {W(i, vb )} , i ∈ / B, (3) where W(i, vb ) is the edge weight. That is, for each of the nodes not in B we copy the filter coefficients of the node in B that exercises the largest influence. As before, ties are broken uniformly at random. CNN schemes with region-dependent filters have been used in the context of images using regular convolutions [29, 30]. The regional features computed at each layer are kept separate and only the last stages (involving fully connected layers) merge them. The use of node-varying graph filters proposed in this paper, not only changes the definition of the convolution, but also merges the regional features at every layer. CNN architecture: Adopting the hybrid node-varying GF for the first stage of each layer of our CNN implies that the total number of paP rameters to be learned is L l=1 BTl , which is independent of N and guarantees that the proposed architecture scales well for highdimensional data. Lower values of B will decrease the number of training parameters, while limiting the ability of extracting features of the filter. All in all, the architecture of the proposed CNN is given by Algorithm 1. We observe that, except for the final readout layer, all computations are carried out in a local fashion making the CNN amenable to a distributed implementation. Finally, let us note that while some problems inherently live in a constant-dimension submanifold and make the choice of a constant B possible, some other problems might have a lower dimension that still grows with N but in a sublinear fashion. Therefore, while B might not be independent of N , it could still be chosen as a sublinear function of N [31, 32]. 4. NUMERICAL TESTS In this section, we run tests on the proposed CNN architecture and compare it with the one developed in [15]. In general, we observe that our CNN achieves similar performance but with at least one order of magnitude less of parameters. In the first testcase we consider a synthetic dataset of a source localization problem in which different diffused graph signals are processed to determine the single node that originated them. In the second testcase we use the 20NEWS dataset and a word2vec embedding underlying graph to 1 7407 param. 342 p. 302 p. 282 p. 0.8 77515 param. FC[2500] GC[5; 32] GC[5; 32]-FC[100] GL[10; k]-GL[10; k] 0.7 0.6 0.5 382 p. 542 p. 49807 param. 2 3 5 7 Number of selected nodes k 0.9 Accuracy Accuracy 0.9 1 7407 param. 49807 param. 0.8 482 p. 365 p. 0.7 302 p. 77515 param. FC[2500] GC[5; 32] GC[5; 32]-FC[100] GL[T; 15]-GL[T; 15] 0.6 15 0.5 542 p. 422 p. 0.9 Accuracy 1 0.8 0.7 0.5 2 4 6 Length of -lter T 8 FC[2500] GC[5; 32] GC[5; 32]-FC[100] GL[10; 15]-GL[10; 15] 0.6 10 10!4 10!3 Test noise <w2 10!2 10!1 (c) (a) (b) Fig. 1: Accuracy in the source localization problem. Results were averaged across 10 different realizations. For clarity of figures, error bars represent 1/4 of the estimated variance. The number of parameters of each architecture is also shown. (a) As a function of the number of selected nodes k. Accuracy gets better as more and more nodes are selected to extract features. (b) As a function of the length of the filter T . Accuracy improves when filters are longer. It is observed that after length 8 for which 2 layers are able to obtain all the relevant information in the graph (15 nodes), accuracy does not improve substantially. (c) As a function of the noise in the test set. The proposed architecture is fairly robust to noise since accuracy drops approximately 5% across 5 orders of magnitude. Architecture Parameters Accuracy FC[2500] 77, 515 72.6% GC[5, 32] 7, 407 87.2% GC[5, 32]-FC[100] 49, 807 84.3% GL[10, 15]-GL[10, 15] 542 88.9% Table 1: Source localization results for N = 15 nodes. classify articles in one out of 20 different categories [33]. For both problems, denote as GC[T, k] a graph CNN using Chebyshev polynomial approximation of order T with k features; as FC[k] a fully connected layer CNN with k hidden units; and as GL[T, k] the proposed CNN where the degree-based hybrid node-varying GF is of order T with B = k nodes selected. A ReLU nonlinearity is applied at each layer and all architectures include a readout layer. We note that the total parameter count includes this last readout layer as well as bias parameters typically used before applying the ReLU nonlinearity. For the training stage in both problems, an ADAM optimizer with learning rate 0.005 was employed [34], for 20 epochs and batch size of 100. Testcase 1: Source localization. Consider a connected Erdős-Rényi (ER) graph with N nodes and edge probability pER = 0.4 and let W denote its adjacency matrix. With δ c representing a graph signal taking the value 1 at node c and 0 elsewhere, the signal x = Wt δ c is a diffused version of the sparse input δ c for some unknown 0 ≤ t ≤ N − 1. The objective is to determine the source c that originated the signal x irrespective of time t. To that end, we create a set of Ntrain labeled training samples {(c0 , x0 )} where x0 = Wt δ c0 with both c0 and t chosen at random. Then we create a test set with Ntest samples in the same fashion, but we add i.i.d. zero-mean Gaussian 2 noise w with variance σw , so that the signals to be classified are t W δ c + w. The goal is to use the training samples to design a CNN that determines the source (node) c that originated the diffused. For a graph with N = 15 nodes we test four architectures: (a) FC[2500], (b) GC[5, 32], (c) GC[5, 32]-FC[100] and (d) GL[10, 15]GL[10, 15]. The GSO employed is the adjacency matrix S = W. A dropout of 0.5 is included in the training phase. The test set is of size Ntest = 200. Results are listed in Table 1. Note that these results are obtained by averaging 10 different realizations of the problem. We observe that the performance of our CNN is similar to that of GC[5, 32] but with ten times less parameters. Additionally, we run tests changing the values of several of the parameters of the architecture. In Fig. 1a we observe the accuracy obtained when varying the number of selected nodes. It is noted that selecting less nodes implies that less features are extracted. This impacts negatively the accuracy. Nonetheless, even an accuracy level of 80% is achieved with as few as 282 parameters, which is a better per- Architecture GC[5, 32] GL[5, 1500] Parameters 1, 920, 212 67, 521 Accuracy 60.75% 60.34% Table 2: Results for classification on 20NEWS dataset on a word2vec graph embedding of N = 3, 000 nodes. formance than using a fully connected layer with 2500 hidden units which requires 100 times more parameters. The dependence of the accuracy on the length of the filter T can be observed in Fig. 1b. We note a linear increase in accuracy that saturates around T = 8. This is the length for which, when using two layers, the information corresponding to the whole graph can be aggregated. Finally, in Fig. 1c we show the performance of all four architectures as a function of the noise on the test set. We observe that both GC[5, 32] and the proposed architecture achieve similar accuracies with a fairly robust performance, since the accuracy dropped only 5% within a 5 order magnitude change in the noise. Values shown are mean accuracies obtained after averaging 10 realizations and the error bars represent 1/4 of the estimated variance from these realizations. Testcase 2: 20NEWS dataset. Here we consider the classification of articles in the 20NEWS dataset which consists of 18, 846 texts (11, 314 of which are used for training and 7, 532 for testing) [33]. The graph signals are constructed as in [15]: each document x is represented using a normalized bag-of-words model and the underlying graph support is constructed using a 16-NN graph on the word2vec embedding [35] considering the 3, 000 most common words. The GSO adopted is the normalized Laplacian. No dropout is used in the training phase. The architectures used are GC[5, 32] and GL[5, 1500]. Accuracy results are listed in Table 2, demonstrating that both architectures achieve similar accuracies, but with our CNN requiring 100 times less parameters. 5. CONCLUSIONS A CNN architecture to operate on graph signals was proposed. The convolution stage was replaced by a node-varying GF, and no pooling stage was implemented. Extraction of different features was achieved by the adoption of a node-varying GF and resolution levels were adjusted via the length of the filter. The convolutional layers of the resulting CNN could be implemented locally. To prevent the number of parameters to grow with the size of the data, we proposed a hybrid node-varying GF where nodes were grouped and the same filter coefficients were used within a particular group. Results on the 20NEWS dataset showed a performance similar to that of existing CNNs implementing node-invariant GFs but with 100 times less parameters to train. A synthetic source localization problem was used to asses numerically the sensitivity of the estimation performance with respect to the number of groups and the degree of the filter. 6. REFERENCES [1] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 85–117, 2015. [2] J. Bruna and S. Mallat, “Invariant scattering convolution networks,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 35, no. 8, pp. 1872–1886, Aug. 2013. [3] Y. LeCun, K. Kavukcuoglu, and C. Farabet, “Convolutional networks and applications in vision,” in 2010 IEEE Int. Symp. Circuits and Syst., Paris, France, 30 May-2 June 2010, IEEE. [4] H. Greenspan, B. van Ginneken, and R. M. Summers, “Deep learning in medical imaging: Overview and future promise of an exciting new technique,” IEEE Trans. Med. Imag., vol. 35, no. 5, pp. 1153–1159, May 2016. [5] D. Lazer et al., “Life in the network: The coming age of computational social science,” Science, vol. 323, no. 5915, pp. 721–723, Feb. 2009. [6] E. H. Davidson et al., “A genomic regulatory network for development,” Science, vol. 295, no. 5560, pp. 1669–1678, Feb. 2002. [7] A. Sandryhaila and J. M. F. Moura, “Discrete signal processing on graphs,” IEEE Trans. Signal Process., vol. 61, no. 7, pp. 1644–1656, Apr. 2013. [8] A. Sandyhaila and J. M. F. Moura, “Discrete signal processing on graphs: Frequency analysis,” IEEE Trans. Signal Process., vol. 62, no. 12, pp. 3042–3054, June 2014. [9] D. I Shuman, S. K. Narang, P. Frossard, A. Ortega, and P. Vandergheynst, “The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains,” IEEE Signal Process. Mag., vol. 30, no. 3, pp. 83–98, May 2013. [10] S. Chen, R. Varma, A. Sandryhaila, and J. Kovačević, “Discrete signal processing on graphs: Sampling theory,” IEEE Trans. Signal Process., vol. 63, no. 24, pp. 6510–6523, Dec. 2015. [11] A. G. Marques, S. Segarra, G. Leus, and A. Ribeiro, “Sampling of graph signals with successive local aggregations,” IEEE Trans. Signal Process., vol. 64, no. 7, pp. 1832–1843, Apr. 2016. [12] S. Segarra, A. G. Marques, G. Leus, and A. Ribeiro, “Reconstruction of Graph Signals Through Percolation from Seeding Nodes,” IEEE Trans. Signal Process., vol. 64, no. 16, pp. 4363–4378, Aug. 2016. [13] M. M. Bronstein, J. Bruna, Y. LeCun, A. Szlam, and P. Vandergheynst, “Geometric Deep Learning: Going Beyond Euclidean Data,” arXiv:1611.08097v1 [cs.CV], 24 Nov. 2016. [14] J. Bruna, W. Zaremba, A. Szlam, and Y. LeCun, “Spectral networks and deep locally connected networks on graphs,” arXiv:1312.6203v3 [cs.LG], 21 May 2014. [15] M. Defferrard, X. Bresson, and P. Vandergheynst, “Convolutional neural networks on graphs with fast localized spectral filtering,” arXiv:1606.09375v3 [cs.LG], 5 Feb. 2017. [16] G. Carlsson and F. Mémoli, “Characterization, stability and convergence of hierarhical clustering methods,” J. Mach. Learning Res., vol. 11, pp. 1425–1470, Apr. 2010. [17] S. Segarra, A. G. Marques, and A. Ribeiro, “Optimal graphfilter design and applications to distributed linear network operators,” IEEE Trans. Signal Process., vol. 65, no. 15, pp. 4117–4131, Aug. 2017. [18] D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning representations by back-propagating errors,” Nature, vol. 323, no. 6088, pp. 533–536, Oct. 1986. [19] T. Wiatowski and H. Bölcskei, “A mathematical theory of deep convolutional neural networks for feature extraction,” Website, 23 March 2017. [20] J.-H. Jacobsen, E. Oyallon, S. Mallat, and A. W. M. Smeulders, “Multiscale hierarchical convolutional networks,” arXiv:1703.04140v1 [cs.LG], 12 March 2017. [21] G. Huang, Z. Liu, L. van der Maaten, and K. Q. Weinberger, “Densely connected convolutional networks,” arXiv:1608.06993v4 [cs.CV], 27 Aug. 2017. [22] C.-C. J. Kuo, “The cnn as a guided multilayer recos transform,” IEEE Signal Process. Mag., vol. 34, no. 3, pp. 81–89, May 2017, lecture notes. [23] J. T. Springenberg, A. Dosovitskiy, T. Brox, and M. Riedmiller, “Striving for simplicity: The all convolutional net,” arXiv:1412.6806v3 [cs.LG], 13 Apr. 2015. [24] I. Dhillon, Y. Guan, and B. Kulis, “Weighted graph cuts without eigenvectors: A multilevel approach,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 29, no. 11, pp. 1944–1957, Nov. 2007. [25] D. Horta and R. J. G. B. Campello, “Comparing hard and overlapping clusterings,” J. Mach. Learning Res., vol. 16, pp. 2949–2997, Dec. 2015. [26] F. Gama, S. Segarra, and A. Ribeiro, “Hierarchical Overlapping Clustering of Network Data Using Cut Metrics,” IEEE Trans. Signal, Inform. Process. Networks, vol. PP, no. 99, 24 May 2017. [27] J. H. Ward Jr., “Hierarchical grouping to optimize an objective function,” J. Amer. Statist. Assoc., vol. 58, no. 301, pp. 236– 244, March 1963. [28] D. Defays, “An efficient algorithm for a complete link method,” Comput. J., vol. 20, no. 4, pp. 364–366, Apr. 1977. [29] K. Gregor and Y. LeCun, “Emergence of complex-like cells in a temporal product network with local receptive fields,” arXiv:1006.0448v1 [cs.NE], 2 June 2010. [30] G. B. Huang, H. Lee, and E. Learned-Miller, “Learning hierarchical representations for face verification with convolutional deep belief networks,” in 2012 IEEE Conf. Comput. Vision, Pattern Recognition, Providence, RI, 16-21 June 2012, IEEE Comput. Soc. [31] M. B. Wakin, D. L. Donoho, H. Choi, and R. G. Baraniuk, “The multiscale structure of non-differentiable image manifolds,” in SPIE Optics + Photonics, San Diego, CA, July 2005, SPIE. [32] N. Verma, S. Kpotufe, and S. Dasgupta, “Which spatial partition trees are adaptive to intrinsic dimension?,” arXiv:1205.2609v1 [stat.ML], 9 May 2012. [33] T. Joachims, “Analysis of the rocchio algorithm with tfidf for text categorization,” Computer Science Technical Report CMU-CS-96-118, Carnegie Mellon University, 1996. [34] D. P. Kingma and J. L. Ba, “Adam: A method for stochastic optimization,” arxiv:1412.06980v9 [cs.LG], 30 Jan. 2017. [35] T. Mikolov, K. Chen, G. Corrado, and J. Dean, “Efficient estimation of word representations in vector space,” arXiv:1301.3781v3, 7 Sep. 2013.
9cs.NE
Succinct Approximate Rank Queries Ran Ben Basat Department of Computer Science, Technion [email protected] Abstract arXiv:1704.07710v1 [cs.DS] 25 Apr 2017 We consider the problem of summarizing a multi set of elements in {1, 2, . . . , n} under the constraint that no element appears more than ` times. The goal is then to answer rank queries — given i ∈ {1, 2, . . . , n}, how many elements in the multi set are smaller than i? — with an additive error j of atk most ∆ and in constant time. For this problem, we prove a lower bound n of B`,n,∆ , d∆/`e log max {b`/∆c , 1} + 1 bits and provide a succinct construction that uses B`,n,∆ (1 + o(1)) bits. Next, we generalize our data structure to support processing of a stream of integers in {0, 1, . . . , `}, where upon a query for some i ≤ n we provide a ∆-additive approximation for the sum of the last i elements. We show that this too can be done using B`,n,∆ (1 + o(1)) bits and in constant time. This yields the first sub linear space algorithm that computes approximate sliding window sums in O(1) time, where the window size is given at the query time; additionally, it requires only (1 + o(1)) more space than is needed for a fixed window size. 1 Introduction 1.1 Background Static dictionaries are data structures that encode a set S ⊆ {1, 2, . . . , n} and efficiently answer membership queries of the form “is i ∈ S?” (for some i ∈ {1, 2, . . . , n}). This problem was extensively studied and memory efficient data structures that allow O(1) time queries for it were suggested for several different models [6, 12, 20]. An extension of the dictionary problem is the Rank query, which given an identifier i ≤ n returns the number of elements in S that are smaller than or equal to i. For this problem as well, multiple papers proposed space efficient solutions with a constant query time [16, 21, 22]. The inverse problem, called Select query, asks for the ID of the ith smallest element in S and was also shown to have space efficient data structures that support constant time queries [7, 21]. A seemingly different research area is the design of streaming algorithms. For many domains, such as networking, economics and databases, the ability to process large data streams is vital. As data varies over time, recent data is often considered more relevant; this motivated the study of sliding window algorithms, in which only the last n elements are of interest. The sliding window model was studied for many problems such as summing [3, 10, 14]; counting the number of distinct elements [2, 13]; finding frequent elements [4, 15]; answering set membership queries [5, 17, 19]; and other problems [1, 9, 18, 23]. All these works share a common goal – they significantly reduce the memory consumption; in return, they settle for approximate, rather than exact, solutions. Given sufficient space, we can solve such problems exactly simply by adding the newly arriving item into our summary and deleting the element that has left the window. However, in many applications the window size is too large and the memory requirement becomes a major bottleneck. In this paper, we show how rank queries can be used for streaming. Even if modern RAM memories seem to be enough for storing large element sequences, there are many advantages in minimizing the memory requirements. Routers, for example, often rely on the scarce SRAM which allows access at the speed in which they are required to route packets. If the measurement algorithms are not compact enough to fit into the small SRAM, they must access the slower DRAM that does not allow real time queries. This can be a significant limitation for applications that require timely insights about the traffic, such as load balancing or denial of XX:2 Succinct Approximate Rank Queries service attack identification. Similarly, when implementing in software we can gain speed if we fit our algorithm into the CPU cache and reduce DRAM access. Smaller data structures might even fit in a single cache line and can be pinned there to maximize the measurement performance. The works mentioned above significantly reduce the space requirements compared to storing the entire window in memory. However, these algorithms assume that the window size is known in advance and their data structures only allow queries about the predetermined window size to be answered efficiently. While we can maintain a different sketch for every window size that is of interest, this may be prohibitively expensive in terms of both memory and update time. Further, the goal of these algorithms is to enable memory feasible solutions to what would otherwise require storing the exact window in memory; thus, duplicating the data structures for multiple window sizes undermines the purpose for which they were created. 1.2 Our Contributions Our first contribution is the extension of exact succinct rankers to multi sets in which every element can appear at most ` times. Previous works have considered multi sets under cardinality constraint for all elements combined. Here we address the natural case where every element may appear at most ` times, but no cardinality constraint (smaller than n · `) is known for the multi set. Our approach requires (1 + o(1))n log (` + 1) bits and allows O(1) time rank queries. Our next contribution are novel approximate set and multi set representations that allow computing rank queries with an additive error of ∆, while using j less kspace than required for storing  n the multi set itself. For this problem, we prove a B`,n,∆ = d∆/`e log max {b`/∆c , 1} + 1 bits lower bound and a propose a succinct data structure that uses B`,n,∆ (1 + o(1)) bits. To the best of our knowledge, this is the first algorithm that provides approximate rank queries in O(1) time using less memory than the set / multi set encoding requires. Next, we extend the notion of approximate rankers to streams and propose algorithms that process a stream of integers in {0, 1, . . . , `} and answer sliding window sum queries in O(1) time. Unlike previous works [2, 3, 10], we get the window size at query time. That is, our algorithm can compute the sum of any window size while previous works assume that the size is fixed. Interestingly, our construction is succinct even when compared with the lower bound derived in [3] for fixed size windows. Thus, with a (1 + o(1)) space overhead we allow the algorithm to support all window sizes. This is a major improvement over the naive approach of maintaining a separate algorithm instance for every window size that is of interest, in both space and time complexity. We note that our approach also allows approximating the sum of historical intervals that can be used for drill-down queries. For example, assume that we are monitoring a 100Gbps link on a backbone router such that at each second we get the utilized bandwidth (i.e., we can set ` = 100 · 230 bits). Now, assume that we identify a distributed denial of service attack and want to study the link utilization pattern before and during the attack. Our algorithm allows us to estimate the bandwidth between any time interval t1 − t2 (for t2 ≤ t1 ≤ n) simply by subtracting the estimate for the sum of the last t2 seconds from the estimate of the last t1 seconds’ sum. 2 2.1 Related Work Dictionaries Consider a set S ⊆ {1, 2, . . . , n}. A dictionary is a data structure that supports membership queries of the form “Is x in S?”. Several hashing-based works proposed methods for efficiently encoding S while supporting constant time membership queries [6, 12, 20, 24]. Dictionaries were then naturally extended to the Indexable Dictionary problem that also supports the operations: 1. Rank(i): given i ∈ {1, 2, . . . , n}, return | {y ∈ S : y ≤ i} |. 2. Select(i): given i ∈ {1, 2, . . . , |S|}, return the ith smallest element in S. Ran Ben-Basat XX:3 The problem of storing sets (and multisets, with the appropriate generalizations of the Rank and Select procedures) drew lots of attention from the research community [16, 21, 22]. Of special interest to us is the work of Jacobson [16] that allows constant time rank queries using n + o(n) n memory. Jacobson’s idea was to look at the characteristic vector of the set, i.e., a {0, 1} bits th vector whose i entry is set if i ∈ S. Thus, the Rank query reduces to counting the number of set bits that precede some index i given at query time. To achieve this, Jacobson breaks the vector into (log n)2 sized chunks. At the end of each chuck, Jacobson keeps the number of set bits that precede it. Since there are n/(log n)2 such chucks, and each is encoded using log n bits, this requires n/ log n = o(n) bits. Next, Jacobson focuses on each specific chunk and divides it into a sequence of (1/2 · log n)-sized sub-chunks. At the end of each sub-chunk, Jacobson stores its number of preceding set bits within the current chunk using O(log log n) bits. Once again, the number of sub-chunks is n/(1/2 · log n) so the total memory required is O(n logloglogn n ) = o(n) bits. Finally, Jacobson counts the number of set bits within each sub-chunk using a lookup table. In the table, the keys are all binary vectors of size at most 1/2 · log n and the values are the number √ of set bits; thus, the table’s overall memory consumption is O( n log n log log n) = o(n). In this paper, we present a succinct structure for rank queries of multi sets in which each element appears at most ` times. This is different than the multi set representations of [20, 21] that considered cardinality constraint for the entire multi set, but without any further restriction on the number of appearances of a single item. We also provide an encoding that supports additive approximations of rank queries in less memory than required for encoding the multi set. 2.2 Algorithms that Sum over Sliding Windows Approximating the sum of the last n elements over an integer stream, known as Basic-Summing, was first introduced by Datar et al. [10]. They assumed that each element is in {0, 1, . . . , `} and proposed a (1 + ) multiplicative approximation algorithm. Their data structure, named Exponential Histogram (EH ), is based on keeping timestamps of element sequences called buckets such that the last n elements fit into O(−1 log (` · n)) buckets. Each bucket requires O(log n) bits to store the timestamp in addition to O(log log (` · n)) bits to store the bucket size. Overall,  the number of bits required by their algorithm is O −1 log2 n + log ` · (log n + log log `) and it operates in amortized time O  log ` log n  or O(log(` · n)) worst case. The EH approach was then extended in [1] for other statistics over sliding windows, such as median and variance. In [14], Gibbons and Tirthapura presented a (1 + ) multiplicative algorithm that operates in constant worst case time while using similar space for ` = nO(1) . In [3], we studied the potential memory savings one can get by replacing the (1  + ) multiplicative guarantee with a ∆ additive approximation. We showed that Θ `·n + log n bits are required and sufficient. ∆ In a sliding window, the last n elements get similar weight while older items do not affect the sum. Cohen and Strauss [8] considered more general aging models where older data has lower weight, but the rate in which the weight decreases may be different than that of sliding windows. Recently, we studied [2] the affect that allowing an error in the window size has on the required memory of approximate summing algorithms. Specifically, we showed that if upon a c query the algorithm is required to return a tuple hw,  Sw i such that w ∈ {n, n + 1, . . . , n(1 + τ )} τ ·`·n −1 c and |S − S | < ∆ then Θ τ log + log n bits are needed. w w ∆ All of the algorithms above assume that the window size is fixed. Here, we propose solutions that are succinct, even when compared to a lower bound derived here for static data, or to the bound for a fixed size window as in [3]. It is worth mentioning that these data structures do allow computing the sum of a window whose size is given at the query time. Alas, the query time will be slower as they do not keep aggregates that allow quick computation. Specifically, we can compute a (1 + ) multiplicative approximation using a slightly extended version of EH [11] in O(log −1 + log log n) time by a XX:4 Succinct Approximate Rank Queries binary search for the block with the right timestamp. We   can also use the data structure of [3] for an additive approximation of ∆ in O min `·n , n time, and utilize [2]’s structure for a ∆ (τ, ∆)-approximation in time O(τ −1 ). In this paper we offer solutions that operate in O(1) time. 3 Preliminaries We say that an algorithm is succinct if it uses B(1 + o(1)) bits, where B is the informationtheoretic lower bound for the problem it solves. Throughout the paper, we assume the standard word RAM model with a word size of Θ (log n + log `). For simplicity of presentation, we also √ assume that n/(log n)2 and log n are integers. I Definition 1 (Approximation). Given a value V and a constant  > 0, we say that Vb is an -additive approximation of V if V −  < Vb ≤ V .1 Next, we define the notion of an (`, n, ∆)-Ranker – a structure that can answer approximate rank queries in a memory efficient manner. Specifically, (`, n, 1)-Ranker is a succinct encoding of a multi-set over {0, 1, . . . , n} , such that no element appears more than ` times, that supports O(1) time rank queries. I Definition 2 (Static Ranker). An (`, n, ∆)-Ranker, for some `, n, ∆ ∈ N+ , is an algorithm that n preprocesses a sequence in {0, 1, . . . , `} and when queried with some i ≤ n returns a ∆-additive approximation Sbi of the sum of the first i elements, Si , in O(1) time. We proceed with the definition of a Sliding Ranker, extending (`, n, ∆)-Rankers to streams, while focusing on the last elements in the stream for supporting sliding window queries. I Definition 3 (Sliding Ranker). An (`, n, ∆)-Sliding Ranker, for some `, n, ∆ ∈ N+ , is an algorithm that processes a stream of integers in {0, 1, . . . , `} and when queried for some i ≤ n returns a ∆-additive approximation Sbi of the last i elements sum, Si , in O(1) time. 4 (`, n, ∆)-Ranker s In order to construct an (`, n, ∆)-Ranker, we first discuss the special case of zero-error (∆ = 1). 4.1 An (`, n, 1)-Ranker Here, we provide a succinct construction of (`, n, 1)-Ranker, for any `, n. Intuitively, this generalizes Jacobson’s ranker [16] that addresses binary sequences (` = 1). As we show, his lookup table approach works for “small” values of `. In other cases, such as ` ≥ n, we can split the vector into smaller and smaller intervals (i.e., sub-sub-chunk, etc.), but if the number of levels is constant, storing a lookup table for the smallest level is infeasible in o(B) space. Thus, we use a different trick for large ` values for computing within-sub-chunk sums in O(1). We avoid keeping the and the characteristic vector; instead, we keep a n-sized array in which each entry contains the sum of the sub-chunk up to that point. For example, if the sub-chunk was h1, 0, 1i, we store h1, 1, 2i regardless of vector entries outside this sub-chunk. Since ` is “large”, this takes o(B) space. n We start by noting that since the number of sequences in {0, 1, . . . , `} is (` + 1)n , any algorithm that computes such rank queries (exactly) requires B , n log(` + 1) bits. We also note that without a query time constraint this is achievable, as we can simply store the entire data and when queried sum the required interval in O(n) time. Thus, if n = O(1) (i.e., we have a small array of potentially large numbers), then the same idea works and we therefore require B bits; hence, we hereafter assume that n = ω(1). Next, we will prove the following: 1 We use one-sided error, and strict inequality as this simplifies our computations. Ran Ben-Basat XX:5 I Theorem 4. For any `, n ∈ N+ , there exists an (`, n, 1)-Ranker that uses B(1 + o(1)) bits. We start by breaking the sequence into chunks of size log2 n, keeping the cumulative sums at the end of each chunk. The required number of bits for these sums is at most n n log (` · n + 1) ≤ log ((` + 1) · n) = n log (` + 1) · log2 n log2 n  1 1 + log2 n log ` log n  = o(B), where the last equation follows from n = ω(1). √ Next, we break the chunks into sub-chunks of size log n and keep the cumulative sum from the beginning of the most recent chunk at the each sub-chunk’s end. The memory consumption of these sub-chunk aggregates is then no more than √   n log ` · log log2 n + 1 ≤ n log (` + 1) · log n  √ 1 2 log log n √ + log n log ` log n  = o(B). We are left with the task of efficiently computing the sub-chunk sums. Here, we split our construction depending on the relation between ` and n. √ 3 ` + 1 ≤ 2 log n . In this case, we adopt √Jacobson’s lookup table approach. Specifically, we create a lookup   √ √ log n table T : {0, 1, . . . , `} × 0, 1, . . . , log n − 1 → 0, 1, . . . , ` · log n ; the key of √ each table entry is a log n-sized sequence of elements in {0, 1, . . . , `} and an index k ∈  √ 0, 1, . . . , log n − 1 . Its value is the sum of the first k sequence entries. In order to use the table, we also store the characteristic vector itself using n log (` + 1) bits. The size of the table is then p    √ p p 5/6 (` + 1) log n log n log ` log n + 1 ≤ 2log n+log log n log (` + 1) log n = o(B). Thus our overall memory consumption is n log (` + 1) · (1 + o(1)). Unfortunately, while we can consider smaller and smaller sequence aggregates, constructing such a lookup table will prevent the algorithm from being succinct when ` is large (e.g., for ` ≥ n). √ 3 ` + 1 > 2 log n . In this case, we return to the cumulative approach. Instead of storing the characteristic vector (and without a lookup table) we store for each element the cumulative sum from the beginning √ of its sub-chunk. Since the sub-chunks are of size log n, the number of bits this takes is     p  log log n log log n n log ` log n + 1 ≤ n log (` + 1) · 1 + ≤ n log (` + 1) · 1 + √ = B + o(B). 3 log (` + 1) log n We conclude that in all cases our construction requires B(1 + o(1)) bits and is thus succinct. 4.2 An (`, n, ∆)-Ranker for ∆ > 1 We start by proving a lower bound on the memory required by any (`, n, ∆)-Ranker. For convenience, we denote µ , ∆/`. We only consider ∆ ∈ {2, . . . , ` · n}, as ∆ = 1 means zero-error and ∆ > n · ` allows the algorithm to always return 0, regardless of the input. I Theorem 5. Let `, n, ∆ ∈ N+ , then the number of bits required by any deterministic (`, n, ∆)Ranker is at least B`,n,∆ , bn/ dµec log max  µ−1 , 1 + 1 =      n log max {b`/∆c , 1} + 1 . d∆/`e XX:6 Succinct Approximate Rank Queries Proof. We denote I , min {∆ · k, `} | k ∈ 0, 1, . . . , max µ−1 , 1 ⊆ {0, 1, . . . , `} and  dµe ¯ I, σ | σ ∈ I . Next, consider all inputs that contain a sequence of bn/ dµec blocks padded by ¯ that is, consider I , I¯bn/dµec ·0n mod dµe . Notice that zeros, such that each block is a member of I; each literal is in the range {0, 1, . . . , `} and that each input is of size n as required. We show that every two inputs in I must lead to distinct configurations in the (`, n, ∆)-Ranker, thereby implying a dlog |I|e bits lower bound as required. Let x1 = x1,1 x1,2 · · · x1,bn/dµec 0n−(n mod dµe) , x2 = x2,1 x2,2 · · · x1,bn/dµec 0n−(n mod dµe) be two distinct inputs in I such that xα,β ∈ I¯ for any α ∈ {1, 2} , β ∈ {1, . . . , bn/ dµec}. Denote by t , min {γ ∈ {1, . . . , bn/ dµec} | x1,γ 6= x2,γ } the first block’s index in which x1 differs from x2 . Now consider a query for i , dµe · t. If µ ≤ 1, then bn/ dµec = n and (due to the definition of I) |x1,t − x2,t | ≥ ∆, which implies an error of at least ∆ for at least one of the inputs. On the other hand, µ > 1 means that I = {0, `} and thus either x1,t = 0dµe , x2,t = `dµe or x1,t = `dµe , x2,t = 0dµe . In either case, the difference in sums is at least dµe · ` ≥ ∆. We established that if two inputs in I lead to the same configuration, the error for one of them would be at least ∆ while we assumed it is strictly lower.     We now presenta succinct construction of an (`, n, ∆)-Ranker. Denote ν , max {bµc , 1} , s ,  bn/νc and z , µ−1 ν . For creating an (`, n, ∆)-Ranker, we first show how to “compress” the input into a smaller problem that we solve exactly. Intuitively, we create a new s-long input ρ̄, such that each of its elements is bounded by z, and then employ a (z, s, 1)-Ranker, R. Alas, if µ = ω(1), this is not enough to allow succinct encoding; for this, we also compute the fraction of the input’s sum that is not accounted for in ρ̄ and use it for answering queries. Given an input n x̄ ∈ {0, 1, . . . , `} , we create ρ̄ iteratively as follows2 : $ −1 ∀k ∈ {1, 2, . . . , s} : ρk , ∆ % n X · xd − k−1 X ρ . =1 d=n−ν·k+1 Then, we compute the remainder: r, n X xd − ∆ · d=1 s X ρ . (1) =1 s After computing ρ̄ ∈ {0, 1, . . . , z} , we feed it into a (z, s, 1)-Ranker denoted R. Given a query for some i ≤ n, we return2  s X Query(i) , r − (∆ − 1/2) + ∆ ·    ρ  − ` · ρd n−i e · (n − i)  mod ν , ν =b n−i ν c+1 which we can compute in O(1) as follows: 3    n−i Query(i) , r − (∆ − 1/2) + ∆ · R.Query (s) − R.Query ν      n−i n−i − ` · ((n − i) mod ν) · R.Query − R.Query . ν ν I Lemma 6. i X d=1 2 3 ! xd − ∆ < Query(i) < i X (2) xd . d=1     If (n mod ν) 6= 0, we implicitly define ρd n e , 0 and R.Query n , R.Query n . ν ν ν We note that if our ranker R was originally constructed to compute the sum of the last i elements rather than the first, only two queries were needed. Ran Ben-Basat XX:7 Proof. We denote the error in the representation of the last ν  n−i  items by ν   n−i   b n n n ν c   X X X X  −1  ξ, ρ = xd − ∆ · xd − ∆ ∆ · xd  . =1 d=n−ν b n−i d=n−ν b n−i d=n−ν b n−i ν c+1 ν c+1 ν c+1 Observe that ξ = P  n d=n−ν b n−i ν c+1 xd mod ∆ and hence 0 ≤ ξ ≤ ∆ − 1. (3) Next, we use (1) to obtain i X xd = d=1 n X n X xd − d=1 xd = r + ∆ · s X  b n−i ν c  X ρ + =r+∆· =1 s X xd d=i+1  n−ν b n−i ν c  ρ  − X =b n−i ν c+1 n X xd − xd d=n−ν b n−i ν c+1 d=i+1 n−ν b n−i ν c s X =r−ξ+∆· ρ − =1 d=i+1 n X X ρ − =b n−i ν c+1 xd d=i+1 n−ν b n−i ν c = Query(i) − ξ − X xd + ∆ − 1/2 + ` · ρd n−i e · (n − i) mod ν. (4) ν d=i+1 We now perform a case analysis, based on the value of µ and start with the simpler case where µ < 2. In this case, we have ν = 1 and thus we can rearrange (4) as: i X Query(i) − xd = ξ − ∆ + 1/2, d=1 and using (3) we immediately get P i d=1  xd − ∆ < Query(i) < Pi d=1 xd . Next, we focus on the case of µ ≥ 2. Thus, we hereafter have ν = bµc and ∀ ∈ {1, 2, . . . , s} : ρ̄ ∈ {0, 1}. We now consider if and when both ρd n−i e = 1 and (n − i) mod ν 6= 0 (which implies ν  n−i  ν ρd n−i e ν =  n−i  ν    = ∆−1 · + 1); observe that d=n−ν·d    = ∆−1 ·    d n−i  −1 ν e X   xd  − ρ = ∆−1 · n X n−i ν e+1 n X d=n−ν·d n−i ν d=n−ν·d =1  xd + ∆−1 · ξ − n X n X n−i ν xd − e+1 n−i bX ν c =1        −1  xd  = ∆ · ξ +  d=n−ν b n−i +1 ν c e+1    ρ      xd  . n−ν·d n−i ν e X d=n−ν b n−i +1 ν c Thus, if (n − i) mod ν 6= 0, then n−ν·d n−i ν e ρd n−i e = 1 ⇐⇒ ξ + ν X d=n−ν b n−i ν n−ν·d n−i ν e xd ≥ ∆ ⇐⇒ ξ + c+1 X d=i+1 xd ≥ ∆ − i X d=n−ν b n−i ν xd . c+1 (5) Next, we split to cases based on the value of ρd n−i e : ν XX:8 Succinct Approximate Rank Queries ρd n−i e = 1. ν In this case, according to (4) and (5) we have: Query(i) − i X n−ν b n−i ν c X xd = ξ + d=1 xd − (∆ − 1/2 + ` · (n − i) mod ν) d=i+1 i X ≥∆− d=n−ν b xd − (∆ − 1/2 + ` · (n − i) n−i ν mod ν) c+1 i X =− xd + 1/2 − ` · (n − i) mod ν d=n−ν b n−i +1 ν c i X ≥− ` + 1/2 − ` · (n − i) n−i ν d=n−ν b mod ν c+1 ≥ −(`ν − 1) + 1/2 = −(` b∆/`c − 1) + 1/2 ≥ −∆ + 1/2. On the other hand, we bound the error from above as follows: Query(i) − i X n−ν b n−i ν c X xd = ξ + xd − (∆ − 1/2 + ` · (n − i) mod ν) d=i+1 d=1 n−ν b n−i ν c X ≤∆−1+ ` − ∆ − ` · (n − i) mod ν + 1/2 ≤ −1/2. d=i+1 ρd n−i e = 0. ν Similarly to before, using (4) and (5) we get: Query(i) − i X n−ν b n−i ν c X xd = ξ + d=1 i X d=n−ν b xd − (∆ − 1/2) d=n−ν b n−i ν c+1 d=i+1 =− i X xd − (∆ − 1/2) < ∆ − xd + 1/2 ≤ 1/2. n−i ν c+1 Pi Now, we use the fact that both Query(i) and d=1 xd are integers to deduce that Query(i)− Pi Pi d=1 xd < 1/2 =⇒ Query(i) − d=1 xd ≤ 0. Finally, we bound the error from above: Query(i) − i X n−ν b n−i ν c X xd = ξ + d=1 xd − (∆ − 1/2) ≥ −∆ + 1/2. d=i+1 P i d=1 We conclude that in all cases we have  xd − ∆ < Query(i) < Pi d=1 xd . Next, we show that the value of each entry in ρ̄ is smaller than z, as stated. I Lemma 7. For any k ∈ {1, 2, . . . , s}, ρk ≤ µ−1 ν .  Proof. Notice that ρ1 = ∆−1 ·  $ ρk = −1 ∆ · ν·k X % xd d=1 $ ≤ −1 ∆ · − k−1 X Pν xd ≤ ∆−1 · ν` = µ−1 ν . For other k values, we have  d=1 $ ρ = ∆ −1 =1 ν·k X d=ν·(k−1)+1 ·     ν·(k−1) ν·k X xd + ∆ −1 ∆ % ν·(k−1) −1 · X d=1 xd − · X d=1 d=ν·(k−1)+1 $ xd +  k−2 X =1 ! ρ % − ρk−1 xd − k−2 X =1 ! ρ % − ρk−1 Ran Ben-Basat $ = −1 ∆ · XX:9 ν·k X % xd ≤ ∆−1 · ν` = µ−1 ν .     d=ν·(k−1)+1 We now bound r for analyzing the space of our construction; the proof appears in Appendix A. n I Lemma 8. For any input x ∈ {0, 1, . . . , `} , the remainder in (1) satisfies r < 2∆. Follows is an analysis of our ranker. I Lemma 9. Let `, n, ∆ ∈ N+ and  µ , ∆/`.  The number of bits required by our ranker is (1 + o(1)) · bn/ max {bµc , 1}c · log µ−1 + 1 . Proof. Our construction has two components: the exact  ranker R and the remainder r. As R is a (z, s, 1)-Ranker, where s , bn/νc and z , µ−1 ν , it requires (1 + o(1)) · s log (z + 1) bits according to Theorem 4. Recalling that ν = max {bµc , 1} gives us the desired B`,n,∆ (1 + o(1)) bound. Finally, Lemma 8 tells us that r < 2∆ and can therefore be represented using O(log ∆) = o(B`,n,∆ ) bits. I Theorem 10. Let `, n, ∆ ∈ N+ such that (µ = o(1)) ∨ (µ = ω(1)) ∨ (µ ∈ N) ∨ (µ−1 ∈ N), the construction above is an (`, n, ∆)-Ranker that uses B`,n,∆ (1 + o(1)) bits.4 −1 Proof. Recall that B`,n,∆ = bn/ dµec , 1 + 1 while our algorithm  (1  +  log  max µ  −1uses −1 + 1 = + 1 bits. If µ = o(1), we have B = n log µ o(1)) · bn/ max {bµc , 1}c · log µ `,n,∆    (1 − o(1))n log µ−1 when our structure takes (1 + o(1)) · n · log µ−1 + 1 = (1 + o(1))n log µ−1 bits. Similarly, if µ = ω(1) then B`,n,∆ = bn/ dµec = (1 − o(1)) · (n/µ) while we require (1 + o(1)) · bn/ bµcc = (1 + o(1)) · (n/µ). The case for (µ = Θ(1)) ∧ ((µ ∈ N) ∨ (µ−1 ∈ N)) follows from similar arguments.  5   (`, n, ∆)-Sliding Ranker s As in the case of static data rankers, we first consider the exact case where ∆ = 1. 5.1 An (`, n, 1)-Sliding Ranker In this section, we provide a construction for an (`, n, 1)-Sliding Ranker that requires B(1 + o(1)) bits, where B , n log (` + 1) is the information-theoretic lower bound even without considering sliding windows. Intuitively, we adapt our (`, n, 1)-Ranker construction to the sliding window setting by incrementally building the chunks and sub-chunks. We start by breaking the stream into n-sized frames. As in the original construction, we split the frames into (log n)2 sized √ chunks, where each chunk is further divided into log n-sized sub-chunks. In the case where √  √ 3 5/6 ` + 1 ≤ 2 log n , we keep a O(2log n+log log n log ` log n ) sized lookup table that maps each √ √ 3 ≤ log n to its sum. If ` + 1 > 2 log n , we simply track the sums within sequence in {0, 1, . . . , `} a sub-chunk by keeping the cumulative sum for each item. We keep the chunk aggregates in a n/(log n)2 -sized circular buffer, and the sub-chunk aggregates in a similar structure of size √ n/ log n. Finally, we “reset” the frame accumulator every n elements, so that each chunk’s aggregate is always smaller than n · `. Since each of the chunk aggregates requires O(log(`n)) bits and each of the sub-chunk aggregates takes O(log(` log n)) bits, our overall space consumption is as required. Our (`, n, 1)-Sliding Ranker construction is illustrated in Figure 1, while the query procedure is exemplified in Figure 2. In Appendix D we provide an algorithm for the √ √ 3 3 ` + 1 > 2 log n case; here, we hereafter assume that ` + 1 ≤ 2 log n . Our algorithm uses the following variables: 4 In other cases, our construction uses at most B(2 + o(1)) bits but might not be succinct. XX:10 Succinct Approximate Rank Queries Figure 1 The (`, n, 1)-Sliding Ranker construction of Algorithm 1. We split the stream into frames, the frames into chunks, and the chunks into sub-chunks. At the end of each chunk we keep the sum of all elements that preceded it in the frame. Similarly, for each sub-chunk we keep the sum of items from the beginning of its chunk. Figure 2 A query example of Algorithm 1. To compute the sum of the green ranges, we use √ 3 either a lookup table or the within-sub-chunk aggregates depending on whether ` + 1 ≤ 2 log n . The sub-chunks aggregate array allows us to retrieve the sum of the blue intervals, and the chunk aggregates contain the sum of the red ranges. We first add values to get the sum of elements from the beginning of the frame in which the i-long interval starts. Then, we subtract the sum of items that arrived more than i elements ago. C - a cyclic buffer of n/(log n)2 integers, each allocated with dlog(`n + 1)e bits.  √ SC - a cyclic buffer of n/ log n integers, each allocated with log(` log2 n + 1) bits. total - the sum of elements inside the current frame. ind - the index of the most recent item, modulo n. √ T - a lookup table mapping sequences of length ≤ log n to their sums. W - the last n elements window. We give a pseudo code of our (`, n, 1)-Sliding Ranker in Algorithm 1. We now formulate the properties of the algorithm; the theorem’s proof is deferred to Appendix B due to lack of space. I Theorem 11. Algorithm 1 is an (`, n, 1)-Sliding Ranker that uses B(1 + o(1)) memory bits. 5.2 An (`, n, ∆)-Sliding Ranker for ∆ > 1 Similarly to the way we used (`, n, 1)-Rankers to construct (`, n, ∆)-Rankers for any ∆ ∈ {2, . . . ` · n}, we now use the exact (`, n, 1)-Sliding Ranker for constructing an (`, n, ∆)-Sliding Ranker. Intuitively, we split the stream into blocks of size ν and construct the remainder r gradually; whenever a block ends, we compute a new ρk value and feed it into an exact (z, s, 1) − Sliding Ranker we use as a black box. When queried, we employ our exact ranker and remainder to estimate the relevant sum, similarly to our (`, n, ∆)-Ranker queries from Section 4.2. However, if we simply sum the elements using r, it will require Ω(log `) bits; this will not allow us to remain succinct if µ = Ω(1) as the lower bound for this case is B`,n,∆ = O(n) and is independent of ` (given that µ = ∆/` is fixed). To solve this, we follow [3]’s approach and round every arriving element, representing it using b ,jdlogk(n/µ) + log log ne bits. That is, if x ∈ {0, 1, . . . , `} arrived, we consider Roundb (x) , 2−b ` · x2b ` instead. To compensate for the rounding error, we will need blocks of size smaller than that we used in our (`, n, ∆)-Ranker construction; specifically, Ran Ben-Basat Algorithm 1 An (`, n, 1)-Sliding Ranker for ` + 1 ≤ 2 XX:11 √ 3 log n Initialization: C ← 0̄, SC total ← 0, W ← 0̄  ← 0̄, ind ← 0,  √  √ ≤ log n T ← {0, 1, . . . , `} → 0, 1, . . . , ` · log n lookup table 1: function Add(element x) 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: ind ← ind + 1 mod n W[ind] ← x √ if (ind mod  log n) = 0 then    √ sum ← T W (1 + ind − log n) mod n, . . . , ind total ← total + sum √ SC[ind/ log n] ← sum if (ind mod (log n)2 ) = 0 then C[ind/(log n)2 ] ← total if (ind mod n) = 0 then total ← 0 function Query(i) addition ← 0 if i ≥ ind then addition ← C[0] . End of a sub-chunk . The sub-chunk’s sum . End of a chunk . End of a frame, reset counter . For i ≤ n . If not contained in current frame return . See Figure 2   h i p T W ind − (ind mod log n) + 1, . . . , ind j j k k p 2 +SC ind/ log n + C ind/(log n) + addition j  j k k p 2 −C ((ind − i) mod n) /(log n) − SC ((ind − i) mod n) / log n  h i p   − T W ((ind − i) mod n) / log n + 1, . . . , ind − i we set ν , max {bµ · (1 − 1/ log n)c , 1}. Additionally, when µ < 1 the block size has to remain 1, so we have to compensate for the rounding error by other means; this is achieved by reducing e , b∆ · (1 − 1/ log n)c.5 The parameters for the exact ranker are then the “sensitivity” to ∆  s , bn/νc and z , µ−1 ν . Our algorithm uses the following variables: R - a (z, s, 1) − Sliding Ranker, as described in Section 5.1. r - tracks the sum of elements that is not yet recorded in R. o - the offset within the block. A pseudo code of our method appears in Algorithm 2. Next follows a memory analysis of the algorithm with a proof given in Appendix C. I Lemma 12. Algorithm 2 requires (1+o(1))·bn/ max {bµc , 1}c·log  µ−1 + 1 +O (log n) bits.   This allows us to conclude, similarly to Theorem 10, that our algorithm is succinct if the error  `·n satisfies ∆ = o log n . We also note that a blog nc lower bound was shown in [3] even when only 5 e = 1, then we simply apply the exact algorithm from the previous subsection. If ∆ XX:12 Succinct Approximate Rank Queries Algorithm 2 An (`, n, ∆)-Sliding Ranker algorithm 1: Initialization: r ← 0, o ← 0, R ← (z, s, 1) − Sliding Ranker.init() 2: function Add(element x) 3: 4: 5: 6: 7: 8: o ← (o + 1) mod ν r ← r + Roundb (x) if o = 0 jthen k e −1 · r ρ← ∆ e ·ρ r←r−∆ R.Add(ρ) 9: function Query(i) 10: 11: 12: 13: 14: 15: 16: 17: if i ≤ o then   e − 1/2 return r − ∆ else   numElems ← i−o ν totalSum ← R.Query (numElems) oldestρ ← totalSum − R.Query (numElems − 1) out ← (ν −  ((i − o) mod  ν)) e − 1/2 + ∆ e · totalSum − ` · oldestρ · out return r − ∆ fixed sized windows (where i ≡ n) are considered.   Thus, our algorithm always requires at most `·n O(B`,n,∆ ), even if the allowed error is Ω log n . I Corollary 13. Let `, n, ∆ ∈ N+ such that µ , ∆/` satisfies   µ=o n log n  ∧ (µ = o(1)) ∨ (µ = ω(1)) ∨ (µ ∈ N) ∨ (µ−1 ∈ N) ,   then Algorithm 2 is succinct. For other parameters, it uses O(B`,n,∆ ) space. The following theorem, whose proof is deferred to Appendix E due to lack of space, shows the correctness of the algorithm. I Theorem 14. Algorithm 2 is an (`, n, ∆)-Sliding Ranker. 6 Discussion In this paper, we studied the properties of data structures that support approximate rank queries for multi sets in which each element in {1, 2, . . . , n} appears at most ` times. We showed a lower bound for the problem and succinct constructions that require (1 + o(1)) times as much memory. We then extended our approach and provided algorithms that process data streams and handle sliding window sum queries. Unlike previous work, we do not assume that the window size is fixed but rather get it at the query time. Interestingly, we show that this is doable in constant time and an additional (1 + o(1)) space factor. In the future, we would like to study structures that allow approximate select queries in O(1) time. This will allow efficient approximate-percentile computation for multi sets. We note that this is already achievable with our data structure in O(log n) time using a binary search over the rank queries. We also plan to explore the possibility of creating approximate rankers with a multiplicative error rather than additive. Finally, we wish to extend our approach to problems other than summing; e.g., computing heavy hitters for a sliding window whose size is given at the query time. Ran Ben-Basat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 References Brian Babcock, Mayur Datar, Rajeev Motwani, and Liadan O’Callaghan. Maintaining variance and k-medians over data stream windows. In ACM PODS, 2003. Ran Ben Basat, Gil Einziger, and Roy Friedman. Efficient network measurements through approximated windows. CoRR:1703.01166. Ran Ben Basat, Gil Einziger, Roy Friedman, and Yaron Kassner. Efficient Summing over Sliding Windows. In SWAT, 2016. Ran Ben-Basat, Gil Einziger, Roy Friedman, and Yaron Kassner. Heavy hitters in streams and sliding windows. In IEEE INFOCOM, 2016. Ran Ben-Basat, Gil Einziger, Roy Friedman, and Yaron Kassner. Poster abstract: A sliding counting bloom filter. In IEEE INFOCOM, 2017. Andrej Brodnik and J Ian Munro. Membership in constant time and almost-minimum space. SIAM Journal on Computing, 28(5):1627–1640, 1999. David Clark. Compact Pat trees. PhD thesis, PhD thesis, University of Waterloo, 1998. Edith Cohen and Martin J. Strauss. Maintaining time-decaying stream aggregates. Journal of algorithms, 59(1):19–36, 2006. Michael S Crouch, Andrew McGregor, and Daniel Stubbs. Dynamic graphs in the slidingwindow model. In ESA. 2013. Mayur Datar, Aristides Gionis, Piotr Indyk, and Rajeev Motwani. Maintaining stream statistics over sliding windows. SIAM Journal of Computing. Mayur Datar, Aristides Gionis, Piotr Indyk, and Rajeev Motwani. Maintaining stream statistics over sliding windows. SIAM Journal of Computing, 31(6):1794–1813, 2002. Michael L Fredman, János Komlós, and Endre Szemerédi. Storing a sparse table with 0 (1) worst case access time. Journal of the ACM, 31(3):538–544, 1984. Éric Fusy and Frécéric Giroire. Estimating the number of active flows in a data stream over a sliding window. In ANALCO, 2007. Phillip B. Gibbons and Srikanta Tirthapura. Distributed streams algorithms for sliding windows. In SPAA, 2002. Regant Y. S. Hung, Lap-Kei Lee, and Hing-Fung Ting. Finding frequent items over sliding windows with constant update time. Information Proceedings Letters10’, 110(7):257–260. Guy Joseph Jacobson. Succinct Static Data Structures. PhD thesis, 1988. Yang Liu, Wenji Chen, and Yong Guan. Near-optimal approximate membership query over time-decaying windows. In IEEE INFOCOM, 2013. Kyriakos Mouratidis, Spiridon Bakiras, and Dimitris Papadias. Continuous monitoring of top-k queries over sliding windows. In ACM SIGMOD, 2006. Moni Naor and Eylon Yogev. Sliding bloom filters. In Algorithms and Computation. 2013. Rasmus Pagh. Low redundancy in static dictionaries with constant query time. SIAM Journal on Computing, 31(2):353–363, 2001. Rajeev Raman, Venkatesh Raman, and Srinivasa Rao Satti. Succinct indexable dictionaries with applications to encoding k-ary trees, prefix sums and multisets. ACM Trans. Algorithms, 3(4):43, 2007. Venkatesh Raman and S. Srinivasa Rao. Static dictionaries supporting rank. In ISAAC, 1999. Zhitao Shen, M.A. Cheema, Xuemin Lin, Wenjie Zhang, and Haixun Wang. Efficiently monitoring top-k pairs over sliding windows. In IEEE ICDE, 2012. Robert Endre Tarjan and Andrew Chi-Chih Yao. Storing a sparse table. Communications of the ACM, 22(11):606–611, 1979. XX:13 XX:14 Succinct Approximate Rank Queries A Proof of Lemma 8 Proof. r= n X xd − ∆ · = ρ = =1 d=1 n X s X ≤∆−1+ $ xd − d=n−ν·s+1 n X s−1 X ! ρ −∆· =1 s−1 X ρ =1   n−ν·bn/νc X  xd xd  ≤ ∆ − 1 + d=1 d=n−ν·bn/νc+1 ν−1 X % n X ∆−1 · xd − ∆ · d=1    xd − ∆ · ∆−1 · d=1 n X xd ≤ ∆ − 1 + (ν − 1)`. d=1 If µ ≤ 1, then ν = 1 and thus r ≤ ∆−1. Otherwise, we have r ≤ ∆−1+(µ−1)` ≤ 2∆−`−1. B Proof of Theorem 11 We start with analyzing the memory requirements of our algorithm. I Lemma 15. Algorithm 1 uses B(1 + o(1)) memory bits. Proof. We have n/(log n)2 chunks, each represented using O(log(`n)) bits. Similarly, each √ of the n/ log  n sub-chunk aggregates requires O(log (` log n)) bits as its value is bounded by log ` log2 n . Our window, W uses n log (` + 1) bits, while the total and ind variables require O(log n) bits. Thus, the overall space consumption is B(1 + o(1)). We are now ready to prove the theorem. Proof. Denote the stream by x1 , x2 , . . . , xk·n+m , such that the most recent element’s index is k · n + m, where m ∈ [n − 1] is the offset within the current frame and k frames were completed so far. We assume that k ≥ 1. The case for k = 0 follows from similar arguments. We start with a few straight forward observations. Notice that C[0] always contains the sum of  the last frame  Pk·n that was completed; that is, C[0] = d=(k−1)n+1 xd . Next, for any positive j ∈ n/(log n)2 − 1 , we have that C[j] contains the sum of the last j-indexed chunk that was completed, i.e., (Pk·n+j·(log n)2 C[j] = d=k·n+(j−1)·(log n)2 +1 P(k−1)·n+j·(log n)2 if m ≥ j · (log n)2 xd d=(k−1)·n+(j−1)·(log n)2 +1 xd Similarly, we have that ∀ ∈ [2n/ log n]:  √ Pk·n+· log n  √  xd d=k·n+(−1)· log n+1 √ SC[] = P   (k−1)·n+· log n √ xd d=(k−1)·n+(−1)· log n+1 . otherwise if m ≥  · √ log n . otherwise Given a query for i ≤ n, the goal of an (`, n, 1)-Sliding Ranker is to return the quantity S , Pk·n+m d=k·n+m−i+1 xd . First, we express the sum of elements from the beginning of the previous frame, SP , as:   √ (k·n+m)/ log n (k·n+m)/(log n)2 c b k·n+m k·n+m kn X X X X X xd + SP , xd = xd + xd +  √ d=kn+1 d=b(k·n+m)/(log n)2 c+1 d=(k−1)n+1 d=(k−1)n+1 d= (k·n+m)/ Next, since ind = (k · n + m mod n) = m, we have that xd .  log n +1 Ran Ben-Basat 1. C[0] = XX:15 Pk·n+m d=(k−1)n+1 xd . Pbind/(log n)2 c ind/(log n) = d=kn+1 x .  √ d   P (k·n+m)/ log n  √ 3. SC ind/ log n = d=bind/(log n)2 c+1 xd . 2. C  2    4. T xind/√log n+1 , . . . , xk·n+m = Pk·n+m  d= (k·n+m)/ √  log n +1 xd . Notice that if i ≥ m, these are the first four summands of Line 16; if i < m, then we do not add C[0] to the sum. In both cases, we are left with the need to subtract the sum of elements, starting from the beginning of the relevant frame, that are not a part of the last i items. Similarly to the above, we have that the sum from the beginning of the previous frame to the i + 1 newest item Pk·n+m−i is: d=(k−1)n+1 xd . If the last i items are all contained in the current frame (i.e., i < m), then we have:   √ (k·n+m−i)/ log n (k·n+m−i)/(log n)2 c b k·n+m−i kn k·n+m−i X X X X X xd = xd + xd + xd +  √ d=kn+1 d=(k−1)n+1 d=(k−1)n+1 d=b(k·n+m−i)/(log n)2 c+1 d= (k·n+m)/ log n +1 In this case, we get: Pkn 1. C[0] = d=(k−1)n+1 xd .  Pbk·n+m/(log n)2 c  x . (ind − i)/(log n)2 = d=kn+1  √ d   P (k·n+m−i)/ log n √ 3. SC (ind − i)/ log n = d=b(k·n+m−i)/(log n)2 c+1 xd . Pk·n+m−i   √ 4. T [x(ind−i)/√log n+1 , . . . , xind−i ] = 2. C d= (k·n+m−i)/ log n +1 xd . Here, we cancel the effect of C[0] simply by not adding it as one of the summands (the If condition of Line 14). Quantities 2,3 and 4 are the three subtrahends of our query procedure. Finally, if i ≥ m we do add the value of C[0], and thus in all cases we successfully compute the sum of the last i elements. C Proof of Lemma 12 Proof. The algorithm utilizes three variables: R that requires (1 + o(1)) · s log (z + 1), r that uses O(b log ν) bits, and o is allocated with dlog ne bits. Overall, the number of bits used by our construction is (1 + o(1)) · s log (z + 1) + O(b log ν) + dlog ne =(1 + o(1)) · bn/νc log  µ−1 ν + 1 + 1 + O(dlog (n/µ) + log log ne log ν) + O (log n) .   Since ν = max {bµ · (1 − o(1))c , 1}, we get the desired bound. D An (`, n, 1)-Sliding Ranker for ` + 1 > 2 √ 3 xd .  log n Here, we detail the construction for the case of large ` value. We do the same splitting into frames, chunks, and sub-chunks as before. However, the large value of ` does not allow us to succinctly store the lookup table as before. Instead, we keep for each element the sum from the beginning of its sub-chunk, similarly to our solution in Theorem 4. Our algorithm uses the following variables: C - a cyclic buffer of n/(log n)2 integers, each allocated with dlog(`n + 1)e bits.  √ SC - a cyclic buffer of n/ log n integers, each allocated with log(` log2 n + 1) bits. total - the sum of elements in the current frame. subTotal - the sum of elements in the current sub-chunk. XX:16 Succinct Approximate Rank Queries Algorithm 3 An (`, n, 1)-Sliding Ranker for ` + 1 > 2 √ 3 log n Initialization: C ← 0̄, SC ← 0̄, ind ← 0, total ← 0, subTotal ← 0, W ← 0̄ 1: function Add(Element x) 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: ind ← ind + 1 mod n subTotal ← subTotal + x W[ind] ← subTotal √ if (ind mod log n)) = 0 then total ← total + subTotal √ SC[ind/ log n] ← subTotal subTotal ← 0 if (ind mod (log n)2 ) = 0 then C[ind/(log n)2 ] ← total if (ind mod n) = 0 then total ← 0 function Query(i) addition ← 0 if i ≥ ind then addition ← C[0] . End of a sub-chunk . End of a chunk . End of a frame, reset counter . For i ≤ n . If not contained in current frame . See Figure 2 j j k k p subTotal + SC ind/ log n + C ind/(log n)2 + addition j j k k p −C ((ind − i) mod n) /(log n)2 − SC ((ind − i) mod n) / log n − W [ind − i] return ind - the most recent element’s index, modulo n. W - a cyclic array that contains for each item the sum from the beginning of its sub-chunk. We give a pseudo code of our (`, n, 1)-Sliding Ranker in Algorithm 3. Next, we analyze the properties of the algorithm. I Theorem 16. Algorithm 3 uses B`,n,∆ (1 + o(1)) memory bits for ` + 1 > 2 √ 3 log n . Proof. Similarly to the analysis in Lemma 15, the algorithm uses o(B`,n,∆ ) bits for keeping the chunk and sub-chunk aggregates. Here, we replaced the lookup table and the array of window elements by an array that stores the within-sub-chunk cumulative sum for each element. That √ is, each entry in the n-sized array stores a number in 0, 1, . . . , ` · log n and thus the array    √ log log n requires n · log ` · log n + 1 ≤ n log(` + 1) 1 + log(`+1) = (1 + o(1))B`,n,∆ bits overall. I Theorem 17. Algorithm 3 is an (`, n, 1)-Sliding Ranker. Proof. Observe that the query procedure of our algorithm is equivalent to that of Algorithm 1, except for the part where it uses the lookup table. We now use the subTotal variable to compute the sum of the current sub-chunk instead of looking it up in the table. The sum of elements that preceded the last i items in (ind − i)’s sub-chunk is then retrieved from W [ind − i]. As we simply track the sum of items prior to that index in subTotal and then store it in W (see line 4), we get its value immediately. Thus, our estimation procedure is equivalent to that of Algorithm 1 and using Theorem 11 we establish our correctness. Ran Ben-Basat XX:17 Figure 3 Theorem 14 proof’s setting, with all relevant quantities that Algorithm 2 uses illustrated. E Proof of Theorem 14 Proof. For the we define a few quantities that we also use in our query procedure   proof, , totalSum , R.Query (numElems) , oldestρ , totalSum−R.Query (numElems − 1) numElems , i−o ν and out , (ν − ((i − o) mod ν)) as in our Query function; see Figure 3 for illustration. We assume that the index of the most recent element is h , o + out, such that o ∈ [ν − 1] is the offset within the current block and that x1 is the first element in the newest block of oldestρ . By the correctness of the R Sliding Ranker, and as illustrated in Figure 3, we have that totalSum is the sum of the last numElems added to R, that oldestρ is the value of the element that represents the last block that overlaps with the queried window. Also notice that out is the number of elements in that block that are not a part of the window. For any t ∈ N, we denote by rt the value of r after the tth item was added; e.g., rh is the value of r at the time of the query and r0 is its value after the last block has ended. For other variables, we consider their value at the query time. e (lines 6 and 7) and thus: When a block ends, we effectively perform r ← r mod ∆ e − 1. 0 ≤ r0 ≤ ∆ (6) Our goal is to estimate the quantity Si , h X h X xd = d=h−i+1 xd . (7) d=out+1 Recall that our estimation (Line 17) is:   e − 1/2 + ∆ e · totalSum − ` · oldestρ · out Sbi , rh − ∆ = rout + h X d=out+1   e − 1/2 + ∆ e · totalSum − ` · oldestρ · out, Roundb (xd ) − ∆ (8) XX:18 Succinct Approximate Rank Queries where the last equality follows from the fact that within a block we simply sum the rounded values (Line 4). Next, observe that we sum the rounded values in each block and that if r is e (for some k ∈ N) in Line 7, then we set one of the last numElems elements decreased by k · ∆ added to R to k. This means that: r0 + out X e · R.Query (numElems) = rout + ∆ e · totalSum. Roundb (xd ) = rout + ∆ (9) d=1 Plugging (9) into (8) gives us Sbi = r0 + out X h X Roundb (xd ) + d=1   e − 1/2 − ` · oldestρ · out. Roundb (xd ) − ∆ (10) d=out+1 Joining (10) with (7), we can express the algorithm’s error as: Sbi − Si = r0 + out X    h  X e − 1/2 − ` · oldestρ · out Roundb (xd ) − xd − ∆ Roundb (xd ) + d=1 d=out+1 = r0 + out X   e − 1/2 − ` · oldestρ · out, Roundb (xd ) + ξ − ∆ (11) d=1 where ξ is the rounding error which is defined as ξ,   h X Roundb (xd ) − xd . d=out+1 Since each rounding of an integer x ∈ {0, 1, . . . , `} has an error of at most i ≤ n elements, we have that the rounding error satisfies 0≥ξ ≥0− `·n ≥ −∆/ log n, 2b ` , 2b and as we round (12) where the last inequality is immediate from our choice of the number of bits that is b , dlog (n/µ) + log log ne. We now split to cases based on the value of µ. As in the (`, n, ∆)-Ranker case, we start with the simpler µ < 2 · (1 − 1/ log n) case, in which ν = 1 (and consequently, out ≡ 0). This allows us to write the algorithm’s error of (11) as   e − 1/2 . Sbi − Si = r0 + ξ − ∆ (13) e to obtain: We now use (6),(12) and the definition of ∆   e − 1/2 ≤ −1/2. Sbi − Si = r0 + ξ − ∆ Similarly, we can bound it from below:     e − 1/2 ≥ ξ − ∆ e − 1/2 ≥ −∆ + 1/2. Sbi − Si = r0 + ξ − ∆ We established that if ν = 1 we obtain the desired approximation. Henceforth, we focus on the case where µ ≥ 2 · (1 − 1/ log n), and thus ν = bµ · (1 − 1/ log n)c and oldestρ ∈ {0, 1}. We now consider two cases, based on the value of oldestρ . Ran Ben-Basat XX:19 1. oldestρ = 1 case. e In this case, we know that after the processing of element xν the value of r was at least ∆ Pν e (Line 6). This implies that r0 + d=1 Roundb (xd ) ≥ ∆ and equivalently r0 + out X e− Roundb (xd ) ≥ ∆ d=1 ν X Roundb (xd ). d=out+1 Substituting this in (11), and applying (12), we get that: Sbi − Si = r0 + e− ≥∆ out X   e − 1/2 − ` · out Roundb (xd ) + ξ − ∆ d=1 ν X   e − 1/2 − ` · out Roundb (xd ) + ξ − ∆ d=out+1 ν X ≥− ! + ξ + 1/2 − ` · out ` d=out+1 ≥ −∆/ log n − ` bµ · (1 − 1/ log n)c + 1/2 ≥ −∆ + 1/2. In order to bound the error from above we use (6) and (12): Sbi − Si = r0 + out X   e − 1/2 − ` · out Roundb (xd ) + ξ − ∆ d=1   e − 1 + ` · out − ∆ e − 1/2 − ` · out ≤ −1/2. ≤∆ 2. oldestρ = 0 case. Pν e and thus Here, since the value of oldestρ was is 0, we have that r0 + d=1 Roundb (xd ) < ∆ r0 + out X e− Roundb (xd ) ≤ ∆ ν X Roundb (xd ) − 1. d=out+1 d=1 We use this for the error expression of (11) to get: Sbi − Si = r0 + e− ≤∆ out X   e − 1/2 Roundb (xd ) + ξ − ∆ d=1 ν X   e − 1/2 ≤ −1/2 Roundb (xd ) − 1 + ξ − ∆ d=out+1 We now use (6), (12), and the fact that out ≤ ν to bound the error from below as follows: Sbi − Si = r0 + out X   e − 1/2 Roundb (xd ) + ξ − ∆ d=1   e − 1/2 ≥ −∆ + 1/2. ≥ξ− ∆   e − 1/2 as the estimate. Finally, we need to cover the case of i ≤ o. In this case, we return r − ∆ This directly follows from (6) and the fact that within a block we simply sum the rounded values (Line 4). We established that in all cases −∆ < Sbi − Si < 0, thereby proving the theorem.
8cs.DS
arXiv:1611.07786v1 [cs.DS] 23 Nov 2016 A Faster Algorithm for Cuckoo Insertion and Bipartite Matching in Large Graphs ∗ Megha Khosla Avishek Anand November 24, 2016 Abstract Hash tables are ubiquitous in computer science for efficient access to large datasets. However, there is always a need for approaches that offer compact memory utilisation without substantial degradation of lookup performance. Cuckoo hashing is an efficient technique of creating hash tables with high space utilisation and offer a guaranteed constant access time. We are given n locations and m items. Each item has to be placed in one of the k ≥ 2 locations chosen by k random hash functions. By allowing more than one choice for a single item, cuckoo hashing resembles multiple choice allocations schemes. In addition it supports dynamically changing the location of an item among its possible locations. We propose and analyse an insertion algorithm for cuckoo hashing that runs in linear time with high probability and in expectation. Previous work on total allocation time has analysed breadth first search, and it was shown to be linear only in expectation. Our algorithm finds an assignment (with probability 1) whenever it exists. In contrast, the other known insertion method, known as random walk insertion, may run indefinitely even for a solvable instance. We also present experimental results comparing the performance of our algorithm with the random walk method, also for the case when each location can hold more than one item. As a corollary we obtain a linear time algorithm (with high probability and in expectation) for finding perfect matchings in a special class of sparse random bipartite graphs. We support this by performing experiments on a real world large dataset for finding maximum matchings in general large bipartite graphs. We report an order of magnitude improvement in the running time as compared to the Hopkraft-Karp matching algorithm. ∗ An extended abstract of this work appeared in the Proceedings of the 21st Annual European Symposium on Algorithms(ESA ’13)[15]. 1 1 Introduction In computer science, a hash table [4] is a data structure that maps items (keys) to locations (values) using a hash function. More precisely, given a universe U of items and a hash table H of size n ∈ N, a hash function h : U → {1, 2, . . . , n} maps the items from U to the n positions on the table. Ideally, the hash function should assign to each possible item to a unique location, but this objective is rarely achievable in practice. Two or more items could be mapped to the same location resulting in a collision. In this work we deal with a collision resolution technique known as cuckoo hashing. Cuckoo hashing was first proposed by Pagh and Rodler in [19]. We are interested in a generalization of the original idea (see [8]) where we are given a table with n locations, and we assume each location can hold a single item. Each item chooses randomly k ≥ 3 locations (using k random hash functions) and has to be placed in one of them. Formally speaking we are given k ≥ 3 hash functions h1 , ..., hk that each maps an element x ∈ U to a position in the table H. Moreover we assume that h1 , ..., hk are truly independent and random hash functions. We refer the reader to [18, 6] (and references therein) for justification of this idealized assumption. Other variations of cuckoo hashing are considered in for example [1, 16]. Cuckoo hashing resembles multiple choice allocations schemes in the sense that it allows more than one choice for a single item. In addition it supports dynamically changing the location of an item among its possible locations during insertion. The insertion procedure in cuckoo hashing goes as follows. Assume that p items have been inserted, each of them having made their k random choices on the hash table, and we are about to insert the p + 1st item. This item selects its k random locations from the hash table and is assigned to one of them. But this location might already be occupied by a previously inserted item. In that case, the previous item is evicted or “kicked out” and is assigned to one of the other k −1 selected locations. In turn, this position might be occupied by another item, which is kicked out and goes to one of the remaining k − 1 chosen locations. This process may be repeated indefinitely or until a free loction is found. We model cuckoo hashing by a directed graph G = (V, E) such that the set of vertices V = {v1 , v2 , . . . , vn } corresponds to locations on the hash table. We say a vertex is occupied if there is an item assigned to the corresponding location, otherwise it is free. Let I be the set of m items. We represent each item x ∈ I as a tuple of its k chosen vertices (locations), for example, x = (vx1 , vx2 , . . . , vxk ). A directed edge e = (vi , vj ) ∈ E if and only if there exists an item y ∈ I so that the following two conditions hold, (i) vi , vj ∈ y, and (ii) vi is occupied by y. Note that a vertex with outdegree 0 is a free vertex. We denote 2 the set of free vertices by F and the distance of any vertex v from some vertex in F by d(v, F ). Since G represents an allocation we call G an allocation graph. Now assume that in the cuckoo insertion procedure, at some instance an item z arrives such that all its k choices are occupied. Let vj ∈ z be the vertex chosen to place item z. The following are the main observations. 1. The necessary condition for item z to be successfully inserted at vzj is the existence of a path from vzj to F . This condition remains satisfied as long as some allocation is possible. 2. The procedure will stop in the minimum number of steps if for all vzi ∈ z the distance d(vzj , F ) ≤ d(vzi , F ). With respect to our first observation, a natural question to ponder would be the following. We are given a set of m items and n locations such that each item picks k ≥ 3 locations at random. Is it possible to place each of the items into one of their chosen locations such that each location holds at most one item? From [17, 9, 11] we know that there exists a critical size c∗k n such that if m < c∗k n then such an allocation is possible with high probability, otherwise this is not the case. Theorem 1 For integers k ≥ 3 let ξ ∗ be the unique solution of the equation ξ(1 − e−ξ ) . (1) k= 1 − e−ξ − ξe−ξ Let c∗k = ξ∗ . k(1−e−ξ∗ )k−1 Then P (allocation of m = bcnc items to n locations is possible) (n→∞) = ( 0, if c > c∗k . 1, if c < c∗k (2) The proof of the above theorem is non-constructive, i.e., it does not give us an algorithm to find such an allocation. In this work we deal with the algorithmic issues and propose an algorithm which takes linear time with high probability and in expectation to find the optimal allocation. Our second observation suggests that the insertion time in the cuckoo hashing depends on the selection of the location, which we make for each assignment, from among the k possible locations. One can in principle use breadth first search to always make assignments over the shortest path (in the allocation graph). But this method is inefficient and expensive to perform for each item. One can also select uniformly at random a location from the available locations. This resembles a random walk on the locations of the table and is called the 3 random walk insertion. In [10, 12] the authors analyzed the random walk insertion method and gave a polylogarithmic bound (with high probability) on the maximum insertion time, i.e., the maximum time it can take to insert a single item. 1.1 More on Related Work The allocation problem in cuckoo hashing can also be phrased in terms of orientation of graphs or more generally orientations of k-uniform hypergraphs. The n locations are represented as vertices and each of the m items form an edge with its k-vertices representing the k random ∗ choices of the item. In fact, this is a random (multi)hypergraph Hn,m,k ∗ (or random (multi)graph Gn,m for k = 2) with n vertices and m edges where each edge is drawn uniformly at random ( with replacement) from the set of all k-multisubsets of the vertex set. An `-orientation of a graph then amounts to a mapping of each edge to one of its vertices such that no vertex receives more than ` edges. ` is also called the maximum load capacity. In our algorithm, we focus on ` = 1. Here, we give an overview of existing work for general ` for completeness. For the case k = 2, several allocation algorithms and their analysis are closely connected to the cores of the associated graph. The ` core of a graph is the maximum vertex induced subgraph with minimum degree at least `. As another application, the above described problem can also be seen as a load balancing problem with locations representing the machines and the items representing the jobs. To this extent Czumaj and Stemann [5] gave a linear time algorithm achieving maximum load O(m/n) based on computation of all cores. The main idea was to repeatedly choose a vertex v with minimum degree and remove it from the graph, and assigning all its incident edges (items) to vertex (location) v. Cain, Sanders, and Wormald [3] used a variation of the above approach and gave a linear time algorithm for computing an optimal allocation (asymptotically almost surely). Their algorithm first guesses the optimal load among the two likely values values (dm/ne or dm/ne + 1). The procedure starts with a load value say ` = dm/ne. Each time a vertex with degree at most ` and its incident edges are assigned to v. The above rule, also called the mindegree rule, first reduces the graph to its ` + 1 core. Next, some edge (u, v) is picked according to some priority rule and assigned to one of its vertices. Again the mindegree rule is applied with respect to some conditions. In case the algorithm fails it is repeated after incrementing the load value. Fernholz and Ramachandran [7] used a different approach in dealing with the vertices with degree greater than the maximum load. Their algorithm, called the excess degree reduction (EDR) approach, always chooses a vertex with minimum degree, d. If d < ` then this vertex is assigned all its incident edges and is removed from the graph. In case 4 d > 2` the algorithm fails. Otherwise, EDR replaces d − ` paths of the form (u, v, w) by bypass edges (u, w) and then orients all remaining edges (≤ ` ) incident to v towards v. Optimal allocations can also be computed in polynomial time using maximum flow computations and with high probability achieve a maximum load of dm/ne or dm/ne + 1 [20]. Very recently Aumüller, Dietzfelbinger and Woelfel [2] analyzed our algorithm in their special framework of an easily computable hash class. Notations. Throughout the paper we use the following notations. We denote the set of integers {1, 2, . . . , n} by [n]. Let V = {v1 , v2 , . . . , vn } be the set of n vertices representing the locations of the hash table. For an allocation graph G = (V, E) and any two vertices vi , vj ∈ V , the shortest distance between vi and vj is denoted by d(vi , vj ). We denote the set of free vertices by F . We denote the shortest distance of a vertex vi ∈ V to any set of vertices say S by d(vi , S) which is defined as d(vi , S) := min d(vi , vj ). vj ∈S We use R to denote the set of vertices furthest from F , i.e., R := {vi ∈ V |d(vi , F ) ≥ max d(vj , F )}. vj ∈V For some integer t ∈ [n] and the subset of vertex set V 0 ⊂ V let Nt (vi ) and Nt (V 0 ) denote the set of vertices at distance at most t from the vertex vi ∈ V and the set V 0 . Mathematically, Nt (vi ) := {vj ∈ V | d(vi , vj ) ≤ t} and Nt (V 0 ) := {vj ∈ V | d(vi , V 0 ) ≤ t}. 1.2 Our Contribution Our aim here is to minimize the total insertion time in cuckoo hashing, thereby minimizing the total time required to construct the hash table. We propose a deterministic strategy of how to select a vertex for placing an item when all its choices are occupied. We assign to each vertex vi ∈ V an integer label, L(vi ). Initially all vertices have 0 as their labels. Note that at this stage, for all j ∈ [n], L(vj ) = d(vj , F ), i.e., the labels of all vertices represent their shortest distances from F . When an item x appears, it chooses the vertex with the least label from among its k choices. If the vertex is free, the item is placed on it. Otherwise, the previous item is kicked out. The label of the 5 location is then updated and set to one more than the minimum label of the remaining k − 1 choices of the item x. The kicked out item chooses the location with minimum label from its k choices and the above procedure is repeated till an empty location is found. Note that to maintain the labels of the vertices as their shortest distances from F we would require to update labels of the neighbors of the affected vertex and the labels of their neighbors and so on. This corresponds to performing a breadth first search (bfs) starting from the affected vertex. We avoid the bfs and perform only local updations. Therefore, we also call our method as local search allocation. Previous work [8] on total allocation time has analysed breadth first search, and it was shown to be linear only in expectation. The local search allocation method requires linear time with probability 1 − o(1) and in expectation to find an allocation. We now state our main result. Theorem 2 Let k ≥ 3. For any fixed ε > 0, set m = (1 − ε)c∗k n. Assume that each of the m items chooses k random locations (using k random hash functions) from a table with n locations. Then for some ζ > 0with probability 1 − n−ζ , LSA finds an allocation of these items (such that no location holds more than one item) in time O(n). Moreover the expected running time of LSA is also O(n). We prove the above theorem in two steps. First we show that the algorithm is correct and finds an allocation in polynomial time. To this end we prove that, at any instance, label of a vertex is at most its distance from the set of free vertices. Therefore, no vertex can have a label greater than n. This would imply that the algorithm could not run indefinitely and would stop after making at most n changes at each location. We then show that the local search insertion method will find an allocation in a time proportional to the sum of distances of the n vertices from F (in the resulting allocation graph). We then complete the proof by showing that (i) if for some ε > 0, m = (1 − ε)c∗k items are placed in n locations using k random hash functions for each item then the corresponding allocation graph has two special structural properties with probability 1 − o(1), and (ii) if the allocation graph has these two properties, then the sum of distances of its vertices from F is linear in n. In the next section we give a formal description of our algorithm and its analysis. Cuckoo Hashing and Random Hypergraphs As already mentioned we can model the allocation problem in cuckoo hashing as a hypergraph. Each location can be viewed as a vertex and each item as an edge. The k vertices of each edge represent its k-random choices. In fact, this is a random hypergraph with n vertices and m edges where each edge is drawn uniformly at random (with 6 replacement) from the set of all k-multisubsets of the vertex set. Therefore, a proper allocation of items is possible if and only if the corresponding hypergraph is 1-orientable, i.e., if there is an assignment of each edge e ∈ E to one of its vertices v ∈ e such that each vertex is assigned at most one edge. We denote a random (multi)hypergraph with n vertices and m edges by Hn,m,k . We define the density of a hypergraph as the ratio of the number of edges to the number to its vertices. We will need the following results from [10] about the expansion properties of a random hypergraph. In the analysis of LSA we would see that these properties help us to infer that the allocation graph expands considerably and the maximum label of any vertex there is O(log n). Theorem 3 Let for any fixed ε > 0, m = (1 − ε)c∗k n. Then there exists a δ = δ(ε, k) such that any subhypergraph of Hn,m,k has density at most (1 − δ) with probability 1 − O(1/n). The proof of the following lemma is similar to that in [10]. The parameters here are adjusted to our requirements; so we present the proof for completeness. Lemma 1 Let m < c∗k n and α < 1/(k − 1). Then for every integer s such that 1 ≤ s ≤ αn, there exists a constant ζ > 0 such that the following holds with probability 1 − n−ζ . The number of vertices spanned by any  set of edges of size s in Hn,m,k is greater than  k−1− log(k−1)ek 1 log α(k−1) s. Proof 1 Recall that each edge in Hn,m,k is a multiset of size k. Therefore, the probability that an edge of Hn,m,k is contained completely in k a subset of size t of the vertex set is given by nt k . Thus the expected numberof sets of edges of size s that span at most t vertices is at most   tk s m n . Note that by the following approximation for factorials s t nk for positive integer a  a a √  a a √ 2πa ≤ a! ≤ e a, e e we obtain for 0 < b < a     −(a−b+1/2)   a a √ e a a a! e b a b e = ≤ b = · 1− p √  a−b b a−b b b!(a − b)! 2π a b 2πb 2π(a − b) e  e    2 3 3 b b b b b  a b  ae b exp 1 + b + 2a + 2a exp 1 + 2a − 2a 2 − a2 2 < < 2π b 2π b exp(1.5)  ae b  ae b < < . 2π b b 7 Using the above bounds for m < c∗k n and setting t = (k − 1 − δs )s we obtain     ks  ∗ s    ks  ∗ s    ks m n t nck e ne t t nck e ne t t < · < · s t n s t n s t n  ∗ s    ∗ k−δs s  −(1+δs )s nck n t−ks t+s nck e n = e = s t s (k − 1 − δs )s  ∗ s  −(1+δs )s nck n < eks s (k − 1)s !s −δs  n k ∗ = · (k − 1)e ck . (k − 1)s Moreover from [9] we know that c∗k < 1. Let β be such that (1+β)c∗k = 1. n Setting δs = log(k − 1)ek / log s(k−1) we obtain  n (k − 1)s !s −δs · (k − 1)ek c∗k = (1 + β)−s . Therefore, for δs = 1 + lnk−1 ek / lnk−1 ns − 1 and α < 1/(k − 1), the probability that there exists a set of edges of size s, where n1/2 ≤ s ≤ 1/2 αn, spanning at most (k − 1 − δs )s vertices is O((1 + β)−n ) = 1/2 e−O(n ) Note that for n1/2 ≤ s ≤ αn, δs < 1 + logk−1 ek /(logk−1 α1 − 1). 1 For the case 1 ≤ s < n1/2 , we substitute δs = log(k − 1)ek /(log α(k−1) − 1). Then the expected number of sets of edges of size s spanning at most (k − 1 − δs )s vertices is at most  s k   log(k−1)e 1 1/2 log −1 (k − 1)n α(k−1)  · ((k − 1)ek ) . n Therefore for large n the probability  that there exists a set  of edges of log(k−1)ek 1/2 size 1 ≤ s < n spanning at most k − 1 − log 1 s vertices is α(k−1) at most o(n−1/2 ), which completes the proof . 2 Local Search Insertion and its Analysis Assume that we are given items in an online fashion, i.e., each item chooses its k random locations whenever it appears. Moreover, items appear in an arbitrary order. The insertion using local search method goes as follows. For each vertex v ∈ V we maintain a label. Initially 8 each vertex is assigned a label 0. To assign an item x at time t we select one of its chosen vertices v such that its label is minimum and assign x to v. We assign a new label to v which is one more than the minimum label of the remaining k−1 choices of x. However, v might have already been occupied by a previously assigned item i0 . In that case we kick out y and repeat the above procedure. Let L = {L(v1 ), . . . , L(vn )} and T = {T (v1 ), . . . , T (vn )} where L(vi ) denotes the label of vertex vi and T (vi ) denotes the item assigned to vertex vi . We initialize L with all 0s , i.e., all vertices are free. We then use Algorithm 1 to assign an arbitrary item when it appears. In the next subsection we Algorithm 1 AssignItem (x, L, T) 1: Choose a vertex v among the k choices of x with minimum label L(v). 2: if (L(v) >= n − 1) then 3: EXIT BAllocation does not exist 4: else 5: L(v) ← 1 + min (L(u)|u 6= v and u ∈ x) 6: if (T (v) 6= ∅) then 7: y ← T (v) BMove that replaces an item 8: T (v) ← x 9: CALL AssignItem(y, L, T) 10: else 11: T (v) ← x BMove that places an item first prove the correctness of the algorithm, i.e, it finds an allocation in a finite number of steps whenever an allocation exists. We show that the algorithm takes a maximum of O(n2 ) time before it obtains a mapping for each item. We then proceed to give a stronger bound on the running time. 2.1 Labels and the Shortest Distances We need some additional notation. In what follows a move denotes either placing an item in a free vertex or replacing a previously allocated item. Let M be the total number of moves performed by the algorithm. For p ∈ [M ] we use Lp (v) to denote the label of vertex v at the end of the pth move. Similarly we use Fp to denote the set of free vertices at the end of pth move. The corresponding allocation graph is denoted as Gp = (V, Ep ). We need the following proposition. Proposition 1 For all p ∈ [M ] and all v ∈ V , the shortest distance of v to Fp is at least the label of v, i.e., d(v, Fp ) ≥ Lp (v). 9 Proof 2 We first note that the label of a free vertex always remain 0, i.e., ∀p ∈ [M ], ∀w ∈ Fp , Lp (w) = 0. (3) We will now show that throughout the algorithm the label of a vertex is at most one more than the label of any of its immediate neighbors (neighbors at distance 1). More precisely, ∀p ∈ [M ], ∀(u, v) ∈ Ep , Lp (u) ≤ Lp (v) + 1. (4) We prove (4) by induction on the number of moves performed by the algorithm. Initially when no item has appeared all vertices have 0 as their labels. When the first item is assigned, i.e., there is a single vertex say u such that L1 (u) = 1. Clearly, (4) holds after the first move. Assume that (4) holds after p moves. For the (p + 1)th move let w ∈ V be some vertex which is assigned an item x. Consider an edge (u, v) ∈ Ep such that u 6= w and v 6= w. Note that the labels of all vertices v ∈ V \ w remain unchanged in the (p + 1)th move. Therefore by induction hypothesis, (4) is true for all edges which does not contain w. By Step 2 of Algorithm 1 the new label of w is one more than the minimum of the labels of its k − 1 neighbors, i.e, Lp+1 (w) = 0min Lp+1 (w0 ) + 1. w ∈x\w Therefore (4) holds for all edges originating from w. Now consider a vertex u ∈ V such that (u, w) ∈ Ep . Now by induction hypothesis we have Lp+1 (u) = Lp (u) ≤ Lp (w) + 1. Note that the vertex w was chosen because it had the minimum label among the k possible choices for the item x, i.e., Lp (w) ≤ min Lp (w0 ) = 0min Lp+1 (w0 ) < Lp+1 (w). 0 w ∈x w ∈x\w We therefore obtain Lp+1 (u) ≤ Lp (w) + 1 < Lp+1 (w) + 1, thereby completing the induction step. We can now combine (3) and (4) to obtain the desired result. To see this, consider a vertex v at distance s < n to a free vertex f ∈ Fp such that s is also the shortest distance from v to Fp . By iteratively applying (4) we obtain Lp (v) ≤ s+Lp (f ) = d(v, Fp ), which completes the proof. We know that whenever the algorithm visits a vertex, it increases its label by at least 1. Trivially the maximum distance of a vertex from a free vertex is n − 1 (if an allocation exists), and so is the maximum label. Therefore the algorithm will stop in at most n(n − 1) steps, i.e., after visiting each vertex at most n − 1 times, which implies that the algorithm is correct and finds an allocation in O(n2 ) time. In the following we show that the total running time is proportional to the sum of labels of the n vertices. 10 Lemma 2 Let L∗ be the array of labels of the vertices after all items have been allocated using PAlgorithm 1. Then the total time required to find an allocation is O( v∈V L∗ (v)). Proof 3 Now each invocation of Algorithm 1 increases the label of the chosen vertex by at least 1. Therefore, if a vertex has a label ` at the end of the algorithm then it has been selected (for any move during the allocation process) at most ` times. Now the given number of items can be allocated in a time proportional to the number of steps required ∗ to obtain the (when the initial set consisted of all zeros) and Parray L ∗ hence is O( v∈V L (v)). For notational convenience let F := FM and G := GM denote the set of free vertices and the allocation graph (respectively) at the end of the algorithm. By Proposition 1 we know that for each v ∈ V , L∗ (v) ≤ d(v, F ). Moreover, by Step 2 of Algorithm 1 the maximum value of a label is n. Thus the total sum of labels of all vertices is bounded as follows. ! X X ∗ 2 L (vi )) ≤ min d(v, F ), n . vi ∈V vi ∈V So our aim now is to bound the shortest distances such that the sum of these is linear in the size of G. We accomplish this in the following section. 2.2 Bounding the Distances P To compute the desired sum, i.e., vi ∈V d(v, F ), we study the structure of the allocation graph. The following lemma states that, with probability 1 − o(1), a fraction of the vertices in the allocation graph are at a constant distance to the set of free vertices, F . This would imply that the contribution for the above sum made by these vertices is O(n). Lemma 3 For any fixed ε > 0, let m = (1 − ε)c∗k n items are assigned to n locations using k random choices for each locations. Then the corresponding allocation graph G = (V, E) satisfies the following with probability 1 − O(1/n): for every α > 0 there exist C = C(α, ε) > 0 and a set S ⊆ V of size at least (1 − α)n such that every vertex v ∈ S satisfies d(v, F ) ≤ C. Proof 4 We perform the following stripping process on G. We start with G and in each step remove all its free vertices and the edges they are contained in. Note that by removing the edges, we have removed the items placed on the corresponding vertices, thereby creating a new 11 set of free vertices. For step i of the stripping process, we denote the set of vertices by Vi and the set of free vertices by Fi and let Gi be the corresponding allocation graph. The number of occupied vertices in Gi is then equal to |Vi | − |Fi |. As each vertex holds at most one item, the number of remaining balls is |Vi | − |Fi |. Let H = (V, E 0 ) be a k-uniform hypergraph with n vertices representing the locations and m edges representing the items. Each edge consists of k vertices or k choices of the item. Note that the number of occupied vertices in G is equal to the number of edges in H. Similarly Gi corresponds to a subgraph in H induced on the vertex set Vi . Let us denote it by H[Vi ]. The number of occupied vertices in Gi , i.e. |Vi | − |Fi |, then is the number of edges in H[Vi ]. By Theorem 3, with probability 1 − o(1) we have |Fi | ≥ δ|Vi |. Also by the stripping process we obtain |Vi+1 | = |Vi | − |Fi |. We can therefore conclude that, with probability 1 − o(1), |Vi+1 | ≤ (1 − δ)|Vi |. Therefore, after t ≥ 1 iterations of removing free vertices we obtain |Vt | ≤ (1 − δ)t |V |. We can now choose t = dln(1−δ) αe to deduce that |Vt | < α|V |. We complete the proof by substituting S = V \ Vt ≥ (1 − α)n and C = dlog(1−δ) αe. We remark that the above lemma has already been proved in [10] (in the hypergraph setting). A similar result has also been proved in [11] (in the bipartite matching setting) for k ≥ 8. With respect to an allocation graph recall that we denote the set of vertices furthest from F by R. Also for an integer s, Ns (R) denotes the set of vertices at distance at most s from R. The next lemma states that the neighborhood of R expands suitably with high probability. We remark that the estimate, for expansion factor, presented here is not the best possible but nevertheless suffices for our analysis. Lemma 4 For any fixed ε > 0, let m = (1 − ε)c∗k n items are assigned to n locations using k random choices for each item and G = (V, E) 1 and be the corresponding allocation graph. Then for any 0 < α < k−1 every integer s such that 1 ≤ |Ns (R)| ≤ αn, there exists a constant ζ > 0 such that G satisfies the following with probability 1 − n−ζ . ! log ek (k − 1) |Ns (R)| > k − 1 − |Ns−1 (R)|. 1 log α(k−1) Proof 5 Recall that in the allocation graph G, R is the set of vertices furthest from the set of free vertices. The set of vertices at distance at most s from R is denoted by Ns (R). Note that each occupied vertex in G holds one item. By construction of the allocation graph Ns (R) is the set of vertices representing the choices of items placed on vertices in Ns−1 (R). In the hypergraph setting where each item corresponds to an edge, |Ns (R)| is the number of vertices spanned by the set of edges of size |Ns−1 (R)|. We can now use Lemma 1 to obtain the desired result. 12 We define µ := log ek (k − 1)/ log (−α(k − 1)). For some fixed γ > 0 we set   −1 −k α := exp (k − 1)−1− k−2−γ , (5) k−2−γ which implies that µ = k − 2 − γ. The following corollary follows from the above two lemmas. Corollary 1 With high probability, the maximum label of any vertex in the allocation graph is O(log n). Proof 6 Set α as in (5). Let d be the shortest distance of vertices in R to S. Then by Lemma 4 with high probability, ! log ek (k − 1) |Nd−1 (R)| = (1 + γ)d |R|, |Nd (R)| > k − 1 − 1 log α(k−1) which implies that d < log1+γ αn. Note that the shortest distance of vertices in S to F is a constant C(α, δ) for δ defined in Lemma 3. Moreover, by Proposition 1 the label of any vertex is upper bounded by its distance to the set of free vertices. Therefore, the label of any vertex v is such that L(v) = O(log1+γ αn). We now prove our main theorem. Proof 7 (Proof of Theorem 2) Set α as in (5). Then by Lemma 3, with probability 1−O(1/n), there exists a C = C(α, ε) and a set S such that |S| ≥ (1 − α)n and every vertex v ∈ S satisfies d(v, F ) ≤ C. Let T + 1 be the maximum of the distances of vertices in R to S, i.e., T = max d(v, S) − 1. v∈R Clearly the number of vertices at distance at most T from R is at most αn, i.e., |NT (R)| ≤ αn. Moreover for all t < T , |Nt (R)| < |NT (R)|. Then by Lemma 4, for all t ≤ T the following holds with high probability, |Nt+1 (R)| > (k − 1 − δ) |Nt (R)|. One can check that for γ > 0 and α as chosen above, δ < k − 2 − γ. The total distance of all vertices from F is then given by X X D= d(v, F ) + d(v, F ). v∈S v∈NT (R) As P every vertex in S is at a constant distance from F , we obtain v∈S d(v, F ) = O(n). Note that for every i > 0, |Ni (R)| − |Ni−1 (R)| 13 is the number of vertices at distance i from R. Therefore, X d(v, F ) = (T + C)|N0 (R)| + T X (T + C − i)(|Ni (R)| − |Ni−1 (R)|) i=1 v∈NT (R) = (T + C)|N0 (R)| + T X (T − i)(|Ni (R)| − |Ni−1 (R)|) + C i=1 = (T + C)|N0 (R)| + T X T X (|Ni (R)| − |Ni−1 (R)|) i=1 (T − i)(|Ni (R)| − |Ni−1 (R)|) + C(|NT (R)| − |N0 (R)|) i=1 = T  X  T −1 X (T − i)(|Ni (R)| − |Ni−1 (R)|) + |N0 (R)| + C · |NT (R)| = |Ni (R)| + O(n). i=1 i=0 Now with high probability, we have |NT −j (R)| < T −1 X |Ni (R))| < |NT (R)| i=0 T X j=1 |NT (R)| (k−1−δ)j . Therefore, T X 1 1 < |N (R)| = O(n), T (k − 1 − δ)j (1 + γ)j j=1 which completes the first part of the proof of Theorem 2. To bound the expected time, we observe that for i such that |Ni (R))| < n1/2 combining with the fact that for any i, |Ni (R)| < |Ni−1 (R)| the following holds 1/2 n X X (n1/2 + 1) |Ni (R)| < j = n1/2 · = O(n) 2 i j=1 with probability 1. For all other i using lemmas 1 and 4 X |Ni (R)| < |NT (R)| X i i 1 <n (k − 1 − δ)i 0.5 with probability 1−e−O(n ) . Note that we already proved that the maximum value of the sum of all the labels can be atmost n2 (see discussion after Lemma 2). This implies that for such i ! X 0.5 E |Ni (R)| < n(1 − o(1)) + n2 e−O(n ) = O(n) i We obtain the following corollary about maximum matchings in left regular random bipartite graphs. Recall that a bipartite graph G = (L ∪ R; E) is k-left regular if each vertex v ∈ L has exactly k neighbors in R. 14 Corollary 2 For k ≥ 3 and c∗k as defined in Theorem 1, let G = (L∪R; E) be a random k-left regular bipartite graph such that |L|/|R| < c∗k . The local search allocation method obtains a maximum cardinality matching in G in time O(|R|) with probability 1 − o(1). Proof 8 We assign label 0 to each of the vertices in R initially. Each vertex in L can be considered as an item and let R be the set of locations. The k random choices for v ∈ L (item) are the k random neighbors of v. We can now find a matching for each v ∈ L by using Algorithm 1. 3 Experiments In this section we discuss the performance of our proposed LSA algorithm on randomly generated instances with density less than the threshold and then on real-world large datasets with arbitrary densities. The rationale of our evaluation is two-fold. First, we establish the effectiveness of LSA for randomly generated instances with densities close to the threshold in terms of abstract cost measures and compare it with the state of the art method employed for Cuckoo Hashing for a large number of randomly generated instances. Second, we would want to validate the performance of LSA in terms of wall-clock times on large real-world bipartite graphs with arbitrary densities and structure ( i.e. these are not necessarily left regular bipartite graphs). 3.1 Performance on Random Graphs We present some simulations to compare the performance of local search allocation with the random walk method which (to the best of our knowledge) is currently the state-of-art method and so far considered to be the fastest algorithm for the case k ≥ 3. We recall that in the random walk method we choose a location at random from among the k possible locations to place the item. If the location is not free, the previous item is moved out. The moved out item again chooses a random location from among its choices and the procedure goes on till an empty location is found. In our experiments we consider n ∈ [105 , 5×106 ] locations and bcnc items. The k random locations are chosen when the item appears. All random numbers in our simulations are generated by MT19937 generator of GNU Scientific Library [13]. Recall that a move is either placing an item at a free location or replacing it with other item. In Figure 1 we give a comparison of the total number of moves (averaged over 100 random instances) performed by local search and random walk methods for k = 3 and k = 4. Figure 2 compares the maximum number of moves (averaged over 100 random instances) for a single insertion performed by local search and random 15 walk methods. Figure 3 shows a comparison when the number of items are fixed and density (ratio of number of items to that of locations) approaches the threshold density. Note that the time required to obtain an allocation by random walk or local search methods is directly proportional to the number of moves performed. 5e+07 8e+07 7e+07 Total number of moves Total number of moves 4.5e+07 4e+07 3.5e+07 LSA RW 3e+07 2.5e+07 2e+07 1.5e+07 1e+07 6e+07 5e+07 4e+07 LSA RW 3e+07 2e+07 1e+07 5e+06 0 0 1e+06 2e+06 3e+06 4e+06 5e+06 1e+06 Number of bins 2e+06 3e+06 4e+06 5e+06 Number of bins (a) k = 3, c = 0.90 (c∗3 ≈ 0.917) (b) k = 4, c = 0.97 (c∗4 ≈ 0.976) Figure 1: Comparison of total number of moves performed by local search and random walk methods. 9000 Maximum number of moves Maximum number of moves 3500 3000 2500 2000 LSA RW 1500 1000 500 0 8000 7000 6000 5000 LSA RW 4000 3000 2000 1000 0 1e+06 2e+06 3e+06 4e+06 5e+06 1e+06 Number of bins 2e+06 3e+06 4e+06 5e+06 Number of bins (a) k = 3, c = 0.90 (c∗3 ≈ 0.917). (b) k = 4, c = 0.97 (c∗4 ≈ 0.976). Figure 2: Comparison of maximum number of moves performed by local search and random walk methods We also consider the case when each location can hold more than one item. To adapt LSA for this setting we make a small change, i.e., the label of a vertex (location) stays 0 until it is fully filled. Algorithm 2 gives the modified procedure for the general location capacities. Here Items(v) gives the number of items already placed in v. Let the location capacity or maximum load allowed be s. Figure 4 suggests that the total number of moves are linear in the number of locations for the 16 10000 Maximum number of moves 1e+07 Total Allocation Time 1e+06 100000 10000 1000 LSA RW 100 10 1000 LSA RW 100 10 1 0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.1 0.2 c 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 c (a) k = 3, c ≤ 0.915 (c∗3 ≈ 0.917) (b) k = 3, c ≤ 0.915 (c∗3 ≈ 0.917) Figure 3: Comparison of total number of moves and maximum number of moves (for fixed number of locations, n = 105 ) performed by local search and random walk methods when density c approaches c∗k . 4e+07 Total number of moves 3.5e+07 3e+07 2.5e+07 2e+07 k=3, s=3 k=3, s=2 k=4, s=2 1.5e+07 1e+07 5e+06 0 1e+06 2e+06 3e+06 4e+06 5e+06 Number of bins Figure 4: Total number of moves for the case where bin capacities (maximum load, s) is greater than 1. cases k = 3, 4 where the maximum location capacity is greater than 1. We remark that local search allocation has some additional cost, i.e., the extra space required to store the labels. Though this space is 17 Algorithm 2 AssignItem (x, L, T) 1: Choose an item v among the k choices of x with minimum label L(v). 2: if (L(v) >= n − 1) then 3: EXIT BAllocation does not exist 4: else 5: if (Items(v) > s − 1) then 6: L(v) ← 1 + min (L(u)|u 6= v and u ∈ x) 7: if (Items(v) == s) then 8: Choose an item (call it b) randomly from the s items in v 9: y←b BMove that replaces an item 10: Place x in v 11: CALL AssignItem(y, L, T) 12: else 13: Place x in v BMove that places an item O(n), local search allocation is still useful for the applications where the size of objects (representing the items) to be allocated is much larger than the labels which are integers. Moreover, with high probability, the maximum label of any vertex is O(log n). Many integer compression methods [21] have been proposed for compressing small integers and can be potentially useful in our setting for further optimizations. Also in most of the load balancing problems, the speed of finding an assignment is a much desired and the most important requirement. LSA Maximum Number of Moves Wall-clock times Result Size 1 2 4 5 10 50 100 1000 10,000 100,000 n 12 12 12 16 15 15 15 15 27 136 1,887 1,029,449 1,080,006 1,082,199 1,082,214 1,082,214 1,082,214 1,082,214 1,082,214 1,082,214 1,082,214 1,082,214 12,605 1,082,214 Hopcroft-Karp Table 1: Performance of LSA on Delicious dataset. Time is measured in seconds. 18 3.2 Performance on Real-world graphs Next, we compare our runtime performance to the optimal algorithm proposed by Hopcroft et al. [14]. In this experiment we want to study the effect of number of allowable moves on (a) the actual wall-clock times , (b) the result quality in terms of the size, or number of edges, of the final matching produced (refer Figure 1). We selected the following representative realworld dataset for our experiments: • Delicious dataset : The Delicious dataset spans nine years from 2003 to 2011 and contain about 340 mio. bookmarks, 119 mio. unique URLs, 15 mio. tags and 2 mio. users [22]. Each bookmarked URL is time stamped and tagged with word descriptors. The nodes in one of the sets are URLs and in the other are its corresponding bookmarks. We first observe that the optimal result in the Delicious dataset, i.e. 1,082,214, is already obtained when the limit on the allowable moves is only 5. We are of course sure about the optimality of the procedure when the maximum allowable moves is set to n and that already is 10x improvement over the time taken by Hopcroft-Karp algorithm. For lower allowable limits of 5 and 10 the performance improvements are almost 1000x. Interestingly, as we increase the limit on the allowable moves to place any item (match any edge), the runtime does not change showing that only a small of defections are sufficient to arrive at an optimal result. However, at higher limits, indeed other permutations are explored (in this case unsuccesfully) resulting in increased runtimes. The stopping creteria unlinke in case of perfect matchings cannot be predetermined in general. In future we plan to devise methodology to stop the algorithm when the maximum matching is retrieved. In any case when the limit is set to n, that would guarantee optimality, we still perform an order of magnitude faster than the optimal algorithm of Hopcroft-Karp. 4 Conclusions and Outlook In this article, we proposed and analysed an insertion algorithm, the Local Search Allocation algorithm, for cuckoo hashing that runs in linear time with high probability and in expectation. Our algorithm, unlike existing random walk based insertion methods, always terminates and finds an assignment (with probability 1) whenever it exists. We also obtained a linear time algorithm for finding perfect matchings in a general large bipartite graphs. We conducted extensive experiments to validate our theoretical findings and report an order of magnitude improvement in the number of moves required for allocations as compared to the random walk 19 based insertion approach. Secondly, we considered a real world social bookmarking graph dataset to evaluate the performance of our bipartite graph matching algorithm. We observe an order of magnitude improvement when the maximum allowable number of moves is set to n, but more interestingly we observe that the optimal solution is already reached at a small allowable limit of 5 with a substantial performance improvement of almost three orders of magnitude over Hopcroft-Karp algorithm. It should be noted that although the space complexity for label maintenance is O(n), the number of bits required to encode each label is logarithmic in the maximum allowable moves. This allows compact representations of these labels in memory even without using integer encoding schemes that might further improve memory footprints while storing small integer ranges. In the future we would like to consider other generalized variants of graph matching problems using such a label propagtion scheme. Also interesting to investigate is the impact of graph properties like diameter, clustering coefficients etc. on the only parameter in our algorithm, i.e., maximum allowable moves. This would go a long way in automatic parameterization of LSA. References [1] Y. Arbitman, M. Naor, and G. Segev. De-amortized cuckoo hashing: Provable worst-case performance and experimental results. In Proceedings of the 36th International Colloquium on Automata, Languages and Programming: Part I, ICALP ’09, pages 107–118, 2009. [2] M. Aumüller, M. Dietzfelbinger, and P. Woelfel. A Simple Hash Class with Strong Randomness Properties in Graphs and Hypergraphs. ArXiv e-prints, October 2016. [3] J. A. Cain, P. Sanders, and N. Wormald. The random graph threshold for k-orientiability and a fast algorithm for optimal multiple-choice allocation. In Proceedings of the 18th annual ACM-SIAM symposium on Discrete algorithms (SODA 2007), pages 469–476, 2007. [4] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. The MIT Press, 3rd edition, 2009. [5] A. Czumaj and V. Stemann. Randomized allocation processes. Random Structures & Algorithms, 18(4):297–331, 2001. [6] M. Dietzfelbinger and U. Schellbach. On risks of using cuckoo hashing with simple universal hash classes. In Proceedings of 20 [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] the twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’09, pages 795–804, 2009. D. Fernholz and V. Ramachandran. The k-orientability thresholds for Gn,p . In Proceedings of the 18th annual ACM-SIAM symposium on Discrete algorithms (SODA 2007), pages 459–468, 2007. D. Fotakis, R. Pagh, P. Sanders, and P. Spirakis. Space efficient hash tables with worst case constant access time. In STACS ’03, volume 2607 of Lecture Notes in Computer Science, pages 271– 282. 2003. N. Fountoulakis and K. Panagiotou. Sharp load thresholds for cuckoo hashing. Random Structures & Algorithms, 41(3):306–333, 2012. N. Fountoulakis, K. Panagiotou, and A. Steger. On the insertion time of cuckoo hashing. CoRR, abs/1006.1231, 2010. A. Frieze and P. Melsted. Maximum matchings in random bipartite graphs and the space utilization of cuckoo hash tables. Random Structures & Algorithms, 41(3):334–364, 2012. A. Frieze, P. Melsted, and M. Mitzenmacher. An analysis of random-walk cuckoo hashing. SIAM Journal on Computing, 40(2):291–308, 2011. M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, M. Booth, and F. Rossi. Gnu scientific library reference manual. URL:http://www. gnu. org/software/gsl, 2003. John E Hopcroft and Richard M Karp. An nˆ5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on computing, 2(4):225–231, 1973. M. Khosla. Balls into bins made faster. In Algorithms–ESA 2013, volume 8125 of Lecture Notes in Computer Science, pages 601– 612. 2013. A. Kirsch, M. Mitzenmacher, and U. Wieder. More robust hashing: Cuckoo hashing with a stash. SIAM J. Comput., 39(4):1543– 1561, December 2009. M. Lelarge. A new approach to the orientation of random hypergraphs. In Proceedings of the Twenty-Third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’12, pages 251–264, 2012. M. Mitzenmacher and S. Vadhan. Why simple hash functions work: exploiting the entropy in a data stream. In Proceedings of the nineteenth annual ACM-SIAM symposium on Discrete algorithms, SODA ’08, pages 746–755, 2008. R. Pagh and F. F. Rodler. Cuckoo hashing. In ESA ’01, pages 121–133, 2001. 21 [20] P. Sanders, S. Egner, and J. Korst. Fast concurrent access to parallel disks. In Proceedings of the 11th annual ACM-SIAM Symposium on Discrete Algorithms (SODA 1999), pages 849–858, 1999. [21] B. Schlegel, R. Gemulla, and W. Lehner. Fast integer compression using simd instructions. In Workshop on Data Management on New Hardware (DaMoN 2010), pages 34–40, 2010. [22] Arkaitz Zubiaga, Victor Fresno, Raquel Martinez, and Alberto Perez Garcia-Plaza. Harnessing folksonomies to produce a social classification of resources. IEEE transactions on knowledge and data engineering, 25(8):1801–1813, 2013. 22
8cs.DS
arXiv:1605.04832v2 [math.AC] 1 Jan 2018 Henri Lombardi & Claude Quitté Commutative algebra: Constructive methods Finite projective modules Course and exercises English translation by Tania K. Roblot Last corrections December 2017, see page viii Henri Lombardi. Maître de Conférences at the Université de FrancheComté. His research focuses on constructive mathematics, real algebra and algorithmic complexity. He is one of the founders of the international group M.A.P. (Mathematics, Algorithms, Proofs), created in 2003: see the site http://map.disi.unige.it/ [email protected] http://hlombardi.free.fr Claude Quitté. Maître de Conférences at the Université de Poitiers. His research focuses on effective commutative algebra and computer algebra. [email protected] Mathematics Subject Classification (2010) – Primary: 13 Commutative Algebra. – Secondary: 03F Proof theory and constructive mathematics. 06D Distributive lattices. 14Q Computational aspects of algebraic geometry. to James Brewer Preface of the French edition This book is an introductory course to basic commutative algebra with a particular emphasis on finitely generated projective modules, which constitutes the algebraic version of the vector bundles in differential geometry. We adopt the constructive point of view, with which all existence theorems have an explicit algorithmic content. In particular, when a theorem affirms the existence of an object – the solution of a problem – a construction algorithm of the object can always be extracted from the given proof. We revisit with a new and often simplifying eye several abstract classical theories. In particular, we review theories which did not have any algorithmic content in their general natural framework, such as Galois theory, the Dedekind rings, the finitely generated projective modules or the Krull dimension. Constructive algebra is actually an old discipline, developed among others by Gauss and Kronecker. We are in line with the modern “bible” on the subject, which is the book by Ray Mines, Fred Richman and Wim Ruitenburg, A Course in Constructive Algebra, published in 1988. We will cite it in abbreviated form [MRR]. This work corresponds to an MSc graduate level, at least up to Chapter XIV, but only requires as prerequisites the basic notions concerning group theory, linear algebra over fields, determinants, modules over commutative rings, as well as the definition of quotient and localized rings. A familiarity with polynomial rings, the arithmetic properties of Z and Euclidian rings is also desirable. Finally, note that we consider the exercises and problems (a little over 320 in total) as an essential part of the book. We will try to publish the maximum amount of missing solutions, as well as additional exercises on the web page of one of the authors: http://hlombardi.free.fr/publis/LivresBrochures.html –v– vi Preface Acknowledgements. We would like to thank all the colleagues who encouraged us in our project, gave us some truly helpful assistance or provided us with valuable information. Especially MariEmi Alonso, Thierry Coquand, Gema Díaz-Toca, Lionel Ducos, M’hammed El Kahoui, Marco Fontana, Sarah Glaz, Laureano González-Vega, Emmanuel Hallouin, Hervé Perdry, Jean-Claude Raoult, Fred Richman, Marie-Françoise Roy, Peter Schuster and Ihsen Yengui. Last but not least, a special mention for our LATEX expert, François Pétiard. Finally, we could not forget to mention the Centre International de Recherches Mathématiques à Luminy and the Mathematisches Forschungsinstitut Oberwolfach, who welcomed us for research visits during the preparation of this book, offering us invaluable working conditions. Henri Lombardi, Claude Quitté August 2011 Preface of the English edition In this edition, we have corrected the errors that we either found ourselves or that were signalled to us. We have added some exercise solutions as well as some additional content. Most of that additional content is corrections of exercises, or new exercises or problems. The additions within the course are the following. A paragraph on the null tensors added as the end of Section IV -4. The paragraph on the quotients of flat modules at the end of Section VIII -1 has been fleshed out. We have added Sections 8 and 9 in Chapter XV devoted to the local-global principles. None of the numbering has changed, except for the local-global principle XII-7.13 which has become XII -7.14. There are now 297 exercises and 42 problems. Any useful precisions are on the site: http://hlombardi.free.fr/publis/LivresBrochures.html Acknowledgements. We cannot thank Tania K. Roblot enough for the work achieved translating the book into English. Henri Lombardi, Claude Quitté May 2014 – vii – viii Preface This is the web updated version of the book Except for the corrections indicated below, it is the same text as the one of the printed book. The unique structural modifications concern the table of contents: the general table of contents is shortened, and there is a detailed table of contents at the beginning of each chapter. Corrections to the printed book (december 2017) Solution of Problem 3 in Chapter XII: page 733 replace “all nonzero” by “not all zero”. Chapter XIII. Exercise 17 item 3. The solution is changed. In Section XV-9, the proof of Lemma 9.3 is not correct. It is necessary to give directly a proof of the (a, b, (ab)) trick for depth 2, allowing us to prove the concrete local-global principle. So 9.3, 9.4, 9.5 and 9.6 become 9.6, 9.3, 9.4 and 9.5. More details on http://hlombardi.free.fr/publis/LivresBrochures. html Contents Foreword xv I Examples Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Vector bundles on a smooth compact manifold . . . . . . . . . . . 2 Differential forms on a smooth affine manifold . . . . . . . . . . . II The basic local-global principle and systems of tions Introduction . . . . . . . . . . . . . . . . . . . . . . . 1 Some facts concerning localizations . . . . . . . . . . 2 The basic local-global principle . . . . . . . . . . . . . 3 Coherent rings and modules . . . . . . . . . . . . . . 4 Fundamental systems of orthogonal idempotents . . . 5 A little exterior algebra . . . . . . . . . . . . . . . . . 6 Basic local-global principle for modules . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . III The method of undetermined coefficients Introduction . . . . . . . . . . . . . . . . . . . 1 Polynomial rings . . . . . . . . . . . . . . . . . 2 Dedekind-Mertens lemma . . . . . . . . . . . . 3 One of Kronecker’s theorems . . . . . . . . . . 4 The universal splitting algebra (1) . . . . . . . 5 Discriminant, diagonalization . . . . . . . . . . 6 Basic Galois theory (1) . . . . . . . . . . . . . 7 The resultant . . . . . . . . . . . . . . . . . . . 8 Algebraic number theory, first steps . . . . . . 9 Hilbert’s Nullstellensatz . . . . . . . . . . . . . 10 Newton’s method in algebra . . . . . . . . . . – ix – . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 9 linear equa. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 18 21 29 36 39 60 64 79 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 84 89 91 95 98 105 116 124 137 145 x Contents Exercises and problems . . . . . . . . . . . . . . . . . . . . . . . . 148 Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . 176 IV Finitely presented modules Introduction . . . . . . . . . . . . . . . . . 1 Definition, changing generator set . . . . . 2 Finitely presented ideals . . . . . . . . . . 3 The category of finitely presented modules 4 Stability properties . . . . . . . . . . . . . 5 Classification problems . . . . . . . . . . . 6 Quasi-integral rings . . . . . . . . . . . . . 7 Bézout rings . . . . . . . . . . . . . . . . . 8 Zero-dimensional rings . . . . . . . . . . . 9 Fitting ideals . . . . . . . . . . . . . . . . 10 Resultant ideal . . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 179 183 188 190 200 202 206 209 219 222 224 241 V Finitely generated projective modules, 1 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 On zero-dimensional rings . . . . . . . . . . . . . . . . . . . 4 Stably free modules . . . . . . . . . . . . . . . . . . . . . . 5 Natural constructions . . . . . . . . . . . . . . . . . . . . . 6 Local structure theorem . . . . . . . . . . . . . . . . . . . . 7 Locally cyclic projective modules . . . . . . . . . . . . . . . 8 Determinant, fundamental polynomial and rank polynomial 9 Properties of finite character . . . . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 245 253 255 259 261 262 269 279 282 296 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 301 310 312 324 327 334 346 363 380 VI Strictly finite algebras and Galois algebras Introduction . . . . . . . . . . . . . . . . . . . . 1 Étale algebras over a discrete field . . . . . . . . 2 Basic Galois theory (2) . . . . . . . . . . . . . . 3 Finitely presented algebras . . . . . . . . . . . . 4 Strictly finite algebras . . . . . . . . . . . . . . . 5 Dualizing linear forms, strictly finite algebras . 6 Separable algebras . . . . . . . . . . . . . . . . . 7 Galois algebras, general theory . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Contents xi VII The dynamic method Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 The Nullstellensatz without algebraic closure . . . . . . . . . 2 The dynamic method . . . . . . . . . . . . . . . . . . . . . . 3 Introduction to Boolean algebras . . . . . . . . . . . . . . . 4 The universal splitting algebra (2) . . . . . . . . . . . . . . . 5 Splitting field of a polynomial over a discrete field . . . . . . 6 Galois theory of a separable polynomial over a discrete field Exercises and problems . . . . . . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . VIII Flat modules Introduction . . . . . . . . . . 1 First properties . . . . . . . . 2 Finitely generated flat modules 3 Flat principal ideals . . . . . . 4 Finitely generated flat ideals . 5 Flat algebras . . . . . . . . . . 6 Faithfully flat algebras . . . . Exercises and problems . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384 386 394 397 404 416 419 428 440 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 444 453 456 458 462 466 471 483 IX Local rings, or just about 1 A few constructive definitions . . . . . . . . 2 Four important lemmas . . . . . . . . . . . . 3 Localization at 1 + a . . . . . . . . . . . . . . 4 Examples of local rings in algebraic geometry 5 Decomposable rings . . . . . . . . . . . . . . 6 Local-global rings . . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 491 495 498 509 511 521 530 . . . free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 534 535 542 546 551 566 576 580 614 X Finitely generated projective modules, 2 Introduction . . . . . . . . . . . . . . . . . . . . . . 1 The finitely generated projective modules are locally 2 The ring of generalized ranks H0 (A) . . . . . . . . . 3 Some applications of the local structure theorem . . 4 Grassmannians . . . . . . . . . . . . . . . . . . . . . 5 Grothendieck and Picard groups . . . . . . . . . . . 6 Identification of points on the affine line . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . xii XI Distributive lattices, lattice-groups Introduction . . . . . . . . . . . . . . . . 1 Distributive lattices and Boolean algebras 2 Lattice-groups . . . . . . . . . . . . . . . 3 GCD-monoids, GCD-domains . . . . . . 4 Zariski lattice of a commutative ring . . . 5 Entailment relations . . . . . . . . . . . . Exercises and problems . . . . . . . . . . Bibliographic comments . . . . . . . . . . Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 616 617 624 635 641 654 659 674 XII Prüfer and Dedekind rings Introduction . . . . . . . . . . . . . . . . . 1 Arithmetic rings . . . . . . . . . . . . . . . 2 Integral elements and localization . . . . . 3 Prüfer rings . . . . . . . . . . . . . . . . . 4 Coherent Prüfer rings . . . . . . . . . . . . 5 pp-rings of dimension at most 1 . . . . . . 6 Coherent Prüfer rings of dimension at most 7 Factorization of finitely generated ideals . Exercises and problems . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 678 679 686 689 695 701 704 708 713 740 XIII Krull dimension Introduction . . . . . . . . . . . . . . . . . . . . . . 1 Spectral spaces . . . . . . . . . . . . . . . . . . . . . 2 A constructive definition . . . . . . . . . . . . . . . 3 A few elementary properties of the Krull dimension 4 Integral extensions . . . . . . . . . . . . . . . . . . . 5 Dimension of geometric rings . . . . . . . . . . . . . 6 Krull dimension of distributive lattices . . . . . . . 7 Dimension of morphisms . . . . . . . . . . . . . . . 8 Valuative dimension . . . . . . . . . . . . . . . . . . 9 Lying Over, Going Up and Going Down . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 744 744 747 757 760 761 763 766 774 782 787 802 Contents xiii XIV The number of generators of a module Introduction . . . . . . . . . . . . . . . . . . . . 1 Kronecker’s theorem and Bass’ stable range . . . 2 Heitmann dimension and Bass’ theorem . . . . . 3 Serre’s Splitting Off and Forster-Swan theorems 4 Supports and n-stability . . . . . . . . . . . . . 5 Elementary column operations . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 806 806 810 814 823 831 834 840 XV The local-global principle Introduction . . . . . . . . . . . . . . . . . . . 1 Comaximal monoids, coverings . . . . . . . . . 2 A few concrete local-global principles . . . . . 3 A few abstract local-global principles . . . . . 4 Concrete patching of objects . . . . . . . . . . 5 The basic constructive local-global machinery . 6 Quotienting by all the maximal ideals . . . . 7 Localizing at all the minimal prime ideals . . . 8 Local-global principles in depth 1 . . . . . . . 9 Local-global principles in depth 2 . . . . . . . Exercises and problems . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 844 845 848 853 857 867 872 877 878 881 888 895 . . . . . . . . . . . . . . . . . . rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898 898 900 908 912 916 925 936 937 941 XVI Extended projective modules Introduction . . . . . . . . . . . . . . . . . . 1 Extended modules . . . . . . . . . . . . . . . 2 The Traverso-Swan’s theorem . . . . . . . . . 3 Patching à la Quillen-Vaserstein . . . . . . . 4 Horrocks’ theorem . . . . . . . . . . . . . . . 5 Solution to Serre’s problem . . . . . . . . . . 6 Projective modules extended from arithmetic Conclusion: a few conjectures . . . . . . . . Exercises and problems . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . xiv Contents XVII Suslin’s stability theorem Introduction . . . . . . . . . . . . . . . . 1 The elementary group . . . . . . . . . . . 2 The Mennicke symbol . . . . . . . . . . . 3 Unimodular polynomial vectors . . . . . 4 Suslin’s and Rao’s local-global principles Exercises and problems . . . . . . . . . . Bibliographic comments . . . . . . . . . . Annex. Constructive logic Introduction . . . . . . . . . . 1 Basic objects, Sets, Functions . 2 Asserting means proving . . . 3 Connectives and quantifiers . . 4 Mechanical computations . . . 5 Principles of omniscience . . . 6 Problematic principles . . . . . Exercises and problems . . . . Bibliographic comments . . . . Tables of theorems Bibliography Index of notation Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 943 944 947 949 951 954 958 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 960 960 965 966 968 969 973 975 975 977 987 1005 1013 Foreword Quant à moi, je proposerais de s’en tenir aux règles suivantes: 1. Ne jamais envisager que des objets susceptibles d’être définis en un nombre fini de mots; 2. Ne jamais perdre de vue que toute proposition sur l’infini doit être la traduction, l’énoncé abrégé de propositions sur le fini; 3. Éviter les classifications et les définitions non prédicatives. Henri Poincaré, dans La logique de l’infini (Revue de Métaphysique et de Morale, 1909). Réédité dans Dernières pensées, Flammarion.1 This book is an introductory course to basic commutative algebra with a particular emphasis on finitely generated projective modules, which constitutes the algebraic version of the vector bundles in differential geometry. As indicated in the preface, we adopt the constructive method, with which all existence theorems have an explicit algorithmic content. Constructive mathematics can be seen as the most theoretical branch of Computer Algebra, which handles mathematics which “run on a computer.” Our course is nevertheless distinguishable from usual Computer Algebra courses in two key aspects. First of all, our algorithms are often only implied, underlying the proof, and are in no way optimized for the fastest execution, as one might expect when aiming for an efficient implementation. Second, our theoretical approach is entirely constructive, whereas Computer Algebra courses typically have little concern for this issue. The philosophy here is then not, as is customary “black or white, the good cat is one that catches the mouse”2 but rather follows “Truth includes not only the result 1 The official translation by John W. Bolduc (1963) is as follows: “As for me, I would propose that we be guided by the following rules: 1. Never consider any objects but those capable of being defined in a finite number of words; 2. Never lose sight of the fact that every proposition concerning infinity must be the translation, the precise statement of propositions concerning the finite; 3. Avoid nonpredicative classifications and definitions.” 2 Chinese proverb. – xv – xvi Foreword but also the path to it. The investigation of truth must itself be true; true investigation is developed truth, the dispersed elements of which are brought together in the result.”3 We often speak of two points of view on a given subject: classical and constructive. In particular, we have marked with a star the statements (theorems, lemmas, . . . ) which are true in classical mathematics, but for which we do not give a constructive proof and which often cannot have one. These “starred” statements will then likely never be implemented on a machine, but are often useful as intuition guides, and to at least link with the usual presentations written in the style of classical mathematics. As for the definitions, we generally first give a constructive variant, even if it means showing the equivalence with the usual definition in the context of classical mathematics. The reader will notice that in the “starred” proofs we freely use Zorn’s lemma and the Law of Excluded Middle (LEM)4 , whereas the other proofs always have a direct translation into an algorithm. Constructive algebra is actually an old discipline, developed by Gauss and Kronecker, among others. As also specified in the preface, we are in line with the modern “bible” on the subject, which is the book by Ray Mines, Fred Richman and Wim Ruitenburg, A Course in Constructive Algebra, published in 1988. We will cite it in abbreviated form [MRR]. Our work is however self-contained and we do not demand [MRR] as a prerequisite. The books on constructive mathematics by Harold M. Edwards [Edwards89, Edwards05] and the one of Ihsen Yengui [Yengui] are also recommended. The work’s content We begin with a brief commentary on the choices that have been made regarding the covered themes. The theory of finitely generated projective modules is one of the unifying themes of this work. We see this theory in abstract form as an algebraic theory of vector bundles, and in concrete form as that of idempotent matrices. The comparison of the two views is sketched in the introductory chapter. The theory of finitely generated projective modules itself is treated in Chapters V (first properties), VI (algebras which are finitely generated 3 Karl Marx, Comments on the latest Prussian censorship instruction, 1843 (cited by Georges Perec in Les Choses); transcribed here as by Sally Ryan on http://www. marxists.org/archive/marx/works/1842/02/10.htm. 4 The Law of the Excluded Middle states that P ∨ ¬P is true for every proposition P . This principle is accepted in classical mathematics. See page xxvii for a first explanation regarding the refusal of LEM in constructive mathematics. Foreword xvii projective modules), X (rank theory and examples), XIV (Serre’s Splitting Off theorem) and XVI (extended finitely generated projective modules). Another unifying theme is provided by local-global principles, as in [Kunz] for example. It is a highly efficient conceptual framework, even though it is a little vague. From a constructive point of view, we replace the localization at an arbitrary prime ideal with a finite number of localizations at comaximal monoids. The notions which respect the local-global principle are considered “good notions,” in the sense that they are ready for the passage of commutative rings to Grothendieck schemes, which we will unfortunately be unable to address due to the restricted size of this book. Finally, one last recurrent theme is found in the method, quite common in computer algebra, called the lazy evaluation, or in its most advanced form, the dynamic evaluation method. This method is necessary if one wants to set up an algorithmic processing of the questions which a priori require the solution to a factorization problem. This method has also led to the development of the local-global constructive machinery found in Chapters IV and XV, as well as the constructive theory of the Krull dimension (Chapter XIII), with important applications in the last chapters. We now proceed to a more detailed description of the contents of the book. In Chapter I, we explain the close relationship that can be established between the notions of vector bundles in differential geometry and of finitely generated projective modules in commutative algebra. This is part of the general algebraization process in mathematics, a process that can often simplify, abstract and generalize surprisingly well concepts from particular theories. Chapter II is devoted to systems of linear equations over a commutative ring, treated as elementary. It requires almost no theoretical apparatus, apart from the question of localization at a monoid, of which we give a reminder in Section II -1. We then get to our subject matter by putting in place the concrete local-global principle for solving systems of linear equations (Section II -2), a simple and effective tool that will be repeated and varied constantly. From a constructive point of view, solving systems of linear equations immediately renders as central the concept of coherent rings that we treat in Section II -3. Coherent rings are those for which we have a minimal grip on the solution of homogeneous systems of linear equations. Very surprisingly, this concept does not appear in the classical commutative algebra treatises. That is because in general the concept is completely obscured by that of a Noetherian ring. This obscuration does not occur in constructive mathematics where Noetherianity does not necessarily imply coherence. We develop in Section II -4 the question of finite products of rings, with the notion of a fundamental system of orthogonal idempotents xviii Foreword and the Chinese Remainder theorem. The long Section II -5 is devoted to many variations on the theme of determinants. Finally, Section II -6 returns to the basic local-global principle in a slightly more general version devoted to exact sequences of modules. Chapter III develops the method of indeterminate coefficients, first developed by Gauss. Numerous theorems of existence in commutative algebra rely on “algebraic identities under conditions” and thus on memberships g ∈ hf1 , . . . , fs i in a ring Z[c1 , . . . , cr , X1 , . . . , Xn ], where the Xi ’s are the variables and the cj ’s are the parameters of the theorem under consideration. In this sense, we can consider that commutative algebra is a vast theory of algebraic identities, which finds its natural framework in the method of indeterminate coefficients, i.e. the method in which the parameters of the given problem are taken as indeterminates. In that assurance we are, to the extent our powers allow to, systematically “chasing algebraic identities.” This is the case not only in the “purely computational” Chapters II and III, but throughout the book. In short, rather than simply assert in the context of an existence theorem “there is an algebraic identity which certifies this existence,” we have tried each time to give the algebraic identity itself. Chapter III can be considered as a basic algebra course with 19th century methods. Sections III -1, III -2 and III -3 provide certain generalities about polynomials, featuring in particular the algorithm for partial factorization, the “theory of algebraic identities” (which explains the method of indeterminate coefficients), the elementary symmetric polynomials, the Dedekind-Mertens lemma and the Kronecker’s theorem. The last two results are basic tools which give precise information on the coefficients of the product of two polynomials; they are often used in the rest of this manuscript. Section III -4 introduces the universal splitting algebra of a monic polynomial over an arbitrary commutative ring, which is an efficient substitute for the field of the roots of a polynomial over a field. Section III -5 is devoted to the discriminant and explains in what precise sense a generic matrix is diagonalizable. With these tools in hand, we can treat the basic Galois theory in Section III -6. The elementary theory of elimination via the resultant is given in Section III -7. We can then give the basics of algebraic number theory with the theorem of unique decomposition into prime factors for a finitely generated ideal of a number field (Section III -8). Section III -9 shows Hilbert’s Nullstellensatz as an application of the resultant. Finally, Section III -10 on Newton’s method in algebra closes this chapter. Chapter IV is devoted to the study of the elementary properties of finitely presented modules. These modules play a role for rings similar to that played by finite dimensional vector spaces for fields: the theory of finitely presented modules is a more abstract, and often profitable, way to address Foreword xix the issue of systems of linear equations. Sections IV -1 to IV -4 show the basic stability properties as well as the important example of the ideal of a zero for a polynomial system (on an arbitrary commutative ring). We then focus on the classification problem of finitely presented modules over a given ring. Working towards principal ideal domains (PID), for which the classification problem is completely solved (Section IV -7), we will encounter pp-rings (Section IV -6), which are the rings where the annihilator of an element is always generated by an idempotent. This will be the opportunity to develop an elementary local-global machinery which conveniently reformulates a constructively established result for integral rings into the analogous result for pp-rings. This proof-rewriting machinery is elementary as it is founded on the decomposition of a ring into a finite product of rings. The interesting thing is that this decomposition is obtained via a rereading of the constructive proof written in the integral case; here we see that in constructive mathematics the proof is often even more important than the result. Similarly, we have an elementary local-global machinery which conveniently reformulates a constructively established result for discrete fields into the analogous result for reduced zero-dimensional rings (Section IV -8). The zero-dimensional rings elementarily defined here constitute an important intermediate step to generalize specific results regarding discrete fields to arbitrary commutative rings: they are a key tool of commutative algebra. Classically, these appear in the literature in their Noetherian form, i.e. that of Artinian rings. Section IV -9 introduces very important invariants: the Fitting ideals of a finitely presented module. Finally, Section IV -10 applies this notion to introduce the resultant ideal of a finitely generated ideal over a polynomial ring when the ideal contains a monic polynomial, and to prove a theorem of algebraic elimination over an arbitrary ring. Chapter V is a first approach to the theory of finitely generated projective modules. Sections V -2 to V -5 state basic properties along with the important example of the zero-dimensional rings. Section V -6 states the local structure theorem: a module is finitely generated projective if and only if it becomes free after localization at suitable comaximal elements. Its constructive proof is a rereading of a result established in Chapter II for “well conditioned” systems of linear equations (Theorem II -5.26). Section V -7 develops the example of the locally cyclic projective modules. Section V -8 introduces the determinant of an endomorphism of a finitely generated projective module. This renders the decomposition of such a module into a direct sum of its components of constant rank accessible. Finally, Section V -9, which we were not too sure where to place in this work, hosts some additional considerations on properties of finite character, a concept introduced in Chapter II to discuss the connections between concrete local-global principles and abstract local-global principles. xx Foreword Chapter VI is essentially devoted to algebras which are finitely generated projective modules over their base rings. We call these strictly finite algebras. When applied to commutative rings, they constitute a natural generalization of the concept of a finite algebra over a field. The icing on the cake being the important case of Galois algebras, which generalize Galoisian extensions of discrete fields to commutative rings. Section VI -1 treats the case where a base ring is a discrete field. It provides the constructive versions of the structure theorem obtained in classical mathematics. The case of étale algebras (when the discriminant is invertible) is particularly enlightening. We discover that the classical theorems always implicitly assume that we know how to factorize the separable polynomials over the base field. The constructive proof of the primitive element theorem VI-1.9 is significant for its deviation from the classical proof. Section VI -2 applies the previous results to complete the basic Galois theory started in Section III -6 by characterizing the Galoisian extensions of discrete fields like the étale and normal extensions. Section VI -3 is a brief introduction to finitely presented algebras, by focusing on integral algebras5 , with a weak Nullstellensatz and the Lying Over lemma. Section VI -4 introduces strictly finite algebras over an arbitrary ring. In Sections VI -5 and VI -6, the related concepts of a strictly étale algebra and of a separable algebra are introduced. These generalize the concept of an étale algebra over a discrete field. In Section VI -7, we constructively present the basics of the theory of Galois algebras for commutative rings. It is in fact an Artin-Galois theory since it adopts the approach Artin had developed for the case of fields, starting directly from a finite group of automorphisms of a field, the base field appearing only as a byproduct of subsequent constructions. In Chapter VII, the dynamic method – a cornerstone of modern methods in constructive algebra – is implemented to deal with the field of roots of a polynomial and the Galois theory in the separable case. From a constructive point of view, we need to use the dynamic method when we do not know how to factorize the polynomials over the base field. For training purposes, Section VII -1 begins by establishing results in a constructive form for the Nullstellensatz when we do not know how to factorize the polynomials over the base field. General considerations on the dynamic method are developed in Section VII -2. More details on the course of the festivities are given in the introduction of the chapter. Chapter VIII is a brief introduction to flat modules and to flat and faithfully flat algebras. Intuitively speaking, an A-algebra B is flat when the homogeneous systems of linear equations over A have “no more” solutions 5 By “integral algebra” we mean an algebra that is integral on its base ring, not to be confused with an algebra that is an integral ring. Foreword xxi in B than in A, and it is faithfully flat if this statement is also true for nonhomogeneous systems of linear equations. These crucial notions of commutative algebra were introduced by Serre in [168, GAGA,1956]. We will only state the truly fundamental results. This is also when we will introduce the concepts of a pf-ring (i.e. a ring whose principal ideals are flat), of a torsion-free module (for an arbitrary ring), of an arithmetic ring and of a Prüfer ring. As always, we focus on the local-global principle when it applies. Chapter IX discusses local rings and some generalizations. Section IX -1 introduces the constructive terminology for some common classical concepts, including the important concept of a Jacobson radical. A related concept is that of a residually zero-dimensional ring (a ring A such that A/ Rad A is zero-dimensional). It is a robust concept, which never uses maximal ideals, and most of the theorems in the literature regarding semi-local rings (in classical mathematics they are the rings which only have a finite number of maximal ideals) apply to residually zero-dimensional rings. Section IX -2 lists some results which show that on a local ring we reduce the solution of particular problems to the case of fields. Sections IX -3 and IX -4 establish, based on geometric examples (i.e. regarding the study of polynomial systems), a link between the notion of a local study in the topological intuitive sense and the study of certain localizations of rings (in the case of polynomial systems over a discrete field these localizations are local rings). In particular we introduce the notions of tangent and cotangent spaces at zero of a polynomial system. Section IX -5 is a brief study of decomposable rings, including the particular case from classical mathematics of decomposed rings (finite products of local rings), which play an important role in the theory of Henselian local rings. Finally, Section IX -6 treats the notion of a local-global ring, which generalizes both the concept of local rings and that of zero-dimensional rings. These rings verify very strong local-global properties; e.g. the projective modules of constant rank are always free. Moreover, the class of local-global rings is stable under integral extensions. Chapter X continues the study of finitely generated projective modules started in Chapter V. In Section X -1, we return to the question of the characterization of finitely generated projective modules as locally free modules, i.e. of the local structure theorem. We give a matrix version of it (Theorem X -1.7), which summarizes and clarifies the different statements of the theorem. Section X -2 is devoted to the ring of ranks over A. In classical mathematics, the rank of a finitely generated projective module is defined as a locally constant function in the Zariski spectrum. We give here an elementary theory of the rank which does not call upon prime ideals. In Section X -3, we provide some simple applications of the local structure theorem. Section X -4 introduces Grassmannians. In Section X -5, xxii Foreword we introduce the general problem of the complete classification of the finitely generated projective modules over a fixed ring A. This classification is a fundamental and difficult problem, which does not have a general algorithmic solution. Section X -6 presents a nontrivial example for which this classification can be obtained. Chapter XI is devoted to distributive lattices and lattice ordered groups (l-groups). The first two sections describe these algebraic structures along with their basic properties. These structures are important in commutative algebra for several reasons. First, the divisibility theory has as its “ideal model” the natural numbers’ divisibility theory. The structure of the multiplicative monoid (N∗ , ×, 1) makes it the positive part of an l-group. In commutative algebra, this can be generalized in two possible ways. The first generalization is the theory of integral rings whose finitely generated ideals form a distributive lattice, called Prüfer domains, which we will study in Chapter XII; their nonzero finitely generated ideals form the positive part of an l-group. The second is the theory of gcd rings that we study in Section XI -3. Let us notify the first appearance of the Krull dimension 6 1 in Theorem XI -3.12: an integral gcd ring with dimension 6 1 is a Bézout ring. Secondly, the distributive lattices act as the constructive counterpart of various spectral spaces which have emerged as powerful tools of abstract algebra. The relationship between distributive lattices and spectral spaces will be discussed in Section XIII -1. In Section XI -4, we set up the Zariski lattice of a commutative ring A, which is the constructive counterpart of the famous Zariski spectrum. Our goal here is to establish a parallel between the construction of the zero-dimensional reduced closure of a ring (denoted by A• ) and that of the Boolean algebra generated by a distributive lattice (which is the subject of Theorem XI -4.26). The object A• constructed as above essentially contains the same information as the product of the rings Frac(A/p ) for all prime ideals p of A(6 ). This result is closely related to the fact that the Zariski lattice of A• is the Boolean algebra generated by the Zariski lattice of A. A third reason to be interested in distributive lattices is constructive logic (or intuitionistic logic). In this logic, the set of truth values of classical logic, that is the two-element Boolean algebra {True, False}, is replaced by a quite mysterious distributive lattice. Constructive logic is informally discussed in the Annex. In Section XI -5, we set up the tools that provide a framework for a formal algebraic study of constructive logic: entailment relations and Heyting algebras. In addition, entailment relations and Heyting 6 This product is not accessible in constructive mathematics, A• is its perfectly effective constructive substitute. Foreword xxiii algebras have their own use in the general study of distributive lattices. For example, the Zariski lattice of a coherent Noetherian ring is a Heyting algebra (Proposition XIII -6.9). Chapter XII deals with arithmetic rings, Prüfer rings and Dedekind rings. Arithmetic rings are rings for which the lattice of finitely generated ideals is distributive. A Prüfer ring is a reduced arithmetic ring and is characterized by the fact that all of its ideals are flat. A coherent Prüfer ring is the same thing as an arithmetic pp-ring. It is characterized by the fact that its finitely generated ideals are projective. A Dedekind ring is a Noetherian and strongly discrete coherent Prüfer ring (in classical mathematics, with LEM, every ring is strongly discrete and every Noetherian ring is coherent). These rings first appeared as the rings of integers of number fields. The paradigm in the integral case is the unique decomposition into prime factors of any nonzero finitely generated ideal. The general arithmetic properties of finitely generated ideals are mostly verified by all the arithmetic rings. For the most subtle properties concerning the factorizations of the finitely generated ideals, and in particular the decomposition into prime factors, a Noetherian assumption, or at least a dimension 6 1 assumption, is essential. In this chapter, we wanted to show the progression of the properties satisfied by the rings as we strengthen the assumptions from the arithmetic rings to the total factorization Dedekind rings. We focus on the simple algorithmic character of the definitions in the constructive framework. Certain properties only depend on dimension 6 1, and we wanted to do justice to pp-rings of dimension at most 1. We also carried out a more progressive and more elegant study of the problem of the decomposition into prime factors than in the presentations which allow LEM. For example, Theorems XII -4.10 and XII -7.12 provide precise constructive versions of the theorem concerning the normal finite extensions of Dedekind rings, with or without the total factorization property. The chapter begins with a few epistemological remarks on the intrinsic interest of addressing the factorization problems with the partial factorization theorem rather than the total factorization one. To get a good idea of how things unfold, simply refer to the table of contents at the beginning of the chapter on page 677 and to the table of theorems on page 984. Chapter XIII is devoted to the Krull dimension of commutative rings, of their morphisms and of distributive lattices, and to the valuative dimension of commutative rings. Several important notions of dimension in classical commutative algebra are dimensions of spectral spaces. These very peculiar topological spaces have the property of being fully described (at least in classical mathematics) by their compact-open subspaces, which form a distributive lattice. It so xxiv Foreword happens that the corresponding distributive lattice generally has a simple interpretation, without any recourse to spectral spaces. In 1974, Joyal showed how to constructively define the Krull dimension of a distributive lattice. Since this auspicious day, the theory of dimension which seemed bathed in ethereal spaces – that are invisible when you do not trust the axiom of choice – has become (at least in principle) an elementary theory, without any further mysteries. Section XIII -1 describes the approach of the Krull dimension in classical mathematics. It also explains how to interpret the Krull dimension of such a space in terms of the distributive lattice of its compact-open subspaces. Section XIII -2 states the constructive definition of the Krull dimension of a commutative ring, denoted by Kdim A, and draws some consequences. Section XIII -3 states some more advanced properties, in particular the localglobal principle and the closed covering principle for the Krull dimension. Section XIII -4 deals with the Krull dimension of integral extensions and Section XIII -5 that of geometric rings (corresponding to polynomial systems) on the discrete fields. Section XIII -6 states the constructive definition of the Krull dimension of a distributive lattice and shows that the Krull dimension of a commutative ring and that of its Zariski lattice coincide. Section XIII -7 is devoted to the dimension of the morphisms between commutative rings. The definition uses the reduced zero-dimensional closure of the source ring of the morphism. To prove the formula which defines the upper bound of Kdim B from Kdim A and Kdim ρ (when we have a morphism ρ : A → B), we must introduce the minimal pp-closure of a commutative ring. This object is a constructive counterpart of the product of all the A/p, when p ranges over the minimal prime ideals of A. Section XIII -8 introduces the valuative dimension of a commutative ring and in particular uses this concept to prove the following important result: for a nonzero arithmetic ring A, we have Kdim A[X1 , . . . , Xn ] = n + Kdim A. Section XIII -9 states constructive versions of the Going up and Going down Theorems. In Chapter XIV, titled Number of generators of a module, we establish the elementary, non-Noetherian and constructive versions of the “great” theorems of commutative algebra, their original form due to Kronecker, Bass, Serre, Forster and Swan. These results relate to the number of radical generators of a finitely generated ideal, the number of generators of a module, the possibility of producing a free submodule as a direct summand in a module, and the possibility to simplifying isomorphisms, in the following way: if M ⊕ N ' M 0 ⊕ N then M ' M 0 . They involve the Krull dimension or other, more sophisticated dimensions introduced by R. Heitmann as well as by the authors of this work and T. Coquand. Section XIV -1 is devoted to Kronecker’s Theorem and its extensions (the most advanced, non-Noetherian, is due to R. Heitmann [98]). Kronecker’s Foreword xxv Theorem is usually stated in the following form: an algebraic variety in Cn can always be defined by n + 1 equations. The form due to Heitmann is that in a ring of Krull dimension less than or equal to n, for all finitely generated ideal a there√exists an ideal b generated by at most n + 1 √ elements of a such that b = a. The proof also gives Bass’ stable range Theorem. The latter theorem was improved by involving “better” dimensions than the Krull dimension. This is the subject of Section XIV -2 where the Heitmann dimension is defined, discovered while carefully reading Heitmann’s proofs (Heitmann uses another dimension, a priori a little worse, which we also explain in constructive terms). In Section XIV -3, we explain which matrix properties of a ring allow Serre’s Splitting Off theorem, Forster-Swan’s theorem (controlling the number of generators of a finitely generated module according to the local number of generators) and Bass’ simplification theorem. Section XIV -4 introduces the concepts of support (a mapping from a ring to a distributive lattice satisfying certain axioms) and of n-stability. The latter was defined by Thierry Coquand, after having analyzed one of Bass’ proofs which establishes that the finitely generated projective modules over a ring V[X], where V is a valuation ring of finite Krull dimension, are free. In the final section, we prove that the crucial matrix property introduced in Section XIV -3 is satisfied, on one hand by the n-stable rings, and on the other by the rings of Heitmann dimension < n. Chapter XV is devoted to the local-global principle and its variants. Section XV -1 introduces the notion of the covering of a monoid by a finite family of monoids, which generalizes the notion of comaximal monoids. The covering Lemma XV -1.5 will be decisive in Section XV -5. Section XV -2 states some concrete local-global principles. This is to say that some properties are globally true as soon as they are locally true. Here, “locally” is meant in the constructive sense: after localization at a finite number of comaximal monoids. Most of the results have been established in the previous chapters. Grouping them shows the very broad scope of these principles. Section XV -3 restates some of these principles as abstract local-global principles. Here, “locally” is meant in the abstract sense: after localization at any arbitrary prime ideal. We are mainly interested in comparing the abstract principles and the corresponding concrete local-global principles. Section XV -4 explains the construction of “global” objects from objects of the same type defined only locally, as is usual in differential geometry. It is the impossibility of this construction when seeking to glue certain rings together which is at the root of Grothendieck schemes. In this sense, Sections XV -2 and XV -4 constitute the basis from which we can develop the theory of schemes in a completely constructive framework. The following sections are of a different nature. Methodologically, they are devoted to the decryption of different variations of the local-global principle xxvi Foreword in classical mathematics. For example, the localization at every prime ideal, the passage to the quotient by every maximal ideal or the localization at every minimal prime ideal, each of which applies in particular situations. Such a decryption certainly presents a confusing character insofar as it takes as its starting point a classical proof that uses theorems in due and proper form, but where the constructive decryption of this proof is not only given by the use of constructive theorems in due and proper form. One must also look at what the classical proof does with its purely ideal objects (e.g. maximal ideals) to understand how it gives us the means to construct a finite number of elements that will be involved in a constructive theorem (e.g. a concrete local-global principle ) to reach the desired result. Decrypting such a proof we use the general dynamic method presented in Chapter VII. We thus describe local-global machineries that are significantly less elementary than those in Chapter IV: the basic constructive local-global machinery “with prime ideals” (Section XV -5), the constructive local-global machinery “with maximal ideals” (Section XV -6) and the constructive local-global machinery “with minimal prime ideals” (Section XV -7). By carrying out “Poincaré’s program” used as an epigraph for this foreword, our local-global machineries take into account an essential remark made by Lakatos that the most interesting and robust thing in a theorem is always its proof, even if it can be criticized in some respects (see [Lakatos]). In Sections XV -8 and XV -9, we examine to what extent certain localglobal principles remain valid when we replace in the statements the lists of comaximal elements by lists of depth > 1 or of depth > 2. In Chapter XVI, we treat the question of finitely generated projective modules over rings of polynomials. The decisive question is to establish for which classes of rings the finitely generated projective modules over a polynomial ring are derived by scalar extension of a finitely generated projective module over the ring itself (possibly by putting certain restrictions on the considered finitely generated projective modules or on the number of variables in the polynomial ring). Some generalities on the extended modules are given in Section XVI -1. The case of the projective modules of constant rank 1, which is fully clarified by Traverso-Swan-Coquand’s theorem, is dealt with in Section XVI -2. Coquand’s constructive proof uses the constructive local-global machinery with minimal prime ideals in a crucial way. Section XVI -3 deals with Quillen and Vaserstein’s patching theorems, which state that certain objects are obtained by scalar extension (from the base ring to the polynomial ring) if and only if this property is locally satisfied. We also have a sort of converse to Quillen’s patching due to Roitman, in a constructive form. Section XVI -4 is devoted to Horrocks’ theorems. The constructive proof of Horrocks’ global theorem is obtained from the proof of Horrocks’ local theorem by using the basic Foreword xxvii local-global machinery and concluding with Quillen’s constructive patching. Section XVI -5 gives several constructive proofs of Quillen-Suslin’s theorem (the finitely generated projective modules over a polynomial ring on a discrete field are free) founded on different classical proofs. Section XVI -6 establishes Lequain-Simis’ theorem (the finitely generated projective modules over a polynomial ring on an arithmetic ring are extended). The proof uses the dynamic method presented in Chapter VII. This allows us to establish Yengui’s induction theorem, a constructive variation of LequainSimis’ induction. In Chapter XVII, we prove “Suslin’s Stability Theorem” in the special case of discrete fields. Here also, we use the basic local-global machinery presented in Chapter XV to obtain a constructive proof. The Annex describes a Bishop style constructive set theory. It can be seen as an introduction to constructive logic. In it we explain the BrouwerHeyting-Kolmogorov semantic for connectives and quantifiers. We discuss certain weak forms of LEM along with several problematic principles in constructive mathematics. Some epistemological remarks In this work, we hope to show that classical commutative algebra books such as [Eisenbud], [Kunz], [Lafon & Marot], [Matsumura], [Glaz], [Kaplansky], [Atiyah & Macdonald], [Northcott], [Gilmer], [Lam06] (which we highly recommend), or even [Bourbaki] and the remarkable work available on the web [Stacks-Project], could be entirely rewritten from a constructive point of view, dissipating the veil of mystery which surrounds the nonexplicit existence theorems of classical mathematics. Naturally, we hope that the readers will take advantage of our work to take a fresh look at the classical Computer Algebra books like, for instance, [Cox, Little & O’Shea], [COCOA], [Elkadi & Mourrain], [von zur Gathen & Gerhard], [Mora], [TAPAS] or [SINGULAR]. Since we want an algorithmic processing of commutative algebra we cannot use all the tricks that arise from the systematic use of Zorn’s Lemma and the Law of Excluded Middle in classical mathematics. Undoubtedly, the reader understands that it is difficult to implement Zorn’s lemma in Computer Algebra. The refusal of LEM, however, must seem harder to stomach. It is simply a practical observation on our part. If in a classical proof there is a reasoning that leads to a computation in the form “if x is invertible, do this, otherwise do that,” then, clearly, it directly translates into an algorithm only when there is an invertibility test for the ring in question. It is in stressing this difficulty, which we must constantly work around, that we are xxviii Foreword often led to speak of two points of view on the same subject: classical and constructive. We could argue forever about whether constructive mathematics is part of classical mathematics, the part that deals exclusively with the explicit aspect of things, or conversely whether it is classical mathematics which is a part of constructive mathematics, the part whose theorems are “starred,” i.e. which systematically add LEM and the axiom of choice in their assumptions. One of our objectives is to tip the balance in the second direction, not for philosophical debate but for practical purposes. Finally, let us mention two striking traits of this work compared to classical texts on commutative algebra. The first is that Noetherianity is left on the backburner. Experience shows that indeed Noetherianity is often too strong an assumption, which hides the true algorithmic nature of things. For example, such a theorem usually stated for Noetherian rings and finitely generated modules, when its proof is examined to extract an algorithm, turns out to be a theorem on coherent rings and finitely presented modules. The usual theorem is but a corollary of the right theorem, but with two nonconstructive arguments allowing us to deduce coherence and finite presentation from Noetherianity and finite generation in classical mathematics. A proof in the more satisfying framework of coherence and finitely presented modules is often already published in research articles, although rarely in an entirely constructive form, but “the right statement” is generally missing.7 The second striking trait of this work is the almost total absence of negation in the constructive statements. For example, instead of stating that for a nontrivial ring A, two free modules of respective rank m and n with m > n cannot be isomorphic, we prefer to say without any assumption about the ring that if these modules are isomorphic, then the ring is trivial (Proposition II -5.2). This nuance may seem quite slight at first, but it has an algorithmic importance. It will allow us to substitute a proof from classical mathematics using a ring A = B/a , which would conclude that 1 ∈ a by contradiction, with a fully algorithmic proof that constructs 1 as an element of the ideal a from an isomorphism between Am and An . For a general presentation of the ideas which led to the new methods used in constructive algebra in this work, we suggest to the reader the summary article [42, Coquand&Lombardi, 2006]. Henri Lombardi, Claude Quitté August 2011 7 This Noetherian professional bias has produced a linguistic shortcoming in the English literature which consists in taking “local ring” to mean “Noetherian local ring.” xxx Foreword 2 3 4 5 7 6 8 9 10 11 13 12 15 14 17 16 Foreword xxxi The flowchart on the previous page shows the dependence relations between the different chapters 2. The basic local-global principle and systems of linear equations Coherent rings and modules. A little bit of exterior algebra. 3. The method of undetermined coefficients Dedekind-Mertens and Kronecker’s lemmas. Basic Galois theory. Classical Nullstellensatz. 4. Finitely presented modules Category of finitely presented modules. Zero-dimensional rings. Elementary local-global machineries. Fitting ideals. 5. Finitely generated projective modules, 1 Local structure theorem. Determinant. Rank. 6. Strictly finite algebras and Galois algebras 7. The dynamic method General Nullstellensatz (without algebraic closure). General Galois theory (without factorization algorithm). 8. Flat modules Flat and faithfully flat algebras. 9. Local rings, or just about Decomposable ring. Local-global ring. 10. Finitely generated projective modules, 2 11. Distributive lattices, lattice-groups GCD ring. Zariski lattice of a commutative ring. Implicative relations. 12. Prüfer and Dedekind rings Integral extensions. Dimension 6 1. Factorization of finitely generated ideals. 13. Krull dimension Krull dimension. Dimension of morphisms. Valuative dimension. Dimension of integral and polynomial extensions. 14. The number of generators of a module Kronecker’s, Bass’ and Forster-Swan’s theorems. Serre’s Splitting Off theorem. Heitmann dimension. 15. The local-global principle 16. Extended projective modules Traverso-Swan-Coquand’s, Quillen-Suslin’s, Bass-Lequain-Simiss theorems. 17. Suslin’s stability theorem Chapter I Examples Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . 1 Vector bundles on a smooth compact manifold . . Some localizations . . . . . . . . . . . . . . . . . . . . . . Vector bundles . . . . . . . . . . . . . . . . . . . . . . . . Tangent vectors and derivations . . . . . . . . . . . . . . Differentials and cotangent bundle . . . . . . . . . . . . . The smooth algebraic case . . . . . . . . . . . . . . . . . Derivations of a finitely presented algebra . . . . . . . . . 2 Differential forms on a smooth affine manifold . . . The sphere case . . . . . . . . . . . . . . . . . . . . . . . The smooth algebraic manifold case . . . . . . . . . . . . The smooth hypersurface case . . . . . . . . . . . . . . The case of a complete intersection . . . . . . . . . . . General case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 3 3 4 6 7 7 8 9 9 10 10 11 12 Introduction Throughout the manuscript, unless explicitly stated otherwise, rings are commutative and unitary, and a ring homomorphism ϕ : A → B must satisfy ϕ(1A ) = 1B . Let A be a ring. We say that an A-module M is a finite rank free module when it is isomorphic to a module An . We say that it is a finitely generated projective module when there exists an A-module N such that M ⊕ N is a finite rank free module. This is equivalent to saying that M is isomorphic –1– 2 I. Examples to the image of a projection matrix (a matrix P such that P 2 = P ). That is, the projection matrix onto M along N , precisely defined as follows: M ⊕ N −→ M ⊕ N, x + y 7−→ x for x ∈ M and y ∈ N . A projection matrix is also called a projector. When we have an isomorphism M ⊕ A` ' Ak , the finitely generated projective module M is called stably free. While over a field or over a PID the finitely generated projective modules are free (over a field they are finite dimensional vector spaces), over a general commutative ring the classification of the finitely generated projective modules is both an important and a difficult problem. Kronecker and Dedekind have proven that a nonzero finitely generated ideal in the ring of integers of a number field is always invertible (thus finitely generated projective), but that it is rarely free (i.e. principal). This is a fundamental phenomenon, which is at the root of the modern development of number theory. In this chapter, we try to explain why the notion of a finitely generated projective module is important by giving meaningful examples from differential geometry. The datum of a vector bundle on a smooth compact manifold V is in fact equivalent to the datum of a finitely generated projective module over the ring A = C ∞ (V ) of smooth functions over V ; to a vector bundle we associate the A-module of its sections, this is always a finitely generated projective module but it is free only when the bundle is trivial. The tangent bundle corresponds to a module built by a purely formal procedure from the ring A. In the case where the manifold V is a sphere, the module of the sections of the tangent bundle is stably free. An important result about the sphere is that there exist no smooth everywhere nonzero vector fields. This is equivalent to the fact that the module of sections of the tangent bundle is not free. We try to be as explicit as possible, but in this motivating chapter we freely use the reasonings of classical mathematics without worrying about being completely rigorous from a constructive point of view. §1. Vector bundles on a smooth compact manifold 3 1. Vector bundles on a smooth compact manifold Here, we give some motivations for finitely generated projective modules and localization by explaining the example of vector bundles on a compact smooth manifold. Two important particular cases are tangent and cotangent bundles corresponding to C ∞ vector fields and to C ∞ differential forms. We will use the term “smooth” as a synonym for “of class C ∞ .” We will see that the fact that the sphere cannot be combed admits a purely algebraic interpretation. In this section, we consider a smooth real differentiable manifold V and we denote by A = C ∞ (V ) the real algebra of global smooth functions on the manifold. Some localizations of the algebra of continuous functions Let us first consider an element f ∈ A along with the open set (open subset of the manifold V to be precise) U = { x ∈ V | f (x) 6= 0 } and let us see how we can interpret the algebra A[1/f ]: two elements g/f k and h/f k are equal in A[1/f ] if and only if for some exponent ` we have gf ` = hf ` which means precisely g|U = h|U . It follows that we can interpret A[1/f ] as a sub-algebra of the algebra of smooth functions on U : this sub-algebra has as elements the functions which can be written as (g|U )/(f |U )k (for a given exponent k) with g ∈ A, which a priori introduces certain restrictions on the behavior of the function on the border of U . To avoid having to deal with this difficult problem, we use the following lemma. 1.1. Lemma. Let U 0 be an open subset of V containing the support of a function f . Then, the natural map (by restriction), from C ∞ (V )[1/f ] = A[1/f ] to C ∞ (U 0 )[1/f |U 0 ], is an isomorphism. J Recall that the support of a function f is the adherence of the open subset U. We have a restriction homomorphism h 7→ h|U 0 from C ∞ (V ) to C ∞ (U 0 ) that induces a homomorphism ϕ : C ∞ (V )[1/f ] → C ∞ (U 0 )[1/f |U 0 ]. We want to prove that ϕ is an isomorphism. If g ∈ C ∞ (U 0 ), then the function gf , which equals zero on U 0 \ U , can be extended to a smooth function on the whole of V by making it zero outside of U 0 . We continue to denoted it by gf . So, the reciprocal isomorphism of ϕ is given by g 7→ gf /f and g/f m 7→ gf /f m+1 .  4 I. Examples A germ of a smooth function at a point p of the manifold V is given by a pair (U, f ) where U is an open subset containing p and f is a smooth function U → R. Two pairs (U1 , f1 ) and (U2 , f2 ) define the same germ if there exist an open subset U ⊆ U1 ∩ U2 containing p such that f1 |U = f2 |U . The germs of smooth functions at a point p form an R-algebra that we denote by Ap . We then have the following little “algebraic miracle.” 1.2. Lemma. The algebra Ap is naturally isomorphic to the localization ASp , where Sp is the multiplicative part of nonzero functions at a point p. J First, we have a natural map A → Ap that associates to a function defined on V its germ at p. It follows immediately that the image of Sp is made of invertible elements of Ap . Thus, we have a factorization of the above natural map which provides a homomorphism ASp → Ap . Next, we define a homomorphism Ap → ASp . If (U, f ) defines the germ g then consider a function h ∈ A which is equal to 1 on an open subset U 0 containing p with U 0 ⊆ U and which equals zero outside of U (in a chart we will be able to take U 0 to be an open ball with center p). So, each of the three pairs (U, f ), (U 0 , f |U 0 ) and (V, f h) define the same germ g. Now, f h defines an element of ASp . It remains to check that the correspondence that we have just established does indeed produce a homomorphism of the algebra Ap on the algebra ASp : no matter how the germ is represented as a pair (U, f ), the element f h/1 of ASp only depends on the germ g. Finally, we check that the two homomorphisms of R-algebras that we have defined are indeed inverse isomorphisms of each other.  In short, we have algebrized the concept of a germ of a smooth function. Except that the monoid Sp is defined from the manifold V , not only from the algebra A. However, if V is compact, the monoids Sp are precisely the complements of the maximal ideals of A. In fact, on the one hand, whether V is compact or not, the set of f ∈ A zero at p always constitutes a maximal ideal mp with a residual field equal to R. On the other hand, if m is a maximal ideal of A the intersection of the Z(f ) = { x ∈ V | f (x) = 0 } for each f ∈ m is a non-empty compact subset (note that Z(f ) ∩ Z(g) = Z(f 2 + g 2 )). Since the ideal is maximal, this compact subset is necessarily reduced to one point p and we then get m = mp . Vector bundles and finitely generated projective modules Now recall the notion of a vector bundle over V . A vector bundle is given by a smooth manifold W , a smooth surjective mapping π : W → V , and a structure of a finite dimensional vector space §1. Vector bundles on a smooth compact manifold 5 on every fiber π −1 (p). In addition, locally, all this must be diffeomorphic to the following simple situation, called trivial: π1 : (U × Rm ) → U, (p, v) 7→ p, with m that can depend on U if V is not connected. This means that the structure of the (finite dimensional) vector space on the fiber over p must “properly” depend on p. Such an open set (or subset) U , which trivializes the bundle, is called a distinguished open set (or subset). A section of the vector bundle π : W → V is by definition a mapping σ : V → W such that π ◦ σ = IdV . We will denote by Γ(W ) the set of smooth sections of this bundle. It is equipped with a natural Amodule structure. Now suppose that the manifold V is compact. As the bundle is locally trivial there exists a finite covering of V by distinguished open subsets Ui and a partition of the unity (fi )i∈J1..sK subordinate to the open cover Ui : the support of fi is a compact set Ki contained in Ui . We notice from Lemma 1.1 that the algebras A[1/fi ] = C ∞ (V )[1/fi ] and C ∞ (Ui )[1/fi ] are naturally isomorphic. If we localize the ring A and the module M = Γ(W ) by making fi invertible, we obtain the ring Ai = A[1/fi ] and the module Mi . Let Wi = π −1 (Ui ). Then, Wi → Ui is “isomorphic” to Rmi × Ui → Ui . Thus it boils down to taking a section of the bundle Wi , or to taking the mi functions Ui → R which make a section of the bundle Rmi × Ui → Ui . In other words, the module of the sections of Wi is free and of rank m. Since a module that becomes free after localization in a finite number of comaximal elements is finitely generated projective (local-global principle V -2.4), we then get the direct part (point 1 ) of the following theorem. 1.3. Theorem. Let V be a smooth compact manifold, and let A = C ∞ (V ). π 1. If W −−→ V is a vector bundle on V , the A-module of the smooth sections of W is a finitely generated projective module. 2. Conversely, every finitely generated projective A-module is isomorphic to the module of the smooth sections of a vector bundle on V . Let us consider the converse part of the theorem: if we take a finitely generated projective A-module M , we can construct a vector bundle W over V for which the module of sections is isomorphic to M . We proceed as follows. Consider a projection matrix F = (fij ) ∈ Mn (A) such that Im F ' M and set W = { (x, h) ∈ V × Rn | h ∈ Im F |x } , where F |x designates the matrix (fij (x)). The reader will then be able to show that Im F is identified with the module of sections Γ(W ): to the 6 I. Examples element s ∈ Im F is matched the section se defined by x 7→ se(x) = (x, s|x). In addition, in the case where F is the standard projection matrix Ik,n = Ik 0 0 0r (k + r = n), r then W is clearly trivial; it is equal to V × Rk × {0} . Finally, a finitely generated projective module becomes free after localization at the appropriate comaximal elements (Theorem V -6.1, point 3, or Theorem X -1.7, more precise matrix form). Consequently, the bundle W defined above is locally trivial; it is indeed a vector bundle. Tangent vectors and derivations A decisive example of a vector bundle is the tangent bundle, for which the elements are the pairs (p, v) where p ∈ V and v is a tangent vector at the point p. When the manifold V is a manifold immersed in a space Rn , a tangent vector v at the point p can be identified with the derivation at the point p in the direction of v. When the manifold V is not a manifold immersed in a space Rn , a tangent vector v can be defined as a derivation at the point p, i.e. as an R-linear form v : A → R which satisfies Leibniz’s rule v(f g) = f (p)v(g) + g(p)v(f ). (1) We can check with a few computations that the tangent vectors at V indeed form a vector bundle TV over V . To a vector bundle π : W → V is associated the A-module Γ(W ) formed by the smooth sections of the bundle. In the tangent bundle case, Γ(TV ) is nothing else but the A-module of the usual (smooth) vector fields. Just as a tangent vector at the point p is identified with a derivation at the point p, which can be defined in algebraic terms (equation (1)), a (smooth) tangent vector field can be identified with an element of the A-module of the derivations of the R-algebra A, defined as follows. A derivation of an R-algebra B in a B-module M is an R-linear mapping v : B → M which satisfies Leibniz’s rule v(f g) = f v(g) + g v(f ). (2) The B-module of derivations of B in M is denoted by DerR (B, M ). When we “simply” refer to a derivation of an R-algebra gB, what we mean is a derivation with values in B. When the context is clear we write Der(B) as an abbreviation for DerR (B, B). §1. Vector bundles on a smooth compact manifold 7 The derivations at a point p are then the elements of DerR (A, Rp ) where Rp = R is equipped with the A-module structure given by the homomorphism f 7→ f (p) of A in R. Thus DerR (A, Rp ) is an abstract algebraic version of the tangent space at the point p at the manifold V . A smooth manifold is called parallelizable if it has a (smooth) field of bases (n smooth sections of the tangent bundle that give a base at every point). This boils down to saying that the tangent bundle is trivial, or even that the A-module of sections of this bundle, the module Der(A) of derivations of A, is free. Differentials and cotangent bundle The dual bundle of the tangent bundle, called the cotangent bundle, has the differential forms on the manifold V as its sections. The corresponding A-module, called the module of differentials, can be defined by generators and relations in the following way. Generally, if (fi )i∈I is a family of elements that generate an R-algebra B, the B-module of (Kähler) differentials of B, denoted by ΩB/R , is generated by the (purely formal) dfi ’s subject to the relations “derived from” the relations that bind the fi ’s: if P ∈ R[z1 , . . . , zn ] and if P (fi1 , . . . , fin ) = 0, the derived relation is Xn ∂P (fi1 , . . . , fin )dfik = 0. k=1 ∂zk Furthermore, we have the canonical mapping d : B → ΩB/R available, P P αi fi , with αi ∈ R, df = αi dfi ), defined by df = the class of f (if f = which is a derivation.1 We then prove that, for every R-algebra B, the B-module of derivations of B is the dual module of the B-module of Kähler differentials. In the case where the B-module of differentials of B is a finitely generated projective module (for example when B = A), then it is itself the dual module of the B-module of derivations of B. The smooth algebraic compact manifolds case In the case of a smooth compact real algebraic manifold V , the algebra A of smooth functions on V has as sub-algebra that of the polynomial functions, denoted by R[V ]. The modules of vector fields and differential forms can be defined as above in terms of the algebra R[V ]. Every finitely generated projective module M on R[V ] corresponds to a vector bundle W → V that we qualify as strongly algebraic. The smooth 1 For further details on the subject see Theorems VI -6.6 and VI -6.7. 8 I. Examples sections of this vector bundle form an A-module that is (isomorphic to) the module obtained from M by scalar extension to A. So, the fact that the manifold is parallelizable can be tested on an elementary level, that of the module M . Indeed the assertion “the A-module of smooth sections of W is free” concerning the smooth case is equivalent to the corresponding assertion in the algebraic case “the R[V ]-module M is free.” Proof sketch: Weierstrass’ approximation theorem allows us to approximate a smooth section by a polynomial section, and a “smooth basis” (n smooth sections of the bundle that at every point give a basis), by a polynomial one. Let us now examine the smooth compact surfaces case. Such a surface is parallelizable if and only if it is orientable and has an everywhere nonzero vector field. Figuratively the latter condition reads: the surface can be combed. The integral curves of the vector field then form a beautiful curve family, i.e. a locally rectifiable curve family. Thus for an orientable smooth compact algebraic surface V the following properties are equivalent. 1. There exists an everywhere nonzero vector field. 2. There exists a beautiful curve family. 3. The manifold is parallelizable. 4. The Kähler module of differentials of R[V ] is free. As previously explained, the latter condition stems from pure algebra (see also Section 2). Hence the possibility of an “algebraic” proof of the fact that the sphere cannot be combed. It seems that such a proof is not yet available on the market. The differential module and the module of derivations of a finitely presented algebra Let R be a commutative ring. For a finitely presented R-algebra A = R[X1 , . . . , Xn ]/hf1 , . . . , fs i = R[x1 , . . . , xn ], the definitions of the module of derivations and the module of differentials are updated as follows. We denote by π : R[X1 , . . . , Xn ] → A, g(X) 7→ g(x) the canonical projection. §2. Differential forms on a smooth affine manifold 9 We consider the Jacobian matrix of the system of equations f1 , . . . , fs ,  ∂f1  ∂f1 ∂X1 (X) · · · ∂Xn (X)   .. .. J(X) =  . . . ∂fs ∂fs ∂X1 (X) · · · ∂Xn (X) The matrix J(x) defines an A-linear map An → As . So, we have two natural isomorphisms ΩA/R ' Coker tJ(x) and Der(A) ' Ker J(x). The first isomorphism results from the definition of the module of differentials. The second can be clarified as follows: if u = (u1 , . . . , un ) ∈ Ker J(x), we associate with it “the partial derivation in the direction of the tangent vector u” (actually it is rather a vector field) defined by Xn ∂g (x). δu : A → A, π(g) 7→ ui i=1 ∂Xi So, u 7→ δu is the isomorphism in question. Exercise 1. Prove the statement made about the module of derivations. Then confirm from it that Der(A) is the dual module of ΩA/R : if ϕ : E → F is a linear map between finite rank free modules, we always have Ker ϕ ' (E ? / Im tϕ)? . In the remainder of this chapter we are interested in the smooth case, in which the purely algebraic concepts coincide with the analogous concepts from differential geometry. 2. Differential forms with polynomial coefficients on a smooth affine manifold The module of differential forms with polynomial coefficients on the sphere  Let S = (α, β, γ) ∈ R3 | α2 + β 2 + γ 2 = 1 . The ring of polynomial functions over S is the R-algebra  A = R[X, Y, Z] X 2 + Y 2 + Z 2 − 1 = R[x, y, z]. The A-module of differential forms with polynomial coefficients on S is ΩA/R = (A dx ⊕ A dy ⊕ A dz)/ hxdx + ydy + zdzi ' A3 /Av, where v is the column vector t[ x y z ]. This vector is unimodular (this means that its coordinates are comaximal 10 I. Examples elements of A) since [ x y z ] · v = 1. Thus, the matrix  2  x xy xz P = v · [ x y z ] =  xy y 2 yz  xz yz z 2 satisfies P 2 = P , P · v = v, Im(P ) = Av such that by posing Q = I3 − P we get Im(Q) ' A3 / Im(P ) ' ΩA/R , and ΩA/R ⊕ Im(P ) ' ΩA/R ⊕ A ' A3 . This highlights the fact that ΩA/R is a stably free projective A-module of rank 2. The previous considerations continue to hold if we substitute R by a field of characteristic 6= 2 or even by a commutative ring R where 2 is invertible. An interesting problem that arises is to ask for which rings R, precisely, is the A-module ΩA/R free. The module of differential forms with polynomial coefficients on a smooth algebraic manifold The smooth hypersurface case Let R be a commutative ring, and f (X1 , . . . , Xn ) ∈ R[X1 , . . . , Xn ] = R[X]. Consider the R-algebra A = R[X1 , . . . , Xn ]/hf i = R[x1 , . . . , xn ] = R[x]. We say that the hypersurface S defined by f = 0 is smooth if for every field K “extension of R” (2 ) and for every point ξ = (ξ1 , . . . , ξn ) ∈ Kn satisfying f (ξ) = 0 one of the coordinates (∂f /∂Xi )(ξ) is nonzero. By the formal Nullstellensatz, this is equivalent to the existence of F , B1 , . . . , Bn in R[X] satisfying F f + B1 ∂f ∂f + · · · + Bn = 1. ∂X1 ∂Xn Let bi = Bi (x) be the image of Bi in A and ∂i f = (∂f /∂Xi )(x). We thus have in A b1 ∂1 f + · · · + bn ∂n f = 1. 2 In this introductory chapter, when we use the incantatory figurative expression field K “extension of R,” we simply mean that K is a field with an R-algebra structure. This boils down to saying that a subring of K is isomorphic to a (integral) quotient of R, and that the isomorphism is given. Consequently the coefficients of f can be “seen” in K and the speech following the incantatory expression does indeed have a precise algebraic meaning. In Chapter III we will define a ring extension as an injective homomorphism. This definition directly conflicts with the figurative expression used here if R is not a field. This explains the inverted commas used in the current chapter. §2. Differential forms on a smooth affine manifold 11 The A-module of differential forms with polynomial coefficients on S is ΩA/R = (A dx1 ⊕ · · · ⊕ A dxn )/hdf i ' An /Av, where v is the column vector t[ ∂1 f · · · ∂n f ]. This vector is unimodular since [ b1 · · · bn ] · v = 1. So, the matrix   b1 ∂1 f . . . bn ∂1 f   .. .. P = v · [ b1 · · · bn ] =   . . b1 ∂n f ... bn ∂n f satisfies P 2 = P , P · v = v, Im(P ) = Av such that by posing Q = In − P we get Im(Q) ' An / Im(P ) ' ΩA/R and ΩA/R ⊕ Im(P ) ' ΩA/R ⊕ A ' An . This highlights the fact that ΩA/R is a stably free projective A-module of rank n − 1. The smooth complete intersection case We treat the case of using two equations to define a smooth complete intersection. The generalization to an arbitrary number of equations is straightforward. Let R be a commutative ring, and f (X), g(X) ∈ R[X1 , . . . , Xn ]. Consider the R-algebra A = R[X1 , . . . , Xn ]/hf, gi = R[x1 , . . . , xn ] = R[x]. The Jacobian matrix of the system of equations (f, g) is " # ∂f ∂f (X) · · · ∂X (X) ∂X 1 n J(X) = . ∂g ∂g ∂X1 (X) · · · ∂Xn (X) We say that the algebraic manifold S defined by f = g = 0 is smooth and of codimension 2 if, for every field K “extension of R” and for every point (ξ) = (ξ1 , . . . , ξn ) ∈ Kn satisfying f (ξ) = g(ξ) = 0, then one of the 2 × 2 minors of the Jacobian matrix Jk,` (ξ), where Jk,` (X) = ∂f ∂Xk (X) ∂g ∂Xk (X) ∂f ∂X` (X) ∂g ∂X` (X) is nonzero. By the formal Nullstellensatz, this is equivalent to the existence of polynomials F, G and (Bk,` )16k<`6n in R[X] which satisfy X F f + Gg + Bk,` (X)Jk,` (X) = 1. 16k<`6n Let bk,` = Bk,` (x) be the image of Bk,` in A and jk,` = Jk,` (x). We 12 I. Examples therefore have in A X 16k<`6n bk,` jk,` = 1. (∗) The A-module of differential forms with polynomial coefficients on S is ΩA/R = (A dx1 ⊕ · · · ⊕ A dxn )/hdf, dgi ' An / Im tJ, where tJ is the Jacobian matrix transpose (taken in A):   ∂1 f ∂1 g  ..  . t J = tJ(x) =  ... .  ∂n f ∂n g Equality (∗) implies that the Jacobian matrix J(x) defines a surjective linear map, and its transpose defines an injective linear map: more precisely, if we let   0 · · · 0 ∂` g 0 · · · 0 −∂k g 0 · · · 0 Tk,l (x) = 0 · · · 0 −∂` f 0 · · · 0 ∂k f 0 · · · 0 P t t and T = 16k<`6n bk,` Tk,l , then T · J = I2 = J · T and the matrix P = tJ · T satisfies P 2 = P, P · tJ = tJ, Im P = Im tJ ' A2 , so that by posing Q = In − P we get Im Q ' An / Im P ' ΩA/R and ΩA/R ⊕ Im P ' ΩA/R ⊕ A2 ' An . This highlights the fact that ΩA/R is a stably free projective A-module of rank n − 2. The general case We treat the case of using m equations to define a smooth manifold of codimension r. Let R be a commutative ring, and fi (X) ∈ R[X1 , . . . , Xn ], i = 1, . . . , m. Consider the R-algebra A = R[X1 , . . . , Xn ]/hf1 , . . . , fm i = R[x1 , . . . , xn ] = R[x]. The Jacobian matrix of the system of equations (f1 , . . . , fm ) is  ∂f1  ∂f1 ∂X1 (X) · · · ∂Xn (X)   .. .. J(X) =  . . . ∂fm ∂fm ∂X1 (X) · · · ∂Xn (X) §2. Differential forms on a smooth affine manifold 13 We say that the algebraic manifold S defined by f1 = · · · = fm = 0 is smooth and of codimension r if the Jacobian matrix taken in A is “of rank r,” i.e. every minor of order r + 1 is zero, and the minors of order r are comaximal. This implies that for every field K “extension of R” and at every point (ξ) ∈ Kn of the manifold of the zeros of the fi ’s in Kn , the tangent space is of codimension r. If the ring A is reduced, this “geometric” condition is in fact sufficient (in classical mathematics). r Let Jki11,...,i ,...,kr (X) be the r × r minor extracted from the rows i1 , . . . , ir and i1 ,...,ir r from the columns k1 , . . . , kr of J(X), and taken in A: jki11,...,i ,...,kr = Jk1 ,...,kr (x). r The condition on r × r minors indicates the existence of elements bik11,...,i ,...,kr of A such that X i1 ,...,ir r bik11,...,i ,...,kr jk1 ,...,kr = 1. 16k1 <···<kr 6n,16i1 <···<ir 6m The A-module of differential forms with polynomial coefficients on S is ΩA/R = (A dx1 ⊕ · · · ⊕ A dxn )/hdf1 , . . . , dfm i ' An / Im tJ, where tJ = tJ(x) is the Jacobian matrix transpose (seen in A). We will see that Im tJ is the image of a projection matrix of rank n − r. This will highlight the fact that ΩA/R is a projective A-module of rank n − r (but a priori it is not stably free). To do so it suffices to compute a matrix H of Am×n such that tJ H tJ = tJ, as then the matrix P = tJ H is the sought projection matrix. We are therefore reduced to solve a system of linear equations whose unknowns are the coefficients of the matrix H. However, the solution of a system of linear equations is essentially a local matter, and if we localize by rendering a minor of order r invertible, the solution is not too difficult to find, knowing that every minor of order r + 1 is zero. Here is an example of how this can work. Exercise 2. In this exercise, we perform a patching in the most naive way possible. Let A ∈ An×m be a matrix of rank r. We want to construct a matrix B ∈ Am×n such that ABA = A. Note that if we have a solution for a matrix A, we ipso facto have a solution for every equivalent matrix. Ir 0 0 0 1. Treat the case where A = Ir,n,m = 14 I. Examples 2. Treat the case where P AQ = Ir,n,m with P and Q invertible. 3. Treat the case where A has an invertible minor of order r. 4. Treat the general case. Solution. 1. Take B = tA. 2. Take B = Q t(P AQ)P . 3. Suppose without loss of generality that the invertible minor is in the north-west corner. Let s = n − r, t = m − r. We write δ1 = det R, −V R Ir A= 0 , L= −U R −V 0 W0 e RV 0 δ1 It , C= e δ1 Is UR W Ir . e + W , then with W 0 = −δ1 U RV We get LA = R 0 . LAC = 0 δ1 W 0 Since the minors of order r + 1 of A are zero, we get δ12 W 0 = 0. Thus e R 0 let M = δ1 R 0 0 0 = δ1 LAC. , hence (LAC)M (LAC) = 0 0 With B1 = CM L this gives LAB1 AC = (LAC)M (LAC) = δ1 LAC, e and on the right by C e thus by multiplying on the left by L δ1s+t AB1 A = δ1s+t+1 A. Whence the solution B = B1 /δ1 since we supposed that δ1 is invertible. 4. The precomputation made with the minor δ1 did not require that it be invertible. It can be done with each of the minors δ` of order r of A. This results in as many equalities δ`s+t AB` A = δ`s+t+1 A. P A linear combination ` a` δ` = 1, raised to a sufficient power, results in an P P equality ` b` δ`s+t+1 = 1, hence ABA = A for B = ` b` δ`s+t B` .  §2. Differential forms on a smooth affine manifold 15 Remarks. 1) We will return to the equality ABA = A when using a Cramer-style magical formula, cf. Theorem II -5.14. 2) In the last example, we were directly inspired by the “Rank Theorem” which states that if a smooth mapping ϕ : U → Rk has constant rank r at every point of V = { x ∈ U | ϕ(x) = 0 }, then V is a smooth sub-manifold of codimension r of the open subset U ⊆ Rn . It turns out that the analogue we have developed here does not always work correctly. For example with R = F2 , f1 = X 2 + Y and f2 = Y 2 , the manifold V is reduced to a point, the origin (even if we pass to the algebraic closure of F2 ), in which the  0 1 Jacobian matrix is of rank 1: . However, V is not a curve, it is a 0 0 multiple point. This means that the Rank Theorem poses some problems in nonzero characteristic. Our definition is therefore abusive when R is not a Q-algebra. Chapter II The basic local-global principle and systems of linear equations Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . 1 Some facts concerning localizations 18 . . . . . . . . . . 18 2 The basic local-global principle . . . . . . . . . . . . . 21 Comaximal localizations and the local-global principle . . . 21 Finite character properties . . . . . . . . . . . . . . . . . . 26 Forcing comaximality . . . . . . . . . . . . . . . . . . . . . 29 3 Coherent rings and modules . . . . . . . . . . . . . . . 29 A fundamental notion . . . . . . . . . . . . . . . . . . . . . 29 Local character of coherence . . . . . . . . . . . . . . . . . 33 About the equality and the membership tests . . . . . . . . 33 Strongly discrete coherent rings and modules . . . . . . . . 35 4 Fundamental systems of orthogonal idempotents . . 36 5 A little exterior algebra . . . . . . . . . . . . . . . . . 39 Free submodules as direct summands (Splitting Off) . . . . 39 The rank of a free module . . . . . . . . . . . . . . . . . . . 40 Exterior powers of a module . . . . . . . . . . . . . . . . . 41 Determinantal ideals . . . . . . . . . . . . . . . . . . . . . . 42 The rank of a matrix . . . . . . . . . . . . . . . . . . . . . 44 Generalized pivot method . . . . . . . . . . . . . . . . . . . 44 – 17 – 18 II. The basic local-global principle and systems of linear equations Generalized Cramer formula . . . . . . . . . . . . . . . . . 46 A magic formula . . . . . . . . . . . . . . . . . . . . . . . . 47 Generalized inverses and locally simple maps . . . . . . . . 48 Grassmannians . . . . . . . . . . . . . . . . . . . . . . . . . 50 Injectivity and surjectivity criteria . . . . . . . . . . . . . . 51 Characterization of locally simple maps . . . . . . . . . . . 52 Trace, norm, discriminant, transitivity . . . . . . . . . . . . 54 6 Basic local-global principle for modules . . . . . . . . 60 Complexes and exact sequences . . . . . . . . . . . . . . . 60 Localization and exact sequences . . . . . . . . . . . . . . . 62 Local-global principle for exact sequences of modules . . . 63 Exercises and problems . . . . . . . . . . . . . . . . . . 64 Solutions of selected exercises . . . . . . . . . . . . . . . . . 72 Bibliographic comments . . . . . . . . . . . . . . . . . 79 In this Chapter, as in the entirety of this manuscript unless explicitly stated otherwise, rings are commutative and unitary, and homomorphisms between rings preserve the multiplicative identities. In particular, a subring has the same multiplicative identity as the whole ring. Introduction Solving systems of linear equations is an omnipresent theme of commutative algebra, in particular in its most developed form for which homological methods are at use. In this chapter, we recall some classical results on this topic, which we will come back to often throughout this work. Particular attention is given to the basic local-global principle, the notion of a coherent module and some variants of Cramer’s formula. 1. Some facts concerning quotients and localizations Let us begin by recalling the following result on quotients. Let a be an ideal of a ring A. When needed, the canonical mapping will be denoted by πA,a : A → A/a . The quotient ring (A/a , πA,a ) is characterized, up to unique isomorphism, by the following universal property. §1. Some facts concerning localizations 19 1.1. Fact. (Characteristic property of the quotient by the ideal a) A ring homomorphism ψ : A → B is factorized by πA,a if and only if a ⊆ Ker ψ, meaning ψ(a) ⊆ {0B }. In this case, the factorization is unique. A ψ πA,a  A/a homomorphisms vanishing on a. %/ θ! B Explanation regarding the figure. In a figure of the type found above, everything but the morphism θ corresponding to the dotted arrow is given. The exclamation mark signifies that θ makes the diagram commute and that it is the unique morphism with this property. We denote by M /aM the A/a -module obtained from the quotient of the A-module M by the submodule generated by the elements ax for a ∈ a and x ∈ M . This module can thus be defined through the extension of scalars to A/a from the A-module M (see page 196, and exercise IV -5). Let us move on to localizations, which are very analogous to quotients (we will return to this analogy in further detail on page 642). In this work, when referring to a monoid contained within a ring (i.e. a submonoid of a ring) we always assume a subset of the ring which contains 1 and is closed under multiplication. For a given ring A, we denote by A× the multiplicative group of invertible elements, also called the group of units. If S is a monoid, we denote by AS or S −1 A the localization of A at S. Every element of AS can be written in the form x/s with x ∈ A and s ∈ S. By definition we have x1 /s1 = x2 /s2 if there exists an s ∈ S such that ss2 x1 = ss1 x2 . When needed, we will denote by jA,S : A → AS the canonical mapping x 7→ x/1. The localized ring (AS , jA,S ) is characterized, up to unique isomorphism, by the following universal property. 1.2. Fact. (Characteristic property of the localization at S) A ring homomorphism ψ : A → B is factorized by jA,S if and only if ψ(S) ⊆ B× . When this is the case, the factorization is unique. A jA,S  S −1 A homomorphisms which send S into B× . ψ θ! &/ B Similarly, we denote by MS = S −1 M the AS -module obtained by localization of the A-module M at S. Every element of MS is of the form x/s 20 II. The basic local-global principle and systems of linear equations with x ∈ M and s ∈ S. By definition, we have x1 /s1 = x2 /s2 if there exists an s ∈ S such that ss2 x1 = ss1 x2 . This module MS can also be defined through an extension of scalars to AS from the A-module M (see page 196, and exercise IV -5). The monoid S contained in a ring A is called saturated when ∀s, t ∈ A (st ∈ S ⇒ s ∈ S) is satisfied. A saturated monoid is also called a filter. A principal filter is a filter generated by a single element; that is, it is just the set of divisors of some arbitrary power of that element. We denote by S sat the saturation of the monoid S; it is obtained by adding all elements dividing an element of S. When we saturate a monoid, the localization remains unchanged.1 Two monoids S1 and S2 are said to be equivalent if they have the same saturation. We then write AS1 = AS2 . It is possible to localize by a monoid which contains 0. The result is then the trivial ring (recall that a ring is trivial if it is reduced to a single element, i.e. if 1 = 0). def  If S is generated by s ∈ A, i.e. if S = sN = sk | k ∈ N , we denote by As or A[1/s] the localized ring S −1 A, which is isomorphic to A[T ]/hsT − 1i. In a ring, the conductor of an ideal a into an ideal b is the ideal (b : a)A = { a ∈ A | aa ⊆ b } . More generally, if N and P are submodules of an A-module M , we define the conductor of N into P as the ideal (P : N )A = { a ∈ A | aN ⊆ P } . Recall also that the annihilator of an element x from an A-module M is the ideal AnnA (x) = (h0A i : hxi) = { a ∈ A | ax = 0 }. The annihilator of a module M is the ideal AnnA (M ) = (h0M i : M )A . A module or an ideal is faithful if its annihilator is reduced to 0. The following notations are also useful for a submodule N of M . (N : a)M = { x ∈ M | x a ⊆ N } . (N : a∞ )M = { x ∈ M | ∃n, x an ⊆ N } . The latter submodule is called the saturation of N by a in M . We say that an element x of an A-module M is regular (if M = A we also say that x is a nonzerodivisor) if the sequence .x 0 −→ A −→ M is exact; in other words if Ann(x) = 0. If 0A is a regular in A, the ring is trivial. 1 In fact, depending on the specific construction chosen to define localization, we would either have an equality or a canonical isomorphism between the two localizations. §2. The basic local-global principle 21 When the context is unambiguous, we omit the A or M subscript to simplify the previous notations regarding conductors. The total ring of fractions or total quotient ring of A, denoted by Frac A, is the localized ring AS , where S is the monoid of regular elements of A, denoted by Reg A. 1.3. Fact. 1. The kernel of the natural homomorphism jA,s : A → As = A[1/s] is the ideal (0 : s∞ )A . It is reduced to 0 if and only if s is regular. 2. Similarly, the kernel of the natural homomorphism of M to Ms = M [1/s] is the A-submodule (0 : s∞ )M . 3. The natural homomorphism A → Frac A is injective. 1.4. Fact. If S ⊆ S 0 are two monoids of A and M is an A-module, we have two canonical identifications (AS )S 0 ' AS 0 and (MS )S 0 ' MS 0 . 2. The basic local-global principle We will study the general workings of the local-global principle in commutative algebra in Chapter XV. However, we will encounter it at every turn, under different forms adapted to each situation. In this section, an essential instance of this principle is given as it is so simple and efficient that it would be a pity to go without it any longer. The local-global principle affirms that certain properties are true if and only if they are true after “sufficiently many” localizations. In classical mathematics we often invoke localization at every maximal ideal. It is a lot of work and seems a bit mysterious, especially from an algorithmic point of view. We will use simpler (and less intimidating) versions in which only a finite number of localizations are used. Comaximal localizations and the local-global principle The following definition corresponds to the intuitive idea that certain (finite) systems of localizations of a ring A are “sufficiently numerous” to capture all the information contained within A. 2.1. Definition. 1. Let s1 , . . ., sn be elements. if h1i = hs1 , . . . , sn i then s1 , . . ., sn are said to be comaximal. 2. Let S1 , . . ., Sn be monoids. If for every s1 ∈ S1 , . . . , sn ∈ Sn , the si ’s are comaximal then S1 , . . ., Sn are called comaximal. 22 II. The basic local-global principle and systems of linear equations Two fundamental examples. 1) If s1 , . . ., sn are comaximal then the monoids they generate are comaximal. mi N Indeed, consider Pn every si (mi > 1) in the monoids si and let a1 , . . . , an be such that i=1 ai si = 1. By raising the latter equality to the power of Pn 1 − n + i=1 mi and by conveniently regrouping the terms in the resulting Pn i sum, we get an equality of the form i=1 bi sm = 1, as required. i N 2) If a = a1 · · · an ∈ A, then the monoids a , 1 + a1 A, . . . , 1 + an A are comaximal. Indeed, take an element bi = 1 − ai xi in each monoid 1 + ai A and an element am in the monoid aN . We need to prove that the ideal m m = ha m we have 1 = ai xi , thus Q , b1 , . . . , bn i contains 1. However, modulo 1 = a i xi = ax, and we finally obtain 1 = 1m = am xm = 0. Here is a characterization from classical mathematics. 2.2. Fact∗. Let S1 , . . ., Sn be monoids in a nontrivial ring A (i.e., 1 6=A 0). The monoids Si are comaximal if and only if for every prime ideal (resp. for every maximal ideal) p one of the Si is contained within A \ p. J Let p be a prime ideal. If none of the Si ’s are contained in A \ p then for each i there exists some si ∈ Si ∩ p. Consequently, s1 , . . . , sn are not comaximal. Conversely, suppose that for every maximal ideal m one of the Si ’s is contained within A \ m and let s1 ∈ S1 , . . ., sn ∈ Sn then the ideal hs1 , . . . , sn i is not contained in any maximal ideal. Thus it contains 1.  We denote by Am×p or Mm,p (A) the A-module of m-by-p matrices with coefficients in A, and Mn (A) means Mn,n (A). The group of invertible matrices is denoted by GLn (A), the subgroup consisting of the matrices of determinant 1 is denoted by SLn (A). The subset of Mn (A) consisting of the projection matrices (i.e. matrices F such that F 2 = F ) is denoted by AGn (A). The acronyms are explained as follows: GL for linear group, SL for special linear group and AG for affine Grassmannian. 2.3. Concrete local-global principle. (Basic local-global principle, concrete gluing of solutions of a system of linear equations) Let S1 , . . ., Sn be comaximal monoids of A, B a matrix of Am×p and C a column vector of Am . Then the following properties are equivalent. 1. The system of linear equations BX = C has a solution in Ap . 2. For i ∈ J1..nK, the system of linear equations BX = C has a solution in ApSi . This principle also holds for systems of linear equations with coefficients in an A-module M . J 1 ⇒ 2. Clearly true. 2 ⇒ 1. For each i, we have Yi ∈ Ap and si ∈ Si such that B(Yi /si ) = C §2. The basic local-global principle 23 in Am that we have some ti ∈ Si such that ti BYi = si ti C Si . This means P P in Am . Using i ai si ti = 1, we get a solution in A: X = i ai ti Yi .  Remark. As to the merits, this concrete local-global principle boils down to the following remark when speaking of an integral ring (a ring is said to be integral if every element is null or regular2 ). If every si is regular and if x1 x2 xn s1 = s2 = · · · = sn , P then the common value of these fractions, when i si ui = 1, is also equal to x1 u1 + · · · + xn un = x1 u1 + · · · + xn un . s1 u1 + · · · + sn un This principle could then also be called “the art of shrewdly getting rid of denominators.” Arguably, the most remarkable thing is that this holds in full generality, even if the ring is not integral. Our thanks go to Claude Chevalley for introducing arbitrary localizations. In some scholarly works, we find the following reformulation (at the cost of an information loss L regarding the concreteness of the result): the A-module m A1+m (where m ranges over every maximal ideal of A) is faithfully flat. 2.4. Corollary. Let S1 , . . ., Sn be comaximal monoids of A, x ∈ A and a, b be two finitely generated ideals of A. Then, we have the following equivalences. 1. x = 0 in A if and only if for i ∈ J1..nK, x = 0 on ASi . 2. x is regular in A if and only if for i ∈ J1..nK, x is regular in ASi . 3. a = h1i in A if and only if for i ∈ J1..nK, a = h1i in ASi . 4. a ⊆ b in A if and only if for i ∈ J1..nK, a ⊆ b in ASi . J The proof is left to the reader.  Remark. In fact, as we will see in the local-global principle 6.7, ideals do not need to be finitely generated. Examples Let us give some simple examples of applications of the basic concrete local-global principle. A typical application of the first example (Fact 2.5) is where the module M in the statement is a nonzero ideal of a Dedekind ring. A module M is said to be locally cyclic if after each localization at comaximal monoids S1 , . . . , Sn , it is generated by a single element. 2 This notion is discussed in further detail on page 202. 24 II. The basic local-global principle and systems of linear equations 2.5. Fact. Let M = ha, bi = hc, di be a module with two generator sets. Suppose this module is faithful and locally cyclic. Then, there exists a matrix A ∈ SL2 (A) such that [ a b ] A = [ c d ].   J If A = x y , the cotransposed matrix must be equal to   z t t −y B = Adj A = . −z x In particular, we mean to solve the following system of linear equations: [ a b ] A = [ c d ], [c d]B = [a b] (∗) where the unknowns are x, y, z, t. Note that A B = det(A) I2 . Conversely, if this system oflinear equations is solved, we will have [ a b ] = [ a b ] A B. So 1 − det(A) [ a b ] = 0, and since the module is faithful, det(A) = 1. We have some comaximal monoids Si such that MSi is generated by gi /1 for some gi ∈ M . To solve the system of linear equations it suffices to solve it after localizing at each of the Si ’s. In the ring ASi , we have  the equalities a = αi gi , b = βi gi , gi = µi a + νi b, thus 1 − (αi µi + βi νi ) gi = 0. The module MSi = hgi i stays faithful, so 1 = αi µi + βi νi in ASi . Therefore:   µi −βi [ a b ] Ei = [ gi 0 ] with Ei = and det(Ei ) = 1. νi αi Similarly we obtain [ c d ] Ci = [ gi 0 ] for some matrix Ci with determinant 1 in ASi . By taking Ai = Ei Adj(Ci ) we get [ a b ] Ai = [ c d ] and det(Ai ) = 1 in ASi . Thus the system of linear equations (∗) has a solution in ASi .  Our second example is given by the Gauss-Joyal Lemma: point 1 in the following lemma is proven by applying the basic local-global principle. Before stating this result, we first need to recall some definitions. An element a of a ring is said to be nilpotent if an = 0 some integer n ∈ N. The nilpotent elements of a ring A form an ideal called the nilradical, or the nilpotent radical of the ring. A ring is reduced if its nilradical equals 0. More generally, the nilradical of an ideal a of A is the ideal consisting of elements x ∈ A, such that each √ x has some power in a. We denote the nilradical of an ideal a of A by a or by DA (a). We also use DA (x) to denote DA (hxi). An ideal a is called a radical ideal when it is equal to its nilradical. The ring A/DA (0) = Ared is the reduced ring associated with A. For some polynomial f of A[X1 , . . . , Xn ] = A[X], we call the content of f and denote by cA,X (f ) or c(f ) the ideal generated by the coefficients of f . The polynomial f is said to be primitive (in X) when cA,X (f ) = h1i. Pn When a polynomial f of A[X] is given in the form f (X) = k=0 ak X k , we say that n is the formal degree of f , and an is its formally leading coefficient. Finally, if f is null, its formal degree is −1. §2. The basic local-global principle 25 2.6. Lemma. 1. (Poor man’s Gauss-Joyal) The product of two primitive polynomials is a primitive polynomial. 2. (Gauss-Joyal) For f , g ∈ A[X], there exists a p ∈ N such that p c(f )c(g) ⊆ c(f g). 3. (Nilpotent elements in A[X]) An element f of A[X] is nilpotent if and only if all of its coefficients are nilpotent. In other words, we have the following equality: (A[X])red = Ared [X]. 4. (Invertible elements in A[X]) An element f of A[X] is invertible if and only if f (0) is invertible and f − f (0) is nilpotent. In other words, × A[X] = A× + DA (0)[X] and in particular (Ared [X])× = (Ared )× . J Note that, a priori, we have the following inclusion: c(f g) ⊆ c(f )c(g). 1. For univariate polynomials f, g ∈ A[X]. We have c(f ) = c(g) = h1i. Consider the quotient ring B = A DA c(f g) . We need to prove that this ring is trivial. It suffices to do so after localization at comaximal elements, for example at the coefficients of f . That is, we can suppose that some coefficient of f is invertible. Let us give a proof of a sufficiently general example. Suppose f (X) = a + bX + X 2 + cX 3 + . . . and g(X) = g0 + g1 X + g2 X 2 + . . . In the ring B we have ag0 = 0, ag1 +bg0 = 0, ag2 +bg1 +g0 = 0, thus bg02 = 0, then g03 = 0, thus g0 = 0. We then have g = Xh and c(f g) = c(f h). Moreover, since the formal degree of h is smaller than that of g, we can conclude by induction on the formal degree that g = 0. As c(g) = h1i, the ring is trivial. 2. For univariate polynomials. Consider a coefficient a of f and a coefficient b of g. We prove that ab is nilpotent in B = A/c(f g) . This boils down to proving that C = B[1/(ab)] is trivial. However, in C, f and g are primitive, so point 1 implies that C is trivial. 2 and 1. General case. Point 2. is proved by induction on the number of variables from the univariate case. Indeed, for f ∈ A[X][Y ] we have the equality cA,X,Y (f ) = cA,X (h) | h ∈ cA[X],Y (f ) . Then we deduce point 1 from it. 3. Note that f 2 = 0 implies c(f )p = 0 for some p from point 2. 4. The condition is sufficient: in a ring, if x is nilpotent, then 1 − x is invertible because (1 − x)(1 + x + · · · + xn ) = 1 − xn+1 . Thus if u is invertible and x nilpotent, u + x is invertible. To see that the condition is necessary it suffices to deal with the univariate case (we conclude by induction on the number of variables). Let f g = 1 with f = f (0) + XF (X) and g = g(0) + XG(X). We obtain f (0)g(0) = 1. Let n be the formal degree of F and m that of G. We must prove that F and G are nilpotent. 26 II. The basic local-global principle and systems of linear equations If n = −1 or m = −1, the result is obvious. We reason by induction on n + m assuming that n, m > 0, Fn and Gm being the formally leading coefficients. By induction hypothesis the result is obtained for the rings (A/hFn i)[X] and (A/hGm i)[X]. Since Fn Gm = 0, we can conclude with the following lemma. NB: some details are given in exercise VII -8.  2.7. Lemma. Let a, b, c ∈ A. If c is nilpotent modulo a and modulo b, and if ab = 0, then c is nilpotent. J We have cn = xa and cm = yb therefore cn+m = xyab = 0.  Remark. We can reformulate this lemma in a more structural manner as follows. For two ideals a, b consider the canonical morphism A → A/a × A/b whose kernel is a ∩ b. If an element of A is nilpotent modulo a and modulo b, it is also nilpotent modulo a ∩ b, thus also modulo ab, as (a ∩ b)2 ⊆ ab. This touches on the “closed covering principle,” see page 647. Finite character properties The basic concrete local-global principle can be reformulated as a “transfer principle.” 2.8. Basic Transfer principle. For some system of linear equations in a ring A the elements s such that the system of linear equations has a solution in A[1/s] form an ideal of A. Firstly, we invite the reader to prove that this transfer principle is equivalent to the basic concrete local-global principle. We now provide a detailed analysis of what is going on. The equivalence actually relies on the following notion. 2.9. Definition. A property P concerning commutative rings and modules is called a finite character property if it is preserved by localization and if, when it holds for S −1 A, then it also holds for A[1/s] for some s ∈ S. 2.10. Fact. Let P be a finite character property. Then the concrete local-global principle for P is equivalent to the transfer principle for P. In other words, the following principles are equivalent. 1. If the property P is true after localization at every monoid in a family of comaximal monoids, then it is true. 2. The set of elements s (in a given ring) such that the property P is true after localization at s is an ideal. §2. The basic local-global principle 27 J Let A be a ring which provides the context for the property P. Now consider the set I = { s ∈ A | P is true for As }. 1 ⇒ 2. Suppose 1. Let s, t ∈ I, a, b ∈ A and u = as + bt. The elements s and t are comaximal in Au . Since P is closed under localization, P is true for (Au )s = (As )u and (Au )t = (At )u . By applying 1, P is true for Au , i.e., u = as + bt ∈ I. 2 ⇒ 1. Suppose 2 and let (Si ) be the considered family of comaximal monoids. Since we have a property of finite character, we find in each Si an element si such that P is true after localization at si . Since the Si ’s are comaximal the si ’s are comaximal elements. By applying 2, we get I = h1i. Finally, the localization at 1 provides the answer.  Most of the concrete local-global principles which we will consider in this manuscript apply to finite character properties. One may thus replace any concrete local-global principle with its corresponding transfer principle. For finite character properties we have an equivalence in classical mathematics between two notions, one concrete and the other abstract. In Chapters XV and XVII we shall use the concrete version. 2.11. Fact∗. Let P be a finite character property. Then, in classical mathematics the following properties are equivalent. 1. There exist comaximal monoids such that the property P is true after localization at each monoid. 2. The property P is true after localization at every maximal ideal. J 1 ⇒ 2. Let (Si ) be the family of comaximal monoids under consideration. Since it is a finite character property, we find in each Si some element si such that P is true after localization at si . Since the Si ’s are comaximal the si ’s are comaximal elements. Let m be a maximal ideal. Some si is not in m. The localization at 1 + m is a localization of the localization at si . Thus P is true after localization at 1 + m. 2 ⇒ 1. For each maximal ideal m select an sm ∈ / m such that the property P is true after localization at sm . The set of sm generates an ideal which is not contained in any maximal ideal, therefore it is the ideal h1i. A finite family of some of these sm is then a system of comaximal elements. The family of monoids generated by these elements is suitable.  We immediately obtain the following corollary. 28 II. The basic local-global principle and systems of linear equations 2.12. Fact∗. Let P a finite character property. Then the concrete localglobal principle for P is equivalent (in classical mathematics) to the abstract local-global principle for P. In other words, the following principles are equivalent. 1. If the property P is true after localization at each monoid in a family of comaximal monoids, then it is true. 2. If the property P is true after localization at every maximal ideal, then it is true. Remark. Let us give a direct proof of the equivalence from classical mathematics between the transfer principle and the abstract local-global principle for the property P (which we assume is of finite character). Transfer ⇒ Abstract. Suppose the property is true after localization at every maximal ideal. The ideal given by the transfer principle cannot be strict,3 otherwise it would be contained in a maximal ideal m, which contradicts the fact that the property is true after localization at some s ∈ / m. Abstract ⇒ Transfer. For each maximal ideal m select an sm ∈ / m such that the property P is true after localization at sm . The set of sm generates an ideal not contained in any maximal ideal, thus it is the ideal h1i. We can then conclude by the transfer principle: the property is true after localization at 1! Comment. The advantage of localizing at a prime ideal is that the result is a local ring, which has very nice properties (see Chapter IX). The disadvantage is that the proofs which use an abstract local-global principle instead of its corresponding concrete local-global principle are non-constructive to the extent that the only access we have (in a general situation) to the prime ideals is given by Zorn’s Lemma. Furthermore even Fact 2.2 is obtained by contradiction, which removes any algorithmic trait from the corresponding “construction.” Some concrete local-global principles do not have a corresponding abstract version as the property they are affiliated with is not of finite character. This is the case with the concrete local-global principles for finitely generated modules and for coherent rings (3.6 and 3.5 respectively). We will systematically make efficient and constructive use of the basic concrete local-global principle and its consequences. Often, we will draw inspiration from some abstract local-global principle’s proof found in classical mathematics. In Chapter XV we will develop a general local-global machinery to fully exploit the classical local-global proofs in a constructive manner. 3 An ideal a is said to be strict when 1 ∈ / a. §3. Coherent rings and modules 29 Abstract version of the basic local-global principle Since we are dealing with a finite character property, classical mathematics provides the following abstract version of the basic local-global principle. 2.13. Abstract local-global principle∗ . (Abstract basic local-global principle: abstract patching of solutions of a system of linear equations) Let B be a matrix ∈ Am×p and C a column vector of Am . Then the following properties are equivalent. 1. The system of linear equations BX = C has a solution in Ap . 2. For every maximal ideal m the system of linear equations BX = C has a solution in (A1+m )p . Forcing comaximality Localization at an element s ∈ A is a fundamental operation in commutative algebra for forcing the invertibility of s. Sometimes you may need to make n elements a1 , . . . , an of a ring A comaximal. To this end we introduce the ring  P B = A[X1 , . . . , Xn ] 1 − i ai Xi = A[x1 , . . . , xn ]. 2.14. Lemma. The kernel of the natural homomorphism ψ : A → B is the ideal (0 : a∞ ), where a = ha1 , . . . , an i. In particular, the homomorphism is injective if and only if Ann a = 0. J Let c be an element of the kernel. Considering the isomorphism B/h(xj )j6=i i ' A[1/ai ], we have c =A[1/ai ] 0. Thus c ∈ (0 : a∞ i ). From this we deduce that c ∈ (0 : a∞ ). Conversely if c ∈ (0 : a∞P ), there exists an r such that cari = 0 for each i, and therefore ψ(c) = ψ(c)( ai xi )nr = 0.  3. Coherent rings and modules A fundamental notion A ring A is called coherent if every linear equation LX = 0 with L ∈ A1×n and X ∈ An×1 has for solutions the elements of a finitely generated A-submodule of An×1 . In other words, ( ∀n ∈ N, ∀L ∈ A1×n , ∃m ∈ N, ∃G ∈ An×m , ∀X ∈ An×1 , (1) LX = 0 ⇐⇒ ∃Y ∈ Am×1 , X = GY . This means that we have some control over the solution space of the homogeneous system of linear equations LX = 0. 30 II. The basic local-global principle and systems of linear equations Clearly, a finite product of rings is coherent if and only if each factor is coherent. More generally, given V = (v1 , . . . , vn ) ∈ M n where M is an A-module, the A-submodule of An defined as the kernel of the linear map P V̆ : An −→ M, (x1 , . . . , xn ) 7−→ i xi vi is called the syzygy module between the vi ’s. More specifically, we say that it is the syzygy module of (the vector) V . An element (x1 , . . . , xn ) of this kernel is called a linear dependence relation or a syzygy between the vi ’s. When V is a generator set of M the syzygy module between the vi ’s is often called the (first) syzygy module of M . By slight abuse of terminology, we indifferently refer to the term syzygy P to mean the equality i xi vi = 0 or the element (x1 , . . . , xn ) ∈ An . The A-module M is said to be coherent if for every V ∈ M n the syzygy module is finitely generated, in other words if we have: ( ∀n ∈ N, ∀V ∈ M n×1 , ∃m ∈ N, ∃G ∈ Am×n , ∀X ∈ A1×n , (2) XV = 0 ⇐⇒ ∃Y ∈ A1×m , X = Y G . A ring A is then coherent if and only if it is coherent as an A-module. Notice that we used a transposed notation in equation (2) with respect to P P equation (1). This was to avoid writing the sum i xi vi as i vi xi with vi ∈ M and xi ∈ A. For the remainder of this work, we will generally not use this transposition, as it seems preferable to keep to the usual form AX = V for a system of linear equations, even when the matrices A and V have their coefficients in a module M . 3.1. Proposition. Let M be a coherent A-module. Any homogeneous system of linear equations BX = 0, where B ∈ M k×n and X ∈ An×1 , has the elements of a finitely generated A-submodule of An×1 as its solution set. J The general proof is by induction on the number of linear equations k, where the procedure is as follows: solve the first equation, then substitute the obtained general solution into the second equation, and so on. So let us for example do the proof for k = 2 and take a closer look at this process. The matrix B is composed of the rows L and L0 . We then have a matrix G such that LX = 0 ⇐⇒ ∃Y ∈ Am×1 , X = GY. We now need to solve L0 GY = 0 which is equivalent to the existence of a column vector Z such that Y = G0 Z for a suitable matrix G0 . Thus BX = 0 if and only if X can be expressed as GG0 Z.  §3. Coherent rings and modules 31 The above proposition is particularly important for systems of linear equations on A (i.e. when M = A). Comment. The notion of a coherent ring is then fundamental from an algorithmic point of view in commutative algebra. Usually, this notion is hidden behind that of a Noetherian ring,4 and rarely put forward as we have here. In classical mathematics every Noetherian ring A is coherent because every submodule of An is finitely generated, and every finitely generated module is coherent for the same reason. Furthermore, we have the Hilbert theorem, which states that if A is Noetherian, every finitely generated A-algebra is also a Noetherian ring, whereas the same statement does not hold if one replaces “Noetherian” with “coherent.” From an algorithmic point of view however, it seems impossible to find a satisfying constructive formulation of Noetherianity which implies coherence (see exercise 8), and coherence is often the most important property from an algorithmic point of view. Consequently, coherence cannot be implied (as is the case in classical mathematics) when we speak of a Noetherian ring or module. The classical theorem stating that in a Noetherian ring every finitely generated A-module is Noetherian is often advantageously replaced by the following constructive theorem.5 Over a coherent (resp. Noetherian coherent) ring every finitely presented A-module is coherent (resp. Noetherian coherent). In fact, as this example shows, Noetherianity is often an unnecessarily strong assumption. The following definition of a Noetherian module is equivalent in classical mathematics to the usual definition but it is much better adapted to constructive algebra (only the trivial ring constructively satisfies the usual definition). 3.2. Definition. (Richman-Seidenberg theory of Noetherianity, [156, 166]) An A-module is called Noetherian if it satisfies the following ascending chain condition: any ascending sequence of finitely generated submodules has two equal consecutive terms. A ring A is called Noetherian if it is Noetherian as an A-module. Here is a corollary of proposition 3.1. 4 The 5 For constructive definition of this notion is given after this comment. the non-Noetherian version see Theorem IV -4.3, and for the Noetherian version see [MRR, corollary 3.2.8 p. 83]. 32 II. The basic local-global principle and systems of linear equations 3.3. Corollary. (Conductors and coherence) Let A be a coherent ring. Then, the conductor of a finitely generated ideal into another is a finitely generated ideal. More generally, if N and P are two finitely generated submodules of a coherent A-module, then (P : N ) is a finitely generated ideal. 3.4. Theorem. An A-module M is coherent if and only if the following two conditions hold. 1. The intersection of two arbitrary finitely generated submodules is a finitely generated module. 2. The annihilator of an arbitrary element is a finitely generated ideal. J The first condition is necessary. Let g1 , . . . , gn be the generators of the first submodule and gn+1 , . . . , gm be the generators of the second. Taking Pm an element of the intersection reduces to finding a syzygy i=1 αi gi = 0 between the gi ’s. To such a syzygy α = (α1 , . . . , αm ) ∈ Am corresponds the element ϕ(α) = α1 g1 + · · · + αn gn = −(αn+1 gn+1 + · · · + αm gm ) in the intersection. Thus if S is a generator set for the syzygies between the gi ’s, ϕ(S) generates the intersection of the two submodules. The second condition is necessary by definition. The two conditions together are sufficient. Here we give the key idea of the proof and leave the details to the reader. Consider the syzygy module of some L ∈ M n . We perform induction on n. For n = 1 the second condition applies and gives a generator set for the syzygies connecting the single element of L. Suppose that the syzygy module of every L ∈ M n is finitely generated and consider some L0 ∈ M n+1 . Let k ∈ J1..nK, we write L0 = L1 • L2 where L1 = (a1 , . . . , ak ) and L2 = (ak+1 , . . . , an+1 ). Let M1 = ha1 , . . . , ak i Pn+1 and M2 = hak+1 , . . . , an+1 i. Taking a syzygy i=1 αi ai = 0 reduces to taking an element of the intersection M1 ∩ M2 (as above). We thus obtain a generator set for the syzygies between the ai ’s by taking the union of the three following systems of syzygies: the system of syzygies between the elements of L1 , the system of syzygies between the elements of L2 , and that which comes from the generator set of the intersection M1 ∩ M2 .  In particular, a ring is coherent if and only if on the one hand the intersection of the two finitely generated ideals is always a finitely generated ideal, and on the other hand the annihilator of an element is always a finitely generated ideal. Examples. If K is a discrete field, every finitely presented algebra over K is a coherent ring (Theorem VII -1.10). It is also clear that every Bézout domain (cf. page 206) is a coherent ring. §3. Coherent rings and modules 33 Local character of coherence Coherence is a local notion in the following sense. 3.5. Concrete local-global principle. (Coherent modules) Consider a ring A, let S1 , . . ., Sn be comaximal monoids and M an A-module. 1. The module M is coherent if and only if each MSi is coherent. 2. The ring A is coherent if and only if each ASi is coherent. J Let a = (a1 , . . . , am ) ∈ M m , and N ⊆ Am be the syzygy module of a. We find that for any monoid S, NS is the syzygy module of a in MS . This brings us to prove the following concrete local-global principle.  3.6. Concrete local-global principle. (Finitely generated modules) Let S1 , . . ., Sn be comaximal monoids of A and M an A-module. Then, M is finitely generated if and only if each MSi is finitely generated. J Suppose that MSi is a finitely generated ASi -module for each i. Let us prove that M is finitely generated. Let gi,1 , . . . , gi,qi be elements of M which generate MSi . Let x ∈ M be arbitrary. For each i we have some si ∈ Si and some ai,j ∈ A such that: si x = ai,1 gi,1 + · · · + ai,qi gi,qi in M. Pn When writing i=1 bi si = 1, we observe that x is a linear combination of the gi,j ’s.  Remark. Consider the Z-submodule M of Q generated by the elements 1/p where p ranges over the set of prime numbers. We can easily check that M is not finitely generated but that it becomes finitely generated after localization at any prime ideal. This means that the concrete local-global principle 3.6 does not have a corresponding “abstract” version, in which the localization at some comaximal monoids would be replaced by the localization at every prime ideal. Actually, the property P for a module to be finitely generated is not a finite character property, as we can see with the module M above and the monoids Z \ {0} or 1 + pZ. Moreover, the property satisfies the transfer principle, but it so happens here that it is of no use. About the equality and the membership tests We now introduce several constructive notions relating to the equality test and the membership test. A set E is well defined when we have indicated how to construct its elements and when we have constructed an equivalence relation which defines the equality of two elements in a set. We denote by x = y the equality in E, or x =E y if necessary. The set E is called discrete when the following 34 II. The basic local-global principle and systems of linear equations axiom holds ∀x, y ∈ E x = y or ¬(x = y). Classically, every set is discrete, as the “or” present in the definition is understood in an abstract manner. Constructively, this same “or” is understood according to the usual language’s meaning: at least one of the two alternatives must occur. It is thus an “or” of an algorithmic nature. In short, a set is discrete if we have a test for the equality of two arbitrary elements of this set. If we want to be more precise and explain in detail what comprises an equality test in the set E, we will say that it is a construction which, from two given elements of E, provides a “yes” or “no” answer to the posed question (are these elements equal?). However, we could not go into much further detail. In constructive mathematics the notions of integers and of construction are basic concepts. They can be explained and commented on, but not strictly speaking “defined.” The constructive meaning of the “or” and that of the “there exists” are as such directly dependent of the notion of construction,6 which we do not attempt to define. A discrete field is simply a ring where the following axiom is satisfied: ∀x ∈ A x = 0 or x ∈ A× (3) The trivial ring is a discrete field. Remark. The Chinese pivot method (often called Gaussian elimination) works algorithmically with discrete fields. This means that the basic linear algebra is explicit over discrete fields. Note that a discrete field A is a discrete set if and only if the test “1 =A 0?” is explicit.7 Sometimes, however, it is known that a ring constructed during an algorithm is a discrete field without knowing whether it is trivial or not. If A is a nontrivial discrete field, the statement “M is a free finite dimensional vector space” is more precise than the statement “M is a finitely generated 6 In classical mathematics we may wish to define the notion of construction from the notion of a “correct program.” However, what we define in this way is rather the notion of “mechanized construction,” and especially in the notion of a “correct program,” there is the fact that the program must halt after a finite number of steps. This hides a “there exists,” which in constructive mathematics refers in an irreducible manner to the notion of construction. On this matter, see Section A -4 of the Annex. 7 The general notion of a field in constructive mathematics will be defined page 487. We will then see that if a field is a discrete set, then it is a discrete field. §3. Coherent rings and modules 35 vector space” as in the first case knowing how to extract a basis of the generator set is similar to having a test of linear independence in M . A subset P of a set E is said to be detachable when the following property is satisfied: ∀x ∈ E x ∈ P or ¬(x ∈ P ). It amounts to the same to take a detachable part P of E or to take its characteristic function χP : E → {0, 1}. In constructive mathematics, if two sets E and F are correctly defined, then so is the set of functions from E to F , which is denoted by F E . Consequently, the set of detachable subsets of a set E is itself correctly E defined since it is identified with the set {0, 1} of characteristic functions over E. Strongly discrete coherent rings and modules A ring (resp. a module) is said to be strongly discrete when the finitely generated ideals (resp. the finitely generated submodules) are detachable, i.e. if the quotients by the finitely generated ideals (resp. by the finitely generated submodules) are discrete. This means that we have a test for deciding whether a linear equation LX = c has a solution or not, and by computing one in the affirmative case. A key result in constructive algebra and Computer Algebra states that Z[X1 , . . . , Xn ] is a strongly discrete coherent ring. More generally, we have the following constructive version of the Hilbert theorem (see [MRR, Adams & Loustaunau]). If A is a strongly discrete Noetherian coherent ring, so is any finitely presented A-algebra. The following proposition is proven similarly to proposition 3.1. 3.7. Proposition. Over a strongly discrete coherent module M , every system of linear equations BX = C (B ∈ M k×n , C ∈ M k×1 , X ∈ An×1 ) can be tested. In the affirmative case, a particular solution X0 can be computed. Furthermore the solutions X are all the elements of X0 + N where N is a finitely generated A-submodule of An×1 . 36 II. The basic local-global principle and systems of linear equations 4. Fundamental systems of orthogonal idempotents An element e of a ring is said to be idempotent if e2 = e. In this case, 1 − e is also an idempotent, called the complementary idempotent of e, or the complement of e. For two idempotents e1 and e2 , we have he1 i ∩ he2 i = he1 e2 i , he1 i + he2 i = he1 , e2 i = he1 + e2 − e1 e2 i , where e1 e2 and e1 +e2 −e1 e2 are idempotents. Two idempotents e1 and e2 are said to be orthogonal when e1 e2 = 0. We then have he1 i + he2 i = he1 + e2 i. A ring is said to be connected if every idempotent is equal to 0 or 1. In the following, we implicitly use the following obvious fact: for an idempotent e and an element x, e divides x if and only if x = ex. The presence of an idempotent 6= 0, 1 means that the ring A is isomorphic to a product of two rings A1 and A2 , and that any computation in A can be split into two “simpler” computations in A1 and A2 . We describe the situation as follows. 4.1. Fact. For every isomorphism λ : A → A1 × A2 , there exists a unique element e ∈ A satisfying the following properties. 1. The element e is idempotent (its complement is denoted by f = 1 − e). 2. The homomorphism A → A1 identifies A1 with A/hei and with A[1/f ]. 3. The homomorphism A → A2 identifies A2 with A/hf i and with A[1/e]. Conversely, if e is an idempotent and f is its complement, the canonical homomorphism A → A/hei × A/hf i is an isomorphism. J The element e is defined by λ(e) = (0, 1).  Here are some often useful facts. 4.2. Fact. Let e be an idempotent of A, f = 1 − e and M be an A-module. 1. The monoids eN = {1, e} and 1 + f A have the same saturation. 2. As an A-module, A is the direct sum of hei = eA and hf i = f A. The ideal eA is a ring where e is a neutral element of the multiplication. We then have three isomorphic rings A[1/e] = (1 + f A)−1 A ' A/hf i ' eA. These isomorphisms stem from A → A[1/e] A → A/hf i A → eA the three canonical mappings : x 7→ x/1, : x 7→ x mod hf i , : x 7→ e x, which are surjective and have the same kernel. §4. Fundamental systems of orthogonal idempotents 37 3. We have three isomorphic A-modules M [1/e] ' M/f M ' eM. These isomorphisms stem from the three canonical mappings M → M [1/e] : x 7→ x/1, M → M/f M : x 7→ x mod hf i , M → eM : x 7→ e x, which are surjective and have the same kernel. In addition, care must be taken that the ideal eA, which is a ring with e as its neutral element, is not a subring of A (unless e = 1). In a ring A a fundamental system of orthogonal idempotents is a list (e1 , . . . , en ) of elements of A which satisfy the following equalities: Pn ei ej = 0 for i 6= j, and i=1 ei = 1. This implies that the ei ’s are idempotents. We do not claim that none of them are null.8 4.3. Theorem. (Fundamental systems of orthogonal idempotents) Let (e1 , . . . , en ) be a fundamental system of orthogonal idempotents of a ring A, and M be an A-module. Note that Ai = A/h1 − ei i ' A[1/ei ]. Then: A ' A1 × · · · × An , M = e1 M ⊕ · · · ⊕ en M. Take note that e1 M is an A-module and an A1 -module, but that it is not an A2 -module (unless it is null). The following lemma gives a converse of Theorem 4.3. L 4.4. Lemma. Let (ai )i∈J1..nK be ideals of A. We have A = i∈J1..nK ai if and only if there exists a fundamental system of orthogonal idempotents (ei )i∈J1..nK such that ai = hei i for i ∈ J1..nK. In this case, the fundamental system of orthogonal idempotents is uniquely determined. L P J Assume that A = i∈J1..nK ai . We have ei ∈ ai such that i ei = 1, and since ei ej ∈ ai ∩aj = {0} for i = 6 j, we indeed obtain a fundamental system of P orthogonal idempotents. Furthermore if x ∈ aj , we have x = x i ei = xej and thus aj = hej i. The converse is immediate. The uniqueness follows from that of writing an element as a direct sum.  Next we give two very useful lemmas. 8 This is much nicer to obtain uniform statements. Furthermore this is virtually necessary when we do not have at our disposal an equality to zero test for idempotents in the given ring. 38 II. The basic local-global principle and systems of linear equations 4.5. Lemma. (Lemma of the ideal generated by an idempotent) An ideal a is generated by an idempotent if and only if a + Ann a = h1i . J First, if e is idempotent, we have Ann hei = h1 − ei. For the reciprocal implication, let e ∈ a such that 1 − e ∈ Ann a. Then e(1 − e) = 0, therefore e is idempotent, and for every y ∈ a, y = ye, thus a ⊆ hei .  4.6. Lemma. (Lemma of the finitely generated idempotent ideal) If a is a finitely generated idempotent ideal (i.e., a = a2 ) in A, then a = hei where e2 = e is entirely determined by a. J We use the determinant trick. Consider a generator set (a1 , . . . aq ) of a and the column vector a = t[ a1 · · · aq ]. Since aj ∈ a2 for j ∈ J1..qK, there exists a C ∈ Mq (a) such that a = C a, so (Iq − C) a = 0 and det(Iq − C) a = 0. However, det(Iq − C) = 1 − e where e ∈ a. Hence (1 − e)a = 0, and we apply Lemma 4.5. Finally, the uniqueness of e follows immediately from Lemma 4.4.  Let us finally recall the Chinese remainder theorem, a very efficient tool which hides a fundamental system of orthogonal idempotents. Some ideals b1 , . . . , b` of a ring A are called comaximal when b1 + · · · + b` = h1i. 4.7. Chinese Remainder Theorem. T Let (ai )i∈J1..nK be pairwise comaximal ideals in A and a = i ai . Q Q Then a = i ai , and the canonical mapping A/a → i A/ai is an isomorphism. Now, there exist e1 , . . ., en in A such that ai = a + h1 − ei i and the πA,a (ei )’s form a fundamental system of orthogonal idempotents of A/a. As a corollary we obtain the following result. 4.8. Lemma. (Kernels’ Lemma) Let P = P1 · · · P` ∈ A[X] and an A-linear map ϕ : M → M satisfying P (ϕ) = the Pi ’s are pairwise comaximal and let Ki =  0. Assume Q Ker Pi (ϕ) , Qi = j6=i Pj . Then we have    L L` Ki = Im Qi (ϕ) , M = j=1 Kj and Im Pi (ϕ) = Ker Qi (ϕ) = j6=i Ki . J Consider the ring B = A[X]/hP i. The module M can be seen as a B-module by the operation (Q, y) 7→ Q · y = Q(ϕ)(y). We then apply the Chinese remainder theorem and Theorem 4.3. This proof summarizes the following computation. From the equalities Uij Pi + UP ji Pj = 1, we get the equalities Ui Pi + Vi Qi = 1 together with an equality i Wi Qi = 1. Let pi = Pi (ϕ), qi = Qi (ϕ), and so on. Then, every obtained endomorphism commutes and we obtain the equalities P pi qi = 0, ui pi + vi qi = IdM , i wi qi = IdM . The claimed result readily follows.  §5. A little exterior algebra 39 5. A little exterior algebra That a homogeneous system of n linear equations with n unknowns admits (over a discrete field) a nontrivial solution if and only if the determinant of the system is zero, here is a fact of utmost importance whose scope we will never finish measuring. Anonymous Eliminate, eliminate, eliminate Eliminate the eliminators of elimination theory! Mathematical poem (extract) S. Abhyankar Some simple examples illustrating these ideas are given in this section. Free submodules as direct summands (Splitting Off) Let k ∈ N. A free module of rank k is by definition an A-module isomorphic to Ak . If k is not specified, we will say free module of finite rank. When A is a discrete field we speak of a finite dimensional vector space or a finite rank vector space interchangeably. The modules whose structure is the simplest are the free modules of finite rank. We are thus interested in the possibility of constructing an arbitrary module M in the form L ⊕ N where L is a free module of finite rank. A (partial) answer to this question is given by the exterior algebra. 5.1. Proposition. (Splitting Off) Let a1 , . . . , ak be elements of an A-module M , then the following properties are equivalent. 1. The submodule L = ha1 , . . . , ak i of M is free with basis (a1 , . . . , ak ) and is a direct summand of M . 2. There exists a k-multilinear alternating form ϕ : M k → A which satisfies the equality ϕ(a1 , . . . , ak ) = 1. J 1 ⇒ 2. If L ⊕ N = M , if π : M → L is the projection parallel to N , and if θj : L → A is the j-th coordinate form for the basis (a1 , . . . , ak ), we   define  ϕ(x1 , . . . , xk ) = det θj (π(xi )) i,j∈J1..kK . 2 ⇒ 1. We define the linear map π : M → M as Xk π(x) = ϕ(a1 , . . . , x, . . . , ak ) aj . j=1 | {z } (x is in position j) We immediately have π(ai ) = ai P and Im π ⊆ L := ha1 , . . . , ak i, thus π 2 = π and Im π = L. Finally, if x = j λj aj = 0, then ϕ(a1 , . . . , x, . . . , ak ) = λj = 0 (with x in position j).  40 II. The basic local-global principle and systems of linear equations Special case: for k = 1 we say that the element a1 of M is unimodular when there exists a linear form ϕ : M → A such that ϕ(a1 ) = 1. The vector b = (b1 , . . . , bn ) ∈ An is unimodular if and only if the bi ’s are comaximal. In this case we also say that the sequence (b1 , . . . , bn ) is unimodular. The rank of a free module As we will see, the rank of a free module is a well-determined integer if the ring is nontrivial. In other words, two A-modules M ' Am and P ' Ap with m 6= p can only be isomorphic if 1 =A 0. We will use the notation rkA (M ) = k (or rk(M ) = k if A is clear from the context) to indicate that a (supposedly free) module has rank k. A scholarly proof consists to say that, if m > p, the m-th exterior power of P is {0} whereas that of M is isomorphic to A (this is essentially the proof for Corollary 5.23). The same proof can be presented in a more elementary way as follows. First recall the basic Cramer formula. If B is a square matrix of order n, we e or Adj B the cotransposed matrix (sometimes called adjoint). denote by B The elementary form of Cramer’s identities is then expressed as: A Adj(A) = Adj(A) A = det(A) In . (4) This formula, in combination with the product formula det(AB) = det(A) det(B), has a couple of implications regarding square matrices. First, that a square matrix A is invertible on one side if and only if A is invertible if and only if its determinant is invertible. Second, that the inverse of A is equal to (det A)−1 Adj A. We now consider two A-modules M ' Am and P ' Ap with m > p and a surjective linear map ϕ : P → M . Therefore there exists a linear map ψ : M → P such that ϕ ◦ ψ = IdM . This corresponds to two matrices A ∈ Am×p and B ∈ Ap×m with AB = Im . If m = p, the matrix A is invertible with inverse B and ϕ and ψ are reciprocal isomorphisms. If m > p, we have AB = A1 B1 with square A1 and B1 respectively obtained from A and B by filling in with zeros (m − p columns for A1 , m − p rows for B1 ). 0 ··· 0 0 .. A1 = . , B1 = , A1 B1 = Im . A B 0 Thus 1 = det Im = det(AB) = det(A1 B1 ) = det(A1 ) det(B1 ) = 0. In this proof we clearly see the commutativity of the ring appear (which is truly necessary). Let us summarize. §5. A little exterior algebra 41 5.2. Proposition. Let two A-modules M ' Am and P ' Ap and a surjective linear map ϕ : P → M . 1. If m = p, then ϕ is an isomorphism. In other words, in a module Am every generator set of m elements is a basis. 2. If m > p, then 1 =A 0, and if the ring is nontrivial, m > p is impossible. In the following, this important classification theorem will often appear as a corollary of more subtle theorems, as for example Theorem IV -5.1 or Theorem IV -5.2. Exterior powers of a module Terminology. Recall that any determinant of a square matrix extracted from A on certain rows and columns is called a minor of A. We speak of a minor of order k when the extracted square matrix is in Mk (A). When A is a square matrix, a principal minor is a minor corresponding to a matrix extracted on the same set of indices for both the rows and the columns. For example if A ∈ Mn (A), the coefficient of X k in the polynomial det(In +XA) is the sum of the principal minors of order k of A. Finally, a principal minor in the north-west position, i.e. obtained by extracting the matrix on the first lines and first columns, is called a dominant principal minor. Let M be an A-module. A k-multilinear alternating map ϕ : M k → P is called a k-th exterior power of the A-module M if every multilinear alternating map ψ : M k → R is uniquely expressible in the form ψ = θ ◦ ϕ, where θ is an A-linear map from P to R. Mk ϕ  P ψ θ! k-multilinear alternating maps /% R linear maps. Clearly ϕ : M k → P is unique in the categorical sense, i.e. that for every other exterior power ϕ0 : M k → P 0 there is a unique linear map θ : P → P 0 which makes the suitable diagram commutative, and that θ is an isomorphism. Vk Vk We then denote P by M or A M and ϕ(x1 , . . . , xk ) by λk (x1 , . . . , xk ) or x1 ∧ · · · ∧ xk . The existence of a k-th exterior power for every module M results from general considerations analogous to those that we will detail for the tensor product on page 191 in Section IV -4. The simplest theory of exterior powers, analogous to the elementary theory of the determinant, shows that if M is a free module with a basis of n Vk elements (a1 , . . . , an ), then M is zero if k > n, and otherwise it is a free 42 II. The basic local-global principle and systems of linear equations  module whose basis is the nk k-vectors ai1 ∧ · · · ∧ aik , where (i1 , . . . , ik ) ranges over the set of strictly increasing k-tuples of elements of J1..nK. Vn In particular, M is free and of rank 1 with a1 ∧ · · · ∧ an as its basis. To every A-linear map α : M → N corresponds a unique A-linear map Vk Vk Vk α: M→ N satisfying the equality Vk  α (x1 ∧ · · · ∧ xk ) = α(x1 ) ∧ · · · ∧ α(xk ) Vk Vk M . The linear map α is called the for every k-vector x1 ∧ · · · ∧ xk of k-th exterior power of the linear map α. Vk  Vk  Vk Moreover we have α ◦ β = (α ◦ β) when α ◦ β is defined. In Vk short, each (•) is a functor. If M and N are free with respective bases (a1 , . . . , an ) and (b1 , . . . , bm ), and Vk if α admits the matrix H on its bases, then α admits the matrix denoted Vk Vk Vk by H on the corresponding bases of M and N . The coefficients of this matrix are all the minors of order k of the matrix H. Determinantal ideals 5.3. Definition. Let G ∈ An×m and k ∈ J1.. min(m, n)K, the determinantal ideal of order k of the matrix G is the ideal, denoted by DA,k (G) or Dk (G), generated by the minors of order k of G. For k 6 0 we set by convention Dk (G) = h1i, and for k > min(m, n), Dk (G) = h0i. These conventions are natural because they allow us to obtain in full generality the following equalities. • If H = • If H = Ir 0 0 G 0 0 0 G , for all k ∈ Z we have Dk (G) = Dk+r (H). , for all k ∈ Z we have Dk (H) = Dk (G). 5.4. Fact. For every matrix G of type n × m we have the inclusions {0} = D1+min(m,n) (G) ⊆ · · · ⊆ D1 (G) ⊆ D0 (G) = h1i = A (5) More precisely for all k, r ∈ N we have one inclusion Dk+r (G) ⊆ Dk (G) Dr (G) (6) Indeed, every minor of order h + 1 is expressed as a linear combination of minors of order h, and the inclusion (6) is obtained via the Laplace expansion of the determinant. §5. A little exterior algebra 5.5. Fact. 43 Let G1 ∈ An×m1 , G2 ∈ An×m2 and H ∈ Ap×n . 1. If Im G1 ⊆ Im G2 , then for any integer k we have Dk (G1 ) ⊆ Dk (G2 ). 2. For any integer k, we have Dk (HG1 ) ⊆ Dk (G1 ). 3. The determinantal ideals of a matrix G ∈ An×m only depend on the equivalence class of the submodule image of G (i.e., they only depend on Im G, up to automorphism of the module An ). 4. In particular, if ϕ is a linear map between free modules of finite rank, the determinantal ideals of a matrix of ϕ do not depend on the chosen bases. We denote them by Dk (ϕ) and we call them the determinantal ideals of the linear map ϕ. J 1. Each column of G1 is a linear combination of columns of G2 . We conclude with the multilinearity of the determinant. 2. Same reasoning by replacing the columns with the rows. Finally, 3 implies 4 and results from the two preceding items.  Remark. A determinantal ideal is therefore essentially attached to a finitely generated submodule M of a free module L. However, it is the structure of the inclusion M ⊆ L and not only the structure of M which intervenes to determine the determinantal ideals. For example M = 3Z × 5Z is a free Z-submodule of L = Z2 and its determinantal ideals are D1 (M ) = h1i, D2 (M ) = h15i. If we replace 3 and 5 with 6 and 10 for example, we obtain another free submodule, but the structure of the inclusion is different since the determinantal ideals are now h2i and h60i. 5.6. Fact. If G and H are matrices such that GH is defined, then, for all n > 0 we have Dn (GH) ⊆ Dn (G) Dn (H) (7) J The result is clear for n = 1. For n > 1, we reduce to the case n = 1 by noting that the minors of order n of G, H and GH represent the coefficients of the matrices “n-th exterior power of G, H and GH” taking into account Vn Vn Vn  the equality (ϕψ) = ϕ◦ ψ .  The following equality is immediate. Xn Dn (ϕ ⊕ ψ) = k=0 Dk (ϕ) Dn−k (ψ) (8) 44 II. The basic local-global principle and systems of linear equations The rank of a matrix 5.7. Definition. A linear map ϕ between free modules of finite rank is said to be • of rank 6 k if Dk+1 (ϕ) = 0, • of rank > k if Dk (ϕ) = h1i , • of rank k if it is both of rank > k and of rank 6 k. We will use the notations rk(ϕ) > k and rk(ϕ) 6 k, in accordance with the preceding definition, without presupposing that rk(ϕ) is defined. Only the notation rk(ϕ) = k will mean that the rank is defined. We will later generalize this definition to the case of linear maps between finitely generated projective modules: see the notation X -6.5 as well as exercices X -21, X-22 and X -23. Comment. The reader is cautioned that there is no universally accepted definition for “matrix of rank k” in the literature. When reading another book, one must first ascertain the definition adopted by the author. For example in the case of an integral ring A, we often find the rank defined as that of the matrix over the quotient field of A. Nevertheless a matrix of rank k in the sense of Definition 5.7 is generally of rank k in the sense of other authors. The following concrete local-global principle is an immediate consequence of the basic local-global principle. 5.8. Concrete local-global principle. (Rank of a matrix) Let S1 , . . ., Sn be comaximal monoids of A and B be a matrix ∈ Am×p . Then the following properties are equivalent. 1. The matrix is of rank 6 k (resp. of rank > k) over A. 2. For i ∈ J1..nK, the matrix is of rank 6 k (resp. of rank > k) over ASi . Generalized pivot method Terminology. 1) Two matrices are said to be equivalent if we can pass from one to the other by left- and right-multiplying by invertible matrices. 2) Two square matrices in Mn (A) are said to be similar when they represent the same endomorphism of An over two bases (distinct or not), in other words when they are conjugate with respect to the action (G, M ) 7→ GM G−1 of GLn (A) over Mn (A). 3) An elementary row operation on a matrix of n rows consists in replacing a row Li with a row Li + λLj where i 6= j. §5. A little exterior algebra 45 We also denote this by Li ← Li + λLj . This corresponds to the left(n) multiplication by a matrix, said to be elementary, denoted by Ei,j (λ) (or, if the context allows it, Ei,j (λ)). This matrix is obtained from In by means of the same elementary row operation. The right-multiplication by the same matrix Ei,j (λ) corresponds to the elementary column operation (for a matrix having n columns) which transforms the matrix In into Ei,j (λ): Cj ← Cj + λCi . 4) The subgroup of SLn (A) generated by the elementary matrices is called the elementary group and it is denoted by En (A). Two matrices are said to be elementarily equivalent when we can pass from one to the other via elementary row and column operations. 5.9. Invertible minor lemma. (Generalized pivot) If a matrix G ∈ Aq×m has an invertible minor of order k 6 min(m, q), it is equivalent to a matrix   Ik 0k,m−k , 0q−k,k G1 where Dr (G1 ) = Dk+r (G) for all r ∈ Z. J By eventually permuting the rows and the columns we bring the invertible minor to the top left. Next, by right-multiplying (or left-multiplying) by an invertible matrix, we reduce to the form   Ik A 0 G = , B C then by elementary row and column operations, we obtain   Ik 0k,m−k 00 G = . 0q−k,k G1 Finally, Dr (G1 ) = Dk+r (G00 ) = Dk+r (G) for all r ∈ Z.  As an immediate consequence we obtain the freeness lemma. 5.10. Freeness lemma. Consider a matrix G ∈ Aq×m of rank 6 k with 1 6 k 6 min(m, q). If the matrix G has an invertible minor of order k, then it is equivalent to the matrix   Ik 0k,m−k Ik,q,m = . 0q−k,k 0q−k,m−k In this case, the image, the kernel and the cokernel of G are free, respectively of ranks k, m − k and q − k. Moreover the image and the kernel have free summands. If i1 , . . ., ik (resp. j1 , . . ., jk ) are the indexes of rows (resp. of columns) of the invertible minor, then the columns j1 , . . ., jk form a basis of the module Im G, and Ker G is the module of vectors annihilated by the linear forms corresponding to the rows i1 , . . ., ik . 46 II. The basic local-global principle and systems of linear equations J With the notations of the previous lemma we have D1 (G1 )=Dk+1 (G)=0, so G1 = 0. The rest is left to the reader.  The matrix Ik,q,m is called a standard simple matrix. We denote the matrix Ik,n,n by Ik,n and we call it a standard projection matrix. 5.11. Definition. A linear map between free modules of finite rank is said to be simple if it can be represented by a matrix Ik,q,m over suitable bases. Similarly a matrix is said to be simple when it is equivalent to a matrix Ik,q,m . Generalized Cramer formula We study in this subsection some generalizations of the usual Cramer formulas. We will exploit these in the following paragraphs. For a matrix A ∈ Am×n we denote by Aα,β the matrix extracted on the rows α = {α1 , . . . , αr } ⊆ J1..mK and the columns β = {β1 , . . . , βs } ⊆ J1..nK. Suppose that the matrix A is of rank 6 k. Let V ∈ Am×1 be a column vector such that the bordered matrix [ A | V ] is also of rank 6 k. Let us call Aj the j-th column of A. Let µα,β = det(Aα,β ) be the minor of order k of the matrix A extracted on the rows α = {α1 , . . . , αk } and the columns β = {β1 , . . . , βk }. For j ∈ J1..kK let να,β,j be the determinant of the same extracted matrix, except that the column j has been replaced with the extracted column of V on the rows α. Then, we obtain for each pair (α, β) of multi-indices a Cramer identity: Xk µα,β V = να,β,j Aβj (9) j=1 due to the fact that the rank of the bordered matrix [ A1..m,β | V ] is 6 k. This can be read as follows:   να,β,1     .. µα,β V = Aβ1 . . . Aβk ·   . να,β,k  =  Aβ 1 ... A βk  vα1    · Adj(Aα,β ) ·  ...  vαk = A · (In )1..n,β · Adj(Aα,β ) · (Im )α,1..m · V This leads us to introduce the following notation. (10) §5. A little exterior algebra 47 5.12. Notation. We denote by P` the set of parts of J1..`K and Pk,` the set of parts of J1..`K with k elements. For A ∈ Am×n and α ∈ Pk,m , β ∈ Pk,n we define Adjα,β (A) := (In )1..n,β · Adj(Aα,β ) · (Im )α,1..m . For example with the matrix   5 −5 7 4 2 7 , A =  9 −1 13 3 −3 10 and the parts α = {1, 2} and β = {2, 3}, we obtain     Aα,β = −5 −1 7 2 , Adj(Aα,β ) = 2 1 −7 −5  0  2 and Adjα,β (A) =  1 0 0 −7 −5 0  0 0  . 0  0 When Dk+1 ([ A | V ]) = 0, equality (10) is written as follows. µα,β V = A · Adjα,β (A) · V (11) We thus obtain the following equality, under the assumption that A is of rank 6 k. µα,β A = A · Adjα,β (A) · A (12) The Cramer’s identities (11) and (12) provide the congruences which are not subject to any hypothesis: it suffices for example to read (11) in the quotient ring A/Dk+1 ([ A | V ]) to obtain the congruence (13). 5.13. Lemma. (Generalized Cramer formula) Without any assumption on the matrix A or the vector V , we have for α ∈ Pk,m and β ∈ Pk,n the following congruences. µα,β V ≡ A · Adjα,β (A) · V mod Dk+1 ( [ A | V ] ), (13) µα,β A ≡ A · Adjα,β (A) · A mod Dk+1 (A). (14) A simple special case is the following where k = m 6 n. µ1..m,β Im = A · Adj1..m,β (A) (β ∈ Pm,n ). (15) This equality is in fact a direct consequence of the basic Cramer’s identity (4). Similarly we obtain µα,1..n In = Adjα,1..n (A) · A (α ∈ Pn,m , n 6 m) (16) A magic formula An immediate consequence of the Cramer’s identity (12) is the less usual identity (17) given in the following theorem. Similarly the equalities (18) and (19) easily result from (15) and (16). 48 II. The basic local-global principle and systems of linear equations 5.14. Theorem. Let A ∈ Am×n be a matrix of rank k. We thus have an P equality α∈Pk,m ,β∈Pk,n cα,β µα,β = 1. Let P B = α∈Pk,m ,β∈Pk,n cα,β Adjα,β (A). 1. We have A · B · A = A. (17) Consequently A B is a projection matrix of rank k and the submodule Im A = Im AB is a direct summand in Am . 2. If k = m, then A · B = Im . (18) B · A = In . (19) 3. If k = n, then The following identity, which we will not use in this work, is even more miraculous. 5.15. Proposition. (Prasad and Robinson) With the assumptions and the notations of Theorem 5.14, if we have ∀α, α0 ∈ Pk,m , ∀β, β 0 ∈ Pk,n cα,β cα0 ,β 0 = cα,β 0 cα0 ,β , then B · A · B = B. (20) Generalized inverses and locally simple maps Let E and F be two A-modules, and ϕ : E → F be a linear map. We can see this as some sort of generalized system of linear equations (a usual system of linear equations corresponds to the free modules of finite rank case). Informally such a system of linear equations is considered to be “wellconditioned” if there is a systematic way to solve the equation ϕ(x) = y for x from a given y, when such a solution exists. More precisely, we ask  if there exists a linear map ψ : F → E satisfying ϕ ψ(y) = y each time  there exists a solution x. This amounts to asking ϕ ψ ϕ(x) = ϕ(x) for all x ∈ E. This clarifies the importance of the equation (17) and leads to the notion of a generalized inverse. The terminology regarding generalized inverses does not seem fully fixed. We adopt that of [Lancaster & Tismenetsky]. In the book [Bhaskara Rao], the author uses the term “reflexive g-inverse.” §5. A little exterior algebra 49 5.16. Definition. Let E and F be two A-modules, and ϕ : E → F be a linear map. A linear map ψ : F → E is called a generalized inverse of ϕ if we have ϕ ◦ ψ ◦ ϕ = ϕ and ψ ◦ ϕ ◦ ψ = ψ. (21) A linear map is said to be locally simple when it has a generalized inverse. The following fact is immediate. 5.17. Fact. When ψ is a generalized inverse of ϕ, we have: – ϕ ψ and ψ ϕ are projections, – Im ϕ = Im ϕ ψ, Im ψ = Im ψ ϕ, Ker ϕ = Ker ψ ϕ, Ker ψ = Ker ϕ ψ, – E = Ker ϕ ⊕ Im ψ and F = Ker ψ ⊕ Im ϕ, – Ker ϕ ' Coker ψ and Ker ψ ' Coker ϕ. Moreover ϕ and ψ provide by restriction reciprocal isomorphisms ϕ1 and ψ1 between Im ψ and Im ϕ. In matrix form we obtain: Im ϕ Ker ψ  Im ψ ϕ1 0 Ker ϕ  0 = ϕ, 0 Im ψ Ker ϕ  Im ϕ ψ1 0 Ker ψ  0 = ψ. 0 Remarks. 1) If we have a linear map ψ0 satisfying as in Theorem 5.14 the equality ϕ ψ0 ϕ = ϕ, we obtain a generalized inverse of ϕ by stating ψ = ψ0 ϕ ψ0 . In other words, a linear map ϕ is locally simple if and only if there exists a ψ satisfying ϕ ψ ϕ = ϕ. 2) A simple linear map between free modules of finite rank is locally simple (immediate verification). 3) Theorem 5.14 informs us that a linear map which has rank k in the sense of definition 5.7 is locally simple. 5.18. Fact. Let ϕ : An → Am be a linear map. The following properties are equivalent. 1. The linear map ϕ is locally simple. 2. There exists a ϕ• : Am → An such that An = Ker ϕ ⊕ Im ϕ• and Am = Ker ϕ• ⊕ Im ϕ. 3. The submodule Im ϕ is a direct summand in Am . J 1 ⇒ 2. If ψ is a generalized inverse of ϕ, we can take ϕ• = ψ. 2 ⇒ 3. Obvious. 3 ⇒ 1. If Am = P ⊕ Im ϕ, denote by π : Am → Am the projection over Im ϕ parallel to P . For each vector ei of the canonical basis of Am there exists an element ai of An such that ϕ(ai ) = π(ei ). We define ψ : Am → An as ψ(ei ) = ai . Then, ϕ ◦ ψ = π and ϕ ◦ ψ ◦ ϕ = π ◦ ϕ = ϕ, and ψ ◦ ϕ ◦ ψ is a generalized inverse of ϕ.  50 II. The basic local-global principle and systems of linear equations The notion of a locally simple linear map is a local notion in the following sense. 5.19. Concrete local-global principle. (Locally simple linear maps) Let S1 , . . ., Sn be comaximal monoids of a ring A. Let ϕ : Am → Aq be a q linear map. If every ϕSi : Am Si → ASi is simple, then ϕ is locally simple. More generally ϕ is locally simple if and only if all the ϕSi ’s are locally simple. J Let us focus on the second statement. To prove that ϕ is locally simple amounts to finding a ψ which satisfies ϕ ψ ϕ = ϕ. This is a system of linear equations in the coefficients of the matrix of ψ and we can therefore apply the basic concrete local-global principle 2.3.  The terminology of a locally simple linear map is justified by the previous local-global principle and by the converse given in item 8 of Theorem 5.26 (also see the locally simple map lemma in the local ring case, page 493). Grassmannians The following theorem serves as an introduction to the grassmannian varieties. It results from Fact 5.18 and Theorem 5.14. 5.20. Theorem. (Finitely generated submodules as direct summands of a free module) Let M = hC1 , . . . , Cm i be a finitely generated submodule of An and C = [ C1 · · · Cm ] ∈ An×m be the corresponding matrix. 1. The following properties are equivalent. a. The matrix C is locally simple. b. The module M is a direct summand of An . c. The module M is the image of a matrix F ∈ AGn (A). 2. The following properties are equivalent. a. The matrix C is of rank k. b. The module M is image of a matrix F ∈ AGn (A) of rank k. The “variety” of vector lines in a K-vector space of dimension n + 1 is, intuitively, of dimension n, as a vector line essentially depends on n parameters (a nonzero vector, up to a multiplicative constant, that makes (n + 1) − 1 independent parameters). We call this variety the projective space of dimension n over K. Furthermore, passing from a field K to an arbitrary ring A, the correct generalization of a “vector line in Kn+1 ” is “the image of a projection matrix of rank 1 in An+1 .” This leads to the following definitions. §5. A little exterior algebra 51 5.21. Definition. 1. We define the space AGn,k (A) ⊆ AGn (A) as the set of projection matrices of rank k and Gn,k (A) as the set of submodules of An which are images of matrices of AGn,k (A). 2. The space Gn+1,1 (A) is again denoted by Pn (A) and we call it the projective space of dimension n over A. 3. We denote by Gn (A) the space of all the submodules that are direct summands of An (i.e., images of a projection matrix). The above definition is a little unsatisfactory, insofar as we have not explained how the set Gn,k (A) is structured. Only this structure makes it worthy of the label “space.” A partial answer is given by the observation that Gn,k is a functor. More precisely, to every homomorphism ϕ : A → B we associate a natural map Gn,k (ϕ) : Gn,k (A) → Gn,k (B), so that Gn,k (IdA ) = IdGn,k (A) , and Gn,k (ψ ◦ ϕ) = Gn,k (ψ) ◦ Gn,k (ϕ), when ψ ◦ ϕ is defined. Injectivity and surjectivity criteria Two famous propositions are contained in the following theorem. 5.22. Theorem. Let ϕ : An → Am be a linear map with matrix A. 1. The map ϕ is surjective if and only if ϕ is of rank m, i.e. here Dm (ϕ) = h1i (we then say that A is unimodular). 2. (McCoy’s theorem) The map ϕ is injective if and only if Dn (ϕ) is faithful, i.e. if the annihilator of Dn (ϕ) is reduced to {0}. J 1. If ϕ is surjective, it admits a right inverse ψ, and Fact 5.6 gives h1i = Dm (Im ) ⊆ Dm (ϕ)Dm (ψ), so Dm (ϕ) = h1i. Conversely, if A is of rank m, equation (18) shows that A admits a right inverse, and ϕ is surjective. 2. Assume that Dn (A) is faithful. By equality (16), if AV = 0, then µα,1..n V = 0 for all the generators µα,1..n of Dn (A), and so V = 0. For the converse, we will prove by induction on k the following property: if k column vectors x1 , . . . , xk are linearly independent, then the annihilator of the vector x1 ∧ · · · ∧ xk is reduced to 0. For k = 1 it is trivial. To pass from k to k + 1 we proceed as follows. Let z be a scalar that annihilates x1 ∧ · · · ∧ xk+1 . For α ∈ Pk,m , we denote by dα (y1 , . . . , yk ) the minor extracted on the index rows of α for the column vectors y1 , . . . , yk of Am . Since z(x1 ∧ · · · ∧ xk+1 ) = 0, and by the Cramer formulas, we have the equality  z dα (x1 , . . . , xk )xk+1 − dα (x1 , . . . , xk−1 , xk+1 )xk + · · · = 0, 52 II. The basic local-global principle and systems of linear equations so z dα (x1 , . . . , xk ) = 0. As this is true for any α, this gives z(x1 ∧ · · · ∧ xk ) = 0, and by the induction hypothesis, z = 0.  Remark. Theorem 5.22 can also be read in the following way. 1. The linear map ϕ : An → Am is surjective if and only if the map n Vm ϕ : A(m) → A is surjective. 2. The linear map ϕ : An → Am is injective if and only if the map m Vn ϕ : A → A( n ) is injective. 5.23. Corollary. Let ϕ : An → Am be an A-linear map. 1. If ϕ is surjective and n < m, the ring is trivial. 2. If ϕ is injective and n > m, the ring is trivial. Remark. A more positive, equivalent, but probably even more bewildering formulation of the results of the previous corollary is the following. 1. If ϕ is surjective, then X m divides X n in A[X]. 2. If ϕ is injective, then X n divides X m in A[X]. In some way, this is closer to the formulation found in classical mathematics: if the ring is nontrivial, then m 6 n in the first case (resp. n 6 m in the second case). The advantage of our formulations is that they work in all cases, without the need to assume that we know how to decide if the ring is trivial or not. 5.24. Corollary. If ϕ : An → Am is injective, the same applies for every exterior power of ϕ. J The annihilator of Dn (ϕ) is reduced to 0 by the previous theorem. There exists a ring B ⊇ A such that the generators of Dn (ϕ) become comaximal in B (Lemma 2.14). The B-linear map ϕ1 : Bn → Bm obtained by extending ϕ to B is thus of rank n and admits a left inverse ψ (item 3 of Theorem 5.14), i.e. ψ ◦ ϕ1 = IdBn . Therefore Vk Vk ψ ◦ ϕ1 = Id∧k Bn . Vk Thus the matrix of ϕ1 is injective, and since it is the same matrix as that Vk Vk of ϕ, the linear map ϕ is injective.  Characterization of locally simple maps The following lemma places a bijective correspondence between the fundamental systems of orthogonal idempotents and the non-decreasing sequences of idempotents for divisibility. §5. A little exterior algebra 53 5.25. Lemma. Let (eq+1 = 0, eq , . . ., e1 , e0 = 1) be a list of idempotents such that ei divides ei+1 for i = 0, . . . , q. Then, the elements ri := ei − ei+1 , for i ∈ J0..qK, form a fundamental system of orthogonal idempotents. Conversely, every fundamental system of orthogonal idempotents (r0 , . . . , rq ) defines such a list of idempotents by letting P ej = k>j rk for j ∈ J0..q + 1K. P J It is clear that i ri = 1. For 0 6 i < q, we have ei+1 = ei ei+1 . Hence (ei − ei+1 )ei+1 = 0, i.e. (rq + · · · + ri+1 ) · ri = 0. We can now easily deduce that ri rj = 0 for j > i.  We denote by Diag(a1 , . . . , an ) the diagonal matrix of order n whose coefficient in position (i, i) is the element ai . In the following theorem some of the idempotents ri in the fundamental system of orthogonal idempotents can very well be equal to zero. For example if the ring is connected and nontrivial, all but one are equal to zero. 5.26. Theorem. (Locally simple matrix) Let G ∈ Am×n be the matrix of ϕ : An → Am and q = inf(m, n). The following properties are equivalent. 1. The linear map ϕ is locally simple. 2. The submodule Im ϕ is a direct summand of Am . 3. Im ϕ is a direct summand of Am and Ker ϕ is a direct summand of An . 4. There exists a linear map ϕ• : Am → An with An = Ker ϕ ⊕ Im ϕ• and Am = Ker ϕ• ⊕ Im ϕ. 5. Each determinantal ideal Dk (ϕ) is idempotent. 6. There exists a (unique) fundamental system of orthogonal idempotents (r0 , r1 , . . . , rq ) such that on each localized ring A[1/rk ] the map ϕ is of rank k. 7. Each determinantal ideal Dk (ϕ) is generated by an idempotent ek . Then let rk = ek − ek+1 . The rk ’s form a fundamental system of orthogonal idempotents. For every minor µ of order k of G, on the localized ring A[1/(rk µ)] the linear map ϕ becomes simple of rank k. 8. The linear map ϕ becomes simple after localization at suitable comaximal elements. 9. Each determinantal ideal Dk (ϕ) is generated by an idempotent ek and the matrix of ϕ becomes equivalent to the matrix Diag(e1 , e2 , . . . , eq ), eventually filled-in with zeros (for both rows and columns), after localization at suitable comaximal elements. ? 10. The linear map ϕ becomes simple after localization at any arbitrary maximal ideal. 54 II. The basic local-global principle and systems of linear equations J The equivalence of items 1, 2, 3, 4 is already clear (see Facts 5.17 and 5.18). Furthermore, we trivially have 7 ⇒ 6 ⇒ 5 and 9 ⇒ 5. Since q = inf(m, n), we have Dq+1 (ϕ) = 0. 1 ⇒ 5. We have GHG = G for some matrix H and we apply Fact 5.6. 5 ⇒ 7. The fact that each Dk (ϕ) is generated by an idempotent ek results from Fact 4.6. The fact that (r0 , . . . , rq ) is a fundamental system of orthogonal idempotents results from Lemma 5.25 (and Fact 5.4). As rk ek+1 = 0, over the ring A[1/rk ], and thus over the ring A[1/(µrk )], where µ is a minor of order k, every minor of order k + 1 of the matrix G is null. Thus, by the freeness lemma 5.10, G is simple of rank k. 7 ⇒ 9. Over A[1/rk ] and so over A[1/(µrk )] (µ a minor of order k), we have Diag(e1 , . . . , eq ) = Diag(1, . . . , 1, 0, . . . , 0) with 1 appearing k times. 7 ⇒ 8. Let tk,j be the minors of order k of G. The localizations are those at tk,j rk . We must verify that they are comaximal. Each ek is in the form P P P P tk,j vk,j , so k,j vk,j (tk,j rk ) = k ek rk = rk = 1. 8 ⇒ 1. By application of the local-global principle 5.19 since every simple map is locally simple. 8 ⇒ 10. (In classical mathematics.) Because the complement of a maximal ideal always contains at least one element in a system of comaximal elements (we can assume that the ring is nontrivial). 10 ⇒ 8. (In classical mathematics.) For each maximal ideal m we obtain a sm ∈ / m and a matrix Hm such that we have GHm G = G in A[1/sm ]. The ideal generated by the sm ’s is not contained in any maximal ideal and so it is the ideal h1i. Thus there is a finite number of these sm ’s which are comaximal. Let us finish by giving a direct proof for the implication 6 ⇒ 1. On the ring A[1/rk ] the matrix G is of rank k so there exists a matrix Bk satisfying GBk G = G (Theorem 5.14). This means that on the ring A we have a matrix Hk in An×m satisfying rk Hk = Hk and rk G = GHk G. We P then take H = k Hk and obtain G = GHG.  The equivalence of items 1 to 9 has been established constructively, whilst item 10 only implies the previous ones in classical mathematics. Trace, norm, discriminant, transitivity We denote by Tr(ϕ) and Cϕ (X) the trace and the characteristic polynomial of an endomorphism ϕ of a free module of finite rank (we take as characteristic polynomial of a matrix F ∈ Mn (A) the polynomial det(XIn − F ), which has the advantage of being monic). §5. A little exterior algebra 55 5.27. Notation. – If A ⊆ B and if B is a free A-module of finite rank, we denote rkA (B) by [ B : A ]. – For a ∈ B we then denote by TrB/A (a), NB/A (a) and CB/A (a)(X) the trace, the determinant and the characteristic polynomial of the multiplication by a, seen as an endomorphism of the A-module B. 5.28. Lemma. Assume that A ⊆ B and that B is a free A-module of finite rank m. 1. Let E be a free B-module of finite rank n. If e = (ei )i∈J1..mK is a basis of B over A and f = (fj )j∈J1..nK a basis of E over B, then (ei fj )i,j is a basis of E over A. Consequently, E is free over A and rkA (E) = rkB (E) × rkA (B). 2. If B ⊆ C and if C is a free B-module of finite rank, we have [ C : A ] = [ C : B ] [ B : A ].  3 Remark. Let C = A[Y ] Y = A[y], a free A-algebra of rank 3. Since y 4 = 0, B = A ⊕ Ay 2 is a sub-algebra of C, free over A, whose rank (equal to 2) does not divide the rank of C (equal to 3). The equality [ C : A ] = [ C : B ][ B : A ] does not apply because C is not free over B. 5.29. Theorem. (Transitivity formulas for the trace, the determinant and the characteristic polynomial) Under the same assumptions, let uB : E → E be a B-linear map. We denote by uA this map when considered as an A-linear map. We then have the equalities:   det(uA ) = NB/A det(uB ) , Tr(uA ) = TrB/A Tr(uB ) ,  CuA (X) = NB[X]/A[X] CuB (X) . J We use the notations of Lemma 5.28. Let ukj be the elements of B P n defined by u(fj ) = k=1 ukj fk . Then the matrix M of uA with respect to the basis (ei fj )i,j is expressed as a block matrix   M11 · · · M1n  ..  , M =  ... .  Mn1 ··· Mnn where Mkj represents the A-linear map b 7→ bukj of B in B to with respect to the basis e. This provides the desired equality regarding the trace of uA 56 since II. The basic local-global principle and systems of linear equations Xn Xn Tr(Mii ) = TrB/A (uii ) i=1 i=1 Xn   = TrB/A uii = TrB/A Tr(uB ) . Tr(uA ) = i=1 As for the equality for the determinant, note that the matrices Mij pairwise commute (Mij is the matrix of the multiplication by uij ). We can then apply the following Lemma 5.30, which gives us: X det(M ) = det(∆) with ∆ = ε(σ)M1σ1 M2σ2 . . . Mnσn . σ∈Sn However,P∆ is none other than the matrix of the multiplication by the element σ∈Sn ε(σ)u1σ1 u2σ2 . . . unσn , i.e., by det(uB ), thus:  det(uA ) = det(M ) = NB/A det(uB ) . Finally, the equality for the characteristic polynomial is deduced from the one for determinants by using the fact that CuA (X) is the determinant of the endomorphism XIdE[X] − uA of the A[X]-module E[X] whereas CuB (X) is that of the same map seen as an endomorphism of the B[X]-module E[X]. In a noncommutative ring, two elements a and b are said to be permutable or commuting if ab = ba. 5.30. Lemma. Let (Nij )i,j be a family of n2 pairwise commuting square matrices, and N the square matrix of order mn:   N11 · · · N1n  ..  . N =  ... .  Nn1 ··· Nnn  ε(σ) N1σ1 N2σ2 . . . Nnσn . P J Let ∆ be the n × n matrix defined by ∆ = σ∈Sn ε(σ)N1σ1 N2σ2 . . . Nnσn . Thus we must prove that det(N ) = det(∆). Let us treat the special cases n = 2 then n = 3. We replace A with A[Y ] and Nii by Nii + Y Im , which has the advantage of making some determinants regular in A[Y ]. It suffices to establish the equalities with these new matrices, as we finish by making Y = 0. The key-element of the proof for n = 2 resides in the following equality:      N11 N12 N22 0 N11 N22 − N12 N21 N12 = . N21 N22 −N21 Im 0 N22 Then: det(N ) = det P σ∈Sn We then consider the LHS and RHS determinants det(N ) det(N22 ) = det(N11 N22 − N12 N21 ) det(N22 ), next we simplify by det(N22 ) (which is regular) to obtain the result. §5. A little exterior algebra Case n = 3 uses the equality: #" " N11 N21 N31 N12 N22 N32 N13 N23 N33 N22 N33 − N23 N32 N31 N23 − N21 N33 N21 N32 − N22 N31 57 0 Im 0 0 0 Im # " = ∆ 0 0 N12 N22 N32 N13 N23 N33 # , which leads to   N22 N23 . N32 N33   N22 N23 Case n = 2 provides det(N22 N33 − N23 N32 ) = det . We N32 N33 simplify by this determinant and obtain det(N ) = det(∆). det(N ) det(N22 N33 − N23 N32 ) = det(∆) det The general case is left as an exercise (see Exercise 28).  5.31. Corollary. Let A ⊆ B ⊆ C be three rings with C free of finite rank over B and B free of finite rank over A. We then have: NC/A = NB/A ◦ NC/B , TrC/A = TrB/A ◦ TrC/B ,  CC/A (c)(X) = NB[X]/A[X] CC/B (c)(X) (c ∈ C). Gram determinants and discriminants 5.32. Definition. Let M be an A-module, ϕ : M × M → A be a symmetric bilinear form and (x) = (x1 , . . . , xk ) be a list of elements of M . We call the matrix  def GramA (ϕ, x) = ϕ(xi , xj ) i,j∈J1..kK the Gram matrix of (x1 , . . . , xk ) for ϕ. Its determinant is called the Gram determinant of (x1 , . . . , xk ) for ϕ and is denoted by gramA (ϕ, x). If Ay1 + · · · + Ayk ⊆ Ax1 + · · · + Axk we have an equality gram(ϕ, y1 , . . . , yk ) = det(A)2 gram(ϕ, x1 , . . . , xk ), where A is a k × k matrix which expresses the yj ’s in terms of the xi ’s. We now introduce an important case of a Gram determinant, the discriminant. Recall that two elements a, b of a ring A are said to be associated if there exists a u ∈ A× such that a = ub. In the literature such elements are also referred to as associates. 5.33. Proposition and definition. Let C ⊇ A be an A-algebra which is a free A-module of finite rank and x1 , . . . , xk , y1 , . . . , yk ∈ C. 1. We call the determinant of the matrix  TrC/A (xi xj ) i,j∈J1..kK the discriminant of (x1 , . . . , xk ). We denote it by discC/A (x1 , . . . , xk ) or disc(x1 , . . . , xk ). 58 II. The basic local-global principle and systems of linear equations 2. If Ay1 + · · · + Ayk ⊆ Ax1 + · · · + Axk we have disc(y1 , . . . , yk ) = det(A)2 disc(x1 , . . . , xk ), where A is a k × k matrix which expresses the yj ’s in terms of the xi ’s. 3. In particular, if (x1 , . . . , xn ) and (y1 , . . . , yn ) are two bases of the Aalgebra C, the elements disc(x1 , . . . , xn ) and disc(y1 , . . . , yn ) are multiplicatively congruent modulo the squares of A× . We call the corresponding equivalence class the discriminant of the extension C/A . We denote it by DiscC/A . 4. If DiscC/A is regular and n = [ C : A ], a system u1 , . . . , un in C is an A-basis of C if and only if disc(u1 , . . . , un ) and DiscC/A are associated elements. For example when A = Z the discriminant of the extension is a well-defined integer, whereas if A = Q, the discriminant is characterized on the one hand by its sign, and on the other hand by the list of prime numbers contained therein with an odd power. 5.34. Proposition. Let B and C be two free A-algebras of ranks m and n, respectively, and consider the product algebra B × C. Given a list (x) = (x1 , . . . , xm ) of elements of B and a list (y) = (y1 , . . . , yn ) of elements of C, we have: disc(B×C)/A (x, y) = discB/A (x) × discC/A (y). In particular, Disc(B×C)/A = DiscB/A × DiscC/A . J The proof is left to the reader.  5.35. Proposition. Let B ⊇ A be a free A-algebra of finite rank p. We consider • a B-module E, • a symmetric B-bilinear form ϕB : E × E → B, • a basis (b) = (bi )i∈J1..pK of B over A, and • a family (e) = (ej )j∈J1..nK of n elements of E. Let (b ? e) be a family (bi ej ) of np elements of E and ϕA : E × E → A be the symmetric A-bilinear form defined by:  ϕA (x, y) = TrB/A ϕB (x, y) . We then have the following transitivity formula:  gram(ϕA , b ? e) = discB/A (b)n × NB/A gram(ϕB , e) . J In the following the indices i, i0 , k, j, j 0 satisfy i, i0 , k ∈ J1..pK and j, j 0 ∈ J1..nK. Let us agree to sort b ? e in the following order: b ? e = b1 e1 , . . . , bp e1 , b1 e2 , . . . , bp e2 , . . . , b1 en , . . . , bp en . §5. A little exterior algebra 59 For x ∈ B, let µx : B → B be the multiplication by x and m(x) be the matrix of µx with respect to the basis (bi )i∈J1..pK of B over A. Thus we define an isomorphism m of the ring B into a commutative subring of Mp (A). If we let mki (x) be the coefficients of the matrix m(x), we then have: Xp µx (bi ) = bi x = mki (x)bk , k=1  with NB/A (x) = det m(x) . By letting ϕjj 0 = ϕB (ej , ej 0 ) ∈ B, we have  ϕA (bi ej bi0 ej 0 ) = TrB/A ϕB (bi ej bi0 ej 0 ) = TrB/A (bi bi0 ϕjj 0 ). Pp By using the equality bi0 ϕjj 0 = k=1 mki0 (ϕjj 0 ) bk , we have with Tr = TrB/A : Xp  Xp Tr(bi bi0 ϕjj 0 ) = Tr k=1 bi mki0 (ϕjj 0 ) bk = k=1 Tr(bi bk ) mki0 (ϕjj 0 ). (∗) We define β ∈ Mp (A) by βik = TrB/A (bi bk ). The right-hand sum in (∗) is  none other than the coefficient of a product of matrices: β ·m(ϕjj 0 ) ii0 . The Gram determinant of b ? e for ϕA is therefore an np × np matrix comprised of n2 blocks of p × p matrices. Here is that matrix if we let φjj 0 = m(ϕjj 0 ) to simplify the expression:     β 0 ... 0  βφ11 βφ12 . . . βφ1n φ11 φ12 . . . φ1n .  φ21 φ22 . . . φ2n   βφ21 βφ22 . . . βφ2n   0 β . . . ..    . =   ..  . .  ..   ..  ... .. ..  . . βφn1 βφn2 ... βφnn . 0 ... By taking the determinants we obtain    gram(ϕA , b ? e) = det(β)n · det   0 β φn1 φn2 φ11 φ21 .. . φ12 φ22 ... ... φ1n φ2n .. . φn1 φn2 ... φnn ... φnn    .  By using the fact that the matrices φjl pairwise commute, we find that the right-determinant is equal to X    det ε(σ)φ1σ1 φ2σ2 ...φnσn = det m det(ϕjl ) = NB/A gram(ϕB ,e) , σ∈Sn  as required. 5.36. Theorem. (Transitivity formula for the discriminants) Let A ⊆ B ⊆ C, with B free over A, C free over B, [ C : B ] = n and [ B : A ] = m. Let (b) = (bi )i∈J1..mK be a basis of B over A, (c) = (cj )j∈J1..nK be a basis of C over B and let (b ? c) be the basis (bi cj ) of C over A. Then:  discC/A (b ? c) = discB/A (b)[ C:B ] NB/A discC/B (c) , and so [ C:B ] DiscC/A = DiscB/A NB/A (DiscC/B ). 60 II. The basic local-global principle and systems of linear equations J Direct application of Proposition 5.35.  6. Basic local-global principle for modules This section’s results will not be used before Chapter V. We are about to give a slightly more general version of the basic local-global principle 2.3. This new principle concerns arbitrary A-modules and linear maps, whilst the basic principle can be considered as the special case where the modules are free and of finite rank. The proof is essentially the same as that of the basic principle. Beforehand, we start with a brief review of exact sequences and we establish some elementary properties of the localization regarding modules. Complexes and exact sequences When we have successive linear maps α β γ M −→ N −→ P −→ Q , we say that they form a complex if the composition of any two successive linear maps is null. We say that the sequence is exact in N if Im α = Ker β. The entire sequence is said to be exact if it is exact in N and P . This extends to sequences of arbitrary length. This “abstract” language has an immediate counterpart in terms of systems of linear equations when we are dealing with free modules of finite rank. For example if N = An , P = Am and if we have an exact sequence α β γ 0 → M −→ N −→ P −→ Q → 0 , The linear map β is represented by a matrix associated with a system of m linear equations with n unknowns, the module M , isomorphic to Ker β, represents the defect of injectivity of β and the module Q, isomorphic to Coker β, represents its defect of surjectivity of β. An exact complex of the type 0 → Mm u m −−→ Mm−1 −→ u 1 · · · · · · · · · −−→ M0 → 0 with m > 3 is called a long exact sequence (of length m). If m = 2, we say that we have a short exact sequence. In this case M2 can be identified with a submodule of M1 , and, modulo this identification, M0 can be identified with M1 /M2 . An important fact to note is that every long exact sequence of length m “can be decomposed into” m − 1 short exact sequences according to the §6. Basic local-global principle for modules 61 following schema. 0 → 0 → .. . 0 → Em−1 0 → ι 2 −−→ E2 M1 ι3 −−→ E3 ιm−1 −−→ um −−→ Mm u 1 −−→ v2 M2 −−→ Mm−2 −−→ Mm−1 vm−2 vm−1 −−→ M0 → 0 E2 → .. . 0 Em−2 → 0 Em−1 → 0 with Ei = Im ui+1 ⊆ Mi for i ∈ J2..m − 1K, the ιk ’s canonical injections, and the vk ’s obtained from the uk ’s by restricting the range to Im uk . An important theme of commutative algebra is provided by the transformations that preserve, or do not preserve, exact sequences. Here are two basic examples, which use the modules of linear maps. Let LA (M, P ) be the A-module of A-linear maps from M to P and EndA (M ) designate LA (M, M ) (with its ring structure generally noncommutative). The dual module of M , LA (M, A), will in general be denoted by M ? . α β 6.1. Fact. If 0 → M −→ N −→ P is an exact sequence of A-modules, and if F is an A-module, then the sequence 0 → LA (F, M ) −→ LA (F, N ) −→ LA (F, P ) is exact. J Exactness in LA (F, M ). Let ϕ ∈ LA (F, M ) such that α ◦ ϕ = 0. Then, since the first sequence is exact in M , for all x ∈ F , ϕ(x) = 0, so ϕ = 0. Exactness in LA (F, N ). Let ϕ ∈ LA (F, N ) such that β ◦ ϕ = 0. Then, since the first sequence is exact in N , for all x ∈ F , ϕ(x) ∈ Im α. Let α1 : Im α → M be the inverse of the bijection α (regarding the codomain of α as Im α) and ψ = α1 ϕ. We then obtain the equalities LA (F, α)(ψ) = α α1 ϕ = ϕ.  β γ 6.2. Fact. If N −→ P −→ Q → 0 is an exact sequence of A-modules and if F is an A-module, then the sequence 0 → LA (Q, F ) −→ LA (P, F ) −→ LA (N, F ) is exact. J Exactness in LA (Q, F ). If ϕ ∈ LA (Q, F ) satisfies ϕ ◦ γ = 0, then, since γ is surjective, ϕ = 0. Exactness in LA (P, F ). If ϕ : P → F satisfies ϕ ◦ β = 0, then Im β ⊆ Ker ϕ and ϕ is factorized by P / Im β ' Q, that is ϕ = ψ ◦ γ for a linear map ψ : Q → F , i.e. ϕ ∈ Im LA (γ, F ).  62 II. The basic local-global principle and systems of linear equations 6.3. Fact. Let β : N → P be a linear map and γ : P → Coker β be the canonical projection. 1. The canonical map tγ : (Coker β)? → P ? induces an isomorphism of (Coker β)? on Ker tβ. 2. If the canonical linear maps N → N ?? and P → P ?? are isomorphisms, then the canonical surjection of N ? in Coker tβ provides by duality an isomorphism of (Coker tβ)? on Ker β. J 1. We apply Fact 6.2 with F = A. 2. We apply item 1 to the linear map tβ by identifying N and N ?? , as well as P and P ?? , and thus also β and t (tβ).  Remark. It is possible to slightly weaken the assumption by requiring that the linear map P → P ?? be injective. Localization and exact sequences 6.4. Fact. Let S be a monoid of a ring A. 1. If M is a submodule of N , we have the canonical identification of MS with a submodule of NS and of (N/M )S with NS /MS . In particular, for every ideal a of A, the A-module aS is canonically identified with the ideal aAS of AS . 2. If ϕ : M → N is an A-linear map, then:  a. Im(ϕS ) is canonically identified with Im(ϕ) S ,  b. Ker(ϕS ) is canonically identified with Ker(ϕ) S ,  c. Coker(ϕS ) is canonically identified with Coker(ϕ) S . 3. If we have an exact sequence of A-modules ϕ ψ M −→ N −→ P , then the sequence of AS -modules ϕS ψS MS −→ NS −→ PS is also exact. Tr 6.5. Fact. If M1 , . . ., Mr are submodules of N and M = i=1 Mi , then by identifying the modules (Mi )S and MS with submodules of NS we obtain Tr MS = i=1 (Mi )S . 6.6. Fact. Let M and N be two submodules of an A-module P , with N finitely generated. Then, the conductor ideal (MS : NS ) is identified with (M : N )S , via the natural maps of (M : N ) in (MS : NS ) and (M : N )S . This is particularly applied to the annihilator of a finitely generated ideal. §6. Basic local-global principle for modules 63 Local-global principle for exact sequences of modules 6.7. Concrete local-global principle. (For exact sequences) Let S1 , . . ., Sn be comaximal monoids of A, M , N , P be A-modules and ϕ : M → N , ψ : N → P be two linear maps. We write Ai for ASi , Mi for MSi etc. The following properties are equivalent. ϕ ψ 1. The sequence M −→ N −→ P is exact. ϕi ψi 2. For each i ∈ J1..nK, the sequence Mi −→ Ni −→ Pi is exact. As a consequence, ϕ is injective (resp. surjective) if and only if for each i ∈ J1..nK, ϕi is injective (resp. surjective) J We have seen that 1 ⇒ 2 in Fact 6.4. Assume 2. Let µi : M → Mi , νi : N → Ni , πi : P → Pi be the canonical  homomorphisms. Let x ∈ M and z = ψ ϕ(x) . We thus have   0 = ψi ϕi (µi (x)) = πi ψ(ϕ(x)) = πi (z), for some si ∈ Si , si z = 0 in P . We conclude that z = 0 by using the P comaximality of the Si ’s: i ui si = 1. Now let y ∈ N such that ψ(y) = 0. For each i there exists some xi ∈ Mi such that ϕi (xi ) = νi (y). We write xi =Mi ai /si with ai ∈ M and si ∈ Si . The equality ϕi (xi ) = νi (y) P means that for some ti ∈ Si we have ti ϕ(ai ) = ti si y in N . If i vi ti si = 1,  P we can deduce that ϕ i vi ti ai = y. Thus Ker ψ is indeed included in Im ϕ.  6.8. Abstract local-global principle∗ . (For exact sequences) Let M , N , P be A-modules, and ϕ : M → N and ψ : N → P be two linear maps. The following properties are equivalent. ϕ ψ 1. The sequence M −→ N −→ P is exact. ϕm ψm 2. For every maximal ideal m the sequence Mm −→ Nm −→ Pm is exact. As a consequence, ϕ is injective (resp. surjective) if and only if for every maximal ideal m, ϕm is injective (resp. surjective). J The property x = 0 for an element x of a module is a finite character property. Similarly for the property y ∈ Im ϕ. Thus, even if the property “the sequence is exact” is not of finite character, it is a conjunction of finite character properties, and we can apply Fact∗ 2.11 to deduce the abstract local-global principle from the concrete local-global principle.  Let us finally mention a concrete local-global principle for monoids. 64 II. The basic local-global principle and systems of linear equations 6.9. Concrete local-global principle. (For monoids) Let S1 , . . ., Sn be comaximal monoids of A, V be a monoid. The following properties are equivalent. 1. The monoid V contains 0. 2. For i ∈ J1..nK, the monoid V seen in ASi contains 0. J For each i we have some vi ∈ V and some si ∈ Si such that si vi = 0. Q Let v = i vi ∈ V . Then, v is zero in the ASi ’s, thus in A.  Exercises and problems Exercise 1. We recommend the reader to do the proofs which are not given, are sketched, are left to the reader, etc. . . In particular, consider the following cases. • Check Facts 1.2 to 1.4. • Prove Corollary 2.4. • In Lemma 2.6 compute suitable exponents for the items 2, 3 and 4, by making the proof completely explicit. • Prove Corollary 3.3. Give a more detailed proof of Theorem 3.4. Check the details in the proof of the local-global principle 3.5. Prove Proposition 3.7. • Check Facts 6.4 to 6.6. For Fact 6.5 we use the exact sequence 0 → M → Lr N→ N/Mi which is preserved by localization. i=1 Exercise 2. (Also see exercise VII -8) 1. (Invertible elements in B[T ], cf. Lemma 2.6) Pn Pm Let two polynomials f = i=0 ai T i , g = j=0 bj T j with f g = 1. Show that the coefficients ai , i > 1, bj , j > 1 are nilpotent elements and that am+1 = 0. n 2. (Characteristic polynomial of a nilpotent matrix) Pn−1 Let A ∈ Mn (B) be a nilpotent matrix and CA (T ) = T n + k=0 ak T k be its characteristic polynomial. a. Show that the coefficients ai are nilpotent elements. b. Precisely, if Ae = 0, then Tr(A)(e−1)n+1 = 0 and  aei i = 0 where ei = (e − 1) ni + 1 (i = 0, . . . , n − 1). Exercise 3. Let x = (x1 , . . . , xn ) ∈ An be a vector and s ∈ A. 1. If x is unimodular in A/hsi and in A[1/s], it is unimodular in A. 2. Let b and c be two ideals of A. If x is unimodular modulo b and modulo c, then it is also unimodular modulo bc. Exercises and problems 65 Exercise 4. (A typical application of the basic local-global principle) Let x = (x1 , . . . , xn ) ∈ An be unimodular. For d > 1, we denote by A[X1 , . . . , Xn ]d the A-submodule of the homogeneous polynomials of degree d and  Id,x = f ∈ A[X]d | f (x) = 0 , A-submodule of A[X]. 1. If x1 ∈ A× , every f ∈ Id,x is a linear combination of the x1 Xj − xj X1 with homogeneous polynomials of degree d − 1 for coefficients. 2. Generally, every f ∈ Id,x is a linear combination of the (xk Xj − xj Xk ) with homogeneous polynomials of degree d − 1 for coefficients. L I . Show that Ix = { F | F (tx) = 0 } (where t is a new 3. Let Ix = d>1 d,x indeterminate). Show that Ix is saturated, i.e., if Xjm F ∈ Ix for some m and for each j, then F ∈ Ix . Exercise 5. (Variations of the Gauss-Joyal Lemma 2.6) Show that the following statements are equivalent (each statement is universal, i.e., valid for all polynomials and every commutative ring A): 1. c(f ) = c(g) = h1i ⇒ c(f g) = h1i, 2. (∃i0 , j0 fi0 = gj0 = 1) ⇒ c(f g) = h1i, 3. ∃p ∈ N, p c(f )c(g) ⊆ c(f g),   4. (Gauss-Joyal) DA c(f )c(g) = DA c(f g) . Exercise 6. (Norm of a primitive polynomial through the use of a null ring) Let B be a free A-algebra of finite rank, X = (X1 , . . . , Xn ) be indeterminates, Q ∈ B[X] and P = NB[X]/A[X] (Q) ∈ A[X]. Show that if Q is primitive, then so is P . Hint: check that A ∩ cB (P ) = cA (P ), consider the subring A0 = A/cA (P ) of B0 = B/cB (P ) and the A0 -linear map “multiplication by Q,” mQ : B0 [X] → B0 [X], R 7→ QR. Exercise 7. Show that a coherent ring A is strongly discrete if and only if the test “1 ∈ ha1 , . . . , an i?” is explicit for every finite sequence (a1 , . . . , an ) in A. Exercise 8. (An example of a coherent Noetherian ring with a non-coherent quotient.) Consider the ring Z and an ideal a generated by an infinite sequence of elements, all zeros besides eventually one, which is then equal to 3 (for example we place a 3 the first time, if it ever occurs, that a zero of the Riemann zeta function9 has real part not equal to 1/2). If we are able to provide a finite system of generators for the annihilator of 3 in Z/a, we are able to say whether the infinite sequence is identically zero or not. This would mean that there exists a sure method to solve conjectures of the Riemann type. Comment. As every reasonable constructive definition of Noetherianity seems to demand that a Noetherian ring’s quotient remains Noetherian, and given the above “counterexample,” we cannot hope to have a constructive proof of the theorem of classical mathematics which states that every Noetherian ring is coherent. 9 Here we enumerate the zeros an + ibn with bn > 0 by order of magnitude. 66 II. The basic local-global principle and systems of linear equations Exercise 9. (Idempotents of A[X]) Prove that every idempotent of A[X] is an idempotent of A. Exercise 10. Let u and v be two idempotents and x be an element of A. The element 1 − (1 − u)(1 − v) = u + v − uv is denoted by u ∨ v. 1. Show that x ∈ uA ⇔ ux = x. In particular, uA = vA ⇔ u = v. 2. The element uv is the least common multiple of u and v amongst the idempotents of A (i.e., if w is an idempotent, w ∈ uA ∩ vA ⇔ w ∈ uvA). Actually, we even have uA ∩ vA = uvA. We write u ∧ v = uv. 3. Prove the equality uA + vA = (u ∨ v)A. Infer that u ∨ v is the greatest common divisor of u and v amongst the idempotents of A (in fact an arbitrary element of A divides u and v if and only if it divides u ∨ v). 4. By a sequence of elementary operations, transform the matrix Diag(u, v) into the matrix Diag(u ∨ v, u ∧ v). From it, deduce that the two A-modules uA ⊕ vA and (u ∨ v)A ⊕ (u ∧ v)A are isomorphic. 5. Show that the two rings A/hui × A/hvi and A/hu ∨ vi × A/hu ∧ vi are isomorphic. Exercise 11. Let A be a ring and (e1 , . . . , en ) be a fundamental system of orthogonal idempotents of Frac A = K. We write ei = ai /d with ai ∈ A and P d ∈ Reg A. We then have ai aj = 0 for i 6= j and a regular. i i 1. Establish a converse.   Q 2. Show that K[1/ei ] ' Frac A/AnnA (ai ) and K ' i Frac A/AnnA (ai ) . Exercise 12. (Separating the irreducible components) 1. Let A = Q[x, y, z] = Q[X, Y, Z]/hXY, XZ, Y Zi and K = Frac A. What are the zeros of A in Q3 (i.e. (x, y, z) ∈ Q3 such that xy = yz = zx = 0)? Give a reduced form of the elements of A. Show that x + y + z ∈ Reg A. Show that the y x z elements , and form a fundamental system of x+y+z x+y+z x+y+z orthogonal idempotents in K. Show that K ' Q(X) × Q(Y ) × Q(Z). 2. Let B = Q[u, v, w] = Q[U, V, W ]/hU V W i and L = Frac B. What are the zeros of B in Q3 ? Give a reduced form of the elements of B. Show that L ' Q(U, V ) × Q(V, W ) × Q(W, U ). Exercise 13. (Idempotent and elementary group) Let a ∈ A be an idempotent. For b ∈ A, give a matrix A ∈ E2 (A) and an element     a d d ∈ A such that A = . In particular, explain why ha, bi = hdi. b 0 Moreover, prove that if b is regular (resp. invertible) modulo a, then d is regular (resp. invertible). Finally, if b is idempotent, d = a ∨ b = a + b − ab. Exercises and problems 67 Exercise 14. Let (r1 , . . . , rm ) be a finite family of in a ring A. Let Qidempotents Q si = 1 − ri and, for a subset I of J1..mK, let rI = i∈I ri i∈I s . i / 1. Show that the diagonal matrix D = Diag(r1 , . . . , rm ) is similar to a matrix D0 = Diag(e1 , . . . , em ) where the ei ’s are idempotents which satisfy: ei divides ej if j > i. You can start with the n = 2 case and use Exercise 10. Show that hek i = Dk (D) for all k. 2. Show that we can write D0 = P DP −1 with P P a generalized permutation matrix, i.e. a matrix which can be written as f P where the fj ’s form a j j j fundamental system of orthogonal idempotents and each Pj is a permutation matrix. generalized permutation — Suggestions: • The rI ’s form a fundamental system of orthogonal idempotents. The diagonal matrix rI D has the element rI as its coefficient in position (i, i) if i ∈ I and 0 otherwise. The matrix PI then corresponds to a permutation bringing the P coefficients rI to the head of the list. Finally, P = I rI PI . Note that the test “rI = 0?” is not necessary!  1 0 0 1 0 f = r2 s1 , e = 1 − f , and D = Diag(r1 ∨ r2 , r1 ∧ r2 ). Next we treat the m > 2 case step by step.  • We can also treat the m = 2 case: find P = e  +f 0 1 1 0  with Exercise 15. Recall the proof of the Chinese Remainder Theorem (page 38) and explicitly give the idempotents. Exercise 16. (Elementary Group: first steps) M2 (A) case.     a 0 1. Let a ∈ A. Determine a matrix P ∈ E2 (A) such that P = . Same     0 a εa a for 7→ where ε ∈ A× . 0 0     0 −1 −1 0 and as elements of E2 (A). 2. Write the matrices 1 0 0 −1 3. Show that every triangular matrix of SL2 (A) is in E2 (A).       x y −y , v = , w = with x, y ∈ A. Show that y x x v ∈ GL2 (A) · u and w ∈ E2 (A) · u, but not necessarily v ∈ SL2 (A) · u. For example, if x, y are two indeterminates over a ring k, A = k[x, y] and v = Au, with A ∈ GL2 (A), then det(A) (0, 0) = −1. Consequently, we have det(A) ∈ −1 + Dk (0) hx, yi (Lemma 2.6), therefore det(A) = −1 if k is reduced. In addition, if det(A) = 1, then 2 = 0 in k. As a result, v ∈ SL2 (A) · u if and only if 2 = 0 in k. 4. Let u = Exercise 17. (Elementary group: next steps) 1. Let A ∈ Mn,m (A) with an invertible coefficient and (n, m) 6= (1, 1). Determine  1 01,m−1 matrices P ∈ En (A) and Q ∈ Em (A) such that P A Q = . 0     0n−1,1 A a 1 Example: with a ∈ A× give P for P = (Exercise 16 item 1 ). 0 0 68 II. The basic local-global principle and systems of linear equations 2. Let A ∈ M2 (A) with coefficient. Compute matrices P and Q ∈ E2 (A)  an invertible  1 0 such that: P A Q = with δ = det(A). 0 δ Every matrix A ∈ SL2 (A) with an invertible coefficient belongs to EE2 (A). Make the following cases explicit:  a 0 0   , a−1 a 0 0 −a−1  with a ∈ A× . , Write the following matrices (with a ∈ A× ) in E2 (A):  a 0  b a−1  , a b 0   , a−1  a b 0 −a−1  , b −a−1 a 0  . 3. Prove that if A = Diag(a1 , a2 , . . . , an ) ∈ SLn (A), then A ∈ En (A). 4. Show that every triangular matrix A ∈ SLn (A) belongs to En (A). Exercise 18. (Division matrices Dq of determinant 1) A “general division” a = bq − r can be expressed with matrices:  0 −1 1 q  a b   = b r  This leads to the introduction of the matrix Dq =  . 0 −1 1 q  ∈ SL2 (A). Show that E2 (A) is the monoid generated by the Dq matrices. Exercise 19. Let A be a ring and A, B ∈ Mn (A). Assume that we have some i ∈ A with i2 = −1 and that 2 ∈ A× . Show that the matrices of M2n (A)  M= A B −B A  0 and M =  A + iB 0 0 A − iB  are elementarily similar, (i.e., ∃P ∈ E2n (A), P M P −1 = M 0 ). Hint: first treat the n = 1 case. Exercise 20. For d ∈ A× and λ ∈ A compute the matrix Diag(1, . . . , d, . . . , 1) · Eij (λ) · Diag(1, . . . , d−1 , . . . , 1). Show that the subgroup of diagonal matrices of GLn (A) normalizes En (A). Exercise 21. (A freeness lemma, or a Splitting Off: reader’s choice) Let F ∈ AGn (A) be a projector with principal minor of order k.  an invertible  Ik 0 Show that F is similar to a matrix where F 0 ∈ AGn−k (A). 0 F0 def The finitely generated projective module P = Im F ⊆ An admits a free direct summand with k columns of F for its basis. Exercise 22. Let A ∈ An×m be of rank 1. Construct B ∈ Am×n such that ABA = A and verify that AB is a projector of rank 1. Compare your solution with that which would result from the proof of Theorem 5.14. Exercises and problems 69 Exercise 23. This exercise constitutes an abstraction of the computations that led to Theorem 5.14. Consider an A-module E “with enough linear forms”, i.e. if x ∈ E satisfies µ(x) = 0 for all µ ∈ E ? , then x = 0. This means that the canonical map from E to its bidual, E → E ?? , is injective. This condition is satisfied if E is a reflexive module, i.e. E ' E ?? , e.g. a finitely generated projective module, or a free module of finite rank. V For x1 , . . ., xn ∈ E, denote by r (x1 , . . . , xn ) the ideal of A generated by the evaluations of every r-multilinear alternating form of E at every r-tuplet of elements of {x1 , . . . , xn }. Assume that 1 ∈ V r (x1 , . . . , xn ) and V r+1 (x1 , . . . , xn ) = 0. P We want to prove that the submodule Axi is a direct summand in E by explicitly giving a projector π : E → E whose image is this submodule. 1. (Cramer’s formulas) P Let f be an r-multilinear alternating form over E. Show, for y0 , . . ., yr ∈ Axi , that Xr i=0 (−1)i f (y0 , . . . , yi−1 , ybi , yi+1 , . . . , yr ) yi = 0. Or, for y, y1 , . . ., yr ∈ P Axi , that f (y1 , . . . , yr ) y = Xr i=1 f (y1 , . . . , yi−1 , y, yi+1 , . . . , yr ) yi . 2. Give n linear forms αi ∈ E ? such that the linear map π : E → E, x 7→ P i αi (x)xi is a projector onto Axi . We define ψ : An → E by ei 7→ xi and ϕ : E → An  by ϕ(x) = α1 (x), . . . , αn (x) . Arrange for π = ψ ◦ ϕ and π ◦ ψ = ψ, so that ψ ◦ ϕ ◦ ψ = ψ. P 3. (New proof of Theorem 5.14) Let A ∈ Am×n be a matrix of rank r. Show that there exists a B ∈ An×m such that A B A = A. Exercise 24. Let A ∈ An×m and B ∈ Am×n . 1. We have the following commutativity formula: det(Im + XBA) = det(In + XAB). First proof. First treat the case where m = n, for example by the method of undetermined coefficients. If m 6= n, A and B can be completed with rows and columns of 0’s to turn them into square matrices A1 and B1 of size q = max(m, n) as in the proof given page 40. Then check that det(Im + XBA) = det(Iq + XB1 A1 ) and det(In + XAB) = det(Iq + XA1 B1 ). Second proof. Consider an undetermined X and the matrices B0 =  XB In Im 0n,m  and A0 =  A Im In −XB  . Compute A0 B 0 and B 0 A0 . 2. What can be deduced about the characteristic polynomials of A B and B A? 70 II. The basic local-global principle and systems of linear equations Exercise 25. (Binet-Cauchy formula) We use the notations on page 47. For two matrices A ∈ An×m and B ∈ Am×n , prove that we have the Binet-Cauchy formula: det(BA) = X α∈Pm,n det(B1..m,α ) det(Aα,1..m ). First proof. Use the formula det(Im + XBA) = det(In + XAB) (Exercise 24). Then consider the coefficient of X m in each of the polynomials det(Im + XBA) and det(In + XAB). Second proof. The matrices A and B represent linear maps u : Am → An and v : An → Am . Vm Vm Vm u, v and Then consider the matrices of (v ◦ u) with respect to the bases n naturally associated with the canonical bases of A and Am . Vm Vm Vm Conclude by writing (v ◦ u) = v◦ u. Third proof. In the product BA insert between B and A a diagonal matrix D having indeterminates λi for coefficients, and see which is the coefficient of λi1 · · · λim in the polynomial det(BDA) (to do this take λi1 = · · · = λim = 1 and let the other be null). Conclude by letting all the λi ’s be equal to 1. Exercise 26. Let u ∈ EndA (An ). For k ∈ J0..nK, let uk = n−1 Show that det(u ) = det(u)(k−1) and that Vk (u). k n det(uk ) det(un−k ) = det(u)(k ) . Exercise 27. For A ∈ An×r prove that the following properties are equivalent. 1. The matrix A is injective and locally simple. 2. There exists a matrix B ∈ Ar×n such that B A = Ir . 3. The determinantal ideal Dr (A) = h1i. Hint: See Theorems 5.14, 5.22 and 5.26. Exercise 28. Treat the general case in the proof of Lemma 5.30. Exercise 29. If gramA (ϕ, x1 , . . . , xn ) is invertible, the submodule Ax1 +· · ·+Axn is free with (x1 , . . . , xn ) as its basis. Problem 1. (Gauss’ pivot, A B A = A, and linear rationality) Let K be a discrete field. If x ∈ Kn is a nonzero vector, its pivot index i is the least index i such that xi 6= 0. We say that the coefficient xi is the pivot of x. The height h(x) of x is the integer n − i + 1 and it is agreed that h(0) = 0. For   0  1  example, for n = 4 and x =  , the pivot index of x is i = 2, and h(x) = 3. ∗  ∗ The following notions of “staggering” are relative to this height h. We say that a matrix A ∈ Mn,m (K) has staggered columns if the nonzero columns of A have distinct heights; we say that it is strictly staggered if, additionally, the Exercises and problems 71 rows at the pivot indices are vectors of the canonical basis of Km (these vectors are necessarily distinct). Here is a strictly staggered matrix (0 has been replaced by a dot):   · · · 1 · · · · a24 · ·   ·  · · 1 · · ·     · · a43 a44 · ·     1 · · · · ·   .  · 1 · · · ·     a71 a72 a73 a74 · ·   ·  · · · 1 · a91 a92 a93 a94 a95 · 1. Let A ∈ Mn,m (K) be strictly staggered; we define A ∈ Mn,m (K) by annihilating the nonpivot coefficients (the aij ’s in the above exercise) and B = t A ∈ Mm,n (K). Check that ABA = A. Describe the projectors AB, BA and the decomposition Kn = Im AB ⊕ Ker AB. 2. Let A ∈ Mn,m (K) be an arbitrary matrix. How do you obtain Q ∈ GLm (K) such that A0 = AQ is strictly staggered? How do you compute B ∈ Mm,n (K) satisfying ABA = A? 3. Let A ∈ Mn,m (K) and y ∈ Kn . Assume that the system of linear equations Ax = y admits a solution x on an overring of K. Show that it admits a solution on K. 4. Let K0 ⊆ K be a subfield and E, F be two complementary K-linear subspaces of Kn . Assume that E and F are generated by vectors with components in K0 . n n Show that Kn 0 = (E ∩ K0 ) ⊕ (F ∩ K0 ). Let E ⊆ Kn be a K-linear subspace. We say that E is K0 -rational if it is generated by vectors with components in K0 . 5. Let F be a complementary subspace of E in Kn generated by vectors of the canonical basis of Kn : Kn = E ⊕ F and π : Kn  E be the associated projection. a. Show that E is K0 -rational if and only if π(ej ) ∈ Kn 0 for every vector ej of the canonical basis. b. Deduce the existence of a smaller field of rationality for E. c. What is the field of rationality of the image in Kn of a strictly staggered matrix? Problem 2. 1. Partial factorization algorithm. Given two integers a and b prove that we can “efficiently” compute a finite family of pairwise coprime positive integers pi such Qn Qn βi i that a = ± i=1 pα p . i and b = ± i=1 i 2. Consider a system of linear equations AX = B in Z which admits an infinity of solutions in Qm . To know if it admits a solution in Zm we can try a local-global method. Start by determining a solution in Q, which is a vector X ∈ Qm . Find an integer d such that dX ∈ Zm , such that X has coefficients in Z[1/d]. It then suffices to construct a solution in each localized ring Z1+pZ for the prime p’s which 72 II. The basic local-global principle and systems of linear equations divide d and to apply the concrete local-global principle 2.3. To know if there is a solution in Z1+pZ and to construct one, we can use the pivot method, provided we take as pivot an element of the matrix (or rather the remaining part of the matrix) which divides every other coefficient, i.e. a coefficient wherein p appears with a minimum exponent. The drawback of this method is that it requires factorizing d, which can render it unfeasible. However, we can slightly modify the method in order to avoid having to completely factorize d. We will use the partial factorization algorithm. Start as if d were a prime number. More precisely work with the ring Z1+dZ . Check whether a coefficient of the matrix is comaximal to d. If one is found, use it as your pivot. Otherwise no coefficient of the matrix is comaximal to d and (by using if necessary the partial factorization algorithm) we have one of the following three cases: • d divides all the coefficients of the matrix, in which case, either it also divides the coefficients of B and it is reduced to a simpler problem, or it does not divide any coefficient of B and the system of linear equations has no solution, • d is written as a product of pairwise comaximal factors d = d1 · · · dk with k > 2, in which case we can then work with the localizations at the monoids (1 + d1 Z), . . . , (1 + dk Z), • d is written as a pure power of some d0 dividing d, which, with d0 in place of d, brings us to a similar but simpler problem. Check that we can recursively exploit the idea expressed above. Write an algorithm and test it. Examine whether the obtained algorithm runs in a reasonable time. Some solutions, or sketches of solutions Exercise 2. 1. Assume without loss of generality a0 = b0 = 1. When you write f g = 1, you get 0 = an bm , 0 = an bm−1 + an−1 bm , 0 = an bm−2 + an−1 bm−1 + an−2 bm , and so on up to degree 1. Then prove by induction over j that deg(ajn g) 6 m − j. In particular, for j = m + 1, we get deg(am+1 g) 6 −1, i.e. am+1 g = 0. Whence n n m+1 an = 0. Finally, by reasoning modulo DB (0), we obtain successively nilpotent aj ’s for j = n − 1, . . ., 1. 2a. Consider the polynomials over the commutative ring B[A]: f (T ) = det(In − T A) and g(T ) = det(In + T A + T 2 A2 + · · · + T e−1 Ae−1 ). We have f (T )g(T ) = det(In − T e Ae ) = 1. The coefficient of degree n − i of f is ±ai . Apply 1. Vn−i  2b. It suffices to prove that Tr(A)(e−1)n+1 = 0, because ai = ± Tr (A) . Consider the determinant defined with respect to a fixed basis B of An . If we Solutions of selected exercises 73 take the canonical basis formed by the ei ’s, we have an obvious equality  Tr(f ) = detB (f (e1 ), e2 , . . . , en ) + · · · + detB e1 , e2 , . . . , f (en ) . It can be written in the following form:  Tr(f ) detB (e1 , . . . , en ) = detB (f (e1 ), e2 , . . . , en ) + · · · + detB e1 , e2 , . . . , f (en ) . In this form we can replace the ei ’s by any system of n vectors of An : both sides are n-multilinear alternating forms (at the ei ’s) over An , therefore are equal because they coincide on a basis. Thus, multiplying a determinant by Tr(f ) reduces to replacing it by a sum of determinants in which f acts on each vector. One deduces that the expression Tr(f )n(e−1)+1 detB (e1 , . . . , en ) is equal to a sum of which each term is a determinant of the form detB f m1 (e1 ), f m2 (e2 ), . . . , , f mn (en ) ,  with P i mi = n(e − 1) + 1, therefore at least one of the exponents mi is > e. Remark. This solution for the bound n(e − 1) + 1 is due to Gert Almkvist. See on this matter: Zeilberger D. Gert Almkvist’s generalization of a mistake of Bourbaki. Contemporary Mathematics 143 (1993), p. 609–612. Exercise 3. 1. Let a = hx1 , . . . , xn i. Obtaining sr ∈ a (for some r), and 1 − as ∈ a (for some a). Write 1 = ar sr + (1 − as)(1 + as + · · ·) ∈ a. 2. a + b = h1i, a + c = h1i and (a + b)(a + c) ⊆ a + bc, therefore a + bc = h1i. Exercise 4. 1. Since f is homogeneous, we have f (tx) = 0 for a new indetermiPn nate t. Whence each Ui ∈ A[X1 , . . . , Xn , t] such that f = i=1 (Xi − txi )Ui . By making t := x−1 1 X1 , we obtain each vi ∈ A[X1 , . . . , Xn ] such that f= Pn i=2 (x1 Xi − xi X1 )vi . Finally, since f is homogeneous of degree d, we can replace vi by its homogeneous component of degree d − 1. P 2. Consider the equality f = (xk Xj − xj Xk )ukj , where the ukj ’s are hok,j mogeneous polynomials of degree d − 1. It is a system of linear equations in the coefficients of the ukj ’s. Since this system admits a solution over each localized Axi and that the xi ’s are comaximal, it admits a solution over A. P 3. If F = d Fd is the decomposition of F ∈ A[X1 , . . . , Xn ] into homogeneous components, we have F (tx) = 0 if and only if Fd (x) = 0 for all d, whence the first item of the question. For the saturation, we prove that if Xi F ∈ Ix for all i, then F ∈ Ix . But we have xi F (tx) = 0. Therefore, by comaximality of the xi ’s, we get F (tx) = 0, i.e. F ∈ Ix . Exercise 6. The polynomial Q, regarded as a polynomial with coefficients in B0 , remains primitive and therefore regular (Gauss-Joyal, item 2 of Lemma 2.6). Since mQ is injective, its determinant det(mQ ) = P ∈ A0 [X] is regular (Theorem 5.22, item 2 ). But P is also null in A0 [X]. Thus A0 is the null ring, in other words 1 ∈ cA (P ). 74 II. The basic local-global principle and systems of linear equations Exercise 9. Let f (X) be an idempotent of A[X]. Clearly e = f (0) is idempotent. We want to prove that f = e. For this we can reason separately modulo e and modulo 1 − e. If e = 0, then f = Xg. We have (Xg)(1 − Xg) = 0, or 1 − Xg is regular, thus g = 0. If e = 1, consider the idempotent 1 − f and we are reduced to the previous case. Exercise 10. For question 5 first prove the result when uv = 0. In the general situation, write u0 = 1 − u and v 0 = 1 − v. We then have a fundamental system of orthogonal idempotents (uv, uv 0 , u0 v, u0 v 0 ) and by applying the previous special case we see that the two rings are isomorphic to the product A/huv 0 i × (A/huvi)2 × A/hu0 vi. Exercise 11. 2. We have K[1/ei ] ' PK/AnnK (ei ) and AnnK (ei ) = AnnA (ai )K. For an element x of A, write dx = i∈J1..nK xi in K, with xi = ei dx = ai x. The decomposition is thus entirely in A. Since dx ≡ xi mod AnnA (ai ) the component K/AnnK (ei ) of the product, when seen as the ideal ei K, is formed from the elements of the form ai x/y with x ∈ A and y regular in A. But y is regular in A if and only if each yi = ai y is regular modulo AnnA (ai ), so that K/AnnK (ei ) is identified with Frac(A/AnnA (ai )). Exercise 12. 1. The zeros of A are the three “coordinate axes.” Every element of A is uniquely written in the form u = a + xf (x) + yg(y) + zh(z), with f , g, h ∈ Q[T ]. This implies that x + y + z is regular because    (x + y + z)u = x a + xf (x) + y a + yg(y) + z a + zh(z) . y x z So the elements , and form a fundamental system x+y+z x+y+z x+y+z of orthogonal idempotents of K. Conclude with Exercise 11 by noting that AnnA (x) = hy, zi, and thus that A/AnnA (x) ' Q[X]. 2. The zeros of B are the three “coordinate planes.” The fundamental system uv vw of orthogonal idempotents in L is given by , and uv + vw + wu uv + vw + wu wu . uv + vw + wu Exercise 13.  It  suffices  to solve  the  question   modulo a and modulo 1 − a. a 0 b b Modulo a: = 7→ 7→ . b b b 0      a 1 1 Modulo 1 − a, = 7→ b b 0 example the matrix A = A2 A1 , where  A1 = (1 − a)  A2 = (1 − a) 1 −1 1 0 1 1 0 1  . By patching: d = (1 − a)b + a with for   +a   +a 1 0 0 1  1 −b 0 1   =  = 1 0 1−a 1 1 a − ab − 1  , 0 1  Solutions of selected exercises and 75  1−a a 1 a − ab − 1 A=  Exercise 18. The matrix D0 = 0 1 −1 0  .   transforms x y   into −y x  , so D02 = −I2 and D03 = −D0 = D0−1 . We also have D0 = E12 (1)E21 (−1)E12 (1), D0 Dq = −E12 (q) and Dq D0 = −E21 (q). Exercise 21. Let (e1 , . . . , en ) be the canonical basis of An and (f1 , . . . , fn ) the n columns of F . We can assume that the invertible principal minor is in the north-west position such that (f1 , . . . , fk , ek+1 , . . . , en ) is a basis of An .   Ik ∗ def Since F (fj ) = fj , the matrix of F with respect to this basis is G = . 0 ∗ The matrix G is idempotent as well as its transposed G0 . Apply to the projector G0 the operation that we just subjected to F . L Since G0 (ej ) ∈ Aei for j > k + 1, the matrix of G0 with respect to the i>k+1  new basis is of the form H = Ik 0 0 ∗  , whence the result because F is similar to tH. Exercise 22. We have each bji ∈ A such that 1 = P i,j bji aij . Let B ∈ Am×n be defined by B = (bji ). Check that ABA = A: (ABA)ij = P l,k ail blk akj . P P ail aij = 0, so (ABA)ij = a a b = aij l,k akl blk = aij . l,k ij kl lk akl akj Consequently, AB is a projector. P P Let us prove that AB is of rank 1. We have Tr(AB) = i (AB)ii = i,j aij bji = 1, thus D1 (AB) = 1. Furthermore, D2 (AB) ⊆ D2 (A) = 0. But Exercise 23. 1. Fix a linear form µ. The map E r+1 → A defined by (y0 , . . . , yr ) 7→ Pr i=0 (−1)i f (y0 , . . . , yi−1 , ybi , yi+1 , . . . , yr ) µ(yi ), where teh symbol ybi denotes the omission of the element, is an (r + 1)-multilinear alternating form. According to the hypothesis we obtain Pr i=0 V r+1 (x1 , . . . , xn ) = 0 and the injectivity of E 7→ E ?? , (−1)i f (y0 , . . . , yi−1 , ybi , yi+1 , . . . , yr ) yi = 0. Write y instead of y0 and execute the following operation: in the expression (−1)i f (y, . . . , yi−1 , ybi , yi+1 , . . . , yr ), bring y between yi−1 and yi . The permutation thus executed necessitates a multiplication by (−1)i−1 . We then obtain the second equality in which all the 76 II. The basic local-global principle and systems of linear equations signs “have disappeared.” For example with r = 4, the expression f (yb, y1 , y2 , y3 , y4 )y − f (y, yb1 , y2 , y3 , y4 )y1 + f (y, y1 , yb2 , y3 , y4 )y2 − f (y, y1 , y2 , yb3 , y4 )y3 + f (y, y1 , y2 , y3 , yb4 )y4 = f (y1 , y2 , y3 , y4 )y − f (y, y2 , y3 , y4 )y1 + f (y, y1 , y3 , y4 )y2 − f (y, y1 , y2 , y4 )y3 + f (y, y1 , y2 , y3 )y4 is none other than f (y1 , y2 , y3 , y4 )y − f (y, y2 , y3 , y4 )y1 − f (y1 , y, y3 , y4 )y2 − f (y1 , y2 , y, y4 )y3 − f (y1 , y2 , y3 , y)y4 . A faster proof: apply a linear form µ to the last expression above, check that the obtained map (y, y1 , y2 , y3 , y4 ) 7→ µ(. . .) is 5-multilinear alternating, and therefore is null by the assumptions. 2. Treat the r = 3 case. We have an assumption 1= X αijk fijk (xi , xj , xk ), ijk fijk 3-multilinear alternating over E. Define π : E → E by: π(x) = X ijk αijk [fijk (x, xj , xk )xi + fijk (xi , x, xk )xj + fijk (xi , xj , x)xk ]. P Clearly, the image of p is contained in the submodule P for x ∈ Axi , we have Axi . In addition, fijk (x, xj , xk )xi + fijk (xi , x, xk )xj + fijk (xi , xj , x)xk = fijk (xi , xj , xk )x. P Whence π(x) = x: the endomorphism π : E → E is a projector onto Axi . P Notice that p is of the form π(x) = i αi (x)xi i.e. π = ψ ◦ ϕ and that π ◦ ψ = ψ. 3. The module E in question is Am and the vectors x1 , . . ., xn are the columns of A. We have ψ = A : An → Am , and if we let B ∈ An×m be the matrix of ϕ : Am → An , we indeed have ABA = A. So, the linear map AB : Am → Am is a projector having the same image as A. Exercise 26. Let us first see the case where u = Diag(λ1 , . . . , λn ). We have a Vk n basis (eI ) of (A ) indexed by the subsets I ⊆ {1, . . . , n} of cardinality k: eI = ei1 ∧ · · · ∧ eik I = {i1 < · · · < ik } . Q Then, uk is diagonal with respect to the basis (eI ): uk (eI ) = λI eI with λI = i∈I λi . Q Q It follows that det(uk ) = #I=k i∈I λi . It remains to determine, for some j given in J1..nK, the number of occurrences of λj in the above product. In other words, how many subsets I, of cardinality k, contain j? As manyas there are subsets of cardinality k − 1 contained in {1, · · · , n} \ {j}, i.e. n−1 . The result k−1 is proven for a generic matrix. Thus it is true for any matrix. The second point follows from the equalities  n−1 k−1   +  n−1 n−k−1  = n−1 k−1   +  n−1 k   = n . k Solutions of selected exercises 77 Exercise 28. The general case is treated by induction on n. Consider the polynomial ring Z[(xij )] with n2 indeterminates and the universal matrix A = (xij ) with coefficients in this ring. Let ∆1k ∈ Z[(xij )] be the cofactor of x1k in A. These cofactors satisfy the identities: Xn Xn x1j ∆1j = det A, j=1 j=1 xij ∆1j = 0 for i > 1. Since the Nkl ’s pairwise commute, the specialization xkl 7→ Nkl is legitimate. Let 0 N1j = ∆1j (xkl 7→ Nkl ), then we have 0 N11 = P σ∈Sn−1 ε(σ)N2σ2 N3σ3 . . . Nnσn . Let us define N 0 by: 0 N11   0  N N 0 =  12  .. . 0 N1n 0 ··· Im .. . 0 .. 0 ..  .   ∆ 0  0  , so that N N =  ..   . 0 0 Im . ···  N12 N22 ··· ··· Nn2 ··· N1n N2n  ..  . . Nnn  By taking determinants, we get  N22  0 det(N ) det(N11 ) = det(∆) det  ... Nn2  ··· N2n ..  . .  Nnn ··· The induction hypothesis provides the equalities  ··· N22  det  ... Nn2 ···  N2n  X  ..  = det 0 ε(σ)N N · · · N = det(N11 ). 2σ 3σ nσ  n 2 3 . σ∈S n−1 Nnn 0 Simplification by the regular element det(N11 ) gives the equality det(N ) = det(∆). Problem 1. 1. If Aj is a nonzero column of A, we have BAj = ej and therefore ABAj = Aj ; thus AB is the identity over Im A, so ABA = A. The matrix AB is lower triangular, and its diagonal coefficients are 0, 1. The matrix BA is diagonal and its diagonal coefficients are 0, 1.     B=   · · · 1 · · · · · · · · · · 1 · · · · · · · · · 1 · · · · · · 1 · · · · · · · · · · · · · · 1 · · · · · · ·     ,       BA =    1 · · · · · · 1 · · · · · · 1 · · · · · · 1 · · · · · · 1 · · · · · · ·     ,   78 II. The basic local-global principle and systems of linear equations       AB =       1 a24 · a44 · · a74 · a94 · · · · · · · · · · · 1 a43 · · a73 · a93 · · · · · · · · · · · · · 1 · a71 · a91 · · · · · 1 a72 · a92 · · · · · · · · · · · · · · · · 1 a95 · · · · · · · · ·       .      The complementary subspace Ker AB of Im A = Im AB in Kn admits as its basis the ei ’s for the indices i of the rows that do not contain a pivot index. In the example, (e2 , e4 , e7 , e9 ) is a basis of Ker AB. 2. We obtain (Q, A0 ) by Gauss’ (classical) pivot method. If the matrix B 0 ∈ Mn,m (K) satisfies A0 B 0 A0 = A0 , then AQB 0 AQ = AQ, therefore the matrix B = QB 0 satisfies ABA = A. 3. Consider a matrix B ∈ Mm,n (K) such that ABA = A. Then, if y = Ax for some m-vector with coefficients in an overring of K, we have A(By) = y, whence the existence of a solution on K, namely By. 4. Let (u1 , . . . , ur ) be a generator set of the K-vector space E, constituted of n vectors of Kn 0 ; similarly for (v1 , . . . , vs ) and F . Let z ∈ K0 , which we want to express in the form z = x1 u1 + · · · + xr ur + y1 v1 + · · · + ys vs with each xi , yj ∈ K0 . We thus obtain a K0 -linear system from the unknowns xi ’s, yj ’s which admits a solution on K, therefore also on K0 . 5.a. If every π(ej ) is in Kn 0 , then the subspace E, generated by the π(ej )’s, is K0 -rational. Conversely, if E is K0 -rational, since F is also K0 -rational, by the previous question we have π(ej ) ∈ Kn 0 for all j. b. Now trivial: K0 is the subfield generated by the components of the π(ej ) vectors. c. The field of rationality of a strictly staggered matrix is the subfield generated by the coefficients of the matrix. For example with E = Im A ⊂ K5 : e1 e2 A = e3 e4 e5 w1 1  a   0  0 b  w2 0 0 1 0 c w3  0 0   0 , 1  d we get E = Kw1 ⊕ Kw2 ⊕ Kw3 and we have K5 = E ⊕ F with F = Ke2 ⊕ Ke5 . Since e1 − w1 ∈ F, e3 − w2 ∈ F, e4 − w3 ∈ F, we have π(e1 ) = w1 , π(e3 ) = w2 , π(e4 ) = w3 and π(e2 ) = π(e5 ) = 0. The field of rationality of E is K0 = k(a, b, c, d), where k is the prime subfield of K. Bibliographic comments 79 Bibliographic comments The Gauss-Joyal Lemma is in [78], which gives it its name. On the general subject of comparison between the ideals c(f )c(g) and c(f g) see [40, 93, 143] and, in this work, Sections III -2 and III -3 and Proposition XI -3.14. Regarding the constructive treatment of Noetherianity, see [MRR, 110, 145, 146, 156, 166, 167, 184]. The whole of Section 5 can be more or less found in [Northcott]. For example the formula (12) on page 47 is found in a related form in Theorem 5 on page 10. Likewise, our Cramer-style magic formula (17) on page 48 is very similar to Theorem 6 on page 11: Northcott attaches central importance to the matrix equation A B A = A. On this subject, see also [Rao & Mitra] and [58, Díaz-Toca&al.]. Proposition 5.15 is in [Bhaskara Rao] Theorem 5.5. Concerning Theorem 5.26: in [Northcott] Theorem 18 on page 122 establishes the equivalence of items 1 and 5 by a method which is not entirely constructive, but Theorem 5 page 10 would allow us to give an explicit formula for the implication 5 ⇒ 1. Chapter III The method of undetermined coefficients Contents 1 2 3 4 5 6 Introduction . . . . . . . . . . . . . . . . . . . . . . . A few words on finite sets . . . . . . . . . . . . . . . . . . Polynomial rings . . . . . . . . . . . . . . . . . . . . . Partial factorization algorithm . . . . . . . . . . . . . . . Universal property of polynomial rings . . . . . . . . . . Algebraic identities . . . . . . . . . . . . . . . . . . . . . Symmetric polynomials . . . . . . . . . . . . . . . . . . . Dedekind-Mertens lemma . . . . . . . . . . . . . . . One of Kronecker’s theorems . . . . . . . . . . . . . A-algebras and integral elements . . . . . . . . . . . . . . The theorem . . . . . . . . . . . . . . . . . . . . . . . . . The universal splitting algebra (1) . . . . . . . . . . Discriminant, diagonalization . . . . . . . . . . . . . Definition of the discriminant of a monic polynomial . . Diagonalization of the matrices on a ring . . . . . . . . . The generic matrix is diagonalizable . . . . . . . . . . . An identity concerning characteristic polynomials . . . . An identity concerning exterior powers . . . . . . . . . . Tschirnhaus transformation . . . . . . . . . . . . . . . . . New version of the discriminant . . . . . . . . . . . . . . Discriminant of a universal splitting algebra . . . . . . . Basic Galois theory (1) . . . . . . . . . . . . . . . . . – 81 – . . . . . . . . . . . . . . . . . . . . . . 82 84 84 84 85 86 88 89 91 91 92 95 98 98 98 100 100 101 102 102 103 105 82 III. The method of undetermined coefficients 7 8 9 10 Factorization and zeros . . . . . . . . . . . . . . . . . . . Strictly finite algebras over a discrete field . . . . . . . . The elementary case of Galois theory . . . . . . . . . . . Construction of a splitting field . . . . . . . . . . . . . . . The resultant . . . . . . . . . . . . . . . . . . . . . . . Elimination theory . . . . . . . . . . . . . . . . . . . . . . The Sylvester matrix . . . . . . . . . . . . . . . . . . . . Revisiting the discriminant . . . . . . . . . . . . . . . . . Algebraic number theory, first steps . . . . . . . . . Integral algebras . . . . . . . . . . . . . . . . . . . . . . . Number fields . . . . . . . . . . . . . . . . . . . . . . . . Ring of integers of a number field . . . . . . . . . . . . . Hilbert’s Nullstellensatz . . . . . . . . . . . . . . . . The algebraic closure of Q and of finite fields . . . . . . . The classical Nullstellensatz (algebraically closed case) . The formal Nullstellensatz . . . . . . . . . . . . . . . . . Newton’s method in algebra . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 105 108 113 116 116 117 122 124 124 129 130 137 137 137 143 145 148 163 176 Introduction Weil Gauss ein echter Prophet der Wissenschaft ist, deshalb reichen die Begriffe, die er aus der Tiefe der Wissencshaft schöpft, weit hinaus über den Zweck, zu welchem sie aufgestellt wurden. Kronecker Vorlesungen Sommersemester 1891. Leçon 11 [18] Approx. transl. Because Gauss is a true Prophet of Science, the concepts that he draws from the depths of Science go beyond the purpose for which they were established. In 1816, Gauss published a fundamental article [87] in which he corrects (without citing) the proof of the fundamental theorem of algebra given by Laplace a few years beforehand. Laplace’s proof is itself remarkable as it is “purely algebraic:” it claims only two very elementary properties for real numbers: the existence of the square root of a non-negative number and that of a zero for a polynomial of odd degree. Introduction 83 Gauss’ goal is to treat this theorem without using a (hypothetical) field of imaginary numbers, over which an arbitrary polynomial would be decomposed into linear factors. Laplace’s proof implicitly assumes the existence of such a field K containing C = R[i], and shows that the decomposition into products of linear factors actually takes place in C[X]. Gauss’ proof dispenses with the assumption about the field K and constitutes a tour de force that shows that you can handle things in a purely formal way. He proves the existence of the gcd of two polynomials by using Euclid’s algorithm as well as the corresponding Bézout relation. He shows that every symmetric polynomial is uniquely expressed as a polynomial of elementary symmetric functions (by introducing a lexicographical order on the monomials). He defines the discriminant of a monic polynomial purely formally. He shows (without resorting to roots) that every polynomial can be decomposed into a product of polynomials with a nonzero discriminant. He shows (without resorting to roots) that a polynomial admits a square factor if and only if its discriminant is zero (he works in zero characteristic). Finally, Gauss makes Laplace’s proof work in a purely formal way, without resorting to a splitting field, by only using resultants and discriminants. In short, he establishes a “general method of undetermined coefficients” on a firm basis. This was to be systematically reused, in particular by Leopold Kronecker, Richard Dedekind, Jules Drach, Ernest Vessiot. . . In this chapter, we introduce the method of undetermined coefficients and we give some of its applications. We begin with some generalities about polynomial rings. The DedekindMertens lemma and Kronecker’s theorem are two basic tools which provide precise information about the coefficients of a product of two polynomials. These two results will often be used in the remainder of this work. Here we study the elementary properties of the discriminant and the resultant, and we introduce the fundamental tool that is the universal splitting algebra of a monic polynomial. The latter allows for a simplification of purely formal proofs such as Gauss’ by providing a formal substitute for the polynomial’s “splitting field.” All of this is very consistent and works with arbitrary commutative rings. The reader will only notice the apparition of fields from Section 6. The applications that we treat relate to basic Galois theory, the first steps in algebraic number theory, and Hilbert’s Nullstellensatz. We have also dedicated a section to Newton’s method in algebra. 84 III. The method of undetermined coefficients A few words on finite sets A set E is said to be finite when we explicitly have a bijection between E and an initial segment { x ∈ N | x < n } of N. It is said to be finitely enumerable when we explicitly have a surjection of a finite set F onto E. In general the context is sufficient to distinguish between the two notions. Sometimes, it is advantageous to be very precise. We will make the distinction when necessary by using the notation Pf or Pfe : we will denote by Pf (S) the set of finite subsets of the set S and Pfe (S) the set of finitely enumerable subsets of S. In constructive mathematics when S is discrete (resp. finite), we have the equality Pf (S) = Pfe (S) and it is a discrete set (resp. finite).1 When S is not discrete, Pf (S) is not equal to Pfe (S). Also note that when S is a finite set every detachable subset (cf. page 33) is finite: the set of finite subsets is then equal to the set of detachable subsets. The finitely enumerable subsets are omnipresent in the usual mathematical sense. For example when we speak of a finitely generated ideal we mean an ideal generated by a finitely enumerated subset and not by a finite subset. Similarly, when we speak of a finite family (ai )i∈I in the set E, we mean that I is a finite set, therefore the subset { ai | i ∈ I } ⊆ E is finitely enumerated. Finally, a nonempty set X is said to be enumerable if there is a surjective map x = (xn ) : N → X. 1. Polynomial rings Partial factorization algorithm We assume the reader to be familiar with the extended Euclid algorithm which computes the monic gcd of two monic polynomials in K[X] when K is a discrete field (see for example Problem 2). 1.1. Lemma. If K is a discrete field, we have a partial factorization algorithm for the finite families of monic polynomials in K[X]: a partial factorization for a finite family (g1 , . . . , gr ) is given by a finite pairwise comaximal family (f1 , . . . , fs ) of monic polynomials and by the expression of each gi in the form Ys m gi = fk k,i (mk,i ∈ N). k=1 The family (f1 , . . . , fs ) is called a partial factorization basis for the family (g1 , . . . , gr ). 1 In constructive mathematics we generally refrain from considering the “set of all subsets of a set,” even finite, because it is not a “reasonable” set: it does not seem possible to give a clear definition of its elements (see the discussion page 964). When we used the notation P` for “the set of subsets of {1, . . . , `},” on page 47, it was in fact the set of finite subsets of {1, . . . , `}. §1. Polynomial rings 85 J If the gi ’s are pairwise comaximal, there is nothing left to prove. Oth- erwise, assume for example that gcd(g1 , g2 ) = h0 , g1 = h0 h1 and g2 = h0 h2 with deg(h0 ) > 1. We replace the family (g1 , . . . , gr ) with the family (h0 , h1 , h2 , g3 , . . . , gr ). We note that the sum of the degrees has decreased. We also note that we can delete from the list the polynomials equal to 1, or any repeats of a polynomial. We finish by induction on the sum of the degrees. The details are left to the reader.  Universal property of polynomial rings A polynomial ring A[X1 , . . . , Xn ] satisfies the universal property which defines it as the commutative ring freely generated by A and n new elements. This is the property described by means of the evaluation homomorphism in the following terms. 1.2. Proposition. Given two commutative rings A and B, a homomorphism ρ : A → B and n elements b1 , . . ., bn ∈ B there exists a unique homomorphism ϕ : A[X1 , . . . , Xn ] = A[X] → B which extends ρ and which takes the Xi ’s to the bi ’s. A j  A[X] ρ ϕ! %/ B ϕ(Xi ) = bi , i ∈ J1..nK. This homomorphism ϕ is called the evaluation homomorphism (of every Xi to bi ). If P ∈ A[X] has as its image P ρ in B[X1 , . . . , Xn ], we obtain the equality ϕ(P ) = P ρ (b1 , . . . , bn ). The evaluation homomorphism is also called a specialization, and we say that ϕ(P ) is obtained by specializing each Xi to bi . When A ⊆ B, the elements b1 , . . ., bn ∈ B are said to be algebraically independent over A if the corresponding evaluation homomorphism is injective. By Proposition 1.2 every computation made in A[X] is transferred into B by means of the evaluation homomorphism. Clearly, Sn acts as a group of automorphisms of A[X] by permutation of the indeterminates: (σ, Q) 7→ Q(Xσ1 , . . . , Xσn ). The following corollary results immediately from Proposition 1.2. 1.3. Corollary. Given n elements b1 , . . ., bn in a commutative ring B, there exists a unique homomorphism ϕ : Z[X1 , . . . , Xn ] → B which takes every Xi to bi . 86 III. The method of undetermined coefficients Algebraic identities An algebraic identity is an equality between two elements of Z[X1 , . . . , Xn ] defined differently. It gets automatically transferred into every commutative ring by means of the previous corollary. Since the ring Z[X1 , . . . , Xn ] has particular properties, it happens that some algebraic identities are easier to prove in Z[X1 , . . . , Xn ] than in “an arbitrary ring B.” Consequently, if the structure of a theorem reduces to a family of algebraic identities, which is very frequent in commutative algebra, it is often in our interest to use a ring of polynomials with coefficients in Z by taking as its indeterminates the relevant elements in the statement of the theorem. The properties of the rings Z[X] which may prove useful are numerous. The first is that it is an integral ring. So it is a subring of its quotient field Q(X1 , . . . , Xn ) which offers all the facilities of discrete fields. The second is that it is an infinite and integral ring. Consequently, “all bothersome but rare cases can be ignored.” A case is rare when it corresponds to the annihilation of a polynomial Q that evaluates to zero everywhere. It suffices to check the equality corresponding to the algebraic identity when it is evaluated at the points of Zn which do not annihilate Q. Indeed, if the algebraic identity we need to prove is P = 0, we get that the polynomial P Q defines the function over Zn that evaluates to zero everywhere, this implies that P Q = 0 and thus P = 0 since Q 6= 0 and Z[X] is integral. This is sometimes called the “extension principle for algebraic identities.” Other remarkable properties of Z[X] could sometimes be used, like the fact that it is a unique factorization domain (UFD) as well as being a strongly discrete coherent Noetherian ring of finite Krull dimension. An example of application 1.4. Lemma. For A, B ∈ Mn (A), we have the following results. g=B e A. e 1. AB 2. CAB = CBA . e −1 for P ∈ GLn (A). 3. P^ AP −1 = P AP ee 4. A = det(A)n−2 A if n > 2. 5. (The Cayley-Hamilton theorem) CA (A) = 0.  e = ΓA (A) (n > 2). 6. If ΓA (X) = (−1)n+1 CA (X)−CA (0) /X , we have A  n+1 e We also have Tr A = (−1) ΓA (0). 7. (Sylvester’s identities) Let r > 1 and s > 2 such that n = r + s. Let C ∈ Mr (A), F ∈ Ms (A), D ∈ Mr,s (A), E ∈ Ms,r (A) be the matrices §1. Polynomial rings 87 extracted form A as below A= C D E F . Let αi = {1, . . . , r, r + i} and µi,j = det(Aαi ,αj ) for i, j ∈ J1..sK. Then:  det(C)s−1 det(A) = det (µi,j )i,j∈J1..sK . V2 e 8. If det A = 0, then A = 0. J We can take all the matrices with undetermined coefficients over Z and localize the ring at det P . In this case A, B, C and P are invertible in the quotient field of the ring B = Z[(aij ), (bij ), (pij )]. Furthermore, the matrix e satisfies the equality AA e = det(A) In , which characterizes it since det A is A invertible. This provides item 1 via the equality det(AB) = det(A) det(B), items 3 and 4, and item 6 via item 5 and the equality CA (0) = (−1)n det A. For item 2 we note that AB = A(BA)A−1 . For Cayley-Hamilton’s theorem, we firstPtreat the case of the companion n matrix of a monic polynomial f = T n − k=1 ak T n−k :   0 ··· ··· ··· 0 an ..    1 0 . an−1     .. ..   0 ... ... . .  . P =  . . ..  . . . . . . . . ...  .. .     .  . .. 1 0  ..  a 2 0 ··· ··· 0 1 a1 This is the matrix of the “multiplication by t,” µt : y 7→ ty (where t is the class of T ) in the quotient ring A[T ]/hf (T )i = A[t], expressed over the basis of the monomials ordered by increasing degrees. Indeed, on the one hand a direct computation shows that CP (T ) = f (T ). On the other hand f (µt ) = µf (t) = 0, thus f (P ) = 0. Moreover, in the case of the generic matrix, the determinant of the family (e1 , Ae1 , . . . , An−1 e1 ) is necessarily nonzero, therefore the generic matrix is similar to the companion matrix of its characteristic polynomial over the quotient field of Z[(aij )]. 7. Since C is invertible, we can use the generalized Gauss’ pivot, by leftmultiplication by a matrix and E = 0. C −1 E 0 0 , this reduces to the case where C = Ir Is Finally, item 8 results from Sylvester’s identity (item 7 ) with s = 2.  88 III. The method of undetermined coefficients Remark. Item 3 allows us to define the cotransposed endomorphism of an endomorphism of a free module of finite rank, from the cotransposed matrix. Weights, homogeneous polynomials We say that we have defined a weight on a polynomial algebra A[X1 , . . . , Xk ] when we attribute to each indeterminate Xi a weight w(Xi ) ∈ N. We then define the weight of the monomial X m = X1m1 · · · Xkmk as P w(X m ) = i mi w(Xi ), 0 0 so that w(X m+m ) = w(X m ) + w(X m ). The degree of a polynomial P for this weight, generally denoted by w(P ), is the greatest of the weights of the monomials appearing with a nonzero coefficient. This is only well-defined if we have a test of equality to 0 in A at our disposal. In the opposite case we simply define the statement “w(P ) 6 r.” A polynomial is said to be homogeneous (for a weight w) if all of its monomials have the same weight. When we have an algebraic identity and a weight available, each homogeneous component of the algebraic identity provides a particular algebraic identity. We can also define weights with values in some monoids with a more complicated order than (N, 0, +, >). We then ask that this monoid be the positive part of a product of totally ordered Abelian groups, or more generally a monoid with gcd (this notion will be introduced in Chapter XI). Symmetric polynomials We fix n and A and we let S1 , . . ., Sn be the elementary symmetric polynomials at the Xi ’s in A[X1 , . . . , Xn ]. They are defined by the equality Yn T n + S1 T n−1 + S2 T n−2 + · · · + Sn = (T + Xi ). i=1 P Q P Q We have S1 = i Xi , Sn = i Xi , Sk = J∈Pk,n i∈J Xi . Recall the following well-known theorem (a proof is suggested in Exercise 3). 1.5. Theorem. (Elementary symmetric polynomials) 1. A polynomial Q ∈ A[X1 , . . . , Xn ] = A[X], invariant under permutations of the variables, is uniquely expressible as a polynomial in the elementary symmetric functions S1 , . . . , Sn . In other words • the subring of the fixed points of A[X] by the action of the symmetric group Sn is the ring A[S1 , . . . , Sn ] generated by A and the Si ’s, and • the Si ’s are algebraically independent over A. §2. Dedekind-Mertens lemma 89 2. Let us denote by d(P ) the total degree of P ∈ A[X] when each Xi is affected by the weight 1, and d1 (P ) its degree in X1 . Let δ(Q) be the total degree of Q ∈ A[S1 , . . . , Sn ] when each variable Si is affected by the weight i and δ1 (Q) its total degree when each variable Si is affected by the weight 1. Assume that Q(S1 , . . . , Sn ) is evaluated in P (X). a. d(P ) = δ(Q), and if Q is δ-homogeneous, then P is d-homogeneous. b. d1 (P ) = δ1 (Q). 3. A[X1 , . . . , Xn ] is a free module of rank n! over A[S1 , . . . , Sn ] and a kn−1 basis is formed by the monomials X1k1 · · · Xn−1 such that ki ∈ J0..n − iK for each i. 1.6. Corollary. On a ring A consider the generic polynomial f = T n + f1 T n−1 + f2 T n−2 + · · · + fn , where the fi ’s are the indeterminates. We have an injective homomorphism j : A[f1 , . . . , fn ] → A[X1 , . . . , Xn ] such that the (−1)k j(sk )’s are the elementary symmetric polynomials in the Xi ’s. Q In short we can always reduce to the case where f (T ) = i (T − Xi ), where the Xi ’s are other indeterminates. 1.7. Corollary. On a ring A consider the generic polynomial f = f0 T n + f1 T n−1 + f2 T n−2 + · · · + fn , where the fi ’s are indeterminates. We have an injective homomorphism j : A[f0 , . . . , fn ] → B = A[F0 , X1 , . . . , Xn ], with the following equality in B[T ]. Y j(f0 ) T n + j(f1 ) T n−1 + · · · + j(fn ) = F0 (T − Xi ) . i Q In short, we can always reduce to the case where f (T ) = f0 i (T − Xi ), with indeterminates f0 , X1 , . . . , Xn . J It suffices to see that if f0 , g1 , . . ., gn ∈ B are algebraically independent over A, then the same goes for f0 , f0 g1 , . . ., f0 gn . It suffices to verify that f0 g1 , . . ., f0 gn are algebraically independent over A[f0 ]. This results from f0 being regular and from g1 , . . ., gn being algebraically independent over A[f0 ].  2. Dedekind-Mertens lemma Recall that for a polynomial f of A[X1 , . . . , Xn ] = A[X], we call the “content of f ” and denote by cA,X (f ) or c(f ) the ideal generated by the coefficients of f . Note that we always have c(f )c(g)⊇c(f g) and thus c(f )k+1 c(g)⊇c(f )k c(f g) for all k > 0. For k large enough this inclusion becomes an equality. 90 III. The method of undetermined coefficients 2.1. Dedekind-Mertens lemma. For f , g ∈ A[T ] with m > deg g we have c(f )m+1 c(g) = c(f )m c(f g) . J First of all, notice that the products fi gj are the coefficients of the polynomial f (Y )g(X). Similarly, for some indeterminates Y0 , . . . , Ym , the content of the polynomial f (Y0 ) · · · f (Ym )g(X) is equal to c(f )m+1 c(g). Let h = f g. Imagine that in the ring B = A[X, Y0 , . . . , Ym ] we are able to show the membership of the polynomial f (Y0 ) · · · f (Ym )g(X) in the ideal  Pm Q j=0 h(Yj ) k,k6=j f (Yk ) . We would immediately deduce that c(f )m+1 c(g) ⊆ c(f )m c(h). This is more or less what is going to happen. We get rid of the denominators in Lagrange’s interpolation formula (we need at least 1 + deg g interpolation points): Q (X−Yk ) Pm k,k6=j Q g(X) = j=0 g(Yj ) . (Y −Y ) k,k6=j j k Q − Yk ), we get: Pm ∆ · g(X) ∈ j=0 g(Yj ) . In the ring B, by letting ∆ = j6=k (Yj Thus by multiplying by f (Y0 ) · · · f (Ym ): Pm Q ∆ · f (Y0 ) · · · f (Ym ) · g(X) ∈ j=0 h(Yj ) k,k6=j f (Yk ) . If we show that for any Q ∈ B we have c(Q) = c(∆ · Q), the previous membership gives c(f )m+1 c(g) ⊆ c(f )m c(h). Note that c(Yi Q) = c(Q) and especially that   c Q(Y0 ± Y1 , Y1 , . . . , Ym ) ⊆ c Q(Y0 , Y1 , . . . , Ym ) .  Therefore, by putting Y0 = (Y0 ±Y1 )∓Y1 , c Q(Y0 ±Y1 , Y1 , . . . , Ym ) = c(Q). The following polynomials thus all have the same content: Q, Q(Y0 +Y1 , Y1 , . . . , Ym ), Y0 Q(Y0 +Y1 , Y1 , . . . , Ym ), (Y0 −Y1 ) Q(Y0 , Y1 , . . . , Ym ). Whence c(Q) = c(∆ · Q).  We deduce the following corollaries. 2.2. Corollary. If f1 , . . ., fd are d polynomials (with one indeterminate) of degree 6 δ, with ei = 1 + (d − i)δ we have c(f1 )e1 c(f2 )e2 · · · c(fd )ed ⊆ c(f1 f2 · · · fd ). J Let f = f1 and g = f2 · · · fd . We have deg g 6 (d − 1)δ and e1 = 1 + (d − 1)δ. Dedekind-Mertens lemma thus gives: c(f )e1 c(g) = c(f )(d−1)δ c(f g) ⊆ c(f g), i.e. c(f1 )e1 c(f2 · · · fd ) ⊆ c(f1 f2 · · · fd ). We finish by induction on d.  §3. One of Kronecker’s theorems 91 2.3. Corollary. Let f and g ∈ A[T ].  1. If AnnA c(f ) = 0, then AnnA[T ] (f ) = 0 (McCoy’s Lemma).  2. If A is reduced, then AnnA[T ] (f ) = AnnA c(f ) [T ]. 3. The polynomial f is nilpotent if and only if each of its coefficients is nilpotent. 4. If c(f ) = 1, then c(f g) = c(g). J Let g ∈ AnnA[T ] (f ) and m > deg(g). Dedekind-Mertens lemma implies: c(f )1+m g = 0. (∗) 1. So AnnA c(f ) = 0 implies g = 0. 2. Since the ring is reduced, (∗) implies c(f )g = 0. Thus every polynomial g annihilated by f is annihilated by c(f ).  Furthermore, AnnA c(f ) = A ∩ AnnA[T ] (f ) and thus the inclusion  AnnA[T ] (f ) ⊇ AnnA c(f ) [T ] is always true (whether A is reduced or not). 3. If f 2 = 0, the Dedekind-Mertens lemma implies c(f )2+deg f = 0. 4. Immediately from c(f )m+1 c(g) = c(f )m c(f g).  3. One of Kronecker’s theorems A-algebras and integral elements We first introduce the terminology of A-algebras. The algebras that we consider in this work are associative, commutative and unitary, unless stated otherwise. 3.1. Definition. 1. An A-algebra is a commutative ring B with a homomorphism of commutative rings ρ : A → B. That makes B an A-module. When A ⊆ B, or more generally if ρ is injective, we say that B is an extension of A. ρ0 ρ 2. A morphism of the A-algebra A −→ B to the A-algebra A −→ B0 is ϕ a homomorphism of rings B −→ B0 satisfying ϕ ◦ ρ = ρ0 . The set of morphisms of A-algebras of B to B0 is denoted by HomA (B, B0 ). A ρ  B ρ0 % ϕ / B0 Remarks. 1) We chose not to reserve the terminology “extension” for the case of fields. 92 III. The method of undetermined coefficients This will require us to use in the cases of fields statements such as “L is a field extension of K” or “L is a field, extending K” from this point on. 2) Every ring is uniquely a Z-algebra and every homomorphism of rings is a morphism of the corresponding Z-algebras. The category of commutative rings can be regarded as a special case among the categories of algebras defined above. Notation. If b ∈ B and M is a B-module, we denote by µM,b or µb the multiplication by b in M : y 7→ by, M → M . This can be regarded as a B-linear map, or, if B is an A-algebra, as an A-linear map for the A-module structure of M . 3.2. Definition. Let A ⊆ B be rings. 1. An element x ∈ B is said to be integral over A if there exists some integer k > 1 such that xk = a1 xk−1 + a2 xk−2 + · · · + ak with each ah ∈ A. If A is a discrete field, we also say that x is algebraic over A. 2. In this case, the monic polynomial P = X k −(a1 X k−1 +a2 X k−2 +· · ·+ak ) is called an integral dependence relation of x over A. In fact, by abuse of language we also say that the equality P (x) = 0 is an integral dependence relation. If A is a discrete field, we also speak of an algebraic dependence relation. 3. The ring B is said to be integral over A if every element of B is integral over A. We will also say that the A-algebra B is integral. If A and B are discrete fields, we say that B is algebraic over A. 4. If ρ : C → B is a C-algebra with ρ(C) = A, we say that the algebra B is integral over C if it is integral over A. The theorem 3.3. Theorem. (Kronecker’s Theorem) [119] In B[T ], consider the polynomials p n m X X X f= (−1)i fi T n−i , g = (−1)j gj T m−j and h = f g = (−1)r hr T p−r , i=0 j=0 r=0 where p = m + n. Let A = Z[h0 , . . . , hp ] be the subring generated by the coefficients of h (Z is the subring of B generated by 1B ). 1. Each fi gj is integral over A. 2. In the case where we take indeterminates over the ring Z for fi and gj , we find an integral dependence relation over A for zi,j = fi gj which is homogeneous for different systems of weights attributed to the monomials: a. the respective weights of zk,` and hr are k + ` and r. §3. One of Kronecker’s theorems 93 b. the respective weights of zk,` and hr are p − k − ` and p − r. c. the weights of zk,` and hr are w(zk,` ) = w(hr ) = 1. Naturally these integral dependence relations are then applicable in every ring. J It suffices to treat item 2. Let us first examine an intermediate generic case. We take f0 = g0 = 1 and indeterminates over Z for the other fi ’s and gj ’s. The polynomials f and g are thus monic polynomials in B[T ] with B = Z[f1 , . . . , fn , g1 , . . . , gm ], and A = Z[h1 , . . . , hp ]. Assume without loss of generality that B ⊆ C = Z[x1 , . . . , xn , y1 , . . . , ym ], where each xi and yj = xn+j are indeterminates, the fi ’s are the elementary symmetric polynomials in the xi ’s, and the gj ’s are the elementary symmetric polynomials in the yj ’s (apply Corollary 1.6 twice). If we attribute to xi and yj a weight of 1, the zk,` and hr are homogeneous and we obtain the weights described in 2a. To compute an integral dependence relation for fi gj (with eventually i or j = 0) over A, consider the subgroup Hi,j of Sp formed by the σ’s which satisfy σ(fi gj ) = fi gj (this subgroup contains at least all the permutations which stabilises J1..nK). Then consider the polynomial Y  Pi,j (T ) = T − τ (fi gj ) , (∗) τ ∈Sp /Hi,j where τ ∈ Sp /Hi,j means that we take exactly one τ from each left coset of Hi,j . Then, Pi,j is homogeneous for the weights wa described in 2a (i, j being fixed, we denote by wa the weights 2a, with wa (T ) = wa (zi,j )). Moreover, Pi,j is symmetric in the xk ’s (k ∈ J1..pK). It is therefore uniquely expressible as a polynomial Qi,j (h, T ) in each hr and T , and Qi,j is wa -homogeneous (Theorem 1.5 items 1 and 2a). The degree in T of Qi,j is di,j = (Sp : Hi,j ). For R ∈ C[T ], denote by δ(R) the integer degx1 (R) + degT (R). We see that δ is a weight, and that δ(fi gj ) = w(fi gj ) 6 1, δ(hr ) = w(hr ) 6 1 (with w(hr ) = 1 if i, j, r > 1). Moreover, each factor of Pi,j in (∗) is of weight 1 (but not necessarily ho mogeneous because we can have δ(σ fi gj ) = 0). This gives δ(Qi,j ) = di,j when the polynomial is evaluated in C[T ]. Moreover, by Theorem 1.5 item 2b, when we write a symmetric polynomial in (x1 , . . . , xp ), say S(x), as a polynomial S1 (h) in the hi ’s, we have δ(S) = w(S1 ). Thus w(Qi,j ) = di,j . To treat item 2 itself it suffices to “homogenize.” Indeed, if we let fei = fi /f0 and gej = gj /g0 , which is legitimized by Corollary 1.7, for fei and gej we return to the previous situation with regard to the weights 2a. We obtain a homogeneous integral dependence relation for zei,j = fei gej over the subring generated by the e hr Qi,j (e h1 , . . . , e hp , zei,j ) = 0, with zei,j = fi gj /h0 and e hr = hr /h0 . d We multiply the algebraic identity obtained by h0i,j so that we obtain a 94 III. The method of undetermined coefficients monic polynomial in zi,j . All the denominators have vanished because w(Qi,j ) = di,j . We obtain Ri,j (h0 , . . . , hp , fi gj ) = 0, where Ri,j (h0 , . . . , hp , T ) is unitary in T and homogeneous for the weights wa and w. What remains is the question of the homogeneity for the weights wb in 2b: it suffices to note that we have for all R ∈ A[T ] the equality wa (R) + wb (R) = pw(R).  Example. In the case where m = n = 2, the indicated computation gives the following results. When f0 = g0 = 1 the coefficient g1 annihilates the polynomial p01 (t) = t6 − 3h1 t5 + (3h21 + 2h2 ) t4 + (−h31 − 4h1 h2 ) t3 + (2h21 h2 + h1 h3 + h22 − 4h4 ) t2 + (−h21 h3 − h1 h22 + 4h1 h4 ) t −h21 h4 + h1 h2 h3 − h23 , so in the general case f0 g1 annihilates the polynomial q01 (t) = t6 − 3h1 t5 + (3h21 + 2h0 h2 ) t4 + (−h31 − 4h0 h1 h2 ) t3 + (2h0 h21 h2 + h20 h1 h3 + h20 h22 − 4h30 h4 ) t2 + (−h20 h21 h3 − h20 h1 h22 + 4h30 h1 h4 ) t − h30 h21 h4 + h30 h1 h2 h3 − h40 h23 . When f0 = g0 = 1 the coefficient g2 annihilates the polynomial p02 (t) = t6 − h2 t5 + (h1 h3 − h4 ) t4 + (−h21 h4 + 2h2 h4 − h23 ) t3 + (h1 h3 h4 − h24 ) t2 − h2 h24 t + h34 , so f0 g2 annihilates the polynomial q02 (t) = t6 − h2 t5 + (h1 h3 − h0 h4 ) t4 + (−h21 h4 + 2h0 h2 h4 − h0 h23 ) t3 + (h0 h1 h3 h4 − h20 h24 ) t2 − h20 h2 h24 t + h30 h34 . When f0 = g0 = 1 the coefficient f1 g1 annihilates the polynomial p11 (t) = t3 − 2h2 t2 + (h1 h3 + h22 − 4h4 ) t + h21 h4 − h1 h2 h3 + h23 . When f0 = g0 = 1 the coefficient f1 g2 annihilates the polynomial p12 (t) = t6 − 3h3 t5 + (2h2 h4 + 3h23 ) t4 + (−4h2 h3 h4 − h33 ) t3 + (h1 h3 h24 + h22 h24 + 2h2 h23 h4 − 4h34 ) t2 + (−h1 h23 h24 − h22 h3 h24 + 4h3 h34 ) t − h21 h44 + h1 h2 h3 h34 − h23 h34 . §4. The universal splitting algebra (1) 95 3.4. Corollary. (Multivariate Kronecker’s Theorem) In B[X1 , . . . , Xk ] consider the polynomials P P P f = α fα X α , g = β bβ X β and h = f g = γ hγ X γ , (here, α, β, γ are multi-indices, and if α = (α1 , . . . , αk ), X α is a notation for X1α1 · · · Xkαk ). Let A = Z[(hγ )] be the subring generated by the coefficients of h (Z is the subring of B generated by 1B ). Then, each fα gβ is integral over A. J We apply what is termed Kronecker’s trick: let Xj = T nj with large enough n. This transforms f , g and h into polynomials F (T ), G(T ), H(T ) whose coefficients are those of f , g and h, respectively.  4. The universal splitting algebra for a monic polynomial over a commutative ring (1) Disclaimer. In a context where we manipulate algebras, it is sometimes preferable to keep to the intuition that we want to have a field as the base ring, even if it is only a commutative ring. In which case we choose to give a name such as k to the base ring. This is what we are going to do in this section dedicated to the universal splitting algebra. When we are truly dealing with a discrete field, we will use K instead. We now proceed to the inverse operation to that which passes from the polynomial ring to the subring of symmetric polynomials. Pn In the presence of a monic polynomial f = T n + k=1 (−1)k sk T n−k ∈ k[T ] over a ring k, we want to have at our disposal an extension of k where the polynomial is decomposed into linear factors. Such an extension can be constructed in a purely formal way. The result is called the universal splitting algebra. Pn 4.1. Definition and notation. Let f = T n + k=1 (−1)k sk T n−k ∈ k[T ] be a monic polynomial of degree n. We denote by Aduk,f the universal splitting algebra of f over k defined as follows Aduk,f = k[X1 , . . . , Xn ]/J (f ) = k[x1 , . . . , xn ], Qn where J (f ) is the ideal of symmetric relators necessary to identify i=1 (T − xi ) with f (T ) in the quotient. Precisely, if S1 , S2 , . . . , Sn are the elementary symmetric functions of the Xi ’s, the ideal J (f ) is given by J (f ) = hS1 − s1 , S2 − s2 , . . . , Sn − sn i . The universal splitting algebra A = Aduk,f can be characterized by the following property. 96 III. The method of undetermined coefficients 4.2. Fact. (Universal decomposition algebra, characteristic property) 1. Let C be a k-algebra such that f (T ) is decomposed into a product of factors T − zi . Then, there exists a unique homomorphism of k-algebras of A to C which sends the xi ’s to the zi ’s. 2. This characterizes the universal splitting algebra A = Aduk,f , up to unique isomorphism. 3. Moreover, if C is generated (as a k-algebra) by the zi ’s, the universal splitting algebra is isomorphic to a quotient of A. J For item 1 we use Proposition 1.2, which describes the algebras of polynomials as algebras freely generated by the indeterminates, and Fact II -1.1, which describes the quotient rings as those which allow us to uniquely factorize certain homomorphisms. Item 2 results from the ascertainment that an object that solves a universal problem is alway unique up to unique isomorphism.  By taking C = A we obtain that every permutation of {1, . . . , n} produces a (unique) k-automorphism of A. Stated otherwise: the group Sn of permutations of {X1 , . . . , Xn } acts on k[X1 , . . . , Xn ] and fixes the ideal J (f ), thus the action passes to the quotient and this defines Sn as a group of automorphisms of the universal splitting algebra. To study the universal splitting algebra we introduce Cauchy modules which are the following polynomials: f1 (X1 ) = f (X1 )  f2 (X1 , X2 ) = f1 (X1 ) − f1 (X2 ) (X1 − X2 ) .. . fk (X1 , . . . , Xk−1 , Xk ) − fk (X1 , . . . , Xk−1 , Xk+1 ) fk+1 (X1 , . . . , Xk+1 ) = Xk − Xk+1 .. . fn (X1 , . . . , Xn ) = fn−1 (X1 , . . . , Xn−2 , Xn−1 ) − fn−1 (X1 , . . . , Xn−2 , Xn ) . Xn−1 − Xn The following fact results from the characteristic property of the universal splitting algebras. 4.3. Fact. With the previous notations for the Cauchy modules, let k1 = k[x1 ] and g2 (T ) = f2 (x1 , T ). Then, the canonical k1 -linear map Aduk,f → Aduk1 ,g2 (which sends each xi (i > 2) of Aduk,f to the xi ’s of Aduk1 ,g2 ) is an isomorphism. §4. The universal splitting algebra (1) 97 Examples. (Cauchy modules) With n = 4, f1 (x) = x4 − s1 x3 + s2 x2 − s3 x + s4 f2 (x, y) = (y 3 + y 2 x + yx2 + x3 ) − s1 (y 2 + yx + x2 ) + s2 (y + x) − s3 = y 3 + y 2 (x − s1 ) + y(x2 − s1 x + s2 ) + (x3 − s1 x2 + s2 x − s3 ) f3 (x, y, z) = (z 2 + y 2 + x2 + zy + zx + yx) − s1 (z + y + x) + s2  = z 2 + z(y + x − s1 ) + (y 2 + yx + x2 ) − s1 (y + x) + s2 f4 (x, y, z, t) = t + z + y + x − s1 . For f (T ) = T 6 , f2 (x, y) = y 5 + y 4 x + y 3 x2 + y 2 x3 + yx4 + x5 f3 (x, y, z) = (z 4 + y 4 + x4 ) + (z 2 y 2 + z 2 x2 + y 2 x2 )+ (zy 3 + zx3 + yz 3 + yx3 + xz 3 + xy 3 )+ (zyx2 + zxy 2 + yxz 2 ) f4 (x, y, z, t) = (t3 + z 3 + y 3 + x3 ) + (tzy + tyx + tzx + zyx)+ t2 (z + y + x) + z 2 (t + y + x)+ y 2 (t + z + x) + x2 (t + z + y) f5 (x, y, z, t, u) = (u2 + t2 + z 2 + y 2 + x2 )+ (xu + xt + xz + xy + tu + zu + zt + yu + yt + yz) f6 (x, y, z, t, u, v) = v + u + t + z + y + x. More generally, for f (T ) = T n , fk (t1 , . . . , tk ) is the sum of all the monomials of degree n + 1 − k in t1 , . . . , tk . By linearity, this allows us to obtain an explicit, precise description of the Cauchy modules for an arbitrary polynomial. By the remark following the last example, the polynomial fi is symmetric in the variables X1 , . . ., Xi , monic in Xi , of total degree n − i + 1. Fact 4.2 implies that the ideal J (f ) is equal to the ideal generated by the Cauchy modules. Indeed, the quotient ring by the latter ideal clearly realizes the same universal property as the quotient ring by J (f ). Thus the universal splitting algebra is a free k-module of rank n!. More precisely, we obtain the following result. 4.4. Fact. The k-module A = Aduk,f is free and a basis is formed by the dn−1 “monomials” xd11 · · · xn−1 such that for k = 1, . . . , n − 1 we have dk 6 n − k. 4.5. Corollary. Considering theP universal splitting algebra of the generic n monic polynomial f (T ) = T n + k=1 (−1)k Sk T n−k , where the Si ’s are indeterminates, we get an algebra of polynomials k[x1 , . . . , xn ] with each Si identifiable with elementary symmetric polynomials in each xi . Comment. (For those who know Gröbner bases) In the case where k is a discrete field, the Cauchy modules can be seen as a Gröbner basis of the ideal J (f ), for the lexicographic monomial order with X1 < X2 < · · · < Xn . 98 III. The method of undetermined coefficients In fact, even if k is not a discrete field, the Cauchy modules still work as a Gröbner basis: Every polynomial in the xi ’s can be re-expressed over the previous monomial basis by successive divisions by the Cauchy modules. We first divide by fn with respect to the variable Xn , which cancels it out. Next we divide by fn−1 with respect to the variable Xn−1 , which brings it to a degree 6 1, and so on. 5. Discriminant, diagonalization Definition of the discriminant of a monic polynomial We define the discriminant of a univariate monic polynomial f over a commutative ring A starting with the case where f is the generic monic polynomial of degree n: f (T ) = T n −S1 T n−1 +S2 T n−2 +···+(−1)n Sn ∈ Z[S1 ,...,Sn ][T ] = Z[S][T ]. Q We can write f (T ) = i (T − Xi ) in Z[X1 , . . . , Xn ] (Corollary 1.6), and we set Yn Y discT (f ) = (−1)n(n−1)/2 f 0 (Xi ) = (Xi − Xj )2 . (1) i=1 16i<j6n As this polynomial in the Xi ’s is clearly variable permutation invariant, there exists a unique polynomial in the Si ’s, Dn (S1 , . . . , Sn ) ∈ Z[S], which is equal to discT (f ). In short, the auxiliary variables Xi can indeed vanish. Then, for a “concrete” polynomial g(T ) = T n − s1 T n−1 + s2 T n−2 + · · · + (−1)n sn ∈ A[T ], we define discT (g) = Dn (s1 , . . . , sn ). Qn Naturally, if it happens that g(T ) = i=1 (T −bi ) in a ring B ⊇ A, we would Q then obtain discT (g) = 16i<j6n (bi − bj )2 by evaluating the formula (1). In particular, by using the universal splitting algebra we could directly define the discriminant by this formula. A monic polynomial is said to be separable when its discriminant is invertible. Diagonalization of the matrices on a ring Let us first recall that if f ∈ A[T ], a zero of f in an A-algebra B (given by a homomorphism ϕ : A → B) is a y ∈ B which annihilates the polynomial f ϕ , the image of f in B[T ]. In addition, the zero y is said to be simple if f 0 (y) ∈ B× (we also say that it is a simple root of f ). Here, we are interested in the diagonalizations of matrices on an arbitrary commutative ring, when the characteristic polynomial is separable. §5. Discriminant, diagonalization 99 First of all, we have the classical “Kernels’ Lemma” II -4.8. Next is a generalization of the theorem which states (in the discrete field case) that a simple zero of the characteristic polynomial defines a proper subspace of dimension 1. 5.1. Lemma. Let n > 2, a ∈ A and A ∈ Mn (A) be a matrix whose characteristic polynomial f (X) = CA (X) admits a as simple zero. Let g = f /(X − a), h = X − a, K = Ker h(A) and I = Im h(A). 1. We have K = Im g(A), I = Ker g(A) and An = I ⊕ K. 2. The matrix g(A) is of rank 1, and h(A) of rank n − 1. 3. If a polynomial R(X) annihilates A, then R(a) = 0, i.e. R is a multiple of X − a. 4. The principal minors of order n − 1 of A − aIn are comaximal. We localize by inverting such a minor, the matrix g(A) becomes simple of rank 1, the modules I and K become free of rank n − 1 and 1. J Suppose without loss of generality that a = 0.  e Tr g(A) = g(0) (Lemma 1.4 Then, f (X) = Xg(X), h(A) = A, g(A) = ±A, item 6 ), and g(0) = f 0 (0) ∈ A× . 1. We write g(X) = Xk(X) + g(0). This shows that the polynomials g(X) and X are comaximal. Given the Cayley-Hamilton Theorem, the Kernels’ Lemma applies and gives item 1. 2. Let µ1 , . . ., µn be the principal minors of order n − 1 of A.  e we get g(0) = Tr g(A) = ± Tr A e = ± P µi . This shows Since g(A) = ±A, i   e 61 that rk h(A) = n − 1 and rk g(A) > 1. Finally, we know that rk(A) by Lemma 1.4 item 8.. e we obtain R(0)A e = 0 (since 3. Suppose R(A) = 0. By multiplying by A, e = 0). By taking the trace, R(0) Tr(A) e = 0 thus R(0) = 0. AA Note that item 3 also results from item 4. 4. We have already seen that the µi ’s are comaximal. After localization at some µi , the matrix g(A) becomes simple of rank 1 under the freeness lemma page 45. Therefore I and K become free of rank n − 1 and 1.  5.2. Proposition. (Diagonalization of a matrix whose characteristic polynomial is separable) Let A ∈ Mn (A) be a matrix whose characteristic polynomial CA (X) is separable, and A1 ⊇ A be a ring on which we can Qn write CA (X) = i=1 (X − xi ) (for example, A1 = AduA,f ). Let Ki = Ker(A − xi In ) ⊆ An1 . L 1. An1 = i Ki . 2. Each Ki is the image of a matrix of rank 1. 3. Every polynomial R which annihilates A is a multiple of CA . 100 III. The method of undetermined coefficients 4. After localization at comaximal elements of A1 the matrix is diagonalizable, similar to Diag(x1 , . . . , xn ). NB: if α ∈ EndA1 (An1 ) has for matrix A, we have α|Ki = xi IdKi for each i. J This is an immediate consequence of the Kernels’ Lemma and Lemma 5.1. To render the matrix diagonalizable it suffices to invert some product ν1 · · · νn where each νi is a principal minor of order n − 1 of the matrix A − xi In (which a priori makes nn comaximal localizations).  Remark. An analogous result concerning a matrix that annihilates a separaQ ble polynomial i (X −xi ) is given in Exercise X -4. The proof is elementary. The generic matrix is diagonalizable Consider n2 indeterminates (ai,j )i,j∈J1..nK and let A be the corresponding matrix (it has coefficients in A = Z[(ai,j )]). 5.3. Proposition. The generic matrix A is diagonalizable over a ring B containing Z[(ai,j )] = A. J Let f (T ) = T n − s1 T n−1 + · · · + (−1)n sn be the characteristic polynomial of A. Then the coefficients si are algebraically independent over Z. To realize this, it suffices to specialize A as the companion matrix of a generic monic polynomial. In particular, the discriminant ∆ = disc(f ) is nonzero in the integral ring A. Then consider the ring A1 = A[1/∆] ⊇ A and the universal splitting algebra Q C = AduA1 ,f . Let the xi be the elements of C such that f (T ) = i (T −xi ). Finally, apply Proposition 5.2. If we want to obtain a diagonalizable matrix,  Q we invert for instance a = i det (A−xi In )1..n−1,1..n−1 . This is an element of A and it suffices to convince ourselves that it is nonzero by exhibiting a particular matrix, for example the companion matrix of the polynomial X n − 1. Ultimately, consider A2 = A[1/(a∆)] ⊇ A and take B = AduA2 ,f ⊇ A2 . The strength of the previous result, “which makes life considerably easier” is illustrated in the following two subsections. An identity concerning characteristic polynomials 5.4. Proposition. Let A and B ∈ Mn (A) be two matrices which have the same characteristic polynomial, and let g ∈ A[T ]. Then the matrices g(A) and g(B) have the same characteristic polynomial. §5. Discriminant, diagonalization 101 5.5. Corollary. 1. If A is a matrix with characteristic polynomial f , and if we can write Qn f (T ) = i=1 (T − xi ) on a ring A1 ⊇ A, then the characteristic  Qn polynomial of g(A) is equal to the product i=1 T − g(xi ) . 2. Let B be a free A-algebra of finite rank n and x ∈ B. Suppose that in Qn B1 ⊇ B, we have CB/A (x)(T ) = i=1 (T − xi ). Then, for all g ∈ A[T ], we have the following equalities. Yn   B/A g(x) (T ) = T − g(xi ) , i=1  Pn  Qn TrB/A g(x) = i=1 g(xi ) and NB/A g(x) = i=1 g(xi ). Proof of the proposition and the corollary. Item 1 of the corollary. Consider the matrix Diag(x1 , . . . , xn ) which has the same characteristic polynomial as A and apply the proposition with the ring A1 . Conversely, if item 1 of the corollary is proven for A1 = AduA,f , it implies  Qn Proposition 5.4 since the polynomial i=1 T − g(xi ) computed in AduA,f can only depend on f and g. Now note that the structure of the statement of the corollary, item 1, when we take A1 = AduA,f , is a family of algebraic identities with the coefficients of the matrix A for indeterminates. It thus suffices to prove it for the generic matrix. However, it is diagonalizable over some overring (Proposition 5.3), and for some diagonalizable matrix the result is clear. Finally, item 2 of the corollary is an immediate consequence of item 1.  An identity concerning exterior powers The following results, analogous to Proposition 5.4 and to Corollary 5.5, can be proven by following the exact same proof sketch. 5.6. Proposition. If ϕ is an endomorphism of a free A-module of finite Vk rank, the characteristic polynomial of ϕ only depends on the integer k and on the characteristic polynomial of ϕ. 5.7. Corollary. If A ∈ Mn (A) is a matrix with characteristic polyQn nomial f , and if f (T ) = i=1 (T − xi ) in an overring of A, then the Vk Q characteristic polynomial of A is equal to the product J∈Pk,n (T − xJ ), Q where xJ = i∈J xi . 102 III. The method of undetermined coefficients Tschirnhaus transformation 5.8. Definition. Let f and g ∈ A[T ] with f a monic of degree p. Consider the A-algebra B = A[T ]/hf i, which is a free A-module of rank p. We define the Tschirnhaus transform of f by g, denoted by TschA,g (f ) or Tschg (f ), by the equality TschA,g (f ) = CB/A (g), (g is the class of g in B). Proposition 5.4 and Corollary 5.5 give the following result. 5.9. Proposition. Let f and g ∈ A[T ] with monic f of degree p. 1. If A is a matrix such that f (T ) = CA (T ), we have Tschg (f )(T ) = Cg(A) (T ). 2. If f (T ) = Q i (T − xi ) on a ring which contains A, we have  Q Tschg (f )(T ) = i T − g(xi ) , in particular, with B = A[T ]/hf i we get Q P NB/A (g) = i g(xi ) and TrB/A (g) = i g(xi ). Remark. We can also write TschA,g (f )(T ) = NB[T ]/A[T ] (T − g). In fact for an entirely unambiguous notation we should write Tsch(A, f, g, T ) instead of TschA,g (f ). An analogous ambiguity is also found in the notation CB/A (g). Computation of the Tschirnhaus transform Recall that the matrix C of the endomorphism µt of multiplication by t (the class of T in B) is called the companion matrix of f (see page 87). Then the matrix (over the same basis) of µg = g(µt ) is the matrix g(C). Thus Tschg (f ) is the characteristic polynomial2 of g(C). New version of the discriminant Recall (Definition II -5.33) that when C ⊇ A is a free A-algebra of finite rank and x1 , . . . , xk ∈ C, we call the determinant of the matrix TrC/A (xi xj ) i,j∈J1..kK the discriminant of (x1 , . . . , xk ). We denote it by discC/A (x1 , . . . , xk ). Moreover, if (x1 , . . . , xk ) is an A-basis of C, we denote by DiscC/A the multiplicative class of discC/A (x1 , . . . , xk ) modulo the squares of A× . We call it the discriminant of the extension C/A . 2 The efficient computation of determinants and characteristic polynomials is of great interest in computer algebra. You can for example consult [Abdeljaoued & Lombardi]. Another formula we can use forthe computation of the Tschirnhaus transform is Tschg (f ) = ResX f (X), T − g(X) (see Lemma 7.3). §5. Discriminant, diagonalization 103 In this subsection, we make the link between the discriminant of free algebras of finite rank and the discriminant of monic polynomials. Let us emphasize the remarkable character of the implication 1a ⇒ 1b in the following proposition. 5.10. Proposition. (Trace-valued discriminant) Let B be a free A-algebra of finite rank n, x ∈ B and f = CB/A (x)(T ). We have  n(n−1) disc(1, x, . . . , xn−1 ) = disc(f ) = (−1) 2 NB/A f 0 (x) . We say that f 0 (x) is the different of x. The following results ensue. 1. The following properties are equivalent. a. disc(f ) ∈ A× . b. DiscB/A ∈ A× and (1, x, . . . , xn−1 ) is an A-basis of B. c. DiscB/A ∈ A× and B = A[x]. 2. If DiscB/A is regular, the following properties are equivalent. a. DiscB/A and disc(f ) are associated elements. b. (1, x, . . . , xn−1 ) is an A-basis of B. c. B = A[x]. 3. The discriminant of a monic polynomial g ∈ A[T ] represents (modulo the squares of A× ) the discriminant of the extension A[T ]/hgi of A. We have discT (g) ∈ A× if and only if hg(T ), g 0 (T )i = A. J In an overring B0 of B, we can write f (T ) = (T − x1 ) · · · (T − xn ). For some g ∈ A[T ], by applying Corollary 5.5, we obtain the equalities   TrB/A g(x) = g(x1 ) + · · · + g(xn ) and NB/A g(x) = g(x1 ) · · · g(xn ). Let M ∈ Mn (A) be the matrix intervening in the computation of the discriminant of (1, x, . . . , xn−1 ):  M = (aij )i,j∈J0..n−1K , aij = TrB/A (xi+j ) = xi+j + · · · + xi+j n . 1 Let V ∈ Mn (B0 ) be the Vandermonde matrix having [ xi1 . . . xin ] (where i ∈ J0..n − 1K) for rows. Then M = V tV . We deduce Q det(M ) = det(V )2 = i<j (xi − xj )2 = disc(f ) .  This proves the first equality. Since NB/A f 0 (x) = f 0 (x1 ) · · · f 0 (xn ) and Q f 0 (xi ) = j|j6=i (xi − xj ), we get  Q n(n−1) Q 2 NB/A f 0 (x) = (i,j)|j6=i (xi − xj ) = (−1) 2 i<j (xi − xj ) . The proof of the consequences is left to the reader (use Proposition II -5.33). Discriminant of a universal splitting algebra The equality of the “trace-valued” discriminant and the “polynomial” discriminant, together with the transitivity formula (Theorem II -5.36), allows us to complete the following computation. 104 III. The method of undetermined coefficients 5.11. Fact. (Discriminant of a universal splitting algebra) Let f be a monic polynomial of degree n > 2 of k[T ] and A = Aduk,f . n!/2 Then DiscA/k = discT (f ) . J We use the notations of Section 4. We reason by induction on n, the n = 2 case being clear. We have A = k1 [x2 , . . . , xn ] with k1 = k[x1 ] ' k[X1 ]/hf (X1 )i . Moreover, A ' Aduk1 ,g2 where  g2 (T ) = f2 (x1 , T ) = f (T ) − f (x1 ) (T − x1 ) ∈ k1 [T ] ⊆ A[T ]. The transitivity formula of the discriminants then gives the following equalities. [A:k ] DiscA/k = Disck1 /k 1 Nk1 /k (DiscA/k1 ) = (disc f )(n−1)! Nk1 /k (DiscA/k1 ). By using the induction hypothesis we obtain the equality  Q 2 (n−1)!/2 DiscA/k1 = (disc g2 )(n−1)!/2 = . 26i<j6n (xi − xj ) For i ∈ J2..nK,Qlet τi be the transposition (1, Q i); for z ∈ k1 , by Corollary 5.5, n Nk1 /k (z) = z i=2 τi (z). Applied to z = 26i<j6n (xi − xj )2 , this gives Nk1 /k (z) = (disc f )n−2 , whence Nk1 /k (DiscA/k1 ) = (disc f )(n−2)·(n−1)!/2 , then DiscA/k = (disc f )(n−1)!+(n−2)·(n−1)!/2 = (disc f )n!/2 . NB: a detailed examination of the previous computation shows that in fact we have computed the discriminant of the “canonical” basis of the universal splitting algebra described in Fact 4.4.  5.12. Lemma. (Same assumptions as for Fact 5.11) Let z ∈ A.  Q CA/k (z)(T ) = σ∈Sn T − σ(z) . P Q In particular, TrA/k (z) = σ∈Sn σ(z) and NA/k (z) = σ∈Sn σ(z). J It suffices to show the formula for the norm, because we then obtain the one for the characteristic polynomial by replacing k by k[T ] (which replaces A by A[T ]). The formula for the norm is proven by induction on the number of variables by using Fact 4.3, the transitivity formula for the norms and Corollary 5.5.  §6. Basic Galois theory (1) 105 6. Basic Galois theory (1) In Section 6, K designates a nontrivial discrete field. Factorization and zeros Recall that a ring is integral if every element is zero or regular.3 A subring of an integral ring is integral. A discrete field is an integral ring. A ring A is integral if and only if its total ring of fractions Frac A is a discrete field. We say that Frac A is the field of fractions, or the quotient field of A. 6.1. Proposition. Let A ⊆ B be rings and f ∈ A[T ] be some monic polynomial of degree n. 1. If z is a zero of f in B, f (T ) is divisible by T − z in B[T ]. 2. Henceforth assume that B is integral and nontrivial.4 If z1 , . . ., zk are the pairwise distinct zeros of f in B, the polynomial f (T ) is divisible by Qk i=1 (T − zi ) in B[T ]. Qn 3. In addition, if k = n, then f (T ) = i=1 (T − zi ), and the zi ’s are the only zeros of f in B and in every integral extension of B. J The proof is immediate. Certain more precise results are in Exercise 1, which is dedicated to Lagrange interpolation.  Strictly finite algebras over a discrete field 6.2. Definition. A K-algebra A is said to be strictly finite if it is a free K-vector space of finite dimension. In other words, we know of a finite basis of A as in a K-vector space. In this case, for some x ∈ A, the trace, the norm, the characteristic polynomial of (multiplication by) x, as well as the minimal polynomial of x over K, denoted by MinK,x (T ) or Minx (T ), can be computed by standard methods of the linear algebra over a discrete field. Similarly, every finite K-subalgebra of A is strictly finite and the intersection of two strictly finite subalgebras is strictly finite. 3 The 4 We notion is discussed in more detail on page 202. could make do without the negative assumption “nontrivial” by reading the assumption that the zi ’s are “distinct” as meaning that each zi − zj is regular. 106 III. The method of undetermined coefficients 6.3. Lemma. Let B ⊇ K be a ring integral over K. The following properties are equivalent. 1. B is a discrete field. 2. B is without zerodivisors: xy = 0 ⇒ (x = 0 or y = 0). 3. B is connected and reduced. Consequently, if B is a discrete field, every finite K-subalgebra of B is a discrete field. J The implications 1 ⇒ 2 ⇒ 3 are clear. 3 ⇒ 1. Each element x ∈ B annihilates a nonzero  polynomial of K[X]  that we can assume is of the form X k 1 − XR(X) . Then x 1 − xR(x) is nilpotent thus zero. The element e = xR(x) is idempotent and x = ex. If e = 0, then x = 0. If e = 1, then x is invertible.  6.4. Lemma. Let K ⊆ L ⊆ A with A and L strictly finite over K. If L is a discrete field, then A is strictly finite over L. J Proof left to the reader (or see Fact VI -1.3 item 3).  If g is an irreducible polynomial of K[T ], the quotient algebra K[T ]/hgi is a strictly finite discrete field over K. In fact, as a corollary of the two previous Lemmas we get that every strictly finite extension of discrete fields is obtained by iterating this construction. 6.5. Fact. (Structure of a strictly finite extension of discrete fields) Let L = K[x1 , . . . , xm ] be a strictly finite discrete field over K. For k ∈ J1..m + 1K, let Kk = K[(xi )i<k ] and fk = MinKk ,xk (T ), such that K1 = K, and for k ∈ J1..mK, Kk+1 ' Kk [Xk ]/hfk (Xk )i. Then, for k < ` in J1..m + 1K, the inclusion Kk → K` is a strictly finite extension of discrete fields, with Q Q [ K` : Kk ] = k6i<` [ Ki+1 : Ki ] = k6i<` degT (fi ). Moreover, if Fk ∈ K[X  1 , . . . , Xk ] is a monic polynomial in Xk for which we have Fk (xi )i<k , Xk = fk (Xk ), we get, by factorization of the evaluation homomorphism, an isomorphism ∼ K[X1 , . . . , Xm ]/hF1 , . . . , Fm i −→ L. 6.6. Definition. Let g ∈ K[T ] be a monic polynomial, we call a discrete field L extension of K in which g can be completely decomposed and which is generated like K-algebra by the zeros of g a splitting field of g over K. Note that L is finite over K but that we do not ask that L be strictly finite over K (in fact, there is no constructive proof that such a splitting field must be strictly finite over K). This necessitates some subtleties in the following theorem. §6. Basic Galois theory (1) 107 6.7. Theorem. (Uniqueness of the splitting field in the strictly finite case) Let f ∈ K[T ] be a monic polynomial. Assume that there exists a splitting field L of f over K. 1. Let M ⊇ K be a strictly finite discrete field over K, generated by K and some zeros of f in M. The field M is isomorphic to a subfield of L. 2. Assume that there exists a splitting field of f , strictly finite over K. Then every splitting field of f over K is isomorphic to L (which is thus strictly finite over K). 3. Let K1 , K2 be two nontrivial discrete field, τ : K1 → K2 be an isomorphism, f1 ∈ K1 [T ] be a monic polynomial, f2 = f1τ ∈ K2 [T ]. If Li is a strictly finite field of roots of fi over Ki (i = 1, 2), then τ extends to an isomorphism from L1 to L2 . J We only prove item 1 in a particular case (sufficiently general). The rest is left to the reader. Qn We write f (T ) = i=1 (T − xi ) in L[T ]. Also suppose that M = K[y, z] with y 6= z and f (y) = f (z) = 0. We thus have in M[T ] the equality f (T ) = (T −y)f1 (T ) = (T −y)(T −z)f2 (T ) (Proposition 6.1). Since f (y) = 0, the minimal polynomial g(Y ) of y over K divides f (Y ) Qn in K[Y ]. Therefore i=1 g(xi ) = 0 in L, which is a discrete field, and one of the xi ’s, say x1 , annihilates g. Here we obtain K[y] ' K[Y ]/hg(Y )i ' K[x1 ] ⊆ L. The discrete field K[y] is strictly finite over K and M is strictly finite over K[y] (Lemma 6.4). Then let h ∈ K[Y, Z] be a monic polynomial in Z such that h(y, Z) is the minimal polynomial of z over K[y]. Since f1 (z) = 0, the polynomial h(y, Z) divides f1 (Z) = f (Z)/(Z − y) in K[y][Z], thus its image h(x1 , Z) in K[x1 ][Z] is an irreducible polynomial which divides f (Z)/(Z − x1 ). So h(x1 , Z) admits as a zero one of the xi ’s for i ∈ J2..nK, say x2 , and h(x1 , Z) is the minimal polynomial of x2 over K[x1 ]. We thus obtain the isomorphisms K[y, z] ' K[y][Z]/hh(y, Z)i ' K[x1 ][Z]/hh(x1 , Z)i ' K[x1 , x2 ] ⊆ L. Note that we also have K[y, z] ' K[Y, Z]/hg(Y ), h(Y, Z)i.  Remark. A detailed inspection of the previous proof leads to the conclusion that if L is a strictly finite splitting field over K, the group of K-automorphisms of L is a finite group having at most [ L : K ] elements. If we do not assume that L is strictly finite over K, we only obtain that it is absurd to assume that this group contains more than [ L : K ] elements. 108 III. The method of undetermined coefficients The elementary case of Galois theory 6.8. Definition and notation. We will use the following notations when a group G operates over a set E. def — For x ∈ E, StG (x) = St(x) = { σ ∈ G | σ(x) = x } designates the stabilizer of x. — G.x designates the orbit of x under G, and we write G.x = {x1 , . . . , xk } as an abbreviation for: (x1 , . . . , xk ) is an enumeration without repetition of G.x, with x1 = x. — For F ⊆ E, StpG (F ) or Stp(F ) designates the pointwise stabilizer of F . — If H is a subgroup of G, – we denote by | G : H | the index of H in G, – we denote by FixE (H) = Fix(H) = E H the subset of elements fixed by H, { x ∈ E | ∀σ ∈ H, σ(x) = x }, – writing σ ∈ G/H means that we take an element σ ∈ G in each left coset of H in G. When G is a finite group operating over a ring B, for b ∈ B, we write X Y Y  TrG (b) = σ(b), NG (b) = σ(b), and CG (b)(T ) = T − σ(b) . σ∈G σ∈G σ∈G If G.b = {b1 , . . . , bk }, (the bi ’s pairwise distinct), we write Qk RvG,b (T ) = i=1 (T − bi ). This polynomial is called the resolvent of b (relative to G). It is clear that r RvG,b = CG (b) with r = G : StG (b) . Given an A-algebra B we denote by AutA (B) the group of A-automorphisms of B. 6.9. Definition. If L is a strictly finite extension of K, and a splitting field for a separable monic polynomial over K, we say that L is a Galois extension of K, we then denote AutK (L) by Gal(L/K) and we say that it is the Galois group of the extension L/K. Note well that in the definition of a Galois extension L/K, the fact that L is strictly finite (and not only finite) over K is implied. 6.10. Proposition and definition. (Galois correspondence) Let L ⊇ K be a strictly finite field over K. 1. The group AutK (L) is a detachable subgroup of GLK (L). If H is a subgroup of AutK (L), the subfield LH is called the fixed field of H. 2. We call the two mappings Fix and Stp between the two following sets the Galois correspondence. On the one hand G = GL/K is the set of finite subgroups of AutK (L). On the other hand K = KL/K is the set of strictly finite subextensions of L. §6. Basic Galois theory (1) 109 3. In the Galois correspondence each of the two mappings is decreasing. In addition, H ⊆ Stp(LH ) for all H ∈ G, M ⊆ LStp(M) for all M ∈ K, Stp ◦ Fix ◦ Stp = Stp and Fix ◦ Stp ◦ Fix = Fix. J In item 1 we have to prove that the subgroup is detachable and, in item 2, that Fix and Stp indeed act on the two sets as described. This is based on finite dimensional linear algebra over the discrete fields. We leave the details to the reader.  Remark. Even though we can decide if a given element of GLK (L) is in AutK (L), and even though it is easy to bound the number of elements of AutK (L), there is no sure general method to compute this number. As a consequence of Theorem 6.7 we have the following corollary. 6.11. Theorem. (Isomorphism extension theorem) Let L/K be a Galois extension and M be a finite K-subextension of L. Every K-homomorphism τ : M → L extends to an element τe of Gal(L/K). J L is the splitting field of a separable polynomial g ∈ K[T ]. We notice that since L is strictly finite over K, M is strictly finite over K and L strictly finite over M. Let M0 be the image of τ . It is a strictly finite field over K, so L is strictly finite over M0 . Thus L is a field of roots of g strictly finite over M and over M0 . By Theorem 6.7 (item 3 ), we can extend τ to a K-isomorphism τe : L → L.  When a separable polynomial over K has a splitting field L strictly finite over K, the group Gal(L/K) can also be denoted by GalK (f ) insofar as Theorem 6.7 gives the uniqueness of L (up to K-automorphism). Remark. In constructive mathematics we have the following results (trivial in classical mathematics). For some subgroup H of a finite group the following properties are equivalent. • H is finite. • H is finitely generated. • H is detachable. Similarly for some K-linear subspace M of a finite dimensional K-vector space the following properties are equivalent. • M is finite dimensional. • M is finitely generated (i.e., the image of a matrix). • M is the kernel of a matrix. 110 III. The method of undetermined coefficients 6.12. Proposition and definition. (Elementary Galois situation) Let A ⊆ B be two rings. An elementary Galois situation is defined as follows. i. We have a separable monic polynomial Q ∈ A[T ] of degree d and elements y1 , y2 , . . ., yd of B such that Qd Q(T ) = i=1 (T − yi ). ii. Let y = y1 . Assume for each i that B = A[yi ] and that hQi is the kernel of the homomorphism of A-algebras A[T ] → B which sends T into yi (whence B = A[y] = A[yi ] ' A[T ]/hQi). For each i there thus exists a unique A-automorphism σi of B satisfying σi (y) = yi . iii. Assume that these automorphisms form a group, which we denote by G. In particular, |G| = d = [ B : A ]. In the elementary Galois situation we have the following results. 1. a. FixB (G) = A. b. For all z ∈ B, CB/A (z)(T ) = CG (z)(T ). 2. Let H be a detachable subgroup of G, A0 = BH and  Q QH (T ) = σ∈H T − σ(y) . Then, we find the elementary Galois situation with A0 , B, QH and σ(y) σ∈H . In particular, B = A0 [y] is a free A0 -module of rank |H| = [ B : A0 ]. In addition, H is equal to StpG (A0 ). P k J 1a. Consider some x = d−1 k=0 ξk y in B (with each ξk ∈ A) invariant under the action of G = {σ1 , . . . , σd }. Pd−1 k We thus have for all σ ∈ G, x = k=0 ξk σ(y) . If V ∈ Mn (B) is the Vandermonde matrix   1 y1 y12 · · · y1d−1  .. ..   . .   V =  . ..  ,  .. .  d−1 2 1 yd yd · · · yd we get       ξ0 x x  ξ1   x   0        V  .  =  .  = V  . .  ..   ..   ..  ξd−1 x 0 Since det(tV V ) = discT (Q) ∈ A× , we get [ ξ0 ξ1 · · · ξd−1 ] = [ x 0 · · · 0 ], and x = ξ0 ∈ A. 1b. Since B ' A[T ]/hQi, Corollary 5.5 gives, for g ∈ A[Y ] and z = g(y1 ), §6. Basic Galois theory (1) 111 the equalities  Q  Q CB/A (z)(T ) = i T − g(yi ) = σ∈G T − σ(g(y1 )) = CG (z)(T ). 2. It is clear that B = A0 [σ(y)] for each σ ∈ H and that QH is a separable polynomial of A0 [T ]. It remains to see that every polynomial P ∈ A0 [T ] which annihilates some yi = σi (y) (σi ∈ H) is a multiple of QH . For all σ∈H, since σ is an A0 -automorphism of B, we have P σ(yi ) =σ P (yi ) =0. Thus P is divisible by each T − σ(y), for σ ∈ H. As these polynomials are pairwise comaximal, P is a multiple of their product QH . Finally, if σj ∈ G is an A0 -automorphism of B, σj (y) = yj must be a zero of QH . However, since Q is separable, the only yi ’s that annihilate QH are the σ(y)’s for σ ∈ H. Therefore σj ∈ H.  Remarks. 1) In the elementary Galois situation nothing states that the yi ’s are the only zeros of Q in B, nor that the σi ’s are the only A-automorphisms of B. Take for example B = K3 , and three distinct elements a, b, c in the discrete field K. The polynomial Q = (T − a)(T − b)(T − c) admits 27 zeros in B, including six which have Q as minimal polynomial, which makes six K-automorphisms of B. In addition, if we take z1 = (a, b, c), z2 = (b, a, b) and z3 = (c, c, a), we see that Q = (T − z1 )(T − z2 )(T − z3 ), which shows that the first condition does not imply the second. However, with y1 = (a, b, c), y2 = (b, c, a) and y3 = (c, a, b), we are in the elementary Galois situation. 2) Concerning condition iii in the definition of the elementary Galois situation, we can easily see that it is equivalent to the fact that each σi permutes the yj ’s. This condition is not a consequence of the first two, as the following example proves. Consider the following 5 × 5 latin square (in each row and each column, the integers are different), which is not the table of a group   1 2 3 4 5  2 4 1 5 3     3 5 4 2 1 .    4 1 5 3 2  5 3 2 1 4 Each row defines a permutation σi ∈ S5 ; thus σ1 = Id, σ2 = (12453), . . . , σ5 = (154)(23). The σi ’s do not form a group (which would be of order 5) because σ5 is of order 6. Let B = K5 where K is a field having at least 5 elements a1 , . . ., a5 , y = (a1 , . . . , a5 ) ∈ B, yi = σi (y) and Q Q Q(T ) = i (T − yi ) = i (T − ai ) ∈ K[T ]. Then, in 6.12, the first two conditions i, ii are satisfied but not condition iii. Luckily things are simpler in the field case. 112 III. The method of undetermined coefficients 6.13. Lemma. Let L = K[y] be a strictly finite discrete field over K. Let Q be the minimal polynomial of y over K. If Q is separable and can be completely factorized in L[T ], we find ourselves in the elementary Galois situation and the corresponding group G is the group Gal(L/K) of all the K-automorphisms of L. J Let y = y1 , . . ., yd be the zeros of Q (of degree d) in L. Each yi annihilates Q and Q is irreducible in K[T ], so Q is the minimal polynomial of yi over K and K[yi ] is a K-linear subspace of L, free and of same dimension d, therefore equal to L. Finally, since L is integral, the yi ’s are the only zeros of Q in L, thus every K-automorphism of L is some σi , and the σi ’s do indeed form a group: the Galois group G = Gal(L/K).  6.14. Theorem. (Galois correspondence, the elementary case) Let L = K[y] be a strictly finite discrete field over K. Let Q be the minimal polynomial of y over K. Assume that Q is separable and can be completely factorized in L[T ]. In particular, L is a Galois extension of K. We have the following results. 1. The two maps of the Galois correspondence are two reciprocal bijections. 2. For all M ∈ KL/K , L/M is a Galois extension of the Galois group Fix(M) and [ L : M ] = |Fix(M)|. 3. If H1 , H2 ∈ GL/K and Mi = Fix(Hi ) ∈ KL/K , then • H1 ∩ H2 corresponds to the K-subalgebra generated by M1 and M2 , • M1 ∩ M2 corresponds to the subgroup generated by H1 and H2 . 4. If H1 ⊆ H2 in GL/K and Mi = Fix(Hi ), then M1 ⊇ M2 and we have the equality | H2 : H1 | = [ M1 : M2 ]. 5. For all z ∈ L, CL/K (z)(T ) = CGal(L/K) (z)(T ). J It suffices to prove the first item. By Proposition 6.12 we have the equality Stp ◦ Fix = IdGL/K . Now let M ∈ KL/K . Since L = K[y], we have L = M[y]. As L is strictly finite over M, we can compute the minimal polynomial P of y over M. It divides Q therefore it is separable. It can be completely factorized in L[T ]. Thus, with M, L = M[y] and P , we are in the assumptions of Lemma 6.13, so in the elementary Galois situation. The M-automorphisms of L are K-automorphisms thus they are exactly the elements of the stabilizer H = StpG (M) (where G = Gal(L/K)). In this situation item 1b of Proposition 6.12 states that Fix(H) = M.  We have just established that the Galois correspondence is bijective, i.e. the fundamental theorem of Galois theory, in the elementary case. However, it will later turn out that this case is in fact the “general” case: each time that we have a Galois extension we can reduce to the elementary situation (Theorems 6.15 and VI -1.9). §6. Basic Galois theory (1) 113 Construction of a splitting field by means of a Galois resolvent, basic Galois theory In this subsection f ∈ K[T ] is a separable monic polynomial Q of degree n and A = AduK,f with f (T ) = i (T − xi ) in A. The aim of the current subsection is to prove the following result: if K is infinite, and if we know how to factorize the separable monic polynomials in K[T ], then we know how to construct a splitting field for any arbitrary separable monic polynomial, and the obtained extension falls within the elementary framework of Theorem 6.14. We construct the splitting field by a “uniform” method. Since it is strictly finite, Theorem 6.7 says that this splitting field is isomorphic to any other. 6.15. Theorem. P We introduce indeterminates u1 , . . . , un . For σ ∈ Sn we define uσ = i ui xσi . We write Q R(u, T ) = σ∈Sn (T − uσ ) ∈ K[u, T ], and D(u) = discT (R) ∈ K[u]. 1. One of the coefficients of D is equal to ± disc(f )(n−2)!(n!−1) . In the following we assume that we specialize the ui ’s to elements ai ∈ K and that D(a) 6= 0 (this is always possible if K is infinite). P 2. For any arbitrary σ ∈ Sn , the element aσ = i ai xσi admits the polynomial R(a, T ) ∈ K[T ] for minimal polynomial, such that A = K[aσ ] ' K[T ]/hR(a, T )i . P We write a = aId = i ai xi . 3. The only elements of A fixed by Sn are the elements of K. 4. Assume that we know how to decompose R(a, T ) into a product of Q` irreducible factors in K[T ]: R(a, T ) = j=1 Qj . a. If ` = 1, A is a field, the extension A/K is a splitting field for the polynomial f , as well as for R(a, T ), and the situation pertains to Theorem 6.14. In particular, Gal(A/K) ' Sn . Q b. If ` > 1, then A ' j Kj where Kj = K[πj (a)] = A/hQj (a)i ' K[T ]/hQj i . (πj : A → Kj is the canonical projection.) Let Hj be the subgroup of Sn that stabilizes the ideal hQj (a)iA . Then – Sn operates transitively over the ideals hQj (a)iA , so that the Qj ’s all have the same degree, |Hj | = deg(Qj ) = [ Kj : K ], and the Kj ’s are pairwise isomorphic discrete fields, – the extension K1 /K is a splitting field for f , as well as for each Qj , and the situation pertains to Theorem 6.14, in particular, H1 = Gal(K1 /K). 114 III. The method of undetermined coefficients J 1. The discriminant D equals (up to sign) the product of the uσ − uτ for σ 6= τ ∈ Sn . Each uσ − uτ is a sum of elements ui (xσi − xτ i ): each ui has coefficient 0 or some xj − xk (j 6= k). The first monomial for the lexicographical order that appears in the product D is the monomial  n!(n!−(n−1)!) n! (n−1)!−(n−2)! u2 u1 n!(2!−1!) · · · un−1 , with coefficient a product of elements of the type xi − xj (i 6= j). More precisely if δ = disc(f ), the coefficient in question will be, up to sign, δ (n−2)!(n!−1) . 2. We use Proposition 5.10 since R(a, T ) is the characteristic polynomial of a (Lemma 5.12). 3. See item 1b of Proposition 6.12. 4a. This is obvious. Q 4b. The fact that A ' j Kj results from the Chinese remainder theorem. Q Q The equality j Qj (T ) = σ (T − aσ ) in A[T ] remains valid in K1 [T ].  Thus, there exists for all j some σj such that Qj π1 (aσj ) = 0, in other  words, Qj (aσj ) ∈ hQ1 (a)iA . Furthermore, in A we have Qj (aσj ) = σj Qj (a)  because Qj ∈ K[T ]. So σj hQj (a)iA ⊆ hQ1 (a)iA . This gives us a surjection σj : A/hQj (a)i → A/hQ1 (a)i, i.e. a surjection K[T ]/hQj i → K[T ]/hQ1 i. This results in deg  Q1 6 deg Qj , and by symmetry deg Qj = deg Q1 , whence σj hQj (a)iA = hQ1 (a)iA . Thus Sn operates transitively over the ideals hQj (a)iA and the Kj ’s are pairwise isomorphic.  Remark. The construction of the splitting field suggested here is in fact more or less impractical as soon as the degree n of f is equal to or greater than 7, as it necessitates a factorization of a polynomial of degree n!. We propose in Chapter VII a less brutal dynamic method that has the additional advantage of not demanding to know how to factorize the separable polynomials of K[T ]. The counterpart of this absence of factorization will be that, despite knowing how to compute in “some” splitting field, a priori we will never be able to determine it in its entirety (in the sense of knowing its dimension as a K-vector space). The same lack of precision also applies to the Galois group. Example. Consider the polynomial p(T)∈ Q[T ] below. We ask Magma to randomly take some linear combination z from the xi (the zeros of p(T) in the universal splitting algebra A = AduQ,p ), to compute MinQ,z (T ), and then to factorize it. The software efficiently gives the minimal polynomial pm of degree 720 and decomposes it into a product of 30 factors of degree 24 (the totality in one or two minutes). One of these factors is the polynomial q. As q is very cumbersome, we ask Magma to compute a Gröbner basis of the §6. Basic Galois theory (1) 115 ideal generated by the Cauchy modules on the one hand, and by q(z) on the other, which provides a clearer description of the splitting field A/hq(z)i: x6 is annihilated by p, x5 is annihilated by a polynomial of degree 4 with coefficients in Q[x6 ], x1, . . . , x4 are expressed in terms of x5 and x6. The computation of the Gröbner basis takes several hours. Magma can then compute the Galois group, which is given by two generators. Here are the results: p:=T^6 - 3*T^5 + 6*T^4 - 7*T^3 + 2*T^2 + T - 1; z:=x1 + 2*x2 + 13*x3 - 24*x4 + 35*x5 - 436*x6; pm:=T^720 + 147240*T^719 + 10877951340*T^718 + 537614218119000*T^717 + 19994843992714365210*T^716 + 596880113924932859498208*T^715 + 14896247531385087685472255280*T^714 + ... q:= T^24 + 4908*T^23 + 13278966*T^22 + 25122595960*T^21 + 36160999067785*T^20 + 41348091425849608*T^19 + 38304456918334801182*T^18 + 28901611463650323108996*T^17 +... //we annihilate q(z): description of the field of roots; Affine Algebra of rank 6 over Rational Field Variables: x1, x2, x3, x4, x5, x6 Quotient relations: x1 + 18/37*x5^3*x6^5 - 45/37*x5^3*x6^4 + 104/37*x5^3*x6^3 - 3*x5^3*x6^2 + 36/37*x5^3*x6 - 1/37*x5^3 - 27/37*x5^2*x6^5 + 135/74*x5^2*x6^4 156/37*x5^2*x6^3 + 9/2*x5^2*x6^2 - 54/37*x5^2*x6 + 3/74*x5^2 + 91/37*x5*x6^5 - 455/74*x5*x6^4 + 460/37*x5*x6^3 - 25/2*x5*x6^2 + 108/37*x5*x6 + 31/74*x5 - 41/37*x6^5 + 205/74*x6^4 - 204/37*x6^3 + 11/2*x6^2 - 45/37*x6 - 53/74, x2 + x6 - 1, x3 + x5 - 1, x4 - 18/37*x5^3*x6^5 + 45/37*x5^3*x6^4 - 104/37*x5^3*x6^3 + 3*x5^3*x6^2 - 36/37*x5^3*x6 + 1/37*x5^3 + 27/37*x5^2*x6^5 - 135/74*x5^2*x6^4 + 156/37*x5^2*x6^3 - 9/2*x5^2*x6^2 + 54/37*x5^2*x6 - 3/74*x5^2 91/37*x5*x6^5 + 455/74*x5*x6^4 - 460/37*x5*x6^3 + 25/2*x5*x6^2 108/37*x5*x6 - 31/74*x5 + 41/37*x6^5 - 205/74*x6^4 + 204/37*x6^3 11/2*x6^2 + 45/37*x6 - 21/74, x5^4 - 2*x5^3 + x5^2*x6^2 - x5^2*x6 + 4*x5^2 - x5*x6^2 + x5*x6 - 3*x5 + x6^4 - 2*x6^3 + 4*x6^2 - 3*x6 - 1, x6^6 - 3*x6^5 + 6*x6^4 - 7*x6^3 + 2*x6^2 + x6 - 1 // the Galois group; Permutation group acting on a set of cardinality 6 Order = 24 = 2^3 * 3 (1, 4)(2, 5)(3, 6) (1, 2, 4, 6) Note that discT (p) = 24 × 373 , which is not unrelated to the denominators appearing in the Gröbner basis. We will return to this example on page 427 when discussing the dynamic method. 116 III. The method of undetermined coefficients Remark. Here we interrupt our treatment of basic Galois theory. We shall resume the current thread in Sections VI-1 and VI-2, which the reader can refer to directly from here (the results of the intermediate chapters will not be used). In Chapter VII we will address a more sophisticated theory which proves to be necessary when we do not have at our disposal a factorization algorithm for the separable polynomials over the base field. 7. The resultant The resultant is the basic tool of Elimination theory. This is based on the basic Elimination lemma on page 121, which is applied to arbitrary rings, and on its Corollary 7.7 for the geometric case. Elimination theory Elimination theory concerns the systems of polynomial equations (or polynomial systems). Such a system (f1 , . . . , fs ) in k[X1 , . . . , Xn ] = k[X], where k is a discrete field, can admit some zeros in kn , or in Ln , where L is an overfield of k, or even an arbitrary k-algebra. The zeros depend only on the ideal a = hf1 , . . . , fs i of k[X] generated by the fi ’s. We also call them the zeros of the ideal a. Let π : Ln → Lr be the projection which forgets the last n − r coordinates. If V ⊆ Ln is the set of zeros of a on L, we are interested in as precise a description as possible of the projection W = π(V ), if possible as zeros of a polynomial system in the variables (X1 , . . . , Xr ). Here intervenes in a natural way the elimination ideal (elimination of the variables Xr+1 , . . . , Xn for the considered polynomial system), which is defined by b = a ∩ k[X1 , . . . , Xr ]. Indeed every element of W is clearly a zero of b. The converse is not always true (and in any case not at all obvious), but it is true in some good cases: if L is an algebraically closed field and if the ideal is in a Noether position (Theorem 9.5). A reassuring fact, and easy to establish by the considerations of linear algebra over discrete fields, is that the elimination ideal b “does not depend on” the considered base field k. More precisely, if k1 is an overfield of k, we have the following results. • The ideal hf1 , . . . , fs ik1 [X1 ,...,Xn ] only depends on the ideal a: it is the ideal a1 of k1 [X1 , . . . , Xn ] generated by a. • The ideal of elimination b1 = a1 ∩ k1 [X1 , . . . , Xr ] only depends on b: it is the ideal of k1 [X1 , . . . , Xr ] generated by b. §7. The resultant 117 Elementary Elimination theory faces two obstacles. The first is the difficulty of computing b from a, i.e. of computing some finite generator set of b from the polynomial system (f1 , . . . , fs ). This computation is rendered possible by the theory of the Gröbner bases, which we do not address in this work. In addition this computation is not uniform, unlike the computations linked to resultant theory. The second obstacle is that one only obtains truly satisfactory results for homogeneous polynomial systems. The basic example that shows this is the determinant. Consider a generic system of linear equations (f1 , . . . , fn ) of k[a][X], where the variables aij in a represent the n2 coefficients of the n linear forms fi , and the Xj ’s are the unknowns. Then the ideal hdet(a)i of k[a] is indeed the elimination ideal of the variables Xj for the system (f1 , . . . , fn ), provided we only take into account the zeros of the system distinct from 0 = (0, . . . , 0). The simplicity of this result should be contrasted with the discussion, in the non-homogeneous framework, of systems where the fi ’s are affine forms. Furthermore, even though the zeros of the ideal hdet(a)i correspond effectively to the systems that admit some zero 6= 0, this ideal is not exactly equal to hf1 , . . . , fn i ∩ k[a], we first need to saturate the ideal a = hf1 , . . . , fn i w.r.t. the homogeneous variables Xj ; i.e. add every g to it such that, for each j ∈ J1..nK, gXjN ∈ a for some large enough N . In the current case, this saturated ideal is the ideal a + det(a)k[a][X], each det(a)Xj is in a, and the intersection of the saturation with k[a] is indeed hdet(a)i. What will be retained from this little introduction to Elimination theory is a definition: let k be a commutative ring, a be an ideal of k[X1 , . . . , Xn ] and r ∈ J0..n − 1K, we then define the elimination ideal of the variables Xr+1 , . . . , Xn for the ideal a as being the ideal b = a ∩ k[X1 , . . . , Xr ]. We will remain wary of the fact that if k is an arbitrary ring, the ideal a can very well be finitely generated even if b is not finitely generated. The Sylvester matrix In what follows, we do not assume the ring A to be discrete, so much so that the degree of a polynomial of A[X] is not necessarily exactly known. From the point of view of computation, in general we have to take the polynomials in A[X] in the form of formal polynomials, i.e. pairs (f, p) where f is a polynomial and p is the upper bound of its degree. This notion is also useful when changing the base ring because a polynomial can for instance have its degree decrease without us knowing how to test it (e.g. upon passage to the quotient ring). 118 III. The method of undetermined coefficients Recall the definition of the Sylvester matrix and of the resultant of two polynomials (formal polynomials of degrees p and q > 0): f = ap X p + ap−1 X p−1 + · · · + a0 , g = bq X q + bq−1 X q−1 + · · · + b0 . The Sylvester matrix of f and g (in degrees p and q) is the following matrix  ap        bq SylX (f, p, g, q) =         | ··· .. . ··· .. . ··· ··· ··· a0  ..    ap · · · · · · · · · a0     · · · b0   ..  .     .. .. . .  bq · · · · · · b0 {z } . ···                q p        p+q This matrix can be regarded as the matrix whose rows are the coordinates of the polynomials (X q−1 f, . . . , Xf, f, X p−1 g, . . . , Xg, g) over the basis (X p+q−1 , X p+q−2 , . . . , X, 1). The resultant of f and g (in degrees p and q), denoted by ResX (f, p, g, q), is the determinant of this Sylvester matrix  def ResX (f, p, g, q) = det SylX (f, p, g, q) . (2) If the context is clear, we also denote it by ResX (f, g) or Res(f, g). We have ResX (f, p, g, q) = (−1)pq ResX (g, q, f, p), and also, for a, b ∈ A, ResX (af, p, bg, q) = aq bp ResX (f, p, g, q). (3) (4) If p = q = 0, we obtain the determinant of an empty matrix, i.e. 1. 7.1. Fact. If p > 1 or q > 1, then ResX (f, p, g, q) ∈ hf, giA[X] ∩ A. More precisely, for each n ∈ J0..p + q − 1K, there exist un and vn ∈ A[X] such that deg un < q, deg vn < p and X n ResX (f, g) = un (X)f (X) + vn (X)g(X). (5) J Let S be the transpose of SylX (f, p, g, q). The columns of S express polynomials X k f or X ` g over the basis of the monomials of degree < p + q. By using Cramer’s formula S Se = det S · Ip+q , §7. The resultant 119 we see that each X n Res(f, g) (which corresponds to one of the columns of the right-hand side matrix) is a linear combination of the columns of S.  Remark. We can also view Equality (5) in the n = 0 case as expressing the determinant of the matrix below developed according to the last column (this is in fact the Sylvester matrix in which we have replaced each coefficient in the last column by the “name” of its row):   ap · · · · · · · · · · · · a0 X q−1 f   .. ..   . .     ap · · · · · · · · · · · · f      b p−1 X g   q · · · · · · b0   .   .. ..   . .        bq · · · · · · b0 Xg    bq · · · · · · g 7.2. Corollary. Let f , g ∈ A[X] and a ∈ B ⊇ A, with f (a) = g(a) = 0, and p > 1 or q > 1, then ResX (f, p, g, q) = 0. Note that if the two degrees are over-evaluated the resultant is annihilated, and the intuitive interpretation is that the two polynomials have a common zero “at infinity.” Whilst if ap = 1, the resultant (for f in degree p) is the same regardless of the formal degree chosen for g. This then allows for an unambiguous switch to the notation Res(f, g), as in the following lemma. 7.3. Lemma. Let f and g ∈ A[X] with f monic of degree p. 1. We write B = A[X]/hf i and denote by µg multiplication by (the class of) g in B, which is a free A-module of rank p. Then NB/A (g) = det µg = Res(f, g). (6) 2. Therefore Res(f, gh) = Res(f, g) Res(f, h), Res(f, g + f h) = Res(f, g). (7) (8) 3. For every square matrix A ∈ Mp (A) for which the characteristic polynomial is equal to f , we have  Res(f, g) = det g(A) . (9) Qp 4. If we write f = i=1 (X − xi ) in an extension of A, we obtain Yp Res(f, g) = g(xi ). (10) i=1 120 III. The method of undetermined coefficients J 1. By elementary manipulations of rows, the Sylvester matrix  1         b SylX (f, p, g, q) =  q        ap−1 .. . ··· .. . ··· .. . 1 ··· ap−1 ··· b0 ··· a0 .. ··· .. .. ··· . · · · a0 . .. . bq ··· . ···                  b0 is transformed into the matrix visualized below, in which the rows q + 1, . . ., q + p now contain the remainders of the division by f of the polynomials X p−1 g, . . ., Xg, g. Thus the p × p matrix in the south-east corner is exactly the transpose of the matrix of the endomorphism µg of B over the basis of the monomials and its determinant is equal to that of the Sylvester matrix.   1 ap−1 · · · · · · · · · a0   .. .. ..   . . .      1 ap−1 · · · · · · · · · a0      0 × ··· ··· ··· ×   0 ···    .. .. .. ..   . . . .       . .. .. ..   .   . . . .  0 ··· 0 × ··· ··· ··· × 2. Results from item 1. 3 and 4. Result from Proposition 5.9 via item 1. We can also give the following direct proofs. 4. First of all, from Equation (7) we deduce the symmetrical formula Res(f1 f2 , g) = Res(f1 , g) Res(f2 , g) for f1 and f2 monic (use the equations (3) and (4) and the fact that in the case where the coefficients of g are indeterminates we can assume g = bq g1 with g1 monic). Next, a direct computation gives Res(X − a, g) = g(a).  3. We must prove Res(CA , g) = det g(A) for some polynomial g and an arbitrary matrix A. This is an algebraic identity concerning the coefficients of A and of g. We can thus restrict ourselves to the case where the matrix A is the generic matrix. Then, it is diagonalized in an overring and we conclude by applying item 4.  §7. The resultant 121 Remark. Item 4 offers a non-negligible converse to Corollary 7.2: if A is integral and if f and g are two monic polynomials of A[T ] that are completely factorized in an integral ring containing A, they have a common zero if and only if their resultant is null. In the case of a nontrivial discrete field K we can do a little better. 7.4. Fact. Let f and g ∈ K[X] of degrees p and q > 1, with Res(f, g) = 0. Then, f and g have a gcd of degree > 1. J The K-linear map (u, v) 7→ uf +vg where deg u < q and deg v < p admits as matrix over the bases of monomials the transpose of the Sylvester matrix. Thus let (u, v) 6= (0, 0) in the  kernel. The polynomial uf = −vg is of degree < p + q. So deg lcm(f, g) < p + q, which implies deg gcd(f, g) > 0.  Comment. The above proof assumes that we know the elementary theory of divisibility (via Euclid’s algorithm) in the rings of type K[X]. This theory shows the existence of a gcd and of a lcm with the relation lcm(f, g) gcd(f, g) = αf g, (α ∈ K× ). Another proof would consist in saying that in a discrete field L, which is an extension of K, the polynomials f and g are split (i.e., are decomposed into factors of degree 1) which implies, given the previous remark, that f and g have a common zero and thus a common factor of degree > 0. One must then finish by stating that the gcd is computed by Euclid’s algorithm and thus does not depend on the chosen base field (which must only contain the coefficients of f and g). Nevertheless this second proof, which somewhat gives “the true motivation for the theorem,” assumes the existence of L (which is not guaranteed from a constructive point of view) and does not avoid the theory of divisibility in K[X] via Euclid’s algorithm. 7.5. Basic elimination lemma. Let f and g ∈ A[X] with f monic of degree p. Then, R = ResX (f, g) is well defined and the elimination ideal a = hf, giA[X] ∩ A satisfies ap ⊆ ResX (f, g)A ⊆ a. In particular 1. R is invertible if and only if 1 ∈ hf, gi, 2. R is regular if and only if a is faithful, and 3. R is nilpotent if and only if a is nilpotent. J We already know that ResX (f, g) ∈ hf, giA[X] . We use the notations of Lemma 7.3, item 1. We denote by x the class of X in B = A[X]/hf i. A basis of B over A is (1, x, . . . , xp−1 ). Let (γi )i∈J1..pK be elements of a. The elements γ1 , γ2 x, . . ., γp xp−1 are in Im µg , so the matrix D = Diag(γ1 , . . . , γp ) can be written in the form GB, where G is 122 III. The method of undetermined coefficients the matrix of µg over the basis of the monomials. It follows that Qp k=1 γk = det D = det G det B = Res(f, g) det B. Qp Thus the element k=1 γk of ap belongs to hRes(f, g)iA .  The basic elimination lemma will be generalized later (Lemmas 9.2 and IV-10.1). The term “elimination ideal” comes from the following facts which result from the previous lemma and from Lemma 7.3. 7.6. Corollary. Let A be an integral ring and f , g ∈ A[X]. If f is monic and can be completely factorized, the following properties are equivalent. 1. The elimination ideal hf, giA[X] ∩ A is null. 2. The resultant ResX (f, g) = 0. 3. The polynomials f and g have a common root. A discrete field K is said to be algebraically closed if every monic polynomial of K[X] can be decomposed into a product of factors X − xi (xi ∈ K). 7.7. Corollary. Let K be a algebraically closed discrete field. Write A = K[Y1 , . . . , Ym ]. Let f and g ∈ A[X] with f monic in X. For some arbitrary element ζ = (ζ1 , . . . , ζm ) of Km , the following properties are equivalent. 1. ζ annihilates all the polynomials of the elimination ideal hf, gi ∩ A.  2. ResX f (ζ, X), g(ζ, X) = 0. 3. f (ζ, X) and g(ζ, X) have a common root. Consequently if V is the set of zeros common to f and g in Km+1 , and if π : Km+1 → Km is the projection that forgets the last coordinate, then π(V ) is the set of zeros of ResX (f, g) ∈ K[Y1 , . . . , Ym ]. Revisiting the discriminant When g = thus Qn i=1 (X − yi ), Lemma 7.3 gives ResX (g, g 0 ) = Qn i=1 g 0 (yi ) and disc(g) = (−1)n(n−1)/2 ResX (g, g 0 ). (11) Qn Since the equality g(X) = i=1 (X − yi ) can always be performed in the universal splitting algebra if g is monic, we obtain that Equality (11) is valid for every monic polynomial, over every commutative ring. The following fact results therefore from the basic elimination lemma. 7.8. Fact. Consider some monic polynomial g ∈ A[X]. – hg(X), g 0 (X)i = h1i if and only if disc g is invertible. – The ideal hg(X), g 0 (X)i ∩ A is faithful if and only if disc g is a regular element of A. §7. The resultant 7.9. Fact. equality 123 If f = gh ∈ A[X] with g, h monic, we have the following disc(f ) = disc(g) disc(h)Res(g, h)2 (12) J This immediately results from Equations (7), (8) page 119 and (11).  7.10. Corollary. Let f ∈ A[X] be monic and B = A[x] = A[X]/hf i. 1. If f possesses Q a square factor, disc f = 0. Conversely, if disc f = 0 and if f (X) = (X − xi ) in some integral ring containing A, two of the zeros xi are equal. 2. Assume f is separable and f = gh (g and h monic). a. The polynomials g and h are separable and comaximal. b. There exists some idempotent e of B such that hei = hπ(g)i. We have B ' B/hgi × B/hhi. 3. Assume disc f is regular and f = gh (g and h monic). Then, the elements disc g, disc h and Res(g, h) are regular. J All this results from Fact 7.9, except maybe the idempotent e in item 2. If gu + hv = 1, then e = gu is required.  7.11. Corollary. Let K be a discrete field, f ∈ K[X] a separable monic polynomial and B = K[X]/hf i. In item 2 of the previous corollary, we associate with every divisor g of f the idempotent e such that hgi = hei. This establishes a bijection between the monic divisors of f and the idempotents of B. This bijection respects divisibility. J The reciprocal bijection is given by e = v 7→ gcd(v, f ).  We now introduce the notions of prime subfields and of characteristic of a discrete field. More generally, if A is an arbitrary ring, we denote by ZA the prime subring of A defined as follows:  ZA = n · (m · 1A )−1 | n, m ∈ Z, m · 1A ∈ A× . If ρ : Z → A is the unique homomorphism of rings of Z in A, the prime subring is therefore isomorphic to S −1 Z/Ker ρ , where S = ρ−1 (A× ). A ring can be called prime if it is equal to its prime subring. Actually the terminology is only common in the case of fields. When K is a discrete field, the prime subring is a subfield, called the prime subfield of K. For some m > 0 we will say that K is of characteristic > m, and we write “char(K) > m” if for every n ∈ J1..mK, the element n · 1K is invertible. When K is nontrivial, if there exists some m > 0 such that m · 1K = 0, then there is a minimum number of them, which is a prime number p, and we 124 III. The method of undetermined coefficients say that the field is of characteristic p. When the prime subfield of K is isomorphic to Q, the convention is to speak of a null characteristic, but we will also use the terminology infinite characteristic in the contexts where it is useful to remain consistent with the previous notation, for instance in Fact 7.12. We can conceive5 some nontrivial discrete fields whose characteristic is not well defined from a constructive point of view. However, for a discrete field the statement “char(K) > m” is always decidable. 7.12. Fact. Let K be a discrete field and f ∈ K[X] be a monic polynomial. If disc f = 0 and char(K) > deg f , f possesses a square factor of degree > 1. J Let n = deg f . The polynomial f 0 is of degree n − 1. Let g = gcd(f, f 0 ). We have deg g ∈ J1..n − 1K (Fact 7.4). We write f = gh therefore disc(f ) = Res(g, h)2 disc(g) disc(h). Thus, Res(g, h) = 0, or disc(g) = 0, or disc(h) = 0. In the first case, the polynomials g and h have a gcd k of degree > 1 and k 2 divides f . In the two other cases, since deg g < deg f and deg h < deg f , we can finish by induction on the degree, by noting that if deg f = 1, then disc f 6= 0, which assures the initialization.  8. Algebraic number theory, first steps Here we give some general applications, in elementary number theory, of the results previously obtained in this chapter. For a glimpse of the many fascinating facets of number theory, the reader should consult the wonderful book [Ireland & Rosen]. Integral algebras We give a few precisions relating to Definition 3.2. 8.1. Definition. 1. An A-algebra B is said to be finite if B is a finitely generated A-module. We also say that B is finite over A. In the case of an extension, we speak of a finite extension of A. 2. Assume A ⊆ B. The ring A is said to be integrally closed in B if every element of B integral over A is in A. 5 We can also be presented with such cases resulting from a complicated construction in a subtle proof. §8. Algebraic number theory, first steps 125 8.2. Fact. Let A ⊆ B and x ∈ B. The following properties are equivalent. 1. The element x is integral over A. 2. The subalgebra A[x] of B is finite. 3. There exists a faithful and finitely generated A-module M ⊆ B such that xM ⊆ M . J 3 ⇒ 1 (a fortiori 2 ⇒ 1.) Consider a matrix A with coefficients in A which represents µx,M (the multiplication by x in M ) on a finite generator set of M . If f is the characteristic polynomial of A, we have by the CayleyHamilton theorem 0 = f (µx,M ) = µf (x),M and since the module is faithful, f (x) = 0. The rest is left to the reader.  We also easily obtain the following fact. 8.3. Fact. Let B be an A-algebra and C be a B-algebra. 1. If C is finite over B and B finite over A, then C is finite over A. 2. An A-algebra generated by a finite number of integral elements over A is finite. 3. The elements of B that are integral over A form a ring integrally closed in B. We call it the integral closure of A in B. 8.4. Lemma. Let A ⊆ B and f ∈ B[X]. The polynomial f is integral over A[X] if and only if each coefficient of f is integral over A. J The condition is sufficient, by item 3 of the previous lemma. In the other direction consider an integral dependence relation P (f ) = 0 for f (with P ∈ A[X][T ], monic). We have in B[X, T ] an equality   P (X, T ) = T − f (X) T n + un−1 (X)T n−1 + · · · + u0 (X) . Since the coefficient of T n in the second factor is 1, the multivariate Kronecker’s theorem implies that each coefficient of f is integral over A.  8.5. Lemma. Let A ⊆ B, L be a free B-module of finite rank and u ∈ EndB (L) be integral over A. Then, the coefficients of the characteristic polynomial of u are integral over A. In particular, det(u) and Tr(u) are integral over A. J Let us first prove that det(u) is integral over A. Let E = (e1 , . . . , en ) be a fixed basis of L. The A-module A[u] is a finitely generated A-module, 126 III. The method of undetermined coefficients and so the module E= P i∈J1..nK,k>0 Auk (ei ) ⊆ L is a finitely generated A-module, with u(E) ⊆ E. Let us introduce the module P D = x∈E n A detE (x) ⊆ B. Since E is a finitely generated A-module, D is a finitely generated A-module, and it is faithful, we have 1 ∈ D as detE (E) = 1. Finally, the equality  det(u) detE (x1 , . . . , xn ) = detE u(x1 ), . . . , u(xn ) and the fact that u(E) ⊆ E show that det(u)D ⊆ D. Next consider A[X] ⊆ B[X] and the B[X]-module L[X]. We have XIdL[X] − u ∈ EndB[X] (L[X]). If u is integral over A, XIdL[X] − u is integral over A[X] therefore Cu (X) = det(XIdL[X] − u) is integral over A[X]. We conclude with Lemma 8.4.  8.6. Corollary. Let A ⊆ B ⊆ C where C is a finite free B-module. Let x ∈ C be integral over A. Then, TrC/B (x), NC/B (x) and all the coefficients of CC/B (x) are integral over A. If in addition B is a discrete field, the coefficients of the minimal polynomial MinB,x are integral over A. J We apply the previous lemma with L = C and u = µx . For the final statement, we use Kronecker’s theorem and the fact that the minimal polynomial divides the characteristic polynomial.  Integrally closed rings 8.7. Definition. An integral ring A is said to be integrally closed if it is integrally closed in its quotient field. 8.8. Fact. Let A ⊆ B, S be a monoid of A, x ∈ B and s ∈ S. 1. The element x/s ∈ BS is integral over AS if and only if there exists a u ∈ S such that xu is integral over A. 2. If C is the integral closure of A in B, then CS is the integral closure of AS in BS . 3. If A is integrally closed, then so is AS . J It suffices to prove item 1. First assume x/s integral over AS . We have for example an equality in B u(x3 + a2 sx2 + a1 s2 x + a0 s3 ) = 0, with u ∈ S and each ai ∈ A. By multiplying by u2 we obtain (ux)3 + a2 us(ux)2 + a1 u2 s2 (ux) + a0 u3 s3 = 0 §8. Algebraic number theory, first steps 127 in B. Conversely suppose xu is integral over A with u ∈ S. We have for example an equality (ux)3 + a2 (ux)2 + a1 (ux) + a0 = 0 in B, therefore in BS we have x3 + (a2 /u)x2 + (a1 /u2 )x + (a0 /u3 ) = 0.  8.9. Concrete local-global principle. (Integral elements) Let S1 , . . ., Sn be comaximal monoids of a ring A ⊆ B and x ∈ B. We have the following equivalences. 1. The element x is integral over A if and only if it is integral over each ASi . 2. Assume A is integral, then A is integrally closed if and only if each ASi is integrally closed. J In item 1 we need to prove that if the condition is locally achieved, then it is globally achieved. Consider then some x ∈ B which satisfies for each i a relation (si x)k = ai,1 (si x)k−1 + ai,2 (si x)k−2 + · · · + ai,k with ai,h ∈ A and si ∈ Si (we can assume without of generality that the degrees are the Ploss same). We then use a relation ski ui = 1 to obtain an integral dependence relation of x over A.  Kronecker’s theorem easily implies the following lemma. 8.10. Lemma. (Kronecker’s theorem, case of an integral ring) Let A be integrally closed, and K be its quotient field. If we have f = gh in K[T ] with g, h monic and f ∈ A[T ], then g and h are also in A[T ]. 8.11. Lemma. The ring Z as well as the ring K[X] when K is a discrete field are integrally closed. J In fact this holds for every ring with an integral gcd A (see Section XI -2). Pn−1 Let f (T ) = T n − k=0 fk T k and a/b be a reduced fraction in the quotient field of A with f (a/b) = 0. By multiplying by bn we obtain Pn−1 an = b k=0 fk ak bn−1−k . Since gcd(a, b) = 1, gcd(an , b) = 1. But b divides an , therefore b is invertible, and a/b ∈ A.  8.12. Theorem. If A is integrally closed, the same goes for A[X]. J Let K = Frac A. If some element f of K(X) is integral over A[X], it is integral over K[X], therefore in K[X] because K[X] is integrally closed. The result follows by Lemma 8.4; all the coefficients of the polynomial f are integral over A, therefore in A.  An interesting corollary of Kronecker’s theorem is the following property (with the same notation as in Theorem 3.3). 128 III. The method of undetermined coefficients 8.13. Proposition. Let f, g ∈ A[X]. Assume that A is integrally closed, and that a ∈ A divides all the coefficients of h = f g, then a divides all the fα gβ . In other words c(f g) ≡ 0 mod a ⇐⇒ c(f )c(g) ≡ 0 mod a. J Indeed, when considering the polynomials f /a and g with coefficients in the quotient field of A, Kronecker’s theorem implies that fα gβ /a is integral over A because every hγ /a is in A.  Decomposition of polynomials into products of irreducible factors 8.14. Lemma. Let K be a discrete field. The polynomials of K[X] can be decomposed into products of irreducible factors if and only if we have an algorithm to compute the zeros in K of an arbitrary polynomial of K[X]. J The second condition is a priori weaker since it amounts to determining the factors of degree 1 for some polynomial of K[X]. Assume this condition is satisfied. To know whether there exists a decomposition f = gh with g and h monic of fixed degrees > 0, we apply Kronecker’s theorem. We obtain for each coefficient of g and h a finite number of possibilities (they are the zeros of monic polynomials that we can explicitly express according to the coefficients of f ).  8.15. Proposition. In Z[X] and Q[X] the polynomials can be decomposed into products of irreducible factors. A nonconstant polynomial of Z[X] is irreducible in Z[X] if and only if it is primitive and irreducible in Q[X]. J For Q[X] we apply Lemma 8.14. We must therefore show that we know how to determine the rational zeros of a monic polynomial f with rational coefficients. We can even assume that the coefficients of f are integral. The elementary theory of divisibility in Z shows then that if a/b is a zero of f , a must divide the leading coefficient and b the constant coefficient of f ; there is therefore only a finite number of tests to execute. For Z[X], a primitive polynomial f being given, we want to know if there exists a decomposition f = gh with g and h of fixed degrees > 0. We can assume f (0) 6= 0. We apply Kronecker’s theorem. A product g0 hj for instance must be a zero in Z of a monic polynomial q0,j of Z[T ] that we can compute. In particular, g0 hj must divide q0,j (0), which only leaves a finite number of possibilities for hj . Finally, for the last item, if some primitive polynomial f in Z[X] can be decomposed in the form f = gh in Q[X] we can assume that g is primitive in Z[X]. Let a be a coefficient of h, then every agj is in Z (Kronecker’s P theorem), and the Bézout relation j gj uj = 1 shows that a ∈ Z.  §8. Algebraic number theory, first steps 129 Number fields We call a discrete field K a number field if it is strictly finite over Q. Galois closure 8.16. Theorem. (Splitting field, primitive element theorem) 1. If f is a separable monic polynomialQof Q[X] there exists a number field L over which we can write f (X) = i (X − xi ). In addition, with some α ∈ L we have L = Q[x1 , . . . , xn ] = Q[α] ' Q[T ]/hQi , where Q(α) = 0 and the monic polynomial Q is irreducible in Q[T ] and is completely decomposable in L[T ]. In particular, the extension L/Q is Galoisian and Theorem 6.14 applies. 2. Every number field K is contained in a Galois extension of the above type. In addition, there exists some x ∈ K such that K = Q[x]. J 1. This results from Theorem 6.15 and from Proposition 8.15. 2. A number field is generated by a finite number of elements that are algebraic over Q. Each of these elements admits a minimal polynomial that is irreducible over Q and therefore separable (Fact 7.12). By taking the lcm f of these polynomials we obtain a separable polynomial. By applying item 1 to f and by using Theorem 6.7, we see that K is isomorphic to a subfield of L. Finally, as the Galois correspondence is bijective and as the Galois group Gal(L/Q) is finite, the field K only contains an explicit finite number of subfields Ki strictly finite over Q. If we choose x ∈ K outside of the union of these subfields (which are strict Q-vector subspaces), we necessarily have Q[x] = K; it is a subfield of K strictly finite over Q and distinct from all the Ki ’s.  Cotransposed element If B is a free A-algebra of finite rank, we can identify B with a commutative subalgebra of EndA (B), where B designates the A-module B deprived of its multiplicative structure, by means of the homomorphism x 7→ µB,x , where µB,x = µx is the multiplication by x in B. Then, since µ ex = G(µx ) for some polynomial G of A[T ] (Lemma 1.4 item 6 ), we can define x e by the equality x e = G(x), or equivalently µ fx = µe . If more precision is necx essary, we will use the notation AdjB/A (x). This element x e is called the cotransposed element of x. We then have the important equality xx e = x AdjB/A (x) = NB/A (x). (13) Remark. Let us also note that the applications “norm of” and “cotransposed element of” enjoy some properties of “A-rationality,” which directly result 130 III. The method of undetermined coefficients from their definitions:  if P ∈ B[X1 , . . . , Xk ], then  by taking the xi ’s in A, NB/A P (x1 , . . . , xk ) and AdjB/A P (x1 , . . . , xk ) are given by polynomials of A[X1 , . . . , Xk ]. In fact B[X] is free over A[X] with the same basis as that of B over A  and NB/A P (x) is given by the evaluation at x of NB[X]/A[X] P (X) (likewise for the cotransposed element). We will use by abuse of notation NB/A P (X) . Furthermore, d, then  if [ B : A ] = n and if P is homogeneous of degree  NB/A P (X) is homogeneous of degree nd and AdjB/A P (X) is homogeneous of degree (n − 1) d. Ring of integers of a number field If K is a number field its ring of integers is the integral closure of Z in K. 8.17. Proposition and definition. (Discriminant of a number field) Let K be a number field and Z its ring of integers. 1. An element y of K is in Z if and only if MinQ,y (X) ∈ Z[X]. 2. We have K = (N∗ )−1 Z. 3. Assume that K = Q[x] with x ∈ Z. Let f (X) = MinQ,x (X) be in Z[X] and ∆2 be the greatest square factor of discX f . 1 Then, Z[x] ⊆ Z ⊆ ∆ Z[x]. 4. The ring Z is a free Z-module of rank [ K : Q ]. 5. The integer DiscZ/Z is well-defined. We call it the discriminant of the number field K. J 1. Results from Lemma 8.10 (Kronecker’s theorem). 2. Let y ∈ K and g(X) ∈ Z[X] be a nonzero polynomial that annihilates y. If a is the leading coefficient of g, ay is integral over Z. 3. Let A = Z[x] and n = [ K : Q ]. Let z ∈ Z, which we as h(x)/δ with δ ∈ N∗ , hδi + c(h) = h1i and deg h < n. We have A + Zz ⊆ 1δ A and it thus suffices to prove that δ 2 divides discX (f ). The ring A is a free Z-module of rank n, with the basis B0 = (1, x, . . . , xn−1 ). Proposition 5.10 gives DiscA/Z = discA/Z (B0 ) = discK/Q (B0 ) = discX f. The Z-module M = A + Zz is also free, of rank n with a basis B1 , and we obtain the equalities discX f = discK/Q (B0 ) = discK/Q (B1 ) × d2 , where d is the determinant of the matrix of B0 over B1 (Proposition II -5.33 2 ). Finally, d = ±δ by the following Lemma 8.18, as required. 4. Without loss of generality we use the setup of item 3. There is only a 1 finite number of finitely generated Z-modules between Z[x] and ∆ Z[x], and §8. Algebraic number theory, first steps 131 for each of them we can test whether it is contained in Z. The largest is necessarily equal to Z.  Remarks. 1) As a corollary, we see that in the context of item 3, if discX (f ) has no square factors, then Z = Z[x]. 2) The proof of item 4 does not provide the practical means to compute a Z-basis of Z. For some more precise information see Problem 9. Actually we do not know of a general polynomial time algorithm to compute a Z-basis of Z. One says that an ideal a of a ring A is principal when it is generated by a single element. 8.18. Lemma. Let N ⊆ M be two free A-modules of the same rank n with M = N + Az. Assume that for some regular element δ ∈ A, we have δz ∈ N and δz = a1 e1 + · · · + an en , where (e1 , . . . , en ) is a basis of N . Then, the determinant d of a matrix of a basis of N over a basis M satisfies d hδ, a1 , . . . , an i = hδi (14) In particular, hδ, a1 , . . . , an i is a principal ideal, and if δ, a1 , . . . , an are comaximal, then hdi = hδi. Moreover, M/N ' A/hdi. J Equality (14) is left to the reader (see Exercise 20). It remains to prove that M/N ' A/hdi. By letting z be the class of z in M/N , since M/N ' Az, we must prove that AnnA (z) = hdi, i.e. that bz ∈ N ⇔ b ∈ hdi. It is clear that dz ∈ N . If bz ∈ N , then bδz ∈ δN , therefore by writing δz = a1 e1 + · · · + an en , we get bai ∈ hδi, then b hδ, a1 , . . . , an i ⊆ hδi. By multiplying by d and by simplifying by δ, we obtain b ∈ hdi.  The multiplicative theory of the ideals of a number field 8.19. Definition. An ideal a of a ring A is said to be invertible if there exist an ideal b and a regular element a such that a b = hai. 8.20. Fact. Let a be an invertible ideal of a ring A. 1. The ideal a is finitely generated. 2. If a is generated by k elements and if a b = hai with a regular, then b is generated by k elements. Furthermore b = (hai : a). 3. We have the rule a c ⊆ a d ⇒ c ⊆ d for all ideals c and d. 4. If c ⊆ a there exists a unique d such that d a = c, namely d = (c : a), and if c is finitely generated, so is d. 132 III. The method of undetermined coefficients J 3. If a c ⊆ a d by multiplying by b we obtain a c ⊆ a d, and since a is regular, this implies c ⊆ d. 1. If a b = hai, we find two finitely generated ideals a1 ⊆ a and b1 ⊆ b such that a ∈ a1 b1 and thus a b = hai ⊆ a1 b1 ⊆ a b1 ⊆ a b. From the above, we deduce the equalities a1 b1 = a b1 = a b. Whence b = b1 by item 3. Similarly, a = a1 . P 2. If a = ha1 , . . . , ak i, we find b1 , . . . , bk ∈ b such that i ai bi = a. By reasoning as in item 1 with a1 = a and b1 = hb1 , . . . , bk i we obtain the equality b = hb1 , . . . , bk i. Since a b = hai, we have b ⊆ (hai : a). Conversely, if xa ⊆ hai, then x hai = x a b ⊆ a b, thus ax = ab for some b ∈ b and x ∈ b because a is regular. 4. From a b = hai we deduce c b ⊆ hai. All the elements of c b being multiples of a, by dividing them by a we get an ideal d, that we denote by a1 c b, and with which we obtain the equality a d = a1 c b a = a1 c hai = c because a is regular. If c is finitely generated, d is generated by the elements obtained by dividing each generator of c b by a. The uniqueness of d results from item 3. All is left to prove is that d = (c : a). The inclusion d ⊆ (c : a) is immediate. Conversely, if xa ⊆ c, then x hai ⊆ c b, therefore x ∈ a1 c b = d.  The following theorem is the key theorem in the multiplicative theory of the ideals of number fields. We provide two proofs. Beforehand we invite the readers to acquaint themselves with Problem 3 which gives Kummer’s little theorem, which solves with minimal costs the question for “almost all” the finitely generated ideals of the number fields. Problem 5 is also instructive as it gives a direct proof of the invertibility of all the nonzero finitely generated ideals as well as of their √ unique decomposition into a product of “prime factors” for the ring Z[ n 1 ]. 8.21. Theorem. (Invertibility of the ideals of a number field) Every nonzero finitely generated ideal of the ring of integers Z of a number field K is invertible. J First proof (à la Kronecker.6 ) Take for example a = hα, β, γi. Let A = Q[X] and B = K[X]. The algebra B is free over A with the same basis as that of K over Q. Consider the polynomial g = α + βX + γX 2 which satisfies cZ (g) = a. Since α, β, γ are integral over Z, g is integral over Z[X]. Let h(X) = AdjB/A (g) be the cotransposed element of g. We know that h is expressed as a polynomial in g and in the coefficients of the characteristic polynomial of g. By applying 6 Actually Kronecker does not use the cotransposed element of α +βX +γX 2 (as stated in the definition we have given), but the product of all the conjugates of αX + βY + γZ in a Galois extension. This introduces a slight variation in the proof. §8. Algebraic number theory, first steps 133 Corollary 8.6 we deduce that h has coefficients in Z. Let b be the finitely generated ideal of Z generated by the coefficients of h. We have gh = NB/A (g) ∈ Z[X] ∩ Q[X] = Z[X]. Let d be the gcd of the coefficients of gh. Proposition 8.13 tells us that an arbitrary element of Z divides d if and only if it divides all the elements of a b. In particular, dZ ⊇ a b. Given the Bézout relation that expresses d according to the coefficients of gh we also have d ∈ a b. Therefore dZ = a b. Second proof (à la Dedekind.) First of all we notice that it suffices to know how to invert the ideals with two generators by virtue of the following remark. For three arbitrary ideals a, b, c in a ring we always have the equality (a + b)(b + c)(c + a) = (a + b + c)(ab + bc + ac), therefore, if we know how to invert the ideals with k generators (k > 2), we also know how to invert the ideals with k + 1 generators. We thus consider an ideal hα, βi with α 6= 0. As α is integral over Z, we can find α ∈ Z such that αα ∈ Z \ {0}. Thus, even if it means replacing (α, β) with (αα, αβ), we restrict ourselves to the study of an ideal ha, βi with (a, β) ∈ Z × Z. Let f ∈ Z[X] be a monic polynomial which is annihilated in β. We write f (X) = (X − β)h(X), where h ∈ Z[X] . We thus have f (aX) = (aX − β)h(aX), which we rewrite as f1 = g1 h1 . Let then d be the gcd of the coefficients of f1 in Z. With b = cZ (h1 ) and a = cZ (g1 ) = ha, βi, we clearly have d ∈ ab. Moreover, Proposition 8.13 tells us that an arbitrary element of Z divides all the elements of cZ (f1 ) = hdi if and only if it divides all the elements of the ideal a b. In particular, d divides all the elements of a b. Thus ab = hdi.  The following theorem shows that the finitely generated ideals of a number field with regard to the elementary operations (sum, intersection, product, exact division) behave essentially equivalently to the principal ideals of Z. The latter translate the theory of divisibility for the natural numbers very precisely. Recall that in the bijection n 7→ nZ (n ∈ N, nZ a finitely generated ideal of Z): the product corresponds to the product, divisibility corresponds to inclusion; the gcd to the sum; the lcm to the intersection; and the exact division to the conductor. 8.22. Theorem. (The finitely generated ideals of a number field) Let K be a number field and Z its ring of integers. 1. If b and c are two arbitrary ideals, and if a is some nonzero finitely generated ideal of Z, we have the implication ab ⊆ ac ⇒ b ⊆ c. 134 III. The method of undetermined coefficients 2. If b ⊆ c are two finitely generated ideals, there exists some finitely generated ideal a such that a c = b. 3. The set of finitely generated ideals of Z is stable by finite intersections and we have the following equalities (where a, b, c designates finitely generated ideals of Z): a. (a ∩ b)(a + b) = ab , b. a ∩ (b + c) = (a ∩ b) + (a ∩ c) , c. a + (b ∩ c) = (a + b) ∩ (a + c) , d. a(b ∩ c) = (ab) ∩ (ac) , e. (a + b)n = an + bn (n ∈ N) . 4. If a is some nonzero finitely generated ideal of Z the ring Z/a is finite. In particular, we have tests to decide: • if some x ∈ Z is in a, • if some x ∈ Z is invertible modulo a, • if a is contained in another finitely generated ideal b, • if Z/a is a discrete field (we then say that a is a detachable maximal ideal). 5. Every distinct finitely generated ideal of h0i and h1i is equal to a product of detachable invertible maximal ideals, and this decomposition is unique up to order of the factors. J 1 and 2. By Fact 8.20. 3. If one of the finitely generated ideals is zero everything is clear. We assume they are nonzero in the remainder of the proof. 3a. Let c such that c(a + b) = ab. Since (a ∩ b)(a + b) ⊆ ab, we obtain the inclusion a ∩ b ⊆ c (simplification by a + b). Conversely, ca ⊆ ab, thus c ⊆ b (simplification by a). Similarly c ⊆ a. 3c. We multiply both sides by a + b + c = (a + b) + (a + c). The right-hand side gives (a + b)(a + c). The left-hand side gives a(a + b + c) + a(b ∩ c) + (b + c)(b ∩ c). Both cases result in a(a + b + c) + bc. 3b. For the inclusion, the finitely generated ideals form a lattice (the supremum is the sum and the infimum is the intersection). We come to see that one of the laws is distributive with respect to the other. Classically, in a lattice this implies the other distributivity (see page 618). 3d. The map x 7→ a x (of the set of finitely generated ideals to the set of finitely generated ideals which are multiples of a) is an isomorphism of the order structure by item 1. This implies that the map transforms b ∩ c into the infimum of ab and ac inside the set of finitely generated ideals that are multiples of a. It thus suffices to establish that ab ∩ ac is a multiple of a. This results from item 2. §8. Algebraic number theory, first steps 135 3e. For example with n = 3, (a + b)3 = a3 + a2 b + ab2 + b3 . By multiplying (a + b)3 and a3 + b3 by (a + b)2 we find in both cases a5 + a4 b + · · · + ab4 + b5 . 4. View Z as a free Z-module of rank n = [ K : Q ]. It is obvious that a finitely generated ideal a containing the integer m 6= 0 can be explicitly expressed as a finitely generated Z-submodule of Zn containing mZn . 5. Let a be a finitely generated ideal 6= h0i , h1i. The finitely generated maximal ideals of Z containing a are obtained by determining the finitely generated maximal ideals of Z/a (which is possible because the ring Z/a is finite). If p is a finitely generated maximal ideal containing a, we can write a = b p. Furthermore, we have the equality | Z : a | = | Z : b | | b : a |. We then obtain the decomposition into products of finitely generated maximal ideals by induction on | Z : a |. The uniqueness results from the fact that if a finitely generated maximal ideal p contains a product of finitely generated maximal ideals, it is necessarily equal to one of them, otherwise it would be comaximal with the product.  We end this section with a few generalities concerning the ideals that avoid the conductor. The situation in number theory is the following. We have a number field K = Q[α] with α integral over Z. We denote by Z the ring of integers of K, i.e. the integral closure of Z in K. Even though it is possible in principle, it is not easy to obtain a basis of Z as a Z-module, nor is it easy to study the structure of the monoid of the finitely generated ideals of Z. Assume that we have a ring Z0 which constitutes an approximation of Z in the sense that Z[α] ⊆ Z0 ⊆ Z. For example let Z0 = Z[α] initially. We are interested in the multiplicative structure of the group of fractional ideals of Z,7 and we want to rely on that of Z0 to study it in detail. The following theorem states that “this works very well for most ideals, i.e. for every one that avoids the conductor of Z into Z0 .” 8.23. Definition. Let A, B be two rings such that A ⊆ B, and let a and b be respective ideals of A and B. 1. The conductor of B into A is (A : B) = { x ∈ B | xB ⊆ A }. 2. The extension of a is the ideal aB of B. 3. The contraction of b is the ideal A ∩ b of A. 7A fractional ideal of Z is a Z-submodule of K equal to finitely generated ideal a of Z, cf. page 571. 1 m a for some m ∈ Z? and a 136 III. The method of undetermined coefficients 8.24. Theorem. (Dedekind’s theorem, ideals that avoid the conductor) Let A, B be two rings such that A ⊆ B and f be the conductor of B into A. 1. The ideal f is the annihilator of the A-module B/A . It is simultaneously an ideal of A and an ideal of B, and it is the greatest ideal with this property. We denote by A (resp. B) the class of ideals of A (resp. of B) comaximal to f. 2. For a ∈ A, we have A/a ' B/aB and for b ∈ B, we have B/b ' A/A ∩ b . 3. A is stable under multiplication, sum, intersection and satisfies a ∈ A, a0 ⊇ a =⇒ a0 ∈ A. In particular, a1 a2 ∈ A if and only if a1 and a2 ∈ A. The same properties are valid for B. 4. The extension and the contraction, restricted respectively to A and B, are inverses of each other. They preserve multiplication, inclusion, intersection and the finitely generated character. 5. Assume that B is integral. Then, an ideal a ∈ A is invertible in A if and only if aB is invertible in B. Similarly, an ideal b ∈ B is invertible in B if and only if A ∩ b is invertible in A. J We only prove a few properties. Notice that we always have the inclusions a ⊆ A ∩ aB and (A ∩ b)B ⊆ b. Let a ∈ A, so 1 = a + f with a ∈ a and f ∈ f; a fortiori, 1 ∈ aB + f. Let us prove that A ∩ aB = a. We take x ∈ A ∩ aB and we write x = xf + xa ∈ aBf + a ⊆ aA + a = a . Hence the result. We also see that B = A + aB, so the composed morphism A → B/aB is surjective with kernel a, which gives an isomorphism A/a ' B/aB . Let b ∈ B, so 1 = b + f with b ∈ b, f ∈ f. Since f ⊆ A, we have b ∈ A ∩ b therefore 1 ∈ A ∩ b + f. Let us prove that (A ∩ b)B = b. If x ∈ b, then x = (b + f )x = bx + xf ∈ (A ∩ b)B + bf ⊆ (A ∩ b)B + A ∩ b ⊆ (A ∩ b)B. Thus b ⊆ (A ∩ b)B then b = (A ∩ b)B. In addition, since B = b + f ⊆ b + A, the composed morphism A → B/b is surjective, with kernel A ∩ b, which gives an isomorphism A/A ∩ b ' B/b . The extension is multiplicative, so the contraction (restricted to B) which is its inverse, is also multiplicative. The contraction is compatible with the intersection, so the extension (restricted to A) which is its inverse, is also compatible with the intersection. Let b = hb1 , . . . , bn iB ∈ B. Let us prove that A ∩ b is finitely generated. We write 1 = a + f 2 with a ∈ b, f ∈ f. Since f ∈ A, we have a ∈ A ∩ b. We prove that (a, f b1 , . . . , f bn ) is a generator set of A ∩ b. §9. Hilbert’s Nullstellensatz 137 P Let x ∈ A ∩ b which we write as x = i yi bi with yi ∈ B, then P P x = i (yi a + yi f 2 )bi = xa + i (yi f )f bi ∈ ha, f b1 , . . . , f bn iA . For an ideal b ∈ B (not necessarily finitely generated), we have in fact proved the following result: if 1 = a + f 2 with a ∈ b and f ∈ f, then A ∩ b = Aa + f (f b) (and f b is an ideal of A). Let b ∈ B be an invertible ideal, let us prove that a = A ∩ b is an invertible ideal. We write 1 = a + f with a ∈ b and f ∈ f, such that a ∈ a. If a = 0, then 1 = f ∈ f, so A = B and there is nothing left to prove. Otherwise, a is regular and there exists an ideal b0 of B such that bb0 = aB. Since the ideals aB, b and b0 are comaximal to f, we can apply the multiplicative character of the contraction to the equality bb0 = aB to obtain the equality aa0 = aA with a0 = A ∩ b0 .  9. Hilbert’s Nullstellensatz In this section we illustrate the importance of the resultant by showing how Hilbert’s Nullstellensatz can be deducted from it. We will use a generalization of the basic elimination lemma 7.5. The algebraic closure of Q and of finite fields Let K ⊆ L be discrete fields. We say that L is an algebraic closure of K if L is algebraic over K and algebraically closed. The reader will concede that Q and the fields Fp possess an algebraic closure. This will be discussed in further detail in Section VI -1, especially with Theorem VI -1.18. The classical Nullstellensatz (algebraically closed case) The Nullstellensatz is a theorem which concerns the systems of polynomial equations over a discrete field. Very informally, its meaning can be described as follows: a geometric statement necessarily possesses an algebraic certificate. Or even: a proof in commutative algebra can (almost) always be summarized by simple algebraic identities if it is sufficiently general. If we have discrete fields K ⊆ L, and if (f ) = (f1 , . . . , fs ) is a system of polynomials in K[X1 , . . . , Xn ] = K[X], we say that (ξ1 , . . . , ξn ) = (ξ) is a zero of (f ) in Ln , or a zero of (f ) with coordinates in L, if the equations fi (ξ) = 0 are satisfied. Let f = hf1 , . . . , fs iK[X] . Then, all the polynomials g ∈ f are annihilated in such a (ξ). We therefore equally refer to (ξ) as a zero of the ideal f in Ln or as having coordinates in L. We begin with an almost obvious fact. 138 III. The method of undetermined coefficients 9.1. Fact. Let k be a commutative ring and h ∈ k[X] a monic polynomial of degree > 1. • If some multiple of h is in k, this multiple is null. • Let f and g ∈ k[X] of respective formal degrees p and q. If h divides f and g, then ResX (f, p, g, q) = 0. We now present a generalization of the basic elimination lemma 7.5. 9.2. Lemma. (Elimination of a variable between several polynomials) Let f , g1 , . . ., gr ∈ k[X] (r > 1), with f monic of degree d. Let f = hf, g1 , . . . , gr i and a = f ∩ k (this is the elimination ideal of the variable X in f). Also let g(T, X) = g1 + T g2 + · · · + T r−1 gr ∈ k[T, X],  R(T ) = R(f, g1 , . . . , gr )(T ) = ResX f, g(T, X) ∈ k[T ],  def b = R(f, g1 , . . . , gr ) = ck,T R(f, g1 , . . . , gr )(T ) ⊆ k. 1. The ideal b is generated by d(r − 1) + 1 elements and we have the √ √ inclusions (15) b ⊆ a ⊆ b = a. More precisely, let ei = 1 + (d − i)(r − 1), i ∈ J1..dK, then for arbitrary elements a1 , . . ., ad ∈ a, we have ae11 ae22 · · · aedd ∈ R(f, g1 , . . . , gr ) . In particular, we have the following equivalences 1 ∈ b ⇐⇒ 1 ∈ a ⇐⇒ 1 ∈ f . (16) 2. If k is a discrete field contained in a discrete algebraically closed field L, let h be the monic gcd of f , g1 , . . ., gr and V be the set of zeros of f in Ln . Then, we have the following equivalences 1 ∈ b ⇐⇒ 1 ∈ a ⇐⇒ 1 ∈ f ⇐⇒ h = 1 ⇐⇒ V = ∅ (17) J 1. We know that R(T ) is of the form u(T, X)f (X) + v(T, X)g(T, X), so each coefficient of R(T ) is a linear combination of f and the gi ’s in k[X]. This gives the inclusion b ⊆ a. The inequality degT (R) 6 d(r − 1) gives the majoration d(r − 1) + 1 for the number of generators of b. If f1 , . . ., fd are d polynomials (with one indeterminate) of degree < r, we deduce from the Dedekind-Mertens lemma (see Corollary 2.2) the following inclusion. c(f1 )e1 c(f2 )e2 · · · c(fd )ed ⊆ c(f1 f2 · · · fd ). (?) Assume f (X) = (X − x1 ) · · · (X − xd ). Then let for i ∈ J1..dK fi (T ) = g1 (xi ) + g2 (xi )T + · · · + gr (xi )T r−1 , such that f1 f2 · · · fd = ResX (f, g1 + g2 T + · · · + gr T r−1 ). Thus, for aj ∈ a = hf, g1 , . . . , gr ik[X] ∩ k, by evaluating at xi , we obtain aj ∈ hg1 (xi ), . . . , gr (xi )i = c(fi ). By applying the inclusion (?) we §9. Hilbert’s Nullstellensatz 139 obtain the membership ae11 ae22 · · · aedd ∈ b. Let us move on to the general case. Consider the universal splitting algebra k0 = Aduk,f . The previous computation is valid for k0 . Since k0 = k⊕E as a k-module, we have the equality (bk0 ) ∩ k = b. For some aj ∈ a, this allows us to conclude that ae11 ae22 · · · aedd ∈ b, because the product is in (bk0 ) ∩ k. 2. By definition of the gcd, we have f = hhi. Moreover, h = 1 ⇔ V = ∅. So the rest clearly follows by item 1. Here is however a more direct proof for this particular case, which gives the point of origin of the magical proof of 1. Assume that h is equal to 1; then in this case 1 ∈ f and 1 ∈ a. Assume next that h is of degree > 1; then a = h0i. We therefore have obtained the equivalences 1 ∈ a ⇐⇒ 1 ∈ f ⇐⇒ deg(h) = 0 and a = h0i ⇐⇒ deg(h) > 1. Let us now prove the equivalence deg(h) > 1 ⇐⇒ b = h0i. If deg(h) > 1, then h(X) divides g(T, X), so R(f, g1 , . . . , gr )(T ) = 0 (Fact 9.1), i.e. b = h0i. Conversely, assume b = h0i. Then, for all values of the parameter t ∈ L, the polynomials f (X) and g(t, X) have a common zero in L (f is monic and the resultant of both polynomials is null). Consider the zeros ξ1 , . . ., ξd ∈ L of f . By taking d(r − 1) + 1 distinct values of t, we find some ξ` such that g(t, ξ` ) = 0 for at least r values of t. This implies that g(T, ξ` ) is zero everywhere, i.e. that ξ` annihilates all the gi ’s, and that h is a multiple of X − ξ` , therefore deg(h) > 1.  Item 2 of Lemma 9.2 gives the following corollary. 9.3. Corollary. Let K be a nontrivial discrete field contained in an algebraically closed field L. Given the hypotheses of Lemma 9.2, with the ring k = K[X1 , . . . , Xn−1 ], then, for α = (α1 , . . . , αn−1 ) ∈ Ln−1 the following properties are equivalent. 1. There exists a ξ ∈ L such that (α, ξ) annihilates (f, g1 , . . . , gr ). 2. α is a zero of the ideal b = R(f, g1 , . . . , gr ) ⊆ k. Note: if the total degree of the generators of f is bounded above by d, we obtain as generators of b, d(r − 1) + 1 polynomials of total degree bounded by 2d2 . Remark. The above corollary has the desired structure to step through an induction which allows for a description of the zeros of f in Ln . Indeed, by starting from the finitely generated ideal f ⊆ K[X1 , . . . , Xn ] we produce a finitely generated ideal b ⊆ k with the following property: the zeros of f in Ln are exactly projected onto the zeros of b in Ln−1 . More precisely, above each zero of b in Ln−1 there is a finite, nonzero number of zeros of f in Ln , bounded by degXn (f ). 140 III. The method of undetermined coefficients So either all the generators of b are zero and the process describing the zeros of f is complete, or one of the generators of b is nonzero and we are ready to do to b ⊆ K[X1 , . . . , Xn−1 ] what we did to f ⊆ K[X1 , . . . , Xn ] on the condition however that we find a monic polynomial in Xn−1 in the ideal b. This final question is resolved by the following change of variables lemma. 9.4. Lemma. (Change of variables lemma) Let K be an infinite discrete field and g 6= 0 in K[X] = K[X1 , . . . , Xn ] of degree d. There exists (a1 , . . . , an−1 ) ∈ Kn−1 such that the polynomial g(X1 + a1 Xn , . . . , Xn−1 + an−1 Xn , Xn ) is of the form aXnd + h with a ∈ K× and degXn h < d. J Let gd be the homogeneous components of degree d of g. Then g(X1 + a1 Xn , . . . , Xn−1 + an−1 Xn , Xn ) = gd (a1 , . . . , an−1 , 1)Xnd + h, with degXn h < d. Since gd (X1 , . . . , Xn ) is nonzero and homogeneous, the polynomial gd (X1 , . . . , Xn−1 , 1) is nonzero. There thus exists (a1 , . . . , an−1 ) ∈ Kn−1 such that gd (a1 , . . . , an−1 , 1) 6= 0. We now obtain a “weak Nullstellensatz” (i.e. the equivalence between V = ∅ and hf1 , . . . , fs i = h1i in the theorem) and a “Noether position” which gives a description of V in the nonempty case. 9.5. Theorem. (Weak Nullstellensatz and Noether position) Let K be an infinite discrete field contained in an algebraically closed field L and (f1 , . . . , fs ) a polynomial system in K[X1 , . . . , Xn ]. Let f = hf1 , . . . , fs iK[X] and V be the variety of the zeros of (f1 , . . . , fs ) in Ln . 1. Either hf1 , . . . , fs i = h1i , and V = ∅. 2. Or V 6= ∅. Then there exist an integer r ∈ J0..nK, a K-linear change of variables (the new variables are denoted by Y1 , . . . , Yn ), and finitely generated ideals fj ⊆ K[Y1 , . . . , Yj ] (j ∈ Jr..nK), which satisfy the following properties. • We have f ∩ K[Y1 , . . . , Yr ] = 0. In other words, the ring K[Y1 , . . . , Yr ] is identified with a subring of the quotient ring K[X]/f . • Each Yj (j ∈ Jr + 1..nK) is integral over K[Y1 , . . . , Yr ] modulo f. In other words the ring K[X]/f is integral over the subring K[Y1 , . . . , Yr ]. • We have the inclusions h0i = fr ⊆ fr+1 ⊆ . . . ⊆ fn−1 ⊆ p f and for √ each j ∈ Jr..nK we have the equality f ∩ K[Y1 , . . . , Yj ] = fj . • For the new coordinates corresponding to the Yi ’s, let πj be the projection Ln → Lj which forgets the last coordinates (j ∈ J1..nK). For each j ∈ Jr..n − 1K the projection of the variety V ⊆ Ln over Lj is exactly the variety Vj of the zeros of fj . In addition, for each element α of Vj , the fiber πj−1 (α) is finite, nonempty, with a uniformly bounded number of elements. §9. Hilbert’s Nullstellensatz 141 In particular • Either V is empty (and we can concede that r = −1). • Or V is finite and nonempty, r = 0 and the coordinates of the points of V are algebraic over K. • Or r > 1 and the projection πr surjectively sends V onto Lr (so V is infinite). In this case, if α ∈ Kr , the coordinates of the points of πr−1 (α) are algebraic over K. J We reason as stated in the remark preceding the change of variables lemma. Note that the first step of the process only takes place if the initial polynomial system is nonzero, in which case the first operation consists in a linear change of variables which makes one of the fi ’s monic in Yn .  Remarks. 1) The number r above corresponds to the maximum number of indeterminates for a polynomial ring K[Z1 , . . . , Zr ] which is isomorphic to a K-subalgebra of K[X]/hf1 , . . . , fs i. This is related to Krull dimension theory which will be presented in Chapter XIII (see especially Theorem XIII -5.4). 2) Assume that the degrees of the fj ’s are bounded above by d. By basing ourselves on the result stated at the end of Corollary 9.3, we can give some bounds in the previous theorem by computing a priori, solely according to the integers n, s, j and d, • on the one hand an upper bound for the number of generators for each ideal fj , • on the other hand an upper bound for the degrees of these generators. 3) The computation of the ideals fj as well as all the statements of the theorem which do not concern the variety V are valid even when we do not know of some algebraically closed field L containing K. To do this, we only use Lemmas 9.2 and 9.4. We will look at this in more detail in Theorems VII -1.1 and VII -1.5. The restriction introduced by the hypothesis “K is infinite” will vanish in the classical Nullstellensatz because of the following fact. 9.6. Fact. Let K ⊆ L be discrete fields and h, f1 , . . . , fs ∈ K[X1 , . . . , Xn ], then h ∈ hf1 , . . . , fs iK[X1 ,...,Xn ] ⇐⇒ h ∈ hf1 , . . . , fs iL[X1 ,...,Xn ] . P J Indeed, an equality h = i ai fi , once the degrees of the ai ’s are fixed, can be seen as a system of linear equations whose unknowns are the coefficients of the ai ’s. The fact that a system of linear equations admits a solution does not depend on the field in which we look for the solution, so long as it contains the coefficients of the system of linear equations; the pivot method is a completely rational process.  As a corollary of the weak Nullstellensatz and from the previous fact we obtain the classical Nullstellensatz. 142 III. The method of undetermined coefficients 9.7. Theorem. (Classical Nullstellensatz) Let K be a discrete field contained in an algebraically closed field L and g, f1 , . . . , fs be some polynomials in K[X1 , . . . , Xn ]. Let V be the variety of the zeros of (f1 , . . . , fs ) in Ln . Then either 1. there exists a point ξ of V such that g(ξ) 6= 0, or 2. there exists an integer N such that g N ∈ hf1 , . . . , fs iK[X] . J The g = 0 case is clear, so we suppose g = 6 0. We apply the Rabi- novitch trick, i.e. we introduce an additional indeterminate T and we notice that g is annihilated at the zeros of (f1 , . . . , fs ) if and only if the system (1 − gT, f1 , . . . , fs ) admits no solution. Then we apply the weak Nullstellensatz to this new polynomial system, with L (which is infinite) instead of K. We obtain in K[X][T ] (thanks to Fact 9.6) an equality  1 − g(X)T a(X, T ) + f1 (X)b1 (X, T ) + · · · + fs (X)bs (X, T ) = 1. In the localized ring K[X][1/g], we perform the substitution T = 1/g. More precisely, by remaining in K[X, T ], if N is the greatest of the degrees in T of the bi ’s, we multiply the previous equality by g N and we replace in g N bi (X, T ) each g N T k by g N −k modulo (1 − gT ). We then obtain an equality  1 − g(X)T a1 (X, T ) + f1 (X)c1 (X) + · · · + fs (X)cs (X) = g N , in which a1 = 0 necessarily, since if we look at a1 in K[X][T ], its formally leading coefficient in T is zero.  Remark. Note that the separation of the different cases in Theorems 9.5 and 9.7 is explicit. 9.8. Corollary. Let K be a discrete field contained in an algebraically closed field L and a = hf1 , . . . , fs i, b be two finitely generated ideals of K[X1 , . . . , Xn ]. Let K0 be the subfield of K generated by the coefficients of the fi ’s. The following properties are equivalent. 1. b ⊆ DK[X] (a). 2. b ⊆ DL[X] (a). 3. Every zero of a in Ln is a zero of b. 4. For every subfield K1 of L finite over K0 , every zero of a in Kn1 is a zero of b. In particular, DK[X] (a) = DK[X] (b) if and only if a and b have the same zeros in Ln . J Immediate consequence of the Nullstellensatz.  §9. Hilbert’s Nullstellensatz 143 The formal Nullstellensatz We now move onto a formal Nullstellensatz, formal in the sense that it applies (in classical mathematics) to an arbitrary ideal over an arbitrary ring. Nevertheless to have a constructive statement we will be content with a polynomial ring Z[X] for our arbitrary ring and a finitely generated ideal for our arbitrary ideal. Although this may seem very restrictive, practice shows that this is not the case because we can (almost) always apply the method of undetermined coefficients to a commutative algebra problem; a method which reduces the problem to a polynomial problem over Z. An illustration of this will be given next. Note that to read the statement, when we speak of a zero of some fi ∈ Z[X] over a ring A, one must first consider fi modulo Ker ϕ, where ϕ is the unique homomorphism Z → A, with A1 ' Z/Ker ϕ as its image. This thus reduces to a polynomial fi of A1 [X] ⊆ A[X]. 9.9. Theorem. (Nullstellensatz over Z, formal Nullstellensatz) Let Z[X] = Z[X1 , . . . , Xn ]. Consider g, f1 , . . . , fs in Z[X] 1. For the system (f1 , . . . , fs ) the following properties are equivalent. a. 1 ∈ hf1 , . . . , fs i. b. The system does not admit a zero on any nontrivial discrete field. c. The system does not admit a zero on any finite field or on any finite extension of Q. d. The system does not admit a zero on any finite field. 2. The following properties are equivalent. a. ∃N ∈ N, g N ∈ hf1 , . . . , fs i. b. The polynomial g is annihilated at the zeros of the system (f1 , . . . , fs ) on any discrete field. c. The polynomial g is annihilated at the zeros of the system (f1 , . . . , fs ) on every finite field and on every finite extension of Q. d. The polynomial g is annihilated at the zeros of the system (f1 , . . . , fs ) on every finite field. J It suffices to prove the weak version 1, as we can then get the general version 2 by applying the Rabinovitch trick. Regarding the weak version, the difficult task is the implication d ⇒ a. 144 III. The method of undetermined coefficients Let us first deal with c ⇒ a. Apply the weak Nullstellensatz by considering Z ⊆ Q. This gives the membership m ∈ hf1 , . . . , fs iZ[X] with m ∈ Z \ {0} (?Q ). By applying the weak Nullstellensatz with an algebraic closure Lp of Fp we also obtain for each prime number p | m a membership 1 ∈ hf1 , . . . , fs iZ[X] + pZ[X] (?Fp ). However, in any ring, for three arbitrary ideals a, b, c, we have the inclusion (a + b)(a + c) ⊆ a + bc. By expressing the above m in (?Q ) in the form Q kj j pj with prime pj ’s, we therefore obtain 1 ∈ hf1 , . . . , fs iZ[X] + mZ[X]. This membership, joint with (?Q ), provides 1 ∈ hf1 , . . . , fs iZ[X] . d ⇒ c. We show that a zero (ξ) of the system (f1 , . . . , fs ) in a finite extension of Q leads to a zero of (f1 , . . . , fs ) in a finite extension of Fp for all the prime numbers, except for a finite number of them. Indeed, let Q = Q[α] ' Q[X]/hh(X)i (with h irreducible and monic in Z[X]) be a finite extension of Q and (ξ) ∈ Qn be a zero of (f1 , . . . , fs ). If ξj = qj (α) with qj ∈ Q[X] for j ∈ J1..nK, this means that fi (q1 , . . . , qn ) ≡ 0 mod h in Q[X], i ∈ J1..sK. This remains true in Fp [X] as soon as none of the denominators appearing in the qj ’s is a multiple of p, provided one takes the fractions from Fp fi (q1 , . . . , qn ) ≡ 0 mod h in Fp [X], i ∈ J1..sK. For such a p, we take an irreducible monic divisor hp (X) of h(X) in Fp [X] and consider the finite field F = Fp [X]/hhp (X)i with αp the class of X.  Then, q1 (αp ), . . . , qn (αp ) is a zero of (f1 , . . . , fs ) in Fn .  We have the following immediate corollary, with finitely generated ideals. 9.10. Corollary. (Nullstellensatz over Z, formal Nullstellensatz, 2) Write Z[X] = Z[X1 , . . . , Xn ]. For two finitely generated ideals a, b of Z[X] the following properties are equivalent. 1. DZ[X] (a) ⊆ DZ[X] (b).   2. DK ϕ(a) ⊆ DK ϕ(b) for every discrete field K and every homomorphism ϕ : Z[X] → K. 3. Idem but restricted to algebraic extensions of Q and to finite fields. 4. Idem but restricted to finite fields. §10. Newton’s method in algebra 145 An application example Consider the following result, already proven in Lemma II -2.6: An element f of A[X] is invertible if and only if f (0) is invertible and f − f (0) × is nilpotent. In other words A[X] = A× + DA (0)[X]. We can assume that f g = 1 with f = 1 + Xf1 and g = 1 + Xg1 . Consider the coefficients of f1 and g1 as being indeterminates. We are brought to prove the following result. An equality f1 + g1 + Xf1 g1 = 0 (∗) implies that the coefficients of f1 are nilpotent. However, since the indeterminates are evaluated in a field, the coefficients of f1 are annihilated at the zeros of the polynomial system in the indeterminates given by the equality (∗). We conclude with the formal Nullstellensatz. When compared with the proof given for item 4 of Lemma II -2.6, we can assert that the one given here is both simpler (no need to find a more subtle computation) and cleverer (usage of the formal Nullstellensatz). Note. Another example is given in the solution to Problem XV -1. 10. Newton’s method in algebra Let k be a ring and f1 , . . ., fs ∈ k[X] = k[X1 , . . . , Xn ]. The Jacobian matrix of the system is the matrix  ∂f  s×n i JACX1 ,...,Xn (f1 , . . . , fs ) = ∈ k[X] . ∂Xj i∈J1..sK,j∈J1..nK It is also denoted by JACX (f ) or JAC(f ). It is visualized as follows f1  X1 X2 ∂f1 ∂X1 ∂f2 ∂X1 ∂f1 ∂X2 ∂f2 ∂X2 f2     .. fi   .  ..  . ∂fs fs ∂X 1 ··· ··· ··· Xn ∂f1 ∂Xn ∂f2 ∂Xn .. . .. . ∂fs ∂X2 ··· ∂fs ∂Xn      .    If s = n, we denote by JacX (f ) or JacX1 ,...,Xn (f1 , . . . , fn ) or Jac(f ) the Jacobian of the system (f ), i.e. the determinant of the Jacobian matrix. In analysis Newton’s method to approximate a root of a differentiable function f : R → R is the following. Starting from a point x0 “near a root,” at which the derivative is “far from 0”, we construct a series (xm )m∈N by 146 III. The method of undetermined coefficients induction by letting f (xm ) . f 0 (xm ) The method can be generalized for a system of p equations with p unknowns. A solution of such a system is a zero of a function f : Rp → Rp . We apply “the same formula” as above xm+1 = xm − f 0 (xm )−1 · f (xm ), xm+1 = xm − where f 0 (x) is the differential (the Jacobian matrix) of f at the point x ∈ Rp , which must be invertible in a neighborhood of x0 . This method, and other methods of the infinitesimal calculus, can also be applied in certain cases in algebra, by replacing the Leibnizian infinitesimals by the nilpotent elements. If for instance A is a Q-algebra and x ∈ A is nilpotent, the formal series 1 + x + x2 /2 + x3 /6 + . . . which defines exp(x) only has a finite number of nonzero terms in A and therefore defines an element 1 + y with y nilpotent. Since the equality exp(x + x0 ) = exp(x) exp(x0 ), holds in analysis, it is also valid with regard to formal series over Q. So when x and x0 are nilpotents in A we will obtain the same equality in A. Similarly the formal series y − y 2 /2 + y 3 /3 − . . . which defines log(1 + y), only has a finite number of terms in A when y is nilpotent and allows for a definition of log(1 + y) as a nilpotent element of A. Furthermore, for nilpotent x and y, we obtain the equalities   log exp(x) = x and exp log(1 + y) = 1 + y as consequences of the corresponding equalities for the formal series. In a similar style we easily obtain, by using the inverse formal series of 1 − x, the following result. 10.1. Lemma. (Residually invertible elements lemma) 1. If ef ≡ 1 modulo the nilradical, then e is invertible and P e−1 = f k>0 (1 − ef )k . 2. A square matrix E ∈ Mn (A) invertible modulo the nilradical is invertible. Assume that d det(E) ≡ 1 modulo the nilradical. e (where E e is the cotransposed matrix of E). Then, E −1 is in Let F = dE the subring of Mn (A) generated by the coefficients of the characteristic polynomial of E, d and E.  More precisely, the matrix In − EF = 1 − d det(E) In is nilpotent and k P E −1 = F k>0 1 − d det(E) . Let us move on to Newton’s method. §10. Newton’s method in algebra 147 10.2. Theorem. (Newton’s linear method) Let N be an ideal of A, f = t[ f1 · · · fn ] be a vector whose coordinates are polynomials in A[X1 , . . . , Xn ], and a = t(a1 , . . . , an ) in An be a approximated simple zero of the system in the following sense. – The Jacobian matrix J(a) of f at point a is invertible modulo N; let U ∈ Mn (A) be such an inverse. – The vector f (a) is null modulo N. Consider the sequence (a(m) )m>1 ∈ An defined by Newton’s linear iteration a(1) = a, a(m+1) = a(m) − U · f (a(m) ). a. This sequence satisfies the following N-adic requirements: a(1) ≡ a mod N, and ∀m, a(m+1) ≡ a(m) and f (a(m) ) ≡ 0 mod Nm . b. This sequence is unique in the following sense, if b(m) is another sequence satisfying the requirements of a., then for all m, a(m) ≡ b(m) mod Nm . c. Let A1 be the subring generated by the coefficients of the fi ’s, by those of U and by the coordinates of a. In this ring let N1 be the ideal generated by the coefficients of In − U J(a) and the coordinates of a. If the generators of N1 are nilpotent, the sequence converges in a finite number of steps towards a zero of the system f , and it is the unique zero of the system congruent to a modulo N1 . Under the same assumptions, we have the following quadratic method. 10.3. Theorem. (Newton’s quadratic method) Let us define the sequences (a(m) )m>0 in An and (U (m) )m>0 in Mn (A) by the following Newton quadratic iteration a(0) = a, a(m+1) = a(m) − U (m) · f (a(m) ), U (0) = U,  U (m+1) = U (m) 2In − J(a(m+1) )U (m) . Then, we obtain for all m the following congruences: a(m+1) ≡ a(m) f (a(m) ) ≡ 0 and and U (m+1) ≡ U (m) U (m) J(a(m) ) ≡ In m mod N2 m mod N2 . The proofs are left to the reader (cf. [95]) by observing that the iteration concerning the inverse of the Jacobian matrix can be justified by Newton’s linear method or by the following computation in a not necessarily commutative ring (1 − ab)2 = 1 − ab0 with b0 = b(2 − ab). 148 III. The method of undetermined coefficients 10.4. Corollary. (Residual idempotents lemma) 1. For every commutative ring A: p a. two equal idempotents modulo DA (0) = h0i are equal; b. every idempotent e modulo an ideal N is uniquely lifted to an idempotent e0 modulo N2 ; Newton’s quadratic iteration is given by e 7→ 3e2 − 2e3 . 2. Similarly every matrix E ∈ Mn (A) idempotent modulo N is lifted to a matrix F idempotent modulo N2 . The “lifting” F is unique provided that F ∈ A[E]. Newton’s quadratic iteration is given by E 7→ 3E 2 − 2E 3 . J 1a. Left to the reader. A stronger version is proven in Lemma IX -5.1. 1b. Consider the polynomial T 2 − T , and note that 2e − 1 is invertible modulo N since (2e − 1)2 = 1 modulo N. 2. Apply item 1 with the commutative ring A[E] ⊆ End(An ).  Exercises and problems Exercise 1. (Lagrange interpolation) Let A be a commutative ring. Prove the following statements. 1. Let f , g ∈ A[X] and a1 , . . ., ak be elements of A such that ai − aj ∈ Reg A for i 6= j. a. If the ai ’s are zeros of f , f is a multiple of (X − a1 ) · · · (X − ak ). b. If f (ai ) = g(ai ) for i ∈ J1..kK and if deg(f − g) < k, then f = g. 2. If A is integral and infinite, the element f of A[X] is characterized by the polynomial function that f defines over A. 3. (Lagrange interpolation polynomial) Let (x0 , . . . , xn ) be in A such that each xi − xj ∈ A× (for i 6= j). Then, for (y0 , . . . , yn ) in A there exists exactly one polynomial f of degree 6 n such that for each j ∈ J0..nK we have f (xj ) = yj . More precisely, the polynomial fi of degree 6 n such that fi (xi ) = 1 and fi (xj ) = 0 for j 6= i is equal to Q j∈J0..nK,j6=i (X − xj ) j∈J0..nK,j6=i (xi − xj ) fi = Q , and the interpolation polynomial f above is equal to P i∈J0..nK yi fi . 4. With the same assumptions, letting h = (X − x0 ) · · · (X − xn ), we obtain an  isomorphism of A-algebras: A[X]/hhi → An+1 , g 7→ g(x0 ), . . . , g(xn ) . 5. Interpret the previous results with linear algebra (Vandermonde matrix and determinant) and with the Chinese remainder theorem (use the pairwise comaximal ideals hX − xi i). Exercises and problems 149 Exercise 2. (Generators of the ideal of a finite set) See also Exercise XIV -4. Let K be a discrete field and V ⊂ Kn be a finite set. Following the steps below show that the ideal a(V ) = { f ∈ K[x] | ∀ w ∈ V, f (w) = 0 } is generated by n elements (note that this bound does not depend on #V and that the result is clear for n = 1). We denote by πn : Kn → K the nth projection and for each ξ ∈ πn (V ), Vξ =  (ξ1 , . . . , ξn−1 ) ∈ Kn−1 | (ξ1 , . . . , ξn−1 , ξ) ∈ V . 1. Let U ⊂ K be a finite subset and to each ξ ∈ U , associate a polynomial Qξ ∈ K[x1 , . . . , xn−1 ]. Find a polynomial Q ∈ K[x] satisfying Q(x1 , . . . , xn−1 , ξ) = Qξ for all ξ ∈ U . 2. Let V ⊂ Kn be a set such that πn (V ) is finite. Suppose that for each ξ ∈ πn (V ), the ideal a(Vξ ) is generated by m polynomials. Show that a(V ) is generated by m + 1 polynomials. Conclude the result. Exercise 3. (Detailed proof of Theorem 1.5) Consider the ring A[X1 , . . . , Xn ] = A[X] and let S1 , . . ., Sn be the elementary symmetric functions of X. All the considered polynomials are formal polynomials, because we do not assume that A is discrete. We introduce another system of indeterminates, (s) = (s1 , . . . , sn ), and on the ring A[s] we define the weight δ by δ(si ) = i (a formally nonzero polynomial has a well-defined formal weight). Denote by ϕ : A[s] → A[X] the evaluation homomorphism defined by ϕ(si ) = Si . Consider on the monomials of A[X] = A[X1 , . . . , Xn ] the deglex order for which two monomials are first compared according to their total degree, then according to the lexicographical order with X1 > · · · > Xn . This provides for some f ∈ A[X] (formally nonzero) a notion of a formally leading monomial that we denote by lm(f ). This “monomial order” is clearly isomorphic to (N, 6). 0. Check that every symmetric polynomial (i.e. invariant under the action of Sn ) of A[X] is equal to some formally symmetric polynomial, i.e. invariant under the action of Sn as a formal polynomial. 1. (Injectivity of ϕ) Let α = (α1 , . . . , αn ) be a decreasing exponent sequence (α1 > · · · > αn ). Let βi = αi − αi+1 (i ∈ J1..n − 1K). Show that β n−1 αn lm(S1β1 S2β2 · · · Sn−1 Sn ) = X1α1 X2α2 · · · Xnαn . Deduce that ϕ is injective. 2. (End of the proof of items 1 and 2 of Theorem 1.5) Let f ∈ A[X] be a formally symmetric, formally nonzero polynomial, and X α = lm(f ). • Show that α is decreasing. Deduce an algorithm to express every symmetric polynomial of A[X] as a polynomial in (S1 , . . . , Sn ) with coefficients in A, i.e. in the image of ϕ. The halting of the algorithm can be proven by induction on the monomial order, isomorphic to N. • As an example, write the symmetrized polynomial of the monomial X14 X22 X3 in A[X1 , . . . , X4 ] as a polynomial in the Si ’s. 150 III. The method of undetermined coefficients 3. (Proof of item 3 of the theorem) • Let g(T ) ∈ B[T ] be a monic polynomial of degree n > 1. Show that B[T ] is a free B[g]-module with basis (1, T, . . . , T n−1 ). Deduce that A[S1 , . . . , Sn−1 ][Xn ] is a free module over A[S1 , . . . , Sn−1 ][Sn ], with basis (1, Xn , . . . , Xnn−1 ). 0 ) the elementary symmetric functions of the • Denote by S 0 = (S10 , . . . , Sn−1 variables (X1 , . . . , Xn−1 ). Show that A[S 0 , Xn ] = A[S1 , . . . , Sn−1 , Xn ]. • Deduce from the two previous items that A[S 0 , Xn ] is a free A[S]-module with basis (1, Xn , . . . , Xnn−1 ). • Conclude by induction on n that the family { X α | α = (α1 , . . . , αn ) ∈ Nn , ∀k ∈ J1..nK, αk < k } forms a basis of A[X] over A[S]. 4. (Another proof of item 3 of the theorem, and even more, after reading Section 4) Prove that A[X] is canonically isomorphic to the universal splitting algebra of Pn the polynomial tn + k=1 (−1)k sk tn−k over the ring A[s1 , . . . , sn ]. Exercise 4. Let S1 , . . . , Sn ∈ A[X] = A[X1 , . . . , Xn ] be the n elementary symmetric functions. 1. For n P = 3, check that X13 + X23 + X33 = S13 − 3S1 S2 + 3S3 . Deduce that for n all n, Xi3 = S13 − 3S1 S2 + 3S3 . i=1 2. By P using2a method P analogous Pto the previous question, express the polynomials Xi Xj , i6=j Xi3 Xj , i<j Xi2 Xj2 in terms of the elementary symmetric i6=j functions. 3. State a general result. Exercise 5. (The Newton sums and the complete symmetric functions) Let Si ∈ A[X] = A[X1 , . . . , Xn ] be the elementary symmetric functions by agreeing to take Si = 0 for i > n and S0 = 1. For r > 1, define the Newton sums by Pr = X1r + · · · + Xnr . Work in the ring of formal series A[X][[t]] and introduce the series P (t) = P r>1 Pr tr 1. Check the equality P (t) = and E(t) = P r>0 S r tr . Pn Xi . i=1 1−Xi t 2. When u ∈ B[[t]] is invertible, considering the logarithmic derivative Dlog (u) = u0 u−1 , show that we get a morphism of groups Dlog : (B[[t]]× , ×) → (B[[t]], +). 3. By using the logarithmic derivation, prove Newton’s relation P (−t) = E 0 (t) , E(t) or P (−t)E(t) = E 0 (t). 4. For d > 1, deduce Newton’s formula Pd r=1 (−1)r−1 Pr Sd−r = d Sd . Exercises and problems 151 For r > 0, we define the complete symmetric function of degree r by Hr = Thus H1 = S1 , H2 = P i6j P |α|=r Xi Xj , H3 = H(t) = 5. Show the equality H(t) = X α. P i6j6k P r>1 Xi Xj Xk . We define the series r Hr t . Pn 1 . i=1 1−Xi t 6. Deduce the equality H(t) E(−t) = 1, then for d ∈ J1..nK, Pd r=0 (−1)r Sr Hd−r = 0, Hd ∈ A[S1 , . . . , Sd ], Sd ∈ A[H1 , . . . , Hd ]. 7. Consider the homomorphism ϕ : A[S1 , . . . , Sn ] → A[S1 , . . . , Sn ] defined by ϕ(Si ) = Hi . Show that ϕ(Hd ) = Sd for d ∈ J1..nK. Thus • ϕ ◦ ϕ = IA[S] , • H1 , . . . , Hn are algebraically independent over A, • A[S] = A[H], and expressing Sd in terms of H1 , . . ., Hd is the same as expressing Hd in terms of S1 , . . ., Sd . Exercise 6. (Equivalent forms of the Dedekind-Mertens lemma) Prove that the following assertions are equivalent (each of the assertions is universal, i.e. valid for all polynomials and all commutative rings): 1. c(f ) = h1i =⇒ c(g) = c(f g). 2. ∃p ∈ N c(f )p c(g) ⊆ c(f g). ∃p ∈ N c(f )p+1 c(g) = c(f )p c(f g). 3. (Dedekind-Mertens, weak form)    4. Ann c(f ) = 0 =⇒ Ann c(f g) = Ann c(g) . 5. (McCoy)  Ann(c(f ) = 0, f g = 0) =⇒ g = 0. 6. (c(f ) = h1i , f g = 0) =⇒ g = 0. Exercise 7. Let c = c(f ) be the content of f ∈ A[T ]. Dedekind-Mertens lemma  gives AnnA (c)[T ] ⊆ AnnA[T ] (f ) ⊆ DA (AnnA c) [T ]. Give an example for which there is no equality. Exercise 8. Deduce Kronecker’s theorem (page 92) from the Dedekind-Mertens lemma. Exercise 9. (Cauchy modules) We can give a very precise explanation for the fact that the ideal J (f ) (Definition 4.1) is equal to the ideal generated by the Cauchy modules. This works with a beautiful formula. Let us introduce a new variable T . Prove the following results. 1. In A[X1 , . . . , Xn , T ] = A[X, T ], we have f (T ) = f1 (X1 ) + (T − X1 )f2 (X1 , X2 )+ (T − X1 )(T − X2 )f3 (X1 , X2 , X3 ) + · · · + (T − X1 ) · · · (T − Xn−1 )fn (X1 , . . . , Xn )+ (T − X1 ) · · · (T − Xn ) (18) 152 III. The method of undetermined coefficients 2. In the A[X]-submodule of A[X, T ] formed by the polynomials of degree 6 n in T , the polynomial f (T ) − (T − X1 ) · · · (T − Xn ) possesses two different expressions. • On the one hand, over the basis (1, T, T 2 , . . . , T n ), itscoordinates are (−1)n (sn − Sn ), . . . , (s2 − S2 ), −(s1 − S1 ), 0 . • On the other hand, over the basis  1, (T − X1 ), (T − X1 )(T − X2 ), . . . , (T − X1 ) · · · (T − Xn ) , its coordinates are (f1 , f2 , . . . , fn , 0). Consequently over the ring A[X1 , . . . , Xn ], each of the two vectors  (−1)n (sn − Sn ), . . . , (s2 − S2 ), −(s1 − S1 ) and (f1 , . . . , fn−1 , fn ) are expressed in terms of the other by means of an unipotent matrix (triangular with 1’s along the diagonal). Exercise 10. (The polynomial X p − a) Let a ∈ A× and p be a prime number. Suppose that the polynomial X p − a has in A[X] a nontrivial monic divisor. Show that a is a pth power in A. Exercise 11. (With the extension principle of algebraic identities) Let Sn (A) be the submodule of Mn (A) consisting of the symmetric matrices. For A ∈ Sn (A), let ϕA be the endomorphism of Sn (A) defined by S 7→ tASA. Compute det(ϕA ) in terms of det(A). Show that CϕA only depends on CA . Exercise 12. Let B ⊇ A be an integral A-algebra which is a free A-module of rank n, K = Frac(A) and L = Frac(B). Show that every basis of B/A is a basis of L/K. Exercise 13. Let f ∈ A[X], g ∈ A[Y ], h ∈ A[X, Y ]. Prove that   ResY g, ResX (f, h) = ResX f, ResY (g, h) . Exercise 14. (Newton Tr(Ak )) Let A ∈ Mn (B) be a matrix. Pnsums and n j Let CA (X) = X + j=1 (−1) sj X n−j , s0 = 1 and pk = Tr(Ak ). 1. Show that the pk ’s and sj ’s are linked by Newton’s formulas for the sums of Pd the kth powers (Exercise 5): (−1)r−1 pr sd−r = dsd (d ∈ J1..nK). r=1 2. If Tr(Ak ) = 0 for k ∈ J1..nK, and if n! is regular in B, then CA (X) = X n . NB: this exercise can be considered as a variation on the theme of Proposition 5.9. Exercise 15. Let K ⊆ L be two finite fields, q = #K and n = [ L : K ]. The subring of K generated by 1 is a field Fp where p is a prime number, and q = pr for an integer r > 0. Frobenius’ automorphism of (the K-extension) L is given by σ : L → L, σ(x) = xq . d 1. Let R be the union of the roots in L of the polynomials X q −X with 1 6 d < n. Show that #R < q n and that for x ∈ L \ R, L = K[x]. 2. Here K = F2 and L = F2 [X]/ hΦ5 (X)i = F2 [x] where Φ5 (X) is the cyclotomic polynomial X 4 + X 3 + X 2 + X + 1. Check that L is indeed a field; x is a primitive element of L over K but it is not a generator of the multiplicative group L× . Exercises and problems 153 3. For x ∈ L× , let o(x) be its order in the multiplicative group L× . Show that L = K[x] if and only if the order of q in the group (Z/ho(x)i)× is n. Exercise 16. The aim of the exercise is to prove that in a discrete field the group of nth roots of unity is cyclic. Consequently the multiplicative group of a finite field is cyclic. We prove a result that is barely more general. Show that in a nontrivial commutative ring A, if elements (xi )i∈J1..nK form a group G for the multiplication, and if xi − xj is regular for every pair i, j (i 6= j), then G is cyclic. Hint: by the structure theorem of finite Abelian groups, a finite Abelian group, additively denoted, in which every equation dx = 0 admits at most d solutions is cyclic. Also use Exercise 1. Exercise 17. (Structure of finite fields, Frobenius’ automorphism) 1. Prove that two finite fields which have the same order are isomorphic. 2. If F ⊇ Fp is a finite field of order pr , prove that τ : x 7→ xp defines an automorphism of F. This is called Frobenius’ automorphism. Show that the group of automorphisms of F is a cyclic group of order r generated by τ . 3. In the previous case, F is a Galois extension of Fp . Describe the Galois correspondence. NB: We often denote by Fq a finite field of order q, knowing that it is a slightly ambiguous notation if q is not prime. Exercise 18. (Algebraic closure of Fp ) 1. For each integer r > 0 construct a field Fpr! of order pr! . By proceeding by induction we have an inclusion ır : Fpr! ,→ Fp(r+1)! . 2. Construct a field Fp∞ by taking the union of the Fpr! via the inclusions ır . Show that Fp∞ is an algebraically closed field that contains a (unique) copy of each finite field of characteristic p. Exercise 19. (Lcm of separable polynomials) 1. Let x, x0 , y, y 0 ∈ B. Show that hx, x0 i hy, y 0 i hx, yi2 ⊆ hxy, x0 y + y 0 xi . Deduce that the product of two separable and comaximal monic polynomials in A[T ] is a separable polynomial. 2. If A is a discrete field, the lcm of several separable polynomials is separable. Exercise 20. (Index of a finitely generated submodule in a free module) 1. Let A ∈ Am×n and E = Im(A) ⊆ Am . Show that Dm (A) only depends on E. We call this ideal the index of E in L = Am , and we denote it by | L : E |A (or | L : E |). Note that this index is null as soon as E is not sufficiently close to L, for example if n < m. Check that in the case where A = Z we find the usual index of the subgroup of a group for two free Abelian groups of the same rank. 2. If E ⊆ F are finitely generated submodules of L ' Am , we have | L : E | ⊆ | L : F |. 154 III. The method of undetermined coefficients 3. In addition, if F is free and of rank m, we have the transitivity formula | L : E | = | L : F | | F : E |. 4. If δ is a regular element of A, we have | δL : δE | = | L : E |. Deduce the equality (14) (page 131) stated in Lemma 8.18. Exercise 21. (Remark on Fact 8.20) Let a and b be two ideals in a ring A such that a b = hai with a regular. Show that if a is generated by k elements, we can find in b a generator set of k elements. Exercise 22. (Decomposition of an ideal into a product of invertible maximal ideals) Consider a nontrivial integral ring with explicit divisibility 8 A. 1. If a is an invertible ideal and if b is a finitely generated ideal, prove that there is a test for b ⊆ a. Let q1 , . . ., qn be maximal ideals (in the sense that the quotient rings A/qk are nontrivial discrete fields), b be a finitely generated ideal and a be a regular element of A satisfying aA = q1 · · · qn ⊆ b. 2. Show that the qi ’s are invertible and b is the product of some of the qi ’s (and thus it is invertible). Furthermore, this decomposition of b into a product of finitely generated maximal ideals is unique up to order of the factors. Exercise 23. (Legendre symbol) Let k be a finite field of odd cardinality q; we define the Legendre symbol  • k   × : k −→ {±1}, x 7−→  1 if x is a square in k× , −1 otherwise.  q−1 Show that k. is a group morphism and that kx = x 2 . In particular, −1 is a square in k× if and only if q ≡ 1 mod 4. NB: if p is an odd prime number and x is an integer comaximal to p we find  Legendre’s symbol xp in the form Fxp . Exercise 24. (Rabinovitch’s trick) Let a ⊆ A be an ideal and x ∈ A. Consider the following ideal of A[T ]: b = ha, 1 − xT i = a[T ] + h1 − xT iA[T ] . √ Show the equivalence x ∈ a ⇐⇒ 1 ∈ b. Exercise 25. (Jordan-Chevalley-Dunford decomposition) Let M ∈ Mn (A). Suppose that the characteristic polynomial of M divides a power of a separable polynomial f . 1. Show that there exist D, N ∈ Mn (A) such that: • D and N are polynomials in M (with coefficients in A). • M = D + N. 8 We say that an arbitrary ring is with explicit divisibility if we have an algorithm that tests, for a and b ∈ A, if ∃x, a = bx, and in case of a positive answer, gives a suitable x. Exercises and problems 155 • f (D) = 0. • N is nilpotent. 2. Prove the uniqueness of the above decomposition, including by weakening the first constraint, by only requiring that DN = N D. Exercise 26. (Separably integral elements) Let A ⊆ B. We say that z ∈ B is separably integral over A if z is a root of a separable monic polynomial of A[T ]. Here we are looking for an example for which the sum of two separably integral elements is a nonzero nilpotent and nonseparably integral element.  Let B = A[x] = A[X] X 2 + bX + c . Suppose that ∆ = b2 − 4c is a unit of A. For a ∈ A, compute the characteristic polynomial of ax over A and its discriminant. Deduce an example as stated when DA (0) 6= 0. Problem 1. (Some useful resultants and discriminants) 1. Show that disc(X n + c) = (−1) the equality n(n−1) 2 nn cn−1 . More generally, prove for n > 2 n(n−1) 2  nn cn−1 + (1 − n)n−1 bn . 2. For n, m ∈ N∗ , by letting d = gcd(n, m), n1 = n and m1 = m prove the d d equality Res(X n − a, X m − b) = (−1)n (bn1 − am1 )d . More generally Res(αX n − a, n, βX m − b, m) = (−1)n (αm1 bn1 − β n1 am1 )d . disc(X n + bX + c) = (−1) 3. Notations as in item 2, with 1 6 m 6 n − 1. Then prove disc(X n + bX m + c) = (−1) n(n−1) 2 cm−1 nn1 cn1 −m1 − (n − m)n1 −m1 mm1 (−b)n1 d . ∗ 4. For n ∈ N , denote by Φn the cyclotomic polynomial of level n (see Problem 4). Then, for prime p > 3 prove disc(Φp ) = (−1) p−1 2 pp−2 . k−1 5. Let p be prime and k > 1. Then prove that Φpk (X) = Φp (X p disc(Φpk ) = (−1) with for p 6= 2, (−1) ϕ(pk ) 2 ϕ(pk ) 2 = (−1) k−1 −4 and disc(Φ2k ) = 2(k−1)2 p(k(p−1)−1)p p−1 2 k−1 ) and (p, k) 6= (2, 1), . For p = 2, prove that we obtain disc(Φ4 ) = for k > 3. In addition, prove that disc(Φ2 ) = 1. 6. Let n > 1 and ζn be an nth primitive root of the unit. If n is not the power of a prime number, then prove that Φn (1) = 1, and 1 − ζn is invertible in Z[ζn ]. If n = pk with p prime, k > 1, then prove that Φn (1) = p. Finally, prove that Φ1 (1) = 0. 156 III. The method of undetermined coefficients 7. Let ∆n = disc(Φn ). For coprime n, m, prove that we have the multiplicativity ϕ(m) ϕ(n) formula ∆nm = ∆n ∆m and the equality ∆n = (−1) nϕ(n) ϕ(n) 2 for n > 3. ϕ(n) Q p p−1 p|n Problem 2. (Euclidean rings, the Z[i] example) A Euclidean stathm is a map ϕ : A → N that satisfies the following properties9 (roughly speaking, we copy the Euclidean division in N) • ϕ(a) = 0 ⇐⇒ a = 0. • ∀a, b 6= 0, ∃q, r, a = bq + r and ϕ(r) < ϕ(b). A Euclidean ring is a nontrivial integral ring given with a Euclidean stathm. Note that the ring is discrete. We can then do with the “division” given by the stathm the same thing we do in Z with Euclidean division. The most renowed examples are the following. • Z, with ϕ(x) = |x|, • K[X] (K a discrete field), with ϕ(P ) = 1 + deg(P ) for P 6= 0,  • Z[i] ' Z[X] X 2 + 1 , with ϕ(m + in) = m2 + n2 ,  √ √ • Z[i 2] ' Z[X] X 2 + 2 , with ϕ(m + i 2n) = m2 + 2n2 . In addition, in these examples we have the equivalence x ∈ A× ⇐⇒ ϕ(x) = 1. 1. (Extended Euclidean algorithm) For all a, b, there exist u, v, a1 , b1 , g such that  g 0   = u −b1 v a1  a b  and ua1 + vb1 = 1. In particular, ha, bi = hgi and g is a gcd of a and b. If (a, b) 6= (0, 0), ab g is a lcm of a and b. 2. a. Show that the ring A is principal. b. Let us make the following assumptions. • A× is a detachable subset of A. • We have a primality test at our disposal for the elements of A \ A× in the following sense: given a ∈ A \ A× we know how to decide if a is irreducible, and in case of a negative response, write a in the form bc with b, c ∈ A \ A× . Show then that A satisfies the “fundamental theorem of arithmetic” (unique decomposition into prime factors, up to association). 9 In the literature we sometimes find a “Euclidean stathm” defined as a map ϕ : A → N ∪ {−∞}, or ϕ : A → N ∪ {−1} (the minimum value being always equal to ϕ(0)). Exercises and problems 157 The Z[i] example. Recall that z = m + in 7→ z = m − in is an automorphism of Z[i] and that the norm N = NZ[i]/Z (N(z) = zz) is a Euclidean stathm. Take an element of Z[i] close to a/b ∈ Q[i] for the above q and check that N(r) 6 N(b)/2. To know which are the irreducible elements of Z[i], it suffices to know how to decompose in Z[i] each prime number p of N. This amounts to determining  the ideals containing pZ[i], i.e. the ideals of Zp := Z[i]/hpi. But Zp ' Fp [X] X 2 + 1 . We are thus reduced to finding the divisors of X 2 + 1, therefore to factorizing X 2 + 1, in Fp [X]. 3. Show that a priori three cases can arise. • X 2 + 1 is irreducible in Fp [X], and p is irreducible in Z[i]. • X 2 + 1 = (X + u)(X − u) in Fp [X] with u 6= −u, and then hpi = hi + u, pi hi − u, pi = hm + ini hm − ini and p = m2 + n2 . • X 2 + 1 = (X + u)2 in Fp [X], and then hpi = hi + ui2 . This only happens for p = 2, with 2 = (−i)(1 + i)2 (where −i ∈ Z[i]× ). 4. If p ≡ 3 mod 4, then −1 is not a square in Fp . If p ≡ 1 mod 4, then −1 is a square in Fp . In this case give an efficient algorithm to write p in the form m2 + n2 in N. 5. Let z ∈ Z[i]. We can write z = m(n + qi) with m, n, q ∈ N gcd(n, q) = 1. Give an efficient algorithm to decompose z into prime factors in Z[i] knowing a decomposition into prime factors of N(z) = m2 (n2 + q 2 ) in N. Given a decomposition into prime factors of s ∈ N, describe under which condition s is a sum of two squares, as well as the number of expressions s = a2 + b2 with 0 < a 6 b in N. 6. Say in which (relatively rare) cases we can generalize the previous procedure to decompose into prime factors the finitely generated ideals of a ring Z[α], when α is an algebraic integer. Problem 3. (Kummer’s little theorem) Problem 2 can be generalized for rings of principal integers of the form Z[α], but this case is relatively rare. On the contrary, Kummer’s little theorem gives the decomposition of a prime number (in N) into products of 2-generated maximal ideals for almost all the prime numbers, in all the rings of integers. This shows the intrinsic superiority of the “ideal numbers” introduced by Kummer. Furthermore, the argument is extremely simple and only requires the Chinese remainder theorem. However, the prime numbers that do not fall under the scope of Kummer’s little theorem constitute in fact the heart of algebraic number theory. Those are the ones that required a fine tuning of the theory (according to two distinct methods due to Kronecker and Dedekind), without which all decisive progress would not have been possible. Consider a zero α of an irreducible monic polynomial f (T ) ∈ Z[T ], such that Z[α] ' Z[T ]/hf (T )i. Let ∆ = disc(f ). 1. Let p be a prime number which does not divide ∆. • Show that f (T ) is separable in Fp [T ]. 158 III. The method of undetermined coefficients Q` • Decompose f (T ) in Fp [T ] in the form k=1 Qk (T ) with distinct monic irreducible Qk ’s. Let qk = Qk (α) (in fact it is only defined modulo p, but Q` we can lift Qk in Z[T ]). Show that in Z[α] we have hpi = k=1 hp, qk i and that the ideals hp, qk i are maximal, distinct and invertible. In particular, if ` = 1, hpi is maximal. • Show that this decomposition remains valid in every ring A such that Z[α] ⊆ A ⊆ Z, where Z is the ring of integers of Q[α]. 2. Let a ∈ Z[α] such that A = NZ[α]/Z (a) is comaximal to ∆. Let a = hb1 , . . . , br i be a finitely generated ideal of Z[α] containing a. Show that in Z[α] the ideal a is invertible and can be decomposed into products of maximal ideals that divide the prime factors of A. Finally, this decomposition is unique up to order of the factors and all of this remains valid in every ring A as above. Problem 4. (The cyclotomic polynomial Φn ) In A[X], the polynomial X n − 1 is separable if and only if n ∈ A× . Let Qn be a splitting field over Q for this polynomial. Let Un be the group of nth roots of the unit in Qn . It is a cyclic group of order n, which therefore has ϕ(n) generators (nth primitive roots of the unit). We define Φn (X) ∈ Qn [X] by Q Φn (X) = o(ξ)=n (X − ξ). It is a monic polynomial of degree ϕ(n). We have the fundamental equality Xn − 1 = Q d|n Φd (X), which allows us to prove by induction on n that Φn (X) ∈ Z[X]. 1. Following the steps below, prove that Φn (X) is irreducible in Z[X] (therefore in Q[X], Proposition 8.15). Let f , g be two monic polynomials of Z[X] with Φn = f g and deg f > 1; you must prove that g = 1. a. It suffices to prove that f (ξ p ) = 0 for every prime p 6 | n and for every zero ξ of f in Qn . b. Suppose that g(ξ p ) = 0 for some zero ξ of f in Qn . Examine what happens in Fp [X] and conclude the result. 2. Let us fix a root ξn of Φn in Qn . Show that Qn = Q(ξn ) and that with (Q, Qn , Φn ), we are in the elementary Galois situation of Lemma 6.13. Describe the explicit isomorphisms of the groups Aut(Un ) ' (Z/nZ)× ' Gal(Qn /Q). 3. Let K be a field of characteristic 0. What can be said of a splitting field L of X n − 1 over K? Exercises and problems 159 √ Problem 5. (The ring Z[ n 1]: Prüfer domain, factorization of ideals) Let Φn (X) ∈ Z[X] be the cyclotomic polynomial of order n, irreducible over Q. Let Qn = Q(ζn ) ' Q[X]/hΦn i. The multiplicative group Un generated by ζn (nth primitive root of the unit) is cyclic of order n. Among other things we will prove that the ring A = Z[Un ] = Z[ζn ] ' Z[X]/hΦn i is a Prüfer domain: an integral ring whose nonzero finitely generated ideals are invertible (cf. Section VIII -4 and Chapiter XII). √ 1. Let p ∈ N be a prime number. The steps below show that pA is a principal ideal and express it as a finite product of 2-generated invertible maximal ideals. Consider the distinct irreducible factors of Φn modulo p that we lift to the monic polynomials f1 , . . . , fk ∈ Z[X]. Let g = f1 · · · fk (such that g is the subset without a square factor of Φn modulo p) and pi = hp, fi (ζn )i for i ∈ J1..kK. a. Show that pi is a maximal ideal and that √ pA = hp, g(ζn )i = p1 . . . pk √ b. If p does not divide n, prove that g = Φn , thus pA = hpi is a principal ideal. c. Suppose that p divides n and write n = mpk with k > 1, gcd(m, p) = 1. By studying the factorization of Φn modulo p, prove that g = Φm . Deduce √ that pA = hp, Φm (ζn )i. Then prove that p ∈ hΦm (ζn )i, and therefore that √ pA = hΦm (ζn )i is a principal ideal. e d. Deduce that pA is a product of the form pe11 . . . pkk . 2. Let a ∈ Z \ {0}; prove that aA is a product of invertible maximal ideals with two generators. Deduce that in A every nonzero finitely generated ideal can be decomposed into a product of 2-generated invertible maximal ideals and that the decomposition is unique up to factor order. Problem 6. (An elementary property of Gauss sums) Let k be a finite field of cardinality q and A be an integral ring. Consider • a “multiplicative character” χ : k× → A× , i.e. a morphism of multiplicative groups, • an “additive character” ψ : k → A× , i.e. a morphism of groups ψ : (k, +) → (A× , ×). Suppose that neither χ nor ψ are trivial and that χ is extended to the whole of k via χ(0) = 0. Finally, the Gauss sum of χ is defined, with respect to ψ, by Gψ (χ) = P x∈k χ(x)ψ(x) = P x∈k× χ(x)ψ(x). We aim to prove that Gψ (χ)Gψ (χ−1 ) = qχ(−1), and give arithmetic applications of this result (Question 4 ). 1. LetPG be a finite group and ϕ : G → A× be a nontrivial homomorphism. Show that ϕ(x) = 0. x∈G 160 III. The method of undetermined coefficients 2. Show that P χ(x)χ−1 (y) = x+y=z  −χ(−1) (q − 1)χ(−1) if z 6= 0, otherwise. 3. Deduce that Gψ (χ)Gψ (χ−1 ) = qχ(−1). √ 4. Consider k = Fp where p is an odd prime number, A = Q( p 1), and ζ a pth primitive root of the unit in A. The characters ψ and χ are defined by ψ(i mod p) = ζ i , χ(i mod p) =  i p (Legendre symbol). a. Then, χ = χ−1 , the Gauss sums Gψ (χ), Gψ (χ−1 ) are equal to def τ = and by letting p∗ = (−1) 2 ∗ τ =p , b. Define τ0 = P i∈F×2 p P i∈F∗ p i p  ζi, p−1 2 p (such that p∗ ≡ 1 mod 4), we obtain √ √ in particular, Q( p∗ ) ⊆ Q( p 1). ζ i , τ1 = P ×2 i∈F× p \Fp τ0 and τ1 are the roots of X 2 + X + √ the ring of integers of Q( p∗ ). ζ i such that τ = τ0 − τ1 . Show that 1−p∗ 4 and that the ring Z[τ0 ] = Z[τ1 ] is Problem 7. (The Dedekind polynomial f (X) = X 3 + X 2 − 2X + 8) The aim of this problem is to provide an example of a ring A of integers of a number field which is not a monogenic Z-algebra.10 1. Show that f is irreducible in Z[X] and that disc(f ) = −2 012 = −22 × 503. 2. Let α be a root of f (X). Show that β = 4α−1 is integral over Z, that A = Z ⊕ Zα ⊕ Zβ is the ring of integers of Q(α) and that DiscA/Z = −503. 3. Show that the prime number p = 2 is completely decomposed in A, in other words that A/2A ' F2 × F2 × F2 . Deduce that A is not a monogenic Z-algebra. 4. (Avoiding the conductor, Dedekind) Let B ⊆ B0 be two rings, f be an ideal of B satisfying fB0 ⊆ B; a fortiori fB0 ⊆ B0 and f is also an ideal of B0 . Then, for every ideal b of B such that 1 ∈ b + f, by letting b0 = bB0 , the canonical morphism B/b → B0 /b0 is an isomorphism. 5. Deduce that 2 is an essential divisor of A; by that we mean that 2 divides the index | A : Z[x] | for any primitive element x of Q(α)/Q integral over Z. Problem 8. (Norm of an ideal in quasi-Galoisian context) G Let (B, A, G) where G ⊆ Aut(B) Q is a finite group, and A = B = FixB (G). 0 If b 0 is an ideal of B, let NG (b) = σ∈G σ(b) (ideal of B) and NG (b) = A ∩ NG (b) (ideal of A). 1. Show that B is integral over A. 10 An A-algebra B is said to be monogenic when it is generated, as an A-algebra, by a unique element x. So B = A1 [x] where A1 is the image of A in B. Exercises and problems 161 √ 2. Let B = Z[ d] where d ∈ Z is not a square, τ be the automorphism (also √ √ denoted by z 7→ z) defined by d 7→ − d, and G = hτ i. Therefore A = Z. √ √ Suppose that d ≡ 1 mod 4 and let m = 1 + d, 1 − d . a. We have m = m, N0G (m) = m2 = 2m and NG (m) = 2Z. Deduce that m is not invertible and that we do not have N0G (m) = NG (m)B. √ √ b. Show that Z[ d]/m ' F2 ; thus m is of index 2 in Z[ d] but 2 is not the gcd of the NG (z)’s, z ∈ m. Also check that b 7→ | B : b | is not multiplicative over the nonzero ideals of B. 3. Suppose that B is integrally closed and that A is a Bézout domain. Let b ⊆ B be a finitely generated ideal. a. Give a d ∈ A such that N0G (b) = dB. In particular, if b is nonzero, it is invertible. Thus, B is a Prüfer domain. b. Show that NG (b) = dA, therefore N0G (b) = NG (b)B. c. Suppose that B/b is isomorphic as an A-module to A/ha1 i× · · · × A/hak i. Show that NG (b) = ha1 · · · ak iA . d. Suppose #G = 2. Express, in terms of a finite generator set of b, elements z1 , . . . , zm ∈ b such that NG (b) = hN(zi ), i ∈ J1..mKiA . Problem 9. (Forking lemma) 1. Let A be an integrally closed ring with quotient field k, K be a separable finite extension of k of degree n, B be the integral closure of A in K. Show that there exists a basis (e) = (e1 , . . . , en ) of L/K contained in B. Let ∆ = disc(e) and (e0 ) = (e01 , . . . , e0n ) be the trace-dual basis of (e). Show the inclusions Ln i=1 Aei ⊆ B ⊆ Ln i=1 Ae0i ⊆ ∆−1 Ln i=1 Aei . In the following A = Z and k = Q; K is thus a number field and B = Z is its ring of integers. Consider some x ∈ Z such that K = Q[x]. Let f (X) = MinQ,x (X) ∈ Z[X] and δ 2 be the greatest square factor of discX (f ). By Proposition 8.17, Z is a free Z-module of rank n = [ L : Q ], and we have Z[x] ⊆ Z ⊆ 1δ Z[x]. This is slightly more precise than the result from item 1. Consider a finitely generated Z-algebra B intermediate between Z[x] and Z. As it is a finitely generated Z-module, B is also a free Z-module of rank n. The most important case is that where B = Z. The aim of the problem is to find a Z-basis of B of the form B= g (x) g0 g1 (x) g2 (x) , d1 , d2 , . . . , n−1 d0 dn−1  with gk ∈ Z[X] of degree k for all k, and each dk > 0 ass mall as possible. Establish this result with monic polynomials gk and 1 = d0 | d1 | d2 | · · · | dn−1 . The field K is a Q-vector space with basis (1, x, . . . , xn−1 ) and for k ∈ J0..n − 1K, let πk : K → Q be the linear component form over xk and Lk Lk Qk = Q xi , Zk = 1 Z xi , and Fk = Qk ∩ B = Zk ∩ B. i=0 i=0 δ It is clear that Q0 = Q, Qn−1 = K, F0 = Z and Fn−1 = B. 162 III. The method of undetermined coefficients 2. Show that the Z-module Fk is free and of rank k + 1. The Z-module πk (Fk ) is a finitely generated Z-submodule of 1δ Z. Show that it is of the form d1k Z for some dk that divides δ. NB: d0 = 1. 3. Let yk be an element of Fk such that πk (yk ) = d1k . Write yk in the form fk (x)/dk , with fk ∈ Q[X] monic and of degree k. Clearly y0 = 1. However, the other yi ’s are not uniquely determined. Show that (1, y1 , . . . , yk ) is a Z-basis of Fk . 4. Show that if i + j 6 n − 1, we have di dj | di+j . In particular di divides dk n(n−1)/2 if 1 6 i < k 6 n − 1. Also deduce that d1 divides δ. 5. Show that dk yk ∈ Z[x] for each k ∈ J0..n − 1K. Deduce that fk ∈ Z[X] and  that 1, f1 (x), . . . , fn−1 (x) is a Z-basis of Z[x]. 6. Show that B = 1, 1 1 f (x), . . . , dn−1 fn−1 (x) d1 1  is a Z-basis of B adapted to the inclusion Z[x] ⊆ B. The di ’s are therefore the invariant factors of this Qn−1 inclusion, and i=1 di is equal to the index B : Z[x] that divides δ. Problem 10. (Changing variables, polynomial automorphisms and Newton’s method) Let F = (F1 , . . . , Fn ) with Fi ∈ A[X] = A[X1 , . . . , Xn ] and θF : A[X] → A[X] be the morphism of A-algebras performing Xi 7→ Fi ; we therefore have θF (g) = g(F ). Assume that A[X] = A[F ]: there thus exists a Gi ∈ A[X] satisfying Xi = Gi (F ), which is classically written (with some slight abuses) as X = G(F ) and at times X = G ◦ F (in the sense of maps of A[X]n to A[X]n ). Note the converse as θF ◦ θG = IA[X] . Here we will prove that θG ◦ θF = IA[X] , or X = F (G). Consequently (cf. Question 1) G is uniquely determined, θF is an automorphism of A[X] and F1 , . . . , Fn are algebraically independent over A. The idea consists in using the ring of formal series A[[X]] or at least the quotient rings A[X]/md where m = hX1 , . . . , Xn i. Let F = (F1 , . . . , Fn ) ∈ A[[X]]n . Study for which condition there exists a G = (G1 , . . . , Gn ), Gi ∈ A[[X]] without a constant term, satisfying F (G) = X. We then have F (0) = 0, and by letting J0 = JAC(F )(0), we obtain J0 ∈ GLn (A) (since JAC(F )(0) ◦ JAC(G)(0) = IAn ). We will prove the converse: in the case where F (0) = 0 and J0 ∈ GLn (A), there exists a G = (G1 , . . . , Gn ), with Gi ∈ A[[X]], Gi (0) = 0, and F (G) = X. 1. By assuming this converse, prove that G is unique and that G(F ) = X. 2. Let S ⊂ A[[X]] be the set of formal series without a constant term; Sn is, with respect to the composition law, a monoid whose neutral element is X. Recall Newton’s method for solving an equation P (z) = 0 in z: introduce the iterator Φ : z 7→ z − P 0 (z)−1 P (z) and the sequence zd+1 = Φ(zd ) with an adequate z0 ; or a variant Φ : z 7→ z − P 0 (z0 )−1 P (z). To solve F (G) − X = 0 in G, check that this leads to the iterator over Sn Φ : G 7→ G − J0−1 · (F (G) − X) Solutions of selected exercises 163 3. Introduce val : A[[X]] → N ∪ {∞}: val(g) = d means that d is the (total) minimum degree of the monomials of g, agreeing that val(0) = +∞. We therefore have val(g) > d if and only if g ∈ md . For g, let h ∈ A[[X]] and G, H ∈ A[[X]]n d(f, g) = 1 , 2val(f −g) d(F, G) = maxi d(Fi , Gi ).  Show that Φ is a contracting map: d Φ(G), Φ(H) 6 d(G, H)/2. Deduce that Φ admits a unique fixed point G ∈ Sn , the unique solution of F (G) = X. 4. Solve the initial problem with respect to polynomials. 5. Check that the following systems are changes of variables and make their inverses explicit (in Z[X, Y, Z] then in Z[X1 , X2 , X3 , X4 , X5 ]): (X − 2f Y − f 2 Z, Y + f Z, Z) with f = XZ + Y 2 , (X1 + 3X2 X42 − 2X3 X4 X5 , X2 + X42 X5 , X3 + X43 , X4 + X53 , X5 ). Some solutions, or sketches of solutions Exercise 2. 1. Lagrange interpolation: Q = P ξ∈U Q xn −ζ ζ∈U \{ξ} ξ−ζ  Qξ . 2. Assume that each a(Vξ ) ⊂ K[x1 , . . . , xn−1 ] (for ξ ∈ πn (V )) is generated by m polynomials a(Vξ ) = fjξ , j ∈ J1..mK , fjξ ∈ K[x1 , . . . , xn−1 ]. By item 1, there exists an fj ∈ K[x] satisfying fj (x1 , . . . , xn−1 , ξ) = fjξ for all ξ ∈ πn (V ). Then prove, based on item 1, that Q a(V ) = hP, f1 , . . . , fm i with P = ξ∈πn (V ) (xn − ξ). Conclude by induction on n. Exercise 3. 4. Consider the polynomial ring B = A[s Pn1 , . . . , sn ] where the si ’s are indeterminates, then the polynomial f (t) = tn + k=1 (−1)k sk tn−k ∈ B[t]. Consider also the universal splitting algebra C = AduB,f = B[x1 , . . . , xn ] = A[x1 , . . . , xn ], Qn with, in C[t], the equality f (t) = i=1 (t − xi ). Let ρ : A[X1 , . . . , Xn ] → A[x1 , . . . , xn ] and ϕ : A[s1 , . . . , sn ] → A[S1 , . . . , Sn ] be the evaluation homomorphisms Xi 7→ xi and si 7→ Si . / A[x] We clearly have ρ(Si ) = si . Therefore, by letting ρ1 be A[X] o O O ψ the restriction of ρ to A[S] and A[s], we have ϕ ◦ ρ1 = ?  ρ1 ? / A[s] IdA[S] and ρ1 ◦ ϕ = IdA[s] . This shows that the Si ’s are A[S] o ϕ algebraically independent over A and we can identify A[S] and A[s] = B. By the universal property of the universal splitting algebra, there exists a (unique) B-homomorphism ψ : C → A[X] which sends xi onto Xi . It follows that ρ and ψ are two mutually reciprocal isomorphisms. Thus the xi ’s are algebraically independent over A and A[X] is free and of rank n! over A[S] = B, with the prescribed basis. NB: this proof does not seem to simply give the fact that the symmetric polynomials of A[X] are in A[S]. ρ 164 III. The method of undetermined coefficients Exercise 4. 1. Let f = (X13 + X23 + · · · + Xn3 ) − (S13 − 3S2 S2 + 3S3 ). It is a homogeneous symmetric polynomial, therefore f = g(S1 , . . . , Sn ) where g = g(Y1 , . . . , Yn ) is homogeneous in weight, of weight 3 with respect to the weight α1 + 2α2 + · · · + nαn . The equality α1 + 2α2 + · · · + nαn = 3 implies αi = 0 for i > 3, so g only depends on Y1 , Y2 , Y3 , say g = g(Y1 , Y2 , Y3 ). In the equality (X13 + X23 + · · · + Xn3 ) − (S13 − 3S2 S2 + 3S3 ) = g(S1 , S2 , S3 ), put Xi := 0 for i > 3; we obtain g(S10 , S20 , S30 ) = 0 where S10 , S20 , S30 are the elementary symmetric functions of X1 , X2 , X3 . Deduce that g = 0 then f = 0. 2. For the first, we can assume n = 3; we find S1 S2 − 3S3 . For the other two which are homogeneous, symmetric, of degree 4 we work with 4 indeterminates and we obtain S12 S2 − 2S22 − S1 S3 + 4S4 and S22 − 2S1 S3 + 2S4 . 3. Let n > d and f (X1 , . . . , Xn ) be a homogeneous symmetric polynomial of degree d. Let h ∈ A[X1 , . . . , Xd ] = f (X1 , . . . , Xd , 0, . . . , 0). If h = 0, then f = 0. We can translate this result by saying that we have isomorphisms of A-modules at the level of the homogeneous symmetric components of degree d: Xd+2 :=0 Xd+1 :=0 · · · → A[X1 , . . . , Xd+2 ]sym. −−−→ A[X1 , . . . , Xd+1 ]sym. −−−→ A[X1 , . . . , Xd ]sym. . d d d Exercise 7. Let A = Z[U, V ]/ U 2 , V 2 = Z[u, v] = Z ⊕ Zu ⊕ Zv ⊕ Zuv. a. We take f = uT + v so c = hu, vi. We then have  Ann(u) = Au, Ann(v) = Av, Ann(c) = Ann(u) ∩ Ann(v) = Auv and D Ann(c) = c. b. Let g = uT − v. We have f g = 0 but g ∈ / Ann(c)[T ]; we have u ∈ D Ann(c) but u ∈ / AnnA[T ] (f ) (idem for v). Exercise 9. It suffices to prove item 1. We have f (T ) = f (X1 ) + (T − X1 )f2 (X1 , T ) by definition of f1 = f and f2 . Similarly f2 (X1 , T ) = f2 (X1 , X2 ) + (T − X2 )f3 (X1 , X2 , T ) by definition of f3 . So f (T ) = f (X1 ) + (T − X1 )f2 (X1 , X2 ) + (T − X1 )(T − X2 )f3 (X1 , X2 , T ). Continue until fn−1 (X1 , . . . , Xn−2 , T ) = fn−1 (X1 , . . . , Xn−2 , Xn−1 ) + (T − Xn−1 )fn (X1 , . . . , Xn−1 , T ), which gives f (T ) = f1 (X1 ) + (T − X1 )f2 (X1 , X2 ) + (T − X1 )(T − X2 )f3 (X1 , X2 , X3 ) + · · · + (T − X1 ) · · · (T − Xn−1 )fn (X1 , . . . , Xn−1 , T ). Finally, fn (X1 , . . . , Xn−1 , T ) is monic of degree 1 in T so fn (X1 , . . . , Xn−1 , T ) = fn (X1 , . . . , Xn−1 , Xn ) + (T − Xn ). Note that this proves in particular that fn = S1 − s1 .  Solutions of selected exercises 165 Exercise 10. Let f ∈ A[X] be monic of degree d, with f | X p − a and Qd 1 6 d 6 p − 1. In a ring B ⊇ A, we write f (X) = i=1 (X − αi ), therefore αip = a Q and i αi = b with b = (−1)d f (0) ∈ A. By lifting to the power p, ad = bp . However, gcd(d, p) = 1, so 1 = ud + vp, then a = aud avp = (bu av )p . Exercise 11. Let eij be the matrix of Mn (A) having a single nonzero coefficient, the coefficient in position (i, j), equal to 1. The module Sn (A) is free and a basis is formed by the eii ’s for i ∈ J1..nK and the eij + eji for 1 6 i < j < n. It suffices to treat the case where A = Diag(λ1 , . . . , λn ). Then, ϕA = Diag(λ21 , . . . , λ2n ), and ϕA (eij + eji ) = λi λj (eij + eji ). Whence det(ϕA ) = (det A)n+1 . Exercise 12. Let e = (e1 , . . . , en ) be a basis of B/A. Clearly e is a K-free family. Let x = b/b0 ∈ L with b ∈ B, b0 ∈ B \ {0}; we write x = (bbe0 )/(b0 be0 ) = bbe0 /NB/A (b0 ) ∈ Ke1 + · · · + Ken . Exercise 14. 1. It suffices to prove it for the generic matrix (aij )i,j∈J1..nK with coefficients in A = Z[(aij )i,j∈J1..nK ]. This matrix is diagonalizable in an overring of A. 2. Follows immediately from 1. Pn−1 n −1 Exercise 15. 1. We have #R 6 d=1 q d < 1 + q + · · · + q n−1 = qq−1 . n n A fortiori, #R < q − 1 < q . Let x ∈ L \ R and d = [ K[x] : K ]. We have d xq = x, and since x ∈ / R, then d = n. 2. The cyclotomic polynomial is irreducible in F2 [X]. Indeed, the only irreducible polynomial of degree 2 of F2 [X] is X 2 + X + 1, Φ5 has no root in F2 , and Φ5 6= (X 2 + X + 1)2 . We have #L = 24 = 16, #L× = 15, but x5 = 1. 3. Let σ : L → L be the Frobenius automorphism of L/K, i.e. σ(x) = xq . We can easily check that L = K[x] if and only if the σ i (x)’s, i ∈ J0..n − 1K, are pairwise distinct. This condition is equivalent to σ k (x) = x ⇒ k ≡ 0 mod n , i.e. k xq = x ⇒ k ≡ 0 mod n . But k xq = x ⇐⇒ xq k −1 = 1 ⇐⇒ o(x) | q k − 1 ⇐⇒ q k ≡ 1 mod o(x). We then deduce, for x ∈ L× , that L = K[x] if and only if the order of q in the group of invertible elements modulo o(x) is exactly n. Exercise 19. 1. We have hg, g 0 i hg, hi ⊆ hg, g 0 hi = hg, g 0 h + gh0 i. Similarly, hh, h0 i hg, hi ⊆ hh, g 0 h + gh0 i. By evaluating the product we get hg, g 0 i hh, h0 i hg, hi2 ⊆ hg, g 0 h + h0 gi hh, g 0 h + h0 gi ⊆ hgh, g 0 h + h0 gi . For the second item of the question we apply the result established above and Fact 7.8. NB: this also results from Equation (12), Fact 7.9. 2. It suffices to treat the case of two separable polynomials f , g ∈ A[T ]. Let h = gcd(f, g). We have f = hf1 , g = hg1 , with gcd(f1 , g1 ) = 1. Since g is separable, gcd(h, g1 ) = 1, so gcd(hf1 , g1 ) = 1 = gcd(f, g1 ). The polynomials f , g1 are separable, comaximal, therefore their product lcm(f, g) is separable. 166 III. The method of undetermined coefficients Exercise 20. 1 and 2. These are special cases of what is stated in Fact II -5.5. 3. Suppose L = Am . If A ∈ Mm (A) is a matrix whose columns form a basis of F , it is injective and its determinant is regular. If B is a matrix corresponding to the inclusion F ⊆ E, we have | L : F | = hdet Ai, | F : E | = Dm (B) and | L : E | = Dm (AB), hence the desired equality. 4. We have | N : δN | = hδ n i. We also have | N : δM | = δ n−1 hδ, a1 , . . . , an i: take for the generator set of δM the family δe1 , . . . , δen , δz where e1 , . . . , en is a basis of N (we use M = N + Az), and compute the determinantal ideal of order n of a " # δ 0 0 a1 0 δ 0 a2 . matrix of the following type (for n = 3) 0 0 δ a3 Then idgN : δN = | N : δM | | δM : δN | = | N : δM | | M : N |, i.e. hδ n i = | M : N | δ n−1 hδ, a1 , . . . , an i. By simplifying by δ n−1 we obtain the equality hδi = d hδ, a1 , . . . , an i. Exercise 22. 1. If aa0 = aA with a regular, then b ⊆ a is equivalent to ba0 ⊆ aA. Note that the test provides a finitely generated ideal c = ba0 /a such that ac = b in case of a positive response, and an element b ∈ / a among the generators of b in case of a negative response. 2. It is clear that the qi ’s are invertible (and thus finitely generated). Perform the tests b ⊆ qi . If a response is positive, for instance b ⊆ q1 , write cq1 = b, whence q2 · · · qn ⊆ c, and finish by induction. If all the tests are negative, we have some xi ∈ b and yi ∈ A such that 1 − xi yi ∈ qi (here suppose that the quotient rings A/qi are discrete fields), whence, by evaluating the product, 1 − b ∈ q1 · · · qn ⊆ b with b ∈ b, so 1 ∈ b. Finally, we address the uniqueness question. Assume that b = q1 · · · qk . It suffices to prove that if a finitely generated maximal ideal q contains b, it is equal to one of the qi ’s (i ∈ J1..kK). Since we can test q ⊆ qi , if each of the tests are negative we explicitly have 1 ∈ q + qi for each i and so 1 ∈ q + b. NB: if we do not assume that b is finitely generated and A has explicit divisibility, the proof of Kummer’s little theorem would require that we at least know how to test q ⊆ b for every “subproduct” q of q1 · · · qn . √ Exercise 24. Assume x ∈ a; as a ⊆ b, in A[T ]/b , x is nilpotent and invertible (since xT = 1), therefore A[T ]/b is the null ring, i.e. 1 ∈ b. Conversely, suppose 1 ∈ b and reason in the ring A[T ]/a[T ] = (A/a )[T ]. Since √ 1 ∈ b, 1 − xT is invertible in this ring, therefore x is nilpotent in A/a , i.e. x ∈ a. Exercise 25. (Decomposition of Jordan-Chevalley-Dunford) Existence. Look for a zero D of f , a “neighbor of M ,” (i.e., with M − D nilpotent), in the commutative ring K[M ]. We have by hypothesis f (M )k = 0 for some k 6 n, and if uf k + vf 0 = 1, we obtain v(M )f 0 (M ) = In . Consequently, the Newton method, starting with x0 = M , gives the solution in K[M ] in dlog2 (k)e iterations. Solutions of selected exercises 167 Uniqueness. The solution is unique, under the condition f (D) = 0, in every commutative ring containing K[M ], for example in K[M, N ] if the pair (D, N ) solves the given problem. When we only assume that the minimal polynomial of D is separable, the uniqueness is more delicate. A solution would be to directly prove that the characteristic polynomial of D is necessarily equal to that of M , but it is not that simple.11 Let us call (D1 , N1 ) the solution in K[M ] given by Newton’s method. Since D and N commute, they commute with M = D + N and so with D1 and N1 because they belong to K[M ]. From this we deduce that D − D1 is nilpotent because it is equal to N1 − N with N and N1 being nilpotents that commute. But the algebra K[D, D1 ] is étale by Theorem VI -1.7, so it is reduced, and D = D1 . Exercise 26. We have B = A[x] = A ⊕ Ax with x separably integral over A. Let z 7→ ze be the automorphism of the A-algebra B which swaps x and −b − x. For z ∈ B, we have CB/A (z)(T ) = (T − z)(T − ze). Thus CB/A (ax)(T ) = T 2 + abT + a2 c, and its discriminant is equal to a2 ∆. Let ε ∈ A be nonzero nilpotent and let y = (ε − 1)x. Then, y is separably integral over A because (ε − 1)2 ∆ is invertible. Furthermore, the element z = x + y = εx is nonzero nilpotent. Assume that ε2 = 0 and let g ∈ A[X] be a monic polynomial that annihilates z, we will prove that g is not separable. Let us write g(X) = u + vX + X 2 h(X), then z 2 = 0, so u + vz = 0. Since B = A ⊕ Ax, we obtain u = vε = 0, then g(X) = X`(X) with `(0) = v noninvertible (otherwise, ε = 0). Finally, disc(g) = disc(`) Res(X, `)2 = disc(`) v 2 is non-invertible. Problem 1. 1. Let f (X) = X n + c = (X − x1 ) · · · (X − xn ). Then, f 0 = nX n−1 and Res(f, f 0 ) = f 0 (x1 ) · · · f 0 (xn ) = nn (x1 · · · xn )n−1 = nn (−1)n c Variant: Res(f 0 , f ) = nn Res(X n−1 , f ) = nn Qn−1 i=1 n−1 = nn cn−1 . f (0) = nn cn−1 . 2. Let f (X) = X n + bX + c = (X − x1 ) · · · (X − xn ); disc(f ) = (−1) n(n−1) 2 Qn i=1 yi with yi = f 0 (xi ) = nxn−1 + b. i To compute the product of the yi ’s, we compute the product P of the xi yi ’s (that of the xi ’s is equal to (−1)n c). We have xi yi = nxn i + bxi = uxi + v, with u = (1 − n)b, v = −nc. We use the elementary symmetric functions Sj (x1 , . . . , xn ) (almost all null) Q Pn n (uxi + v) = j=0 uj Sj (x1 , . . . , xn )v n−j . i=1 We get P = v n + un Sn + un−1 Sn−1 v = v n + un (−1)n c + un−1 (−1)n−1 bv , 11 In zero characteristic, one trick consists in retrieving the characteristic polynomial of a matrix A from the Tr(Ak ) by following Le Verrier’s method. 168 III. The method of undetermined coefficients i.e., by replacing u and v by their values P (−1)n nn cn + (n − 1)n bn c − n(n − 1)n−1 bnc (−1)n nn cn + bn c (n − 1)n − n(n − 1)n−1 (−1)n nn cn − bn c(n − 1)n−1 . = = = By dividing by (−1)n c, we obtain the product of the yi ’s then the stated formula. 3. Left to the sagacity of the reader who can consult [181]. 4. By letting ∆p = disc(Φp ), we have the equality disc(X p − 1) = Res(X − 1, Φp )2 disc(X − 1)∆p = Φp (1)2 ∆p = p2 ∆p . By using disc(X n − 1) = (−1) n(n−1) 2 ∆2 = 1, nn (−1)n−1 , we obtain ∆p = (−1) p−1 2 pp−2 k−1 for p > 3. q 5. Let q = p ; let us first prove that r := Res(X − 1, Φpk ) = pq . Qq Qq With X q − 1 = i=1 (X − ζi ), we have r = i=1 Φpk (ζi ). In addition Φpk (X) = Y p −1 Y −1 = Y p−1 + · · · + Y + 1 with Y = Xq. By making X := ζi , we must make Y := 1, we obtain Φpk (ζi ) = p, then r = pq . k k Let Dk = disc(X p − 1). Since X p − 1 = (X q − 1)Φpk (X), we have Dk = Res(X q − 1, Φpk )2 Dk−1 disc(Φpk ) = p2q Dk−1 disc(Φpk ). We use disc(X n − 1) = (−1) Dk /Dk−1 = ε pN , n(n−1) 2 nn (−1)n−1 for n = pk and q ε = ±1,  N = kpk − (k − 1)q = k(p − 1) + 1 q . For disc(Φpk ) to be obtained, Dk /Dk−1 must be divided by p2q , which replaces the exponent N with N − 2q = (k(p − 1) − 1)q. As for the sign ε, for odd p, ε = (−1) pk −1 2 (−1) q−1 2 = (−1) pk −q 2 = (−1) p−1 2 . For p = 2, ε = 1 for k > 3 or k = 1 and ε = −1 for k = 2. 6. If n is not the power of a prime, we can write n = mpk with p prime, k k−1 gcd(m, p) = 1, k > 1 and m > 2. Then, Φn (X) = Φm (X p )/Φm (X p ), an equality in which we put X = 1 to obtain Φn (1) = 1. The other items are easy. 7. Let f , g Let A[x] = polynomial polynomial be two monic polynomials, with d = deg f , e = deg g and d, e > 1. A[X]/hf (X)i, A[y] = A[Y ]/hg(Y )i. Let f ⊗ g be the characteristic of x ⊗ y in A[x] ⊗A A[y] = A[X, Y ]/hf (X), g(Y )i. It is a monic Q Q of degree d e. Since f (X) = i (X − xi ), g(Y ) = j (Y − yj ), we obtain (f ⊗ g)(T ) = disc(f ⊗ g) = Q Q i,j (T − xi yj ). We easily see that (i,j)<(i0 ,j 0 ) (xi yj − xi0 yj 0 )2 = disc(f )e disc(g)d f (0)e g(0)d π , Q where π ∈ A is the product i6=i0 , j6=j 0 (xi yj − xi0 yj 0 ). Let n, m > 2 with gcd(n, m) = 1 and ζn , ζm , ζnm be the roots of the unit of respective orders n, m, nm. By the Chinese remainder theorem, we obtain the equality Φnm = Φn ⊗ Φm . As Φn (0) = Φm (0) = 1 (since n, m > 2), we have the Solutions of selected exercises 169 equality ∆nm = ∆ϕ(m) ∆ϕ(n) π, n m where π ∈ Z is the following product. 0 Q i6=i0 , j6=j 0 0 j j (ζni ζm − ζni ζm ), for i, i0 ∈ (Z/nZ )× and j, j 0 ∈ (Z/mZ )× . Let C ⊂ (Z/nmZ )× × (Z/nmZ )× be the set of pairs (a, b) with a, b invertible modulo nm, a 6≡ b mod n, a 6≡ b mod m. The Chinese remainder theorem gives us Q a b π = (a,b)∈C (ζnm − ζnm ). Let z 7→ z be complex conjugation. Then, π is of the form zz, therefore π ∈ N∗ . Indeed, (a, b) ∈ C ⇒ (−a, −b) ∈ C with (a, b) 6= (−a, −b). c Furthermore, for c ∈ Z a non-multiple of n or m, consider the element ζnm 0 0 0 0 which is of order nm/ gcd(c, nm) = n m with n = n/ gcd(c, n) > 1, m > 1 and gcd(n0 , m0 ) = 1. Therefore n0 m0 is not a power of a prime number, and, by the c c previous question, 1 − ζnm is invertible in Z[ζnm ], a fortiori in Z[ζnm ]. We deduce that π is invertible in Z[ζnm ], therefore in Z. ϕ(m) ϕ(n) Recap: π = 1, and ∆nm = ∆n ∆m . Finally, if the formula that gives the cyclotomic discriminant is satisfied for two pairwise comaximal integers n and m, it is satisfied for the product nm (use the first item). However, it is true for integers which are powers of a prime by Question 5, therefore it is true for every integer > 3. p−1 Problem 2. 4. Consider p ≡ 1 mod 4. The polynomial Y 2 − 1 ∈ Fp [Y ] × is of degree < #F× p . There thus exists a non-root y ∈ Fp of this polynomial; let x = y p−1 4 so that x2 = y half of the y ∈ F× p , p−1 2 we have y p−1 2 6 1; but x4 = 1 thus x2 = −1. Actually, for = = 1 (the squares), and for the other half (the p−1 2 non-squares), we have y = −1. Let us address the question of the efficient algorithm. What we mean by this is that the execution time has a small power of the number of digits of p as its order of magnitude. We first determine some x ∈ Fp such that x2 = −1. For that we randomly draw p−1 integers y over J2..(p − 1)/2K and we compute y 4 in Fp (for that we use an efficient algorithm of exponentiation modulo p). The probability of failure (when the result is ±1) is of 1/2 at each draw. Once such an x is found, it remains to compute gcd(x + i, p) with the Euclidean algorithm. As the norm is divided by at least 2 at each step, the algorithm is efficient. NB: the brute force method which would consist in saying “since p ≡ 1 mod 4, it possesses a factor of the form m + in, and all that is left to do is try out every m < p” quickly proves to be impractical as soon as p is large enough. 5. The decomposition of the prime divisors of m is treated in the previous item. It remains to decompose n + qi. Regarding the decomposition of n2 + q 2 , we already know that the only prime numbers therein are 2 (with the exponent 1) or some p ≡ 1 mod 4. If u + vi is the factor of some p that divides n2 + q 2 , then u + vi or u − vi divides n + qi. If p appears with the exponent k in n2 + q 2 , and if u + vi divides 170 III. The method of undetermined coefficients n + qi, then with the exponent k in n + qi. Q u +i vi Q appears nj If s = 2k i pm q with every pi ≡ 3 mod 4 and every qj ≡ 1 mod 4, then i j j the condition insuring that s is the sum of two squares is that every mi be even. Note that an expression s = a2 + b2 with 0 < a 6 b corresponds to two conjugated elements a ± ib defined up to association (for example multiplying by i comes down to permuting a and b). It follows that in the case where s is the sum of two squares, the number of expressions of s as a sum of the squares is equal to Q (1/2) j (1 + nj ) unless the nj ’s are all even, in which case we add or subtract 1/2 depending on whether we consider that an expression a2 + 02 is or is not legitimate as a sum of two squares. For example with 5 = N(a), a = 2 + i and 13 = N(b), b = 3 + 2i we obtain 5 = N(a) gives 5 = 2 2 + 12 , 10 = N a(1 + i) = N(1 + 3i) gives 10 = 12 + 32 ,  53 54 52 = × 13 = N(a4 ) N(a2 b) N(a3 ) = N(5a) gives 125 = 22 + 112 = 102 + 52 , = N(5a2 ) = N(25) gives 625 = 72 + 242 = 152 + 202 = 252 + 0, = N(a2 b) = N(5b) gives 325 = 182 + 1 = 172 + 62 = 152 + 102 . = 3 3 3 Similarly 5 × 13 = N(a b) = N(a b) = N(5ab) = N(5ab) gives 1625 = 162 + 372 = 282 + 292 = 202 + 352 = 402 + 52 . An analogous computation gives 1105 = 5 × 13 × 17 = 92 + 322 = 332 + 42 = 232 + 242 = 312 + 122 . Problem 3. 1. The discriminant can be specialized and ∆ is invertible modulo p. Next note that Z[α]/hpi ' Fp [t] := Fp [T ]/hf (T )i. This already implies that the ideals hqk , pi are maximal in Z[α]. For j 6= k, hQj (t)i + hQk (t)i = h1i in Fp [t], so hqj i + hqk i + hpi = h1i in Z[α]. Whence hqj , pi + hqk , pi = h1i. By the Chinese remainder theorem, the product of the hqk , pi is therefore equal to their intersection, which is equal to hpi because the intersection of the hQj (t)i in Fp [t] is equal to their product, which is null. Q` Note that the equality hpi = k=1 hp, Qk (α)i is maintained in every ring containing Z[α]. Similarly for the comaximal character of the ideals. If we move from Z[α] to A, then the only thing left to check is that the hp, qk i’s remain as maximal ideals. This is indeed the case and the quotient fields are isomorphic. Indeed, every element of A is of the form a/m where a ∈ Z[α] and m2 divides ∆ (Proposition 8.17). Since m is comaximal to p the natural homomorphism Z[α]/hp, qk i → A/hp, qk i is an isomorphism. 2. Apply Exercise 22. Problem 4. 1a. For primes p1 , p2 , . . . that do not divide n, we deduce that f (ξ p1 p2 ... ) = 0, i.e. f (ξ m ) = 0 for every m such that gcd(n, m) = 1, or even that f (ξ 0 ) = 0 for every ξ 0 , nth primitive root of the unit. So f = Φn . 1b. Let h(X) = gcdQ[X] f (X), g(X p ) . By Kronecker’s theorem h ∈ Z[X]. We have h(ξ) = 0, therefore deg h > 1. Let us reason modulo p. We have g(X p ) = g(X)p , so h | f and h | g p . If π is an irreducible factor of h, π 2 is a square factor of X n − 1, but X n − 1 is separable in Fp [X]. Solutions of selected exercises 171 n(n−1) Note: the discriminant of the polynomial X n + c is (−1) nn cn−1 , in partic- 2 (n+2)(n+3) 2 ular that of X n − 1 is (−1) nn . 2. If G a cyclic group of order n, we have the classical isomorphisms  End(G) ' Z/nZ (as rings) and Aut(G) ' (Z/nZ)× , × (as groups). Whence canonical isomorphisms Aut(Un ) ' (Z/nZ)× ' Gal(Qn /Q). If m ∈ (Z/nZ)× , we obtain the automorphism σm of Qn defined by σm (ζ) = ζ m for ζ ∈ Un . 3. Assume know a field of roots L as a strictly finite extension of K. The map σ 7→ σ|Un is an injective morphism of AutK (L) into Aut(Un ). In particular, AutK (L) is isomorphic to a subgroup of (Z/nZ)× . Moreover, for every nth primitive root of the unit ξ in L, we have L = K(ξ). So, every irreducible factor of Φn (X) in K[X] has the same degree [ L : K ]. However, it is not a priori obvious to determine what type of operation on K is necessary to factorize Φn (X) in K[X]. We now give an example where we can determine with certainty [ L : K ]: let p−1 √ p > 3 be a prime, p∗ = (−1) 2 p and K = Q( p∗ ). Then K ⊆ Qp (Gauss), the only pth root of the unit contained in K is 1 and Φp (X) can be factorized in K[X] as a product of two irreducible polynomials of the same degree p−1 . 2  Problem 5. 1a. On the one hand we have A/p i ' Fp [X] fi so pi is maximal.  On the other hand, let A = A/pA ' Fp [X] Φn and π : A  A be the  √ canonical surjection; then pA = π −1 DA (0) and   DA (0) = hgi Φn ' f1 Φn × · · · × fk hence the result. 1b. Results from the fact that Φn is separable modulo p. 1c. We easily check the following equalities in Z[X]  Φn , k k−1 Φn (X) = Φmp (X p )= Φm (X p ) , Φm (X pk−1 ) and thus in Fp [X], by letting ϕ be the Euler’s indicator function k Φn (X) = k Φm (X)p = Φm (X)ϕ(p ) Φm (X)pk−1 mod p. The polynomial Φm is separable modulo p so the subset without a square factor √ of Φn modulo p is g = Φm ; whence pA = hp, Φm (ζn )i. Let us prove that p ∈ hΦm (ζn )i. If ζp ∈ Un is a pth primitive root of the unit, we have the equality Φp (X) = Pp−1 i=0 Xi = Qp−1 j=1 (X − ζpj ), hence, by making X := 1 p= By applying this to ζp = ζnmp k−1 mp Qp−1 j=1 k−1 (1 − ζpj ) ∈ h1 − ζp i . , we obtain p ∈ 1 − ζnmp k−1 . k−1 However, X − 1 is a multiple of Φm in Z[X], therefore ζnmp multiple of Φm (ζn ) in A, whence p ∈ hΦm (ζn )i. − 1 is a 172 III. The method of undetermined coefficients √ 1d. As pA = p1 · · · pk = hΦm (ζn )i is finitely generated, there is an exponent e such that (p1 · · · pk )e ⊆ pA and we apply Exercise 22. Note: we can take e = ϕ(pk ) = pk − pk−1 . 2. The first item is immediate. Next, if a is a nonzero finitely generated ideal of A, it contains a nonzero element z. Then, a = NQn/Q (z) = z ze is a nonzero integer belonging to a. We write aA ⊆ a as a product of invertible maximal ideals and we again apply Exercise 22 to the ideal a. Problem 6. 1. Let x0 ∈ G such that ϕ(x0 ) 6= 1. P P P We write x∈G ϕ(x) = x∈G ϕ(xx0 ), therefore Sϕ(x0 ) = S with S = x∈G ϕ(x),  i.e. 1 − ϕ(x0 ) S = 0, whence S = 0. 2. First note that χ−1 (−1) = χ(−1) since χ(−1)2 = χ (−1)2 = 1. We write  P x+y=z x is z−x χ(x)χ−1 (y) = P x6=0,z x z−x χ  . If z 6= 0, the map x 7→ a bijection of k∪{∞} onto k∪{∞} which transforms z into ∞, ∞ into −1, 0 into 0, which gives a bijection of k× \ {z} onto k× \ {−1}. We can therefore write P x+y=z χ(x)χ−1 (y) = P v∈k× \{−1} χ(v) = P v∈k× χ(v) − χ(−1) = 0 − χ(−1). If z = 0 we have the equality P x+y=z χ(x)χ−1 (y) = P x6=0 χ(−1) = (q − 1)χ(−1). 3. We write Gψ (χ)Gψ (χ−1 ) = with S(z) = P x+y=z P χ(x)χ −1 Gψ (χ)Gψ (χ x,y −1 χ(x)χ−1 (y)ψ(x + y) = P z∈k S(z)ψ(z), (y). Whence ) = (q − 1)χ(−1) − χ(−1) = qχ(−1) − χ(−1) P z6=0 P z∈k ψ(z) ψ(z) = qχ(−1). 4. The first item is immediate. We easily have τ0 τ1 = 1−p∗ . 4 The rest follows. Problem 7. 1. If g(x) = 0, with x ∈ Z and g(X) ∈ Z[X] monic, then x | g(0). Here ±1, ±2, ±4, ±8 are not roots of f (X), therefore this polynomial is irreducible. The discriminant of the polynomial X 3 + aX 2 + bX + c is 18abc − 4a3 c + a2 b2 − 4b3 − 27c2 , 2. The element β = 4α −1 hence the result for a = 1, b = −2, c = 8. ∈ Q(α) is integral over Z since /α3 ×8 α3 + α2 − 2α + 8 = 0 =⇒ 1 + α−1 − 2α−2 + 8α−3 = 0 =⇒ 8 + 2β − β 2 + β 3 = 0. To check that A = Z ⊕ Zα ⊕ Zβ is a ring, it suffices to see that α2 , αβ, β 2 ∈ A. It is clear for αβ = 4. We have α2 + α − 2 + 2β = 0, so α2 = 2 − α − 2β, and since β 3 − β 2 + 2β + 8 = 0, β 2 = β − 2 − 8β −1 = β − 2 − 2α. The expression of (1, α, α2 ) over the basis (1, α, β) is provided by the matrix 1 α β " 1 α α2 1 0 0 0 1 0 2 −1 −2 # . Solutions of selected exercises 173 The ring Z[α] is therefore of index 2 in A; but DiscZ[α]/Z = | A : Z[α] |2 · DiscA/Z so DiscA/Z = −503. Since the discriminant of A is squarefree, A is the ring of integers of Q(α). 3. Let us prove that α, β and γ := 1 + α + β form, modulo 2, a fundamental system of orthogonal idempotents α + α2 = 2 − 2β, β 2 − β = 2 − 2α, αβ = 4, hence modulo 2 α ≡ α2 , β ≡ β2, γ 2 ≡ γ, α + β + γ ≡ 1, αβ ≡ 0, αγ ≡ 0, βγ ≡ 0. We therefore have A/2A = F2 α ⊕ F2 β ⊕ F2 γ. If we want to compute the factorization of 2 in A, we notice that (α, β, γ) is a Z-basis of A and by denoting by π the morphism of reduction modulo 2, π : A → A/2A, the prime ideals of A over 2 are the inverse images of the prime ideals of A/2A. For example a = π −1 ({0} ⊕ F2 β ⊕ F2 γ) = h2α, β, γi. Thus by letting b = hα, 2β, γi and c = hα, β, 2γi, we have A/a ' A/b ' A/c ' F2 and 2A = abc = a ∩ b ∩ c. In general, let K be a number field satisfying [ K : Q ] > 3 and 2 be completely decomposed in the ring of integers ZK . Then, ZK is not monogenic, i.e. there n exists no x ∈ ZK such that ZK = Z[x]. Indeed, ZK /2ZK ' Fn 2 and F2 does not admit any primitive element over F2 if n > 3. 4. By multiplying 1 ∈ f + b by B0 , we obtain B0 ⊆ fB0 + b0 ⊆ B + b0 , which shows that B → B0 /b0 is surjective. Let us prove that B → B0 /b0 is injective, i.e. b0 ∩ B = b. By multiplying 1 ∈ f + b by b0 ∩ B we obtain the inclusions b0 ∩ B ⊆ (b0 ∩ B)f + (b0 ∩ B)b ⊆ bB0 f + b ⊆ bB + b ⊆ b. 5. In the previous context, let x ∈ ZK be of degree n = [ K : Q ]. Let d = | ZK : Z[x] |. We have dZK ⊆ Z[x] and d can serve as conductor of ZK into Z[x]. If 2 6 | d, by the Dedekind avoidance, ZK /2ZK ' Z[x]/2Z[x] = F2 [x]. But ZK /2ZK ' Fn 2 does not admit a primitive element over F2 for n > 3. Problem 8. 1. z ∈ B is a root of coefficients in A. Q σ∈G (T − z), a monic polynomial with 2. m = m is clear. Let us compute m2 by letting d = 4q + 1, so 1 + d = 2(2q + 1): √ √ m2 = 1 + 2 d + d, 1 − d, 1 − 2 d + d √ √ √ √ = 2 2q + 1 + d, 2q, 2q + 1 − d = 2 1 + d, 1 − d = 2m. √ √ √ In addition, as a Z-module, m = Z(1+ d)⊕Z(1− d) = 2Z⊕Z(1± d). We cannot √ simplify m2 = 2m by m (because m 6= 2B seeing that 1 ± d ∈ / 2B), therefore m is not invertible. We have NG (m) = 2Z therefore NG (m)B = 2B 6= N0G (m). √ The canonical map Z → B/m is surjective (since x + y d ≡ x + y mod m) with √ kernel 2Z, so F2 ' B/m, and x + y d 7→ (x + y) mod 2 defines a surjective morphism of rings B  F2 , with kernel m. √ √ Let N(b) = #(B/b) for nonzero b. If z = x(1 + d) + y(1 − d) ∈ m with x, y ∈ Z, then NG (z) = (x + y)2 − d(x − y)2 ≡ 4xy mod 4. So NG (z) ∈ 4Z for z ∈ m, but N(m) = 2. We have N(m2 ) = N(2m) = 4N(m) = 8, but N(m)2 = 4. 174 III. The method of undetermined coefficients 3. Let b = hb1 , . . . , bn i and let X = (X1 , . . . , Xn ) be n indeterminates. Let us introduce the normic polynomial h(X) h(X) = Q σ∈G hσ (X) with hσ (X) = σ(b1 )X1 + · · · + σ(bn )Xn . We have h(X) ∈ A[X]. Let d be a generator of c(h)A . As B is integrally closed and c(h)B = dB is principal, we can apply Proposition 8.13: we then Q have σ c(hσ )B = c(h)B = dB, i.e. N0G (b) = dB. Since A is Bézout, it is integrally closed. Let a ∈ A ∩ dB. Then the element a/d ∈ Frac(A) is integral over A (because a/d ∈ B) so a/d ∈ A, i.e. a ∈ dA. Recap: A ∩ dB = dA i.e. NG (b) = dA. By definition, the evaluations of the normic polynomial h over Bn are the norms of elements of the ideal b; they belong to the ideal of A generated by the coefficients of the normic polynomial, this ideal of A being NG (b). If #G = 2, the coefficient of X1 X2 in h is h(1, 1, . . . , 0) − h(1, 0, . . . , 0) − h(0, 1, . . . , 0) = NG (b1 + b2 ) − NG (b1 ) − NG (b2 ). This in fact reduces to writing b1 b2 + b2 b1 = NG (b1 + b2 ) − NG (b1 ) − NG (b2 ). Similarly, the coefficient of Xi Xj in h is, for i 6= j, NG (bi + bj ) − NG (bi ) − NG (bj ). Consequently, the ideal of A generated by the norms NG (bi ) and NG (bi + bj ) contains all the coefficients of h(X). It is therefore the ideal NG (b). Problem 9. (Forking lemma) P 1. For x ∈ L, we have x = j TrL/K (xej )e0j . If x ∈ B, then TrL/K (xej ) is an element of K integral over A so in A. This proves the middle inclusion. P By writing ei = j TrL/K (ei ej )e0j , we obtain e = A te0 where A = TrL/K (ei ej ) ∈ Mn (A), with det(A) = ∆,  t the right-hand side inclusion. 2. The Z-module Fk is the intersection of B and Zk , which are two subfinitely generated modules of Zn−1 , free, of rank n. It is therefore a free Z-module of finite rank, and the two inclusions δZk ⊆ Fk ⊆ Zk show that Fk is of rank k + 1. The Z-module πk (Fk ) is a finitely generated subZ-module of 1δ Z. Therefore it is generated by ak /δ (where ak is the gcd of the numerators of the generators). Finally, as 1 = πk (xk ), ak must divide δ and we write aδk = d1k . 3. Let k > 1 and z ∈ Fk . If πk (z) = a/dk (with a ∈ Z) we have πk (z − ayk ) = 0. So z − ayk ∈ Fk−1 . Thus Fk = Zyk ⊕ Fk−1 and we conclude by induction on k Lk that z ∈ Zyk . i=0 4. We have yi yj ∈ Fi+j so 1 di dj = πi+j (yi yj ) ∈ 1 di+j Z. In other words di+j is a multiple of di dj . 5 and 6. Let us first prove that dk Fk ⊆ Z[x] by induction on k. The base 1 case k = 0 is clear. We then use the fact that xyk−1 ∈ Fk and πk (xyk−1 ) = dk−1 , Solutions of selected exercises 175 therefore xyk−1 = dk y dk−1 k + wk−1 with wk−1 ∈ Fk−1 . We get dk yk = xdk−1 yk−1 − dk−1 wk−1 and the right-hand side is in Z[x], by the induction hypothesis. Therefore dk yk ∈ Z[x] and dk Fk = dk (Zyk ⊕ Fk−1 ) = Zdk yk ⊕ dk Fk−1 ⊆ Z[x] + dk−1 Fk−1 ⊆ Z[x]. We have defined fk (X) monic, of degree k in Q[X], by the equality fk (x) = dk yk . Since (1, . . . , xn−1 ) is as much a Z-basis of Z[x] as a Q-basis of Q[x], and since dk yk ∈ Z[X], we obtain fk ∈ Z[X]. The rest follows easily. Problem 10. 1. If F (G) = X, we have JAC(F )(0) ◦ JAC(G)(0) = IAn . As JAC(G)(0) is invertible, we apply the result to G. We have H ∈ Sn with G(H) = X. Then F = F ◦ G ◦ H = H. Therefore F , G are inverses of each other (as transformations of Sn ). 2. Immediate. We can a posteriori verify Φ(Sn ) ⊆ Sn as well as the equivalence Φ(G) = G ⇐⇒ F (G) = X. 3. We write F (X) = J0 · X + F2(X), where the vector F2 (X) is of degree > 2 in X. Then, J0−1 · F (G) − F (H) = G − H + J0−1 · F2 (G) − F2 (H) . Then Φ(G) − Φ(H) = −J0−1 · F2 (G) − F2 (H) . Assume Gi − Hi ∈ md (d > 1), and let us prove that each component of Φ(G) − Φ(H) belongs to md+1 . The result will be the desired inequality. Such a component is an A-linear combination of Gα − H α with α ∈ Nn and |α| > 2. To simplify the notation, let n = 3 and write  α1 α2 α3 α2 α2 α1 α3 α3 α3 α1 α2 1 Gα − H α = (Gα 1 − H1 )G2 G3 + (G2 − H2 )H1 G3 + (G3 − H3 )H1 H2 . Since the Hi ’s, Gi ’s are constant-free, we have Gα − H α ∈ md+1 , except perhaps for (α2 , α3 ) = (0, 0) or (α1 , α3 ) = (0, 0) or (α1 , α3 ) = (0, 0). It remains to look at the special cases, for example α2 = α3 = 0. In this case, since α1 − 1 > 1, α1 1 Gα − H α = Gα 1 − H1 = (G1 − H1 ) P i+j=α1 −1 Gi1 H1j ∈ md+1 .  We have therefore established d Φ(G), Φ(H) 6 d(G, H)/2. This guarantees in particular that there exists at most one fixed point of Φ. Let G(0) ∈ Sn , for example G(0) = 0, and the sequence G(d) defined by induction by means of G(d+1) = Φ(G(d) ). For d > 1, each component of G(d) −G(d−1) is in md , which allows us to define P G ∈ Sn by G = d>1 G(d) − G(d−1) . Then, G is the limit of the G(d) for d 7→ ∞, it is a fixed point of Φ, i.e. F (G) = X.  4. Assume G(F ) = X, so G F (0) = 0.  e = G X + F (0) . Then, Fe(0) = G(0) e = 0 and G( e Fe) = X. Let Fe = F − F (0), G e = X, then F (G) = X. Hence Fe(G) 5. Check in both cases that Jac(F ) = 1. For the first, we obtain G (of same maximum degree as F ) by iterating Φ four times: G = (−X 2 Z 3 − 2XY 2 Z 2 + 2XY Z + X − Y 4 Z + 2Y 3 , −XZ 2 − Y 2 Z + Y, Z). 176 III. The method of undetermined coefficients For the second, we obtain G = (G1 , . . . , G5 ) by iterating Φ four times: G1 = X1 − 3X2 X42 + 6X2 X4 X53 − 3X2 X56 + 2X3 X4 X5 − 2X3 X54 + X44 X5 − 4X43 X54 + 6X42 X57 − 4X4 X510 + X513 , G2 = X2 − X42 X5 + 2X4 X54 − X57 , G3 = X3 − X43 + 3X42 X53 − 3X4 X56 + X59 , G4 = X4 − X53 , G5 = X4 . Note that the maximum degree of G is 13 whereas that of F is 3. Bibliographic comments The proof of the Dedekind-Mertens lemma 2.1 on page 90 is taken from Northcott [143] (he attributes it to Artin). Kronecker’s Theorem 3.3 on page 92 is found in [119, Kronecker]. It is also proven by Dedekind [53] and Mertens [136]. Concerning the resultants and subresultants in one variable, a reference work is [Apéry & Jouanolou]. However, we regret the lack of a bibliography. Even if the results are either very old or completely new, we do not see the use of hiding the exact sources. Another important book for algorithmic questions on the subject is [Basu, Pollack & Roy]. The construction of an abtract splitting field for a separable polynomial given in Theorem 6.15 is (almost exactly) that described by Jules Drach in [62], which also seems to be where the universal splitting algebra as a fundamental tool for studying algebraic extensions of fields was introduced. The telegraphical proof of Theorem 8.12 was suggested to us by Thierry Coquand. The Kronecker approach regarding the theory of ideals of number fields is the subject of a historical survey in [84, Fontana&Loper]. The proof of the Nullstellensatz given in Section 9 is inspired by the one in [Basu, Pollack & Roy], itself inspired by a van der Waerden proof. Chapter IV Finitely presented modules Contents 1 2 3 4 5 6 Introduction . . . . . . . . . . . . . . . . . . . . . . . . Definition, changing generator set . . . . . . . . . . . A digression on the algebraic computation . . . . . . . . . Finitely presented ideals . . . . . . . . . . . . . . . . . Trivial syzygies . . . . . . . . . . . . . . . . . . . . . . . . Regular sequences . . . . . . . . . . . . . . . . . . . . . . . A geometry example . . . . . . . . . . . . . . . . . . . . . . The category of finitely presented modules . . . . . Stability properties . . . . . . . . . . . . . . . . . . . . Coherence and finite presentation . . . . . . . . . . . . . . Tensor product, exterior powers, symmetrical powers . . . Changing the base ring . . . . . . . . . . . . . . . . . . . . Modules of linear maps . . . . . . . . . . . . . . . . . . . . The local character of the finitely presented modules . . . . Null tensors . . . . . . . . . . . . . . . . . . . . . . . . . . Classification problems . . . . . . . . . . . . . . . . . . Two results concerning finitely generated modules . . . . . Quasi-integral rings . . . . . . . . . . . . . . . . . . . . Equational definition of pp-rings . . . . . . . . . . . . . . . Elementary local-global machinery no. 1: from integral rings to pp-rings . . . . . . . . . . . . . . . . . . . . . . . . . . . Annihilators of the finitely generated ideals . . . . . . . . . – 177 – 178 179 182 183 183 185 186 188 190 190 191 196 198 199 199 200 201 202 203 203 204 178 IV. Finitely presented modules Local-global principle . . . . . . . . . . . . . . . . . . . . . 7 Bézout rings . . . . . . . . . . . . . . . . . . . . . . . . Finitely presented modules over the valuation rings . . . . Finitely presented modules over PIDs . . . . . . . . . . . . 8 Zero-dimensional rings . . . . . . . . . . . . . . . . . . Basic properties . . . . . . . . . . . . . . . . . . . . . . . . Reduced zero-dimensional rings . . . . . . . . . . . . . . . Characteristic properties . . . . . . . . . . . . . . . . . . Equational definition . . . . . . . . . . . . . . . . . . . . Elementary local-global machinery no. 2: from discrete fields to reduced zero-dimensional rings . . . . . . . . . . Finitely presented modules . . . . . . . . . . . . . . . . . Zero-dimensional polynomial systems . . . . . . . . . . . . 9 Fitting ideals . . . . . . . . . . . . . . . . . . . . . . . Fitting ideals of a finitely presented module . . . . . . . . . Fitting ideals of a finitely generated module . . . . . . . . . 10 Resultant ideal . . . . . . . . . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . 205 206 206 207 209 209 210 210 211 212 214 215 219 219 221 222 224 232 241 Introduction Over a ring the finitely presented modules play a similar role as that of the finite dimensional vector spaces over a field: the theory of finitely presented modules is a slightly more abstract, and at times more profitable, way to approach the subject of systems of linear equations. In the first sections of the chapter, we provide the basics of the theory of finitely presented modules. In Section 7, we treat the example of finitely presented modules over PIDs, and in Section 8 that of finitely presented modules over zero-dimensional rings. Finally, Section 9 is dedicated to important invariants that are Fitting ideals, and Section 10 introduces the resultant ideal as a direct application of the Fitting ideals. §1. Definition, changing generator set 179 1. Definition, changing generator set A finitely presented module is an A-module M given by a finite number of generators and relations. Therefore it is a module with a finite generator set having a finitely generated syzygy module. Equivalently, it is a module M isomorphic to the cokernel of a linear map γ : Am −→ Aq . The matrix G ∈ Aq×m of γ has as its columns a generator set of the syzygy module between the generators gi which are the images of the canonical base of Aq by the surjection π : Aq → M . Such a matrix is called a presentation matrix of the module M for the generator set (g1 , . . . , gq ). This translates into • [ g1 · · · gq ] G = 0, and • every syzygy between the gi ’s is a linear combination of the columns of G, i.e.: if [ g1 · · · gq ] C = 0 with C ∈ Aq×1 , there exists a C 0 ∈ Am×1 such that C = G C 0 . Examples. 1) A free module of rank k is a finitely presented module presented by a matrix column formed of k zeros.1 More generally every simple matrix is the presentation matrix of a free module of finite rank. 2) Recall that a finitely generated projective module is a module P isomorphic to the image of a projection matrix F ∈ Mn (A) for a specific integer n. Since An = Im(F ) ⊕ Im(In − F ), we obtain P ' Coker(In − F ). This shows that every finitely generated projective module is finitely presented. 3) Let ϕ : V → V be an endomorphism of a finite-dimensional vector space over a discrete field K. Consider V as a K[X]-module with the following external law ( K[X] × V → V (P, u) 7→ P · u := P (ϕ)(u). Let (u1 , . . . , un ) be a basis of V as a K-vector space and A be the matrix of ϕ with respect to this basis. Then we can show that a presentation matrix of V as a K[X]-module for the generator set (u1 , . . . , un ) is the matrix X In − A (see Exercise 3). 1 If we consider that a matrix is given by two integers q, m > 0 and a family of elements of the ring indexed by the pairs (i, j) with i ∈ J1..qK, j ∈ J1..mK, we can accept an empty matrix of type k × 0, which would be the canonical matrix to present a free module of rank k. 180 IV. Finitely presented modules 1.0. Lemma. When we change a finite generator set for a given finitely presented module, the syzygies between the new generators form a finitely generated module again. J Suppose that indeed, with M ' Coker G, another generator set of the A-module M is (h1 , . . . , hr ). We therefore have matrices H1 ∈ Aq×r and H2 ∈ Ar×q such that [ g1 · · · gq ] H1 = [ h1 · · · hr ] and [ h1 · · · hr ] H2 = [ g1 · · · gq ]. Then, the syzygy module between the hj ’s is generated by the columns of H2 G and that of Ir − H2 H1 . Indeed on the one hand we clearly have [ h1 · · · hr ] H2 G = 0 and [ h1 · · · hr ] (Ir − H2 H1 ) = 0. On the other hand, if we have a syzygy [ h1 · · · hr ] C = 0, we deduce [ g1 · · · gq ] H1 C = 0, so H1 C = GC 0 for some column vector C 0 and  C = (Ir − H2 H1 ) + H2 H1 C = (Ir − H2 H1 )C + H2 GC 0 = HC 00 ,   C 00 where H = [ Ir − H2 H1 | H2 G ] and C = .  C0 This possibility of replacing a generator set by another while preserving a finite number of relations is an extremely general phenomenon. It applies to every form of algebraic structure which can be defined by generators and relations. For example, it applies to those structures for which every axiom is a universal equality. Here is how this works (it suffices to verify that the reasoning applies in each case). Assume that we have generators g1 ,. . . , gn and relations R1 (g1 , . . . , gn ), . . . , Rs (g1 , . . . , gn ), which “present” a structure M . If we have other generators h1 , . . ., hm , we express them in terms of the gj ’s in the form hi = Hi (g1 , . . . , gn ). Let Si (hi , g1 , . . . , gn ) be this relation. We similarly express the gj ’s in terms of the hi ’s gj = Gj (h1 , . . . , hm ). Let Tj (gj , h1 , . . . , hm ) this relation. The structure does not change if we replace the presentation (g1 , . . . , gn ; R1 , . . . , Rs ) with (g1 , . . . , gn , h1 , . . . , hm ; R1 , . . . , Rs , S1 , . . . , Sm ). As the relations Tj are satisfied, they are consequences of the relations R1 , . . ., Rs , S1 , . . ., Sm , therefore the structure is always the same with the following presentation (g1 , . . . , gn , h1 , . . . , hm ; R1 , . . . , Rs , S1 , . . . , Sm , T1 , . . . , Tn ). Now in each of the relations Rk and S` , we can replace each gj with its expression in terms of the hi ’s (which is given in Tj ) and this still does not §1. Definition, changing generator set 181 change the presented structure. We obtain 0 (g1 , . . . , gn , h1 , . . . , hm ; R10 , . . . , Rs0 , S10 , . . . , Sm , T1 , . . . , Tn ). Finally, if we subtract the pairs (gj ; Tj ) one-by-one, it is clear that the structure will still remain unchanged, so we obtain the finite presentation 0 (h1 , . . . , hm ; R10 , . . . , Rs0 , S10 , . . . , Sm ). In the case of finitely presented modules this reasoning can be expressed in matrix form. First of all we note that we do not change the structure of M when we subject the presentation matrix G to one of the following transformations. 1. Adding a null column (this does not change the syzygy module between fixed generators). 2. Deleting a null column, except to obtain an empty matrix. 3. Replacing G, of type q × m, with G0 of type (q + 1) × (m + 1) obtained from G by adding a null row on the bottom then a column to the right with 1 in the position (q + 1, m + 1), (this reduces to adding a vector among the generators, by indicating its dependence with respect to the previous generators)   G C 0 G 7→ G = . 01,m 1 4. The inverse of the previous operation, except in the case of an empty matrix. 5. Adding to a column a linear combination of the other columns (this does not change the syzygy module between fixed generators). 6. Adding to a row a linear combination of the other rows, (for example if we let Li be the ith row, replacing L1 with L1 + γL2 reduces to replacing the generator g2 with g2 − γg1 ). 7. Permuting columns or rows. We then see that if G and H are two presentation matrices of the same module M , we can pass from one to the other by means of the transformations described above. Slightly better: we see that for every finite generator set of M , we can construct from G, by using these transformations, a presentation matrix of M for the new generator set. Note that consequently, a change of basis of Aq or Am , which corresponds to the multiplication of G (either on the left or right) by an invertible matrix, can be realized by the operations previously described. More precisely, we obtain the following result. 182 IV. Finitely presented modules 1.1. Lemma. Let G ∈ Aq×m and H ∈ Ar×n be two matrices. Then the following properties are equivalent. 1. The matrices G and H present “the same” module, i.e. their cokernels are isomorphic. 2. The two matrices of the figure below are elementarily equivalent. 3. The two matrices of the figure below are equivalent. m r q n q G 0 0 0 r 0 Ir 0 0 q 0 0 Iq 0 r 0 0 0 H The two matrices As a first consequence of Lemma 1.0 we obtain a more abstract reformulation of coherence as follows. 1.2. Fact. A ring is coherent if and only if every finitely generated ideal is finitely presented (as A-module). An A-module is coherent if and only if every finitely generated submodule is finitely presented. A digression on the algebraic computation Besides their direct relationship to solving systems of linear equations another reason for the importance of finitely presented modules is the following. Each time an algebraic computation reaches an “interesting result” in an A-module M this computation has only involved a finite number of elements x1 , . . . , xn of M and a finite number of syzygies between the xj ’s, so that there exist a finitely presented module P = An /R and a surjective linear map θ : P → x1 A + · · · + xn A ⊆ M which sends the ej ’s onto the xj ’s. Note that ej designates the class modulo R of the j th vector of the canonical basis of An . It must also be true of the above that the “interesting result” had already been held in P for the ej ’s. In a more scholarly language we express this idea as follows. Every A-module is a filtering colimit (or filtering inductive limit) of finitely §2. Finitely presented ideals 183 presented A-modules. However, this statement requires a more subtle treatment in constructive mathematics, and we therefore only indicate its existence. 2. Finitely presented ideals Consider a ring A and a generator set (a1 , . . . , an ) = (a) for a finitely generated ideal a of A. We are interested in the A-module structure of a. Trivial syzygies Among the syzygies between the ai ’s there are what we call the trivial syzygies (or trivial relators if we see them as algebraic dependence relations over k when A is a k-algebra): ai aj − aj ai = 0 for i 6= j. If a is finitely presented, we can always take a presentation matrix of a for the generator set (a) in the form W = [ Ra | U ], where Ra is “the” n × n(n − 1)/2 matrix of trivial syzygies (the order of the columns is without importance). For example, for n = 4   a2 a3 0 a4 0 0  −a1 0 a3 0 a4 0  . Ra =   0 −a1 −a2 0 0 a4  0 0 0 −a1 −a2 −a3 2.1. Lemma. (Determinantal ideals of the matrix of trivial syzygies) Using the above notations, we have the following results. 1. Dn (Ra ) = {0}. 2. If 1 6 r < n, then Dr (Ra ) = ar and ar + Dr (U ) ⊆ Dr (W ) ⊆ a + Dr (U ). In particular, we have the equivalence 1 ∈ DA,r (W ) ⇐⇒ 1 ∈ DA/a,r (U ) where U = U mod a. 3. Dn (W ) = Dn (U ). J 1. These are algebraic identities and we can take for a1 , . . . , an in- determinates over Z. Since [ a1 · · · an ] · Ra = 0, we obtain the equality Dn (Ra ) [ a1 · · · an ] = 0. The result follows since a1 is regular. 2. The inclusion Dr (Ra ) ⊆ ar is obvious for all r > 0. For the reverse inclusion, let us take for example r = 4 and n > 5 and show that  4 3 a1 , a1 a2 , a21 a22 , a21 a2 a3 , a1 a2 a3 a4 ⊆ D4 (Ra ). It suffices to consider the matrices below (we have deleted the 0’s and replaced ±ai with i to clarify the structure) extracted from Ra , and the 184 IV. Finitely presented modules minors extracted on the last 4 rows.    2 3 2 3 4 5   1  1    ,   1 1       1 1    2 2 3   1 3  1 4      2 1 5  ,      2 3   2  1 5    ,      1 2  4 4 3  3 4 1 5   ,   2 2   .  5  4 The inclusion ar + Dr (U ) ⊆ Dr (W ) results from Dr (Ra ) + Dr (U ) ⊆ Dr (W ) and from the equality Dr (Ra ) = ar . The inclusion Dr (W ) ⊆ a + Dr (U ) is immediate. Finally, the final equivalence results from the previous inclusions and from the equality  −1 DA/a,r (U ) = πA,a a + Dr (U ) . 3. We must show that if a matrix A ∈ Mn (A) extracted from W contains a column in Ra , then det A = 0. Take for example the first column of A equal to the first column of Ra , t[ a2 − a1 0 · · · 0 ]. When zi = ai , Lemma 2.2 below implies det A = 0, because the sj ’s are null.  Recall that Aα, β is the submatrix of A extracted on the rows α and the columns β. Let us also introduce the notation for a “scalar product” def Pn hx | yi = i=1 xi yi for two column vectors x and y. 2.2. Lemma. Let A ∈ Mn (A), Aj = A1..n,j , and z = t[ z1 · · · zn ] ∈ An×1 with A1 = t[ z2 − z1 0 · · · 0 ]. By letting sj = hz | Aj i for j ∈ J2..nK, we Xn have det A = (−1)j sj det(A3..n, 2..n\{j} ). j=2 In particular, det A ∈ hs2 , . . . , sn i. J Let B = A3..n,2..n , Bj = A3..n,j and B̂ = A3..n, 2..n\{j} . The Laplace expansion of the determinant of A according to the two first rows gives the equality: n n P P z2 a1j detA= (−1)j det(B̂ )= (−1)j (z1 a1j +z2 a2j ) det(B̂ ). −z1 a2j j=2 j=2 The gap between this equality and the desired equality is Pn j j=2 (−1) (z3 a3j + · · · + zn anj ) det(B̂ ). (∗) §2. Finitely presented ideals 185 Cramer’s syzygies between the columns of a matrix with m = n2 gives for B the equalities Pn Pn j j j=2 (−1) det(B̂ ) Bj = 0, a fortiori j=2 (−1) hy | Bj i det(B̂ ) = 0, for any vector y ∈ A(n−2)×1 . By taking y = t[ z3 · · · zn ], we see that the gap (∗) is null.  Regular sequences 2.3. Definition. A sequence (a1 , . . . , ak ) in a ring A is regular if each ai is regular in the ring A/haj ; j < ii. Remark. Here we have kept Bourbaki’s definition. Most authors also require that the ideal ha1 , . . . , ak i does not contain 1. As a first example, for every ring k, the sequence (X1 , . . . , Xk ) is regular in k[X1 , . . . , Xk ]. Our goal is to show that an ideal generated by a regular sequence is a finitely presented module. We first establish a small lemma and a proposition. Recall that a matrix M = (mij ) ∈ Mn (A) is said to be alternating if it is the matrix of an alternating bilinear form, i.e. mii = 0 and mij + mji = 0 for i, j ∈ J1..nK. The A-module of alternating matrices is free and of rank n(n−1) and admits 2 a natural basis. For example, for n = 3,         0 a b 0 1 0 0 0 1 0 0 0  −a 0 1 . 0 c  =a −1 0 0  +b 0 0 0  +c 0 −b −c 0 0 0 0 −1 0 0 0 −1 0 2.4. Lemma. Let a = t[ a ] = t[ a1 · · · an ] ∈ An×1 . 1. Let M ∈ Mn (A) be an alternating matrix; we have hM a | ai = 0. 2. A u ∈ An×1 is in Im Ra if and only if there exists an alternating matrix M ∈ Mn (A) such that u = M a. J 1. Indeed, hM a | ai = ϕ(a, a), where ϕ is an alternating bilinear form. 2. For example, for the  0  −1   0 0 first column of Ra with n = 4, we have     1 0 0 a1 a2     0 0 0   a2  =  −a1  ,     0 0 0 a3 0  0 0 0 a4 0 and the n(n−1) columns of Ra thus correspond to n(n−1) alternating ma2 2 trices forming the natural basis of the A-module of alternating matrices of Mn (A).  186 IV. Finitely presented modules 2.5. Proposition. Let (z1 , . . . , zn ) = (z) be a regular sequence of elements of A and z = t[ z1 · · · zn ] ∈ An×1 . If hu | zi = 0, there exists an alternating matrix M ∈ Mn (A) such that u = M z, and therefore u ∈ Im Rz . J We reason by induction on n. For n = 2, we start from u1 z1 + u2 z2 = 0. Therefore u2 z2 = 0 in A/hz1 i, and since z2 is regular modulo z1 , we have u2 = 0 in A/hz1 i, say u2 = −az1 in A. We get  u1z1 −az2 z1 =0, and  u1 0 a z1 as z1 is regular, u1 = az2 , which is written as = . u2 −a 0 z2 For n + 1 (n > 2), we start from u1 z1 + · · · + un+1 zn+1 = 0. By using the fact that zn+1 is regular modulo hz1 , . . . , zn i, we obtain un+1 ∈ hz1 , . . . , zn i, which we write as a1 z1 + · · · + an zn + un+1 = 0. Whence (u1 − a1 zn+1 )z1 + · · · + (un − an zn+1 )zn = 0. By induction hypothesis, we know how to construct an alternating matrix M ∈ Mn (A) with           u1 −a1 zn+1 z1 u1 z1 a1    .   .   .   .  ..   =M  ..  , i.e.  ..  =M  ..  +zn+1  ..  , . un −an zn+1 zn un and we obtain the desired result    u1  ..    .   M  =  un   un+1 −a1 . . . −an zn  a1 z1 ..   ..  .   . an   zn 0 zn+1 an    .   2.6. Theorem. If (z1 , . . . , zn ) is a regular sequence of elements of A, the ideal hz1 , . . . , zn i is a finitely presented A-module. More precisely, we have the exact sequence Rz (z1 ,...,zn ) An(n−1)/2 −−−→ An −−−−−→ hz1 , . . . , zn i −→ 0. Remark. The objects defined above constitute an introduction to the first degree of the Koszul complex of (z1 , . . . , zn ). J This results from Proposition 2.5 and from Lemma 2.4. A geometry example Let us begin with a most useful and obvious fact. 2.7. Proposition and definition. (Characters of an algebra) Let ı : k → A be an algebra. • A homomorphism of k-algebras ϕ : A → k is called a character.  §2. Finitely presented ideals 187 • If A has a character ϕ, then ϕ ◦ ı = Idk , ı ◦ ϕ is a projector and A = k.1A ⊕ Ker ϕ. In particular, k may be identified with k.1A . J The proof is left to the reader.  Now let (f ) = (f1 , . . . , fs ) be a polynomial system over a ring k, with each fi ∈ k[X] = k[X1 , . . . , Xn ]. We let  A = k[x1 , . . . , xn ] = k[X] f . In this subsection, we will formally say that A is the ring of the affine variety f = 0. For the algebra A, the characters ϕ : A → k are given by the zeros in kn of the polynomial system (f1 , . . . , fs )  (ξ) = (ξ1 , . . . , ξn ) = ϕ(x1 ), . . . , ϕ(xn ) , f (ξ) = 0. In this case, we say that (ξ) ∈ kn is a point of the variety f = 0. The ideal def mξ = hx1 − ξ1 , . . . , xn − ξn iA is called the ideal of the point (ξ) in the variety. We then have as a special case of Proposition 2.7: A = k ⊕ mξ , with mξ = Ker ϕ. In this subsection we show that the ideal mξ is a finitely presented A-module by making a presentation matrix for the generator set (x1 − ξ1 , . . . , xn − ξn ) explicit. By translation, it suffices to treat the case where ξ = 0, which we assume henceforth. The simplest case, that for which there is no equation, has already been treated in Theorem 2.6. Let us observe that every f ∈ k[X] such that f (0) = 0 is written, in many ways, in the form f = X1 u1 + · · · + Xn un , ui ∈ k[X]. If X1 v1 + · · · + Xn vn is another expression of f , we obtain by subtraction a syzygy between the Xi ’s in k[X], and so t [ v1 · · · vn ] − t[ u1 · · · un ] ∈ Im RX . For the polynomial system (f1 , . . . , fs ), we thus define (in a non-unique Pn manner) a family of polynomials (uij )i∈J1..nK,j∈J1..sK , with fj = i=1 Xi uij .  This gives a matrix U (X) = (uij ) and its image U (x) = uij (x) ∈ An×s . 2.8. Theorem. For a polynomial system over a ring k and a zero (ξ) ∈ kn , the ideal mξ of the point (ξ) is a finitely presented A-module. More precisely, with the previous notations, for the ξ = 0 case the matrix W = [ Rx | U (x) ] is a presentation matrix of the ideal m0 for the generator 188 IV. Finitely presented modules set (x1 , . . . , xn ). In other words we have an exact sequence [ Rx | U ] (x1 ,...,xn ) Am −−−−−→ An −−−−−→ m0 −→ 0 (m = n(n−1) 2 + s). J Take for example n = 3, s = 4, X = t[ X1 X2 X3 ] and to save on indices let us write f1 = X1 a1 + X2 a2 + X3 a3 , and f2 , f3 , f4 by using the letters b, c, d. We claim to have the following presentation matrix for the generator set (x1 , x2 , x3 ) of m0   x2 x3 0 a1 (x) b1 (x) c1 (x) d1 (x)  −x1 0 x3 a2 (x) b2 (x) c2 (x) d2 (x)  . 0 −x1 −x2 a3 (x) b3 (x) c3 (x) d3 (x) 3 We define A = t[ a1 a2 a3 ] in k[X] (as well as B, C, D) so that f1 = hA | Xi, f2 = hB | Xi . . . . Let v1 (x)x1 + v2 (x)x2 + v3 (x)x3 = 0 be a syzygy in A. We lift it in k[X] v1 X1 + v2 X2 + v3 X3 ≡ 0 mod f , which we write v1 X1 + v2 X2 + v3 X3 = αf1 + βf2 + γf3 + δf4 , α, β, γ, δ ∈ k[X]. t Therefore, with V = [ v1 v2 v3 ], V − (αA + βB + γC + δD) is a syzygy for (X1 , X2 , X3 ), which implies by Proposition 2.5 V − (αA + βB + γC + δD) ∈ Im RX . Thus, V ∈ Im [ RX | U (X) ], and t[ v1 (x) v2 (x) v3 (x) ] ∈ Im [ Rx | U (x) ].  3. The category of finitely presented modules The category of finitely presented modules over A can be constructed from the category of free modules of finite rank over A by a purely categorical procedure. 1. A finitely presented module M is described by a triplet (KM , GM , AM ), where AM is a linear map between the free modules of finite ranks KM and GM . We have M ' Coker AM and πM : GM → M is the surjective linear map with kernel Im AM . The matrix of the linear map AM is a presentation matrix of M . 2. A linear map ϕ of the module M (described by (KM , GM , AM )) to the module N (described by (KN , GN , AN )) is described by two linear maps Kϕ : KM → KN and Gϕ : GM → GN subject to the commutation §3. The category of finitely presented modules 189 relation Gϕ ◦ AM = AN ◦ Kϕ . KM AM πM AN  / GN //M ϕ Gϕ Kϕ  KN / GM πN  //N 3. The sum of two linear maps ϕ and ψ of M to N represented by (Kϕ , Gϕ ) and (Kψ , Gψ ) is represented by (Kϕ + Kψ , Gϕ + Gψ ). The linear map aϕ is represented by (aKϕ , aGϕ ). 4. To represent the composite of two linear maps, we compose their representations. 5. Finally, the linear map ϕ of M to N represented by (Kϕ , Gϕ ) is null if and only if there exists a Zϕ : GM → KN satisfying AN ◦ Zϕ = Gϕ . This shows that the problems concerning finitely presented modules can always be interpreted as problems regarding matrices, and are often reduced to problems concerning the solution of systems of linear equations over A. For example, given M , N and ϕ, if we look for a linear map σ : N → M satisfying ϕ ◦ σ = IdN , we must find linear maps Kσ : KN → KM , Gσ : GN → GM and Z : GN → KN satisfying Gσ ◦ AN = AM ◦ Kσ and AN ◦ Z = Gϕ ◦ Gσ − IdGN . This is none other than a system of linear equations having as unknowns the coefficients of the matrices of the linear maps Gσ , Kσ and Z. Analogously, if we have σ : N → M and if we want to know whether there exists a ϕ : M → N satisfying ϕ ◦ σ = IdN , We will have to solve a system of linear equations whose unknowns are the coefficients of the matrices of the linear maps Gϕ , Kϕ and Z. Similarly, if we have ϕ : M → N and if we want to know whether ϕ is locally simple, we must determine whether there exists a σ : N → M satisfying ϕ ◦ σ ◦ ϕ = ϕ, and we obtain a system of linear equations having as its unknowns the coefficients of the matrices of Gσ , Kσ and Z. We deduce the corresponding local-global principles. 3.1. Concrete local-global principle. (For certain properties of the linear maps between finitely presented modules) Let S1 , . . ., Sn be comaximal monoids of A and ϕ : M → N be a linear map between finitely presented modules. Then the following properties are equivalent. 1. The A-linear map ϕ admits a left-inverse (resp. admits a right-inverse, resp. is locally simple). 2. For i ∈ J1..nK, the ASi -linear map ϕSi : MSi → NSi admits a leftinverse (resp. admits a right-inverse, resp. is locally simple). 190 IV. Finitely presented modules 4. Stability properties 4.1. Proposition. Let N1 and N2 be two finitely generated A-submodules of an A-module M . If N1 + N2 is finitely presented, then N1 ∩ N2 is finitely generated. J We can follow almost word for word the proof of item 1 of Theorem II -3.4  (necessary condition). 4.2. Proposition. Let N be an A-submodule of M and P = M/N . 1. If M is finitely presented and N finitely generated, then P is finitely presented. 2. If M is finitely generated and P finitely presented, then N is finitely generated. 3. If P and N are finitely presented, then M is finitely presented. More precisely, if A and B are presentation matrices for N and P , we have a presentation matrix D = A C 0 B for M . J 1. We can suppose that M = Ap /F with F finitely generated. If N is finitely generated, it is of the form N = (F 0 + F )/F where F 0 is finitely generated, so P ' Ap /(F + F 0 ). 2. We write M = Ap /F and N = (F 0 + F )/F . We have P ' Ap /(F 0 + F ), so F 0 + F (and also N ) is finitely generated (Section 1). 3. Let x1 , . . . , xm be generators of N and xm+1 , . . . , xn be elements of M whose classes modulo N generate P . Every syzygy on (xm+1 , . . . , xn ) in P gives a syzygy on (x1 , . . . , xn ) in M . Similarly, every syzygy on (x1 , . . . , xn ) in M gives a syzygy on (xm+1 , . . . , xn ) in P . If A is a presentation matrix of N for (x1 , . . . , xm ) and if B is a presentation matrix of P for (xm+1 , . . . , xn ), we obtain a presentation matrix D of M for (x1 , . . . , xn ) in the desired format.  Note that in the proof of item 2 the submodules F and F 0 are not necessarily finitely generated. Coherence and finite presentation Propositions II -3.1 and II -3.7 (where we take A as the A-module M ) can be reread in the form of the following theorem. 4.3. Theorem. On a coherent ring every finitely presented module is coherent. On a strongly discrete coherent ring every finitely presented module is strongly discrete and coherent. §4. Stability properties 191 4.4. Proposition. Let A be a coherent ring and ϕ : M → N be a linear map between finitely presented A-modules, then Ker ϕ, Im ϕ and Coker ϕ are finitely presented modules. 4.5. Proposition. Let N be a finitely generated A-submodule of M . 1. If M is coherent, M/N is coherent. 2. If M/N and N are coherent, M is coherent. J 1. Consider a finitely generated submodule P = hx1 , . . . , x` i of M/N . Then P ' (hx1 , . . . , x` i + N )/N . We conclude by Proposition 4.2 that it is finitely presented. 2. Let Q be a finitely generated submodule of M . The module (Q + N )/N is finitely generated in M/N therefore finitely presented. Since (Q + N )/N and N are finitely presented, so is Q + N (Proposition 4.2). Therefore Q ∩ N is finitely generated (Proposition 4.1). Since N is coherent, Q ∩ N is finitely presented. Since Q/(Q ∩ N ) ' (Q + N )/N and Q ∩ N are finitely presented, Q is finitely presented (Proposition 4.2).  Tensor product, exterior powers, symmetrical powers Let M and N be two A-modules. A bilinear map ϕ : M × N → P is called a tensor product of the A-modules M and N if every bilinear map ψ : M × N → R is uniquely expressible in the form ψ = θ ◦ ϕ, where θ is an A-linear map from P to R. M ×N ϕ  P ψ θ! bilinear maps /& R linear maps. It is then clear that ϕ : M × N → P is unique in the categorical sense, i.e. that for every other tensor product ϕ0 : M × N → P 0 there is a unique linear map θ : P → P 0 which renders the suitable diagram commutative, and that θ is an isomorphism. If (g) is a generator set of M and (h) a generator set of N , a bilinear map λ : M × N → P is known from its values over the elements of g × h. Furthermore, the values λ(x, y) are linked by certain constraints, which are derived from syzygies between elements of g in M and from syzygies between elements of h in N . For example, if we have a syzygy a1 x1 + a2 x2 + a3 x3 =M 0 between elements xi of g, with the ai ’s in A, this provides for each y ∈ h the following syzygy in P : a1 λ(x1 , y) + a2 λ(x2 , y) + a3 λ(x3 , y) = 0. Actually, “those are the only essential constraints, and that shows that a tensor product can be constructed.” 192 IV. Finitely presented modules More precisely, let x ⊗ y instead of (x, y) be an arbitrary element of g × h. Consider then the A-module P generated by x ⊗ y elements linked by the syzygies described above (a1 (x1 ⊗ y) + a2 (x2 ⊗ y) + a3 (x3 ⊗ y) =P 0 for the given example). 4.6. Proposition. (With the above notations) 1. There exists a unique bilinear map ϕ : M × N → P such that for all (x, y) ∈ g × h, we have ϕ(x, y) = x ⊗ y. 2. With this bilinear map P is a tensor product of the modules M and N . In particular, if M and N are free with bases (g) and (h), the module P is free with basis (g ⊗ h) := (x ⊗ y)x∈g, y∈h . J The proof is left to the reader.  Thus, the tensor product of two A-modules exists and can always be defined from presentations of these modules. It is denoted by M ⊗A N . The fact that follows is more or less a paraphrase of the previous proposition, but it can only be stated once we know that tensor products exist. 4.7. Fact. 1. If two modules are finitely generated (resp. finitely presented) then so is their tensor product. 2. If M is free with basis (gi )i∈I and N is free with basis (hj )j∈J , then M ⊗ N is free with basis (gi ⊗ hj )(i,j)∈I×J . 3. If M ' Coker α and N ' Coker β, with α : L1 → L2 and β : L3 → L4 , the modules Li being free, then the A-linear map (α ⊗ IdL4 ) ⊕ (IdL2 ⊗ β) : (L1 ⊗ L4 ) ⊕ (L2 ⊗ L3 ) → L2 ⊗ L4 has as its cokernel a tensor product of M and N . Comments. 1) The theory of universal algebra provides profound reasons why the construction of the tensor product cannot fail to work. But this general theory is a little too heavy to be presented in this work, and it is best to soak up these kinds of things by impregnating examples. 2) The reader accustomed to classical mathematics would not have read without apprehension our “presentation” of the tensor product of M and N , which is a module constructed from presentations of M and N . If they have read Bourbaki, they will have noticed that our construction is the same as that of the illustrious multi-headed mathematician, except that Bourbaki limits himself to one “natural and universal” presentation: every module is generated by all its elements linked by all their syzygies. If Bourbaki’s “presentation” has the merit of universality, it has the inconvenience of the weight of the hippopotamus. §4. Stability properties 193 In fact, in constructive mathematics, we do not have the same underlying “set theory” as in classical mathematics. Once we have given a module M by means of a presentation α : L1 → L2 , we do not rush to forget α as we pretend to do in classical mathematics.2 On the contrary, from a constructive point of view, the module M is nothing other than “an encoding of the linear map α” (for example in the form of a matrix if the presentation is finite), with the additional information that this is the presentation of a module. Furthermore, a “quotient set” is not seen as a set of equivalence classes, but as “the same preset equipped with a coarser equality relation;” the quotient set of (E, =E ) by the equivalence relation ∼ is simply the set (E, ∼). Consequently, our construction of the tensor product, consistent with its implementation on a machine, is entirely “natural and universal” in the framework of constructive set theory (the reader can consult the simple and brilliant Chapter 3 of [Bishop], or one of the other classic works of reference on constructive mathematics [Beeson, Bishop & Bridges, Bridges & Richman, MRR]). 3) To construct the tensor product of nondiscrete modules, we a priori need the notion of a free module over a nondiscrete set. For the constructive definition of this kind of free module, see Exercise VIII -16. We can avoid this kind of free module in the following way. We do not use generator sets of M and N in the construction. The elements of the tensor product Pn M ⊗A N are given as formal sums i=1 xi ⊗ yi for finitely enumerated families in M and N . Now the problem is to give a correct definition of the equivalence relation which gives as quotient set the set underlying the module M ⊗A N . The details are left to the reader. By its definition, the tensor product is “functorial,” i.e. if we have two Alinear maps f : M → M 0 and g : N → N 0 , then there exists a unique linear map h : M ⊗A N → M 0 ⊗A N 0 satisfying the equalities h(x⊗y) = f (x)⊗g(y) for x ∈ M and y ∈ N . This linear map is naturally denoted by h = f ⊗ g. We also have the canonical isomorphisms ∼ ∼ M ⊗A N −→ N ⊗A M and M ⊗A (N ⊗A P ) −→ (M ⊗A N ) ⊗A P, which we express by saying that the tensor product is commutative and associative. The following fact immediately results from the description of the tensor product by generators and relations. 2A detailed inspection of the object M constructed according to the set theory of classical mathematics reveals that the latter does not forget it either. 194 IV. Finitely presented modules f g 4.8. Fact. For every exact sequence of A-modules M −→ N −→ P → 0 and for every A-module Q the sequence f ⊗IdQ g⊗IdQ M ⊗A Q −−−−→ N ⊗A Q −−−−→ P ⊗A Q → 0 is exact. We express this fact by saying that “the functor • ⊗ Q is right exact.” We will not recall in detail the statement of the universal problems that solve the exterior powers (already given page 41), symmetric powers and the exterior algebra of an A-module. Here are however the corresponding “small diagrams” for the last two. Mk sk A ψ  SkA M θ! symmetric multilinear maps %/ N A-modules M ψ ψ(x) × ψ(x) = 0 for all x ∈ M λA V  AM linear maps. θ! &/ B associative A-algebras. As a corollary of Proposition 4.6 we obtain the following proposition. 4.9. Proposition. If M is a finitely presented A-module, then the same Vk goes for A M and for the symmetric powers SkA M (k ∈ N). More precisely, if M is generated by the system (x1 , . . . , xn ) subjected to syzygies rj ∈ An , we obtain the following results. Vk 1. The module A M is generated by the k-vectors xi1 ∧ · · · ∧ xik for 1 6 i1 < · · · < ik 6 n, subjected to the syzygies obtained by making the exterior product of the rj syzygies by the (k − 1)-vectors xi1 ∧ · · · ∧ xik−1 . 2. The module SkA M is generated by the k-symmetric tensors s(xi1 , . . . , xik ) for 1 6 i1 6 · · · 6 ik 6 n, subjected to the syzygies obtained by making the product of the rj syzygies by the (k − 1)-symmetric tensors s(xi1 , . . . , xik−1 ). For example, with n = 4 and k = 2 a syzygy a1 x1 + · · · + a4 x4 = 0 in M V2 leads to 4 syzygies in A M a2 (x1 ∧ x2 ) a1 (x1 ∧ x2 ) a1 (x1 ∧ x3 ) a1 (x1 ∧ x4 ) + − + + a3 (x1 ∧ x3 ) a3 (x2 ∧ x3 ) a2 (x2 ∧ x3 ) a2 (x2 ∧ x4 ) + − − + a4 (x1 ∧ x4 ) a4 (x2 ∧ x4 ) a4 (x3 ∧ x4 ) a3 (x3 ∧ x4 ) = = = = 0 0 0 0 §4. Stability properties 195 and to 4 syzygies in S2A M a1 s(x1 , x1 ) a1 s(x1 , x2 ) a1 s(x1 , x3 ) a1 s(x1 , x4 ) + + + + a2 s(x1 , x2 ) a2 s(x2 , x2 ) a2 s(x2 , x3 ) a2 s(x2 , x4 ) + + + + a3 s(x1 , x3 ) a3 s(x2 , x3 ) a3 s(x3 , x3 ) a3 s(x3 , x4 ) + + + + a4 s(x1 , x4 ) a4 s(x2 , x4 ) a4 s(x3 , x4 ) a4 s(x4 , x4 ) = = = = 0 0 0 0 Remark. More generally, for every exact sequence u p K −→ G −→ M → 0 we have an exact sequence Vk ^k−1 ^k p ^k u0 K⊗ G −→ G −−−→ M →0 V k−1 with u0 (z ⊗ y) = u(z) ∧ y for z ∈ K, y ∈ G. On the right-hand side, the surjectivity is immediate and it is clear that Vk Vk ( p) ◦ u0 = 0, which allows us to define p0 : Coker u0 → M by passage to the quotient. It remains to prove that p0 is an isomorphism. For that, it Vk suffices to construct a linear map q 0 : M → Coker u0 that is the inverse 0 of p . We do not have a choice: for x1 , . . . , xk ∈ M with preimages y1 , . . . , yk ∈ G by p q 0 (x1 ∧ · · · ∧ xk ) = y1 ∧ · · · ∧ yk mod Im u0 . We leave it up to the reader to verify that q 0 is indeed defined and suitable. The analogous result is valid for the symmetric powers. Example. Let B be the ring of polynomials A[x, y] in the indeterminates x and y over a nontrivial ring A. Consider the ideal b = hx, yi of B, and look at it as a B-module that we denote by M . Then, M admits  the generator y set (x, y) for which a presentation matrix is equal to . Deduce −x that M ⊗B M admits (x ⊗ x, x ⊗ y, y ⊗ x, y ⊗ y) as a generator set, with a presentation matrix equal to   x⊗x y 0 0 y  −x x⊗y 0 y 0     0 y⊗x y 0 −x  y⊗y 0 −x −x 0 We deduce the following annihilators AnnB (x ⊗ y − y ⊗ x) = b, AnnB (x ⊗ y + y ⊗ x) = AnnA (2) b, AnnB (x ⊗ x) = AnnB (x ⊗ y) = AnnB (y ⊗ x) = AnnB (y ⊗ y) = 0. The dual M ? = LB (M, B) of M is free of rank 1, generated by the form α : M −→ B, z 7−→ z, which only gives partial information on the structure of M . For example, for every linear form β : M → B we have β(M ) ⊆ b and therefore M does 196 IV. Finitely presented modules not have any free direct summands of rank 1 (cf. Proposition II -5.1). Similarly, the dual (M ⊗B M )? of M ⊗B M is free of rank 1, generated by the form ϕ : M ⊗B M −→ B, z ⊗ z 0 7−→ zz 0 , and M ⊗B M does not possess a free direct summand of rank 1. Concerning S2B M , we find that it admits a generator set equal to s(x, x),  s(x, y), s(y, y) , with the presentation matrix   s(x, x) y 0  −x s(x, y) y . s(y, y) 0 −x V2 Concerning B M , we find that it is generated by x∧y with the presentation matrix [ x y ] which gives ^ 2 M ' B/b ' A. B But be careful of the fact that A as a B-module is a quotient and not a submodule of B. Changing the base ring Let ρ : A → B be an algebra. Every B-module P can be equipped with an def A-module structure via ρ by letting a.x = ρ(a)x. ρ 4.10. Definition. Let A −→ B be an A-algebra. 1. Let M be an A-module. An A-linear map map ϕ : M → P , where P is a B-module, is called a morphism of scalar extension (from A to B for M ), or a change of the base ring (from A to B for M ), if the following universal property is satisfied. A-modules M ϕ  P ψ θ! A-linear maps %/ R B-modules, B-linear maps For every B-module R, every A-linear map ψ : M → R is uniquely expressible in the form ψ = θ ◦ ϕ, where θ ∈ LB (P, R). 2. A B-module P such that there exist an A-module M and a morphism of scalar extension ϕ : M → P is said to be extended from A. We will also say that P stems from the A-module M by scalar extension. It is clear that a morphism of scalar extension ϕ : M → P is unique in the categorical sense, i.e. that for every other morphism of scalar extension ϕ0 : M → P 0 , there is a unique θ ∈ LB (P, P 0 ) which renders the suitable diagram commutative, and that θ is an isomorphism. §4. Stability properties 197 If (g) is a generator set of M and P an arbitrary B-module, an A-linear map λ : M → P is known from its values over the elements x of g. In addition, the values λ(x) are linked by certain constraints, which are derived from syzygies between elements of g in M . For example, if we have a syzygy a1 x1 + a2 x2 + a3 x3 =M 0 between elements xi of g, with the ai ’s in A, this provides the following syzygy between the λ(xi )’s in P : ρ(a1 )λ(x1 ) + ρ(a2 )λ(x2 ) + ρ(a3 )λ(x3 ) = 0. Actually “those are the only essential constraints, and that shows that a scalar extension can be constructed.” More precisely, let ρ? (x) replace x (an arbitrary element of g). Consider then the B-module M1 generated by the ρ? (x)’s, linked by the syzygies described above (ρ(a1 )ρ? (x1 ) + ρ(a2 )ρ? (x2 ) + ρ(a3 )ρ? (x3 ) =P 0 for the given example). 4.11. Proposition. (With the above notations) 1. a. There exists a unique A-linear map ϕ : M → M1 such that for all x ∈ g, we have ϕ(x) = ρ? (x). b. This A-linear map makes M1 a scalar extension from A to B for M . We will denote it by M1 = ρ? (M ). c. In the case of a finitely presented module, if M is (isomorphic to the) cokernel of a matrix F = (fi,j ) ∈ Aq×m , then M1 is (isomorphic to the) cokernel of the same matrix seen in B, i.e. the matrix  F ρ = ρ(fi,j ) . In particular, if M is free with basis (g), then M1 is free with basis ρ? (g). 2. Consequently the scalar extension from A to B for an arbitrary Amodule exists and can always be defined from a presentation of this module. If the module is finitely generated (resp. finitely presented) the scalar extension is as well. 3. Knowing that the scalar extensions exist, we can describe the previous construction (in a noncyclic manner) as follows: if M ' Coker α with α : L1 → L2 , the modules Li being free, then the module M1 = Coker ρ? (α) is a scalar extension from A to B for the module M . ρ ρ0 4. The scalar extension is transitive. If A −→ B −→ C are two “successive” algebras and if ρ00 = ρ0 ◦ ρ define the “composite” algebra , the canonical C-linear map ρ00? (M ) → ρ0? ρ? (M ) is an isomorphism. 5. The scalar extension and the tensor product commute. If M , N are A-modules and ρ : A → B is a homomorphism of rings, then the natural B-linear map ρ? (M ⊗A N ) → ρ? (M ) ⊗B ρ? (N ) is an isomorphism. 6. Similarly the scalar extension commutes with the construction of the exterior powers, of the symmetric powers and of the exterior algebra. 198 IV. Finitely presented modules 7. Seen as an A-module, ρ? (M ) is (uniquely) isomorphic to the tensor product B ⊗A M (here B is equipped with its A-module structure via ρ). In addition, the “external law” B × ρ? (M ) → ρ? (M ), which defines the B-module structure of ρ? (M ), is interpreted via the previous isomorphism like the A-linear map π ⊗A IdM : B ⊗A B ⊗A M −→ B ⊗A M, obtained from the A-linear map π : B ⊗A B → B “product in B” (π(b ⊗ c) = bc). f g 8. For every exact sequence of A-modules M −→ N −→ P → 0 the sequence ρ? (f ) ρ? (g) ρ? (M ) −−−−→ ρ? (N ) −−−−→ ρ? (P ) → 0 is exact. J The proof is left to the reader.  Thus, a B-module P is extended from A if and only if it is isomorphic to a module ρ? (M ). Care must be taken, however, to the fact that an extended B-module can be derived from several non-isomorphic A-modules. For example when we extend a Z-module to Q, “we kill the torsion,” and Z and Z ⊕ Z/h3i both give by scalar extension a Q-vector space of dimension 1. Remark. With the tensorial notation of item 7 the canonical isomorphism given at item 5 is written as ϕ C ⊗A M −−→ C ⊗B (B ⊗A M ) ' (C ⊗B B) ⊗A M, with ϕ(c⊗x) = c⊗(1B ⊗x). We will come back to this type of “associativity” in the remark that follows Corollary VIII -1.15. Modules of linear maps 4.12. Proposition. If M and N are finitely presented modules over a coherent ring A, then LA (M, N ) is finitely presented. J We use the notations of Section 3. Giving an element ϕ of LA (M, N ) reduces to giving the matrices of Gϕ and Kϕ that satisfy the condition Gϕ AM = AN Kϕ . Since the ring is coherent, the solutions of the system of linear equations form a finitely generated A-module, generated for example by the solutions corresponding to linear maps ϕ1 , . . . , ϕ` given by pairs of matrices (Gϕ1 , Kϕ1 ), . . . , (Gϕ` , KϕP ). Therefore LA (M, N ) = hϕ1 , . . . , ϕ` i. ` Furthermore, a syzygy i ai ϕi = 0 is satisfied P if and only if we have a linear map Zϕ : GM → KN satisfying AN Zϕ = i ai Gϕi . By taking the corresponding system of linear equations, whose unknowns are the ai ’s on the one hand and the coefficients of the matrix of Zϕ on the other, we note that the syzygy module for the generator set (ϕ1 , . . . , ϕ` ) is indeed finitely generated.  §4. Stability properties 199 The local character of the finitely presented modules The fact that an A-module is finitely presented is a local notion, in the following sense. 4.13. Concrete local-global principle. (Finitely presented modules) Let S1 , . . ., Sn be comaximal monoids of a ring A, and M an A-module. Then, M is finitely presented if and only if each of the MSi ’s is a finitely presented ASi -module. J Assume that MSi is a finitely presented ASi -module for each i. Let us show that M is finitely presented. By the local-global principle II -3.6, M is finitely generated. Let (g1 , . . . , gq ) be a generator set of M . Let (ai,h,1 ,. . . , ai,h,q ) ∈ AqSi be syzygies between the gj /1 ∈ MSi (in other P words, j ai,h,j gj = 0 in MSi ) for h = 1, . . . , ki , which generate the ASi syzygy module between the gj /1. Suppose without loss of generality that the ai,h,j ’s are of the form a0i,h,j /1, with a0i,h,j ∈ A. Then there exists some suitable si ∈ Si such that the vectors si (a0i,h,1 , . . . , a0i,h,q ) = (bi,h,1 , . . . , bi,h,q ) are A-syzygies between the gj ∈ M . Let us show that the syzygies thus constructed between the gj ’s generate all the syzygies. With this in mind, consider an arbitrary syzygy (c1 , . . . , cq ) between the gj ’s. Let us view it as a syzygy between the gj /1 ∈ MSi , and let us write it as an ASi -linear combination of the vectors (bi,h,1 , . . . , bi,h,q ) in AqSi . After multiplication by some suitable s0i ∈ Si we obtain an equality in Aq s0i (c1 , . . . , cq ) = ei,1 (bi,1,1 , . . . , bi,1,q ) + · · · + ei,ki (bi,ki ,1 , . . . , bi,ki ,q ). Pn We write i=1 ui s0i = 1. We see that (c1 , . . . , cq ) is an A-linear combination of the (bi,h,1 , . . . , bi,h,q ).  Null tensors P Let M and N be two arbitrary A-modules, and t = i∈J1..nK xi ⊗yi ∈ M ⊗N . P The equality P i xi ⊗ yi = 0 does Pnot a priori solely depend on knowing the submodules i Axi ⊆ M and i Ayi ⊆ N . P Consequently the notation i xi ⊗ yi is generally burdened with ambiguity, and P is dangerous. We should use the following more precise notation: i xi ⊗A,M,N yi , or at least write the equalities in the form P i x i ⊗ y i =M ⊗A N . . . This precaution is not needed in the case where the two modules M and N are flat (see Chapter VIII), for instance when the ring A is a discrete field. 200 IV. Finitely presented modules 4.14. Null tensor lemma. Let M = Ax1 + · · · + Axn be a finitely P generated module, N be another module and t = i∈J1..nK xi ⊗yi ∈ M ⊗A N . With X = [ x1 · · · xn ] ∈ M 1×n and Y = t[ y1 · · · yn ] ∈ N n×1 , we use the notation t = X Y . The following properties are equivalent. 1. t =M ⊗A N 0. 2. We have a Z ∈ N m×1 and a matrix G ∈ An×m which satisfy XG =M m 0 and GZ =N n Y . (1) J 2 ⇒ 1. Generally the equality X GZ = XG Z is guaranteed for every matrix G with coefficients in A because x ⊗ αz = αx ⊗ z when x ∈ M , z ∈ N and α ∈ A. 1 ⇒ 2. The equality t =M ⊗N 0 comes from a finite number of syzygies within the modules M and N . Therefore there exists a submodule N 0 such that Ay1 + · · · + Ayn ⊆ N 0 = Az1 + · · · + Azm ⊆ N, and X Y =M ⊗N 0 0. We write Z = t[ z1 · · · zm ]. We then have an exact sequence a π K −→ L −→ N 0 → 0 where L is free, with basis (`1 , . . . , `m ) and π(`j ) = zj , which gives an exact sequence I⊗a I⊗π M ⊗ K −−−→ M ⊗ L −→ M ⊗ N 0 → 0. If U ∈ M 1×m satisfies U Z =M ⊗N 0 0, this means that U seen as an P element of M ⊗ L ' M n (i.e. seen as j uj ⊗M ⊗L `j ) is in the submodule Ker(I ⊗ π) = Im(I ⊗ a), in other words  P P P P P j uj ⊗M ⊗L `j = i xi ⊗ ij aij `j = j i aij xi ⊗ `j P for aij ∈ A that satisfy j aij zj = 0. In other words U = XA for a matrix A satisfying AZ = 0. If we write Y = HZ with H ∈ An×m , we have XH Z = 0, which gives an equality XH = XA with a matrix A satisfying AZ = 0. We then let G = H − A and we have XG = 0 and GZ = HZ = Y .  5. Classification problems for finitely presented modules The first classification theorem concerns free A-modules of finite rank: two A-modules M ' Am and P ' Ap with m = 6 p can only be isomorphic if 1 =A 0 (Proposition II -5.2). Remark. Note that we use the expression “M is a free module of rank k” to mean that M is isomorphic to Ak , even in the case where we ignore whether §5. Classification problems 201 the ring A is trivial or not. This therefore does not always imply that a priori this integer k is well-determined. Rare are the rings for which we can give a “satisfactory” complete classification of the finitely presented modules. The case of discrete fields is well-known: every finitely presented module is free (this results from the Chinese pivot or from the freeness lemma). In this work we treat a few generalizations of this elementary case: the valuation rings, the PIDs and the reduced zero-dimensional rings (Sections 7 and 8), and certain Prüfer rings (Proposition XII -6.5 and Theorem XII -6.7). Concerning the classification of the finitely generated modules, we note the following two important uniqueness results. Two results concerning finitely generated modules 5.1. Theorem. Let a1 ⊆ · · · ⊆ an and b1 ⊆ · · · ⊆ bm be ideals of A with n 6 m. If an A-module M is isomorphic to A/a1 ⊕ · · · ⊕ A/an and to A/b1 ⊕ · · · ⊕ A/bm , then 1. we have bk = A for n < k 6 m, 2. and bk = ak for 1 6 k 6 n. We say that (a1 , . . . , an ) is the list of invariant factors3 of the module M . J 1. It suffices to show that if n < m, then bm = A, in other words that the ring B := A/bm is null. By letting M = A/a1 ⊕ · · · ⊕ A/an , we have Lm Ln Bm = j=1 A/(bj + bm ) ' M/bm M ' i=1 A/(ai + bm ). But each A/(ai + bm ) is a quotient ring of B, so there exists a surjective linear map from Bn onto Bm and therefore B is null (Proposition II -5.2). We assume henceforth without loss of generality that m = n. 2. It suffices to show that bk ⊆ ak for k ∈ J1..nK. Notice that for an ideal a and an element x of A, the kernel of the linear map y 7→ yx mod a, from A to x(A/a) is the ideal (a : x), and thus that x(A/a) ' A/(a : x). Now let x ∈ bk . For j ∈ Jk..nK, we have (bj : x) = A, and therefore Ln Lk−1 Ln xM ' j=1 A/(bj : x) = j=1 A/(bj : x), and xM ' i=1 A/(ai : x). By applying item 1 to the module xM with the integers k − 1 and n, we obtain (ak : x) = A, i.e. x ∈ ak .  Note that in the previous theorem, we have not assumed anything regarding the ideals (it is not necessary that they be finitely generated nor detachable for the result to be constructively valid). 3 Note that the list given here can be shortened or extended with terms a = h1i when j we do not have a test for the equality in question. This is comparable to the list of coefficients of a polynomial that can be shortened or extended with 0’s when the ring is not discrete. 202 IV. Finitely presented modules 5.2. Theorem. Let M be a finitely generated A-module and ϕ : M → M be a surjective linear map. Then, ϕ is an isomorphism and its inverse is a polynomial in ϕ. If a quotient module M/N of M is isomorphic to M , then N = 0. 5.3. Corollary. If M is a finitely generated module, every element ϕ right-invertible in EndA (M ) is invertible, and its inverse is a polynomial in ϕ. Proof of Theorem 5.2. Let (x1 , . . . , xn ) be a generator set of M , B = A[ϕ] ⊆ EndA (M ), and a = hϕi be the ideal of B generated by ϕ. The ring B is commutative and we consider M as a B-module. Since the linear map ϕ is surjective, there exists a P ∈ Mn (a) with P t[ x1 · · · xn ] = t[ x1 · · · xn ], i.e. (In − P ) t[ x1 · · · xn ] = t[ 0 · · · 0 ] (where In = (In )B is the identity matrix of Mn (B)), and so t t det(In − P ) t[ x1 · · · xn ] = (I^ n − P ) (In − P ) [ x1 · · · xn ] = [ 0 · · · 0 ]. Therefore det(In − P ) = 0B , but det(In − P ) = 1B − ϕ ψ with ψ ∈ B (since P has coefficients in a = ϕ B). Thus, ϕ ψ = ψ ϕ = 1B = IdM : ϕ is invertible in B.  6. Quasi-integral rings In the following definition, we infinitesimally modify the notion of an integral ring usually given in constructive mathematics, not for pleasure, but because our definition better corresponds to algorithms implementing integral rings. 6.1. Definition. A ring is said to be integral if every element is null or regular.4 A ring A is said to be quasi-integral when every element admits as its annihilator an (ideal generated by an) idempotent. In the literature, a quasi-integral ring is sometimes called a pp-ring (principal ideals are projective, cf. Section V -7). As usual, the “or” in the previous definition must be read as an explicit or. An integral ring is therefore a discrete set if and only if furthermore it is trivial or nontrivial. So, our nontrivial integral rings are precisely the “discrete domains” of [MRR]. In this work, sometimes we speak of a “nonzero element” in an integral ring, but we should actually say “regular element” in order not to exclude the trivial ring case. 4 An integral ring is also called a domain in the classical literature. But we prefer to keep “integral ring” in order to distinguish them from rings “witout zerodivisors”. See the definition on page 456. §6. Quasi-integral rings 203 6.2. Fact. A pp-ring is reduced. J If e is the idempotent annihilator of x and if x2 = 0, then x ∈ hei, therefore x = ex = 0.  A discrete field is an integral ring. A ring A is integral if and only if its total ring of fractions Frac A is a discrete field. A finite product of pp-rings is a pp-ring. A ring is integral if and only if it is a connected pp-ring. Equational definition of pp-rings In a pp-ring, for a ∈ A, let ea be the unique idempotent such that Ann(a) = h1 − ea i. We have A ' A[1/ea ] × A/hea i. In the ring A[1/ea ], the element a is regular, and in A/hea i, a is null. We then have eab = ea eb , ea a = a and e0 = 0. Conversely, suppose that a commutative ring is equipped with a unary law a 7→ a◦ which satisfies the following three axioms ◦ a◦ a = a, (ab) = a◦ b◦ , 0◦ = 0. ◦ (2) ◦ Then, for all a ∈ A, we have Ann(a) = h1 − a i, and a is idempotent, such that the ring is a pp-ring. Indeed, first of all (1 − a◦ )a = 0, and if ax = 0, then ◦ a◦ x = a◦ x◦ x = (ax) x = 0◦ x = 0, so x = (1 − a◦ )x. Hence Ann(a) = h1 − a◦ i. Next let us show that a◦ is idempotent. Apply the previous result to x = 1 − a◦ which satisfies ax = 0 (by the first axiom); the equality x = (1 − a◦ )x gives x = x2 , i.e. the element 1 − a◦ is idempotent. The following splitting lemma is almost immediate. 6.3. Quasi integral splitting lemma. Let x1 , . . . , xn be n elements in a pp-ring A. There exists a fundamental system of orthogonal idempotents (ej ) of cardinality 2n such that in each of the components A[1/ej ], each xi is null or regular. J Let ri be the idempotent such that hri i = Ann(xi ), and si = 1 − ri . By Q n expanding the product 1 = i=1 (ri + si ) we obtain the fundamental system Q Q of orthogonal idempotents indexed by Pn : eJ = j∈J rj k∈J / sk . We can delete certain elements of this system when we say that they are null.  From integral rings to pp-rings Knowing how to systematically split a pp-ring into two components leads to the following general method. The essential difference with the previous 204 IV. Finitely presented modules splitting lemma is that we a priori do not know the finite family of elements which will provoke the splitting. Elementary local-global machinery no. 1. Most algorithms that work with nontrivial integral rings can be modified in order to work with pp-rings, by splitting the ring into two components each time that the algorithm written for the integral rings uses the “is this element null or regular?” test. In the first component the element in question is null, in the second it is regular. A first example of an application of this local-global machinery will be given on page 207. However, Corollary 6.5 below could already be obtained from the integral case, where it is obvious, by applying this local-global machinery. Let us explain why we speak of elementary local-global machinery here. Generally a local-global principle says that a property P is true if and only if it is true “after localization at comaximal monoids.” In the current case, the comaximal monoids are generated by elements 1 − ri where the ri ’s form a fundamental system of orthogonal idempotents. Consequently the ring is simply isomorphic to the product of the localized rings, and the situation is therefore perfectly simple, elementary. Remark. The reader will have noticed the very informal formulation that we have given for this local-global machinery: “Most algorithms . . . ” This is because it seemed quite difficult to give very precise requirements in advance for the indicated method to work. We could imagine an algorithm which works for every integral ring, but in a completely non-uniform manner, which would make the corresponding tree that we construct in the pp-ring case not finite. For example, in the integral case, a given starting configuration would require three tests (to end the computation) if the answers are 0, 0, 0, but four tests if the answers are 0, 0, 1, 0, then five tests if the answers are 0, 0, 1, 1, 0, then six tests if they are 0, 0, 1, 1, 1, 1, then seven tests if they are 0, 0, 1, 1, 1, 0, 1, etc. Naturally, we can doubt that such an algorithm could exist without the existence of an integral ring that would fault it at the same time. In other words, an algorithm that is not sufficiently uniform is likely not an algorithm. But we do not assume anything. Even if we have not so far encountered any example of the above type where the elementary local-global machinery would not apply, we cannot a priori exclude such a possibility. Annihilators of the finitely generated ideals in pp-rings The following lemma can be considered as an economical variant of the splitting lemma 6.3. §6. Quasi-integral rings 205 6.4. Lemma. Let x1 , . . . , xn be elements of an A-module. If we have Ann(xi ) = hri i where ri is an idempotent (i ∈ J1..nK), let si = 1 − ri , t1 = s1 , t2 = r1 s2 , t3 = r1 r2 s3 , . . ., tn+1 = r1 r2 · · · rn . Then (t1 , . . . , tn+1 ) is a fundamental system of orthogonal idempotents and the element x = x1 + t2 x2 + · · · + tn xn satisfies Ann(x1 , . . . , xn ) = Ann(x) = htn+1 i . NB: in the component tk = 1 (k ∈ J1..nK), we have xk regular and xj = 0 for j < k, and in the component tn+1 = 1, we have x1 = · · · = xn = 0. 6.5. Corollary. Over a pp-ring A every finitely generated submodule M of a free module has as its annihilator an ideal hri with r idempotent, and M contains an element x having the same annihilator. This applies in particular to a finitely generated ideal of A. Proof of Lemma 6.4.We have t1 x1 = x1 and 1 = s1 + r1 = s1 + r1 (s2 + r2 ) = s1 + r1 s2 + r1 r2 (s3 + r3 ) = · · · = s1 + r1 s2 + r1 r2 s3 + · · · + r1 r2 · · · rn−1 sn + r1 r2 · · · rn so t1 , . . . , tn+1 is a fundamental system of orthogonal idempotents and x = t1 x1 + t2 x2 + · · · + tn xn . It is clear that htn+1 i ⊆ Ann(x1 , . . . , xn ) ⊆ Ann(x). Conversely, let z ∈ Ann(x). Then zx = 0, so zti xi = zti x = 0 for i ∈ J1..nK. Pn+1 Thus, zti ∈ Ann(xi ) = hri i and zti = zti ri = 0. Finally, since z = i=1 zti , we have z = ztn+1 ∈ htn+1 i.  Concrete local-global principle for the pp-rings The property of being a pp-ring is local in the following sense. 6.6. Concrete local-global principle. (pp-rings) Let S1 , . . ., Sn be comaximal monoids of A. The following properties are equivalent. 1. The ring A is a pp-ring. 2. For i = 1, . . ., n, each ring ASi is a pp-ring. J Let a ∈ A. For every monoid S of A we have AnnAS (a) = AnnA (a) S .  Therefore the annihilator a of a is finitely generated if and only if it is finitely generated after localization at the Si ’s (local-global principle II -3.6). Next the inclusion a ⊆ a2 is a matter of the basic concrete local-global principle II -2.3.  206 IV. Finitely presented modules 7. Bézout rings A ring A is called a Bézout ring when every finitely generated ideal is principal. This is the same as saying that every ideal with two generators is principal. ∀a, b ∃u, v, g, a1 , b1 (au + bv = g, a = ga1 , b = gb1 ) . (3) A Bézout ring is strongly discrete if and only if the divisibility relation is explicit. An integral Bézout ring is called a Bézout domain. A local ring is a ring A where is satisfied the following axiom ∀x, y ∈ A x + y ∈ A× =⇒ (x ∈ A× or y ∈ A× ) . (4) This is the same as asking ∀x ∈ A x ∈ A× or 1 − x ∈ A× . Note that according to this definition the trivial ring is local. Moreover, the “or” must be understood in the constructive sense: the alternative must be explicit. Most of the local rings with which we usually work in classical mathematics actually satisfy the previous definition if we look at it from a constructive point of view. Every quotient ring of a local ring is local. A discrete field is a local ring. 7.1. Lemma. (Bézout always trivial for a local ring) A ring is a local Bézout ring if and only if it satisfies the following property: ∀a, b ∈ A, a divides b or b divides a. J The condition is obviously sufficient. Assume A is Bézout and local. We have g(1 − ua1 − vb1 ) = 0. Since 1 = ua1 + vb1 + (1 − ua1 − vb1 ), one of the three terms in the sum is invertible. If 1 − ua1 − vb1 is invertible, then g = a = b = 0. If ua1 is invertible, then so is a1 , and a divides g which divides b. If vb1 is invertible, then so is b1 , and b divides g which divides a. Local Bézout rings are therefore “valuation rings” in the Kaplansky sense. We prefer the now usual definition: a valuation ring is a reduced local Bézout ring. Finitely presented modules over valuation rings A matrix B = (bi,j ) ∈ Am×n is said to be in Smith form if every coefficient out of the principal diagonal is null, and if for 1 6 i < inf(m, n), the diagonal coefficient bi,i divides the following bi+1,i+1 . 7.2. Proposition. Let A be a local Bézout ring. 1. Every matrix of Am×n is elementarily equivalent to a matrix in Smith form. 2. Every finitely presentedL A-module M is isomorphic to a direct sum of p modules A/hai i: M ' i=1 A/hai i, with in addition, for each i < p, ai+1 divides ai . §7. Bézout rings 207 J 1. We use the Gauss pivot method by choosing for first pivot a coefficient of the matrix which divides all the others. We finish by induction. 2. Direct consequence of item 1.  Remark. This result is completed by the uniqueness theorem (Theorem 5.1) as follows. 1. In the reduced matrix in Smith form the ideals hbi,i i are uniquely determined. Lp 2. In the decomposition i=1 A/hai i, the ideals hai i are uniquely determined, except that ideals in excessive numbers can be equal to h1i: we can delete the corresponding terms, but this only happens without fail when we have an invertibility test in the ring. A ring A is called a strict Bézout ring when every vector [ u v ] ∈ A2 can be transformed into a vector [ h 0 ] by multiplication by a 2 × 2 invertible matrix. Now we give an example of how the elementary local-global machinery no. 1 (described on page 204) is used. Example. We will show that every Bézout pp-ring is a strict Bézout ring. Let us start with the integral case. Let u, v ∈ A, ∃ h, a, b, u1 , v1 (h = au + bv, u = hu1 , v = hv1 ). If Ann(v) = 1, then v = 0 and [ u 0 ] = [ u v ] I2 . If Ann(v) = 0, then Ann(h) = 0,   h(au1 + bv1 ) = h, then au1 + bv1 = 1. a −v1 Finally, [ h 0 ] = [ u v ] and the matrix has determinant 1. b u1 Let us now apply the elementary local-global machinery no. 1 explained on page 204. Consider the idempotent e such that Ann(v) = hei and f = 1 − e. In A[1/e], we have [ u 0 ] = [ u v ] I2 .  a −v1 In A[1/f ], we have [ h 0 ] = [ u v ] . b u1   f a + e −f v1 Therefore in A, we have [ ue + hf 0 ] = [ u v ] , and the fb f u1 + e matrix has determinant 1. Finitely presented modules over PIDs Assume that A is a strict Bézout ring. If a and b are two elements on the same row (resp. column) in a matrix M with coefficients in A, we can postmultiply (resp. premultiply) M by an invertible matrix, which will modify the columns (resp. the rows) where the coefficients a and b are, which are replaced by c and 0. When describing this transformation of matrices, 208 IV. Finitely presented modules we will speak of Bézout manipulations. The elementary manipulations can be seen as special cases of Bézout manipulations. An integral ring is said to be a principal ideal domain (PID) when it is Bézout and when every ascending sequence of principal ideals admits two equal consecutive terms (cf. [MRR]). In other words a PID is a Noetherian Bézout domain (see definition II -3.2). Examples include Z and the polynomial ring K[X] when K is a discrete field. 7.3. Proposition. Let A be a PID. 1. Every matrix A ∈ Am×n is equivalent to a matrix in Smith form. By letting bi be the diagonal coefficients of the reduced matrix, the principal ideals hb1 i ⊇ · · · ⊇ hbq i (q = inf(m, n)) are invariants of the matrix A up to Pm equivalence. A basis (e1 , . . . , em ) of Am such that Im(A) = i=1 hbi i ei is called a basis adapted to the submodule Im(A). 2. For every finitely presented A-module M , there exist r, p ∈ N and regular elements a1 , . . . , ap , with ai dividing ai+1 for i < p, such Lp r that M is isomorphic to the direct sum i=1 A/hai i ⊕ A . If furthermore A is nontrivial and strongly discrete, we can ask in item 2 that no hai i be equal to h1i. In this case, we call invariant  factors of the module M the elements of the list a1 , . . . , ap , 0, . . . , 0 , and the list of r times invariant factors of M is well-defined5 “up to association.” Proof idea. By the Bézout manipulations on the columns, we replace the first row with a vector (g1 , 0, . . . , 0). By the Bézout manipulations on the rows, we replace the first column with a vector (g2 , 0, . . . , 0). We continue the process until we have gk A = gk+1 A for an index k. For example, with odd k this means that the last row operations by means of Bézout manipulations have been mistakenly applied, since gk divided the first column. We backtrack by a step, and use gk as a Gauss pivot. We thus obtain a matrix of the form g 0 .. . 0 ··· 0 B 0 By induction we obtain a “diagonal” reduced matrix. We finally verify that we can pass, by Bézout manipulations and elementary manipulations, from 5 We find the given definition in Theorem 5.1. We will however note that the order is reversed and that here we have replaced the principal ideals by their generators, all of this to conform to the most common terminology. §8. Zero-dimensional rings    a 0 c 0 to a matrix where c divides d. 0 b 0 d Item 2 is a direct consequence of item 1. 209  a matrix  Remarks. 1) A simpler algorithm can be devised if A is strongly discrete. 2) We still do not know (in 2014) if the conclusion of the previous proposition is true under the sole assumption that A is a Bézout domain. We have neither a proof, nor a counterexample. However, we do know that the result is true for Bézout domains of dimension 6 1; see the remark that follows Theorem XII -6.7. 8. Zero-dimensional rings We will say that a ring is zero-dimensional when the following axiom is satisfied. ∀x ∈ A ∃a ∈ A ∃k ∈ N xk = axk+1 (5) A ring is said to be Artinian if it is zero-dimensional, coherent and Noetherian. Basic properties 8.1. Fact. – Every finite ring and every discrete field is zero-dimensional. – Every quotient ring and every localized ring of a zero-dimensional ring is zero-dimensional. – Every finite product of zero-dimensional rings is a zero-dimensional ring. – A Boolean algebra (cf. Section VII -3) is a zero-dimensional ring. 8.2. Lemma. The following properties are equivalent. 1. A is zero-dimensional. 2. ∀x ∈ A ∃s ∈ A ∃d ∈ N∗ such that xd = hsi and s idempotent. 3. For every finitely generated ideal a of A, there exists a d ∈ N∗ such that ad = hsi where s is an idempotent, and in particular, Ann(ad ) = h1 − si and ae = ad for e > d. J 1 ⇒ 2. For all x ∈ A, there exist a ∈ A and k ∈ N such that xk = axk+1 . If k = 0 we have hxi = h1i, we take s = 1 and d = 1. If k > 1, we take d = k; by multiplying k times by ax, we obtain the equalities xk = axk+1 = a2 xk+2 = · · · = ak x2k . Therefore the element s = ak xk is an idempotent, xk = sxk , and xk = hsi. 210 IV. Finitely presented modules 2 ⇒ 1. We have s = bxd and xd s = xd . Therefore, by letting a = bxd−1 , we obtain the equalities xd = bx2d = axd+1 . 2 ⇒ 3. If a = x1 A + · · · + xn A, there exist idempotents s1 , . . . , sn ∈ A and integers d1 , . . . , dn > 1 such that xdi i A = si A. Let s = 1 − (1 − s1 ) · · · (1 − sn ), such that sA = s1 A + · · · + sn A. It is clear that the idempotent s belongs to a, and so to all the powers of a. Moreover, if d > d1 + · · · + dn − (n − 1) we have ad ⊆ xd11 A + · · · + xdnn A = s1 A + · · · + sn A = sA. The result follows since ad = sA. Finally, 3 clearly implies 2.  8.3. Corollary. If a is a faithful finitely generated ideal of a zerodimensional ring, then a = h1i. In particular, in a zero-dimensional ring, every regular element is invertible. J For d large enough the ideal ad is generated by an idempotent s. This ideal is regular, therefore the idempotent s is equal to 1.  8.4. Lemma. (Local zero-dimensional rings) The following properties are equivalent. 1. A is local and zero-dimensional. 2. Every element of A is invertible or nilpotent. 3. A is zero-dimensional and connected. Consequently a discrete field can also be defined as a reduced local zerodimensional ring. Reduced zero-dimensional rings Characteristic properties The equivalences of the following lemma are easy (see the proof of the analogous lemma, Lemma 8.2). 8.5. Lemma. (Reduced zero-dimensional rings) The following properties are equivalent. 1. The ring A is reduced and zero-dimensional. 2. Every principal ideal is idempotent (i.e., ∀a ∈ A, a ∈ a2 ). 3. Every principal ideal is generated by an idempotent. 4. Every finitely generated ideal is generated by an idempotent. 5. For every finite list (a1 , . . . , ak ) of elements of A, there exist orthogonal idempotents (e1 , . . . , ek ) such that for j ∈ J1..kK ha1 , . . . , aj i = ha1 e1 + · · · + aj ej i = he1 + · · · + ej i . §8. Zero-dimensional rings 211 6. Every ideal is idempotent. 7. The product of two ideals is always equal to their intersection. 8. The ring A is a pp-ring and every regular element is invertible. 8.6. Fact. 1. Let A be an arbitrary ring. If Ann(a) = hεi with ε idempotent, then the element b = a + ε is regular and ab = a2 . 2. If A is a pp-ring, Frac A is reduced zero-dimensional and every idempotent of Frac A is in A. J 1. Work modulo ε and modulo 1 − ε. 2. For some a ∈ A, we must find x ∈ Frac A such that a2 x = a. Let b = a + (1 − ea ) ∈ Reg A, then ab = a2 , and we take x = b−1 . Now let a/b be an idempotent of Frac A. We have a2 = ab. — Modulo 1 − ea , we have b = a and a/b = 1 = ea (because a is regular). — Modulo ea , we have a/b = 0 = ea (because a = 0). In short, a/b = ea . 8.7. Fact. A reduced zero-dimensional ring is coherent. It is strongly discrete if and only if there is an equality to zero test for the idempotents. We also easily obtain the following equivalences. 8.8. Fact. For a zero-dimensional ring A the following properties are equivalent. 1. A is connected (resp. A is connected and reduced). 2. A is local (resp. A is local and reduced). 3. Ared is integral (resp. A is integral). 4. Ared is a discrete field (resp. A is a discrete field). Equational definition of reduced zero-dimensional rings A not necessarily commutative ring satisfying ∀x ∃a xax = x is often qualified as Von Neumann regular. In the commutative case they are the reduced zero-dimensional rings. We also call them absolutely flat rings, because they are also characterized by the following property: every A-module is flat (see Proposition VIII -2.3). In a commutative ring, two elements a and b are said to be quasi-inverse if we have a2 b = a, b2 a = b (6) We also say that b is the quasi-inverse of a. Indeed, we check that it is unique. That is, if a2 b = a = a2 c, b2 a = b and c2 a = c, then c − b = a(c2 − b2 ) = a(c − b)(c + b) = a2 (c − b)(c2 + b2 ) = 0, since ab = a2 b2 , ac = a2 c2 and a2 (c − b) = a − a = 0. 212 IV. Finitely presented modules Moreover, if x2 y = x, we check that xy 2 is the quasi-inverse of x. Thus a ring is reduced zero-dimensional if and only if every element admits a quasi-inverse. As the quasi-inverse is unique, a reduced zero-dimensional ring can be regarded as a ring fitted with an additional unary law a 7→ a• subject to axiom (6) with a• instead of b. Note that (a• )• = a and (a1 a2 )• = a•1 a•2 . 8.9. Fact. A reduced zero-dimensional ring A is a pp-ring, with the idempotent ea = aa• : Ann(a) = h1 − ea i. We have A ' A[1/ea ] × A/hea i. In A[1/ea ], a is invertible, and in A/hea i, a is null. Zero-dimensional splitting lemma The following splitting lemma is almost immediate. The proof resembles that of the quasi-integral splitting lemma 6.3. 8.10. Lemma. Let (xi )i∈I be a finite family of elements in a zerodimensional ring A. There exists a fundamental system of orthogonal idempotents (e1 , . . . , en ) such that in each component A[1/ej ], each xi is nilpotent or invertible. From discrete fields to reduced zero-dimensional rings Reduced zero-dimensional rings look a lot like finite products of discrete fields, and this manifests itself precisely as follows. Elementary local-global machinery no. 2. Most algorithms that work with nontrivial discrete fields can be modified in order to work with reduced zero-dimensional rings, by splitting the ring into two components each time that the algorithm written for discrete fields uses the “is this element null or invertible?” test. In the first component the element in question is null, in the second it is invertible. Remarks. 1) We used the term “most” rather than “all” since the statement of the result of the algorithm for the discrete fields must be written in a form that does not specify that a discrete field is connected. 2) Moreover, the same remark as the one we made on page 204 concerning the elementary local-global machinery no. 1 applies here. The algorithm given in the discrete field case must be sufficiently uniform in order to avoid leading to an infinite tree when we want to transform it into an algorithm for the reduced zero-dimensional rings. We immediately give an application example of this machinery. §8. Zero-dimensional rings 213 8.11. Proposition. For a ring A the following properties are equivalent. 1. A is a reduced zero-dimensional ring. 2. A[X] is a strict Bézout pp-ring. 3. A[X] is a Bézout pp-ring. J 1 ⇒ 2. For discrete fields this is a classical fact: we use Euclid’s extended algorithm to compute in the form g(X) = a(X)u(X) a gcd  + b(X)v(X)  u −b1 of a(X) and b(X). In addition, we obtain a matrix with deterv a1 minant 1 which transforms [ a b ] into [ g 0 ]. This matrix is the product of  0 −1 matrices where the qi ’s are the successive quotients. 1 −qi Let us move on to the reduced zero-dimensional ring case (so a pp-ring). First of all A[X] is a pp-ring as the annihilator of a polynomial is the intersection of the annihilators of its coefficients (see Corollary III -2.3 2), hence generated by the product of the corresponding idempotents. The “strict Bézout” character of the algorithm which has just been explained for discrete fields a priori stumbles upon the obstacle of the non-invertibility of the leading coefficients in the successive divisions. Nonetheless this obstacle is avoided each time by considering a suitable idempotent ei , the annihilator of the coefficient to be inverted. In Ai [1/ei ], (where Ai = A[1/ui ] is the “current” ring with a certain idempotent ui ) the divisor polynomial has a smaller degree than expected and we start again with the following coefficient. In Ai [1/fi ], (fi = 1 − ei in Ai ), the leading coefficient of the divisor is invertible and the division can be executed. In this way we obtain a computation tree whose leaves have the desired result. At each leaf the result is obtained in a localized ring A[1/h] for a certain idempotent h, and the h’s at the leaves of the tree form a fundamental system of orthogonal idempotents. This allows us to glue together all the equalities.6 3 ⇒ 1. This results from the following lemma. Lemma. For an arbitrary ring A, if the ideal ha, Xi is a principal ideal of A[X], then hai = hei for a certain idempotent e. Suppose that ha, Xi = hp(X)i with p(X)q(X) = X. We therefore have hai = hp(0)i, p(0)q(0) = 0 and 1 = p(0)q 0 (0) + p0 (0)q(0), hence p(0) = p(0)2 q 0 (0). Thus, e = p(0)q 0 (0) is idempotent and hai = hei. Remark. The notion of a reduced zero-dimensional ring can be seen as the non-Noetherian analogue of the notion of a discrete field, since if the Boolean algebra of the idempotents is infinite, the Noetherianity is lost. Let us illustrate this with the example of the Nullstellensatz, for which it is not a priori clear if the Noetherianity is an essential ingredient or a simple 6 For a more direct proof, see Exercise 12. 214 IV. Finitely presented modules accident. A precise constructive statement of Hilbert’s Nullstellensatz (weak form) is formulated as follows. Let k be a nontrivial discrete field, (f1 , . . . , fs ) be a list of elements of k[X],  and A = k[X] f be the quotient algebra. Then, either 1 ∈ hf1 , . . . , fs i, or there exists a quotient of A that is a nonzero finite dimensional k-vector space. As the proof is given by a uniform algorithm (for further details see Theorem VII -1.5 and Exercise VII -3), we obtain by applying the elementary local-global machinery no. 2 the following result, without disjunction, which implies the previous Nullstellensatz for a nontrivial discrete field (this example also illustrates the first remark on page 212). An A-module M is said to be quasi-free if it is isomorphic to a finite direct sum of ideals hei i with the ei ’s idempotent. We can then in addition require that ei ej = ej if j > i, since for two idempotents e and f , we have hei ⊕ hf i ' he ∨ f i ⊕ he ∧ f i, where e ∧ f = ef and e ∨ f = e + f − ef. Let k be a reduced zero-dimensional ring, (f1 , . . . , fs ) be a list of elements of k[X1 , . . . , Xn ] and A be the quotient algebra. Then the ideal hf1 , . . . , fs i ∩ k is generated by an idempotent e, and by letting k1 = k/hei, there exists a quotient B of A which is a quasi-free k1 -module, the natural homomorphism k1 → B being injective. Finitely presented modules over reduced zero-dimensional rings 8.12. Theorem. (The reduced zero-dimensional ring paradise) Let A be a reduced zero-dimensional ring. 1. Every matrix is equivalent to a matrix in Smith form with idempotents on the principal diagonal. 2. Every finitely presented module is quasi-free. 3. Every finitely generated submodule of a finitely presented module is a direct summand. J The results are classical ones for the discrete field case (a constructive proof can be based on the pivot method). The elementary local-global machinery no. 2 then provides (for each of the three items) the result separately in each A[1/ej ], after splitting the ring into a product of localized rings A[1/ej ] for a fundamental system of orthogonal idempotents (e1 ,. . . , ek ). But the result is in fact formulated in such a way that it is globally true as soon as it is true in each of the components.  §8. Zero-dimensional rings 215 Zero-dimensional polynomial systems In this subsection we study a particularly important example of a zerodimensional ring, provided by the quotient algebras associated with zerodimensional polynomial systems over discrete fields. Recall the context studied in Section III -9 dedicated to Hilbert’s Nullstellensatz. If K ⊆ L are discrete fields, and if (f1 , . . . , fs ) is a polynomial system in K[X1 , . . . , Xn ] = K[X], we say that (ξ1 , . . . , ξn ) = (ξ) is a zero of f in Ln if the equations fi (ξ) = 0 are satisfied. The study of the variety of the zeros of the system is closely related to that of the quotient algebra associated with the polynomial system, namely  A = K[X] f = K[x] (xi is the class of Xi in A). Indeed, it amounts to the same to take a zero (ξ) of the polynomial system in Ln or to take a homomorphism of K-algebras ψ : A → L (ψ is defined by ψ(xi ) = ξi for i ∈ J1..nK). For h ∈ A, we write h(ξ) = ψ(h) for the evaluation of h at ξ. When K is infinite, Theorem III -9.5 gives us a Noether position by a linear change of variables, and an integer r ∈ J−1..nK satisfying the following properties (we do not change the name of the variables, which is a slight abuse). 1. If r = −1, then A = 0, i.e. 1 ∈ f . 2. If r = 0, each xi is integral over K, and A 6= 0. 3. If 0 < r < n, then K[X1 , . . . , Xr ] ∩ f = 0 and the xi for i ∈ Jr + 1..nK are integral over K[x1 , . . . , xr ] (which is isomorphic to K[X1 , . . . , Xr ]). 4. If r = n, f = 0 and A = K[X] 8.13. Lemma. (Precisions on Theorem III -9.5) 1. In the case where r = 0, the quotient algebra A is finite over K. 2. If the quotient algebra A is finite over K, it is strictly finite over K, and it is a zero-dimensional ring. We then say that the polynomial system is zero-dimensional. 3. If the ring A is zero-dimensional, then r 6 0. 4. Every strictly finite algebra over the discrete field K can be seen as (is isomorphic to) the quotient algebra of a zero-dimensional polynomial system over K. J 1. Indeed, if pi (xi ) = 0 for i ∈ J1..nK, the algebra A is a quotient of   B = K[X] pi (Xi ) i∈J1..nK , which is a finite dimensional K-vector space. 2. We start as we did in item 1. To obtain the algebra A, it suffices to take the quotient of B by the ideal hf1 (z), . . . , fs (z)i (where the zi ’s are the 216 IV. Finitely presented modules classes of Xi ’s in B). We easily see that this ideal is a finitely generated linear subspace of B, so the quotient is again a finite dimensional K-vector space. Thus, A is strictly finite over K. Let us show that A is zero-dimensional. Every x ∈ A annihilates its minimal  polynomial, say f (T ), so that we have an equality xk 1 + xg(x) = 0 (multiply f by the inverse of the nonzero coefficient of lower degree). 4. The algebra A is generated by a finite number of elements xi (for example a basis as a K-vector space), each of which annihilate their minimal polynomial, say pi (T ). Thus A is a quotient of an algebra .  pi (Xi ) i∈J1..nK = A[z1 , . . . , zn ]. B = K[X] The corresponding surjective morphism, from B over A, is a linear map whose kernel can be computed (since A and B are finite dimensional vector spaces), for example by specifying a generator set g1 (z), . . . , g` (z) . In conclusion, the algebra A is isomorphic to the quotient algebra associated  with the polynomial system p1 (X1 ), . . . , pn (Xn ), g1 (X), . . . , g` (X) . 3. This point results from the following two lemmas.  Remark. Traditionally, we reserve the term zero-dimensional polynomial system to the r = 0 case, but the quotient algebra is also zero-dimensional when r = −1. 8.14. Lemma. If the ring C[X1 , . . . , Xr ] is zero-dimensional with r > 0, then the ring C is trivial.  J We write X1m 1 − X1 P (X1 , . . . , Xr ) = 0. The coefficient of X1m is both equal to 0 and to 1.  8.15. Lemma. Let k ⊆ A and A be integral over k. If A is a zerodimensional ring, k is a zero-dimensional ring. J Let x ∈ k, then we have a y ∈ A such that xk = yxk+1 . Suppose for example that y 3 + b2 y 2 + b1 y + b0 = 0 with bi ∈ k. Then, xk = yxk+1 = y 2 xk+2 = y 3 xk+3 , and so 0 = (y 3 + b2 y 2 + b1 y + b0 )xk+3  = xk + b2 xk+1 + b1 xk+2 + b0 xk+3 = xk 1 + x(b2 + b1 x + b0 x2 ) .  8.16. Theorem. (Zero-dimensional system over a discrete field) Let K be a discrete field and (f1 , . . . , fs ) in K[X1 , . . . , Xn ] = K[X].  Let A = K[X] f be the quotient algebra associated with this polynomial system. The following properties are equivalent. 1. A is finite over K. 2. A is strictly finite over K. §8. Zero-dimensional rings 217 3. A is a zero-dimensional ring. If K is contained in a algebraically closed discrete field L, these properties are also equivalent to the following. 4. The polynomial system has a finite number of zeros in Ln . 5. The polynomial system has a bounded number of zeros in Ln . J When K is infinite, we obtain the equivalences by applying Lemma 8.13 and Theorem III -9.5. In the general case, we can also obtain a Noether position by using a (not necessarily linear) general change of variables as described in Lemma VII -1.4 (see Theorem VII -1.5).  A variation on the previous theorem is given in Theorem VI -3.15. Remark. Rather than using a non-linear change of variables as proposed in the previous proof, we can resort to using the technique of “changing the base field.” This works as follows. Consider an infinite field K1 ⊇ K, for example K1 = K(t), or an algebraically closed field K1 containing K if we know how to construct one. Then the equivalence of items 1, 2 and 3 is assured for the algebra A1 for the same polynomial system seen on K1 . The algebra A1 is obtained from A by scalar extension from K to K1 . It remains to see that each of the three items is satisfied for A if and only if it is satisfied for A1 . A task we leave to the reader.7 8.17. Theorem. (Stickelberger’s theorem) Same context as in Theorem 8.16, now with K being an algebraically closed field. 1. The polynomial system admits a finite number zeros over K. We write them as ξ 1 , . . . , ξ ` . 2. For each ξ k there exists an idempotent ek ∈ A satisfying ek (ξ j ) = δj,k (Kronecker symbol) for all j ∈ J1..`K. 3. The idempotents (e1 , . . . , e` ) form a fundamental system of orthogonal idempotents. 4. Each algebra A[1/ek ] is a zero-dimensional local ring (every element is invertible or nilpotent). 5. Let mk be the dimension of the K-vector space A[1/ek ]. P` We have [A : k] = k=1 mk and for all h ∈ A we have m Q` CA/k (h)(T ) = k=1 T − h(ξ k ) k . P` Q` In particular, TrA/k (h) = k=1 mk h(ξ k ) and NA/k (h) = k=1 h(ξ k )mk . 6. Let πk : A → K, h 7→ h(ξ k ) be the evaluation at ξ k , and mk = Ker πk . p k Then hek − 1i = mm and mk = hek − 1i. k 7 See on this subject Theorems VIII -6.2, VIII -6.7 and VIII -6.8. 218 IV. Finitely presented modules J Let V = ξ 1 , . . . , ξ ` be the variety of zeros of the system in Kn .  2 and 3. We have multivariate Lagrange interpolating polynomials Lk ∈ K[X] which satisfy Lk (ξ j ) = δj,k . Consider the Lk ’s as elements of A. Since A is zero-dimensional, there exist an integer d and an idempotent d ek with hek i = hLk i , therefore ek Ldk = Ldk and Ldk bk = ek for a certain bk . This implies that ek (ξ j ) = δj,k . For j 6= k, ej ek is null over V , so by the Nullstellensatz, ej ek is nilpotent in A. As it is an idempotent, ej ek = 0. The sum of the ej ’s is therefore an idempotent e. This element vanishes nowhere, i.e. it has the same zeros as 1. By the Nullstellensatz, we obtain p 1 ∈ hei. Thus e = 1 because it is an invertible idempotent of A. 4. The K-algebra Ak = A[1/ek ] = A/h1 − ek i is the quotient algebra associated with the polynomial system (f1 , . . . , fs , 1 − ek ) which admits ξ k as its only zero. Consider an arbitrary element h ∈ Ak . By reasoning as in the previous item, we obtain by the Nullstellensatz that if h(ξ k ) = 0, then h is nilpotent, and if h(ξ k ) 6= 0, then h is invertible. Q` 5. Since A ' k=1 Ak , it suffices to prove that for h ∈ Ak , we have the m equality CAk/k (h)(T ) = T −h(ξ k ) k . We identify K with its image in Ak . The element hk = h − h(ξ k ) vanishes in ξ k , so it is nilpotent. If µ designates multiplication by hk in Ak , µ is a nilpotent endomorphism. With respect to a suitable basis, its matrix is strictly lower triangular and that of the multiplication by h is triangular with h(ξ k )’s on the diagonal, therefore its m characteristic polynomial is T − h(ξ k ) k . 6. We clearly have ek − 1 ∈ mk . If h ∈ mk , the element ek h is null everywhere over V , so nilpotent. Therefore hN ek = 0 for a certain N and p k h ∈ hek − 1i. To show that mm = hek − 1i, we can locate ourselves k in Ak , where hek − 1i = 0. In this ring, the ideal mk is a K-vector space of dimension mk − 1. The successive powers of mk then form a decreasing sequence of finite dimensional K-linear subspaces, which stabilizes as soon k as two consecutive terms are equal. Thus mm is a finitely generated strict k idempotent ideal, therefore null.  Remarks. 1) The fact that the polynomial system is zero-dimensional results from a rational computation in the field of coefficients (in a Noether positioning or computation of a Gröbner basis). 2) Item 5 of Stickelberger’s theorem allows us to compute all the useful information on the zeros of the system by basing ourselves on the only trace form. In addition, the trace form can be computed in the field of coefficients of the polynomials of the system. This has important applications in computer algebra (see for example [Basu, Pollack & Roy]). §9. Fitting ideals 219 For examples, consult Exercise 15 and Problem 1. For a purely local study of the isolated zeros, see Section IX -4. 9. Fitting ideals The theory of the Fitting ideals of finitely presented modules is an extremely efficient computing machinery from a theoretical constructive point of view. It has an “elimination theory” side in so far as it is entirely based on computations of determinants, and it more or less disappeared for a while from the literature under the influence of the idea that we had to “eliminate the elimination” to escape the quagmire of computations whose meaning seemed unclear. The Fitting ideals are becoming fashionable once again and it is for the best. For more details, please consult [Northcott]. Fitting ideals of a finitely presented module 9.1. Definition. If G ∈ Aq×m is a presentation matrix of an A-module M given by q generators, the Fitting ideals of M are the ideals FA,n (M ) = Fn (M ) := DA,q−n (G) where n is an arbitrary integer. This definition is legitimized by the following easy but fundamental lemma. 9.2. Lemma. The Fitting ideals of the finitely presented module M are well-defined, in other words these ideals do not depend on the chosen presentation G for M . J To prove this lemma we must essentially show that the ideals Dq−n (G) do not change, 1. on the one hand, when we add a new syzygy, a linear combination of the already present syzygies, 2. on the other hand, when we add a new element to a generator set, with a syzygy that expresses this new element in relation to the previous generators. The details are left to the reader. We immediately have the following facts.  220 IV. Finitely presented modules 9.3. Fact. For every finitely presented module M with q generators, we have the inclusions h0i = F−1 (M ) ⊆ F0 (M ) ⊆ · · · ⊆ Fq (M ) = h1i . If N is a finitely presented quotient module of M, we have the inclusions Fk (M ) ⊆ Fk (N ) for all k > 0. Remark. In particular, if Fr (M ) 6= h1i the module M cannot be generated by r elements. We will see (lemma of the number of local generators page 494) that the meaning of the equality Fr (M ) = h1i is that the module is locally generated by r elements. 9.4. Fact. Let M be a rank k free A-module. Then, F0 (M ) = · · · = Fk−1 (M ) = h0i ⊆ Fk (M ) = h1i . L More generally, if M is quasi-free isomorphic to 16i6k hfi i, where the fi ’s are idempotents such that fi fj = fj if j > i, then Fk (M ) = h1i and Fi (M ) = h1 − fi+1 i for 0 6 i < k. Note that this provides a clever proof that if a module is free with two distinct ranks, the ring is trivial. Examples. 1. For a finite Abelian group H considered as a Z-module, the ideal F0 (H) is generated by the order of the group whilst the annihilator is generated by its exponent. In addition, the structure of the group is entirely characterized by its Fitting ideals. A generalization is given in Exercise 16. 2. Let us reuse the B-module M of Example on page 195. The computation gives the following results. • For M : F0 (M ) = 0, F1 (M ) = b and F2 (M ) = h1i, • for M 0 = M ⊗ M : F0 (M 0 ) = 0, F1 = b3 , F2 = b2 , F3 = b and F4 = h1i, • for M 00 = S2 (M ): F0 (M 00 ) = 0, F1 = b2 , F2 = b and F3 = h1i, V2 V2 V2 • for M : F0 ( M ) = b and F1 ( M ) = h1i. 9.5. Fact. (Changing the base ring) Let M be a finitely presented A-module, ρ : A → B be a homomorphism of rings, and ρ? (M ) be the B-module obtained by scalar  extension to B. We have for every integer n > 0 the equality ρ Fn (M ) = Fn ρ? (M ) .  In particular, if S is a monoid, we have Fn (MS ) = Fn (M ) S . The two following facts are less obvious. §9. Fitting ideals 221 9.6. Lemma. (Annihilator and first Fitting ideal) Let M be a finitely presented A-module generated by q elements, we have Ann(M )q ⊆ F0 (M ) ⊆ Ann(M ). J Let (x1 , . . . , xq ) be a generator set of M , X = [ x1 · · · xq ] and G a presentation matrix for X. Let a1 , . . . , aq ∈ Ann(M ). Then, the diagonal matrix Diag(a1 , . . . , aq ) has as its columns linear combinations of the columns of G, so its determinant a1 · · · aq belongs to F0 (M ). This proves the first inclusion. Let δ be a minor of order q extracted from G. We will show that δ ∈ Ann(M ), hence the second inclusion. If δ corresponds to a submatrix H of G we have X H = 0, therefore δX = 0, and this indeed means that δ ∈ Ann(M ).  9.7. Fact. (Fitting ideals and exact sequences) Let 0 → N → M → P → 0 be an exact sequence of finitely presented modules. For all p > 0 we have P Fp (M ) ⊇ r>0,s>0,r+s=p Fr (N )Fs (P ), and if M ' N ⊕ P , the inclusion is an equality. J We can consider that N ⊆ M and P = M/N . We use the notations of item 3 of Proposition 4.2. We have apresentation  matrix D of M which is A C written “in a triangular form” D = . Then every product of a 0 B minor of order k of A and of a minor of order ` of B is equal to a minor of order k + ` of D. This implies the stated result for Fitting ideals. The second case is clear, with C = 0.  Example. On the polynomial ring A = Z[a, b, c, d], let  us consider the a b module M = Ag1 + Ag2 = Coker F where F = . Here g1 and g2 c d 2 are images of the natural basis (e1 , e2 ) of A . Let δ = det(F ). It is easily seen that δ e1 is a basis of the submodule Im F ∩ e1 A of A2 . Let N = Ag1 and P = M/N . Then the module N admits the presentation matrix [ δ ] for the generator set (g1 ) and P admits the presentation matrix [ c d ] for the generator set (g2 ). Consequently, we get F0 (M ) = F0 (N ) = hδi and F0 (P ) = hc, di. So the inclusion F0 (N )F0 (P ) ⊆ F0 (M ) is strict. Fitting ideals of a finitely generated module We can generalize the definition of the Fitting ideals to an arbitrary finitely generated module M as follows. If (x1 , . . . , xq ) is a generator set of M and if X = t[ x1 · · · xq ], we define Fq−k (M ) as the ideal generated by all the minors of order k of every matrix G ∈ Ak×q satisfying GX = 0. An alternative definition is that each Fj (M ) is the sum of all the Fj (N )’s 222 IV. Finitely presented modules where N ranges over the finitely presented modules that are surjectively sent onto M . This shows that the ideals defined thus do not depend on the considered generator set. The following remark is often useful. 9.8. Fact. Let M be a finitely generated A-module. 1. If Fk (M ) is a finitely generated ideal, then M is the quotient of a finitely presented module M 0 for which Fk (M 0 ) = Fk (M ). 2. If all the Fitting ideals are finitely generated, then M is the quotient of a finitely presented module M 0 having the same Fitting ideals as M . 10. Resultant ideal In what follows, we consider a ring k that we do not assume to be discrete. The resultant of two polynomials is at the heart of elimination theory. If f , g ∈ k[X] with f monic, the basic elimination lemma page 121 can be read in the algebra B = k[X]/hf i by writing  DB (g) ∩ k = Dk ResX (f, g) . It can then be generalized with the following result, which can be regarded as a very precise formulation of the Lying Over (see Lemma VI -3.12). 10.1. General elimination lemma. ρ 1. Let k −→ C be an algebra which is a k-module generated by m elements, a = Fk,0 (C) its first Fitting ideal and c = Ker ρ. Then a. c = Annk (C), b. cm ⊆ a ⊆ c and so Dk (c) = Dk (a) , c. if by some scalar extension ϕ : k → k0 we obtain the algebra ρ0 : k0 → C0 , then the ideal a0 := F0 (C0 ) is equal to ϕ(a)k0 and as a k0 -module, it is isomorphic to k0 ⊗k a ' ϕ? (a). 2. Let B ⊇ k be a k-algebra which is a free k-module of rank m, and b be a finitely generated ideal of B. a. The elimination ideal b ∩ k is the kernel of the canonical homomorphism ρ : k → B/b , i.e. the annihilator of the k-module B/b . b. The k-module B/b is finitely presented and we have  (b ∩ k)m ⊆ F0 (B/b ) ⊆ b ∩ k and DB (b) ∩ k = Dk F0 (B/b ) . We denote by Res(b) := Fk,0 (B/b ) what we call the resultant ideal of b. §10. Resultant ideal 223 J 1a and 1b. Indeed, a ∈ k annihilates C if and only if it annihilates 1C , if and only if ρ(a) = 0. The desired double inclusion is therefore given by Lemma 9.6 (also valid for finitely generated modules). 1c. The Fitting ideals are well-behaved under scalar extension. 2. Apply item 1 with C = B/b .  Remarks. 1) The resultant ideal in item 2 can be precisely described as follows. If b = hb1 , . . . , bs i we consider the generalized Sylvester mapping P ψ : Bs → B, (y1 , . . . , ys ) 7→ ψ(y) = i yi bi . It is a k-linear map between free k-modules of ranks ms and m. Then, we have Res(b) = Dm (ψ). 2) There are many generators for the ideal Res(b). Actually, there exist diverse techniques to decrease the number of generators by replacing Res(b) by a finitely generated ideal having considerably fewer generators but having the same nilradical. On this subject see the work given in Section III -9, especially Lemma III -9.2, the results of Chapter XIII on the number of radical generators of a radically finitely generated ideal (Theorem XIV -1.3), and the paper [58]. Now here is a special case of the general elimination lemma. This theorem completes Lemma III -9.2. 10.2. Theorem. (Algebraic elimination theorem: the resultant ideal) Let (f, g1 , . . . , gr ) be polynomials of k[X] with f monic of degree m. We let f = hf, g1 , . . . , gr i ⊆ k[X] and B = k[X]/hf i . r Let ψ : B → B be the generalized Sylvester mapping defined by P (y1 , . . . , yr ) 7→ ψ(y) = i yi gi . It is a k-linear map between free k-modules of respective ranks mr and m. Let a be the determinantal ideal Dm (ψ). 1. We have a = Fk,0 (k[X]/f ), and (f ∩ k)m ⊆ a ⊆ f ∩ k, and so Dk[X] (f) ∩ k = Dk (a). 2. Assume that k = A[Y1 , . . . , Yq ] and that f and the gi ’s are of total degree 6 d in A[Y , X]. Then the generators of Dm (ψ) are of total degree 6 d2 in A[Y ]. 3. The ideal a does not depend on f (under the sole assumption that f contains a monic polynomial). We call it the resultant ideal of f w.r.t. the indeterminate X and we denote it by ResX (f, g1 , . . . , gr ) or ResX (f), or Res(f). 4. If by some scalar extension θ : k → k0 we obtain the ideal f0 of k0 [X], then the ideal ResX (f0 ) ⊆ k0 is equal to θ ResX (f) k0 , and as a module  it is isomorphic to k0 ⊗k ResX (f) ' θ? ResX (f) . 224 IV. Finitely presented modules NB. Consider the basis E = (1, . . . , X m−1 ) of B over k. Let F ∈ km×mr be the matrix of ψ for the deduced bases of E. Its columns are the X j gk mod f for j ∈ J0..m − 1K, k ∈ J1..rK written over the basis E. We say that F is a generalized Sylvester matrix. By definition we have ResX (f) = Dm (F ). J Let b = f mod f = hg1 , . . . , gr i ⊆ B. We apply items 2 and 1c of the general elimination lemma by noticing that k[X]/f ' B/b , with f ∩ k = b ∩ k.  Remark. Thus Theorem 10.2 establishes a very narrow link between the elimination ideal and the resultant ideal. The advantages introduced by the resultant ideal over the elimination ideal are the following • the resultant ideal is finitely generated, • its computation is uniform, • it is well-behaved under scalar extension. Note that in the case where k = K[Y1 , . . . , Yq ], for K a discrete field, the elimination ideal is also finitely generated but its computation, for instance via Gröbner bases, is not uniform. However, the resultant ideal is only defined when f contains a monic polynomial and this limits the scope of the theorem. Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Give a detailed proof of Lemma 1.1. • Explain why Propositions II -3.1 and II -3.7 (when we take A as an A-module M ) can be read in the form of Theorem 4.3. • Prove Propositions 4.1 and 4.4. Give a detailed proof of Propositions 4.6 and 4.11. Show that A/a ⊗A A/b ' A/(a + b) . • Justify the statements contained in the Example on page 195. • Prove Lemmas or Facts 8.4, 8.5, 8.7 and 8.8. • Give algorithms for the three items of Theorem 8.12. • Prove Fact 9.8. Exercise 2. Let M ⊆ N be A-modules with M as direct factor in N . Prove that if N is finitely generated (resp. finitely presented), then so is M . Exercises and problems 225 Exercise 3. (Structure of an A[X]-module over An associated with A ∈ Mn (A)) Let A be a commutative ring and A ∈ Mn (A). We give An the structure of an A[X]-module by letting Q · x = Q(A) · x for Q ∈ A[X] and x ∈ An . We aim to give a presentation matrix for this A[X]-module. This generalizes Example 3) on page 179 given at the beginning of Section 1, where A is a discrete field. Let θA : A[X]n  An be the unique A[X]-morphism which transforms the canonical basis of A[X]n into that of An . By labeling these two canonical bases by the same name (e1 , . . . , en ), θA therefore transforms Q1 e1 + · · · + Qn en into Q1 (A) · e1 + · · · + Qn (A) · en . We will show that the sequence below is exact XI −A θ A A[X]n −−−n−−→ A[X]n −−→ An → 0 In other words An is a finitely presented A[X]-module and XIn − A is a presentation matrix for the generator set (e1 , . . . , en ). 1. Show that we have a direct sum of A-modules A[X]n = Im(XIn − A) ⊕ An . 2. Conclude the result. Exercise 4. (Description of the null tensors) P Let M and N be two A-modules and z = i∈J1..nK xi ⊗ yi ∈ M ⊗ N . 1. Show that z = 0 if and only if there exists a finitely generated submodule M1 P of M such that we have x ⊗ yi =M1 ⊗N 0. i∈J1..nK i 2. We write M1 = Ax1 + · · · + Axp where p > n. Let yk =N 0 for n < k 6 p. P x ⊗ yi =M1 ⊗N 0 to give a Use the null tensor lemma with the equality i∈J1..pK i characterization of the null tensors in the general setting. Exercise 5. Let M be an A-module, a be an ideal and S be a monoid of A. 1. Show that the canonical linear map M → M /aM solves the universal problem of the scalar extension for the homomorphism A → A/a (i.e. according to Definition 4.10, this linear map is a morphism of scalar extension from A to A/a for M ). Deduce that the natural linear map A/a ⊗A M → M /aM is an isomorphism. 2. Show that the canonical linear map M → MS solves the universal problem of the scalar extension for the homomorphism A → AS . Deduce that the natural linear map AS ⊗A M → MS is an isomorphism. Exercise 6. Prove  that every  matrix over a Bézout domain is equivalent to a T 0 matrix of the form , where T is triangular and the elements on the 0 0 diagonal of T are nonzero (naturally, the rows or columns indicated as zero can be absent). This equivalence can be obtained by Bézout manipulations. Generalize to pp-rings by using the general method explained on page 204. 226 IV. Finitely presented modules Exercise 7. (Strict Bézout rings) 1. For a ring A, show that the following properties are equivalent. a. If A ∈ An×m , there exists a Q ∈ GLm (A) such that AQ is a lower triangular matrix. b. Same as item a with (n, m) = (1, 2), i.e. A is a strict Bézout ring. c. For a, b ∈ A, there exist comaximal x, y ∈ A such that ax + by = 0. d. For (a) = (a1 , . . . , an ) in A, there exist a d ∈ A and a unimodular vector (a0 ) = (a01 , . . . , a0n ) satisfying (a) = d(a0 ); we then have hai = hdi. e. Same as item d with n = 2. 2. Show that the class of strict Bézout rings is stable under finite products, quotients and localization. In the following, we assume that A is a strict Bézout ring. 3. Let a, b, d2 ∈ A such that ha, bi = hd2 i. Show that there exist comaximal a2 , b2 ∈ A such that (a, b) = d2 (a2 , b2 ). We can consider d1 , a1 , b1 , u1 , v1 where (a, b) = d1 (a1 , b1 ), 1 = u1 a1 + v1 b1 and introduce (?) h a2 b2 i = h v1 −u1 a1 b1 ih ε k12 i where d1 = k12 d2 , d2 = k21 d1 , ε = k12 k21 − 1. 4. Same as in the previous item but with an arbitrary number of elements; i.e. for given (a) = (a1 , . . . , an ) in A and d satisfying hai = hdi, there exists (a0 ) = (a01 , . . . , a0n ), comaximal, such that a = da0 . 5. Show that every diagonal matrix Diag(a1 , . . . , an ) is SLn -equivalent to a diagonal matrix Diag(b1 , . . . , bn ) where b1 | b2 | · · · | bn . Moreover, if we let ai = hai i, bi = hbi i, we have bi = Si (a1 , . . . , an ) where Si is the “ith elementary symmetric function of a1 , . . . , an ” obtained by replacing each product with an intersection. For example, S2 (a1 , a2 , a3 ) = (a1 ∩ a2 ) + (a1 ∩ a3 ) + (a2 ∩ a3 ). P T Q Q In particular, b1 = i ai , bn = i ai . Moreover i A/ai ' i A/bi . This last result will be generalized to arithmetic rings (Corollary XII -1.7). Other “true” elementary symmetric functions of ideals intervene in Exercise 16. Exercise 8. (Smith rings, or elementary divisor rings) Define a Smith ring as a ring over which every matrix admits a reduced Smith form (cf. Section 7, page 206). Such a ring is a strict Bézout ring (cf. Exercise 7). Since over a strict Bézout ring, every square diagonal matrix is equivalent to a Smith matrix (Exercise 7, question 5 ), a ring is a Smith ring if and only if every matrix is equivalent to a “diagonal” matrix, without the condition of divisibility over the coefficients. These rings have been studied in particular by Kaplansky in [115], including the noncommutative case, then by Gillman & Henriksen in [89]. Here we will limit ourselves to the commutative case. Show that the following properties are equivalent. 1. A is a Smith ring. 2. A is a strict Bézout ring and every triangular matrix in M2 (A) is equivalent to a diagonal matrix. Exercises and problems 227 3. A is a strict Bézout ring, and if 1 ∈ ha, b, ci, then there exist (p, q), (p0 , q 0 ) such that 1 = pp0 a + qp0 b + qq 0 c. 4. A is a strict Bézout ring, and if ha, b, ci = hgi, then there exist (p, q), (p0 , q 0 ) such that g = pp0 a + qp0 b + qq 0 c. This gives a nice structure theorem for finitely presented modules, by taking into account the uniqueness of Theorem 5.1. Also note that this theorem implies the uniqueness of the Smith reduced matrix of a matrix A (by considering the cokernel module) in the following sense. By denoting by bi the diagonal coefficients of the reduced matrix, the principal ideals hb1 i ⊇ · · · ⊇ hbq i (q = inf(m, n)) are invariants of the matrix A up to equivalence. In terms of modules, these principal ideals characterize, up to automorphism of Am , the inclusion morphism P = Im(A) → Am . A basis (e1 , . . . , em ) of Am such that P = b1 A e1 + · · · + bm A em is called a basis of Am adapted to the submodule P . Let br = 0 if m > r > n, then we have hb1 i ⊇ · · · ⊇ hbr i. The principal ideals 6= h1i of this list are the invariant factors of the module M = Coker(A). Theorem 5.1 tells us that this list characterizes the structure of the module M . Finally, note that the Smith rings are stable under finite products, localization and passage to the quotient. Exercise 9. (Elementary example of determination of the group of units) 1. Let k be a reduced ring and A = k[Y, Z]/hY Zi = k[y, z] with yz = 0. Show, by using a Noether positioning of A over k, that A× = k× . 2. Let A = Z[a, b, X, Y ]/hX − aY, Y − bXi = Z[α, β, x, y] with x = αy and y = βx. Show that A× = {±1}; we therefore have Ax = Ay but y ∈ / A× x. Exercise 10. (Sufficient conditions for the surjectivity of A× → (A/a)× ) Also see Exercise IX -16. For an ideal a of a ring A, we consider the property (?) (?) A× → (A/a)× is surjective, i.e. for x ∈ A invertible modulo a, there exists a y ∈ A× such that y ≡ x mod a, or if Ax + a meets A× , then x + a meets A× . 1. Show that (?) is satisfied when A is zero-dimensional. 2. If (?) is satisfied for all principal ideals a, then it also is for all ideals a. 3. Assume (?) is satisfied. Let x, y be two elements of an A-module such that Ax = Ay; show that y = ux for some u ∈ A× . NB: Exercise 9 provides an example of a ring A with x, y ∈ A and Ax = Ay, but y ∈ / A× x. 4. Let A0 = A/Rad A , π : A  A0 be the canonical surjection and a0 = π(a). Show that if (?) is satisfied for (A0 , a0 ), then it is satisfied for (A, a). 228 IV. Finitely presented modules Exercise 11. (Computation of a torsion submodule) Let A be an integral coherent ring and M be a finitely presented A-module. Then the torsion submodule of M is a finitely presented module. More precisely, if we have a presentation matrix E for M with an exact sequence E π An −−→ A` −−→ M → 0 and if F is a matrix such that we have an exact sequence F t E Am −−→ A` −−→ An (the existence of the matrix F results from the fact that A is coherent) then the torsion submodule T(M ) of M is equal to π(Ker tF ) and isomorphic to Ker tF / Im E. Also show that the result can be generalized to the case where A is a coherent pp-ring. Exercise 12. (Euclid’s algorithm in the reduced zero-dimensional case) Here we give a more uniform version of the proof of Proposition 8.11 and we generalize it. Consider a reduced zero-dimensional ring A. 1. Let B be an arbitrary ring and b ∈ B such that hbi is generated by an idempotent.  For a ∈ B,  find a matrix M ∈ E2 (B) and d ∈ B satisfying the equality a d M = . In particular ha, bi = hdi. b 0 2. Give a “uniform” Euclidean algorithm for two polynomials of A[X]. 3. The ring A[X] is a Smith ring: give an algorithm which reduces every matrix over A[X] to a Smith form by means of elementary manipulations of rows and of columns. Exercise 13. (Syzygies in dimension 0) Here we give the generalization of the theorem according to which n + 1 vectors of Kn are linearly dependent, from the discrete fields case to that of the reduced zero-dimensional rings. Note that the syzygy, to be worthy of the name, must have comaximal coefficients. Let K be a reduced zero-dimensional ring, and y1 , . . . , yn+1 ∈ Kn . 1. Construct a fundamental system of orthogonal idempotents (ej )j∈J1..n+1K such that, in each component K[1/ej ], the vector yj is a linear combination of the yi ’s that precede it. 2. Deduce P that there exists a system of comaximal elements (a1 , . . . , an+1 ) in K such that a y = 0. i i i Remarks. 1) Recall the convention according to which we accept that certain elements of a fundamental system of orthogonal idempotents are null. We see in this example that the statement of the desired property is greatly facilitated by it. 2) We can either give an adequate working of the matrix of the yi ’s by elementary manipulations by basing ourselves on Lemma 6.4, or treat the discrete fields case then use the elementary local-global machinery no. 2 (page 212). Exercises and problems 229 Exercise 14. Let S1 , . . ., Sn be comaximal monoids of A. Show that A is zero-dimensional if and only if each of the ASi ’s is zero-dimensional. Exercise 15. (Presentation of an algebra which is free and finite as a module) Let B be a free A-algebra of rank n with basis e = (e1 , . . . , en ). We let ϕ : A[X] = A[X1 , . . . , Xn ]  B be the (surjective) homomorphism of A-algebras which performs Xi 7→ ei . Let ckij P be the structure constants defined by ei ej = k ckij ek . Consider a1 , . . . , an ∈ A P defined by 1 = k ak ek and let R0 = 1 − P k ak Xk , Rij = Xi Xj − P ckij Xk . Let a = hR0 , Rij , i 6 ji. Show that every f ∈ A[X] is congruent modulo a to a homogeneous polynomial of degree 1. Deduce that Ker ϕ = a. Exercise 16. (Some computations of Fitting ideals) 1. Determine the Fitting ideals of an A-module presented by a matrix in Smith form. 2. Determine the Fitting ideals of A/a . 3. Let E be a finitely generated A-module and a be an ideal. Show that Fk (E ⊕ A/a ) = Fk−1 (E) + Fk (E) a. 4. Determine the Fitting ideals of the A-module M = A/a1 ⊕ · · · ⊕ A/an in the case where a1 ⊆ a2 ⊆ · · · ⊆ an . 5. Determine the Fitting ideals of the A-module M = A/a1 ⊕ · · · ⊕ A/an without making any inclusion assumptions for the ideals ak . Compare F0 (M ) and Ann(M ). Exercise 17. (The Fitting ideals of a finitely generated A-module) Show that Facts 9.3, 9.5, 9.7 and Lemma 9.6 remain valid for finitely generated modules. Exercise 18. One of the characteristic properties of Prüfer rings (which will be studied in Chapter XII) is the following: if A ∈ An×m , B ∈ An×1 , and if the determinantal ideals of A and [ A | B ] are the same, then the system of linear equations AX = B admits a solution. 1. Let M be a finitely generated module over a Prüfer ring and N be a quotient of M . Show that if M and N have the same Fitting ideals, then M = N . 2. Show that if a finitely generated module M over a Prüfer ring has finitely generated Fitting ideals, then it is a finitely presented module. Exercise 19. (Kaplansky ideals) For an A-module M and an integer r we  denote by Kr (M ) the ideal which is a sum of all the conductors hm1 , . . . mr i : M for all the systems (m1 , . . . mr ) in M . We call it the Kaplansky ideal of order r of the module M . Thus, K0 (M ) = Ann(M ), and if M is generated by q elements, we have Kq (M ) = h1i. • Show that if Kq (M ) = h1i, M is finitely generated. 230 IV. Finitely presented modules • Show that if M is finitely generated, then for every integer r we have the inclusions p p Fr (M ) ⊆ Kr (M ) ⊆ Fr (M ) = Kr (M ). NB: see also Exercise IX -12. Exercise 20. (An elementary example of resultant ideals) Let f , g1 , . . . , gr ∈ A[X], f be monic of degree d > 1 and f = hf, g1 , . . . , gr i ⊆ A[X]. We will compare the ideal a = R(f, g1 , . . . , gr ) = cT Res(f, g1 + g2 T + · · · + gr T r−1 )  (Section III -9), and the resultant ideal b = Res(f) = FA,0 (A[X]/f ) (see the general elimination lemma of Section 10). 1. Let a0 = cT Res(f, g1 T1 + g2 T2 + · · · + gr Tr ) . Show the inclusions  a ⊆ a0 ⊆ b ⊆ f ∩ A. 2. Let A = Z[a, b, c] where a, b, c are three indeterminates, f = X d , g1 = a, g2 = b and g3 = c. Determine the ideals f ∩ A, a, a0 , b and check that they are distinct. Also check that R(f, g1 , g2 , g3 ) depends on the order of the gi ’s. Do we have (f ∩ A)d ⊆ a? Exercise 21. (Relators and elimination ideal) Let f1 (X), . . . , fs (X) ∈ k[X] = k[X1 , . . . , Xn ] (k is a commutative ring). Let a ⊆ k[Y ] = k[Y1 , . . . , Ys ] be the ideal of the relators over k of (f1 , . . . , fs ), i.e. a = Ker ϕ, where ϕ : k[Y ] → k[X] is the evaluation morphism Yi 7→ fi . Let gi = fi (X) − Yi ∈ k[Y , X] and f = hg1 , . . . , gs i. Prove that a = f ∩ k[Y ]. Thus, a is the elimination ideal of the variables Xj in the polynomial system of the gi ’s. Problem 1. (An example of a zero-dimensional system) Let k be a ring and a, b, c ∈ N∗ with a 6 b 6 c and at least one strict inequality. We define three polynomials fi ∈ k[X, Y, Z] f1 = X c + Y b + Z a , f2 = X a + Y c + Z b , f3 = X b + Y a + Z c . This is a matter of studying the system defined by these three polynomials. We denote by A = k[x, y, z] the k-algebra k[X, Y, Z]/hf1 , f2 , f3 i. 1. For an arbitrary ring k, is A free and finite over k? If so, compute a basis and give the dimension. 2. Give a detailed study of the system for k = Q and (a, b, c) = (2, 2, 3). That is, determine all the zeros of the system in a certain finite extension of Q (to be specified), their number and their multiplicities. 3. Is the localized algebra A1+hx,y,zi free over k? If so, give a basis. Exercises and problems 231 Problem 2. (The generic resultant ideal) Let d, r be two fixed integers with d > 1. In this exercise we study the generic resultant ideal b = Res(f, g1 , . . . , gr ) where f is monic of degree d, and g1 , . . . , gr are of degree d − 1, the coefficients of these polynomials being indeterminates over Z. The base ring is therefore k = Z[(ai )i∈J1..dK , (bji )j∈J1..rK,i∈J1..dK ] with Pd Pd f = X d + i=1 ai X d−i and gj = i=1 bji X d−i . 1. Put weights on the ai ’s and bij ’s such that b is a homogeneous ideal. 2. If S is the generalized Sylvester matrix of (f, g1 , . . . , gr ), specify the weight of the coefficients of S and those of its minors of order d. 3. Using a Computer Algebra system, study the minimal number of generators of b. We could replace Z with Q, introduce the ideal m of k generated by all the indeterminates and consider E = b/mb which is a finite dimensional vector space over k/m = Q. Problem 3. (Homogeneous Nakayama lemma and regular sequences) 1. (Regular sequence and algebraic independence) Let (a1 , . . . , an ) be a regular sequence of a ring A and k ⊆ A be a subring such that k ∩ ha1 , . . . , an i = {0}. Show that a1 , . . . , an are algebraically independent over k. 2. (Homogeneous Nakayama lemma) Let A = A0 ⊕ A1 ⊕ A2 ⊕ . . . be a graded ring and E = E0 ⊕ E1 ⊕ E2 ⊕ . . . be a graded A-module. We denote by A+ the ideal A1 ⊕ A2 ⊕ . . ., so that A/A+ ' A0 . a. Show that if A+ E = E, then E = 0. b. Let (ei )i∈I be a family of homogeneous elements of E. Show that if the ei ’s generate the A0 -module E/A+ E, then they generate the A-module E. Note that we do not assume that E is finitely generated. 3. Let B = B0 ⊕ B1 ⊕ B2 ⊕ . . . be a graded ring and h1 , . . . , hd be homogeneous elements of the ideal B+ . Let b = hh1 , . . . , hd i and A = B0 [h1 , . . . , hd ]. We therefore have B0 ∩ b = {0}, and A is a graded subring of B. Finally, let (ei )i∈I be a family of homogeneous elements of B that generate the B0 -module B/b. a. Verify that A0 = B0 and that b = A+ B then show that the ei ’s form a generator set of the A-module B. b. Suppose that (h1 , . . . , hd ) is a regular sequence and that the ei ’s form a basis of the B0 -module B/b. Show that h1 , . . . , hd are algebraically independent over B0 and that the ei ’s form a basis of the A-module B. Recap: Let B = B0 ⊕ B1 ⊕ B2 ⊕ . . . be a graded ring and (h1 , . . . , hd ) be a homogeneous regular sequence of the ideal B+ . If B/hh1 , . . . , hd i is a free B0 module, then B is a free B0 [h1 , . . . , hd ]-module and B0 [h1 , . . . , hd ] is a ring of polynomials in (h1 , . . . , hd ). 4. As a converse. Let B = B0 ⊕ B1 ⊕ B2 ⊕ . . . be a graded ring and h1 , . . . , hd be homogeneous elements of the ideal B+ , algebraically independent over B0 . If B is a free B0 [h1 , . . . , hd ]-module, then the sequence (h1 , . . . , hd ) is regular. 232 IV. Finitely presented modules Some solutions, or sketches of solutions Exercise 2. It suffices to apply Proposition 4.2. Directly: we consider a projector π : N → N having M as its image. If X is a generator set of N , then π(X) is a generator set of M . If N is finitely presented, the syzygy module for π(X) is obtained by taking the syzygies for X in N and the syzygies π(x) = x for each element x of X. Exercise 3. We start by noting that θA ◦ (XIn − A) = 0 and that θA is the identity over An . 1. Let us show that Im(XIn − A) ∩ An = 0. Let x ∈ Im(XIn − A) ∩ An , the preliminary computations give θA (x) = x and θA (x) = 0. Let us show that A[X]n = Im(XIn − A) + An . It suffices to show that X k ei ∈ Im(XIn − A) + An for k > 0 and i ∈ J1..nK. If k = 0 it is clear. For k > 0 we write X k In − Ak = (XIn − A) P j+`=k−1 X j A` . By applying this equality to ei , we obtain X k ei − Ak ei ∈ Im(XIn − A), so X k ei belongs to Im(XIn − A) + Ak ei ⊆ Im(XIn − A) + An . 2. Let y ∈ Ker θA . Let y = z + w with z ∈ Im(XIn − A) and w ∈ An . Therefore 0 = θA (y) = θA (z) + θA (w) = 0 + w and y = z ∈ Im(XIn − A). Exercise 4. (Description of the null tensors, general situation) 1. This results from the definition of the tensor product and from the fact that in algebra, computations are finite. t 2. Let X = [ x1 · · · xp ] ∈ M11×p , Y = P [ y1 · · · yp ] ∈ N p×1 . We have M1 = Ax1 + · · · + Axp and x ⊗ yi =M1 ⊗N 0, and by the null i∈J1..pK i tensor lemma, this equality holds if and only if there exist q ∈ N, G ∈ Ap×q and Z = t[ z1 · · · zq ] ∈ N q×1 that satisfy XG =M q 0 and GZ =N p Y . Exercise 7. 1 and 2 are left to the reader. 3. By construction, ε annihilates d2 (i.e. annihilates a, b). We therefore have the equalities d2 h a2 b2 i = h v1 −u1 a1 b1 ih d2 ε d2 k12 i = h v1 −u1 a1 b1 ih 0 d1 i = d1 h a1 b1 i = h a b i It remains to see that 1 ∈ ha2 , b2 i. By inverting the 2 × 2 matrix in (?) (of determinant 1), we see that the ideal ha2 , b2 i contains ε and k12 , so it contains 1 = k12 k21 − ε. 4. By induction on n, n = 2 being the previous question. Suppose n > 3. By induction, there exist d and comaximal b1 , . . . , bn−1 such that (a1 , . . . , an−1 ) = d(b1 , . . . , bn−1 ), so hai = hd, an i . Item 3 gives comaximal u, v and δ such that (d, an ) = δ(u, v). Then (a1 , . . . , an ) = (db1 , . . . , dbn−1 , δv) = δ(ub1 , . . . , ubn−1 , v), and h1i = hu, vi = hub1 , . . . , ubn−1 , vi. 5. First for n = 2 with (a, b). There is a d with (a, b) = d(a0 , b0 ) and 1 = ua0 + vb0 . Let m = da0 b0 = ab0 = ba0 ∈ hai ∩ hbi; we have hai ∩ hbi = hmi because if Solutions of selected exercises 233 x ∈ hai ∩ hbi, then x = x(ua0 + vb0 ) ∈ hba0 i + hab0 i = hmi. The SL2 (A)-equivalence is provided by the equality below  1 vb0 −1 ua0  a 0 0 b   = d 0 0 m  a0 v −b0 u  . For n > 3. By using the n = 2 case for the positions (1, 2), (1, 3), . . . , (1, n), we obtain Diag(a1 , a2 , . . . , an ) ∼ Diag(a01 , a02 , . . . , a0n ) with a01 | a0i for i > 2. By induction, Diag(a02 , . . . , a0n ) ∼ Diag(b2 , . . . , bn ) where b2 | b3 · · · | bn . We then check that a01 | b2 and we let b1 = a01 . The scrupulous reader will check the property regarding elementary symmetric functions. Exercise 8. (Smith rings, or elementary divisor rings)   a b Preliminary computation with A = and B of the form 0 c  B= p0 ∗ q0 ∗   A p q ∗ ∗  . The coefficient b11 of B is equal to b11 = p0 (pa + qb) + q 0 qc. 2 ⇒ 3. The matrix A is equivalent to a diagonal matrix Diag(g, h), which gives (p, q) and (p0 , q 0 ) comaximal with g = p0 (pa + qb) + q 0 qc (preliminary computation), and we have ha, b, ci = hg, hi. As A is a strict Bézout ring, we can suppose that g | h and since 1 ∈ ha, b, ci, g is invertible and so 1 is expressed as required. 3 ⇒ 4. Beware, here g is imposed. But by question 4 of Exercise 7, we can write (a, b, c) = g (a0 , b0 , c0 ) with (a0 , b0 , c0 ) comaximal. We apply item 3 to (a0 , b0 , c0 ) and multiply the obtained result by g.   a b . With the parameters 0 c of item 4, we construct (preliminary computation) a matrix B equivalent to A with coefficient b11 = g. As g divides all the coefficients of B, we have 4 ⇒ 2. Let A ∈ M2 (A) be triangular, A = E2 (A) B ∼ Diag(g, h). 1 ⇔ 2. Left to the reader (who can consult Kaplansky’s paper). Exercise 9. 1. Let s = y + z. Then k[s] is a polynomial ring in s, and y, z are integral over k[s], because they are zeros of (T − y)(T − z) = T (T − s) ∈ k[s][T ]. We easily check that A is free over k[s] with (1, y) as its basis. For u, v ∈ k[s], the norm over k[s] of u + vy is NA/k[s] (u + vy) = (u + vy)(u + vz) = u2 + suv = u(u + sv). The element u + vy is invertible in A if and only if u(u + sv) is invertible in k[s]. As k is reduced, (k[s])× = k× . Therefore u ∈ k× and v = 0. 2. We have A = Z[α, β, y] = Z[a, b, Y ]/h(ab − 1)Y i with y(αβ − 1) = 0. Let t be an indeterminate over Z and k = Z[t, t−1 ]. Consider the k-algebra k[y, z] with the sole syzygy yz = 0. We have a morphism A → k[y, z] which performs α 7→ t(z + 1), β 7→ t−1 , y 7→ y, and we check that it is an injection. Then an element w ∈ A× is also in k[y, z]× , and as k is reduced, w ∈ k× . Finally, the units of k = Z[t, t−1 ] are the ±tk with k ∈ Z, so w = ±1. 234 IV. Finitely presented modules Exercise 10. 1. We know that hxn i = hei. We look for y ∈ A× such that y ≡ x mod a over the components Ae and A1−e . First, we have xn (1 − ax) = 0 and x invertible modulo a, so ax ≡ 1 mod a then e ≡ 1 mod a, i.e. 1 − e ∈ a. In the component Ae , x is invertible, so we can take y = x. In the component A1−e , 1 ∈ a, so we can take y = 1. Globally, we therefore propose that y = ex + 1 − e which is indeed invertible (with inverse ean xn−1 + 1 − e) and which satisfies y ≡ x mod a. Remark: y = ex + (1 − e)u with u ∈ A× is also suitable. 2. Let x be invertible modulo a so 1 − ax ∈ a for some a ∈ A. Then, x is invertible modulo the principal ideal h1 − axi, therefore there exists a y ∈ A× such that y ≡ x mod h1 − axi, a fortiori y ≡ x mod a. 3. We write y = bx, x = ay so (1 − ab)x = 0; b is invertible modulo h1 − abi so there exists a u ∈ A× such that u ≡ b mod h1 − abi whence ux = bx = y. 4. Let x be invertible modulo a. Then π(x) is invertible modulo a0 , whence y ∈ A such that π(y) is invertible in A0 and π(y) ≡ π(x) mod a0 . Then, y is invertible in A and y − x ∈ a + Rad A, i.e. y = x + a + z with a ∈ a and z ∈ Rad A. Thus, the element y − z is invertible in A, and y − z ≡ x mod a. Exercise 11. Let us call A1 the quotient field of A and let us put an index 1 to indicate that we are performing a scalar extension from A to A1 . Thus M1 is the A1 -vector space corresponding to the exact sequence E π 1 1 ` An 1 −→ A1 −→ M1 → 0 and the submodule T(M ) of M is the kernel of the natural A-linear map from M to M1 , i.e. the module π(A` ∩ Ker π1 ), or the module π(A` ∩ Im E1 ) (by regarding A` as a submodule of A`1 ). F t E The exact sequence Am −→ A` −→ An gives by localization the exact sequence t F E 1 1 ` n Am 1 −→ A1 −→ A1 and since A1 is a discrete field this gives by duality the exact sequence E t F 1 1 ` m An 1 −→ A1 −→ A1 . Thus Im E1 = Ker tF1 , so A` ∩ Im E1 = A` ∩ Ker tF1 . Finally, we have the equality A` ∩ Ker tF1 = Ker tF because the natural morphism A → A1 is injective. Conclusion: T(M ) is equal to π(Ker tF ), isomorphic to Ker tF / Im E, and therefore is finitely presented (because A is coherent). If A is a coherent pp-ring, the total ring of fractions A1 = Frac A is reduced zero-dimensional, and all the arguments given in the integral case work similarly. Exercise 12. All the results can be obtained from the discrete field case, for which the algorithms are classical, by using the elementary local-global machinery of zero-dimensional rings. Here we will clarify this very general affirmation. Let us put two preliminary remarks for an arbitrary ring A. First, let e be idempotent and E be an elementary matrix modulo 1 − e. If we lift E to a matrix F ∈ Mn (A), then the matrix (1 − e)In + eF ∈ En (A) is elementary, it acts like E in the component A/h1 − ei, and it does nothing in the component A/hei. This allows us to understand how we can retrieve the desired results over A by using analogous results modulo the idempotents 1 − ei when we Solutions of selected exercises 235 have a fundamental system of orthogonal idempotents (e1 , . . . , ek ) (provided by the algorithm that we build). Second, if g ∈ A[X] is monic of degree m > 0, for all f ∈ A[X], we can divide f by g: f = gq + r with r of formal degree m − 1. 1. Let e be the idempotent such that hei = hbi. It suffices to solve the question modulo e and 1 − e. In the branch e = 1, b is invertible, ha, bi = h1i and the problem is solved (Gauss pivot). In the branch e = 0, b is null and the problem is solved. If e = bx, we find d = e + (1 − e)a and  M = E21 (−be)E12 ex(1 − a) =  1 −eb ex(1 − a) ae + (1 − e)  . 2. We start from two polynomials fand g. We  will  build a polynomial h and a f h matrix M ∈ E2 (A[X]) such that M = . A fortiori hf, gi = hhi. g 0 We proceed by induction on m, the formal degree of g, with formally   leading   f f coefficient b. If we initiate the induction at m = −1, g = 0 and I2 = , g 0 we can treat m = 0, with g ∈ A and use item 1 (B = A[X], a = f , b = g). But it is pointless to treat this case separately (and so we no longer use item 1 ). Indeed, if e is the idempotent such that hei = hbi, it suffices to solve the question modulo e and 1 − e and what follows holds for all m > 0. In the branch e = 1, b is invertible, and since m > 0, we can perform a classical Euclidean division of f by g: f = qg − r with the formal  degree   of r equal to g f m − 1.  We geta matrix N ∈ E2 (A[X]) such that N g = r , namely 0 1 N= . We can then apply the induction hypothesis. −1 q In the branch e = 0, g is of formal degree m − 1 and the induction hypothesis applies. In the following, we use item 2 by saying that we pass from t[ f g ] to t[ h 0 ] by means of “Bézout manipulations.” 3. By relying on the result of item 2 we are inspired by the proof of Proposition 7.3 (a PID is a Smith ring). If we were in a nontrivial discrete field, the algorithm would terminate in a finite number of steps which can be directly bounded in terms of (D, m, n), where D is the maximum degree of the coefficients of the matrix M ∈ A[X]m×n that we want to reduce to the Smith form. It follows that when A is reduced zero-dimensional the number of splittings produced by the gcd computations (as in item 2 ) is also bounded in terms of (D, m, n), where D is now the maximum formal degree of the entries of the matrix. This shows that the complete algorithm, given the preliminary remark, also terminates in a number of steps bounded in terms of (D, m, n). Remark. The algorithms do not require that A be discrete. 236 IV. Finitely presented modules Exercise 15. It is clear that a ⊆ Ker ϕ. Let E ⊆ A[X] be the set of polynomials f congruent modulo a to a homogeneous polynomial P of degree 1. We have 1 ∈ E and f ∈ E ⇒ Xi f ∈ E because if f ≡ j αj Xj mod a, then Xi f ≡ P j αj Xi Xj ≡ P j,k αj ckij Xk mod a. Therefore E = A[X]. Let f ∈ Ker ϕ. We write f ≡ P Then ϕ(f ) = 0 = k αk ek , so αk = 0, then f ∈ a. P k αk Xk mod a. Exercise 16. 2. If a is finitely generated a presentation matrix of the module M = A/a is a matrix row L having for coefficients generators of the ideal. We deduce that D1 (L) = a. Therefore F−1 (M ) = 0 ⊆ F0 (M ) = a ⊆ F1 (M ) = h1i. The result can be generalized to an arbitrary ideal a. 3. Results from 2 and Fact 9.7. 4 and 5. In the general case by applying 2 and 3 we find Qn Pn F0 (M ) = i=1 ai , Fn−1 (M ) = i=1 ai , and for the intermediate ideals the “symmetric functions” Fn−k (M ) = P 16i1 <...<ik 6n Qk `=1 ai` . In addition, Ann(M ) = a1 ∩ · · · ∩ an . When a1 ⊆ a2 ⊆ · · · ⊆ an the result is a little simpler Fn−1 (M ) = an , Fn−2 (M ) = an an−1 , . . . Fn−k (M ) = an · · · an−k+1 . We then find for item 1 the result of the direct computation given by the determinantal ideals of a matrix in Smith form. Exercise 18. Let us prove item 1 (afterwards P we can apply Fact 9.8). Take M = hg1 , . . . , gq i. Consider a syzygy α g =N 0. The aim is to show i i i that the column vector V = (α1 , . . . , αq ) is a syzygy in M . First case, M is finitely presented. Adding the V column to a presentation matrix F of M for (g1 , . . . , gq ) does not change the determinantal ideals of this matrix, so V is a linear combination of the columns of F . Second case, M is finitely generated. Since D1 (V ) ⊆ Fq−1 (M ), there exists a matrix F1 of syzygies for (g1 , . . . , gq ) in M with D1 (V ) ⊆ D1 (F1 ). Since D2 (V |F1 ) ⊆ Fq−2 (M ), there exists a matrix F2 of syzygies for (g1 , . . . , gq ) in M with D2 (V |F1 ) ⊆ D2 (F1 |F2 ), but also of course D1 (V |F1 ) ⊆ D1 (F1 |F2 ), and so on until there exists a matrix F = [ F1 | · · · | Fq ] of syzygies for (g1 , . . . , gq ) in M such that the determinantal ideals of [V |F ] are contained in those of F . Therefore V is a linear combination of the columns of F . Exercise 19. If a Kaplansky ideal is equal to 1, then the module is finitely generated, because the module is finitely generated in the localized rings A[1/ai ]’s with the ai ’s being comaximal. Key idea: the Kaplansky ideals are a little more general, but apparently useless in the case where the module is not finitely generated. The Kaplansky ideals present the advantage over the Fitting ideals of allowing a characterization of the finitely generated modules. Solutions of selected exercises 237 For the second item, here is what happens. If a is a typical generator of Kr (M ) and if M is generated by (g1 , ..., gq ), we know that there exists (h1 , ..., hr ) in M such that aM is contained in hh1 , ..., hr i. A matrix of syzygies  for the generator set (g1 , ..., gq , h1 , ..., hr ) is then of the aIq following form with B of size r × q. This simply means that we can B express agj in terms of the hi ’s. Therefore in the Fitting ideal of order r of the module there is a typical generator which is the determinant of aIq i.e. aq . Thus, every typical generator of the Kaplansky ideal is in the nilradical of the corresponding Fitting ideal. Note that the exponent that intervenes here is simply the number of generators of the module. Now if a is a typical generator of Fr (M ) we obtain a as a minor of order q − r for a matrix of syzygies between q generators (g1 , ..., gq ). Even if it involves N renumbering the generators, this matrix can be expressed as where D is a D square matrix of order q − r, N is an r × (q − r) matrix, and det D = a. By linear combinations of the columns (precisely by right-multiplying by the cotransposed matrix of D) we obtain other syzygies for the same generators in the   N0 form and this implies that the last q − r generators multiplied by a fall aIq−r in the module generated by the first r generators. In short every typical generator of the Fitting ideal is also a typical generator of the corresponding Kaplansky ideal. Exercise 20. 2. We have f ∩ A = ha, b, ci (if x ∈ A satisfies x ∈ X d , a, b, c A[X] , make d X := 0), and also b = ha, b, ci . The ideal a is the content in T of the polynomial (a + bT + cT 2 )d whereas a0 is the content in T of the polynomial (aT1 + bT2 + cT3 )d . For example for d = 2: a = a2 , ab2 , 2ab, 2ac + b2 , b3 , b2 c, 2bc, c2 , a0 = a2 , 2ab, 2ac, b2 , 2bc, c2 . We have a ( a0 ( b ( f∩A and b = (f∩A)d . We also see that a is not symmetrical in a, b, c. Still for d = 2, we have (f ∩ A)4 ( a and (f ∩ A)3 6⊂ a0 . For arbitrary d, it seems that (f ∩ A)3d−2 ⊆ a. Exercise 21. Let ϕ e : k[X, Y ] → k[X] be the evaluation morphism Yi 7→ fi , the base ring being k[X]. We have Ker ϕ e = hY1 − f1 , . . . , Ys − fs i = hg1 , . . . , gs i , and since ϕ e extends ϕ, Ker ϕ = k[Y ] ∩ Ker ϕ, e as required. Problem 1. First, the cycle σ = (1, 2, 3) performs σ(f1 ) = f2 , σ(f2 ) = f3 and σ(f3 ) = f1 . Therefore C3 = hσi operates on A = k[x, y, z]. If in addition a = b or b = c, then {f1 , f2 , f3 } is invariant under S3 . Finally, note that the origin is a zero of the system, but also that solutions with x = y = z 6= 0 (in an extension of k) exist. 1. There are two cases: the a 6 b < c case, the easier one to study (case I), and the a < b = c case (case II). 238 IV. Finitely presented modules • case I (b < c). Consider on the monomials P of k[X, Y, Z] the order deglex (see Exercise III -3). Let us show that A = p,q,r:max(p,q,r)<c k xp y q z r . Let m = xi y j z k with max(i, j, k) > c. If i > c, we replace in m, xc with xi−c xc = −xi−c (y b + z a ). Similarly if j > c or if k > c. We then get xi−c y b+j z k , xi−c y j z a+k if i > c, xa+i y j−c z k , xi y j−c z b+k if j > c, xb+i y j z k−c , xi y a+j z k−c if k > c. We then see that m1 < m and m2 < m; we finish by induction. The reader will check that the xp y q z r with p, q, r < c form a k-basis of A. For those familiar with the material: when k is a discrete field, (f1 , f2 , f3 ) is a Gröbner basis for the monomial order deglex. Recap: dimk A = c3 . • case II (a < b = c). This case is more difficult. First suppose that 2 is invertible in k. We introduce g1 = −f1 + f2 + f3 = 2Z c + X a + Y a − Z a , g2 = f1 − f2 + f3 = 2X c − X a + Y a + Z a , g3 = f1 + f2 − f3 = 2Y c + X a − Y a + Z a . We then have 2f1 = g2 + g3 , 2f2 = g1 + g3 , 2f3 = g1 + g2 , such that hf1 , f2 , f3 i = hg1 , g2 , g3 i. Then we can operate with the gj ’s as we did with the fi ’s in case I. If k is a discrete field, (g1 , g2 , g3 ) is a Gröbner basis for the graded lexicographic order deglex. Recap: dimk A = c3 and the xp y q z r ’s with p, q, r < c form a k-basis of A. • Case II with a discrete field k of characteristic 2 is left to the sagacity of the reader. The ring A is not always zero-dimensional! This happens for example when k = F2 and (a, b) = (1, 3), (1, 7), (2, 6), (3, 9). When it is zero-dimensional, it seems that dimk A < c3 . 2. For (a, b, c) = (2, 2, 3), we know that dimk k[x, y, z] = 33 = 27. We use Stickelberger’s theorem 8.17, except that we do not know the zeros of the system. We check, with the help of a Computer Algebra system, that the characteristic polynomial of x over k can be factorized into irreducible polynomials (k = Q) Cx = t8 (t + 2)(t3 − t2 + 1)2 (t4 − 2t3 + 4t2 − 6t + 4)(t4 + t3 + t2 − t + 2)2 , but the factorization of Cx+2y is of the type 18 · 11 · 41 · 41 · 41 · 61 . Consequently, the projection (x, y, z) 7→ x does not separate the zeros of the system, whereas the projection (x, y, z) 7→ x + 2y does. Moreover, we see that the origin is the only zero with multiplicity (equal to 8). Thanks to the factorization of Cx and by performing a few additional small computations, we obtain ( m = −(m1 + m2 ) with m1 , m2 = • Another zero defined over k, (x, y, z) = (−2, −2, −2), which is simple. • If α, β, γ are the three distinct roots of t3 − t2 + 1, we obtain 6 simple zeros by making the group S3 act on the zero (α, β, γ). If s1 , s2 , s3 are the elementary symmetric functions of (X, Y, Z), then, over Q, we have the equality of ideals hf1 , f2 , f3 , s1 − 1i = hs1 − 1, s2 , s3 + 1i, i.e. the algebra of these 6 zeros is the universal splitting algebra of the polynomial t3 − t2 + 1. Solutions of selected exercises 239 • Let δi be a root of t4 + t3 + t2 − t + 2 (i ∈ J1..4K). By letting y = x = δi and z = 2/(x + 1) = −(x3 + x − 2)/2, we obtain a zero of the system. The minimal polynomial of z over Q is the one we see in the factorization of Cx : t4 − 2t3 + 4t2 − 6t + 4. We thus obtain four simple zeros of the system. • We can make A3 act on the four previous zeros. We have therefore obtained 1 + 6 + 3 × 4 = 19 simple zeros and a zero of multiplicity 8. This adds up as required. Remark: whereas dimk k[x, y, z] = 27, we have dimk k[x] = dimk k[y] = dimk k[z] = 14, dimk k[x, y] = dimk k[x, z] = dimk k[y, z] = 23. Thus, neither k[x, y] nor k[x, y, z] are free over k[x], and k[x, y, z] is not free over k[x, y]. 3. If k is a discrete field, in case I in characteristic 6= 2, we find, experimentally, that the local algebra of the origin is k[X, Y, Z]/hX a , Y a , Z a i and so the multiplicity of the origin would be a3 . As for case II, this seems quite mysterious. Problem 2. 1. We put the following weights on k[X]: X is of weight 1, and the weight of ai and bji is i. Thus f and gj are homogeneous of weight d. We easily check for all k > 0 that (X k gj ) mod f is homogeneous of weight d + k. 2. We index the d rows of S by 1, . . . , d, the ith row corresponding to the weight i via i ↔ X d−i ↔ ai . The matrix S is the horizontal concatenation of r square matrices of order d, the j th square matrix being that of the multiplication by gj modulo f in the basis (X d−1 , . . . , X, 1). If we number the columns of the first square submatrix of order d of S (corresponding to g1 ) by (0, 1, . . . , d − 1), then the coefficient of index (i, j) is homogeneous of weight i + j. Similarly for the other coefficients with analogous conventions. For example, for d = 3, if f = X 3 + a1 X 2 + a2 X + a3 , g = b1 X 2 + b2 X + b3 , the matrix of the multiplication by g mod f is X d−1 X d−2 X d−3 ↔1 ↔2 ↔3 "g b1 b2 b3 X 2 g mod f Xg mod f −a1 b1 + b2 −a2 b1 + b3 −a3 b1 a21 b1 − a1 b2 − a2 b1 + b3 a1 a2 b1 − a2 b2 − a3 b1 a1 a3 b1 − a3 b2 # " of weights 1 2 3 2 3 4 3 4 5 # . Let M be a submatrix of order d of S, (k1 , . . . , kd ) the exponents of X corresponding to its columns (ki ∈ J0..d − 1K, and the columns are X ki gj mod f ). Then, det(M ) is homogeneous, and its weight is the sum of the weights of the diagonal coefficients, i.e. (1 + k1 ) + (2 + k2 ) + · · · + (d + kd ) = d(d + 1)/2 + Pd i=1 ki . For example, the weight of the first minor of order d of S (corresponding to Pd−1 multiplication by g1 ) is d(d + 1)/2 + k=0 k = d2 .  The weight of each of the rd minors is bounded below by d(d + 1)/2 (bound d obtained for ki = 0) and bounded above by d(3d − 1)/2 (bound obtained for ki = d − 1). These bounds are reached if r > d. 240 IV. Finitely presented modules 3. The number dimQ E is the lower bound of the cardinality of any arbitrary generator set of b. We experimentally find, for small values of r and d, that dimQ E = rd . But we can do better. Indeed, the consideration of graded objects allows us to assert the following result (homogeneous Nakayama lemma, problem 3): every graded family of b whose image in E is a homogeneous generator set of the graded Q-vector space E is a (homogeneous) generator set of b. In particular, there exists a homogeneous generator set of b of cardinality dimQ E, conjecturally, rd . We can go further by examining the weights of the minimal homogeneous generator sets of b. Those are unique and provided by the (finite) series of the graded Q-vector space E. For example, for d = 5, r = 2, this series is 6t25 + 4t24 + 6t23 + 6t22 + 6t21 + 2t20 + 2t19 , which means that in any minimal homogeneous generator set of b, there are 6 polynomials of weight 25, 4 polynomials of weight 24, . . . , 2 polynomials of weight  19 (with 6 + 4 + · · · + 2 = 32 = 25 = rd ). In this example, the number rd of d minors of order d of S is 252. Conjecturally, it would seem  that b is generated by2 homogeneous polynomials of weight 6 d2 , with d+r−1 polynomials of weight d exactly. r−1 Problem 3. 1. We perform a proof by induction on n. Case n = 0: trivial result. For n > 1, we consider A0 = A/ha1 i. We have k ,→ A0 because k ∩ ha1 i = {0}. The sequence (a2 , · · · , an ) in A0 satisfies the right assumptions for the induction on n. Suppose f (a1 , . . . , an ) = 0 with f ∈ k[X1 , . . . , Xn ] and degX1 (f ) 6 d. We write f = X1 q(X1 , . . . , Xn ) + r(X2 , . . . , Xn ) with q, r with coefficients in k and q of degree 6 d − 1 in X1 . In A0 , we have r(a2 , . . . , an ) = 0. By induction on n, we have r = 0. Since a1 is regular, q(a1 , . . . , an ) = 0. By induction on d, we obtain q = 0, so f = 0. 2a. By definition, A+ E ⊆ E1 ⊕ E2 ⊕ . . .; and since A+ E = E, we get E0 = 0. Then A+ E ⊆ E2 ⊕ E3 ⊕ . . ., and by using A+ E = E again, we get E1 = 0, and so on. So En = 0 for all n, therefore E = 0. 2b. Let F be the A-submodule of E generated by the ei ’s. It is a graded submodule because the ei ’s are homogeneous. The hypothesis is equivalent to F + A+ E = E or A+ (E/F ) = E/F . By question 2a, we have E/F = 0 i.e. E = F ; the ei ’s generate the A-module E. 3a. It is clear that A0 = B0 and b = A+ B. By applying the previous question to the graded A-module B and to ei , we obtain that the ei ’s form a generator set of the A-module B. P 3b. Let S = i B0 ei (actually, it is a direct sum). P Let us show that hh1 , . . . , hd i ∩ S = {0}. If s = λ ei ∈ hh1 , . . . , hd i with i iP λi ∈ B0 , then by reducing modulo hh1 , . . . , hd i, we get λ e = 0, therefore i i i λi = 0 for all i and s = 0. Bibliographic comments 241 α 1 d For α = (α1 , . . . , αd ) ∈ Nd , let hα = hα 1 · · · hd . Let us show that X (?) α sα hα = 0 with sα ∈ S =⇒ sα = 0 for all α. For this, we will prove by (decreasing) induction on i, that f ∈ S[Xi , . . . , Xd ] and f (hi , . . . , hd ) ≡ 0 mod hh1 , . . . , hi−1 i  =⇒ f = 0. First for i = d. The hypothesis is sm hm d + · · · + s1 hd + s0 ≡ 0 mod hh1 , . . . , hd−1 i and we want sk = 0 for all k. We have s0 ∈ S ∩ hh1 , . . . , hd i = {0}. We can simplify the congruence by hd (which is regular modulo hh1 , . . . , hd−1 i) to obtain sm hm−1 + · · · + s1 ≡ 0 mod hh1 , . . . , hd−1 i. By iterating the process, we obtain d that all the sk ’s are null. Passing from i + 1 to i. Let f ∈ S[Xi , . . . , Xd ] of degree 6 m with f (hi , . . . , hd ) ≡ 0 mod hh1 , . . . , hi−1 i. We write f = Xi q(Xi , . . . Xd ) + r(Xi+1 , . . . , Xd ) with q, r with coefficients in S and q of degree 6 m − 1. We therefore have r(hi+1 , . . . , hd ) ≡ 0 mod hh1 , . . . , hi i, hence by induction on i, r = 0. We can simplify the congruence by hi (which is regular modulo hh1 , . . . , hi−1 i) to obtain q(hi , . . . , hd ) ≡ 0 mod hh1 , . . . , hi−1 i. Therefore q = 0 by induction on m, then f = 0. Recap: we therefore have the result for i = 1 and this result is none other than (?). OnceP(?) is proved, we can show that the eiP ’s are linearly independent over A. Let a e = 0 with a ∈ A; we write a = λ hα and i i i i i α α,i X i ai ei = X i,α λi,α hα ei = X α sα hα with sα = X i λi,α ei ∈ S. Therefore sα = 0 for all α, then λi,α = 0 for all i, and ai = 0. 4. Generally , if (a1 , . . . , ad ) is a regular sequence of a ring A, it is L-regular for all free A-modules L (left to the reader). We apply this to the ring A = B0 [h1 , . . . , hd ], to the sequence (h1 , . . . , hd ) (which is indeed a regular sequence of A) and to L = B (which is a free A-module by the hypothesis). Bibliographic comments Bourbaki (Algebra, Chapter X, or Commutative algebra, Chapter I) calls what we have called a coherent module (in accordance with the common usage, especially in the English literature) a pseudo coherent module, and what we call a finitely presented coherent module Bourbaki calls a coherent module. This is naturally to be related to the “Faisceaux Algébriques Cohérents” by J.-P. Serre (precursors of sheaves of modules on a Grothendieck scheme) which are locally given by finitely presented coherent modules. It should also be noted that [Stacks-Project] adopts the Bourbaki’s definition for coherent modules. Theorem 5.1 is taken from [MRR] Chap. V, Th. 2.4. Theorem 5.2 is taken from [MRR] Chap. III, Exercise 9 p. 80. 242 IV. Finitely presented modules The standard reference for Fitting ideals is [Northcott]. As for purely equational algebraic structures and universal algebra one can consult [Burris & Sankappanavar]. A first introduction to categories is found in [Cohn]. Dedicated books on the subject that we can recommend are [Mac Lane] and [Lawvere & Rosebrugh]. The Kaplansky ideals of a module M studied in Exercise 19 are used in [Kunz, Chap. IV] and [Ischebeck & Rao, Chap. 9]. The strict Bézout rings (Exercise 7) and the Smith rings (Exercise 8) have been studied by Kaplansky in [115] in a more general framework of not necessarily commutative rings. He respectively calls them “Hermite rings” and “elementary divisor rings.” But this terminology is not fixed. In [Lam06], where Exercise 7 finds its source, Lam uses K-Hermite ring for strict Bézout ring. That is to be distinguished from Hermite ring: today a ring A is called a Hermite ring if every stably free A-module is free, i.e. if every unimodular vector is completable (see Chapter V, Section V -4). As for the “elementary divisors,” they are now often used in a more particular sense. For example, in the literature it is often said that the Z-module Z/h900i ⊕ Z/h10i ' Z/h25i ⊕ Z/h5i ⊕ Z/h4i ⊕ Z/h2i ⊕ Z/h9i admits for invariant factors the list (10, 900) and for elementary divisors the unordered list (25, 5, 4, 2, 9). Exercise 11 was provided to us by Thierry Coquand. Chapter V Finitely generated projective modules, 1 Contents 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . Characteristic properties . . . . . . . . . . . . . . . . . . . Local-global principle . . . . . . . . . . . . . . . . . . . . . Projective modules and Schanuel’s lemma . . . . . . . . . . The category of finitely generated projective modules . . . 3 On zero-dimensional rings . . . . . . . . . . . . . . . . 4 Stably free modules . . . . . . . . . . . . . . . . . . . . When is a stably free module free? . . . . . . . . . . . . . . Bass’ stable range . . . . . . . . . . . . . . . . . . . . . . . 5 Natural constructions . . . . . . . . . . . . . . . . . . . 6 Local structure theorem . . . . . . . . . . . . . . . . . 7 Locally cyclic projective modules . . . . . . . . . . . . Locally cyclic modules . . . . . . . . . . . . . . . . . . . . . Cyclic projective modules . . . . . . . . . . . . . . . . . . . Locally cyclic projective modules . . . . . . . . . . . . . . . Finitely generated projective ideals . . . . . . . . . . . . . . 8 Determinant, fundamental polynomial and rank polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . . . The determinant, the characteristic polynomial and the cotransposed endomorphism . . . . . . . . . . . . . . . . . The fundamental polynomial and the rank polynomial . . . – 243 – 244 245 245 247 248 249 253 255 256 258 259 261 262 262 266 267 267 269 269 272 244 V. Finitely generated projective modules, 1 Some explicit computations . . . . . . . . . . . . . . . . . . 274 The annihilator of a finitely generated projective module . 277 Canonical decomposition of a projective module . . . . . . 277 Rank polynomial and Fitting ideals . . . . . . . . . . . . . 278 9 Properties of finite character . . . . . . . . . . . . . . 279 Exercises and problems . . . . . . . . . . . . . . . . . . 282 Solutions of selected exercises . . . . . . . . . . . . . . . . . 289 Bibliographic comments . . . . . . . . . . . . . . . . . 296 1. Introduction Recall that a finitely generated projective module is a module isomorphic to a direct summand in a free A-module of finite rank. This notion happens to be the natural generalization, for modules over a commutative ring, of the notion of a finite dimensional vector space over a discrete field. This chapter develops the basic theory of these modules. One of the initial motivations of this book was to understand in concrete terms the following theorems concerning finitely generated projective modules. 1.1. Theorem. (Local structure theorem for finitely generated projective modules) An A-module P is finitely generated projective if and only if it is locally free in the following sense. There exist comaximal elements s1 , . . ., s` in A such that the modules Psi obtained from P by scalar extension to the rings Asi = A[1/si ] are free. 1.2. Theorem. (Characterization of finitely generated projective modules by their Fitting ideals) A finitely presented A-module is projective if and only if its Fitting ideals are (principal ideals generated by) idempotents. 1.3. Theorem. (Decomposition of a finitely generated projective module into a direct sum of modules of constant rank) If P is a finitely generated projective A-module generated by n elements, there exists a fundamental system of orthogonal idempotents (r0 , r1 , . . . , rn ) (some eventually null) such that each rk P is a projective module of rank k over the ring A/h1 − rk i. L Then P = k>0 rk P and Ann(P ) = hr0 i. In this direct sum we can naturally limit ourselves to the indices k > 0 such that rk 6= 0. §2. Generalities 245 1.4. Theorem. (Characterization of finitely generated projective modules by their flatness) A finitely presented A-module is projective if and only if it is flat. In this chapter we will prove the first three of these theorems. They will be taken up again with new proofs in Chapter X. The fourth one will be proven in Chapter VIII, which is dedicated to flat modules. Other important theorems regarding finitely generated projective modules will be proven in Chapters X, XIV and XVI. The theory of algebras which are finitely generated projective modules (we will call them strictly finite algebras) is developed in Chapter VI. 2. Generalities Recall that a finitely generated projective module is finitely presented (Example 2, page 179). Characteristic properties When M and N are two A-modules, we have a natural A-linear map θM,N : M ? ⊗ N → LA (M, N ) given by  θM,N (α ⊗ y) = x 7→ α(x)y . (1) We also write θM for θM,M . Remark. We sometimes write α ⊗ y for θM,N (α ⊗ y) but it is certainly not recommended when θM,N is not injective. The following theorem gives some immediately equivalent properties. 2.1. Theorem. (Finitely generated projective modules) For an A-module P , the following properties are equivalent. (a) P is a finitely generated projective module, i.e. there exist an integer n, an A-module N and an isomorphism of P ⊕ N over An . (b1) There exist an integer n, elements (gi )i∈J1..nK of P and linear forms P (αi )i∈J1..nK over P such that for all x ∈ P, x = i αi (x) gi . (b2) The module P is finitely generated, and for every finite system of generators (hi )i∈J1..mK of P there exist linear forms (βi )i∈J1..mK over P P such that for all x ∈ P , x = i βi (x) hi . (b3) The image of P ? ⊗A P in LA (P, P ) under the canonical homomorphism θP contains IdP . (c1) There exist an integer n and two linear maps ϕ : P → An and ψ : An → P , such that ψ ◦ ϕ = IdP . We then have An = Im(ϕ) ⊕ Ker(ψ) and P ' Im(ϕ ◦ ψ). 246 V. Finitely generated projective modules, 1 (c2) The module P is finitely generated, and for every surjective linear map ψ : Am → P , there exists a linear map ϕ : P → Am such that ψ ◦ ϕ = IdP . We then have Am = Im(ϕ) ⊕ Ker(ψ) and P ' Im(ϕ ◦ ψ). (c3) Like (c2) but by replacing Am by an arbitrary A-module M : the module P is finitely generated, and for every surjective linear map ψ : M → P , Ker(ψ) is a direct summand. (c4) The module P is finitely generated and the functor LA (P, •) transforms the surjective linear maps into surjective maps. In other words, for all A-modules M , N , for every surjective linear map ψ : M → N and every linear map Φ : P → N , there exists a linear map ϕ : P → M such that ψ ◦ ϕ = Φ. >M ϕ P Φ ψ  /N J Item (b1) (resp. (b2)) is simply a reformulation of (c1) (resp. (c2)). Item (b3) is simply a reformulation of (b1). We trivially have (c3) ⇒ (c2) ⇒ (c1). (a) ⇒ (c1) Consider the canonical maps P → P ⊕ N and P ⊕ N → P. (c1) ⇒ (a) Consider π = ϕ ◦ ψ. We have π 2 = π. This defines a projection of An over Im π = Im ϕ ' P parallel to N = Ker π = Ker ψ. P (b1) ⇒ (c4) If Φ(gi ) = ψ(yi ) (i ∈ J1..nK), we let ϕ(x) = αi (x) yi . We then have for all x ∈ P ,  P   P P Φ(x) = Φ αi (x) gi = αi (x) ψ(yi ) = ψ αi (x) yi = ψ ϕ(x) . (c4) ⇒ (c3) We take N = P and Φ = IdP .  We also directly have (b1) ⇒ (b2) as follows: by expressing the gi ’s as linear combinations of the hj ’s we obtain the βj ’s from the αi ’s. In practice, according to the original definition, we consider a finitely generated projective module as (an isomorphic copy of) the image of a projection matrix F . Such a matrix, or the linear map that it represents, is again called a projector. More generally, every idempotent endomorphism of a module M is called a projector. When we see a finitely generated projective module according to the definition (c1), the projection matrix is that of the linear map ϕ ◦ ψ. Similarly, if we use the definition (b1), the projection matrix is the one which has for coefficients every αi (gj ) in position (i, j).  A system (g1 , . . . , gn ), (α1 , . . . , αn ) that satisfies (b1) is called a coordinate system for the projective module P . Some authors speak of a basis of the §2. Generalities 247 finitely generated projective module, but we will not be following their lead on this matter. 2.2. Fact. (Dual of a finitely  generated projective module, 1) Let (g1 , . . . , gn ), (α1 , . . . , αn ) be a coordinate system for a finitely generated projective module P . Then – the gi ’s generate P , – the αj ’s generate L(P, A) = P ? , – the module P ? is finitely generated projective, – the module (P ? )? is canonically isomorphic to P ,  – via this canonical identification, (α1 , . . . , αn ), (g1 , . . . , gn ) is a coordinate system for P ? . In particular, if P is (isomorphic to) the image of a projection matrix F , the dual module P ? is (isomorphic to) the image of the projection matrix tF . J The first item is clear. All the rest is clear from the moment where we P show that λ = λ(gi ) αi for all λ ∈ P ? , and this equality is proven by evaluating both sides at an arbitrary element x of P :  P  P P λ(x) = λ αi (x) gi = αi (x) λ(gi ) = λ(gi ) αi (x).  ψ π 2.3. Theorem. Let Am −→ Aq −→ P → 0 be a presentation of a module P . Then, P is finitely generated projective if and only if ψ is locally simple. Recall that “ψ is locally simple” means that there exists a ϕ : Aq → Am satisfying ψ ϕ ψ = ψ. Moreover, by Theorem II -5.14 every linear map which has a rank in the sense of Definition II -5.7 is locally simple. J If ψ is locally simple, Fact II -5.18 tells us that Im ψ is a direct summand, and Coker ψ is isomorphic to a complementary submodule of Im ψ. Conversely, if the module P := Coker ψ is projective, we apply the property (c2) of Theorem 2.1 to the projection π : Aq → P . We obtain τ : P → Aq with π ◦ τ = IdP , such that Aq = Im τ ⊕ Im ψ. Therefore Im ψ is finitely generated projective and we can apply the property (c2) to ψ : Am → Im ψ, which gives us ϕ over the component Im ψ (and we take for example 0 over Im τ ).  Local-global principle The fact that an A-module is finitely generated projective is a local notion in the following sense. 248 V. Finitely generated projective modules, 1 2.4. Concrete local-global principle. (Finitely generated projective modules) Let S1 , . . ., Sn be comaximal monoids of A and P be an A-module. If the PSi’s are free, P is finitely generated and projective. More generally, the module P is finitely generated and projective if and only if the PSi’s are finitely generated projective ASi -modules. J This results from Theorem 2.3, from the local-global principle IV -4.13 for finitely presented modules and from the local-global principle II -5.19 for locally simple linear maps.  The local-global principle 2.4 establishes the implication “if” in Theorem 1.1. The converse “only if” has been proven in Theorem II -5.26 which will give us Theorem 6.1. We will give for this converse a more precise statement and a more conceptual proof with Theorem X -1.5. Projective modules and Schanuel’s lemma The notion of a projective module can be defined for modules which are not finitely generated. In the following we will rarely use such modules, but it is however useful to give some precisions on this subject. 2.5. Definition. An A-module P (not necessarily finitely generated) is said to be projective if it satisfies the following property. For all A-modules M, N , for every surjective linear map ψ : M → N and every linear map Φ : P → N , there exists a linear map ϕ : P → M such that ψ ◦ ϕ = Φ. >M ϕ P Φ ψ  /N Thus, given the characterization (c4) in Theorem 2.1, an A-module is finitely generated projective if and only if it is projective and finitely generated. In the following fact, the last property resembles the implication (c4) ⇒ (c3) in this theorem. A linear map ϕ : E → F is called a split surjection if there exists a ψ : F → E with ϕ ◦ ψ = IdF . In this case we say that ψ is a section of ϕ, and we have E = Ker ϕ ⊕ ψ(F ) ' Ker ϕ ⊕ F. A short exact sequence is said to be split if its surjection is split. 2.6. Fact. 1. A free module whose basis is a set in bijection with N is projective. For example the ring of polynomials A[X] is a projective A-module. 2. Every module that is a direct summand in a projective module is projective. §2. Generalities 249 3. If P is projective, every short exact sequence 0 → N → M → P → 0 splits. Comment. In constructive mathematics the free modules are not always projective. Furthermore, it seems impossible to represent every module as a quotient of a free and projective module. Similarly it seems impossible to place every projective module as a direct summand in a free and projective module. For more details on this matter consult Exercise VIII -16 and [MRR]. 2.7. Lemma. Consider two surjective A-linear maps with the same image ϕ1 ϕ2 P1 −→ M → 0, P2 −→ M → 0 with the modules P1 and P2 being projective. 1. There exist reciprocal isomorphisms α, β : P1 ⊕ P2 → P1 ⊕ P2 such that (ϕ1 ⊕ 0P2 ) ◦ α = 0P1 ⊕ ϕ2 and ϕ1 ⊕ 0P2 = (0P1 ⊕ ϕ2 ) ◦ β. 2. If we let K1 = Ker ϕ1 and K2 = Ker ϕ2 , we obtain by restriction of α and β reciprocal isomorphisms between K1 ⊕ P2 and P1 ⊕ K2 . J There exists a u : P1 → P2 such that ϕ2 ◦ u = ϕ1 and v : P2 → P1 such that ϕ1 ◦ v = ϕ2 . P1 ϕ1 & 88M u  P2 PO 1 ϕ1 v ϕ2 P2 && P1 ⊕ I P2 8M α β ϕ2 P1 ⊕ P2 ϕ1 ⊕0P2 ' 7M 0P1 ⊕ϕ2 We verify that α and β defined by the matrices below are suitable.     IdP1 − vu v IdP1 −v α= β= . −u IdP2 u IdP2 − uv NB: the matrix β is a sophisticated variant of what would be the cotransposed matrix of α if IdP1 , IdP2 , u and v were scalars.  2.8. Corollary. (Schanuel’s lemma) Consider two exact sequences 0 0 j1 → K1 −→ → K2 j2 −→ P1 P2 ϕ1 −→ ϕ2 −→ M → 0 M → 0 with the modules P1 and P2 being projective. Then, K1 ⊕ P2 ' K2 ⊕ P1 . The category of finitely generated projective modules A purely categorical construction The category of finitely generated projective modules over A can be constructed from the category of free modules of finite rank over A by a purely categorical procedure. 250 V. Finitely generated projective modules, 1 1. A finitely generated projective module P is described by a pair (LP , PrP ) where LP is a free module of finite rank and PrP ∈ End(LP ) is a projector. We have P ' Im PrP ' Coker(IdLP − PrP ). 2. A linear map ϕ from the module P (described by (LP , PrP )) to the module Q (described by (LQ , PrQ )) is described by a linear map Lϕ : LP → LQ subjected to commutation relations PrQ ◦ Lϕ = Lϕ = Lϕ ◦ PrP . In other words Lϕ is null over Ker(PrP ) and its image is contained in Im(PrQ ). 3. The identity of P is represented by LIdP = PrP . 4. The sum of two linear maps ϕ and ψ from P to Q represented by Lϕ and Lψ is represented by Lϕ + Lψ . The linear map aϕ is represented by aLϕ . 5. To represent the composition of two linear maps, we compose their representations. 6. Finally, a linear map ϕ from P to Q represented by Lϕ is null if and only if Lϕ = 0. This shows that the problems relating to the finitely generated projective modules can always be interpreted as problems regarding projection matrices, and often come down to problems about solving systems of linear equations over A. An equivalent category, better adapted to computations, is the category whose objects are the projection matrices with coefficients in A, a morphism from F to G being a matrix H of a suitable format satisfying the equalities GH = H = HF. Using coordinate systems The following fact uses the assertions of the previous paragraph while taking the coordinate system point of view. 2.9. Fact. Let P and Q be two finitely generated projective modules with coordinate systems   (x1 , . . . , xn ), (α1 , . . . , αn ) and (y1 , . . . , ym ), (β1 , . . . , βm ) , and let ϕ : P → Q be an A-linear map. Then, we can encode P and Q by the matrices   def def F = αi (xj ) i,j∈J1..nK and G = βi (yj ) i,j∈J1..mK . More precisely, we have the isomorphisms π1 : P → Im F , x 7→ t[ α1 (x) · · · αn (x) ], π2 : Q → Im G , y 7→ t[ β1 (y) · · · βm (y) ]. §2. Generalities 251 As for the linear map ϕ, it is encoded by the matrix  def H = βi (ϕ(xj )) i∈J1..nK,j∈J1..mK which satisfies GH = H = HF . The matrix H is that of the linear map  An → Am , π1 (x) + z 7→ π2 ϕ(x) if x ∈ P and z ∈ Ker F. We say that the matrix H represents the linear map ϕ in the coordinate   systems (x), (α) and (y), (β) . Application: the isomorphisms between finitely generated projective modules The following theorem says that, for F ∈ AGm (A) and G ∈ AGn (A), if Im F and Im G are isomorphic, even if it means “enlarging” the matrices F and G, they can be assumed to be similar. In the following lemma, we use the notation Diag(M1 , . . . , Mk ) more freely than we have until now. Instead of a list of elements of the ring, we consider for (M1 , . . . , Mk ) a list of square matrices. The matrix represented as such is usually called a block diagonal matrix. 2.10. Lemma. (Enlargement lemma) Consider the matrix encoding of the category of finitely generated projective modules. If an isomorphism ϕ of Im F over Im G is encoded by U and its inverse encoded by U 0 , we obtain a matrix A ∈ En+m (A)       I − F −U 0 I 0 Im −U 0 Im 0 A= m = m , U In − G U In 0 In U In with  0m 0 0 G   =A F 0 0 0n  A−1 . (2) Conversely, a conjugation between Diag(0m , G) and Diag(F, 0n ) provides an isomorphism between Im F and Im G. J The following matrix Im F  Im F 0 Ker F   0 Im G  ϕ Ker G 0 Ker F 0 Id 0 0 Im G −ϕ−1 0 0 0 Ker G  0 0  , 0  Id once Im F ⊕ Ker F is replaced by Am and Im G ⊕ Ker G by An , gives the matrix A. The presence of the − sign is due to the classical decomposition into a product of elementary matrices       0 −a−1 1 0 1 −a−1 1 0 = . a 0 a1 0 1 a 1  252 V. Finitely generated projective modules, 1 When the image of a projection matrix is free If a projector P ∈ AGn (A) has as its image a free module of rank r, its kernel is not systematically free, and the matrix is therefore not necessarily similar to the standard matrix Ir,n . It is interesting to find a simple characterization of the fact that the image is free. 2.11. Proposition. (Projection matrices whose image is free) Let P ∈ Mn (A). The matrix P is idempotent and its image is free of rank r if and only if there exist two matrices X ∈ An×r and Y ∈ Ar×n such that Y X = Ir and P = XY . In addition we have the following. 1. Ker P = Ker Y , Im P = Im X ' Im Y , and the columns of X form a basis of Im P . 2. For every matrices X 0 , Y 0 of the same respective formats as X and Y , and such that P = X 0 Y 0 , there exists a unique matrix U ∈ GLr (A) such that X 0 = X U and Y = U Y 0 . In fact, U = Y X 0 , U −1 = Y 0 X and Y 0 X 0 = Ir . J Suppose that P is idempotent with a free image of rank r. For columns of X we take a basis of Im P . Then, there exists a unique matrix Y such that P = XY . Since P X = X (because Im X ⊆ Im P and P 2 = P ), we obtain XY X = X. Since the columns of X are independent and X(Ir − Y X) = 0, we obtain Ir = Y X. Conversely, suppose Y X = Ir and P = XY . Then P 2 = XY XY = XIr Y = XY = P and P X = XY X = X. Therefore Im P = Im X. In addition, the columns of X are independent because XZ = 0 implies Z = Y XZ = 0. I −P Y n 1. The sequence An −− −→ An −→ Ar is exact. Indeed, Y (In − P ) = 0, and if Y Z = 0, then P Z = 0, so Z = (In − P )Z. Thus Ker Y = Im(In − P ) = Ker P, and Im Y ' An /Ker Y = An /Ker P ' Im P . 2. Now if X 0 , Y 0 are of the same respective formats as X, Y , and if P = X 0 Y 0 , we let U = Y X 0 and V = Y 0 X. Then • U V = Y X 0 Y 0 X = Y P X = Y X = Ir , • X 0 V = X 0 Y 0 X = P X = X, therefore X 0 = XU , • U Y 0 = Y X 0 Y 0 = Y P = Y , therefore Y 0 = V Y . Finally, Y 0 X 0 = V Y XU = V U = Ir .  §3. On zero-dimensional rings 253 3. Finitely generated projective modules over zero-dimensional rings The following theorem generalizes Theorem IV -8.12. 3.1. Theorem. Let A be a zero-dimensional ring. 1. If A is reduced every finitely presented module M is quasi-free, and every finitely generated submodule of M is a direct summand 2. (Zero-dimensional freeness lemma) Every finitely generated projective A-module is quasi-free. 3. Every matrix G ∈ Aq×m of rank > k is equivalent to a matrix   Ik 0k,m−k 0q−k,k G1 with Dr (G1 ) = Dk+r (G) for all r > 0. In particular, every matrix of rank k is simple. 4. Every finitely presented module M such that Fr (M ) = h1i (i.e. locally generated by r elements, cf. Definition IX -2.5) is generated by r elements. 5. (Incomplete basis theorem) If a submodule P of a finitely generated projective module Q is finitely generated projective, it has a complementary submodule. If Q is free of rank q and P free of rank p, every complementary subspace is free of rank q − p. 6. Let Q be a finitely generated projective A-module and ϕ : Q → Q an endomorphism. The following properties are equivalent. a. ϕ is injective. b. ϕ is surjective. c. ϕ is an isomorphism. J Item 1 is a reminder of Theorem IV -8.12. 2. We consider a presentation matrix A of the module and we start by noting that since the module is projective, D1 (A) = hei with e idempotent. We may assume that the first step of the computation is performed at the level of the ring Ae = A[1/e]. We are reduced to the case where D1 (A) = e = 1, which we assume henceforth. We apply item 3 with k = 1 and conclude by induction. Item 3 resembles an invertible minor lemma (II -5.9) without an invertible minor in the hypothesis. We apply with the ring Ared item 1 of Theorem IV -8.12. We then obtain the desired matrix, but only  modulo DA (0). We notice that the matrix Ik + R with R ∈ Mk DA (0) has an invertible determinant, which allows us to apply the invertible minor lemma. 4. Results from item 3 applied to a presentation matrix of the module. 254 V. Finitely generated projective modules, 1 5. Let us first look at the second case. Consider the matrix G whose column vectors form a basis for the submodule P . Since G is the matrix of an injective linear map, its determinantal ideal of order p is regular, therefore equal to h1i (Corollary IV -8.3). It remains to apply item 3. In the general case, if P is generated by p elements, let us consider a P 0 such that P ⊕ P 0 ' Ap . The module Q ⊕ P 0 is finitely generated projective, therefore is a direct summand in a module L ' An . Then, by the second case, P ⊕ P 0 is a direct summand in L. We deduce that P is the image of a projection π : L → L. Finally, the restriction of π to Q is a projection whose image is P . 6. We already know that b and c are equivalent because Q is finitely generated (Theorem IV -5.2). To prove that a implies b, we can assume that Q is free (even if that means considering Q0 such that Q ⊕ Q0 is free). Then, ϕ is represented by a matrix whose determinant is regular therefore invertible. The previous theorem admits an important corollary in number theory. 3.2. Corollary. (One and a half theorem) 1. Let a be an ideal of A. Assume that it is a finitely presented Amodule with F1 (a) = h1i and that there exists an a ∈ a such that the ring B = A/hai is zero-dimensional. Then, there exists a c ∈ a such that a = ha, ci = ham , ci for all m > 1. 2. Let Z be the ring of integers of a number field K and a be a nonzero finitely generated ideal of Z. For all a 6= 0 in a there exists a c ∈ a such that a = ha, ci = ham , ci for all m > 1. J 1. The B-module a/aa is obtained from the A-module a by scalar exten- sion from A to B, so its first Fitting ideal remains equal to h1i. We apply item 4 of Theorem 3.1: there exists some c ∈ a such that a/aa = hci as a B-module. This means that a = cA + aa and gives the desired result. 2. If a = hx1 , . . . , xn i is a finitely generated ideal of Z, there exists a finitely generated ideal b such that ab = hai (Theorem III -8.21). Let x P = [ x1 · · · xn ]. Therefore there exist y1 , . . . , yn in b such that x ty = i xi yi = a. If yi xj = αij a, we have αii xk = αki xi . Therefore, the ideal a becomes principal in Z[1/αii ], equal to hxi i, which is free of rank 1 (we can Passume that the xi ’s are nonzero). Since i αii = 1, the αii ’s are comaximal, therefore a is finitely generated projective and F1 (a) = h1i (this is true locally and therefore globally). To apply item 1 it remains to verify that Z/hai is zero-dimensional. The element a annihilates a monic polynomial P ∈ Z[X] of nonzero constant coefficient, which we write as aQ(a) = r 6= 0. Therefore, Z/hai is a quotient ring of C = Z/hri. It suffices to show that C is zero-dimensional. Let A = Z/hri. Let u ∈ C. Since u annihilates a monic polynomial  R ∈ Z[T ] of degree n, the ring A[u] is a quotient ring of the ring A[T ] R(T ) , which is a free §4. Stably free modules 255 A-module of rank n, and so is finite. Therefore we can explicitly find k > 0 and ` > 1 such that uk (1 − u` ) = 0.  Remark. The matrix A = (αij ) satisfies the following equalities y x = aA, A2 = A, D2 (A) = 0, Tr(A) = 1, xA = x. t We deduce that A is a projection matrix of rank 1. Moreover, we have x(In − A) = 0, and if x tz = 0, then ty x tz = 0 = aA tz, so A tz = 0 and tz = (In − A) tz. This shows that In − A is a presentation matrix of a (over the generator set (x1 , . . . , xn )). Therefore, a is isomorphic as a Z-module to Im A ' Coker(In − A). 4. Stably free modules Recall that a module M is said to be stably free if it is a direct complement of a free module in a free module, in other words if there exists an isomorphism between An and M ⊕ Ar for two integers r and n. We will then say that M is of rank s = n − r.1 The rank of a stably free module over a nontrivial ring is well-defined. Indeed, if M ⊕ Ar ' An 0 0 0 0 and M ⊕ Ar ' An , then we have Ar ⊕ An ' Ar ⊕ An by Shanuel’s lemma 2.8. From an isomorphism M ⊕ Ar → An , we obtain the projection π : An → An over Ar parallel to M . This also gives a surjective A-linear map ϕ : An → Ar with Ker π = Ker ϕ ' M : it suffices to let ϕ(x) = π(x) for all x ∈ An . Conversely, if we have a surjective linear map ϕ : An → Ar , there exists a ψ : Ar → An such that ϕ ◦ ψ = IdAr . Then π = ψ ◦ ϕ : An → An is a projection, with Ker π = Ker ϕ, Im π = Im ψ and Ker π ⊕ Im π = An , and since Im π ' Im ϕ = Ar , the module M = Ker ϕ = Ker π ' Coker π = Coker ψ is stably free, and isomorphic to Im(IdAn − π). Recall that by Theorem II -5.22, saying that ϕ : An → Ar is surjective amounts to saying that ϕ is of rank r, i.e. that Dr (ϕ) = h1i in this case. Finally, if we start from an injective linear map ψ : Ar → An , saying that there exists a ϕ : An → Ar such that ϕ ◦ ψ = IdAr amounts to saying that Dr (ψ) = h1i (Theorem II -5.14). Let us summarize the previous discussion. 1 This notion of rank will be generalized, Definitions 8.5 and X -2.2, and the reader will be able to note that those are indeed generalizations. 256 V. Finitely generated projective modules, 1 4.1. Fact. For a module M the following properties are equivalent. 1. M is stably free. 2. M is isomorphic to the kernel of a surjective matrix. 3. M is isomorphic the cokernel of an injective matrix of maximum rank. This result can allow us to define a new encoding, specific to stably free modules. Such a module will be encoded by the matrices of the linear maps ϕ and ψ. As for the dual of M it will be encoded by the transposed matrices, as indicated in the following fact. 4.2. Fact. Using the previous notations, M ? is stably free, canonically isomorphic to Coker tϕ and to Ker tψ. This is a special case of the following more general result (see also Fact II -6.3). 4.3. Proposition. Let ϕ : E → F be a split surjection and ψ : F → E be a section of ϕ. Let π : E → E be the projection ψ ◦ ϕ, and j : Ker ϕ → E be the canonical injection. 1. E = Im ψ ⊕ Ker ϕ, Ker ϕ = Ker π ' Coker π = Coker ψ. 2. Ker tj = Im tϕ and tj is surjective, which by factorization gives a canon∼ ical isomorphism Coker tϕ −→ (Ker ϕ)? . J The linear map ψ is a generalized inverse of ϕ (Definition II -5.16). We therefore have E = Im ψ⊕Ker ϕ, and ψ and ϕ define reciprocal isomorphisms between F and Im ψ. The proposition easily follows (see Fact II -5.17).  When is a stably free module free? We then obtain the following results, formulated in terms of the kernel of a surjective matrix. 4.4. Proposition. (When a stably free module is free, 1) Let n = r + s and R ∈ Ar×n . The following properties are equivalent.   1. R is surjective and the kernel of R is free. S s×n 2. There exists a matrix S ∈ A such that the matrix is invertible. R In particular, every stably free module of rank 1 is free. J 1 ⇒ 2. If R is surjective, there exists an R0 ∈ An×r with RR0 = Ir . The matrices R and R0 correspond to the linear maps ϕ and ψ in the preliminary discussion. In particular, we have An = Ker R⊕Im R0 . Consider a matrix S 0 whose column vectors constitute a basis of the kernel of R. Since An = Ker R ⊕ Im R0 , the matrix A0 = [ S 0 | R0 ] has asits columns a S basis of An . It is invertible and its inverse is of the form because R is R the only matrix that satisfies R A0 = [ 0r,n−r | Ir ]. §4. Stably free modules 257   S and let A0 = A−1 , which we write in the form R [ S 0 | R0 ]. We have RS 0 = 0r,n−r , therefore 2 ⇒ 1. Let A = Im S 0 ⊆ Ker R and RR0 = Ir . Therefore Ker R ⊕ Im R0 = An = Im S 0 ⊕ Im R0 (α), (β). 0 Finally, (α) and (β) imply Im S = Ker R. If M is a stably free module of rank 1, it is the kernel of a surjective matrix R ∈ A(n−1)×n . Since the matrix is surjective, we obtain 1 ∈ Dn−1 (R), and this gives the row S to complete R as an invertible matrix (develop the determinant according to the first row).  4.5. Corollary. (When a stably free module is free, 2) Consider R ∈ Ar×n and R0 ∈ An×r with RR0 = Ir , s := n − r. Then, the modules Ker R and Coker R0 are isomorphic and the following properties are equivalent. 1. The kernel of R is free. 2. There exists a matrix S 0 ∈ As×n such that [ S 0 | R0 ] is invertible. 3. There exist a matrix S 0 ∈ As×n and a matrix S ∈ As×n such that S R S0 R0 = In . Recall that a vector x ∈ Aq is said to be unimodular when its coordinates are comaximal elements. It is said to be completable if it is the first vector (row or column) of an invertible matrix. 4.6. Proposition. The following properties are equivalent. 1. Every stably free A-module of rank > m is free. 2. Every unimodular vector in Aq×1 with q > m is completable. 3. Every unimodular vector in Aq with q > m generates the direct complement of a free module in Aq . J Items 2 and 3 are clearly equivalent. 1 ⇒ 3. Let x ∈ Aq be a unimodular vector with q > m. Then, we can write Aq = M ⊕ Ax, and M is stably free of rank q − 1 > m, therefore free. 3 ⇒ 1. Let M be a stably free A-module of rank n > m. We can write L = M ⊕Ax1 ⊕· · ·⊕Axr , where L ' An+r . If r = 0, there is nothing left to do. Otherwise, xr is a unimodular vector in L, therefore by hypothesis Axr admits a free complementary subspace in L. Thus, L/Axr ' An+r−1 , and similarly with M ⊕ Ax1 ⊕ · · · ⊕ Axr−1 , which is isomorphic to L/Axr . We can therefore conclude by induction on r that M is free.  258 V. Finitely generated projective modules, 1 Bass’ stable range The notion of a stable range is linked to the elementary manipulations (of rows or columns) and allows us to some extent to control the stably free modules. 4.7. Definition. Let n > 0. A ring A is said to be of Bass’ stable range less than or equal to n when we can “shorten” the unimodular vectors of length n + 1 in the following sense 1 ∈ ha, a1 , . . . , an i =⇒ ∃ x1 , . . . , xn , 1 ∈ ha1 + x1 a, . . . , an + xn ai. In this case we write “Bdim A < n.” In the acronym Bdim, B alludes to “Bass.” The notation Bdim A < n is legitimized on the one hand by item 1 in the following fact, and on the other hand by results to come which compare Bdim to natural dimensions in commutative algebra.2 Item 3. uses the ideal Rad A which will be defined in Chapter IX. The thing to note is that an element of A is invertible if and only if it is invertible modulo Rad A. 4.8. Fact. Let A be a ring and a be an ideal. 1. If Bdim A < n and n < m then Bdim A < m. 2. For all n > 0, we have Bdim A < n ⇒ Bdim A/a < n. Abbreviated, we write this implication in the form: Bdim A/a 6 Bdim A. 3. We have Bdim(A/Rad A) = Bdim A (by using the same abbreviation). J 1. We take m = n + 1. Let (a, a0 , . . . , an ) with 1 ∈ ha, a0 , . . . , an i. We have 1 = ua + va0 + . . ., so 1 ∈ ha0 , a1 , . . . , an i with a0 = ua + va0 . Therefore we have x1 , . . . , xn in A with 1 ∈ ha1 + x1 a0 , . . . , an + xn a0 i, and consequently 1 ∈ ha0 + y0 a, . . . , an + yn ai with y0 = 0 and yi = xi u for i > 1. 2 and 3. Left to the reader.  4.9. Fact. (Unimodular vectors and elementary transformations) Let n > 0. If Bdim A < n and V ∈ An+1 is unimodular, it can be transformed into the vector (1, 0 . . . , 0) by elementary operations. J Let V = (v0 , v1 , . . . , vn ), with 1 ∈ hv0 , v1 , . . . , vn i. Applying the definition with a = v0 , we obtain x1 , . . . , xn such that 1 ∈ hv1 + x1 v0 , . . . , vn + xn v0 i . The vector V can be transformed by elementary operations into the vector V 0 = (v0 , v1 + x1 v0 , . . . , vn + xn v0 ) = (v0 , v10 , . . . , vn0 ), and we have yi ’s such 2 See for example the results in Chapter XIV which establish a comparison with the Krull and Heitmann dimensions. §5. Natural constructions 259 Pn that i=1 yi vi0 = 1. By elementary operations, we can transform V 0 into (1, v10 , . . . , vn0 ), and then into (1, 0, . . . , 0).  Proposition 4.6 and Fact 4.9 give the following “Bass’ theorem.” Actually, the real Bass’ theorem is rather the conjunction of the following theorem with a theorem that provides a sufficient condition to have Bdim A < n. We will present several different variants in Theorems XIV -1.4 and XIV -2.6 and Fact XIV -3.3. 4.10. Theorem. (Bass’ theorem, stably free modules) If Bdim A < n, every stably free A-module of rank > n is free. 5. Natural constructions 5.1. Proposition. (Changing the base ring) If P is a finitely generated projective A-module and if ρ : A → B is a ring homomorphism, then the B-module ρ? (P ) obtained by scalar extension to B is finitely generated projective. If P is isomorphic to the image of a projection matrix F = (fi,j ), ρ? (P ) is isomorphic to the image of the same  matrix seen in B, i.e. the projection matrix F ρ = ρ(fi,j ) . J Changing the base ring preserves the direct sums and the projections. In the following proposition, we can a priori take as the sets of indices I = J1..mK and J = J1..nK, but the set I × J, which serves as a set of indices for the square matrix that defines the Kronecker product of the two matrices F and G is not equal to J1..mnK. This is an important argument in favor of the definition of matrices à la Bourbaki, i.e. with finite row and column index sets which are not necessarily of the type J1..mK. 5.2. Proposition. (Tensor product) If P and Q are projective modules represented by the projection matrices F = (pi,j )i,j∈I ∈ AI×I and G = (qk,` )k,`∈J ∈ AJ×J , then the tensor product P ⊗ Q is a finitely generated projective module represented by the Kronecker product F ⊗ G = (r(i,k),(j,`) )(i,k),(j,`)∈I×J , where r(i,k),(j,`) = pi,j qk,` . J Suppose P ⊕ P 0 = Am and Q ⊕ Q0 = An . The matrix F (resp. G) represents the projection over P (resp. Q) parallel to P 0 (resp. Q0 ). Then, the Kronecker product matrix F ⊗ G represents the projection of Am ⊗ An over P ⊗ Q, parallel to the subspace (P 0 ⊗ Q) ⊕ (P ⊗ Q0 ) ⊕ (P 0 ⊗ Q0 ).  260 V. Finitely generated projective modules, 1 5.3. Proposition. (Dual of a finitely generated projective module, 2) If P is represented by the projection matrix F = (pi,j )i,j∈I ∈ AI×I , then the dual of P is a finitely generated projective module represented by the transposed matrix of F . If x is a column vector in Im F and α a column vector in the image of tF , the scalar α(x) is the unique coefficient of the matrix tα x. J This results from Fact 2.2.  5.4. Proposition. (Modules of linear maps) 1. If P or Q is finitely generated projective, the natural homomorphism (page 245) θP,Q : P ? ⊗ Q → LA (P, Q) is an isomorphism. 2. If P and Q are finitely generated projective, the module LA (P, Q) is a finitely generated projective module canonically isomorphic to P ? ⊗ Q, represented by the matrix tF ⊗ G. 3. An A-module P is finitely generated projective if and only if the natural homomorphism θP is an isomorphism. J 1. Suppose P ⊕ P 0 = Am . We have isomorphisms LA (Am , Q) ' LA (P, Q) ⊕ LA (P 0 , Q), (Am )? ⊗ Q ' (P ⊕ P 0 )? ⊗ Q ' (P ? ⊕ (P0 )? ) ⊗ Q  ' P ? ⊗ Q ⊕ (P 0 )? ⊗ Q . These isomorphisms are compatible with the natural homomorphisms Qm ' (Am )? ⊗ Q −→ LA (Am , Q) ' Qm , P ? ⊗ Q −→ LA (P, Q), (P 0 )? ⊗ Q −→ LA (P 0 , Q). As the first is an isomorphism, so are the others. The case where Q is finitely generated projective is treated analogously. 2. Special case of item 1. 3. Results from item 1 and from the fact that P is finitely generated projective if the image of θP contains IdP (Theorem 2.1 (b3)).  By using the commutation of the scalar extension with the tensor product we then obtain the following corollary. 5.5. Corollary. If P or Q is finitely generated projective (over A), and ρ if A −→ B is an algebra, the natural homomorphism   ρ? LA (P, Q) → LB ρ? (P ), ρ? (Q) is an isomorphism. §6. Local structure theorem 261 6. Local structure theorem In this work, we give several proofs of the local structure theorem for finitely generated projective modules. The shortest path to the solution of this question is that provided by Fitting ideals. This is the object of this section. There is a lightning method based a kind of magic formula given in Exercise X -3. This miracle solution is actually directly inspired by another approach to the problem, based on a “dynamic reread” of the local freeness lemma (page 492). This dynamic reread is explained on page 870 in Section XV -5. However, we consider a more enlightening approach is that based entirely on projection matrices and on the more structural explanations involving the systematic use of the determinant of the endomorphisms of finitely generated projective modules. This will be done in Chapter X. 6.1. Theorem. (Local structure and Fitting ideals of a finitely generated projective module, 1) 1. A finitely presented A-module P is finitely generated projective if and only if its Fitting ideals are (generated by) idempotents. 2. More precisely for the converse, suppose that a finitely presented Amodule P has idempotents Fitting ideals, and that G ∈ Aq×n is a presentation matrix of P , corresponding to a system of q generators. Let fh be the idempotent that generates Fh (P ), and rh := fh − fh−1 . a. (r0 , . . . , rq ) is a fundamental system of orthogonal idempotents. b. Let th,j be a minor of order q − h of G, and sh,j := th,j rh . Then, the A[1/sh,j ]-module P [1/sh,j ] is free of rank h. c. The elements sh,j are comaximal. d. We have rk = 1 if and only if the matrix G is of rank q − k. e. The module P is finitely generated projective. 3. In particular, a finitely generated projective module becomes free after localization at a finite number of comaximal elements. J Theorem 2.3 tells us that the module P presented by the matrix G is projective if and only if the matrix G is locally simple. We then apply the characterization of locally simple matrices by their determinantal ideals given in Theorem II -5.26, as well as the precise description of the structure of the locally simple matrices given in this theorem (items 5 and 7 of the theorem). Note: item 3 can be obtained more directly by applying Theorem II -5.26 to an idempotent matrix (therefore locally simple) whose image is isomorphic to the module P .  Thus, the finitely generated projective modules are locally free, in the strong sense given in Theorem 1.1. 262 V. Finitely generated projective modules, 1 In Section X -1 we give an alternative proof of Theorem 1.1, more intuitive and more enlightening than the one we just gave. In addition, the comaximal elements that provide free localizations are fewer. Remark. We can therefore test if a finitely presented module is projective or not when we know how to test whether its Fitting ideals are idempotents or not. This is possible if we know how to test the membership x ∈ ha1 , . . . , ah i for every system (x, a1 , . . . , ah ) of elements of A, i.e. if the ring is strongly discrete. One can now compare with [MRR] Chap. III Exercise 4 p. 96. Annihilator of a finitely generated projective module 6.2. Lemma. The annihilator of a finitely generated projective module P is equal to its first Fitting ideal F0 (P ), generated by an idempotent. J We know that the Fitting ideals are generated by idempotents. We also know that F0 (P ) ⊆ Ann(P ) (Lemma IV -9.6). Let us look at the opposite inclusion. Fact II -6.6 implies that the annihilator of a finitely generated module is well-behaved under  localization, so for every monoid S, we have AnnAS (PS ) = AnnA (P ) S . We know that the same holds for the Fitting ideals of a finitely presented module. Moreover, to prove an inclusion of ideals, we can localize at some comaximal elements. We therefore choose comaximal elements that render the module P free, in which case the result is obvious.  The previous proof is an example of the strength of the local structure theorem (item 3 of Theorem 6.1). The following section describes another such example. 7. Locally cyclic projective modules and finitely generated projective ideals Locally cyclic modules An A-module M is said to be cyclic if it is generated by a single element: M = Aa. In other words, if it is isomorphic to a quotient A/a. In classical mathematics a module is said to be locally cyclic if it becomes cyclic after localization at any arbitrary prime ideal. It seems difficult to provide an equivalent statement that makes sense in constructive mathematics. Recall also that the remark page 33 shows that the notion does not seem pertinent when the module is not assumed to be finitely generated. Nevertheless when we restrict ourselves to the finitely generated modules there is no issue. The following definition has already been given before Fact II -2.5. §7. Locally cyclic projective modules 263 7.1. Definition. A finitely generated A-module M is said to be locally cyclic if there exist comaximal monoids S1 , . . . , Sn of A such that each MSj is cyclic as an ASj -module. In the case of an ideal we speak of a locally principal ideal. Note that the property “concrete local” in the previous definition, without the hypothesis that M is finitely generated, implies that M is finitely generated (local-global principle II -3.6). We will need the following remark. 7.2. Fact. (Successive localizations lemma, 1) If s1 , . . . , sn are comaximal elements of A and if for each i, we have elements si,1 , . . . , si,ki , comaximal in A[1/si ], then the elements si si,j are comaximal in A. Item 3 of the following theorem presents an efficient computational machinery for locally cyclic modules. 7.3. Theorem. (Locally cyclic finitely generated modules) Let M = Ax1 + · · · + Axn be a finitely generated module. The following properties are equivalent. 1. The module M is locally cyclic. 2. There exist n comaximal elements si of A such that for each i we have M =Asi hxi i. 3. There exists a matrix A = (aij ) ∈ Mn (A) that satisfies P aii = 1 (3) a`j xi = a`i xj ∀i, j, ` ∈ J1..nK 4. 5. 6*. 7*. in other words, for each row `, the following matrix is formally of rank 6 1 (its minors of order 2 are null)   a`1 · · · a`n . x1 · · · xn V2 A (M ) = 0. F1 (M ) = h1i. After localization at any prime ideal, M is cyclic. After localization at any maximal ideal, M is cyclic. J 3 ⇒ 2 ⇒ 1. Clear, with si = aii in item 2. Let us show that a cyclicP module satisfies condition 3. n If M = hgi, we have g = i=1 ui xi and xi = gyi . Let bij = ui yj . Then, for all i, j, ` ∈ J1..nK, we have b`j xi = u` yi yj g = b`i xj . In addition  Pn Pn Pn g = i=1 ui xi = i=1 ui yi g = i=1 bii g. Pn Let s = 1 − i=1 bii . We have sg = 0, and so sxk = 0 for all k. Take aij = bij for (i, j) 6= (n, n) and ann = bnn + s. Then, the matrix (aij ) indeed satisfies Equations (3). 264 V. Finitely generated projective modules, 1 1 ⇒ 3. The property 3 can be seen as the existence of a solution of a system of linear equations whose coefficients are expressed in terms of the generators xi . However, a cyclic module satisfies the property 3. We can therefore apply the basic local-global principle. Thus, 1 ⇔ 2 ⇔ 3. V2 1 ⇒ 4 and 1 ⇒ 5. Because the functors A • and F1 (•) are well-behaved under localization. 5 ⇒ 1. M is the quotient module of a finitely presented module M 0 such that F1 (M 0 ) = h1i. We can therefore suppose without loss of generality that M is finitely presented with a presentation matrix B ∈ An×m . By hypothesis, the minors of order n − 1 of the matrix B are comaximal. When we invert one of these minors, by the invertible minor lemma (page 45), the matrix B is equivalent to a matrix   In−1 0n−1,m−n+1 , 01,n−1 B1 and the matrix B1 ∈ A1×(m−n+1) is also a presentation matrix of M . Assume 4 and n > 2, and let us show that M is, after localization at suitable comaximal elements, generated by n − 1 elements. This will be sufficient to show (by using an induction on n) that 4 implies 1, by using V2 Fact 7.2. The module A (M ) is generated by the elements vj,k = xj ∧ xk (1 6 j < k 6 n) and the syzygies between the vj,k ’s are all obtained from V2 the syzygies between the xi ’s. Therefore if A (M ) = 0, M is the quotient V2 of a finitely presented module M 0 such that A (M 0 ) = 0. We then suppose without loss of generality that M is finitely presented with a presentation V2 matrix A = (aij ). A presentation matrix B for A (M ) with the generators vj,k is obtained as indicated in Proposition IV -4.9. It is a matrix of format n(n−1) × m (for some suitable m), and each coefficient of B is null or equal 2 to some aij . This matrix is surjective, therefore Dn(n−1)/2 (B) = h1i and the aij ’s are comaximal. However, when we pass from A to A[1/aij ], xi becomes linear combination of the xk ’s (k 6= i) and M is generated by n − 1 elements. 1 ⇒ 6* ⇒ 7*. Obvious. The proof that 7* implies 3 is nonconstructive: in the proof that 1 implies 3, we replace the existence of a solution of a system of linear equations under the basic local-global principle by the existence of a solution under the corresponding abstract local-global principle.  A matrix (aij ) which satisfies Equations (3) is called a cyclic localization matrix for the n-tuple (x1 , . . . , xn ). If the xi ’s are elements of A, they generate a locally principal ideal and we speak of a principal localization matrix. §7. Locally cyclic projective modules 265 Remark. In the case of a module generated by 2 elements M = Ax + Ay, Equations  (3) are very simple and a cyclic localization matrix for (x, y) is a 1 − u −b matrix which satisfies −a u 1 − u −b x y = 7.4. Proposition. A-module. −a x u y = 0, i.e. (1 − u)y = bx and ux = ay. (4) Let M = Ax1 + · · · + Axn be a finitely generated 1. If M is locally cyclic and if A = (aij ) is a cyclic localization matrix for (x1 , . . . , xn ), we have the following results.     a. x1 · · · xn A = x1 · · · xn . b. The ideals D2 (A) and D1 (A2 − A) annihilate M . c. One has aii M ⊆ Axi , and over the ring Ai = A[ a1ii ], M =Ai Ai xi . d. ha1j , . . . , anj i M = Axj . P e. More generally, for any arbitrary element y = αi xi of M , if we P let α = t [α1 · · · αn ] and β = A α, then y = i βi xi and we obtain an equality of square matrices with coefficients in M :   β1    βx =  ...  x1 · · · xn = A y, i.e. ∀i, j βi xj = aij y (5) βn In particular, hβ1 , . . . , βn i M = Ay. 2. The following properties are equivalent. – M is isomorphic to the image of a projection matrix of rank 1. – M is faithful (i.e. Ann(M ) = 0) and locally cyclic. In this case, let A be a cyclic localization matrix for (x1 , . . . , xn ). We obtain – A is a projection matrix of rank 1, I −A [ x1 ··· xn ] – the following sequence is exact An −−n−−→ An −−−−−→ M → 0, – M ' Im A. J 1. Item 1c is clear, and 1d is a special case of 1e.   1a. The j th coordinate of x1 · · · xn A is written as Xn Xn aij xi = aii xj = xj . i=1 i=1 1b. Let us show that every minor of order 2 of A annihilates xi . Consider 266 V. Finitely generated projective modules, 1 the following matrix   aji aj` ajh  aki ak` akh  . xi x` xh Its determinant is null (by expanding with respect to the first row) and the expansion with respect to the first column provides (aj` akh − ajh ak` )xi = 0. Let us show that A2 = A modulo Ann(M ). What follows is written modulo this annihilator. We come to show that the minors of order 2 of A are null. Thus A is a cyclic localization matrix for each of its rows Li . By item 1a applied to Li , we have Li A = Li , and so A2 = A.   1e. Let x = x1 · · · xn . On the one hand X X αi xi . βi xi = xβ = xAα = xα = i i On the other hand, X X X  βi xj = αk aik xj = αk aij xk = aij αk xk = aij y. k k k This shows Equality (5) and we deduce that hβ1 , . . . , βn i M = Ay. 2. First assume that M is isomorphic to the image of a projection matrix A of rank 1. Let xi be the ith column of A. As D2 (A) = 0, we have the equalities a`j xi = a`i xj for i, j, ` ∈ J1..nK. This implies that over the ring A[1/a`j ], M is generated by xj , and since D1 (A) = h1i, the module is locally cyclic. Finally, let b ∈ Ann(M ), then bA = 0, and D1 (A) = h1i implies b = 0; the module is faithful. Now assume that M is locally cyclic, and that A is a cyclic localization matrix for a generator set (x1 , . . . , xn ). If M is faithful, given 1b, we have D2 (A) = 0 and A2 = A so A is a projection matrix of rank 6 1. Since Tr(A) = 1, A is of rank 1. Given the matrix In − A is a matrix of P1a, n syzygies for (x1 , . . . , xn ). Now let i=1 αi xi = 0 be an arbitrary syzygy of the xi ’s. As in 1e, let β = t[ β1 · · · βn ] = A t[ α1 · · · αn ], we obtain hβ1 , . . . , βn i M = 0 and, since M is faithful, β = 0. Thus, A t[ α1 · · · αn ] = 0 and (In − A) t[ α1 · · · αn ] = t[ α1 · · · αn ]: every syzygy for (x1 , . . . , xn ) is a linear combination of the columns of In − A. This shows that In − A is a presentation matrix of M for the generator set (x1 , . . . , xn ). Since A2 = A, we have M ' Coker(In − A) ' Im A.  Cyclic projective modules The following description applies in particular to projective principal ideals. §7. Locally cyclic projective modules 7.5. Lemma. equivalent. 267 For a cyclic module M , the following properties are 1. M is a finitely generated projective A-module. 2. Ann(M ) = hsi with s idempotent. 3. M ' hri with r idempotent. J The implications 2 ⇒ 3 ⇒ 1 are obvious, and the implication 1 ⇒ 2 is given in Lemma 6.2.  We deduce that a ring A is quasi-integral if and only if every principal ideal is projective, which justifies the English terminology pp-ring (principal ideals are projective). Locally cyclic projective modules The following lemma generalizes the equivalence given in Proposition 7.4 between faithful locally cyclic modules and images of projection matrices of rank 1. 7.6. Lemma. The following properties are equivalent. 1. M is locally cyclic and Ann(M ) is generated by an idempotent. 2. M is finitely generated projective and locally cyclic. 3. M is isomorphic to the image of a projection matrix of rank 6 1. J 1 ⇒ 2. We localize at comaximal elements that render the module cyclic and we apply Lemma 7.5. In 2 and 3 we let F be a square projection matrix of order n, with M as its image. After localization at comaximal elements it becomes similar to a standard projection matrix Ik,n , k depending on the localization. 2 ⇒ 3. If k > 1, we obtain at the corresponding localization F1 (M ) = h0i. As we have already F1 (M ) = h1i, the localization is trivial. The rank of F is therefore 6 1 at all the localizations. 3 ⇒ 1. After localization, as the matrix is of rank 6 1, we have k 6 1. The module therefore becomes cyclic. Moreover, by Lemma 6.2, Ann(M ) is generated by an idempotent.  Finitely generated projective ideals Recall that an ideal a is said to be faithful if it is faithful as an A-module. Remark. In the most common terminology, an ideal is called regular if it contains a regular element. A fortiori this is a faithful ideal. We will not use this terminology as we find it ambiguous. 268 V. Finitely generated projective modules, 1 7.7. Lemma. 1. If a ⊆ b with a finitely generated and b locally principal, there exists a finitely generated ideal c such that bc = a. 2. An ideal a is finitely generated projective if and only if it is locally principal and its annihilator is generated by an idempotent. 3. An ideal a is quasi-free if and only if it is principal and its annihilator is generated by an idempotent. 4. Let a1 and a2 be ideals and b be a faithful finitely generated projective ideal. If ba1 = ba2 , then a1 = a2 . 5. An ideal is invertible if and only if it is locally principal and it contains a regular element. J 1. It is enough to show that for an arbitrary a ∈ b there exists a finitely generated ideal c such that b c = hai. This is given by item 1e of Proposition 7.4 when M = b. 2. The direct implication uses Corollary II -5.23: if a linear map Ak → A is injective with k > 1, the ring is trivial. Therefore at each localization, the ideal a is not only free but principal. The converse implication is in Lemma 7.6. L 3. For the direct implication, we write a ' i∈J1..nK hei i, where the ei ’s are idempotents with ei+1 being a multiple of ei . We want to show that if n > 1, e2 = 0. We localize the injection a → A at e2 and we obtain an injection L Ae2 ⊕ Ae2 ' e1 Ae2 ⊕ e2 Ae2 ,→ ei Ae2 ' aAe2 ,→ Ae2 , so Ae2 is null (Corollary II -5.23). 4. The ideal b becomes free (after localization), and cyclic by item 2. If in addition it is faithful, its annihilator is null, and the generator is a regular element. 5. Item 1 implies that a locally principal ideal that contains a regular element is invertible. Conversely, let a = ha1 , . . . , an i be an invertible ideal. There exists a c regular in a and an ideal b such that a b = hci. Let b1 , P . . . , bn ∈ b with i ai bi = c. We have for each i, j ∈ J1..nK some cij ∈ A such that bi aj = c cij . By using the fact that c is regular we verify without difficulty that the matrix (cij )16i,j6n is a principal localization matrix for (a1 , . . . , an ).  §8. Determinant, fundamental polynomial and rank polynomial 269 8. Determinant, characteristic polynomial, fundamental polynomial and rank polynomial If M is an A-module, we denote by M [X] the A[X]-module obtained by scalar extension. When A is an integral ring, if P is a finitely generated projective module, isomorphic to the image of a projector F ∈ AGn (A), by scalar extension to the quotient field we obtain a vector space P 0 of finite dimension, say k. We deduce that the characteristic polynomial of the matrix F is equal to (X − 1)k X n−k . Even simpler, the determinant of the multiplication by X in P 0 [X] is equal to X k , i.e.  det (In − F ) + XF = X k . When A is an arbitrary ring, we will see that we can define the analogue of the above polynomial X k . First of all, we introduce the determinant of an endomorphism of a finitely generated projective module. The determinant, the characteristic polynomial and the cotransposed endomorphism 8.1. Theorem and definition. Let P be a finitely generated projective module. 1. Let ϕ ∈ End(P ). Suppose that P ⊕ Q1 is isomorphic to a free module and let ϕ1 = ϕ ⊕ IdQ1 . a. The determinant of ϕ1 only depends on ϕ. The scalar defined as such is called the determinant of the endomorphism ϕ. We denote it by det(ϕ) or det ϕ. b. The determinant of the endomorphism XIdP [X] −ϕ of P [X] is called the characteristic polynomial of the endomorphism ϕ. We denote it by Cϕ (X); we have C−ϕ (0) = det ϕ. c. Consider the cotransposed endomorphism Adj(ϕ1 ) = ϕ f1 of ϕ1 . It operates on P and the endomorphism of P defined as such only depends on ϕ. We call it the cotransposed endomorphism of ϕ and we denote it by ϕ e or Adj(ϕ). d. Let ρ : A → B be a morphism. By scalar extension from A to B, we get a finitely generated projective module ρ? (P ) with an endomorphism ρ? (ϕ). Then we have the following good “functorial” properties    det ρ? (ϕ) = ρ det(ϕ) , Cρ? (ϕ) (X) = ρ Cϕ (X) ,   Adj ρ? (ϕ) = ρ? Adj(ϕ) . 270 V. Finitely generated projective modules, 1 2. If ψ : P → P is another endomorphism of P , we have det(ϕ ◦ ψ) = det(ϕ) det(ψ). ϕ γ 0 ϕ0 0 3. If P is another finitely generated projective module and if ψ = is an endomorphism of P ⊕ P 0 “block-triangular,” we have 0 det(ψ) = dd and ψe = d0 ϕ e η 0 dϕe0 , where d = det(ϕ), d0 = det(ϕ0 ). 4. If ϕ : P → P and ϕ0 : P 0 → P 0 are endomorphisms of finitely generated projective modules, and if α ◦ ϕ = ϕ0 ◦ α for an isomorphism α : P → P 0 , then det(ϕ) = det(ϕ0 ). 5. The linear map ϕ is an isomorphism (resp. is injective) if and only if det(ϕ) is invertible (resp. is regular). 6. We have the “classical” equality ϕ e◦ϕ = ϕ◦ϕ e = det(ϕ) IdP . 7. The Cayley-Hamilton theorem applies: Cϕ (ϕ) = 0. 8. Let C−ϕ (−X) − C−ϕ (0) − C−ϕ (−X) + det(ϕ) Γϕ (X) := − = , X X such that C−ϕ (−X) = −XΓϕ (X) + det(ϕ). Then ϕ e = Γϕ (ϕ). J We remark that the definitions given in item 1 indeed reproduces the usual objects of the same name in the case where the module is free. Similarly the formula in 8 gives, when ϕ is an endomorphism of a free module, the same Γϕ as the formula of Lemma III -1.4. So there is no conflict of notation. 1a. Assume that Am ' P ⊕ Q1 and An ' P ⊕ Q2 , and consider the direct sum Am+n ' P ⊕ Q1 ⊕ P ⊕ Q2 . (∗) Let ϕ1 = ϕ ⊕ IdQ1 and ϕ2 = ϕ ⊕ IdQ2 . One has to show the equality det ϕ1 = det ϕ2 . Consider the endomorphism of Am+n φ = ϕ ⊕ IdQ1 ⊕ IdP ⊕ IdQ2 , such that φ is conjugated of ϕ1 ⊕IdAn and of ϕ2 ⊕IdAm . Hence det φ = det ϕ1 and det φ = det ϕ2 . 1c. We proceed similarly. The cotransposition of the endomorphisms satisfies item 3 in the case of free modules, so φe operates on P ⊕ Q1 and is restricted at ϕ f1 . Moreover, since φe = Γφ (φ), φe operates on each component in the direct sum (∗). Similarly φe operates on P ⊕ Q2 and is restricted at ϕ f2 . Therefore ϕ e1 and ϕ2 both operate on P in the same way that ψe does. Note that ϕ e = Γφ (ϕ). 1d. This is a direct consequence of the definitions. §8. Determinant, fundamental polynomial and rank polynomial 271 All the remaining items of the theorem are consequences of the free case (where the results are clear), of the local structure theorem and of item 1d. Indeed the statements can be certified by verifying them after localization at comaximal elements, and the finitely generated projective modules we consider become simultaneously free after localization at a suitable system of comaximal elements. Nevertheless we give more direct proofs. The assertions 2, 3, 4 and 5 easily result from the definitions, knowing that the results are true in the free case. 6. We have defined ϕ e as the restriction of ϕ f1 at P . Since ϕ1 is an endomorphism of a free module, we get ϕ f1 ◦ ϕ1 = det(ϕ1 ) IdP ⊕Q1 , which gives by restriction at P the desired equality ϕ e ◦ ϕ = det(ϕ) IdP , since det ϕ = det ϕ1 . 7. We can reproduce the following proof, classical in the case of free modules. Consider the endomorphism ψ = XIdP [X] − ϕ ∈ EndA[X] (P [X]). By item 6 we have e = ψ ψe = Cϕ (X) IdP [X] . ψψ (+) Moreover, ψe is a polynomial in X with coefficients in A[ϕ]. Therefore P we can write ψe = k>0 φk X k , where each φk : P → P is a polynomial P in ϕ. By letting Cϕ (X) = k>0 ak X k and by identifying both sides of the equality (+) we obtain (by agreeing to φ−1 = 0) φk−1 − φk ϕ = ak IdP for all k > 0. Then, Cϕ (ϕ) = P k>0 (φk−1 − φk ϕ)ϕk = 0. 8. The polynomial Γϕ has been defined in order to satisfy C−ϕ (−X) = −XΓϕ (X) + det(ϕ). By evaluating X := ϕ, we obtain ϕΓϕ (ϕ) = det(ϕ)IdP (Cayley-Hamilton theorem), so ϕΓϕ (ϕ) = ϕϕ. e By replacing ϕ by θ := T IdP [T ] + ϕ, we e because θ is a regular element of e obtain θΓθ (θ) = θθ, then Γθ (θ) = θ, A[T, ϕ] = A[ϕ][T ]. We finish the proof by putting T := 0.  Remark. The determinant of the identity map of every finitely generated projective module, including the module reduced to {0}, is equal to 1 (by following the above definition). 8.2. Corollary. Let ϕ : P → P be an endomorphism of a finitely generated projective module, and x ∈ P satisfying ϕ(x) = 0, then det(ϕ)x = 0. J Results from ϕe ◦ ϕ = det(ϕ)IdP .  272 V. Finitely generated projective modules, 1 The fundamental polynomial and the rank polynomial We are interested in the characteristic polynomial of the identity of a finitely generated projective module. It is however simpler to introduce another polynomial which is directly related to it and which is the analogue of the polynomial X k , which we spoke of at the beginning of Section 8. 8.3. Definitions and notations. Let P be a finitely generated projective A-module and ϕ an endomorphism of P . Consider the A[X]-module P [X] and define the polynomials FA,ϕ (X) and RA,P (X) (or Fϕ (X) and RP (X) if the context is clear) by the following equalities Fϕ (X) = det(IdP [X] + Xϕ) and RP (X) = det(XIdP [X] ). Therefore RP (1 + X) = FIdP (X). • The polynomial Fϕ (X) is called the fundamental polynomial of the endomorphism ϕ. • The coefficient of X in the fundamental polynomial is called the trace of ϕ and is denoted by TrP (ϕ). • The polynomial RP (X) is called the rank polynomial3 of the module P . Note that Fϕ (0) = 1 = RP (1), Cϕ (0) = det(−ϕ), and Faϕ (X) = Fϕ (aX), but Cϕ (X) is not always monic (see the Example on page 275). Also note that for all a ∈ A we get det(aϕ) = det(a IdP ) det(ϕ) = RP (a) det(ϕ). (6) We deduce the following equalities RP (0) = det(0EndA (P ) ),  C−ϕ (−X) = det(ϕ−XIdP [X] ) = det −(XIdP [X] −ϕ) = RP (−1)Cϕ (X), det(ϕ) = RP (−1) Cϕ (0). The last equality replaces the equality det(ϕ) = (−1)k Cϕ (0) valid for the free modules of rank k. We will say that a polynomial R(X) is multiplicative when R(1) = 1 and R(XY ) = R(X)R(Y ). 8.4. Theorem. (The fundamental system of orthogonal idempotents associated with a finitely generated projective module) 1. If P is a finitely generated projective module over a ring A the rank polynomial RP (X) is multiplicative. 3 This terminology is justified by the fact that for a free module of rank k the rank polynomial is equal to X k , as well as by Theorem 8.4. §8. Determinant, fundamental polynomial and rank polynomial 273 2. In other words, the coefficients of RP (X) form a fundamental system of orthogonal idempotents. If RP (X) = r0 + r1 X + · · · + rn X n , we denote rh by eh (P ): it is called the idempotent associated with the integer h and with the module P (if h > n we let eh (P ) := 0). 3. Every rank polynomial RP (X) is a regular element of A[X]. 4. A generalization of the equality rk(P ⊕ Q) = rk(P ) + rk(Q) regarding the ranks of the free modules is given for the finitely generated projective modules by RP ⊕Q (X) = RP (X) RQ (X) . Pn Pn n 5. If P ⊕Q ' A and RP (X) = k=0 rk X k , then RQ (X) = k=0 rk X n−k . 6. The equality RP (X) = 1 characterizes, among the finitely generated projective modules, the module P = {0}. It is also equivalent to e0 (P ) = RP (0) = 1. J 1 and 2. If µa designates multiplication by a in P [X, Y ], we clearly have the equality µX µY = µXY , so RP (X) RP (Y ) = RP (XY ) (Theorem 8.1.2 ). Since RP (1) = det(IdP ) = 1, we deduce that the coefficients of RP (X) form a fundamental system of orthogonal idempotents. 3. Results from McCoy’s lemma (Corollary III -2.3). We could also prove it using the basic local-global principle (by localizing at the ri ’s). 4. Results from item 3 in Theorem 8.1.  Pn  Pn k k 5. Results from items 3 and 4 since = X n. k=0 rk X k=0 rn−k X 6. We have r0 = det(0End(P ) ). Since the ri ’s form a fundamental system of orthogonal idempotents, the equalities RP = 1 and r0 = 1 are equivalent. If P = {0}, then 0End(P ) = IdP , so r0 = det(IdP ) = 1. If r0 = 1, then 0End(P ) is invertible, therefore P = {0}.  If P is a free A-module of rank k, we have RP (X) = X k , the following definition is therefore a legitimate extension from free modules to finitely generated projective modules. 8.5. Definition. A finitely generated projective module P is said to be of rank equal to k if RP (X) = X k . If we do not specify the value of the rank, we simply say that the module is of constant rank. We will use the notation rk(M ) = k to indicate that a module (assumed to be projective of constant rank) is of rank k. Note that by Proposition 8.11, every projective module of rank k > 0 is faithful. 274 V. Finitely generated projective modules, 1 8.6. Fact. The characteristic polynomial of an endomorphism of a projective module of constant rank k is monic of degree k. J We can give an elegant direct proof (see Exercise 20). We could also avoid all effort and use a localization argument, by relying on the local structure theorem and on Fact 8.8, which asserts that everything goes well for the characteristic polynomial by localization.  The convention in the following remark allows for a more uniform formulation of the theorems and the proofs hereinafter. Remark. When the ring A is reduced to {0}, all the A-modules are trivial. Nevertheless, in accordance with the above definition, the null module over the null ring is a projective module of constant rank equal to k, for any value of the integer k > 0. Moreover, it is immediate that if a finitely generated projective module P has two distinct constant ranks, then the ring is trivial. We have RP (X) = 1A X h = 1A X k with h 6= k therefore the coefficient of X h is equal to both 1A and 0A . Some explicit computations The fundamental polynomial of an endomorphism ϕ is easier to use than the characteristic polynomial. This comes from the fact that the fundamental polynomial is invariant when we add “as a direct sum” a null endomorphism to ϕ. This allows us to systematically and easily reduce the computation of a fundamental polynomial to the case where the projective module is free. Precisely, we are able to compute the previously defined polynomials by following the lemma stated below. 8.7. Lemma. (Explicit computation of the determinant, of the fundamental polynomial, of the characteristic polynomial, of the rank polynomial and of the cotransposed endomorphism) Let P ' Im F be an A-module with F ∈ AGn (A). Let Q = Ker(F ), such that P ⊕ Q ' An , and In − F is the matrix of the projection πQ over Q parallel to P . An endomorphism ϕ of P is characterized by the matrix H of the endomorphism ϕ0 = ϕ ⊕ 0Q of An . Such a matrix H is subjected to the unique restriction F · H · F = H. Let G = In − F + H. 1. Computation of the determinant: det(ϕ) = det(ϕ ⊕ IdQ ) = det(G). 2. Therefore also  det(XIdP [X,Y ] + Y ϕ) = det (XIdP [X,Y ] + Y ϕ) ⊕ IdQ = det(In − F + XF + Y H) = det(In + (X − 1)F + Y H). §8. Determinant, fundamental polynomial and rank polynomial 275 3. Computation of the rank polynomial of P :  RP (1 + X) = det (1 + X)IdP [X] = det(In + XF ), in particular, RP (0) = det(In − F ), and RP (1 + X) = 1 + u1 X + · · · + un X n , where uh is the sum of the principal minors of order h of the matrix F . 4. Computation of the fundamental polynomial of ϕ: Fϕ (Y ) = det(IdP [Y ] + Y ϕ) = det(In + Y H) = 1 + Xn k=1 vk Y k , where vk is the sum of the principal minors of order k of the matrix H. In particular, TrP (ϕ) = Tr(H). 5. Computation of the characteristic polynomial of ϕ: Cϕ (X) = det(XIdP [X] − ϕ) = det(In − H + (X − 1)F ). 6. Computation of the cotransposed endomorphism ϕ e of ϕ: it is defined by the matrix e·F =F ·G e=G e − det(ϕ)(In − F ). G For the last item we apply item 3 of Theorem 8.1 with ϕ and IdQ by remarking that G is the matrix of ψ = ϕ ⊕ IdQ = ϕ0 + πQ . Note that the characteristic polynomial of IdP is equal to RP (X − 1). The following fact is an immediate consequence of Proposition 5.1 and of the previous lemma. 8.8. Fact. The determinant, the cotransposed endomorphism, the characteristic polynomial, the fundamental polynomial and the rank polynomial are well-behaved under scalar extension via a homomorphism A → B. In particular, if ϕ : P → P is an endomorphism of a finitely generated projective A-module and S a monoid of A, then det(ϕ)S = det(ϕS ) (or, if we prefer, det(ϕ)/1 =AS det(ϕS )). The same thing holds for the cotransposed endomorphism, the fundamental polynomial, the characteristic polynomial and the rank polynomial. Example. Let e be an idempotent of A and f = 1 − e. The module A is a direct sum of the submodules eA and f A which are therefore finitely generated projective. The 1 × 1 matrix having for unique coefficient e is a matrix F whose image is P = eA. For a ∈ A consider µa = µP,a ∈ EndA (P ). The matrix H has for unique coefficient ea. We then have, by applying the 276 V. Finitely generated projective modules, 1 previous formulas, det(0eA ) = f, ReA (X) = f + eX, CIdeA (X) = f − e + eX, det(µa ) = f + ea, Fµa (X) = 1 + eaX, Cµa (X) = 1 − ea + e(X − 1) = f − ea + eX. Note that the characteristic polynomial of µa is not monic if e 6= 1, 0, and we indeed have the Cayley-Hamilton theorem Cµa (µa ) = (f − ea)IdeA + eµa = (f − ea + ea)IdeA = f IdeA = 0eA . With a coordinate system When we use a coordinate system Lemma 8.7 leads to the following result. 8.9. Fact. Let P be a finitely generated projective module with a coordinate  system (x1 , . . . , xn ), (α1 , . . . , αn ) and ϕ be an endomorphism of P . Recall (Fact 2.9) that we can encode P by the matrix  def F = αi (xj ) i,j∈J1..nK (P is isomorphic to Im F ⊆ An by means of x 7→ π(x) = t[ α1 (x) · · · αn (x) ]). In addition the endomorphism ϕ is represented by the matrix  def H = αi (ϕ(xj )) i,j∈J1..nK which satisfies H = HF = F H. 1. We have Fϕ (X) = det(In + XH) and Tr(ϕ) = Tr(H) = P i  αi ϕ(xi ) . 2. For ν ∈ P ? and x, y ∈ P , recall that θP (ν ⊗ x)(y)  = ν(y)x. The trace of this endomorphism is given by TrP θP (ν ⊗ x) = ν(x). J The matrix H is also that of the A-linear map ϕ0 introduced in Lemma 8.7  π(x) + y 7→ π ϕ(x) with π(x) ∈ Im F and y ∈ Ker F. Item 2 therefore results from Lemma 8.7. 3. By item 2, we have  P  P P Tr θP (ν ⊗x) = i αi (ν(xi )x)= i ν(xi )αi (x)=ν i αi (x)xi =ν(x).  8.10. Lemma. Let M , N be two finitely generated projective k-modules and let ϕ ∈ Endk (M ) and ψ ∈ Endk (N ) be endomorphisms. Then, TrM ⊗N (ϕ ⊗ ψ) = TrM (ϕ) TrN (ψ). J Consider coordinate systems for M and N and apply the formula for the trace of the endomorphisms (Fact 8.9).  §8. Determinant, fundamental polynomial and rank polynomial 277 The annihilator of a finitely generated projective module We have already established certain results regarding this annihilator by relying on the local structure theorem for finitely generated projective modules, proven by using the Fitting ideals (see Lemma 6.2). Here we give some additional results by using a proof that does not rely on the local structure theorem. 8.11. Proposition. Let P be a finitely generated projective A-module. Consider the ideal JP = hα(x) | α ∈ P ? , x ∈ P i. Let r0 = RP (0) = e0 (P ). 1. hr0 i = Ann(P ) = Ann(JP ). 2. JP = hs0 i, where s0 is the idempotent 1 − r0 .  J We obviously have Ann(P ) ⊆ Ann(JP ). Let (xi )i∈J1..nK , (αi )i∈J1..nK be a coordinate system over P . Then JP = hαi (xj ) ; i, j ∈ J1..nKi ,  and the projection matrix F = αi (xj ) i,j∈J1..nK has an image isomorphic to P . By definition, r0 is the idempotent r0 = det(In − F ). Since (In − F )F = 0, we have r0 F = 0, i.e. r0 P = 0. Therefore hr0 i ⊆ Ann(P ) ⊆ Ann(JP ) and JP ⊆ Ann(r0 ). Moreover, we have In − F ≡ In modulo JP , so by taking the determinants, we have r0 ≡ 1 modulo JP , i.e. s0 ∈ JP , then Ann(JP ) ⊆ Ann(s0 ). We can therefore conclude hr0 i ⊆ Ann(P ) ⊆ Ann(JP ) ⊆ Ann(s0 ) = hr0 i and hs0 i ⊆ JP ⊆ Ann(r0 ) = hs0 i .  Canonical decomposition of a projective module 8.12. Definition. Let P be a finitely generated projective A-module and h ∈ N. If rh = eh (P ), we denote by P (h) the A-submodule rh P . It is called the component of the module P in rank h. Recall that, for an idempotent e and an A-module M , the module obtained by scalar extension to A[1/e] ' A/h1 − ei can be identified with the submodule eM , itself isomorphic to the quotient module M /(1 − e)M . 8.13. Theorem. Let P be a finitely generated projective A-module. 1. The module rh P = P (h) is a projective A[1/rh ]-module of rank h. 2. The module P is the direct sum of the P (h) ’s. 3. The ideal hr0 i is the annihilator of the A-module P . 4. For h > 0, P (h) = {0} implies rh = 0. 278 V. Finitely generated projective modules, 1 J 1. Localize at rh : we obtain RP (h) (X) =A[1/rh ] RP (X) =A[1/rh ] X h . 2. Because the rh ’s form a fundamental system of orthogonal idempotents. 3. Already proved (Proposition 8.11). 4. Results immediately from item 3.  Note that, except if rh = 1 or h = 0, the module rh P is not of constant rank when considered as an A-module.. The previous theorem gives a “structural” proof of Theorem 1.3. Remark. If P is (isomorphic to) the image of a projection matrix F the idempotents rk = ek (P ) attached to the module P can be linked to the characteristic polynomial of the matrix F as follows Pn det(XIn − F ) = k=0 rk X n−k (X − 1)k . (Note that the X n−k (X − 1)k form a basis of the module of polynomials of degree 6 n, triangular with respect to the usual basis.) Rank polynomial and Fitting ideals The proof of Theorem 8.14 that follows relies on Theorem 6.1, which asserts that a finitely generated projective module becomes free after localization at comaximal elements. We have placed the theorem here because it answers to the questions that we naturally ask ourselves after Theorem 8.4. First, check that a projection matrix is of rank k if and only if its image is a projective module of constant rank k. More generally, characterize the fundamental system of orthogonal idempotents that occurs in the rank polynomial in terms of the Fitting ideals of the module. Actually, we can give an alternative proof of Theorem 8.14 without taking the route of a localization argument, by making use of exterior powers (see Proposition X -1.2). Let us point out that for a finitely presented module M the equality Fh (M ) = h1i means that M is locally generated by h elements (we have seen this in the case h = 1 in Theorem 7.3, in the general case, see the local number of generators lemma on page 494 and Definition IX -2.5). 8.14. Theorem. (Local structure and Fitting ideals of a finitely generated projective module, 2) Pq Let F ∈ AGq (A), P ' Im F and RP (X) = i=0 ri X i . 1. Let S(X) = RP (1 + X) = 1 + u1 X + · · · + uq X q (uh is the sum of the principal minors of order h of the matrix F ). We have, for all h ∈ J0..qK, ( Dh (F ) = hrh + · · · + rq i = hrh , . . . , rq i = huh , . . . , uq i Fh (P ) = hr0 + · · · + rh i = hr0 , . . . , rh i §9. Properties of finite character 279 2. In particular a. rk(F ) = h ⇐⇒ rk(P ) = h, b. rk(F ) 6 h ⇐⇒ deg RP 6 h, c. rk(F ) > h ⇐⇒ r0 = · · · = rh = 0 ⇐⇒ Fh (P ) = 0. J The equality huh , . . . , uq i = hrh , . . . , rq i results from the equalities S(X) = RP (1 + X) and RP (X) = S(X − 1). To check the equalities Dh (F ) = hrh + · · · + rq i = hrh , . . . , rq i and Dq−h (Iq − F ) = hr0 + · · · + rh i = hr0 , . . . , rh i , it suffices to do it after localization at comaximal elements. However, the kernel and the image of F become free after localization at comaximal elements (Theorem II -5.26 or Theorem 6.1), and the matrix therefore becomes similar to a standard projection matrix.  9. Properties of finite character The purpose of this section is to illustrate the idea that the good concepts in algebra are those that are controllable by finite procedures. We have in mind to highlight “good properties.” There are naturally those that submit to the local-global principle: for the property to be true it is sufficient and necessary that it be true after localization at comaximal monoids. It is a phenomenon that we have frequently encountered, and will continue to encounter hereafter. Recall that a property is said to be “of finite character” if it is preserved by localization (by passing from A to S −1 A) and if, when it is satisfied after localization at S, then it is satisfied after localization at s for some s ∈ S. In Fact∗ II -2.12 we proved in classical mathematics that for the finite character properties, the concrete local-global principle (localization at comaximal monoids) is equivalent to the abstract local-global principle (localization at all the maximal ideals). However, a constructive proof of the concrete local-global principle a priori contains more precise information than a classical proof of the abstract local-global principle. 9.1. Proposition. Let S be a monoid of A. 1. Let AX = B be a system of linear equations over A. Then, if it admits a solution in AS , there exists an s ∈ S such that it admits a solution in As . 2. Let M and N be two A-submodules of a same module, with M finitely generated. Then, if MS ⊆ NS , there exists an s ∈ S such that Ms ⊆ Ns . 280 V. Finitely generated projective modules, 1 3. Let A be a coherent ring, M , N , P be finitely presented A-modules, and ϕ : M → N , ψ : N → P be two linear maps. ϕ ψ If the sequence M −→ N −→ P becomes exact after localization at S there exists an s ∈ S such that the sequence becomes exact after localization at s. 4. Let M and N be two finitely presented A-modules. Then, if MS ' NS , there exists an s ∈ S such that Ms ' Ns . 5. Let M be a finitely presented A-module. If MS is free, there exists some s ∈ S such that Ms is free. Similarly, if MS is stably free, there exists some s ∈ S such that Ms is stably free. 6. If a finitely presented module becomes projective after localization at S, it becomes projective after localization at an element s of S.  J Let us prove item 3. We first find some u ∈ S such that u ψ ϕ(xj ) = 0 for generators xj ’s of N . We deduce that ψ◦ϕ becomes null after localization at u. Moreover, the hypotheses assure us that Ker ψ is finitely generated. Let y1 , . . . , yn be generators of Ker ψ. For each of them we find a zj in N and an sj ∈ S such that sj (ϕ(zj ) − yj ) = 0. We take for s the product of u and the sj ’s. Let us prove item 4. Let G and H be presentation matrices for M and N . Let G1 and H1 be the two matrices given in Lemma IV -1.1. By hypothesis there exist two square matrices Q and R with coefficients in A such that v = det(Q) det(R) ∈ S and Q G1 =AS H1 R. This means that we have over A an equality w (Q G1 − H1 R) = 0, w ∈ S. It therefore suffices to take s = vw.  We have seen that the scalar extension is well-behaved with respect to tensor products, exterior powers and symmetrical powers. For the functor LA things do not always go so well. The following are important results for the remainder of this work. 9.2. Proposition. Let f : M → N and g : M → N be two linear maps between A-modules, with M finitely generated. Then, fS = gS if and only if there exists an s ∈ S such that sf = sg. In other words, the canonical map LA (M, N ) S → LAS (MS , NS ) is injective. 9.3. Proposition. Let M and N be two A-modules and ϕ : MS → NS be an A-linear map. We assume that M is finitely presented, or that A is integral, M finitely generated and N torsion-free (i.e. a ∈ A, x ∈ N , ax = 0 implies a = 0 or x = 0). §9. Properties of finite character 281 Then, there exists an A-linear map φ : M → N and some s ∈ S such that ∀x ∈ M ϕ(x/1) = φ(x)/s,  and the canonical map LA (M, N ) S → LAS (MS , NS ) is bijective. J The second case, which is easy, is left to the reader. To follow the proof of the first case one must look at the following figure. Suppose that M is the cokernel of the linear map g : Am → Aq with a matrix G = (gi,j ) with respect to the canonical bases, then by Fact II -6.4 the module MS is q the cokernel of the linear map gS : Am S → AS , represented by the matrix GS = (gi,j /1) over the canonical bases. Let jm jq jM jN π π q q S q q Am −→ Am S , A −→ AS , M −→ MS , N −→ NS , A −→ M, AS −→ MS , be the canonical maps. Let ψ := ϕ ◦ πS , so that ψ ◦ gS = 0. Therefore ψ ◦ gS ◦ jm = 0 = ψ ◦ jq ◦ g. There exists some s ∈ S, a common denominator for the images under ψ of the vectors of the canonical basis. Hence a linear map Ψ : Aq → N with (sψ) ◦ jq = jN ◦ Ψ. jm Am / Am S g  Aq jq gS  / Aq S πS π  M Ψ φ jM  N  / MS jN ψ ϕ !  / NS Localization of the homomorphisms Thus, jN ◦ Ψ ◦ g = s(jm ◦ gS ◦ ψ) = 0. By Proposition 9.2 applied to Ψ ◦ g, the equality jN ◦ (Ψ ◦ g) = 0 in NS implies that there exists an s0 ∈ S such that s0 (Ψ ◦ g) = 0. Therefore s0 Ψ can be factorized in the form φ ◦ π. We then obtain (ss0 ϕ) ◦ jM ◦ π = ss0 (ϕ ◦ πS ◦ jq ) = ss0 ψ ◦ jq = s0 jN ◦ Ψ = jN ◦ φ ◦ π, and since π is surjective, ss0 ϕ ◦ jM = jN ◦ φ. Thus, for all x ∈ M , we have ϕ(x/1) = φ(x)/ss0 .  9.4. Corollary. Suppose that M and N are finitely presented, or that they are finitely generated, torsion-free and that A is integral. If ϕ : MS → NS is an isomorphism, there exist an s ∈ S and an isomorphism ψ : Ms → Ns such that ψS = ϕ. 282 V. Finitely generated projective modules, 1 J Let ϕ0 : NS → MS be the inverse of ϕ. By the previous proposition, there exist φ : M → N , φ0 : N → M , s ∈ S, s0 ∈ S such that ϕ = φS /s, ϕ0 = φ0S /s0 . Let t = ss0 and define ψ = φt /s : Mt → Nt , ψ 0 = φ0t /s0 : Nt → Mt . Then, (ψ 0 ◦ ψ)S is the identity over MS , and (ψ ◦ ψ 0 )S is the identity over NS . We deduce the existence of a u ∈ S such that (ψ 0 ◦ ψ)tu is the identity over Mtu , and (ψ ◦ ψ 0 )tu is the identity over Ntu . Consequently, ψtu : Mtu → Ntu is an isomorphism such that (ψtu )S = ϕ.  Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Show Facts 2.6 and 2.9. • Check the details of Lemma 8.7. • Show Fact 9.2 as well as the second case in Proposition 9.3. Exercise 2. (Projectors having the same image) Let a, c be in a not necessarily commutative ring B. The following properties are equivalent. • ac = c and ca = a. • a2 = a, c2 = c and aB = cB. In such a case let h = c − a and x = 1 + h. Show the following results. ha = hc = 0, ah = ch = h, h2 = 0, x ∈ B× , ax = c, xa = x−1 a = a and x−1 ax = c . It should be noted in passing that the equality ax = c returns the equality aB = cB. Special case. A is a commutative ring, M is an A-module, and B = EndA (M ): two projectors that have the same image are similar. Exercise 3. (Two equivalent projectors are similar) In a (not necessarily) commutative ring B, consider two equivalent idempotents (a2 = a, b2 = b, ∃p, q ∈ B× , b = paq). We will show that they are conjugate (∃d ∈ B× , dad−1 = b). • In this question, a, b ∈ B are equivalent (b = paq), but are not assumed to be idempotents. Show that the element c = p−1 bp satisfies aB = cB. • In particular, if b is idempotent, c is a conjugate idempotent of b which satisfies aB = cB. Conclude by using the previous exercise. Special case. A is a commutative ring, M is an A-module, and B = EndA (M ): two equivalent projectors of M are similar. Exercises and problems 283 Exercise 4. (An important consequence of Schanuel’s lemma 2.8) 1. We consider two exact sequences u 0 → K → Pn−1 → · · · → P1 −→ P0 → M → 0 u0 0 0 → K 0 → Pn−1 → · · · → P10 −→ P00 → M → 0 with the projective modules Pi and Pi0 . Then, we obtain an isomorphism Pi0 ⊕ L K⊕ i≡n−1 mod 2 L Pj ' K0 ⊕ j≡n mod 2 L Pk ⊕ k≡n−1 mod 2 L P`0 . `≡n mod 2 2. Deduce that if we have an exact sequence where the Pi ’s, i ∈ J1..nK, are projective 0 → Pn → Pn−1 → · · · → P1 → P0 → M → 0, then, for every exact sequence 0 0 → K 0 → Pn−1 → · · · → P10 → P00 → M → 0, where the Pi0 ’s are projective, the module K 0 is also projective. Exercise 5. Consider an exact sequence composed of finitely generated projective modules un−1 u2 un 0 −→ Pn −−→ Pn−1 −−−→ Pn−2 −→ · · · −→ P2 −−→ P1 −→ 0 . Show that L i odd Pi ' L Pj . j even Deduce that if the Pi ’s for i > 2 are stably free, similarly for P1 . Exercise 6. Show that the following properties are equivalent. • The ring A is reduced zero-dimensional. • The finitely presented A-modules are always finitely generated projective. • Every module A/hai is finitely generated projective. (In other words, show the converse for item 1 in Theorem 3.1.) Exercise 7. (Projectors of rank 1, see Proposition 7.4) Let A = (aij ) ∈ Mn (A). We examine polynomial systems in the aij ’s whose zeros define the subvariety AGn,1 (A) of Mn (A). We denote by D20 (A) the ideal generated by the minors having one of the “four corners” on the diagonal (not to be mistaken with the principal minors, except when n = 2). 1. If A is a projector of rank 6 1, then Ann A is generated by 1−Tr A (idempotent). In particular, a projector of rank 1 is of trace 1. 2. The equalities Tr A = 1 and D20 (A) = 0 imply A2 = A and D2 (A) = 0. In this case, A is a projector of rank 1 (but we can have Tr A = 1 and A2 = A without having D2 (A) = 0, e.g. for a projector of rank 3 over a ring in which 2 = 0.) Consequently, for an arbitrary matrix A we have h1 − Tr Ai + D1 (A2 − A) ⊆ h1 − Tr Ai + D20 (A) = h1 − Tr Ai + D2 (A) without necessarily having the left-equality.  3. We consider the polynomial det In + (X − 1)A (if A ∈ AGn (A), it is the rank polynomial of the module P = Im A) and we denote by r1 (A) its coefficient 284 V. Finitely generated projective modules, 1 in X. We therefore have the equality of the three following ideals, defining the subvariety AGn,1 (A) of Mn (A): h1 − Tr Ai + D20 (A) = h1 − Tr Ai + D2 (A) = 1 − r1 (A) + D1 (A2 − A). Specify the cardinality of each generator set. Exercise 8. (Projector of rank 1 having a regular coefficient) Let A = (aij ) ∈ AGn (A) be a projector of rank 1, Li its row i, Cj its column j. 1. Provide a direct proof of the matrix equality Cj · Li = aij A. By noticing that Li · Cj = aij , deduce the equality of ideals hLi i hCj i = haij i. 2. Suppose aij is regular; so hLi i and hCj i are invertible ideals, inverses of each other. Provide a direct proof of the exactitude in the middle of the sequence I −A L n i An −− −→ An −−→ hLi i → 0 and therefore conclude that hLi i ' Im A. 3. Prove that the matrix A is entirely determined by Li and Cj . More precisely, if A is a ring with explicit divisibility, • compute the matrix A, • deduce the condition for which the row L and the column C can be the row i and the column j of a projection matrix of rank 1 (we suppose that the common coefficient in position (i, j) is regular). 4. Let C ∈ Im A, tL ∈ Im tA and a = L · C. Show the matrix equality C · L = aA and deduce the equality of ideals hLi h tC i = hai. If a is regular, the ideals hLi and h tC i are invertible, inverses of each other, hLi ' Im A and h tC i ' Im tA. Exercise 9. If a finitely generated A-module has its Fitting ideals generated by idempotents, it is finitely generated projective. Exercise 10. (Short syzygies) Notations, terminology. Let (e1 , . . . , en ) be the canonical bases of An . Let x1 , . . . , xn be elements of an A-module. Let x = t[ x1 · · · xn ] and x⊥ := Ker( tx) ⊆ An the syzygy module between the xi ’s. We will say of a syzygy z ∈ x⊥ that it is “short” if it possesses at most two nonzero coordinates, i.e. if z ∈ Aei ⊕ Aej (1 6 i 6= j 6 n). 1. Let z ∈ x⊥ . Show that the condition “z is a sum of short syzygies” is a linear condition. Consequently, if z is “locally” a sum of short syzygies, it is also globally a sum of short syzygies. P 2. Deduce that if M = Axi is a locally cyclic module, then every element of x⊥ is a sum of short syzygies. 3. If every syzygy between three elements of A is a sum of short syzygies, then A is an arithmetic ring, i.e. every ideal hx, yi is locally principal. 4. In question 2 give a global solution by using a cyclic localization matrix A = (aij ) ∈ Mn (A) for x. Exercises and problems 285 Exercise 11. (Trivial syzygies) We use the notations ofP Exercise 10. Now x1 , . . . , xn ∈ A. For z ∈ An let hz | xi = zi xi . The module of syzygies x⊥ contains the “trivial syzygies” xj ei − xi ej (which are a special case of short syzygies). In the two first questions, we show that if x is unimodular, then x⊥ is generated by these trivial syzygies. We fix y ∈ An such that hx | yi = 1. 1. Recall why An = Ay ⊕ x⊥ . 2. For 1 6 i < j 6 n, we define πij : An → An by πij (z) = (zi yj − zj yi )(xj ei − xi ej ), ⊥ so that Im πij ⊆ x ∩ (Aei ⊕ Aej ). Show that π = P i<j πij is the projection over x⊥ parallel to Ay. Deduce the result on the trivial syzygies. See also Exercise II -4. We no longer suppose that x is unimodular. Let M ∈ Mn (A) be an alternating matrix. 3. Show that by letting z = M x, we have hx | zi = 0. 4. In which way is an alternating matrix a “sum of small alternating matrices”? Make the link with the definition of πij in question 2. Exercise 12. (Projection matrices which have a free image) Let P ∈ AGn (A) be a projector whose image is free of rank r; by Proposition 2.11 there exist X ∈ An×r , Y ∈ Ar×n satisfying Y X = Ir and P = XY . 1. Clarify the enlargement lemma (Lemma 2.10), in other words compute A ∈ SLn+r (A) (and its inverse) such that A−1 Diag(0r , P )A = Ir,n+r . (∗) 2. Suppose that X = tY (so P is symmetrical). Verify that we can impose upon A to be “orthonormal” i.e. tA = A−1 . Conversely, if A ∈ SLn+r (A) is orthonormal and satisfies (∗), then we can write P = X tX with X ∈ An×r and tXX = Ir (the matrix P is therefore symmetrical). Exercise 13. (Stably free modules of rank 1) Give direct proof that every stably free module of rank 1 is free (Proposition 4.4), by using the Binet-Cauchy formula (Exercise II -25). Consider two matrices R ∈ A(n−1)×n and R0 ∈ An×(n−1) with RR0 = In−1 . Show that Ker R is a free module. Conclude the result. Exercise 14. (Unimodular vectors, modules M satisfying M ⊕ A ' An ) Let x, y ∈ An be two vectors and A ∈ Mn (A) a matrix with first column x. Construct a matrix B ∈ Mn (A) as follows: its first row is ty and its n − 1 last e the cotransposed matrix of A. rows are the n − 1 last rows of A, 1. Show that det(B) = det(A)n−2 hx | yi and that the n − 1 last rows of B belong to x⊥ := Ker tx. 286 V. Finitely generated projective modules, 1 From now on assume that hx | yi = 1. We then know that the two stably free modules x⊥ and y ⊥ are duals of one another (Facts 4.1 and 4.2); we detail this property in a matrix fashion in the case where x⊥ is free. 2. Recall why An = Ax ⊕ y ⊥ and An = Ay ⊕ x⊥ . 3. Suppose that Ax possesses a free direct complement in An . Show in a matrix fashion that the same holds for Ay by constructing an n × n invertible matrix “adapted” to the decomposition An = Ay ⊕ x⊥ . Exercise 15. (Symmetric principal localization matrix) Let (x1 , . . . , xn ) ∈ An possess a symmetric principal localization matrix A ∈ Mn (A). Let a = hx1 , . . . , xn i. By using Equality (5) of Proposition 7.4, show that a2 is principal and specifically that: a2 = x21 , · · · , x2n = x21 + · · · + x2n . Exercise 16. (Regarding A/a ⊕ A/b ' A/(a ∩ b) ⊕ A/(a + b)) See also Exercise VIII -11 and Corollary XII -1.7. 1. Let a, b be two ideals of A satisfying 1 ∈ (a : b) + (b : a). Construct a θ ∈ GL2 (A) which satisfies θ(a ⊕ b) = (a ∩ b) ⊕ (a + b). Deduce that A/a ⊕ A/b is isomorphic to A/(a ∩ b) ⊕ A/(a + b). 2. Let a, b ∈ A, a = hai, b = hbi. Suppose that there exists an A ∈ GL2 (A) such     a ∗ that A = . Show that 1 ∈ (b : a) + (a : b). Find explicit d and m such b 0 that a ∩ b = hmi, a + b = hdi, as well as a matrix equivalence between Diag(a, b) and Diag(m, d). 3. Let a, b ∈ A with a ∈ a2 . Show that a, b satisfy the conditions of question 2. 4. Let a, b be two finitely generated ideals such that a + b is locally principal. Show 1 ∈ (a : b) + (b : a), a ∩ b is finitely generated and ab = (a ∩ b)(a + b). The following exercises bring forth some results on the determinant, the characteristic polynomial and the fundamental polynomial. Exercise 17. Let M be a finitely generated projective A-module, e be an idempotent of A, f = 1 − e and ϕ be an endomorphism of M . It is clear that M = eM ⊕ f M , so eM and f M are finitely generated projective. We also have ϕ(eM ) ⊆ eM , and by letting ϕe : eM → eM be the endomorphism defined as such, prove that we have det(ϕe ) = f + e det(ϕ) and det(eϕ) = r0 f + e det(ϕ) Feϕ (X) = Fϕ (eX) = Fϕe (X) = f + e Fϕ (X) Cϕe (X) = f + e Cϕ (X) ReM (X) = f + e RM (X) Furthermore, show that e det(ϕ) is the determinant of ϕe as the endomorphism of the A[1/e]-module eM . Exercises and problems 287 L Exercise 18. Consider the quasi-free module M = k∈J1..nK (rk A)k , where the Pn rk ’s are orthogonal idempotents. We have M ' e1 A⊕· · ·⊕en A with ek = j=k rj , and ek | ek+1 for k ∈ J1..n−1K (cf. Lemma II -5.25, and Exercises II -10 and II -14). Pn Let r0 = 1 − i=1 ri and sk = 1 − rk . – Recall why Rrk A (X) = sk + rk X. – Show that RM (X) = r0 + r1 X + · · · + rn X n = Qn k=1 (sk + rk X)k . – Verify this equality using a direct computation. Exercise 19. (The determinant, component by component) Let ϕ be an endomorphism of a finitely generated projective module M having n generators. Let rh = eh (M ) (for h ∈ J0..nK) and d = det(ϕ). Denote by ϕ(h) the endomorphism of the A-module M (h) induced by ϕ, dh = rh d, δh = det(ϕ(h) ) and sh = 1 − rh . 1. Show that we have the following equalities d0 = r0 , δ0 = 1, δh = sh + dh and d = d0 + d1 + · · · + dn = δ1 × · · · × δn . 2. Furthermore, show that dh is the determinant of ϕ(h) in A[1/rh ] when we regard ϕ(h) as an endomorphism of the A[1/rh ]-module M (h) . 3. Similarly, show that we have Fϕ(h) (X) = sh + rh Fϕ (X) Cϕ(h) (X) = sh + rh Cϕ (X). and Exercise 20. (Characteristic polynomial and fundamental polynomial in the case of constant rank) Let ϕ be an endomorphism of a module M of constant rank h. Prove the following facts. The characteristic polynomial of ϕ is monic of degree h and the fundamental polynomial of ϕ is of degree 6 h. The homogenized polynomials at degree h of Cϕ (X) and Fϕ (X) are respectively equal to det(XIdM −Y ϕ) and det(Y IdM +Xϕ). In other words we have the equalities Cϕ (X) = X h Fϕ (−1/X) and Fϕ (X) = (−X)h Cϕ (−1/X). h Furthermore, det(ϕ) = (−1) Cϕ (0) is equal to the coefficient of X h in Fϕ (X). Exercise 21. (Characteristic polynomial and fundamental polynomial, general case) Let ϕ be an endomorphism of a finitely generated projective module M . Let Fϕ (X) = 1 + v1 X + · · · + vn X n and RM (X) = r0 + r1 X + · · · + rn X n . Then, show that we have the following equalities. rh vk = 0 for 0 6 h < k 6 n, Cϕ (X) = r0 + Fϕ (−X) = r0 + P rh X h Fϕ (−1/X), P16h6n h 16h6n rh X Cϕ (1/X), det(ϕ − XIdM ) = RM (−1) Cϕ (X), det(ϕ) = r0 + r1 v1 + · · · + rn vn = RM (−1) Cϕ (0). 288 V. Finitely generated projective modules, 1 Problem 1. (Completion of unimodular vectors: a result due to Suslin) A vector of An is said to be completable if it is equal to the first column of a matrix of GLn (A). It is then unimodular. We want to show the following result. Let b ∈ A and (a1 , . . . , an ) ∈ An such that (a1 , . . . , an ) is completable over A/bA , then (a1 , . . . , an , bn ) is completable (over A). By hypothesis, we have A, D ∈ Mn (A) satisfying A D ≡ In mod b, with [ a1 · · · an ] as the first row of A. We want to find a matrix of GLn+1 (A) whose first row is [ a1 · · · an bn ]. Let a = det(A).  1. Show that there exists a C ∈ Mn (A) such that A b In C D  ∈ GL2n (A). Now it is a matter of transforming the top-right corner b In of the above matrix into B 0 := Diag(bn , 1, . . . , 1). 2. Show that we can write B 0 = bE + aF with E ∈ En (A) and F ∈ Mn (A).  3. Verify that  A b In C D   e In AF 0 E   = A B0 C D0  with D0 ∈ Mn (A).   A B0 A B0 is equivalent to a matrix where D00 has its n − 1 0 C D C D00 last columns null. Deduce the existence of an invertible matrix whose first row is [ a1 · · · an bn ]. 4. Show that 5. Example (Krusemeyer). If (x, y, z) ∈ A3 is unimodular, (x, y, z 2 ) is completable. More precisely, if ux + vy + wz = 1, the matrix below is suitable. " x y z2 2 v w − uv −x − 2vz −w − uv u2 −y + 2uz # . What is its determinant (independently from the fact that ux + vy + wz = 1)? 6. More generally, we have the following result (Suslin): if (a0 , a1 , . . . , an ) is unimodular, then (a0 , a1 , a22 , . . . , an n ) is completable. 7. Show the following result (Suslin’s n! theorem): if (a0 , a1 , . . . , an ) is unimodular, then for exponents e0 , e1 , . . . , en such that n! divides e0 · e1 · · · en , the vector (a0e0 , ae11 , . . . , aenn ) is completable. Problem 2. (The n-sphere when −1 is a sum of n squares, with I. Yengui) 1. Let A be a ring in which −1 is a sum of 2 squares and x0 , x1 , x2 ∈ A satisfying x20 + x21 + x22 = 1. a. Show that the vector (x0 , x1 , x2 ) is completable by considering a matrix " # x0 u a M = x1 v b where u, v are linear forms in x0 , x1 , x2 and a, b, c are x2 0 c constants. b. Give examples of rings A in which −1 is a sum of 2 squares. 2. Suppose that −1 is a sum of n squares in the ring A. Solutions of selected exercises 289 G a. We use the notation A ∼ B from page 920. Let x0 , x1 , . . . , xn with x20 + · · · + x2n = 1. Show that En+1 t [ x0 x1 · · · xn ] ∼ t[ 1 0 · · · 0 ]. In particular, t[ x0 x1 · · · xn ] is completable. b. Let m > n, x0 , x1 , . . . , xm and yn+1 , . . . , ym satisfy t x2i + i=0 Em+1 t Show that [ x0 x1 · · · xm ] ∼ n P [ 1 0 · · · 0 ]. m P yj xj = 1. j=n+1 3. Suppose that there exists an a ∈ A such that 1 + a2 is nilpotent. This is the case if −1 is a square in A, or if 2 is nilpotent.   x0 −x1 a. Let x0 , x1 ∈ A with x20 + x21 = 1. Show that ∈ E2 (A). x1 x0 b. Let x0 , x1 , . . . ,xn and y2 , . . . , yn in A such that x20 + x21 + t Pn i=2 xi yi = 1. En+1 t Show that [ x0 x1 · · · xn ] ∼ [ 1 0 · · · 0 ]. c. Let k be a ring, k[X, Y ] = k[X0 , X1 , . . . , Xn , Y2 , . . . , Yn ] and f = 1 − X02 + X12 + Pn  i=2 Xi Yi . Let An = k[x0 , x1 , . . . , xn , y2 , . . . , yn ] = k[X, Y ]/hf i. Give examples for which, for all n, t[ x0 x1 · · · xn ] is completable without −1 being a square in An . Some solutions, or sketches of solutions Exercise 4. 1. By induction on n, the n = 1 case being exactly Schanuel’s lemma (Corollary 2.8). From each exact sequence, we construct another of length minus one u⊕IP 0 0 0 → K → Pn−1 → · · · → P1 ⊕ P00 −−−→ Im u ⊕ P00 → 0 u0 ⊕IP 0 0 0 → K 0 → Pn−1 → · · · → P1 ⊕ P00 −−−→ Im u0 ⊕ P0 → 0 But we have Im u ⊕ P00 ' Im u0 ⊕ P0 by Schanuel’s lemma applied to the two short exact sequences, 0 → Im u → P0 → M → 0 0 → Im u0 → P00 → M → 0 We can therefore apply the induction (to the two long exact sequences of length −1), which gives the desired result. 2. Immediate consequence of 1. Exercise 5. Let us show by induction on i that Im ui is a finitely generated projective module. This is true for i = 1. Suppose it is true for i > 1; we have ui therefore a surjective linear map Pi −→ Im ui where Im ui is finitely generated projective and thus Pi ' Ker ui ⊕ Im ui . But Ker ui = Im ui+1 therefore Im ui+1 is finitely generated projective. In addition Pi ' Im ui ⊕ Im ui+1 . Then P1 ⊕ P3 ⊕ P5 ⊕ · · · ' (Im u1 ⊕ Im u2 ) ⊕ (Im u3 ⊕ Im u4 ) ⊕ · · · ' Im u1 ⊕ (Im u2 ⊕ Im u3 ) ⊕ (Im u4 ⊕ Im u5 ) ⊕ · · · ' P2 ⊕ P4 ⊕ P6 ⊕ · · · 290 V. Finitely generated projective modules, 1 Exercise 7. Let A1 , . . . , An be the columns of A and t = Tr A = 1. Let us first check that tAj = Aj : by using aii aki aij akj = 0 and A2 = A, takj = P i aii akj = P i P i aii . aki aij = akj . Therefore (1 − t)A = 0, then (1 − t)t = 0, i.e. t idempotent. In addition, if aA = 0, then at = 0, i.e. a = a(1 − t). 2. On the localized ring at aii , two arbitrary columns Aj , Ak are multiples of Ai so Aj ∧ Ak = 0. Hence globally Aj ∧ Ak = 0, and so D2 (A) = 0. Moreover, by P P aik aij using = 0, we have a a = a a = aij Tr A = aij , i.e. k ik kj k ij kk akk akj 2 A = A. 3. The system on the right-hand side is of cardinality 1 + n2 , the one in the 2 middle of cardinality 1 + n2 . To obtain the left-hand side one, we must count the minors that do not have a corner on the diagonal. Suppose n > 3, then   2    there are n2 n−2 minors, and n2 − n2 n−2 = (2n − 3) n2 remain, hence 2 2  the cardinality 1 + (2n − 3) n2 . For n = 3, each system is of cardinality 10. For n > 3, 1 + n2 is strictly less than the other two. ai` aij = 0, i.e. akj ai` = aij ak` . ak` akj This is the equality Cj · Li = aij A. As for Li · Cj , this is the coefficient in position (i, j) of A2 = A, i.e. aij . 2. We have Li · A = Li so Li · (In − A) = 0. Conversely, for u ∈ An such that hLi | ui = 0, it must be shown that u = (In − A)(u), i.e. Au = 0, i.e. hLk | ui = 0. But aij Lk = akj Li and as aij is regular, this is immediate. 3. The equality akj ai` = aij ak` shows that C · L = aij A. Moreover, if A is with explicit divisibility, we can compute A from L and C. If we take a row L whose coefficients are called ai` (` ∈ J1..nK) and a column C whose coefficients are called akj (k ∈ J1..nK), with the common element aij being regular, the conditions are the following: Exercise 8. 1. We have • each coefficient of C · L must be divisible by aij , hence A = a1 C · L, ij • we must have Tr(A) = aij , i.e. L · C = aij . Naturally, these conditions are directly related to the invertibility of the ideal generated by the coefficients of L. 4. In the matrix equality C · L = (L · C) A to be proven, each side is bilinear in (L, C). However, the equality is true if tL is a column of tA and C a column of A, therefore it remains true for tL ∈ Im tA and C ∈ Im A. The rest is easy. Exercise 9. M is the quotient module of a finitely generated projective module P which share the same Fitting ideals. If P ⊕ N = An , M ⊕ N is a quotient of An with the same Fitting ideals. Therefore there is no nonzero syzygy between the generators of An in the quotient M ⊕ N . Therefore M ⊕ N = An and P/M ' (P ⊕ N )/(M ⊕ N ) = 0. Solutions of selected exercises 291 P Exercise 10. 1. A syzygy z = zk ek is a sum ofP short syzygies if and only if there exist syzygies zij ∈ Aei ⊕ Aej such that z = i<j zij . This is interpreted as follows P ∃αij , βij ∈ A, zij = αij ei + βij ej , hzij | xi = 0 and z = i<j zij . P P This is equivalent to zk = k<j αkj + i<k βik (k ∈ J1..nK) and αij xi +βij xj = 0 (for i < j). This is indeed a system of linear equations with the “unknowns” αij , βij . 2. By reasoning locally, we can assume that the xi ’s are multiples of x1 , which we write as bi x1 + xi = 0. Hence the syzygies ri = bi e1 + ei for i ∈ J2..nK. Let z ∈ x⊥ . Let y = z − (z2 r2 + · · · + P zn rn ), we have yi = 0 for i > 2, and so y is a (very) short syzygy. Thus, z = y + i=2 zi ri is a sum of short syzygies. 3. Let x, y ∈ A. We are looking for s, t with s + t = 1, sx ∈ Ay and ty ∈ Ax. We write the syzygy (−1, −1, 1) between (x, y, x + y) as a sum of short syzygies (−1, −1, 1) = (0, a, a0 ) + (b, 0, b0 ) + (c, c0 , 0). In particular, a0 + b0 = 1, and the result follows. aij aik = 0. This provides several short xj xk syzygies aij ek − aik ej . We keep the rik = aii ek − aik ei , i.e. those that correspond aii aik to a “diagonal minor” . For z ∈ An , let xi xk 4. By definition P i aii = 1 and y = Az and z 0 = P i,k zk rik = P i,k zk (aii ek − aik ei ). Then z = z 0 + y: indeed, the coefficient of ej in z 0 is P i  P aii zj − k ajk zk = zj − (Az)j . ⊥ Since A − A annihilates M , z − y ∈ x⊥ , so z ∈ x⊥ ⇒ y ∈ xP . Each yi ei is a (very) short syzygy since yi xi = 0. Therefore z = z 0 + y = z 0 + yi ei is a sum of short syzygies. 2 Exercise 11. 1. We write z ∈ An in the form z = hx | zi.y + (z − hx | zi.y), which provides the decomposition An = Ay ⊕ x⊥ . 2. For i 6 j, define zij ∈ A by zij = zi yj − zj yi and let z0 = P i<j zij (xj ei − xi ej ) = P i6j zij (xj ei − xi ej ). For fixed k, the coefficient of ek in the right-hand sum is P j>k zkj xj − P i<k zik xi = = zk P j>k n j=1 P (zk yj − zj yk )xj − yj xj − yk Pn j=1 P i<k (zi yk − zk yi )xi zj xj = zk − hz | xiyk , which means that z 0 = z − hz | xiy and proves the required result. 3. If ψ is the alternating bilinear form associated with the matrix, the equality hx | zi = 0 simply means that ψ(x, x) = 0. 4. We can express an alternating n×n matrix as a sum of n(n−1) small alternating 2 matrices. For n = 3, here is the alternating matrix allowing us to make the 292 V. Finitely generated projective modules, 1 connection with question 2 (y is fixed and it is z that varies): " Mz = 0 z1 y2 − z2 y1 z1 y3 − z3 y1 −z1 y2 + z2 y1 0 z2 y 3 − z3 y 2 −z1 y3 + z3 y1 −z2 y3 + z3 y2 0 # . The decomposition of Mz into small alternating matrices provides the πij ’s. It must be noted that z 7→ Mz , An → Mn (A) is a linear map and that π(z) = Mz x. Exercise 12. 1. We follow the method of this course. It leads to letting  A= 0r X −Y In − P     , A0 =  0r −X Y In − P  . These matrices satisfy Ir 0 A 0 0n = 0r 0 0 P  A, AA0 = In+r . 2. Immediate since we have the formulas right in front of us. Exercise 13. The Binet-Cauchy formula gives 1 = det(RR0 ) = P 0 δi = det(R1..n−1,1..n\i ) and δi0 = det(R1..n\i,1..n−1 ). δi δi0 with   S Let S = − δ20 · · · (−1)n−1 δn0 ]. Check that the square matrix A = has R determinant 1. This shows that Ker R is free (Proposition 4.4). Actually let S 0 = t[ δ1 − δ2 · · · (−1)n−1 δn ] and A0 = [S 0 R0 ]. Then AA0 = In , and this shows that S 0 ∈ An is a basis of Ker R. [ δ10 Exercise 14. 1. Consider the matrix B A. By definition of B, B A is upper triangular, with diagonal (hx | yi, δ, . . . , δ) where δ = det(A). By taking the determinant, we obtain det(B) det(A) = hx | yi δ n−1 . The announced algebraic identities are therefore true when δ is invertible. Since we are dealing with algebraic identities, they are always true. The second item of the question is immediate. 2. Write z ∈ An in the form z = hy | zi x + (z − hy | zi x), which gives us the decomposition An = Ax ⊕ y ⊥ . 3. The hypothesis boils down to saying that x is the first column of an invertible matrix A. Therefore y is the first row of the invertible matrix B above. The matrix tB is adapted to the decomposition An = Ay ⊕ x⊥ . Exercise 15. Let x = [ x1 · · · xn ]. For α = t[α1 , . . . , αn ] and β = Aα, the equality in question is   β1    β x =  ...  x1 · · · xn = x α A with x β = x α. βn Take αi = xi . Since xA = x and A is symmetric, we obtain A tx = tx, i.e. β = tx. Hence tx x = x tx A = (x21 + · · · + x2n )A. Finally, xi xj ∈ x21 + · · · + x2n (i, j ∈ J1..nK). Solutions of selected exercises 293 1. Let α ∈ (b : a) and β ∈ (a : b) satisfy 1 = α + β. Then, the  α β 1 −β −1 matrix θ = , with determinant 1 and with inverse θ = , −1 1 1 α is suitable.  Indeed           α β a a∩b 1 −β a∩b a ⊆ . ⊆ and −1 1 b a+b 1 α a+b b Exercise 16.  On the left-hand side, the upper inclusion comes from the fact that αa+βb ⊆ a∩b, and the lower one is trivial. On the right-hand side, the upper inclusion comes from the fact that a ∩ b + β(a + b) ⊆ a, and the lower one comes from the fact thata ∩ b +  α(a + b) ⊆ b. Recap: we have θ(a ⊕ b) = (a ∩ b) ⊕ (a + b) with 1 β 1 0 θ= ∈ E2 (A). 0 1 −1 1   u v 2. We can take A of the form A = with ua0 + vb0 = 1 and a0 b = b0 a. −b0 a0     a d Let m = a b = b a, d = ua + vb; by inverting A = , we obtain a = da0 b 0 and b = db0 . It is clear that a ∩ b = hmi and a + b = hdi. We have a0 ∈ (a : b) and b0 ∈ (b : a). Therefore 1 = α + β with α = vb0 ∈ (b : a), β = ua0 ∈ (a : b). To explicit a matrix equivalence, it suffices to use a matrix θ from the previous question: 0   θ a 0 0  = vm −a   =v m 0  0   −a  Hence the matrix equivalence: θ 0 , θ d a 0 0 b    0 b  =  = m 0 0 d um b    m =u 0  +b 0   0 . d  v u . −a0 b0 3. The hypothesis is a = a2 x for some given x. Then, the element e = ax is idempotent and hai = hei. We must solve a0 b = b0 a, 1 = ua0 + vb0 , which is a system of linear equations in a0 , b0 , u, v. Modulo 1 − e, we have ax = 1. We take a0 = a, b0 = b, u = x, v = 0. Modulo e, we have a = 0. We take a0 = a, b0 = 1, u = 0, v = 1. Therefore globally a0 = a, b0 = axb + (1 − ax)1 = 1 − ax + axb, u = ax2 , v = 1 − ax. 4. Let a = hx1 , . . . , xn i and b = hy1 , . . . , ym i. We write a + b = hz1 , . . . , zn+m i with z1 = x1 , . . . , zn+m = ym . Let s1 , . . . , sn+m be comaximal such that over Asi we have a + b = hzi i. In each localized ring we have a ⊆ b or b ⊆ a, hence {a + b, a ∩ b} = {a, b}, and 1 ∈ (a : b) + (b : a), ab = (a ∩ b)(a ⊕ b) and a ∩ b is finitely generated. Exercise 17. We use the notations of Lemma 8.7. Let us take a look at the determinants of eϕ and ϕe . We have det(ϕ)=det(In −F +H), det(eϕ)=det(In −F +eH) and det(ϕe )=det(In −eF +eH). We deduce that e det(ϕe ) = det(eIn − eF + eH) = e det(ϕ) and f det(ϕe ) = det(f In − f eF + f eH) = det(f In ) = f. Therefore det(ϕe ) = f det(ϕe ) + e det(ϕe ) = f + e det(ϕ). 294 V. Finitely generated projective modules, 1 Similarly e det(eϕ) = det(eIn − eF + eH) = e det(ϕ) and f det(eϕ) = det(f In − f F + f eH) = f det(In − F ) = f RM (0) = f e0 (M ). By applying det(ϕe ) = f + e det(ϕ) to the endomorphisms Id + Xϕ, XId − ϕ and XId of the A[X]-module M [X] we obtain Fϕe (X) = f + e Fϕ (X), Cϕe (X) = f + e Cϕ (X) and ReM (X) = f + e RM (X). Moreover, the matrix eH simultaneously represents the endomorphism eϕ of M and the endomorphism ϕe of eM . We therefore have Fϕe (X) = Feϕ (X) = det(In + eXH) = Fϕ (eX). As far as the last assertion is concerned: we must look at det(ϕe ) in A/hf i, we obtain e det(ϕ) modulo f A, and this corresponds to the element e det(ϕ) of eA. Exercise 19. 1. We have ϕ(h) = ϕrh by applying the notation of Exercise 17. Therefore δh = sh +dh . We have δ0 = 1 because M (0) = {0}, and since δ0 = s0 +d0 , this gives d0 = r0 . The equality d = d0 + d1 + · · · + dn is trivial. The equality d = δ1 × · · · × δn results from item 3 of Theorem 8.1. We can also prove d0 + d1 + · · · + dn = δ1 × · · · × δn by a direct computation. 2 and 3. Already seen in Exercise 18. Exercise 20. Recall: for a ∈ A we have det(aϕ) = RM (a) det(ϕ) = ah det(ϕ). We then place ourselves on the ring A[X, 1/X] and consider the module M [X, 1/X]. We obtain X h Fϕ (−1/X) = det X(IdM − (1/X)ϕ) = det(XIdM − ϕ) = Cϕ (X).  By replacing X by −1/X in Cϕ (X) = X h Fϕ (−1/X) we obtain the other equality. The two polynomials are therefore of degrees 6 h. As the constant coefficient of Fϕ is equal to 1, we also obtain that Cϕ is monic. For the homogenized polynomials, the same computation works. For the determinant we notice that det(−ϕ) = Cϕ (0). Exercise 21. We work over the ring Arh and we consider the module rh M and the endomorphism ϕ(h) . We obtain a module of constant rank h. Therefore rh Fϕ (X) and rh Cϕ (X) are of degrees 6 h, and rh X h Fϕ (−1/X) = rh Cϕ (X). It remains to sum up the equalities obtained in this way for h ∈ J1..nK. We perform the same computation for the second equality. The last two equalities were already known, except for det(ϕ) = r0 + r1 v1 + · · · + rn vn which can be proven in the same way as the first. Problem 1. Then 1. Let C, U ∈ Mn (A) such that AD = In + bU , DA = In + bC.  A bIn C D  D −bIn −U A   = In 0 ∗ In  ∈ GL2n (A). 2. We work modulo a by noticing that b is invertible modulo a. We can therefore, over A/aA , consider b−1 B 0 : it is a diagonal matrix of determinant 1, therefore it belongs to En (A/aA ) (cf. Exercise II -17), we lift it to a matrix E ∈ En (A) and we obtain B 0 ≡ bE mod a. Solutions of selected exercises 295 3. Immediate. 4. It suffices to use the submatrix In−1 which occurs in B 0 to kill the coefficients 0 of the last n −  1 columns of D . The square submatrix of order n + 1 obtained 0 A B from by deleting the rows 2 to n and the last n − 1 columns is invertible C D00 with its first row being [ a1 · · · an bn ].   x y 5. Modulo z, the vector [ x y ] is completable in A := . −v u e We have det(A) = a := ux + vy ≡ 1 mod z and we can take D = A.  We write DA = a I2 = I2 − wzI2 , so C = −wI2 . The matrix determinant (a + wz)2 . To find E, we use the equality  z 0 0 z −1  A zI2 C D = E21 (−1)E12 (1 − z −1 )E21 (z)E12 z −1 (z −1 − 1)  has  and the fact that modulo a, zw ≡ 1. The author of the exercise has obtained a matrix G that is more complicated than that of Krusemeyer. With p = (y+u)w−u, q = (x − v)w + v, " G= x y z2 p(w − 1)v − w −p(w − 1)u y + u(z + 1) −q(w − 1)v q(w − 1)u − w −x + v(z + 1) # . We have det(G) = 1+(xu+yv +zw −1)(wz +1)(yq −xp+1) whereas Krusemeyer’s matrix has determinant (ux + vy + wz)2 ! 6. Immediate by induction. Problem 2. 1a. We have det(M ) = −(cx1 − bx2 )u + (cx0 − ax2 )v. With u = −(cx1 + bx2 ), v = cx0 + ax2 , we obtain det(M ) = cx20 + cx21 − (a2 + b2 )x22 . It suffices to take c = 1 and a, b ∈ A such that −1 = a2 + b2 . 1b. Let us show that −1 is a sum of two squares if A contains a finite field. We can assume that A is afield of odd cardinalityq. Consider the sets A = a2 a ∈ A and B = −1 − b2 b ∈ A . They have (q + 1)/2 elements, so A ∩ B 6= ∅, which gives the result. Now here is a more general result. If n 6≡ 0 mod 4, then −1 is a sum of two squares in Z/nZ. The hypothesis can be written as gcd(n, 4) = 1, 2 so 2 ∈ nZ + 4Z, 2 = nu + 4v. Let m = −1 + nu = −4v + 1; since gcd(4n, m) = 1, the arithmetic progression 4nN + m contains a prime number p (Dirichlet), which satisfies p ≡ m ≡ −1 mod n and p ≡ m ≡ 1 mod 4. By this last congruence, p is a sum of two squares, p = a2 + b2 , so −1 = a2 + b2 in Z/nZ. We deduce that if n.1A = 0 with n 6≡ 0 mod 4 (this is the case if n is a prime number), then −1 is a sum of two squares in A. 2a. Let a1 , . . . , an such that −1 = Pn i=1 Pn i=1 a2i . We will use (xi − ai x0 )(xi + ai x0 ) = Pn i=1 x2i − x20 Pn i=1 a2i = 1. 296 V. Finitely generated projective modules, 1 We have   x0  x1  En+1  .  ∼  ..  xn x0 + h x0  x1 + a1 x0  En+1  x1 + a1 x0    ∼   .. ..     . . xn + an x0 xn + an x0     with h= Pn i=1 λi (xi + ai x0 ) By taking λi = (1 − x0 )(xi − ai x0 ), we obtain h = 1 − x0 so x0 + h = 1. It is then clear that En+1 [1, x1 + a1 x0 , . . . , xn + an x0 ] ∼ t[1, 0, . . . , 0]. Explicitly, by numbering the n + 1 rows from 0 to n (instead of 1 to n + 1) and by letting t N = M = Qn i=1 N −1 = Ei,0 − (xi + ai x0 ) Qn i=1 Ei,0 (−ai )  Qn Qn i=1 i=1 E0,i (1 − x0 )(xi − ai x0 ) E0,i (x0 − 1)(xi − ai x0 )  Qn  Qn i=1 i=1 Ei,0 (ai ) Ei,0 (xi + ai x0 ), t we obtain a matrix M ∈ En+1 (A) with first column [ x0 · · · xn ]. 2b. We use B = A/hxn+1 , . . . , xm i. The morphisms Er (A)  Er (B) are surjective. We first obtain En+1 (B) t t [x0 , . . . , xn ] ∼ [1, 0, . . . , 0], so some x00 , . . . , x0n ∈ A with in particular x00 ≡ 1 mod hxn+1 , . . . , xm i such that t [x0 , . . . , xn , xn+1 , . . . , xm ] Em+1 (A) t ∼ [x00 , . . . , x0n , xn+1 , . . . , xm ]. We easily deduce that t[x0 , . . . , x0 , x n+1 , . . . , xm ] n 0  Em+1 (A)  ∼ t[1, . . . , x0 , x n+1 , . . . , xm ] n  Em+1 (A) ∼ t[1, 0, . . . , 0].  x0 −x1 E2 (A) x0 + ax1 −x1 + ax0 ∼ B= . By using the fact x1 x0 x1 x0 that 1 + a2 is nilpotent, we see that x0 + ax1 is invertible because (x0 + ax1 )(x0 − ax1 ) = x20 + x21 − (1 + a2 )x21 = 1 − (1 + a2 )x21 . The matrix B ∈ SL2 (A) has an invertible coefficient so it is in E2 (A). 3b. First reason modulo hx2 , . . . , xn i, then as in question 2b. 3c. We can take k = Z/2e Z with e > 2: −1 is not a square in k. So −1 is not a square in An either since there are morphisms An → k, for example the evaluation morphism at x0 = 1, xi = 0 for i > 1, yj = 0 for j > 2. 3a. We have Bibliographic comments Regarding Theorem 6.1 and the characterization of finitely generated projective modules by their Fitting ideals see [Northcott] Theorem 18 p. 122 and Exercise 7 p. 49. Note however that the proof given by Northcott is not entirely constructive, since he requires an abstract patching principle of the finitely generated projective modules. We have defined the determinant of an endomorphism of a finitely generated projective module as in [94, Goldman]. The difference resides in the fact that our proofs are constructive. Bibliographic comments 297 A study on the feasability of the local structure theorem for finitely generated projective modules can be found in [59, Díaz-Toca&Lombardi].  Proposition 9.3 regarding LA (M, N ) S is a crucial result that can be found for instance in [Northcott], Exercise 9 p. 50, and in [Kunz] (Chapter IV, Proposition 1.10). This result will be generalized in Proposition VIII -5.7. Problem 1 is due to Suslin [180]. Chapter VI Strictly finite algebras and Galois algebras Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . 300 1 Étale algebras over a discrete field . . . . . . . . . . . 301 Structure theorem for étale algebras . . . . . . . . . . . . . 301 Étale algebras over a separably factorial field . . . . . . . . 306 Perfect fields, separable closure and algebraic closure . . . 308 2 Basic Galois theory (2) . . . . . . . . . . . . . . . . . . 310 3 Finitely presented algebras . . . . . . . . . . . . . . . 312 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 The zeros of a polynomial system . . . . . . . . . . . . . . 314 The tensor product of two k-algebras . . . . . . . . . . . . 316 Integral algebras . . . . . . . . . . . . . . . . . . . . . . . . 318 The Lying Over lemma . . . . . . . . . . . . . . . . . . . 318 Algebras integral over zero-dimensional rings . . . . . . . 319 A weak Nullstellensatz . . . . . . . . . . . . . . . . . . . 320 Integral algebras over a pp-ring . . . . . . . . . . . . . . . 321 Algebras that are finitely presented modules . . . . . . . 322 Integral algebra over an integrally closed ring . . . . . . . 323 4 Strictly finite algebras . . . . . . . . . . . . . . . . . . 324 The dual module and the trace . . . . . . . . . . . . . . . . 324 Norm and cotransposed element . . . . . . . . . . . . . . . 325 Transitivity and rank . . . . . . . . . . . . . . . . . . . . . 326 – 299 – 300 VI. Strictly finite algebras and Galois algebras 5 Dualizing linear forms, strictly finite algebras . . . . 327 Dualizing forms . . . . . . . . . . . . . . . . . . . . . . . . 327 Strictly étale algebras . . . . . . . . . . . . . . . . . . . . . 329 Tensor products . . . . . . . . . . . . . . . . . . . . . . . . 331 Integral elements, idempotents, diagonalization . . . . . . . 331 6 Separable algebras . . . . . . . . . . . . . . . . . . . . . 334 Towards the separability idempotent . . . . . . . . . . . . . 335 Derivations . . . . . . . . . . . . . . . . . . . . . . . . . . . 338 Separability idempotent of a strictly étale algebra . . . . . 340 Separable algebras . . . . . . . . . . . . . . . . . . . . . . . 341 7 Galois algebras, general theory . . . . . . . . . . . . . 346 Galois correspondence, obvious facts . . . . . . . . . . . . . 347 A natural definition . . . . . . . . . . . . . . . . . . . . . . 348 Dedekind’s lemma . . . . . . . . . . . . . . . . . . . . . . . 350 Artin’s theorem and first consequences . . . . . . . . . . . 351 The Galois correspondence in the connected case . . . . . . 360 Quotients of Galois algebras . . . . . . . . . . . . . . . . . 361 Exercises and problems . . . . . . . . . . . . . . . . . . 363 Solutions of selected exercises . . . . . . . . . . . . . . . . . 371 Bibliographic comments . . . . . . . . . . . . . . . . . 380 Introduction The chapter is devoted to a natural generalization for commutative rings of the notion of a finite algebra over a field. In constructive mathematics, to obtain the conclusions for the field case, it is often necessary to not only assume that the algebra is a finitely generated vector space, but more precisely that the field is discrete and that we know a basis of the vector space. This is what brought us to introduce the notion of a strictly finite algebra over a discrete field. The pertinent generalization of this notion to commutative rings is given by the algebras which are finitely generated projective modules over the base ring. So we call them strictly finite algebras. Sections 1 and 2 which only concern algebras over discrete fields can be read directly after Section III -6. Similarly for Section 7 if we start from a discrete field (certain proofs are then simplified). Section 3 is a brief introduction to finitely presented algebras, by insisting on the case of algebras which are integral over the base ring. The rest of the chapter is devoted to the strictly finite algebras themselves. 1. Étale algebras over a discrete field 301 In Sections 5 and 6, we introduce the neighboring notions of strictly étale algebra and of separable algebra, which generalize the notion of an étale algebra over a discrete field. In Section 7 we give a constructive presentation of the bases of the Galois algebra theory for commutative rings. This is in fact an Artin-Galois theory, since it uses the approach developed by Artin for the field case by starting directly from a finite group of automorphisms of a field, the base field only appearing as a subproduct of the constructions that ensue. 1. Étale algebras over a discrete field In Sections 1 and 2, K designates a nontrivial discrete field Recall that a K-algebra B is said to be finite (resp. strictly finite) if it is finitely generated as a K-vector space (resp. if B is a finite dimensional K-vector space). If B is a finite K-algebra, this does not imply that we know how to determine a basis of B as a K-vector space, nor that B is discrete. If it is strictly finite, however, then we know of a finite basis of B as a K-vector space. In this case, for some x ∈ B, the trace, the norm, the characteristic polynomial of (multiplication by) x, as well as the minimal polynomial of x over K can each be computed using standard methods of linear algebra over a discrete field. Similarly every finite K-subalgebra of B is strictly finite and the intersection of two strictly finite subalgebras is strictly finite. 1.1. Definition. Let L be a discrete field and A an L-algebra. 1. The algebra A is said to be étale (over L) if it is strictly finite and if the discriminant DiscA/L is invertible. 2. An element of A is said to be separable algebraic (over L) if it annihilates a separable polynomial. 3. The algebra A is said to be separable algebraic (over L) if every element of A is separable algebraic over L. When f is a monic polynomial of L[X], the quotient algebra L[X]/hf i is étale if and only if f is separable (Proposition III -5.10). Structure theorem for étale algebras Proposition III -5.10 gives the following lemma. 302 VI. Strictly finite algebras and Galois algebras 1.2. Lemma. Let A be a strictly finite K-algebra and a ∈ A. If the characteristic polynomial CA/K (a)(T ) is separable, then the algebra is étale and A = K[a]. In Fact 1.3, items 1 and 2 give more precise statements for certain items of Lemma IV -8.5 and of Fact IV -8.8 (concerning general reduced zerodimensional rings), in the case of a reduced strictly finite K-algebra. General results on integral extensions of zero-dimensional rings are given in Section 3 from page 319 onwards. 1.3. Fact. Let B ⊇ K be a strictly finite algebra. 1. The algebra B is zero-dimensional. If it is reduced then for every a ∈ B there exists a unique idempotent e ∈ K[a] such that hai = hei. Furthermore, when e = 1, i.e. when a is invertible, a−1 ∈ K[a]. 2. The following properties are equivalent. a. B is a discrete field. b. B is without zerodivisors: xy = 0 ⇒ (x = 0 or y = 0). c. B is connected and reduced. d. The minimal polynomial over K of any arbitrary element of B is irreducible. 3. If K ⊆ L ⊆ B and L is a strictly finite discrete field over K, then B is strictly finite over L. In addition, B is étale over K if and only if it is étale over L and L is étale over K. 4. If (e1 , . . . , er ) is a fundamental system of orthogonal idempotents of B, B is étale over K if and only if each of the components B[1/ei ] is étale over K. 5. If B is étale, it is reduced. 6. If char(K) > [ B : K ] and if B is reduced, it is étale. J 1. The element a of B is annihilated by a monic polynomial of K[T ] k × that we express in the form uT 1 − T h(T ) with u ∈ K , k > 0. So B  is zero-dimensional. If it is reduced, a 1 − ah(a) = 0. Then, e = ah(a) satisfies a(1 − e) = 0 and a fortiori e(1 − e) = 0. Which allows us to conclude. 2. The equivalence of a, b and c is a special case of Lemma III -6.3. The implication d ⇒ c is clear. Let us take a look at b ⇒ d. Let x be in B and f (X) be its minimal polynomial over K. If f = gh, with g, h monic, then g(x)h(x) = 0, so g(x) = 0 or h(x) = 0. For example g(x) = 0, and since f is the minimal polynomial, f divides g, and h = 1. 3. Let (f1 , . . . , fs ) be a K-basis of L. We can compute an L-basis of B as follows. The basis starts with e1 = 1. Assume we have computed elements e1 , . . . , er of B linearly independent over L. The Lei ’s form a direct sum in B and we have a K-basis (ei f1 , . . . , ei fs ) for each Lei . If rs = [ B : K ], we have finished. In the opposite case, we can find er+1 ∈ B which is not 1. Étale algebras over a discrete field 303 in Fr = Le1 ⊕ · · · ⊕ Ler . Then, Ler+1 ∩ Fr = {0} (otherwise, we would express er+1 as an L-linear combination of (e1 , . . . , er )), and we iterate the process by replacing (e1 , . . . , er ) with (e1 , . . . , er+1 ). Once we have a basis of B as an L-vector space, it remains to use the transitivity formula of the discriminants (Theorem II -5.36). 4. We use the structure Theorem II -4.3 (page 37) for fundamental systems of orthogonal idempotents and the formula for the discriminant of a direct product of algebras (Proposition II -5.34). 5. Let b be a nilpotent element of B. For all x ∈ B multiplication by bx is a nilpotent endomorphism µbx of B. We can then find a K-basis of B in which the matrix of µbx is strictly triangular, so Tr(µbx ) = TrB/K (bx) = 0. Thus b is in the kernel of the K-linear map tr : B → LK (B, K), b 7→ (x 7→ TrB/K (bx). Finally, tr is an isomorphism since DiscB/K is invertible, so b = 0. 6. With the previous notation, assume B is reduced and we want to show that the K-linear map tr is an isomorphism. It suffices to show that Ker tr = 0. Suppose tr(b) = 0, then TrB/K (bx) = 0 for every x and in particular TrB/K (bn ) = 0 for all n > 0. Therefore the endomorphism µb of multiplication by b satisfies Tr(µnb ) = 0 for every n > 0. The formulas that link the Newton sums to the elementary symmetric functions then show that the characteristic polynomial of µb is equal to T [ B:K ] (cf. Exercise III -14). The Cayley-Hamilton theorem and the fact that B is reduced allow us to conclude that b = 0.  1.4. Theorem. (Structure theorem for étale K-algebras, 1) Let B be an étale K-algebra. 1. Every ideal hb1 , . . . , br iB is generated by an idempotent e which is a member of hb1 , . . . , br iK[b1 ,...,br ] , and the quotient algebra is étale over K. 2. Let A be a finitely generated K-subalgebra of B. a. A is an étale K-algebra. b. There exist an integer r > 1 and a fundamental system of orthogonal idempotents (e1 , . . . , er ) of A such that, for each i ∈ J1..rK, B[1/ei ] is a free module of finite rank over A[1/ei ]. In other words, B is a quasi-free module over A. 3. B is separable algebraic over K. 4. For all b ∈ B, CB/K (b) is a product of separable polynomials. J 1. If the ideal is principal this results from Fact 1.3 item 1. Moreover, for two idempotents e1 , e2 , we have he1 , e2 i = he1 + e2 − e1 e2 i. Finally, the quotient algebra is itself étale over K by the formula for the discriminant of a direct product algebra. 304 VI. Strictly finite algebras and Galois algebras 2. It suffices to prove item b, because the result then follows using the transitivity formula for the discriminants for each K ⊆ A[1/ei ] ⊆ B[1/ei ] and the formula for the discriminant of a direct product algebra. To prove item b, we try to compute a basis of B over A by using the indicated method in the case where A is a discrete field for which we know of a K-basis, given in Fact 1.3 3. The algorithm is in danger of struggling when er+1 A∩Fr Pr is not reduced to {0}. We then have an equality αr+1 er+1 = i=1 αi ei with all the αi ’s in A, and αr+1 6= 0 but not invertible in A. This implies (item 1) that we find an idempotent e = 6 0, 1 in K[αr+1 ] ⊆ A. We then continue with the two localizations at e and 1 − e. Finally, we notice that the number of splits operated thus is a priori bounded by [ B : K ]. 3 and 4. Easily result from 2.  Remark. A generalization of item 1 of the previous theorem is found in Lemmas 3.13 and 3.14. We can construct step by step étale K-algebras in virtue of the following lemma, which extends Lemma 1.2. 1.5. Lemma. Let A be an étale K-algebra and f ∈ A[T ] be a separable monic polynomial. Then, A[T ]/hf i is an étale K-algebra. J First consider A[T ]/hf i as a free A-algebra of rank deg f . We have DiscB/A = disc(f ) (Proposition III -5.10 item 3 ). We conclude with the transitivity formula for the discriminants.  The two theorems that follow are corollaries. 1.6. Theorem. Let B be a K-algebra. The elements of B which are separable algebraic over K form a subalgebra A. In addition, every element of B that annihilates a separable monic polynomial of A[T ] is in A. J Let us first show that if x is separable algebraic over K and y annihilates a separable monic polynomial g of K[x][Y ], then every element of K[x, y] is separable algebraic over K. If f ∈ K[X] is separable and annihilates x, then the subalgebra K[x, y] is a quotient K[X, Y ]/hf (X), g(X, Y )i. This K-algebra is étale by Lemma 1.5. Reasoning by induction, we can iterate the previous construction. We obtain the desired result by noting that an étale K-algebra is separable algebraic over K, and that every quotient of such an algebra is also separable algebraic over K.  Here is a “strictly finite” variant. We give the proof again because the variations, although simple, point out the precautions we must take in the strictly finite case. 1. Étale algebras over a discrete field 305 1.7. Theorem. (Characterization of étale K-algebras) Let B be a strictly finite K-algebra given in the form K[x1 , . . . , xn ]. The following properties are equivalent. 1. B is étale over K. 2. The minimal polynomial over K of each of the xi ’s is separable. 3. B is separable algebraic over K. In particular, a field L that is a Galois extension of K is étale over K. J 1 ⇒ 3. By Theorem 1.4. 2 ⇒ 1. Let us first treat the case of a strictly finite K-algebra A[x] where A is étale over K and where the minimal polynomial f of x over K is separable. We then have a surjective homomorphism of the strictly finite K-algebra A[T ]/hf i over A[x] and the kernel of this homomorphism (which is computed as the kernel of a linear map between finite dimensional K-vector spaces) is finitely generated, therefore generated by an idempotent e. The K-algebra C = A[T ]/hf i is étale by Lemma 1.5. We deduce that A[x] ' C/hei is étale over K. We can then conclude by induction on n.  1.8. Corollary. Let f ∈ K[T ] be a monic polynomial. The universal splitting algebra AduK,f is étale if and only if f is separable. Remark. We have already obtained this result by direct computation of the discriminant of the universal splitting algebra (Fact III -5.11). 1.9. Theorem. (Primitive element theorem) Let B be an étale K-algebra. 1. If K is infinite or if B is a discrete field, B is a monogenic algebra, precisely of the form K[b] ' K[T ]/hf i for some b ∈ B and some separable f ∈ K[T ]. This applies in particular to a field L which is a Galois extension of K, such that the extension L/K stems from the elementary case studied in Theorem III -6.14. 2. B is a finite product of monogenic étale K-algebras. J 1. It suffices to treat the case of an algebra with two generators B = K[x, z]. We will look for a generator of B of the form αx + βz with α, β ∈ K. Let f and g be the minimal polynomials of x and z over K. We know that they are separable. Let C = K[X, Z]/hf (X), g(Z)i = K[ξ, ζ]. It suffices to find α, β ∈ K such that C = K[αξ + βζ]. To obtain this result, it suffices that the characteristic polynomial of αξ + βζ be separable, as we can apply Lemma 1.2. We introduce two indeterminates a and b, and we denote by ha,b (T ) the characteristic polynomial of the multiplication 306 VI. Strictly finite algebras and Galois algebras by aξ + bζ in C[a, b] seen as a free K[a, b]-algebra of finite rank. Actually C[a, b] ' K[a, b][X, Z]/hf (X), g(Z)i . Let d(a, b) = discT (ha,b ). We make a computation in a “double universal splitting algebra” over C[a, b], in which we separately factorize f and g: Q Q f (X) = i∈J1..nK (X − xi ) and g(Z) = i∈J1..kK (Z − zj ). We obtain ±d(a, b) = Q  (a(xi − xk ) + b zj − z` ) = (an 2 −n 2 disc f )p (bp 2 −p disc g)n + . . . (i,j)6=(k,`) In the right-most side of the equalities above we have indicated the term of highest degree when we order the monomials in a, b according to a lexicographic order. Thus the polynomial d(a, b) has at least an invertible coefficient. It suffices to choose α, β such that d(α, β) ∈ K× to obtain an element αξ + βζ of C whose characteristic polynomial is separable. This completes the proof for the case where K is infinite. In the case where B is a discrete field we enumerate the integers of K until we obtain α, β in K with d(α, β) ∈ K× , or until we conclude that the characteristic is equal to a prime number p. We then enumerate the powers of the coefficients of f and of g until we obtain enough elements in K, or until we conclude that the field K0 generated by the coefficients of f and g is a finite field. In this case, K0 [x, z] is itself a finite field and it is generated by a generator γ of its multiplicative group, so K[x, z] = K[γ]. 2. We use the proof that has just been given for the case where B is a discrete field. If we do not reach the conclusion, it means that the proof stumbled at a specific place, which reveals that B is not a discrete field. Since we have a strictly finite K-algebra, this provides us with an idempotent e 6= 0, 1 in B.1 Thus B ' B[1/e] × B[1/(1 − e)]. We can then conclude by induction on [ B : K ].  Étale algebras over a separably factorial field When every separable polynomial over K can be decomposed into a product of irreducible factors, the field K is said to be separably factorial. 1.10. Lemma. A field K is separably factorial if and only if we have a test for the existence of a zero in K for an arbitrary separable polynomial of K[T ]. J The second condition is a priori weaker since it amounts to determining the factors of degree 1 for a separable polynomial of K[T ]. Suppose this condition is satisfied. The proof is just about the same as for Lemma III -8.14, 1 For more details see the solution of Exercise 2. 1. Étale algebras over a discrete field 307 but asks for a few additional details. Pn−1 Let f (T ) = T n + j=0 aj T j . We fix an integer k ∈ J2..n − 2K and we Pk−1 look for the polynomials g = T k + j=0 bj T j that divide f . We will show that there is only a finite number of (explicit) possibilities for each of the bj ’s. The proof of Kronecker’s theorem uses universal polynomials Qn,k,r (a0 , . . . , an−1 , X) ∈ Z[a, X], monic in X, such that Qn,k,r (a, br ) = 0. These polynomials can be computed in the universal splitting algebra A = AduK,f as follows. Let Qk Pk−1 G(T ) = i=1 (T − xi ) = T k + j=0 gj T j . We consider the orbit (gr,1 , . . . , gr,` ) of gr under the action of Sn , and we obtain Q` Qn,k,r (a, X) = i=1 (X − gr,i ). We deduce that  Q n!/` σ∈Sn X − σ(gr ) = Qn,k,r . n!/` Therefore, by Lemma III -5.12, CA/k (gr )(X) = Qn,k,r (X). Finally, as A is étale over K (Corollary 1.8), the characteristic polynomial of gr is a product of separable polynomials of K[T ] by Theorem 1.4 4. Thus, br must be looked for among the zeros of a finite number of separable polynomials: there is a finite number of possibilities, all of which are explicit.  1.11. Theorem. (Structure theorem for étale K-algebras, 2) Suppose K is separably factorial. A K-algebra B is étale if and only if it is isomorphic to a finite product of étale fields over K. J Consequence of the primitive element theorem (Theorem 1.9).  1.12. Corollary. If L is an étale field over K and if K is separably factorial, the same goes for L. J Let f ∈ L[T ] be a separable monic polynomial. The L-algebra B = L[T ]/hf i is étale, therefore it is also an étale K-algebra. We can therefore find a fundamental system of orthogonal idempotents (e1 , . . . , en ) such that each B[ e1i ] is connected. This is equivalent to factoring f into a product of irreducible factors.  1.13. Corollary. The following properties are equivalent. 1. Every étale K-algebra is isomorphic to a product of étale fields over K. 2. The field K is separably factorial. 3. Every separable polynomial possesses a field of roots which is a strictly finite extension (thus Galoisian) of K. 4. Every separable polynomial possesses a field of roots which is étale over K. 308 VI. Strictly finite algebras and Galois algebras J For 2 ⇒ 4 we use the fact that the universal splitting algebra for a separable polynomial is étale (Corollary 1.8) and we apply Theorem 1.11. 1.14. Corollary. If K is separably factorial and if (Ki ) is a finite family of étale fields over K, there exists a Galois extension L of K which contains a copy of each of the Ki . J Each Ki is isomorphic to a K[T ]/hfi i with fi separable irreducible. We consider the lcm f of the fi ’s then a splitting field of f .  Perfect fields, separable closure and algebraic closure For a field K of finite characteristic p the map x 7→ xp is an injective ring homomorphism. In classical mathematics a field K is said to be perfect if it is of infinite characteristic, or if, being of finite characteristic p, the morphism x 7→ xp is an isomorphism. In constructive mathematics, to avoid the disjunction on the characteristic in the “or” above (which cannot be made explicit), we formulate it as follows: if p is a prime number such that p.1K = 0K , then the homomorphism K → K, x 7→ xp is surjective. The field of rationals Q and the finite fields (including the trivial field) are perfect. Let K be a field of finite characteristic p. An overfield L ⊇ K is called a perfect closure of K if it is a perfect field and if every element of L, raised to a certain power pk , is an element of K. 1.15. Lemma. A discrete field K of finite characteristic p has a perfect closure L, unique up to unique isomorphism. Furthermore, K is a detachable subset of L if and only if there exists a test for “∃x ∈ K, y = xp ?” (with extraction of the p-th root of y when it exists). Proof idea. An element of L is encoded by a pair (x, k), where k ∈ N and x ∈ K. This encoding represents the pk -th root of x. ` k The equality in L, (x, k) =L (y, `), is defined by xp = y p (in K), such that (xp , k + 1) =L (x, k).  1.16. Lemma. (Algorithm for squarefree factorization) If K is a perfect discrete field, we have at our disposal an algorithm for squarefree factorization of the lists of polynomials of K[X] in the following sense. A squarefree factorization of a family (g1 , . . . , gr ) is given by • a family (f1 , . . . , fs ) of pairwise comaximal separable polynomials, • the expression of each gi in the form Ys m gi = fk k,i (mk,i ∈ N). k=1 1. Étale algebras over a discrete field 309 Proof idea. We start by computing a partial factorization basis for the family (gi )i∈J1..rK (see Lemma III -1.1). If some of the polynomials in the basis are of the form h(X p ), we know how to express them as g(X)p , and then we replace h by g. We iterate this procedure until all the polynomials of the family have a nonzero derivative. Then we introduce the derivatives of the polynomials of the family. For this new family we compute a new partial factorization basis. We iterate the entire procedure until the original goal is reached. The details are left to the reader.  A discrete field K is said to be separably closed if every separable monic polynomial of K[X] can be decomposed into a product of factors X − xi (xi ∈ K). Let K ⊆ L be discrete fields. We say that L is a separable closure of K if L is separably closed and separable algebraic over K. 1.17. Lemma. 1. A discrete field is algebraically closed if and only if it is perfect and separably closed. 2. If a discrete field K is perfect, every étale field over K is perfect. 3. If a perfect discrete field has a separable closure, it is also an algebraic closure. J 1. Results from Lemma 1.16 and 3 results from 1 and 2. 2. We consider L étale over K. Let σ : L → L : z 7→ z p . We know that L = K[x] ' K[X]/hf i where f is the minimal polynomial of x over K. The element y = xp is a zero of the polynomial f σ , which is separable and irreducible over K because σ is an automorphism of K. We therefore obtain an isomorphism K[X]/hf σ i → K[y] ⊆ L. Thus K[y] and L are K-vector spaces of same dimension, so K[y] = L and σ is surjective.  1.18. Theorem. Let K be a separably factorial and countable discrete field. 1. K has a separable closure L, and every separable closure of K is K-isomorphic to L. 2. This applies to K = Q, Q(X1 , . . . , Xn ), Fp or Fp (X1 , . . . , Xn ). 3. In addition if K is perfect, then L is an algebraic closure of K and every algebraic closure of K is K-isomorphic to L. J We only give a sketch of the proof of item 1. Recall first of all item 2 of Theorem III -6.7: if a splitting field for f ∈ K[X] exists and is strictly finite over K, then every other splitting field for f over K is isomorphic to the first. Suppose for a moment that we know how to construct a strictly finite 310 VI. Strictly finite algebras and Galois algebras splitting field for every separable polynomial over K. We enumerate all the separable monic polynomials of K[X] in an infinite sequence (pn )n∈N . We call fn the lcm of the polynomials p0 , . . . , pn . We construct successive splitting fields K0 , . . . , Ki , . . . for these fi ’s. Because of the previously mentioned result, we know how to construct injective homomorphisms of K-algebras, 1 2 n n+1 K0 −→ K1 −→ · · · · · · −→ Kn −−→ · · · The separable closure of K is then the colimit of the system constructed thus. It remains to see why we know how to construct a strictly finite splitting field for every separable polynomial f over K. If the field is infinite, the fact is given by Theorem III -6.15. In the case of a finite field, the study of finite fields directly shows how to construct a splitting field. In the most general case, we can construct a splitting field anyway by brute force, by adding the roots one after the other; we consider an irreducible factor h of f and the field K[ξ1 ] = K[X]/hhi. Over the new field K[ξ1 ], we consider an irreducible f (X) factor h1 (X) of f1 (X) = X−ξ which allows us to construct K[ξ1 , ξ2 ] etc . . . 1 This procedure is possible in virtue of Corollary 1.12 because the successive fields K[ξ1 ], K[ξ1 , ξ2 ] . . . remain separably factorial.  Remark. There exist several ways to construct an algebraic closure of Q. The one proposed in the previous theorem depends on the chosen enumeration of the separable monic polynomials of Q[X] and it lacks geometric pertinence. From this point of view, the colimit that we construct is actually of significantly less interest than the special splitting fields that we can construct each time we need to. There exist other constructions, of a geometric nature, of algebraic closures of Q which are interesting however as global objects. The most renowned is the one based on the algebraic √ real number field to which we add an element i = −1. For each prime number p, another very pertinent algebraic closure of Q is obtained via the intermediate field formed by the p-adic algebraic numbers. 2. Basic Galois theory (2) This section complements Section III -6 (see also Theorems 1.7 and 1.9). Some remainders. A Galois extension of K is defined as a strictly finite field over K which is a splitting field for a separable polynomial of K[T ]. Theorem 1.9 implies that a Galois extension always stems from the elementary case studied in Theorem III -6.14. Finally, Theorem III -6.7 says that such a splitting field is unique up to isomorphism. 2. Basic Galois theory (2) 311 2.1. Definition. An overfield L of K is said to be normal (over K) if every x ∈ L annihilates a monic polynomial of K[T ] which can be decomposed into a product of linear factors in L[T ]. Remark. Note that if L is a strictly finite extension of K or more generally if L has a discrete basis as a K-vector space, then the minimal polynomial of an arbitrary element of K exists. If the condition of the above definition is satisfied, the minimal polynomial itself can be decomposed into linear factors in L[T ]. 2.2. Fact. Let f (T ) ∈ K[T ] be a monic polynomial and L ⊇ K be a field of roots for f . Then, L is a normal extension of K. Q J We have L = K[x1 , . . . , xn ] where f (T ) = ni=1 (T − xi ). Let y = h(x1 , . . . , xn ) be an arbitrary element of L. Let  Q g(X1 , . . . , Xn , T ) = σ∈Sn T − hσ (X) . We clearly have g(x, y) = 0. Moreover, g(x, T ) ∈ K[T ], because each of the coefficients of g(X)(T ) in K[X] is a symmetric polynomial in the Xi ’s, hence a polynomial in the elementary symmetric functions, which are specialized in elements of K (the coefficients of f ) by the K-homomorphism X 7→ x. 2.3. Theorem. (Characterization of Galois extensions) Let L be a strictly finite field over K. The following properties are equivalent. 1. L is a Galois extension of K. 2. L is étale and normal over K. 3. AutK (L) is finite and the Galois correspondence is bijective. 4. There exists a finite group G ⊆ AutK (L) whose fixed field is K. In this case, in item 4, we necessarily have G = Gal(L/K). J 1 ⇒ 2. This is Fact 2.2. 2 ⇒ 1 and 3. By the primitive element theorem, L = K[y] for some y in L. The minimal polynomial f of y over K is separable, and f can be completely factorized in L[T ] because L is normal over K. So L is a splitting field for f . Moreover, Theorem III -6.14 applies. 4 ⇒ 2. It suffices to show that every x ∈ L annihilates a separable polynomial of K[T ] which can be completely factorized in L[T ], because then the extension is normal (by definition) and étale (Theorem 1.7). Let  Q P (T ) = RvG/H,x (T ) = σ∈G/H T − σ(x) where H = St(x). The subscript σ ∈ G/H means that we take a σ in each left coset of H in G. Hence any two left cosets have the same cardinality. Q The polynomial P is fixed by G, so P ∈ K[T ]. Moreover, disc(P ) = i,j∈J1..kK,i<j (xi − xj )2 is invertible. Finally, since the Galois correspondence is bijective, and since the fixed field of G is K, in item 4, we necessarily have G = Gal(L/K).  312 VI. Strictly finite algebras and Galois algebras 2.4. Theorem. (Galois correspondence, complement) Let L/K be a Galois extension with Galois group G = Gal(L/K). Let H be a detachable subgroup of G, σ be an element of G, Hσ = σHσ −1 . 1. The field σ(LH ) is equal to LHσ . 2. LH is a Galois extension of K if and only if H is normal in G. In this case the Galois group Gal(LH /K) is canonically isomorphic to G/H. J 1. Immediate computation. 2. Let M = LH . By the primitive element theorem write M = K[y], such that H = St(y). The field M is normal over K if and only if for each τ ∈ G, we have τ (y) ∈ M, i.e. τ (M) = M. By item 1 this means that τ Hτ −1 = H.  Now we add some details to Theorem III -6.14. 2.5. Theorem. (Galois correspondence, synthesis) Let L/K be a Galois extension. The Galois correspondence works as follows. 1. For all M ∈ KL/K , L/M is a Galois extension with Galois group Fix(M) and [ L : M ] = #Fix(M). 2. If H1 , H2 ∈ GL/K and Mi = Fix(Hi ) ∈ KL/K , then • H1 ∩ H2 corresponds to the K-subalgebra generated by M1 and M2 , • M1 ∩ M2 corresponds to the subgroup generated by H1 and H2 . 3. If H1 ⊆ H2 , then • M1 ⊇ M2 and (H2 : H1 ) = [ M1 : M2 ], • M1 /M2 is a Galois extension if and only if H1 is normal in H2 . In this case the group Gal(M1 /M2 ) is naturally isomorphic to H2 /H1 . 3. Finitely presented algebras Generalities Finitely presented algebras are to systems of polynomial equations (or polynomial systems) what finitely presented modules are to systems of linear equations. Here we introduce a few basic general facts regarding these algebras. The algebras that we consider in this section are associative, commutative and unitary. 3. Finitely presented algebras 3.1. Definition. 313 Let A be a k-algebra. 1. The algebra A is said to be finitely generated if it is generated by a finite family as a k-algebra. This boils down to saying that it is isomorphic to a quotient algebra k[X1 , . . . , Xn ]/a . We then denote it by A = k[x1 , . . . , xn ], where xi is the image of Xi in A. This notation does not imply that A is an extension of k. 2. The algebra A is said to be finitely presented if it is finitely presented as a k-algebra. This boils down to saying that it is isomorphic to an algebra k[X1 , . . . , Xn ]/a , with a finitely generated ideal a = hf1 , . . . , fs i. 3. The algebra A is said to be finitely presented reduced 2 if it is finitely presented as a reduced k-algebra. In other words if it is isomorphic to √ a quotient algebra k[X1 , . . . , Xn ]/ a with a finitely generated ideal a. 4. The algebra A is said to be strictly finite if A is a finitely generated projective k-module. We also say that A is strictly finite over k. In the case of an extension, we speak of a strictly finite extension of k. 5. If A is strictly finite we denote by TrA/k (x), NA/k (x), FA/k (x)(T ) and CA/k (x)(T ), the trace, the determinant, the fundamental polynomial and the characteristic polynomial of the k-linear map µA,x ∈ Endk (A). Moreover, by letting g(T ) = CA/k (x)(T ), the element g 0 (x) is called the different of x. Note that in the case where k is a discrete field, we indeed find the notion of a strictly finite algebra given in Definition III -6.2. 3.2. Fact. (Universal property of a finitely presented algebra) The finitely presented algebra k[X1 , . . . , Xn ]/hf1 , . . . , fs i = k[x1 , . . . , xn ] is ϕ characterized by the following property: if a k-algebra k −→ A contains elements y1 , . . . , yn such that the fiϕ (y1 , . . . , yn )’s are null, there exists a unique homomorphism of k-algebras k[x1 , . . . , xn ] → A which sends the xi ’s to the yi ’s. Changing the generator set 3.3. Fact. When we change the generator set for a finitely presented algebra A the ideal of relations between the new generators is again finitely generated. Refer to Section IV -1 to verify that what has been explained slightly informally on page 180 works well in the current case. 2 “finitely presented reduced” expresses a single, well-defined property. Thus it is to be used and considered as a whole (like a single word) and not to be mistakenly subdivided between “finitely presented” and “reduced.” 314 VI. Strictly finite algebras and Galois algebras Transitivity (finitely presented algebras) ρ λ 3.4. Fact. If k −→ A and A −→ C are two finitely presented algebras, then C is a finitely presented k-algebra. J Let A = k[y] ' k[Y ]/hg1 , . . . , gt i and C = A[x] ' A[X]/hf1 , . . . , fs i. Let F1 , . . . , Fs ∈ k[Y , X] be polynomials such that Fi (y, X) = fi (X). Then, C = k[ρ(y), x] ' k[Y , X]/hg1 , . . . , gt , F1 , . . . , Fs i.  Subalgebras 3.5. Fact. Let A ⊆ C be two finitely generated k-algebras. If C is a finitely presented k-algebra it is also a finitely presented A-algebra (with “the same” presentation, read in A).  J Let without loss of generality C = k[x1 , . . . , xn ] ' k[X] f and A = k[x1 , . . . , xr ]. We have A ' k[X1 , . . . , Xr ]/f with f = hf1 , . . . , fs i ∩ k[X1 , . . . , Xr ]. Let us denote by π : k[X1 , . . . , Xr ] → A the passage to the quotient and for h ∈ k[X1 , . . . , Xn ], denote by hπ ∈ A[Xr+1 , . . . , Xn ] its image. So hπ = h(x1 , . . . , xr , Xr+1 , . . . , Xn ). Consider the homomorphism γ: A[Xr+1 , . . . , Xn ]/hf1π , . . . , fsπ i ' → C. A[X1 , . . . , Xn ]/hX1 − x1 , . . . , Xr − xr , f1π , . . . , fsπ i This is the homomorphism which fixes A and sends Xk to xk for k ∈ Jr + 1..nK. It suffices to show that γ is injective. Every element g of A[Xr+1 , . . . , Xn ] can be written in the form g = Gπ with G ∈ k[X1 , . . . , Xn ]. Suppose that g modulo hf1π , . . . , fsπ i is in Ker γ. We then have g(xr+1 , . . . , xn ) = G(x1 , . . . , xn ) = 0. Therefore G ∈ hf1 , . . . , fs i, which gives us g ∈ hf1π , . . . , fsπ i (after transformation by π). As required.  Remark. The condition A ⊆ C is essential for the proof to work properly. Moreover, if must be noted that the ideal f is not necessarily finitely generated. The zeros of a polynomial system Consider a polynomial system (f ) = (f1 , . . . , fs ) in k[X1 , . . . , Xn ], and a k-algebra ρ : k → B. 3. Finitely presented algebras 315 3.6. Definition. A zero of the system (f ) over B is an n-tuple (ξ) = (ξ1 , . . . , ξn ) ∈ Bn satisfying fiρ (ξ) = 0 for each i. The set of zeros of (f ) over B is often symbolically called the variety of the zeros over B of the polynomial system, and thus, we denote it by Zk (f , B) or Z(f , B). Some zeros are more interesting than others: the closer the algebra B is to k, the more interesting is the zero. We pay particular attention to the zeros over k, or by default over finite k-algebras. Two zeros are a priori particularly disappointing. The one provided by the trivial algebra, and the zero (x1 , . . . , xn ) over the quotient algebra associated with the polynomial system, i.e. A = k[x1 , . . . , xn ] = k[X1 , . . . , Xn ]/hf1 , . . . , fs i . Nevertheless this last algebra plays a central role for our problem because of two findings. The first is the following. 3.7. Fact. For every k-algebra B the set of zeros of (f ) over B is naturally identified with the set of homomorphisms of k-algebras from A to B. In particular, the zeros over k are identified with the characters of the algebra A.  Proof on an example. Let Q[x, y] = Q[X, Y ] X 2 + Y 2 − 1 . Taking a real point (α, β) of the circle X 2 + Y 2 = 1 amounts to the same thing as taking a morphism ρ : Q[x, y] −→ R (the one which sends x and y to α and β). We therefore have a crucial identification, which we write as an equality Homk (A, B) = Zk (f , B) ⊆ Bn . In short the quotient algebra A intrinsically summarizes the pertinent information contained in the polynomial system (f ). Which is also why we say that Zk (f , B) is the variety of the zeros of A over B. The second finding (closely related to the previous one by the way) is the following. From a geometric point of view two polynomial systems (f ) and (g) in k[X] which have the same zeros, over any arbitrary k-algebra, must be considered as equivalent. If that is the case, let A1 = k[x] and A2 = k[y] be the two quotient algebras (we do not give the same name to the classes of Xi ’s in the two quotients). Consider the canonical zero (x1 , . . . , xn ) of (f ) in A1 . Since Z(f , A1 ) = Z(g, A1 ), we must have gj (x) = 0 for each j. This means that gj (X) is null modulo f . Similarly, each fi must be in g . Let us summarize this second finding. 316 VI. Strictly finite algebras and Galois algebras 3.8. Fact. Two polynomial systems (f ) and (g) in k[X] admit the same zeros, over any k-algebra, if and only if they define the same quotient algebra. Example. The circles x2 + y 2 − 3 = 0 and x2 + y 2 − 7 = 0 cannot be distinguished by their rational points – they do not have any (since over Z, the congruence a2 + b2 ≡ 3c2 mod 4 leads to a, b, c being even), but the √ √ quotient Q-algebras are non-isomorphic, and we can observe over Q[ 3, 7] that they have distinct zeros “somewhere.” When k is reduced and if we focus on the zeros over the reduced k-algebras, the algebra A = k[X] f must be replaced by its reduced variant, which is a finitely presented reduced algebra p A/DA (0) = k[X1 , . . . , Xn ]/ hf1 , . . . , fs i . We continue this discussion on page 556 in the subsection entitled “Nullstellensatz and equivalence of two categories.” A digression on algebraic computation Besides their direct link to the solution of polynomial systems another reason for the importance of finitely presented algebras is the following. Each time that an algebraic computation reaches an “interesting result” in a k-algebra B, this computation has only involved a finite number of elements y1 , . . . , yn of B and a finite number of relations between the yi ’s, such that there exist a finitely presented k-algebra C = k[x1 , . . . , xn ] and a surjective morphism θ : C → k[y1 , . . . , yn ] ⊆ B which sends the xi ’s to the yi ’s and such that the “interesting result” has already occurred in C for the xi ’s. In a more scholarly language: every k-algebra is a filtering colimit of finitely presented k-algebras.3 The tensor product of two k-algebras The direct sum of two k-algebras A and B in the category of k-algebras is given by the solution of the following universal problem (“morphism” here means “homomorphism of k-algebras”). Find a k-algebra C and two morphisms α : A → C and λ : B → C such that, for every k-algebra D and for every pair of morphisms ϕ : A → D and ψ : B → D, there exists a unique morphism γ : C → D such that ϕ = γ ◦ α and ψ = γ ◦ λ. 3 The reader will notice that this subsection is directly copied from the analogous subsection for finitely presented modules, page 182. 3. Finitely presented algebras β 317 ;A ϕ α k λ ρ # # /3+ D γ! ;C ψ B Note that in the category of commutative rings, the above universal property means that C, with the two morphisms α and λ, is the amalgamated sum or the push out of the two arrows β : k → A and ρ : k → B. In French, however, the term carré cocartésien is used, formed with the four arrows β, ρ, α and λ reflecting the above sketch.4 ρ β 3.9. Theorem. Consider two k-algebras k −→ B and k −→ A. A. (Direct sum in the category of k-algebras) The algebras A and B admit a direct sum C in the category of k-algebras. Here are different possible descriptions: 1. If A = k[X1 , . . . , Xn ]/hf1 , . . . , fs i, C = B[X1 , . . . , Xn ]/hf1ρ , . . . , fsρ i with the two natural homomorphisms A → C and B → C. 2. If in addition B = k[y1 , . . . , yr ] ' k[Y1 , . . . , Yr ]/hg1 , . . . , gt i is itself a finitely presented k-algebra, we obtain C ' k[X1 , . . . , Xn , Y1 , . . . , Yr ]/hf1 , . . . , fs , g1 , . . . , gt i . 3. Generally, we can consider the k-module C = B ⊗k A. It has a commutative ring structure when defining the product as (x ⊗ a) · (y ⊗ b) = xy ⊗ ab. We obtain a k-algebra structure and we have two natural homomorphisms B → C, x 7→ x ⊗ 1 and A → C, a 7→ 1 ⊗ a. This makes C the direct sum of B and A. 4. If B = k/a , we obtain C ' A/b where b = β(a)A. 5. If B = S −1 k, we obtain C ' U −1 A where U = β(S). B. (Scalar extension) We can regard C as a B-algebra. We then say that C is the B-algebra obtained from A by changing the base ring, or by scalar extension. It is then logical to denote it by ρ? (A). J The proof is left to the reader.  We will be mindful of the fact that k ⊆ A does not generally imply B ⊆ C, in particular in case 4. Also note that the tradition is to speak of a tensor product of k-algebras rather than of a direct sum. 4 The term “carré cocartésien” could be translated as “cocartesian square.” 318 VI. Strictly finite algebras and Galois algebras 3.10. Fact. If A and B are two k-algebras, and (M, +) is an additive group, taking an A ⊗k B-module structure over M is the same as taking an external law of the A-module A × M → M and an external law of the B-module B × M → M which both commute and “coincide over k.” We also say that M has a (A, B)-bimodule structure. ρ α J The explanation is the following with k −→ B, k −→ A. If we have an A ⊗k B-module structure over M , we have the two external laws B × M → M, (c, m) 7→ c · m = (1 ⊗ c)m, and A × M → M, (b, m) 7→ b ? m = (b ⊗ 1)m. Since b⊗c = (b⊗1)(1⊗c) = (1⊗c)(b⊗1), we must have b?(c·m) = c·(b?m). If a ∈ k, a(1 ⊗ 1) = α(a) ⊗ 1 = 1 ⊗ ρ(a) so we must have ρ(a) · m = α(a) ? m. Thus the two laws commute and coincide over k. Conversely, from two external laws that commute and coincide over k, we can define (b ⊗ c)m by b ? (c · m).  Here is an important and easy fact regarding the scalar extension. ρ α 3.11. Fact. Consider two k-algebras k −→ k0 and k −→ A and let A0 = ρ? (A). If the k-algebra A is finitely generated (resp. finitely presented, finite, integral, strictly finite) the same holds for the k0 -algebra A0 . J The proof is left to the reader.  Integral algebras The Lying Over lemma In this and the following subsection we complete what has already been said on integral algebras in Section III -8. The following lemma expresses the constructive content of the classical Lying Over lemma of classical mathematics, which asserts that if B is a ring integral over a subring A there is always a prime ideal of B above a given prime ideal of A. Recall that we denote by DA (a) the nilradical of the ideal a of A. 3.12. Lemma. (Lying Over) Let A ⊆ B with B integral over A and a be an ideal of A, then aB ∩ A ⊆ DA (a), or (which amounts to the same thing) DB (aB) ∩ A = DA (a). In particular, 1 ∈ a ⇔ 1 ∈ aB. P J If x ∈ aB we have x = ai bi , with ai ∈ a, bi ∈ B. The bi ’s generate a finite A-subalgebra B0 . Let G be a finite generator set (with ` elements) 3. Finitely presented algebras 319 of the A-module B0 . Let Bi ∈ M` (A) be a matrix that expresses the multiplication by bi over G. The multiplication by x is expressed by the P matrix ai Bi , which has coefficients in a. The characteristic polynomial of this matrix, which annihilates x (because B0 is a faithful A-module), therefore has all of its coefficients (except for the leading coefficient) in a. When x ∈ A, this implies x` ∈ a.  Remark. Let us indicate how we can deduce the classical Lying Over lemma in classical mathematics. Consider the case where a is a prime ideal and let S = A \ a. Then, aB ∩ S = (aB ∩ A) ∩ S is empty by Lemma 3.12. By Krull’s lemma, there exists therefore a prime ideal p of B such that aB ⊆ p and p ∩ S = ∅, which implies p ∩ A = a. It would also be easy to deduce, in classical mathematics, Lemma 3.12 from the Lying Over lemma. Example. Here we show that the condition “B integral over A” is crucial in the Lying Over lemma. Consider A = Z, B = Z[1/3] and a = 3Z. Then, we obtain aB = h1i, but a 6= h1i. Algebras integral over zero-dimensional rings Here we examine the special case of algebras over zero-dimensional rings. Algebras integral over discrete fields are an important example of zerodimensional rings. In this situation, we give a more precise version on item 3 of Lemma IV -8.2 as follows (see also Theorem 1.4). 3.13. Lemma. An algebra A integral over a discrete field K is zerodimensional. More precisely, let a = ha1 , . . . , an i = hai be a finitely generated ideal. There exist an integer d and an idempotent s ∈ a1 K[a] + · · · + an K[a] such that ad = hsi. J An element x of A is annihilated by a monic polynomial of K[X] that   we express as uX k 1−X h(X) where u ∈ K× , k > 0 and so xk 1−xh(x) = 0. d The idempotent ex such that hex i = hxi for large enough d is then equal k to xh(x) , and d is “large enough” as soon as d > k. In the case of the finitely generated ideal a = ha1 , . . . , an i, each idempotent eai is an element of ai K[ai ]. Therefore their gcd, which is the idempotent s in the statement of the lemma, is in a1 K[a] + · · · + an K[a] (because the gcd of two idempotents e and f is e ∨ f = e + f − ef ).  3.14. Lemma. Let k be a zero-dimensional ring and A an algebra integral over k. 1. The ring A is zero-dimensional. 2. More precisely, if a = ha1 , . . . , an i, there exist an integer d and an idempotent s ∈ a1 k[a] + · · · + an k[a] such that ad = hsi. 320 VI. Strictly finite algebras and Galois algebras 3. In particular, we obtain for each a ∈ A an equality  ad 1 − af (a) = 0, d with some f (X) ∈ k[X] (so, af (a) is idempotent). NB: We do not assume that ρ : k → A is injective. J It suffices to prove item 2. By applying the elementary local-global machinery from page 212, we extend the result of Lemma 3.13 to the case where k is reduced zero-dimensional. Then we extend the zero-dimensional case to the reduced zero-dimensional case by passing to the quotient via the nilradical and by using “Newton’s method in algebra” (Section III -10). More precisely, let N = DA (0). By the reduced zero-dimensional case, there exist x1 , . . . , xn ∈ k[a] such that s = a1 x1 + · · · + an xn , with s2 ≡ s mod N and sai ≡ ai mod N. The element s is congruent modulo N to a unique idempotent s1 , which is written as sp(s) with p(T ) ∈ Z[T ] (Corollary III -10.4). Since s ∈ k[a], this gives an equality s1 = a1 y1 + · · · + an yn with y1 , . . . , yn ∈ k[a]. In addition, s1 ai ≡ sai ≡ ai modulo N for each i. Since (1 − s1 )ai ∈ N, there exists a ki such that (1−s1 )aki i = 0 for each i. Finally, with k = k1 +· · ·+kn , we obtain ak = hs1 i.  Recall that Lemma IV -8.15 establishes the following reciprocal. Let k ⊆ A, with A integral over k. If A is a zero-dimensional ring, then k is a zero-dimensional ring. A weak Nullstellensatz The following theorem, for the implication 2 ⇒ 3 limited to the case where A is a discrete field, is often called the “weak Nullstellensatz” in the literature, because it can serve as a preliminary to the Nullstellensatz (in classical mathematics). It is to be distinguished from the other weak Nullstellensätze already considered in this work. 3.15. Theorem. (A weak Nullstellensatz) Let K be a reduced zero-dimensional ring and A be a finitely generated K-algebra. For the following properties, we have 1 ⇒ 2 ⇔ 3. 1. A is a local ring. 2. A is zero-dimensional. 3. A is finite over K. NB: We do not assume that ρ : K → A is injective. J We already know that 3 implies 2. Let us see that 1 or 2 implies 3. We can replace K with ρ(K) which is also reduced zero-dimensional. We then have K ⊆ A = K[x1 , . . . , xn ] = K[x]. Our proof is by induction on n. 3. Finitely presented algebras 321 The n = 0 case is trivial. Let us do the inductive step from n − 1 to n. If A is zero-dimensional, there exist a polynomial R ∈ K[X1 , . . . , Xn ] and an integer ` such that x`n 1 − xn R(x) = 0. The polynomial Xn` 1 − Xn R(X) has one of its coefficients equal to 1 and is therefore primitive. If A is local, xn or 1 + xn is invertible. Without loss of generality we assume that xn is invertible. There exists a polynomial R ∈ K[X1 , . . . , Xn ] such that 1 + xn R(x) = 0. The polynomial 1 + Xn R(X) has one of its coefficients equal to 1 and is therefore primitive. In both cases, we can perform a change of variables as in Lemma III -9.4 (infinite discrete field case) or VII -1.4 (general case). We then have A = K[y1 , . . . , yn ], and A is finite over A1 = K[y1 , . . . , yn−1 ] ⊆ A. If A is zero-dimensional, Lemma IV -8.15 implies that A1 is zero-dimensional and we can therefore apply the induction hypothesis. If A is local, item 3 of Theorem IX -1.8 implies that A1 is local and we can therefore apply the induction hypothesis.  Remark. What is new for the implication 2 ⇒ 3 in Theorem 3.15, compared to Theorem IV -8.16 which uses Noether positioning, is therefore the fact that we only assume that the algebra is finitely generated instead of finitely presented. The two proofs are ultimately based on Lemma IV -8.15 and on a change of variables lemma. Integral algebras over a pp-ring We denote by Reg A the filter of the regular elements of the ring A, such that the total ring of fractions Frac A is equal to (Reg A)−1A. 3.16. Fact. Let A be a pp-ring, K = Frac A, L ⊇ K be a reduced integral K-algebra and B be the integral closure of A in L. Then, B is a pp-ring and Frac B = L = (Reg A)−1 B. J K is reduced zero-dimensional because A is a pp-ring (Fact IV -8.6). The ring L is zero-dimensional because it is integral over K. As it is reduced, it is a pp-ring. As B is integrally closed in L, every idempotent of L is in B, so B is a pp-ring. Consider some x ∈ L and some monic polynomial f ∈ K[X] which annihilates x. By getting rid of the denominators we obtain a polynomial g(X) = am X m + am−1 X m−1 + · · · + a0 ∈ A[X] which annihilates x, with am ∈ Reg A. Then, y = am x, integral over A, is in B and x ∈ (Reg A)−1 B.  322 VI. Strictly finite algebras and Galois algebras Algebras that are finitely presented modules 3.17. Theorem. (When a k-algebra is a finitely presented k-module) 1. For a k-algebra A the following properties are equivalent. a. A is a finitely presented k-module. b. A is finite and is a finitely presented k-algebra. c. A is finitely presented and integral over k. 2. If these conditions are satisfied and k is coherent (resp. strongly discrete coherent), then A is coherent (resp. strongly discrete coherent). P J 1a ⇒ 1b. Let A = m i=1 bi k be a finitely presented k-module. We must give a finite presentation of A as a k-algebra. Consider the generator set (b1 , . . . , bm ). On the one hand, we take the k-syzygies given by the presentation of A as a k-module. On the other hand we express each bi bj as a k-linear combination of the bk ’s. Modulo these last relations, every polynomial in the bi ’s with coefficients in k can be rewritten as a k-linear combination of the bi ’s. Therefore it evaluates to 0 in A if and only if (as a polynomial) it is in the ideal generated by all the relations we have given. 1b ⇔ 1c. Clear. 1b ⇒ 1a. Suppose that A is finite over k with  A = k[x1 , . . . , xn ] = k[X] f . For each i, let ti (Xi ) ∈ k[Xi ] be a monic polynomial such that ti (xi ) = 0, and δi = deg ti . We have A = k[X]/ht1 , . . . , tn , h1 , . . . , hs i , where the hj ’s are the reduced fj ’s modulo ht1 , . . . , tn i. The “monomials” xd = xd11 · · · xdnn where d1 < δ1 , . . . , dn < δn (which we denote by d < δ) form a basis for the algebra k[X]/hti and a generator set G of the k-module A. AnParbitrary k-syzygy between these generators is s obtained when we write j=1 gj (x)hj (x) = 0, on the condition that we express it as a k-linear combination of elements of G. We can naturally limit ourselves to the gj ’s that are of degree < δi in each variable Xi . If we fix an index j ∈ J1..sK and a monomial xd with d < δ, we obtain a k-syzygy between the elements of G by rewriting X d hj (X) modulo ht1 , . . . , tn i and by saying that the linear combination of the elements of G obtained as such is null. These syzygies generate the k-syzygy module between the elements of G. 2. If k is coherent (resp. strongly discrete coherent), then we know that A is coherent (resp. strongly discrete coherent) as a k-module (since it is finitely presented). Let (bi )m i=1 be a generator set of A as a k-module n and v = (v1 , . . . , vn ) ∈ A . The ideal hv1 , . . . , vn i is the k-module finitely generated by the vi bj ’s, so it is detachable if k is strongly discrete. Moreover, an A-syzygy for v can be rewritten as a k-syzygy between the 3. Finitely presented algebras 323 vi bj ’s. Therefore a generator set of the k-syzygy module between the vi bj ’s gives on a reread a generator set of the A-syzygy module between the vi ’s. Integral algebra over an integrally closed ring Here we generalize Proposition III -8.17. 3.18. Theorem. Let A be an integrally closed ring, K be its quotient field, L be a strictly finite overfield of K and B be the integral closure of A in L. For z ∈ L, let µL,z ∈ EndK (L) be multiplication by z, and νz (X) and χz (X) be the minimal polynomial and the characteristic polynomial of µL,z (they are elements of K[X]). 1. For z ∈ L, we have z ∈ B ⇐⇒ νz ∈ A[X] ⇐⇒ χz ∈ A[X]. In particular, for z ∈ B, NL/K (z) and TrL/K (z) ∈ A. We now suppose that L is étale over K, i.e. that DiscL/K ∈ K× . 2. Let x be an element of B such that K[x] = L. Let ∆x = disc(χx ). a. A[x] ' A[X]/hχx i, free A-module of rank [ L : K ]. b. We have A[x][1/∆x ] = B[1/∆x ], integrally closed ring. c. If A is a gcd domain, if ∆x = d2 b and b is squarefree then A[x][1/d] = B[1/d] and it is an integrally closed ring. 3. Let B be a basis of L over K contained in B and M ⊆ B be the A-module with basis B. a. The element ∆ = discL/K (B) is in A. 1 M. b. For all x ∈ B, ∆x ∈ M , in other words M ⊆ B ⊆ ∆ c. If A is a gcd domain, for all x ∈ B, there exists a δ ∈ A such that δ 2 divides ∆ and δx ∈ M . If in addition ∆ = d2 b with b being squarefree, M ⊆ B ⊆ d1 M . J 1. If z ∈ B, it annihilates a monic polynomial h(X) ∈ A[X], and the polynomial νz divides h in K[X]. As νz is monic and A is integrally closed, we obtain νz ∈ A[X] by Lemma III -8.10. Moreover in K[X], νz divides χz and χz divides a power of νz , so, still by Lemma III -8.10, νz ∈ A[X] is equivalent to χz ∈ A[X]. 2a. Clear: (1, x, . . . , x[ L:K ]−1 ) is both a basis of A[x] over A and of L over K. Note that by hypothesis χx = νx . 2b. Consider the special case of 3b. where M = A[x]. We obtain B[1/∆x ] = A[x][1/∆x ], and since B is integrally closed, the same goes for B[1/∆x ]. 2c. Special case of 3c. with M = A[x], reasoning as in 3c. 3a. Immediate consequence of 1. P 3b. Let B = (b1 , . . . , bn ) and x = i xi bi with xi ∈ K. Consider for example the coefficient x1 , assumed nonzero. The n-tuple B 0 = (x, b2 , . . . , bn ) is 324 VI. Strictly finite algebras and Galois algebras a K-basis of L contained in B. The matrix of B 0 over B has as its determinant x1 . Therefore x21 ∆ = x21 disc(B) = disc(B 0 ) ∈ A. A fortiori (x1 ∆)2 ∈ A, and since A is integrally closed, x1 ∆ ∈ A. Thus all the coordinates over B of ∆x are in A. 3c. When A is a gcd domain, we express the element x1 as a reduced fraction x1 = a1 /δ1 . Then, since x21 ∆ ∈ A, δ12 divides a21 ∆, and since gcd(a1 , δ1 ) = 1, the element δ12 divides ∆. We proceed in the same way for each xi = ai /δi . If δ is the lcm of the δi ’s, δ 2 is the lcm of the δi2 ’s, so it divides ∆, and δx ∈ M .  4. Strictly finite algebras The dual module and the trace If P and Q are finitely generated projective k-modules, we have a canonical isomorphism θP,Q : P ? ⊗k Q → Lk (P, Q). When the context is clear we can identify α ⊗ x ∈ P ? ⊗k Q with the corresponding k-linear map y 7→ α(y)x.  In particular, a coordinate system of P , (x1 , . . . , xn ), (α1 , . . . , αn ) , is characterized by the equality Xn αi ⊗ xi = IdP . (1) i=1 Dually we have, modulo the identification of P with (P ? )? , Xn xi ⊗ αi = IdP ? . (2) i=1 This equation means that for every γ ∈ P ? we have γ = Pn i=1 γ(xi )αi . 4.1. Definition and notation. Let A be a k-algebra. The dual A? of the k-module A has an A-module structure via the external def law (a, α) 7→ a  α = α ◦ µa , i.e. (a  α)(x) = α(ax). Facts V -2.9 and/or V -8.9 give the following result.  4.2. Fact. Let (x1 , . . . , xn ), (α1 , . . . , αn ) be a coordinate system for the strictly finite k-algebra A, then the k-linear map µA,a is represented in this  system by the matrix αi (axj ) i,j∈J1..nK and we have Xn Xn  TrA/k = xi  αi , i.e. ∀a ∈ A, TrA/k (a) = αi (axi ) . (3) i=1 i=1 4. Strictly finite algebras 325 Norm and cotransposed element We introduce the notion of a cotransposed element in a strictly finite algebra. It suffices to build upon what was said in the case of a free algebra of finite rank on page 129. If A is strictly finite over k we can indentify A with a commutative k-subalgebra of Endk (A), where A designates the k-module A deprived of its multiplicative structure, by means of the multiplication homomorphism x 7→ µA,x = µx . Then, since µ ex = G(µx ) for a polynomial G ∈ k[T ] (item 6 of Theorem V -8.1), we can define x e by the equality x e = G(x), or (what amounts to the same thing) µ fx = µe . If more precision x is necessary we will use the notation AdjA/k (x). This element x e is called the cotransposed element of x. The equality µ fx µx = det(µx )IdA then gives x AdjA/k (x) = NA/k (x). (4) ρ 4.3. Lemma. Let k −→ A be a strictly finite algebra, x ∈ A and y ∈ k. 1. We have x ∈ A× if and only if NA/k (x) ∈ A× . In this case x−1 = x e/NA/k (x). 2. x is regular in A if and only if NA/k (x) is regular in k. In this case x e is also regular. 3. ρ(k) is a direct summand in A. Let e = e0 (A) (such that heik = Annk (A)). 4. We have ρ(y) ∈ A× if and only if y ∈ (k/hei)× . 5. ρ(y) is regular in A if and only if y is regular in k/hei. NB. If A is a faithful k-module, i.e. if ρ is injective, we identify k with ρ(k). Then, k is a direct summand in A, and an element y of k is invertible (resp. regular) in k if and only if it is invertible (resp. regular) in A. J 1. In a finitely generated projective module an endomorphism (here µx ) is a bijection if and only if its determinant is invertible. 2. In a finitely generated projective module an endomorphism is injective if and only if its determinant is regular. Items 3, 4 and 5 can be proven after localization at comaximal elements of k. By the local structure theorem we are reduced to the case where A is free of finite rank, say k. If k = 0, then e = 1, so A and k/hei are trivial and everything is clear (even if it is a little unsettling). Let us examine the case where k > 1, hence e = 0, and let us identify k with ρ(k). Items 4 and 5 then result from items 1 and 2 because NA/k (y) = y k . For item 3, we consider P a basis (b1 , . . . , bk ) of A over P k and elements a1 , . . . , ak ∈ k such that i ai bi = 1. We have NA/k ( i ai bi ) = 1. Moreover, P for y1 , . . . , yk ∈ k, NA/k ( i yi bi ) is expressed as a homogeneous polynomial of degree k in k[y] (see the remark on page 129), and so P P NA/k ( i ai bi ) = i ai βi = 1 326 VI. Strictly finite algebras and Galois algebras for suitable βi ∈ k. P P Let us consider the element β ∈ Endk (A) defined by β( i xi bi ) = i xi βi . Then, β(1) = 1, so β(z) = z for z ∈ k, Im β = k and β ◦ β = β.  Transitivity and rank When A is of constant rank n, we write [ A : k ] = n. This generalizes the notation already defined in the free algebra case, and this will be generalized further in Chapter X (notation X -3.6). In this subsection, m and n are integers. 4.4. Fact. Let A be a strictly finite k-algebra, M be a finitely generated projective A-module and B be a strictly finite A-algebra. 1. M is also a finitely generated projective k-module. 2. Suppose rkA M = m and let f (T ) = Rk (A) ∈ B(k)[T ] be the rank polynomial of A as a k-module, then Rk (M ) = f m (T ) = f (T m ). 3. B is strictly finite over k and TrB/k = TrA/k ◦ TrB/A . J 1. Assume that A ⊕ E ' kr (k-modules) and M ⊕ N ' As (A-modules). Then M ⊕ N ⊕ E s ' krs (k-modules). We can state this again with  coordinate systems in the following form: if (x1 , . . . , xn ), (α1 , . . . , αn ) is  a coordinate system for the k-module A and (y1 , . . . , ym ), (β1 , . . . , βm )  is a coordinate system for the A-module M , then (xi yj ), (αi ◦ βj ) is a coordinate system for the k-module M . 2. Left to the reader (who can rely on the previous description of the coordinate system, or consult the proof of Lemma X -3.8). 3. We work with coordinate systems as in item 1 and we apply Fact 4.2 regarding the trace.  4.5. Theorem. Let k ⊆ A ⊆ B be rings. Suppose that B is strictly finite over A. Then 1. the ring B is strictly finite over k if and only if A is strictly finite over k, 2. if [ A : k ] = n and [ B : A ] = m, then [ B : k ] = mn, 3. if [ B : k ] = mn and [ B : A ] = m, then [ A : k ] = n. J 1. If B is strictly finite over k, then A is strictly finite over k; this results from A being a direct summand in B (Lemma 4.3 item 3 ), which is a finitely generated projective k-module. The converse implication is in Lemma 4.4. 2 and 3. Result from item 2 of Fact 4.4: if f = T n then f m (T ) = T mn ; P if f = k rk T k is a multiplicative polynomial such that f m (T ) = T mn then P f = T n , since f m (T ) = f (T m ) = k rk T km .  5. Dualizing linear forms, strictly finite algebras 327 Remark. More general transitivity formulas (in the case of nonconstant rank) are given in Section X -3 in the subsection entitled “Transitivity formulas” on page 549 (in particular, see Corollary X -3.9 and Theorem X -3.10). 5. Dualizing linear forms, strictly finite algebras 5.1. Definition. (Non-degenerate symmetric bilinear form, dualizing linear form, strictly étale algebra) Let M be a k-module and A be a k-algebra. 1. If φ : M × M → k is a symmetric bilinear form, it is associated with the k-linear map ϕ : M → M ? defined by ϕ(x) = φ(x, •) = φ(•, x). We say that φ is non-degenerate if ϕ is an isomorphism. 2. If λ ∈ Lk (A, k) = A? , it is associated with the symmetric k-bilinear form over A, denoted by ΦA/k,λ = Φλ and defined by Φλ (x, y) = λ(xy). We say that the linear form λ is dualizing if Φλ is non-degenerate. We call a Frobenius algebra an algebra for which there exists a dualizing linear form. 3. If A is strictly finite over k the form ΦTrA/k is called the trace form. 4. The algebra A is said to be strictly étale over k if it is strictly finite and if the trace is dualizing, i.e. the trace form is non-degenerate. Remark. If A is free with basis (e) = (e1 , . . . , en ) over k, the matrix of φ and that of ϕ coincide (for the suitable bases). Moreover, φ is non-degenerate if and only if DiscA/k = discA/k (e) is invertible. Note that when k is a discrete field we once again find Definition 1.1 for an étale algebra.5 Dualizing forms 5.2. Theorem. (Characterization of the dualizing forms in the strictly finite case) Let A be a k-algebra and λ ∈ A? . For x ∈ A, let x? = x  λ ∈ A? . 1. If A is strictly finite and if λ is dualizing, then for every generator set (xi )i∈J1..nK , there exists a system (yi )i∈J1..nK such that we have Xn Xn yi? ⊗ xi = IdA , i.e. ∀x ∈ A, x = λ(xyi )xi . (5) i=1 i=1 Moreover, if A is faithful, λ is surjective. 5 We have not given the general definition of an étale algebra. It so happens that the étale algebras over discrete fields are always strictly étale (at least in classical mathematics, this is in relation to Theorem 6.14), but that it is no longer the case for an arbitrary commutative ring, hence the necessity to introduce the terminology “strictly étale” here. 328 VI. Strictly finite algebras and Galois algebras 2. Conversely, if there exist two systems (xi )i∈J1..nK , (yi )i∈J1..nK such that P ? i yi ⊗ xi = IdA , then • A is strictly finite, • the form λ is dualizing, • and we have the equality P i x?i ⊗ yi = IdA . 3. If A is strictly finite, the following properties are equivalent. a. λ is dualizing. b. λ is a basis of the A-module A? (which is therefore free of rank 1). c. λ generates the A-module A? , i.e. A  λ = A? . J 1. On the one hand y 7→ y? is an isomorphism of A over A? , and on the other hand every generator set is the first component of a coordinate system. Let us take a look at the surjectivity. As A is faithful we can assume that k ⊆ A. Let a be the ideal of k generated by the λ(yi )’s. Equality (5) gives P the membership 1 = i λ(yi )xi ∈ aA. As A is integral over k, the Lying Over (Lemma 3.12) shows that 1 ∈ a. P 2. Equality (5) gives α = i α(xi )yi? for α ∈ A? . This proves that y 7→ y ? is surjective. Moreover, if x? = 0, then we have λ(xyi ) = 0, then x = 0. Thus λ is dualizing. P P Finally, the equality α = i α(xi )yi? with α = x? gives x? = i λ(xi x)yi? , P and since z 7→ z ? is a k-isomorphism, x = i λ(xi x)yi . 3. a ⇔ b. “λ is dualizing” means that x 7→ x? is an isomorphism, i.e. that λ is an A-basis of A? . The implication c ⇒ a results from item 2 because a  coordinate system is given by (xi ), (yi? ) .  Examples. See Exercises 10 to 12 and Problem 2. 1) If f ∈ k[X] is monic, the algebra k[x] = k[X]/hf (X)i is a Frobenius algebra (Exercise 11).  2) The algebra k[x, y] = k[X, Y ] X 2 , Y 2 , XY is not a Frobenius algebra (Exercise 12). Scalar extension 5.3. Fact. (Stability of the dualizing forms by scalar extension) Consider two k-algebras k0 and A and let A0 = k0 ⊗k A. If the form α ∈ Lk (A, k) is dualizing, so is the form α0 ∈ Lk0 (A0 , k0 ) obtained by scalar extension. Consequently, scalar extension preserves the Frobenius property of an algebra. 5. Dualizing linear forms, strictly finite algebras 329 Transitivity for dualizing forms 5.4. Fact. Let A be a strictly finite k-algebra, B be a strictly finite A-algebra, β ∈ LA (B, A) and α ∈ Lk (A, k). 1. If α and β are dualizing, so is α ◦ β. 2. If α ◦ β is dualizing and β is surjective (for instance B is faithful and β is dualizing), then α is dualizing.   J If (ai ), (αi ) is a coordinate system of A/k and (bj ), (βj ) is a co ordinate system of B/A , then (ai bj ), (αi ◦ βj ) is a coordinate system of B/k . 1. For a ∈ A, b ∈ B, η ∈ Lk (A, k) and  ∈ LA (B, A) we can easily verify that ab  (η ◦ ) = (a  η) ◦ (b  ). Since α is dualizing, we have ui ∈ A such that ui  α = αi for i ∈ J1..nK. Since β is dualizing, we have vj ∈ B such that vj  β = βj for j ∈ J1..mK. Then, ui vj  (α ◦ β) = αi ◦ βj , and this shows that α ◦ β is dualizing. 2. Let α0 ∈ Lk (A, k), which we aim to express in the form a  α. Note that  for every b0 ∈ B, we have b0  (α0 ◦ β) |A = β(b0 )  α0 ; in particular, if  β(b0 ) = 1, then b0  (α0 ◦ β) |A = α0 . Since α ◦ β is dualizing, there exists a b ∈ B such that α0 ◦ β = b  (α ◦ β). By multiplying  this equality by b0 , we obtain, by restricting to A, α0 = (b0 b)  (α ◦ β) |A = β(b0 b)  α.  Strictly étale algebras The following theorem is an immediate corollary of Theorem 5.2. 5.5. Theorem. (Characterization of strictly étale algebras) Let A be a strictly finite k-algebra. For x ∈ A, let x? = x  TrA/k ∈ A? . 1. If A is strictly étale, then for every generator set (xi )i∈J1..nK , there exists a system (yi )i∈J1..nK such that we have Xn Xn yi? ⊗ xi = IdA , i.e. ∀x ∈ A, x = TrA/k (xyi )xi . (6) i=1 i=1  Such a pair (xi ), (yi ) is called a trace system of coordinates. In addition, if A is faithful, TrA/k is surjective.  2. Conversely, if we have a pair (xi )i∈J1..nK , (yi )i∈J1..nK that satisfies (6), P ? then A is strictly étale, and we have i xi ⊗ yi = IdA . 3. The following properties are equivalent. a. TrA/k is dualizing (i.e. A is strictly étale). b. TrA/k is a basis of the A-module A? (which is therefore free of rank 1). c. TrA/k generates the A-module A? . 330 VI. Strictly finite algebras and Galois algebras Scalar extension The following fact extends Facts 3.11 and 5.3. 5.6. Fact. Consider two k-algebras k0 and A and let A0 = k0 ⊗k A. 1. If A is strictly étale over k, then A0 is strictly étale over k0 . 2. If k0 is strictly finite and contains k, and if A0 is strictly étale over k0 , then A is strictly étale over k. J 1. Left to the reader. 2. First assume that A is free over k. Let ∆ = DiscA/k = discA/k (e) ∈ k for a basis e of A over k. By scalar extension we obtain the equality ∆ = DiscA0 /k0 ∈ k0 . If ∆ is invertible in k0 it is invertible in k by Lemma 4.3. In the general case we reduce it back to the previous case by localization at comaximal elements of k.  Transitivity for strictly étale algebras 5.7. Fact. Let A be a strictly finite k-algebra and B be a strictly finite A-algebra. 1. If A is strictly étale over k, then B is strictly étale over k. 2. If B is strictly étale over k and faithful over A, then A is strictly étale over k. J Results from Facts 5.4 and 4.4.  Separability and nilpotency 5.8. Theorem. Let A be a strictly étale k-algebra. 1. If k is reduced, then so is A. 2. The ideal DA (0) is generated by the image of Dk (0) in A. 3. If k0 is a reduced k-algebra, A0 = k0 ⊗k A is reduced. J 1. We reason more or less as for the case where k is a discrete field (Fact 1.3). First suppose that A is free over k. Let a ∈ DA (0). For all x ∈ A multiplication by ax is a nilpotent endomorphism µax of A. Its matrix is nilpotent so the coefficients of its characteristic polynomial are nilpotent (see for example Exercise II -2), therefore null since k is reduced. In particular, TrA/k (ax) = 0. Thus a is in the kernel of the k-linear map  tr : a 7→ x 7→ TrA/k (ax) . However, tr is an isomorphism by hypothesis so a = 0. In the general case we reduce it to the case where A is free over k by the local structure theorem for finitely generated projective modules (taking into account Fact 5.6 1 ). Item 3 results from 1 and from Fact 5.6 1. Item 2 results from 3, when we consider k0 = kred .  The same technique proves the following lemma. 5. Dualizing linear forms, strictly finite algebras 331 5.9. Lemma. If A is strictly finite over k and if a ∈ A is nilpotent, the coefficients of FA/k (a)(T ) are nilpotent (except the constant coefficient). Tensor products If φ and φ0 are two symmetric bilinear forms over M and M 0 , we define a symmetric bilinear form over M ⊗k M 0 , denoted φ ⊗ φ0 , by (φ ⊗ φ0 )(x ⊗ x0 , y ⊗ y 0 ) = φ(x, y)φ0 (x0 , y 0 ). 5.10. Proposition. (Tensor product of two non-degenerate forms) Let M , M 0 be two finitely generated projective k-modules and A, A0 two strictly finite k-algebras. 1. If φ over M and φ0 over M 0 are two non-degenerate symmetric bilinear forms, so is φ ⊗ φ0 . ? 2. If λ ∈ A? and λ0 ∈ A0 are two dualizing k-linear forms, so is λ ⊗ λ0 ∈ (A ⊗k A0 )? . J 1. The canonical k-linear map M ? ⊗k M 0 ? → (M ⊗k M 0 )? is an isomorphism since M , M 0 are finitely generated projective. Let ϕ : M → M ? ? be the isomorphism associated with φ, and ϕ0 : M 0 → M 0 be the one associated with φ0 . The morphism associated with φ ⊗ φ0 is composed of two isomorphisms, so it is an isomorphism / (M ⊗k M 0 )? 7 M ⊗k M 0 ϕ⊗ϕ0 ' ? M ? ⊗k M 0 can. iso. 2. Results from Φλ⊗λ0 = Φλ ⊗ Φλ0 .  The previous proposition and Lemma V -8.10 give the following result. 5.11. Corollary. Let A and C be two strictly finite k-algebras. Then ΦTr(A⊗k C)/k = ΦTrA/k ⊗ ΦTrC/k . In particular, A ⊗k C is strictly étale if A and C are strictly étale. (For the precise computation of the discriminant, see Exercise 7.) Integral elements, idempotents, diagonalization The following theorem is a subtle consequence of the remarkable Lemma III -8.5. It will be useful in the context of Galois theory for Theorem VII -6.4. 332 VI. Strictly finite algebras and Galois algebras 5.12. Theorem. Let ρ : k → k0 be an injective ring homomorphism with k integrally closed in k0 , and A be a strictly étale k-algebra. By scalar extension we obtain A0 = ρ? (A) ' k0 ⊗k A strictly étale over k0 . 1. The homomorphism A → A0 is injective. 2. The ring A is integrally closed in A0 . 3. Every idempotent of A0 is in A. J Item 3 is a special case of item 2. 1. Apply the local structure theorem for finitely generated projective modules and the local-global principle II -6.7 for exact sequences. 2. We can identify k with a subring of k0 and A with a subring of A0 . Recall that A is finite, therefore integral over k. It suffices to treat the case where A is free over k (local structure theorem for finitely generated projective modules and local-global principle III -8.9 for integral elements). Let (e) = (e1 , . . . , en ) be a basis of A over k and (h) the dual basis with respect to the trace form. If n = 0 or n = 1 the result is obvious. Suppose n > 2. Note that (e) is also a basis of A0 over k0 . In addition, since, for a ∈ A, the endomorphisms µA,a and µA0 ,a have the same matrix over (e), the trace form over A0 is an extension of the trace form over A and P (h) remains the dual basis relative to the trace form in A0 . Let x = i xi ei be an integral element of A0 over A (xi ∈ k0 ). We must prove that the xi ’s are in k, or (which amounts to the same thing) integral over k. However, xhi is integral over k. The matrix of µA0 ,xhi is therefore an integral element of Mn (k0 ) over k. Therefore the coefficients of its characteristic polynomial are integral over k (Lemma III -8.5), so in k, and in particular xi = TrA0 /k0 (xhi ) ∈ k.  5.13. Lemma. The cartesian product kn is a strictly étale k-algebra. The discriminant of the canonical basis is equal to 1. If k is a nontrivial connected ring, this k-algebra has exactly n characters and n! automorphisms (those that we spot at first sight). J The assertion regarding the discriminant is clear (Proposition II -5.34). We obviously have as the characters the n natural projections πi : kn → k over each of the factors, and as the k-automorphisms the n! automorphisms obtained by permuting the coordinates. Let ei be the idempotent defined by Ker πi = h1 − ei i. If π : kn → k is a character, the π(ei )’s form a fundamental system of orthogonal idempotents of k. Since k is nontrivial and connected, all but one are null, π(ej ) = 1 for example. Then, π = πj , because they are k-linear maps that coincide over the ei ’s. Finally, as a consequence every k-automorphism of kn permutes the ei ’s.  5. Dualizing linear forms, strictly finite algebras 333 5.14. Definition. (Diagonal algebras) 1. A k-algebra is said to be diagonal if it is isomorphic to a product algebra kn for some n ∈ N. In particular, it is strictly étale. 2. Let A be a strictly étale k-algebra and L be a k-algebra. We say that L diagonalizes A if L ⊗k A is a diagonal L-algebra. 5.15. Fact. (Monogenic diagonal algebras) Let f ∈ k[X] be a monic polynomial of degree n and A = k[X]/hf i. 1. The k-algebra A is diagonal if and only if f is separable and can be decomposed into linear factors in k[X]. 2. In this case, if k is nontrivial connected, f admits exactly n zeros in k, and the decomposition of f is unique up to the order of the factors. 3. A k-algebra L diagonalizes A if and only if disc(f ) is invertible in L and f can be decomposed into linear factors in L[X]. J 1. If f is separable and can be completely factorized, we have an isomor- phism A ' kn by the Lagrange interpolation theorem (Exercise III -1). Let us show the converse. Every character k[X] → k is an evaluation homomorphism, so every character A → k is the evaluation at a zero of f in k. Thus the isomorphism given in the hypothesis is of the form  g 7→ g(x1 ), . . . , g(xn ) (xi ∈ k and f (xi ) = 0). Then let gi satisfy gi (xi ) = 1 and, for j = 6 i, gi (xj ) = 0. For j 6= i, the element xi − xj divides g (x ) − g (x ) = 1, so xi − xj is invertible. This i i i j Qn implies that f = i=1 (X − xi ) (again by Lagrange). 2. With the previous notations we must show that the only zeros of f in k are the xi ’s. A zero of f corresponds to a character π : A → k. We therefore must prove that kn does not admit any other character than the projections over each factor. However, this has been proven in Lemma 5.13. 3. Apply item 1 to the L-algebra L ⊗k A ' L[X]/hf i.  Remarks. 1) Item 2 requires k to be connected. 2) (Exercise left to the reader) If k is a discrete field and if A is a matrix of Mn (k), saying that L diagonalizes k[A] means that this matrix is “diagonalizable” in Mn (L), in the (weak) sense that Ln is a direct sum of the eigen-subspaces of A. 3) The decomposition of a ring A into a finite product of nonzero connected rings, when possible, is unique up to the order of the factors. Each connected factor, isomorphic to a localized ring A[1/e], corresponds in fact to an indecomposable idempotent e.6 This can be understood to be a consequence 6 The idempotent e is said to be indecomposable if the equality e = e + e with e , 1 2 1 e2 being idempotents and e1 e2 = 0 implies e1 = 0 or e2 = 0. 334 VI. Strictly finite algebras and Galois algebras of the structure theorem for finite Boolean algebras (see Theorem VII -3.3). We can also obtain the result by reasoning with a fundamental system of orthogonal idempotents as in the proof of Lemma 5.13. 4) In item 2, the “nontrivial” hypothesis gives a more common statement. Without this hypothesis we would have said in the first part of the sentence: every zero of f is given by one of the xi ’s corresponding to the assumed decomposition of f into linear factors. 5) For the most part the previous fact is a more abstract reformulation of the Lagrange interpolation theorem. 5.16. Proposition. Let K be a separably factorial discrete field and B be a strictly finite K-algebra. Then, B is étale if and only if it is diagonalized by an overfield of K étale over K. J Suppose B is étale. It is isomorphic to a product of fields Ki étale over K (Theorem 1.11) and there exists a field L étale over K, which is a Galois extension that contains a copy of each Ki (Corollary 1.14). We easily see that L diagonalizes B. Suppose that a field L étale over K diagonalizes B. Then, DiscB/K is invertible in L therefore in K, so B is étale.  6. Separable algebras, separability idempotent The results in this section will be used in Section 7 devoted to Galois algebras, but only for Theorem 7.19 which establishes the Galois correspondence in the connected case. Moreover, they are also very useful when studying modules of differentials. Here we will limit ourselves to speaking of derivations. 6.1. Definitions and notations. Let A be a k-algebra. 1. The algebra A ⊗k A, called the enveloping algebra of A, is denoted by Aek . 2. This k-algebra possesses two natural A-algebra structures, respectively given by the homomorphisms gA/k : a 7→ a ⊗ 1 (left-structure) and dA/k : a 7→ 1⊗a (right-structure). We will use the following abbreviated notation for the two corresponding A-module structures. For a ∈ A and γ ∈ Aek , a · γ = gA/k (a)γ = (a ⊗ 1)γ and γ · a = dA/k (a)γ = γ(1 ⊗ a). 3. We will denote by JA/k (or J if the context is clear) the ideal of Aek generated by the elements of the form a ⊗ 1 − 1 ⊗ a = a · 1Aek − 1Aek · a. 6. Separable algebras 335 4. We also introduce the following k-linear maps ∆A/k : A → JA/k , µA/k : Aek a 7→ a ⊗ 1 − 1 ⊗ a. (7) → A, a ⊗ b 7→ ab (multiplication) (8) 5. In the case where A is a finitely generated k-algebra, A = k[x1 , . . . , xn ], the same holds for Aek and we have the following possible description of the previous objects. • Aek = k[y1 , . . . , yn , z1 , . . . , zn ] = k[y, z] with yi = xi ⊗ 1, zi = 1 ⊗ xi . • For a = a(x) ∈ A, and h(y, z) ∈ k[y, z], we have – gA/k (a) = a(y), dA/k (a) = a(z), – a · h = a(y)h(y, z), h · a = a(z)h(y, z), – ∆A/k (a) = a(y) − a(z), – and µA/k (h) = h(x, x). • JA/k is the ideal of k[y, z] generated by the (yi − zi )’s. 6. Finally, in the case where A = k[X1 , . . . , Xn ]/hf1 , . . . , fs i = k[x], in other words when A is a finitely presented k-algebra, the same holds for Aek (see Theorem 3.9).  Aek = k[Y1 , . . . , Yn , Z1 , . . . , Zn ] f (Y ), f (Z) = k[y, z]. Note that µA/k (a · γ) = aµA/k (γ) = µA/k (γ · a) for γ ∈ Aek and a ∈ A. Towards the separability idempotent 6.2. Fact. 1. The map µA/k is a character of A-algebras (for the two structures).  2. We have JA/k = Ker(µA/k ). So A ' Aek JA/k and Aek = (A ⊗ 1) ⊕ JA/k = (1 ⊗ A) ⊕ JA/k , and JA/k is the left- (or right-) A-module generated by Im ∆A/k . 3. In the case where A = k[X1 , . . . , Xn ]/hf1 , . . . , fs i = k[x] we obtain k[y, z] = k[y] ⊕ hy1 − z1 , . . . , yn − zn i = k[z] ⊕ hy1 − z1 , . . . , yn − zn i . J The inclusion JA/k ⊆ Ker(µA/k ) is clear. Denoting ∆A/k by ∆, we have P i ai ⊗ bi = P i  ai bi ⊗ 1 − P i ai · ∆(bi ) = 1 ⊗ P i  ai bi − P i ∆(ai ) · bi . We deduce that Ker(µA/k ) is the (left- or right-) A-module generated by Im ∆ and therefore that it is contained in JA/k . The result follows by IV -2.7.  336 VI. Strictly finite algebras and Galois algebras Example. For A = k[X], we have Aek ' k[Y, Z] with the homomorphisms h(X) 7→ h(Y ) (on the left-hand side) and h(X) 7→ h(Z) (on the right-hand side), so h · g = h(Y )g and g · h = h(Z)g. We also have  ∆A/k (h) = h(Y ) − h(Z), µA/k g(Y, Z) = g(X, X) and JA/k = hY − Zi . We see that JA/k is free with Y − Z as its basis over Aek , and as a left-A module, it is free with basis (Y − Z)Z n n∈N . 6.3. Fact. We write ∆ to denote ∆A/k . 1. For a, b ∈ A we have ∆(ab) = ∆(a) · b + a · ∆(b). More generally, ∆(a1 · · · an ) = ∆(a1 ) · a2 · · · an + a1 · ∆(a2 ) · a3 · · · an + · · · + a1 · · · an−2 · ∆(an−1 ) · an + a1 · · · an−1 · ∆(an ). 2. If A is a finitely generated k-algebra, generated by (x1 , . . . , xr ), JA/k is a finitely generated ideal of Aek , generated by (∆(x1 ), . . . , ∆(xr )). 3. Over the ideal Ann(JA/k ), the two structures of A-modules, on the left- and right-hand sides, coincide. In addition, for α ∈ Ann(JA/k ) and γ ∈ Aek , we have γα = µA/k (γ) · α = α · µA/k (γ). (9) J 1. Immediate computation. Item 2 results from it since JA/k is the ideal generated by the image of ∆, and since for every “monomial” in the generators, for example x3 y 4 z 2 , ∆(x3 y 4 z 2 ), is equal to a linear combination (with coefficients in Aek ) of the images of the generators ∆(x), ∆(y) and ∆(z). 3. The ideal a = Ann(JA/k ) is an Aek -module, so it is stable for the two A-module laws. Let us show that these two structures coincide. If α ∈ a, for every a ∈ A we have 0 = α(a · 1 − 1 · a) = a · α − α · a. Equality (9) stems from the fact that γ − µA/k (γ) · 1 and γ − 1 · µA/k (γ) are in Ker µA/k = JA/k .  6.4. Lemma. The ideal JA/k is generated by an idempotent if and only if  1 ∈ µA/k Ann(JA/k ) . Moreover, if 1 = µA/k (ε) with ε ∈ Ann(JA/k ), then ε is an idempotent, and we have Ann(JA/k ) = hεi and JA/k = h1 − εi , such that ε is uniquely determined. J We omit the A/k subscript. If J = hεi with an idempotent ε, we obtain the equalities Ann(J) = h1 − εi and µ(1 − ε) = 1. Conversely, suppose that 1 = µ(ε) with ε ∈ Ann(J). Then µ(1 − ε) = 0, so 1 − ε ∈ J, then (1 − ε)ε = 0, i.e. ε is idempotent. The equality 1 = (1 − ε) + ε implies that Ann(J) = hεi and J = h1 − εi.  6. Separable algebras 337 Bézout matrix of a polynomial system Let f1 , . . . , fs ∈ k[X1 , . . . , Xn ] = k[X]. We define the Bézout matrix of the system (f ) = (f1 , . . . , fs ) in the variables (Y1 , . . . , Yn , Z1 , . . . , Zn ) by BZY ,Z (f ) = (bij )i∈J1..sK,j∈J1..nK , where bij = fi (Z1..j−1 , Yj , Yj+1..n ) − fi (Z1..j−1 , Zj , Yj+1..n ) . Yj − Zj Thus for n = 2, s = 3:   BZY ,Z (f1 , f2 , f3 ) =   f1 (Y1 ,Y2 )−f1 (Z1 ,Y2 ) Y1 −Z1 f2 (Y1 ,Y2 )−f2 (Z1 ,Y2 ) Y1 −Z1 f3 (Y1 ,Y2 )−f3 (Z1 ,Y2 ) Y1 −Z1 For n = 3, the ith row of the Bézout matrix is  fi (Y1 ,Y2 ,Y3 )−fi (Z1 ,Y2 ,Y3 ) fi (Z1 ,Y2 ,Y3 )−fi (Z1 ,Z2 ,Y3 ) Y1 −Z1 Y2 −Z2 f1 (Z1 ,Y2 )−f1 (Z1 ,Z2 ) Y2 −Z2 f2 (Z1 ,Y2 )−f2 (Z1 ,Z2 ) Y2 −Z2 f3 (Z1 ,Y2 )−f3 (Z1 ,Z2 ) Y2 −Z2   .  fi (Z1 ,Z2 ,Y3 )−fi (Z1 ,Z2 ,Z3 ) Y3 −Z3  . We have the equality    f1 (Y ) − f1 (Z) Y1 − Z1     .. .. BZY ,Z (f ) ·  =  . . Yn − Zn fs (Y ) − fs (Z)  (?) In addition BZX,X (f ) = JACX (f ), the Jacobian matrix of (f1 , . . . , fs ). Now consider a finitely generated k-algebra A = k[x1 , . . . , xn ] = k[x], with polynomials fi satisfying fi (x) = 0 for every i. Its enveloping algebra is Aek = k[y1 , . . . , yn , z1 , . . . , zn ] (using the notation from the beginning of the section). Then the matrix BZy,z (f ) ∈ Ms,n (Aek ) has as its image under µA/k the Jacobian matrix JACx (f1 , . . . , fs ) ∈ Ms,n (A). For a minor D of order n of BZy,z (f ), Equality (?) shows that D (yj −zj ) = 0 for j ∈ J1..nK. In other words D ∈ Ann(JA/k ). The Bézout matrix therefore allows us to construct elements of the ideal Ann(JA/k ). In addition, δ := µA/k (D) is the corresponding minor in JACx (f ). Let us give an application of this theory to the special case when the transposed matrix t JACx (f ) : As → An is surjective, i.e. 1 ∈ Dn (JACx (f )). P We therefore have an equality 1 = I∈Pn,s uI δI in A, where δI is the minor of the extracted matrix of JACx (f ) on the rows i ∈ I. By letting P ε = I∈Pn,s uI DI ∈ Aek , we obtain µA/k (ε) = 1 with ε ∈ Ann(JA/k ). Recap: ε is what we call the separability idempotent of A, and A is a separable algebra, notions which will be defined later (Definition 6.10). 338 VI. Strictly finite algebras and Galois algebras  Therefore, if A is a finitely presented k-algebra k[X] f and if the linear map t JACx (f ) : As → An is surjective, then A is separable.  More generally, for a finitely presented algebra A = k[X] f , we will see   that Coker t JACx (f ) and JA/k J2A/k are isomorphic A-modules (Theorem 6.7). Derivations 6.5. Definition. Let A be a k-algebra and M be an A-module. We call a k-derivation of A in M , a k-linear map δ : A → M which satisfies the Leibniz equality δ(ab) = aδ(b) + bδ(a). We denote by Derk (A, M ) the A-module of the k-derivations of A in M . A derivation with values in A is “simply” called a derivation of A. When the context is clear, Der(A) is an abbreviation for Derk (A, A). Note that δ(1) = 0 because 12 = 1, and so δ|k = 0. 6.6. Theorem and definition. (Universal derivation) The context is that of Definition 6.1. 1. Over J/J2 the two A-module structures (on the left- and right-hand sides) coincide. 2. The composite map d : A → J/J2 , defined by d(a) = ∆(a), is a kderivation. 3. It is a universal k-derivation in the following sense. For every A-module M and every k-derivation δ : A → M , there exists a unique A-linear map θ : J/J2 → M such that θ ◦ d = δ. A d  J/J2 δ % k-derivations θ! /M A-linear maps. The A-module J/J2 , denoted by ΩA/k , is called the module of (Kähler) differentials of A. J Items 1 and 2 are left to the reader. 3. The uniqueness is clear, let us show the existence. 6. Separable algebras 339 We define the k-linear map τ : A ⊗k A → M A τ (a ⊗ b) = −a δ(b). δ ∆  A ⊗k A /' M τ The diagram commutes and τ is A-linear on the left-hand side. It remains to see that τ (J2 ) = 0, because θ is then defined by restriction and passage to the quotient of τ . We verify that τ (∆(a)∆(b)) = bδ(a) + aδ(b) − δ(ab) = 0.  We now consider the case of a finitely presented algebra A = k[X1 , . . . , Xn ]/hf1 , . . . , fs i = k[x]. We use the notations in 6.1. Recall that the Jacobian matrix of the polynomial system is defined as X1 X2 · · · Xn  ∂f1 ∂f1 ∂f1  f1 ∂X · · · ∂X ∂X2 1 n ∂f2  ∂f2 ∂f2 f2   ∂X1 ∂X2 · · · ∂Xn    ..   . JACX (f ) = fi  .. . .    ..   ..  . .  ∂fs ∂X2 ∂fs ∂X1 fs ··· ∂fs ∂Xn In the following theorem, we denote by Ja = t JACX (f ) : As → An the linear map defined by the transposed matrix, and by (e1 , . . . , en ) the canonical basis of An . We define Pn ∂g (x) ei , δ : A → Coker(Ja) : g(x) 7→ i=1 ∂X i λ : An → J/J2 : ei 7→ d(xi ) = yi − zi . 6.7. Theorem. (Universal derivation via the Jacobian) 1. The map δ is a k-derivation with δ(xi ) = ei . 2. The A-linear map λ induces by passage to the quotient an isomorphism λ : Coker(Ja) → J/J2 . Consequently, δ is also a universal derivation. δ 4 Coker(Ja) A δ(xi ) O λ d *  J/J2  d(xi ) 340 VI. Strictly finite algebras and Galois algebras J 1. Left to the reader. 2. We start by showing the inclusion Im(Ja) ⊆ Ker λ, i.e. for each k,  Pn ∂fk λ i=1 ∂Xi (x) ei = 0. For g ∈ k[X] we use Taylor’s theorem at order 1: Pn ∂g (z) (yi − zi ) mod J2 . g(y) ≡ g(z) + i=1 ∂X i Pn ∂fk For g = fk we have fk (y) = fk (z) = 0, so i=1 ∂X (z) (yi − zi ) ∈ J2 . i This proves the above equality by taking into account the A-module law over J/J2 . This shows that λ passes to the quotient, with λ : δ(xi ) = ei 7→ d(xi ) = yi − zi . Moreover, since δ is a k-derivation, the universal property of the derivation d : A → J/J2 gives us an A-linear factorization J/J2 → Coker(Ja) : d(xi ) 7→ δ(xi ). It is clear that the two mappings are inverses of each other.  Separability idempotent of a strictly étale algebra Let A be a strictly finite k-algebra. For a ∈ A, let a? = a  TrA/k . We have a canonical k-linear map Aek → Endk (A), composed of the linear map Aek → A? ⊗k A, a ⊗ b 7→ a? ⊗ b, and of the natural isomorphism A? ⊗k A → Endk (A). If A is strictly étale these linear maps are all isomorphisms.  P Then, if (xi ), (yi ) is a trace system of coordinates, the element i xi ⊗ yi is independent of the choice of the system because its image in Endk (A) P P is IdA . In particular, i xi ⊗ yi = i yi ⊗ xi . The P following theorem identifies the characteristic properties of this element i xi ⊗ yi . These properties lead to the notion of a separable algebra. 6.8. Theorem. (Separability idempotent of a strictly étale algebra)  Let A be a strictly étale k-algebra and (xP ), (y ) be a trace system of i i coordinates of A. Then, the element ε = i xi ⊗ yi ∈ Aek satisfies the conditions of Lemma 6.4. In particular, ε is idempotent and we have X xi yi = 1, a · ε = ε · a ∀a ∈ A. i NB: We prove the converse (for strictly finite algebras) a little later (Theorem 6.13). Proof in the Galoisian case (to be read after Theorem 7.11). Let (k, A, G) be a Galois algebra. Since the result to be proven is independent of the trace system of coordinates, we can suppose that the families (xi ) and (yi ) are two systems of elements of A satisfying the conditions of item 2 of Artin’s theorem 7.11. 6. Separable algebras 341 P Saying that that i xi yi = 1, which is what  µ(ε) = 1 consists in saying P P (xi ), (yi ) satisfies. To show that i axi ⊗ yi = i xi ⊗ ayi , it suffices to apply ψG ; we let (gσ )σ be the image of the left-hand side, and (dσ )σ be the image of the right-hand side. We obtain, by letting δ be the Kronecker symbol, P P gσ = i axi σ(yi ) = aδσ,Id , dσ = i xi σ(ayi ) = σ(a)δσ,Id . We indeed have the equality since the components of the two families (dσ ) and (gσ ) are null except at the index σ = Id, at which their (common) value is a. Note that ε is equal to the element εId introduced in Lemma 7.10. Its image under ϕG is the idempotent eId , which confirms that ε is idempotent.  (General) Proof in the strictly étale case. We write Tr for TrA/k and let mε : Aek → Aek be multiplication by ε. We have P Tr(ab) = i Tr(ayi ) Tr(bxi ), a, b ∈ A. (?) P Indeed, this easily results from the equality a = i Tr(ayi )xi . We rewrite (?) as the equality of two k-linear forms, Aek → k: TrA/k ◦ µA/k = TrAek/k ◦ mε . (∗) Let us show that ε ∈ Ann(J). Let z ∈ Aek , z 0 ∈ J. By evaluating the equality (∗) at zz 0 , we obtain  TrA/k µA/k (zz 0 ) = TrAek/k (εzz 0 ). But µA/k (zz 0 ) = µA/k (z)µA/k (z 0 ) = 0 because z 0 ∈ J = Ker µA/k . We deduce that TrAek/k (εzz 0 ) = 0 for every z ∈ Aek . As TrAek/k is non-degenerate we obtain εz 0 = 0. Thus ε ∈ Ann(J). P It remains to show that µA/k (ε) = 1, i.e. s = i xi yi = 1.  P The equality Tr(x) = i Tr(xxi yi ) (Fact V -8.9) says that Tr (1 − s)x = 0 for all x ∈ A, thus s = 1.  Separable algebras 6.9. Theorem. For a k-algebra A the following properties are equivalent. 1. A is projective as an Aek -module. 2. JA/k is generated by an idempotent of Aek . 3. JA/k is finitely generated and idempotent.  4. 1 ∈ µA/k Ann(JA/k ) . 5. There exist an n ∈ N and x1 , . .P . , xn , y1 , . . .P , yn ∈ A such that P x y = 1 and for every a ∈ A, ax ⊗ y = i i i i i i i xi ⊗ ayi . In this case we denote by εA/k the unique idempotent which generates the ideal Ann(JA/k ). When A is a finitely generated k-algebra, another equivalent property is 342 VI. Strictly finite algebras and Galois algebras 6. ΩA/k = 0.7 J Since A ' Aek JA/k , items 1 and 2 are equivalent under Lemma V -7.5  regarding the cyclic projective modules. Items 2 and 3 are equivalent under Lemma II -4.6 on finitely generated idempotent ideals. Lemma 6.4 gives the equivalence of 2 and 4. 3 ⇔ 6. If A is a finitely generated k-algebra, then JA/k is a finitely generated ideal of Aek , therefore condition 3 can be reduced to: JA/k is idempotent, i.e. ΩA/k = 0. Finally, 5 is the concrete form of 4.  6.10. Definition. We call an algebra that satisfies the equivalent properties stated in Theorem 6.9 a separable algebra. The idempotent εA/k ∈ Aek is called the separability idempotent of A. Comment. It should be noted that Bourbaki uses a notion of separable extension for fields that is quite different to the above definition. In classical mathematics, algebras over a field K “separable in the sense of Definition 6.10” are the algebras that are “finite and separable in the Bourbaki sense” (see Theorem 6.14). Many authors follow Bourbaki at least for the algebraic extensions of fields, whether they are finite or not. In the case of an algebraic K-algebra over a discrete field K, the definition à la Bourbaki means that every element of the algebra is a zero of a separable monic polynomial of K[T ]. 6.11. Fact. (Stability of separable algebras by scalar extension) Let ı : k → A and ρ : k → k0 be two k-algebras and A0 = ρ? (A). We have e a canonical isomorphism ρ? (Aek ) → A0k0 and the diagram below commutes Aek ρek µA0/k0 µA/k  A / A0 0e k ρ  / A0 In particular, a separable algebra remains separable by scalar extension. J The proof is left to the reader.  Now we prove the converse of Theorem 6.8, which requires a preliminary lemma. 7 By Theorem 6.7, if A = k[X , . . . , X ]/hf , . . . , f i = k[x], Ω n s 1 1 A/k = 0 means that the matrix Ja(x) (the transposed of the Jacobian matrix) is surjective, i.e. 1 ∈ Dn (JACX (f )(x)). 6. Separable algebras 343 6.12. Lemma. Let A be a strictly finite k-algebra and Aek its enveloping algebra. 1. Aek is a strictly finite left A-algebra whose trace is given by γl ◦ (IdA ⊗ TrA/k ) (where γl : A ⊗k k → A is the canonical isomorphism), i.e. for P α = i ai ⊗ bi : P Tr(Aek/A )l (α) = i ai TrA/k (bi ). Similarly, Aek is a strictly finite right A-algebra whose trace is given P by γr ◦ (TrA/k ⊗IdA ), i.e. Tr(Aek/A )r (α) = i TrA/k (ai )bi . 2. Over Ann(JA/k ), the A-linear forms Tr(Aek/A )l , Tr(Aek/A )r and µA/k P coincide, i.e. if α = i ai ⊗ bi ∈ Ann(JA/k ), P P P i ai bi = i ai TrA/k (bi ) = i TrA/k (ai )bi . J 1. This is a general structural result: the trace is preserved by scalar extension (see Fact V -8.8). In other words if k0 is a k-algebra, k0 ⊗k A is a strictly finite k0 -algebra whose trace is γ ◦ (Idk0 ⊗ TrA/k ) where γ : k0 ⊗k k → k0 is the canonical isomorphism. 2. Generally, under the hypotheses that E is a finitely generated projective A-module, x ∈ E, ν ∈ E ? and u = θE (ν ⊗ x) ∈ EndA (E), we obtain the equality TrE (u) = ν(x) (see Fact V -8.9). We apply this to E = Aek , x = α ∈ E and ν = µA/k ∈ E ? , by noting then that u = θE (ν ⊗ α) = µAek ,α . Indeed, by item 3 of Fact 6.3, we have  for γ ∈ Aek , γα = µA/k (γ) · α = θE (ν ⊗ α)(γ). 6.13. Theorem. (Strictly étale algebras and separable algebras) Every separable and strictly finite k-algebra A is strictly étale. More preP cisely, if εA/k = xi ⊗ yi ∈ Aek is the separability idempotent of A, then  (xi ), (yi ) is a trace system of coordinates of A/k . In brief, a strictly finite algebra is separable if and only if it is strictly étale. NB: Precisely, the link between the two notions is obtained by the relation linking the separability idempotent and the coordinate systems, as is apparent in the direct Theorem 6.8 and in the converse theorem. P J Let x ∈ A, then (x ⊗ 1)εA/k = i xxi ⊗ yi is in Ann(JA/k ), so by P P Lemma 6.12, we have i xxi yi = i TrA/k (xi x)yi . P P As i xi yi = 1, this gives x = i TrA/k (xi x)yi . The result follows by the characterization of strictly étale algebras given in Fact 5.5.  The following theorem strengthens the previous theorem and shows that the existence of a separability idempotent is a very strong condition of finiteness. 344 VI. Strictly finite algebras and Galois algebras 6.14. Theorem. Let A be a separable k-algebra. Suppose that A has a coordinate system in the following sense. We have a discrete set I, a family (ai )i∈I in A and a family (αi )i∈I in the dual k-module A? = Lk (A, k), such that for all x ∈ A we have P x = i∈Jx αi (x)ai . Here Jx is a finite subset of I, and every αi (x) for i ∈ I \ Jx is null. Then, A is strictly finite, therefore strictly étale. This is the case, for example, if k is a discrete field and if A is a finitely presented k-algebra. J Regarding the special case, the quotient algebra has a finite or countable basis of P monomials, by the theory of Gröbner bases. r Let ε = k=1 bk ⊗ ck be the separability idempotent. We have ε · x = x · ε Pr for every x ∈ A, and k=1 bk ck = 1. For α ∈ A? and x ∈ A, by applying 1 ⊗ α to x · ε = ε · x we obtain P P bk α(xck ). k xbk α(ck ) = Sk By denoting by J the finite subset J = Jck , we obtain for each k X ck = αi (ck )ai . i∈J We then write X x= xbk ck = k∈J1..rK X k∈J1..rK,i∈J xbk αi (ck )ai = X αi (ck x)bk ai . i∈J,k∈J1..rK This now gives a finite coordinate system for A, with the elements bk ai and the forms x 7→ αi (ck x) for (i, k) ∈ J × J1..rK.  Comment. Note that, when we have a coordinate system for a module, the module is projective in the usual sense. The definition of a coordinate system for a module M amounts to saying that M is isomorphic to a direct summand of the module A(I) . The latter module, freely generated by I, is projective because I is discrete. In classical mathematics, every projective module has a coordinate system, because all the sets are discrete, so the previous theorem applies: every separable k-algebra which is a projective k-module is strictly finite. By the same token every separable algebra over a discrete field or over a reduced zero-dimensional ring is strictly finite. In the case of a finitely presented algebra over a discrete field, Theorems 6.9 and 6.14 give the following result. 6.15. Corollary. For f1 , . . . , fs ∈ k[X1 , . . . , Xn ] when k is a discrete field, the following properties are equivalent. 1. The quotient algebra A = k[x] is strictly étale. 2. The quotient algebra is separable. 6. Separable algebras 345 3. The matrix Ja(x), transposed of the Jacobian matrix of the polynomial system, is surjective. We will now show that a separable algebra looks a lot like a diagonal algebra, including when the base ring is arbitrary. Consider the diagonal k-algebra kn . Let (e1 , . . . , en ) be its canonical basis and pi : kn → k be the coordinate form in relation to ei . Then we have ei ∈ B(kn ), pi ∈ Homk (kn , k), pi (ei ) = 1 and xei = pi (x)ei ∀x ∈ kn . In a way, we are about to generalize the above result to separable algebras. 6.16. Lemma. (Characters of a separable algebra) Let A be a separable k-algebra with k ⊆ A. 1. Let ı : k → A be the canonical injection. If ϕ ∈ Homk (A, k), ı ◦ ϕ is a projector with image k.1, so A = k.1 ⊕ Ker ϕ and Im(IdA − ı ◦ ϕ) = Ker ϕ. In fact the ideal Ker ϕ is generated by an idempotent of A. We will denote by εϕ the complementary idempotent. 2. For ϕ, ϕ0 ∈ Homk (A, k), we have ϕ0 (εϕ ) = ϕ(εϕ0 ). This element, denoted by e{ϕ,ϕ0 } , is an idempotent of k and we have εϕ εϕ0 = e{ϕ,ϕ0 } εϕ = e{ϕ,ϕ0 } εϕ0 = ϕ(εϕ εϕ0 ) = ϕ0 (εϕ εϕ0 ), hIm(ϕ − ϕ0 )ik = 1 − e{ϕ,ϕ0 } k and Annk (ϕ − ϕ0 ) = e{ϕ,ϕ0 } k . 3. Consequently we have the equivalences e{ϕ,ϕ0 } = 1 ⇐⇒ εϕ = εϕ0 ⇐⇒ ϕ = ϕ0 , and e{ϕ,ϕ0 } = 0 ⇐⇒ εϕ εϕ0 = 0. 4. If k is connected, two idempotents εϕ , (for ϕ ∈ Homk (A, k)), are equal or orthogonal. P J Let εA/k = xi ⊗ yi . We know that a · εA/k = εA/k · a for every a ∈ A, P P P that xi ⊗ yi = yi ⊗ xi and that i xi yi = 1. 1. The first assertion is valid for every character of every algebra A. It remains to see that Ker ϕ is generated by an idempotent. We consider the homomorphism of k-algebras ν = µA/k ◦ (ϕ ⊗ IdA ) : Aek → A, and the P element ε = ν(εA/k ). Thus ε = i ϕ(xi )yi is an idempotent and we obtain the equalities P P ϕ(ε) = i ϕ(xi )ϕ(yi ) = ϕ( i xi yi ) = ϕ(1) = 1. Therefore 1 − ε ∈ Ker ϕ. P P By applying ν to the equality i axi ⊗ yi = i xi ⊗ ayi , we obtain ϕ(a)ε = aε. Therefore a ∈ Ker ϕ implies a = (1 − ε)a, and Ker ϕ = h1 − εi. 2. We have, for a ∈ A, ϕ0 (a)ϕ0 (εϕ ) = ϕ0 (aεϕ ) = ϕ0 (ϕ(a)εϕ ) = ϕ(a)ϕ0 (εϕ ). (?) For a = εϕ0 , we obtain ϕ0 (εϕ ) = ϕ(εϕ0 )ϕ0 (εϕ ). By symmetry, ϕ(εϕ0 ) = ϕ0 (εϕ ). Denote by e this idempotent of k. By definition, we have aεϕ = 346 VI. Strictly finite algebras and Galois algebras ϕ(a)εϕ . By making a = εϕ0 , we obtain εϕ0 εϕ = eεϕ . Finally, let a = hIm(ϕ − ϕ0 )i. The relation (?) shows that ae = 0. Moreover 1 − e = (ϕ − ϕ0 )(εϕ ) ∈ a. Therefore a = h1 − eik and Annk (a) = heik . 3 and 4. Result from the previous item.  6.17. Lemma. (Separable subalgebra of a diagonal extension) Let k be a nontrivial connected ring, B = kn , pi : B → k be the ith canonical projection, ei be the idempotent defined by P Ker pi = h1 − ei i (i ∈ J1..nK). For a finite subset I of J1..nK we let eI = i∈I ei . Let A be a separable k-algebra with k ⊆ A ⊆ kn and πi be the restriction of pi to A for i ∈ J1..nK. 1. We consider the equivalence relation over J1..nK defined by πi = πj . The corresponding partition P is a finite set of finite subsets of J1..nK. For J ∈ P we denote by πJ the common value of the πj ’s for j ∈ J. 2. A is a free k-module with basis { eJ | J ∈ P }. 3. A? is a free k-module with basis { πJ | J ∈ P } = Homk (A, k). J 1. As k is nontrivial and connected, every idempotent of B is of the form eI for a unique finite subset I of J1..nK. Let i ∈ J1..nK. By Lemma 6.16 there exists one and only one idempotent εi of A such that πi (εi ) = 1 and aεi = πi (a)εi for every a ∈ A. This idempotent is also an idempotent of B so of the form eJi for a finite subset Ji of J1..nK. Since πi (εi ) = pi (eJi ) = 1, we have i ∈ Ji , and the union of the Ji ’s is J1..nK. Two distinct Ji are disjoint by the last item of Lemma 6.16. The Ji ’s therefore form a finite partition formed of finite subsets of J1..nK. If πi = πj , then εi = εj so Ji = Jj . If Ji = Jj , then εi = εj and πi (εj ) = 1. Item 2 of Lemma 6.16 gives 1 ∈ AnnA (πi − πj ), so πi = πj . 2. Results from item 1. 3. Let ϕ ∈ Homk (A, k). The ϕ(eJ )’s are idempotents of k. As k is connected, we have ϕ(eJ ) = 0 or 1. But the (eJ )J∈P ’s form a fundamental system of orthogonal idempotents, therefore there is only one J ∈ P for which ϕ(eJ ) = 1 and consequently ϕ = πJ . The rest is immediate.  7. Galois algebras, general theory The theory developed by Artin considers a finite group G of automorphisms of a discrete field L, calls K the subfield of the fixed points of G and proves that L is a Galois extension of K, with G as the Galois group. In the current section we give the generalization of Artin’s theory for commutative rings instead of discrete fields. A good idea of “how this can work” is already given by the following significant small example, which shows that the hypothesis “discrete field” is not required. 7. Galois algebras, general theory 347 A small example to start off Let A be a commutative ring, σ ∈ Aut(A) be an automorphism of order 3, and G be the group that it generates. Suppose that there exists an x ∈ A such that σ(x) − x ∈ A× . Let k = AG be the subring of fixed points. Then, (1, x, x2 ) is a basis of A over k. Indeed, let V be the Vandermonde matrix     1 x x2 1 x0 x20 V =  1 σ(x) σ(x2 )  =  1 x1 x21  with xi = σ i (x). 1 σ 2 (x) σ 2 (x2 ) 1 x2 x22 Let ε = σ(x) − x. Then, det(V ) = (x1 − x0 )(x2 − x1 )(x2 − x0 ) is invertible:    det(V ) = σ(x) − x · σ σ(x) − x · σ 2 x − σ(x) = −εσ(ε)σ 2 (ε). For y ∈ A, we want to write y = λ0 + λ1 x + λ2 x2 with each λi ∈ k. We then necessarily have      y 1 x x2 λ0  σ(y)  =  1 σ(x) σ(x2 )   λ1  . σ 2 (y) 1 σ 2 (x) σ 2 (x2 ) λ2 However, the above system of linear equations has one and only one solution in A. Since the solution is unique, σ(λi ) = λi , i.e. λi ∈ k (i = 0, 1, 2). Finally, (1, x, x2 ) is indeed a k-basis of A. Galois correspondence, obvious facts This can be considered as a resumption of Proposition III -6.10. 7.1. Fact. (Galois correspondence, obvious facts) Consider a finite group G of automorphisms of a ring A. We use the notations defined in III -6.8. In particular, AH = FixA (H) for a subgroup H of G. Let k = AG . 0 1. If H ⊆ H 0 are two subgroups of G, then AH ⊇ AH , and if H is the H H1 H2 subgroup generated by H1 ∪ H2 , then A = A ∩ A . 2. H ⊆ Stp(AH ) for every subgroup H of G. 3. If σ ∈ G and H is a subgroup of G then −1 σ(AH ) = AσHσ . 4. If C ⊆ C0 are two k-subalgebras of A, then Stp(C) ⊇ Stp(C0 ), and if C is the k-subalgebra generated by C1 ∪ C2 , then Stp(C) = Stp(C1 ) ∩ Stp(C2 ). 5. C ⊆ AStp(C) for every k-subalgebra C of A. 6. After any “go-come-go motion,” we end up with the resulting set of the first “go”:  H AH = AStp(A ) and Stp(C) = Stp AStp(C) . J The last item is a direct consequence of the previous ones, which are immediate. Likewise for all the “dualities” of this type.  348 VI. Strictly finite algebras and Galois algebras A natural definition Let G = GG be the set of finite (i.e. detachable) subgroups of G, and A = AG be the set of subrings of A which are of the form Fix(H) for some H ∈ G. Consider the restrictions of Fix and Stp to the sets G and A. We are interested in determining under which conditions we thus obtain two inverse bijections between G and A, and in giving a nice characterization of subalgebras belonging to A. In the case where A is a discrete field, Artin’s theory shows that we find ourselves in the classical Galois situation: A is a Galois extension of the subfield k = AG , G is the Galois group of this extension and A is the set of all the strictly finite subextensions of A. This “Artin-Galois” theory has then been generalized to an arbitrary commutative ring A, where certain conditions are imposed on the group G and on the k-subalgebras of A. Actually, we want the corresponding notion of a Galois algebra to be sufficiently stable. In particular, when we replace k by a nontrivial quotient k/a and A by A/aA , we wish to maintain the notion of a Galois algebra. Therefore two automorphisms of A present in G must not be able to become a single automorphism upon passage to the quotient. This leads to the following definition. 7.2. Definition. (Well-separated maps, separating automorphisms, Galois algebras) 1. Two maps σ, σ 0 from a set E to a ring A are said to be well-separated if h σ(x) − σ 0 (x) ; x ∈ E iA = h1i . 2. An automorphism τ of A is said to be separating if it is well-separated from IdA . 3. A finite group G that operates on A is said to be separating if the elements σ 6= 1G of G are separating (it amounts to the same to say that every pair of distinct elements of G gives two well-separated automorphisms). We will also say that G operates in a separating way on A. 4. A Galois algebra is by definition a triple (k, A, G), where A is a ring, G is a finite group operating on A in a separating way, and k = Fix(G). Comments. 1) As for the definition of a Galois algebra, we did not want to forbid a finite group operating on the trivial ring, and consequently we do not define G as a group of automorphisms of A, but as a finite group operating on A.8 In fact, the definition implies that G always operates faithfully on A (and thus can be identified with a subgroup of Aut(A)) except in the case where 8 The unique automorphism of the trivial ring is separating, and every finite group operates on the trivial ring in order to make it a Galois algebra. 7. Galois algebras, general theory 349 the ring is trivial. This presents several advantages. On the one hand, a Galois algebra remains Galoisian, with the same group G, for every scalar extension; it is possible that we do not know if a scalar extension k → k0 , appearing in the middle of a proof, is trivial or not. On the other hand, the fact of not changing groups is more convenient for any scalar extension anyway. 2) We have imposed the condition k ⊆ A, which is not in the usual categorical style. The readers will be able to restore a more categorical definition, if they wish, by saying by saying that the morphism k → A establishes an isomorphism between k and AG . This will sometimes be necessary, for example in item 2 of Fact 7.3. Examples. 1) If L/K is a Galois extension of discrete fields, then the triple  K, L, Gal(L/K) is a Galois algebra. 2) We will show a little further (Theorem VII -4.10) that for a separable monic polynomial f ∈ k[T ], the triple (k, Aduk,f , Sn ) is a Galois algebra. 3) An automorphism σ of a local ring A is separating if and only if there exists some x ∈ A such that x − σ(x) is invertible. The notions of a separating automorphism and of a Galois algebra have been developed in order to satisfy the following fundamental facts. 7.3. Fact. 1. A separating automorphism σ of a ring A provides by scalar extension ρ : A → B a separating automorphism ρ? (σ) of B. 2. If (k, A, G) is a Galois algebra and if ρ : k → k0 is a ring homomorphism, then (k0 , ρ? (A), G) is a Galois algebra. J Item 1, as well as item 2 in the case of a scalar extension by localization, are easy and left to the reader. The proof of the general case for item 2 will have to wait until Theorem 7.13.  7.4. Concrete local-global principle. (Galois algebras) Let G be a finite group operating on a k-algebra A with k ⊆ A. Let S1 , . . ., Sn be comaximal monoids of k. Then, (k, A, G) is a Galois algebra if and only if each triple (kSi , ASi , G) is a Galois algebra. J The proof is left to the reader.  350 VI. Strictly finite algebras and Galois algebras Dedekind’s lemma Let A be a commutative ring. Consider the mth power A-algebra Am . Its elements will be ragarded as column vectors and the laws are the product laws           a1 b1 a1 ? b1 a1 aa1  ..   ..     .   .  ..  , a  ..  =  ..  .  . ? . = . am bm am ? bm am aam 7.5. Lemma. Let C be a finite subset of Am which “separates the rows”; i.e. hxi − xj ; x ∈ CiA = h1i (for i 6= j ∈ J1..mK). Then, the A-algebra generated by C is equal to Am . J The fundamental remark is that in the A-module generated by 1Am and x = t[ x1 · · · xm ] there are the vectors x − x2 1Am = t[ x1 − x2 0 ∗ · · · ∗ ] and −x + x1 1Am = t[ 0 x1 − x2 ∗ · · · ∗ ]. Therefore, when we suppose that the ideal generated by the x1 − x2 ’s contains 1, this implies that in the A-module generated by C there is a 1,2 vector g 1,2 of the type t[ 1 0 g31,2 · · · gm ] and a vector g 2,1 of the type 2,1 t 2,1 [ 0 1 g3 · · · gm ]. The general case is similar replacing 1 and 2 with two integers i 6= j ∈ J1..mK. We deduce that t[ 1 0 0 · · · 0 ] = g 1,2 · g 1,3 · · · g 1,m is in the A-algebra generated by C. Similarly, each vector of the canonical basis of Am will be in the A-algebra generated by C. We actually get that Am is the image of a matrix whose columns are the products of at most m columns in C.  7.6. Notations. (Context of Dedekind’s lemma) – A is a commutative ring. – (M, ·, 1) is a monoid. – τ = (τ1 , τ2 , . . . , τm ) is a list of m homomorphisms, pairwise wellseparated, of (M, ·, 1) in (A, ·, 1). – For z ∈ M we denote by τ (z) the element of Am defined by τ (z) = t[ τ1 (z) · · · τm (z) ]. 7.7. Theorem. (Dedekind’s lemma) Using the notations in 7.6 there exist y1 , . . . , yr ∈ M such that the matrix  [ τ (y1 ) | · · · | τ (yr ) ] = τi (yj ) i∈J1..mK,j∈J1..rK is surjective. Weak form. In particular, τ1 , . . . , τm are A-linearly independent. J This is deduced from Lemma 7.5 by noting that, since τ (xy) = τ (x)τ (y), the A-algebra generated by the τ (x) coincide with the A-module generated by the τ (x).  7. Galois algebras, general theory 351 Remarks.  1) Let F = τi (yj ) ij ∈ Am×r . The linear independence of the rows means that Dm (F ) is faithful, whereas the surjectivity of F means that Dm (F ) contains 1. Sometimes, Dedekind’s lemma is called “Artin’s theorem” or the “independence of characters lemma,” when one has in view the case where A is a discrete field. In fact, it is only when A is a zero-dimensional ring that we can deduce “Dm (F ) = h1i” from “Dm (F ) is faithful.” 2) The integer r can be controlled from the data in the problem. Artin’s theorem and first consequences 7.8. Definition and notation. Let A be a k-algebra with k ⊆ A. 1. We can equip the k-module Lk (A, A) with an A-module structure by the external law  (y, ϕ) 7→ x 7→ yϕ(x) , A × Lk (A, A) → Lk (A, A) . We then denote this A-module by Link (A, A). Let G = {σ1 = Id, σ2 , . . . , σn } be a finite group operating (by k-automorphisms) on A. Q 2. The A-linear map ιG : σ∈G A → Link (A, A) is defined by  P ιG (aσ )σ∈G = σ∈G aσ σ . Q 3. The k-linear map ψG : Aek → σ∈G A is defined by  ψG (a ⊗ b) = aσ(b) σ∈G . This is a homomorphism of A-algebras (on the left-hand side). 7.9. Fact. With the above notations, and the left-structure for the Amodule Aek , we have the following results. 1. Saying that ιG is an isomorphism means that Link (A, A) is a free A-module whose G is a basis. 2. If A is strictly étale of constant rank over k, saying that Aek is a free A-module of finite rank means that A diagonalizes itself. 3. Saying that ψG is an isomorphism means precisely the following. The A-module Aek is free of rank #G, with a basis B such that, after scalar extension from k to A, the linear map µA,a , which has become µAek ,1⊗a , is now diagonal over the basis B, with matrix  Diag σ1 (a), σ2 (a), . . . , σn (a) for any a ∈ A. 352 VI. Strictly finite algebras and Galois algebras 7.10. Lemma. Let G = {σ1 = Id, σ2 , . . . , σn } be a finite group operating on a ring A and let k = AG . For y ∈ A, let y ? be the element of A? defined by x 7→ TrG (xy). The following properties are equivalent. 1. (k, A, G) is a Galois algebra. 2. There exist x1 , . . . , xr , y1 , . . . , yr in A such that for every σ ∈ G we  have Xr 1 if σ = Id xi σ(yi ) = (10) i=1 0 otherwise . In this case we have the following results. Pr Pr 3. For z ∈ A, we have z = i=1 TrG (zyi ) xi = i=1 TrG (zxi ) yi . In other words, A is a finitely generated projective k-module and   (x1 , . . . , xr ), (y1? , . . . , yr? ) and (y1 , . . . , yr ), (x?1 , . . . , x?r ) are coordinate systems. 4. The form TrG : A → k is dualizing and surjective. P 5. For σ ∈ G, let εσ = i σ(xi ) ⊗ yi ∈ Aek . Then, (εσ )σ∈G is an A-basis “on the left-hand side” of Aek . In addition, for a, b ∈ A, We have P b ⊗ a = σ bσ(a)εσ , Q and the image of this basis (εσ )σ under ψG : Aek → τ ∈G A is the Q canonical A-basis (eσ )σ∈G of τ ∈G A. Consequently, ψG is an isomorphism of A-algebras. J 1 ⇒ 2. By Dedekind’s lemma, there exist an integer r and elements x1 , . . . , xr , y1 , . . . , yr ∈ A such that  σ1 (yi ) r  σ2 (yi ) X  xi  ..  . i=1 σn (yi )       =   1 0 .. .    ,  0 meaning, for σ ∈ G, precisely Equations (10).  Pr 2 ⇒ 1. For σ 6= Id, we have i=1 xi yi − σ(yi ) = 1, which proves that σ is separating. 3. For z ∈ A, we have the equalities Pr Pr Pn = i=1 TrG (zyi ) xi = i=1 j=1 σj (zyi )xi Pn Pr Pn j=1 σj (z) i=1 σj (yi )xi = σ1 (z) · 1 + j=2 σj (z) · 0 = z. 3 ⇒ 4. By item 1 of Theorem 5.2.  P 5. We have ψG (εσ ) = i σ(xi )τ (yi ) τ = eσ . Let us now show the equality with respect to b ⊗ a. Given the chosen A-module structure on the left-hand 7. Galois algebras, general theory 353 side, we can assume that b = 1. Then P P P P σ(a) i σ(xi ) ⊗ yi = i TrG (axi ) ⊗ yi σ σ(a)εσ = Pσ P = i 1 ⊗ TrG (axi )yi = 1 ⊗ i TrG (axi )yi = 1 ⊗ a. e This shows that (εσ )σ is a generator set Qof the A-module Ak . As its image under ψG is the canonical A-basis of τ ∈G A, this system is free over A. The rest follows from this.  Remark. Here is alternative proof of the surjectivity of the trace (item 4 ). Pan r For z = 1, 1 = i=1 ti xi with ti = TrG (yi ) ∈ TrG (A) ⊆ k. Let us introduce the “normic” polynomial N (T1 , . . . , Tr ):  Q  Pr N (T1 , . . . , Tr ) = NG i=1 Ti xi = σ∈G T1 σ(x1 ) + · · · + Tr σ(xr ) . It is a homogeneous polynomial ofPdegree n > 1, invariant under G, therefore with coefficients in k: N (T ) = |α|=n λα T α with λα ∈ k. Consequently, for u1 , . . . , ur ∈ k, we have N (u1 , . . . , ur ) ∈ ku1 + · · · + kur . In particular  Pr 1 = NG (1) = NG tx i=1 i i = N (t1 , . . . , tr ) ∈ kt1 + · · · + ktr ⊆ TrG (A). 7.11. Theorem. (Artin’s theorem, Galois algebras version) Let (k, A, G) be a Galois algebra (notations in 7.8). 1. The k-module A is projective of constant rank #G, and k is a direct summand in A. 2. There exist x1 , . . . , xr and y1 , . . . , yr such that for all σ, τ ∈ G we  have Xr 1 if σ = τ ∀σ, τ ∈ G τ (xi )σ(yi ) = (11) 0 otherwise. i=1 3. The form TrG is dualizing. Q 4. The map ψG : Aek → σ∈G A is an isomorphism of A-algebras. In particular, A diagonalizes itself. 5. a. CG (x)(T ) = CA/k (x)(T ), TrG = TrA/k and NG = NA/k , b. A is strictly étale over k. 6. If A is a discrete field, it is a Galois extension of k, and we have G = Gal(A/k ). J In this proof, for x ∈ A, we let Tr(x) = TrG (x), and x? is the k-linear form z 7→ Tr(zx). Lemma 7.10 proves items 1 (besides the rank question), 3 and 4. It also proves item 2, because (11) clearly results from (10). Note that k is a direct summand in A by item 3 of Lemma 4.3.9 Let us see that A is indeed of constant rank n. Item 4 shows that, after scalar extension from k to A, the k-module A becomes free of rank #G. 9 Or more directly, by the surjectivity of the trace (which results from Theorem 5.5 1. Indeed, let x0 ∈ A such that Tr(x0 ) = 1. We have A = k · 1 ⊕ Ker x?0 , because every y ∈ A can be written as y = x?0 (y) · 1 + (y − x?0 (y) · 1) with y − x?0 (y) · 1 ∈ Ker x?0 . 354 VI. Strictly finite algebras and Galois algebras Thus A is indeed of constant rank n over k; the rank polynomial of the k-module A “does not change” under the scalar extension k → A (injective), it is therefore itself equal to T n .10 5a (and so 5b) Since ψG is an isomorphism of A-algebras (item 4 ), A diagonalizes itself. We then deduce from Fact 7.9 item 3, the equality CG (x)(T ) = CA/k (x)(T ). This is true for the polynomials in A[T ], therefore also in k[T ]. 6. First of all, the ring k is zero-dimensional by Lemma IV -8.15. It is therefore a discrete field, because it is connected and reduced. The extension is étale. It is normal, because every x ∈ A annihilates CG (x)(T ), and this polynomial can be decomposed into a product of linear factors in A[T ].  Remark. The computation that follows can clarify things, despite it not being necessary. Note that by item 3 of Lemma 7.10, the k-module A is the image of the projection matrix   P = (pij )i,j∈J1..rK = yi? (xj ) i,j∈J1..rK = Tr(yi xj ) i,j∈J1..rK .  Pr 1 if σ = τ Also recall Equation (11): i=1 τ (xi )σ(yi ) = . 0 otherwise   Then let σ1 (x1 ) σ1 (x2 ) · · · σ1 (xr )  σ2 (x1 ) σ2 (x2 ) · · · σ2 (xr )    X =  and  .. .. ..   . . . σn (x1 ) σn (x2 ) · · · σn (xr )   σ1 (y1 ) σ1 (y2 ) · · · σ1 (yr )  σ2 (y1 ) σ2 (y2 ) · · · σ2 (yr )    Y =  . .. .. ..   . . . σn (y1 ) σn (y2 ) ··· σn (yr ) t By Equation (11), we have X Y = In and P = tY X. By Proposition V -2.11, this means that the k-module A, becomes free of rank n, with for basis the n rows of Y , after scalar extension from k to A. In other words, the A-module Aek , seen as an image of the matrix P “with coefficients in A” is a free A-submodule of rank n of Ar , and it is a direct summand. 10 Actually, its coefficients are transformed into “themselves,” viewed in A. 7. Galois algebras, general theory 355 7.12. Corollary. (Free Galois algebra) Let (k, A, G) be a free Galois algebra, and n = #G. If b = (b1 , . . . , bn ) in A, we define Mb ∈ Mn (A) by Mb = σi (bj ) i,j∈J1..nK . Then, for two systems b, b0 of n elements of A we obtain M b Mb0 = TrG (bi b0j )i,j∈J1..nK . t Consequently, we obtain the following results. • det(Mb )2 = disc(b1 , . . . , bn ). • The system (b1 , . . . , bn ) is a k-basis of A if and only if the matrix Mb is invertible. • In this case, if b0 is the dual basis of b with respect to the trace-valued bilinear form, then the matrices Mb and Mb0 are inverses of one another. Remark. In the situation where A is a discrete field, Dedekind’s lemma in its original form asserts that the “Dedekind matrix” Mb is invertible when (b) is a basis of A as a k-vector space. 7.13. Theorem. (Scalar extension for Galois algebras) Let (k, A, G) be a Galois algebra, ρ : k → k0 be an algebra and A0 = ρ? (A). 1. The group G operates naturally over A0 and (k0 , A0 , G) is a Galois algebra. 2. The “Galois theory” of (k0 , A0 , G) is deduced by scalar extension of that of (k, A, G), in the following sense: for each finite subgroup H of G, the natural homomorphism ρ? (AH ) → A0H is an isomorphism. J 1. We easily see that G acts on A0 in a separating way. It remains to show that k0 is the subring of G-invariant elements of A0 . Let Tr = TrG . We see Tr as a k-endomorphism of A, which by scalar extension gives the k0 -endomorphism Idk0 ⊗ Tr of A0 . Let y ∈ A0G . For z ∈ A0 , since y is G-invariant, we have the equality (Idk0 ⊗ Tr)(yz) = y (Idk0 ⊗ Tr)(z). By taking z0 = 1k0 ⊗ x0 , where x0 ∈ A satisfies Tr(x0 ) = 1, we obtain the desired membership y = (Idk0 ⊗ Tr)(yz0 ) ∈ k0 ⊗k k = k0 . 2. Results from item 1. Indeed, consider the Galois algebra (AH , A, H) and the scalar extension ϕ : AH → k0⊗k AH = ρ? (AH ). We obtain the equality ϕ? (A) = A0 . So ρ? (AH ), A0 , H is a Galois algebra and A0H = ρ? (AH ). In the following theorem, we could have expressed the hypothesis by saying that the finite group G operates over the ring A, and that k is a subring of AH . 356 VI. Strictly finite algebras and Galois algebras 7.14. Theorem. (Characterizations of Galois algebras) Let G be a finite group operating over a k-algebra A with k ⊆ A. The following properties are equivalent. 1. (k, A, G) is a Galois algebra (in particular, k = AG ). 2. k = AG , and there exist x1 , . . . , xr , y1 , . . . , yr in A such that we have for every σ ∈ G  Pr 1 if σ = Id i=1 xi σ(yi ) = 0 otherwise. 3. k = AG , A is finite over k, and for every finite generator set (aj )j∈J of A as a k-module, there exists a family (bj )j∈J in A such that we have for all σ, τ ∈ G  P 1 if σ = τ j∈J τ (aj )σ(bj ) = 0 otherwise. Q G e 4. k = A , and ψG : Ak → σ∈G A is an isomorphism of A-algebras. 5. A is strictly finite over k, and G is a basis of Link (A, A). J We have already seen 1 ⇔ 2 and 1 ⇒ 4 (Lemma 7.10). The implication 3 ⇒ 2 is clear. P 2 ⇒ 3. We express xi in terms of aj : xi = j uij aj with uij ∈ k. Then,  P P P P jσ i uij yi aj = j,i uij σ(yi )aj = i σ(yi )xi = δId,σ , P hence the result by taking bj = i uij yi . P 2 ⇒ 5. Let us first note that if ϕ ∈ Link (A, A) is written as ϕ = σ aσ σ, then by evaluating at yi , by multiplying by τ (xi ) and by summing over the i’s, we get P P i ϕ(yi )τ (xi ) = i,σ aσ σ(yi )τ (xi ) = aτ . This shows on the one hand that G is A-free. On the other P hand, this leads to believe that every ϕ ∈ Lin (A, A) is written as ϕ = k σ aσ σ with P P 0 aσ = ϕ(y )σ(x ). Let us verify this by evaluating ϕ := i i i σ aσ σ at x ∈ A, P P P 0 ϕ (x) = i,σ ϕ(yi )σ(xi )σ(x) = i TrG (xi x)ϕ(yi ) = ϕ( ? i TrG (xi x)yi ) = ϕ(x). 5 ⇒ 2. Since k ⊆ A, we have an inclusion A ,→ Link (A, A). Let us first show that AG ⊆ k (we will then have the equality). Each σ ∈ G is AG -linear so, since G generates Link (A, A) as an A-module, each element ϕ of Link (A, A) is AG -linear. In particular, each α ∈ A? is AG -linear. Let (xi ), (αi ) be a coordinate system of the k-module A. As A is a faithful k-module, by Proposition V -8.11, therePexists a family P P(zi ) in A such that 1 = i αi (zi ). Then, if x ∈ AG , x = i αi (zi )x = i αi (zi x) belonging to k. ? Let us then P show that for each α ∈ A , there exists a unique a ∈ A such that α = σ∈G σ(a)σ, i.e. such that α is the k-linear form x 7→ TrG (ax). 7. Galois algebras, general theory 357 P Since G is an A-basis of Link (A, A), we have α = σ aσ σ with aσ ∈ A. Let a = aId . By writing, for τ ∈ G, τ ◦ α = α, we obtain τ (aσ ) = aστ , P in particular aτ = τ (a), hence the desired equality α = σ∈G σ(a)σ. In passing, we have just proven that the k-linear map A → A? , a 7→ TrG (a•) is an isomorphism of k-modules. We can therefore define a system (yi ) by the equalities αi = TrG (yi •). Then, for x ∈ A we obtain  P P P P x = i αi (x)xi = i,σ σ(yi x)xi = σ i xi σ(yi ) σ(x),  P P i.e. Id = σ σ(yi ) σ. But as G is A-free, the expression of Id ∈ G i xiP is reduced to Id, so i xi σ(yi ) = 1 if σ = Id, 0 otherwise. P NB: Since i xi yi = 1, we have the equalities P P P P Tr(x) = i αi (xi x) = i,σ σ(xi yi )σ(x) = σ i σ(xi yi )σ(x) = TrG (x). P 4 ⇒ 2. Let z = i xi ⊗ yi be the element of Aek defined by: ψG (z) is Q the element of σ∈G A every component of which is null, except that of P index Id which is equal to 1. This means precisely that i xi σ(yi ) = 1 if σ = Id and 0 otherwise.  The case of free Galois algebras is described in the following corollary, which is an immediate consequence of the previous more general results. 7.15. Corollary. (Characterizations of free Galois algebras) Let G be a finite group operating on a k-algebra A with k ⊆ A. Assume that A is free over k, of rank n = |G|, with x = (x1 , . . . , xn ) as its basis. The following properties are equivalent. 1. (k, A, G) is a Galois algebra (in particular, k = AG ).  2. The matrix Mx = σi (xj ) i,j∈J1..nK is invertible (we have indexed the group G by J1..nK). 3. The form TrG is dualizing. 4. k = AG , and there exist y1 , . . . , yn in A such that we have for every  σ∈G Pn 1 if σ = Id i=1 xi σ(yi ) = 0 otherwise. 5. The group G is an A-basis of Link (A, A). Q 6. k = AG , and ψG : Aek → σ∈G A is an isomorphism of A-algebras. In this case we have the following results. 7. In items 4 and 3, • we obtain the yi ’s as the solution of Mx . t[ y1 · · · yn ] = t[ 1 0 · · · 0 ], where Mx is defined as in item 2, with σ1 = Id, • (y1? , . . . , yn? ) is the dual basis of (x1 , . . . , xn ). 358 VI. Strictly finite algebras and Galois algebras 8. Item 6 can be specified P as follows. For σ ∈ G, we let εσ = i σ(xi )⊗yi ∈ Aek . Then, (εσ )σ∈G is an A-basis for the left-structure of Aek . In addition, for a, b ∈ A, we have P b ⊗ a = σ bσ(a)εσ Q and the image of this basis (εσ )σ under ψG : Aek → τ ∈G A is the Q canonical A-basis (eσ )σ∈G of τ ∈G A. Finally, we underline the following items, in which we do not suppose that A is free over AG . • When A is a discrete field (historical background of Artin’s theorem), if a group G operates faithfully over A, the algebra (AG , A, G) is always Galoisian, AG is a discrete field and A is free of rank n over AG . • When A is a residually discrete local ring, the algebra (AG , A, G) is Galoisian if and only if G operates faithfully over the residual field A/ Rad A. In this case, AG is a residually discrete local ring and A is free of rank n over AG . Naturally, we strongly encourage the reader to give a more direct and shorter proof of the previous corollary. It is also possible to deduce the general results of the particular results stated in the case where A is a residually discrete local ring, which could themselves be deduced from the discrete fields case. 7.16. Theorem. (The Galois correspondence for a Galois algebra) Let (k, A, G) be a nontrivial Galois algebra, and H be a finite subgroup of G. 1. The triple (AH , A, H) is a Galois algebra, AH is strictly étale over k, of constant rank [AH : k] = | G : H |. 0 2. If H 0 ⊇ H is a finite subgroup of G, AH is strictly finite over AH , of 0 constant rank [AH : AH ] = | H 0 : H |. 3. We have H = Stp(AH ). 4. The map FixA restricted to the finite subgroups of G is injective. 5. If H is normal in G, (k, AH , G/H) is a Galois algebra. J 1. Since H is a separating group of automorphisms of A, (AH , A, H) is a Galois algebra. So A is a strictly finite AH -algebra of constant rank #H. Therefore AH is strictly finite over k, of constant rank equal to | G : H | (Theorem 4.5). In addition, it is strictly étale by Fact 5.7. 2. We apply Theorem 4.5. 3. The inclusion H ⊆ Stp(AH ) is obvious. Let σ ∈ Stp(AH ) and H 0 be 0 the subgroup generated by H and σ. We have | H 0 : H | = [AH : AH ], but 0 AH = AH , therefore H 0 = H and σ ∈ H. 4. Results from 3. 7. Galois algebras, general theory 359 5. First of all, for σ ∈ G, we have σ(AH ) = AH . If we let σ be the restriction of σ to AH , we obtain a morphism of groups G → Autk (AH ), σ 7→ σ, whose kernel is H by item 3. The quotient group G/H is therefore realized as a subgroup of Autk (AH ). Let x ∈ A satisfy TrH (x) = 1, (a1 , . . . , ar ) be a generator set of A as a k-module, and b1 , . . . , b r be some elements such that for all σ, τ ∈ G we Pr 1 if σ = τ have i=1 τ (ai )σ(bi ) = . We then define, for i ∈ J1..rK, the 0 otherwise. elements of AH , a0i = TrH (xai ), and b0i = TrH (bi ). We easily verify that for σ ∈ G we have  Pr 1 if σ ∈ H 0 0 i=1 ai σ(bi ) = 0 otherwise. Thus, when applying item 2 of Theorem 7.14, (k, AH , G/H) is a Galois algebra.  Theorem 7.16 above establishes the Galois correspondence between finite subgroups of G on the one hand and “certain” strictly étale k-subalgebras of A on the other. An exact bijective correspondence will be established in the following subsection when A is connected. However, beforehand we give a few additional results. 7.17. Proposition. Let (k, A, G) be a Galois algebra and H be a finite subgroup of G. 1. A diagonalizes AH . 2. For b ∈ AH , the characteristic polynomial of b (over k, in AH ) is given  Q by CAH/k (b)(T ) = σ∈G/H T − σ(b) (the subscript σ ∈ G/H means that we take exactly one σ from each left coset of H, and we note that σ(b) does not depend on the chosen representative σ). Q J Recall that A diagonalizes itself, as the isomorphism ψG : Aek → σ∈G A shows. We consider this product as the algebra of functions F(G, A). It is provided with a natural action of G on the left-hand side as follows σ ∈ G, w ∈ F(G, A) : σ · w ∈ F(G, A) defined by τ 7→ w(τ σ). Similarly G acts on the left-hand side over the A-algebra Aek = A ⊗k A via Id ⊗ G. We then verify that ψG is a G-morphism, i.e. that for τ ∈ G, the following diagram commutes. Q ψG / F(G, A) = A ⊗k A σ∈G A w7→τ ·w Id⊗τ  A ⊗k A ψG  / F(G, A) = Q σ∈G A 360 VI. Strictly finite algebras and Galois algebras 1. Consider the commutative diagram A ⊗k AH  A ⊗k A ϕH ψG ∼ / F(G/H, A) = Q σ∈G/H A  / F(G, A) = Q σ∈G A On the right-hand side, the vertical arrow is injective, and it identifies F(G/H, A) with the subset F(G, A)H of F(G, A) (constant functions over the left cosets of H in G). On the left, the vertical arrow (corresponding to the injection AH ,→ A) is also an injection because AH is a direct summand in A viewed as an AH -module. Finally, ϕH is defined by a ⊗ b 7→ aσ(b) σ∈G/H . Then, ϕH is an isomorphism of A-algebras. Indeed, ϕH is injective, and for the surjectivity, it suffices to see that (A ⊗k A)Id⊗H = A ⊗k AH . This is given by Theorem 7.13 for the Galois algebra (AH , A, H) and the scalar extension AH ,→ A. 2. This results from item 1 and from the following lemma.  7.18. Lemma. Let A and B be two k-algebras where B is strictly finite of constant rank n. Assume that A diagonalizes B by means of an isomorphism ψ : A ⊗k B −→ An given by “coordinates” denoted by ψi : B → A. Then, for b ∈ B, we have an equality  Qn CB/k (b)(T ) = i=1 T − ψi (b) , if we transform the left-hand side (which is an element of k[T ]) into an element of A[T ] via k → A. J Immediate by the computation of the characteristic polynomial of an element in a diagonal algebra.  The Galois correspondence when A is connected The reader is invited to revisit Lemma 6.17. 7.19. Theorem. If (k, A, G) is a nontrivial Galois algebra and if A is connected, the Galois correspondence establishes a decreasing bijection between • on the one hand, the set of detachable subgroups of G, • and on the other hand, the set of k-subalgebras of A which are separable. The latter set is also that of the subalgebras of A which are strictly étale over k. 7. Galois algebras, general theory 361 J Let k ⊆ A0 ⊆ A with A0 separable. By letting H = Stp(A0 ), we must show that A0 = AH . We of course have A0 ⊆ AH . Q Consider the product A-algebra C = σ∈G A ' An with n = #G.  Let pσ : C → A be the projection defined by pσ (aτ )τ = aσ . Recall the  isomorphism of A-algebras ψG : A ⊗k A → C, a ⊗ b 7→ aσ(b) σ∈G . Since A is a finitely generated projective k-module, the canonical morphism A ⊗k A0 → A ⊗k A is injective. By composing it with ψG , we obtain an injective morphism of A-algebras A ⊗k A0 → C. In the above notation, we will identify A ⊗k A0 with its image B in C ' An . Since A0 is a separable k-algebra, B is a separable A-algebra. We can therefore apply Lemma 6.17. If we denote by πσ the restriction of pσ to B, we must identify the equivalent relation over  G defined by πσ = πσ0 . For a0 ∈ A0 , 1 ⊗ a0 corresponds by ψG to τ (a0 ) τ , so πσ (1 ⊗ a0 ) = σ(a0 ). Consequently, πσ = πσ0 if and only if σ and σ 0 coincide over A0 or, by definition of H, if and only if σ −1 σ 0 ∈ H, i.e. σH = σ 0 H. We deduce that the equivalence classes are the left cosets of H in G. With the notations of L Lemma 6.17, we therefore have B = J AeJ , where J describes G/H. By using the A-basis (eJ )J of B, we then see that B = CH . It remains to “return” to A. Via the inverse image under ψG , we have (A ⊗k A)Id⊗H = A ⊗k A0 . In particular, A ⊗k AH ⊆ A ⊗k A0 . By applying TrG ⊗IdA to this inclusion and by using the fact that TrG : A → k is surjective, we obtain the inclusion k ⊗k AH ⊆ k ⊗k A0 , i.e. AH ⊆ A0 . H 0 Thus A = A , as required. Finally, since the k-algebras AH are strictly étale and the strictly étale algebras are separable, it is clear that the separable k-subalgebras of A coincide with the strictly étale k-subalgebras.  Remark. The theory of Galois algebras does not really require the use of separable algebras, even for the previous theorem that we can state with only strictly étale subalgebras of A. For a proof of the theorem without using separable algebras, see Exercises 18 and 19. Nevertheless the theory of separable algebras, noteworthy in itself, sheds an interesting light on the Galois algebras. Quotients of Galois algebras 7.20. Proposition. (Quotient of a Galois algebra by an invariant ideal) Let (k, C, G) be a Galois algebra, c be a G-invariant ideal of C and a = c∩k. 1. The triple (k/a , C/c , G) is a Galois algebra. 362 VI. Strictly finite algebras and Galois algebras 2. This Galois algebra is naturally isomorphic to that obtained from (k, C, G) by means of the scalar extension k → k/a . J 1. The group G operates on C/c because c is (globally) invariant. Let us show that the natural injective homomorphism k/a → (C/c )G is surjective. If x ∈ C is G-invariant modulo c, we must find an element of k equal to x modulo c. Consider x0 ∈ C satisfying TrG (x0 ) = 1; then TrG (xx0 ) satisfies: P P x = σ∈G xσ(x0 ) ≡ σ∈G σ(x)σ(x0 ) = TrG (xx0 ) mod c . Thus (C/c )G = k/a . Finally, it is clear that G operates in a separating way over C/c . 2. The scalar extension k → k/a gives (k/a , C/aC , G) (Galois algebra), with aC ⊆ c. We must verify that c = aC. The projection π : C/aC → C/c is a k/a -linear surjective map between projective modules, so C/aC ' C/c ⊕ Ker π. As the two modules have the same constant rank #G, the rank polynomial of Ker π is equal to 1, therefore Ker π = 0 (Theorem V -8.4).  In the definition that follows, we do not need to suppose that (k, C, G) is a Galois algebra. 7.21. Definition. Let G be a finite group that operates on a k-algebra C. 1. An idempotent of C is said to be Galoisian if its orbit under G is a fundamental system of orthogonal idempotents (this requires that this orbit is a finite set, or, equivalently, that the subgroup StG (e) is detachable). 2. An ideal of C is said to be Galoisian when it is generated by the complementary idempotent of a Galoisian idempotent e. 3. In this case, the group StG (e) operates on the algebra C[1/e] ' C/h1 − ei, and k, C[1/e], StG (e) is called a Galois quotient of (k, C, G). 7.22. Fact. With the hypotheses of Definition 7.21, if {e1 , . . . , er } is the Qr orbit of e, the natural k-linear map C → i=1 C[1/ei ] is an isomorphism of k-algebras. Moreover, the StG (ei )’s are pairwise conjugated by elements of G that permute the k-algebras C[1/ei ] (they are therefore pairwise isomorphic). In particular C ' C[1/e]r . 7.23. Theorem. (Galois quotients of Galois algebras) Every Galois quotient of a Galois algebra is a Galois algebra. J See Theorem VII -4.3 (Galois quotients of pre-Galois algebras).  Exercises and problems 363 Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Prove Theorem 3.9 (page 317). • Prove Fact 3.11 (page 318). • Prove the local-global principle 7.4 for Galois algebras. • Verify Fact 7.9 (page 351). Exercise 2. Give a detailed proof of item 2 of Theorem 1.9. Exercise 3. Consider the product A-algebra B = An . 1. Under what condition does some x ∈ B satisfy B = A[x]? In this case, prove that (1, x, . . . , xn−1 ) is an A-basis of B. 2. If A is a discrete field, under what condition does B admit a primitive element? Exercise 4. Let K be a nontrivial discrete field, B be a reduced strictly finite K-algebra and v be an indeterminate. def Consider the L-algebra B(v) = K(v) ⊗K B. Prove the following results. 1. B(v) is strictly finite over K(v). 2. If B is étale over K, B(v) is étale over K(v). 3. Every idempotent of B(v) is in fact in B. Exercise 5. If K is a separably factorial discrete field, so is K(v), where v is an indeterminate. NB: we do not assume that K is finite or infinite. √ √ √ Exercise 6. (The rings of integers of the extension Q( a) ⊂ Q( a, 2)) Let K ⊆ L be two number fields and A ⊆ B be their rings of integers; here we give an elementary example where B is not a free A-module. √ 1. Let d ∈ Z be squarefree. Determine the ring of integers of Q( d). √ √ Let a ∈ Z squarefree with a ≡ 3 mod 4. Let K = Q( a), L = K( 2), √ 1+√a √  and β = 2 2 . We define σ ∈ Aut(L/K) and τ ∈ Aut L/Q( 2) , by √ √ √ √ σ( 2) = − 2 and τ ( a) = − a. 2. Verify that β ∈ B and compute (στ )(β). √ √ 3. We want to show that (1, 2, a, β) (which is a Q-basis of L) is a Z-basis of B. √ √ Let z = r + s 2 + t a + uβ ∈ B with r, s, t, u ∈ Q. Considering (στ )(z), show that u ∈ Z then that r, s, t ∈ Z. 4. Express B as a finitely generated projective A-module. Verify that it is isomorphic to its dual. 364 VI. Strictly finite algebras and Galois algebras Exercise 7. (Discriminant of the tensor product) Let A, A0 be two free k-algebras of ranks n, n0 , (x) = (xi ) be a family of n elements of A, (x0 ) = (x0j ) be a family of n0 elements of A0 . Let B = A ⊗k A0 and (x ⊗ x0 ) be the family (xi ⊗ x0j ) of nn0 elements of B. Prove the equality 0 DiscB/k (x ⊗ x0 ) = DiscA/k (x)n DiscA0/k (x0 )n . Exercise 8. (Normal basis of a cyclic extension) Let L be a discrete field, σ ∈ Aut(L) of order n and K = Lσ be the field of invari ants under σ. Prove that there exists an x ∈ L such that x, σ(x), · · · , σ n−1 (x) is a K-basis of L; we then speak of a normal basis of L/K (defined by x). Exercise 9. (Homography of order 3 and universal equation with Galois group A3 ) We denote by An the subgroup of even permutations of Sn . Let L = k(t) where k is a discrete field and t is indeterminate.  1. Check that A = of this matrix. 0 1 −1 1  is of order 3 in PGL2 (k) and explain the origin  We denote by σ ∈ Autk k(t) the automorphism of order 3 associated with A −1 )), and G = hσi. (see Problem 1, we have σ(f ) = f ( t+1 2. Compute g = TrG (t) and show that k(t)G = k(g). 3. Let a be an indeterminate over k and fa (T ) = T 3 −aT 2 −(a+3)T −1 ∈ k(a)[T ]. Prove that fa is irreducible, with Galois group A3 . 4. Prove that the polynomial fa (X) is a “generic polynomial with Galois group A3 ” in the following sense: if L/K is a Galois extension with Galois group A3 (L being a discrete field), there exists a primitive element of L/K whose minimal polynomial is fα (X) for some value of α ∈ K. Exercise 10. (Algebra of a finite commutative group) Let k be a commutative ring, G be a commutative group of order n and A = k[G] be the algebra of the group G, i.e. A admits G as a k-basis and the product in A of two elements of G is their product in G.11 1. Determine Ann(JA/k ), its image under µA/k and the trace form over A. 2. Prove that the following properties are equivalent. • n is invertible in k. • A is strictly étale. • A is separable. 3. Prove that k[G] is a Frobenius algebra. 11 The definition works also for the algebra k[M ] of a monoid M . Exercises and problems 365 Exercise 11. (A finite monogenic algebra is a Frobenius algebra) Let f = X n + an−1 X n−1 + · · · + a0 ∈ k[X] and A = k[X]/hf i = k[x]. Consider the linear form λ : A → k defined by xn−1 7→ 1 and xi 7→ 0 for i < n − 1. We will show that λ is dualizing and that TrA/k = f 0 (x)  λ. To that effect, we append an indeterminate Y . The system (1, x, . . . , xn−1 ) is a basis of A[Y ]/k[Y ] . Let e λ : A[Y ] → k[Y ] be the extension of λ and define the k[Y ]-linear map ϕ : A[Y ] → k[Y ], by ϕ(xi ) = Y i for i ∈ J0..n − 1K. 1. Prove that ∀g ∈ A[Y ], f (Y )e λ(g) = ϕ (Y − x)g  (∗) 2. We define the (triangular Horner) basis (b0 , . . . , bn−1 ) of A/k by b0 = xn−1 + an−1 xn−2 + · · · + a2 x + a1 , b1 = xn−2 + an−1 xn−3 + · · · + a3 x + a2 , and so on: bi = xn−i−1 + · · · + ai+1 and bn−1 = 1. We have f 0 (Y ) = f (Y ) − f (x) f (Y ) = = bn−1 Y n−1 + · · · + b1 Y + b0 . Y −x Y −x Applying Equality (∗) to gi = xi f 0 (Y ), show that (b0  λ, . . . , bn−1  λ) is the dual basis of (1, x, . . . , xn−1 ). Conclude the result. 3. Prove that TrA/k = f 0 (x)  λ. Exercise 12. (Frobenius algebras: elementary examples and counterexamples) Throughout the exercise, k is a commutative ring. 1. Let f1 , . . . , fn ∈ k[T ] be monic polynomials. Prove that the quotient k-algebra k[X1 , . . . , Xn ]/hf1 (X1 ), . . . , fn (Xn )i is Frobenius and free of finite rank. 2. Let A = k[X, Y ] hX, Y i2 = k[x, y]. Describe A? as a finitely presented A-module. Deduce that A is not a Frobenius algebra.  3. Consider the analogous question to the previous one with A = k[X, Y ]/hX, Y in  for n > 2 and B = k[X, Y ] X 2 , XY n+1 , Y n+2 for n > 0. Exercise 13. (The ideal JA/k for a monogenic k-algebra A) Let A = k[x] be a monogenic k-algebra and Aek = A ⊗k A be its enveloping algebra. Let y = x ⊗ 1, z = 1 ⊗ x, such that Aek = k[y, z]. We know that JA/k = hy − zi. Suppose f (x) = 0 for some f ∈ k[X] (not necessarily monic)  and consider the symmetric polynomial f ∆ (Y, Z) = f (Y ) − f (Z) /(Y − Z). It satisfies the equality f ∆ (X, X) = f 0 (X). 1. Let δ = f ∆ (y, z). Prove that δ ∈ Ann(JA/k ) and that δ 2 = f 0 (y)δ = f 0 (z)δ. 2. Suppose that 1 ∈ hf, f 0 i. 2a. Prove that A is separable: make the separability idempotent explicit. 2b. Prove that JA/k = f ∆ (y, z) and that f ∆ (y, z) = f 0 (y)εA/k = f 0 (z)εA/k . Remark. A is not necessarily strictly finite. 366 VI. Strictly finite algebras and Galois algebras Exercise 14. (Complete intersection, Jacobian, Bézoutian and separability) In this exercise, the number of indeterminates is equal to the number of polynomials. We define the Bézoutian of (f1 , . . . , fn ) where each fi ∈ k[X] = k[X1 , . . . , Xn ] by βY ,Z (f ) = det BZY ,Z (f ), so that βX,X (f ) = JacX (f ). We denote by A = k[x1 , . . . , xn ] a finitely generated k-algebra and Aek = k[y, z] its enveloping algebra. Suppose that fi (x) = 0 for all i. 1. In the case where Jacx (f1 , . . . , fn ) ∈ A× , provide a direct proof of the fact that A is a separable algebra. 2. We define in Aek ε = Jacy (f )−1 βy,z (f ) = βy,z (f ) Jacz (f )−1 . Verify that βy,z (f ) and ε are generators of Ann(JA/k ) and that ε is the separability idempotent of A. 3. Give examples. Exercise 15. (Separation of morphisms over a separable algebra) Let k be a commutative ring and A, B be two k-algebras with A separable. For any arbitrary function f : A → B, we define AnnB (f ) = AnnB hf (A)i. 1. Prove that to every morphism ϕ ∈ Homk (A, B) is attached a pair of finite families (ai )i∈I , (bi )i∈I , with ai ∈ A, bi ∈ B, satisfying the following properties: • P • P i i bi ϕ(ai ) = 1 ϕ(a)bi ⊗ ai = P i bi ⊗ aai for every a ∈ A. 2. If the pair of families (a0j )j , (b0j )j is attached to the morphism ϕ0 ∈ Homk (A, B), show that P P b ϕ0 (ai ) = j b0j ϕ(a0j ), i i and that the latter element, denoted by e, is an idempotent of B having the following property of “separation of morphisms” AnnB (ϕ − ϕ0 ) = heiB , hIm(ϕ − ϕ0 )iB = h1 − eiB . 3. Let ϕ1 , . . . , ϕn ∈ Homk (A, B) and, for i, j ∈ J1..nK, eij = eji be the idempotent defined by AnnB (ϕi − ϕj ) = heij iB ; in particular, eii = 1. We say that a matrix A ∈ Mn,m (B) is a Dedekind evaluation matrix for the n morphisms ϕ1 , . . . , ϕn if each column of A is of the form t[ ϕ1 (a) · · · ϕn (a) ] for some a ∈ A (depending on the column). Prove the existence of a Dedekind evaluation matrix whose image contains the vectors t[ e1i · · · eni ]. In particular, if AnnB (ϕi − ϕj ) = 0 for i 6= j, such a matrix is surjective. Exercise 16. (Another proof of Artin’s theorem, item 2) The context is that of Theorem 7.11: (k, A, G) is a Galois algebra and we want to show the existence of a1 , . . . , ar , b1 , . . . , br ∈ A such that for every σ ∈ G Exercises and problems we have 367 Pr i=1  ai σ(bi ) = 1 if σ = Id 0 otherwise. For τ ∈ G, τ = 6 Id, show that there exist mτ and x1,τ , . . . , xmτ ,τ , y1,τ , . . . , ymτ ,τ in A such that Pmτ Pmτ x τ (yj,τ ) = 0, x y = 1. j=1 j,τ j=1 j,τ j,τ Conclude the result. Exercise 17. (Galois algebras: a few elementary examples) Let (e1 , . . . , en ) be the canonical basis of kn . We make Sn act on kn by permutation of the coordinates: σ(ei ) = eσ(i) for σ ∈ Sn . 1. Let G ⊂ Sn be a transitive subgroup of cardinality n. a. Prove that (k, kn , G) is a Galois algebra. b. Give examples. 2. Let B = k(e1 + e2 ) ⊕ k(e3 + e4 ) ⊂ k4 and G = h(1, 2, 3, 4)i. Determine StpS4 (B) and H = StpG (B). Do we have B = (k4 )H ? 3. Let (k, A, G) be a Galois algebra. The group G operates naturally on A[X]. a. Prove that (k[X], A[X], G) is a Galois algebra. b. Let B = XA[X] + k (B therefore consists of the polynomials of A[X] whose constant coefficient is in k). Then, B is a k-subalgebra of A[X] which is not of the form A[X]H except in a special case. Exercise 18. Let k ⊆ B ⊆ C with B strictly étale over k and C strictly finite over k. Suppose that rkk (B) = rkk (C) (i.e. C and B have the same rank polynomial over k). Then prove that B = C. Exercise 19. Base yourself on Exercise 18 and prove the Galois correspondence (Theorem 7.19) between the finite subgroups of G and the strictly étale k-subalgebras of A when A is connected. Exercise 20. (Galois algebras: globally invariant ideals) Let (A, B, G) be a Galois algebra. We say that an ideal c of B is globally invariant if σ(c) = c for every σ ∈ G. 1. Prove that c is generated by invariant elements, i.e. by elements of A. 2. More precisely, consider the two transformations between ideals of A and ideals of B: a 7→ aB and c 7→ c ∩ A. Prove that they establish a non-decreasing bijective correspondence between ideals of A and globally invariant ideals of B. Problem 1. (Lüroth’s theorem) Let L = k(t) where k is a discrete field and t an indeterminate. If g = u/v ∈ L is a nonconstant irreducible fraction (u, v ∈ k[t], coprime), we define the height of g def  (with respect to t) by heightt (g) = max degt (u), degt (v) . 368 VI. Strictly finite algebras and Galois algebras 1. (Direct part of Lüroth’s theorem) Let K = k(g) ⊆ L. Prove that L/K is an algebraic extension of degree d = height(g). More precisely, t is algebraic over K and its minimal polynomial is, up to multiplicative factor in K× , equal to u(T ) − gv(T ). Thus, every nonconstant coefficient of MinK,t (T ), a ∈ K = k(g) is of the form a = αg+β with αδ − βγ ∈ k× , and k(a) = k(g). γg+δ 2. Let f ∈ L be an arbitrary element. Give an explicit formula using the resultants to express f as a K-linear combination of (1, t, . . . , td−1 ). 3. If h is another element of L \ k show that  height g(h) = height(g)height(h). Prove that every k-algebra homomorphism L → L is of the form f 7→ f (h) for some h ∈ L \ k. Deduce a precise description of Autk (L) by means of fractions of height 1. 4. We denote by PGLn (A) the quotient group GLn (A)/A× (where A× is identified with the subgroup of invertible homotheties via a 7→ aIn ). To a matrix  A= a c b d  ∈ GL2 (A), we associate the A-automorphism12 ϕA : A(t) → A(t), t 7→ at+b . ct+d We have ϕA ◦ ϕB = ϕBA and ϕA = Id ⇔ A = λI2 (λ ∈ A× ). Thus A 7→ ϕA  defines an injective homomorphism PGL2 (A)op → AutA A(t) . Prove that in the discrete field case we obtain an isomorphism. 5. (Converse part of Lüroth’s theorem) Let g1 , . . . , gr ∈ L \ k. Prove that k(g1 , . . . , gr ) = k(g) for a suitable g. It suffices to treat the n = 2 case. We show that L is strictly finite over K1 = k(g1 , g2 ). We must then have K1 = k(g) for any nonconstant coefficient g of MinK1 ,t (T ). NB: Since L is a finite dimensional k(g1 )-vector space, every subfield of L strictly containing k is, in classical mathematics, finitely generated, therefore of the form k(g). Our formulation of the converse part of Lüroth’s theorem give the constructive meaning of this assertion. Problem 2. (Differential operators and Frobenius algebras) In the first questions, k is a commutative ring. The Hasse derivative of order 1 f (m) . Similarly, for m of a polynomial of k[X] is formally defined by f [m] = m! n [α] α ∈ N , we define ∂ over k[X] = k[X1 , . . . , Xn ] by ∂ [α] f = 1 ∂αf α! ∂X α We then have ∂ [α] (f g) = with P β+γ=α α! = α1 ! · · · αn !, ∂ [β] (f ) ∂ [γ] (g). We denote by δ [α] : k[X] → k the linear form f 7→ ∂ [α] (f )(0). Thus, f = 12 We f ∈ k[X]. P α δ [α] (f )X α . We deduce, by letting denote by A(t) the Nagata ring of A which is obtained from A[t] by inverting the primitive polynomials. Exercises and problems 369 α 6 β for X α | X β , X α  δ [β] = Let g = P β  δ [β−α] if α 6 β 0 otherwise, ∂ [α] (X β ) =  X β−α if α 6 β 0 otherwise. bβ X β . Evaluating the differential polynomial obtain a linear form δg : k[X] → k, δg = P β P β bβ ∂ [β] at (0) , we bβ δ [β] , then an ideal ag of k[X] def ag = { f ∈ k[X] | f  δg = 0 } = { f ∈ k[X] | δg (f u) = 0 ∀u ∈ k[X] } . We thus obtain a Frobenius k-algebra k[X]/ag (with δg dualizing). 1. Let f = P α aα X α , g = P β bβ X β . We let ∂f : k[X] → k[X] be the differential a ∂ [α] . Check the following relation operator associated with f , i.e. ∂f = α α between the operator ∂f and the linear form δg P P γ (f  δg )(X γ )X γ = ∂f (g) = P α6β aα bβ X β−α . Deduce that f  δg = 0 ⇐⇒ ∂f (g) = 0. Now we must note that the law f ∗ g = ∂f (g) provides the additive group k[X] with a k[X]-module structure (in particular because ∂f1 f2 = ∂f1 ◦ ∂f2 ). But as X α ∗ X β = X β−α or 0, certain authors use X −α instead of X α ; they provide k[X] with a k[X −1 ]-module structure. Other authors permute X and X −1 ; they provide k[X −1 ] with a k[X]-module structure such that the ideal ag (annihilator of g ∈ k[X −1 ]) is an ideal of a polynomial ring with indeterminates with exponents > 0. In the latter formalism, a polynomial f with indeterminates with exponents > 0 therefore acts on a polynomial g having its indeterminates with exponents 6 0 to provide a polynomial f ∗ g having indeterminates with exponents 6 0 (by deleting the monomials containing an exponent > 0). Thus, if g = X −2 + Y −2 + Z −2 , the ideal ag of k[X, Y, Z] contains for example XY , X 2 − Y 2 and every homogeneous polynomial of degree > 3. 2. Let d > 1. Study the special case of the Newton sum g = δg : f 7→ P 1 ∂df (0), i d! ∂X d i P i Xi−d , i.e. the sum of the coefficients over X1d , . . . , Xnd . In the remainder, we fix g = P β bβ X β , or according to taste, g = P β bβ X −β . 3. Prove that we have an inclusion b ⊆ ag for some ideal b = hX1e1 , · · · , Xnen i with integers ei > 1. In particular, k[X]/b is a free k-module of finite rank and k[X]/ag is a finitely generated k-module. 4. Define a k-linear map ϕ : k[X]/b → k[X] such that Ker ϕ = ag /b . We can therefore compute ag if we know how to solve linear systems over k. 5. Suppose that k is a discrete field and so A := k[X]/ag is a finite dimensional k-vector space. Prove that (A, δg ) is a Frobenius k-algebra. Problem 3. (Hilbert’s theorem 90, additive version) Let (k, A, G) be a Galois algebra where G = hσi is cyclic of order n. 370 VI. Strictly finite algebras and Galois algebras 1. Considering an element z ∈ A of trace 1, we will show that A = Im(IdA − σ) ⊕ kz, Im(IdA − σ) = Ker TrG . Consequently Im(IdA − σ) is a stably free k-module of rank n − 1. You can use the family of endomorphisms (ci )i∈J0..nK , c0 = 0, c1 (x) = x, c2 (x) = x + σ(x), . . . , ci (x) = Pi−1 j=0 σ j (x), . . . 2. For x ∈ A prove that to be of the form y − σ(y), it is necessary and sufficient that TrG (x) = 0. 3. More generally, let (cτ )τ ∈G be a family in A. Prove that there exists an element y such that cτ = y − τ (y) if and only if the family satisfies the following additive cocycle condition: for all τ1 , τ2 ∈ G: cτ1 τ2 = τ1 (cτ2 ) + cτ1 . 4. Assume that n is a prime number p and that p = 0 in k. Prove the existence of some y ∈ A such that σ(y) = y + 1. Deduce that (1, y, . . . , y p−1 ) is a k-basis of A and that the characteristic polynomial of y is of the form Y p − Y − λ with λ ∈ k. We therefore have A = k[y] ' k[Y ]/hY p − Y − λi (Artin-Schreier extension). 5. Give a converse of the previous item. Problem 4. (Galois algebras: study of an example) Consider a ring B in which 2 is invertible, with x, y ∈ B and σ ∈ Aut(B) of order 2 satisfying x2 + y 2 = 1, σ(x) = −x and σ(y) = −y. We can take as an example the ring B of continuous functions over the unit circle x2 + y 2 = 1 and for σ the involution f 7→ {(x, y) 7→ f (−x, −y)}. Let A = Bhσi (subring of the “even functions”). 1. Prove that (A, B, hσi) is a Galois algebra. Consequently, B is a projective A-module of constant rank 2. 2. Let E = Ax + Ay (submodule of the “odd functions”). Check that B = A ⊕ E and that E is a projective A-module of constant rank 1. 3. Let x1 = 1, x2 = x, x3 = y such that (x1 , x2 , x3 ) is a generator set of the A-module B. Make y1 , y2 , y3 ∈ B explicit as in Lemma 7.10, i.e. (xi )i∈J1..3K , (yi )i∈J1..3K is a trace system of coordinates. Deduce a projection matrix P ∈ M3 (A) of rank 2 with B 'A Im P .  4. Let R = x −y y x  ∈ SL2 (B). Prove that this “rotation” R induces an isomorphism of A-modules between E 2 and A2  f g   7→ R f g   = xf − yg yf + xg  . Consequently (next question), E ⊗A E ' A; verify that f ⊗ g 7→ f g realizes an isomorphism of A-modules of E ⊗A E over A. 5. For some A-module M (A arbitrary), let M 2⊗ = M ⊗A M, M 3⊗ = M ⊗A M ⊗A M, etc . . . Let E be an A-module satisfying E n ' An for some n > 1. Prove that E is a projective A-module of constant rank 1 and that E n⊗ ' A. Solutions of selected exercises 371 6. Let a be the ideal of A defined by a = xy, x2 . Check that a2 = x2 A (so if x is regular, a is an invertible ideal of A), that aB is principal and finally, that a, regarded as an A-submodule of B, is equal to xE. 7. Let k be a nontrivial ring with 2 ∈ k× and B = k[X, Y ] X 2 + Y 2 − 1 . We write B = k[x, y]. We can apply the above by taking σ as defined by σ(x) = −x and σ(y) = −y. Suppose that α2 + β 2 = 0 ⇒ α = β = 0 in k (for example if k is a discrete field and −1 is not a square in k).  a. Prove that B× = k× ; illustrate the importance of the hypothesis “of reality” made about k. b. Prove that a is not principal and so E is not a free A-module. Deduce that B is not a free A-module. 8. Let B be the ring of (real) continuous functions over the unit circle x2 + y 2 = 1 and σ the involution f 7→ {(x, y) 7→ f (−x, −y)}. Prove that a is not principal and that B is not a free A-module. Some solutions, or sketches of solutions Exercise 2. We have B = K[x1 , . . . , xn ], with [ B : K ] = m. We will perform a computation that shows that the K-algebra B is monogenic or contains an idempotent e 6= 0, 1. In the second case, B ' B1 × B2 , with [ Bi : K ] = mi < m, m1 + m2 = m, which allows us to conclude by induction on m. If we are able to treat the n = 2 case, we are done, because K[x1 , x2 ] is étale over K, so either we replace K[x1 , x2 ] with K[y] for some y, or we find an idempotent e 6= 0, 1 within it. The proof of item 1 of Theorem 1.9 shows that an étale K-algebra K[x, z] is monogenic if K contains an infinite sequence of distinct elements. It uses a polynomial d(a, b) which, evaluated in K must give an invertible element. If we do not have any information on the existence of an infinite sequence of distinct elements of K, we enumerate the integers of K until we obtain α, β in K with d(α, β) ∈ K× , or until we conclude that the characteristic is equal to a prime number p. We then enumerate the powers of the coefficients of f and of g (the minimal polynomials of x and z over K) until we obtain α, β in K with d(α, β) ∈ K× , or until we conclude that the field K0 generated by the coefficients of f and g is a finite field. In this case, K0 [x, z] is a reduced finite K0 -algebra. It is a reduced finite ring, so either it is a finite field, of the form K0 [γ], and K[x, z] = K[γ], or it contains an idempotent e 6= 0, 1. Remark. The reader will be able to verify that the proof transformation that we put the “B is a discrete field” case through is precisely the implementation of the elementary local-global machinery of reduced zero-dimensional rings. In fact the same machinery also applies to the discrete field K and provides the following result: a strictly étale algebra over a reduced zero-dimensional ring K (Definition 5.1) is a finite product of strictly étale K-algebras. 372 VI. Strictly finite algebras and Galois algebras Pn Exercise 3. 1. We write x = (x1 , . . . , xn ) = i=1 xi ei and identify A with a subring of B by 1 7→ (1, . . . , 1). By writing ei ∈ A[x], we obtain that the elements xi − xj are invertible for j = 6 i. Conversely, if xi − xj is invertible for all i 6= j, we have B = A[x] = A ⊕ Ax ⊕ · · · ⊕ Axn−1 (Lagrange interpolation, Vandermonde determinant). 2. If and only if #A > n. Exercise 4. 1 and 2. If (a1 , . . . , a` ) is a basis of B over K, it is also a basis of B(v) over K(v). 3. Let b/p be an idempotent of B(v): we have b2 = bp. If p(0) = 0, then b(0)2 = 0, and since B is reduced, b(0) = 0. We can then divide b and p by v. Thus, we can assume that p(0) ∈ K× . By dividing b and p by p(0) we are reduced to the case where p(0) = 1. We then see that b(0) is idempotent. We denote it by b0 and let e0 = 1 − b0 . Let us write e0 b = vc. We multiply the equality b2 = bp by e0 = e20 and we obtain v 2 c2 = vcp. So vc(p − vc) = 0, and since the polynomial p − vc has 1 as its constant term, so is regular, this gives us c = 0. Therefore b = b0 b. Let us reason modulo e0 for a moment: we have b0 ≡ 1 so b is primitive and the equality b2 = bp is simplified to b ≡ p mod e0 . This gives the equality b = b0 b = b0 p in B(v) and so b/p = b0 . Exercise 6. √ √ 1. Classical: it is Z[ d] if d ≡ 2 or 3 mod 4 and Z[ 1+2 d ] if d ≡ 1 mod 4. √ √ 2. We have A = Z[ a]. We have β 2 = a+1 + a ∈ A, therefore β is integral over 2 A, then over Z. Actually, (β 2 − a+1 )2 = a and β is a root of X 4 −(a+1)X 2 +( a−1 )2 . 2 √ 2 We thus find (στ )(β) = β − 2. √ √ 3. We find (στ )(z) = r − (s + u) 2 + uβ then z + (στ )(z) = 2r + u 2a. This √ √ last element of Q( 2a) is integral over Z, hence in Z[ 2a] because 2a ≡ 2 mod 4. Hence u ∈ Z (and 2r ∈ Z). We replace z with z − uβ which is integral over Z, i.e. √ √ √ √ √ √ z = r + s 2 + t a. We have σ(z) = r − s 2 + t a, τ (z) = r + s 2 − t a; by using z + σ(z) and z + τ (z), we see that 2r, 2s, 2t ∈ Z. Let us use √ √ zσ(z) = x + 2rt a, zτ (z) = y + 2rs 2, with x = r2 − 2s2 + at2 , y = r2 + 2s2 − at2 . We therefore have x, y ∈ Z then x + y = 2r2 ∈ Z, x − y = 2at2 − (2s)2 ∈ Z, so 2at2 ∈ Z. From 2r, 2r2 ∈ Z, we deduce r ∈ Z. Similarly, from 2t, 2at2 ∈ Z (using that a is odd), we see that t ∈ Z, and then finally s ∈ Z. Phew! Thanks to the Z-basis of B, we obtain DiscB/Z = 28 a2 . √ √ √ 4. We have B = Z ⊕ = Z 2 ⊕ Zβ. √ Z a ⊕ Z 2 ⊕ Zβ =√A ⊕ E with E √ We also have 2E = 2 a with a = 2 Z ⊕ Z( a − 1) = 2, a − 1 A . This proves on the one hand that E is an A-module, and on the other that it is isomorphic to the ideal a of A. Consequently, E is a projective A-module of constant rank 1. The expression B = A ⊕ E certifies that B is a finitely generated projective A-module, written as a direct sum of a free A-module of rank 1 and of a projective module of constant rank 1. In general, the ideal a is not principal, so E is not a free A-module. Here is a small sample of values of a ≡ 3 mod 4; we have underlined those values for which the ideal a is principal: −33, −29, −21, −17, −13, −5, −1, 3, 7, 11, 15, 19, 23, 31, 35. Solutions of selected exercises 373 In the case where a is not principal, B is not a free A-module. Otherwise, E would be stably free of rank 1, therefore free (see Exercise V -13). Finally, we always have a2 = 2A (see below), so a ' a−1 ' a? . Consequently B 'A B? . √ Justification of a2 = 2A: always in the same context (a ≡ 3 mod 4 so A = Z[ a ]), we have for m ∈ Z √ √ m, 1 + a m, 1 − a = gcd(a − 1, m) A.  √ Indeed, the left ideal is generated by m2 , m(1 ± a), 1 − a , each one a multiple √ √ of the gcd. This ideal contains 2m = m(1 + a) + m(1 − a), so it contains the 2 element gcd(m , 2m, 1 − a) = gcd(m, 1 − a), (the equality is due to a ≡ 3 mod 4). √ √ For m = 2, we have 2, 1 + a = 2, 1 − a = a and gcd(a − 1, 2) = 2. Exercise 7. We consider B = A ⊗k A0 as an A-algebra, a scalar extension to A of the k-algebra A0 ; it is free of rank n0 . We therefore have at our disposal a stack of free algebras k → A → B and the transitivity formula of the discriminant provides  0 DiscB/k (x ⊗ x0 ) = DiscA/k (x)n · NA/k DiscB/A (1 ⊗ x0 ) . But DiscB/A (1 ⊗ x0 ) = DiscA0/k (x0 ). As it is an element of k, its norm NA/k has the value DiscA0/k (x0 )n . Ultimately we obtain the equality 0 DiscB/k (x ⊗ x0 ) = DiscA/k (x)n DiscA0/k (x0 )n . Exercise 8. We will use the following classical result on linear algebras. Let E be a finite dimensional K-vector space and u ∈ EndK (E). If d is the degree of the minimal polynomial of u, there exists an x ∈ E such that the elements x, u(x), . . . , ud−1 (x) are K-linearly independent. Here [ L : K ] = n, and IdL , σ, . . . , σ n−1 are K-linearly independent, so the minimal polynomial of σ is X n − 1, of degree n. We apply the above result. Exercise 9. 1. A is the companion matrix of the polynomial X 2 −X +1 = Φ6 (X), so A3 = −I2 in GL2 (k) and A3 = 1 in PGL2 (k). 2. We know by Artin’s theorem that k(t)/k(t)G is a Galois extension with Galois group A3 . The computation gives g = t + σ(t) + σ 2 (t) = t3 −3t−1 . t(t+1) We obviously have g ∈ k(t)G and t3 − gt2 − (g + 3)t − 1 = 0. Therefore, (direct part of Lüroth’s theorem, Problem 1) [ k(t) : k(g) ] = 3, and k(t)G = k(g). 3. Since k(a) ' k(g) and fg (t) = 0, the extension k(a) → k[T ]/hfa i is a copy of the extension k(g) → k(t). 4. Let σ be a generator of Aut(L/K). This question amounts to saying that we −1 can find some t ∈ L \ K such that σ(t) = t+1 (∗). Since t must be of norm 1, we seek it of the form t = σ(u) . The computation then shows that (∗) is satisfied u under the condition that u ∈ Ker(TrG ). It remains to show that there exists some u ∈ Ker(TrG ) such that σ(u) ∈ / K. This amounts to saying that the restriction of u σ to E = Ker(TrG ) is not a homothety. However, E ⊆ L is a K-linear subspace of dimension 2, stable under σ. By Exercise 8, the K-vector space L admits a generator for the endomorphism σ. This linear algebra property remains true for every stable subspace by σ. 374 VI. Strictly finite algebras and Galois algebras Exercise 10. The elements g ⊗ h form a k-basis of Aek . P a g ⊗ h with ag,h ∈ k. Then, z ∈ Ann(JA/k ) if and only if Let z = g,h g,h we have g 0 · z = z · g 0 for every g 0 ∈ G. We obtain ag,h = a1,gh , so z is a k-linear def P combination of the zk = g ⊗ h. gh=k Conversely, we see that zk ∈ Ann(JA/k ) and we have zk = k · z1 = z1 · k. So Ann(JA/k ) is the k-module generated by the zk ’s, and it is the A-module (or P the ideal of Aek ) generated by z1 = g g ⊗ g −1 . The image under µA/k of Ann(JA/k ) is the ideal nA. Regarding the trace, we  P have TrA/k (g) = 0 if g 6= 1. Therefore TrA/k a g = na1 . g gP P P If a = g ag g and b = g bg g, then TrA/k (ab) = n g ag bg−1 . The equivalences of item 2 are therefore clear, and in the case where n ∈ k× , the P separability idempotent is n−1 g g ⊗ g −1 . 3. Let λ : k[G] → k be the linear form “coordinate over 1.” For g, h ∈ G, we have λ(gh) = 0 if h 6= g −1 , and 1 otherwise. So, λ is dualizing and (g −1 )g∈G is the dual basis of (g)g∈G with respect to λ. We have Trk[G]/k = n · λ. Exercise 11. 1. It suffices to do it for g ∈ {1, x, . . . , xn−1 }, which is a basis of A[Y ] over k[Y ]. The right-hand side of (∗) with g = xi is  hi = ϕ (Y − x)xi = ϕ(Y xi − xi+1 ) = Y i+1 − ϕ(xi+1 ). If i < n − 1, we have ϕ(xi+1 ) = Y i+1 , so hi = 0. For i = n − 1, we have ϕ(xn ) = −ϕ(a0 + a1 x + · · · + an−1 xn−1 ) = −(a0 + a1 Y + · · · + an−1 Y n−1 ), and hn (Y ) = f (Y ), which gives the result. 2. For i < n, we have f (Y )e λ xi f 0 (Y ) = ϕ (Y − x)xi f 0 (Y ) = ϕ xi f (Y ) = Y i f (Y ), i.e.     P e λ xi f 0 (Y ) = j<n λ(xi bj )Y j = Y i . Therefore (bj  λ)(xi ) = λ(xi bj ) = δij . Thus, λ is dualizing. P 3. For two dual bases (ei ), (αi ), we have TrA/k = ei  αi . With the two dual bases (1, x, . . . , xn−1 ) and (b0  λ, b1  λ, . . . , bn−1  λ) we obtain TrA/k = b0  λ + xb1  λ + · · · + xn−1 bn−1  λ = f 0 (x)  λ. Exercise 12. 1. The k-algebra A := k[X1 , . . . , Xn ]/hf1 (X1 ), . . . , fn (Xn )i is the tensor product of the k[Xi ]/hfi (Xi )i which are Frobenius algebras, so A is a Frobenius algebra. Precision with di = deg(fi ). The k-algebra A is free of rank αn 1 d1 · · · dn , the monomials xα = xα 1 · · · xn with αi < di for every i form a k-basis, and the linear form “coordinate over xd11 −1 · · · xdnn −1 ” is dualizing. 2. Let δ0 , δx , δy be three linear forms over k[X, Y ] defined by δ0 (f ) = f (0), 0 δx (f ) = fX (0), δy (f ) = fY0 (0). Viewed as linear forms over A they define a k-basis of A? , a dual basis of the k-basis (1, x, y) of A. We have x  δx = y  δy = δ0 , Solutions of selected exercises 375   x is a presentation matrix −y of A? for (δx , δy ). We must observe that for u, v in A we have the implication and so A? = A  δx + A  δy . Let us show that G =  u  δx + v  δy = 0 =⇒ u v   ∈A x −y  . By multiplying u  δx + v  δy = 0 by x, we obtain u  δ0 + (xv)  δy = 0; we evaluate at 1 and we put x := 0 to obtain u(0, y) = 0, i.e. u ∈ Ax. Similarly, v ∈ Ay. If we write u = xr, v = ys, we obtain r  δ0 + s  δ0 = 0, i.e. r + s = 0, as required. The determinantal ideal D1 (G) = hx, yi is nonzero, with a null square, so it cannot be generated by an idempotent. Consequently, the A-module A? is not projective. A fortiori, it is not free. Exercise 13. 1. We have (y − z)f ∆ (y, z) = 0 so δ := f ∆ (y, z) ∈ Ann(J). We then know that for α ∈ Aek , we have αδ = µA/k (α) · δ = δ · µA/k (α). We apply this result to α = δ by noticing that µA/k (δ) = f 0 (x). 2. We write f (Y ) − f (Z) = (Y − Z)f 0 (Y ) − (Y − Z)2 g(Y, Z), which gives us in the algebra Aek the equality (y − z)f 0 (y) = (y − z)2 g(y, z). We write the equality 1 = uf + vf 0 in A[X]. Then f 0 (y)v(y) = 1, so y − z = (y − z)2 v(y)g(y, z). When a = a2 b, the element ab is idempotent and hai = habi. Therefore J = hei with the idempotent e = (y − z)v(y)g(y, z). We have f ∆ (Y, Z) = f 0 (Y ) − (Y − Z)g(Y, Z), so f ∆ (y, z) = f 0 (y) − (y − z)g(y, z) = f 0 (y) 1 − (y − z)v(y)g(y, z) = f 0 (y)(1 − e).  0 Exercise 14. 1. Let fij = ∂fi /∂Xj and we write, in k[Y , Z], fi (Y ) − fi (Z) − P j 0 (Y ) =: −gi (Y , Z) ∈ hY1 − Z1 , . . . , Yn − Zn i2 . (Yj − Zj )fij In Aek , by letting A = JACy (f1 , . . . , fn ) we obtain  A y1 − z 1 . .. yn − z n   = g1 (y, z) .. . gn (y, z)   with gi (y, z) ∈ hy1 − z1 , . . . , yn − zn i2 = J2A/k . By inverting A, we obtain yi − zi ∈ J2A/k , i.e. JA/k = J2A/k .  2. As µA/k βy,z (f ) = Jacx (f ), we have µA/k (ε) = 1. As ε ∈ Ann(JA/k ), ε is the idempotent generator of Ann(JA/k ). Finally, βy,z (f ), which is associated with ε, is also a generator of Ann(JA/k ). 3. Let f1 , . . . , fn be in k[X] and δ = JacX (f ). Let us invert δ with an indeterminate T . Then, in k[X, T ] we obtain ∂X1 ··· ∂Xn ∂T   f1 0 .. ..    .  . JACX (f ) JACX,T (f , δT − 1) =   fn 0 δT − 1 ? ··· ? δ and so JacX,T (f , δT − 1) = δ 2 . Let A = k[X]  f and B = A[δ −1 ] = k[X, T ]  f , 1 − δT . 376 VI. Strictly finite algebras and Galois algebras Then the Jacobian of the system (f , δT − 1) which defines B is invertible in B and so B is a separable algebra. Exercise 15. The B-algebra B ⊗k A is separable. We have a transformation (universal property of the scalar extension) Homk (A, B) → HomB (B ⊗k A, B), ψ 7→ ψ, defined by ψ(b ⊗ a) = bψ(a). 1. We then consider P the idempotent εϕ ∈ B ⊗k A of Lemma 6.16, and we write it in the form εϕ = i∈I bi ⊗ ai . 2. Directly results from Lemma 6.16: the idempotent e is none other than e{ϕ,ϕ0 } . 3. Since the horizontal juxtaposition of Dedekind evaluation matrices is a Dedekind evaluation matrix, it suffices to show that there exists one, say A1 , whose image contains the vector v := t[ e11 · · · en1 ].  Let (aj )j∈J1..mK , (bj )j∈J1..mK be the pair attached to ϕ1 . We put in column j of A1 the vector t[ ϕ1 (aj ) · · · ϕn (aj ) ]. We then have A1 t[ b1 · · · bm ] = v. Exercise 16. By hypothesis, for each τ ∈ G \ {Id} there exist nτ ∈ N and  Pnτ xj,τ yj,τ − τ (yj,τ ) . x1,τ , . . . , xnτ ,τ , y1,τ , . . . , ynτ ,τ ∈ A such that 1 = j=1 Pnτ Pnτ Let sτ = x τ (yj,τ ) such that x y = 1 + sτ , then we define j=1 j,τ j=1 j,τ j,τ xnτ +1,τ = −sτ and yn+1,σ = 1. Then, with mτ = 1 + nτ Pmτ j=1 xj,τ τ (yj,τ ) = sτ − sτ = 0, Pmτ j=1 xj,τ yj,τ = 1 + sτ − sτ = 1. Fixing σ ∈ G, we obtain the product Pmτ Q τ ∈G\{Id} j=1  xj,τ σ(yj,τ ) = 1 if σ = Id 0 otherwise. The development of the product provides two families (ai ) and (bi ) indexed by the same set (each ai is the product of some xj,τ ’s and bi is the product of the corresponding yj,τ ’s) satisfying  Pr 1 if σ = Id a σ(b ) = i i i=1 0 otherwise. Exercise 17. 1. As G acts transitively over J1..nK, we have (kn )G = k. In addition, G beingPof cardinality n, a permutation σ ∈ G \ {Id} has no fixed point. We deduce that e σ(ei ) = 0 if σ ∈ G \ {Id}, and 1 otherwise. σ∈G i By taking xi = yi = ei , the conditions of Lemma 7.10 are satisfied and (k, kn , G) is a Galois algebra. The map G → J1..nK, σ 7→ σ(1), is a bijection. The action of G on J1..nK is necessarily isomorphic to the action of G on itself by translations. If n is fixed, we can take for G the group generated by an n-cycle. 2. We have StpS4 (B) = h(1, 2), (3, 4)i and H = StpG (B) = {Id}; so (k4 )H = k4 . 3. The first item is immediate. Suppose B = A[X]H and let a ∈ A. Then aX ∈ B, so aX is invariant under H, i.e. a is invariant under H. Recap: A = AH so H = {Id} then A[X] = XA[X] + k, i.e. A = k and G = {Id}. Besides this very special case, B is not of the form A[X]H . Solutions of selected exercises 377 Exercise 18. Assume without loss of generality that B and C are free of rank n ∈ N: it indeed suffices to check the conclusion after localization at comaximal elements and we have the local structure theorem for finitely generated projective modules readily available. If n = 0 then k is trivial, we can therefore assume that 1 6 n. Consider a basis C = (c1 , . . . , cn ) of C and a basis B = (b1 , . . . , bn ) of B (over k), and write the matrix B ∈ Mn (k) of B over C. The fact that the bi ’s form a basis implies that B is injective, i.e. δ = det B is regular (Theorem II -5.22). Moreover, δC ⊆ B. Let us compare TrB/k (x) and TrC/k (x) for some x ∈ B. Consider k0 = k[1/δ] ⊇ k. The two k0 -algebras obtained by scalar extension, B[1/δ] and C[1/δ], are the same, and the trace is well-behaved under scalar extension, so TrB/k (x) and TrC/k (x) are equal because they are equal in k0 . But then disc B/k = discB/k (B) = discC/k (B) = δ 2 discC/k (c1 , . . . , cn ). Finally, since disc B/k is invertible, so is δ and B = C. Exercise 19. First of all, note that since k is connected, all the finitely generated projective modules over k are of constant rank. Also recall that the Galois correspondence is already established when k is a discrete field. We must show that if k ⊆ B ⊆ A with B strictly étale, then def  B = C = Fix Stp(B) . By Lemma 18, it suffices to show that B and C have the same rank. In classical mathematics we conclude by noting that after scalar extension to any field, B and C have the same rank since the Galois correspondence is established for fields. Via a dynamic rereading of this classical argument we obtain a constructive proof. This is linked to the formal Nullstellensatz (Theorem III -9.9). Exercise 20. Let (xi ), (yi ) be two systems of elements of B as in Lemma 7.10. P 1. We know that for x ∈ B, x = i TrG (xyi )xi . If x ∈ b, then xyi ∈ b, and as b is globally invariant, TrG (xyi ) ∈ b. Recap : b is generated by the invariant elements TrG (xyi ) for x ∈ b. 2. Let a be an ideal of A; it is clear that aB is globally invariant. We must show that aB ∩ A = a. This comes from the fact that A is a direct summand in B (as an A-module). Indeed, let B = A ⊕ E, so aB = a ⊕ aE. If x ∈ aB ∩ A, we write x = y + z with y ∈ a and z ∈ aE ⊆ E; we then have x, y ∈ A, so z ∈ A, and as z ∈ E, z = 0. Consequently, x = y ∈ a. Conversely, if b ⊆ B is globally invariant, we must show that (b ∩ A)B = b; but this is what has been shown in the previous question. Problem 2. Generally, the linear form δg is passed on to the quotient modulo the ideal ag that it defines. In addition, if δg (u v) = 0 over A = k[X]/ag for every v, then δg (uv) = 0 for every v, so u ∈ ag , i.e. u = 0. Therefore AnnA (δg ) = 0. For i ∈ J1..nK, let δim = δXim (coordinate over Xim ). In particular, δi (f ) = ∂f (0), ∂Xi and we define δ0 : k[X] → k by δ0 (f ) = f (0). 1. Easy computation. 2. We verify that f ∗ g = 0 if and only if fm ∗ g = 0 for every homogeneous component fm of f . In other words the ideal ag is homogeneous (this is always 378 VI. Strictly finite algebras and Galois algebras the case if g is homogeneous). It is also clear that for i 6= j, Xi Xj ∗ g = 0, and for |α| > d, X α ∗ g = 0. If f = P P −(d−m) a X m + · · · is homogeneous of degree m 6 d, we have f ∗ g = i ai Xi . i i i If m < d, we therefore have f ∗ g = 0 if and only if ai = 0, ∀i, i.e. if f ∈ hXi Xj , i 6= ji. P If m = d, we have f ∗ g = 0 if and only if a = 0, i.e. if f ∈ hXi Xj , i 6= ji + P Pi i d d Xid − X1d , i ∈ J2..nK , because a X = a (Xi − X1d ). i i i i i Recap: we have obtained a generator set of ag consisting of n(n−1) homogeneous 2 polynomials of degree 2 and of n − 1 homogeneous polynomials of degree d ag = hXi Xj , i < ji + Xid − X1d , i ∈ J2..nK . Let A = k[X]/a g = k[x1 , . . . , xn ]. Then x1 , . . . , xn , 1, x21 , . . . , x2n , , . . . , xd−1 , xd−1 n 1 ... xd1 is a k-basis of A of cardinality (d − 1)n + 2. The k-dual basis of A? is δ0 , and we have ? δ1 , . . . , δn , δ12 , . . . , δn2 , δ1d−1 , . . . , δnd−1 , ... d−m xm for m ∈ J1..d − 1K, i  δg = δi δg xdi  δg = δ0 . Therefore A = A  δg and δg is dualizing. 3. If we take ei strictly greater than the exponent of Xi in the set of monomials of g, we have Xiei ∗ g = 0. 4. Let f ∈ k[X]. We have seen that f  δg = 0 if and only if ∂f (g) = 0. So the k-linear map k[X] → k[X], f 7→ ∂f (g), passes to the quotient modulo b to define a k-linear map ϕ : k[X]/b → k[X]. 5. The k-linear map A → A? , f 7→ f  δg , is injective and as A and A? are k-vector spaces of the same finite dimension, it is an isomorphism. Problem 3. 1. As if by magic we let θ(x) = Hilbert). We will check that  σ θ(x) = θ(x) + TrG (x)z − x or Pn−1 i=0 σ i (z)ci (x) (thanks to  x = (IdA − σ) θ(x) + TrG (x)z. So, (IdA − σ) ◦ θ and x 7→ TrG (x)z are two orthogonal projectors with sum IdA , hence A = Im(IdA − σ) ⊕ kz. For the verification, write ci for ci (x) and y = θ(x). We have σ(ci ) = ci+1 − x, cn = trG (x) and σ(y) = Pn−1 = (y + TrG (x)z) − x TrG (z) = y + TrG (x)z − x. i=0 (ci+1 − x)σ i+1 (z) = Pn−1 i=0 ci+1 σ i+1 (z) − Pn−1 i=0 xσ i+1 (z) Since TrG (z) = 1, z is a basis of kz (if az = 0, then 0 = TrG (az) = a), so Im(IdA − σ) is indeed stably free of rank n − 1. 2. It is clear that Im(IdA − σ) ⊆ Ker TrG . The other inclusion results from the previous item. P 3. The reader can verify this by letting y = c τ (z). There is a link with τ τ  question 1 : for fixed x with TrG (x) = 0, the family ci (x) is an additive 1-cocycle under the condition that J0..n − 1K and G are identified via i ↔ σ i . Solutions of selected exercises 379 4. The element −1 has null trace, hence the existence of y ∈ A such that −1 = y−σ(y). We then have, for every i ∈ Z, σ i (y) = y+i, and σ j (y)−σ i (y) = j−i is invertible for i 6≡ j mod p. Let yi = σ i (y), (i ∈ J0..p − 1K). The Vandermonde matrix of (y0 , y1 , . . . , yp−1 ) is invertible and consequently (1, y, . . . , y p−1 ) is a k-basis of A. Let λ = y p − y. Then λ ∈ k since σ(λ) = σ(y)p − σ(y) = (y + 1)p − (y + 1) = y p − y = λ. The characteristic polynomial of y is (Y − y0 )(Y − y1 ) · · · (Y − yp−1 ) and this polynomial is equal to f (Y ) = Y p − Y − λ (because the yi ’s are roots of f and yi − yj is invertible for i 6= j). 5. Let k be a ring with p =k 0. Fix λ ∈ k and let A = k[Y ]/hf i = k[y], where f (Y ) = Y p − Y − λ. Then, y + 1 is a root of f , and we can define σ ∈ Aut(A/k) by σ(y) = y + 1. The element σ is of order p and the reader will check that (k, A, hσi) is a Galois algebra. def Problem 4. 1. Consider the ideal hx − σ(x), y − σ(y)i = h2x, 2yi. Since 2 is invertible, it is the ideal hx, yi, and it contains 1 because x2 + y 2 = 1. Thus, hσi is separating. 2. For all f ∈ B, we have f = (xf )x + (yf )y. If f is odd i.e. if σ(f ) = −f , we have xf , yf ∈ A, so f ∈ Ax + Ay and E = { f ∈ B | σ(f ) = −f }. The ) ) equality B = A ⊕ E stems from the equality f = f +σ(f + f −σ(f for f ∈ B. 2 2 Other proof. We know that there exists a b0 ∈ B of trace 1 and that the kernel of the linear form B → A defined by b 7→ Tr(b0 b) is a complementary subspace of A in B. Here we can take b0 = 1/2, again we find E as a complementary subspace. 3. This is a matter of finding y1 , y2 , y3 ∈ B such that τ = Id and 0 otherwise. We notice that 1 · 1 + x · x + y · y = 2, and P3 i=1 xi τ (yi ) = 1 for 1 · σ(1) + x · σ(x) + y · σ(y) = 0,  1 x y − x2 − y2  hence we obtain a solution when taking yi = xi /2. Letting X = 1 , " # 2 1 0 0 we have X tX = I2 and tXX = P with P = 0 x2 xy . The matrix P is a 0 xy y 2 projector of rank 2 whose image is isomorphic to the A-module B.   x2 xy Note: we deduce that E is isomorphic to the image of the projector xy y 2 and that B ⊗A E is isomorphic to B as a B-module. 4. Easy. n n 5. The isomorphism that E is a projective module of constant Vn E ' A proves rank 1. Applying we obtain E n⊗ ' A. Note: for more details see Section X -1, the proof of Proposition X -1.2, Equality (1) on page 536 and Equality (5) on page 570. 6. The equality 1 = x2 + y 2 implies a2 = x2 y 2 , x3 y, x4 = x2 y 2 , xy, x2 = x2 A, and aB = xyB + x2 B = x(yB + xB) = xB. In B, a = x(yA + xA) = xE. Therefore if x is regular, a 'A E via the multiplication by x. 380 VI. Strictly finite algebras and Galois algebras 7a. We have k[x] ' k[X] and A = k[x2 , xy, y 2 ]. We consider B as a free k[x]module of rank 2, with basis (1, y), and we let N : B → k[x] be the norm. For a, b ∈ k[x] we obtain N(a + by) = (a + by)(a − by) = a2 + (x2 − 1)b2 . As N(x) = x2 , x is regular (Lemma 4.3 item 2 ). Moreover, a + by ∈ B× if and only if a2 + (x2 − 1)b2 ∈ k× . Suppose b has formal degree m > 0 and a has formal degree n > 0. Then, (x2 − 1)b2 = β 2 x2m+2 + . . . and a2 = α2 x2n + . . . Since a2 + (x2 − 1)b2 ∈ k× , we obtain • if n > m + 1, α2 = 0 so α = 0 and a can be rewritten with formal degree < n, • if n < m + 1, β 2 = 0 so β = 0 and – if m = 0, b = 0 and a = α ∈ k× , or – if m > 0, b can be rewritten with formal degree < m, • if n = m + 1 (which implies n > 0), α2 + β 2 = 0 so α = β = 0 and a can be rewritten with formal degree < n. We conclude by induction on m + n that if a + by ∈ B× , then b = 0 and a ∈ k× . We notice that if −1 = i2 in k, then (x + iy)(x − iy) = 1 and we obtain an inverse x + iy which is not a constant. 7b. Let us show that a is not principal. As a 'A E, it will follow that E is not a free A-module, and B is not free either, because otherwise E would be stably free of rank 1, therefore free. Suppose a = aA with a ∈ A. By extending to B, we obtain aB = aB. But we have seen that aB = xB, and since x is regular, x = ua with u ∈ B× = k× . This would imply x ∈ A, which is not the case because k is nontrivial. 8. We reuse the preceding proof to show that a is not principal, but here B× no longer consists of only constants, for example the (continuous) function (x, y) 7→ x2 + 1 is invertible. From the point where x = ua and u ∈ B× , we reason as follows. Since u is an invertible element of B, its absolute value is bounded below by an element > 0, and u is everywhere > 0, or everywhere < 0. As x is odd and a even, a and x are identically zero; a contradiction. Bibliographic comments A constructive study of strictly finite (not necessarily commutative) associative algebras over a discrete field can be found in [158, Richman] and in [MRR, Chapitre IX]. Proposition 1.13 is found in [MRR] which introduces the terminology of separably factorial field. See also [157, Richman]. Lemma 1.16 for squarefree factorization over a perfect discrete field admits a subtle generalization in the form of an “algorithm for separable factorization” over an arbitrary discrete field; see [MRR, th. IV.6.3, p. 162] and [122, Lecerf]. Bibliographic comments 381 The notions of a Galois algebra and of a separable algebra were introduced by Auslander & Goldman in [3, 1960]. The core of the theory of Galois algebras is found in Chase, Harrison & Rosenberg’s paper [30, 1968]. A book that presents this theory is [Demeyer & Ingraham]. Almost every argument in [30] is already of an elementary and constructive nature. The result given in Exercise 18 is due to Ferrero and Paques in [82]. Problem 2 is inspired by Chapter 21 (Duality, Canonical Modules, and Gorenstein Rings) of [Eisenbud] and in particular by Exercises 21.6 and 21.7. Chapter VII The dynamic method Nullstellensatz Splitting field Galois theory Contents 1 2 3 4 Introduction . . . . . . . . . . . . . . . . . . . . . . . . The Nullstellensatz without algebraic closure . . . . The case of an infinite basis field . . . . . . . . . . . . . . . Changing variables . . . . . . . . . . . . . . . . . . . . . . . The general case . . . . . . . . . . . . . . . . . . . . . . . . The actual Nullstellensatz . . . . . . . . . . . . . . . . . . . Syzygies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The dynamic method . . . . . . . . . . . . . . . . . . . Classical Galois theory . . . . . . . . . . . . . . . . . . . . Bypassing the obstacle . . . . . . . . . . . . . . . . . . . . Introduction to Boolean algebras . . . . . . . . . . . Discrete Boolean algebras . . . . . . . . . . . . . . . . . . . Boolean algebra of the idempotents of a ring . . . . . . . . Galoisian elements in a Boolean algebra . . . . . . . . . . The universal splitting algebra (2) . . . . . . . . . . . Galois quotients of pre-Galois algebras . . . . . . . . . . . . Case where the Boolean algebra of a universal splitting algebra is discrete . . . . . . . . . . . . . . . . . . . . . . . Discriminant . . . . . . . . . . . . . . . . . . . . . . . . . . – 383 – 384 386 386 388 390 391 393 394 396 397 397 398 399 400 404 405 407 409 384 VII. The dynamic method Fixed points . . . . . . . . . . . . . . . . . . . . . . . . . . Separability . . . . . . . . . . . . . . . . . . . . . . . . . . . Triangular structure of Galoisian ideals . . . . . . . . . . . 5 Splitting field of a polynomial over a discrete field . Good quotients of the universal splitting algebra . . . . . . Uniqueness of the splitting field . . . . . . . . . . . . . . . 6 Galois theory of a separable polynomial over a discrete field . . . . . . . . . . . . . . . . . . . . . . . . . . Existence and uniqueness of the splitting field . . . . . . . Galois quotients of the universal splitting algebra . . . . . Where the computations take place . . . . . . . . . . . . . Changing the base ring, modular method . . . . . . . . . . Lazy Galois theory . . . . . . . . . . . . . . . . . . . . . . . The basic algorithm . . . . . . . . . . . . . . . . . . . . . When a relative resolvent factorizes . . . . . . . . . . . . When the triangular structure is missing . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . 411 412 414 416 416 419 419 420 420 421 423 424 424 426 428 428 433 440 Introduction The first section of this chapter gives general constructive versions of the Nullstellensatz for a polynomial system over a discrete field (we will be able to compare Theorems 1.5 (page 390), 1.8 (page 392) and 1.9 (page 392), to Theorems III -9.5 (page 140) and III -9.7 (page 142)). We also give a simultaneous Noether positioning theorem (Theorem 1.7). This is a significant example of a reformulation of a result from classical mathematics in a more general framework: classical mathematics admits that every field has an algebraic closure. This means it does not have to deal with the problem of the exact meaning of Hilbert’s Nullstellensatz when such an algebraic closure is not available. But the question does get asked, and we can offer a perfectly reasonable answer: the algebraic closure is not really necessary. Rather than looking for the zeros of a polynomial system in an algebraic closure, we can look for them in finite algebras over the field given at the start. We then tackle another problem: that of constructively interpreting the classical discourse on the algebraic closure of a field. The problem might seem to largely involve the use of Zorn’s lemma, which is necessary for the construction of the global object. Actually, a more delicate problem Introduction 385 arises well beforehand, at the moment the splitting field of an individual polynomial is constructed. The theorem from classical mathematics stating that every separable polynomial of K[T ] has a strictly finite splitting field over K (in which case the Galois theory applies), is only valid from a constructive point of view under hypotheses regarding the possibility of factorizing the separable polynomials (cf. [MRR] and in this work Theorem III -6.15 on the one hand and Corollary VI -1.13 on the other). Our goal here is to give a constructive Galois theory for an arbitrary separable polynomial in the absence of such hypotheses. The counterpart is that we must not consider the splitting field of a polynomial as a usual “static” object, but as a “dynamic” object. This phenomenon is inevitable, because we must manage the ambiguity that results from the impossibility of knowing the Galois group of a polynomial by an infallible method. Moreover, the disorientation produced by this shift to a dynamic perspective is but one example of the general lazy evaluation method: nothing comes of over-exhausting ourselves to know the whole truth when a partial truth is sufficient for the stakes of the ongoing computation. In Section 2, we give a heuristic approach to the dynamic method, which forms a cornerstone of the new methods in constructive algebra. Section 3, dedicated to Boolean algebras, is a short introduction to the problems that will have to be dealt with in the context of a universal splitting algebra over a discrete field when it is not connected. Section 4 continues the theory of universal splitting algebra already started in Section III -4. Without assuming that the polynomial is separable, the universal splitting algebra has several interesting properties that are preserved upon passage to a “Galois quotient.” When summarizing these properties we have been brought to introduce the notion of a pre-Galois algebra. Section 5 gives a constructive and dynamic approach to the splitting field of a polynomial over a discrete field, without a separability hypothesis regarding the polynomial. The dynamic Galois theory of a separable polynomial over a discrete field is developed in Section 6. The current chapter can be read immediately after Sections III -6 and VI -2, bypassing Chapters IV and V, if we restrict the universal splitting algebra to the discrete fields case (which would in fact simplify some of the proofs). However, it seemed natural to us to develop the material with respect to the universal splitting algebra in a more general framework, which requires the notion of a projective module of constant rank over an arbitrary commutative ring. 386 VII. The dynamic method 1. The Nullstellensatz without algebraic closure In this chapter, which is dedicated to the question “how can we constructively recover the results from classical mathematics that are based on the existence of an algebraic closure, even when it is missing?,” it seemed logical to have a new look at the Nullstellensatz and the Noether position (Theorem III -9.5) in this new framework. The case of an infinite basis field We claim that Theorem III -9.5 can be copied virtually word-for-word, by simply deleting the reference to an algebraically closed field that contains K. We no longer necessarily see the zeros of the polynomial system considered in finite extensions of the discrete field K, but we construct strictly finite nonzero K-algebras (i.e. that are finite dimensional K-vector spaces) which account for these zeros; in classical mathematics the zeros are in the quotient fields of these K-algebras, and such quotient fields are easily seen to exist by applying LEM since it suffices to consider a strict ideal that is of maximal dimension as a K-vector space. 1.1. Theorem. (Weak Nullstellensatz and Noether position, 2) Let K be an infinite discrete field and (f1 , . . . , fs ) = (f ) be a polynomial system in the algebra K[X] = K[X1 , . . . , Xn ] (n > 1). Let f = f K[X] and A = K[X]/f . Weak Nullstellensatz. Either A = 0, or there exists a nonzero quotient of A which is a strictly finite K-algebra. Noether postion. More precisely, we have a well-defined integer r ∈ J−1..nK with the following properties. 1. Either r = −1 and A = 0 (i.e. f = h1i). In this case, the system (f ) does not admit any zero in any nontrivial K-algebra. 2. Or r = 0, and A is a nonzero strictly finite K-algebra (in particular, the natural homomorphism K → A is injective). 3. Or r > 1, and there exists a K-linear change of variables (the new variables are denoted Y1 , . . . , Yn ) satisfying the following properties. • We have f ∩ K[Y1 , . . . , Yr ] = 0. In other words, the polynomial ring K[Y1 , . . . , Yr ] can be identified with a subring of A. • Each Yj for j ∈ Jr + 1..nK is integral over K[Y1 , . . . , Yr ] modulo f and the ring A is a K[Y1 , . . . , Yr ]-finitely presented module. §1. The Nullstellensatz without algebraic closure 387 • There exists an integer N such that for each (α1 , . . . , αr ) ∈ Kr , the quotient algebra A/hY1 − α1 , . . . , Yr − αr i is a nonzero K-vector space of finite dimension 6 N . • We have finitely generated ideals fj ⊆ K[Y1 , . . . , Yj ] (j ∈ Jr..nK) with the following inclusions and equalities. h0i = fr ⊆ fr+1 ⊆ . . . ⊆ fn−1 ⊆ fn = f fj ⊆ f` ∩ K[Y1 , . . . , Yj ] (j < `, j, ` ∈ Jr..nK) D(fj ) = D (f` ∩ K[Y1 , . . . , Yj ]) (j < `, j, ` ∈ Jr..nK) J We essentially reason as in the proof of Theorem III -9.5. To simplify we keep the same variable names at each step of the construction. Let fn = f. • Either f = 0, and r = n in item 3. • Or there is a nonzero polynomial among the fi ’s, we make a linear change of variables that renders it monic in the last variable, and we compute the resultant ideal ResXn (fn ) = fn−1 ⊆ K[X1 , . . . , Xn−1 ] ∩ fn . Since fn ∩ K[X1 , . . . , Xn−1 ] and fn−1 have the same nilradical, they are simultaneously null. • If fn−1 = 0, item 3 or 2 is satisfied with r = n − 1. • Otherwise, we iterate the process. • If the process halts with fr = 0, r > 0, item 3 or 2 is satisfied with this value of r. • Otherwise, f0 = h1i and the computation has allowed us to construct 1 as an element of f. There are two things left for us to verify. First of all, that A is a K[Y1 , . . . , Yr ]-finitely presented module. It is clear that it is a finitely generated module, the fact that it is finitely presented is therefore given by Theorem VI -3.17. Then, that when we specialize the Yi ’s (i ∈ J1..rK) in some αi ∈ K, the K-vector space obtained is finitely presented (so finite dimensional) and nonzero. Theorem VI -3.9 on changing the base ring gives us the fact that, after specialization, the algebra remains a finitely presented module, so that the obtained K-vector space is indeed finite dimensional. We must show that it is nonzero. However, we notice that, by assuming the changes of variables already made at the start, all the computations done in K[Y1 , . . . , Yn ] specialize, i.e. remain unchanged, if we replace the indeterminates Y1 , . . . , Yr by the scalars α1 , . . . , αr . The conclusion f ∩ K[Y1 , . . . , Yr ] = 0 is replaced by the same result specialized in the αi ’s, i.e. precisely what we wanted. We can obtain the same conclusion in the more scholarly form below. This 388 VII. The dynamic method specialization is a change of the base ring K[Y1 , . . . , Yr ] → K. Apply item 1c of the general elimination lemma IV -10.1 with k = K[Y1 , . . . , Yr ], C = A and k0 = K. The elimination ideal and the resultant ideal in k are null, therefore after scalar extension the resultant ideal remains null in K. Therefore, the same thing holds for the elimination ideal, and the natural homomorphism K → A/hY1 − α1 , . . . , Yr − αr i is injective. Let us end by explaining why the integer r is well-defined. First of all the case r = −1 is the only case where A = 0, then for r > 0, it is possible to show that r is the maximum number of elements algebraically independent over K in A (see the proofs Theorems XIII -5.1 and XIII -5.4).  Remarks. 1) We have used resultant ideals Res(b) (Theorem IV -10.2) instead of ideals R(g1 , . . . , gs ) (with g1 monic and hg1 , . . . , gs i = b), introduced in Lemma III -9.2. However, Lemma III -9.2 shows that the latter ideals would do just as well. 2) For any arbitrary homomorphism K[Y1 , . . . , Yr ] → B, when B is a reduced K-algebra, the last argument in the proof of the theorem works, which tells us that B ⊆ B ⊗K[Y1 ,...,Yr ] A. 3) The last item of 3 recalls the workings of the proof by induction which constructs the finitely generated ideals fj to reach the Noether position. This also gives a certain description of the “zeros” of the polynomial system (more delicate than in the case where we have an algebraically closed field L that contains K, and where we describe the zeros with coordinates in L, as in Theorem III -9.5). It remains for us to lift the restriction introduced by the consideration of an infinite discrete field K. For this we need a change of variables lemma that is a bit more general, using Nagata’s trick. Changing variables 1.2. Definition. We call a change of variables in the polynomial ring k[X] = k[X1 , . . . , Xn ] an automorphism θ of this k-algebra. If each θ(Xi ) is denoted by Yi , the Yi ’s are called the new variables. Each Yi is a polynomial in the Xj ’s, and each Xi is a polynomial in the Yj ’s. The most frequently used are the “linear changes of variables,” in which we include, despite their name, the translations and all the affine transformations. Comment. A nonlinear change of variables, like for instance (X, Y ) 7→ (X + Y 2 , Y ), does not respect the geometry in the intuitive sense. For example a line is transformed into a parabola; the algebraic geometry of the affine plane §1. The Nullstellensatz without algebraic closure 389 is not an extension of the affine geometry, it directly contradicts it! It is only in the context of projective spaces that we find what we expect: the automorphisms of the projective plane, from the algebraic geometry point of view, are necessarily linear, and the notion of a “(straight) line” reclaims its rights. Pseudomonic polynomials Let k be a connected ring. A polynomial in k[T ] is said to be pseudomonic Pp (in the variable T ) if it is of the form i=0 ak T k with ap invertible. In general, without assuming that k is connected, a polynomial in k[T ] is said to be pseudomonic (in the variable T ) if there exists a fundamental system of orthogonal idempotents (e0 , . . . , er ) such that, for each j, when Pj taking k[1/ej ] = kj , the polynomial is expressible in the form k=0 ak,j T k with aj,j invertible in kj . A polynomial in k[X1 , . . . , Xn ] = k[X] is said to be pseudomonic in the variable Xn if it is pseudomonic as an element of k[X1 , . . . , Xn−1 ][Xn ]. NB: See also the notion of a locally monic polynomial in Exercise X -14. Recall that a polynomial of k[X1 , . . . , Xn ] is said to be primitive when its coefficients generate the ideal h1i. Also recall that if k is reduced, we have × the equality k[X1 , . . . , Xn ] = k× (Lemma II -2.6). 1.3. Fact. Let K be a reduced zero-dimensional ring and P ∈ K[T ]. The following properties are equivalent. – The polynomial P is regular. – The polynomial P is primitive. – The polynomial P is pseudomonic. – The quotient algebra K[T ]/hP i is finite over K. J The equivalences are clear in the discrete fields case. To obtain the general result we can apply the elementary local-global machinery of reduced zerodimensional rings (page 212).  A simple and efficient lemma 1.4. Lemma. (Changes of variables lemma à la Nagata) Let K be a reduced zero-dimensional ring and g ∈ K[X] = K[X1 , . . . , Xn ] be a regular element. 1. There exists a change of variables such that, by calling the new variables Y1 , . . ., Yn , the polynomial g becomes pseudomonic in Yn . Consequently the K-algebra K[X]/hgi is finite over K[Y1 , . . . , Yn−1 ]. 2. When K is an infinite discrete field, we can take a linear changes of variables. 390 VII. The dynamic method 3. The result also applies to a finite family of regular polynomials of K[X] (they can be made simultaneously pseudomonic by the same change of variables). J For the case of an infinite discrete field see Lemma III -9.4. In the general case we can assume that K is a discrete field and we make a change of variables “à la Nagata.” For example with three variables, if the polynomial g is of degree < d in each of the variables X, Y , Z, we make 2 the change of variables X 7→ X, Y 7→ Y + X d , Z 7→ Z + X d . Then, seen as an element of K[Y, Z][X], g has become pseudomonic in X. Item 3 is left to the reader.  The general case By reasoning as we did for Theorem 1.1 and by using the changes of variables of the previous lemma we obtain the general form of the weak Nullstellensatz and of the Noether position in constructive mathematics. 1.5. Theorem. (Weak Nullstellensatz and Noether position, 3) With the same hypotheses as in Theorem 1.1 but by only supposing that the discrete field K is nontrivial, we get the same conclusions, except that the change of variables is not necessarily linear. 1.6. Definition. Consider the case 1 ∈ / hf1 , . . . , fs i of the previous theorem. 1. We say that the change of variables (which eventually changes nothing at all) has put the ideal f in Noether position. 2. The integer r that intervenes in the Noether positioning is called the dimension of the polynomial system, or of the variety defined by the polynomial system, or of the quotient algebra A. By convention the null algebra is said to be of dimension −1. Remarks. 1) It is clear by the theorem that r = 0 if and only if the quotient algebra is finite nonzero, which implies (Lemma VI -3.14) that it is a nontrivial zero-dimensional ring. Conversely, if A is zero-dimensional and K nontrivial, Lemma IV -8.15 shows that the ring K[Y1 , . . . , Yr ] is zero-dimensional, which implies that r 6 0  (if r > 0, then an equality Yrm 1 + Yr Q(Y1 , . . . , Yr ) = 0 implies that K is trivial). Therefore there is no conflict with the notion of a zero-dimensional ring. Let us however note that the null algebra is still a zero-dimensional ring. 2) The link with the Krull dimension will be made in Theorem XIII -5.4. 3) A “non-Noetherian” version of the previous theorem for a reduced zerodimensional ring K is given in Exercise 3. §1. The Nullstellensatz without algebraic closure 391 1.7. Theorem. (Simultaneous Noether position) Let f1 , . . . , fk be finitely generated ideals of K[X] = K[X1 , . . . , Xn ]. 1. There exist integers r1 ,. . . , rk ∈ J−1..nK and a change of variables such that, by calling Y1 , . . . , Yn the new variables, we have for each j ∈ J1..kK the following situation. If rj = −1, then fj = h1i, otherwise a. K[Y1 , . . . , Yrj ] ∩ fj = {0}, b. for ` > rj , Y` is integral modulo fj over K[Y1 , . . . , Yrj ]. When K is infinite, we can take a linear changes of variables. 6 D(f1 ) ⊃ D(f2 ) ⊃ · · · ⊃ D(fk ) with the strictly increasing 2. If h1i = dimensions rj , we can insert radicals of finitely generated ideals such that the obtained sequence of dimensions is 0, 1, . . . , n. NB: In item 1, we say that the change of variables (which eventually changes nothing at all) has simultaneously put the ideals f1 , . . . , fk in Noether position. J 1. The same proof as for the previous theorem works considering the fact that a change of variables can simultaneously render a finite number of nonzero polynomials monic in the last variable. 2. Let Ai = K[X1 , . . . , Xi ]. Suppose for example that f1 is of dimension 2 and f2 of dimension 5. We have to insert ideals of dimensions 3 and 4. Suppose without loss of generality that the fi ’s are in Noether position with respect to X1 , . . . , Xn . We have by hypothesis A2 ∩ f1 = 0, with monic polynomials h3 ∈ A2 [X3 ] ∩ f1 , h4 ∈ A2 [X4 ] ∩ f1 , . . . , hn ∈ A2 [Xn ] ∩ f1 . We then have the following inclusions, h1 = f2 + hh5 , h4 i ⊇ h2 = f2 + hh5 i ⊇ f2 and D(f1 ) ⊇ D(h1 ) ⊇ D(h2 ) ⊇ D(f2 ), with h1 of dimension 3 and h2 of dimension 4, both in Noether position with respect to (X1 , . . . , Xn ).  The actual Nullstellensatz In Theorems 1.1 (infinite discrete field) and 1.5 (arbitrary discrete field) the Nullstellensatz is in the weak form; i.e. the proven equivalence is between, on the one hand, • the polynomial system does not have any zero in any finite nonzero Kalgebra, and on the other, • the corresponding quotient algebra is null. The general Nullstellensatz states under what condition a polynomial is annihilated at the zeros of a polynomial system. Here, since we do not have 392 VII. The dynamic method an algebraically closed field at our disposal, we will consider the zeros in the finite K-algebras and we obtain two Nullstellensätze depending on whether we only consider the reduced K-algebras or not. These two theorems generalize from a constructive point of view (with explicit “either-or’s”) the classical Nullstellensatz stated in the form of Theorem III -9.7. 1.8. Theorem. (Classical Nullstellensatz, general constructive version) Let K be a discrete field and f1 , . . . , fs , g be in K[X1 , . . . , Xn ]. Consider the quotient algebra A = K[X]/hf1 , . . . , fs i. 1. Either there exists a nonzero quotient B of A which is a reduced finite K-algebra with g ∈ B× (a fortiori g 6= 0 in B). 2. Or g is nilpotent in A (in other words, there exists an integer N such that g N ∈ hf1 , . . . , fs iK[X] ). J We use Rabinovitch’s trick. We introduce an additional indeterminate T and we notice that g is nilpotent in A if and only if the quotient algebra A0 for the polynomial system (f1 , . . . , fs , 1 − gT ) is null. We end with the weak Nullstellensatz: if A0 6= 0, we find a nonzero quotient B0 of A0 which is a finite dimensional K-vector space. As g is invertible in A0 , it is also invertible in B0 and in B = B0red , and as B 6= 0, g 6= 0 in B.  1.9. Theorem. (Nullstellensatz with multiplicities) Let K be a discrete field and f1 , . . . , fs , g be in K[X1 , . . . , Xn ]. Consider the quotient algebra A = K[X]/hf1 , . . . , fs i. 1. Either there exists a quotient B of A which is a finite dimensional K-vector space with g 6= 0 in B. 2. Or g = 0 in A (in other words, g ∈ hf1 , . . . , fs iK[X] ). Proof using Gröbner bases. If when placing in the Noether position we have r = 0, the result is clear. The delicate point is when r > 1. Suppose the ideal is in Noether position. We consider an elimination order for the variables (Y1 , . . . , Yr ) and the normal form of g with respect to the corresponding Gröbner basis of f. For “everything to remain as is” after a specialization Yi 7→ αi = Yi in a quotient ring L of K[Y1 , . . . , Yr ], it suffices that the leading coefficients in the Gröbner basis of f and in the normal form of g (those coefficients are elements of K[Y1 , . . . , Yr ]) specialize in invertible elements of L. If we have at our disposal enough distinct elements in K to find suitable αi ’s in K we can take L = K, otherwise we consider the product h of all the leading coefficients previously considered, and we replace K[Y1 , . . . , Yr ] with a nonzero quotient L, strictly finite over K, in which h is invertible (this is possible by Theorem 1.8, applied to h with no §1. The Nullstellensatz without algebraic closure 393 equation fi ). The solution to our problem is then given by the algebra B = L ⊗K[Y1 ,...,Yr ] A, which is a quotient of A strictly finite over K.  Syzygies Another important consequence of the change of variables lemma (Lemma 1.4) is the following theorem. 1.10. Theorem. Let K be a discrete reduced zero-dimensional ring. 1. Every finitely presented K-algebra is a strongly discrete coherent ring. 2. Consequently every finitely presented module over such an algebra is coherent and strongly discrete. J We prove the first item for K[X1 , . . . , Xn ] in the case where K is a discrete field. The zero-dimensional ring case is deduced from it by the usual technique (elementary local-global machinery no. 2). Then item 2 is a consequence of Theorem IV -4.3. We give a proof by induction over n, the n = 0 case being clear. Suppose n > 1 and let B = K[X1 , . . . , Xn ]. We must show that an arbitrary finitely generated ideal f = hf1 , . . . , fs i is finitely presented and detachable. If f = 0 then it is clear, otherwise we can assume by applying Lemma 1.4 that fs is monic in Xn of degree d. If s = 1, the annihilator of f1 is null, and therefore also the module of syzygies for (f1 ). The ideal f is detachable thanks to Euclidean division with respect to Xn . If s > 2, let A = K[X1 , . . . , Xn−1 ]. The ring A is strongly discrete coherent by induction hypothesis. Let Ri be the syzygy that corresponds to the equality fi fs − fs fi = 0 (i ∈ J1..s − 1K). Modulo the syzygies Ri we can rewrite each Xnk fi = gk,i , for k ∈ J0..d−1K and i ∈ J1..s−1K as vectors in the free A-module L ⊆ B with basis (1, Xn , . . . , Xnd−1 ). Modulo the syzygies Ri every syzygy for (f1 , . . . , fs ) with coefficients in B can be rewritten as a syzygy for V = (g0,1 , . . . , gd−1,1 , . . . , g0,s−1 , . . . , gd−1,s−1 ) ∈ Ld(s−1) with coefficients in A. As L is a free A-module, it is strongly discrete coherent. We have in particular a finite number of A-syzygies for V that generate them all. Let us call them S1 , . . . , S` . Each A-syzygy Sj for V can be read as a B-syzygy Sj0 for (f1 , . . . , fs ). Finally, the syzygies Ri and Sj0 generate the B-module of the syzygies for (f1 , . . . , fs ). Concerning the strongly discrete character, we proceed in the same way. To test if an element of B is in f we start by dividing it by fs with respect to Xn . We then obtain a vector in the A-module L for which we must test whether it belongs to the submodule generated by the gi,j ’s.  394 VII. The dynamic method 2. The dynamic method I do not believe in miracles. A constructive mathematician. In classical mathematics proofs of existence are rarely explicit. Two essential obstacles appear each time that we try to render such a proof explicit. The first obstacle is the application of LEM. For instance, if you consider the proof that every univariate polynomial over a field K admits a decomposition into prime factors, you have a kind of algorithm whose key ingredient is: if P is irreducible all is well, if P can be decomposed into a product of two factors of degree > 1, all is still well, by induction hypothesis. Unfortunately the disjunction used to make the proof work “P is irreducible or P can be decomposed into a product of two factors of degree > 1” is not explicit in general. In other words, even if a field is defined constructively, we cannot be sure that this disjunction can be made explicit by an algorithm. Here we find ourselves in the presence of a typical case where LEM “is an issue,” because the existence of an irreducible factor cannot be the object of a general algorithm. The second obstacle is the application of Zorn’s lemma, which allows us to generalize to the uncountable case the usual proofs by induction in the countable case. For example in Modern Algebra by van der Waerden the second pitfall is avoided by limiting ourselves to the countable algebraic structures. However, we have two facts that are now well established from experience: • The universal concrete results proven by the dubious abstract methods above have never been contradicted. We have even very often successfully extracted unquestionable constructive proofs from them. This would suggest that even if the abstract methods are in some way incorrect or contradictory, they have until now only been used with a sufficient amount of discernment. • The key concrete results proven by the dubious abstract methods have not been invalidated either. On the contrary, they have often been validated by algorithms proven constructively.1 Faced with this slightly paradoxical situation: the abstract methods are a priori dubious, but they do not fundamentally deceive us when they give us a result of a concrete nature. There are two possible reactions. 1 On this second point, our assertion is less clear. If we return to the example of the decomposition of a polynomial into prime factors, it is impossible to achieve the result algorithmically over certain fields. §2. The dynamic method 395 Either we believe that the abstract methods are fundamentally correct because they reflect a “truth,” some sort of “ideal Cantor universe” in which exists the true semantic of mathematics. This is the stance taken by Platonic realism, defended for instance by Gödel. Or we think that the abstract methods truly are questionable. But then, unless we believe that mathematics falls within the domain of magic or of miracles, it must be explained why classical mathematics makes such few mistakes. If we believe in neither Cantor, nor miracles, we are led to believe that the abstract proofs of concrete results necessarily contain sufficient “hidden ingredients” to construct the corresponding concrete proofs. This possibility of constructively certifying concrete results obtained by dubious methods, if we manage to execute it systematically enough, is in line with Hilbert’s program. The dynamic method in constructive algebra is a general method for decrypting abstract proofs from classical mathematics when they use “ideal” objects whose existence relies on non-constructive principles: LEM and the axiom of choice. The ambition of this new method is to “give a constructive semantic for the usually practiced classical mathematics.” We replace the abstract objects from classical mathematics with incomplete but concrete specifications of these objects. This is the constructive counterpart of the abstract objects. For example a finite potential prime ideal (a notion that will be introduced in Section XV -1) is given by a finite number of elements in the ideal and a finite number of elements in its complement. This constitutes an incomplete but concrete specification of a prime ideal. More precisely, the dynamic method aims at giving a systematic interpretation of classical proofs that use abstract objects by rereading them as constructive proofs with respect to constructive counterparts of these abstract objects. This is in keeping with the thought-process behind certain techniques developed in Computer Algebra. Here we are thinking about “lazy evaluation,” or “dynamic evaluation,” i.e. lazy evaluation managed as a tree structure, as in the D5 system [55] which performs this tour de force very innocently: compute with certainty in the algebraic closure of an arbitrary field, even though we know that this object (the algebraic closure) cannot be constructed in all generality. In the current chapter an incomplete specification of the splitting field of a separable polynomial over a field K will be given by a K-algebra A and a finite group of automorphisms G of this algebra. In A the polynomial can be decomposed into linear factors such that a splitting field is a quotient of A, and G is an approximation of the Galois group in a suitable sense (in particular, it contains a copy of the Galois group). We will explain how 396 VII. The dynamic method to compute with such an approximation without ever making a mistake: when an oddity occurs, we know how to better the approximation during computation and to make the oddity disappear. Splitting fields and Galois theory in classical mathematics In this subsection we will offer a possible presentation of the splitting field of an arbitrary polynomial and of the Galois theory of a separable polynomial in classical mathematics. This allows us to understand the “detours” that we will be obligated to take to have an entirely constructive theory. If f is a monic polynomial, we work with Q the universal splitting algebra of f , A = AduK,f in which f (T ) = i (T − xi ), with Sn as a group of automorphisms (see Section III -4). This algebra being a finite dimensional K-vector space, all the ideals are themselves finite dimensional K-vector spaces and we have the right to consider a strict ideal m of maximum dimension as a K-vector space (all of this by applying LEM). This ideal is automatically a maximal ideal. The quotient algebra L = A/m is then a splitting field for f . The group G = St(m) operates on L and the fixed field of G, LG = K1 , possesses the two following properties: • L/K1 is a Galois extension with Gal(L/K1 ) ' G. • K1 /K is an extension obtained by successive additions of pth roots, where p = char(K). Q Moreover, if L0 is another splitting field for f with f = i (T − ξi ) in L0 [T ], we have a unique homomorphism of K-algebras ϕ : A → L0 satisfying the equalities ϕ(xi ) = ξi for i ∈ J1..nK. We can then show that Ker ϕ, which is a maximal ideal of A, is necessarily a conjugate of m under the action of Sn . Thus the splitting field is unique, up to isomorphism (this isomorphism is not unique if G 6= {Id}). Finally, when f is separable, the situation is simplified because the universal splitting algebra is étale, and K1 = K. The previous approach is possible from a constructive point of view if the field K is separably factorial and if the polynomial f is separable, because then, since the universal splitting algebra A is étale, it can be decomposed into a finite product of étale fields over K (Corollary VI -1.13). But when the field is not separably factorial, we face an a priori insurmountable obstacle, and we cannot hope to systematically and algorithmically obtain a splitting field that is strictly finite over K. If the characteristic is finite and if the polynomial is not separable, we need stronger factorization properties to construct a splitting field (the question is delicate, and very well presented in [MRR]). §3. Introduction to Boolean algebras 397 Lazily bypassing the obstacle What is generally proposed in Computer Algebra is, for instance in the case of a separable polynomial, at the very least to avoid computing a universal resolvent R (as in Theorem III -6.15) whose degree, n!, promptly renders computations impractical. Here, we find ourselves in the most general framework possible, and we avoid all recourse to the factorization of the polynomials which can turn out to be impossible, or which, when possible, has the risk of being too costly. The idea is to use the universal splitting algebra A, or a Galois quotient A/h1 − ei, with a Galoisian idempotent e (see page 362) as a substitute for L. This “dynamic splitting field” can be managed without too many problems because each time something strange happens, which indicates that the substitute of L is not entirely satisfying, we are able to “immediately repair the oddity” by computing a Galoisian idempotent that refines the previous one, and in the new approximation of the splitting field, the strange thing has disappeared. To develop this point of view we will need to better know the universal splitting algebra, and Section 4 is dedicated to this objective. Moreover, we will study in Section 5 a dynamic and constructive version of the splitting field of a (not necessarily separable) polynomial. 3. Introduction to Boolean algebras A lattice is a set T equipped with an order relation 6 for which there exist a minimum element, denoted by 0T , a maximum element, denoted by 1T , and every pair of elements (a, b) admits a least upper bound, denoted by a ∨ b, and a greatest lower bound, denoted by a ∧ b. A mapping from one lattice to another is called a lattice homomorphism if it respects the operations ∨ and ∧ as well as the constants 0 and 1. The lattice is called a distributive lattice when each of the two operations ∨ and ∧ is distributive with respect to the other. We will give a succinct study of the structure of distributive lattices and of structures that relate back to them in Chapter XI. 3.1. Proposition and definition. (Boolean algebras) 1. By definition a ring B is a Boolean algebra if and only if every element is idempotent. Consequently 2 =B 0 (because 2 =B 4). 2. We can define over B an order relation x 4 y by: x is a multiple of y, i.e. hxi ⊆ hyi. Then, two arbitrary elements admit a lower bound, their lcm x ∧ y = xy, and an upper bound, their gcd x ∨ y = x + y + xy. We thus obtain a distributive lattice with 0 as its minimum element and 1 as its maximum element. 398 VII. The dynamic method 3. For every x ∈ B, the element x0 = 1 + x is the unique element that satisfies the equalities x∧x0 = 0 and x∨x0 = 1, we call it the complement of x. Notation conflict. Here we find ourselves with a conflict of notation. Indeed, divisibility in a ring leads to a notion of the gcd, which is commonly denoted by a ∧ b, because it is taken as a lower bound (a divides b being understood as “a smaller than b” in the sense of the divisibility). This conflicts with the gcd of the elements in a Boolean algebra, which is an upper bound. This is due to the fact that the order relation has been reversed, so that the elements 0 and 1 of the Boolean algebra are indeed the minimum and the maximum in the lattice. This inevitable conflict will appear in an even stronger sense when we will consider the Boolean algebra of the idempotents of a ring A. Even though all the elements of a Boolean algebra are idempotents we will keep the terminology “fundamental system of orthogonal idempotents2 ” for a finite family (xi ) of pairwise orthogonal elements (i.e. xi xj = 0 for i 6= j) with sum 1. This convention is all the more justified in that we will mainly preoccupy ourselves with the Boolean algebra that naturally appears in commutative algebra: that of the idempotents of a ring A. Discrete Boolean algebras 3.2. Proposition. (Every discrete Boolean algebra behaves in computations as the algebra of the detachable subsets of a finite set) Let (r1 , . . . , rm ) be a finite family in a Boolean algebra B. Q Q Let si = 1−ri and, for a finite subset I of {1, . . . , m}, let rI = i∈I ri j ∈I / sj . 1. The rI ’s form a fundamental system of orthogonal idempotents and they generate the same Boolean algebra as the ri ’s. 2. Suppose that B is discrete. Then, if there are exactly N nonzero elements rI , the Boolean subalgebra generated by the ri ’s is isomorphic to the algebra of finite subsets of a set with N elements. As a corollary we obtain the following fact and the fundamental structure theorem that summarizes it. Recall that we denote by Pf (S) the set of finite subsets of a set S. In a discrete Boolean algebra an element e is called an atom if it satisfies one of the following equivalent properties. • e is minimal among the nonzero elements. • e 6= 0 and for every f , f is orthogonal or greater than e. 2 It would be more natural to say: fundamental system of orthogonal elements. §3. Introduction to Boolean algebras 399 • e 6= 0 and for every f , ef = 0 or e, or ef = 0 or e(1 − f ) = 0. • e 6= 0 and the equality e = e1 + e2 with e1 e2 = 0 implies e1 = 0 or e2 = 0. We also say that e is indecomposable. It is clear that an automorphism of a discrete Boolean algebra preserves the set of atoms and that for two atoms e and f , we have e = f or ef = 0. 3.3. Theorem. (Structure theorem) 1. Every finite Boolean algebra is isomorphic to the algebra of the detachable subsets of a finite set. 2. More precisely, for a Boolean algebra C the following properties are equivalent. a. C is finite. b. C is discrete and finitely generated. c. The set S of atoms is finite, and 1C is the sum of this set. In such a case C is isomorphic to the Boolean algebra Pf (S). Boolean algebra of the idempotents of a commutative ring 3.4. Fact. The idempotents of a ring A form a Boolean algebra, denoted by B(A), with the operations ∧, ∨, ¬ and ⊕ given by r ∧ s = rs, r ∨ s = r + s − rs , ¬ r = 1 − r and r ⊕ s = (r − s)2 . If A is a Boolean algebra, B(A) = A. If ϕ : A → B is a morphism of rings, its restriction to B(A) gives a morphism B(ϕ) : B(A) → B(B). J It suffices to show that if we equip the set B(A) with the laws ⊕ and ∧ we obtain a Boolean algebra with 0A and 1A as neutral elements. The computations are left to the reader.  Theorem 3.3 has the following immediate consequence. 3.5. Fact. The following properties are equivalent. 1. The Boolean algebra of the idempotents B(A) is finite. 2. The ring A is a finite product of nontrivial connected rings. J It suffices to show that 1 implies 2. If e is an atom of B(A), the ring A[1/e] is nontrivial and connected. If B(A) is finite, the finite set A of its atoms forms a fundamental system ofQorthogonal idempotents of A, and we have a canonical isomorphism A → e∈A A[1/e].  Remark. If B(A) has a single element, A is trivial and the finite product is an empty product. This also applies to the following corollary. 400 VII. The dynamic method 3.6. Corollary. The following properties are equivalent. 1. B(A) is finite and A is zero-dimensional. 2. A is a finite product of nontrivial zero-dimensional local rings. Galoisian elements in a Boolean algebra 3.7. Definition. 1. If G is a group that operates over a Boolean algebra C, we say that the pair (C, G) is a G-Boolean algebra. 2. An element e of a G-Boolean algebra C is said to be Galoisian if its orbit under G is a fundamental system of orthogonal idempotents. 3. A G-Boolean algebra is said to be transitive if 0 and 1 are the only elements fixed by G. Definition VI -7.21 of Galoisian idempotents agrees with the previous definition when a finite group G acts on a k-algebra C and when we consider the action of G over the Boolean algebra Bo(C). Now we study the case where the group is finite and the algebra discrete. 3.8. Fact. Let G be a finite group and C be a transitive, discrete and nontrivial G-Boolean algebra. Let e 6= 0 in C, and {e1 , . . . , ek } be the orbit of e under G. The following properties are equivalent. 1. The element e is Galoisian. 2. For all i > 1, e1 ei = 0. 3. For all σ ∈ G, eσ(e) = e or 0. 4. For all i 6= j ∈ {1, . . . , k}, ei ej = 0. J Item 1 clearly implies the others. Items 2 and 4 are easily equivalent and imply item 3. Item 3 means that for every σ, σ(e) > e or σ(e)e = 0. If we have σ(e) > e for some σ, then we obtain e 6 σ(e) 6 σ 2 (e) 6 σ 3 (e) 6 . . . , which gives us e = σ(e) when considering an ` such that σ ` = 1G . Therefore, item 3 implies item 2. Finally, if item 4 is satisfied, the sum of the orbit is an element > 0 fixed by G therefore equal to 1.  3.9. Lemma. (Meeting of two Galoisian elements) Let G be a finite group and C be a nontrivial discrete G-Boolean algebra. Given two Galoisian elements e, f in (C, G), let G.e = {e1 , . . . , em }, E = StG (e), and F = StG (f ). 1. There exists a τ ∈ G such that f τ (e) 6= 0. P P 2. If e 6 f , then E ⊆ F and f = i:ei 6f ei = σ∈F/E σ(e). Suppose C is transitive and ef 6= 0. We obtain the following results. §3. Introduction to Boolean algebras 401 3. The element ef is Galoisian, with stabilizer E ∩ F , and the orbit G.ef consists of nonzero elements of (G.e)(G.f ). In particular, G.ef generates the same Boolean subalgebra of C as G.e ∪ G.f . 4. If E ⊆ F , then e 6 f . P J 1. Indeed, f = i f ei . 2. Generally, for x0 = σ(x) where x 6= 0 satisfies x 6 f , let us show (?) [a] [b] [c] x0 6 f =⇒ f x0 6= 0 =⇒ σ(f ) = f =⇒ x0 6 f. We obtain [a] by multiplying x0 6 f by x0 , [b] by multiplying x0 6 σ(f ) (deduced from x 6 f ) by f and by using the fact that f is Galoisian and finally [c] by applying σ to x 6 f . The assertions of (?) are therefore P equivalences. We deduce StG (x) ⊆ StG (f ). If in addition, 1 = x0 ∈G.x x0 , then P P P f = x0 ∈G.x f x0 = x0 ∈G.x|x0 6f x0 = σ∈F/StG (x) σ(x). This applies to x = e. 3. Let G.f = {f1 , . . . , fp }. For σ ∈ G there exist i, j such that e f σ(ef ) = e f ei fj , which is equal to ef if σ ∈ E ∩ F and to 0 otherwise. By Fact 3.8, ef is therefore a Galoisian element with stabilizer E ∩ F . Now assume ei fj 6= 0. Then, by item 1, there exists a τ ∈ G such that τ (ef )ei fj 6= 0. Since e and f are Galoisian, this implies τ (e) = ei and τ (f ) = fj , so ei fj ∈ G.ef . 4. Immediately results from 3.  The paradigmatic application of the next theorem is the following. We have a nontrivial connected ring k, (k, C, G) is a pre-Galois (cf. Definition 4.2) or Galois algebra and we take C = B(C). 3.10. Theorem. (Galois structure theorem, 1) Let G be a finite group and C be a transitive, discrete and nontrivial G-Boolean algebra. 1. (Structure of the transitive finite G-Boolean algebras) The algebra C is finite if and only if there exists an atom e. In this case the structure of (C, G) is entirely characterized by E = StG (e). More precisely, the idempotent e is Galoisian, G.e is the set of atoms, C ' Pf (G.e), G operates over G.e as it does over G/E, and over C as it does over Pf (G/E). In particular, |C| = 2| G:E | . We will say that e is a Galoisian generator of C. 2. Every finite family of elements of C generates a finite G-subalgebra. 3. The Boolean algebra C cannot have more than 2|G| elements. 4. Let e and f be Galoisian elements, E = StG (e) and F = StG (f ). a. There exists a σ ∈ G such that f σ(e) 6= 0. 402 VII. The dynamic method b. If ef = 6 0, ef is a Galoisian generator of the G-subBoolean algebra of G generated by e and f , and StG (ef ) = E ∩ F . P c. If e 6 f (i.e. f e = e), then E ⊆ F and f = σ∈F/E σ(e). 5. (Characterization of the Galoisian elements in a finite G-subalgebra) Let e be a Galoisian element and f be a sum of r elements of G.e, including e. Let E = StG (e) and F = StG (f ). Then the following properties are equivalent. a. f is Galoisian. P b. E ⊆ F and f = σ∈F/E σ(e). c. |F | = r × |E|. d. |F | > r × |E| . J 1. If C is finite there exists an atom. If e is an atom, for every σ ∈ G, we have e σ(e) = 0 or e, so e is Galoisian (Fact 3.8). The rest follows by taking into account Theorem 3.3. 2. Consider the Boolean subalgebra C 0 ⊆ C generated by the orbits of the elements of the given finite family. C 0 is finitely generated and discrete therefore finite. Consequently its atoms form a finite set S = {e1 , . . . , ek } and C 0 is isomorphic to the Boolean algebra of the finite subsets of S P C0 = i∈F ei | F ∈ Pk . 0 Clearly, G operates on C . For σ ∈ G, σ(e1 ) is an atom, so e1 is Galoisian (Fact 3.8 3) and (e1 , . . . , ek ) is its orbit. 3. Results from 1 and 2. 4. Already seen in Lemma 3.9. 5. We write σ1 = 1G , G.e = {σ1 .e, . . . , σk .e} with k = | G : E |, as well as f = σ1 .e + · · · + σr .e. a ⇒ b. We apply item 4. b ⇒ a. For τ ∈ F , τ.f = f . For τ ∈ / F , F.e ∩ (τ F ).e = ∅, and so f τ (f ) = 0. b ⇒ c. We have F.e = {1G .e, σ2 .e, . . . , σr .e}, and since E is the stabilizer of e, we obtain |F | = r × |E|. d ⇒ b. We have F = { τ | τ {σ1 .e, . . . , σr .e} = {σ1 .e, . . . , σr .e} }. Hence the inclusion F.e ⊆ {σ1 .e, . . . , σr .e}, and F.e = {σ1 .e, . . . , σs .e} with s 6 r 6 k. The stabilizer of e for the action of F on F.e is equal to E ∩ F . Therefore |F | = |F.e| |E ∩ F | = s |E ∩ F | 6 r |E ∩ F | 6 r |E| . Therefore if |F | > r |E|, we have |F.e| = r and |E| = |E ∩ F |, i.e. E ⊆ F and F.e = {σ1 , . . . , σr }.  Under the hypotheses of Theorem 3.10 we can compute a Galoisian element e1 such that G.e1 and G.e generate the same Boolean algebra, by means of Algorithm 3.11. §3. Introduction to Boolean algebras 403 3.11. Algorithm. Computation of a Galoisian element and of its stabilizer. Input: e: nonzero element of a Boolean algebra C; G: finite group of automorphisms of C; Se = StG (e). # Suppose that 0 and 1 are the only fixed points for the action of G on C. Output: e1 : a Galoisian element of C such that G.e1 generates the same Boolean algebra as G.e; H: the stabilizer subgroup of e1 . Local variables: h: in C; σ: in G; L: list of elements of G/Se ; E: corresponding set of elements of G/Se ; # G/Se is the set of left cosets of Se . # G/Se is a system of representatives of the left cosets of Se Begin E ← ∅; L ← [ ]; e1 ← e; for σ in G/Se do h ← e1 σ(e); if h 6= 0 then e1 ← h; L ← L • [σ]; E ← E ∪ {σSe } end if; end for;  S H ← StG (E) # H = α ∈ G | ∀σ ∈ L, ασ ∈ τ ∈L τ Se . End. Correctness proof of the algorithm. We denote by G/S a system of representatives of the left cosets of S. Let us write e1 = eσ2 (e) · · · σr (e) where the σi ’s are all the σ’s which have successfully passed the test h 6= 0 in the algorithm (and σ1 = Id). We want to show that e1 is an atom of C 0 (the Boolean algebra generated by G.e), which is the same as saying that for all σ ∈ G/S we have e1 σ(e) = e1 or 0 (since C 0 is generated by the τ (e)’s). However, σ has been tested by the algorithm, therefore either σ is one of the σi ’s, in which case e1 σ(e) = e1 , or gσ(e) = 0 for some idempotent g which divides e1 , and a fortiori e1 σ(e) = 0. Let us show that the stabilizer H of e1 indeed satisfies the required condition. Q We have e1 = τ ∈L τ (e), and for σ ∈ G we have the equivalences S σ ∈ τ ∈L τ S ⇐⇒ e1 σ(e) = e1 ⇐⇒ e1 6 σ(e), and S σ∈ / τ ∈L τ S ⇐⇒ e1 σ(e) = 0.  Q For α ∈ G we have α(e1 ) = τ ∈L α τ (e) . This is an element of the orbit  of e1 , it is equal to e1 if and only if e1 6 α(e1 ), if and only if e1 6 α σ(e)  for each σ in L. Finally, for some arbitrary σ in G, e1 6 α σ(e) if and S only if ασ is in τ ∈L τ S.  404 VII. The dynamic method Note that the element e1 obtained as a result of this computation depends on the order in which the finite set G/S is enumerated and that there is no (intrinsic) natural order on this set. Example. We can ask ourselves if there exists a relation between the stabilizer S of e and the stabilizer H of a Galoisian element e1 associated with e. Here is an example that shows that there is no close relation, with G = S6 operating on AduQ,f with the polynomial f (T ) = T 6 − 4T 3 + 7. We consider the idempotent e = 1/6(x35 x36 − 2x35 − 2x36 + 7) that we compute from a factorization of the minimal polynomial of the element x5 + x6 (cf. Proposition 6.6). We find St(e) = S = h(1432), (12), (56)i ' S4 × S2 with |S| = 48, and St(e1 ) = H = h(24), (123456)i = (h(13), (135)i × h(24), (246)i) o h(14)(25)(36)i with H ' (S3 × S3 ) o S2 , |H| = 72, and S ∩ H = h(24), (1234)(56)i dihedral of order 8. In short, H (not even the conjugacy class of H in G) cannot be computed solely from S. Indeed, the list L of left cosets selected by the algorithm does not only depend on subgroup S of G but also on the way in which G operates on C. 4. The universal splitting algebra (2) Here is a small reading guide for the end of this chapter. In Section III -6, we have seen that if k is an infinite discrete field, if f is separable and if we are able to decompose a Galois resolvent into a product of irreducible factors, then the universal splitting algebra A is isomorphic to Lr , where L is a splitting field for f and r = | Sn : G |, where G is a subgroup of Sn which is identified with Gal(L/k). Moreover, [ L : k ] = |G|. We will see that this ideal situation can serve as a guideline for a lazy approach to the construction of a splitting field. What replaces the complete factorization of a Galois resolvent is the discovery or the construction of a Galoisian idempotent. Then, we have a situation analogous to the ideal situation previously described: A ' Br , where B is a Galois quotient of A, equipped with a group of automorphisms that can be identified with a subgroup G of Sn , with [ B : k ] = |G| and r = | Sn : G |. Throughout Section 4, k is a commutative ring, Pn f = T n + k=1 (−1)k sk T n−k ∈ k[T ] is monic of degree n, and A = Aduk,f is the universal splitting algebra of f over k. §4. The universal splitting algebra (2) 405 Recall that the universal splitting algebra A = Aduk,f = k[X]/hS1 − s1 , . . . , Sn − sn i = k[X]/J (f ) (where the Si ’s are the elementary symmetric polynomials in the Xi ’s) is the algebra which solves the universal problem linked to the decomposition of the polynomial f into a product of factors T − ξj (cf. Fact III -4.2). The k-module A = Aduk,f is free, and a basis is formed by the “monomials” dn−1 xd11 · · · xn−1 such that for k ∈ J0..n−1K, we have dk 6 n−k (see Fact III -4.4). We will denote this basis by B(f ). By a change of the base ring, we obtain the following important fact (to be distinguished from Fact III -4.3). 4.1. Fact. (Changing the base ring for a universal splitting algebra) Let ρ : k → k1 be a k-algebra. Let f ρ be the image of f in k1 [T ]. Then, the algebra ρ? (Aduk,f ) = k1 ⊗k Aduk,f is naturally isomorphic to Aduk1 ,f ρ . Galois quotients of pre-Galois algebras If C is a k-algebra, we denote by Autk (C) its group of automorphisms. We now give a definition that allows us to place the universal splitting algebra in a framework that is a little more general and useful. 4.2. Definition. (pre-Galois algebras) A pre-Galois algebra is given by a triple (k, C, G) where 1. C is a k-algebra with k ⊆ C, k a direct summand in C, 2. G is a finite group of k-automorphisms of C, 3. C is a projective k-module of constant rank |G|, 4. for every z ∈ C, we have CC/k (z)(T ) = CG (z)(T ). Remark. Recall that by Lemma VI -4.3, if B is a faithful strictly finite k-algebra , then k (identified with its image in B) is a direct summand in B. Consequently item 1 above results from item 3. Examples. 1) From what we already know on the universal splitting algebra (Section III -4) and by Lemma III -5.12, for every monic polynomial f , the triple (k, Aduk,f , Sn ) is a pre-Galois algebra. 2) Artin’s theorem (Theorem VI -7.11) shows that every Galois algebra is a pre-Galois algebra. The reader should refer to page 362 for the definitions of a Galoisian idempotent, of a Galoisian ideal and of a Galois quotient. 406 VII. The dynamic method 4.3. Theorem. (Galoisian structure theorem, 2) Consider a pre-Galois algebra (k, C, G). Let e be a Galoisian idempotent of C, and {e1 , . . . , em } its orbits under G. Let H be the stabilizer of e = e1 and r = |H|, so that rm = |G|. Let Ci = C[1/ei ] for (i ∈ J1..mK). Finally, let π : C → C1 be the canonical projection. 1. (k, C1 , H) is a pre-Galois algebra (in other words a Galois quotient of a pre-Galois algebra is a pre-Galois algebra). 2. The Ci ’s are pairwise isomorphic k-algebras, and C ' Cm 1 . 3. The algebra C1 is a projective k-module of constant rank r = |H|. The restriction of π to k, and even to CG , is injective, and k (identified with its image in C1 ) is a direct summand in C1 . G 4. The group H operates on C1 and CH 1 is canonically isomorphic to C ; H H G more precisely, C1 = π(C ) = π(C ). 5. For all z ∈ C1 , CC1 /k (z)(T ) = CH (z)(T ). 6. Let g1 be a Galoisian idempotent of (k, C1 , H), K its stabilizer in H, and g 0 ∈ e1 C be such that π(g 0 ) = g1 . Then, g 0 is a Galoisian idempotent of (k, C, G), its stabilizer is K, and we have a canonical isomorphism C1 /h1 − g1 i ' C/h1 − g 0 i. 7. If (k, C, G) is a Galois algebra, then so is (k, C1 , H). J Item 1 is a partial synthesis of items 2, 3, 4, 5. Item 2 is obvious. An immediate consequence is the first assertion of item 3. Let (τ1 , τ2 , . . . , τm ) be a system of representatives for G/H, with τ1 = Id and τi (e1 ) = ei . Let us show that the restriction of π to CG is injective. If a ∈ CG and e1 a = 0, then, by transforming by the τj ’s, all the ej a’s are null, and hence so is their sum, a. Finally, π(k) is a direct summand in C1 by Lemma VI -4.3. H H 4. Let us first show CH 1 = π(C ). Let z ∈ C1 and u ∈ C such that π(u) = z. H Since z ∈ C1 , for σ ∈ H, σ(u) ≡ u mod h1 − e1 i, i.e. e1 σ(u) = e1 u or, since σ(e1 ) = e1 , σ(e1 u) = e1 u. By letting y = e1 u, we see that y is H-invariant and π(y) = z. Let us now show that z ∈ π(CG ). Let P P P v = i τi (y) = i τi (e1 y) = i ei τi (y). As π(ei ) = δ1i , we have π(v) = π(y). The element v constructed thus is independent of the system of representatives for G/H. Indeed, if (τi0 ) is another system of representatives, even if it means reordering the indices, we can assume that τi0 H = τi H, and so, y being H-invariant, τi0 (y) = τi (y). For σ ∈ G, the (σ ◦τi )’s form a system of representatives for G/H, so σ(v) = v: the element v is G-invariant. 5. We have a decomposition C = C01 ⊕· · ·⊕C0m , where C0j = ej C is a finitely generated projective k-module of rank r and the restriction π : C01 → C1 is §4. The universal splitting algebra (2) 407 an isomorphism of k-modules. For all y ∈ C, we have m m Y Y Y  CC/k (y)(T ) = CC0j /k (ej y)(T ) and CG (y)(T ) = T − (τj ◦ τ )(y) . j=1 τ ∈H j=1 C01 Let y be the unique element of such that π(y) = z. The equality on the left-hand side gives CC/k (y)(T ) = T (m−1)r CC1 /k (z)(T ). Next, apply π to the equality on the right-hand side by letting (τj ◦τ )(y) ∈ C0j (use y = e1 y and apply τj ◦ τ ). We then obtain CG (y)(T ) = T (m−1)r CH (z)(T ). Hence CC1 /k (z)(T ) = CH (z)(T ). 6. Taking into account the fact that the restriction of π to e1 C is an isomorphism we have g 02 = g 0 = g 0 e1 . Similarly for σ ∈ H we have σ(g 0 ) = g 0 if σ ∈ K, or g 0 σ(g 0 ) = 0 if σ ∈ / K. Finally, for σ ∈ G \ H, e1 σ(e1 ) = 0, and so g 0 σ(g 0 ) = 0. This shows that g 0 is a Galoisian idempotent of C with stabilizer K. The canonical isomorphism is immediate. 7. Item 4 implies that k is the set of fixed points. It remains to see that H is separating. If σ ∈ H = St(e) isP distinct of the identity, we have some elements ai and xi ∈ C such that i ai (σ(xi ) − xi ) = 1. This equality remains true if we localize at e.  Case where the Boolean algebra of a universal decomposition algebra is discrete It is desirable that one can test the equality of two idempotents e1 , e2 in the universal splitting algebra A, which is the same as knowing how to test e = 0 for an arbitrary idempotent of A (as in every additive group). However, eA is a finitely generated projective k-module and e = 0 if and only if ReA (X) = 1 (Theorem V -8.4 item 6). Since the rank polynomial ReA can be explicitly computed, we can test the equality of two idempotents in A if and only if we can test the equality of two idempotents in k. The above argument works in a slightly more general framework and we obtain the following result. 4.4. Fact. If B(k) is a discrete Boolean algebra, so is B(A). More generally , if C is a strictly finite k-algebra, and if B(k) is discrete, then B(C) is discrete. 4.5. Fact. If (k, C, G) is a pre-Galois algebra, every idempotent e of C fixed by G is an element of k. J The characteristic polynomial CG (e) = (T − e)|G| belongs to k[T ], so its constant coefficient, which is equal to ±e, is in k.  408 VII. The dynamic method 4.6. Fact. Let (k, C, G) be a pre-Galois algebra with k connected and nontrivial, then 1. 0 and 1 are the only idempotents of C fixed by G, 2. B(C) is discrete, 3. every atom of B(C) is a Galoisian idempotent, 4. two atoms are conjugated under G, 5. an idempotent e 6= 0 is Galoisian if and only if its orbit under G is formed of pairwise orthogonal elements, 6. if f is an idempotent 6= 0, the ideal h1 − f i is Galoisian if and only if its orbit under G is formed of pairwise comaximal ideals. J Items 1 and 2 clearly result from Facts 4.5 and 4.4. 3. If e is an atom, so is σ(e), therefore σ(e) = e or eσ(e) = 0. Thus two elements of the orbit of e are orthogonal, so the sum of the orbit of e is a nonzero idempotent fixed by G; it is equal to 1. 4. If e0 is another atom, it is equal to the sum of the e0 ei ’s, where ei ranges over the orbit of e, and since the ei ’s are atoms, each ei e0 is zero or equal to ei . 5. See Fact 3.8. 6. Stems from 5 since h1 − f, 1 − f 0 i = h1 − f f 0 i for idempotents f and f 0 . Theorem 3.3 implies that the Boolean algebra B(C) is finite if and only if the indecomposable idempotents form a finite set (they are necessarily pairwise orthogonal) and if they generate B(C). Comment. A set X is said to be bounded if we know an integer k which is an upper bound of the number of elements in X, i.e. more precisely, if for every finite family (bi )i∈J0..kK in X, we have bi = bj for two distinct indices. In classical mathematics this implies that the set is finite, but from a constructive point of view many distinct situations can occur. A common situation is that of a bounded and discrete Boolean algebra C for which we do not know of an atom with certainty. The finitely generated ideals of C, all principal, are identified with elements of C, so C is identified with its own Zariski lattice Zar C.3 Moreover, in classical mathematics the atoms are in bijection with the prime ideals (all maximal) of C via e 7→ h1 − ei. Thus the set of atoms of C (supposed bounded) is identified with Spec C. We therefore once again find in this special case the following general fact: the Zariski lattice is the constructive, practical and “point-free” version of the Zariski spectrum, a topological space whose points can turn 3 For a commutative ring k, Zar k is the set of radicals of finitely generated ideals of k (Section XI -4). It is a distributive lattice. In classical mathematics, Zar k is identified with the lattice of quasi-compact open sets of the spectral space Spec k (Section XIII -1). §4. The universal splitting algebra (2) 409 out to be inaccessible from a constructive point of view. But this situation, although familiar, is perhaps more troubling in the case of a discrete and bounded topological space. This is typically a compact space for which we do not have a good description via a dense countable subset, therefore which is not included in the context of compact metric spaces à la Bishop (cf. [Bishop, Bishop & Bridges]). Here is a corollary of the Galois structure theorem (Theorem 3.10) in the context of pre-Galois algebras. 4.7. Proposition. Let (k, C, G) be a pre-Galois algebra with k connected. For an idempotent h of C the following properties are equivalent. 1. h is a Galoisian idempotent. 2. C[1/h] is a projective k-module of rank equal to StG (h). 3. C[1/h] is a projective k-module of rank less than or equal to StG (h). J We use Theorem 3.10. By item 2 of this theorem we can assume that there exists a Galoisian idempotent e such that h is equal to a sum e1 + · · · + er of elements of the orbit G.e. We have isomorphisms of k-modules eC ' C[1/e] and C ' (eC)|G.e| , so eC is projective of constant rank | G : G.e | = |StG (e)|. We deduce that the k-module C[1/h] ' hC = e1 C ⊕ · · · ⊕ er C ' (eC)r is projective of rank r × |StG (e)|. We then apply item 5 of Theorem 3.10 with f = h. Therefore, here item 2 (resp. item 3 ) means the same thing as item 5c (resp. item 5d) in Theorem 3.10.  Discriminant Q Recall that in A = Aduk,f we have disc(f ) = 16i<j6n (xi − xj )2 and DiscA/k = disc(f )n!/2 . In the following theorem, we speak of the A-module of differentials ΩA/k of the k-algebra A. It actually suffices to know that the module of differentials of a finitely presented algebra is isomorphic to the cokernel of the transpose of the Jacobian matrix of the polynomial system that defined the algebra. For more details on this subject see Theorems VI -6.6 and VI -6.7. 4.8. Theorem. Let J be the Jacobian of the system of n equations with n unknowns defining the universal splitting algebra A = Aduk,f . Q 1. a. We have J = 16i<j6n (xi − xj ) in A. b. We have J 2 = disc(f ) ∈ k. 2. In particular, the following properties are equivalent. 410 VII. The dynamic method a. b. c. d. e. f. DiscA/k is invertible (resp. regular) in k. disc(f ) is invertible (resp. regular) in k. J is invertible (resp. regular) in A. The xi − xj ’s are invertible (resp. regular) in A. x1 − x2 is invertible (resp. regular) in A. ΩA/k = 0 (resp. ΩA/k is a “torsion” A-module, i.e. annihilated by a regular element). g. Sn is a separating group for A (resp. for AduFrac(k),f ). 3. The analogous equivalences are valid for every Galois quotient of the universal splitting algebra. J Item 1a is easy by induction on n, with the exact sign if we consider the system which we used in the definition of the universal splitting algebra. For example, here is the computation for n = 4 J = = P 1 x P i6=1 i i,j6=1 xi xj x2 x3 x4 P 1 x P i6=3 i i,j6=3 xi xj x1 x2 x4 P 1 x P i6=4 i i,j6=4 xi xj x1 x2 x3 1 0 0 0 P x x − x x − x x − x4 1 2 1 3 1 Pi6=1 i P P P xi xj (x1 − x2 ) xi (x1 − x3 ) xi (x1 − x4 ) xi i,j6=1 x2 x3 x4 = P 1 x P i6=2 i i,j6=2 xi xj x1 x3 x4 i6=1,2 (x1 − x2 )x3 x4 i6=1,3 (x1 − x3 )x2 x4 1 (x1 − x2 )(x1 − x3 )(x1 − x4 ) x3 + x4 x3 x4 1 x2 + x4 x2 x4 i6=1,4 (x1 − x4 )x2 x3 1 x2 + x3 x2 x3 etc. . . We deduce from it item 1b, then the equivalence of items 2a through 2e. 2f. Since ΩA/k is an A-module isomorphic to the cokernel of the transpose of the Jacobian matrix, we obtain that Ann(ΩA/k ) and JA have the same nilradical (Lemma IV -9.6). Finally, the element J is regular (resp. invertible) √ if and only if the ideal JA contains a regular element (resp. contains 1). 2g. Suppose that f is separable (resp. regular), if σ ∈ Sn is distinct from IdA , there is some i ∈ J1..nK such that xσi 6= xi . Since xσi − xi is invertible (resp. regular), σ is separating (resp. separating once we invert the discriminant). For the converse, consider for example the transposition σ that swaps 1 and 2. We clearly have hg − σ(g)|g ∈ Ai = hx1 − x2 i. The result follows. 3. Clear since the universal splitting algebra is always isomorphic to a power of any of its Galois quotients.  §4. The universal splitting algebra (2) 411 Fixed points Q + xj ) ∈ k. Q It is clear that di(f ) is congruent to i<j∈J1..nK (xi − xj ) modulo 2, which gives 2, di(f )2 = h2, disc(f )i. Let di(f ) = i<j∈J1..nK (xi 4.9. Theorem. (Universal splitting algebra and fixed points)  Let a := Annk 2, di(f ) . Then Fix(Sn ) ⊆ k + aA. In particular, if a = 0  and a fortiori if Annk 2, disc(f ) = 0, we obtain Fix(Sn ) = k. J It suffices to prove the first assertion. Let us consider the case where n = 2 with f (T ) = T 2 − s1 T + s2 . An element z = c + dx1 ∈ A (with c, d ∈ k) is invariant under S2 if and only if d(x1 − x2 ) = d(s1 − 2x1 ) = 0, or yet again if ds1 = 2d = 0, but we have di(f ) = s1 . We then proceed by induction on n. For the Cauchy modules we use the notations of Section III -4. For n > 2 consider the ring k1 = k[x1 ] ' k[X1 ]/hf (X1 )i and the polynomial g2 (T ) = f2 (x1 , T ) which is in k1 [T ]. We identify Aduk1 ,g2 with Aduk,f (Fact III -4.3). To switch from the expression of an element y ∈ A over the basis B(g2 ) (A seen as a k1 -module) to its expression over the basis B(f ) (A seen as a k-module), it suffices to express each coordinate, which is an element of k1 , over the k-basis (1, x1 , . . . , xn−1 ) 1 of k1 . Let us also take note that di(f ) = (−1)n−1 g2 (−x1 ) di(g2 ) by a direct computation. Therefore, if we let a1 = Annk1 (h2, di(g2 )i), we obtain a1 A ⊆ aA and a1 ⊆ ak1 . Let us move on to the actual induction. Let y ∈ A be a fixed point of Sn , and consider it as being an element of the universal splitting algebra Aduk1 ,g2 . Since y is invariant under Sn−1 , we have y ∈ k1 + a1 A, and so y ≡ h(x1 ) mod a1 A for some h ∈ k[X]. A fortiori y ≡ h(x1 ) mod aA. It remains to see that h(x1 ) ∈ k + aA. Since y is invariant under Sn , by permuting x1 and x2 we obtain the congruence h(x1 ) ≡ y ≡ h(x2 ) mod aA (∗) Pn−1 i Let h = i=0 +ci X ∈ k[X]. Note that h(x1 ) is a reduced expression over the canonical basis B(f ). Regarding h(x2 ), to obtain the reduced expression, we must, in the term cn−1 xn−1 , replace xn−1 with its expression over the 2 2 canonical basis, which results from f2 (x1 , x2 ) = 0. This rewriting sparks the apparition of the term −cn−1 x1n−2 x2 , and this implies by (∗) that cn−1 ∈ a. But then, h(x2 )−cn−1 xn−1 and h(x1 )−cn−1 xn−1 2 1 are reduced expressions of two elements equal modulo aA. Therefore, the ci ’s for i ∈ J1..n − 2K are in a, and we saw that cn−1 ∈ a.  Remark. In the n = 2 case, the above study shows that as soon as a 6= 0 the ring Fix(S2 ) = k ⊕ a x1 = k + aA strictly contains k. 412 VII. The dynamic method A computation in the n = 3 case gives the same converse: if a 6= 0, the ring Fix(S3 ) strictly contains k. We indeed find an element v = x21 x2 + s1 x21 + (s21 + s2 )x1 + s2 x2 6= 0 (one of its coordinates over B(f ) is equal to 1) such that Fix(S3 ) = k ⊕ a v. However, for n > 4, the situation becomes complicated. We obtain as a corollary the following theorem. 4.10. Theorem. If f is a separable polynomial of k[T ], the universal splitting algebra Aduk,f , as well as every Galois quotient, is a Galois algebra. J By the structure theorem 4.3 (item 7 ) it suffices to show that Aduk,f is Galoisian. However, we have just proven the fixed point condition, and the separating automorphisms condition is given in Theorem 4.8.  By Artin’s theorem VI -7.11, and in light of the previous theorem, we know that every universal splitting algebra for a separable polynomial, or every Galois quotient of such a k-algebra, diagonalizes itself. We examine this question in further detail in the following subsection. Even with regard to the precise result that we have just mentioned, it is interesting to see things work “concretely” for a universal splitting algebra. Separability When the polynomial f ∈ k[T ] is separable, its universal splitting algebra A = Aduk,f = k[x1 , . . . , xn ] is strictly étale, by Fact III -5.11. The following theorem then simply recalls Theorem VI -5.8 regarding strictly étale algebras in the current context. 4.11. Theorem. Suppose f is separable. 1. The nilradical DA (0) is the ideal generated by Dk (0). In particular, if k is reduced, so is A. ρ 2. For every reduced algebra k −→ k0 , the algebra ρ? (A) ' Aduk0 ,ρ(f ) is reduced. Diagonalization of a universal splitting algebra 4.12. Theorem. (Diagonalization of a universal splitting algebra) Let ϕ : kQ→ C be an algebra in which f can be completely factorized, i.e. n ϕ(f ) = i=1 (T − ui ). Also suppose that f is separable over C, i.e. the ui − uj ’s are invertible for i 6= j. Let C ⊗k A ' AduC,ϕ(f ) , and, for σ ∈ Sn , let φσ : C ⊗k A → C be the unique homomorphism of C-algebras which sends each 1C ⊗ xi to uσi . Let Φ : C⊗k A → Cn! be the C-homomorphism defined by y 7→ φσ (y) σ∈Sn . 1. Φ is an isomorphism: C diagonalizes A. §4. The universal splitting algebra (2) 413 2. More precisely, in C ⊗k A, write xi instead of 1C ⊗ xi , ui instead of ui ⊗ 1A (in accordance with the C-algebra structure of C ⊗k A) and let Q gσ = j6=σi (xi − uj ). Then,   φσ (gσ ) = ±ϕ disc(f ) = ± disc ϕ(f ) , and φσ (gτ ) = 0 for τ 6= σ, so that if we let eσ = gσ /φσ (gσ ), the eσ ’s form the fundamental system of orthogonal idempotents corresponding to the isomorphism Φ. 3. Moreover, xi eσ = uσi eσ , so that the basis (eσ ) of the C-module C ⊗k A is a common diagonal basis for the multiplications by the xi ’s. In particular, when f is separable, the enveloping algebra Aek = A ⊗k A ' AduA,f is canonically isomorphic to An! ; A diagonalizes itself. NB: We will however be careful when letting AduA,f = A[u1 , . . . , un ] since the xi ’s are already taken as elements of A. J 1. The two algebras are, as C-modules, isomorphic to Cn! and Φ is a C-linear map whose surjectivity is all that we need to prove. The surjectivity results by the Chinese remainder theorem from the Ker φσ ’s being pairwise comaximal: Ker φσ contains xi − uσi , Ker φτ contains xi − uτ i , therefore Ker φσ + Ker φτ contains the uσi − uτ i ’s, and there is at least one index i for which σi 6= τ i, which shows that uσi − uτ i is invertible. 2. The fundamental system of orthogonal idempotents corresponding to the isomorphism Φ is the unique solution of the system of linear equations φσ (eτ ) = δσ,τ (where δ is the Kronecker symbol).  However, the equalities φσ (gσ ) = ±ϕ disc(f ) and φσ (gτ ) = 0 are easy. 3. Fix i. The equality xi gσ = uσi gσ results from the fact that in gσ there is already a product of the xi − uj ’s for j 6= σi, so (xi − uσi )gσ is a multiple of ϕ(f )(xi ), which is null.  Remark. Actually, generally speaking, Φ is a linear map whose determinant can be computed with respect to the natural bases: the square of this  determinant is a power of ϕ disc(f ) and we therefore find that Φ is an  isomorphism if and only if ϕ disc(f ) is invertible in C. For this, and for a “complete converse,” see Exercise 6. The previous theorem implies the following result: if A is a universal splitting algebra for a separable polynomial, then every A-algebra diagonalizes A. We now give a generalization of this result for a Galois quotient of A. 414 VII. The dynamic method 4.13. Theorem. (Diagonalization of a Galois quotient of a universal splitting algebra) Let e be a Galoisian idempotent of A, B = A/h1 − ei = k[y1 , . . . , yn ] and G = StSn (e), (we have denoted by yi = π(xi ) the class of xi in B). Let φ : B → C be a ring homomorphism. Let ui = φ(yi ). Consider the C-algebra φ? (B) ' C ⊗k B ' AduC,f /h1 − φ(e)i obtained from the k-algebra B by scalar extension. For σ ∈ G let φσ : C ⊗k B → C be the unique homomorphism of C-algebras which sends each 1C ⊗ yi to uσi . Let Φ : C ⊗k B → C|G| be the homomorphism of C-algebras  defined by z 7→ φσ (z) σ∈G .  1. If φ disc(f ) ∈ C× , Φ is an isomorphism, so C diagonalizes B. 2. In particular, if f is separable, B⊗k B is canonically isomorphic to B|G| , i.e. B diagonalizes itself. J The two C-algebras are projective C-modules of constant rank |G| and Φ is a C-linear map whose surjectivity is all that we need to prove. In C ⊗k B we write yi instead of 1C ⊗ yi and ui instead of ui ⊗ 1B . The surjectivity results by the Chinese remainder theorem from the fact that the Ker φσ ’s are pairwise comaximal: Ker φσ contains yi − uσi , Ker φτ contains yi − uτ i , so Ker φσ + Ker φτ contains the uσi − uτ i . However, there is at least one  index i for which σi 6= τ i and uσi − uτ i is invertible because φ disc(f ) is the product of the (uj − uk )2 ’s for 1 6 j < k 6 n.  Triangular structure of Galoisian ideals In this subsection we prove Theorem 4.15 which implies that the structure of the ideal J (f ), which is a “triangular” structure (in the Lazard sense) when we consider the Cauchy modules as generators, remains a triangular structure for all the Galoisian ideals of the universal splitting algebra in the case of a separable polynomial over a discrete field. 4.14. Lemma. Let k0 be a k-algebra which is a finitely generated projective module of constant rank m, x ∈ k0 and r(T ) ∈ k[T ] be the characteristic polynomial of x over k. If disc(r) ∈ k× , then k0 = k[x] and (1, x, . . . , xm−1 ) is a k-basis of k0 . J The case where k0 is free of rank m has been proven in III -5.10. In the general case, consider a system of comaximal elements of k such that each localization makes of k0 a free k-module of rank m.  §4. The universal splitting algebra (2) 415 4.15. Theorem. Let (k, C, G) be a Galois algebra with • C = k[x1 , . . . , xn ] ' k[X1 , . . . , Xn ]/a , • G operates on {x1 , . . . , xn } and • the xi − xj ’s are invertible for i 6= j. A typical example of this situation: C is a Galois quotient of the universal splitting algebra of a separable polynomial. Let  Gi = σ ∈ G σ(xk ) = xk , k ∈ J1..iK for i ∈ J0..nK (so G0 = G),  Q ri (T ) = σ∈Gi−1 /Gi T − σ(xi ) for i ∈ J1..nK, where Gi−1 /Gi designates a system of representatives of the left cosets. Let di = | Gi−1 : Gi |. We then have the following results. 1. k[x1 , . . . , xi ] = Fix(Gi ) and Gi = Stp(k[x1 , . . . , xi ]). 2. The polynomial ri (T ) is monic with coefficients in k[x1 , . . . , xi−1 ], of degree di . Let Ri (X1 , . . . , Xi ) ∈ k[X1 , . . . , Xi ] be a monic polynomial in Xi of degree di such that Ri (x1 , . . . , xi−1 , Xi ) = ri (Xi ). 3. ai = a ∩ k[X1 , . . . , Xi ] is generated by R1 (X1 ), . . ., Ri (X1 , . . . , Xi ). Consequently each algebra k[x1 , . . . , xi ] is both a free k[x1 , . . . , xi−1 ]-module of rank di and a free k-module of rank | G : Gi | at the same time, and each of the ideals ai is a triangular ideal (in the Lazard sense) of k[X1 , . . . , Xi ]. J The group G1 is a separating group of automorphisms of ring C. Let k1 = CG1 . We know that C is a projective k1 -module of constant rank |G1 | and that k[x1 ] ⊆ k1 . Moreover, k1 is a direct summand in C, therefore it is a projective k-module of constant rank d1 = degT (r1 ). The ideal a1 is formed  by all the R ∈ k[X1 ]’s such that R(x1 ) = 0. Therefore, R σ(x1 ) = 0 for every σ ∈ G/G1 . In other words R is a multiple of each T − σ(x1 ), and since the xi − xj ’s are invertible, R is a multiple of r1 . Thus a1 = hr1 (X1 )i and k[x1 ] ' k[X1 ]/hr1 (X1 )i. Proposition VI -7.17 gives us the equality  Q Ck1 /k (x1 )(T ) = σ∈G/G1 T − σ(x1 ) = r1 (T ). This implies that the characteristic polynomial Ck1 /k (x1 )(T ) is separable, and Lemma 4.14 says that (1, x1 , . . . , xd11 −1 ) is a basis of k1 . Thus k[x1 ] = k1 = Fix(G1 ) and (k[x1 ], C, G1 ) is a Galois algebra. Then, C = k1 [x2 , . . . , xn ] with G1 operating on {x2 , . . . , xn } and the xi − xj ’s being invertible. The whole previous process works identically when replacing k by k1 , G by G1 , x1 by x2 and G1 by G2 . The result then follows by induction.  416 VII. The dynamic method 5. Splitting field of a polynomial over a discrete field In this section we give a constructive and dynamic approach to the splitting field of a monic polynomial over a discrete field, in the absence of a factorization algorithm of the polynomials. In Section 5, K is a nontrivial discrete field, f is a monic polynomial of degree n and A = AduK,f = K[X1 , . . . , Xn ]/J (f ) = K[x1 , . . . , xn ]. The quotients of the universal splitting algebra A are finite K-algebras, therefore they are zero-dimensional rings. “Reduced” Galois quotients of the universal splitting algebra We have placed quotation marks around “reduced” because, a priori, one does not speak of a Galois quotient that is reduced, but of a Galois quotient that one reduces (by killing the nilpotents). Given Fact III -5.11, if the polynomial f is separable the universal splitting algebra is étale, therefore reduced, and every ideal generated by an idempotent is equal to its nilradical (since the quotient ring is reduced).pWe can then replace in the statements that follow each ideal DA (1 − e) = h1 − ei with the ideal h1 − ei. In the following lemma we know by hypothesis that B is strictly finite over K, but we do not necessarily know a basis of Bred as a K-vector space. The goal is then to give a “satisfying enough” description of Bred as a quotient of the universal splitting algebra. 5.1. Lemma. Let B be a strictly finite K-algebra. Suppose that f can be entirely decomposed in Bred and that Bred is generated by the corresponding zeros of f . Then, there exists an idempotent e of A = AduK,f such that Bred ' A/DA (1 − e) . Q J Let y1 , . . . , yn ∈ B such that f (T ) = i (T − yi ) in Bred . There exists a unique homomorphism λ : K[X1 , . . . , Xn ] → B which sends the Xi ’s to  the yi ’s. Let b be the (finitely generated) ideal of B generated by λ J (f ) . We then have b ⊆ DB (0), and B0 := B/b is a strictly finite K-algebra satisfying Bred ' B0red . We thus obtain a diagram //A K[X]  B λ ϕ / B0 ψ (( / B0 = Bred red §5. Splitting field of a polynomial over a discrete field 417 in which ϕ is the unique homomorphism which sends xi to the class of yi . Since B0 is strictly finite, Ker ϕ is a finitely generated ideal of A, and there exists a d > 0 such that (Ker ϕ)d = (Ker ϕ)d+1 therefore (Ker ϕ)d is generated by an idempotent 1−e. The result follows because on the one hand,  ψ is surjective, and on the other, Ker ψ = DA (Ker ϕ) = DA (Ker ϕ)d = DA (1 − e).  Remark. Note that ψ is surjective, but a priori Ker ψ is not a finitely generated ideal of A. Symmetrically, a priori ϕ is not surjective, but Ker ϕ is a finitely generated ideal of A. In classical mathematics a splitting field (Definition III -6.6) for a monic polynomial f over a discrete field K is obtained as a quotient of the universal splitting algebra A by a maximal ideal. Such an ideal exists: take a strict ideal that is a K-vector space of maximal dimension, by LEM. In constructive mathematics we obtain the following more precise theorem (to be compared with Theorem III -6.7). 5.2. Theorem. 1. The following properties are equivalent. a. There exists in A = AduK,f an indecomposable idempotent e. b. There exists an extension L of K that is a splitting field of f and denoted by Bred where B is a strictly finite K-algebra. c. The Boolean algebra B(A) is finite. 2. In this case every splitting field of f is isomorphic to A/DA (1 − e) , and it is discrete. J The equivalence of 1a and 1c is valid in the general context of Boolean algebras (Theorem 3.10). It is clear that 1a implies 1b. Conversely if we have a splitting field L = B/DB (0) , where B is a strictly finite K-algebra, Lemma 5.1 provides an idempotent e, and it is indecomposable because L is connected. Let us look at item 2. Let M be a splitting field for f . Write Qn f (T ) = i=1 (T − ξi ) in M. By the universal property of AduK,f , there exists a unique homomorphism of K-algebras ϕ : A → M such that ϕ(xi ) = ξi for i ∈ J1..nK. Let (e` )`=1,...,k be theorbit of e. It is a fundamental system of orthogonal idempotents, so ϕ(e` ) `=1,...,k also, and since M is a discrete field this implies that there is some j for which ϕ(e` ) = δj,` (Kronecker symbol). Then, h1 − ej i ⊆ Ker ϕ, so M is a quotient of A/DA (1 − ej ) , which is a discrete field. As M is nontrivial, this implies M ' A/DA (1 − ej ) . Finally, all the A/DA (1 − e` ) are pairwise isomorphic.  418 VII. The dynamic method Comment. In [MRR], it is shown that every enumerable discrete field possesses an algebraic closure. However, a splitting field for f , which therefore exists, does not necessarily possess a finite basis as a K-vector space, in the constructive mathematics sense, and we do not know of a constructive uniqueness theorem for such a splitting field. We can describe as follows an analogous procedure to that of [MRR] to obtain a splitting field for f . First of all we construct an enumeration (zm )m∈N of the universal splitting algebra. Next we construct a sequence of finitely generated ideals (am ) of A by letting a0 = 0, and am+1 = am + hzm i if am + hzm i = 6 h1i, and am+1 = am otherwise (the test works because S we can compute a basis for the K-vector space am + hzm i). Then, the ideal m am is a maximal ideal of A, and the quotient is a splitting field, which is discrete. Our point of view is slightly different. We do not a priori start from an enumerable field, and even in the case of an enumerable field, we do not favor one enumeration over another. We would rather answer questions about the splitting field as they arise, as we shall see in the following theorem. The following theorem explains how to bypass the difficulty of the nonexistence of the splitting field in constructive mathematics. The splitting field of f is replaced by an “approximation” given in the form of a reduced quotient (A/h1 − ei)red of the universal splitting algebra, where e is a Galoisian idempotent. We rely on the following fact which is already established in the general context of zero-dimensional rings (Lemma IV -8.2). We recall a direct proof. For all y ∈ A = AduK,f , there exists an idempotent ey ∈ K[y] ⊆ A such that y is invertible modulo 1 − ey and nilpotent modulo ey . J Let P (T ) be the minimal polynomial of y. There exists an invertible element v of K such that vP (T ) = T k 1 − T R(T ) with k > 0. The k idempotent ey is yR(y) .  5.3. Theorem. (Dynamic management of a splitting field) Let (zi )i∈I be a finite family of elements of AduK,f = A. There exists a Galoisian idempotent e of A such that by letting B = A/h1 − ei each π(zi ) is null or invertible in the quotient algebra Bred (here, π : A → Bred is the canonical projection). J For each i ∈ I there is an idempotent gi ∈ A such that zi is invertible modulo 1 − gi and nilpotent modulo gi . Applied to the family of the gi ’s Theorem 3.10 gives a Galoisian idempotent e, such that for each i, 1 − e divides gi or 1 − gi . Therefore, in the quotient algebra B = A/h1 − ei each π(zi ) is nilpotent or invertible.  Remarks. 1) The reader may worry that we do not a priori have a finite generator set of the ideal DA (1 − e) available. Consequently the finite §6. Galois theory of a separable polynomial over a discrete field 419 algebra Bred is not necessarily a finite dimensional K-vector space in the constructive sense. Actually the nilpotents can also be managed dynamically. We have in B = A/h1 − ei a test of nilpotence and if a nilpotent element x is revealed, we can replace B with its quotient by the ideal a generated by the orbit of x under the action of G = StSn (e). Then, B/a is finite dimensional and G operates on B/a . 2) In Theorem 5.3 it can be in our best interest to saturate the family (zi )i∈I by the action of Sn in order to make manifest in B all the possible “scenarios.” Uniqueness of the splitting field The uniqueness theorem of the splitting field admits an “operative” constructive version (which always works, even if we do not dispose of an indecomposable idempotent in the universal splitting algebra) in the following form. 5.4. Theorem. (Uniqueness of the splitting field, dynamic version) Let B1 , B2 be two nonzero strictly finite K-algebras for which the polynomial f can be decomposed into a product of linear factors in (B1 )red and (B2 )red . Moreover suppose that (Bi )red is generated by the corresponding zeros of f . Then, there exists a Galoisian idempotent e of A such that, with the algebra i B = A/h1 − ei, we have two integers ri such that (Bi )red ' Brred . J Lemma 5.1 gives idempotents e1 , e2 ∈ A such that (Bi )red ' A/DA (1 − ei ) (i = 1, 2) Theorem 3.10 item 2 gives a Galoisian idempotent e and r1 , r2 ∈ N such i that A/h1 − ei i ' Bri . Therefore (Bi )red ' Brred .  6. Galois theory of a separable polynomial over a discrete field In Section 6, K is a nontrivial discrete field, f is a separable monic polynomial of degree n and A = AduK,f . We highlight the fact that f is not assumed to be irreducible. Recall that for a separably factorial field, every separable polynomial has a splitting field (Corollary VI -1.13), unique up to automorphism (Theorem III -6.7). We are now interested in the case where the field is not separably factorial (or even in the case where the factorization of the separable polynomials is too costly). Here, as promised, we give the constructive and dynamic version of the Galois theory of a separable polynomial over a discrete field. 420 VII. The dynamic method Existence and uniqueness of the dynamic and static splitting fields Fact III -5.11 (or Corollary VI -1.8) assures us that A is an étale K-algebra. The same goes for its Galois quotients. Theorem 5.2 can be re-expressed as follows. Theorem 5.2 bis (Separable polynomial: when a splitting field exists and is a strictly finite extension) 1. The following properties are equivalent. a. There exists in A = AduK,f an indecomposable idempotent e. b. There exists a strictly finite extension L of K that is a splitting field of f . c. The Boolean algebra B(A) is finite. 2. In this case every splitting field of f is a Galois extension of K, isomorphic to A[1/e]. Item 2 also results from the fact that if a splitting field exists and is strictly finite over K, two splitting fields are isomorphic (Theorem III -6.7). The uniqueness theorem 5.4 can be re-expressed as follows. Theorem 5.4 bis (Uniqueness of the splitting field of a separable polynomial, dynamic version) Given two nonzero strictly finite K-algebras B1 and B2 in which f can be decomposed into a product of linear factors and which are generated by the corresponding zeros of f , there exists a Galois quotient B = A[1/e] of the universal splitting algebra and two integers ri such that B1 ' Br1 and B2 ' Br2 . Structure of the Galois quotients of the universal splitting algebra For the remainder of Section 6 we fix the following notations. 6.1. Notations. (Context of a Galois quotient) Let e be a Galoisian idempotent of A = AduK,f , b = h1 − eiA . Let B = A/b = A[1/e], π = πA,b : A → B, and G = StSn (e). Let (e1 , . . . , em ) be the orbit of e under Sn . Each K-algebra A[1/ei ] is isomorphic to B. The group G operates on B. Note that for y ∈ B, the polynomial Miny (T ) is separable (because B is étale over K). In addition y is invertible if and only if Miny (0) 6= 0. Also note that a finitely generated ideal of B (different from h1i) is a Galoisian ideal if and only if its orbit under G is formed of pairwise comaximal ideals (every finitely generated ideal is generated by an idempotent, and Fact 4.6). §6. Galois theory of a separable polynomial over a discrete field 421 The structure theorem 4.3 reads as follows, taking into account Theorems 5.3 and 4.10. 6.2. Theorem. (Galois structure theorem, 3) In the context of 6.1 we obtain the following results. 1. (K, B, G) is a Galois quotient of (K, A, Sn ). In particular, B is a finite dimensional K-vector space |G| and for every y ∈ B, CB/K (y)(T ) = CG (y)(T ). In addition, Fix(G) = K. 2. We have an isomorphism of K-algebras A ' Bm . 3. If B is connected, it is a splitting field for f and a Galois extension of K with G as its Galois group. 4. Let (yi ) be a finite family of elements of B. There exists a Galoisian idempotent eB of (K, B, G) such that in B[1/eB ], each yi is null or invertible. 5. The restriction π : eA → B is a K-linear isomorphism and establishes a biunivocal correspondence between the Galoisian idempotents of (K, A, Sn ) contained in eA and those of (K, B, G). The stabilizers and residual quotients are preserved; i.e. if eA ∈ eA and eB ∈ B are two Galoisian idempotents that correspondent to each other, then StSn (eA ) = StG (eB ) and A[1/eA ] ' B[1/eB ]. NB: In what follows, we only give the statements for the relative situation, the absolute situation is indeed the special case where e = 1. 6.3. Lemma. (Resolvent and minimal polynomial) Context 6.1, y ∈ B. 1. RvG,y (T ) has coefficients in K. 2. Miny divides RvG,y which divides a power of Miny . 3. CB/K (y)(T ) = CG (y)(T ) = RvG,y (T )|StG (y)| . J 1. Consequence of item 1 in the structure theorem. 2. We deduce that Miny divides RvG,y , because RvG,y (y) = 0, and since each yi annihilates Miny , the product of the T −yi ’s divides a power of Miny . 3. The second equality is obvious, and the first is in item 1 of the structure theorem.  Where the computations take place Recall that f is a separable monic polynomial of K[T ] with K a nontrivial discrete field. We denote by Z0 the subring of K generated by the coefficients of f and by 1/disc(f ). We denote by Z the integral closure of Z0 in K. 422 VII. The dynamic method Here we highlight the fact that “all the computations take place, and all the results are written, in the ring Z,” since this follows from Theorems VI -5.12 and 4.15.4 These theorems give us in the current framework items 1, 2 and 4 of the following theorem. As for item 3, it is an immediate consequence of item 2. 6.4. Theorem. (The subring Z of K is sufficient) 1. Let Z1 be an intermediate ring between Z and K (for example Z1 = Z). Then the universal splitting algebras AduZ0 ,f ⊆ AduZ,f ⊆ AduZ1 ,f ⊆ AduK,f are Galois algebras (with respect to their base rings, and with the group Sn ). 2. Every idempotent of A = AduK,f is in AduZ,f : its coordinates over the basis B(f ) are in Z. 3. The Galois theories of f over Z, over Z1 , over Frac(Z) and over K are identical, in the following sense. a. Every Galois quotient of AduZ1 ,f is obtained by scalar extension to Z1 from a Galois quotient of AduZ,f . b. Every Galois quotient of AduFrac(Z),f is obtained by scalar extension to Frac(Z) from a Galois quotient of AduZ,f . This scalar extension is in fact the same thing as passing to the total ring of fractions of the Galois quotient. c. Every Galois quotient of AduK,f is obtained by scalar extension to K from a Galois quotient of AduFrac(Z),f . 4. Let e be a Galoisian idempotent of A and Z1 be the subring of Z generated by Z0 and the coordinates of e over B(f ). Then, the triangular structure of the ideal of Z1 [X1 , . . . , Xn ] generated by 1 − e and the Cauchy modules is made explicit by means of polynomials with coefficients in Z1 . For those that know Gröbner bases: the Gröbner basis (for a lexicographical monomial order) of the ideal that defines the corresponding approximation of the splitting field of f is formed of monic polynomials with coefficients in Z1 . 4 It follows that if K is a general field (see Section IX -1), the questions of computability are actually discussed entirely in Frac(Z) = Frac(Z0 ) ⊗Z0 Z = (Z?0 )−1 Z, and Frac(Z) is discrete if Z0 is itself a discrete ring. As Z0 is a finitely generated ring, it certainly is, in classical mathematics, an effective (also called computable) ring with an explicit equality test, in the sense of recursion theory via Turing machines. But this last result is not a truly satisfying approach to the reality of the computation. It is indeed akin to results in classical mathematics of the form “every recursive real number admits a recursive development into a continued fraction”, a theorem that is evidently false from a practical point of view, since to implement it, one must first know whether the number is rational or not. §6. Galois theory of a separable polynomial over a discrete field 423 Note the simplifications in the following special cases. If K = Q and f ∈ Z[T ] monic, then Z = Z0 = Z[1/disc(f )]. Similarly, for q a prime power and K the field of rational fractions K = Fq (u) we have, if f ∈ Fq [u][T ] is monic, Z = Z0 = Fq [u][1/disc(f )]. Remarks. 1) Experiments suggest not only that “Z is sufficient,” but that in fact all the results of computations (coefficients of an idempotent over B(f ), a Gröbner basis of a Galoisian ideal) only use as denominators elements whose square divides the discriminant of f . 2) Absolute Galois theory of a polynomial. Given a separable polynomial f ∈ K[T ], rather than considering K and the integral closure Z of Z0 in K, we can consider K0 = Frac(Z0 ) and the integral closure Z0 of Z0 in K0 . Changing the base ring, modular method Since everything takes place in Z, one can look at what happens after an arbitrary scalar extension ϕ : Z → k. It is possible for example that k is a “simple” discrete field and that we know how to compute Galk ϕ(f ) ; i.e. identifying an indecomposable idempotent e0 in Aduk,ϕ(f ) . This group will necessarily be (isomorphic to) a subgroup of the unknown Galois group GalZ (f ) = GalK (f ). Suppose that we have computed a Galois quotient B of AduZ,f with a group G ⊆ Sn . If e is the Galoisian idempotent of AduZ,f corresponding to B, we can reduce back to the case where ϕ(e) is a sum of conjugates of e0 and where  Galk ϕ(f ) = H = StG (e0 ) ⊆ G. As this is true for every Galois quotient of AduZ,f , we obtain a double inclusion H ⊆ GalZ,f ⊆ G (1) except that the group GalZ,f is only defined up to conjugation, and that it can a priori remain forever unknown. This type of information, “the Galois group of f over K, up to conjugation, contains H” is outside of the dynamic method that we have presented, because this one takes a step in the other direction: giving information of the type “the Galois group of f over K, up to conjugation, is contained in G.” It is therefore a priori interesting to use the two methods in parallel, in the hope of completely determining GalK (f ). Replacing the field K by a subring is important from this point of view as we dispose of a lot more morphisms of scalar extension from the domain Z than from the domain K. 424 VII. The dynamic method In particular, it is often useful to work modulo p, a maximal ideal of Z. This method is called a modular method. This method seems to have been invented by Dedekind for the determination of the Galois group of f over Q when f ∈ Z[T ]. Note that in this case a maximal ideal of Z = Z0 = Z[1/ disc(f )] is given by a prime number p which does not divide disc(f ). Lazy Galois theory The structure theorem 6.2 and Lemma 6.3 (which gives a few details) are the theoretical constructive results that allow a lazy evaluation of the splitting field and of the Galois group of a separable polynomial. Please note that the term “lazy” is absolutely not pejorative. It simply indicates that we can work with complete confidence in the splitting field of a separable polynomial over K, even in the absence of any factorization algorithm of the polynomials over K. Indeed, any anomalies with the algebra B, the “ongoing” approximation of the splitting field of f , for instance the presence of a nonzero zerodivisor, can be exploited to significantly improve our knowledge of the Galois group and of the splitting field. A Galoisian idempotent that is strictly a multiple of the “ongoing” idempotent e can indeed be computed. In the new Galois algebra, which is a quotient of the previous one, all the previously made computations remain valid, by passage to the quotient. Moreover, the number of significant improvements that may occur this way does not exceed the maximum length of a chain of subgroups of Sn . We therefore develop a “Galoisian” variant of the D5 system, which was the first computer algebra system to compute, both systematically and without risk of errors, in the algebraic closure of a field in the absence of a factorization algorithm for polynomials (see [55, Duval&al.]). Here, in contrast to what happens with the D5 system, the dynamic aspect of things does not consist in “opening separate branches of computation” each time an anomaly occurs, but in improving the approximation of the splitting field (and of its Galois group) that constitutes the ongoing Galois quotient of the universal splitting algebra each time. The basic algorithm We can rewrite Algorithm 3.11 in the current setting as follows, when we have an element y neither null nor invertible in the Galois quotient B = A/b at our disposal. §6. Galois theory of a separable polynomial over a discrete field 6.5. Algorithm. stabilizer 425 Computation of a Galoisian ideal and of its Input: b: Galoisian ideal of a universal splitting algebra A for a separable polynomial, b is given by a finite generator set; y: nonzero zerodivisor in B = A/b ; G = StSn (b); Sy = StG (y). Output: b0 : a Galoisian ideal of B containing y; H: StG (b0 ). Local variables: a: finitely generated ideal of B; σ: element of G; L: list of elements of G/Sy ; # G/Sy is a system of representatives of the left cosets of Sy E: corresponding set of elements of G/Sy ; # G/Sy is the set of left cosets of Sy . Begin E ← ∅; L ← [ ]; b0 ← hyi; for σ in G/Sy do a ← b0 + hσ(y)i; if 1 ∈ / a then b0 ← a; L ← L • [σ]; E ← E ∪ {σSy } end if; end for;  S H ← StG (E) # H = α ∈ G | ∀σ ∈ L, ασ ∈ τ ∈L τ Sy . End. The ideal b is given by a finite generator set, and G = StSn (b). Let e be the idempotent of B such that h1 − eiB = hyiB , and e0 be a Galoisian idempotent such that G.e and G.e0 generate the same Boolean algebra. We are looking to compute the Galoisian ideal c of A which gives the new −1 Galois quotient A/c ' B/b0 , where b0 = h1 − e0 iB , i.e. c = πA,b (b0 ). In Algorithm 3.11 we find the product of e and a maximum number of conjugates, avoiding obtaining a null product. Here we do not compute e, nor σ(e), nor e0 , because experimentation often shows that the computation of e is very long (this idempotent often occupies a lot of memory space, significantly more than e0 ). We then reason with the corresponding ideals h1 − ei = hyi and h1 − σ(e)i = hσ(y)i. It follows that in the algorithm the product of the idempotents is replaced by the sum of the ideals. Moreover, as we do not compute e, we replace StG (e) by StG (y), which is contained in StG (e), generally strictly so. Nevertheless, experience shows that, even though G/Sy is larger, the whole computation is faster. We leave it to the reader to show that the last assignment in the algorithm indeed provides the desired group StG (b0 ); i.e. that the subgroup H of G, the stabilizer of E in G/Sy , is indeed equal to StG (b0 ). 426 VII. The dynamic method When a relative resolvent factorizes Often an anomaly in a Galois quotient of the universal splitting algebra corresponds to the observation that a relative resolvent can be factorized. We therefore treat this case in all generality to reduce it to a case where a nonzero zerodivisor is present. 6.6. Proposition. (When a relative resolvent factorizes) In the context of 6.1 let y ∈ B and G.y = {y1 , . . . , yr }. 1. If Miny = R1 R2 with R1 and R2 of degrees > 1, R1 (y) and R2 (y) are nonzero zerodivisors, and there exists an idempotent e such that hei = hR1 (y)i and h1 − ei = hR2 (y)i. 2. If deg(Miny ) < deg(RvG,y ), then one of the y1 − yi ’s divides zero (we can therefore construct an idempotent 6= 0, 1 of B). 3. If P is a strict divisor of RvG,y in K[T ], then at least one of the two following case occurs: • P (y) is a nonzero zerodivisor, we are in item 1. • an element y1 − yi is a nonzero zerodivisor, we are in item 2. J 1. Since Miny is separable, R1 and R2 are comaximal. With a Bézout relation U1 R1 +U2 R2 = 1, let e = (U1 R1 )(y) and e0 = 1−e. We have ee0 = 0, so e and e0 are idempotents. We also immediately have eR2 (y) = e0 R1 (y) = 0, eR1 (y) = R1 (y) and e0 R2 (y) = R2 (y). Therefore hei = hR1 (y)i and h1 − ei = hR2 (y)i. 2. The proof that shows that over an integral ring a monic polynomial of degree d cannot have more than d distinct roots is reread as follows. Over an arbitrary ring, if a monic polynomial P of degree d admits some (a1 , . . . , ad ) as zeros with each ai −aj regular for i 6= j, then we have P (T ) = Q (T − ai ). Therefore if P (t) = 0 and t is distinct from the ai ’s, at least two of the t − ai ’s are nonzero zerodivisors. We apply this to the minimal polynomial Miny which has more zeros in B than its degree (those are the yi ’s). This gives a nonzero zerodivisor yj − yk , and via some σ ∈ G we transform yj − yk into a y1 − yi . 3. If P is a multiple of Miny , we are in item 2. Otherwise, gcd(Miny , P ) = R1 is a strict divisor of Miny , and R1 6= 1  because we have gcd (Miny )k , P = P for large enough k. Therefore Miny = R1 R2 , with deg(R1 ) and deg(R2 ) > 1. We are in item 1.  From this we deduce the following corollary which generalizes item 4 of the structure theorem 6.2. §6. Galois theory of a separable polynomial over a discrete field 427 6.7. Theorem. In the context of 6.1 let (uj )j∈J be a finite family in B. There exists a Galoisian ideal c of B such that, by letting H = StG (c), C = B/c , and β : B → C be the canonical projection, we have 1. Each β(uj ) is null or invertible. 2. In C, Minβ(uj ) (T ) = RvH,β(uj ) (T ). 3. The Minβ(uj ) ’s are pairwise equal or comaximal. Remark. In the previous theorem it is sometimes in our best interest to saturate the family (uj )j∈J by the action of G (or of Sn by lifting the uj to A) in order to make manifest in C all the possible “scenarios.” Example. We reuse the example of page 115. We ask Magma what it thinks about the element x5 + x6. Finding that the resolvent is of degree 15 (without having to compute it) whilst the minimal polynomial is of degree 13, it struggles to reduce the oddity and obtains a Galois quotient of the universal splitting algebra of degree 48 (the splitting field of degree 24 is not yet reached) with the corresponding group. The computation is almost instantaneous. Here is the result. y:=x5+x6; MinimalPolynomial(y); T^13 - 13*T^12 + 87*T^11 - 385*T^10 + 1245*T^9 - 3087*T^8 + 6017*T^7 - 9311*T^6 + 11342*T^5 - 10560*T^4 + 7156*T^3 - 3284*T^2 + 1052*T - 260 //new Galois algebra, computed from deg(Min)<deg(Rv) : Affine Algebra of rank 6 over Rational Field Variables: x1, x2, x3, x4, x5, x6 Quotient relations: x1 + x2 - 1, x2^2 - x2 + x4^2 - x4 + x6^2 - x6 + 3, x3 + x4 - 1, x4^4 - 2*x4^3 + x4^2*x6^2 - x4^2*x6 + 4*x4^2 - x4*x6^2 + x4*x6 3*x4 + x6^4 - 2*x6^3 + 4*x6^2 - 3*x6 - 1, x5 + x6 - 1, x6^6 - 3*x6^5 + 6*x6^4 - 7*x6^3 + 2*x6^2 + x6 - 1 Permutation group acting we have set of cardinality 6 Order = 48 = 2^4 * 3 (1, 2) (3, 5)(4, 6) (1, 3, 5)(2, 4, 6) Certain special cases of the situation examined in Proposition 6.6 are used as exercises. Each time the goal is to obtain more precise information on what happens when we reduce the observed oddity. See Exercises 11, 12 and 13. 428 VII. The dynamic method When the triangular structure is missing Consider some elements α1 , . . . , α` of B and the nested K-algebras K ⊆ K1 = K[α1 ] ⊆ K2 = K[α1 , α2 ] ⊆ · · · ⊆ K` = K[α1 , . . . , α` ] ⊆ B. For i = 2, . . . , ` the structure of Ki as a Ki−1 -module can be made explicit by different techniques. If B is a splitting field for f , all the Ki ’s are fields and each of the modules is free. If one of these modules is not free, then we can construct an idempotent 6= 0, 1 in B by using the same technique as for the proof of the structure theorem VI-1.4, item 2b. Using the Gröbner basis technique can turn out to be efficient, with the ideal that defines B as a quotient of K[X1 , . . . , Xn ]. We introduce some variable names ai for the αi ’s and we choose a lexicographical order with a1 < · · · < a` < X1 < · · · < Xn . If B is a field the Gröbner basis must have a triangular structure. To each αi must correspond one and only one polynomial in the Gröbner basis, Pi (a1 , . . . , ai ) monic in ai . If this triangular structure is not respected for the variable ai , we are certain that Ki−1 is not a field, and we can explicitly construct a nonzero zerodivisor in this K-algebra. Actually, let P (a1 , . . . , ai ) be a polynomial that appears in the Gröbner basis and that is not monic in ai . Its leading coefficient as a polynomial in ai is a polynomial Q(a1 , . . . , ai−1 ) which necessarily gives a nonzero zerodivisor Q(α1 , . . . , αi−1 ) in the zero-dimensional algebra Ki−1 ' K[a1 , . . . , ai−1 ]/a , where a is the ideal generated by the first polynomials, in the variables a1 , . . . , ai−1 , that appear in the Gröbner basis. Otherwise, we could multiply P by the inverse of Q modulo a, and reduce the result modulo a, and we would obtain a monic polynomial in ai that precedes P in the lexicographical ordering, and that would render the presence of P pointless. Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Prove Propositions 3.1, 3.2 and Theorem 3.3. • Explain Fact 4.1. Exercises and problems 429 Exercise 2. (Structure of finite algebras over a field, classical version, dynamic constructive version) 1. Prove in classical mathematics the following result. Every finite algebra over a field is a finite product of finite local algebras. 2. Explain why we cannot hope to obtain a constructive proof of this result, even if we assume that the field is discrete. 3. Propose a constructive version of the previous result. Exercise 3. Show that the elementary local-global machinery no. 2 (page 212) applied to the proof of Theorem 1.5 gives the following result, equivalent to Theorem 1.5 in the case of a nontrivial discrete field. Theorem 1.5 bis (Weak Nullstellensatz and Noether position, reduced zerodimensional rings case) Let K be a reduced zero-dimensional ring, f be a finitely generated ideal of K[X] = K[X1 , . . . , Xn ] and A = K[X]/f be the quotient algebra. Then, there exists a fundamental system of orthogonal idempotents (e−1 , e0 , . . . , en ) of K and a change of variables such that, naming the new variables Y1 , . . . , Yn , and letting Kr = K[1/er ] and Ar = A[1/er ] = Kr ⊗K A ' Kr [X]/f Kr [X], we have the following results. 1. A−1 = 0 and K ∩ f = e−1 K. 2. A0 is a free K0 -module of finite rank > 1. 3. For r = 1, . . ., n we have • Kr [Y1 , . . . , Yr ] ∩ f = 0. In other words the algebra Kr [Y1 , . . . , Yr ] can be considered as a Kr -subalgebra of Ar . • Ar is a finitely presented module over Kr [Y1 , . . . , Yr ]. • There exists an integer N such that for each (α1 , . . . , αr ) ∈ Krr , the Kr -algebra Br = Ar /hY1 − α1 , . . . , Yr − αr i is a quasi-free Kr -module of finite rank 6 N , and the natural homomorphism Kr → Br is injective. In particular, theLK-algebra A is a finitely presented module over the “polynomial” n subalgebra A = Kr [Y1 , . . . , Yr ]. We say that the change of variables (which r=0 eventually changes nothing at all) has put the ideal in Noether position. Finally, the fundamental system of orthogonal idempotents that intervenes here does not depend on the change of variables that puts the ideal in Noether position. Exercise 4. (Magic squares and commutative algebra) In this exercise we provide an application of commutative algebra to a combinatorial problem; the free character that intervenes in the Noether positioning of question 2 is an example of the Cohen-Macaulay property in a graded environment. A magic square of size n is a matrix of Mn (N) for which the sum of each row and each column is the same. The set of these magic squares is an additive submonoid of Mn (N); we will admit here that it is the monoid generated by the n ! 430 VII. The dynamic method permutation matrices. We are interested in counting the magic squares of size 3 of fixed sum d. Here are the 6 permutation matrices of M3 (N) " # " # " # 1 0 0 0 0 1 0 1 0 P1 = 0 1 0 , P2 = 1 0 0 , P3 = 0 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 1 1 0 0 P4 = 1 0 0 , P5 = 0 1 0 , P6 = 0 0 1 0 0 1 1 0 0 0 1 0 They are linked by the relation P1 + P2 + P3 = P4 + P5 + P6 . Let k[(xij )i,j∈J1..3K ] be the polynomial ring with nine indeterminates where k is anQ arbitrary ring. We m identify the matrix M = (mij ) ∈ M3 (N) with the monomial i,j xij ij , denoted M P1 x ; for example x = x11 x22 x33 . 1. Let U1 , . . . , U6 be six indeterminates over k and ϕ : k[U ]  k[xP1 , . . . , xP6 ] defined by Ui 7→ xPi . We want to show that Ker ϕ is the ideal a = hU1 U2 U3 − U4 U5 U6 i. " # " # " # a. Show, for a, b, c, d, e, f ∈ N and m = min(a, b, c), that U1a U2b U3c U4d U5e U6f ≡ U1a−m U2b−m U3c−m U4d+m U5e+m U6f +m mod a b. Let a be the k-submodule of k[U ] with the monomials not divisible by U1 U2 U3 as its basis. Show that k[U ] = a ⊕ a• and that Ker ϕ = a. c. Deducethat the number Md of magic squares ofsize 3 and of sum d is equal to d+5 − d+2 since the convention is that ji = 0 for i < j. 5 5 • 2. Let B = k[U ]/a = k[u]. a. Define a Noether position A = k[v2 , v3 , u4 , u5 , u6 ] of B where v2 , v3 are linear forms in u, such that (1, u1 , u21 ) is an A-basis of B = A ⊕ Au1 ⊕ Au21 .    + d+3 + d+2 (MacMahon’s b. Deduce that the number Md is also equal to d+4 4 4 4 formula, which in passing gives an identity between binomial coefficients). 3. Suppose that k is a discrete field. We want to show that the ring B, regarded as the ring k[xP1 , . . . , xP6 ], is integrally closed (see also Problem XII -2). Let E ⊂ M3 (Z) be the Z-submodule of magic squares (analogous definition) and the subring B11 ⊂ k[x±1 ij , i, j ∈ J1..3K] such that B11 B11 = k[xP1 , xP6 ][x±P2 , x±P3 , x±P4 , x±P5 ] ⊂ k[ xM | M ∈ E, m11 > 0 ]. a. Verify that B and B11 have the same quotient field, which is the quotient field k(E), the field of rational fractions over k with 5 indeterminates. b. Show that B11 is integrally closed. c. For i, j ∈ J1..3K, define a ring Bij analogous to B11 and deduce that B is integrally closed. Exercise 5. Give a direct proof (not using a reductio ad absurdum) that if a discrete field has two automorphisms that generate a noncyclic finite group, the field contains some x = 6 0, all the powers of which are pairwise distinct, i.e. it is not a root of unity. Exercises and problems 431 Exercise 6. (A “discriminantal” identity) Let n > 1. Let E be the set of α ∈ Nn such that 0 6 αi < i for i ∈ J1..nK; it is a set of cardinality n! which we order by “factorial numeration,” i.e. α 4 β P P if α i! 6 β i!. We order the symmetric group Sn by the lexicographic i i i i ordering, In being the smallest permutation. Consider n indeterminates over Z and define a matrix M ∈ Mn! (Z[x]), indexed by Sn × E, Mσ,α = σ(xα ), Thus for n = 3:     M =   1 1 1 1 1 1 x2 x3 x1 x3 x1 x2 σ ∈ Sn , x3 x2 x3 x1 x2 x1 1. Show that det(M ) = δ n!/2 with δ = x2 x3 x2 x3 x1 x3 x1 x3 x1 x2 x1 x2 Q i<j α ∈ E. x23 x22 x23 x21 x22 x21 x2 x23 x22 x3 x1 x23 x21 x3 x1 x22 x21 x2        (xi − xj ). 2. Let s1 , . . . , sn ∈ Z[x] be the n elementary symmetric functions, F (T ) be the universal polynomial F (T ) = T n − s1 T n−1 + · · · + (−1)n sn , and U ∈ Mn! (Z[x]) be the trace-valued matrix, indexed by E × E, with term TrSn (xα+β ), α, β ∈ E. Let f ∈ k[T ] be a monic polynomial of degree n, A = Aduk,f . Prove the equality Disck A = disc(f )n!/2 (also found in Fact III -5.11). And conversely? 3. Revisit Theorem 4.12. Exercise 7. (The universal splitting algebra of the polynomial f (T ) = T n ) Let f (T ) = T n and A = Aduk,f = k[x1 , . . . , xn ]. Describe the structure of A. Exercise 8. (Invertible polynomials and nilpotency indices) Here we propose a quantitative version of item 4 of Lemma II -2.6. Let k be a commutative ring, f , g ∈ k[X] satisfying f g = 1 and f (0) = g(0) = 1. We write Pn Pm f = i=0 ai X i , g = j=0 bj X j . Show that αn β1 β2 βm 1 α2 aα 1 a2 · · · an b1 b2 · · · bm = 0 In particular, for i > 1, we have if d(nm+1)/ie ai P i iαi + P j jβj > nm. = 0 and therefore anm+1 = 0. 1 Exercise 9. (The universal splitting algebra of the polynomial f (T ) = T p − a in characteristic p) Let p be a prime number, k be a ring in which p · 1k = 0 and a ∈ k. Let f (T ) = T p − a ∈ k[T ], A = Aduk,f = k[x1 , . . . , xp ], k[α] = k[T ]/hf i, such that T − a = (T − α)p . Let ϕ : A  k[α] be the k-morphism xi 7→ α. Make the ideal Ker ϕ explicit and describe the structure of the k-algebra A. NB: if k is a discrete field and a is not a pth power in k, by Exercise III -10, the polynomial f (T ) is irreducible and k[α] is a field of decomposition of f over k. 432 VII. The dynamic method Exercise 10. (The trinomial T 5 + 5bT ± 4b where b = 5a2 − 1, with Galois group A5 ) Consider a trinomial T 5 + bT + c. We will determine b, c such that its discriminant is a square and obtain an irreducible polynomial with Galois group A5 as an illustration of the modular method. We use the equality discT (T 5 + bT + c) = 44 b5 + 55 c4 (see Problem III -1). 1. To force the discriminant into being a square in Z, explain why what follows is reasonable: b ← 5b, c ← 4c, then fa (T ) = T 5 + 5(5a2 − 1)T ± 4(5a2 − 1). The discriminant is then the square 28 56 a2 (5a2 − 1)4 . 2. Taking a = 1, we obtain f1 (T ) = T 5 + 20T ± 16 in Z[T ]. By examining the factorizations of f1 modulo 3 and 7, show that f1 is irreducible with Galois group A5 . Deduce that for a ≡ 1 mod 21, fa is irreducible with Galois group A5 . Show that the same thing holds for fa given as a polynomial with coefficients in the field of rational fractions Q(a). Exercise 11. (When a resolvent admits a zero in the base field) In the context of 6.1 let y ∈ B, G.y = {y1 , . . . , yr } and g(T ) = RvG,y (T ). 1. Suppose that a ∈ K is a simple zero of g. a. c = hy − aiB is a Galoisian ideal of (K, B, G). b. If β : B → C = B/c is the canonical projection, and if H = StG (c) is the new approximation of the Galois group, then β(y1 ) = a and for j 6= 1, RvH,yj divides g(T )/(T − a) (as usual we identify K with a subfield of B and β(K) with a subfield of C). 2. Suppose that a ∈ K is a zero of g with multiplicity k. a. There exist j2 , . . . , jk ∈ J2..rK such that c = hy1 − a, yj2 − a, . . . , yjk − ai is a minimal Galoisian ideal among those that contain y − a. Let j1 = 1. Show that, for j 6= j1 , . . . , jk , yj − a is invertible modulo c. b. Let β : B → C = B/c be the canonical projection, and H = StG (c). Then β(yj1 ) = · · · = β(yjk ) = a, and for j = 6 j1 , . . . , jk , the resolvent RvH,yj divides g(T )/(T − a)k . 3. Suppose that c is a Galoisian ideal of B and that StG (y) contains StG (c), then g(T ) admits a zero in K. Remark. Item 1 justifies the “Jordan method” for the computation of the Galois group. See page 441. Exercise 12. (When we know the decomposition into prime factors of a separable resolvent) In the context of 6.1 let y ∈ B and G.y = {y1 , . . . , yr }. Suppose that RvG,y = Miny = R1 · · · R` , with the Ri being irreducible and ` > 1. Compute a Galoisian idempotent e of B with the following properties, where we let (K, C, H) be the corresponding Galois quotient and β : B → C be the canonical projection. 1. For each i ∈ J1..rK, the polynomial Minβ(yi ) is equal to one of the Rj ’s. 2. The group H operates over {β(y1 ), . . . , β(yr )}. Solutions of selected exercises 433 3. The orbits are of length d1 = deg(R1 ), . . . , d` = deg(R` ). 4. This situation recurs in every Galois quotient of (K, C, H). Remark. Exercise 12 is the basis of the “McKay-Soicher method” for the computation of the Galois group. See page 441. Exercise 13. (When a minimal polynomial strictly divides a resolvent) In the context of 6.1 let y ∈ B and G.y = {y1 , . . . , yr }. Suppose that g(T ) = RvG,y (T ) 6= Miny (T ). Let (K, C, H) be a Galois quotient (with the canonical projection β : B → C) in which each β(yi ) admits a minimal polynomial equal to its resolvent. Show that for the different zeros β(yj ) of g1 (T ) = Minβ(y1 ) (T ) in C, the fibers  β −1 β(yj ) all have the same number of elements, say n1 . In addition, g1n1 divides g and g/g1n1 is comaximal with g1 . Some solutions, or sketches of solutions Exercise 2. 1. This results from the fact that a connected zero-dimensional ring is local and from the fact that, by LEM, we know the indecomposable idempotents of the algebra, which form a fundamental system of orthogonal idempotents. 2. In the case of an algebra K[X]/hf i with separable f , finding the idempotents is the same as factoring the polynomial. But there does not exist any general factorization algorithm for separable polynomials. 3. A constructive version consists in asserting that, concerning a computation, we can always “act as though” the result (proven by means of LEM) were true. This dynamic version is expressed as follows. Let K be a zero-dimensional ring (special case: a discrete field). Let (xi )i∈I be a finite family of elements in an integral K-algebra B (special case: a finite K-algebra). There exists a fundamental system of orthogonal idempotents (e1 , . . . , en ) such that in each component B/h1 − ej i, each xi is nilpotent or invertible. We prove this result as follows: Lemma VI -3.14 tells us that B is zero-dimensional; we conclude by the zero-dimensional splitting lemma (Lemma IV -8.10). Exercise 4. We easily check that the Z-syzygy module between the matrices P1 , . . . , P6 is generated by (1, 1, 1, −1, −1, −1). We will also  use the fact that the number of monomials of degree d in n variables is d+n−1 . n−1 Y i Z j , so Y m − Z m = (Y − Z)S(Y, Z). In this 1a. Let S(Y, Z) = i+j=m−1 equality, we make Y = U1 U2 U3 , Z = U4 U5 U6 . We obtain the desired result by multiplying by U1a−m U2b−m U3c−m U4d U5e U6f . 1b. We clearly have a ⊆ Ker ϕ. The equality k[U ] = a + a• results from item 1a. It therefore suffices to see that Ker ϕ ∩ a• = {0}, i.e. that the restriction of ϕ to a• is injective. As ϕ transforms a monomial into a monomial, it suffices to see 0 0 that if two monomials U1a · · · U6f and U1a · · · U6f ∈ a• have the same image under ϕ, then they are equal. P 434 VII. The dynamic method We have (a, b, c, . . . , f ) = (a0 , b0 , c0 , . . . , f 0 ) + k(1, 1, 1, −1, −1, −1) with k ∈ Z, and as min(a, b, c) = min(a0 , b0 , c0 ) = 0, we have k = 0, which gives the equality of the two monomials. 1c. The number Md that we are searching for is the dimension over k of the homogeneous component of degree d of k[xP1 , . . . , xP6 ] or (via ϕ) that of a•d . But we also have k[U ] = b ⊕ a• where b is the (monomial) ideal generated by the monomials divisible by U1 U2 U3 (in some way, b is an initial ideal of a). We therefore have k[U ]d = bd ⊕ a•d and dimk k[U ]d = d+5 , dimk bd = d+5−3 , Md = dimk a•d = d+5 − d+2 . 5 5 5 5 2a. We define V2 , V3 by U2 = U1 + V2 , U3 = U1 + V3 . The polynomial U1 U2 U3 −U4 U5 U6 given in k[U1 , V2 , V3 , U4 , U5 , U6 ] becomes monic in U1 of degree 3. We leave it up to the reader to check the other details. 2b. The number we are looking for is also Md = dimk Bd . But we have Bd = Ad ⊕ Ad−1 u1 ⊕ Ad−2 u21 ' Ad ⊕ Ad−1 ⊕ Ad−2 . It suffices to use the fact that A is a polynomial ring over k with 5 indeterminates. As an indication, for d = 0, 1, 2, 3, 4, 5, Md = 1, 6, 21, 55, 120, 231. 3a. The Z-module E is free of rank 5: 5 arbitrary matrices among {P1 , . . . , P6 } form a Z-basis of it. 3b. Since P1 + P2 + P3 = P4 + P5 + P6 , we have B11 = k[xP1 ][x±P2 , x±P3 , x±P4 , x±P5 ] = k[xP6 ][x±P2 , x±P3 , x±P4 , x±P5 ].     We then see that B11 is a localized ring of k[xP1 , xP2 , xP3 , xP4 , xP5 ], which is a polynomial ring with 5 indeterminates over k, so integrally closed. 3c. We define Bij such that it is contained in k[ xM | M ∈ E, mij > 0 ]. For example, for (i, j) = (3, 1), the matrices Pk with a null coefficient in position (3, 1) are those other than P3 , P5 , which leads to the definition of B31 : B31 = k[xP3 , xP5 ][x±P1 , x±P2 , x±P4 , x±P6 ]. T We then have the equality B = i,j Bij , and as the Bij ’s are all integrally closed with the same quotient field Frac B, the ring B is integrally closed. Exercise 6. 2. We write U = tM M and take the determinant. This gives Disck A = disc(f )n!/2 from det(M ) = δ n!/2 . Conversely, since this is a matter of algebraic identities in Z[x], the equality (det M )2 = (δ n!/2 )2 implies det M = ±δ n!/2 . 3. In Theorem 4.12,Q let us not assume that f is separable over C. By hypothesis, n we have ϕ(f )(T ) = i=1 (T − ui ). With A = k[x1 , . . . , xn ] = Aduk (f ), we then have a morphism of C-algebras Φ : C ⊗k A → Cn! which performs 1 ⊗ xi 7→ (uσ(i) )σ∈Sn . The canonical k-basis B(f ) of A is a C-basis of C ⊗k A and the matrix of Φ for this basis (at the start) and for the canonical basis of Cn! (at the end) is the above matrix M where xi is replaced by ui . We deduce that Φ is an isomorphism if and only if ϕ disc(f ) ∈ C× , i.e. if f is separable over C. Finally, let us only suppose that an algebra ϕ : k → C diagonalizes A. This means that we give n! characters AduC,ϕ(f ) → C which, when put together, give an isomorphism of C-algebras of AduC,ϕ(f ) over Cn! . Solutions of selected exercises 435 Since there exists a character AduC,ϕ(f ) → C, the polynomial ϕ(f )(T ) completely factorizes in C. n!/2 Finally, the discriminant of the canonical basis of AduC,ϕ(f ) is ϕ disc(f ) and the discriminant of the canonical basis of Cn! is 1. Therefore, f is separable over C. Exercise 7. We have A = k[X1 , . . . , Xn ]/hS1 , . . . , Sn i where S1 , . . . , Sn are the n elementary symmetric functions of (X1 , . . . , Xn ); the ideal hS1 , . . . , Sn i being homogeneous, the k-algebra A is graded (by the degree). Let Ad be its homogeneous component of degree d and m = hx1 , . . . , xn i; we therefore have A = A0 ⊕ A1 ⊕ A2 ⊕ . . . with A0 = k and md = Ad ⊕ Ad+1 ⊕ . . . , md = Ad ⊕ md+1 . n(n−1)+1 Since xn = 0, so Ad = 0 for d > n(n − 1) + 1. Recall the i = 0, we have m αn 1 basis B(f ) of A, formed from the elements xα 1 . . . xn with 0 6 αi < n − i. For all d, the homogeneous component Ad of degree d is a free k-module whose basis αn 1 is the set of the xα 1 . . . xn with 0 6 αi < n − i and |α| = d. The cardinality of this basis is the coefficient of degree d in the polynomial S(t) ∈ Z[t] ti − 1 . t−1 Indeed, a multi-index (α1 , . . . , αn ) such that 0 6 αi < n−i and |α| = d is obtained by choosing a monomial tαn of the polynomial 1 + t + · · · + tn−1 , a monomial tαn−1 of the polynomial 1 + t + · · · + tn−2 and so on, the product of these monomials being td . We thus obtain the Hilbert-Poincaré series SA (t) of A, S(t) = 1(1 + t)(1 + t + t2 ) · · · (1 + t + · · · + tn−1 ) = def SA (t) = here P∞ i=0 dimk Ad td = P 06αi <n−i Qn i=1 t|α| = S(t). The polynomial S is a monic polynomial of degree e = 1 + · · · + n − 1 = n(n − 1)/2. We have S(1) = n!, in accordance with S(1) = dimk A. Variant. Let B = k[S1 , . . . , Sn ] ⊂ C = k[X1 , . . . , Xn ]. Then C is a free B-module with the X α = X1α1 · · · Xnαn as its basis, with 0 6 αi < n − i. This basis is above the basis B(f ) of A over k if we consider that we have a commutative diagram where each vertical arrow is a reduction modulo hS1 , . . . , Sn i. B  k /C  /A Writing C = BX α , with the shift SBX α (t) = t|α| SB (t), we have the following α equality between the Hilbert-Poincaré series L SC = SA SB with SA = P 06αi <n−i t|α| . However, it is easy to see that SC (t) = 1 , (1−t)n SB (t) = Qn 1 , d=1 1−td and so SA (t) = Qn 1 − t d SC = d=1 , 1−t SB once again giving us the result for SA . Let us now move onto the powers of the ideal m. Let ϕ : A  k be the character xi 7→ 0 with kernel m = hx1 , . . . , xn i. We have A = k[x1 , . . . , xn ] = k ⊕ m, m ⊆ DA (0) ⊆ Rad(A) and for z ∈ A, z ∈ A× ⇐⇒ ϕ(z) ∈ k× ⇐⇒ z ∈ k× ⊕ m. 436 VII. The dynamic method We have DA (0) = Dk (0) ⊕ m, Rad(A) = Rad(k) ⊕ m. Since m ⊆ Rad(A) is finitely generated, we have md = md+1 ⇐⇒ md = 0 (Lemma IX -3.2), which, since md = Ad ⊕ md+1 , is equivalent to Ad = 0. We deduce that me+1 = 0. Remark. if k is local, then so is A, and Rad A = ϕ−1 (Rad k). Exercise 8.P Consider the polynomial Pm ring C = k[a1 , . . . , an , b1 , . . . , bm ], let n f (X) = 1 + i=1 ai X i , g(X) = 1 + j=1 bj X j , and c = cC (f g − 1). We assign to ai the weight i and to bj the weight j. The coefficient of degree k of f g − 1 is homogeneous of degree k, so the ideal c is homogeneous. Let C0 = C/c . This k-algebra C0 is graded via the above weight and we must show that C0d = 0 for d > nm. It is clear that C0d = 0 for large enough d. We will determine the Hilbert-Poincaré series SC0 of C0 (which here is a polynomial) S def C0 (t) = Qn+m dimk C0d td d>0 P = Qn i=1 0 d=1 i (1 − td ) (1 − t ) Qm j=1 . (1 − tj ) To prove this equality, we construct C and C in a different way. We consider n + m indeterminates (X1 , . . . , Xn , Y1 , . . . , Ym ), and let (a1 , . . . , an ) be the elementary symmetric functions of (X1 , . . . , Xn ), and (b1 , . . . , bm ) be the elementary symmetric functions of (Y1 , . . . , Ym ). Since Qn i=1 (T + Xi ) Qm j=1 (T + Yj ) = (T n + a1 T n−1 + · · · + an )(T m + b1 T m−1 + · · · + bm ), we see, by letting a0 = b0 = 1, that a b is the dth elementary symmetric i+j=d i j function of (X1 , . . . , Xn , Y1 , . . . , Ym ). As (a1 , . . . , an , b1 , . . . , bm ) are algebraically independent over k, we can consider that C is the following graded subalgebra P C = k[a1 , . . . , an , b1 , . . . , bm ] ⊂ D = k[X1 , . . . , Xn , Y1 , . . . , Ym ], P and that the ideal c of C is generated by the n + m sums a b , which are i+j=d i j the elementary symmetric functions of (X1 , . . . , Xn , Y1 , . . . , Ym ). The algebra D is free over C of rank n!m!, as for a double universal splitting algebra. More precisely, here are some bases. The X α = X1α1 · · · Xnαn for 0 6 αi < n − i form a basis of k[X] over k[a]. βm The Y β = Y1β1 · · · Ym with 0 6 βj < m − j form a basis of k[Y ] over k[b]. α β Thus, the X Y form a basis of D = k[X, Y ] over C = k[a, b]. Finally, by the scalar extension C → C0 = C/c , the xα y β form a basis of D0 = D/cD = k[x, y] over C0 . We have a commutative diagram at our disposal where each vertical arrow is a reduction modulo c. Our aim is to determine the Hilbert-Poincaré series SC0 of C0 given that we know those of D0 , C and D (because C and D are polynomial rings, and D0 is the universal splitting algebra of T n+m over k). We conclude the in the following simple manner. Lcomputations We write D = C X α Y β , so α,β SD (t) = F (t)SC (t) with F (t) = P α,β t|α|+|β| = P α t|α| /D  C  / D0 C0 P β t|β| , Solutions of selected exercises 437 and we also have SD0 (t) = F (t)SC0 (t). We have seen in Exercise 7 that F (t) = 1−ti i=1 1−t Qn 1−tj j=1 1−t Qm , SD0 (t) = Qn+m d=1 1−td . 1−t Then let Sd (t) = (1 − td )/(1 − t). It is a polynomial of degree d − 1 and Sd (1) = d. We have therefore obtained S1 S2 · · · Sn+m , SC0 (t) = S1 S2 · · · Sn S1 S2 · · · Sm with (n + m − 1)(n + m) − (n − 1)n − m(m − 1) deg SC0 = = nm. 2 Thus, as desired, C0k = 0 for k > nm.  Please note that dimk C0 = SC0 (1) = n+m . n Exercise 9. For each i ∈ J1..pK the restriction ϕ : k[xi ] → k[α] is an isomorphism. Consider the ideal m = hxi − xj , i, j ∈ J1..pKi = hx1 − xi , i ∈ J2..pKi . Then A = k[x1 ] ⊕ m, hence m = Ker ϕ. Actually we can regard A as the universal splitting algebra Aduk[x1 ],g for the polynomial g(T ) = f (T )/(T − x1 ) = (T − x1 )p−1 over the ring k[x1 ] which brings us back to Exercise 7. In particular m1+(p−1)(p−2)/2 = 0, DA (0) = Dk[x1 ] (0) ⊕ m and Rad(A) = Rad(k[x1 ]) ⊕ m. Exercise 10. 1. The goal of the operation b ← 5b, c ← 4c is to replace 44 b5 + 55 c4 by 44 55 (b5 + c4 ); by imposing c = ±b, we obtain 44 55 b4 (b + 1) which is easy to turn into a square by imposing 5(b + 1) = a2 . To avoid the denominator 5, we impose 5(b + 1) = (5a)2 instead, i.e. b = 5a2 − 1. 2. For a ∈ Q? , the polynomial fa (T ) ∈ Q[T ] is separable. Modulo the small prime numbers we find the following decompositions of f1 (T ) = T 5 + 20T + 16ε, with ε ∈ {±1}, into irreducible factors mod 2 : T5 mod 3 : f1 (T ) mod 5 : (T + ε)5 mod 7 : (T + 2ε)(T + 3ε)(T 3 + 2εT 2 + 5T + 5ε) The result modulo 3 proves that f1 (T ) is irreducible over Z. Its Galois group G is a transitive subgroup of A5 that contains a 3-cycle (given the reduction modulo 7). This implies G = A5 . Indeed, a transitive subgroup of S5 containing a 3-cycle is equal to S5 or A5 . As for Q(a) as a base field, the polynomial fa (T ) is irreducible in Q[a][T ] since its reduction modulo a = 1 is irreducible in Q[T ]. Therefore it is irreducible in Q(a)[T ]. Using the fact that its discriminant is a square and the reduction modulo a = 1, we obtain that its Galois group is A5 . The readers might ask themselves the following question: For every a ∈ Z \ {0}, is the polynomial fa (T ) irreducible with Galois group A5 ? Possible experiment. Here is the distribution of the types of permutation of the transitive subgroups 438 VII. The dynamic method of S5 . For the 7 types that appear in S5 , we use the following notation t1 = (15 ), t2 = (2, 13 ), t22 = (22 , 1), t3 = (3, 12 ), t3,2 = (3, 2), t4 = (4, 1), t5 = (5). Thus t22 is the type of the double-transpositions, t3 that of the 3-cycles, etc. . . The announced table: G #G C5 ASL1 (F5 ) 5 t11 t45 AGL1 (F5 ) 10 t11 t522 A5 20 t45 t11 t522 t10 4 S5 60 t45 t11 t15 22 t20 3 120 t24 5 t11 t10 2 t15 22 20 30 24 t20 3 t32 t4 t5 20 24 For example in the last row, under A5 , t11 t15 22 t3 t5 means that A5 contains the identity, 15 double-transpositions, 20 3-cycles and 24 5-cycles (1+15+20+24 = 60). The reader will be able to experimentally test Cebotarev’s density theorem with the help of a Computer Algebra system. We must examine the factorization of f1 (T ) modulo “a lot” of primes p and compare the distribution obtained from the types of factorization with that of the types of permutation of A5 . The author of the exercise has considered the first 120 prime numbers — other than 2 and 5 which divide disc(f1 ) — and his program has found the following distribution 38 49 t33 22 t3 t5 . This means that we have found a factorization of type t22 (2 irreducible factors of degree 2, 1 irreducible factor of degree 1) 33 times, a factorization of type t3 38 times and a factorization of type t5 49 times (no factorization of type t1 ). A distribution to be compared with that of A5 . As for the type t1 , the smallest prime p for which f1 (T ) mod p is entirely decomposed is p = 887. Finally, when treating 1200 primes instead of 120, we find the distribution 304 428 452 t16 t5 . 1 t22 t3 j ∈ J2..rK. Exercise 11. 1a. We need to show that hy1 − ai + hyj − ai = h1i forQ For example in the quotient B/hy1 − a, y2 − ai the polynomial g(T ) = (T − yj ) has two factors equal to T − a which implies that g 0 (a) = 0. As g 0 (a) is invertible by hypothesis (which remains true in a quotient), we indeed have 0 = 1 in the quotient. 1b. We easily see that H = St(y1 ). Therefore H operates over {β(y2 ), . . . , β(yr )}.  Qr Qr However, g(T )/(T −y1 ) = j=2 (T −yj ) in B, so g(T )/(T −a) = j=2 T −β(yj ) in C. 2a. It is clear that y1 − a is a nonzero zerodivisor in B. A minimal Galoisian ideal c containing hy1 − ai is obtained by adding as many conjugates of hy1 − ai as possible under the condition of not reaching the ideal h1i. The ideal c is therefore of the form hyj − a | j ∈ Ji for a subset J of J1..rK. It remains to see if the number of j’s such that yj − a ∈ c is k. However, for every index j, the element yj − a is Q null or invertible modulo c. Since g(T ) = j T − β(yj ) , and since a is a zero with multiplicity k of g, the number of j’s such that β(yj ) = a is equal to k (let g(a) = g 0 (a) = · · · = g (k−1) (a) = 0 and g (k) (a) be invertible). 2b. Reason as in 1b. Solutions of selected exercises 439 3. The Galois quotient C = B/c is obtained with its group H = StG (c). By hypothesis y1 ∈ Fix(H) so y1 ∈ K. Let a be the element of K in question. In C Q we have g(T ) = j (T − yj ), so g(a) = 0. Finally, K is identified with its image in C. Example. Here is an example with deg f = 6. We ask Magma to compute the minimal polynomial of y = x4 + x5 x6 , and then to factorize it. If g is the first factor, z = g(y) is a nonzero zerodivisor. We launch Algorithm 6.5 with z. We therefore obtain the new approximations of the splitting field and of the Galois group by treating the oddity “z is a nonzero zerodivisor,” but we can observe a posteriori that z has multiplicity 6 in its resolvent and that hzi is Galoisian. f:= T^6 - 3*T^5 + 4*T^4 - 2*T^3 + T^2 - T + 1; y:=x4+x5*x6; pm:=MinimalPolynomial(y); T^60 - 46*T^59 + 1035*T^58 - 15178*T^57 + 163080*T^56 + ... + 264613 Factorization(pm); <T^6 - 4*T^5 + 8*T^4 - 6*T^3 + T + 1, 1>, ... z:=Evaluate(T^6 - 4*T^5 + 8*T^4 - 6*T^3 + T + 1,y); 20*x4^3*x5^3*x6^3 - 15*x4^3*x5^3*x6^2 - 15*x4^3*x5^2*x6^3 + 11*x4^3*x5^2*x6^2 + 2*x4^3*x5^2*x6 + 2*x4^3*x5*x6^2 + x4^3*x5*x6 - ... // z divides 0, we compute the new Galois quotient Affine Algebra of rank 6 over Rational Field Variables: x1, x2, x3, x4, x5, x6 Quotient relations: x1 + x2 + x3 - x6^5 + 2*x6^4 - x6^3 - x6^2 - 1, x2^2 + x2*x3 - x2*x6^5 + 2*x2*x6^4 - x2*x6^3 - x2*x6^2 - x2 + x3^2 x3*x6^5 + 2*x3*x6^4 - x3*x6^3 - x3*x6^2 - x3 + x6^5 - 2*x6^4 + x6^3 + x6^2, x3^3 - x3^2*x6^5 + 2*x3^2*x6^4 - x3^2*x6^3 - x3^2*x6^2 - x3^2 + x3*x6^5 - 2*x3*x6^4 + x3*x6^3 + x3*x6^2 - x6^5 + 2*x6^4 - x6^3 x6^2 + 1, x4 + x5 + x6^5 - 2*x6^4 + x6^3 + x6^2 + x6 - 2, x5^2 + x5*x6^5 - 2*x5*x6^4 + x5*x6^3 + x5*x6^2 + x5*x6 - 2*x5 x6^4 + 2*x6^3 - x6^2 - x6, x6^6 - 3*x6^5 + 4*x6^4 - 2*x6^3 + x6^2 - x6 + 1 Permutation group G2 acting we have set of cardinality 6 Order = 72 = 2^3 * 3^2 (1, 4)(2, 5)(3, 6) (1, 2) (2, 3) Degree(MinimalPolynomial(z)); 55 #Orbit(z,G); 60 Exercise 12. Notice that the yi − yj ’s for i 6= j are invertible, and that this remains true in every Galois quotient. 440 VII. The dynamic method Bibliographic comments Theorem 1.10 says that a polynomial ring over a zerodimensional reduced ring is stronbly discrete and coherent. It admits a remarkable generalization to strongly discrete coherent Prüfer rings: see [Yengui] and [69]. The versions that we have given of the Nullstellensatz “without algebraic closure” can be found in a related form in [MRR, VIII.2.4, VIII.3.3]. The intrinsic difficulty of the problem of the isomorphism of two algebraic closures of a field is illustrated in [165, Sander, Theorem 26], which shows that, in the presence of LEM but in the absence of the axiom of dependent choice, it is impossible to prove in ZF that two algebraic closures of Q are isomorphic. The treatment of Galois theory based on Galois quotients of the universal splitting algebra dates back to Jules Drach [62, 1898] and to Ernest Vessiot [190, 1904]. Here is an extract of the introduction of the latter article, which speaks in the language of the time about Galois quotients of the universal splitting algebra: “Étant donnée une equation algébrique, que l’on considère comme remplacée par le système (S) des relations entre les racines x1 , . . . , xn et les coefficients, on étudie d’abord le problème fondamental suivant: Quel parti peut-on tirer de la connaissance de certaines relations (A) entre x1 , . . . , xn , en n’employant que des opérations rationnelles? Nous montrons que l’on peut déduire du système (S, A) un système analogue, dont le système (S, A) admet toutes les solutions, et qui est, comme nous le disons, automorphe: ce qui veut dire que ses diverses solutions se déduisent de l’une quelconque d’entre elles par les substitutions d’un groupe G, qui est dit le groupe associé au système, ou simplement le groupe du système. On remarquera que S est déjà un système automorphe, ayant le groupe général pour groupe associé. Dès lors, si l’on se place du point de vue de Galois, . . . on voit que l’on peut se limiter à ne considérer que des systèmes (S, A) rationnels and automorphes.”5 5 This quote translates as: “Given an algebraic equation, that we consider as replaced by the system (S) of relations between the roots x1 , . . . , xn and the coefficients, we first study the following fundamental problem: What subset can we extract from the knowledge of certain relations (A) between x1 , . . . , xn , by only employing rational operations? We show that we can deduce from the system (S, A) an analogous system, for which the system (S, A) admits all the solutions, and which is, as we say, automorphic: which means that its diverse solutions are deduced from any one of them by the substitutions of a group G, which is said to be the group associated with the system, or simply the group of the system. We will notice that S is already an automorphic system, with the general group being its associated group. From then on, if we take Galois’ point of view, . . . we see that we can limit ourselves to only considering rational and automorphic systems (S, A).” Bibliographic comments 441 The universal splitting algebra is dealt with in considerable detail in Chapter 2 of the book [Pohst & Zassenhaus, 1989]. Among the good modern works that present all of classical Galois theory, we cite [Tignol] and [Cox]. The “dynamic Galois theory” presented in detail in this chapter is presented in [56, Díaz-Toca] and [60, 61, Díaz-Toca&al.]. Regarding Theorem 4.9 on the fixed points of Sn in the universal splitting algebra, the “f is separable” case belongs to folklore. We find it, with a proof related to the one given here, in Lionel Ducos’ thesis [63]. We have given another proof of it in Theorem III -6.15 for the discrete fields case. The refinement that we give is found in [60], it is inspired by [Pohst & Zassenhaus] (see Theorem 2.18 page 46, Corollary 3.6 page 49 and the following remark, page 50). Theorem 4.15, published in [60] under a restrictive hypothesis, generalizes a result given separately in the universal splitting algebra over a field case by L. Ducos [64] and by P. Aubry and A. Valibouze [2]. Our method of proof is closer to that of L. Ducos, but it is different because the framework is more general: we start off with an arbitrary commutative ring. A related version of Theorem 4.12 is found in [63, lemme II.4.1]. Regarding the explicit methods of computing Galois groups over Q recently developed in Computer Algebra we refer to [88, Geissler&Klüners]. The modular method, made popular by van der Waerden, is due to Dedekind (letter addressed to Frobenius on June 18, 1882, see [20, Brandl]). The Stauduhar [173] and Soicher-McKay [172] methods are based on computations of resolvents and on the knowledge of the transitive subgroups of the groups Sn . These have been tabulated up to n = 31 [106, Hulpke]. In most of the existing algorithms the computation determines the Galois group of an irreducible polynomial, without computing the splitting field. See however [117, Klüners&Malle] and [2, 144, 186, Valibouze&al.]. Moreover, let us cite the remarkable polynomial time computability result [121, Landau&Miller] regarding the solvability by radicals. Alan Steel [174, 175] was inspired by D5 to implement a very efficient “dynamic” algebraic closure of Q in Magma. The efficiency depends on him not using a factorization algorithm for the polynomials of Z[X], nor an algorithm of representation of the finite extensions by means of primitive elements. Nevertheless he uses factorization algorithms modulo p to control the process. The process is dynamic in the sense that the progressively constructed closure depends on the user’s questions. The author however does not give (and could not do so in his chosen framework) an implementation of the splitting field of a polynomial (let us say separable for the sake of simplification) over a “general” field. For the Computer Algebra system Magma, see [19, 28, Bosma&al.]. Chapter VIII Flat modules Contents Introduction . . . . . . . . . . . 1 First properties . . . . . . . . . Definition and basic properties . . Local-global principle . . . . . . . Other characterizations of flatness Flat quotients . . . . . . . . . . . 2 Finitely generated flat modules 3 Flat principal ideals . . . . . . 4 Finitely generated flat ideals . Arithmetic rings and Prüfer rings Local-global principle . . . . . . . Local-global machinery . . . . . . 5 Flat algebras . . . . . . . . . . . 6 Faithfully flat algebras . . . . . Exercises and problems . . . . . Solutions of selected exercises . . . Bibliographic comments . . . . – 443 – . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444 444 444 447 447 450 453 456 458 460 460 461 462 466 471 475 483 444 VIII. Flat modules Introduction Dear elements, if you aren’t free, it isn’t my fault. A flat module. Flatness is a fundamental notion of commutative algebra, introduced by Serre in [168]. In this chapter we introduce the notion of a flat module, of a flat algebra and of a faithfully flat algebra, and prove some of the essential properties of these objects. An integral ring whose finitely generated ideals are flat is called a Prüfer domain. This is another fundamental notion of commutative algebra which will only be introduced here. It will be further developed in Chapter XII. 1. First properties Definition and basic properties We give an elementary definition and later develop the relationship with the exactness of the functor M ⊗ •. 1.1. Definition. Consider an A-module M . 1. A syzygy in M is given by L ∈ A1×n and X ∈ M n×1 which satisfy LX = 0. 2. We say that the syzygy LX = 0 is explained in M if we find Y ∈ M m×1 and a matrix G ∈ An×m that satisfy LG = 0 and GY = X . (1) 3. The A-module M is called a flat module if every syzygy in M is explained in M . (Intuitively speaking: if there is a syzygy between elements of M , the module is not to blame.) Remarks. 1) In items 1 and 2 the symbol 0 is specified implicitly by the context. In 1 it is 0M , whereas in 2 it is 0Am×1 . 2) In item 2, when we say that the syzygy LX = 0 is explained in M , we mean that the explanation “does not touch L.” However, the equalities given by the matrix equation LG = 0 take place in A and not in M . Examples. 1) If M is free and finitely generated,1 it is flat: if LX = 0, we write X = GY with a column vector Y which forms a basis, and LX = 0 implies LG = 0. L 1 (I) Or more generally if M is freely generated by a discrete set, i.e. M ' A with I discrete. For another generalization see Exercise 16. = i∈I A 1. First properties 445 S 2) If M = i∈I Mi with ∀i, j ∈ I, ∃k ∈ I, Mk ⊇ Mi ∪ Mj (we then say that M is a filtering union of the Mi ’s), and if each Mi is flat, then M is flat. 3) Let a be a regular element in A, M be an A-module and P u ∈ M such that au = 0. If this syzygy is explained in M , we write u = i ai ui (ai ∈ A, ui ∈ M ) with each aai = 0, so u = 0. Thus in a flat module, every element annihilated by a regular element is null. 4) (Continued) The torsion submodule of a module M is the module N = { x ∈ M | ∃a ∈ Reg(A), ax = 0 } , where Reg(A) designates the filter of the regular elements of A. This torsion submodule is the kernel of the morphism of scalar extension to Frac A for the module M . The torsion submodule of a flat module is reduced to 0. When the ring A is integral, we say that a module is torsion-free if its torsion submodule is reduced to 0. Over a Bézout domain, or more generally over a Prüfer domain, a module is flat if and only if it is torsion-free (Exercise 1 and Theorem XII -3.2 item 2b). Later we give a generalization of the notion of a torsion-free module for an arbitrary commutative ring (Definition 3.3). 5) We will see (Proposition 4.2) that a finitely generated flat ideal a is V2 locally principal, which implies a = 0 (Theorem V -7.3). Thus, when A is a nontrivial integral ring and B = A[x, y], the ideal a = hx, yi is an V2 example of a B-module that is torsion-free, but not flat (since B a = A x by Example on page 195). In fact, the relation [ y − x ] = 0 is not y explained in a, but in B. The following proposition says that the “explanation” which is given for the syzygy LX = 0 in the definition of a flat module extends to a finite number of syzygies. 1.2. Proposition. Let M be a flat A-module. Consider a family of k syzygies, written in the form LX = 0, where L ∈ Ak×n and X ∈ M n×1 . Then, we can find an integer m, a vector Y ∈ M m×1 and a matrix G ∈ An×m satisfying the equalities GY = X and LG = 0. J Let L1 , . . . , Lk be rows of L. The syzygy L1 X = 0 is explained by two matrices G1 and Y1 and by two equalities X = G1 Y1 and L1 G1 = 0. The syzygy L2 X = 0 is rewritten as L2 G1 Y1 = 0 i.e. L02 Y1 = 0. This syzygy is explained in the form Y1 = G2 Y2 and L02 G2 = 0. Therefore X = G1 Y1 = G1 G2 Y2 . With L1 G1 G2 = 0 and L2 G1 G2 = L02 G2 = 0. The column vector Y2 and the matrix H2 = G1 G2 therefore explain the two syzygies L1 X = 0 and L2 X = 0. All that remains is to iterate the process.  446 VIII. Flat modules The following theorem reformulates Proposition 1.2 in the language of categories. The proof is a translation exercise left to the reader. 1.3. Theorem. (Characterization of flat modules, 1) For some A-module M the following properties are equivalent. 1. The module M is flat. 2. Every linear map from a finitely presented module P to M is factorized by a free module of finite rank. 1.4. Theorem. An A-module M is finitely presented and flat if and only if it is finitely generated projective. J The condition is necessary by the following remark. It is sufficient, because the identity of M is factorized by a free A-module L of finite rank. Then, the composition L → M → L is a projection whose image is isomorphic to M .  It is immediate that the A-module M ⊕N is flat if and only if the modules M and N are flat. The following proposition gives a slightly better result (see also Theorem 1.16 and Exercise 16). 1.5. Proposition. Let N ⊆ M be two A-modules. If N and M/N are flat, then M is flat. J Write x the object x (defined over M ) considered modulo N . Consider a syzygy LX = 0 in M . Since M/N is flat, we obtain G over A and Y over M such that LG = 0 and GY = X. Consider the vector X 0 = X − GY over N . We have LX 0 = 0, and since N is flat, we obtain H over A and Z over N such that LH = 0 and HZ = X − GY . Y Thus the matrix G H and the vector explain the relation LX = 0. Z 1.6. Fact. Let S be a monoid of the ring A. 1. The localized ring AS is flat as an A-module. 2. If M is an A-flat module, then MS is flat as an A-module and as an AS -module. J It suffices to prove item 2. If we have a syzygy LX = 0 in the A-module MS , we write X = X 0 /s and we have a syzygy uLX 0 = 0 in M (with u, s ∈ S). We therefore find Y 0 over M and G over A such that GY 0 = X 0 in M and uLG = 0 in A. This implies, for Y = Y 0 /(su), the equality uGY = X in MS , such that uG and Y explain the relation LX = 0 in MS . We can construct an analogous proof by starting with the syzygy in MS considered as an AS -module.  1. First properties 447 Local-global principle Flatness is a local notion in the following sense. 1.7. Concrete local-global principle. (For flat modules) Let S1 , . . ., Sr be comaximal monoids of a ring A, and let M be an A-module. 1. A syzygy LX = 0 in M is explained in M if and only if it is explained in each of the MSi’s. 2. The module M is flat over A if and only if each of the MSi’s is flat over ASi . J It suffices to prove the first item. The “only if” is given by Fact 1.6. Let us prove the other implication. Let LX = 0 be a syzygy between elements of M (where L ∈ A1×n and X ∈ M n×1 ). We want to find m ∈ N, Y ∈ M m×1 and a matrix G ∈ An×m which satisfy Equation (1). We have a solution (mi , Yi , Gi ) for (1) in each localized ring ASi . We can write Yi = Zi /si , Gi = Hi /si with Zi ∈ M mi ×1 , Hi ∈ An×mi and some si ∈ Si that are suitable. We then have ui Hi Zi = vi X in M Pr and ui LHi = 0 in A for some ui and vi ∈ Si . We write i=1 bi vi = 1 in A. For G we take the matrix obtained by juxtaposing the matrices bi ui Hi in a row, and for Y we take the vector obtained by superposing the vectors Zi Pr in a column. We obtain GY = i=1 bi vi X = X in M , and LG = 0 in A. The corresponding principle in classical mathematics is the following. 1.8. Abstract local-global principle∗ . (For flat modules) 1. A syzygy LX = 0 in M is explained in M if and only if it is explained in Mm for every maximal ideal m. 2. An A-module M is flat if and only if for every maximal ideal m, the module Mm is flat over Am . J It suffices to show the first item. However, the fact that a syzygy LX = 0 can be explained is a finite character property (Definition II -2.9). We therefore apply Fact II -2.12 which allows us to pass from the concrete local-global principle to the corresponding abstract local-global principle. Other characterizations of flatness We will now consider syzygies over M with coefficients in another module N and we will show that when M is flat, every syzygy with coefficients in any module N is explained in M . 448 VIII. Flat modules 1.9. Definition. Let M and N be two A-modules. For L = [ a1 · · · an ] ∈ N 1×n and X = t[ x1 · · · xn ] ∈ M n×1 , let def Pn L X = i=1 ai ⊗ xi ∈ N ⊗ M. 1. If L X = 0 we say that we have a syzygy between the xi ’s with coefficients in N . 2. We say that the syzygy L X = 0 is explained in M if we have Y ∈ M m×1 and a matrix G ∈ An×m which satisfy LG =N 1×m 0 and X =M n×1 GY . (2) Remark. 1) When we say that the syzygy LX = 0 is explained in M , we mean that the explanation “does not touch L.” 2) We note that in general the equality L GY = LG Y is assured for every matrix G with coefficients in A because a ⊗ αy = aα ⊗ y when a ∈ N , y ∈ M and α ∈ A. 1.10. Proposition. Let M and N be two A-modules. If M is a flat A-module every syzygy with coefficients in N is explained in M . J We assume that we are given a syzygy L X = 0 with L = [ a1 · · · an ] ∈ N 1×n and X = t[ x1 · · · xn ] ∈ M n×1 . Case where N is free of finite rank. Proposition 1.2 gives the result. Case where N is finitely presented. Write N = P/R = Ak /(Ac1 + · · · Acr ) . The ai ’s are given by the bi ’s of P . P The relation L X = 0 means that i bi ⊗ xi ∈ R ⊗ M ⊆ P ⊗ M , i.e. we have an equality P P i bi ⊗ x i + ` c` ⊗ z` = 0 in P ⊗M . We then observe that when we explain in M this syzygy (regarding the xi ’s and the z` ’s) with coefficients in the free module P , we explain at the same time the syzygy L X = 0 with coefficients in N . Case of an arbitrary A-module N . P A relation L X = i ai ⊗ xi = 0 comes from a finite computation, in which only a finite number of elements of N and of relations between these elements intervene. There exist therefore a finitely presented module N 0 , a linear map ϕ : N 0 → N and some bi ∈ N 0 such that on the one hand P ϕ(bi ) = ai (i ∈ J1..nK), and on the other hand i bi ⊗ xi = 0 in N 0 ⊗ M . We then observe that when, in M , we explain this syzygy with coefficients in N 0 (which is a finitely presented module), we explain at the same time the syzygy L X = 0 with coefficients in N .  1. First properties 449 1.11. Theorem. (Characterization of flat modules, 2) For an A-module M the following properties are equivalent. 1. The module M is flat. 2. For all A-modules N , every syzygy between elements of M with coefficients in N is explained in M . 3. For every finitely generated ideal b of A the canonical map b⊗A M → M is injective (this therefore establishes an isomorphism from b ⊗A M to bM ). 4. For all A-modules N ⊆ N 0 , the canonical linear map N ⊗A M → N 0 ⊗A M is injective. 5. The functor • ⊗ M preserves exact sequences. J The implication 5 ⇒ 3 is trivial. 4 ⇒ 5. Short exact sequences are preserved by the functor • ⊗ M . However every exact sequence decomposes into short exact sequences (see page 61). 1 ⇔ 3. By the null tensor lemma IV -4.14. 1 ⇒ 2. This is Proposition 1.10. 2 ⇔ 4. By the null tensor lemma IV -4.14.  The previous theorem admits some important corollaries. 1.12. Corollary. (Tensor product) The tensor product of two flat modules is a flat module. J Use item 4 of Theorem 1.11.  J The proof is left to the reader.  1.13. Corollary. (Other basic constructions) The tensor, exterior and symmetric powers of a flat module are flat modules. 1.14. Corollary. (Intersection) Let N1 , . . . , Nr be submodules of a module N and M be a flat module. Since M is flat, for N 0 ⊆ N , we identify N 0 ⊗ M with its image in N ⊗ M . Then we have the equality Tr Tr ( i=1 Ni ) ⊗ M = i=1 (Ni ⊗ M ). J The exact sequence 0→ Tr i=1 Ni → N → Lr i=1 (N /Ni ) is preserved by the tensor product with M and the module (N /Ni ) ⊗ M is identified with (N ⊗ M )/(Ni ⊗ M ) .  450 VIII. Flat modules 1.15. Corollary. (Scalar extension) Let ρ : A → B be an algebra. If M is a flat A-module, then ρ? (M ) is a flat B-module. J Note that for a B-module N , we have N ⊗B ρ? (M ) ' N ⊗B B ⊗A M ' N ⊗A M. We then apply item 4 of Theorem 1.11. Note that the last tensor product is equipped with a B-module structure via N .  Remark. Without mentioning it, we have just used a generalized form of associativity of the tensor product whose proof we leave to the reader. The form in question is the following. First we say that an abelian group P is an (A, B)-bimodule if it is equipped with two external laws which respectively make an A-module and a Bmodule, and if these two structures are compatible in the following sense: for all a ∈ A, b ∈ B and x ∈ P , we have a(bx) = b(ax). In such a case, if M is a B-module, then the tensor product M ⊗B P can itself be equipped with a structure of an (A, B)-bimodule by letting, for a ∈ A, a(x ⊗ y) =M ⊗B P x ⊗ ay. Similarly, when N is an A-module, the tensor product P ⊗A N can itself be equipped with a structure of an (A, B)-bimodule by letting, for b ∈ B, b(y ⊗ z) =P ⊗A N by ⊗ z. Finally, under these hypotheses, there exists a unique linear map (for the structure of an (A, B)-bimodule) ϕ : (M ⊗B P ) ⊗A N → M ⊗B (P ⊗A N ) which satisfies  ϕ (x ⊗ y) ⊗ z = x ⊗ (y ⊗ z) for all x ∈ M , y ∈ P , z ∈ N , and ϕ is an isomorphism. Flat quotients 1.16. Theorem. (Flat quotients) Let M be an A-module, K be a submodule and N = M/K, with the exact sequence ı π 0 → K −→ M −→ N → 0. 1. If N is flat, for every module P , the sequence ı π P P 0 → K ⊗ P −→ M ⊗ P −→ N ⊗P →0 is exact (ıP = ı ⊗ IP , πP = π ⊗ IP ). 2. If N and M are flat, K is flat. 3. If N and K are flat, M is flat. 4. If M is flat, the following properties are equivalent. a. N is flat. b. For every finitely generated ideal a, we have aM ∩ K = aK. 1. First properties 451 c. Every finitely generated ideal a gives an exact sequence π ı a a N/aN → 0. M/aM −→ 0 → K/aK −→ NB: Item 3 has already been the object of Proposition 1.5. Here we give it another proof, leaving it up to the reader to compare them. J 1. Case where P is finitely generated. We write P as a quotient of a finite free module Q with a short exact sequence p a 0 → R −→ Q −→ P → 0. We then consider the following commutative diagram in which all the horizontal and vertical sequences are exact because N and Q are flat 0 K ⊗R ıR / M ⊗R ıQ  / M ⊗Q ıP  / M ⊗P aK 0  / K ⊗Q pK  K ⊗P  0 πR  / N ⊗R πQ  / N ⊗Q aM /0 aN /0 pM  0 We must show that ıP is injective. This is a special case of the snake lemma, which we can prove by “diagram chasing.” Suppose ıP (x) = 0. We write x = pK (y) and v = ıQ (y). We have pM (v) = 0, so we write v = aM (z). As πQ (v) = 0, we have aN (πR (z)) = 0, so πR (z) = 0. Therefore we write z = ıR (u) and we have ıQ (aK (u)) = aM (ıR (u)) = aM (z) = v = ıQ (y), and since ıQ is injective, y = aK (u), hence x = pK (y) = pK (aK (u)) = 0. General case. One possibility is to describe P as a quotient of a flat module Q (see Exercise 16 on the subject) in which case the previous proof remains unchanged. We can also do without this slightly cumbersome construction P as follows. Let us show that ıP is injective. Let x = i xi ⊗ yi ∈ K ⊗ P P such that ıP (x) =M ⊗P 0, i.e. i xi ⊗ yi =M ⊗P 0. By definition of the tensor product, there exists a finitely generated subP module P1 ⊆ P such that we also have i xi ⊗ yi =M ⊗P1 0. By the P already examined case, we have x ⊗ y i =K⊗P1 0, and this implies i i P i xi ⊗ yi =K⊗P 0. 452 VIII. Flat modules 2 and 3. Let a be an arbitrary finitely generated ideal. Since N is flat, we have by item 1 a commutative diagram with exact sequences 0 0 / a⊗K 0  /K ıa / a⊗M ı  /M ϕK πa  / a⊗N π  /N ϕM /0 ϕN / 0. If M is flat, ϕM is injective, hence so is ϕM ◦ ıa , then ϕK . By item 3 of Theorem 1.11 we conclude that K is flat. If K is flat, ϕK is injective and a short diagram chase shows that ϕM is injective. Let x ∈ a ⊗ M with ϕM (x) = 0. As ϕN (πa (x)) = 0, we have πa (x) = 0 and we can write x = ıa (y). Then ı(ϕK (y)) = ϕM (x) = 0, so y = 0, thus x = 0. 4a ⇒ 4b. Since M and N are flat, so is K and the top row of the previous diagram gives the exact sequence ı|aK π|aM 0 → aK −−→ aM −−→ aN → 0. (+) However, the kernel of π|aM is by definition aM ∩ K. 4b ⇔ 4c. The sequence ı π a a 0 → K/aK −→ M/aM −→ N/aN → 0 is obtained from the exact sequence 0 → K → M → N by scalar extension to A/a. Saying that it is exact is the same as saying that ıa is injective. However, an element x ∈ K/aK is sent to 0 if and only if we have x ∈ aM ∩ K. 4b ⇒ 4a. Since aK = aM ∩ K the sequence (+) is exact. Consider the following commutative diagram with exact sequences, for which we must show that ϕN is injective. 0 a⊗K ıa ϕK 0  / aK  0  / a⊗M πa ϕM ı|aK  / aM  0 / a⊗N /0 ϕN π|aM  / aN /0  0 This is obtained by a short diagram chase. If ϕN (x) = 0, we write x = πa (y). As π |aM (ϕM (y)) = 0, we have z ∈ aK such that ϕM (y) = ı |aK (z), we write z = ϕK (u), with ϕM (ıa (u)) = ϕM (y), and since ϕM is injective, y = ıa (u) and x = πa (y) = 0.  2. Finitely generated flat modules 453 1.17. Corollary. (A flat algebra) Let f ∈ A[X] = A[X1 , . . . , Xn ] and A[x] = A[X]/hf i. The A-module A[x] is flat if and only if c(f )2 = c(f ), i.e. if and only if the ideal c(f ) is generated by an idempotent. J The A-module A[x] is flat if and only if for every finitely generated ideal a of A we have hf i ∩ a[X] = f a[X] (∗) . If A[x] is flat, we obtain, for a = c(f ), that c(f )2 = c(f ), because f ∈ hf i ∩ a[X]. Conversely, let us suppose that c(f )2 = c(f ) and show that A[x] is flat. The idempotent e such that hei = hc(f )i splits the ring into two components. In the first we have f = 0 and the result is clear. In the second, f is primitive. Now suppose that f is primitive. By the Dedekind-Mertens lemma,2 for every A-module M the A-linear map ×f M [X] −−→ M [X] is injective. Applied to M = A/a, this gives (∗). Indeed, let M [X] = A[X]/a[X] and suppose that g ∈ hf i ∩ a[X]. Then g = f h ×f for some h ∈ A[X], and h is in the kernel of A[X]/a[X] −−→ A[X]/a[X], therefore h = 0, i.e. h ∈ a[X], and g ∈ f a[X].  2. Finitely generated flat modules In the finitely generated module case, flatness is a more elementary property. 2.1. Lemma. Consider a finitely generated A-module M , and let X ∈ M n×1 be a column vector whose coordinates xi generate M. The module M is flat if and only if for every syzygy LX = 0 (where L ∈ A1×n ), we can find two matrices G, H ∈ Mn (A) which satisfy the equalities H + G = In , LG = 0 and HX = 0. In particular, a cyclic module M = Ay is flat if and only if ∀a ∈ A, ( ay = 0 =⇒ ∃s ∈ A, as = 0 and sy = y ) . Remark. The symmetry between L and X in the statement is only apparent; the module M is generated by the coordinates of X, while the ring A is not generated (as a submodule) by the coordinates of L. J We reduce an arbitrary syzygy L0 X 0 = 0 to a syzygy LX = 0 by expressing X 0 in terms of X. A priori we should write X in the form G1 Y with LG1 = 0. As Y = G2 X, we take G = G1 G2 and H = In − G.  2 Actually, the reader. this refers to a variant, with essentially the same proof, which we leave to 454 VIII. Flat modules Remark. For cyclic modules, by letting t = 1 − s, we obtain conditions on t rather than on s a = at and ty = 0, which implies that the annihilator a of y satisfies a2 = a. In fact, by Theorem 1.16, A/a is flat over A if and only if for every finitely generated ideal b we have the equality a ∩ b = ab. Here is a generalization of Lemma 2.1 in the same style of Proposition 1.2. 2.2. Proposition. Let M be a finitely generated flat A-module, and X ∈ M n×1 be a column vector that generates M. Let there be a family of k syzygies expressed in the form LX = 0 where L ∈ Ak×n and X ∈ M n×1 . Then, we can find a matrix G ∈ Mn (A) which satisfies the equalities LG = 0 and GX = X. J Identical to the proof of Proposition 1.2.  A constructive substitute for the property according to which every vector space over a field admits a basis (only true in classical mathematics) is the fact that every vector space over a discrete field is flat. More precisely, we have the following result. 2.3. Theorem. The following properties are equivalent. 1. Every A-module A/hai is flat. 2. Every A-module is flat. 3. The ring A is reduced zero-dimensional. J 1 ⇒ 3. If A/hai is flat, then hai = hai2 and if it is true for every a, then A is reduced zero-dimensional. 3 ⇒ 2. Let us first treat the case of a discrete field. Consider a syzygy LX = a1 x1 + · · · + an xn = 0 for some elements x1 , . . . , xn of an A-module M . If all the ai ’s are null the relation is explained with Y = X and G = In : LG = 0 and GY = X. If one of the ai ’s is invertible, for instance a1 , let bj = −a−1 6 1. We have x1 = b2 x2 + · · · + bn xn 1 aj for j = and a1 bj + aj = 0 for j > 1. The syzygy is explained by Y = t[ x2 · · · xn ] and by the following matrix G because LG = 0 and GY = X,   b2 b3 · · · bn  1 0 ··· 0     ..  .. . . 0 . G=    .  . .. 0   .. 0 ··· 0 1 For a reduced zero-dimensional ring, we apply the elementary local-global machinery no. 2 (page 212) which brings us back to the case of a discrete field.  2. Finitely generated flat modules 455 NB: This justifies the term “absolutely flat” for reduced zero-dimensional. 2.4. Lemma. Same context as in Lemma 2.1. If A is a local ring and M is flat, we obtain under the hypothesis LX = 0 the following alternative. The vector L is null, or one of the xi ’s linearly depends on the others (it can therefore be deleted from the list of generators of M ). J This is a “determinant trick.” We note that det(G) = det(In − H) can be P written as 1 + i,j bi,j hi,j . Therefore det(G) or one of the hi,j ’s is invertible. In the first case L = 0. In the second, since HX = 0, one of the vectors xi is a linear combination of the others.  The same proof in the case of an arbitrary ring gives the following result. 2.5. Lemma. Same context as in Lemma 2.1. If M is flat and LX = 0, there exist comaximal elements s1 , . . . , s` such that over each of the rings A[1/sj ] we have L = 0, or one of the xi ’s is a linear combination of the others. In classical mathematics, Lemma 2.4 implies the following fact. 2.6. Fact∗. A finitely generated flat module over a local ring is free and a basis can be extracted from any generator set. From Lemma 2.5, we obtain the following. 2.7. Fact∗. A finitely generated flat module over an integral ring is finitely generated projective. Here is a constructive version of Fact∗ 2.6. 2.8. Proposition. Let A be a local ring and M be a flat A-module generated by (x1 , . . . , xn ). Suppose that M is strongly discrete or that the existence of nontrivial syzygies is explicit in M . Then, M is freely generated by a finite sequence (xi1 , . . . , xik ) (with k > 0). J First suppose that M is strongly discrete, we can then find a finite sequence of integers 1 6 i1 < · · · < ik 6 n (where k > 0) such that none of the xi` ’s is a linear combination of the others, and (xi1 , . . . , xik ) generates M . To simplify the notation, suppose from now on that k = n, i.e. none of the xi ’s is a linear combination of the others. Lemma 2.4 then tells us that every syzygy between the xi ’s is trivial. Now suppose that the existence of nontrivial syzygies is explicit in M , i.e. for every family of elements of M , we know how to tell whether there is a nontrivial syzygy between these elements and how to provide one if necessary. Then, by using Lemma 2.4 we can delete the superfluous elements one after the other in the (xi ) family without changing the module M , until 456 VIII. Flat modules all that remains is a subfamily without a nontrivial syzygy (a limiting case is provided by the empty subset when the module is null).  Comment. Note that the proof uniquely uses the hypothesis “M is strongly discrete,” or “the existence of nontrivial syzygies is explicit in M ” with families extracted from the generator set (xi ). Moreover, each of these hypotheses is trivially true in classical mathematics. Now here is a constructive version of Fact∗ 2.7. 2.9. Proposition. Let A be an integral ring and M be a flat A-module generated by (x1 , . . . , xn ). Suppose that for every finite subset J of J1..nK the existence of nontrivial syzygies between (xj )j∈J is explicit in M (in other words, by passing to the quotient field we obtain a finite dimensional vector space). Then, M is finitely generated projective. J Suppose without loss of generality that A is nontrivial. By using Lemma 2.5 we obtain the following alternative. Either (x1 , . . . , xn ) is a basis, or after localization at comaximal elements the module is generated by n − 1 of the xj ’s. We conclude by induction on n: indeed, the syzygies after localization at s with s 6= 0 are the same as those over A. Note that for n = 1, either (x1 ) is a basis, or x1 = 0.  3. Flat principal ideals A ring A is said to be without zerodivisors if we have: ∀a, b ∈ A  ab = 0 ⇒ (a = 0 or b = 0) (3) An integral ring (in particular a discrete field) is without zerodivisors. A discrete ring without zerodivisors is integral. A nontrivial ring is integral if and only if it is discrete and without zerodivisors. 3.1. Lemma. (When a principal ideal is flat) 1. A principal ideal, or more generally a cyclic A-module Aa, is a flat module if and only if  ∀x ∈ A xa = 0 ⇒ ∃z ∈ A (za = 0 and xz = x) . 2. If A is local, an A-module Aa is flat if and only if  ∀x ∈ A xa = 0 ⇒ (x = 0 or a = 0) . 3. Let A be a local ring, if A is discrete, or if we have a test to answer the question “is x regular?,” then, an ideal hai is flat if and only if a is null or regular. 4. For a local ring A the following properties are equivalent. a. Every principal ideal is flat. b. The ring is without zerodivisors. 3. Flat principal ideals 457 J Lemma 2.1 gives item 1. The computation for item 2 results from it, because z or 1 − z is invertible. The rest is clear.  We similarly have the following equivalences. 3.2. Lemma. For a ring A, the following properties are equivalent. 1. Every principal ideal of A is flat. 2. If xy = 0, we have Ann x + Ann y = A. 3. If xy = 0, there exist comaximal monoids Si such that in each of the localized rings ASi , x or y becomes null. 4. If xy = 0, there exists a z ∈ A with zy = 0 and xz = x. 5. For all x, y ∈ A, Ann xy = Ann x + Ann y. The property for a ring to be without zerodivisors behaves badly under patching and that for a module to be flat is well-behaved under localization and patching. This justifies the following definition. 3.3. Definition. 1. A ring A is said to be a pf-ring (principal ideals are flat) when it satisfies the equivalent properties of Lemma 3.2. 2. An A-module M is said to be torsion-free when all of its cyclic submodules are flat (see Lemma 3.1). Remarks. 1) The torsion submodule of a torsion-free module is reduced to 0. Our definition is therefore a little more constraining than the more usual definition, which says that a module is torsion-free when its torsion module is reduced to 0. We will note that the two definitions coincide when the ring A is a pp-ring. 2) Every submodule of a torsion-free module is torsion-free, which is not the case in general when we replace “torsion-free” by “flat.” 3) In the French literature, the term “locally without zerodivisors” is often used for a pf-ring. 4) A pf-ring is reduced. 5) A local ring is a pf-ring if and only if it is without zerodivisors. 6) The field of reals is not without zerodivisors (nor a pf-ring): it is a local ring for which we do not know how to explicitly perform the implication (3) on page 456. 7) In classical mathematics a ring is a pf-ring if and only if it becomes integral after localization at every prime ideal (Exercise 4). 458 VIII. Flat modules 3.4. Lemma. Let A be a pf-ring and M be a flat A-module. 1. The module M is torsion-free. 2. The annihilator (0 : y) of any y ∈ M is idempotent. J 1. Suppose ay = 0, a ∈ A, y ∈ M . Since M is flat we have elements xi Pn of M , elements bi of A, and an equality y = i=1 bi xi in M , with abi = 0 (i ∈ J1..nK) in A. For each i, since abi = 0, there exists a ci such that aci = a and ci bi = 0. Let c = c1 · · · cn . Then, a = ca and cy = 0. 2. Indeed, when ay = 0, then a = ca with c ∈ (0 : y).  Using item 2 of Lemma 3.4 and the fact that an idempotent finitely generated ideal is generated by an idempotent (Lemma II -4.6) we obtain the following result. 3.5. Fact. Let A be a ring in which the annihilator of every element is finitely generated. 1. A is a pf-ring if and only if it is a pp-ring. 2. A is without zerodivisors if and only if it is integral. In particular, a coherent pf-ring is a pp-ring. Note that item 2 is obvious in classical mathematics, where the hypothesis “the annihilator of every element is finitely generated” is superfluous. 4. Finitely generated flat ideals We now study the flatness of finitely generated ideals. In classical mathematics, the following proposition is an immediate corollary of Proposition 2.8. In constructive mathematics, it is necessary to provide a new proof, which gives algorithmic information of a different nature from that given in the proof of Proposition 2.8. Indeed, we no longer make the same hypotheses regarding the discrete character of things. 4.1. Proposition. (Finitely generated flat ideals over a local ring) Let A be a local ring, x1 , . . . , xn ∈ A and a = hx1 , . . . , xn i. 1. If a is principal, it is generated by one of the xj ’s. (Bézout is always trivial over a local ring.) 2. If a is flat, it is principal, generated by one of the xj ’s. 3. Suppose that A is discrete, or that we have a test to answer the question “is x regular?” Then, a finitely generated ideal is flat if and only if it is free of rank 0 or 1. 4. Finitely generated flat ideals 459 J 1. We have a = hx1 , . . . , xn i = hzi, z = a1 x1 + · · · + an xn , zbj = xj , so P P z(1 − j aj bj ) = 0. If 1 − j aj bj is invertible, a = 0 = hx1 i. If aj bj is invertible a = hxj i.   a1 . . . an 2. Consider the syzygy x2 x1 + (−x1 )x2 = 0. Let G = be b1 . . . bn   x1   x1  ..  a matrix such that G  .  = and [ x2 − x1 ] G = [ 0 0 ]. x2 xn If a1 is invertible, the equality a1 x2 = b1 x1 shows that a = hx1 , x3 , . . . , xn i. If 1 − a1 is invertible, the equality a1 x1 + · · · + an xn = x1 shows that we have a = hx2 , x3 , . . . , xn i. We finish by induction on n. 3. Results from 2 and from Lemma 3.1, item 3.  Recall that a finitely generated ideal a of a ring A is said to be locally principal if there exist comaximal monoids S1 , . . . , Sn of A such that each aSj is principal in ASj . The proposition that follows shows that every finitely generated flat ideal is locally principal. Its proof follows directly from that for the local case. 4.2. Proposition. (Finitely generated flat ideals over an arbitrary ring) Every finitely generated flat ideal is locally principal. More precisely, if a = hx1 , . . . , xn i ⊆ A, the following properties are equivalent. 1. The ideal a is a flat module. 2. After localization at suitable comaximal monoids, the ideal a is flat and principal. 3. After localization at suitable comaximal elements, the ideal a is flat and principal, generated by one of the xi ’s. J We obviously have 3 ⇒ 2. We have 2 ⇒ 1 by the local-global principle 1.7. To show 1 ⇒ 3 we reuse the proof of item 4.1. Consider  2 of Proposition  a1 . . . an the syzygy x2 x1 + (−x1 )x2 = 0. Let G = be a matrix such b1 . . . bn     x1 x1     that G  ...  =  ...  and [ x2 − x1 ] G = [ 0 0 ]. With the localized xn xn ring A[1/a1 ] the equality a1 x2 = b1 x1 shows that a =A[1/a1 ] hx1 , x3 , . . . , xn i. With the localized ring A[1/(1 − a1 )] the equality a1 x1 + · · · + an xn = x1 shows that a =A[1/(1−a1 )] hx2 , x3 , . . . , xn i. We finish by induction on n.  460 VIII. Flat modules Arithmetic rings and Prüfer rings The following definition of Prüfer rings, based on flatness, is due to Hermida and Sánchez-Giralda [100]. 4.3. Definition. (Arithmetic rings) A ring A is said to be arithmetic if every finitely generated ideal is locally principal. 4.4. Proposition and definition. (Prüfer rings) The following properties are equivalent. 1a. Every finitely generated ideal of A is flat. 1b. Every ideal of A is flat. 1c. For all finitely generated ideals a and b of A, the canonical linear map a ⊗ b → ab is an isomorphism. 2a. The ring A is locally without zerodivisors and arithmetic. 2b. The ring A is reduced and arithmetic. A ring satisfying these properties is called a Prüfer ring. J The equivalence between 1a and 1c is given by Theorem 1.11 (item 3). The equivalence of 1a and 1b is immediate. We already know that 1a ⇒ 2a, and the implication 2a ⇒ 2b is clear. 2b ⇒ 2a. Let x, y be such that xy = 0. There exist s, t with s + t = 1, sx ∈ hyi and ty ∈ hxi. Therefore sx2 = 0 and ty 2 = 0 then (A is reduced) sx = ty = 0. 2a ⇒ 1a. After suitable localizations, the ideal becomes principal, and therefore flat, since the ring is a pf-ring. We finish by the local-global principle 1.7 for flat modules.  Local-global principle The different notions previously introduced are local in the sense of the following concrete local-global principle. The proofs are based on the basic local-global principle and are left to the reader. 4.5. Concrete local-global principle. (Arithmetic rings) Let S1 , . . ., Sn be comaximal monoids of a ring A and a be an ideal of A. We have the following equivalences. 1. The ideal a is locally principal if and only if each of the aSi’s is locally principal. 2. The ring A is a pf-ring if and only if each of the ASi’s is a pf-ring. 3. The ring A is arithmetic if and only if each of the ASi’s is arithmetic. 4. The ring A is a Prüfer ring if and only if each of the ASi’s is a Prüfer ring. 4. Finitely generated flat ideals 461 Local-global machinery An ordered set (E, 6) is said to be totally ordered if for all x, y we have x 6 y or y 6 x. A priori we do not assume it to be discrete and we therefore do not have a test for strict inequality. For local rings, Proposition 4.1 gives the following result. 4.6. Lemma. (Local arithmetic rings) 1. A ring A is local and arithmetic if and only if for all a, b ∈ A, we have a ∈ bA or b ∈ aA. Equivalently, every finitely generated ideal is principal and the set of finitely generated ideals is totally ordered with respect to the inclusion. 2. Let A be a local arithmetic ring. For two arbitrary ideals a and b, if a is not contained in b, then b is contained in a. Therefore in classical mathematics, the “set” of all the ideals is totally ordered with respect to the inclusion. Thus, arithmetic local rings are the same thing as local Bézout rings. They have already been studied in Section IV -7 (page 206). The ease with which we prove properties for arithmetic rings is mostly due to the following local-global machinery. Local-global machinery of arithmetic rings When we have to prove a property regarding an arithmetic ring and that a finite family of elements (ai ) of the ring intervenes in the computation, we start by proving the result in the local case. We can therefore suppose that the ideals hai i are totally ordered by inclusion. In this case the proof is in general very simple. Moreover, since the ring is arithmetic, we know that we can return to the previous situation after localization at a finite number of comaximal elements. We can therefore conclude if the property to be proven obeys a concrete local-global principle. Here is an application of this machinery. 4.7. Proposition. (Determinantal ideals over an arithmetic ring) Let A be a coherent arithmetic ring, M be a matrix ∈ An×m and dk = DA,k (M ) its determinantal ideals (k ∈ J1..pK with p = inf(m, n)). There exist finitely generated ideals a1 , . . . , ap such that d1 = a1 , d2 = d1 a1 a2 , d3 = d2 a1 a2 a3 , . . . J Let bk = (dk : dk−1 ) for all k, so b1 = d1 . We have bk dk−1 = dk because the ring is arithmetic and coherent. Let ck = b1 ∩ · · · ∩ bk for k > 1. This is a nonincreasing sequence of finitely generated ideals. Let a1 , . . . , ap be finitely generated ideals satisfying a1 = d1 and ak ck−1 = ck for k > 2. It is sufficient to prove the equalities ck dk−1 = dk . This is clear for k = 1. 462 VIII. Flat modules If A is a local arithmetic ring, the matrix admits a reduced Smith form (Proposition IV -7.2). Let p = inf(m, n) The algorithm that produces the reduced Smith form in the local case and the previous local-global machinery of arithmetic rings provide us with a system of comaximal elements (s1 , . . . , sr ) such that, over each ring A[1/si ], the matrix M admits a reduced Smith form with the diagonal sub-matrix Diag(c1 , c2 , . . . , cp ) and c1 | c2 | . . . | cp . Moreover, for k > 1, dk = hc1 · · · ck i. It is sufficient to prove ck dk−1 = dk after localization at these comaximal elements. Since bk dk−1 = dk , we get ck dk−1 ⊆ dk . In order to prove the other inclusion let us show that for all k > 1 we have ck ∈ ck (this implies ck dk−1 ⊇ dk ). We have ck dk−1 = dk , thus ck ∈ bk . Moreover ck is multiple of ci ∈ bi for i 6 k − 1, so ck ∈ b1 ∩ · · · ∩ bk−1 . This finishes the proof.  We will return to arithmetic rings and Prüfer rings in greater length in Chapter XII. 5. Flat algebras Intuitively speaking, an A-algebra B is flat when the homogeneous systems of linear equations over A have “no more” solutions in B than in A, and it is faithfully flat if this assertion is also true for nonhomogeneous systems of linear equations. More precisely, we adopt the following definitions. 5.1. Definition. Let ρ : A → B be an A-algebra. 1. B is said to be flat (over A) when every B-linear dependence relation between elements of A is a B-linear combination of A-linear dependence relations between these same elements. In other words, for every linear form ψ : An → A, we require that Ker ρ? (ψ) = hρ(Ker ψ)iB . We will also say that the ring homomorphism ρ is flat. 2. A flat A-algebra B is said to be faithfully flat if for every linear form ψ : An → A and all a ∈ A, when the  equation ψ(X) = a admits a solution in B (i.e. ∃X ∈ Bn , ρ? (ψ) (X) = ρ(a)), then it admits a solution in A. We will also say that the ring homomorphism ρ is faithfully flat. For a faithfully flat A-algebra, when considering the case where n = 1 and ψ = 0, we see that ρ(a) = 0 implies a = 0. Thus, ρ is an injective homomorphism. We therefore say that B is a faithfully flat extension of A. We can then identify A with a subring of B and the condition on the nonhomogeneous linear equation is easier to formulate: it is exactly the same equation that we seek to solve in A or B. 5. Flat algebras 463 5.2. Fact. An A-algebra B is flat if and only if B is a flat A-module. J Translation exercise left to the reader.  Fundamental examples. The following lemma provides some examples. 464 VIII. Flat modules 5.3. Lemma. 1. A localization morphism A → S −1 A gives a flat A-algebra. Q 2. If S1 , . . . , Sn are comaximal monoids of A and if B = i ASi , the canonical “diagonal” homomorphism ρ : A → B gives a faithfully flat algebra. 3. If k is reduced zero-dimensional, every k-algebra L is flat. J 1. See Fact II -6.6 or Facts 5.2 and 1.6. 2. This results from the basic local-global principle (we could even say that it is the basic local-global principle). 3. Results from 5.2 and from the fact that every K-module is flat (Theorem 2.3).  Remarks. Regarding item 3 of the previous lemma. 1) It seems difficult to replace k in the hypothesis with a (Heyting) field that we do not assume to be zero-dimensional. 2) See Theorem 6.2 for the faithfully flat question. In the following proposition, an analog of Propositions II -3.1 (for coherent rings) and 1.2 (for flat modules), we pass from an equation to a system of equations. To lighten the text, we act as though we have an inclusion A ⊆ B (even if B is only assumed to be flat), in other words we do not specify that when we pass into B, everything must be transformed by means of the homomorphism ρ : A → B. 5.4. Proposition. Let M ∈ An×m , C ∈ An×1 and B be a flat A-algebra. 1. Every solution in B of the homogeneous system of linear equations M X = 0 is a B-linear combination of solutions in A. 2. If in addition B is faithfully flat, and if the system M X = C admits a solution in B, it admits a solution in A. J The definitions of flat and faithfully flat A-algebras concern the systems of linear equations with a single equation. To solve a general system of linear equations we apply the usual technique: we start by solving the first equation, then substitute the general solution of the first equation into the second, and so forth.  5.5. Proposition. ρ Let A −→ B be a flat A-algebra and a, b be two ideals of A. 1. The natural B-linear map ρ? (a) → ρ(a)B is an isomorphism. In the remainder we identify ρ? (c) with the ideal ρ(c)B for every ideal c of A. 2. We have ρ? (a ∩ b) = ρ? (a) ∩ ρ? (b).  3. If in addition a is finitely generated, we have ρ? (b : a) = ρ? (b) : ρ? (a) . 5. Flat algebras 465 J The first two items result from analogous facts regarding flat modules (Theorem 1.11 item 4 and Corollary 1.14). T 3. If a = ha1 , . . . , an i, then b : a = i (b : ai ), therefore given item 2 we are reduced to the case of a principal ideal hai. We then consider the exact sequence a 0 → b : a −−→ A −−→ A/b , we tensor with B and we obtain the exact sequence (use the flatness and Fact IV -4.8) ρ(a) 0 → ρ? (b : a) −−→ B −−−→ B/ρ? (b) ,  which gives the desired result. 5.6. Theorem. Let ρ : A → B be an algebra. The following properties are equivalent. 1. 2. 3. 4. B is a flat A-algebra. B is a flat A-module. For every flat A-module M , the A-module ρ? (M ) is flat. For every finitely generated ideal a of A, the canonical A-linear map B ⊗A a ' ρ? (a) → aB is an isomorphism. 5. For all A-modules N ⊆ M , the B-linear map ρ? (N ) → ρ? (M ) is injective. 6. For every A-linear map ψ : M → P , the natural B-linear map   ρ? Ker(ψ) −→ Ker ρ? (ψ) is an isomorphism. f g 7. For every exact sequence of A-modules M −→ N −→ P the sequence ρ? (f ) ρ? (g) ρ? (M ) −−−→ ρ? (N ) −−−→ ρ? (P ) is an exact sequence of B-modules. Item 5 allows us to identify ρ? (P ) with a B-submodule of ρ? (Q) each time that we have two A-modules P ⊆ Q and that B is flat over A. J The reader will verify that the equivalences are clear by what we already know (Fact 5.2, Theorem 1.11, Corollary 1.12). We note that Proposition 5.4 gives item 6 in the case of a linear map between free modules of finite rank. The following proposition generalizes Propositions V -9.2 and V -9.3. 5.7. Proposition. Let ρ : A → B be a flat A-algebra and M , N be A-modules. If M is finitely generated (resp. finitely presented), the natural B-linear map   ρ? LA (M, N ) → LB ρ? (M ), ρ? (N ) is injective (resp. is an isomorphism). 466 VIII. Flat modules J Consider an exact sequence K −→ Ak −→ M → 0, (∗) corresponding to the fact that M is finitely generated (if M is finitely presented the module K is also free of finite rank). Let M1 = ρ? (M ), N1 = ρ? (N ) and K1 = ρ? (K). First we have the exact sequence K1 −→ Bk −→ M1 → 0. (∗∗) Next we obtain the exact sequences below. The first comes from (∗), the last one comes from (∗∗) and the second results from the first by scalar extension since B is flat over A. 0 → → LA (Ak , N ) ' N k → LA (K, N )   0 → ρ? LA (M, N ) → ρ? (LA (Ak , N ) ' N1k → ρ? LA (K, N ) ↓ ↓ ↓ 0 → LB (M1 , N1 ) → LB (Bk , N1 ) ' N1k → LB (K1 , N1 ) LA (M, N ) In addition, we have natural “vertical” B-linear maps from the second to the third exact sequence, and the diagrams commute. The second vertical arrow is an isomorphism (the identity of N1k after the canonical identifications). This implies that the first vertical arrow (the B-linear map that we are interested in) is injective. If M is finitely presented and if K ' A` , the two B-modules on the right are isomorphic to N1` and the corresponding vertical arrow is an isomorphism. This implies that the first vertical arrow is an isomorphism.  Retrospectively the given proof for Proposition V -9.3 seems quite complicated. The new proof given here in a more general framework is conceptually simpler. 6. Faithfully flat algebras ρ We have already said that if A −→ B is a faithfully flat algebra, ρ is injective. It is also clear that ρ reflects the units, i.e. ρ(a) ∈ B× =⇒ a ∈ A× . We now present a few characteristic properties. In what follows we will take note of the equivalence of items 1, 2a, 3a and 4. 6.1. Theorem. (Characterizations of faithfully flat algebras) Let ρ : A → B be a flat algebra. The following properties are equivalent. 1. The algebra B is faithfully flat. 6. Faithfully flat algebras 467 2a. The homomorphism ρ is injective, and when identifying A with a subring of B, for every finitely generated ideal a of A we have aB ∩ A = a. 2b. Similarly with an arbitrary ideal of A. 3a. For every finitely generated ideal a of A we have the implication 1B ∈ ρ? (a) =⇒ 1A ∈ a. 3b. For every finitely generated ideal a of A, if ρ? (A/a ) = 0, then A/a = 0. 3c. For all A-modules N ⊆ M , if ρ? (N ) = ρ? (M ), then N = M . 3d. For every A-module M , if ρ? (M ) = 0, then M = 0. 3e. For every A-module M the natural A-linear map M → ρ? (M ) is injective. 4. The scalar extension from A to B reflects the exact sequences. In other words, given an arbitrary sequence of A-modules f g N −→ M −→ P, it is exact if the sequence of B-modules ρ? (f ) ρ? (g) ρ? (N ) −−−→ ρ? (M ) −−−→ ρ? (P ) is exact. J Item 1 implies that ρ is injective. Once this has been shown, 2a is a simple reformulation of 1, and it is easy to show that 2a is equivalent to 2b. 3a ⇒ 1. We start by noticing that the implication is still valid if we replace the finitely generated ideal a by an arbitrary ideal c. Indeed, if 1 ∈ ρ? (c) we will also have 1 ∈ ρ? (c0 ) for a finitely generated idealP c0 contained in c. Now let a = ha1 , . . . , an i and c ∈ A. The equation i ai xi = c admits a solution if and  only if c ∈ a, i.e. 1 ∈ (a : c)A .PSince B is flat, we have ρ? (a) : ρ(c) B = ρ? (a : c) (Proposition 5.5). If i ρ(ai )yi = ρ(c) admits a  solution in B, then 1 ∈ ρ? (a) : ρ(c) B , so the hypothesis 3a implies that P 1 ∈ (a : c), i.e. i ai xi = c admits a solution in A. The implications 3e ⇒ 3d ⇒ 3b are trivial. 3d ⇒ 3c. Consider the module M/N . The module ρ? (N ) is identified with a submodule of ρ? (M ) and ρ? (M /N ) is identified with ρ? (M )/ρ? (N ) . The result follows. 3c ⇒ 3d. We take N = 0. 3a ⇔ 3b. Same reasoning. 1 ⇒ 3e. We identify A with a subring of B. Let x ∈ M such that 1 ⊗ x = 0 in ρ? (M ). Since B is a flat A-module, this syzygy is explained in the A-module B: there exist u1 , . . . , un ∈ B and P a1 , . . . , an ∈ A suchPthat i ai ui = 1 and ai x = 0 for i ∈ J1..nK. The equation in the yi ’s, i ai yi = 1, admits a solution in B, so it admits one in A. Hence x = 0. 468 VIII. Flat modules 4 ⇒ 3d. We make N = P = 0 in the sequence N → M → P . It is exact after scalar extension to B, so it is exact. 1 ⇒ 4. Suppose that the sequence of B-modules is exact. We must show that the sequence of A-modules is exact. First of all g ◦ f = 0, because the B-linear map P → ρ? (P ) is injective, and the diagrams commute. Next, since B is flat, we can identify ρ? (Ker g) with Ker ρ? (g) and ρ? (Im f ) with Im ρ? (f ). We are back in item 3c.  Given Theorem 2.3, we obtain as a consequence of the characterization 2a the following theorem. 6.2. Theorem. Every extension of a discrete field or of a reduced zerodimensional ring is faithfully flat. J We have k ⊆ A with k reduced zero-dimensional. We know that the extension is flat by Theorem 2.3. We must show that if a is a finitely generated ideal of k, then aA ∩ k = a. However, a = hei for an idempotent e; the membership of an element x in an ideal hei (e idempotent) being characterized by the equality x = xe, it is independent of the ring. In other words, for an idempotent e of a ring B ⊆ B0 , we always have eB0 ∩ B = eB.  As a special case of the characterization 3a we obtain the following corollary. 6.3. Corollary. Let ρ be a flat homomorphism between local rings. It is faithfully flat if and only if it reflects the units, i.e. ρ−1 (B× ) = A× . A homomorphism between local rings that reflects the units is called a local homomorphism. The proofs of the two following facts result from simple considerations about the preservation and about the “reflection” of the exact sequences. The details are left to the reader. 6.4. Fact. (Transitivity) Let B be an A-algebra and C be a B-algebra. 1. If B is flat over A and C flat over B, then C is flat over A. 2. If B is faithfully flat over A and C faithfully flat over B, then C is faithfully flat over A. 3. If C is faithfully flat over B and flat over A, then B is flat over A. 4. If C is faithfully flat over B and over A, then B is faithfully flat over A. 6.5. Fact. (Changing the base ring) Let B and C be two A-algebras, and D = B ⊗A C. 1. If C is flat over A, D is flat over B. 2. If C is faithfully flat over A, D is faithfully flat over B. 6. Faithfully flat algebras 469 6.6. Concrete local-global principle. (Localization at the source, flat algebras) Let ρ : A → B be an algebra and S1 , . . ., Sr be comaximal monoids of A. 1. The algebra B is flat over A if and only if for each i, BSi is flat over ASi . 2. The algebra B is faithfully flat over A if and only if for each i, the algebra BSi is faithfully flat over ASi . Q J We introduce the faithfully flat A-algebra C =Q i ASi that gives by scalar extension the faithfully flat B-algebra D = i BSi . It remains to apply Facts 6.4 and 6.5.  The following theorem generalizes the concrete local-global principles that assert the local character (in the constructive sense) of certain properties of finiteness for modules. ρ 6.7. Theorem. Let A −→ B be a faithfully flat A-algebra. Let M be an A-module and M1 = ρ? (M ) ' B ⊗A M . 1. The A-module M is flat if and only if the B-module M1 is flat. 2. The A-module M is finitely generated if and only if the B-module M1 is finitely generated. 3. If the B-module M1 is coherent, the A-module M is coherent. 4. The A-module M is finitely presented if and only if the B-module M1 is finitely presented. 5. The A-module M is finitely generated projective if and only if the B-module M1 is finitely generated projective. 6. If the B-module M1 is Noetherian, the A-module M is Noetherian. J In items 1, 2, 4, 5, we already know that any scalar extension preserves the concerned property. Therefore all that remains to be proven are the converses. f g 1. Consider an exact sequence N −→ Q −→ P of A-modules. We want to show that it is exact after tensorization by M . We know that it is exact after tensorization by B ⊗ M . However, B ⊗ • reflects the exact sequences. 2. Consider some elements yi ∈ ρ? (M ) (i ∈ J1..nK) that generate this module. These elements are constructed as B-linear combinations of a finite family of elements 1 ⊗ xj (xj ∈ M , j ∈ J1..mK). This implies that the A-linear map ϕ : Am → M which sends the canonical basis to (xj )j∈J1..mK is surjective after tensorization by B. However, B is faithfully flat, therefore ϕ is surjective. 3. Let N = Ax1 + · · · + Axn be a finitely generated submodule of M . Consider the corresponding surjective A-linear map An → N , let K be its kernel. The exact sequence 0 → K → An → N → 0 gives by scalar 470 VIII. Flat modules extension an exact sequence (because B is flat). Since ρ? (M ) is coherent, ρ? (K) is finitely generated. It remains to apply item 2. 4. Same reasoning as for item 3. 5. A module is finitely generated projective if and only if it is flat and finitely presented. 6. Consider an ascending sequence (Nk )k∈N of finitely generated submodules of M and extend the scalars to B. Two consecutive terms ρ? (N` ) and ρ? (N`+1 ) are equal. Since B is faithfully flat, we also have the equalities N` = N`+1 .  The following theorem generalizes the concrete local-global principles that asserts the local character (in the constructive sense) of certain properties of finiteness for algebras. 6.8. Theorem. ϕ /C A Let ρ : A → B be a faithfully flat A-algebra and ϕ : A → C be an A-algebra. ρ ρ?   Let D = ρ? (C) be the faithfully flat B-algebra  /D B ρ? (ϕ) obtained by scalar extension. In order for C to have one of the properties below as an A-algebra it is necessary and sufficient that D possesses the same property as a B-algebra: • finite (as a module), • finitely presented as a module, • strictly finite, • flat, • faithfully flat, • strictly étale, • separable, • finitely generated (as an algebra), • finitely presented (as an algebra). J The first three properties are properties of modules and thus falls within Theorem 6.7. Flat, faithfully flat algebras. We apply Facts 6.4 and 6.5. Strictly étale algebras. We already have the equivalence for the strictly finite character. If B is free over A we use the fact that the discriminant is well-behaved under scalar extension, and we conclude by using the fact that a faithfully flat extension reflects the units. In the general case we return to the free case by localization at comaximal elements, or we invoke Theorem VI -6.13: a strictly finite algebra is separable if and only if it is strictly étale. Separable algebras. Consider at the commutative diagram in Fact VI -6.11 (beware, the names change). The vertical arrow on the right is obtained by Exercises and problems 471 faithfully flat scalar extension from the one on the left. They are therefore simultaneously surjective. Finitely generated algebras. The fact of being finitely generated or finitely presented is preserved by any scalar extension. Let us take a look at the converse. We identify A with a subring of B and C with a subring of D. Let A1 = ϕ(A) and B1 = ρ? (ϕ)(B). Since D = B ⊗A C is finitely generated over B, and since every element of D is expressible as a B-linear combination of elements of C, we can write D = B1 [x1 , . . . , xm ] with some xi ∈ C ⊆ D. This gives an exact sequence ρ? (ϕ), Xi 7→xi B[X1 , . . . , Xm ] −−−−→ D −→ 0. We will show that C = A1 [x1 , . . . , xm ]. Indeed, the exact sequence above is obtained by faithfully flat scalar extension from the sequence ϕ, Xi 7→xi A[X1 , . . . , Xm ] −−−−→ C −→ 0. Finitely presented algebras. Let us begin with an elementary general but useful remark about quotient algebras k[X]/a . We can regard k[X] as the free k-module having as its basis the family of monomials (X α )α∈Nm . If f ∈ a, we then obtain the equality P f · k[X] = α (X α f ) · k. Therefore the ideal a is the k-submodule of k[X] generated by all the X α f , where α ranges over Nm and f ranges over a generator set of a. Let us then return to the proof by continuing with the same notations as in the previous item. Suppose that D = B1 [x1 , . . . , xm ] ' B[X]/hf1 , . . . , fs i. In the remainder we consider an equation fj = 0 as a syzygy between the monomials present in fj . Since the B-module D is obtained by flat scalar extension of the A-module C, the B-linear dependence relation fj is a B-linear combination of A-linear dependence relations fj,k (between the same monomials viewed in C). Each equality fj,k (x) = 0 can also be read as an A-algebraic dependence relation (a relator) between xi ’s ∈ C. Consider then the A-submodule of A[X] generated by all the X α fj,k ’s. By scalar extension from A to B the sequence of A-modules P 0 → j,k,α (X α fj,k ) · A → A[X] → C → 0 (∗) gives the exact sequence of B-modules P 0 → j,k,α (X α fj,k ) · B → B[X] → D → 0. P P P Indeed, j,k,α (X α fj,k )·B = j,k fj,k ·B[X] = j fj ·B[X] = a. Therefore, since the P extension is faithfully P flat, the sequence (∗) is itself exact. Finally, since j,k,α (X α fj,k ) · A = j,k fj,k · A[X], C is a finitely presented Aalgebra.  472 VIII. Flat modules Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Over a Bézout domain, a module is flat if and only if it is torsion-free. • Prove Theorem 1.3. • Prove Lemma 3.2. • Prove Fact 5.2 and Theorem 5.6. • Prove Facts 6.4 and 6.5. Exercise 2. Let π : N → M be a surjective linear map. 1. If M is flat, for every finitely presented module P , the natural linear map LA (P, π) : LA (P, N ) → LA (P, M ) is surjective. (Particular case of Theorem 1.16.) 2. Suppose that N = A(I) , a free module over a discrete set I. If the previous property is satisfied, M is flat. Comment. In constructive mathematics, an arbitrary module M is not necessarily a quotient of a module N = A(I) as above, but this is true in the case where M is discrete, by taking I = M . If we don’t need I discrete, we look at Exercise 16. Exercise 3. Let M be a finitely generated A-module. Prove that if M is flat its Fitting ideals are idempotents. Exercise 4. Show using classical mathematics that a ring is a pf-ring if and only if it becomes integral after localization at any prime ideal. Exercise 5. Show using classical mathematics that a ring is arithmetic if and only if it becomes a Bézout ring after localization at any prime ideal. Exercise 6. The image of a locally principal ideal under a ring homomorphism is a locally principal ideal. Prove that the analogous result for invertible ideals is not always true. n Exercise 7. If a = hx1 , . . . , xk i is locally principal, then an = hxn 1 , . . . , xk i. n n Compute a principal localization matrix for (x1 , . . . , xk ) from a principal localization matrix for (x1 , . . . , xk ). nk n n 1 Explicate the membership of xn 1 · · · xk ∈ hx1 , . . . , xk i when n = n1 + · · · + nk . Exercise 8. Given n elements in an arithmetic ring give an algorithm that constructs a principal localization matrix for those elements from principal localization matrices for pairs of elements only. Exercises and problems 473 Exercise 9. Consider two finitely generated ideals a and b of a ring A, generated respectively by m and n elements. Let f , g ∈ A[X] of degrees m − 1 and n − 1 with c(f ) = a and c(g) = b. 1. Show that if a is locally principal, we have ab = c(f g) such that ab is generated by n + m − 1 elements (localize and use Corollary III -2.3 4 ). 2. Show that if a and b are locally principal, ab is locally principal. Explain how to construct a principal localization matrix for the coefficients of f g from two principal localization matrices, respectively for the generators of a and for those of b. Exercise 10. We are interested in the eventual equality a b = (a ∩ b)(a + b) (4) for two finitely generated ideals a and b of a ring A. 1. Show that the equality is satisfied if a + b is locally principal. If in addition a and b are locally principal, then a ∩ b is locally principal. 2. Suppose A is integral. Show that if the equality is satisfied when a and b are principal ideals then the ring is arithmetic. 3. Show that the following properties are equivalent. • A is a Prüfer ring. • A is a pf-ring and Equation (4) is satisfied for principal ideals. • A is a pf-ring and Equation (4) is satisfied for finitely generated ideals. Exercise 11. (See also Exercise V -16) Let a, b, c be finitely generated ideals. Prove the following statements. 1. If a + b is locally principal, then (a : b) + (b : a) = h1i. 2. If (a : b) + (b : a) = h1i, then a. (a + b) : c = (a : c) + (b : c). b. c : (a ∩ b) = (c : a) + (c : b). c. (a + b)(a ∩ b) = a b. d. c (a ∩ b) = c a ∩ c b. e. c + (a ∩ b) = (c + a) ∩ (c + b). f. c ∩ (a + b) = (c ∩ a) + (c ∩ b). g. The following short exact sequence (where δ(x) = (x, −x) and σ(y, z) = y+z) is split: δ σ 0 −→ a ∩ b −→ a × b −→ a + b −→ 0. Exercise 12. (Gaussian rings) A ring A is said to be Gaussian when for all polynomials f , g ∈ A[X], we have the equality c(f g) = c(f )c(g). Prove the following statements. 1. Every arithmetic ring is Gaussian (see Exercise 9). 2. A Gaussian integral ring is a Prüfer ring. 3. A Gaussian reduced ring is a Prüfer ring. A Gaussian pp-ring is a coherent Prüfer ring (see Theorem XII -4.1). 474 VIII. Flat modules Exercise 13. (A useful ring for counterexamples) Let K be a nontrivial discrete field and V be a K-vector space of dimension 2. Consider the K-algebra A = K ⊕ V defined by x, y ∈ V ⇒ xy = 0. Show that every element of A is invertible or nilpotent (i.e. A is local zero-dimensional), and that the ring is coherent but not arithmetic. However, every finitely generated ideal that contains a regular element is equal to h1i, a fortiori it is invertible. Exercise 14. Let A be a residually discrete coherent local ring. Let m = Rad A and suppose that m is flat over A. 1. Show that A is integral. 2. Show that A is a valuation ring. NB: We do not assume that A is nontrivial. Exercise 15. (Flat quotient of a flat module: a direct proof) Provide a direct proof of the following implication of Theorem 1.16: Let M be a flat A-module and K be a submodule of M satisfying aM ∩ K = aK for every finitely generated ideal a; then M/K is flat. Exercise 16. This exercise starts with a long introductory text. A single question is posed, at the very in the following definition the construction L end. We specify (I) of the direct sum M = M for an arbitrary (not necessarily discrete) set i∈I 3 I and a module M . This allows us to show that every module is a quotient of a flat module (actually a free module, not necessarily projective from a constructive point of view!). Definition. Let I be an arbitrary set and M be an A-module. We define the direct sum M (I) as a quotient set of the set of finite formal sums ⊕k∈J1..nK (ik , xk ), where ik ∈ I and xk ∈ M for each k ∈ J1..nK: such a formal sum is defined as being precisely the family (ik , xk )k∈J1..nK . The equivalence relation that defines the equality over M (I) is the equivalence relation generated by the following “equalities”: • associativity and commutativity of the formal sums: we can reorder the family as we wish, • if ik =I i` then (ik , xk ) and (i` , x` ) can be replaced by (ik , xk + x` ) (“contraction” of the list); we can write this rewriting in the following form: if i =I j then (i, xi ) ⊕ (j, xj ) = (i, xi + xj ); • every term (i, 0M ) can be deleted. The addition over M (I) is defined by concatenation, and the external law is defined by a · ⊕k∈J1..nK (ik , xk ) = ⊕k∈J1..nK (ik , axk ). Finally, the A-module freely generated by I is the module A(I) . 3 Concerning the general notion of a family of sets indexed by an arbitrary set, see [MRR, page 18]; the construction of the direct sum of an arbitrary family of A-modules is explained on pages 54 et 55. Solutions of selected exercises 475 The direct sum solves the corresponding universal problem, which we can schematize by the following graph for a family (ϕi )i∈I of linear maps from M to an arbitrary module N . Mi = M i (x) = (i, x) ϕi N roil i v ϕ! P ah P = M (I) j ϕj ϕ` Mj = M ` M` = M Let I be an arbitrary set with at least one element. The A-module A(I) , is called the module freely generated by the set I. It solves the corresponding universal problem, which we can schematize by the following graph for a family x = (xi )i∈I in an arbitrary module N . I x(i) = xi x N or ψ! (I) A x  (i) = (i, 1) Note that as a consequence, if (xi )i∈I is an arbitrary generator set of the module N , the latter is isomorphic to a quotient of A(I) . Let I be an arbitrary set and M be an A-module. Prove that the module M (I) is flat if and only if M is flat. In particular this shows that the free module A(I) is flat. Some solutions, or sketches of solutions Exercise 1. Over a Bézout domain Z, a module M is flat if and only if it is torsion-free. We know that the condition is necessary. Let us prove that it is sufficient. Consider a syzygy LX in M with L = [ a1 · · · an ] and X = t[ x1 · · · xn ]. If the ai ’s are all null, we have L In = 0 and In X = X, which explains LX = 0 in M . P Otherwise, we write a u = g and gbi = ai , where g is the gcd of the ai ’s. i i i P P We have g( i bi xi ) = 0, and since M is torsion-free b x = 0. i i i  The matrix C = (ui bj )i,j∈J1..nK = U B with B = g1 L, is a principal localization matrix for (a1 , . . . , an ). Let G = In −C, we have CX = 0 and LC = L, so LG = 0 and GX = X, which explains LX = 0 in M . 476 VIII. Flat modules Exercise 2. 1. Let µ : P → M be a linear map. We know (Theorem 1.3) that µ factorizes through a finitely generated free module L: µ = λ ◦ ψ. P /L ψ µ ?   λ /M /0 N Since L is free, we can write λ = π ◦ ν with a linear map ν : L → N , and so µ = π ◦ ϕ for ϕ = ν ◦ ψ. π 2. If the property is satisfied with N = A(I) , where I is a discrete set, we consider an arbitrary linear map µ : P → M with P finitely presented. We write µ = π ◦ ϕ with a linear map ϕ : P → N . There then exists a finite subset I0 of I such that for each generator gj of P , ϕ(gj ) has null coordinates outside of I0 . This shows that we can factorize µ via the free module of finite rank A(I0 ) . Therefore by Theorem 1.3, M is flat. Exercise 3. Consider a finitely generated module M with a generator set (x1 , . . . , xn ). Let X = t[ x1 · · · xn ]. For k ∈ J0..nK and k + r = n, a typical generator of Fk (M ) is δ = det(L) where L ∈ Mr (A) and LY = 0, for a column vector extracted from X: Y = t[ xi1 · · · xir ]. We must show that δ ∈ Fk (M )2 . Actually we will show that δ ∈ δ Fk (M ). Suppose without loss of generality that (i1 , . . . , ir ) = (1, . . . , r). We apply Proposition 2.2. We therefore have a matrix H ∈ Mr,n with HX = Y and LH = 0. Let H 0 = Ir,r,n = Ir 0 , and K = H 0 − H. We have KX = Y − Y = 0 and LK = LH 0 = L 0 . Let K 0 be the matrix formed by the first r columns of K. Then L = LK 0 and det(L) = det(L) det(K 0 ), and since KX = 0, we have det(K 0 ) ∈ Fk (M ). Exercise 4. Suppose the ring A is a pf-ring. Let p be a prime ideal and xy = 0 in Ap . There exists a u ∈ / p such that uxy = 0 in A. Let s and t ∈ A such that s + t = 1, sux = 0 and ty = 0 in A. The elements s and t cannot both be in p (otherwise 1 ∈ p). If s ∈ / p, then since sux = 0, we obtain x =Ap 0. If t ∈ / p, then since ty = 0, we obtain y =Ap 0. Thus Ap is an integral ring. Now suppose that every localized ring Ap at every maximal ideal p is integral and suppose that xy =A 0. For some arbitrary maximal ideal p we have x =Ap 0 or y =Ap 0. In the first case let sp ∈ / p such that sp x =A 0. Otherwise let tp ∈ /p such that tp y =A 0. The family of the sp ’s or tp ’s generates the ideal h1i (because otherwise all sp ’s or tp ’s would be in some maximal ideal). There is therefore a finite number of si ’s satisfyingP si x = 0 (in P A) and a finite number of tj ’s satisfying tj y = 0, with an equation ci si + j dj tj = 1. i P P We take s = i ci si , t = j dj tj and we obtain sx = ty = 0 and s + t = 1. Solutions of selected exercises 477 Exercise 5. We begin by recalling the following: by item 3 of Theorem V -7.3, an ideal ha, bi of a ring A is locally principal if and only if we can find s, t, u, v ∈ A such that s + t = 1, sa = ub and tb = va. Suppose the ring A is arithmetic. Let p be a prime ideal. For a, b ∈ Ap we want to show that a divides b or b divides a (see Lemma IV -7.1). Without loss of generality we can take a and b in A. Then let s, t, u, v be as above. The elements s and t cannot both be in p (otherwise 1 ∈ p). If s ∈ / p, then a =Ap s−1 ub so b divides a in Ap . If t ∈ / p, then a divides b in Ap . Now suppose that every localized ring Ap at every maximal ideal p is a local Bézout ring and let a, b ∈ A. For an arbitrary maximal ideal p, we have that b divides a or a divides b in Ap . In the first case let sp ∈ / p and up ∈ A such that sp a =A up b. Otherwise let tp ∈ /p and vp such that tp b =A vp a. The family of the sp ’s or tp ’s generates the ideal h1i (because otherwise all sp ’s or tp ’s would be in some maximal ideal). Therefore there is a finite number of si ’s, ui ’s satisfying si a = ui b (in A) and a finite P P number of tj ’s, vj ’s satisfying tj b = vj a, with an equation c s + j dj tj = 1. i i i P P P P We take s = i ci si , u = i ci ui , t = j dj tj , v = j dj vj and we obtain the equalities s + t = 1, sa = ub and tb = va. For an ideal with a finite number of generators, we can reason analogously, or use the result of Exercise 8. Exercise 6. The image of the principal ideal h60i of Z under the homomorphism Z → Z/27Z is the ideal h3i which does not contain any regular element, and which is not invertible. Actually, as a Z/27Z-module, the ideal h3i is not even projective (its annihilator h9i is not idempotent). When ρ : A → B is a flat algebra, the image of an ideal a ⊆ A is isomorphic to ρ? (a) ' B ⊗A a. Therefore if a is invertible, as it is projective of rank 1, its image is also a projective module of rank 1. Exercise 7. We first note that a product of locally principal ideals is always locally principal, because after suitable comaximal localizations, each ideal becomes principal, and so does their product. We are then content with the a = ha, bi case and with the a4 , b4 example. It will be clear that the computation technique is easily generalized. We start with sa = ub, tb = va and s + t = 1. Therefore s4 a4 = u4 b4 and t4 b4 = v 4 a4 . Since s4 , t4 = h1i (which is obtained by writing 1 = (s + t)7 ), we indeed obtain that the ideal a4 , b4 is locally principal. Let us show, for example, that a2 b2 ∈ a4 , b4 . We write s2 a2 = u2 b2 and t2 b2 = v 2 a2 . Therefore s2 a2 b2 = u2 b4 and t2 a2 b2 = v 2 a4 . Finally, 1 = (s + t)3 = s2 (s + 3t) + t2 (t + 3s). Therefore a2 b2 = (t + 3s)v 2 a4 + (s + 3t)u2 b4 . 478 VIII. Flat modules Exercise 8. We do not need to assume that the ring is arithmetic. We will show that if in a ring A each pair (ai , aj ) admits a principal localization matrix, the same goes for the n-tuple (a1 , . . . , an ). This can be compared to Dedekind’s proof of Theorem III -8.21, which concerns only invertible ideals, because over an integral ring the invertible ideals are precisely the nonzero locally principal ideals. Also note that the result is a priori clear: by successive comaximal localizations, every leaf of each branch of an a priori very large computation tree will be a principal ideal. This will show that the ideal ha1 , . . . , an i is always generated by one of the ai ’s after localizations at comaximal elements. What we are aiming for here is rather a practical computation of the principal localization matrix. We proceed by induction on n. Let us show the induction step for the passage of n = 3 to n + 1 = 4. Consider a1 , a2 , a3 , a4 ∈ Z. " # x1 x2 x3 y1 y2 y3 By induction hypothesis we have a matrix C = suitable for z1 z2 z3       c11 c14 c22 c24 c33 c34 , , respectively d11 d14 d22 d24 d33 d34 suitable for (a1 , a4 ), (a2 , a4 ) and (a3 , a4 ). Then we will check that the transpose of the following matrix is suitable for (a1 , a2 , a3 , a4 ) (a1 , a2 , a3 ), and matrices  c11 x1  c11 x2  c x 11 3 c14 x1 c22 y1 c22 y2 c22 y3 c24 y2 c33 z1 c33 z2 c33 z3 c34 z3  d11 x1 + d22 y1 + d33 z1 d11 x2 + d22 y2 + d33 z2  d11 x3 + d22 y3 + d33 z3  d14 x1 + d24 y2 + d34 z3 First of all, we must check that the trace of the matrix is equal to 1, i.e. t = c11 x1 + c22 y2 + c33 z3 + d14 x1 + d24 y2 + d34 z3 = 1, but c11 + d14 = 1 = c22 + d24 = c33 + d34 so t = x1 + y2 + z3 = 1. We must check that each row of the transposed matrix is proportional to [ a1 a2 a3 a4 ]. Two cases arise. First of all, we consider one of the first three rows, for instance the row [ c11 x1 c11 x2 c11 x3 c14 x1 ]. Both of the following types of equalities must be satisfied a1 c11 x2 = a2 c11 x1 , and a1 c14 x1 = a4 c11 x1 . For the first equality we use a2 x1 = a1 x2 and for the second a1 c14 = a4 c11 . Finally, we must verify that [ a1 a2 a3 a4 ] is proportional to the transpose of   d11 x1 + d22 y1 + d33 z1  d11 x2 + d22 y2 + d33 z2   d x + d y + d z . 11 3 22 3 33 3 d14 x1 + d24 y2 + d34 z3 This results on the one hand from the proportionality of [ a1 a2 a3 ] to each of the rows [ xi yi zi ], and on the other hand from the proportionality of the rows [ ai a4 ] to the rows [ di1 di4 ]. To complete the proof, note that the passage of n − 1 to n (for any n > 2) is perfectly analogous. Solutions of selected exercises 479 Exercise 9. 1 , . . . , am i, b = hb1 , . . . , bn i. We can assume Pm We write a = haP n that f = k=1 ak X k−1 and g = h=1 bh X h−1 . 1. Let F be a principal localization matrix for (a1 , . . . , am ). If c(f ) = a, we have comaximal elements si (the diagonal of F ) and polynomials fi ∈ A[X] (given by the rows of F ) that satisfy the equalities si f = ai fi in A[X]. In addition, the coefficient of X i−1 in fi is equal to si , so c(fi ) ⊇ hsi i . By letting Ai = A s1i , we have c(fi ) =Ai h1i and the equalities si c(f g) = c(ai fi g) = ai c(fi g) =Ai ai c(g) =Ai c(ai fi )c(g) = si c(f )c(g) (the third equality comes from Corollary III -2.3 4 because c(fi ) =Ai h1i). Hence the equality c(f g) = c(f )c(g) = ab because it is true in each Ai . 2. If g is also locally principal we obtain tj b = bj gj in A[X], with c(gj ) ⊇ htj i and comaximal tj in A. We therefore have si tj c(f g) =Aij ai bj c(fi gj ) =Aij hai bj i . This tells us that the ideal c(f g) = a b becomes principal after mn comaximal localizations. As this ideal admits m + n − 1 generators (the coefficients of f g) there is a principal localization matrix for these generators. To compute it, we can use the proof of the implication 1 ⇒ 3 in Theorem V -7.3. This proof is quite simple, as well as the computation it implies. But if we examine in detail what is going to happen, we realise that in the proof below we have used the Gauss-Joyal lemma: over the ring Aij , we have 1 ∈ c(fi )c(gj ) because 1 ∈ c(fi ) and 1 ∈ c(gj ). This lemma admits several elementary proofs (see II -2.6 and III -2.3), but none of them gives a simple formula that allows us to provide the linear combination of the coefficients of f g equal to 1, from two linear combinations of the coefficients of f and of those of g. We would be grateful to any reader who is able to indicate to us a short direct computation, for example in the case where the ring is integral with explicit divisibility.4 Exercise 10. We write a = ha1 , . . . , an i, b = hb1 , . . . , bm i. We will use the result of Exercise 8 which shows that if every ideal with two generators is locally principal, then every finitely generated ideal is locally principal. 1. In Exercise V -16 item 4 we have shown that 1 ∈ (a : b) + (b : a), a ∩ b is finitely generated and ab = (a ∩ b)(a + b). If a + b is locally principal, there is a system of comaximal elements such that by inverting any one of them, the ideal is generated by some ak or some b` . But if a + b = hak i ⊆ a, we have b ⊆ a, so a ∩ b = b, locally principal by hypothesis. Thus a ∩ b is locally principal because it is locally principal after localization at comaximal elements. 2. If the ring is integral and if (a + b)(a ∩ b) = ab for a = hai and b = hbi (where a, b 6= 0), we get that ha, bi (a ∩ b) = habi, so ha, bi is invertible (and 4 Please note that in the case of an integral ring with explicit divisibility, a principal localization matrix is known from its only diagonal elements, which can simplify computations. 480 VIII. Flat modules also hai ∩ hbi at the same time). When it is satisfied for all a, b 6= 0, the ring is arithmetic. 3. The only delicate implication consists in showing that if A is a pf-ring and if (a + b)(a ∩ b) = ab when a = hai and b = hbi then the ring is arithmetic, in other words every ideal ha, bi is locally principal. If ha, bi (a ∩ b) = habi, we write ab = au + bv with u and v ∈ a ∩ b: u = ax = by, v = az = bt, hence au + bv = ab(y + z) = ab. Since the ring is a pf-ring, from the equality ab(y + z − 1) = 0, we deduce three comaximal localizations in which we obtain a = 0, b = 0 and 1 = y + z respectively. In the first two cases ha, bi is principal. In the last case ha, bi is locally principal (localize at y or at z). Exercise 11. We write a = ha1 , . . . , an i, b = hb1 , . . . , bm i. 1. Proven in item 4 of Exercise V -16. 2. Now suppose (a : b) + (b : a) = h1i, i.e. we have s, t ∈ A with s + t = 1, sa ⊆ b, tb ⊆ a. 2a. (a + b) : c = (a : c) + (b : c). In this equality as in the following (up to 2f ), an inclusion is not obvious (here it is ⊆). Proving the non-obvious inclusion comes down to solving a system of linear equations (here, given some x such that xc ⊆ a + b, we look for y and z such that x = y + z, yc ⊆ a and zc ⊆ b). We can therefore use the basic local-global principle with the comaximal elements s and t. When we invert s, we get a ⊆ b, and if we invert t, we get b ⊆ a. In both cases the desired inclusion becomes trivial. For the record: 2b. c : (a ∩ b) = (c : a) + (c : b). 2c. (a + b)(a ∩ b) = a b. 2d. c (a ∩ b) = c a ∩ c b. 2e. c + (a ∩ b) = (c + a) ∩ (c + b). 2f. c ∩ (a + b) = (c ∩ a) + (c ∩ b). 2g. The short exact sequence below (where δ(x) = (x, −x) and σ(y, z) = y + z) is split: δ σ 0 −→ a ∩ b −→ a × b −→ a + b −→ 0. We want to define τ : a + b → a × b such that σ ◦ τ = Ida+b . If a ⊆ b, we can take τ (b) = (0, b) for all b ∈ b = a + b. If b ⊆ a, we can take τ (a) = (a, 0) for all a ∈ a = a + b.  P In the first case this implies sτ (ai ) = 0, j xij bj and sτ (bj ) = (0, sbj ).  P In the second case this implies tτ (bj ) = y a , 0 and tτ (ai ) = (tai , 0). i ji i We therefore try to define τ by the following formula which coincides with the two previous ones in the two special cases. τ (ai ) = tai , P j  xij bj , τ (bj ) = P i  yji ai , sbj . For this attempt to succeed, it is necessary and sufficient that when P β b , we have the equality j j j P i αi tai , P j  xij bj = P j βj P i  yji ai , sbj . P i αi ai = Solutions of selected exercises 481 For the first coordinate, this results from the following computation (and similarly for the second coordinate). P i αi tai = t P i αi ai = t P j βj bj = P j βj tbj = P j βj P i yji ai . Finally, the equality σ ◦ τ = Ida+b is satisfied because it is satisfied when restricted to a and b (immediate computation). Exercise 12. 1. Proven in Exercise 9. 2. Let a, b, c, d ∈ A. Let a = ha, bi Consider f = aX + b and g = aX − b. We get ha, bi2 = a2 , b2 , i.e. ab = ua2 + vb2 . When considering f = cX + d and g = dX + c, we obtain hc, di2 = c2 + d2 , cd . In other words c2 and d2 ∈ c2 + d2 , cd . Let b = hua, vbi. We have ab ∈ ab. It suffices to show that a2 b2 = a2 b2 because this implies that a is invertible (we treat the case a, b ∈ A∗ ). However, we have a2 b2 ∈ a2 b2 = a2 , b2 u2 a2 , v 2 b2 . We therefore need to show that u2 a4 and v 2 b4 ∈ 2 a2 b2 . Let u1 = ua2 and 2 2 v1 = vb . We have u1 + v1 = ab and u1 v1 ∈ a b . Therefore u21 + v12 ∈ a2 b2 also. Since u21 ∈ u21 + v12 , u1 v1 , we indeed get u21 ∈ a2 b2 (likewise for v12 ). 3. The equalities of item 2 are all satisfied. Let us first show that the ring is a pf-ring. Assume cd = 0. Since c2 ∈ c2 + d2 , cd , we have c2 = x(c2 + d2 ), i.e. xd2 = (1 − x)c2 . 3 We deduce that xd = 0, and as A is reduced, xd = 0. Similarly (1 − x)c = 0. Let us now see that the ring is arithmetic. We start from arbitrary a, b and we want to show that ha, bi is locally principal. By item 2 we have an ideal c such that ha, bi c = a2 b2 . We therefore have x and y with ha, bi hx, yi = a2 b2 and ax + by = a2 b2 . We write ax = a2 b2 v and by = a2 b2 u. From the equality a(ab2 v − x) = 0, we deduce two comaximal localizations, in the first a = 0, in the second x = ab2 v. We therefore suppose without loss of generality that x = ab2 v and, symmetrically y = ba2 u. This gives ha, bi hx, yi = ab ha, bi hau, bvi = a2 b2 . We can also suppose without loss of generality that ha, bi hau, bvi = habi. We also have ax + by = a2 b2 (u + v) and since ax + by = a2 b2 , we suppose without loss of generality that u + v = 1. Since a2 u = abu0 , we suppose without loss of generality that au = bu0 . Symmetrically bv = av 0 , and since u + v = 1, ha, bi is locally principal. 482 VIII. Flat modules Exercise 14. 1. Let a ∈ A and a1 , . . . , an ∈ A generate a = Ann(a). If one of the ai ’s is in A× , we obtain a = 0 and a = h1i. It remains to treat the case where all the ai ’s are in m. Let b be one of the ai ’s. Since m is flat and b ∈ m, the equality ab = 0 gives us elements c1 , . . . , cm ∈ a and b1 , . . . , bm ∈ m P P with b = i∈J1..mK ci bi . Therefore b ∈ am, which gives b = a z for i∈J1..nK i i some zi ∈ m. Hence a matrix equality [ a1 · · · an ] = M [ a1 · · · an ] with M ∈ Mn (m). Thus [ a1 · · · an ](In − M ) = [ 0 · · · 0 ] with In − M invertible, so a = 0. 2. Consider a, b ∈ A. We must prove that one divides the other. If one of the two is invertible, the case is closed. It remains to examine the case where a and b ∈ m. We consider a matrix   a1 · · · an P = b1 · · · b n whose columns generate the module K, the kernel of (x, y) 7→ bx−ay. In particular we have ai b = bi a for each i. If one of the ai ’s or bi ’s is invertible, the case is closed. It remains to examine the case where the ai ’s and bi ’s are in m. Let (c, d) be one of the (ai , bi )’s. Since m is flat and a, b ∈ m, the equality cb − da = 0 gives       y1  0 c c1 · · · cm  .  cj 0 . = with the y s ∈ m and the s ∈ K. i d d1 · · · dm  .  dj ym   cj By expressing the as linear combinations of the columns of P we obtain dj   z1   c   = P  ...  with every zi ∈ m. d zn Hence P = P N with a matrix N ∈ Mn (m), so P = 0. This implies that (a, b) = (0, 0), and a divides b (actually, in this case, A is trivial). Pn Exercise 15. Let ai ∈ A and xi ∈ M satisfy a x ≡ 0 mod K, a i=1 i i P relation that we must explain. Let a = hai such that aK = a K; since i i P P P y a x ∈ aM ∩ K = aK, we have an equality a x = a where each i i i i i i i i P yi ∈ K. We therefore have, with zi = xi − yi , the relation = 0 in M. a z i i i Since M is flat, this relation produces a certain number of vectors of M , say 3 for simplicity, denoted by u, v, w and 3 sequences of scalars α = (α1 , . . . , αn ), β = (β1 , . . . , βn ) and γ = (γ1 , . . . , γn ), satisfying (z1 , . . . , zn ) = (α1 , . . . , αn ) u + (β1 , . . . , βn ) v + (γ1 , . . . , γn ) w and ha | αi = a | β = a | γ = 0. Since zi ≡ xi mod K, we obtain our sought explanation in M/K: (x1 , . . . , xn ) ≡ (α1 , . . . , αn ) u + (β1 , . . . , βn ) v + (γ1 , . . . , γn ) w mod K. Bibliographic comments 483 Exercise 16. Without loss of generality suppose that I is finitely enumerated. In other words I = {i1 , . . . , in }. Let P = M (I) . Any element of P can be written in the form x = ⊕k∈J1..nK (ik , xk ). First suppose that the module M is flat, and consider a syzygy in P 0= P `∈J1..mK a` x` =  P `∈J1..mK a` ⊕k∈J1..nK (ik , xk,` ) = ⊕k∈J1..nK (ik , yk ) P with yk = `∈J1..mK a` xk,` . By definition of equality in P , since ⊕k∈J1..nK yk = 0, we are in (at least) one of the two following cases: • all the yk ’s are null, • two indices are equal in I: ik =I ih for h and k distinct in J1..nK. The first case is treated like that of a direct sum over a finite I. The second case reduces to the first by induction on n. Now P suppose that P is flat and consider for instance the index i1 ∈ I and a syzygy a x = 0 in M . We explain this syzygy in P by writing `∈J1..mK ` ` (i1 , x` ) =P P j∈J1..pK g`,j zj with P `∈J1..mK a` g`,j =A 0 for all j. We re-express zj = ⊕k∈J1..nK (ik , yk,j ), which gives (i1 , x` ) =P ⊕k∈J1..pK ik ,  P j∈J1..pK g`,j yk,j . By definition of the equality in P , we are in (at least) one of the two following cases: • for each `, we have x` = P j∈J1..nK g`,j y1,` in M , • we have in I: i1 =I ih for some h 6= 1 in J1..nK. In the first case we have in M the equalities that suit us. The second case is reduced to the first by induction on n. Bibliographic comments Prüfer domains were introduced by H. Prüfer in 1932 in [148]. Their central place in multiplicative ideal theory is showcased in the book of reference on the subject [Gilmer]. Even though they were introduced in a very concrete way as the integral rings in which every nonzero finitely generated ideal is invertible, this definition is often set aside in the modern literature for the following purely abstract alternative, which only works in the presence of non-constructive principles (LEM and the axiom of choice): the localization at any prime ideal gives a valuation ring. Arithmetic rings were introduced by L. Fuchs in 1949 in [86]. In the case of a non-integral ring, the definition that we have adopted for Prüfer rings is due to Hermida and Sánchez-Giralda [100]. It is the one that seemed the most natural to us, given the central importance of the 484 VIII. Flat modules concept of flatness in commutative algebra. Another name for these rings in the literature is ring of weak global dimension less than or equal to one, which is rather inelegant. Moreover, we often find in the literature a Prüfer ring defined as a ring in which every ideal containing a regular element is invertible. They are therefore almost arithmetic rings, but the behavior of the ideals that do not contain regular elements seems utterly random (cf. Exercise 13). A fairly complete presentation of arithmetic rings and Prüfer rings, written in the style of constructive mathematics, can be found in [68, Ducos&al.] and [125, Lombardi]. A very comprehensive survey on variations of the notion of integral Prüfer rings obtained by deleting the hypothesis of integrity is given in [11, Bazzoni&Glaz], including Gaussian rings (Exercise 12). Chapter IX Local rings, or just about Contents 1 A few constructive definitions . . . . . . . . . . . . . . 486 The Jacobson radical, local rings, fields . . . . . . . . . . . 486 Prime and maximal ideals . . . . . . . . . . . . . . . . . . . 489 The Jacobson radical and units in an integral extension . . 490 2 Four important lemmas . . . . . . . . . . . . . . . . . . 491 3 Localization at 1 + a . . . . . . . . . . . . . . . . . . . . 495 4 Examples of local rings in algebraic geometry . . . . 498 Local algebra at a zero . . . . . . . . . . . . . . . . . . . . 498 Local ring at an isolated point . . . . . . . . . . . . . . . . 502 Local ring at a non-singular point of a complete intersection curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 5 Decomposable rings . . . . . . . . . . . . . . . . . . . . 509 Decomposable elements . . . . . . . . . . . . . . . . . . . . 509 Lifting idempotents . . . . . . . . . . . . . . . . . . . . . . 511 6 Local-global rings . . . . . . . . . . . . . . . . . . . . . 511 Definitions and the concrete local-global principle . . . . . 511 Remarkable local-global properties . . . . . . . . . . . . . . 515 Congruential systems . . . . . . . . . . . . . . . . . . . . . 518 Stability by integral extension . . . . . . . . . . . . . . . . 520 Exercises and problems . . . . . . . . . . . . . . . . . . 521 Solutions of selected exercises . . . . . . . . . . . . . . . . . 527 Bibliographic comments . . . . . . . . . . . . . . . . . 530 – 485 – 486 IX. Local rings, or just about 1. A few constructive definitions In classical mathematics a local ring is often defined as a ring having a single maximal ideal. In other words the non-invertible elements form an ideal. This second definition has the advantage of being simpler (no quantification over the set of ideals). However, it lends itself fairly poorly to an algorithmic treatment because of the negation contained in “noninvertible elements.” This is the reason why we adopt the definition given on page 206 in constructive mathematics: if the sum of two elements is invertible, one of the two is invertible. We now find ourselves obligated to inflict a few unusual definitions on the classic reader, in line with the definition of a local ring. Rest assured, on other planets, in other solar systems, no doubt the symmetric situation is taking place. There, mathematics has always been constructive and they have just barely discovered the interest of the abstract Cantorian point of view. An author in the new style is in the process of explaining that for them it is much simpler to regard a local ring as a ring having a single maximal ideal. Would the reader then put in the effort to follow what they are saying? The Jacobson radical, local rings, fields Recall that for a ring A we denote by A× the multiplicative group of invertible elements, also called the group of units. An element x of a ring A is said to be non-invertible if it satisfies1 the following implication x ∈ A× ⇒ 1 =A 0. In the trivial ring the element 0 is both invertible and non-invertible at the same time. 1 Here we will use a slightly weakened version of negation. For a property P affecting elements of the ring A or of an A-module M , we consider the property P0 := (P ⇒ 1 =A 0). It is the negation of P when the ring is not trivial. Yet it often happens that a ring constructed in a proof can be trivial without one knowing. To do an entirely constructive treatment of the usual classical proof in such a situation (the classical proof excludes the case of the trivial ring by an ad hoc argument) our weakened version of negation then turns out to be generally useful. A discrete field does not necessarily satisfy the axiom of  discrete sets, ∀x, y x = y or ¬(x = y) , but it satisfies its weak version ∀ x, y, since if 0 is invertible, then 1 = 0.  x = y or (x = y)0 , §1. A few constructive definitions 487 For an arbitrary commutative ring, the set of elements a of A which satisfy ∀x ∈ A 1 + ax ∈ A× (1) is called the Jacobson radical of A. It will be denoted by Rad(A). It is an ideal because if a, b ∈ Rad A, we can write, for x ∈ A 1 + (a + b)x = (1 + ax)(1 + (1 + ax)−1 bx), which is the product of two invertible elements. In a local ring the Jacobson radical is equal to the set of non-invertible elements (the reader is invited to find a constructive proof). In classical mathematics the Jacobson radical is characterized as follows. 1.1. Lemma∗. maximal ideals. The Jacobson radical is equal to the intersection of the J If a ∈ Rad A and a ∈/ m with m a maximal ideal, we have 1 ∈ hai + m which means that for some x, 1 + xa ∈ m, so 1 ∈ m: a contradiction. If a ∈ / Rad A, there exists an x such that 1 + xa is non-invertible. Therefore there exists a strict ideal containing 1 + xa. By Zorn’s lemma there exists a maximal ideal m containing 1 + xa, and a cannot be in m because otherwise we would have 1 = (1 + xa) − xa ∈ m. The reader will notice that the proof actually says this: an element x is in the intersection of the maximal ideals if and only if the following implication is satisfied: hx, yi = h1i ⇒ hyi = h1i.  Remark. We have reasoned with a nontrivial ring. If the ring is trivial the intersection of the (empty) set of maximal ideals is indeed equal to h0i. A Heyting field, or simply a field, is by definition a local ring in which every non-invertible element is null, in other words a local ring whose Jacobson radical is reduced to 0. In particular, a discrete field, therefore also the trivial ring, is a field. The real numbers form a field that is not a discrete field.2 The same remark applies for the field Qp of p-adic numbers or that of the formal Laurent series k((T )) when k is a discrete field. The reader will check that a field is a discrete field if and only if it is zero-dimensional. The quotient of a local ring by its Jacobson radical is a field, called the residual field of the local ring. 2 We use the negation in italics to indicate that the corresponding assertion, here it would be “R is a discrete field,” is not provable in constructive mathematics. 488 IX. Local rings, or just about 1.2. Lemma. If A is zero-dimensional, Rad A = DA (0). J The inclusion Rad A ⊇ DA (0) is always true. Now if A is zero-dimensional and x ∈ Rad A, since we have an equality x` (1 − ax) = 0, it is clear that x` = 0.  1.3. Lemma. For all A, Rad(A[X]) = DA (0)[X]. J If f ∈ Rad(A[X]), then 1 + Xf (X) ∈ A[X]× . We conclude with Lemma II -2.6 4.  1.4. Fact. Let A be a ring and a be an ideal contained in Rad A.  −1 1. Rad A = πA,a (Rad A/a ) ⊇ DA (a). 2. A is local if and only if A/a is local. 3. A is local and a = Rad A if and only if A/a is a field. The following fact describes a construction that forces a monoid to be inverted and an ideal to be radicalized (for more details, see the subsection “Duality in commutative rings” on page 642 and following, and Section XV -1). 1.5. Fact. Let U be a monoid and a be an ideal of A. Consider the monoid S = U + a. Let B = S −1 A and b = aB. 1. The ideal b is contained in Rad B. 2. The ring B/b is isomorphic to AU /aAU . By definition a residually discrete local ring is a local ring whose residual field is a discrete field. Such a ring A can be characterized by the following axiom ∀x ∈ A x ∈ A× or 1 + xA ⊆ A× (2) (the reader is invited to write its constructive proof). For example the ring of p-adic integers, although non-discrete, is residually discrete. We obtain a non-residually discrete local ring when taking K[u]1+hui , where K is a non-discrete field (for example the field of formal series k((t)), where k is a discrete field). Comment. The slightly subtle difference that separates local rings from residually discrete local rings can also be found, by permuting addition and multiplication, in the difference that separates rings without zerodivisors from integral rings. In classical mathematics a ring without zerodivisors is integral; however the two notions do not have the same algorithmic content, and it is for this reason that they are distinguished in constructive mathematics. §1. A few constructive definitions 489 1.6. Definition. A ring A is said to be residually zero-dimensional when the residual ring A/Rad A is zero-dimensional. Likewise for residually connected rings. Since a field is zero-dimensional if and only if it is a discrete field, a local ring is residually discrete if and only if it is residually zero-dimensional. Comment. In classical mathematics a ring A is said to be semi-local if A/Rad A is isomorphic to a finite product of discrete fields. This implies that it is a residually zero-dimensional ring. Actually the hypothesis of finiteness presented in the notion of a semi-local ring is rarely decisive. Most of the theorems from the literature concerning semi-local rings applies to residually zero-dimensional rings, or even to local-global rings (Section 6). For a possible definition of semi-local rings in constructive mathematics see Exercises 18 and 19. Prime and maximal ideals In constructive mathematics, an ideal of a ring A is called a maximal ideal when the quotient ring is a field.3 An ideal is called a prime ideal when the quotient ring is without zerodivisors. These definitions coincide with the usual definitions in the context of classical mathematics, except that we tolerate the trivial ring as a field and hence the ideal h1i as a maximal ideal and as a prime ideal. In a nontrivial ring, an ideal is strict, maximal and detachable if and only if the quotient ring is a nontrivial discrete field, it is strict, prime and detachable if and only if the quotient ring is a nontrivial integral ring. Comment. It is not without a certain apprehension that we declare the ideal h1i both prime and maximal. This will force us to say “strict prime ideal” or “strict maximal ideal” in order to speak of the “usual” prime ideals and maximal ideals. Fortunately it will be a very rare occurrence. We actually think that there was a casting error right at the beginning. To force a field or an integral ring to be nontrivial, something that seemed eminently reasonable a priori, has unconsciously led mathematicians to transform numerous constructive arguments into reductio ad absurdum arguments. To prove that an ideal constructed in the process of a computation is equal to h1i, we have made it a habit to reason as follows: if it wasn’t the case, it would be contained in a maximal ideal and the quotient would 3 We have until now uniquely used the notion of a maximal ideal in the context of proofs in classical mathematics. A constructive definition would have been required sooner or later. Actually this notion is only rarely used in constructive mathematics. As a general rule, it is advantageously replaced by considering the Jacobson radical, for example in the local rings case. 490 IX. Local rings, or just about be a field, which case we reach the contradiction 0 = 1. This argument happens to be a reductio ad absurdum simply because we have made the casting error: we have forbidden the trivial ring from being a field. Without this prohibition, we would present the argument as a direct argument of the following form: let us show that every maximal ideal of the quotient ring contains 1. We will come back to this point in Section XV -6. Moreover, as we will essentially use prime ideals and maximal ideals heuristically, our transgression of the usual prohibition regarding the trivial ring will have practically no consequence on reading this work. In addition, the reader will be able to see that this unusual convention does not force a modification of most of the results established specifically in classical mathematics, like the abstract local-global principle∗ II -2.13, Fact∗ II -2.12 or Lemma∗ 1.1: it suffices for instance4 for the localization at a prime ideal p to define it as the localization at the filter def S = {x ∈ A|x ∈ p ⇒ 1 ∈ p}. Fundamentally we think that mathematics is purer and more elegant when we avoid using negation (this radically forbids reductio ad absurdum arguments for example). It is for this reason that you will not find any definitions that use negation in this book.5 The Jacobson radical and units in an integral extension 1.7. Theorem. Let k ⊆ A with A integral over k. 1. If y ∈ A× , then y −1 ∈ k[y]. 2. k× = k ∩ A× . 3. Rad k = k ∩ Rad A and the homomorphism A → A/Rad(k)A reflects the units.6 J 1. Let y, z ∈ A such that yz = 1. We have an integral dependence relation for z: z n = an−1 z n−1 + · · · + a0 (ai ∈ k). By multiplying by y n we obtain 1 = yQ(y) so z = Q(y) ∈ k[y]. 2. In particular, if y ∈ k is invertible in A, its inverse z is in k. 3. Let x ∈ k ∩ Rad A, for all y ∈ k, 1 + xy is invertible in A therefore also in k. This gives the inclusion Rad k ⊇ k ∩ Rad A. Let x ∈ Rad k and b ∈ A. We want to show that y = −1 + xb is invertible. 4 Fact∗ II -2.2 could also be treated according to the same schema, by deleting the restriction to the nontrivial case. 5 If such a definition could be found, it would be in a framework where the negation is equivalent to a positive assertion, because the considered property is decidable. 6 Recall that we say that a homomorphism ρ : A → B reflects the units when ρ−1 (B× ) = A× . §2. Four important lemmas 491 We write an integral dependence relation for b bn + an−1 bn−1 + · · · + a0 = 0, we multiply by xn and replace bx with 1 + y. We get a polynomial in y with coefficients in k: y n + · · · + (1 + an−1 x + · · · + a0 xn ) = 0. Therefore, yR(y) = 1 + xS(x) is invertible in k, and y is invertible in A. Now let y ∈ A which is invertible modulo Rad(k)A. A fortiori it is invertible modulo Rad A, so it is invertible.  1.8. Theorem. Let k ⊆ A with A integral over k. 1. A is zero-dimensional if and only if k is zero-dimensional. 2. A is residually zero-dimensional if and only if k is residually zerodimensional. In this case Rad A = DA Rad(k)A . 3. If A is local, so is k. J 1. Already known (Lemmas VI -3.14 and IV -8.15). 2. By passage to the quotient, the integral morphism k → A gives an integral morphism k/Rad k → A/Rad A , which is injective because Rad k = k ∩ Rad A (Theorem 1.7). Therefore, the two rings are simultaneously zerodimensional. In this case, let a = Rad(k) A ⊆ Rad A. We have an integral morphism k/Rad k → A/a , so A/a is zero-dimensional, such that its Jacobson radical is equal to its nilpotent radical (Lemma 1.2), i.e. Rad(A)/a = DA (a)/a , and so Rad A = DA (a). 3. Results from Theorem 1.7, item 2.  2. Four important lemmas First we give some variants of the “determinant trick” often called “Nakayama’s lemma.” In this lemma the important thing to underline is that the module M is finitely generated. 2.1. Nakayama’s lemma. (The determinant trick) Let M be a finitely generated A-module and a be an ideal of A. 1. If a M = M , there exists an x ∈ a such that (1 − x) M = 0. 2. If in addition a ⊆ Rad(A), then M = 0. 3. If N ⊆ M , a M + N = M and a ⊆ Rad(A), then M = N . 4. If a ⊆ Rad(A) and X ⊆ M generates M/aM as an A/a-module, then X generates M as an A-module. 492 IX. Local rings, or just about J We prove item 1 and leave the others as an exercise, as easy consequences. Let V ∈ M n×1 be a column vector formed with generators of M . The hypothesis means that there exists a matrix G ∈ Mn (a) satisfying GV = V . Therefore (In − G)V = 0, and by premultiplying by the cotransposed matrix of In − G, we obtain det(In − G)V = 0. However, det(In − G) = 1 − x with x ∈ a.  Finitely generated projective modules are locally free in the following (weak) sense: they become free when we localize at a prime ideal. Proving this is the same as provinging the local freeness lemma (below) which states that a finitely generated projective module over a local ring is free. 2.2. Local freeness lemma. Let A be a local ring. Every finitely generated projective module over A is free of finite rank. Equivalently, every matrix F ∈ AGn (A) is similar to a standard projection matrix   Ir 0r,n−r Ir,n = . 0n−r,r 0n−r Remark. The matrix formulation obviously implies the first, more abstract, formulation. Conversely if M ⊕ N = An , saying that M and N are free (of ranks r and n − r) is the same as saying that there is a basis of An whose first r elements form a basis of M and last n − r a basis of N , consequently the projection over M parallel to N is expressed over this basis by the matrix Ir,n . First proof, (usual classic proof). We denote by x 7→ x the passage to the residual field. If M ⊆ An is the image of a projection matrix F and if k is the residual field we consider a basis of kn which begins with columns of F (Im F is a linear subspace of dimension r) and ends with columns of In − F (Im(In − F ) = Ker F ). When considering the corresponding columns of Im F and Im(In − F ) = Ker F we obtain a lift of the residual basis in n vectors whose determinant is residually invertible, therefore invertible. These vectors form a basis of An and over this basis it is clear that the projection admits as a matrix Ir,n . Note that in this proof we extract a maximal free system among the columns of a matrix with coefficients in a field. This is usually done by the Gauss pivot method. This therefore requires that the residual field be discrete. Second proof, (proof by Azumaya). In contrast to the previous proof, this one does not assume that the local ring is residually discrete. We will diagonalize the matrix F . The proof works with a not necessarily commutative local ring. Let us call f1 the column vector F1..n,1 of the matrix F , (e1 , . . . , en ) the canonical basis of An and ϕ the linear map represented by F . – First case, f1,1 is invertible. Then, (f1 , e2 , . . . , en ) is a basis of An . With §2. Four important lemmas 493 respect to this basis, the linear map ϕ has a matrix   1 L G= . 0n−1,1 F1 2 2 By writing G  = G, we obtain  F1 = F1 and LF1 = 0. We then define the 1 L matrix P = and we obtain the equalities 0n−1,1 In−1     1 L 1 L 1 −L −1 P GP = 0n−1,1 In−1 0n−1,1 F1 0n−1,1 In−1   1 01,n−1 = . 0n−1,1 F1 – Second case, 1 − f1,1 is invertible. We apply the previous computation to the matrix In − F , which is therefore similar to a matrix   1 01,n−1 A= , 0n−1,1 F1 with F12 = F1 , which means that F is similar to a matrix   0 01,n−1 In − A = , 0n−1,1 H1 with H12 = H1 . We finish the proof by induction on n.  Comment. From the classical point of view, all the sets are discrete, and the corresponding hypothesis is superfluous in the first proof. The second proof must be considered superior to the first as its algorithmic content is more universal than that of the first (which can only be rendered completely explicit when the local ring is residually discrete). The following lemma can be considered as a variant of the local freeness lemma. 2.3. Lemma of the locally simple map. Let A be a local ring and ψ be a linear map between free A-modules of finite rank. The following properties are equivalent. 1. ψ is simple. 2. ψ is locally simple. 3. ψ has a finite rank k. J 2 ⇒ 3. The equality ψ ϕ ψ = ψ implies that the determinantal ideals of ψ are idempotents. By Lemma II -4.6 these ideals are generated by idempotents. Since an idempotent of a local ring is necessarily equal to 0 or 1, and that D0 (ψ) = h1i and Dr (ψ) = h0i for large enough r, there exists an integer k > 0 such that Dk (ψ) = h1i and Dk+1 (ψ) = h0i. 494 IX. Local rings, or just about 3 ⇒ 1. By hypothesis Dk (ψ) = h1i, so the minors of order k are comaximal and since the ring is local one of the minors of order k is invertible. As Dk+1 (ψ) = h0i, the result is then a consequence of the freeness lemma II-5.10.  Note that the term locally simple map is partly justified by the previous lemma. Also note that Theorem II -5.26 can be considered as more general than the previous lemma. 2.4. Local number of generators lemma. Let M be a finitely generated A-module. 1. Suppose A is local. a. The module M is generated by k elements if and only if its Fitting ideal Fk (M ) is equal to A. b. If in addition A is residually discrete and M is finitely presented, the module admits a presentation matrix whose every coefficient is in the maximal ideal Rad A. 2. Generally, for any k ∈ N the following properties are equivalent. a. Fk (M ) is equal to A. b. There exist comaximal elements sj such that after scalar extension to each of the A[1/sj ], M is generated by k elements. c. There exist comaximal monoids Sj such that each of the MSj is generated by k elements. d*. After localization at any prime ideal, M is generated by k elements. e*. After localization at any maximal ideal, M is generated by k elements. J It suffices to prove the equivalences for a finitely presented module due to Fact IV -9.8. Suppose M is generated by q elements and let k 0 = q − k. 1. The condition is always necessary, even if the ring is not local. Let A ∈ Aq×m be a presentation matrix for M . If the ring is local and if Fk (M ) = A, since the minors of order k 0 are comaximal, one of them is invertible. By the invertible minor lemma II -5.9, the matrix A is equivalent   to a matrix Ik0 0k0 ,m−k0 , 0k,k0 A1 0 and so, the matrix A1 ∈ Ak×(m−k ) is also a presentation matrix of M . Finally, if the ring is residually discrete, we can reduce the number of generators until the corresponding presentation matrix has all of its coefficients in the radical. 2. a ⇒ b. The same proof shows that we can take, for sj , the minors of order k 0 of A. §3. Localization at 1 + a 495 b ⇒ c. Immediate. c ⇒ a. Saying P that Fk (M ) = A comes down to solving the system of linear equations ` x` s` = 1, where the unknowns are the x` ’s and where the s` ’s are the minors of order k 0 of the matrix A. We can therefore apply the basic local-global principle. a ⇒ d. Results from 1. d ⇒ e. Trivial. e ⇒ a. This can only be proven in classical mathematics (hence the star that we attached to d and e). We prove it by reductio ad absurdum, by proving the contrapositive. If Fk (M ) 6= A let p be a strict maximal ideal containing Fk (M ). After localization at p, we obtain Fk (Mp ) ⊆ pAp 6= Ap , and so Mp is not generated by k elements.  Comment. This lemma gives the true meaning of the equality Fk (M ) = A; we can say that Fk (M ) “measures” the possibility for the module to be locally generated by k elements. Hence the following definition. See also Exercises IV -19, 11 and 12. 2.5. Definition. A finitely generated module is said to be locally generated by k elements when it satisfies the equivalent properties of Item 2 in the local number of generators lemma. 3. Localization at 1 + a Let a be an ideal of A, S := 1 + a,  : A → B := A1+a be the canonical homomorphism, and b := (a)B. Note that b is identified with S −1 a (Fact II -6.4) and that 1 + b ⊆ B× (Fact 1.5). 3.1. Lemma. (Quotient of powers of a in the localized ring A1+a ) Under the previous hypotheses we have the following results. 1. Ker  ⊆ a, B = (A) + b and the canonical homomorphism A/a → B/b is an isomorphism. 2. The localization at 1 + a is the same as the localization at 1 + an (n > 1), so Ker  ⊆ an , B = (A) + bn and A/an ' B/bn . ∼ 3. For all p, q ∈ N,  induces an isomorphism ap /ap+q −→ bp /bp+q of A-modules. J 1. The inclusion Ker  ⊆ a is immediate. The fact that the homomorphism A/a → B/b is an isomorphism relies on two equivalent universal problems being solved: in the first we must annihilate the elements of a, in the second, we also need to invert the 496 IX. Local rings, or just about elements of 1 + a, but inverting 1 is costless. Finally, the surjectivity of this morphism means precisely that B = (A) + b. 2. The monoids 1 + a and 1 + an are equivalent because 1 − a divides 1 − an . 3. Let bq = S −1 aq = aq B. By multiplying B = (A) + bq by ap , we obtain bp = (ap ) + bp+q . Therefore, the map  induces a surjection of A-modules ap  bp /bp+q . It remains to see that its kernel is ap+q . If x ∈ ap satisfies (x) ∈ bp+q , there exists an s ∈ 1 + a such that sx ∈ ap+q , and since s is invertible modulo a, it is also invertible modulo ap+q , and so x ∈ ap+q .  3.2. Localized finite ring lemma. If a is a finitely generated ideal and n ∈ N∗ , we have the equivalences bn = bn+1 ⇐⇒ bn = 0 ⇐⇒ an = an+1 . In this case, 1. we have an = Ker  = h1 − ei with e idempotent, such that B = A1+a = A[1/e] = A/h1 − ei , 2. if in addition A is a k-algebra, then A/a is finite over k if and only if B is finite over k. J If bn = bn+1 , then bn is a finitely generated idempotent ideal, so bn = hεi with ε being an idempotent. But since ε ∈ b, the idempotent 1 − ε is invertible, therefore 1, i.e. ε = 0, so bn = 0. The third equivalence  n+1equalnto  n+1 n comes from b b 'a a (Lemma 3.1). 1. Since an is a finitely generated idempotent, an = h1 − ei with e an idempotent. The rest then stems from Fact II -4.2. 2. If B is a finitely generated k-module, so is A/a ' B/b . Conversely, suppose that A/a is a finitely generated k-module and let us consider the filtration of B by the powers of b 0 = bn ⊆ bn−1 ⊆ · · · ⊆ b2 ⊆ b ⊆ B.  Then, each quotient bi bi+1 is a B/b -finitely generated module, or an A/a finitely generated module, and consequently a finitely generated k-module. We deduce that B is a finitely generated k-module.  3.3. Localized zero-dimensional ring lemma. Let a be a finitely generated ideal of A such that the localized ring B = A1+a is zero-dimensional. Then, there exist an integer n and an idempotent e such that   an = h1 − ei and A1+a = A 1e = A/h1 − ei . If in addition A is a finitely generated k-algebra with k zero-dimensional (for example a discrete field), then B is finite over k. J We apply the localized finite ring lemma; since B is zero-dimensional and b finitely generated, there exists an integer n such that bn = bn+1 . §3. Localization at 1 + a 497 We end with the weak Nullstellensatz VI -3.15 because B = A/h1 − ei is a finitely generated k-algebra.  Remark. Let a be a finitely generated ideal of a ring A such that the localized ring A1+a is zero-dimensional. The natural map A → A1+a is T therefore surjective with kernel k>0 ak = am with m such that am = am+1 . In addition, am is generated by an idempotent 1 − e and A1+a = A[1/e]. We then have  T k ∞ k>0 a = 0 : (0 : a ) . This remark can be useful for computations. Suppose that A = k[X]/f where k[X] = k[X1 , . . . , Xn ] is a polynomial ring with n indeterminates over a discrete field k and f = hf1 , . . . , fs i is a finitely generated ideal. Let a be a finitely generated ideal of k[X] and a be its image in A. Then, if A1+a is zero-dimensional, the composition k[X] → A1+a is surjective and its kernel is expressed in two ways  T k ∞ k>0 (f + a ) = f : (f : a ) . The right-hand side formula can turn out to be more efficient by computing (f : a∞ ) as follows Tr (f : a∞ ) = j=1 (f : gj∞ ) if a = hg1 , . . . , gr i . Comment. In classical mathematics a prime ideal a of the ring A is said to be isolated if it is both minimal and maximal in the set of prime ideals of A. In other words if it does not compare to any other prime ideal for the inclusion relation. Saying that a is maximal amounts to saying that A/a is zero-dimensional. Saying that a is minimal amounts to saying that AS is zero-dimensional, where S = A \ a. But if a is assumed to be maximal, the monoid S is the saturated monoid of 1 + a. Conversely suppose that B = A1+a is zero-dimensional. Then A/a is also zero-dimensional since A/a ' B/aB. Thus, when a is also finitely generated, we find ourselves with a special case of the localized zero-dimensional ring lemma 3.3. It is worth noting that in the literature the isolated prime ideals generally intervene in the context of Noetherian rings and that therefore in classical mathematics they are automatically finitely generated. 498 IX. Local rings, or just about 4. Examples of local rings in algebraic geometry Here we propose to study in a few cases “the local algebra in a zero of a polynomial system.” We fix the following context for all of Section 4. k is a ring, f = f1 , . . . , fs ∈ k[X] = k[X1 , . . . , Xn ],  A = k[X] f = k[x1 , . . . , xn ], (ξ) = (ξ1 , . . . , ξn ) ∈ kn is a zero of the system, mξ = hx1 − ξ1 , . . . , xn − ξn iA is the ideal of the point ξ, J(X) = JACX (f ) is the Jacobian matrix of the system. Recall that A = k ⊕ mξ (Proposition IV -2.7). More precisely, we have with the evaluation at ξ a split exact sequence of k-modules g 7→ g(ξ) 0 → mξ → A −−−−−→ k → 0, and two homomorphisms of k-algebras k → A → k which when composed give Idk . Also recall (Theorem IV -2.8) that mξ is a finitely presented A-module (the presentation matrix is explicitly given). Local algebra at a zero In the following definition the terminology local algebra at ξ must not be ambiguous. We do not claim that it is a local ring, we simply mimic the construction of the given local algebra in the case where k is a field. 4.1. Definition. (Local algebra at a zero of a polynomial system) The ring A1+mξ is called the local algebra at ξ of the polynomial system f . We also use the shorthand notation Aξ instead of A1+mξ . We denote by ξ : A → k the evaluation at ξ. It is factorized through the localization at 1 + mξ and we obtain a character Aξ → k. We therefore have Aξ = k ⊕ mξ Aξ and canonical isomorphisms   Aξ (mξ Aξ ) ' A mξ ' k 4.2. Fact. (If k is a discrete field, the algebra Aξ is a local ring) 1. Let k be a local ring with Rad k = p, M = pA + mξ and C = A1+M . Then, C is a local ring with Rad(C) = MC and C/Rad C ' k/p . 2. If k is a discrete field, we have the following results. a. The ring Aξ is a local ring with Rad Aξ = mξ Aξ and its residual field is (canonically isomorphic to) k. §4. Examples of local rings in algebraic geometry 499 b. The rings A and Aξ are coherent Noetherian, and A is strongly discrete. r T c. r∈N mξ Aξ = 0. J 1. We have C/MC ' A/mξ = k/p by item 2 of Fact 1.5, then use item 3 of Fact 1.4. 2a. Results from 1. 2b. The ring A is strongly discrete and coherent by Theorem VII -1.10. We deduce that Aξ is coherent. For the Noetherianity we refer the reader to [MRR, VIII.1.5]. 2c. Given items 2a and 2b, this is a special case of Krull’s intersection theorem ([MRR, VIII.2.8]).  Tangent space at a zero ∂f In what follows we write ∂j f for ∂X . Thus the Jacobian matrix of the j system, which we have denoted by J = J(X), is visualized as follows f1 f2 .. . fi .. . fs X1 ∂1 f1  ∂1 f2   .  ..   ..  .   ..  . ∂1 fs  X2 ∂2 f1 ∂2 f2 ··· ··· ··· ∂2 fs ··· Xn  ∂n f1 ∂n f2   ..  .   ..  = J. .   ..  .  ∂n fs The congruence below is immediate, for f ∈ k[X], Xn 2 f (X) ≡ f (ξ) + (Xj − ξj ) ∂j f (ξ) mod hX1 − ξ1 , . . . , Xn − ξn i (3) j=1 By specializing X in x we obtain in A the fundamental congruence Xn f (x) ≡ f (ξ) + (xj − ξj ) ∂j f (ξ) mod mξ 2 j=1 (4) We leave it up to the reader to verify that the kernel of J(ξ) only depends on the ideal hf1 , . . . , fs i and on the point ξ. It is a k-submodule of kn which can be called the tangent space at ξ to the affine scheme over k defined by A. We will denote it by Tξ (A/k ) or Tξ . This terminology is reasonable in algebraic geometry (i.e. when k is a discrete field), at least in the case where A is integral. In that case we have a variety defined as an intersection of hypersurfaces fi = 0, and the tangent space at ξ of the variety is the intersection of the tangent spaces at the hypersurfaces that define it. 500 IX. Local rings, or just about In this same situation (discrete field as the basis), the zero ξ of the polynomial system is called a regular point or a non-singular point (of the affine scheme or yet again of the corresponding variety) when the dimension of the tangent space at ξ is equal to the dimension7 of the variety at the point ξ. A point that is not regular is called singular. We now give a more abstract interpretation of the tangent space, in terms of derivation spaces. This works with an arbitrary commutative ring k. For a k-algebra B and a character ξ : B → k we define a k-derivation at the point ξ of B as a k-linear form d : B → k which satisfies Leibniz’s rule, i.e. by letting f (ξ) for ξ(f ) d(f g) = f (ξ)d(g) + g(ξ)d(f ). This implies in particular d(1) = 0 (writing 1 = 1 × 1), and so d(α) = 0 for α ∈ k. We will denote by Derk (B, ξ) the k-module of the k-derivations of B at the point ξ. This notation is slightly abusive. Actually if we let k0 be the ring k provided with the B-module structure given by ξ, the notation of Definition VI -6.5 would be Derk (B, k0 ), and in fact equipped with the structure of a B-module. We will see that the tangent space at ξ of A and the k-module of the k-derivations of A at ξ are naturally isomorphic. 4.3. Proposition. (Tξ (A/k ), Derk (A, ξ), and (mξ /mξ 2 )? ) Let m = mξ and recall the notation Tξ (A/k ) = Ker J(ξ). 1. For u = (u1 , . . . , un ) ∈ kn , let Du : k[X] → k be the k-linear form defined by Pn Du (f ) = j=1 ∂j f (ξ) uj . It is a derivation at the point ξ, we have uj = Du (Xj ) = Du (Xj − ξj ), and the map u 7→ Du , kn → Derk (k[X], ξ) is a k-linear isomorphism. 2. If u ∈ Ker J(ξ) ⊆ kn , then Du passes to the quotient modulo hf1 , . . . , fs i and provides a k-derivation at the point ξ, ∆u : A → k. We have uj = ∆u (xj ) = ∆u (xj − ξj ), and the map u 7→ ∆u , Ker J(ξ) → Derk (A, ξ) is a k-linear isomorphism. 3. In addition, ∆u (m2 ) = 0 and we obtain, by restriction  to m and passage to the quotient modulo m2 , a k-linear form δu : m m2 → k. We thus  construct a k-linear map u 7→ δu of Ker J(ξ) in (m m2 )? . 7 If A is integral, this dimension does not depend on ξ and can be defined via a Noether position. In the general case, the Krull dimension of the ring Aξ must be considered. §4. Examples of local rings in algebraic geometry 501  4. Conversely, to δ ∈ (m m2 )? , we associate u ∈ kn defined by  uj = δ (xj − ξj ) mod m2 . Then, u belongs to Ker J(ξ). 5. The two maps defined in 3 and 4,  Ker J(ξ) → (m m2 )? and (m m2 )? → Ker J(ξ), are reciprocal k-linear isomorphisms. J 1. Simple verification left to the reader. 2. For any u ∈ kn , we easily verify that the set  f ∈ k[X] | Du (f ) = 0 and f (ξ) = 0 is an ideal of k[X]. If u ∈ Ker J(ξ), we have Du (fi ) = 0 by definition (and fi (ξ) = 0); we deduce that Du is null over hf1 , . . . , fs i. 3. To see that ∆u (m2 ) = 0, we use ∆u (f g) = f (ξ)∆u (g) + g(ξ)∆u (f ) and f (ξ) = g(ξ) = 0 for f , g ∈ m. Pn 4. The congruence (4) for f = fi is j=1 (xj − ξj )∂j fi (ξ) ∈ m2 . Applying Pn δ, this gives the equality j=1 uj ∂j fi (ξ) = 0, i.e. u ∈ Ker J(ξ).  5. Let δ ∈ (m m2 )? and u ∈ Ker J(ξ) be the corresponding element; it must be shown that δu = δ, which is the same as checking, for f ∈ m,  Pn δ(f mod m2 ) = j=1 ∂j f (ξ)δ (xj − ξj ) mod m2 , but this stems from (4). Conversely, let u ∈ Ker J(ξ) and v ∈ Ker J(ξ) be the element corresponding to δu ; it must be shown that v = u; which is the same as checking δu (xj −  ξj ) mod m2 = uj , an equality which has already been observed.  Remark. Note that the definition which we have given for the tangent space Tξ (A/k ), natural and intuitive, portrays it as a submodule of kn , where n is the number of generators of the finitely presented k-algebra A. Therefore, its more abstract definition Derk (A, ξ), or mξ /mξ 2 , which is more intrinsic, must be preferred since it only depends on the k-algebra A and on the character ξ : A → k, without taking into account the presentation chosen for A (actually only the structure of the localized algebra Aξ intervenes). Cotangent space at a zero Generally, we also have the dual notion of a cotangent space at ξ. We will define it here as the cokernel of the transposed matrix t J(ξ). Actually, it is a k-module which is intrinsically attached to the algebra A and to the character ξ, because it can also be defined formally as “the space of differentials at the point ξ.” We will not be developing this notion here. The fundamental theorem that follows implies that the tangent space is canonically isomorphic to the dual of the cotangent space (Fact II -6.3 2 502 IX. Local rings, or just about applied to tJ gives (Coker tJ)? ' Ker J since t( tJ) = J). However, when we work with an arbitrary ring k, the cotangent space is not necessarily isomorphic to the dual of the tangent space. When a B-module M admits a presentation matrix W over a generator set (y1 , . . . , yn ), if b is an ideal of B, by the base ring change πB,b : B → B/b , we obtain the B/b -module M /bM with the presentation matrix W mod b over the generator set (y1 , . . . , yn ). With the A-module M = mξ and the ideal b = mξ , we obtain for the presentation matrix of the k-module mξ /mξ 2 over (x1 − ξ1 , . . . , xn − ξn ), the matrix W = W mod mξ , with the matrix W given in Theorem IV -2.8. The latter matrix, up to null columns, is the matrix tJ(ξ). The theorem that follows states the same thing in a precise manner.  4.4. Theorem. (Cotangent space at ξ and mξ mξ 2 ) Let (ei )i∈J1..nK be the canonical basis of kn . Consider the k-linear map ϕ : kn  mξ /mξ 2 , ej 7→ (xj − ξj ) mod mξ 2 . ∼ Then, ϕ induces an isomorphism of k-modules Coker tJ(ξ) −→ mξ /mξ 2 . ∼ t Thus, we have a canonical isomorphism Coker J(ξ) −→ mξ Aξ /(mξ Aξ )2 . J Suppose without loss of generality that ξ = 0 and use the notations of Theorem IV -2.8. The presentation matrix of m0 for the generator set (x1 , . . . , xn ) is the matrix W = [ Rx | U ] with U (0) = tJ(0). As the matrix Rx mod m0 is null, we obtain the stated result. The last assertion is given by Lemma 3.1 3.  4.5. Definition. We define the cotangent space at ξ as being the kmodule mξ Aξ /(mξ Aξ )2 , for which only the structure of the local algebra at ξ intervenes. In the remainder of Section 4, we will study a few examples of local algebras at zeros of polynomial systems, without assuming that we necessarily have a discrete field to begin with; k is only a commutative ring. Here we only seek to illustrate the geometric situation by freeing ourselves, if possible, of the hypothesis “discrete field,” but without aiming to give the most general framework possible. Local ring at an isolated point The idea that drives this subsection comes from algebraic geometry where the local ring at ξ is zero-dimensional if and only if the point ξ is an isolated zero, and where the isolated zero is simple if and only if the tangent space is reduced to 0. §4. Examples of local rings in algebraic geometry 503 4.6. Theorem. (A simple isolated zero) In the context described at the beginning of Section 4, the following properties are equivalent. 1. The natural morphism k → Aξ is an isomorphism (in other words, the ideal mξ is null in Aξ ). In short, we write k = Aξ .  2. The matrix tJ(ξ) is surjective, i.e. 1 ∈ Dn J(ξ) . 3. The cotangent space at ξ is null, i.e. mξ = mξ 2 . 4. The ideal mξ is generated by an idempotent 1 − e of A. In this case the natural morphisms k → A[1/e] → Aξ are isomorphisms. 5. There exists a g ∈ A such that g(ξ) = 1 and A[1/g] = k. If in addition k is a discrete field (or a reduced zero-dimensional ring), we also have the equivalence with the following property. 6. The tangent space Tξ is null. Here is how we can describe that previous situation more intuitively: the local algebra at ξ is a “connected component of A” (i.e. the localization at ξ is the same as the localization at an idempotent e) “reduced to a simple point” (i.e. this k-algebra is isomorphic to k). In terms of algebraic varieties, item 5 means that there is a Zariski open set containing the point ξ in which the variety is reduced to this point. J 1 ⇔ 3. By the localized finite ring lemma 3.2 with n = 1. 2 ⇔ 3. By Theorem 4.4. 3 ⇔ 4. By the lemma of the finitely generated idempotent ideal II -4.6. We then obtain the desired isomorphisms by Fact II -4.2, and therefore item 5 with g = e. 5 ⇒ 1. The equality g(ξ) = 1 means that g ∈ 1 + mξ . Thus the ring Aξ is a localized ring of A[1/g] = k, and it is equal to k since Aξ = k ⊕ mξ Aξ . 3 ⇔ 6. (Discrete field case.) Since the tangent space is the dual of the cotangent, 3 always implies 6. Over a discrete field a matrix is surjective if and only if its transposed matrix is injective, this gives the equivalence of 3 and 6 (when considering the matrix J(ξ)).  Remark. The difference between the case s (number of equations) = n (number of indeterminates) and the case s > n is scarcely visible in the previous theorem, but it is important. If we tweak a system with s = n and if the base field is algebraically closed, a simple zero continues to exist, slightly tweaked. In the s > n case, a tweak generally makes the zero disappear. But this is another story, because the notion of such a tweak needs to be defined in algebra. For the discrete field case, here is a result in the same style as Theorem 4.6, but more general and more precise. This can also be seen as a local version 504 IX. Local rings, or just about of Stickelberger’s theorem (Theorems IV -8.16 and IV -8.17). Please note however that, unlike what takes place for Stickelberger’s theorem, the proof of Theorem 4.7 does not involve the Nullstellensatz or the Noether position. However, a change of variables à la Nagata intervenes in the call of Theorem VI -3.15 for the implication 7 ⇒ 8. 4.7. Theorem. (Isolated zero) Suppose that k is a discrete field. The following properties are equivalent. 1. The algebra Aξ is finite over k. 2. The algebra Aξ is integral over k. 3. The algebra Aξ is zero-dimensional. 4. The ideal mξ is nilpotent in Aξ . 5. There exists an r ∈ N such that mξ r = mξ r+1 . 6. There exists an r ∈ N such that the ideal mξ r is generated by an idempotent 1−e, the morphism A → Aξ is surjective, and A/h1 − ei ' Aξ ' A[1/e]. 7. There exists a g ∈ A such that g(ξ) = 1 and A[1/g] = Aξ . 8. There exists a g ∈ A such that g(ξ) = 1 and A[1/g] is local and zero-dimensional. 9. There exists an h ∈ A such that h(ξ) = 1 and A[1/h] is finite over k. In this case, Aξ is strictly finite over k, (Aξ )red = k, and if m = [Aξ : k], m for all ` ∈ Aξ , we have CAξ /k (`)(T ) = T − `(ξ) . J The localized finite ring lemma 3.2, applied with a = mξ , shows that 4 is equivalent to 5 and implies 1. 3 ⇒ 4. By the localized zero-dimensional ring lemma 3.3. We have 1 ⇒ 2, and since k is a discrete field, 2 ⇒ 3. Thus items 1 to 5 are equivalent. Item 5 implies that mrξ is idempotent. Therefore 5 ⇒ 6 by the finitely generated idempotent ideal lemma II -4.6 and Fact II -4.2. Note that e ∈ 1 + mrξ ⊆ 1 + mξ , so e(ξ) = 1. Therefore 6 implies 7 with g = e. 7 ⇒ 8. The algebra A[1/g] = Aξ is local and finitely generated, and the result follows by Theorem VI -3.15. 8 ⇒ 9. Take h = g. 9 ⇒ 1. Because Aξ is a localized ring of A[1/h]. In this case Aξ is strictly finite over k because it is a finite and finitely presented algebra (Theorem VI -3.17). Finally, the equality CAξ /k (`)(T ) = (T − `(ξ))m comes from the fact that ` − `(ξ) is in m, so is nilpotent in Aξ , therefore it admits T m as a characteristic polynomial.  §4. Examples of local rings in algebraic geometry 505 4.8. Definition. (Isolated zero of a polynomial system over a ring) 1. The zero ξ of the system is a simple isolated zero (or simple zero) if Aξ = k. 2. The zero ξ of the system is an isolated zero if Aξ is finite over k. 3. If in addition k is a discrete field, the dimension of Aξ as a k-vector space is called the multiplicity of the isolated zero ξ. Remark. Item 1 is an abbreviation by which we mean precisely that the canonical homomorphisms k → Aξ → k are isomorphisms. In item 3 we see that over a discrete field, an isolated zero is simple if and only if it is of multiplicity 1. Local ring at a non-singular point of a complete intersection curve We always consider the context defined at the beginning of Section 4, and we assume s = n − 1. In other words we now have a system of n − 1 polynomial equations with n unknowns and we expect the corresponding variety to be “a curve.” We will see that if the zero ξ of the curve is non-singular in the intuitive sense that the cotangent space at the point ξ is a projective k-module of rank 1, then the “local” situation matches our expectation, i.e. matches what the non-singular points of the curves in differential geometry have accustomed us to. 4.9. Theorem. (The ideal of a non-singular point of a locally complete intersection curve) When s = n − 1 the following properties are equivalent. 1. The point ξ is non-singular in the sense that J(ξ) is a matrix of rank n − 1 over k. 2. The cotangent space at ξ, mξ /mξ 2 , is a projective k-module of rank 1. 3. The ideal mξ is a projective A-module of rank 1. 4. The ideal mξ Aξ is a projective Aξ -module of rank 1. 5. The ideal mξ Aξ is a free Aξ -module of rank 1. 6. The cotangent space at ξ, mξ /mξ 2 , is a free k-module of rank 1. J Recall that for a ring B, a B-module M and an ideal b of B we obtain by scalar extension B/b ⊗B M ' M /bM . In particular, if c is an ideal of B we obtain (B/b ) ⊗B c ' c/bc . But the natural surjective B-linear map b ⊗ c → bc is not always an isomorphism (it is the case if one of the two ideals is flat). 1 ⇔ 2. Indeed, tJ(ξ) is a presentation matrix of the cotangent space. 3 ⇒ 4. Indeed, the Aξ -module mξ Aξ is obtained from the A-module mξ by scalar extension from A to Aξ . 506 IX. Local rings, or just about 4 ⇒ 2 and 5 ⇒ 6. Indeed, the k-module mξ /mξ 2 ' mξ Aξ /(mξ Aξ )2 is obtained from the Aξ -module mξ Aξ by scalar extension from Aξ to k ' Aξ /mξ Aξ (see the first sentence of this proof). 2 ⇔ 3. This results from the consideration of the presentation matrix of mξ as an A-module given to Theorem IV -2.8 and to Lemma IV -2.1. To simplify the presentation let us treat the case n = 4 with ξ = 0. We have four variables Xi and three polynomials f1 (X) = X1 a1 (X) + X2 a2 (X) + X3 a3 (X) + X4 a4 (X), f2 (X) = X1 b1 (X) + X2 b2 (X) + X3 b3 (X) + X4 b4 (X), f3 (X) = X1 c1 (X) + X2 c2 (X) + X3 c3 (X) + X4 c4 (X). A presentation matrix of m0 over (x1 , x2 , x3 , x4 ) is   x2 x3 0 x4 0 0 a1 (x) b1 (x) c1 (x)  −x1 0 x3 0 x4 0 a2 (x) b2 (x) c2 (x)  , W (x) =   0 −x1 −x2 0 0 x4 a3 (x) b3 (x) c3 (x)  0 0 0 −x1 −x2 x3 a4 (x) b4 (x) c4 (x) or yet again W (x) = [ Rx | U (x) ] with   a1 (x) b1 (x) c1 (x)  a2 (x) b2 (x) c2 (x)  t  U (x) =   a3 (x) b3 (x) c3 (x)  and J(0) = U (0). a4 (x) b4 (x) c4 (x) We want to show that W (x) (presentation matrix of the A-module m0 ) and W (0) (presentation matrix of the k-module m0 /m0 2 ) are simultaneously of rank n − 1 = 3.  Refer to Lemma IV -2.1. Item 3 gives the equality D4 W (x) = 0 (be cause D4 U (x) = 0), and since U (0) = U (x) mod m0 , item 2 gives the equivalence    1 ∈ DA,3 W (x) ⇐⇒ 1 ∈ Dk,3 U (0) ⇐⇒ 1 ∈ Dk,3 W (0) . 1 ⇒ 5. We reuse the previous notations with n = 4 and ξ = 0. Since the matrix tJ(0) = U (0) is of rank n − 1, there exist λ1 , . . . , λ4 ∈ k such that   a1 (x) b1 (x) c1 (x) λ1  a2 (x) b2 (x) c2 (x) λ2    det V (0) = 1, where V (x) =   a3 (x) b3 (x) c3 (x) λ3  . a4 (x) b4 (x) c4 (x) λ4  We deduce that det V (x) ∈ 1 + mξ , and so V (x) ∈ GL4 (Aξ ). However, P [ x1 x2 x3 x4 ] V = [ 0 0 0 y ] with y = i λi xi . This shows that hx1 , x2 , x3 , x4 i = hyi in Aξ . Finally, y is regular since the module mξ is of rank 1.  We will denote by M ⊗B r the rth tensor power of the B-module M . §4. Examples of local rings in algebraic geometry 507 4.10. Theorem. Suppose the equivalent properties of Theorem 4.9 satisfied, denote by Ω the cotangent space mξ /mξ 2 and consider an element p of mξ that is a k-basis of Ω. 1. For each r > 0, the natural k-linear map Ω⊗k r → mξ r /mξ r+1 is an isomorphism. L In other terms, the graded k-algebra r∈N mξ r /mξ r+1 associated with the pair (A, mξ ) is (naturally) isomorphic to the symmetric algebra Sk (Ω) of the k-module Ω, itself isomorphic to k[X] because Ω is free of rank 1. 2. If k is a nontrivial discrete field, Aξ is a discrete valuation ring (DVR) in the following sense: every nonzero element of Aξ is uniquely expressed in the form up` for some ` > 0 and u ∈ A× . J Let m = mξ . Also notice that for some projective k-module of rank 1, the symmetric algebra is equal to the tensor algebra. ∼ 1. We have a natural isomorphism m⊗A r −→ mr because m is flat. By the scalar extension A → A/m = k, the A-modules m and mr give the k-modules m/m2 and mr /mmr = mr /mr+1 . Since the scalar extension commutes with the tensor product, we deduce ⊗ r that the natural homomorphism m/m2 k → mr /mr+1 is an isomorphism of k-modules. Since the k-module m/m2 admits the k-basis p mod m2 , the k-module mr /mr+1 admits the basis pr mod mr+1 . Hence an isomorphism of kalgebras L ∼ r r+1 k[X] −→ = Sk (Ω), r∈N mξ /mξ given by X 7→ p. In practice, given the filtration mr ⊂ · · · ⊂ m2 ⊂ m ⊂ A, every quotient of which is a free k-module of rank 1, the quotient A/mr admits as its k-basis (1, p . . . , pr−1 ), with for ` < r the k-submodule m` /mr which admits the basis (p` , . . . , pr−1 ). 2. By Fact 4.2 2 we obtain the result thanks to the following computation: if x ∈ Aξ is nonzero, it is nonzero in some Aξ /mr . Given the previous filtration there exists a minimum ` such that x ∈ m` . If x ≡ ap` mod m`+1 with a ∈ k× , we write x = p` (a + vp) with v ∈ A and u = a + vp is invertible in Aξ .  Example: The monomial curve t 7→ (x1 = t4 , x2 = t5 , x3 = t6 ). For setwise coprime n1 , n2 , n3 ∈ N∗ we define the monomial curve (x1 = tn1 , x2 = tn2 , x3 = tn3 ), immersed in the affine space of dimension 3. By definition, the ideal of this parameterized curve is, for a ring k, the kernel of the morphism k[X1 , X2 , X3 ] → k[T ] defined by Xi 7→ T ni . We can show that this ideal is always defined over Z and generated by three 508 IX. Local rings, or just about generators. Here we have chosen (see the comment at the end) the special case where (n1 , n2 , n3 ) = (4, 5, 6), a case for which two relators suffice: x31 = x23 and x22 = x1 x3 . (Left as an exercise for the reader.) Let  A = k[x1 , x2 , x3 ] = k[X1 , X2 , X3 ] X13 − X32 , X22 − X1 X3 be the ring of the curve. For t0 ∈ k, we consider the point (ξ) = (ξ1 , ξ2 , ξ3 ) = (t40 , t50 , t60 ), with its ideal m = hx1 − ξ1 , x2 − ξ2 , x3 − ξ3 iA . The condition for the point ξ to be non-singular, in the sense that the Jacobian matrix J evaluated at ξ 12 13 is of rank 2, is given by t0 ∈ k× , because D2 (J) = 4t11 0 , 5t0 , 6t0 . From now on suppose that t0 ∈ k× . A presentation matrix of m for the generator set (x1 − ξ1 , x2 − ξ2 , x3 − ξ3 ) is given by   x2 − ξ2 x3 − ξ3 0 x21 + ξ1 x1 + ξ12 −x3 0 x3 − ξ3 0 x2 + ξ2  . W =  −x1 + ξ1 0 −x1 + ξ1 −x2 + ξ2 −x3 − ξ3 −ξ1 We know that it is of rank 2. We observe that W2 , W3 ∈ hW1 , W5 i. We therefore obtain a new, simpler presentation matrix V with only the columns W1 , W4 , W5 . Recall on the one hand that for B ∈ An×m , we have (An / Im B)? ' Ker tB (Fact II -6.3); and on the other hand (Exercise e is a direct X-11) that for a matrix A ∈ Mn (A) of rank n − 1, Ker A = Im A n t summand in A . By applying this to B = V and A = V , we obtain m? ' (A3 / Im V )? ' Ker tV = Im t Ve with Im t Ve a direct summand in A3 . We thus explicitly produce the A-module m? of constant rank 1 as a direct summand in A3 . Comment. Generally a submonoid M of (N, +, 0) has a finite complement G if and only if it is generated by a setwise coprime list of integers (for example with the above monomial curve we define M = n1 N + n2 N + n3 N generated by {n1 , n2 , n3 }). We say that the integers of G are the holes of the monoid M . Their number g := #G is called the genus of M . We always have [ 2g, ∞ [ ⊆ M . The monoids M for which 2g − 1 ∈ G are said to be symmetric. This terminology accounts for the fact that, in this case, the interval J0..2g − 1K contains as many holes as non-holes, and that they are interchanged by the symmetry x 7→ (2g − 1) − x. For example, for coprime a and b, the monoid aN + bN is symmetric of genus g = (a−1)(b−1) . We know how to characterize the monoids n1 N + n2 N + n3 N 2 that are symmetric combinatorially. We prove that this is the case if and only if the ideal of the curve (x1 = tn1 , x2 = tn2 , x3 = tn3 ) is generated by 2 elements. For example 4N + 5N + 6N is symmetric, of genus 4, and its holes are {1, 2, 3, 7}. §5. Decomposable rings 509 5. Decomposable rings The rings which are isomorphic to finite products of local rings play an important role in the classical theory of Henselian local rings (for example in [Raynaud] or [Lafon & Marot]). Such rings are called decomposed rings and a local ring is said to be Henselian (in classical mathematics) if every finite extension is a decomposed ring. In this section we give an introductory fragment of the constructive approach for the notion of a decomposed ring. In fact, since we would like to avoid the factorization problems, we will introduce the notion, constructively more pertinent, of a decomposable ring. Everything begins with this simple but important remark: in a commutative ring the idempotents are always “isolated.” 5.1. Lemma. In a commutative ring A two idempotents equal modulo Rad A are equal. J We show that the homomorphism B(A) → B(A/Rad A) is injective. If an idempotent e is in Rad A, 1 − e is idempotent and invertible, therefore equal to 1.  Remark. This does not hold at all in a noncommutative context; the idempotents of a ring of square matrices Mn (A) are the projection matrices; over a field we obtain, for instance by fixing the rank to 1, a connected variety of dimension > 0 without any isolated points (if n > 2). Decomposable elements 5.2. Definition. Let A be a ring and a ∈ A. The element a is said to be decomposable8 if there exists an idempotent e such that  a mod h1 − ei is invertible in A/h1 − ei and a mod hei ∈ Rad(A/hei). Recall when underlining the analogies that an element a has a quasi-inverse if and only if there exists an idempotent e such that  a mod h1 − ei is invertible in A/h1 − ei and a mod hei = 0 in A/hei , and that an element a has as its annihilator an idempotent if and only if there exists an idempotent e such that  a mod h1 − ei is regular in A/h1 − ei and a mod hei = 0 in A/hei . 8 Some caution must be exercised here regarding this terminology as it comes into conflict with the notion of an indecomposable idempotent insofar as every idempotent is a decomposable element of the ring. 510 IX. Local rings, or just about 5.3. Proposition. An element a of A is decomposable if and only if there exists a b such that 1. b(1 − ab) = 0, 2. a(1 − ab) ∈ Rad A. In addition, the element b satisfying these conditions is unique, and ab = e is the unique idempotent of A satisfying hai = hei mod Rad A. J Suppose a is decomposable. Then, in the product A = A1 × A2 , with A1 = A/h1 − ei and A2 = A/hei, we have e = (1, 0), a = (a1 , a2 ), −1 with a1 ∈ A× 1 and a2 ∈ Rad(A2 ). We let b = (a1 , 0), and we indeed get b(1 − ab) = (b, 0) − (b, 0)(1, 0) = 0A and a(1 − ab) = (0, a2 ) ∈ Rad A. Suppose that an element b satisfies  b(1 − ab) = 0 and a(1 − ab) ∈ Rad A. Then, the element ab = e is an idempotent and a is invertible modulo 1 − e. Moreover, modulo e we have a = a(1 − e) which is in Rad A, so a mod e is in Rad(A/hei). Let us take a look at the uniqueness. If b(1 − ab) = 0 and a(1 − ab) ∈ Rad A, then e = ab is an idempotent such that hai = hei mod Rad A. This characterizes it as an idempotent of A/Rad A , so as an  idempotent of A. The equalities be = b and ba = e imply that b + (1 − e) ae + (1 − e) = 1. The element b + (1 − e) is therefore uniquely determined as the inverse of ae + (1 − e). Consequently, the element b is itself uniquely determined.  5.4. Definition. We say that the ring A is decomposable if every element is decomposable. 5.5. Fact. 1. A product of rings is decomposable if and only if each of the factors is decomposable. 2. A zero-dimensional ring is decomposable. A residually discrete local ring is decomposable. A connected decomposable ring is local and residually discrete. 3. The structure of a decomposable ring is purely equational (it can be defined by means of composition laws subjected to universal axioms). J 3. We add to the laws of commutative rings two laws a 7→ b and (a, x) 7→ y,  with the axioms b = b a and 1 + x(a2 b − a) y = 1. Hence a2 b − a ∈ Rad A. 1. Results from item 3.   ] Remark. If we let b = a] , then (a] )] = b] = a2 b and (a] )] = a] . In addition, (a] )] and a] are quasi-inverses of one another. 2 §6. Local-global rings 511 Lifting idempotents 5.6. Definition. Let A be a ring. 1. We say that the ring A lifts the idempotents if the natural homomorphism B(A) → B(A/Rad A) is bijective, in other words if every idempotent of the quotient A/Rad A is lifted at an idempotent of A. 2. We say that the ring A is decomposed if it is decomposable and if B(A) is bounded. 5.7. Proposition. The following properties are equivalent. 1. A is residually zero-dimensional and lifts the idempotents. 2. A is decomposable. J 1 ⇒ 2. Since A/Rad A is reduced zero-dimensional, there exists an idempotent e of A/Rad A such that hai = hei mod Rad A. This idempotent is lifted at an idempotent of A, that we continue to call e. The element a + (1 − e) is invertible in A/Rad A , so in A. Therefore, a is invertible in A/h1 − ei. Finally, since hai = hei mod Rad A, we obtain a ∈ Rad(A/hei). 2 ⇒ 1. Let π : A → A/Rad A be the canonical projection. Every element a of A satisfies hπ(a)i = hπ(e)i for an idempotent e of A. The quotient is therefore zero-dimensional. Let us show that A lifts the idempotents. If π(a) is idempotent and if e is the idempotent such that hπ(a)i = hπ(e)i, then π(a) = π(e).  Comment. It is now easy to see that in classical mathematics a ring is decomposed if and only if it is isomorphic to a finite product of local rings. 6. Local-global rings In this section we introduce a notion which generalizes both that of a local ring and that of a zero-dimensional ring. This sheds light on a number of facts that are common to both these classes of rings, such as, for instance, the fact that finitely generated projective modules are quasi-free. Definitions and the concrete local-global principle 6.1. Definition. 1. We say that a polynomial f ∈ A[X1 , . . . , Xn ] represents (in A) the element a ∈ A if there exists an x ∈ An such that f (x) = a. 2. We say that a polynomial f ∈ A[X1 , . . . , Xn ] is primitive by values if the values of f generate the ideal h1i (the variables being evaluated in A). 512 IX. Local rings, or just about 3. A ring A is said to be local-global if every primitive polynomial by values represents an inverse. Remark. Every primitive polynomial by values is primitive, therefore if a ring has the property that every primitive polynomial represents an inverse, it is a local-global ring. This corresponds to a definition in the literature (strongly U-irreducible ring) which has preceded that of local-global ring. 6.2. Fact. 1. A ring A is local-global if and only if A/Rad(A) is local-global. 2. A finite product of rings is local-global if and only if each of the rings is local-global. 3. A local ring is local-global. 4. A residually zero-dimensional ring is local-global. 5. A quotient of a local-global ring (resp. residually zero-dimensional) is local-global (resp. residually zero-dimensional). 6. Let A be a non-decreasing filtering union ring of subrings Ai , i.e. for all i, j, there exists a k such that Ai ∪ Aj ⊆ Ak . Then, if each Ai is local-global, so is A. J We leave the first three items as an exercise. 4. Given item 1, it suffices to treat the case of a reduced zero-dimensional ring. This case reduces to the (obvious) case of a discrete field by the elementary local-global machinery no. 2. 5. Let us consider the local-global case (the other case is obvious). Let A be a local-global ring, a be an ideal and f ∈ A[X] be a primitive polynomial by values in A/a . Therefore there are some values p1 , . . . , pm of f and some a ∈ a such that hp1 , . . . , pm , ai = h1i. The polynomial g(X, T ) = T f (X) + (1 − T )a is therefore primitive by values. Since A is local-global, there is a value tf (x) + (1 − t)a of g which is invertible. The value f (x) is thus invertible modulo a. 6. Let P ∈ A[X1 , . . . , Xn ] be primitive by values: 1 = uP (x) + vP (y) + . . .. By considering u, x, v, y, . . . and the coefficients of P , we see that there is a subring Ai such that P ∈ Ai [X] and such that P is primitive by values over Ai . Thus, P represents an inverse over Ai , a fortiori over A.  For a polynomial the properties of representing an inverse or of being primitive by values are of finite character, as indicated in the following lemma. §6. Local-global rings 6.3. Lemma. polynomial. 513 Let S be a monoid of A and f ∈ A[X1 , . . . , Xm ] be a 1. The polynomial f represents an inverse in AS if and only if there exists an s ∈ S such that f represents an inverse in As . 2. The polynomial f is primitive by values in AS if and only if there exists an s ∈ S such that f is primitive by values in As . J We only prove item 1. Let F (X, T ) ∈ A[X, T ] be the homogenization of f (X) at a large enough degree. The hypothesis is equivalent to the existence of x ∈ Am and t, u ∈ S such that F (x, t) divides u in A. Letting s = tu, the elements t and F (x, t) are invertible in As so f represents an inverse in As .  6.4. Lemma. Let s ∈ A and b be an ideal of A with 1 ∈ hsi + b. 1. If f represents an inverse in As there exists a z ∈ Am such that 1 ∈ hf (z)i + b. 2. If f is primitive by values in As there exists a finite number of elements z j , (j ∈ J1..kK), in Am such that 1 ∈ f (z j ) | j ∈ J1..kK + b. J 1. Let F (X, T ) ∈ A[X, T ] be the homogenization of f (X) at large enough degree d. The hypothesis is that F (x, t) divides u in A for some x ∈ Am and t, u ∈ sN . There exists an a such that ta ≡ 1 mod b so ad F (x, t) = F (ax, at) ≡ F (ax, 1) = f (ax) mod b, hence ad u ∈ hf (z)i + b with z = ax. But 1 ∈ ad u + b therefore 1 ∈ hf (z)i + b. We can present the same argument “without computation” as follows. We have As /(bAs ) ' (A/b )s . Since 1 ∈ hsi + b, s is invertible in A/b , and so As /(bAs ) ' A/b . Since f represents an inverse in As , a fortiori it represents an inverse in As /(bAs ) ' A/b , i.e. f represents an inverse modulo b. 2. Similar to Item 1.  We will use in the remainder a slightly more subtle concrete local-global principle that we state in the form of a lemma. See also Exercise 15. 6.5. Lemma. Let S1 , . . ., Sn be comaximal monoids of A and f ∈ A[X1 , . . . , Xm ] be a polynomial. The following properties are equivalent. 1. The polynomial f is primitive by values. 2. In each of the rings ASi , the polynomial f is primitive by values. 3.∗ For every maximal ideal m of A, f represents an inverse in A/m . 514 IX. Local rings, or just about In particular, if f represents an inverse in each localized ring ASi , f is primitive by values. J The implications 1 ⇒ 2 ⇒ 3∗ are immediate. The implication 3∗ ⇒ 1 is easy in classical mathematics. Here is a direct and constructive proof of 2 ⇒ 1. It is a matter of decrypting the classical proof of 3.∗ ⇒ 1, by using the method that will be explained in Section XV -6. To simplify the notations but without loss of generality, we will prove the special case where f represents an inverse in each localized ring ASi . We therefore dispose of comaximal elements (s1 , . . . , sn ) such that in each localized ring Asi , the polynomial f represents an inverse (Lemma 6.3). By applying Lemma 6.4 we successively obtain, for k = 0, . . . , n, 1 ∈ f (z1 ), . . . , f (zk ), sk+1 , . . . , sn . After n steps: 1 ∈ f (z1 ), . . . , f (zn ) .  6.6. Proposition. The following properties are equivalent. 1. The ring A is local-global. 2. For every polynomial f ∈ A[X1 , . . . , Xn ], if there exists a system of comaximal elements (s1 , . . . , sk ) such that f represents an inverse in each Asi , then f represents an inverse. 3. For every polynomial f ∈ A[X1 , . . . , Xn ], if there exist comaximal monoids Si such that f is primitive by values in each ASi , then f represents an inverse. J Given Lemmas 6.3 and 6.5, it suffices to show that if f is primitive by values there exist comaximal elements such that f represents an inverse in each localized ring. To simplify the notation, we will write everything using a single variable. We obtain x1 , . . . , xr ∈ A such that 1 ∈ hf (x1 ), . . . , f (xr )i. Let si = f (xi ), then the polynomial f represents an inverse in Asi .  By the Gauss-Joyal lemma (II -2.6) the primitive polynomials form a filter U ⊆ A[X]. We call the ring A(X) = U −1 A[X] the Nagata ring. 6.7. Fact. We use the above notation. 1. A(X) is faithfully flat over A. 2. A(X) is a local-global ring. J 1. It is clear that A(X) is flat over A (it is a localization of A[X], which is free with a discrete basis). We then use the characterization 3a in Theorem VIII -6.1. Let a = ha1 , . . . , an i be a finitely generated ideal of A such that 1 ∈ aA(X). We must show that 1 ∈ a.PThe hypothesis gives f1 , . . . , fn ∈ A[X] such that the polynomial f = i ai fi is primitive, i.e. 1 ∈ cA (f ). However, the ideal cA (f ) is contained in a. §6. Local-global rings 515 2. We proceed in three steps. a) Let us first show that every primitive polynomial P (T ) ∈ B[T ] where P B := A(X) represents an invertible element. Indeed, let P (T ) = i Qi T i be such a polynomial. We can suppose without loss of generality that P the Qi ’s are in A[X]. We have polynomials Bi such that i Bi (X)Qi (X) is primitive. A fortiori the coefficients of the Qj ’s are comaximal.  Then, for k > supi degX (Qi ) , since P (X k ) has for coefficients all the coefficients of the Qj ’s (Kronecker’s trick), it is a primitive polynomial of A[X], i.e. an invertible element of B. b) Let us show the same property for an arbitrary number of variables. Consider a primitive polynomial Q(Y1 , . . . , Ym ) ∈ B[Y ]. By Kronecker’s j trick, by letting Yj = T n with large enough n, we obtain a polynomial P (T ) whose coefficients are those of Q, which brings us back to the previous case. c) Finally, consider a primitive polynomial by values Q with m variables over B. Then, Q is primitive and we can apply item b).  Remarkable local-global properties 6.8. Concrete local-global principle. monoids of a local-global ring A. Let S1 , . . ., Sr be comaximal 1. If two matrices of Am×n are equivalent over each of the ASi , then they are equivalent. 2. If two matrices of Mn (A) are similar over each of the ASi , then they are similar. J 1. Let F and G be the matrices, then by hypothesis there exists some system of comaximal elements (s1 , . . . , sr ) and matrices U1 , . . . , Ur , V1 , . . . , Vr such that for each i we have Ui F = GVi and det(Ui ) det(Vi ) = si . Let us introduce indeterminates (x1 , . . . , xr ) = (x), and consider the matrices U = U (x) = x1 U1 + · · · + xr Ur and V = V (x) = x1 V1 + · · · + xr Vr . We have U F = GV, and det(U ) det(V ) is a polynomial in the xi ’s that satisfy the hypotheses of Definition 6.1; it suffices to evaluate (x1 , . . . , xr ) successively at (1, 0, . . . , 0), . . . , (0, . . . , 0, 1). Therefore there exists some   α ∈ Ar such that the element det U (α) det V (α) is invertible. 2. The same proof, with Ui = Vi and U = V , works. We have the following corollary.  516 IX. Local rings, or just about 6.9. Concrete local-global principle. Let S1 , . . ., Sr be comaximal monoids of a local-global ring A. 1. If two finitely presented modules are isomorphic over each of the ASi ’s, then they are isomorphic. 2. Every finitely generated projective module is quasi-free. J 1. We consider presentation matrices and characterize the fact that the modules are isomorphic by the equivalence of associated matrices (Lemma IV -1.1). We then apply item 1 of the local-global principle 6.8. 2. We apply item 1. Consider a quasi-free module that has the same Fitting ideals, we know that the two modules become free after localization at comaximal elements (and the rank is the same each time because they have the same Fitting ideals).  Let us also mention the following principles. 6.10. Concrete local-global principle. Let A be a local-global ring. 1. Let S1 , . . ., Sr be comaximal monoids, M be a finitely presented module and N a finitely generated module. If N is a quotient of M over each of the ASi ’s, then N is a quotient of M . 2. A module locally generated by m elements is generated by m elements. J It suffices to prove item 1 because a module is generated by m elements if and only if it is a quotient of a free module of rank m. We will continue the proof after the next two lemmas.  6.11. Lemma. Let M be a finitely presented A-module, N be a finitely generated A-module, S be a monoid of A and ϕ : MS → NS be a surjective A-linear map. 1. There exist s ∈ S and ψ ∈ LA (M, N ) such that sϕ =AS ψS . 2. There exists a v ∈ S such that vN ⊆ ψ(M ). 3. There exists a matrix Q of syzygies satisfied by the generators of N such that, when considering the module N 0 admitting Q as a presentation matrix, the map ψ is decomposed as follows θ π M −→ N 0 −→ N, (π is the canonical projection), with in particular vN 0 ⊆ θ(M ) (a fortiori θS is surjective). J Item 1 is a reformulation of Proposition V -9.3 (which affirms only slightly more, in a more general case). Item 2 easily stems from it. 3. We have N = Ay1 + · · · + Ayn , and M = Ax1 + · · · + Axm , with a presentation matrix P . For the factorization by θ to exist, it suffices that among the columns of the matrix Q we find the sygygies which are “images of the columns of P by ψ” (they are syzygies between the yk ’s once we have expressed the ψ(xj )’s in §6. Local-global rings 517 terms of the yk ’s). For vN 0 ⊆ θ(M ) to hold, it suffices that among the columns of the matrix Q we find the syzygies expressing that the vyk ’s are in Aψ(x1 ) + · · · + Aψ(xm ) (once we have expressed the ψ(xj )’s in terms of the yk ’s).  6.12. Lemma. The concrete local-global principle 6.10 is correct if N is itself a finitely presented module. J The hypothesis gives a surjective linear map ϕi : MSi → NSi . By items 1 and 2 of Lemma 6.11 we have si , vi ∈ Si and a linear map ψi : M → N such that si ϕi = (ψi )Si and vi N ⊆ ψi (M ). Each linear map ψi is represented by two matrices Ki and Gi which make the suitable diagrams commute (see Section IV -3). P / m πM / / Ap A M Ki  Aq ψi Gi Q  / An πN  //N Consider r unknowns P ai in A and the P map ψ = the matrices K = ai Ki and G = ai Gi . Ap P K  Aq / Am πM Q ai ψi corresponding to //M ψ G  / An P πN  //N The fact that ψ is surjective means that the matrix H = G Q is surjective, i.e. Dn (H) = h1i. We therefore introduce the indeterminates c` to construct an arbitrary linear combination P of the maximal minors δ` of the matrix H. This linear combination ` c` δ` is a polynomial in the ai ’s and c` ’s. By hypothesis, this polynomial represents 1 over each of   the A s 1v , thus, since the ring is local-global, it represents an inverse i i (Proposition 6.6).  End of the proof of the concrete local-global principle 6.10. We have N = Ay1 +· · ·+Ayn , and M = Ax1 +· · ·+Axm , with a presentation matrix P . For each i ∈ J1..rK we apply Lemma 6.11 with the monoid Si and the surjective linear map ϕi : MSi → NSi given in the hypothesis. We obtain a linear map ψi : M → N , a matrix Qi of syzygies satisfied by the yk ’s, a linear map θi : M → Ni0 (where Ni0 is the finitely presented module corresponding to Qi ), elements si , vi ∈ Si with si ϕi = (ψi )Si , and finally ψi factorizes through θi : M → Ni0 with vi Ni0 ⊆ θi (M ). We then consider the finitely presented module N 0 corresponding to the matrix of syzygies Q obtained by juxtaposing the matrices Qi , such that N 0 is a quotient of each Ni0 . 518 IX. Local rings, or just about As N is a quotient of N 0 , we have brought the problem back to the case where N is itself finitely presented, a case that has been treated in Lemma 6.12.  Congruential systems An important stability property of local-global rings is stability by integral extension. 6.13. Theorem. Let A ⊆ B with B integral over A. If A is local-global, then so is B. The proof is left until page 520, after a detour via congruential rings. 6.14. Definition. A subset C of a ring A is called a congruential system if it satisfies the following property: if s1 + s2 = 1 in A and if c1 , c2 ∈ C, then there exists a c ∈ C such that c ≡ c1 mod s1 and c ≡ c2 mod s2 . Remarks. 1) It amounts to the same thing to say: if a1 and a2 are two comaximal ideals of A and if c1 , c2 ∈ C, then there exists a c ∈ C such that c ≡ c1 mod a1 and c ≡ c2 mod a2 . 2) The element c0 = c2 s1 + c1 s2 is the natural candidate for c ∈ A satisfying the congruences c ≡ c1 mod s1 and c ≡ c2 mod s2 . We therefore must have some element c of C such that c ≡ c0 mod s1 s2 . Example. Let (b) = (b1 , . . . , bn ) be a sequence in a ring B. The Suslin set of (b1 , . . . , bn ) is the following subset of B: Suslin(b) = { u1 b1 + · · · + un bn | (u1 , . . . , un ) is En (B)-completable } , ((u1 , . . . , un ) is the first row of a matrix of En (B)). If one of the ui ’s is invertible, then u1 b1 + u2 b2 + · · · + un bn ∈ Suslin(b) and we therefore have {b1 , . . . , bn } ⊆ Suslin(b1 , . . . , bn ) ⊆ hb1 , . . . , bn i. Let us show that the set Suslin(b) is always congruential. Indeed, for E, F ∈ En (B) and two comaximal elements s, t of B, there exists a G ∈ En (B) satisfying G ≡ E mod s and G ≡ F mod t. Let f , g1 , . . . , gn ∈ A[X] with f monic, and B = A[X]/hf i. Then the Suslin set of (g1 , . . . , gn ) plays an important role in the study of the unimodular polynomial vectors (cf. Lemma XV -6.1). 6.15. Fact. For every polynomial P ∈ A[X1 , . . . , Xn ] the set VP of values of P is a congruential system (VP = { P (x) | x ∈ An }). J Let s, t be two comaximal elements and x, y be in An . The Chinese remainder theorem gives us some z ∈ An such that z ≡ x mod s and z ≡ y mod t. Then, we have P (z) ≡ P (x) mod s and P (z) ≡ P (y) mod t. §6. Local-global rings 519 6.16. Fact. Let C be a congruential system. If a1 , . . . , a` are pairwise comaximal ideals and if c1 , . . . , c` ∈ C, then there exists a c ∈ C such that c ≡ cj mod aj for j ∈ J1..`K. J This is the usual proof of the Chinese remainder theorem, adapted to the current situation. We proceed by induction on ` > 2. The base case is by definition. If ` > 2 we consider the pairwise comaximal ideals a1 , . . . , a`−2 and a`−1 a` . Let e ∈ C such that e ≡ c`−1 mod a`−1 and e ≡ c` mod a` . By induction hypothesis, we find c in C such that c ≡ ck mod ak for k ∈ J1..` − 2K and c ≡ e mod a`−1 a` . A fortiori, c ≡ c`−1 mod a`−1 and c ≡ c` mod a` .  6.17. Fact. Let C be a congruential system, w1 , . . . , wn be elements of C and (e1 , . . . , en ) be a fundamental system of orthogonal idempotents. Then, the element w = e1 w1 + · · · + en wn is in C. J We have w ≡ wi mod 1−ei , and the h1 − ei i’s are pairwise comaximal, but w is the unique element satisfying these congruences since It remains to apply the previous fact. T i h1 − ei i = h0i.  6.18. Definition. A ring A is said to be congruential if every congruential system that generates the ideal h1i contains an invertible element. 6.19. Lemma. 1. Let a ⊆ Rad A. Then, the ring A is congruential if and only if the ring A/a is congruential. 2. Every residually zero-dimensional ring is congruential. 3. Every congruential ring is local-global. J 1. We use the fact that elements are comaximal (resp. invertible) in A if and only if they are comaximal (resp. invertible) in A/a . 2. Let us suppose that A is residually zero-dimensional. It suffices to show that A/Rad A is congruential. Let W be a congruential system of A/Rad A such that hW i = h1i. Let w1 , . . . , wn ∈ W with hw1 , . . . , wn i = h1i. There exists a fundamental system of orthogonal idempotents (e1 , . . . , en ) such that we have he1 w1 + · · · + en wn i = h1i (Lemma IV -8.5 item 5 ). We conclude with Fact 6.17 that W contains the invertible element e1 w1 + · · · + en wn . 3. Let us suppose that A is congruential and let P be a primitive polynomial by values. Since the values of P form a congruential system, a value of P is invertible.  520 IX. Local rings, or just about Stability by integral extension As an immediate corollary of Lemma 6.19 we have the following result. 6.20. Corollary. Let B be a strictly finite algebra over a discrete field A and W be a congruential system in B such that hW i = h1iB . Then, the set NB/A (W ) contains an invertible element. J We know that B is zero-dimensional, so it is congruential (Lemma 6.19). Since W is congruential and generates the ideal h1i, it contains an invertible element. Finally, the norm of an invertible element is invertible.  6.21. Proposition. Let B be a strictly finite algebra over a ring A and W be a congruential system in B. If 1 ∈ hW i, then, 1 ∈ NB/A (W ) . J 1. A congruential system remains congruential by passage to a quotient ring. If we read the conclusion of Corollary 6.20 in the (weaker) form 1 ∈ NB/A (W ) , we observe that it is in an adequate form to be subjected to the constructive machinery with maximal ideals which will be explained on page 874 in Section XV -6, and which is used to prove that an ideal contains 1. We therefore obtain the desired result.  Remarks. 1) In classical mathematics we would also say this: if 1 ∈ / NB/A (W ) A , this ideal would be contained in a maximal ideal m of A. But Corollary 6.20, applied with the discrete field A/m and the strictly finite algebra B/mB, shows that it is impossible. The constructive machinery with maximal ideals precisely aims at decrypting this type of abstract proof and at transforming it into an algorithm which constructs 1 as an element of NB/A (W ) A from the hypotheses. 2) As an example, if (b) = (b1 , . . . , bq ) is a system of comaximal elements in B, we have 1 ∈ NB/A (w) | w ∈ Suslin(b) A , since the set Suslin(b) is congruential. But we will refrain from believing that 1 ∈ NB/A (b1 ), . . . , NB/A (bq ) A . A famous instance of this property is a result due to Suslin regarding polynomial vectors, given in Lemma XV -6.1. In this lemma, B is of the form A[X]/hvi with v ∈ A[X] a monic polynomial. A complete decrypting will be provided in the proof of the lemma in question. Proof of Theorem 6.13. Let us first treat the case where B is free of finite rank, say `, over A. Let P ∈ B[X1 , . . . , Xn ] be a primitive polynomial by values. We want some b ∈ Bn with P (b) invertible. We consider the congruential system W of the values of P . By hypothesis we have 1 ∈ hW i. Proposition 6.21 then says that NB/A (W ) A = h1iA .  But NB/A P (b1 , . . . , bn ) is a polynomial with n` variables in A if we express each bi ∈ B over an A-basis of  B, and A is local-global, so there exists a b ∈ Bn such that NB/A P (b) is invertible, and this implies that P (b) is Exercises and problems 521 invertible. In the general case where B is only assumed to be integral over A, let us consider in B the finitely generated A-subalgebras Bi ; B is its increasing filtering union. Since B is integral over A, so is Bi , therefore it is a quotient of an A-algebra which is a free A-module of finite rank. By the first case, and in virtue of item 5 of Fact 6.2, each Bi is local-global. Finally, by the last item of Fact 6.2, B is local-global.  Exercises and problems Exercise 1. Prove in classical mathematics that the nilradical of a ring is equal to the intersection of its prime ideals. Exercise 2. If a is an ideal of A we let JA (a) be its Jacobson radical, i.e. the inverse image of Rad(A/a ) under the canonical projection A → A/a . Let a be an ideal of A. Show that JA (a) is the greatest ideal b such that the monoid 1 + b is contained in the saturated monoid of 1 + a. Exercise 3. Prove in constructive mathematics that the Jacobson radical of a local ring coincides with the set of noninvertible elements, and that it is the unique ideal a satisfying • a is maximal • 1 ∈ a implies 1 = 0. Exercise 4. Let A be a noncommutative ring, a, b ∈ A. Prove the following statements. 1. If a admits a left-inverse c, then c is a right-inverse of a if and only if c is unique as a left-inverse of a. 2. If 1 − ab admits a left-inverse u, then 1 − ba also admits a left-inverse v. Idea: if ab and ba are “small,” u must be equal to 1 + ab + abab + . . ., and v equal to 1 + ba + baba + · · · = 1 + b(1 + ab + abab + · · ·)a. 3. If for all x, 1 − xa is left-invertible, then for all x, 1 − xa is right-invertible. 4. The following properties are equivalent. • • • • • • • For For For For For For For all all all all all all all x, 1 − xa is left-invertible. x, 1 − xa is right-invertible. x, 1 − xa is invertible. x, 1 − ax is left-invertible. x, 1 − ax is right-invertible. x, 1 − ax is invertible. x, y, 1 − xay is invertible. The elements a that satisfy these properties form a two-sided ideal called the Jacobson radical of A. 522 IX. Local rings, or just about Exercise 5. (A freeness lemma) Let (A, m) be an integral local ring with residual field k, with quotient field K. Let E be a finitely generated A-module; suppose that the k-vector space E/mE = k ⊗A E and the K-vector space K ⊗A E have the same dimension n. Show that E is a free A-module of rank n. Better: if (x1 , . . . , xn ) ∈ E n is a residual basis, it is an A-basis of E. Exercise 6. (A consequence of Nakayama’s lemma) Let E be a finitely presented A-module and a ∈ Rad(A) be an E-regular element. Suppose that the A/aA-module E/aE is free of rank n. Show that E is free of rank n. More precisely, let e1 , . . . , en ∈ E, if (e1 , . . . , en ) is an A/aA-basis of E/aE, then (e1 , . . . , en ) is an A-basis of E. Exercise 7. Let A be a local ring. Prove the following statements. If hbi = hai, there exists an invertible element u such that ua = b. If a = hx1 , . . . , xn i = hai, there exists an index i such that a = hxi i. Exercise 8. Give a detailed direct proof of Theorem 4.6 when n = s. Exercise 9. Here certain items of Theorem V -3.1 are revisited, now supposing that the ring A is residually zero-dimensional. The reader is invited to provide proofs which are independent from the results obtained for local-global rings. 1. Every finitely generated projective A-module is quasi-free. 2. Every matrix G ∈ Aq×m of rank > k is equivalent to a matrix  Ik 0k,m−k G1 0q−k,k  , with Dr (G1 ) = Dk+r (G) for all r > 0. The matrices are elementarily equivalent if k < sup(q, m). 3. Every finitely presented module locally generated by k elements is generated by k elements. Exercise 10. (If A is local, SLn (A) = En (A)) Let A be a local ring. Show that every matrix B ∈ SLn (A) is produced from elementary matrices (in other words, B is elementarily equivalent to the matrix In ). Inspiration may come from the proof of the local freeness lemma. See also Exercise 17. Exercise 11. 1. Prove that a finitely generated A-module M is locally generated Vk+1 by k elements (Definition 2.5) if and only if A M = 0. Inspiration may come from the case k = 1 treated in Theorem V -7.3. 2. Deduce that the annihilator Ann the same radical. Vk+1 A  M and the Fitting ideal Fk (M ) have Exercises and problems 523 Exercise 12. (Variation on the locally generated theme) Let M be a finitely generated A-module, with two generator sets(x1 , . . . , xn ) and (y1 , . . . , yr ) with r 6 n. We want to explicate a family (sI ) of nr comaximal elements, indexed by the I ∈ Pr,n , such that sI M ⊆ h(xi )i∈I i. Note that over each localized ring A[s−1 I ], the module M is generated by the (xi )i∈I ’s. 1. Let A and B ∈ Mn (A). a. Explicate the membership det(A + B) ∈ Dn−r (B) + Dr+1 (A). b. Deduce that 1 ∈ Dn−r (In − A) + Dr+1 (A). c. In particular, if rk(A) 6 r, then rk(In − A) > n − r. Q Q d. Let a1 , . . . , an ∈ A, πI = I ai , πJ0 = J (1 − aj ). Show that the (πI )#I=r+1 ’s and (πJ0 )#J=n−r ’s form a system of maximal elements.  n+1 r+1 co- 2. Prove the result stated at the beginning of the exercise by making the family (sI ) explicit. 3. Let E be a finitely generated A-module locally generated by r elements. For any generator set (x1 , . . . , xn ), there exist comaximal elements tj such that each of the localized modules Etj is generated by r elements among the xi ’s. 4. Let E = hx1 , . . . , xn i be a finitely generated A-module and A ∈ Mn (A) satisfying x A = x with rk(A) 6 r. Show that E is locally generated by r elements. Study a converse. Exercise 13. If A and B are two decomposable rings we say that a ring homomorphism ϕ : A → B is a decomposable ring morphism if, for all a, b ∈ A satisfying b(1 − ab) = 0 and a(1 − ab) ∈ Rad A, we have in B, with a0 = ϕ(a) and b0 = ϕ(b), b0 (1 − a0 b0 ) = 0 and a0 (1 − a0 b0 ) ∈ Rad B (cf. Proposition 5.3). 1. Show that ϕ is a decomposable ring morphism if and only if ϕ(Rad A) ⊆ Rad B. 2. Study the injective and surjective decomposable ring morphisms. In other terms, precise the notions of a decomposable subring (considered as a single word) and of a decomposable quotient ring. Exercise 14. (Elementary local-global machinery of decomposable rings) The fact that one can systematically split a decomposable ring into two components leads to the following general method. Most of the algorithms that work with the residually discrete local rings can be modified to work with the decomposable rings, by splitting the ring into two components each time the algorithm written for the residually discrete local rings uses the test “is this element invertible or in the radical?” In the first component the element in question is invertible, in the second it is in the radical. Actually we rarely have the occasion to use this elementary machinery, the main reason being that a more general (but less elementary) local-global machinery applies with an arbitrary ring, as it will be explained in Section XV -5. 524 IX. Local rings, or just about Exercise 15. (Polynomial locally representing an inverse, Lemma 6.5) Item 3 of this exercise gives a reinforced version of Lemma 6.5. The approach used here is due to Lionel Ducos. Let A be a ring, d ∈ N and e = d(d + 1)/2. 1. Here, s is an indeterminate over Z. Construct d + 1 polynomials ai (s) ∈ Z[s] for i ∈ J0..dK, satisfying for every P ∈ A[X] = A[X1 , . . . , Xn ] of degree 6 d: (?d ) se P (s−1 X) = a0 (s)P (s0 X) + a1 (s)P (s1 X) + · · · + ad (s)P (sd X). 2. For s ∈ A, x ∈ An and P ∈ A[X] of total degree 6 d, show that se P (x/s) ∈ P (x), P (sx), . . . , P (sd x) ⊆ A. 3. Let S be a monoid and P ∈ A[X]. Suppose that P represents an inverse in AS . Show that S meets the ideal generated by the values of P . Exercise 16. (See also Exercise IV -10) Let A be a local-global ring and M an A-module. 1. For every ideal a, the canonical homomorphism A× → (A/a )× is surjective. 2. If x, y ∈ M and Ax = Ay, there exists an inverse u such that x = uy. Exercise 17. (If A is local-global, SLn (A) = En (A)) Let A be a local-global ring, and (a1 , . . . , an ) a unimodular vector (n > 2). P 1. Show that there exist x2 , . . . , xn such that a1 + i>2 xi ai ∈ A× . 2. Deduce (for n > 2) that every unimodular vector transforms into the vector (1, 0, . . . , 0) by elementary manipulations. 3. Deduce that SLn A = En A. Exercise 18. (Semi-local rings, 1) 1. For a ring B, prove that the following properties are equivalent. a. If (x1 , . . . , xk ) is unimodular, there exists a system of orthogonal idempotents (e1 , . . . , ek ) such that e1 x1 + · · · + ek xk is invertible. b. Under the same hypothesis, there exists a splitting B ' B1 × · · · × Bk such that the component of xi in Bi is invertible for i ∈ J1..kK. c. Same as in a, but with k = 2. d. For all x ∈ B, there exists an idempotent e ∈ B such that x + e is invertible. Note that at item a, (e1 , . . . , ek ) is a fundamental system of orthogonal idempotents since 1 ∈ he1 , . . . , ek i. The rings satisfying these equivalent properties have been called “clean rings” in [142, Nicholson]. 2. Clean rings are stable under quotient and under finite product. Every local ring is clean. 3. If Bred is clean, the same goes for B. Deduce that a zero-dimensional ring is clean. 4. If Bred is clean, B lifts the idempotents of B/ Rad B. We say that a ring A is semi-local if the ring B = A/Rad A is clean. We say that it is strict semi-local if it is semi-local and if B(A/Rad A) is a bounded Boolean algebra. Exercises and problems 525 Exercise 19. (Semi-local rings, 2) Prove the following statements. 1. A local ring is strict semi-local. 2. A semi-local and residually connected ring is local. 3. A residually zero-dimensional ring is semi-local. 4. A semi-local ring is local-global. 5. The semi-local rings are stable under quotient and under finite product. 6. In classical mathematics, a ring is strict semi-local if and only if it has a finite number of maximal ideals. Exercise 20. (Properties of the Nagata ring) See also Exercise XII -3. Let A be a ring and U ⊆ A[X] be the monoid of primitive polynomials. Let B = U −1 A[X] = A(X) be the Nagata ring of A[X]. 0. Give a direct proof of the fact that B is faithfully flat over A. 1. A ∩ B× = A× . 2. Rad A = A ∩ Rad B and Rad B = U −1 (Rad A)[X]. 3. B/Rad B ' (A/Rad A)(X). 4. If A is local (resp. local and residually discrete), then B is local (resp. local and residually discrete). 5. If A is a field (resp. a discrete field), then B is a field (resp. a discrete field). Exercise 21. (Nagata ring with several indeterminates) Let U be the set of primitive polynomials of A[X, Y ]. 1. Show that U is a filter. Let A(X, Y ) = U −1 A[X, Y ], we call it the Nagata ring of A[X, Y ]. 2. Show that the canonical map A[X, Y ] → A(X, Y ) is injective and that we ∼ have a natural isomorphism A(X, Y ) −→ A(X)(Y ). 3. Generalize the results of Exercise 20. Exercise 22. (Algebra of a monoid and binomial ideals) Let (Γ, ·, 1Γ ) be a commutative monoid denoted multiplicatively, and k be a commutative ring. The algebra of (Γ, ·, 1Γ ) over k, denoted by k[(Γ, ·, 1Γ )] or simply k[Γ], is formed from the free k-module over Γ (if Γ is not assumed to be discrete, see Exercise VIII -16). If k is nontrivial, we identify every element γ of Γ with its image in the free module. In case of doubt regarding k, we should denote by 1k γ instead of γ this element of k[Γ]. The product law × of k[Γ] is obtained by letting γ · γ 0 = γ × γ 0 and by extending by k-bilinearity. Note that 1A 1Γ = 1k[Γ] . In practice, we identify k with a subring of k[Γ], and we identify the three 1’s above. 1. Prove that the k-algebra k[Γ], considered with the map ιk,Γ : Γ → k[Γ], γ 7→ 1k γ, gives the solution to the universal problem summarized in the picture below. 526 IX. Local rings, or just about To sum up, we say that k[Γ] is the k-algebra freely generated by the multiplicative monoid Γ. Γ ιk,Γ commutative monoids ψ monoids morphisms  k[Γ] %/ θ! k-algebras L When the law of Γ is denoted additively, we denote by X γ the element of k[Γ] image of γ ∈ Γ such that we now have the natural expression X γ1 X γ2 = X γ1 +γ2 . For example, when Γ = Nr is the additive monoid freely generated by a set with r elements, we can see the elements of Nr as multiexponents and k[Γ] = k[(Nr , +, 0)] ' k[X1 , . . . , Xr ]. Here X (m1 ,...,mr ) = X1m1 · · · Xrmr . When Γ = (Zr , +, 0), we can again see the elements of Zr as multiexponents and k[Zr ] ' k[X1 , . . . , Xr , X11 , . . . , X1r ] as the Laurent polynomial ring. Now suppose that (Γ, ·, 1) is a monoid given by generators and relations. Let G be the set of the generators. The relations are of the form Q i∈I giki = ` Q j∈J hjj for finite families (gi )i∈I and (hj )j∈J in G, and (ki )i∈I and (`j )j∈J in N.  Such a relation can be encoded by the pair (ki , gi )i∈I , (`j , hj )j∈J . If we hope to control things, G and the set of relations better be enumerable and discrete. From the point of view of the computation, the central role is taken up by the finite presentations. Notation. To visualize a finite presentation, for instance with G = {x, y, z} and relations xy 2 = yz 3 , xyz = y 4 we write in multiplicative notation Γ =CM x, y, z | xy 2 = yz 3 , xyz = y 4 (*) , and in additive notation Γ =CM hx, y, z | x + 2y = y + 3z, x + y + z = 4yi . The index CM is added for “commutative monoid.” 2. Show that k[Γ] ' k[(g)g∈G ]/a, where a is the ideal generated by the differences of monomials Q i∈I gi ki − Q j∈J hj `j (for the relations Q i∈I giki = Q j∈J ` hj j given in the presentation of Γ). Such an ideal is called a binomial ideal. With the example (∗) above, we can therefore write k[Γ] =k−algebras x, y, z | xy 2 = yz 3 , xyz = y 4 (**) . In other words, Γ =CM hthingy | bobi implies k[Γ] =k−algebras hthingy | bobi. Solutions of selected exercises 527 Some solutions, or sketches of solutions Exercise 4. 1. If c is right-invertible and left-invertible then it is the unique left-inverse because c0 a = 1 implies c0 = c0 ac = c. Conversely, since ca = 1, we have (c + 1 − ac)a = ca + a − aca = 1. Therefore c + 1 − ac is a left-inverse, and if there is uniqueness, 1 − ac = 0. 2. We check that v = 1 + bua suits. 3. If u(1 − xa) = 1, then u = 1 + uxa, therefore it is left-invertible. Thus u is right- and left-invertible, and so is 1 − xa. Exercise 5. Let x1 , . . . , xn ∈ E such that (x1 , . . . , xn ) is a k-basis of E/mE. By Nakayama, the xi ’s generate E. Let u : An  E be the surjection ei 7→ xi . By scalar extension to K, we obtain a surjection U : Kn  K ⊗A E between two vector spaces of same dimension n, thus an isomorphism. //E Since An ,→ Kn , we deduce that u is injective. Indeed, A n u _  if y ∈ An satisfies u(y) = 0, then 1 ⊗ u(y) = U (y) = 0 in U / / K ⊗A E Kn K ⊗A E, therefore y = 0, cf. the diagram on the right. Recap: u is an isomorphism and (x1 , . . . , xn ) is an A-basis of E. Exercise 6. By Nakayama, (e1 , . . . , en ) generates the A-module E. Let L = An and ϕ : L  E be the (surjective) linear map that transforms the canonical basis of L into (e1 , . . . , en ). By hypothesis, ϕ : L/aL → E/aE is an isomorphism. Let us show that Ker ϕ = a Ker ϕ. Let x ∈ L with ϕ(x) = 0; we have ϕ(x) = 0, so x = 0, i.e. x ∈ aL, say x = ay with y ∈ L. But 0 = ϕ(x) = aϕ(y) and a being E-regular, ϕ(y) = 0. We indeed have Ker ϕ ⊆ a Ker ϕ. Since E is finitely presented, Ker ϕ is finitely generated, and we can apply Nakayama to the equality Ker ϕ = a Ker ϕ. We obtain Ker ϕ = 0: ϕ is an isomorphism. Exercise 12. 1a., b., c. The idea is to develop det(A + B) as a multilinear function of the columns of A + B. The result is a sum of 2n determinants of matrices obtained by mixing columns Aj , Bk of A and B. We write det(A1 + B1 , . . . , An + Bn ) = P 2n det(C1 , . . . , Cn ) with Cj = Aj or Bj . ∆col J For J ∈ Pn , let be the determinant when Cj = Bj for j ∈ J and Cj = Aj otherwise. With this notation, we therefore have det(A + B) = P J ∆col J . col If #J > n−r, then ∆col J ∈ Dn−r (B); otherwise #J > r +1 and so ∆J ∈ Dr+1 (A). 1d. Consider A = Diag(a1 , . . . , an ). 2. We write x = y U with U ∈ Ar×n , y = x V with V ∈ An×r . Let A = V U , B = In − A. We have x B = 0 and rk(B) > n − r since rk(A) 6 r. The framed equality shows, for I ∈ Pr,n and ν minor of B over the rows of I, the inclusion νM ⊆ h(xi )i∈I i, and we are done because 1 ∈ Dn−r (B). Precisely, let ∆row be the determinant of the “mixed” matrix whose rows of index J i ∈ J are the corresponding rows of B and the rows of index i ∈ J are those of A. For J ⊇ I, ∆row is a linear combination of minors of B over the rows of I. J 528 IX. Local rings, or just about Thus let sI = P J|J⊇I ∆row J . Then on the one hand, sI M ⊆ h(xi )i∈I i, and on the other, since rk(B) > n − r, 1= P I∈Pr,n sI . 3. Clear by using the successive localizations lemma (Fact V -7.2). 4. If a matrix A ∈ Mn (A) exists as indicated, the proof of item 2 applies with B = In − A. The converse is problematic because the constraint rk(A) 6 r is not linear in the coefficients of A. However, we succeed in reaching it for r = 1 by other means, (see Theorem V -7.3). Exercise 13. 1. The condition b0 (1 − a0 b0 ) = 0 is obtained by ϕ b(1 − ab) = 0. Suppose that ϕ is a decomposable ring morphism and let us show that ϕ(Rad A) ⊆ Rad B: let a ∈ Rad A, then b = 0 (by uniqueness of b), thus b0 = 0 and a0 = a0 (1 − a0 b0 ) ∈ Rad B. Conversely, suppose ϕ(Rad A) ⊆ Rad  B. If a, b ∈ A satisfy b(1 − ab) = 0 and a(1 − ab) ∈ Rad A, then ϕ a(1 − ab) = a0 (1 − a0 b0 ) ∈ Rad B.  Exercise 15. 1. It is sufficient and necessary that the ai ’s satisfy the equality (?d ) for the monomials of total degree 6 d. Let M = M (X) = X α be such a monomial with |α| = j 6 d. Since M (sr X) = srj M , we want to reach se s−j M = a0 (s) M + a1 (s)sj X + · · · + ad (s)sdj M, i.e. after simplification by M and multiplication by sj se = a0 (s)sj + a1 (s)s2j + · · · + ad (s)s(d+1)j = Pd i=0 ai (s)(sj )i+1 . Pd Let us introduce the polynomial F (T ) ∈ Z[s][T ] defined by F (T ) = T a (s)T i . i=0 i j Then degT F 6 d + 1 and F performs the interpolation F (0) = 0 and F (s ) = se for j ∈ J1..dK. However, a polynomial F ∈ Z[s][T ] which satisfies this interpolation is the following (#d ) F (T ) = se − (s0 − T )(s1 − T )(s2 − T ) · · · (sd − T ). Full astern. Consider the polynomial defined by the equality (#d ). It is of degree d + 1 in T , null in T = 0, therefore it is of the form Pd F (T ) = T a (s)T i , with a0 (s), . . . , ad (s) ∈ Z[s]. i=0 i These polynomials ai (s) have the desired property. 2. The required membership is deduced from the equality (?d ) by evaluating X at x. 3. Suppose that P is of total degree 6 d. The fact that P (x/s) ∈ (AS )× means, in A, that y = se P (x/s) divides an element t of S. By item 2, y is in the ideal generated by the values of P ; the same goes for t. Exercise 16. 1. Let b ∈ A invertible modulo a. There exists an a ∈ a such that 1 ∈ hb, ai. The polynomial aT + b takes the comaximal values a, a + b, thus it represents an inverse b0 = at + b. Then, b0 ≡ b mod a with b0 invertible. 2. We write x = ay, y = bx, so (1 − ab)x = 0. Since b is invertible modulo 1 − ab, there exists a u ∈ A× such that u ≡ b mod 1 − ab. Then ux = bx = y. Solutions of selected exercises 529 Exercise 18. For two orthogonal idempotents e, e0 , we have hex, e0 x0 i = hex + e0 x0 i. Therefore for (e1 , . . . , ek ), we have he1 x1 + · · · + ek xk i = he1 x1 , . . . , ek xk i. Thus, e1 x1 + · · · + ek xk is invertible if and only if e1 x1 , . . . , ek xk are comaximal. Consequently, in the context of 1a, let yi ∈ hxi i with comaximal (y1 , . . . , yk ) (a fortiori (x1 , . . . , xk ) is comaximal); if idempotents (e1 , . . . , ek ) work for (y1 , . . . , yk ), they also work for P (x1 , . . . , xk ). Even if xi is replaced by ui xi . We will therefore be able to assume xi = 1. For two idempotents e, e0 , we have e ⊥ e0 if and only if 1 − e, 1 − e0 are comaximal. 1. c ⇒ d. By taking x1 = x, x2 = 1+x, e = e2 = 1−e1 , we have e1 x1 +e2 x2 = x+e. d ⇒ c. We can assume 1 = −x1 + x2 ; we let x = x1 . Then, e + x = (1 − e)x + e(1 + x) = (1 − e)x1 + ex2 . a ⇔ b. Easily obtained by letting Bi = B/h1 − ei i. P c ⇒ a (or d ⇒ a). By induction on k. We can assume 1 = x : there i i exists some idempotent e1 such that e1 x1 + (1 − e1 )(1 − x1 ) is invertible. We have 1 ∈ hx2 , . . . , xk i in the quotient B/he1 i that also possesses the property d; therefore, by induction, there exists (e2 , . . . , ek ) in B forming a fundamental system of orthogonal idempotents in the quotient B/he1 i with e2 x2 + · · · + ek xk invertible in B/he1 i. Then, (e1 , (1 − e1 )e2 , . . . , (1 − e1 )ek ) is a fundamental system of orthogonal idempotents of B and e1 x1 + (1 − e1 )e2 x2 + · · · + (1 − e1 )ek xk is invertible in B. 2. Easy. 3. Let x ∈ B; there exists some idempotent e ∈ Bred such that e + x is invertible in Bred . We lift e at some idempotent e0 ∈ B. Then, e0 + x lifts e + x so is invertible. Let B be a zero-dimensional ring; even if we need to replace B by Bred , we can assume that B is reduced; if x ∈ B, there exists some idempotent e such that hxi = h1 − ei; then e + x is invertible. 4. Let a ∈ B be an idempotent element in B/Rad B and b = 1 − a. Since ha, bi = 1, there exist two orthogonal idempotents e and f in B such that ae + bf is invertible. Since he, f i = 1, we have f = 1 − e. Now, we reason in the quotient. The system (ae, bf, af, be) is a fundamental system of orthogonal idempotents. As ae + bf is invertible, we have ae + bf = 1, hence af = be = 0. Finally, (in the quotient) a = e and b = f . Exercise 19. A ring A is local if and only if A/Rad A is local; a ring A is semi-local if and only if A/Rad A is semi-local. 1. A local ring satisfies item 1d of the previous exercise with e = 0 or e = 1. 2. A/Rad A is connected, semi-local thus local (use item 1d of the previous exercise knowing that e = 0 or 1); so A is local. 4. Is proven for the residual ring and results from the following observation. If f is a polynomial in n indeterminates and (e1 , . . . , ek ) is a fundamental system of orthogonal idempotents, then for (x1 , . . . , xk ) in An , since the evaluation homomorphism commutes with the direct products, we have the equality f (e1 x1 + · · · + ek xk ) = e1 f (x1 ) + · · · + ek f (xk ). 6. A ring A has a finite number of maximal ideals if and only if it is the case for A/Rad A . In classical mathematics, A/Rad A is a finite product of fields. 530 IX. Local rings, or just about Exercise 20. P P P In the following f = i bi X i ∈ A[X] and g = i ci X i ∈ U , with 1 = i ci ui . 0. Let T be a set of indeterminates over A and A(T ) be the Nagata ring. We know that A(T ) is flat over A and we show that every system of linear equations over A that admits a solution over A(T ) admits a solution over A. Thus let the system of linear equations Ax = b with A ∈ An×m and b ∈ An . Suppose the existence of a solution over A(T ); it is of the form P/D with P ∈ A[T ]m and D ∈ A[T ] being a primitive P polynomial. We therefore have A PP= D b over A[T ]. Let us write P = α xα T α with xα ∈ Am and D = α aα T α where the aα ∈ A arePcomaximal. The equality AP P = D b gives A xα = aα b for each α. If uα aα = 1, the vector x = α uα xα is a solution of the system Ax = b. 1. Let a ∈ A be invertible in B. There exist f, g such that af = g, so a and f are primitive: a ∈ A× . 2. Let us show Rad A ⊆ Rad B. Let a ∈ Rad A, we want to show that 1 + a(f /g) is invertible want 1 ∈ h(ci + abi )i i; but this ideal P in B, i.e. g + af ∈ U . We × contains u (c + ab ) = 1 + az ∈ A . i i i i Pn We therefore know that Rad B ⊇ U −1 (Rad A)[X]. Let h = i=0 ai X i . Let us show that h ∈ Rad B implies an ∈ Rad A. We will deduce by induction that h ∈ (Rad A)[X]. Consider a ∈ A, take f = a and g = X n − a(h − an X n ). Clearly g ∈ U , so g + f h = (1 + aan )X n must be invertible in B, i.e. 1 + aan must be in A× . Exercise 22. (Algebra of a monoid and binomial ideals) 1. First of all we prove that k[Γ] is indeed a k-algebra and that ιk,Γ is a monoid morphism. Then, if α : Γ → A is a monoid morphism, there is a priori a unique way to it to a morphism α e of k-algebras from k[Γ] to A: let  extend P P α e a γ = a α(γ) (here, I is a finitely enumerated subset of Γ). γ γ γ∈I γ∈I We then prove that α e is indeed a morphism of k-algebras. The readers are invited to prove all the details when Γ is not assumed to be discrete, by basing themselves on Exercise VIII -16. 2. This is a general result of universal algebra, because here we are in the framework of purely equational algebraic structures. To obtain a k-algebra by means of generators and relations given by equalities of monomials, we can first construct the similarly defined monoid, then the algebra freely generated by this monoid. If we do not want to invoke such a general result, we can simply observe that the computation procedures in k[Γ] with Γ =CM hthingy | bobi are identical to those in A =k−algebras hthingy | bobi. Bibliographic comments The reader will certainly find our will to give to the trivial ring every property under the sun a little arbitrary, especially through our use of a weakened version of negation (cf. footnote 1 page 486). We hope to convince Bibliographic comments 531 them of the practical use of such a convention by way of the examples. On the proper use of the trivial ring, see [160, Richman]. The “proof by Azumaya” of the local freeness lemma 2.2 is extracted from the proof of the Azumaya theorem III.6.2 in [MRR], in the case that concerns us here. In other words, we have given the “matrix” content of the proof of the local freeness lemma in [MRR]. Monomial curves (example on page 507) are treated in [Kunz], Chapter V, Example 3.13.f. Decomposed rings play an important role in the classical theory of Henselian local rings for example in the works [Raynaud] or [Lafon & Marot]. A local-global ring is sometimes called a “ring with many units” in the literature. Local-global rings have been particularly studied in [80, Estes & Guralnick]. Other “rings with many units” have appeared long beforehand, under the terminology “unit-irreducible rings” (see for example [114]). Those are the rings A for which the following property is satisfied: if two polynomials of A[X] represent an inverse, then their product also represents an inverse. Also introduced were the “primitive” or “strongly U-irreducible” rings which are the rings for which the following property is satisfied: every primitive polynomial represents an inverse. They are special local-global rings. In the proof of Fact 6.7 we have shown that a Nagata ring is always “primitive.” Concerning the Nagata ring A(X), given Fact 6.7 and the good properties of local-global rings, it is not surprising that this ring plays a crucial role for the uniform solution of systems of linear equations with parameters over a discrete field and more generally for the uniform computations “in a reasonable amount of time” over arbitrary commutative rings (see [57, 58, Díaz-Toca&al.]). Chapter X Finitely generated projective modules, 2 Contents 1 2 3 4 Introduction . . . . . . . . . . . . . . . . . . . . . . . . The finitely generated projective modules are locally free . . . . . . . . . . . . . . . . . . . . . . . . . . . . Complements on exterior powers . . . . . . . . . . . . . . . Case of the modules of constant rank . . . . . . . . . . . . General case . . . . . . . . . . . . . . . . . . . . . . . . . . Modules of constant rank: some precisions . . . . . . . . . Generic case . . . . . . . . . . . . . . . . . . . . . . . . . . The ring of generalized ranks H0 (A) . . . . . . . . . . Some applications of the local structure theorem . . Fundamental polynomial . . . . . . . . . . . . . . . . . . . Tensor product . . . . . . . . . . . . . . . . . . . . . . . . . Ranks and linear maps . . . . . . . . . . . . . . . . . . . . Transitivity formulas . . . . . . . . . . . . . . . . . . . . . Projective modules of rank 1 . . . . . . . . . . . . . . . . . Grassmannians . . . . . . . . . . . . . . . . . . . . . . . The generic rings Gn and Gn,k . . . . . . . . . . . . . . . . Affine schemes, tangent spaces . . . . . . . . . . . . . . . . Nullstellensatz and equivalence of two categories . . . . . Affine schemes . . . . . . . . . . . . . . . . . . . . . . . . Tangent space at a point of a functor . . . . . . . . . . . Tangent spaces to the Grassmannians . . . . . . . . . . . . – 533 – 534 535 535 537 538 539 541 542 546 547 548 548 549 551 551 551 556 556 558 559 562 534 X. Finitely generated projective modules, 2 Projectors and ranks . . . . . . . . . . . . . . . . . . . . Affine Grassmannian . . . . . . . . . . . . . . . . . . . . Projective Grassmannian . . . . . . . . . . . . . . . . . 5 Grothendieck and Picard groups . . . . . . . . . . . When the projective modules of constant rank are free . . . . . . . 562 562 564 566 567 e 0 (A) . . . . . . . . . . . . . . . . . GK0 (A), K0 (A) and K The Picard group . . . . . . . . . . . . . . . . . . . . . . Semi-rings GK0 (A), GK0 (Ared ) and GK0 (A/Rad A ) . . . The Milnor square . . . . . . . . . . . . . . . . . . . . . . 6 Identification of points on the affine line . . . . . . Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . Identification of points without multiplicities . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . 568 569 572 573 576 576 578 580 597 614 Introduction Here we continue the study of finitely generated projective modules started in Chapter V. In Section 1 we readdress the question regarding the characterization of finitely generated projective modules as locally free modules, i.e. regarding the local structure theorem. Section 2 is dedicated to the ring of ranks over A. In the usual theory in classical mathematics the rank of a finitely generated projective module is defined as a locally constant function over the Zariski spectrum. Here we give an elementary theory of the rank which does not require prime ideals. In Section 3 we give some simple applications of the local structure theorem. Section 4 is an introduction to Grassmannians. In Section 5 we introduce the general problem of completely classifying finitely generated projective modules over a fixed ring A. This classification is a fundamental and difficult problem, which does not admit a general algorithmic solution. Section 6 presents a nontrivial example for which this classification can be obtained. §1. The finitely generated projective modules are locally free 535 1. The finitely generated projective modules are locally free We continue the theory of finitely generated projective modules after Section V -8. We ask however that the reader forgets what was learnt in Section V -6: the characterization by the Fitting ideals, the local structure theorem V -6.1 and the considerations regarding the rank linked to Fitting ideals as well as Theorem V -8.14 whose proof depends on the local structure theorem. Actually, all of the results of Sections V -8 and 1 could be obtained by localization arguments at comaximal elements since we have already obtained the local structure theorem for finitely generated projective modules (Theorems II -5.26 and V -6.1) by exterior algebra methods. We nevertheless think that the “more global” point of view developed in this chapter is itself interesting, and, in a way, simpler, as highlighted by the elementary proof of the matrix theorem 1.7 which summarizes (and specifies) all the previous structure theorems. There also the exterior algebra is an indispensable tool, but it seems better used, in a less invasive way. Complements on exterior powers of a finitely generated projective module The following lemma is immediate. 1.1. Lemma. Let P be a free A-module of rank h and ϕ ∈ End(P ) be a diagonalizable endomorphism, with a matrix similar to Diag(λ1 , . . . , λh ), then for the fundamental polynomial of ϕ we get def Fϕ (X) = det(IdP [X] + Xϕ) = (1 + λ1 X) · · · (1 + λh X). We now establish the crucial result. 1.2. Proposition. (Exterior powers) Let P be a finitely generated projective module. Vk 1. The k th exterior power of P , denoted by P , is also a finitely generaVk ted projective module. If P = Im(F ) for F ∈ AG(A), the module P Vk is (isomorphic to) the image of the projection matrix F. 2. If ϕ is an endomorphism of P , the fundamental polynomial FVk ϕ (X) only depends on k and on the polynomial Fϕ (X). In particular, the rank Vk polynomial of P only depends on k and on the rank polynomial of P . Vk 3. a. If P is of constant rank h < k, the module P is null. Vk b. If P is of constant rank h > k, the module P is of constant  h rank k . 536 X. Finitely generated projective modules, 2 c. In this case, if ϕ is an endomorphism whose fundamental polynomial is Fϕ = (1 + λ1 X) · · · (1 + λh X), we have Y FVk (X) = (1 + λi1 · · · λi X). k ϕ 16i1 <···<ik 6h 4. If a projection matrix F has as its image a projective module of constant rank k, then Dk+1 (F ) = 0. J 1. Let M and N be two A-modules and consider the first exterior powers of their direct sum M ⊕ N . By examining the universal problem that the k th exterior power of a module solves, we obtain the canonical isomorphisms V2 V2 V2 (M ⊕ N ) ' M ⊕ (M ⊗ N ) ⊕ N   V3 V3 V3 V2 V2 (M ⊕ N ) ' M ⊕ ( M) ⊗ N ⊕ M ⊗ ( N) ⊕ N, and more generally  Vm Lm Vk Vm−k (M ⊕ N ) ' M) ⊗ ( N) (1) k=0 ( V0 V1 V k (with M = A and M = M ). In particular, if P ⊕ Q ' Am , P is a m Vk m direct summand in A ' A( k ) . We also see that if P = Im(F ) for some Vk P is (isomorphic to) the image of the projection projection matrix F , Vk Vk F , because this matrix represents the identity over P and 0 matrix over all the other summands of the direct sum. 2. We can assume P = Im(F ), where F ∈ AGn (A), and n > k. We therefore have P ⊕ Q = An with Q = Ker(F ). The endomorphism ϕ extends into an endomorphism ϕ1 : An → An , null over Q, with matrix H satisfying F HF = H, and we have Fϕ (X) = Fϕ1 (X) = det(In + XH). Vk Vk Then, we see that ϕ1 is an extension of ϕ, null over the terms distinct Vk from P in the direct sum explicated in the proof of item 1. The matrix Vk Vk of ϕ1 is none other than H. Vk  We therefore want to show that det I(n) + X H only depends on k k and on det(In + XH). We are therefore brought back to the case of a free module, and this case has been treated in Proposition III -5.6. 3. This item results from the previous one, since the “projective of rank k” case can be deducted from the “free of rank k” case. Note that items Vk 3a and 3b both say that when P is of constant rank h, P is of constant  rank hk (which is equal to 0 if h < k). We have only separated them in order to give the result in a more visible form. Vk+1 4. This is equivalent to the fact that P is null, which is item 3a.  Remarks. (Consequences of Proposition 1.2.) 1) Let RP (X) = r0 + r1 X + · · · + rn X n . Each rh P is a projective module of constant rank h over A[1/rh ], which gives, as a consequence of item 3, §1. The finitely generated projective modules are locally free for k > 0, 537 h (X) = X (k) over A[1/rh ]. L Q By writing P = h rh P and A = h A[1/rh ] we obtain RVk (r hP ) k+j n RVk P (X) = r0 + · · · + rk−1 + rk X + · · · + rk+j X ( k ) + · · · + rn X (k ) h Pn = h=0 rh X (k) . V0 P = A and thus also RV0 P (X) = X (so that We also have by convention  the previous formula applies it must be agreed that n0 = 1 for all n > 0). V 2) If we let P be the exterior algebra of P , the reader will show by an analogous computation that k n RV (X) = r0 X + r1 X 2 + · · · + rk X 2 + · · · + rn X 2 . P 3) We can compute FVk (ϕ) from Fϕ as follows. Since Fϕ (0) = 1 and deg(Fϕ ) 6 n, if ψ is the endomorphism of An having as its matrix the companion matrix C of X n Fϕ (−1/X), we obtain Fϕ = Fψ . Therefore ^k  FVk ϕ = FVk ψ = det I(n) + X C k From the previous remarks we deduce the following proposition. 1.3. Proposition. Let P be a finitely generated projective module, and k 6 h be two integers > 0. The following properties are equivalent. 1. The module P is of constant rank h. V 2. The module P is of constant rank 2h .  Vk 3. The module P is of constant rank hk . With h = 0, the properties 1 and 2 are equivalent. Case of the modules of constant rank 1.4. Theorem. Let P be a projective A-module of constant rank h with n generators, (isomorphic to the) image of a projector F ∈ AGn (A). Then  the nh principal minors (si ) of order h of F satisfy P – i si = 1, and – each Asi -module Psi is free of rank h, the matrix F seen as a matrix with coefficients in Asi is similar to the standard projection matrix Ih,n . J The sum of the principal minors si of order h of F is equal to 1 since det(In + XF ) = (1 + X)h . Moreover, since every minor of order h + 1 is null (Proposition 1.2), we can apply the freeness lemma II -5.10 to each localized module Psi , which is 538 X. Finitely generated projective modules, 2 isomorphic to the image of the matrix F seen as a matrix with coefficients in Psi (by Proposition V -5.1).  Remark. In the previous theorem, it is possible that si is nilpotent for certain values of i, therefore that Asi is trivial. The fact of not excluding these zero localizations is inevitable when we do not dispose of a test to know whether an element of A is nilpotent or not. This justifies the natural convention given in the remark on page 274. General case with n 1.5. Theorem. Let P be a finitely generated projective A-module  generators. Then for each idempotent eh (P ) there exist nh elements (sh,i ) of A with the following properties P – i sh,i = eh (P ), – each Ash,i -module Psh,i is free of rank h. In particular, for every finitely generated projective module with n generators, there exist 2n comaximal elements v` such that each Pv` is free. J We first localize by inverting eh (P ) to be reduced to Theorem 1.4. We then localize a little more in accordance with the latter theorem. Fact V -7.2 regarding the successive localizations applies.  The following theorem summarizes Theorems 1.4 and 1.5, and the converse given by the local-global principle V -2.4. 1.6. Theorem. An A-module P is finitely generated projective if and only if there exist comaximal elements s1 , . . . , s` such that each Psi is free over Asi . It is projective of rank k if and only if there exist comaximal elements s1 , . . . , s` such that each Psi is free of rank k over Asi . A practical form of Theorem 1.5 is its matrix form. 1.7. Theorem. (Explicit matrix form of Theorems V -1.1 and V -1.3) Let A be a ring, F ∈ Mn (A) with F 2 = F and P be the finitely generated projective module image of F in An . We define the elements rh of A for h ∈ J0..nK by the equalities RP (1 + X) := det(In + XF ), RP (X) =: r0 + r1 X + · · · + rn X n . We have the following results. 1. The family (rh )h=0,...,n is a fundamental system of orthogonal idempotents of A. 2. For h ∈ J0..n − 1K and for any minor u of order h + 1 of F , we have rh u = 0. 3. If the th,i ’s are principal minors of order h of F , by letting sh,i = rh th,i we obtain the following, §1. The finitely generated projective modules are locally free – – – – 539 the sum (for fixed h) of the sh,i ’s is equal to rh , each Ash,i -module Psh,i is free of rank h, the matrix F is similar to the matrix Ih,n , over Ash,i P the sh,i ’s are comaximal, precisely h,i sh,i = 1. Remark. Theorem 1.7 summarizes Theorems V -8.13, 1.4 and 1.5 which have preceded it. It is even slightly more precise. Thus it is not uninteresting to provide a purely matrix proof of it that concentrates all of the previous proofs together, especially since it is particularly elementary. Matrix proof of the matrix theorem. 1. This results from RP (1) = 1 (obvious) and RP (XY ) = RP (X) RP (Y ) which becomes apparent as follows RP (1 + X) RP (1 + Y ) = det(In + XF ) det(In + Y F ) =  det (In + XF )(In + Y F ) = det(In + (X + Y )F + XY F 2 ) =  det(In + (X + Y + XY )F ) = RP (1 + X)(1 + Y ) . 2. The matrix rh F has as its fundamental polynomial det(In + rh XF ). In the ring Arh , we have 1 = rh and det(In + rh XF ) = det(In + XF ) = RP (1 + X) = (1 + X)h . Within the ring Arh we are therefore reduced to proving item 2 for the case where rh = 1 and det(In + XF ) = (1 + X)h , which we assume from now on. We must show that the minors of order h + 1 ofVF are all null. The minors h+1 of order h + 1 are the coefficients of the matrix F = G. Since F 2 = F , 2 we also have G = G. Moreover, for any square matrix H, the characteristic Vk polynomial of H only depends on k and on the characteristic polynomial of H (Proposition III -5.6). By applying this to compute the characteristic polynomial of G, we can replace F with the matrix Ih,n which has the Vh+1 same characteristic polynomial as F . Since the matrix Ih,n is null, its h+1 ( ) characteristic polynomial is X n , so, by Cayley-Hamilton, the matrix G is nilpotent, and since it is idempotent, it is null. 3. Results from 1, 2 and from the freeness lemma II -5.10.  Modules of constant rank: some precisions The following two results are now easy and we leave their proof as an exercise. 1.8. Proposition. (Projective modules of constant rank) For some A-module P the following properties are equivalent. 1. P is projective of constant rank h. 2. There exist comaximal elements si of A such that each Psi is free of rank h over Asi . 540 X. Finitely generated projective modules, 2 3. P is finitely generated projective and for every element s of A, if Ps is free over As , it is of rank h. 4. P is finitely presented, Fh (P ) = h1i and Fh−1 (P ) = 0. 5. P is isomorphic to the image of a projection matrix of rank h. In addition, if P is generated by n elements, the number of comaximal  elements in item 2 is bounded above by nh . 1.9. Proposition. (Localized modules of constant rank and uniqueness of the fundamental system of orthogonal idempotents) Let P be a finitely generated projective A-module. Let rh = eh (P ). Let s be an element of A. 1. The localized module Ps is projective of rank h if and only if rh /1 = 1 in As , i.e. if rh sm = sm in A for some exponent m. 2. If s is an idempotent, that means that rh divides s, or yet again that 1 − rh and s are two orthogonal idempotents. 3. Finally, if (s0 , . . . , sn ) is a fundamental system of orthogonal idempotents such that each Psh is of rank h over Ash , then rh = sh for each h ∈ J0..nK. In the following proposition we make the link between our definition and the usual definition (in classical mathematics) of a projective module of rank k. The proof of this equivalence is however not constructive (nor can it be). 1.10. Proposition. Let k be a non-negative integer, P be a finitely generated projective module over a nontrivial ring A and a be an ideal contained in Rad A. Then the following properties are equivalent. 1. P is of rank k, i.e. RP (X) = X k 2.∗ For all maximal ideal m of A, the vector space obtained from P by extending the scalars to the residual field A/m has dimension k. 3. RP (X) ≡ X k modulo a[X]. J From a classical point of view, the implication 2 ⇒ 3 is immediate; it suffices to recall that the intersection of the maximal ideals is the Jacobson radical of A. Note that from a constructive point of view, condition 2 is a priori too weak, for lack of maximal ideals. Moreover, 1 trivially implies 2 and 3. Conversely, if RP (X) = X k modulo a[X], since the idempotents are always isolated (Lemma IX -5.1), the equality takes place in A[X].  §1. The finitely generated projective modules are locally free 541 1.11. Theorem. (Modules of constant rank k as submodules of Ak ) Suppose that over Frac A every projective module of constant rank k is free. Then every projective A-module of constant rank k is isomorphic to a submodule of Ak . J By the enlargement lemma V -2.10, we can assume that the module is an image of a projector F ∈ AGn (A) of rank k and that there exists a matrix P in GLn (Frac A) such that P F P −1 = Ik,n . We have P = Q/a with Q ∈ Mn (A) and a ∈ Reg A; thus det Q = an det P is also regular in A. We define a matrix Q1 as Q1 Ik 0 Q · F = Ik,n · Q = ·Q = . 0 0 0 However, the image of Q · F is isomorphic to the image of F because Q is injective, and the image of Ik,n · Q is clearly isomorphic to the image of Q1 = Q1..k,1..n .  Remark. 1) The previous theorem applies to the pp-rings and more generally to every ring A such that Frac A is zero-dimensional, or even simply localglobal. This is the case, for example, for reduced strongly discrete coherent Noetherian rings (see Problem XIII -1). In classical mathematics one proves that for every Noetherian ring A, Frac A is residually zero-dimensional, so we can apply the theorem to it. We do not know of a constructive analogue of this theorem. 2) For further details regarding the k = 1 case see Theorem 5.8. Generic case What do we call the generic case, regarding a projective module with n generators? We consider the ring Gn = Z[(fi,j )i,j∈J1..nK ]/Gn , where the fi,j ’s are indeterminates, F is the matrix (fi,j )i,j∈J1..nK and Gn is the ideal defined by the n2 relations obtained when writing F 2 = F . With coefficients in this ring Gn , we have the matrix F whose image in Gnn is what deserves to be called the generic projective module with n generators. Let us reuse the notations of Theorem 1.7 in this particular case. Saying that rh rk = 0 in Gn (for 0 6 h 6= k 6 n) signifies that we have a membership rh (F )rk (F ) ∈ Gn (∗) in the ring Z[(fi,j )i,j∈J1..nK ]. This implies an algebraic identity that allows us to express this membership. This algebraic identity is naturally valid in all the commutative rings. It is therefore clear that if the membership (∗) 542 X. Finitely generated projective modules, 2 is satisfied in the generic case, it implies rh rk = 0 for any projection matrix over an arbitrary commutative ring. The same holds for the equalities rh u = 0 when u is a minor of order h + 1. In short: if Theorem 1.7 is satisfied in the generic case, it is satisfied in every case. As is often the case, we therefore observe that important theorems of commutative algebra do nothing other than affirm the existence of certain particular types of algebraic identities. 2. The semiring H+ 0 (A), and the ring of generalized ranks H0 (A) For a free module, by passing from the rank k to the rank polynomial X k , we pass from the additive notation to the multiplicative notation. For a general finitely generated projective module, we can conversely consider a “generalized rank” of the module, which is the (purely formal) logarithm in base X of its rank polynomial. Although this is just a simple play on notation, it so happens that computations with the ranks are facilitated by it. Let us explain how this works. The semiring of ranks Recall that we say that a polynomial R(X) = r0 + r1 X + · · · + rn X n is multiplicative when R(1) = 1 and R(XY ) = R(X)R(Y ). It amounts to the same to say that the ri ’s form a fundamental system of orthogonal idempotents, or that R(X) is the rank polynomial of a finitely generated projective module. 2.1. Notation. We denote by H+ 0 (A) the set of isomorphism classes of quasi-free modules over A, and [P ]H+ (A) (or [P ]A , or even [P ]) the 0 + class of such a module P in H+ 0 (A). The set H0 (A) is equipped with a semiring structure1 for the inherited laws of ⊕ and ⊗: [P ⊕ Q] = [P ] + [Q] and [P ⊗ Q] = [P ] · [Q]. For an idempotent e we will also write [e] instead of [eA], when the context is clear. The neutral element for the multiplication is [1]. 1 This means that the structure is given by an addition, commutative and associative, a multiplication, commutative, associative and distributive with respect to addition, with a neutral 0 for the addition and a neutral 1 for the multiplication. For example N is a semiring. §2. The ring of generalized ranks H0 (A) 543 Every quasi-free module P is isomorphic to a unique module2 (r1 A) ⊕ (r2 A)2 ⊕ · · · ⊕ (rn A)n , where the ri ’s are orthogonal idempotents, because then ei (P ) = ri . We Pn therefore have= [P ] = k=1 k [rk ] and its rank polynomial is RP (X) = r0 + r1 X + · · · + rn X n with r0 = 1 − (r1 + · · · + rn ). But while RP ⊕Q = RP RQ , we have [P ⊕ Q] = [P ] + [Q]: this assures the passage from the multiplicative notation to the additive notation. Thus the “logarithm in base X” of the multiplicative polynomial r0 +r1 X+· · ·+rn X n is Pn defined as the element k=1 k [rk ] of H+ 0 (A). 2.2. Definition. If M is a finitely generated projective A-module we call (generalized) rank and we denote by rkA (M ) or rk(M ) the unique element of H+ 0 (A) which has the same rank polynomial. Pn Thus if RM (X) = r0 + r1 X + · · · + rn X n , then rk(M ) = k=1 k [rk ]. The zero module is characterized by rk(M ) = 0 (Theorem V -8.4). If A is nontrivial, then [1] 6= [0] and N is identified with the subsemiring of H+ 0 (A) generated by [1] by means of the injection n 7→ n [1]. The above definition therefore does not conflict with the notion of rank for projective modules of constant rank, previously defined. Also note that when A is trivial we have H+ 0 (A) = 0: this indeed conforms with the convention according to which the zero module over the trivial ring has for rank any integer, since in H+ 0 (A), k = 0, or if we prefer, the two rank polynomials 1 and X k are equal over the trivial ring. Remark. A rule of practical computation regarding ranks is the following [r] + [r0 ] = [r + r0 ] if rr0 = 0, i.e. more generally [r] + [r0 ] = [r ∨ r0 ] + [r ∧ r0 ] = [r ⊕ r0 ] + 2 [r ∧ r0 ] (2) where the laws ∨, ∧ and ⊕ are those of the Boolean algebra of the idempotents of the ring: r ⊕ r0 = r + r0 − 2rr0 , r ∨ r0 = r + r0 − rr0 and r ∧ r0 = rr0 . Note that the two idempotents r ⊕ r0 and r ∧ r0 are orthogonal, of sum r ∨ r0 , and that the meaning of the equality (2) is given by the following isomorphisms 2 rA ⊕ r0 A ' (r ∨ r0 )A ⊕ (r ∧ r0 )A ' (r ⊕ r0 )A ⊕ (r ∧ r0 )A . Pn 2 We also have (Exercise II -14) P ' e1 A ⊕ · · · ⊕ en A with ek = divides ek+1 for 1 6 k < n. r , j=k j and ek 544 X. Finitely generated projective modules, 2 Exponential notation Please note that an is the result of evaluating the multiplicative polynon mial X n at the point a: X n (a) = alogX (X ) . Pn Thus, for a multiplicative polynomial R(X) = k=0 ek X k , whose logarithm Pn in base X is the element r = k=0 k [ek ], we adopt the following legitimate notations Pn • ar = k=0 ek ak = R(a), Ln • and for an A-module M , M r = k=0 ek M k . This is not a fancy: we indeed have 0 0 0 0 • ar+r = ar ar , arr = (ar )r , 0 0 0 0 0 • M r+r ' M r × M r and M rr ' M r ⊗ M r ' (M r )r , for arbitrary r, r0 in H+ 0 A. Symmetrization The additive monoid H+ 0 (A) is regular: either by McCoy’s lemma (Corollary III-2.3), or by one of the two uniqueness theorems IV -5.1 and IV -5.2 (page 202), or finally by item 3 of Theorem V -8.4. The semiring H+ 0 (A) can therefore be considered as a subsemiring of the ring obtained by symmetrization. This ring is called the ring of (generalized) ranks of finitely generated projective modules over A, and we denote it by H0 (A). P Every element of H0 (A) is expressed in the form k∈J k [rk ] where the rk ’s are pairwise orthogonal idempotents and J is a finite subset of Z \ {0}. P P The expression is unique in the following sense: if k∈J k [rk ] = k∈J 0 k [rk0 ], then rk = rk0 if k ∈ J ∩ J 0 , and the others are null. Multiplication of the ranks We have defined a multiplication on H+ 0 A, as the law inherited from the tensor product. This implies that for two idempotents e and e0 we have [e] · [e0 ] = [ee0 ]. The other product computations are deducted from it by distributivity. Hence the following fact. 2.3. Fact. The element 1 is the only invertible element of H+ 0 (A). P P P P J If r = k k[rk ] and s = k k[sk ], then rs = k k( i,j,ij=k [ri sj ]). By uniqueness of the expression, if rs = 1 = 1[1], then r1 s1 = 1 therefore r1 = s1 = 1.  §2. The ring of generalized ranks H0 (A) 545 We can ask ourselves which is the corresponding law on multiplicative polynomials; the readers will convince themselves that is it the law    R(X), R0 (X) 7→ R R0 (X) = R0 R(X) . We also have the following fact which stems from the upcoming Proposition 3.3. 2.4. Fact. If P and Q are two finitely generated projective modules, then P ⊗Q is a finitely generated projective module and rk(P ⊗Q) = rk(P )·rk(Q). Order relation over ranks The natural order relation associated with the monoid structure of H+ 0 A is described in the following proposition. 2.5. Proposition and definition. 1. For s, t ∈ H0 A we define s 6 t by ∃r ∈ H+ 0 A, s + r = t. 2. This relation gives to H0 A an ordered ring structure,3 and H+ 0 A is the non-negative subset of H0 A. 3. Let P and Q be finitely generated projective modules, the following properties are equivalent. a. rk(P ) 6 rk(Q). b. RP divides RQ in A[X]. c. RP divides RQ in B(A)[X]. d. For all s ∈ A, if Ps and Qs are free, then the rank of Ps is less or equal to that of Qs . e. For all k > i, ek (P ) · ei (Q) = 0. P f. For all k, ek (P ) · i>k ei (Q) = ek (P ). Example. Let us suppose that P ⊕ R = Q and that we know the ranks of P and Q, we want Pnto compute the rankPofmR. We have rk P = i=0 i [ri ] and rk Q = j=0 j [sj ]. We write  Pm  Pn P rk P = i [ri sj ] 6 i=0 i [ri ] j=0 [sj ] =  Pn  Pm P i,j rk Q = j [s ] [r ] = j j j=0 i=0 i i,j [ri sj ]. The ri sj ’s form a fundamental system of orthogonal idempotents and we obtain by subtraction, without having to think, the equalities  P Pm P rk(Q) − rk(P ) = rk(R) = i6j (j − i) [ri sj ] = k=0 k j−i=k [ri sj ] . 3 This means that > is a partial order relation compatible with the laws + and ×, more precisely • 1 > 0, • x > 0 and y > 0 imply x + y and xy > 0, • x > y ⇔ x − y > 0. 546 X. Finitely generated projective modules, 2 In the remainder of the text, we definitively drop the use of the word “generalized” when we speak of the rank of a finitely generated projective module. Remark. In classical mathematics, H0 (A) is often defined as the ring of locally constant (i.e. continuous) functions from Spec A to Z. A more detailed comment on the subject can be found on page 571. Other uses for the rank 2.6. Notations. 1. If ϕ ∈ LA (P, Q) with P , Q finitely generated projective, and if Im ϕ is a direct summand in Q we will denote rk(Im ϕ) by rk ϕ. 2. If p(X) is a pseudomonic polynomial of A[X], we can define its degree deg p as an element of H+ 0 (A). For item 1 we have Ker ϕ which is a direct summand in P and we obtain the generalizations of well-known equalities in the case of vector spaces over a discrete field rk(Ker ϕ) + rk ϕ = rk P and rk(Ker ϕ) + rk Q = rk(Coker ϕ) + rk P . In addition, in case of free modules, and for some rank r ∈ N, we indeed find the notion of rank of a matrix as defined in II -5.7. As for item 2, note that for two pseudomonic polynomials p and q we have the equality deg pq = deg p + deg q. This notion of degree is naturally extended to locally monic polynomials defined in Exercise 14. 3. Some applications of the local structure theorem In this section we consider results regarding finitely generated projective modules and some linear maps between those. Given the local structure theorem for finitely generated projective modules, and since the determinant and the related polynomials are well-behaved by change of base ring (Fact V -8.8), we have almost systematically all the desired results by means of the proof given in the following frame. J In the free module case, the result is easy to establish.  We will not always mention it in this section. NB: if in the hypothesis there is a locally simple linear map between two different modules, by the local structure theorem we are reduced to the case of a simple linear map. §3. Some applications of the local structure theorem 547 The proof works each time the result to be established is true if and only if it is true after localization at comaximal elements. Remark. If we must prove a result which, in the case of free modules, comes down to algebraic identities we can also suppose that the endomorphisms are diagonalizable. The argument here is different from the local structure theorem. The fact is that to check an algebraic identity it suffices to do so on a Zariski open set of the parameter space, and a generic matrix is diagonalizable by Proposition III -5.3. Trace of an endomorphism and new expression for the fundamental polynomial Recall that if M and N are two A-modules, we denote by θM,N the canonical linear map θM,N : M ? ⊗A N → LA (M, N ), (α ⊗ y) 7→ (x 7→ α(x)y). Also recall the following results (Fact V -2.2 and Proposition V -5.4). Let P be a finitely generated projective module. 1. θP,N is an isomorphism of P ? ⊗A N in LA (P, N ). 2. θN,P is an isomorphism of N ? ⊗A P in LA (N, P ). 3. The canonical homomorphism P → P ?? is an isomorphism. 4. The canonical homomorphism ϕ 7→ tϕ ; LA (N, P ) → LA (P ? , N ? ), is an isomorphism. If P is a finitely generated projective module, recall that the trace of the endomorphism ϕ of P (denoted by TrP (ϕ)) is the coefficient in X of the fundamental polynomial Fϕ (X). It can also be defined from the natural linear map trP : P ? ⊗A P → A : α ⊗ y 7→ α(y), and of the canonical isomorphism θP : P ? ⊗A P → End(P ), as follows TrP = trP ◦ θP −1 . (The reader will be able to observe that the two definitions coincide in the case of a free module, or to refer to Fact V -8.9.) When P and Q are finitely generated projective, the trace also allows us to define a canonical duality between LA (P, Q) and LA (Q, P ) by means of the bilinear map (ϕ, ψ) 7→ Tr(ϕ ◦ ψ) = Tr(ψ ◦ ϕ). This duality can also be defined by the canonical isomorphism (P ? ⊗A Q)? ' P ⊗A Q? . 548 X. Finitely generated projective modules, 2 3.1. Proposition. Let ϕ be an endomorphism of a finitely generated projective module P with n generators. The coefficients of the fundamental polynomial of ϕ are given by P Vh  h Fϕ (X) = 1 + h∈J1..nK Tr ϕ X . 3.2. Proposition. If P is a faithful finitely generated projective module, then the trace A-linear map TrP : End(P ) → A is surjective. Tensor product 3.3. Proposition. We consider two finitely generated projective Amodules P and Q. Let ϕ and ψ be endomorphisms of P and Q. The module P ⊗A Q is a finitely generated projective module. 1. We have the equality def det(ϕ ⊗ ψ) = (det ϕ)rk Q (det ψ)rk P = RQ (det ϕ) RP (det ψ). 2. The fundamental polynomial Fϕ⊗ψ (X) of ϕ⊗A ψ only depends on rk(P ), on rk(Q), on Fϕ , and on Fψ . 3. If Fϕ = (1 + λ1 X) · · · (1 + λm X), and Fψ = (1 + µ1 X) · · · (1 + µn X), Q we have the equality Fϕ⊗ψ (X) = i,j (1 + λi µj X). 4. In particular, rk(P ⊗ Q) = rk(P ) rk(Q). Please note that the last equality can be rewritten as P eh (P ⊗ Q) = jk=h ej (P )ek (Q). Also note that the previous proposition could be “directly” proven without making use of the local structure theorem, with a proof copied from that which was given for exterior powers (Proposition 1.2). Ranks and linear maps 3.4. Proposition. Let ϕ : P → Q be a linear map between finitely generated projective modules. 1. If ϕ is surjective, then P ' Ker ϕ ⊕ Q. If in addition rk(P ) = rk(Q), then ϕ is an isomorphism. 2. If ϕ is injective, then rk(P ) 6 rk(Q). J In item 2, it suffices to prove the inequality after localization at an element s which renders the two modules free. As localization preserves injectivity, we can conclude by the free module case (see Corollary II -5.23 and the remark that follows).  §3. Some applications of the local structure theorem 549 3.5. Corollary. Let P1 ⊆ P2 ⊆ P with P1 a direct summand in P . Then P1 is a direct summand in P2 . Consequently, if the modules are finitely generated projective, we have the equivalence rk(P1 ) = rk(P2 ) ⇐⇒ P1 = P2 . If in addition P1 ⊕ Q1 = P2 ⊕ Q2 = P , we have the equivalences rk(P1 ) = rk(P2 ) ⇐⇒ rk(Q1 ) = rk(Q2 ) ⇐⇒ P1 = P2 . Transitivity formulas 3.6. Notation. Let B be an A-algebra , strictly finite over A. Then [B : A] = rkA (B). Recall that by Fact VI -4.4, if B is strictly finite over A, and if P is a finitely generated projective B-module, then P is also a finitely generated projective A-module. When we take P to be a quasi-free module over B, by considering its rank over A it defines a homomorphism from the additive group H0 B to the additive group H0 A. This homomorphism is called the restriction homomorphism and it is denoted by RsB/A . We thus obtain a contravariant functor from a subcategory of commutative rings to that of Abelian groups. This is the category whose morphisms are the ρ : A → B which make of B a strictly finite algebra over A. Moreover, H0 defines a covariant functor from the category of commutative rings to that of semirings, since by scalar extension, a quasi-free module gives a quasi-free module. As H0 (C) is completely characterized by B(C) (for a categorical formulation, see Exercise 17), items 1 and 2 of the following fact completely describe the two functors which we have just spoken of. 3.7. Fact. Let ρ : A → B be an algebra.   1. For e ∈ B(A), we have H0 (ρ)([e]A ) = ρ(e) B in H0 B. In particular H0 (ρ) is injective (resp. surjective, bijective) if and only if the restriction of ρ to B(A) and B(B) is injective (resp. surjective, bijective). Now suppose that B is strictly finite over A. 2. For e ∈ B(B), RsB/A ([e]B ) = rkA (eB), and RsB/A (1) = [B : A]. 3. If a B-module P is quasi-free over both A and B, we simply obtain RsB/A ([P ]B ) = [P ]A . Remark. If A is connected and contains Z, we may pretend to consider H0 (A) ' Z as a subring of A. In item 2 above we then see that  RsB/A ([e]B ) = TrB/A (e) A (it suffices to consider the case where eB is free and has a free direct complement within B). 550 X. Finitely generated projective modules, 2 The following lemma generalizes Theorem II -5.29 (which handled the free case). 3.8. Lemma. (Transitivity formulas for the trace and the determinant) Let B be a strictly finite A-algebra and P be a finitely generated projective B-module. Let uB : P → P be a B-linear map, that we denote as uA when we consider it as an A-linear map. Then we have the fundamental equalities   detA (uA ) = NB/A detB (uB ) and Tr(uA ) = TrB/A Tr(uB ) . J Localizing at comaximal elements of A we can assume that B is a free A-module, of rank k. We write P ⊕ N = L ' Bn ' Ank , (the last isomorphism is an isomorphism of A-modules). We consider v = u ⊕ IdN ∈ EndB (L). Then, by definition of the determinant, we obtain the equalities detB (uB ) = detB (vB ) and detA (uA ) = detA (vA ). We can therefore apply the transitivity formula of Theorem II -5.29. The reasoning for the trace is similar.  ρ 3.9. Corollary. Let A −→ B be a strictly finite algebra, P a finitely generated projective B-module and uB ∈ EndB (P ).  1. CuA (X) = NB[X]/A[X] CuB (X) .  2. FuA (X) = NB[X]/A[X] FuB (X) . 3. In particular, the rank polynomials of P over A and  B are linked by RPA (X) = NB[X]/A[X] RPB (X) 4. The restriction homomorphism satisfies  RsB/A rkB (P ) = rkA (P ). 5. If P is a finitely generated projective A-module, then    rkB ρ? (P ) = H0 (ρ) rkA (P ) , and rkA ρ? (P ) = [B : A] rkA (P ). J Items 1, 2, 3 result from the previous lemma. 4. Item 3 tells us that the rank polynomial of P over A only depends on the rank polynomial of P over B. We can therefore assume that P is quasi-free over B and we apply the definition of the homomorphism RsB/A . Item 5 is left to the reader.  Another corollary is given by the following theorem. 3.10. Theorem. Let B be a strictly finite A-algebra and C be a strictly finite B-algebra. Then C is a strictly finite A-algebra and [C : A] = RsB/A ([C : B]). In particular, if H0 (A) is identified with a subring of H0 (B), and if the rank of C over B is an element of H0 (A), we have [C : A] = [B : A] [C : B]. §4. Grassmannians 551 Projective modules of rank 1 3.11. Fact. A matrix F ∈ Mn (A) is idempotent and of rank 1 if and only V2 if Tr(F ) = 1 and F = 0. J The proof is left to the reader.  3.12. Proposition. Let P be a projective A-module of constant rank 1. 1. The canonical homomorphisms A → End(P ), a 7→ µP,a and End(P ) → A, ϕ 7→ Tr(ϕ) are two reciprocal isomorphisms. 2. For all ϕ ∈ End(P ), we have det(ϕ) = Tr(ϕ). 3. The canonical homomorphism P ? ⊗A P → A is an isomorphism. 3.13. Proposition. Let M and N be two A-modules. If N ⊗A M is isomorphic to A, then M is a projective module of rank 1 and N is isomorphic to M ? . P J Let ϕ be an isomorphism of N ⊗A M over A. Let u = ni=1 ci ⊗ ai be the element of N ⊗ M such that ϕ(u) = 1. We have two isomorphisms from N ⊗ M ⊗ M to M , constructed from ϕ. c ⊗ a ⊗ b 7→ ϕ(c ⊗ a) b and c ⊗ a ⊗ b 7→ ϕ(c ⊗ b) a. This gives an isomorphism σ : M → M satisfying  σ ϕ(c ⊗ a) b = ϕ(c ⊗ b) a for all c ∈ N, a, b ∈ M, hence  P P P −1 (ai ). σ(x) = σ i ϕ(ci ⊗ ai )x = i ϕ(ci ⊗ x)ai , and x = i ϕ(ci ⊗ x)σ This shows that M is finitely generated projective, with the coordinate sys tem (u1 , . . . , un ), (α1 , . . . , αn ) , where ui = σ −1 (ai ) and αi (x) = ϕ(ci ⊗ x). Similarly, N is finitely generated projective. But 1 = rk(N ⊗ M ) = rk(N ) rk(M ), so M and N are of rank 1 (Fact 2.3). Finally, N ⊗ M ? ⊗ M ' N ' M ? .  4. Grassmannians The generic rings Gn and Gn,k We have defined the ring Gn = Gn (Z) = Z[(fij )i,j∈J1..nK ]/Gn on page 541. Actually the construction is functorial and we can define Gn (A) for every commutative ring A: Gn (A) = A[(fij )i,j∈J1..nK ]/Gn ' A ⊗Z Gn . Let rk = ek (Im F ) where F is the matrix (fi,j ) in Gn (A). If we impose in addition that the rank must be equal to k, we introduce the ideal Gn,k = Gn + h1 − rk i and we obtain the ring Gn,k = Z[F ]/Gn,k ' Gn [1/rk ] ' Gn /h1 − rk i . 552 X. Finitely generated projective modules, 2 We also have the version relativized to A: Gn,k (A) = A[F ]/Gn,k ' Gn (A)[1/rk ] ' A ⊗Z Gn,k . The ring Gn (A) is isomorphic to the product of the rings Gn,k (A). In the present subsection devoted to Gn,k we let h = n − k. If K is a field, the ring Gn,k (K) can be considered as the ring of coordinates of the affine variety AGn,k (K) whose points are the pairs (E1 , E2 ) of subspaces of Kn satisfying the equalities dim(E1 ) = k and Kn = E1 ⊕ E2 . In algebraic geometry, there are a few forceful arguments to affirm that the ring Gn,k (K) has all the right properties that we can imagine, with respect to the fact that the variety AGn,k (K) is a homogeneous space for an action of the linear group. We will find these results again “by hand” and by freeing ourselves of the hypothesis “K is a field.” By using the suitable localizations at the principal minors of order k of the matrix F = (fij ) (the sum of these minors is equal to 1 in Gn,k (A)), we will establish a few essential properties of the functor Gn,k . 4.1. Theorem. (The functor Gn,k ) 1. There exist comaximal elements µi of the ring Gn,k (A) such that each localized ring Gn,k (A)[1/µi ] is isomorphic to the ring A[(Xj )j∈J1..2hkK ][1/δ] for some δ which satisfies δ(0) = 1. 2. The natural homomorphism A → Gn,k (A) is injective. 3. If ϕ : A → B is a homomorphism, the kernel of Gn,k (ϕ) is generated by Ker ϕ. In particular, if ϕ is injective, so is Gn,k (ϕ). 4.2. Corollary. Let K be a discrete field and A be a ring. 1. The ring Gn,k (K) is integral, integrally closed, coherent, Noetherian regular, of Krull dimension 2kh. 2. If A is an integral ring (resp. reduced, pp-ring, pf-ring, normal, coherent Noetherian, coherent Noetherian regular) the same goes for Gn,k (A). 3. The Krull dimension of Gn,k (A) is equal to that of A[X1 , . . . , X2hk ]. 4. The ring Gn,k = Gn,k (Z) is integral, integrally closed, coherent Noetherian, regular, of (Krull) dimension 2kh + 1. Comment. In the corollary we have used the notion of a normal ring and that of a Krull dimension that we have not yet defined (see Sections XII -2 and XIII -2). Finally, a coherent ring is called regular when every finitely presented module admits a finite projective resolution (for this last notion see Problem 8). §4. Grassmannians 553 Proof sketch. If we make a principal minor of order k of F invertible, then the ring Gn,k (A) becomes isomorphic to a localized ring of a polynomial ring over A, therefore inherits all of the nice properties of A. For the fact that Gn,k (Z) is integral there is an added subtleness, because this is not a local property.  We now develop the above sketch. For the discrete field case we start with the following result. 4.3. Lemma. Let K be a discrete field and (E1 , E2 ) be a pair of complen mentary subspaces of dimensions k and   h in K . Ik L Suppose that in the matrix , the first k columns generate E1 and C Ih the last h columns generate E2 . 1. The matrices L and C are entirely determined by the pair (E1 , E2 ). 2. The matrix Ik − LC is invertible (we denote its inverse by V ). 3. The projection matrix over E  1 parallel to E2 is equal to V −V L F = . C V −C V L   0 J The uniqueness is clear. Let F = V 0 L be the matrix of the C W considered projection. It is characterized by the equality     Ik L Ik 0 F = , C Ih C 0 i.e. V + L0 C = Ik , V L + L0 = 0, C 0 + W C = C and C 0 L + W = 0, which is equivalent to L0 = −V L, W = −C 0 L, C 0 (Ik − LC) = C and V (Ik − LC) = Ik , or (Ik − LC)−1 = V , C 0 = CV , L0 = −V L, and W = −CV L.  This can be generalize to the case of a projection matrix of rank k over an arbitrary commutative ring as follows, which is a variant common to both the freeness lemma and the local freeness lemma. 4.4. Second freeness lemma. Let F be a projector in AGn (A); recall that k + h = n. 1. If rk(F ) 6 k and if a principal minor of order k is invertible, then the matrix F is similar to a standard projection matrix Ik,n .   V L0 2. More precisely, suppose that F = with V ∈ GLk (A). Let C0 W   V −L0 B= . 0 C Ih − W 554 X. Finitely generated projective modules, 2 −1 0 0 −1 Then, by letting  L = V  L and C = −C V , the matrix B is invertible, Ik L with inverse . In addition, we have the equalities C Ih −1 B F B = Ik,n , W = C 0 V −1 L0 , V = (Ik − LC)−1 , det V = det(Ih − W ) and Ih − W = (Ih − CL)−1 . 3. Conversely, if L ∈ Ak×h , C ∈ Ah×k and if Ik − LC is invertible with inverse V , then the matrix   V VL F = −C V −C V L is a projection of rank k; it is the projection overthe free submodule E1  Ik L generated by the first k columns of , parallel to the free C Ih submodule E2 generated by the last h columns of this matrix. J See Exercise 2 and its solution.  What we have gained relative to the first freeness lemma II -5.10 is that F is similar to Ik,n instead of simply being equivalent (however, see Exercise V -3), and most importantly, the precisions obtained here will be useful to us. The previous lemma can be reformulated as follows, in a more abstract form, but essentially equivalent (albeit less precise). 4.5. Lemma. (The ring Gn,k (A) is almost a polynomial ring) We consider the generic matrix F = (fij )i,j∈J1..nK in the ring Gn,k (A). Let  µ = det (fij )i,j∈J1..kK be its leading principal minor of order k. Moreover let A[L, C] be the polynomial ring in 2kh indeterminates, seen as coefficients of two matrices L and C of respective types k×h and h×k. Finally, let δ = det(Ik − LC) ∈ A[L, C]. Then the localized rings Gn,k (A)[1/µ] and A[L, C][1/δ] are naturally isomorphic.   V L0 J Let us write F in the form with V ∈ Mk (A). When we C0 W invert µ = det(V ) we get V ∈ GLk (A[1/µ]). Let L = V −1 L0 and C = −C 0 V −1 . By item 2 of Lemma 4.4, we have δ = det(Ik − LC) ∈ A× . This defines a morphism of A-algebras from A[L, C][1/δ] to Gn,k (A)[1/µ]. In the other direction: to L andC with δ being invertible we associate the V VL matrix F = (with V = (Ik − LC)−1 ). −C V −C V L The corresponding homomorphism goes from Gn,k (A)[1/µ] to A[L, C][1/δ]. By composing these morphisms we find the identity in both cases.  Proof of Theorem 4.1. 1. This item is deducted from the previous lemma since the sum of the principal minors of order k of F is equal to 1 in Gn,k (A). §4. Grassmannians 555 2. Consider the A-homomorphism ψ : A[(fi,j )] → A with specialization at Ik,n defined by ψ(fi,j ) = 1 if i = j ∈ J1..kK and = 0 otherwise. It is clear that ψ Gn,k (A) = 0. This proves that A ∩ Gn,k (A) = 0 because if a is in this intersection, a = ψ(a) = 0. 3. The kernel of ϕL,C : A[L, C] → B[L, C] (the natural extension of ϕ) is generated by the kernel of ϕ. The property remains true after localization. Then it remains true by gluing localizations at comaximal monoids. Therefore in our case we glue by saying that Ker Gn,k (ϕ) is generated by Ker ϕ.  Proof of Corollary 4.2. 2. Besides the integrality question this results from item 1 of Theorem 4.1, because all the considered notions are stable by A ; A[X] and stem from the basic local-global principle. As for the integrality, it is deducted from the result in the case of a discrete field; if A is integral and S = Reg(A), then K = Frac A = AS is a discrete field and item 3 of Theorem 4.1 allows us to conclude. 3. Given the concrete local-global principle for the Krull dimension (page 758), it suffices to show that A[L, C] and A[L, C][1/δ] have the same dimension, which result from Lemma 4.6 below. 1. Given items 2 and 3 it remains to show that Gn,k (K) is integral. In order to do so recall that SLn (K) operates transitively over AGn,k (K), which means that every projection matrix of rank k and of order n can be expressed in the form S · Ik,n · S −1 with S ∈ SLn (K). Let us introduce the ring of coordinates of the variety SLn (K) ⊆ Mn (K): SLn (K) = K[(si,j )i,j∈J1..nK ]/h1 − det Si . To the surjective map θK : SLn (K) → AGn,k (K) : S 7→ S · Ik,n · S −1 , corresponds the K-homomorphism θeK : Gn,k (K) → SLn (K), which sends each fi,j onto the coefficient i, j of the matrix S · Ik,n · S −1 . It is well-known that SLn (K) is integral, and it therefore suffices to show that θeK is injective. As θL is surjective for every finite extension L of K, every element of Ker θeK is nilpotent (by the Nullstellensatz4 ). However, Gn,k (K) is reduced, so θeK is injective. 4. Results from the other items (for the Krull dimension, Theorem XIII -8.20 is also required).  4 Here we give a constructive proof by assuming that K is contained in an algebraically closed discrete field. We could adapt it to the general case. 556 X. Finitely generated projective modules, 2 4.6. Lemma. Using the previous notations the ring A[L, C][1/δ] is a monogenic integral extension of a polynomial ring over A with 2kh indeterminates. Consequently Kdim A[L, C][1/δ] = Kdim A[X1 , . . . , X2kh ]. J Let L = (lij )i∈J1..kK,j∈J1..hK , C = (cij )i∈J1..hK,j∈J1..kK . The polynomial δ is of degree 2m with m = min(h, k) and contains the monomial (−1)m l11 . . . lmm c11 . . . cmm . 0 The localized ring A = A[L, C][1/δ] can be obtained by adjoining an indeterminate t: A0 = A[L, C, t]/htδ − 1i. We can put the polynomial g = tδ − 1 in Noether position. Indeed, with the change of variables 0 lii = lii + t, c0ii = cii + t, i ∈ J1..mK, 0 lij = lij , c0ij = cij if i 6= j, the polynomial g becomes, up to sign, monic in t. Therefore A0 is a monogenic integral extension of A[L0 , C 0 ]. We conclude with Theorem XIII -7.16. We will now study tangent spaces to grassmannians. For this we need to define the concept itself. We therefore begin with a heuristic introduction to abstract categorical and functorial notions. The readers unfamiliar with the language of categories will have to skip this introduction, in which we give practically no proofs, and simply try to convince themselves from the given examples that the notion of a tangent space to a functor at a point is, all in all, quite reasonable, which will allow us them to then see the beautiful application of this concept to grassmannians. Affine schemes, tangent spaces Nullstellensatz and equivalence of two categories Let (f ) = (f1 , . . . , fs ) be a polynomial system in k[X1 , . . . , Xn ] = k[X], and let A = k[x1 , . . . , xn ] = k[x] be the corresponding quotient algebra. We have seen on page 315 the crucial identification Homk (A, k) = Z(f , k) ⊆ kn between the zeros over k of the polynomial system (f ) and the characters of the algebra A. If k is reduced, we obviously have Homk (A, k) = Homk (Ared , k). Now suppose that k is a discrete algebraically closed field. Such a set of zeros Z(f , k) ⊆ kn is then called an algebraic variety over k. Let A and B be two quotient k-algebras corresponding to two polynomial systems (f ) and g in k[X] = k[X1 , . . . , Xn ]. The Nullstellensatz (Corollary III -9.8) tells us that the two reduced algebras Ared and Bred are equal if and only if they have the same variety of zeros in kn : §4. Grassmannians 557 Z(f , k) = Z(g, k) ⇐⇒ Dk[X] (f ) = Dk[X] (g) ⇐⇒ Ared = Bred This observation is the first step in the development of the equivalence between the category of finitely presented reduced k-algebras on the one hand, and that of algebraic varieties over k on the other. For the equivalence to be complete, we must also treat the morphisms. Therefore we provide a preliminary study regarding the algebra Ared . Notice that every element p of k[X] defines a polynomial function kn → k, ξ 7→ p(ξ), and that an element of Ared defines (by restriction) a function Z(f , k) → k; indeed, if p ≡ q mod Dk[X] (f ), a power of p − q is in the ideal f , so the restrictions of the polynomial functions p and q to Z(f , k) are equal. But in the case where k is an algebraically closed field, we have the converse; if the restrictions of p and q to Z(f , k) are equal, p − q vanishes over Z(f , k), and by Nullstellensatz, a power of p − q is in the ideal f . Thus, Ared can be interpreted as an algebra of functions over the algebraic variety that it defines, namely A = Z(f , k) = Homk (A, k). The k-algebra structure of Ared is indeed that of this algebra of functions. These functions Z(f , k) → k are called the regular functions. Similarly, if A = k[x1 , . . . , xn ] and C = k[y1 , . . . , ym ] are the quotient algebras corresponding to two polynomial systems (f ) in k[X1 , . . . , Xn ] and (h) in k[Y1 , . . . , Ym ], if A = Z(f , k) ⊆ kn and C = Z(h, k) ⊆ km are the corresponding algebraic varieties, we define a regular map from A to C as the restriction to A and C of a polynomial map ϕ : kn → km which sends A to C. The regular maps are, by definition, the morphisms from A to C in category of the algebraic varieties over k. We will denote by Mork (A, C) the set of these morphisms. The above map ϕ is given by a system (F1 , . . . , Fm ) in k[X], or by the homomorphism F : k[Y ] → k[X], Yj 7→ Fj . Let ϕ1 : A → C be the restriction of ϕ; if γ : C → k is a regular function, then the composite function γ ◦ ϕ1 : A → k is a regular function, and the map ψ1 : γ 7→ γ ◦ ϕ1 can be seen as a map from Cred to Ared . Actually, this map is none other than the homomorphism which comes from F by passage to the quotients. In the opposite direction, we can see that every homomorphism ψ1 : Cred → Ared comes from a homomorphism ψ : C → A, and that ψ defines a regular map ϕ : A → C, sometimes called the co-morphism of ψ. This takes place as follows: via the identifications A = Homk (A, k) and C = Homk (C, k), we simply have the equality ϕ(ξ) = ξ ◦ ψ (which makes of ϕ the “transpose” of ψ). 558 X. Finitely generated projective modules, 2 Finally, Mork (A, C), is naturally identified with Homk (Cred , Ared ), identification that we express under the form of an equality: Mork (A, C) = Homk (Cred , Ared ). However, note that the direction of the arrows is reversed. Let us consider as a special case the case where A is the algebraic variety reduced to a point, associated with the algebra k, corresponding to the empty polynomial system over the variable-free polynomial algebra k. If preferred, here we can see k as the quotient k[X]/hXi, corresponding to the point {0}, subvariety of the algebraic variety V = k associated with the algebra k[X]. In these conditions, the framed equality above admits as a special case C = Mork ({0} , C) = Homk (Cred , k). We have come full circle! The summary of this study is the following: we can entirely reduce the consideration of algebraic varieties over an algebraically closed field to the study of finitely presented reduced k-algebras. This is an interpretation in finite terms (finite polynomial systems over k for the objects as well as for the morphisms) of objects a priori slightly more mysterious, and certainly more infinite. In categorical terms: we can advantageously replace the category of algebraic varieties over k with the opposite category to that of finitely presented reduced k-algebras. There is a natural equivalence between these two categories. Affine schemes Now we take a big leap into abstraction. First of all we admit that varieties can have multiplicities. For example the intersection of a circle with a line must be a double point, and not only a point, when the line is tangent to the circle. Consequently, it is sometimes counterproductive to limit ourselves to reduced k-algebras. We also admit that our ring is not necessarily an algebraically closed field but an arbitrary commutative ring. In which case the points of the variety over k are not sufficient to characterize what we want to consider as an abstract algebraic variety defined over k (by allowing multiplicities). For example the abstract circle is certainly represented by the Z-algebra  Z[x, y] = Z[X, Y ] X 2 + Y 2 − 1 , but it is not its points over Z that will give us much information. On the contrary, it is its points over all the Z-algebras (i.e. over all the commutative rings) that matter. Similarly an abstract double circle is certainly represented by the Z-algebra  Z[x0 , y 0 ] = Z[X, Y ] (X 2 + Y 2 − 1)2 , §4. Grassmannians 559 but we would not know how to distinguish a simple circle from a double circle if we only consider the points over the reduced rings (the rings without multiplicity). We now can define the category of affine schemes over the commutative ring k. This could simply be the opposite category to the category of k-algebras; that whose objects are the k-algebras and whose arrows are the homomorphisms of k-algebras. But there exists a strictly more meaningful (and elegant?) equivalent description: an affine scheme over the commutative ring k is known when its zeros over all the k-algebras are known. In other words, the k-algebra A defines an affine scheme which is nothing other that the functor Homk (A, •) from the category of k-algebras to the category of sets. A homomorphism of k-algebras B → A defines a natural transformation from the functor Homk (A, •) to the functor Homk (B, •): natural transformations of functors are “in the right direction,” i.e. from the zeros of A to the zeros of B. If we do not want to abstract up too high, we can limit ourselves to finitely presented k-algebras, which is quite enough to make very beautiful abstract algebraic geometry (i.e. not limited to algebraic geometry over discrete fields). Tangent space at a point of a functor First of all recall the notion of a tangent space to a polynomial system at a zero of the system introduced in Section IX -4. Take the example of the sphere as an affine scheme defined over Q. This scheme is associated with the Q-algebra  A = Q[x, y, z] = Q[X, Y, Z] X 2 + Y 2 + Z 2 − 1 . If ξ = (α, β, γ) ∈ Q3 is a zero of A over Q, i.e. a rational point of the sphere, we associate to it • the ideal mξ = hx − α, y − β, z − γiA , • the local algebra Aξ = A1+mξ , and • the tangent space Tξ (A/Q) ' DerQ (A, ξ), which is a Q-vector space canonically isomorphic to (mξ /mξ 2 )? or to (mξ Aξ /mξ Aξ 2 )? . More intuitively but equivalently (Proposition IX -4.3), a tangent vector to the sphere at ξ is simply given by a (u, v, w) ∈ Q3 which satisfies uα + vβ + wγ = 0, i.e. by letting f = X 2 + Y 2 + Z 2 − 1, ∂f ∂f ∂f u ∂X (ξ) + v ∂Y (ξ) + w ∂Z (ξ) = 0. 560 X. Finitely generated projective modules, 2 Here is now a new way to see this tangent space, which we express in terms of corresponding affine schemes, i.e. of the functor HomQ (A, •) = Z(f, •). For this we must formally introduce an infinitesimal which we denote by ε, i.e. consider the Q-algebra Q[ε] = Q[T ] T 2 (ε is the class of T modulo T 2 ). The point ξ is seen as a character of A, i.e. as the element e ξ : g 7→ g(ξ) of HomQ (A, Q). We then ask ourselves what are the λ elements of the set HomQ (A, Q[ε]) that “lift e ξ,” in the sense that when composed with the evaluation of ε at 0, from Q[ε] to Q, we once again obtain e ξ. Q[ε] = ε:=0 A eξ  /Q Such an element is a priori given by a zero of f over Q[ε] which recovers ξ when we evaluate ε at 0, i.e. a triple (α + aε, β + bε, γ + cε), with f (α + aε, β + bε, γ + cε) = 0 in Q[ε]. But this means precisely that (a, b, c) is a tangent vector to the sphere at ξ. It is simply the substance of the mundane observation which states that “the differential is the linear component of the increase in the function”: f (ξ + εV ) = f (ξ) + ε df (ξ)(V ) mod ε2 . This zero ξ + ε(a, b, c) of A in k[ε] defines a homomorphism A → k[ε] via x 7→ α + aε, y 7→ β + bε, z 7→ γ + cε. ∂g ∂g ∂g This homomorphism sends g to g(ξ) + a ∂X (ξ) + b ∂Y (ξ) + c ∂Z (ξ), since  2 g ξ + ε(a, b, c) = g(ξ) + ε dg(ξ)(a, b, c) mod ε . The reader will be able to check that this little computation, which we have just performed on a small example, works for any zero of any polynomial system based on any commutative ring. However, we need to at least add how to interpret the k-module structure over the tangent space at a zero of a polynomial system over a ring k in terms of the functor Homk (A, •). Here also the use of our small example shall be sufficient. In the category of Q-algebras, the fiber product of the “restriction arrow” Q[ε] → Q, ε 7→ 0 which itself is the algebra Q[ε] ×Q Q[ε] ' Q[ε1 , ε2 ] with ε21 = ε1 ε2 = ε22 = 0, equipped with the two “projection ” homomorphisms π 1 Q[ε1 , ε2 ] −→ Q[ε], ε1 7→ ε, ε2 7→ 0 and π2 Q[ε1 , ε2 ] −→ Q[ε], ε2 7→ ε, ε1 7→ 0, §4. Grassmannians 561 and with the “restriction” arrow Q[ε1 , ε2 ] → Q, ε1 7→ 0, ε2 7→ 0. There is also a natural homomorphism “of addition” Q[ε1 , ε2 ] → Q[ε], ε1 7→ ε, ε2 7→ ε, which commutes with the restrictions. When we give two zeros ξ + εV1 and ξ + εV2 of A in Q[ε], given the characteristic property of the fiber product in the category of Q-algebras, the two corresponding homomorphisms A → Q[ε] uniquely factorize to give a homomorphism from A to Q[ε1 , ε2 ], the “fiber product of the two,” which corresponds to the zero ξ + ε1 V1 + ε2 V2 of A in Q[ε1 , ε2 ]. Finally, by composing this fiber product homomorphism with the addition homomorphism Q[ε1 , ε2 ] → Q[ε], we obtain the homomorphism corresponding to the zero ξ + ε(V1 + V2 ). We have therefore come full circle, the addition of tangent vectors has been described in purely categorical terms. Let us recap. In the case of the functor that is an affine scheme defined by a polynomial system over a ring k with its quotient algebra A, there is a canonical identification between Tξ (A/k ) and the set of points of A over k[ε] that lift ξ, when we identify ξ and ξ + εV with the corresponding elements of Homk (A, k) and Homk (A, k[ε]). In addition, the k-module structure in the second interpretation is given by the “addition” provided by the homomorphism k[ε1 , ε2 ] ' k[ε] ×k k[ε] → k[ε], 2 (ε = ε21 = ε22 ε1 7→ ε, ε2 7→ ε, = ε1 ε2 = 0). Note that the “external law,” multiplication by the scalar a, comes from the homomorphism λ a k[ε] −→ k[ε], b + εc 7→ b + εac. The formal mechanism of addition described thus will work with any other functor which will itself be willing to transform the fiber products (in the category of Q-algebras) into fiber products (in the category of sets). Thus the notion of a tangent space at a point of a functor5 generalizes to the other schemes over a ring k, because they are “good functors.” That is, the Grothendieck schemes (that we will not define here) are good functors. The Grassmannian functors (which have already been defined) are such schemes. 5 Functor from category of k-algebras to the category of sets. 562 X. Finitely generated projective modules, 2 Tangent spaces to the Grassmannians Projectors and ranks Two easy facts before entering the heart of the matter. Consider a module E. Two projectors π1 , π2 : E → E are said to be orthogonal if they satisfy π1 ◦ π2 = π2 ◦ π1 = 0. 4.7. Fact. If π1 , π2 : E → E are orthogonal projectors of images E1 and E2 , then π1 + π2 is a projector and its image is E1 ⊕ E2 . Consequently, when E is a finitely generated projective module, we obtain rk(π1 + π2 ) = rk(E1 ⊕ E2 ) = rk E1 + rk E2 . 4.8. Fact. Let π1 , π2 ∈ EndA (E) be two projectors of images E1 and E2 . Then the A-linear map Φ : End(E) → End(E), ϕ 7→ π2 ◦ ϕ ◦ π1 , is a projector whose image is isomorphic to LA (E1 , E2 ). Consequently, when E is a finitely generated projective module, we obtain the equality rk Φ = rk E1 · rk E2 . Affine Grassmannian This subsection is dedicated to the determination of the tangent space at a point to the functor A 7→ AGn (A). Recall that the acronym AG is used for “Affine Grassmannian.” The geometric interpretation of a point P of AGn (A) is given by the ordered pair (E, F ) = (Im P, Ker P ) of submodules as a direct sum in An . More generally, if k is a ring given as a reference (in usual geometry it would be a discrete field) and if M is a fixed finitely generated projective k-module, we can consider the category of k-algebras and the functor A 7→ AGM (A), where AGM (A) designates the set of ordered pairs (E, F ) of submodules as a direct sum in the extended module A ⊗k M , which we will denote by MA . Such a pair can be represented by the projection π : MA → MA over E parallel to F . The affine Grassmannian AGM (A) can therefore be seen as the subset of idempotent elements in EndA (MA ). It is this point of view that we adopt in the following. To study the tangent space we must consider the A-algebra A[ε] where ε is the generic element with null square. First of all we give the statement of the usual Grassmannian AGn (A). §4. Grassmannians 563 4.9. Theorem. (Tangent space to an affine Grassmannian) Let P ∈ AGn (A) be a projector of image E and of kernel F . For H ∈ Mn (A) we have the following equivalence. P + εH ∈ AGn (A[ε]) ⇐⇒ H = HP + P H. Let us associate to P the A-linear map Pb : Mn (A) → Mn (A) defined by Pb(G) = P G (In − P ) + (In − P ) G P. We have the following results. – The A-linear maps π1 : G 7→ P G (In − P ) and π2 : G 7→ (In − P ) G P are orthogonal projectors. In particular, Pb is a projector. – For H ∈ Mn (A), we have H = P H + HP if and only if H ∈ Im Pb. – The module Im Pb is canonically isomorphic to LA (E, F ) ⊕ LA (F, E). In particular, rk(Im Pb) = 2 rk E · rk F . In brief, the tangent space at the A-point P to the functor AGn is canonically isomorphic to the finitely generated projective module Im Pb (via H 7→ P + εH), itself canonically isomorphic to LA (E, F ) ⊕ LA (F, E). J The first item is immediate. Let VP be the submodule of matrices H which satisfy H = HP + P H. This module is canonically isomorphic to the tangent space that we are looking for. A simple computation shows that π1 and π2 are orthogonal projectors. Therefore Pb is a projector. The following equality is clear: P Pb(G) + Pb(G)P = Pb(G). Therefore Im Pb ⊆ VP . Moreover, if H = P H +HP , we have P HP = 0, so Pb(H) = P H +HP = H. Thus VP ⊆ Im Pb. In brief VP = Im Pb = Im π1 ⊕ Im π2 : the result follows by applying Fact 4.8.  We now give the general statement (the proof is identical). 4.10. Proposition. Let π ∈ AGM (A) be a projector of image E and of kernel F . For η ∈ EndA (MA ) we have the equivalence π + εη ∈ AGM (A[ε]) ⇐⇒ η = πη + ηπ. We associate to π the A-linear map π b : End(MA ) → End(MA ) defined by π b(ψ) = π ψ (I − π) + (I − π) ψ π. Then – The linear maps π1 : ψ 7→ π ψ (I − π) and π2 : ψ 7→ (I − π) ψ π are orthogonal projectors. In particular, π b is a projector. – An A-linear map η ∈ End(MA ) satisfies η = πη + ηπ if and only if η ∈ Im π b. – The module Im π b is canonically isomorphic to LA (E, F ) ⊕ LA (F, E). In particular, rk(Im π b) = 2 rk E · rk F . In short the tangent space at the A-point π to the functor AGM is canonically ∼ isomorphic to the finitely generated projective module Im π b (via η −→ π+εη), itself canonically isomorphic to LA (E, F ) ⊕ LA (F, E). 564 X. Finitely generated projective modules, 2 Projective Grassmannian This subsection is dedicated to the determination of the tangent space at a point to the functor A 7→ Gn (A), where Gn (A) designates the set of submodules which are direct summands in An . 4.11. Fact. (The space of projectors that have the same image as a given projector) Let P ∈ Gn (A) be a projector of image E. Let ΠE be the set of projectors that have E as their image, and V = An . Then ΠE is an affine subspace of Mn (A), having for “direction” the finitely generated projective A-module LA (V /E, E) (naturally identified with an A-submodule of Mn (A)). We specify the result as follows. 1. Let Q ∈ Gn (A) be another projector. Then Q ∈ ΠE if and only if P Q = Q and QP = P . In this case, the difference N = Q − P satisfy the equalities P N = N and N P = 0, and so N 2 = 0. 2. Conversely, if N ∈ Mn (A) satisfy P N = N and N P = 0 (in which case N 2 = 0), then Q := P + N is in ΠE . 3. In short, the set ΠE is identified with the A-module LA (V /E, E) via the affine map LA (V /E, E) → Mn (A), ϕ 7→ P + j ◦ ϕ ◦ π, where j : E → V is the canonical injection and π : V → V /E is the canonical projection. Additional information. 4. If Q ∈ ΠE , P and Q are conjugated in Mn (A). More precisely, by letting N = Q − P , we have (In + N )(In − N ) = In and (In − N )P (In + N ) = Q. 5. If Q ∈ ΠE , then for all t ∈ A, we have tP + (1 − t)Q ∈ ΠE . J 1. N 2 = 0 as seen when multiplying P N = N by N on the left-hand side. 3. The conditions P N = N and N P = 0 over the matrix N is equivalent to the inclusions Im N ⊆ E = Im P and E ⊆ Ker N . e which can be identified The matrices N of this type form an A-module E with the module LA (Ker P, Im P ) “by restriction of the domain and of the image.” e is also identified with LA (V /E, E) via the More intrinsically, this module E linear map LA (V /E, E) → Mn (A), ϕ 7→ j ◦ ϕ ◦ π, which is injective and e as its image. admits E 4. (In − N ) P (In + N ) = P (In + N ) = P + P N = P + N = Q.  §4. Grassmannians 565 4.12. Fact. Let E ∈ Gn (A) and E 0 ∈ Gn (A[ε]) which gives E by the specialization ε 7→ 0 (in other words E 0 is a point of the tangent space at E to the functor Gn ). Then E 0 is isomorphic to the module obtained from E by scalar extension: E 0 ' A[ε] ⊗A E. J By Theorem 5.10, a finitely generated projective module M over a ring B is characterized, up to isomorphism, by its “reduction” Mred (i.e. the module obtained by scalar extension to Bred ). However, E 0 and A[ε] ⊗A E have the same reduction Ered to (A[ε])red ' Ared .  4.13. Theorem. (Tangent space to a projective Grassmannian) Let E ∈ Gn (A) be an A-submodule which is a direct summand in An = V . Then the tangent space at the A-point E to the functor Gn is canonically isomorphic to LA (E, V /E). More precisely, if ϕ ∈ LA (E, V /E) and if we let Eϕ = { x + εh | x ∈ E, h ∈ V, h ≡ ϕ(x) mod E } , then ϕ 7→ Eϕ is a bijection from the module LA (E, V /E) to the set of matrices E 0 ∈ Gn (A[ε]) that give E when we specialize ε at 0. J Let E ∈ Gn (A) and ϕ ∈ LA (E, V /E). Let us first show that Eϕ is in Gn (A[ε]) and above E. Let us fix a matrix P ∈ AGn (A) satisfying E = Im P . We therefore have V = E ⊕ Ker P and an isomorphism V /E ' Ker P ⊆ V . We can therefore lift the linear map ϕ at a matrix H ∈ Mn (A) = End(V ) in accordance with the diagram V  E H ϕ /V O ? / V /E The matrix H satisfies P H = 0 and H(In − P ) = 0, i.e. HP = H. It suffices to show that P + εH is a projector of image Eϕ . For the inclusion Im(P + εH) ⊆ Eϕ , let (P + εH)(y + εz) with y, z ∈ V : (P + εH)(y + εz) = P y + ε(Hy + P z) = P y + ε(HP y + P z) = x + εh, with x = P y ∈ E, h = Hx + P z. Since x ∈ E, we have ϕ(x) = Hx, and so h ≡ ϕ(x) mod E. For the converse inclusion, let x + εh ∈ Eϕ and let us show that (P + εH)(x + εh) = x + εh: (P + εH)(x + εh) = P x + ε(Hx + P h). As x ∈ E, we have P x = x. We need to see that Hx + P h = h, but h is of the form h = Hx + y with y ∈ E, so P h = 0 + P y = y and we indeed have the equality h = Hx + P h. Finally, it is clear that P + εH is a projector (P + εH)(P + εH) = P 2 + ε(HP + P H) = P + εH. 566 X. Finitely generated projective modules, 2 Let us show the surjectivity of ϕ 7→ Eϕ . Let E 0 ⊆ A[ε]n , a direct summand, above E. Then E 0 is the image of a projector P + εH and we have (P + εH)(P + εH) = P 2 + ε(HP + P H), so P 2 = P and HP + P H = H, which gives P HP = 0 (multiply HP +P H = H by P on the right-hand side, for instance). We therefore see that P is a projector of image E (because E 0 , for ε := 0, it is E). We replace H with K = HP , which satisfies KP = (HP )P = K, P K = P (HP ) = 0. This does not change the image of P + εH, i.e. Im(P + εH) = Im(P + εK). To see this, it suffices (and is necessary) to show that (P + εH)(P + εK) = P + εK, (P + εK)(P + εH) = P + εH. On the left-hand side, we obtain P +ε(HP +P K) = P +ε(HP +0) = P +εK; On the right-hand side, P + ε(KP + P H) = P + ε(K + P H) = P + ε(HP + P H) = P + εH. The matrix K satisfies KP = K, P K = 0 and represents a linear map ϕ : E → An /E with E 0 = Im(P + εK) = Eϕ . Let us prove the injectivity of ϕ 7→ Eϕ . Therefore suppose Eϕ = Eϕ0 . We fix a projector P ∈ Gn (A) with image E and we encode ϕ as H, ϕ0 as H 0 with HP = H, P H = 0, H 0 P = H 0 , P H 0 = 0. As P + εH and P + εH 0 have the same image, we have the equalities (P + εH)(P + εH 0 ) = P + εH 0 and (P + εH 0 )(P + εH) = P + εH. The equality on the right gives H = H 0 , so ϕ = ϕ0 .  Remark. The projection AGn → Gn associates to P its image E = Im P . Here is how the tangent spaces and the projection (with F = Ker P ) are organised TP (AGn , A)  TE (Gn , A) ∼ ∼ LA (E, F ) ⊕ LA (F, E) LA (E, An/E) ∼ ∼ {H ∈ Mn (A) | H = HP + P H}  H7→K=HP {K ∈ Mn (A) | KP = K, P K = 0} 5. Grothendieck and Picard groups Here we tackle the general problem of the complete classification of finitely generated projective modules over a fixed ring A. This classification is a fundamental but difficult problem, which does not admit a general algorithmic solution. We start by stating some waymarks for the case where all the projective modules of constant rank are free. §5. Grothendieck and Picard groups 567 In the following subsections we give a very small introduction to classic tools that allow us to apprehend the general problem. When the projective modules of constant rank are free Let us begin with an elementary remark. 5.1. Fact. A projective A-module of rank k is free if and only if it is generated by k elements. J The condition is clearly necessary. Now suppose the module generated by k elements. The module is therefore the image of a projection matrix F ∈ Mk (A). By hypothesis det(Ik + XF ) = (1 + X)k . In particular, det F = 1, so F is invertible, and since F 2 = F , this gives F = Ik .  Here is another easy remark. 5.2. Fact. Every projective A-module of constant rank is free if and only if every projective A-module is quasi-free. J The condition is clearly sufficient. If every projective A-module of constant rank is free and if P is projective, let (r0 , . . . , rn ) be the corresponding fundamental system of orthogonal idempotents. Then Pk = rk P ⊕(1−rk )Ak is a projective A-module of rank k therefore free. Let Bk be a base, the k “component” rk Bk is in rk P , and rk P ' (rk A) . Since P is the direct sum of the rk P , it is indeed quasi-free.  5.3. Proposition. Every projective module of constant rank over a local-global ring is free. J Already seen in Theorem IX -6.9.  5.4. Theorem. Every finitely generated projective module over a Bézout domain is free. Every finitely generated projective module of constant rank over a Bézout pp-ring is free. J Let us consider the integral  case. A  presentation matrix of the module T 0 where T is triangular with regular 0 0 elements over the diagonal (see Exercise IV -6). As the determinantal ideals of this matrix are idempotents the determinant δ of T is a regular element 2 which satisfies δA  = δ A. Thus δ is invertible and the presentation matrix Ik 0 is equivalent to . 0 0 For the pp-ring case we apply the elementary local-global machinery explained on page 204.  can be reduced to the form Let us take note of another important case: A = B[X1 , . . . , Xn ] where B is a Bézout domain. This is a remarkable extension of the Quillen-Suslin 568 X. Finitely generated projective modules, 2 theorem, due to Bass (for n = 1), then Lequain and Simis [123]. The theorem will be proved in Section XVI -6. e (A) GK0 (A), K0 (A) and K 0 Let GK0 A be the set of isomorphism classes of finitely generated projective modules over A. It is a semiring for the inherited laws of ⊕ and ⊗. The G of GK0 is in tribute to Grothendieck. Every element of GK0 A can be represented by an idempotent matrix with coefficients in A. Every ring homomorphism ϕ : A → B induces a homomorphism GK0 ϕ : GK0 A → GK0 B. So GK0 is a covariant functor from the category of commutative rings to the category of semirings. We have GK0 (A1 × A2 ) ' GK0 A1 × GK0 A2 . The passage from a projective module to its dual defines an involutive automorphism of GK0 A. If P is a finitely generated projective A-module we can denote by [P ]GK0 A the element of GK0 A that it defines. The subsemiring of GK0 A generated by 1 (the class of the finitely generated projective module A) is isomorphic to N, except in the case where A is the trivial ring. As a subsemiring of GK0 A we also have the one generated by the isomorphism classes of the modules rA where r ∈ B(A), isomorphic to  + + H0 (A). We easily obtain the isomorphism H0 (A) ' GK0 B(A) . Moreover, the rank defines a surjective homomorphism of semirings GK0 A → H+ 0 (A), + and the two homomorphisms H+ (A) → GK A → H (A) are composed 0 0 0 according to the identity. The Picard group Pic A is the subset of GK0 A formed by the isomorphism classes of the projective modules of constant rank 1. By Propositions 3.12 and 3.13 this is the group of invertible elements of the semiring GK0 A (the “inverse” of P is the dual of P ). The (commutative) additive monoid of GK0 A is not always regular. To obtain a group, we symmetrize the additive monoid GK0 A and we obtain the Grothendieck group that we denote by K0 A. The class of the finitely generated projective module P in K0 A is denoted by [P ]K0 (A) , or [P ]A , or even [P ] if the context allows it. Every element of K0 A is written in the form [P ] − [Q]. More precisely, it can be represented under the two forms • [projective] - [free] on the one hand, • [free] - [projective] on the other hand. Indeed [P ] − [Q] = [P ⊕ P 0 ] − [Q ⊕ P 0 ] = [P ⊕ Q0 ] − [Q ⊕ Q0 ], with a choice of P ⊕ P 0 or Q ⊕ Q0 being free. §5. Grothendieck and Picard groups 569 The defined product in GK0 A gives by passage to the quotient a product in K0 A, which therefore has a commutative ring structure.6 The classes of two finitely generated projective modules P and P 0 are equal in K0 A if and only if there exists an integer k such that P ⊕ Ak ' P 0 ⊕ Ak . We say in this case that P and P 0 are stably isomorphic . Two stably isomorphic quasi-free modules are isomorphic, so that H0 A is identified with a subring of K0 A, and when P is quasi-free, there is no conflict between the two notations [P ]A (above and page 542). Two stably isomorphic finitely generated projective modules P and P 0 have the same rank since rk(P ⊕ Ak ) = k + rk(P ). Consequently, the (generalized) rank of the finitely generated projective modules defines a e 0 A be its kernel. surjective ring homomorphism rkA : K0 A → H0 A. Let K The two homomorphisms H0 A → K0 A → H0 A are composed in terms of the identity, in other words the map rkA is a character of the H0 (A)-algebra K0 A and we can write e 0 (A). K0 (A) = H0 (A) ⊕ K e 0 A of K0 A concentrates a good part of the mysThe structure of the ideal K tery of classes of stable isomorphism of finitely generated projective modules, since H0 A presents no mystery (it is completely decrypted by B(A)). In this framework the following result can be useful (cf. Problem 2). e 0 A is the nilradical of K0 A. 5.5. Proposition. The ideal K Finally, note that if ρ : A → B is a ring homomorphism, we obtain correlative homomorphisms e0 ρ : K e0 A → K e 0 B and H0 ρ : H0 A → H0 B. K0 ρ : K0 A → K0 B, K e And K0 , K0 and H0 are functors. The Picard group The Picard group is not affected by the passage to the classes of stable isomorphism, because of the following fact. 5.6. Fact. Two stably isomorphic projective modules of constant rank 1 are isomorphic. In particular, a stably free module of rank 1 is free. More precisely, for a projective module P of consant rank 1 we have ^k+1 P ' (P ⊕ Ak ). (3) In particular, Pic A is identified with a subgroup of (K0 A)× . 6 When the ring A is not commutative, there is no more multiplicative structure over GK0 A. This explains why the usual terminology is Grothendieck group and not Grothendieck ring. 570 X. Finitely generated projective modules, 2 J Let us prove the isomorphism: it results from general isomorphisms given in the proof of Proposition 1.2 (equation (1)). For arbitrary A-modules P , Q, R, . . . , the consideration of the universal property that defined the exterior powers leads to V2 V2 V2 (P ⊕ Q) ' P ⊕ (P ⊗ Q) ⊕ Q,  V3 V3 V3 V3 V2 (P ⊕Q⊕R) ' P⊕ Q⊕ R⊕ P ⊗ Q ⊕ · · · ⊕ (P ⊗ Q ⊗ R), V0 with the following general formula by agreeing that (Pi ) = A ^km ^k Mm M  ^k1    Pm . Pi ' P1 ⊗ · · · ⊗ (4) i=1 Pm i=1 ki =k In particular, if P1 , . . . , Pr are projective modules of constant rank 1 we obtain ^r (P1 ⊕ · · · ⊕ Pr ) ' P1 ⊗ · · · ⊗ Pr . (5) It remains to apply this with the direct sum P ⊕ Ak = P ⊕ A ⊕ · · · ⊕ A. The isomorphism of Equation (3) is then obtained with the A-linear map Vk+1 P → (P ⊕ Ak ), x 7→ x ∧ 11 ∧ 12 ∧ · · · ∧ 1k , where the index represents the position in the direct sum A ⊕ · · · ⊕ A. The last affirmation is then clear since we have just shown that the map GK0 A → K0 A, restricted to Pic A, is injective.  Remark. The reader will be able to compare the previous result and its proof with Exercise V -13. We deduce the following theorem. e 0 A) Suppose that every A-projective module 5.7. Theorem. (Pic A and K of constant rank k + 1 (k > 1) is isomorphic to a module Ak ⊕ Q. Then the e 0 A, +) defined by map from (Pic A, ×) to (K [P ]Pic A 7→ [P ]K0 A − 1K0 A is a group isomorphism. In addition, GK0 A = K0 A and its structure is entirely known from that of Pic A. J The map is injective by Fact 5.6, and surjective by hypothesis. It is a group homomorphism because A ⊕ (P ⊗ Q) ' P ⊕ Q, also in virtue of Fact 5.6, since ^2 ^2  A ⊕ (P ⊗ Q) ' P ⊗ Q ' (P ⊕ Q).  Note that the law of Pic A is inherited from the tensor product whilst that e 0 A is inherited from the direct form. We will see in Chapter XIII that of K the hypothesis of the theorem is satisfied for rings of Krull dimension 6 1. §5. Grothendieck and Picard groups 571 Comment. We have seen in Section 2 how the structure of H0 (A) directly stems from that of the Boolean algebra B(A). From the classical mathematics’ point of view the Boolean algebra B(A) is the algebra of the open and closed sets in Spec A (the set of prime ideals of A equipped with a suitable topology, cf. Chapter XIII). An element of B(A) can therefore be seen as the characteristic function of an open-closed set of Spec A. Then the way in which we construct H0 (A) from B(A) shows that H0 (A) can be seen as the ring of functions with integer values, integral linear combinations of elements in B(A). It follows that H0 (A) is identified with the algebra of locally constant functions, with integer values, over Spec A. Still from the point of view of classical mathematics the (generalized) rank of a finitely generated projective A-module P can be seen as the function (with values in N) defined over Spec A as follows: to a prime ideal p we associate the rank of the free module Pp (over a local ring all the finitely generated projective modules are free). The ring H0 (A) is indeed obtained simply by symmetrizing the semiring H+ 0 (A) of the ranks of finitely generated projective A-modules. Picard group and class group of a ring Let us consider the multiplicative monoid of the finitely generated fractional ideals of the ring A, formed by the finitely generated A-submodules of the total ring of fractions Frac A. We will denote this monoid by Ifr A. More generally a fractional ideal of A is an A-submodule b of Frac A such that there exists some regular b in A satisfying b b ⊆ A. In short we can see Ifr A as the monoid obtained from that of the finitely generated ideals of A by forcing the invertibility of the principal ideals generated by regular elements. An ideal a ∈ Ifr A is sometimes said to be integral if it is contained in A, in which case it is a finitely generated ideal of A in the usual sense. An arbitrary ideal a of A is invertible like an ideal of A (in the sense of Definition III -8.19) if and only if it is an invertible element in the monoid Ifr A. Conversely every ideal of Ifr A invertible in this monoid is of the form a/b, where b ∈ A is regular and a is an invertible ideal of A. The invertible elements of Ifr A form a group, the group of invertible fractional ideals of A, which we will denote by Gfr A. As an A-module, an invertible fractional ideal is projective of constant rank 1. Two invertible ideals are isomorphic as A-modules if they are equal modulo the subgroup of invertible principal ideals (i.e. generated by a regular element of Frac A). We denote by Cl A the quotient group, that we call the group of classes of invertible ideals, or simply the class group of the ring A, and we obtain a well-defined natural map Cl A → Pic A. 572 X. Finitely generated projective modules, 2 Moreover, let us consider an integral and invertible ideal a. Since a is flat, the natural map a ⊗A b → ab is an isomorphism, for any ideal b (Theorem VIII -1.11). Thus, the map Cl A → Pic A is a group homomorphism, and it is clearly an injective homomorphism, so Cl A is identified with a subgroup of Pic A. These two groups are often identical as the following theorem shows, which results from the previous considerations and from Theorem 1.11. 5.8. Theorem. (Modules of constant rank 1 as ideals of A) Suppose that over Frac A every projective module of rank 1 is free. 1. Every projective A-module of rank 1 is isomorphic to an invertible ideal of A. 2. Every projective ideal of rank 1 is invertible. 3. The group of classes of invertible ideals is naturally isomorphic to the Picard group. J Theorem 1.11 shows that every projective module of rank 1 is isomorphic to an ideal a. It therefore remains to see that such an ideal is invertible. Since it is locally principal it suffices to show that it contains a regular element. For this we consider an integral ideal b isomorphic to the inverse of a in Pic A. The product of these two ideals is isomorphic to their tensor product (because a is flat) so it is a free module, thus it is a principal ideal generated by a regular element.  NB: With regard to the comparison of Pic A and Cl A we will find a more general result in Exercise 16. The semirings GK0 (A), GK0 (Ared ) and GK0 (A/Rad A) In this subsection we use Rad A, the Jacobson radical of A, which is defined on page 487. We compare the finitely generated projective modules defined over A, those defined over A0 = A/Rad A and those defined over Ared . The scalar extension from A to B transforms a finitely generated projective module defined over A into a finitely generated projective module over B. From a projection matrix point of view, this corresponds to considering the matrix transformed by the homomorphism A → B. 5.9. Proposition. The natural homomorphism from GK0 (A) to GK0 (A/Rad A ) is injective, which means that if two finitely generated projective modules E, F over A are isomorphic over A0 = A/Rad A , they also are over A. More precisely, if two idempotents matrices P , Q of the same format are conjugated over A0 , they also are over A, with an automorphism which lifts the residual conjugation automorphism. §5. Grothendieck and Picard groups 573 J Denote by x the object x seen modulo Rad A. Let C ∈ Mn (A) be a matrix such that C conjugates P with Q. Since det C is invertible modulo Rad A, det C is invertible in A and C ∈ GLn (A). So we have Q = C P C −1 . Even if it means replacing P with C P C −1 we can assume Q = P and C = In . In this case we search an invertible matrix A such that A = In and AP A−1 = Q. We remark that QP encodes an A-linear map from Im P to Im Q that residually gives the identity. Similarly (In − Q)(In − P ) encodes an A-linear map from Ker P to Ker Q that residually gives the identity. Taking inspiration from the enlargement lemma (Lemma V -2.10), this leads us to the matrix A = QP + (In − Q)(In − P ) which realizes AP = QP = QA and A = In , so A is invertible and AP A−1 = Q. For two residually isomorphic finitely generated projective modules E and F we use the enlargement lemma which allows us to realize E and F as images of idempotents conjugated matrices of the same format.  As for the reduction modulo the nilpotents, we obtain in addition the possibility to lift every finitely generated projective module on account of Corollary III -10.4. Hence the following theorem. 5.10. Theorem. The natural homomorphism GK0 (A) → GK0 (Ared ) is an isomorphism. More precisely, we have the following results. 1. a. Every idempotent matrix over Ared is lifted to an idempotent matrix over A. b. Every finitely generated projective module over Ared comes from a finitely generated projective module over A. 2. a. If two idempotent matrices of the same format are conjugated over Ared , they also are over A, with an automorphism which lifts the residual conjugation automorphism. b. Two finitely generated projective modules over A isomorphic over Ared , are also isomorphic over A. The Milnor square A commutative square (in an arbitrary category) of the following style A i2 / A2 j1  / A0 j2 i1  A1 is called a Cartesian square if it defines (A, i1 , i2 ) as the limit (or inverse limit, or projective limit) of (A1 , j1 , A0 ), (A2 , j2 , A0 ). In an equational 574 X. Finitely generated projective modules, 2 category we can take A = { (x1 , x2 ) ∈ A1 × A2 | j1 (x1 ) = j2 (x2 ) } . The reader will verify for example that given A ⊆ B and an ideal f of A which is also an ideal of B (in other words, f is contained in the conductor of B into A), we have a Cartesian square of commutative rings, defined below. / B A  A/f  / B/f Let ρ : A → B be a homomorphism, M be an A-module and N be a B-module. Recall that an A-linear map α : M → N is a scalar extension morphism (cf. Definition IV -4.10) if and only if the natural B-linear map ρ? (M ) → N is an isomorphism. In the entirety of this subsection we consider in the category of commutative rings the “Milnor square” below on the left, denoted by A, in which j2 is surjective, ψ2 i2 / A2 / M2 / E2 A M E i1  A1 A j1 j2  / A0 ϕ2 ψ1  M1 ϕ1  / M0  E1 j2 ? h◦j1 ?  / E0 Given an A-module M , an A1 -module M1 , an A2 -module M2 , an A0 module M 0 and a Cartesian square of A-modules as the one illustrated in the center above, the latter is said to be adapted to A, if the ψi ’s and ϕi ’s are scalar extension morphisms. Given an A1 -module E1 , an A2 -module E2 , and an isomorphism of A0 -modules h : j1 ? (E1 ) → j2 ? (E2 ) = E 0 , let M (E1 , h, E2 ) = E (above on the right-hand side) be the A-module limit of the diagram   E1 , h ◦ j1 ? , j2 ? (E2 ) , E2 , j2 ? , j2 ? (E2 ) Note that a priori the obtained Cartesian square is not necessarily adapted to A. 5.11. Theorem. (Milnor’s theorem) 1. Suppose that E1 and E2 are finitely generated projective, then a. E is finitely generated projective, b. the Cartesian square is adapted to A: the natural homomorphisms jk ? (E) → Ek (k = 1, 2) are isomorphisms. 2. Every finitely generated projective module over A is obtained (up to isomorphism) by this procedure. §5. Grothendieck and Picard groups 575 We will need the following lemma. 5.12. Lemma. Let A ∈ Am×n , Ak = ik (A) (k = 1, 2), A0 = j1 (A1 ) = j2 (A2 ), K = Ker A ⊆ An , Ki = Ker Ai (i = 1, 2), K 0 = Ker A0 . Then K is the limit (as an A-module) of K1 → K 0 and K2 → K 0 . J Let x ∈ An , x1 = j1 ? (x) ∈ An1 , x2 = j2 ? (x) ∈ An2 . Since x ∈ K if and only if xi ∈ Ki for i = 1, 2, K is indeed the desired limit.  The reader will notice that the lemma does not apply in general to the submodules that are images of matrices. Proof of Theorem 5.11. 2. If V ⊕ W = An , let P be the projective matrix over V parallel to W . If V1 , V2 , V 0 are the modules obtained by scalar extension to A1 , A2 and A0 , they are identified with kernels of the matrices P1 = i1 (In − P ), P2 = i2 (In − P ), P 0 = j2 (In − P2 ) = j1 (In − P1 ), and the lemma applies: V is the limit of V1 → V 0 and V2 → V 0 . The isomorphism h is then IdV 0 . This “miracle” takes place thanks to the identification of ji ? (Vi ) and Ker Pi . 1a. Let Pi ∈ Mni (Ai ) be a projector with image isomorphic to Ei (i =  1, 2). We dispose of an isomorphism of A0 -modules from Im j1 (P1 ) ∈  Mn1 (A0 ) to Im j2 (P2 ) ∈ Mn2 (A0 ). Let n = n1 + n2 . By the enlargement lemma V -2.10 there exists a matrix C ∈ En (A0 ) realizing the conjugation  Diag(j1 (P1 ), 0n2 ) = C Diag 0n1 , j2 (P2 ) C −1 . Since j2 is surjective (ha ha!), C is lifted to a matrix C2 ∈ En (A2 ). Let Q1 = Diag(P1 , 0n2 ), Q2 = C2 Diag(0n1 , P2 ) C2−1 , such that j1 (Q1 ) = j2 (Q2 ) (not bad, right?). There then exists a unique matrix Q ∈ Mn (A) such that i1 (Q) = Q1 and i2 (Q) = Q2 . The uniqueness of Q assures Q2 = Q, and the previous lemma applies to show that Im Q is isomorphic to E (hats off to you, Mr Milnor!). 1b. Results from the fact that Qk = ik (Q) and Im Qk ' Im Pk ' Ek for k = 1, 2.  The following fact is purely categorical and left to the good will of the reader. 5.13. Fact. Given two Cartesian squares adapted to A as found below, it amounts to the same thing to take a linear map θ from E to F or to take three linear maps (for the corresponding rings) θ1 : E1 → F1 , θ2 : E2 → F2 576 X. Finitely generated projective modules, 2 and θ0 : E 0 → F 0 which make the adequate squares commutative. / E1 E θ1 θ  E2  / E0 +F +/ F 1  +F 2  +/ F 0 θ0 θ2 5.14. Corollary. Consider two modules E = M (E1 , h, E2 ) and F = M (F1 , k, F2 ) like in Theorem 5.11. Every homomorphism ψ of E in F is obtained using two Ai -module homomorphisms ψi : Ei → Fi compatibles with h and k in the sense that the diagram below is commutative. The homomorphism ψ is an isomorphism if and only if ψ1 and ψ2 are isomorphisms. j1 ? (E1 ) j1 ? (ψ1 ) h  j2 ? (E2 ) / j1 ? (F1 ) k j2 ? (ψ2 )  / j2 ? (F2 ) 6. A nontrivial example: identification of points on the affine line Preliminaries Consider a commutative ring k, the affine line over k corresponds to the k-algebra k[t] = B. Given s points α1 , . . . , αs of k and orders of multiplicity e1 , . . . , es > 1, we formally define a k-algebra A which represents the result of the identification of these points with the given multiplicities.  A = f ∈ B f (α1 ) = · · · = f (αs ), f [`] (αi ) = 0, ` ∈ J1, ei K, i ∈ J1..sK In this definition f [`] represents the Hasse derivative of the polynomial f (t), i.e. f [`] = f (`) /`! (formally, because the characteristic can be finite). The Hasse derivatives allow us to write a Taylor formula for any ring k. P Q Let e = i ei , x0 = i (t − αi )ei and x` = t` x0 for ` ∈ J0..e − 1K. Suppose e > 1 without which A = B. It is clear that the x` ’s are in A. We also assume that the αi − αj ’s are invertible for i 6= j. We then have by the Chinese remainder theorem a surjective homomorphism  Q ϕ : B → i k[t]/h(t − αi )ei i §6. Identification of points on the affine line 577 whose kernel is the product of the principal ideals (t − αi )ei B, i.e. the ideal x0 B. 6.1. Lemma. 1. A is a finitely generated k-algebra, more precisely, A = k[x0 , . . . , xe−1 ]. L 2. B = A ⊕ 16`<e k t` as a k-module. 3. The conductor of B into A, f = (A : B) is given by f = hx0 iB = hx0 , . . . , xe−1 iA . J Let f ∈ B, we express it “in base x0 ,” f = r0 + r1 x0 + r2 x20 + · · · with deg ri < deg x0 = e. For i > 1, by writing ri xi0 = (ri x0 )xi−1 we see that 0 i ri x0 ∈ k[x0 , . . . , xe−1 ]. This proves that L  ` B = k[x0 , . . . , xe−1 ] + k t . 16`<e Let f ∈ A which we write g +h in the previous decomposition.. We therefore have h in A, and if β is the common value of the h(αi )’s, we obtain the L equality ϕ(h − β) = 0. Therefore h − β ∈ x0 B, and since h ∈ 16`<e k t` (the k-module of the polynomials of degree < e and without a constant term), we obtain h − β = 0 then h = β = 0, so f ∈ k[x0 , . . . , xe−1 ]. In conclusion A = k[x0 , . . . , xe−1 ], items 1 and 2 are proven. By multiplying the equality of item 2 by x0 we obtain L x0 B = x0 A ⊕ `∈J1..e−1K x` k, then the equality x0 B = hx0 , . . . , xe−1 iA , which implies x0 B ⊆ f. Finally, let f ∈ f, and so f ∈ A, and f = λ + g with λ ∈ k and g ∈ hx0 , . . . , xe−1 iA . We deduce that λ ∈ f, which implies λ = 0; indeed, λt ∈ A, if β is the common value of the λαi ’s, we have ϕ(λt − β) = 0, so λt − β ∈ x0 B, and since x0 is a monic polynomial of degree > 2, λ = 0.  A Milnor square In the situation described in the previous subsection we have the following Milnor square / B = k[t] A  k = A/f / ϕ ∆  Q ei / B/f ' i (k[t]/h(t − αi ) i) In what follows we are interested in projective A-modules of constant rank r obtained by gluing the B-module Br and the k-module kr together using a (B/f )-isomorphism h : ∆? (kr ) → ϕ? (Br ), as described before Theorem 5.11. We have denoted by M (kr , h, Br ) such an A-module. 578 X. Finitely generated projective modules, 2 Actually, ∆? (kr ) and ϕ? (Br ) are both identified with (B/f )r , and the isomorphism h is identified with an element of Qs GLr (B/f ) ' i=1 GLr (k[t]/h(t − αi )ei i). We will use these identifications in the remainder of the text without mentioning them, and, for the sake of convenience, we will encode h−1 (and not h) by the s corresponding matrices Hi (with Hi ∈ GLr (k[t]/h(t − αi )ei i)). The module M (kr , h, Br ) will be denoted by M (H1 , . . . , Hs ). In the case where the projective modules of constant rank over k and B = k[t] are always free, Milnor’s theorem affirms that we thus obtain (up to isomorphism) all the projective modules of constant rank r over A. In the following subsection we give a complete description of the category of projective modules of constant rank over A obtained by such gluings, in a special case. The one where all the multiplicities are equal to 1. Identification of points without multiplicities We now apply the previous conventions by supposing that the multiplicities ei are all equal to 1. 6.2. Theorem. With the previous conventions. 1. The module M (H1 , . . . , Hs ), (with Hi ∈ GLr (k[t]/ht − αi i) ' GLr (k)) is identified with the A-submodule M 0 (H1 , . . . , Hs ) of Br consisting of the elements f of Br such that ∀1 6 i < j 6 s, Hi · f (αi ) = Hj · f (αj ). In particular, M 0 (H1 , . . . , Hs ) = M 0 (HH1 , . . . , HHs ) if H ∈ GLr (k). 2. Let, for i ∈ J1..sK, Gi ∈ GLr1 (k[t]/ht − αi i) ' GLr1 (k) Hi ∈ GLr2 (k[t]/ht − αi i) ' GLr2 (k). and An A-linear map φ from M (G1 , . . . , Gs ) to M (H1 , . . . , Hs ) can be encoded by a matrix Φ ∈ Br2 ×r1 satisfying, for 1 6 i < j 6 s, Hi · Φ(αi ) · G−1 = Hj · Φ(αj ) · G−1 i j . 0 (6) 0 Such a matrix sends M (G1 , . . . , Gs ) to M (H1 , . . . , Hs ). The A-linear map φ is an isomorphism if and only if r1 = r2 and the Φ(αi )’s are invertible. J The first item has no incidence on the results that follow, and it is left to the reader. The second item is an immediate consequence of Lemma 5.12 and of Corollary 5.14.  In the following theorem we suppose that • k is reduced, §6. Identification of points on the affine line 579 • the projective modules of constant rank over k[t] are all free, • the square matrices with determinant 1 are products of elementary matrices, i.e. SLn (k) = En (k) for every n. For example k can be a discrete field, a reduced zero-dimensional ring or an integral Euclidean ring. Also note that if the projective modules of constant rank over k[t] are free, it is a fortiori true for the projective modules of constant rank over k. def 6.3. Theorem. For a ∈ k let Jr,a = Diag(1, . . . , 1, a) ∈ Mr (k). Under the previous hypotheses we obtain the complete classification of the projective modules of constant rank over the ring A (we use the previous notations and conventions). 1. The modules of constant rank M (H1 , . . . , Hs ) and M (G1 , . . . , Gs ) are isomorphic if and only if det(Hj−1 · H1 ) = det(G−1 j · G1 ) for all j. 2. Every projective A-module of constant rank r is isomorphic to a unique module def Mr (a2 , . . . , as ) = M (Ir , Jr,a2 , . . . , Jr,as ), where the ai ’s are in k× . In addition Mr (a2 , . . . , as ) ' Ar−1 ⊕ M1 (a2 , . . . , as ). 3. Finally, the structure of GK0 A is specified by M1 (a2 , . . . , as ) ⊗ M1 (b2 , . . . , bs ) ' M1 (a2 b2 , . . . , as bs ) M1 (a2 , . . . , as ) ⊕ M1 (b2 , . . . , bs ) ' A ⊕ M1 (a2 b2 , . . . , as bs ) In particular, Pic(A) ' (k× )s−1 . J 1. In case of an isomorphism all the matrices in Equations (6) are invertible, and it amounts to the same thing to ask Hj−1 · H1 · Φ(α1 ) · G−1 1 · Gj = Φ(αj ) for j ∈ J2..sK. Since Φ = Φ(t) is invertible, its determinant is an invertible element of k[t], so of k, and all the det Φ(αi )’s are equal to det Φ. Consequently the two modules can only be isomorphic if det(Hj−1 · H1 ) = det(G−1 j · G1 ) for all j (this proves in particular the uniqueness of the sequence a2 , . . . , as when Mr (a2 , . . . , as ) is isomorphic to a given projective module of constant rank). Conversely if this condition is satisfied, we can find an elementary matrix Φ which realizes the above conditions. It indeed suffices to have Φ(α1 ) = Ir and Φ(αj ) = Hj−1 · H1 · G−1 1 · Gj , which we obtain by applying the following lemma. The end of the proof is left to the reader. Recall: if Q = P1 ⊕P2 ' A⊕P (the V2 Pi ’s are projective of constant rank 1), we have P ' A Q ' P1 ⊗A P2 .  580 X. Finitely generated projective modules, 2 6.4. Lemma. Let α1 , . . . , αs in a commutative ring k with the invertible differences αi − αj for i 6= j. Given A1 , . . . , As ∈ Er (k), there exists a matrix A ∈ Er (k[t]) such that A(αi ) = Ai for each i. J If a matrix A ∈ Er (k[t]) is evaluated in s matrices A1 , . . . , As , and a matrix B ∈ Er (k[t]) is evaluated in s matrices B1 , . . . , Bs , then AB is evaluated in A1 B1 , . . . , As Bs . Consequently, it suffices to prove the lemma when the Ai ’s are all equal to Ir except for one which is an elementary matrix. In this case we can make an interpolation à la Lagrange since the elements αi − αj are invertible.  Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Prove Propositions 1.8 and 1.9. • Prove the equivalences in Proposition 2.5 3. • Prove Corollary 3.9. • Prove Facts 4.7 and 4.8. Exercise 2. Check the computations in the second local freeness lemma 4.4. Exercise 3. (Magic formula to diagonalize a projection matrix) Let n be a fixed integer. If α ∈ Pn (set of finite subsets of J1..nK), we consider the canonical projector obtained from In by annihilating the diagonal elements whose index is not in α. We denote it by Iα . Let F ∈ AGn (A) be a projector, we will explicate a family (Fα ) indexed by Pn with matrices satisfying the “conjugations” F Fα = Fα Iα (†) as well as the algebraic identity X α det Fα = 1 (‡) This result provides a new uniform method to explicate the local freeness of a finitely generated projective module: we take the localizations at the comaximal elements det(Fα ), since over the ring A[1/ det(Fα )] we have Fα−1 F Fα = Iα . We will see that this is realized by the family defined as follows Fα = F Iα + (In − F )(In − Iα ). For example if α = J1..kK, we have the following block decompositions  Iα = Ik,n = Ik 0 0 0   , F = F1 F3 F2 F4   , Fα = F1 F3 −F2 In−k − F4  . Exercises and problems 581 1. Show (‡). Hint: for two square matrices A and B of order n, we develop the determinant det(A + B) as a multilinear function of the columns of A + B. We obtain a sum of 2n determinants of matrices obtained by shuffling columns of A and columns of B. We apply this remark with A = F and B = In − F . 2. If f and e are two idempotents in a not necessarily commutative ring, and if we let f ∗ e = f e + (1 − f )(1 − e), show that f (f ∗ e) = f e = (f ∗ e)e. With f = F and e = Iα , we obtain f ∗ e = Fα which gives equality (†) above. 3. We now study a few equalities which make det Fα intervene. Let β be the complementary of α • Show that (1 − 2f )(1 − e − f ) = (1 − e − f )(1 − 2e) = f ∗ e • Show that (1 − 2e)2 = (1 − 2f )2 = 1. 2 • With f = F and e = Iα , we obtain (det Fα )2 = det(Iβ − F ) . • Verify that (1 − e)f (1 − e) + e(1 − f )e = (e − f )2 . • If we let µα be the principal minor extracted from F on the indices belonging to α, and µ0β be the principal minor extracted from I − F on the indices belonging to β, show that (det Fα )2 = µα µ0β . Hint: for the above example with f = F and e = Iβ the equality in the previous item gives  F1 0 0 In−k − F4  = (Iβ − F )2 NB. This uniform method of diagonalization of projection matrices gives a shortcut for the local freeness lemma and for the structure theorem which affirms that a finitely generated projective module is locally free in the strong sense. We have taken the time to prove this structure theorem twice. Once by the Fitting ideals in Chapter V, the other more structurally, in the previous chapter. We hope that the readers will not hold it against us for subjecting them to substantially less elementary proofs in the course than that of Exercise 3. It is because magic formulas certainly are nice things, but they sometimes hide the profound meaning of more elaborate proofs. Exercise 4. (Generalization of the previous exercise to the diagonalization of matrices annihilating a split separable polynomial) Let a, b, c ∈ A such that (a − b)(a − c)(b − c) ∈ A× , i.e. the polynomial f (T ) = (T − a)(T − b)(T − c) is separable, and let A ∈ Mn (A) be a matrix such that f (A) = 0. Consider the −b)(T −c) Lagrange polynomials fa (T ) = (T , . . . that satisfy fa + fb + fc = 1. Let (a−b)(a−c) Aa = fa (A), Ab = fb (A), Ac = fc (A). 1. Show that AAa = aAa , i.e. every column vector C of Aa satisfies AC = aC. 2. Deduce that if a matrix P has column vectors of Aa or Ab or Ac as its column vectors, then AP = P D, where D is a diagonal matrix with a, b or c as its diagonal elements. 582 X. Finitely generated projective modules, 2 3. Using 1 = det(In ) = det(Aa + Ab + Ac ) and using the multilinearity of the determinant as a function of the column vectors, show that there exist 3n matrices Pi that satisfy P • det(Pi ) = 1. i • In A[1/ det(Pi )], the matrix A is similar to a diagonal matrix with a, b or c as its diagonal elements. m 4. If the characteristic polynomial of A is equal to (T − a)P (T − b)p (T − c)q , show that several matrices Pi are null and that the sum det(Pi ) = 1 can i be restricted to a family of matrices indexed by a finite set with elements. (m+p+q)! m!p!q! Exercise 5. (Jacobian of the system P 2 − P = 0) Let Mn (A) → Mn (A) be the map defined by P 7→ P 2 − P . Its differential at a pointP ∈ AGn (A) is ϕP : Mn (A) → Mn (A), H 7→ HP + P H − H. 2 If we identify Mn (A) and An , ϕP is given by the Jacobian matrix at the point P of the n2 equations P 2 − P = 0. By considering A = Gn (Z) = Z[(Xij )i,j∈J1..nK ]  P 2 − P with P = (Xij ), by Theorem 4.9, the tangent space of the affine scheme AGn at the point P is canonically identified with Ker ϕP = { H ∈ Mn (A) | HP + P H = H } = Im πP , where πP ∈ AGn (A) is the projector defined by πP (H) = P H(In − P ) + (In − P )HP = P H + HP − 2P HP. This brings us to studying the relations between ϕP and πP . Illustrate what is 2 stated regarding the Jacobian matrix and the identification of Mn (A) and An for n = 2. In general show the equalities ϕP ◦ πP = πP ◦ ϕP = 0, (ϕP )2 = In − πP , (ϕP )3 = ϕP , Ker ϕP = Ker(ϕP )2 = Im πP and Im ϕP = Im(ϕP )2 = Ker πP . Exercise 6. Prove the following local characterization of faithful finitely generated projective modules. For some A-module P , the following properties are equivalent. (a) P is finitely generated projective and faithful. (b) There exist comaximal elements si of A such that each Psi is free of rank h > 1 over Asi = A[1/si ]. (c) P is finitely generated projective and for every element s of A, if Ps is free over the ring As , it is of rank h > 1. Exercise 7. Let ϕ : P → Q be an A-linear map between finitely generated projective modules and r ∈ H+ 0 A. Express rk(P ) 6 r and rk(P ) > r in terms of the determinantal ideals of a projection matrix with image P . Exercises and problems 583 Exercise 8. (Projective line and rational fractions) 1. Let k be a ring, P , Q ∈ k[u, v] be two homogeneous polynomials of degrees p, q. Define g(t) = P (t, 1), e g (t) = P (1, t), h(t) = Q(t, 1), e h(t) = Q(1, t). g , p, e h, q), value that we denote by a. Show that Res(g, p, h, q) = (−1)pq Res(e Res(P, Q). b. Show the inclusion Res(P, Q) hu, vip+q−1 ⊆ hP, Qi 2. Recall that AG2,1 (k) is the subset of AG2 (k) formed by the projectors of rank 1; we have a projection F 7→ Im F from AG2,1 (k) to P1 (k). When k is a discrete field and f ∈ k(t) is a rational fraction, we associate to f f the “morphism,” denoted also by f , P1 (k) −→ P1 (k), which realizes t 7→ f (t) (for the usual inclusion k ⊆ P1 (k)). How do we generalize to an arbitrary ring k? Explain how we can lift this morphism f to a polynomial map, illustrated below by a doted arrow. / AG2,1 (k) AG2,1 (k)  P1 (k) &  / P1 (k) f 3. Treat the examples f (t) = t2 , f (t) = td and f (t) = (t2 + 1)/t2 . How is a homography f (t) = at+b lifted (ad − bc ∈ k× )? ct+d Exercise 9. (The fundamental conic or Veronese embedding P1 → P2 ) When k is a discrete field, the Veronese embedding P1 (k) → P2 (k) is defined by (u : v) 7→ (X = u2 : Y = uv : Z = v 2 ). Its image is the “fundamental conic” of P2 with equation X Y Y Z = XZ − Y 2 = 0. Analogously to Exercise 8 (see also Problem 6), show that we can lift the Veronese morphism to a polynomial map, illustrated below by a dotted arrow. AG2,1 (k) F 7→Im F  P1 (k) / AG3,1 (k) Veronese &  F 7→Im F / P2 (k) Your obtained lift must apply to an arbitrary ring k. Exercise 10. (Projection matrices of corank 1) Let n > 2. 1. Let P ∈ AGn,n−1 (A). Show that P + Pe = In . 2. If P ∈ AGn (A) satisfies P + Pe = In , then P is of rank n − 1. 584 X. Finitely generated projective modules, 2 3. If P ∈ Mn (A) satisfies det(P ) = 0 and P + Pe = In , then P ∈ AGn,n−1 (A). Exercise 11. In this exercise, A ∈ Mn (A) is a matrix of corank 1, i.e. of rank n − 1. Using Exercise 10, show the following items. e (projective module of rank n − 1). 1. Im A = Ker A e = Ker A (projective module of rank 1). 2. Im A e (projective module of rank n − 1). 3. Im tA = Ker tA e = Ker tA (projective module of rank 1). 4. Im tA 5. The projective modules of rank 1, An / Im A and An / Im tA, are duals of one another. In short, from a matrix A of corank 1, we construct two dual projective modules of rank 1 e ' Im Ae = Ker A, An / Im A = An / Ker A e ' Im tAe = Ker tA. An / Im tA = An / Ker tA Exercise 12. (Intersection of two affine schemes over k) This exercise belongs to the informal setting of affine schemes over a ring k “defined” on page 558. Let A = k[x1 , . . . , xn ], B = k[y1 , . . . , yn ] be two quotient k-algebras corresponding to two polynomial systems (f ), (g) in k[X1 , . . . , Xn ]. Let A and B be the corresponding affine schemes. Theintersection scheme A ∩ B is defined as being associated with the k-algebra k[X] f , g ' A ⊗k[X] B (note that the tensor product is taken over k[X]). “Justify” this definition by basing yourself on the picture opposite. In a “Euclidean” coordinate system, the pic2 ture includes the ellipse xa + y 2 = 1, i.e. f (x, y) = 0 with f = x2 + a2 y 2 − a2 , and the circle g(x, y) = 0 with g = (x − c)2 + y 2 − (c − a)2 . Exercise 13. (Pseudomonic polynomials) P Recall that a polynomial p(t) = k>0 ak T k ∈ k[T ] is said to be pseudomonic if there exists a fundamental system of orthogonal idempotents (e0 , . . . , er ) such that over each k[1/ej ], p is a polynomial of degree j with its coefficient of degree j being invertible (see page 389). Such a polynomial is primitive and this notion is stable under product and morphism. P 1. Verify that ak = 0 for k > r and that (1 − j>k ej )ak = hek i for k ∈ J0..rK. In particular, har i = her i and the ek ’s are unique or rather the polynomial P e X k is unique (we can add null idempotents). k k 2. Let P = A[T ]/hpi. Show that P is a finitely generated projective A-module Pr Pr whose polynomial rank is RP (X) = k=0 ek X k ; we also have deg p = k=1 k[ek ] (cf. item 2 of 2.6). In a similar vein, see Exercise 14. Exercises and problems 585 Exercise 14. (Locally monic polynomials) 1. Let a ⊆ A[T ] be an ideal such that A[t] = A[T ]/a is a free A-module of rank n. Let f ∈ A[T ] be the characteristic polynomial of t in A[t]. Show that a = hf i. In particular, 1, t, . . . , tn−1 is an A-basis of A[t]. 2. Analogous result by replacing the hypothesis “A[T ]/a is a free A-module of rank n” with “A[T ]/a is a projective module of constant rank n.” A polynomial f ∈ A[T ] of degree 6 r is said to be locally monic if there exists a fundamental system of orthogonal idempotents (e0 , . . . , er ) such that f is monic of degree d in A[1/ed ][T ] for each d ∈ J0..rK. Thus, for each d ∈ J0..rK, the polynomial fd := ed f is monic of degree d modulo h1 − ed i. It is clear that this definition does not depend on the formal degree r chosen for f , and that over a connected ring, a locally monic polynomial is monic. 3. Characterize a locally monic polynomial using its coefficients. 4. The characteristic polynomial of an endomorphism of a finitely generated projective module M is locally monic and the corresponding fundamental system of orthogonal idempotents is given by the ei (M )’s. 5. Let S1 , . . . , Sm be comaximal monoids of A. Show that if f is locally monic (for example monic) over each Si−1 A, it also is locally monic over A. 6. If f ∈ A[T ] is locally monic, show that the ring A[t] = A[T ]/hf i is a quasi-free A-module and that f is the characteristic polynomial of t. 7. Conversely, if a ⊆ A[T ] is an ideal such that the ring A[t] = A[T ]/a is a finitely generated projective A-module, then a = hf i. In particular, if a monogenic A-algebra is a finitely generated projective A-module, it is a quasi-free A-module. 8. For g ∈ A[T ] the following properties are equivalent. • g can be written as uf with u ∈ A× and f locally monic. • g is pseudomonic. • A[T ]/hgi is a finitely generated projective A-module. 9 ∗. Prove in classical mathematics that a polynomial is locally monic if and only if it becomes monic after localization at any prime ideal. Exercise 15. (Invertible modules and projective modules of constant rank 1) We propose a slight variation with respect to Theorem 5.8. 1. Let there be two commutative rings A ⊆ B. The A-submodules of B form a multiplicative monoid, with neutral element A. Show that an A-submodule M of B invertible in this monoid is finitely generated and that for every Asubmodule M 0 of B the canonical homomorphism M ⊗A M 0 → M.M 0 is an isomorphism. Consequently, the invertible A-submodules of B are projective A-modules of constant rank 1. 2. Let S ⊆ Reg(A) be a monoid and a be a locally principal ideal. Suppose that S −1 a is an invertible ideal of S −1 A; show that a is an invertible ideal of A. This is the case, for example, if S −1 a is a free S −1 A-module. 586 X. Finitely generated projective modules, 2 Exercise 16. (The exact sequence with Pic A and Pic K, where K = Frac A) Let A be a ring and K = Frac A. Define natural group morphisms 1 → A× → K× → Gfr(A) → Pic A → Pic K, and show that the obtained sequence is exact. Consequently, we have an exact sequence 1 → Cl(A) → Pic A → Pic K. If Pic K is trivial, we obtain an isomorphism Cl(A) ' Pic A, and thus we once again find Theorem 5.8. Exercise 17. Show that H0 A is the ring “generated by” B(A), the Boolean algebra of idempotents of A, in the sense of adjoint functors. e freely generated by B is More precisely, if B is a Boolean algebra, the ring B e such that for given with a homomorphism of Boolean algebras ηB : B → B(B) every ring C the map described below is a bijection: e B e C) −→ HomBoolean alg. B, B(C) HomRings (B, ϕ 7−→ B(ϕ) ◦ ηB B  ηB / ϕ   C B(C) v ( e B(B) B(ϕ) ^ ' H0 A. Then show that B(A) Exercise 18. Prove in classical mathematics that H0 (A) is canonically isomorphic to the ring of locally constant (i.e. continuous) functions from Spec A to Z. Exercise 19. (The determinant as a functor) We have defined the determinant of an endomorphism of a finitely generated projective module. We will see that more generally we can define the determinant as a functor from the category of projective modules to that of projective modules of rank 1. No doubt, the simplest definition of the determinant of a finitely generated projective module is the following. Definition: (a) Let M be a finitely generated projective A-module generated by n elements. Let rh = eh (M ) (h ∈ J0..nK) and M (h) = rh M . Define det(M ) by det(M ) := r0 A ⊕ M (1) ⊕ V2 M (2) ⊕ · · · ⊕ We will also use Pnthe suggestive notation det(M ) = rank rk(M ) = k=1 k [ek (M )] ∈ H0 A. Vn M (n) . Vrk(M ) M by using the (b) If ϕ : M → N is a homomorphism of finitely generated projective A-modules, with sh = eh (N ), we define det(ϕ) as a homomorphism of det(M ) in det(N ) Vh (h) Vh (h) Vh sending M to N by x 7→ sh ( ϕ)(x). We will note that when x ∈ Vh M (h) we have x = rh x. 1. The module det(M ) is a projective module of constant rank 1, and we have Vh (h) the equalities rh det(M ) = det(M )rh = M . More generally, for every idempotent e, we have e det(M ) = det(Me ). Exercises and problems 587 2. The previous definition provides a functor that commutes with the localization and transforms the direct sums into tensor products. Deduce that the functor det induces a surjective morphism from (K0 A, +) to Pic A. 3. A homomorphism between finitely generated projective modules is an isomorphism if and only if its determinant is an isomorphism. 4. For an endomorphism of a finitely generated projective module, the new definition of the determinant coincides with the previous one if we identify End(L) with A when L is a projective module of constant rank 1. Exercise 20. Show that, up to isomorphism, the determinant functor is the only functor from the category of finitely generated projective A-modules in itself which possesses the following properties: • it transforms every arrow ϕ : A → A in itself, • it transforms the direct sums into tensor products, • it commutes to the scalar extension for every change of basis α : A → B. Exercise 21. (Determinantal ideals of a linear map between finitely generated projective modules) Let ϕ : M → N be a homomorphism between finitely generated projective modules. Let us write M ⊕ M 0 ' Am , N ⊕ N 0 ' An , and extend ϕ to ψ : M ⊕ M 0 → N ⊕ N 0 with ψ(x + x0 ) = ϕ(x) (x ∈ M, x0 ∈ M 0 ). Show that, for each integer h, the determinantal ideal Dh (ψ) only depends on h and on ϕ. We denote it by Dh (ϕ) and we call it the determinantal ideal of order h of ϕ. Pn 6.5. Notation. Let r = k=1 k [rk ] ∈ H+ 0 (A). Applying the previous exercise, we call determinantal ideal of type r for ϕ and we denote by Dr (ϕ) the ideal r0 A + r1 D1 (ϕ) + · · · + rn Dn (ϕ). The notations rk(ϕ) > k and rk(ϕ) 6 k for the linear maps between free modules of finite rank are generalized as follows to the linear maps between finitely generated projective modules: let rk(ϕ) > r if Dr (ϕ) = h1i, rk(ϕ) 6 r if D1+r (ϕ) = h0i, and rk(ϕ) = r if rk(ϕ) 6 r and rk(ϕ) > r. NB: see Exercise 23. Exercise 22. (Continuation of Exercise 21) Let r ∈ N∗ . ϕ ϕ0 1. If M −−→ N −−→ L are linear maps between finitely generated projective modules, we have Dr (ϕ0 ϕ) ⊆ Dr (ϕ0 )Dr (ϕ). 2. If S is a monoid of A, then Dr (ϕ)  S = Dr (ϕS ).  3. For every s ∈ A such that Ms and Ns are free, we have Dr (ϕ) In addition, this property characterizes the ideal Dr (ϕ). Let r = P k∈J1..nK k[rk ] ∈ H+ 0 A. 4. Redo the previous items of the exercise in this new context. s = Dr (ϕs ). 588 X. Finitely generated projective modules, 2 Exercise 23. (With notations 6.5) Let ϕ : M → N be a linear map between finitely generated projective A-modules. Prove that the following properties are equivalent. 1. ϕ is locally simple. 2. ϕ has a well-defined rank in H+ 0 (A). 3. After localization at comaximal elements, the modules are free and the linear map is simple. Exercise 24. Let A ∈ An×m ; if A is of rank m − 1, we can explicate a finite system of generators of the submodule Ker A ⊆ An without using neither an equality test nor a membership test. In fact, under the only (weaker) hypothesis  n n > m − 1, we uniformly define a matrix A0 ∈ Am×N with N = m−1 which is “a kind of comatrix of A.” This matrix satisfies Im A0 ⊆ Ker A as soon as A is of rank 6 m − 1, with equality when A is of rank m − 1. We can define A0 ∈ Am×N via the exterior algebra: we see A as a linear map Vm−1 t Vm−1 n Vm−1 m u : Am → An and we consider u0 = ( u) : (A ) → (A ). In Vm−1 n V m−1 the canonical bases, (A ) = AN and (Am ) = Am , so u0 is represented 0 m×N by a matrix . To explicate this matrix A0 , we order the set of  A ∈ A n N = m−1 subsets I of J1..nK of cardinality m − 1 such that their complements are in increasing lexicographic order; the columns of A0 are indexed by this set of subsets, as follows a0j,I = (−1)kI +j det(AI,{1..m}\{j} ), 0 kI being the number of I.  For example, if m = 2, then N = n, and A = an,2 −an,1 −an−1,2 an−1,1 ··· ··· ±a1,2 ∓a1,1  . 1. For i ∈ J1..nK, we have (AA0 )i,I = (−1)kI +1 det(A{i}∪I,{1..m} ). In particular, if Dm (A) = 0, then AA0 = 0. e (the comatrix of A). 2. If n = m, then A0 = A 3. If A is of rank m − 1, then Im A0 = Ker A; in particular, A0 is of rank 1. 4. Every stably free module of rank 1 is free. We will be able to compare with Fact 5.6 and with Exercise V -13. 5. If B is a matrix satisfying ABA = A, then P = BA is a projection matrix satisfying Im(In − P ) = Ker P = Ker A. This provides another way to answer the question: give a finite system of generators of Ker A. Compare this other solution to that of the current exercise. To compute the matrix P , we will be able to use the method explained in Section II -5 (Theorem II -5.14). Another method, considerably more economical, can be found in [58, Díaz-Toca&al.] (based on [138, Mulmuley]). Exercise 25. (Homogeneous polynomials and Pn (k)) Let (f1 , . . . , fs ) = (f ) in k[X0 , . . . , Xn ] be a homogeneous polynomial system. We seek to define the zeros of (f ) in Pn (k). Let P be a point of Pn (k), i.e. a projective k-module of rank 1 which is a direct summand in kn+1 . Show that if a generator set of P annihilates (f ), then every element of P annihilates (f ). Exercises and problems 589 Exercise 26. (Tangent space to GLn ) Determine the tangent space at a point to the functor k 7→ GLn (k). Exercise 27. (Tangent space to SLn ) Determine the tangent space at a point to the functor k 7→ SLn (k). Exercise 28. (Tangent space at J0 to the nilpotent cone) Let k be a ring. Let (eij )i,j∈J1..nK be the canonical basis of Mn (k) and J0 ∈ Mn (k) be the standard " # 0 1 0 Jordan matrix. For example, for n = 3, J0 = 0 0 1 . 0 0 0 1. We define ϕ : Mn (k) → Mn (k) by ϕ(H) = i+j=n−1 J0i HJ0j . Determine Im ϕ. 2. Give a direct complement of Im ϕ in Mn (k), then give ψ : Mn (k) → Mn (k) satisfying ϕ ◦ ψ ◦ ϕ = ϕ. Show that Ker ϕ is free of rank n2 − n and give a basis of this module. 3. Consider the functor k 7→ {N ∈ Mn (k) | N n = 0}. Determine the tangent space at J0 to this functor. P Exercise 29. (Complement of Theorem 4.9) Let A[ε] = A[T ]/ T 2 . Let P , H ∈ Mn (A). Show that the matrix P + εH is idempotent if and only if P 2 = P and H = HP + P H. Generalize to an abstract noncommutative ring with an idempotent ε in the center of the ring. Comment. The example of the ring Mn (A) shows that in the noncommutative case the situation for the idempotents is quite different from the one in the commutative case where B(A) = B(Ared ) (Corollary III -10.4) and where the idempotents are “isolated” (Lemma IX -5.1). Problem 1. (The ring of the circle) Let k be a discrete field of characteristic 6= 2, f (X, Y ) = X 2 + Y 2 − 1 ∈ k[X, Y ]. ∂f ∂f It is an irreducible and smooth polynomial, i.e. 1 ∈ f, ∂X (explicitly, , ∂Y ∂f ∂f we have −2 = 2f − X ∂X − Y ∂Y ). It is therefore licit to think that the ring A = k[X, Y ]/ hf i = k[x, y] is an integral Prüfer ring. This will be proven in Problem XII -1 (item 4 ). y Let K be its field of fractions and let t = x−1 ∈ K. 1. Show that K = k(t); geometrically justify how to find t (parameterization of a conic having a k-rational point) and make x, y explicit in terms of t. 2. Let u = (1 + t2 )−1 , v = tu. Verify that the integral closure of k[u] in K = k(t) is k[x, y] = k[u, v] =  h(t)/(1 + t2 )s | h ∈ k[t], deg(h) 6 2s . In particular, A = k[x, y] is integrally closed. Explain how the k-circle x2 + y 2 = 1 is the projective line P1 (k) deprived “of the k-point” (x, y) = (1, ±i). 590 X. Finitely generated projective modules, 2 3. If −1 is a square in k, show that k[x, y] is a localized ring k[w, w−1 ] (for some w to explicate) of a polynomial ring over k, therefore a Bézout ring. 4. Let P0 = (x0 , y0 ) be a k-point of the circle x2 + y 2 = 1 and hx − x0 , y − y0 i ⊆ A be its maximal ideal. Verify that hx − x0 , y − y0 i2 is a principal ideal of generator xx0 + yy0 − 1. Geometric interpretation of xx0 + yy0 − 1? 5. Here (x0 , y0 ) = (1, 0). Describe the computations allowing to explicate the (projection) matrix   1−x −y P = 12 −y 1+x as a principal localization matrix for the pair (x − 1, y). The exact sequence I −P (x−1,y) 2 A2 −− −→ A2 −−−−→ hx − 1, yi → 0 allows us to realize the (invertible) ideal of the point (1, 0) as the image of the projector P of rank 1. Comment on the opposite picture which is its geometric counterpart (vector line bundle of the circle). 6. Suppose that −1 is not a square in k and that we see k[x, y] as a free k[x]-algebra of rank 2, with basis (1, y). Explicate the norm and verify, for z = a(x) + b(x)y 6= 0, the equality deg Nk[x,y]/k[x] (z) = 2 max(deg a, 1 + deg b). In particular, deg Nk[x,y]/k[x] (z) is even. Deduce the group k[x, y]× , the fact that y and 1 ± x are irreducible in k[x, y], and that the ideal hx − 1, yi of the point (1, 0) is not principal (i.e. the line bundle above is not trivial). Problem 2. (The operations λt and γt over K0 (A)) If P is a finitely generated projective module over A, let, for n ∈ N, λn (P ) or Vn λn ([P ]) be the class of P in K0 (A) and we have the fundamental equality λn (P ⊕ Q) = P p+q=n λp (P )λq (Q). (∗) We also define the polynomial λt (P ) ∈ K0 (A)[t] by λt (P ) = λn (P )tn . It n>0 is a polynomial of constant term 1 that we consider in the ring of formal series K0 (A)[[t]]. Then P λt (P ) ∈ 1 + t K0 (A)[[t]] ⊆ (K0 (A)[[t]])× . By (∗) we have λt (P ⊕ Q) = λt (P )λt (Q), which allows us to extend λt to a morphism (K0 (A), +) → (1 + t K0 (A)[[t]], ×). Thus if P , Q are two finitely generated projective modules, for x = [P ] − [Q], we have by definition λt (x) = λt (P ) 1 + λ1 (P )t + λ2 (P )t2 + · · · = λt (Q) 1 + λ1 (Q)t + λ2 (Q)t2 + · · · sequence that we will denote by P n>0 λn (x)tn , with λ0 (x) = 1, λ1 (x) = x. Exercises and problems 591 Grothendieck has also defined over K0 (A) another operation γt by the equality γt (x) = λt/(1−t) (x), for x ∈ K0 (A). This is licit because the multiplicative subgroup 1 + t K0 (A)[[t]] is stable by the substitution t ← t/(1 − t). This substitution t ← t/(1 − t) leaves the term invariant in t, let  γt (x) = 1 + tx + t2 x + λ2 (x) + · · · = P n>0 γ n (x)tn . e 0 A. Show that γt (x) is a 1. Give λt (p) and γt (p) for p ∈ N∗ . Let x ∈ K polynomial t. By using γt (−x), deduce that x is nilpotent. e 0 (A) is the nilradical of the ring K0 (A). 2. Show that K  We have rk λn (x) = λn (rk x) and thus we dispose of a formal sequence rkλt (x) with coefficients in H0 A defined by rkλt (x) = λt (rk x) =  P n>0 rk λn (x) tn . If x ∈ H0 A this simply gives rkλt (x) = λt (x). 3. If x = [P ], recall that (1 + t)rk x = RP (1 + t) = FIdP (t) ∈ B(A)[t]. Show that, when we identify B(A) with B(H0 A) by letting e = [eA] = [e] for e ∈ B(A), we obtain rkλt (x) = 1 + t rk x = (1 + t)rk x if 0 6 rk x 6 1. Then show that rkλt (x) = (1 + t)rk x for every x ∈ K0 (A). 4. We define rkγt (x) = γt (rk x) =  P n>0 rk γ n (x) tn . − rk x Show that rkγt (x) = (1 for every x ∈ K0 (A), or for x = [P ] that  − t) γ rkt (x) = RP 1/(1 − t) = RP (1 − t)−1 . In addition, if 0 6 rk x 6 1, we obtain the equality rkγt (x) = 1 + xt/(1 − t) = 1 + xt + xt2 + . . . 5. For all x of K0 A, γt (x)(1 − t)rk(x) is a polynomial. 6. Show the reciprocity formulas between λn and γ n for n > 1 γ n (x) = Pn−1 p=0 n−1 p  λp+1 (x), λn (x) = Pn−1 q=0 n−1 q  (−1)n−1−q γ q+1 (x). Problem 3. (The projective map of Noether and the projective modules of constant rank 1 direct summands in k2 ) Fix a ring k, two indeterminates X, Y over k and an integer n > 1. Given two n-sequences of elements of k, x = (x1 , . . . , xn ) and y = (y1 , . . . , yn ), we associate with them an (n + 1)-sequence z = z(x, y) = (z0 , . . . , zn ) as follows Qn i=1 (xi X + yi Y ) = z0 X n + z1 X n−1 Y + · · · + zn−1 XY n−1 + zn Y n . Thus, we have z0 = x1 · · · xn , zn = y1 · · · yn , and for example, for n = 3, z1 = x1 x2 y3 + x1 x3 y2 + x2 x3 y1 , z2 = x1 y2 y3 + x2 y1 y3 + x3 y1 y2 . For d ∈ J0..nK, we easily check that zd (y, x) = zn−d (x, y) and that we have the following formal expression thanks to the elementary symmetric functions with n indeterminates (S0 = 1, S1 , . . . , Sn ): zd = x1 · · · xn Sd (y1 /x1 , . . . , yn /xn ). In particular, zd is homogeneous in x of degree n − d, and homogeneous in y of degree d. We can give a direct definition of zd as follows zd = P #I=n−d Q i∈I xi Q j∈J1..nK\I yj . 592 X. Finitely generated projective modules, 2 If k is a discrete field, we have a map ψ : (P1 )n = P1 × · · · × P1 → Pn , said to be Noetherian, defined by (?)  ψ : (x1 : y1 ), . . . , (xn : yn ) 7→ (z0 : · · · : zn ) We make the symmetric group Sn act on the product (P1 )n by permutation of the coordinates; then the map (?) above, which is Sn -invariant, intervenes in algebraic geometry to make (P1 )n /Sn and Pn isomorphic. 1. Show that for P1 , . . . , Pn , Q1 , . . . , Qn in P1 , we have ψ(P1 , . . . , Pn ) = ψ(Q1 , . . . , Qn ) ⇐⇒ (Q1 , . . . , Qn ) is a permutation of (P1 , . . . , Pn ). We now want, k being an arbitrary ring, to formulate the map (?) in terms of projective k-modules of constant rank 1. Precisely, let L = kX ⊕ kY ' k2 , and let Sn (L) = kX n ⊕ kX n−1 Y ⊕ · · · ⊕ kXY n−1 ⊕ kY n ' kn+1 be the homogeneous component of degree n of k[X, Y ]. If P1 , . . . , Pn ⊂ L are n projective k-submodules of constant rank 1 which are direct summands, we want to associate with them, functorially, a k-submodule P = ψ(P1 , . . . , Pn ) of Sn (L), projective of constant rank 1 and a direct summand. Of course, we must have ψ(P1 , . . . , Pn ) = ψ(Pσ(1) , . . . , Pσ(n) ) for every permutation σ ∈ Sn . InP addition, if each Pi is free with basis xi X + yi Y , n then P must be free with basis z X n−i Y i , in order to find (?). i=0 i 2. Show that if each (xi , yi ) is unimodular, the same holds for (z0 , . . . , zn ). 3. Define ψ(P1 , . . . , Pn ) ⊂ Sn (L) thanks to the module P1 ⊗k · · · ⊗k Pn and to the k-linear map π : Ln⊗  Sn (L), Nn Qn π: (xi X + yi Y ) 7−→ i=1 (xi X + yi Y ). i=1 4. Let k[Z] = k[Z0 , . . . , Zn ], k[X, Y ] = k[X1 , Y1 , . . . , Xn , Yn ]. What to say about the k-morphism ϕ : k[Z] → k[X, Y ] defined by Zd 7−→ zd = P #I=n−d Q i∈I Xi Q j∈J1..nK\I Yj ? NB: ϕ is the co-morphism of ψ. Problem 4. (Hilbert’s theorem 90, multiplicative form) Let G be a finite group acting on a commutative ring B; a 1-cocycle of G over B× is a family (cσ )σ∈G such that cστ = cσ σ(cτ ); consequently, cId = 1. For every element b ∈ B× , (σ(b)b−1 )σ∈G is a 1-cocycle called a 1-coboundary. Let Z 1 (G, B× ) be the set of 1-cocycles of G over B× ; it is a subgroup of the (commutative) group of all the maps of G in B× equipped with the final product. The map B× → Z 1 (G, B× ), b 7→ (σ(b)b−1 )σ∈G , is a morphism; let B 1 (G, B× ) be its image and we define the first group of cohomology of G over B×  H 1 (G, B× ) = Z 1 (G, B× ) B 1 (G, B× ) . Finally, we define the (generally noncommutative) ring B{G} as being the B-module 0 0 0 0 with basis G, equippedP with the product P (bσ)·(b σ ) = bσ(b )σσ . Then B becomes a B{G}-algebra via ( σ bσ σ) · b = σ bσ σ(b). We call B{G} the twisted group algebra of the group G. Exercises and problems 593 Let (A, B, G) be a Galois algebra. The aim of the problem is to associate with every 1-cocycle c = (cσ )σ∈G a projective A-module of constant rank 1 denoted G 1 × by BG c and to show that c 7→ Bc defines an injective morphism of H (G, B ) in × Pic(A). In particular, if Pic(A) is trivial, then every 1-cocycle of G over B is a coboundary. 1. Show that B{G} → EndA (B), σ 7→ σ is an isomorphism of A-algebras. 2. Let c ∈ Z 1 (G, B× ). We define θc : B{G} → B{G} by θc (bσ) = bcσ σ. a. Verify θc ◦ θd = θcd ; deduce that θc is an A-automorphism of B{G}. b. Show that if c ∈ B 1 (G, B× ), then θc is an interior automorphism. 3. Let c ∈ Z 1 (G, B× ). Consider the action from B{G} to B “twisted” by θc , i.e. z · b = θc (z) b; let Bc be this B{G}-module, BG c be the set of elements of B invariant under G (for this action twisted by θc ), and P πc = σ∈G cσ σ ∈ EndA (B). Verify that BG c is an A-submodule of B. Show that πc is a surjection from B to G BG c by explicating a section; deduce that Bc is a direct summand in B (as an A-module). 4. We will show that for every c ∈ Z 1 (G, B× ), BG c is a projective A-module of constant rank 1. G G G G G a. Verify that BG c Bd ' Bcd and Bc ⊗A Bd ' Bcd . b. Show that if c ∈ B 1 (G, B× ), then BG c ' A. Conclude the result. 1 × c. Show that c 7→ BG c induces an injective morphism from H (G, B ) into Pic(A). 5. In the case where A is a zero-dimensional ring (for example a discrete field), show that every 1-cocycle (cσ )σ∈G is the coboundary of some b ∈ B× . 6. Suppose that G is cyclic of order n, G = hσi, and that Pic(A) = 0. Let x ∈ B; show that NB/A (x) = 1 if and only if there exists a b ∈ B× such that x = σ(b)/b. Problem 5. (The Segre morphism in a special case) Let A[X, Y ] = A[X1 , . . . , Xn , Y1 , . . . , Yn ]. Consider the ideal a = hXi Yj − X  j Yi i, X1 X2 · · · Xn i.e. the ideal D2 (A), where A is the generic matrix . We Y1 Y2 · · · Yn want to show that a is the kernel of the morphism ϕ : A[X, Y ] → A[T, U, Z] = A[T, U, Z1 , . . . , Zn ], Xi → T Zi , Yi → U Zi , where T , U , Z1 , . . . , Zn are new indeterminates. Let us agree to say that a monomial m ∈ A[X, Y ] is normalized if m is equal to Xi1 · · · Xir Yj1 · · · Yjs with 1 6 i1 6 · · · 6 ir 6 j1 6 · · · 6 js 6 n (the indices of X are smaller than that of Y ). Let anor be the A-submodule of A[X, Y ] generated by the normalized monomials. 1. If m, m0 are normalized, show that ϕ(m) = ϕ(m0 ) ⇒ m = m0 . Deduce that Ker ϕ ∩ anor = {0}. 594 X. Finitely generated projective modules, 2 2. Show that we have a direct sum of A-modules: A[X, Y ] = a ⊕ anor 3. Deduce that a = Ker ϕ. In particular, if A is reduced (resp. without zerodivisors), then a is radical (resp. prime). Comment. The morphism ϕ induces, by co-morphism, a morphism between affine spaces    tz1 · · · tzn 2 n 2n ψ : A (A) × A (A) → M2,n (A) ' A (A), (t, u), z 7→ . uz1 · · · uzn If A is a field, the image of ψ is the zero set Z(a), and ψ induces at the projective spaces level an inclusion P1 (A) × Pn−1 (A) → P2n−1 (A) (called “embedding”). More generally, by completely changing the notations, with indeterminates X1 , . . . , Xn , Y1 , . . . , Ym , Zij , i ∈ J1..nK, j ∈ J1..mK, consider the morphism ϕ : A[Z] → A[X, Y ], Zij → Xi Yj . We show that Ker ϕ = D2 (A) where A ∈ Mn,m (A[Z]) is the generic matrix. The morphism ϕ induces, by co-morphism, a morphism between affine spaces ψ : An (A) × Am (A) → Mn,m (A) ' Anm (A), (xi )i , (yj )j 7→ (xi yj )ij ,   whose image is the zero set Z D2 (A) . If A is a discrete field, ψ induces an injection Pn−1 (A) × Pm−1 (A) → Pnm−1 (A): it is the Segre embedding. This allows us to realise Pn−1 × Pm−1 as a projective algebraic subvariety of Pnm−1 (in a precise sense that we do not specify here). If A is arbitrary, let E ∈ Pn−1 (A), F ∈ Pm−1 (A); E is thus a direct summand in An , of rank 1; similarly for F . Then E ⊗A F is canonically identified with a submodule of An ⊗A Am ' Anm , a direct summand, of rank 1. By letting ψ(E, F ) = E ⊗A F , we thus obtain a map from Pn−1 (A) × Pm−1 (A) to Pnm−1 (A) which “extends” the map previously defined: if x ∈ An , y ∈ Am are unimodular, the same holds for x ⊗ y ∈ An ⊗A Am , and by letting E = Ax, F = Ay, we have E ⊗A F = A(x ⊗ y). Problem 6. (The Veronese morphism in a special case) Let d > 1, A[X] = A[X0 , . . . , Xd ] and a = hXi Xj − Xk X` , i + j = k + `i. We will show that the ideal a is the kernel of the morphism ϕ(Xi ) = U d−i V i . ϕ : A[X] → A[U, V ], where U , V are two new indeterminates. We define another ideal b b = hXi Xj − Xi−1 Xj+1 , 1 6 i 6 j 6 d − 1i 1. Show that Ker ϕ ∩ (A[X0 , Xd ] + A[X0 , Xd ]X1 + · · · + A[X0 , Xd ]Xd−1 ) = {0} 2. Show that we have a direct sum of A-modules A[X] = b ⊕ A[X0 , Xd ] ⊕ A[X0 , Xd ]X1 ⊕ · · · ⊕ A[X0 , Xd ]Xd−1 3. Deduce that a = b = Ker ϕ. In particular, if A is reduced (resp. without zerodivisors), then a is radical (resp. prime).   Comment. More generally, let N = n+d = n+d and n + 1 + N indeterminates d n U0 , . . . , Un , (Xα )α , where the indices α ∈ Nn+1 are such that |α| = d. We dispose of a morphism ϕ : A[X] → A[U ], Xα 7→ U α (the special case studied here is Exercises and problems 595 n = 1 7→ N = d + 1); its kernel is the ideal a = Xα Xβ − Xα0 Xβ 0 , α + β = α0 + β 0 . By co-morphism, ϕ induces a morphism between affine spaces ψ : An+1 (A) → AN (A), u = (u0 , . . . , un ) 7→ (uα )|α|=d . If A is a discrete field, the image of ψ is the zero set Z(a) and we can show that ψ induces an injection Pn (A) → PN −1 (A): it is the Veronese embedding of degree d. Even more generally, let E be a direct summand in An+1 , of rank 1., The homogeneous component of degree d of the symmetric algebra SA (E), which we denote by SA (E)d , is identified with a submodule of SA (An+1 )d ' A[U0 , . . . , Un ]d (homogeneous component of degree d), a direct summand of rank 1. If we let ψ(E) = SA (E)d , we thus “extend” the map ψ previously defined. Problem 7. (Veronese matrices) Let two polynomial rings k[X] = k[X1 , . . . , Xn ] and k[Y ] = k[Y1 , . . . , Ym ]. To every matrix A ∈ km×n , which represents a linear map kn → km , we can associate (watch the reversal), a k-morphism ϕA : k[Y ] → k[X] constructed as follows: let 0 X10 , . . . , Xm be the m linear forms of k[X] defined as follows.  If    X10 X1  ..   ..  = A  .   . , 0 Xm Xn then 0 ϕA : f (Y1 , . . . , Ym ) 7→ f (X10 , . . . , Xm ). It is clear that ϕA induces a k-linear map Ad : k[Y ]d → k[X]d between the homogeneous components of degree d > 0, and that the restriction A1 : k[Y ]1 → k[X]1 has as its matrix in the bases (Y1 , . . . , Ym ) and (X1 , . . . , Xn ), the transpose of A.  The k-module k[X]d is free of rank n0 = n−1+d ; it possesses a natural bases, d that of the monomials of degree d, which we can choose to order lexicographically  with X1 > · · · > Xn . Similarly for k[Y ]d with its basis of m0 = m−1+d monom−1 0 0 mials. Let Vd (A) ∈ km ×n be the transpose of the matrix of the endomorphism Ad in these bases (such that V1 (A) = A) and we say that Vd (A) is the Veronese   extension of A in degree d. a b 0 For example, let n = 2, d = 2, so n = 3; if A = , we obtain the matrix c d V2 (A) ∈ M3 (k) as follows  x0 y0   =A x y   = ax + by cx + dy  " x02 # , 0 0 xy y 02 " = a2 ac c2 2ab ad + bc 2cd b2 bd d2 #" x2 xy y2 # . 1. If A, B are two matrices for which the product AB has a meaning, check the equalities ϕAB = ϕB ◦ ϕA and Vd (AB) = Vd (A)Vd (B) for every d > 0. Also check that Vd ( tA) = tVd (A). 2. If E is a k-module, the d-Veronese transform of E is the k-module Sk (E)d , homogeneous component of degree d of the symmetric algebra Sk (E). If E is a direct summand in kn , then Sk (E)d is identified with a direct summand in Sk (kn )d ' k[X1 , . . . , Xn ]d (see also Problem 6). Show that the image under 596 X. Finitely generated projective modules, 2 Vd of a projector is a projector and that we have a commutative diagram Im / AGn0 (k) Vd AGn (k)    n−1+d d = n−1+d n−1  Im / Gn0 (k) d−Veronese Gn (k) n0 = with 3. Show that if A is a projector of rank 1, the same holds for Vd (A). More  generally, if A is a projector of rank r, then Vd (A) is a projector of rank d+1−r . r−1 Problem 8. (Some examples of finite projective resolutions) Given 2n + 1 elements z, x1 , . . . , xn , y1 , . . . , yn , of a ring A, we define a sequence of matrices Fk ∈ M2k (A), for k ∈ J0..nK, as follows  F0 =  z  , Fk = Thus with z = 1 − z,   z y1 F1 = Fk−1 yk I2k−1 x1 z z  y1 F2 =  y2 0  , xk I2k−1 I2k−1 − Fk−1 x1 z 0 y2 x2 0 z −y1  .  0 x2  . −x1  z Pk 1. Check that Fk2 − Fk is the scalar matrix with the term z(z − 1) + i=1 xi yi . Also show that tFn is similar to I2n − Fn for n > 1. Consequently, if z(z − 1) + Pn x y = 0, then Fn is a projector of rank 2n−1 . i=1 i i 2. We define three sequences of matrices Uk , Vk ∈ M2k−1 (A) (k ∈ J1..nK), as follows: U1 =  Uk = Uk−1 yk I  x1  , V1 = xk I −Vk−1  y1   , G0 =  , Vk = Vk−1 yk I Thus,  z  and xk I −Uk−1   U2 = Gk ∈ M2k (A) (k ∈ J0..nK), x1 y2 x2 −y1   , V2 = y1 y2 x2 −x1    , Gk = z  0 , G2 =  y1 y2 0 z x2 −x1  zI Vk Uk zI x1 y2 z 0 x2 −y1  . 0  z .  a. Verify that Gn and Fn are conjugated by a permutation matrix. b. Verify that Uk Vk is the scalar c. For n > 1, if z(z − 1) + projector of rank 2n−1 . Pk Pn i=1 i=1 xi yi and that Uk Vk = Vk Uk . xi yi = 0, show that Gn (therefore Fn ) is a 3. Let M be an A-module. A finite projective resolution of M is an exact sequence of finitely generated projective modules 0 → Pn → · · · → P1 → P0  M → 0; we say that n is the length of the resolution. In this case, M is finitely presented. Solutions of selected exercises 597 a. Consider two finite projective resolutions of M that we can assume to be of the same length, 0 → Pn → Pn−1 → · · · → P1 → P0 → M → 0, 0 0 → Pn0 → Pn−1 → · · · → P10 → P00 → M → 0. By using Exercise V -4, show that we have in K0 (A) the following equality Pn (?) i=0 (−1)i [Pi ] = Pn i=0 (−1)i [Pi0 ]. Note. Exercise V -4 provides a much more precise result. Definition and notation. For a module M which admits a finite projective resolution we let [M ] ∈ K0 (A) be the common value of (?) (even if M is not finitely generated projective). We then define the rank of M as that of [M ] Pn and we have rk M = i=0 (−1)i rk Pi ∈ H0 (A). b. Let M be an A-module admitting a finite projective resolution; suppose e 0 (A). that aM = 0 with a ∈ Reg(A). Show that rk(M ) = 0 i.e. that [M ] ∈ K If k is an arbitrary ring, we define the ring Bn = k[z, x, y] = k[Z, X1 , . . . , Xn , Y1 , . . . , Yn ]  Z(Z − 1) + Pn i=1 Xi Yi Thus B0 ' k × k. Let bn be the ideal hz, x1 , . . . , xn i. 4. Show that the localized rings Bn [1/z] and Bn [1/(1−z)] are elementary localized rings (i.e. obtained by inverting a single element) of a polynomial ring over k with 2n indeterminates. Show that Bn /hxn i ' Bn−1 [yn ] ' Bn−1 [Y ]. 5. For n = 1, define a projective resolution of the B1 -module B1 /b1 of length 2 e 0 (B1 ). and verify that [B1 /b1 ] ∈ K 6. For n = 2, define a projective resolution of the B2 -module B2 /b2 of length 3 [z,x1 ,x2 ] 0 → Im F2 → B42 → B32 −−−→ B2  B2 /b2 → 0, e 0 (B2 ). and verify that [B2 /b2 ] ∈ K 7. Explicate a permutation σ ∈ S2n such that the n + 1 first coefficients of the first row of the matrix Fn0 = Pσ Fn Pσ−1 are z, x1 , . . . , xn (Pσ is the permutation matrix σ). 8. For n = 3, define a projective resolution of the B3 -module B3 /b3 of length 4 [z,x1 ,x2 ,x3 ] 0 → Im(I8 − F30 ) → B83 → B73 → B43 −−−−→ B3  B3 /b3 → 0, e 0 (B3 ). and verify that [B3 /b3 ] ∈ K 9. And in general? Some solutions, or sketches of solutions Exercise 2. We roughly rewrite the second proof of the local freeness lemma. Let ϕ be the linear map which has as its matrix F . Let fj be the column j of the matrix F , and (e1 , . . . , en ) be the canonical basis of An . 598 X. Finitely generated projective modules, 2 By hypothesis, (f1 , . . . , fk , ek+1 , . . . , en) is a V change of coordinate matrix is B1 = C0 ϕ(ei ) = fi , with respect to this basis, ϕ has n basis  of A . The corresponding  0 . Since ϕ(fi ) = ϕ ϕ(ei ) =   Ih Ik X a matrix of the type . 0 Y The computation gives  B1−1 = V −1 C  0 Ih where L = V −1 L0 , and C = −C 0 V−1 . Ik Since Dk+1 (G) = 0, we have G = 0  −L Ih Ik 0 Let B2 =  G = B1−1 F B1 = ,  , we have B2−1 =  ,  L 0  L −C 0 V −1 L0 + W Ik 0 , therefore W = C 0 V −1 L0 .  L Ih Ik 0 , then B2−1 G B2 = Ik,n . Finally, we obtain B −1 F B = Ik,n with  B = B1 B2 = and B −1 = B2−1 B1−1 V C0 0 Ih   Ik 0 L Ih    = · · −L Ih Ik 0 V −1 C   =  0 Ih −L0 Ih − W V C0   V −1 + LC C = L Ih  . The equality F 2 = F gives in particular V = V 2 + L0 C 0 . Therefore Ik = V (Ik + L0 C0 V −1 ) = V (Ik − LC), and finally V −1 = Ik − LC. Ik L Therefore as stated B −1 = . C Ih Before proving the statement regarding Ih − W , let us prove the converse. The double equality  Ik C L Ih   = Ik − LC 0 L Ih  Ik C 0 Ih   = Ik 0 L Ih  Ik C 0 Ih − CL  shows  that Ik − LC is invertible if and only if Ih − CL is invertible if and only Ik L if is invertible. This also gives C Ih   Ik L det = det(Ik − LC) = det(Ih − CL) . C Ih The computation then gives  −1   Ik L V −V L , = C Ih −CV Ih + CV L hence  −1       Ik L Ik 0 Ik L V VL · · = , C Ih 0 0 C Ih −CV −CV L which establishes the converse. Finally, the equality B −1 F B = Ik,n implies B −1 (In − F ) B = In − Ik,n , which gives  Ik − V −C 0 −L0 Ih − W   = Ik C L Ih −1  · 0 0 0 Ih   · Ik C L Ih  Solutions of selected exercises 599 and we find ourselves in the symmetric situation, therefore (Ih − W )−1 = Ih − CL and det V = det(Ih − W ). Exercise 5. Note g (resp. d) as the left-multiplication (resp. right-multiplication) by P . We then have g 2 = g, d2 = d, gd = dg, ϕ = g + d − 1 and π = g + d − 2gd. Exercise 8. 1a. The “homogeneous Sylvester matrix” S is defined as that of the linear map (A, B) 7→ P A + QB over the bases (uq−1 , . . . , v q−1 ) for A (homogeneous polynomial of degree q − 1), (up−1 , . . . , v p−1 ) for B (homogeneous polynomial of degree p − 1) and (up+q−1 , . . . , v p+q−1 ) for P A + QB (homogeneous polynomial of degree p + q − 1). By making v = 1, we see that tS = Syl(g, p, h, q), hence det(S) = Res(g, p, h, q). By making u = 1, we see that tS is almost the matrix Syl(e g , p, e h, q): the order of the rows, the order of the q first columns and the order of the last p must be reversed. Hence the stated result because (−1)bq/2c+bp/2c+b(p+q)/2c = (−1)pq . e = Res(P, Q) Ip+q means that, if k+` = p+q−1, uk v ` Res(P, Q) 1b. The equality S S is a linear combination of the column vectors of the matrix S. That therefore exactly gives the required inclusion, which is after all just the homogeneous version of the usual inclusion. 2. We write f in the irreducible form f = a/b with a, b ∈ k[t], and we homogenize a and b in degree d (maximum of the degrees of a and b) to obtain two homogeneous polynomials A, B ∈ k[u, v] of degree d. If k is an arbitrary ring, we ask that Res(A, B) be invertible. That is necessary for the fraction to remain well-defined after every scalar extension. Let us then see that the morphism f is first defined at the unimodular vector level  (ξ : ζ) 7→ A(ξ, ζ) : B(ξ, ζ) . This makes sense because if 1 ∈ hξ, ζi, then 1 ∈ hA(ξ, ζ), B(ξ, ζ)i after item 1b. To get back up to level  AG2,1 (k),  we take two new indeterminates x, y by thinking xu yu about the matrix . As hu, vi2d−1 ⊆ hA, Bi, we can write xv yv (xu + yv)2d−1 = E(x, y, u, v)A(u, v) + F (x, y, u, v)B(u, v) with E and F homogeneous in (x, y, u, v).  Actually, E and F are bihomogeneous in (x, y), (u, v) , of degree 2d − 1 in (x, y), of degree d − 1 in (u, v). As EA is bihomogeneous, of bidegree (2d − 1, 2d − 1), there exists (see the justification below) some homogeneous polynomial α0 in 4 variables, α0 = α0 (α, β, γ, δ), such that: EA = α0 (xu, yu, xv, yv), deg(α0 ) = 2d − 1. Likewise with F A, EB, F B to produce β 0 , γ 0 , δ 0 . We then consider the matrices  xu xv yu yv  /  α γ β δ   ,  EA EB  FA FB   /   α0 γ0 β0 δ0  . α β α0 β 0 7→ . γ δ γ 0 δ0 Note: α0 , β 0 , γ 0 , δ 0 are homogeneous polynomials in (α, β, γ, δ), of degree 2d − 1, The lifting we are looking for is then 600 X. Finitely generated projective modules, 2 such that α γ β δ α0 γ0 divides β0 δ0 α + δ − 1 divides α0 + δ 0 − 1. , Justification of the existence of α0 . This rests on the following simple fact: ui v j xk y ` is a monomial in (xu, yu, xv, yv) if  and only  if i + j = k + `; indeed, if this equality is satisfied, there is a matrix m n ∈ M2 (N) such that the sums of rows are (i, j) and the sums of columns r s are (k, l). A schema to help with the reading: i j k m r `  n s  xu xv yu yv  , and then ui v j xk y ` = um+n v r+s xm+r y n+s = (xu)m (yu)n (xv)r (yv)s .  We deduce that a bihomogeneous polynomial in (x, y), (u, v) , of bidegree (d, d), is the evaluation at (xu, yu, xv, yv) of a homogeneous polynomial of degree d. 3. For f (t) = t2 , we obtain the lift  α γ β δ   7→ α2 (α + 3δ) γ 2 (α + 3δ)  β 2 (3α + δ) δ 2 (3α + δ) . More generally, we develop (α + δ)2d−1 in the form αd Sd (α, δ) + δ d Sd (δ, α), and we obtain the lift   If H = a c b d α γ β δ   7→ αd Sd (α, δ) γ d Sd (α, δ) β d Sd (δ, α) δ d Sd (δ, α)  α γ β δ   7→ H α γ β δ  . at+b : ct+d , we obtain the following lift of f (t) =   H −1 . Exercise 9. (The fundamental conic or Veronese embedding P1 → P2 ) We proceed as in Exercise 8, but it is simpler because, since hu, vi2 = u2 , uv, v 2 , the map (u : v) 7→ (u2 : uv : v 2 ) is well-defined at the unimodular vector level.  We introduce (x, y) with the matrix α γ β δ   ↔ xu xv yu yv  in mind. We develop (xu + yv)2 = x2 u2 + 2xyuv + y 2 v 2 , sum of 3 terms which will be the 3 diagonal terms of a matrix of AG3,1 (k), then we complete such that each column the ad-hoc multiple of the vector t[ u2 uv v 2 ]. Which gives " x2 u 2 x2 uv x2 v 2 2xyu2 2xyuv 2xyv 2 y 2 u2 y 2 uv y2 v2 # " F = α2 αγ γ2 2αβ 2αδ 2γδ β2 βδ δ2 # . Solutions of selected exercises 601  The lift AG2,1 (k) → AG3,1 (k) is α γ β δ  7→ F . We of course have Tr(F ) = (α + δ)2 = 1, D2 (F ) ⊆ hαδ − βγi = 0, and F is a projector of rank 1. Exercise 10. (Projection matrices of corank 1) 1. We provide two solutions for this question. The first consists of using the expression of the adjoint in terms of the starting matrix; the second proof uses the localization. e as a polynomial in A For A ∈ Mn (A) we have the classical expression of A e = (−1)n−1 Q(A) with XQ(X) = CA (X) − CA (0). A Apply this to a projector P of rank n − 1. We get CP (X) = (X − 1)n−1 X, Q(X) = (X − 1)n−1 and (P − In )n−1 = (−1)n−1 Pe. Since (In − P )n−1 = In − P , we obtain P + Pe = In . Here is the proof by localization. By the local structure theorem for finitely generated projective modules (Theorem V -6.1 or Theorem 1.5), there exist comaximal localizations such that over each localized ring, P is similar to Ir,n , where the integer r a priori depends on the localization. Here, since P is of rank n − 1, we have r = n − 1 or 1 = 0. Therefore P + Pe = In over each localized ring, and the equality is also globally true by the basic local-global principle. 2. Let us see the proof by comaximal localizations. Over the localized ring As , the fs = In . projector P is similar to Qs = Ir,n , where r depends on s. We have Qs + Q fs = Ir,n . If r = n, then Qs + Q fs = 2 In . If r < n − 1, then Qs + Q Recap: if r = 6 n − 1, then 1 = 0 and the rank is also equal to n − 1. Consequently over all the localized rings As , the projector P is of rank n − 1, and therefore also globally. 3. It suffices to multiply P + Pe = In by P to obtain P 2 = P . Exercise 11. There exists a B ∈ Mn (A) such that ABA = A, in order for AB to be a projector with the same image as A, so of rank n − 1, and for BA to be a projector with the same kernel as A, therefore also of rank n − 1. We define P and Q ∈ Mn (A) by AB = In − P , and BA = In − Q. Thus P , Q ∈ AG1,n (A), with A = (In − P )A = A(In − Q). e = AAe = 0, so Im A ⊆ Ker A. e 1. We have det A = 0, i.e. AA f = I^ eAe = P Next AB n − P = P (because P ∈ AG1,n (A)), and the equality B proves that e ⊆ Ker P = Im(In − P ) = Im A. Ker A e = Im A = Im(In − P ). Conclusion: Ker A e ⊆ Ker A = Ker(BA) = Im Q, then 2. By reasoning as in item 1, we obtain Im A ^ e e f e AB = BA = In − Q = Q, and Ker A = Im A = Im Q. 602 X. Finitely generated projective modules, 2 e Then, we explicate the “left” 3. We apply item 1 to tA, so Im tA = Ker tA. projector (of rank 1) associated with tA. We have t A tB tA = tA, which we write t (BA) tA = tA with t (BA) = In − tQ. This left-projector is therefore tQ. e = Ker tA. We explicate the “right-projector” (of 4. Similarly, item 2 gives Im tA t rank 1) associated with A, we obtain tP , whence the stated result. 5. Finally An / Im A = An / Im(In − P ) ' Im P, Ker tA = Im tP , so the two modules (projective of rank 1) are indeed duals of one another. Remark: we can also use An / Im tA = An / Im(In − tQ) ' Im tQ, Ker A = Im Q, to see that the two modules (projective of rank 1) An / Im tA and Ker A are indeed duals. Exercise 12. (Intersection of two affine schemes over k) π1 π2 A and k[X] −→ B in the First of all we notice that surjective arrows k[X] −→ category of finitely presented k-algebras are seen, from the point of view of the ι1 ι2 schemes, as “inclusions” A −→ kn and B −→ kn , where kn is interpreted as the affine scheme corresponding to k[X]. The definition of the intersection by tensor product is therefore in fact a definition as the push out of the two arrows π1 and π2 in the category of finitely presented k-algebras, or as the pull back of the two arrows ι1 and ι2 in the category of affine schemes over k. The center of the ellipse, the center of the circle and the double point of intersection have for respective coordinates (0, 0), (c, 0) and (a, 0). The computation of other points of intersection gives x = a(2ac + 1 − a2 )/(a2 − 1) and y 2 = 4ac(a2 − ac − 1)/(a2 − 1)2 . From the point of view of quotient algebras we obtain A = k[X, Y ]/hf i , B = k[X, Y ]/hgi , C = k[X, Y ]/hf, gi . Which gives the morphisms K = k[X, Y ] u A π1 π2 )  u C = A ⊗K B ι1 )B {f = 0} 5 kO 2 i ι2 5 {g = 0} i {f = 0} ∩ {g = 0} If k is a discrete field and if 4ac(a2 − ac − 1)(a2 − 1) ∈ k× , the k-algebras A and B are integral, but not C: we have an isomorphism ∼ C −→ k[ζ] × k[ε], where ε2 = 0 and ζ 2 = 4ac(a2 − ac − 1)/(a2 − 1)2 . The algebra C is a k-vector space of dimension 4, corresponding to the affine scheme formed by two points of multiplicity 1 (defined over k or over a quadratic extension of k) and a point of multiplicity 2 (defined over k). Solutions of selected exercises 603 Exercise 13. (Pseudomonic polynomials) Recall that for an idempotent e, we have ha, ei = h(1 − e)a + ei; if e0 is another idempotent orthogonal to e, we have hai = e0 in A/hei if and only if h(1 − e)ai = he0 i in A. 1. For k > r, we have ak = 0 in each component, so in A. The element ar is null in A/her i, invertible in A/h1 − er i therefore har i = her i. Similarly in A/her i, we have har−1 i = her−1 i thus h(1 − er )ar−1 i = her−1 i, and so on. 2. Localize at each of the ei ’s. Exercise 14. (Locally monic polynomials) 1. As f (t) = 0, we have f ∈ a, hence a surjective A-linear map A[T ]/hf i  A[T ]/a between two free A-modules of the same rank n: it is an isomorphism (Proposition II -5.2), so a = hf i. 2. The characteristic polynomial f of t is monic of degree n because A[t] is of constant rank n. As f (t) = 0, we have f ∈ a, hence a surjective A-linear map A[T ]/hf i  A[T ]/a , of a free A-module of rank n over an A-projective module of constant rank n; it is therefore an isomorphism (Proposition 3.4), so a = hf i. Pr Pr 3. Let f = i=0 ai T i = i=0 fr be a locally monic polynomial of formal degree r, with the fundamental system of orthogonal idempotents (e0 , . . . , er ), and f ed = fd monic of degree d modulo h1 − ed i for each d ∈ J0..rK. Then ar = er is idempotent. Then f − fr = (1 − er )f is locally monic of formal degree r − 1 and we can end by descending induction on r to compute the ed ’s from f . If the ring is discrete we obtain a test to decide if a given polynomial is locally monic: each of the successively computed ed ’s must be idempotent and the sum of the ed ’s must be equal to 1. Exercise 15. (Invertible modules and projective modules of constant rank 1) 1. There exists an A-submodule N of B such that M.N = A. P We have (x1 , . . . , xn ) in M and (y1 , . . . , yn ) in N such that 1 = P P P i xi yi 0and xi yj ∈ A. We verify that M = Axi and N = Ayi . Let z ⊗ zk in i i k k M ⊗A M 0 . We have, by noticing that yi zk ∈ N.M = A P P P z ⊗ zk0 = x y z ⊗ zk0 = x (yi zk ) ⊗ zk0 k k k,i i i k k,i i = P k,i xi ⊗ (yi zk ) zk0 = P i xi ⊗ yi P k zk zk0 ,  therefore the canonical surjection M ⊗A M 0 → M.M 0 is injective. 2. It must be shown that a contains a regular element (Lemma V -7.7 5), which is immediate. Exercise 16. (The exact sequence with Pic A and Pic K, where K = Frac A) Defining the sequence is obvious; thus, the map K× → Gfr(A) is that which to x ∈ K× associates the principal fractional ideal Ax. No issues either to verify that the composition of two consecutive morphisms is trivial. Exactness in K× : if x ∈ K× is such that Ax = A, then x ∈ A× . Exactness in Gfr(A): if a ∈ Gfr(A) is free, it means that it is principal i.e. of the form Ax with x ∈ K× . 604 X. Finitely generated projective modules, 2 Only the exactness in Pic A is more delicate. Generally, if P is a finitely generated projective A-module, then the canonical map P → K ⊗A P is injective because P is contained in a free A-module. Thus let P be an A-projective module of constant rank 1 such that K ⊗A P ' K. Then P is injected into K, then into A (multiply by a denominator), i.e. P is isomorphic to an integral ideal a of A. Similarly, the dual P ? is isomorphic to an integral ideal b of A. We have A ' P ⊗A P ? ' a ⊗A b ' ab, so ab is generated by a regular element x ∈ A. We have x ∈ a so a is an invertible ideal: we have found an invertible ideal a of A such that a ' P . Exercise 24. 1 and 2. Immediate. A0 A 3. Consider the short sequence AN −→ Am −→ An ; it is locally exact, so it is globally exact. 4. Every stably free module of rank 1 can be given in the form Ker A where A A ∈ An×(n+1) is a surjective matrix An+1 −−→ An . Since 1 ∈ Dn (A), we apply question 3 with m = n+1. We obtain A0 ∈ A(n+1)×1 of rank 1 with Im A0 = Ker A; so the column A0 is a basis of Ker A. Exercise 25. (Homogeneous polynomials and Pn (k)) Let f ∈ k[X0 , . . . , Xn ] be a homogeneous polynomial of degree m and (to simplify) P = ha, b, ci ⊆ kn+1 be a direct summand of rank 1. Suppose that f (a) = f (b) = f (c) = 0 and that we want to show that f (x) = 0 if x = αa+βb+γc. The matrix of (a, b, c) is of rank 1, therefore the ai ’s, bj ’s, ck ’s are comaximal. It therefore suffices to prove the equality after localization at one of these coordinates. For example c b over k[1/a0 ] we have x = (α + a0 β + a0 γ)a = λa, and so f (x) = λm f (a) = 0. 0 0 Exercise 26. (Tangent space to GL  n) Consider the k-algebra k[ε] = k[T ] T 2 . Let A ∈ GLn (k) and H ∈ Mn (k). We have A + εH = A(In + εA−1 H), and In + εM is invertible, with inverse In − εM , for every M ∈ Mn (k). Therefore A + εH ∈ GLn (k) for any H. Thus, the tangent space TA (GLn ) is isomorphic to Mn (k). NB: (A + εH)−1 = A−1 − εA−1 HA−1 . Exercise 27. (Tangent space to SLn ) We use the k-algebra k[ε] of Exercise 26. For A, H ∈ Mn (k), we have det(A + e εH) = det(A) + ε Tr(AH). We deduce e = 0). det(A + εH) = 1 ⇐⇒ (det(A) = 1 and Tr(AH)  e =0 . We therefore have, for A ∈ SLn (k), TA (SLn ) = H ∈ Mn (k) Tr(AH) 2 Let us show that TA (SLn ) is a free k-module of rank n − 1. Indeed, the k-linear automorphism H 7→ AH of Mn (k) transforms In into A and bijectively applies TIn (SLn ) over TA (SLn ), since we can verify it by writing e AH). Finally, TIn (SLn ) is the k-submodule of Mn (k) made of the Tr(H) = Tr(A matrices of null trace (which is indeed free of rank n2 − 1). e = Tr(Ae AH) = Tr(H). NB: H 7→ HA was also possible, because Tr(AH A) Solutions of selected exercises 605 Exercise 28. (Tangent space at J0 to the nilpotent cone) 1. We easily see that ϕ(H)J0 = J0 ϕ(H). If k was a field, we could deduce that ϕ(H) is a polynomial in J0 . The direct computation gives  ϕ(eij ) = 0 n−1−(i−j) J0 if i < j otherwise. In particular, ϕ(ei1 ) = J0n−i . We therefore have Im ϕ = Ln−1 k=0 kJ0k . 2. For k ∈ J0..n − 1K, the matrix J0k has null coefficients, except for those that are on the kth up-diagonal, all equal to 1. We can therefore take as direct complement of Im ϕ the submodule generated by the eij ’s, with j < n (we therefore omit the ein ’s which corresponds to the last position of the up-diagonals of the J0k ’s). We then define ψ by n 0 if j < n ψ(eij ) = or ψ(H) = H tJ0n−1 . ei1 if j = n We easily verify that ψ(J0n−i ) = ei1 for i ∈ J1..nK, then (ϕ◦ψ)(A) = A if A ∈ Im ϕ, and finally ϕ ◦ ψ ◦ ϕ = ϕ. By miracle, we also have ψ ◦ ϕ ◦ ψ = ψ. We have eij − ei0 j 0 ∈ Ker ϕ as soon as i0 − j 0 = i − j (i0 > j 0 , i > j) and we obtain a basis of Ker ϕ by considering the n(n−1) matrices eij with i < j and the n(n−1) 2 2 matrices ei1 − ei+r,1+r , r ∈ J1..n − iK, i ∈ J1..n − 1K. 3. We use the k-algebra k[ε] ' k[T ]  T 2 . For A, H ∈ Mn (k), we have (A + εH)n = An + ε P i+j=n−1 Ai HAj . For A = J0 , we find that the tangent space “to the nilpotent cone” is Ker ϕ which is a free module of rank n2 − n (it is the dimension of the nilpotent cone). Problem 1. (The ring of the circle) 1. Naively: let f = f (x, y) ∈ k[x, y] be a conic, i.e. a polynomial of degree 2, and (x0 , y0 ) be a k-point of {f (x, y) = 0}. The classical trick of parameterization consists in defining t by y−y0 = t(x−x0 ) (x, y) and, in the equation  (x0 , y0 ) f (x, y) = f x, t + t(x − x ) = 0, 0 0 in looking for x in terms of t. This equation admits x = x0 as a solution, Y − y0 = t(X − x0 ) hence the other solution in the rational form. Algebraically speaking, we suppose that f is irreducible. Let k[x, y] = k[X, Y ]/ hf i. We obtain k(x, y) = k(t) with t = (y − y0 )/(x − x0 ). Here, the reader will compute 2 the expressions of x, y in terms of t: x = tt2 −1 , y = t−2t 2 +1 . +1 Geometrically, the elements of k[x, y] are precisely the rational fractions defined everywhere on the projective line P1 (k) (parameterized by t) except maybe at the “point” t = ±i. 2. We have x = 1 − 2u, y = −2v, so k[x, y] = k[u, v]. The equality k[x, y] = k[u, v] is not difficult and is left to the reader. What is more difficult, is to show that k[u, v] is the integral closure of k[u] in k(t). We refer the reader 606 X. Finitely generated projective modules, 2 to Exercise XII -8. Geometrically, the poles of x and y are t = ±i, which confirms that x, y are integral over k[(1 + t2 )−1 ] = k[u]. Algebraically, we have x = 1 − u, y 2 = −1 − x2 ∈ k[u], and x, y are indeed integral over k[u]. 3. If i2 = −1, we have (x + iy)(x − iy) = 1. By letting w = x + iy, we have k[x, y] = k[w, w−1 ]. 4. We apply the standard method at a smooth point of a planar curve. We write f (X, Y ) − f (x0 , y0 ) = (X − x0 )u(X, Y ) + (Y − y0 )v(X, Y )   y − y0 x + x0 is therefore x0 − x y + y0 a presentation matrix of (x − x0 , y − y0 ) with 1 ∈ D1 (A). Let us explicate the membership 1 ∈ D1 (A): with here u = X +x0 , v = Y +y0 ; the matrix A = (−y0 )(y − y0 ) + x0 (x + x0 ) + x0 (x0 − x) + y0 (y + y0 ) = 2.  This leads to the matrix B = 1 2  −y0 x0 ; this one satisfies ABA = A and the x0 y0 f desired matrix P is P = I2 − AB = AB AB = 1 2  y − y0 x + x0 x0 − x y + y0  −y0 x0 x0 y0  1 2 =  Hence the general expression of P , P = 1 2    x0 x − y0 y + 1 y0 x + x0 y . y0 x + x0 y −x0 x + y0 y + 1 −x0 x + y0 y + 1 −(y0 x + x0 y) −(y0 x + x0 y) x0 x − y0 y + 1  ,  1−x −y for x0 = 1, y0 = 0 : 1 . Thus, P is a projector of rank 1, −y 1+x 2 presentation matrix of (x − x0 , y − y0 ). As P is symmetric, Equality (5) of Proposition V -7.4 has as consequence that (x − x0 )2 + (y − y0 )2 is a generator of hx − x0 , y − y0 i with (x − x0 )2 + (y − y0 )2 = −2(x0 x + y0 y − 1). Geometrically, xx0 + yy0 − 1 = 0 is the tangent line to the circle x2 + y 2 = 1 at the point P0 = (x0 , y0 ). For those who know the divisors: the divisor of the zeros-poles of this tangent is the principal divisor 2P0 − 2Pt=±i , which corresponds to the fact that the square of the ideal hx − x0 , y − y0 i is principal. Variant I: we directly treat the case of the point (x, y) = (1, 0) (see the following question) then we use the fact that the circle is a group to pass from the point (1, 0) to an arbitrary point P0 = (x0 , y0 ). Thus, we dispose of the “rotation” automorphism  x y   7→ x0 y0 −y0 x0  x y   which realises −y0 x0 x0 y0  1 0   1 0  = x0 y0 We consider its inverse R  R= x0 −y0 y0 x0   , R x y   = x0 y0   , R x0 y0  =  , so that  R x − x0 y − y0   = x0 − 1 y0  , hence x0 − 1, y 0 = hx − x0 , y − y0 i .  . Solutions of selected exercises 607 2 As hx0 − 1, y 0 i = hx0 − 1i, we obtain hx − x0 , y − y0 i2 = hx0 x + y0 y − 1i. Variant II: we provide another justification of the invertibility of hx − x0 , y − y0 i which does not directly use the fact that the circle is smooth. We consider k[x, y] as an extension of degree 2 of k[x], by using (1, y) as the basis. We dispose of a k[x]-automorphism σ which transforms y into −y. We consider the norm N of k[x, y] over k[x]. For z = a(x) + b(x)y, we have N(z) = zσ(z) = (a + by)(a − by) = a2 − (1 − x2 )b2 = a2 + (x2 − 1)b2 . The idea to invert hx − x0 , y − y0 i is to multiply it by its k[x]-conjugate. Let us show the following equality, certificate of the invertibility of the ideal hx − x0 , y − y0 i, hx − x0 , y − y0 i hx − x0 , y + y0 i = hx − x0 i . Indeed, the generators of the left-product are (x − x0 )2 , (x − x0 )(y + y0 ), (x − x0 )(y − y0 ), y 2 − y02 = x20 − x2 . Hence hx − x0 , y − y0 i hx − x0 , y + y0 i = (x − x0 ) hg1 , g2 , g3 , g4 i with g1 = x − x0 , g2 = y + y0 , But hg1 , g2 , g3 , g4 i contains 1 = x20 + y02 . g4 −g1 2 g3 = y − y0 , = x0 and g2 −g3 2 g4 = x + x0 . = y0 therefore it contains 5. By brute force, by using only using 1 ∈ hx − 1, x + 1i on the right-hand side, hx − 1, yi hx − 1, yi = (x − 1)2 , (x − 1)y, y 2 = (x − 1) hx − 1, y, −(x + 1)i = hx − 1i . We divide this equality by x − 1: hx − 1, yi 1, x1 = x − 1, x2 = y, y1 = 1, y2 = y , x−1 y x−1 = h1i and let such that x1 y1 + x2 y2 = −2, which leads to the projection matrix P of rank 1 −1 P = 2  y1 y2  −1 [x1 , x2 ] = 2  x1 y1 x1 y2 x2 y1 x2 y2  = 1 2  1−x −y −y 1+x  6. Let N = Nk[x,y]/k . For a, b ∈ k[x], N(a + by) = a2 + (x2 − 1)b2 . The equality to prove on the degrees is obvious if a or b is null. Otherwise, we write, with n = deg a and m = 1 + deg b, a2 = α2 x2n + . . ., (x2 − 1)b2 = β 2 x2m + . . . (α, β ∈ k? ). The case where 2n 6= 2m is easy. If 2n = 2m, then α2 + β 2 = 6 0 (because −1 is not a square in k), and so the polynomial a2 + (x2 − 1)b2 is of degree 2n = 2m. If a + by is invertible in A, N(a + by) ∈ k[x]× = k? ; hence b = 0 then a is constant. Recap: k[x, y]× = k? . This is specific to the fact that −1 is not a square in k because if i2 = −1, the equality (x + iy)(x − iy) = 1 shows the existence of invertibles other than the constants. Let us show that y is irreducible. If y = zz 0 , then N(y) = N(z)N(z 0 ), i.e. x2 − 1 = (x − 1)(x + 1) = N(z)N(z 0 ). But in k[x], x ± 1 are not associated with a norm (a nonzero norm is of even degree). Therefore N(z) or N(z 0 ) is a constant, i.e. z or z 0 is invertible. Similarly, 1 ± x are irreducible. We will use the equality √ √ √ y 2 = (1 − x)(1 + x), analogous to 2 · 3 = (1 + −5)(1 − −5) in Z[ −5], to see that hx − 1, yi is not a principal ideal : an equality hx − 1, yi = hdi would entail d | x − 1, d | y, i.e. d invertible, and thus 1 ∈ hx − 1, yi, which is not the case. 608 X. Finitely generated projective modules, 2 Problem 2. (The operations λt and γt over K0 (A)) 1. We have λt (A) = λt (1) = 1 + t and γt (1) = 1/(1 − t), so λt (p) = (1 + t)p and γt (p) = 1/(1 − t)p for p ∈ N∗ . We write x in the form [P ] − [Ap ] = P − p for a certain p ∈ N∗ , with P of constant Pp rank p. By definition γt ([P ]) = n=0 λn (P )tn /(1 − t)n , we have Pp γt ([P ]) = n=0 λn (P )tn (1 − t)p−n . γt (p) Thus γt (x) is aP polynomial of degree 6 p in t.P p p Note: γ p (x) = n=0 λn (P )(−1)p−n = (−1)p n=0 λn (P )(−1)n = (−1)p λ−1 (P ). We have γt (x)γt (−x) = 1 and as they are polynomials of K0 (A)[t], their coefficients of degree > 0 are nilpotent (Lemma II -2.6 and Exercise VII -8). In particular the element x, which is the coefficient of degree 1 of γt (x), is nilpotent. γt (x) = 2. Let x ∈ K0 (A) be nilpotent, then rk x is a nilpotent element of H0 (A). But this last ring is reduced (actually, pp-ring); thus rk x = 0. 3. Suppose rk x = [e] for some idempotent e. Vn We have (eA) = 0 for n > 2, therefore λt ([e]) = 1 + [e]t. By definition of ar for a ∈ B and r ∈ H0 B, we obtain (1 + t)[e] = (1 − e) + e(1 + t) = 1 + et. By direct computation we also obtain ReA (t) = (1 − e) + te. Finally, we have by convention B(A) ⊆ H0 A with the identification e = [e]. We then obtain the general equality for x = [P ] by using the fundamental system of orthogonal idempotents formed by the coefficients of RP and by noting that the two members are morphisms from K0 (A) to 1 + t K0 (A)[[t]]. Let us also note that λt (p) = (1 + t)p for p ∈ N∗ is the desired equality when rk x ∈ N∗ . 4. Is obtain from item 1 by replacing t by t/(1 − t). e 0 A. 5. Some x ∈ K0 (A) is of the form y + r with r = rk x ∈ H0 A and y ∈ K −r Then γt (x) = γt (y)(1 − t) . 6. Recall the two following formulas, for d > 1, 1 (1−t)d = P k>0 k+d−1 d−1  (1 − t)−d = tk , −d k P k>0  (−t)k . They are related by the equality k+d−1 d−1  = k+d−1 k  = −d k  (−1)k . By definition, γt (x) = 1 + λd (x)td = d>1 (1−t)d n n P 1+ P d>1,k>0 λd (x)td k+d−1 d−1  tk . For n > 1, the coefficient γ (x) of t is P k+d=n λd (x) k+d−1 d−1  i.e. with p = d − 1 Pn−1 p=0 λp+1 (x) n−1 p  . The other equality is deduced via the equivalence γt = λt/(1−t) ⇐⇒ λt = γt/(1+t) . Problem 3. (The projective map of Noether and the projective modules of constant rank 1 direct summands in k2 ) 1. Uniqueness of the factorization up to order of the factors and up to invertible elements . Solutions of selected exercises 609 2. The product of primitive polynomials is a primitive polynomial, cf. Lemma II -2.6 (Poor man’s Gauss-Joyal). We have the more precise result which consists of the inclusion of ideals hx1 , y1 i · · · hxn , yn i ⊆ Dk (hz0 , . . . , zn i). We can deduce it from the following fact: if f , g are two polynomials with an indeterminate, the product of a coefficient of f and of a coefficient of g is integral over the ideal generated by the coefficients of the product f g (see Lemma XII -2.7), and in particular it is in the radical of this ideal. 0 We can also use the following approach: for I ⊆ J1..nK,  let I be its complement, Q Q n xI = i∈I xi , yI = i∈I yi . For d = #I and N = d , we will show an equality Y (?0 ) #I=d (T − xI yI 0 ) = T N + XN j=1 aj T N −j , aj ∈ hz0 , . . . , zn i . By making T = xI yI 0 , we will have (xI yI 0 )N ∈ hz0 , . . . , zn i, therefore showing the stated inclusion of ideals. To prove (?0 ), we first examine the case where all the yi ’s are equal to 1. We write, by letting S1 (x), . . . , Sn (x) be the elementary symmetric functions of (x1 , . . . , xn ) Q #I=d (T − xI ) = T N + PN j=1 bj T N −j ,  bj = fj S1 (x), . . . , Sn (x) . A careful examination shows that fj is a polynomial of degree 6 j in (S1 , . . . , Sn ). Let us replace in this last equality xi by xi /yi and multiply by (y1 · · · yn )N ; we obtain, with U = y1 · · · yn T and si = Si (x1 /y1 , . . . , xn /yn ) Q #I=d αn 1 sα 1 · · · sn (U − xI yI 0 ) = U N + PN j=1 (y1 · · · yn )j fj (s1 , . . . , sn )U N −j . P Let be a monomial of fj (s1 , . . . , sn ); since α 6 deg fj 6 j, we i i obtain, by remembering that zn = y1 · · · yn , an equality P α1 αn α0 α1 1 znj sα · · · (zn sn )αn = znα0 zn−1 · · · z0αn with α0 = j − i αi . 1 · · · sn = zn (zn s1 ) Since j > 1, one of the exponents αi above is not null and we indeed have the membership to hz0 , . . . , zn i, then the equality (?0 ). 3. Let E = P1 ⊗k · · · ⊗k Pn ⊂ Ln⊗ ; it is a projective module of constant rank 1. Let us show that the restriction of π to E is injective and that π(E) is a direct summand in Sn (L). This will indeed prove that π(E) is a k-point of Pn . Thanks to a finite number of comaximal localizations, we are brought back to the case where Pi is free with basis xi X + yi Y . Then each (xi , yi ) is unimodular Peach n and z X n−i Y i is a unimodular basis of π(E). This proves on the one hand i i=0 that π|E is injective (since it transforms a basis of E into a unimodular vector of Sn (L)) and that π(E) is a direct summand in Sn (L). 4. It seems that ϕ is injective, i.e. (z0 , . . . , zn ) are algebraically independent over k. The image by ϕ is the graded subring A = k[z0 , . . . , zn ] ⊂ k[X, Y ] (the homogeneous component of an element of A is in A); if f ∈ A is homogeneous of degree m, we have m ≡ 0 mod n, and for arbitrary t1 , . . . , tn f (t1 X1 , t1 Y1 , . . . , tn Xn , tn Yn ) = (t1 . . . tn )m/n f (X1 , Y1 , . . . , Xn , Yn ). Finally, A is invariant under the action of the symmetric group Sn which acts on k[X, Y ] by σ · f (X1 , Y1 , . . . , Xn , Yn ) = f (Xσ(1) , Yσ(1) , . . . , Xσ(n) , Yσ(n) ). These last two properties probably characterize A. 610 X. Finitely generated projective modules, 2 Problem 4. (Hilbert’s theorem 90, multiplicative form) We fix once and for all an element b0 ∈ B of trace 1. 1 and 2. No difficulty. The fact that θc is multiplicative exactly translates the fact that c is a 1-cocycle. 3. The action of G over B twisted by the 1-cocycle c is σ ·c b = cσ σ(b); the fact that this is an action is exactly the condition of 1-cocyclicity of c. Indeed  τ ·c (σ ·c b) = τ ·c cσ σ(b) = cτ τ cσ σ(b) = cτ τ (cσ ) (τ σ)(b) = cτ σ (τ σ)(b) = (τ σ) ·c b. P We will notice that πc = σ cσ σ is some sort of G-trace relatively to the action of G twisted by c. We therefore have BG c = { b ∈ B | cσ σ(b) = b }. By using the fact that c is a 1-cocycle, we find that τ ◦ πc = c−1 τ πc ; we deduce that cτ τ (z) = z for every G z ∈ Im πc , i.e. Im πc ⊆ BG c . We define s : Bc → B by s(b) = bb0 . Then G πc ◦ s = IdBG ; indeed, for b ∈ Bc , c πc (b0 b) = P σ cσ σ(bb0 ) = P σ cσ σ(b)σ(b0 ) = P σ bσ(b0 ) = b TrB/A (b0 ) = b. From the equality πc ◦ s = IdBG , we deduce that πc is a surjection from B to BG c , c G that s is injective and that B = s(BG c ) ⊕ Ker πc ' Bc ⊕ Ker πc . In particular, G Bc is a finitely generated projective A-module.  Remark. Let us consider s : b 7→ b0 b in EndA (B), then (πc ◦ s) πc (z) = πc (z) def for all z ∈ B, i.e. πc ◦ s ◦ πc = πc . Consequently πc0 = πc ◦ s = σ cσ σ(b0 •) is a projector; we could certainly compute its trace and find 1, which would prove that πc0 is a projector of rank 1. G 4. Let c, d be two 1-cocycles, x ∈ BG c , y ∈ Bd , so cσ σ(x) = x, dσ σ(y) = y; we easily verify that xy ∈ BG . cd G G Hence an A-linear map BG c ⊗A Bd → Bcd , x ⊗ y 7→ xy, denoted by µc,d . Let P (xi ), (yi ) be two P systems of elements of B like in Lemma VI -7.10 and let ε = i xi ⊗ yi = i yi ⊗ xi (separability idempotent). Recall that ε ∈ Ann(J), which translates to ∀b∈B P i bxi ⊗ yi = P xi ⊗ byi in P def BeA = B ⊗A B. We also have, for b, b0 ∈ B P TrB/A (bb0 ) = i TrB/A (bxi ) TrB/A (b0 yi ). G G We will show that z 7→ (πc ⊗ πd )(b0 zε), BG cd 7→ Bc ⊗A Bd and µc,d are reciprocals of one another. In one direction, P P P (πc ⊗ πd )(b0 zε) = i ai ⊗ bi , with ai = σ cσ σ(b0 zxi ), bi = τ cτ τ (yi ), and we have P P P a b = σ,τ σ(b0 z)cσ dτ i σ(xi )τ (yi ), i i i and since the internal sum (over i) evaluates to 1 or 0, there remains, for z ∈ BG cd P P P P ai bi = σ(b0 z)cσ dσ = σ(b0 )σ(z)(cd)σ = σ(b0 )z = z TrB/A (b0 ) = z. i σ σ σ G In the other direction, let x ∈ BG c and y ∈ Bd . Then, since ε ∈ Ann(J), we can write P P P (πc ⊗ πd )(b0 xyε) = i ai ⊗ bi , with ai = σ cσ σ(b0 xxi ), bi = τ dτ τ (yyi ). Solutions of selected exercises 611 By using cσ σ(b0 xxi ) = cσ σ(x)σ(b0 xi ) = xσ(b0 xi ) and dτ τ (yyi ) = dτ τ (y)τ (yi ) = yτ (yi ), we get P i (x ⊗ y) · P i ai ⊗ bi = P i x TrB/A (b0 xi ) ⊗ y TrB/A (yi ) =   TrB/A (b0 xi ) TrB/A (yi ) ⊗ 1 = (x ⊗ y) · TrB/A (b0 ) ⊗ 1 = x ⊗ y. Item a is proved. For item b, let there be a 1-cocycle, coboundary of b1 ∈ B× , cσ = σ(b1 )b−1 1 . Then b ∈ BG c if and only if for every σ, cσ σ(b) = b, i.e. σ(b1 b) = b1 b i.e. b1 b ∈ A; so −1 G G G BG c = b1 A. We deduce that Bc ⊗ Bc−1 ' A, so Bc is an projective A-module of constant rank 1. 1 × Moreover c 7→ BG c induces a morphism Z (G, B ) → Pic(A). G It remains to show that if BG c is free, i.e. Bc = Ab1 with b1 ∈ B and AnnA (b1 ) = 0, G G then c is a coboundary. But Bc−1 , being the inverse of BG c is also free, Bc−1 = Ab2 , G G G and Bc Bc−1 = B1 = A. We therefore have Ab1 b2 = A, then b1 , b2 are invertible −1 in B (and Ab2 = Ab−1 1 ). Then cσ σ(b2 ) = b2 , i.e. c is the coboundary of b2 . 5. Since A is a zero-dimensional ring, Pic(A) = 0 so H 1 (G, B× ) = 0. 6. Let cτ = xσ(x) · · · σ i−1 (x) with i ∈ J1..nK and τ = σ i . Thus, cId = NB/A (x) = 1, cσ = x, cσ2 = xσ(x). It is a 1-cocycle: cσ σ(cσi ) = cσi+1 , i.e. cσ σ(cτ ) = cστ , then cσj σ j (cτ ) = cσj τ . Problem 5. (The Segre morphism in a special case) It is clear that a ⊆ Ker ϕ. 1. Let m = Xi1 · · · Xir Yj1 · · · Yjs , m0 = Xi01 · · · Xi0 0 Yj10 · · · Yj 0 0 with r s 1 6 i1 6 · · · 6 ir 6 j1 6 · · · 6 js 6 n, 1 6 i01 6 · · · 6 i0r0 6 j10 6 · · · 6 js0 0 6 n. The equality ϕ(m) = ϕ(m0 ) provides 0 0 T r U s Zi1 . . . Zir Zj1 . . . Zjs = T r U s Zi01 . . . Zi0r0 Zj10 . . . Zj 0s0 . ThereforeP r = r0 , s = s0 then ik = i0k and j` = j`0 . Ultimately m = m0 . a m be an A-linear combination of normalized monomials such Let s = α α α that ϕ(s) = 0. As the monomials ϕ(mα ) are pairwise distinct, we have aα = 0, i.e. s = 0. 2. Since Xi Yj ≡ Xj Yi mod a, we see that every monomial is equivalent modulo a to a normalized monomial. We therefore get A[X, Y ] = a + anor . As a ⊆ Ker ϕ, the sum is direct by the previous question. 3. Let h ∈ Ker ϕ which we decompose into h = f + g with f ∈ a, g ∈ anor . Since a ⊆ Ker ϕ, we have g ∈ Ker ϕ, so g = 0. Conclusion: h = f ∈ a, which proves Ker ϕ ⊆ a, then Ker ϕ = a. Problem 6. (The Veronese morphism in a special case) It is clear that b ⊆ a ⊆ Ker ϕ. 1. Let f be in the intersection; f is of the form f = f0 + fi ∈ A[X0 , Xd ]; We write that ϕ(f ) = 0 Pd−1 i=1 fi Xi with f0 (U d , V d ) + f1 (U d , V d )U d−1 V + · · · + fd−1 (U d , V d )U V d−1 = 0. 612 X. Finitely generated projective modules, 2 This is of the form, in A[U ][V ], h0 (V d ) + h1 (V d )V + · · · + hd−1 (V d )V d−1 = 0; by examining in this equality the exponents of V modulo d, we obtain h0 = h1 = · · · = hd−1 = 0. Recap: fi = 0 then f = 0. 2. We work modulo b by letting A[x] = A[X]/b, B = A[x0 , xd ] + A[x0 , xd ]x1 + · · · + A[x0 , xd ]xd−1 ⊆ A[x]. We will show that B is an A-subalgebra; as it contains the xi ’s, it is all of the A[x]. It suffices to prove that xi xj ∈ B for i 6 j ∈ J1..d − 1K, because the other products are in B by definition of B. We use the syzygies xi xj = xi−1 xj+1 for i 6 j ∈ J1..d − 1K. We have x0 xk ∈ B for every k; we deduce x1 xj ∈ B for all j ∈ J1..d − 1K and it is still true for j = d and 0 by definition of B. We then deduce that x2 xj ∈ B for j ∈ J2..d − 1K, and so on. The obtained equality B = A[x] is written as  A[X] = b + A[X0 , Xd ] ⊕ A[X0 , Xd ]X1 ⊕ · · · ⊕ A[X0 , Xd ]Xd−1 , and the + represents a direct sum by item 1 (since b ⊆ Ker ϕ). 3. Let h ∈ Ker ϕ which we decompose into h = f + g as above. Since f ∈ b ⊆ Ker ϕ, we have g ∈ Ker ϕ, so g = 0. Conclusion: h = f ∈ b, which proves Ker ϕ ⊆ b, then Ker ϕ = b = a. Problem 7. (Veronese matrices) 2. It is clear that Vd (P ) is a projector if P is also a projector, and the diagram is commutative for functorial reasons. We can add the following precision: if P , Q ∈ Mn (k) are two projectors such that Im P ⊆ Im Q, then Im Vd (P ) ⊆ Im Vd (Q). Indeed, we have Im P ⊆ Im Q if and only if QP = P , and we deduce that Vd (Q)Vd (P ) = Vd (P ), i.e. Im Vd (P ) ⊆ Im Vd (Q). 3. It suffices to do this locally, i.e. to compute Vd (A) when A is a standard projector Ir,n . If A = Diag(a1 , . . . , an ), then Vd (A) is diagonal, with diagonal the n0 monomials aα with |α| = d. In particular, for A = Ir,n , we see that Vd (A) is a standard projection, of rank the number of α such that α1 + · · · + αr = d, i.e.  d+1−r , and Vd (I1,n ) = I1,n0 . r−1 Problem 8. (Some examples of finite projective resolutions) 1. The computation of Fk2 − Fk is done by induction and poses no problem. For the conjugation (n > 1), we use    0 I −I 0  A C B D  0 −I I 0   = D −B −C A  . A B = Fn , this provides a conjugation between Fn and I2n − tFn . C D Pn When z(z − 1) + i=1 xi yi = 0, the projectors Fn and I2n − Fn have for image n finitely generated projective modules P and Q with P ⊕ Q ' A2 and P ' Q? . n ∗ Therefore 2 rk(P ) = 2 , and since mx = 0 ⇒ x = 0 for m ∈ N and x ∈ H0 A, we obtain rk(P ) = 2n−1 . 2. The computation of Uk Vk and Vk Uk is done by induction. The fact that Fn and Gn are conjugated by a permutation matrix is left to the sagacity of the reader. For Solutions of selected exercises 613 For example, G2 = Pτ F2 Pτ−1 for τ = (2, 4, 3) = (3, 4)(2, 3), and G3 = Pτ F3 Pτ−1 for τ = (2, 4, 7, 5)(3, 6) = (3, 6)(2, 4)(4, 7)(5, 7). Regarding the constant rank 2n−1 we can invoke item 1, or make the direct computation after localization at z and at z = 1 − z. 3a. Direct use of the referenced exercise. 3b. Let S be the monoid aN . We can localize a finite projective resolution of M over A to obtain one over S −1 A 0 → S −1 Pn → · · · → S −1 P1 → S −1 P0  S −1 M → 0. Pn As aM = 0, we have S −1 M = 0, therefore (−1)i rk(S −1 Pi ) = 0. But the i=0 −1 natural morphism H0 (A) → H0 (S A) is injective. Pn Therefore (−1)i rk Pi = 0. i=0 4. )z contains all the yi0 = yi /z, and since z(1 − z) = P The localized ring (BnP xi yi , we have 1 − z = i xi yi0 . Therefore z ∈ k[x1 , . . . , xn , y10 , . . . , yn0 ] and iP 1 − i xi yi0 ∈ (Bn )× z . We then verify that (Bn )z = k[x1 , . . . , xn , y10 , . . . , yn0 ]s with s = 1 − xi yi0 . 0 0 0 P Similarly, (Bn )1−z = k[x1 , . . . , xn , y1 , . . . , yn ]1− x0 y with xi = xi /(1 − z). P i i 5. Forn > 1, every  element a ∈ {z, x1 , . . . , xn } is regular and a(Bn /bn ) = 0. As z x1 F1 = is a projector, we have [z, x1 ]F1 = [z, x1 ]. The reader will check y1 z that Ker [z, x1 ] = Ker F1 = Im(I2 − F1 ); hence the exact sequence [z,x1 ] 0 → Im(I2 − F1 ) → B21 −−→ B1  B1 /b1 → 0. We indeed have rk(B1 /b1 ) = 1 − 2 + 1 = 0. 6. Let A be the matrix constituted of the first 3 rows of I4 − F2 " # 1 − z −x1 −x2 0 −y1 z 0 −x2 . A= −y2 0 z x1 It is clear that AF2 = 0 and [z, x1 , x2 ]A = 0. The reader will check that the sequence below is exact [z,x1 ,x2 ] A 0 → Im F2 → B42 −−→ B32 −−−−−→ B2  B2 /b2 → 0. We indeed have rk(B2 /b2 ) = 1 − 3 + 4 − 2 = 0. 7. Immediate given the definition of Fn . 8. Consider the upper half of the matrix I8 − F30 and delete its last (zero) column to obtain a matrix A of format 4 × 7. Let B be the matrix of format 7 × 8 obtained by deleting the last row of F30 . Then the brave reader will check the exactness of B [z,x1 ,x2 ,x3 ] A 0 → Im(I8 − F30 ) → B83 −−→ B73 −−→ B43 −−−−−→ B3  B3 /b3 → 0. We have rk(B3 /b3 ) = 1 − 4 + 7 − 8 + 4 = 0. 9. There is an exact sequence (let B = Bn , b = bn ): An+1 An−1 A A A n 2 1 Ln+1 −−→ Ln −−→ Ln−1 −−→ · · · −→ L2 −−→ L1 −−→ L0 = B  B/b . where Lr is a free module of rank n+1 In particular, L1 = B P i∈Ir  n+1 i with Ir = { i ∈ J0..rK | i ≡ r mod 2 }. n and Ln = Ln+1 = B2 . 614 X. Finitely generated projective modules, 2 As for the matrices Ar , we have A1 = [z, x1 , . . . , xn ], and the matrix Ar is extracted from Fn if r is odd, and extracted from I − Fn otherwise. We have An+1 = Fn for even n, and An+1 = I − Fn for odd n. By letting Pn+1 = Im An+1 , the B-module B/b admits a projective resolution of length n + 1 of the following type n A An−1 A A n 2 1 0 → Pn+1 → Ln = B2 −→ Ln−1 −−→ · · · → L2 −→ L1 −→ L0 = B  B/b . (Pn+1 of constant rank 2n−1 ). e 0 (B). The explicit expression of the rank of Li confirms that [B/b ] ∈ K We have rk Ln−1 +rk L0 = rk Ln−2 +rk L1 = · · · = 2n (in particular, if n = 2m+1, then rk Lm = 2n−1 ). e 0 (Bn ) ' Z with as a generator Note: If k is a discrete field, we can show that K e [Bn /bn ]. We deduce that the ideal K0 (Bn ) has a null square; generally, let A be e 0 (A) = Zx ' Z, then x2 = mx with m ∈ Z, so xk+1 = mk x a ring satisfying K for k > 1, since x is nilpotent (see Problem 2), there is some k > 1 such that mk x = 0, so mk = 0, then m = 0 and x2 = 0. Bibliographic comments Theorem 1.4 specifies Theorem 2 in [Bourbaki] Chap. II §5. Section 6 is based on the articles [31, 32, Chervov&Talalaev] which examine the “Hitchin systems” over the singular curves. Problem 2 is inspired from a non-published article of R. G. Swan: On a theorem of Mohan, Kumar and Nori. Problem 4 comes from an exercise of Chapter 4 of [Jensen, Ledet & Yui]. In Problem 8, the matrix Fk occurs in the article: Vector bundles over Spheres are Algebraic, R. Fossum, Inventiones Math. 8, 222–225 (1969). The ring Bn is a classic in algebraic K-theory. Chapter XI Distributive lattices Lattice-groups Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . 616 1 Distributive lattices and Boolean algebras . . . . . . 617 Quotient lattices, ideals, filters . . . . . . . . . . . . . . . . 619 Boolean algebras . . . . . . . . . . . . . . . . . . . . . . . . 621 Boolean algebra generated by a distributive lattice . . . . . 622 2 Lattice-groups . . . . . . . . . . . . . . . . . . . . . . . 624 First steps . . . . . . . . . . . . . . . . . . . . . . . . . . . 624 Remarkable identities in the l-groups . . . . . . . . . . . . 626 Simultaneous congruences, covering principle by quotients . 627 Partial decomposition, complete decomposition . . . . . . . 631 3 GCD-monoids, GCD-domains . . . . . . . . . . . . . . 635 Non-negative submonoid of an l-group . . . . . . . . . . . . 635 GCD-monoids . . . . . . . . . . . . . . . . . . . . . . . . . 636 GCD-rings . . . . . . . . . . . . . . . . . . . . . . . . . . . 637 GCD-domains of dimension at most 1 . . . . . . . . . . . 638 Gcd in a polynomial ring . . . . . . . . . . . . . . . . . . 639 4 Zariski lattice of a commutative ring . . . . . . . . . . 641 Generalities . . . . . . . . . . . . . . . . . . . . . . . . . . . 641 Duality in the commutative rings . . . . . . . . . . . . . . . 642 Annihilating and inverting simultaneously . . . . . . . . . 642 Dual definitions . . . . . . . . . . . . . . . . . . . . . . . 643 – 615 – 616 XI. Distributive lattices, lattice-groups Saturated pairs . . . . . . . . . . . . . . . . . . . . . . . Ideals and filters in a localized quotient ring . . . . . . Closed covering principles . . . . . . . . . . . . . . . . . . Reduced zero-dimensional closure of a commutative ring 5 Entailment relations . . . . . . . . . . . . . . . . . . . A new look at distributive lattices . . . . . . . . . . . . . Duality . . . . . . . . . . . . . . . . . . . . . . . . . . . . Heyting algebras . . . . . . . . . . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . 644 646 647 649 654 654 656 658 659 666 674 Introduction This chapter begins with an introductory section which fixes the formal algebraic framework of distributive lattices and of Boolean algebras. The distributive lattices are important in commutative algebra for several reasons. On the one hand the theory of divisibility has as its “ideal model” the theory of divisibility of natural integers. If we take as the order relation a 4 b, the relation “a is a multiple of b,” we obtain that N is a distributive lattice with: minimum element 0, maximum element 1, the supremum a ∨ b equal to the gcd and the infimum a ∧ b equal to the lcm. A few beautiful properties of divisibility in N are expressed in modern terms by saying that the ring Z is a Bézout ring (see Sections III -8 and IV-7). The ideal numbers in number theory have been created by Kummer to fill the gap between the theory of divisibility in the ring of integers of a number field and that in N. The ring of integers of a number field is not a Bézout ring in general, but its finitely generated ideals1 form a distributive lattice, and their nonzero finitely generated ideals form the non-negative submonoid of an l-group (see Section 2) which re-establishes the well-ordering of things. The rings whose finitely generated ideals form a distributive lattice are called arithmetic rings (treated elsewhere in Sections VIII -4 and XII -1). Their invertible ideals also form the non-negative submonoid of an l-group. The theory of GCD-domains (Section 3) also finds its natural framework in the context of l-groups. On the other hand the distributive lattices intervene as the constructive counterpart of diverse and various spectral spaces which are imposed as 1 What for Kummer was “the ideal gcd of several numbers” has been replaced in modern language by the corresponding finitely generated ideal. This tour de force, due to Dedekind, was one of the first intrusions of the “actual” infinite in mathematics. §1. Distributive lattices and Boolean algebras 617 powerful tools of the abstract algebra. The discussion on this subject is particularly enlightening when we consider the Zariski lattice of a commutative ring, relatively unknown, which serves as a constructive counterpart to the very famous Zariski spectrum: spectral space that we could believe indispensable to the Krull dimension theory and to the Grothendieck scheme theory. A systematic study of the Zariski lattice will be given in Chapter XIII regarding the Krull dimension, with a heuristic introduction in Section XIII -1. In Section 4 we define the Zariski lattice of a commutative ring A essentially with respect to the construction of the reduced zero-dimensional closure A• (page 649) of the ring. This construction can be regarded as a construction parallel to that of the Boolean algebra generated by a distributive lattice (see Theorem 4.26). The global object A• constructed thus essentially contains the same information as the product of rings Frac(A/p ) for all the prime ideals p of A. We get this even though in the general situation we do not constructively have access to the prime ideals of a ring individually. Another reason to be interested in distributive lattices is the constructive (or intuitionist) logic in which the set of truth values of classical logic, that is {True, False}, which is a Boolean algebra with two elements, is replaced with a more mysterious distributive lattice.2 The constructive logic will be addressed in the Appendix (see page 959), particularly in Sections 2 and 3. In Section 5 of the previous chapter we implement the tools that serve as the framework for a formal algebraic study of this logic: the entailment relations and the Heyting algebras. It is remarkable that Heyting defined those algebras in the first attempt to describe the intuitionist logic formally, and that there has not been a comma to add since. Moreover, entailment relations and Heyting algebras are also useful in the general study of distributive lattices. For example it is sometimes important to be able to say that the Zariski lattice of a ring is a Heyting algebra. 1. Distributive lattices and Boolean algebras In an ordered set X we let, for some a ∈ X, ↓a = { x ∈ X | x 6 a } , ↑a = { x ∈ X | x > a } . (1) We call a finite non-decreasingly ordered list (a0 , . . . , an ) of elements of X a non-decreasing chain. The number n is called the length of the chain. By convention the empty list is a chain of length −1. 2 Actually the truth values of constructive mathematics do not strictly speaking form a set, but a class. Nevertheless the constructive logical connectives act on those truth values with the same algebraic properties as the ∧, the ∨ and the → of Heyting algebras. See the discussion on page 964. 618 XI. Distributive lattices, lattice-groups 1.1. Definition. 1. A lattice is a set T equipped with an order relation 6 for which every finite family admits an upper bound and a lower bound. Let 0T be the minimum of T (the upper bound of the empty family) and 1T be the maximum of T. Let a ∨ b be the upper bound of (a, b) and a ∧ b be its lower bound. 2. A map from one lattice to another is called a lattice homomorphism if it respects the laws ∨ and ∧ and the constants 0 and 1. 3. The lattice is called a distributive lattice when each of the two laws ∨ and ∧ is distributive with respect to the other. The axioms of lattices can be formulated with universal equalities uniquely regarding the two laws ∧ and ∨ and the two constants 0T and 1T . The def order relation is then defined by a 6T b ⇐⇒ a ∧ b = a. Here are those axioms. a∨a a∨b (a ∨ b) ∨ c (a ∨ b) ∧ a a ∨ 0T = = = = = a b∨a a ∨ (b ∨ c) a a a∧a a∧b (a ∧ b) ∧ c (a ∧ b) ∨ a a ∧ 1T = = = = = a b∧a a ∧ (b ∧ c) a a We thus obtain a purely equational theory, with all the related facilities. For example we can define a lattice by generators and relations. Similarly for the distributive lattices. In a lattice, one distributivity implies the other. Suppose for instance that a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c), for all a, b, c. Then the other distributivity results from the following computation    (a ∨ b) ∧ (a ∨ c) = (a ∨ b) ∧ a ∨ (a ∨ b) ∧ c = a ∨ (a ∨ b) ∧ c =   a ∨ (a ∧ c) ∨ (b ∧ c) = a ∨ (a ∧ c) ∨ (b ∧ c) = a ∨ (b ∧ c). In a discrete lattice we have a test for a 6 b, since this relation is equivalent to a ∧ b = a. The subgroups of a group (or the ideals of a commutative ring) form a lattice with repect to the inclusion, but it is not a distributive lattice in general. A totally ordered set3 is a distributive lattice if it possesses a maximum element and a minimum element. Let n be the totally ordered set with n elements. A map between two totally ordered lattices T and S is a homomorphism if and only if it is non-decreasing and 0T and 1T have as their images 0S and 1S . 3 Recall that this is a set E equipped with an order relation 6 for which we have, for all x and y ∈ E, x 6 y or y 6 x. This does not imply that the equality is decidable. §1. Distributive lattices and Boolean algebras 619 If T and T0 are two distributive lattices, the set Hom(T, T0 ) of homomorphisms from T to T0 is equipped with a natural order structure given by def ϕ 6 ψ ⇐⇒ ∀x ∈ T ϕ(x) 6 ψ(x) A cartesian product of distributive lattices is a distributive lattice (for the product laws ∧ and ∨, which gives the product partial order relation). For every distributive lattice T, if we replace the order relation x 6T y by the symmetric relation y 6T x we obtain the opposite lattice T◦ with an exchange of ∧ and ∨ (we sometimes say dual lattice). If A ∈ Pfe (T) with a distributive lattice T we will let _ _ ^ ^ A := x and A := x. x∈A x∈A Quotient lattices, ideals, filters If an algebraic structure is defined by laws of composition of different arities and by axioms that are universal equalities (such as groups, rings and distributive lattices), a quotient structure is obtained when we have an equivalence relation and when the laws of composition “pass to the quotient.” If we look at the structure as defined by generators and relations (which is always possible), we obtain a quotient structure by adding relations. A quotient lattice T0 of a lattice T can also be given by a binary relation 4 over T satisfying the following properties  a 6 b =⇒ a 4 b    a 4 b, b 4 c =⇒ a 4 c (2) a 4 b, a 4 c =⇒ a 4 b ∧ c    b 4 a, c 4 a =⇒ b ∨ c 4 a The relation 4 then induces a lattice structure over the quotient set T0 obtained with the new equality4 (a, b ∈ T) : def a =T0 b ⇐⇒ (a 4 b and b 4 a) Naturally if T is distributive, the same goes for T0 . If ϕ : T → T0 is a distributive lattice homomorphism, ϕ−1 (0) is called an ideal of T. An ideal b of T is a subset of T subjected to the following 4 The fact that, when passing to the quotient, we change only the equality relation and not the objects is simpler than the classical approach, and is more consistent with the (Gaussian) tradition and with machine implementation. No doubt the popular success of equivalence classes as objects of the quotient set is largely due to the fortunate fact that in the case of a quotient group G/H, in additive notation for example, we have (x+H)+(y +H) = (x+y)+H where the symbol + has three different meanings. However, things are less fortunate in the case of quotient rings. For example, (3 + 7Z)(2 + 7Z) is contained within, but is not equal to 6 + 7Z. 620 constraints XI. Distributive lattices, lattice-groups  0∈b  x, y ∈ b =⇒ x ∨ y ∈ b  x ∈ b, z ∈ T =⇒ x ∧ z ∈ b (3) (the last is rewritten as (x ∈ b, y 6 x) ⇒ y ∈ b). A principal ideal is an ideal generated by a single element a, it is equal to ↓ a. The ideal ↓ a, equipped with the laws ∧ and ∨ of T, is a distributive lattice in which the maximum element is a. The canonical injection ↓ a → T is not a morphism of distributive lattices because the image of a is not equal to 1T . However, the surjective map T → ↓ a, x 7→ x ∧ a is a surjective morphism, which therefore defines ↓ a as a quotient structure. The notion opposite to that of an ideal is the notion of a filter. The principal filter generated by a is equal to ↑ a. The ideal generated by a subset J of T is equal to _  IT (J) = x ∈ T ∃J0 ∈ Pfe (J), x 6 J0 . Consequently every finitely generated ideal is principal. If A and B are two subsets of T let   A ∨ B = a ∨ b | a ∈ A, b ∈ B and A ∧ B = a ∧ b | a ∈ A, b ∈ B . (4) Then the ideal generated by two ideals a and b is equal to IT (a ∪ b) = a ∨ b. (5) 5 The set of ideals of T itself forms a distributive lattice with repect to the inclusion, with, for lower bound of a and b, the ideal a ∩ b = a ∧ b. (6) Thus the operations ∨ and ∧ defined in (4) correspond to the supremum and the infimum in the lattice of ideals. V We will denote by FT (S) = { x ∈ T | ∃S0 ∈ Pfe (S), x > S0 } the filter of T generated by the subset S. When we consider the lattice of filters, we must pay attention as to what the reversing of the order relation produces: f ∩ g = f ∨ g is the infimum of the filters f and g, whereas their supremum is equal to FT (f ∪ g) = f ∧ g. The quotient lattice of T by the ideal a, denoted by T/(a = 0), is defined as the distributive lattice generated by the elements of T with as its relations 5 Actually we need to introduce a restriction to truly obtain a set, in order to have a well-defined procedure to construct concerned ideals. For example we can consider the set of ideals obtained from principal ideals via certain predefined operations, such as countable unions and intersections. This is the same problem as the one indicated in footnote 2. §1. Distributive lattices and Boolean algebras 621 the true relations in T on the one hand, and the relations x = 0 for the x ∈ a on the other. It can also be defined by the following preorder relation a 6T/(a=0) b def ⇐⇒ ∃x ∈ a a 6 x ∨ b. This gives a ≡ b mod (a = 0) ⇐⇒ ∃x ∈ a a ∨ x = b ∨ x. In particular, the homomorphism of passage to the quotient ϕ : T → T0 = T/(a = 0) satisfies ϕ−1 (0T0 ) = a. In the case of the quotient by a principal ideal ↓ a we obtain T/(↓ a = 0) ' ↑ a with the morphism y 7→ y ∨ a from T to ↑ a. 1.2. Proposition. Let T be a distributive lattice and (J, U ) be a pair of subsets of T. Consider the quotient T0 of T defined by the relations x = 0 for each x ∈ J, and y = 1 for each y ∈ U . Then the inequality a 6T0 b is satisfied if and only if there exist J0 ∈ Pfe (J) and U0 ∈ Pfe (U ) such that ^ _ a∧ U0 6T b ∨ J0 . (7) We will denote by T/(J = 0, U = 1) this quotient lattice T0 . We see in the example of totally ordered sets that a quotient structure of a distributive lattice is not generally characterized by the equivalence classes of 0 and 1. Let a be an ideal and f be a filter of T. We say that a is f-saturated if we have (g ∈ f, x ∧ g ∈ a) =⇒ x ∈ a, we say that f is a-saturated if we have (a ∈ a, x ∨ a ∈ f) =⇒ x ∈ f. If a is f-saturated and f is a-saturated we say that (a, f) is a saturated pair in T. When (a, f) is a saturated pair, we have the equivalences 1 ∈ a ⇐⇒ 0 ∈ f ⇐⇒ (a, f) = (T, T). 1.3. Fact. Let ϕ : T → T1 be a distributive lattice homomorphism. The ideal a = ϕ−1 (0) and the filter f = ϕ−1 (1) form a saturated pair. Conversely, if (a, f) is a saturated pair of T, the homomorphism of passage to the quotient π : T → T/(a = 0, f = 1) satisfies π −1 (0) = a and π −1 (1) = f. Boolean algebras In a distributive lattice an element x0 is called a complement of x if we have x ∧ x0 = 0 and x ∨ x0 = 1. If it exists the complement of x is unique. It is then often denoted by ¬x. Recall that by definition a ring B is a Boolean algebra if and only if every element is idempotent. We then define an order relation x 4 y by: x is a 622 XI. Distributive lattices, lattice-groups multiple of y, i.e. hxi ⊆ hyi. We thus obtain a distributive lattice in which every element x admits as its complement x0 = 1 + x (cf. Proposition VII -3.1). We have the following converse. 1.4. Proposition. (Boolean algebras) 1. On a distributive lattice in which every element x admits a complement, denoted by ¬x, we can define a Boolean algebra structure by letting xy = x ∧ y and x ⊕ y = (x ∧ ¬y) ∨ (y ∧ ¬x). We once again find x ∨ y = x ⊕ y ⊕ xy and ¬x = 1 ⊕ x. 2. Every homomorphism of distributive lattices between two Boolean algebras is a homomorphism of Boolean algebras, and it respects the passage to the complement. Boolean algebra generated by a distributive lattice Let us begin with a few remarks on the elements that have a complement in a distributive lattice. If a admits a complement a0 , since b = (b ∧ a) ∨ (b ∧ a0 ) for every b ∈ T, the canonical homomorphism T → T/(a = 1) × T/(a0 = 1) is injective. Moreover this morphism is onto because for x, y ∈ T, defining z = (x ∧ a) ∨ (y ∧ a0 ), we get z ∧ a = x ∧ a, i.e. z ≡ x mod (a = 1), and in the same way z ≡ y mod (a0 = 1). Conversely, we have the following result which shows the similarity between an idempotent in a commutative ring and an element having a complement in a distributive lattice (see Fact II -4.1). 1.5. Lemma. For every isomorphism λ : T → T1 × T2 , there exists a (unique) element a ∈ T such that 1. a has a complement ¬a, 2. the composed homomorphism T → T1 identifies T1 with T/(a = 0) and with T/(¬a = 1) , 3. the composed homomorphism T → T2 identifies T2 with T/(a = 1) and with T/(¬a = 0) . J The element a is given by λ(a) = (0T1 , 1T2 ).  When two elements a and b have complements ¬a and ¬b, the De Morgan’s laws are satisfied ¬(a ∧ b) = ¬a ∨ ¬b and ¬(a ∨ b) = ¬a ∧ ¬b. (8) By definition, the Boolean algebra freely generated by the distributive lattice T is given by a pair (Bo(T), λ), where Bo(T) is a Boolean algebra, and §1. Distributive lattices and Boolean algebras 623 where λ : T → Bo(T) is a distributive lattice homomorphism satisfying the following universal property. Every distributive lattice homomorphism ψ from T to a Boolean algebra B is uniquely factored in the form ϕ ◦ λ. distributive lattices T ψ λ  Bo(T) /& B ϕ! Boolean algebras Since we are in the context of purely equational algebraic structures, this Boolean algebra can be constructed from T by forcefully adding a unary law a 7→ ¬a and by imposing the axioms a ∧ ¬a = 0, a ∨ ¬a = 1. In other words Bo(T) can be defined as a Boolean algebra obtained by generators and relations. The generators are the elements of T and the relations are those that are true in T: of the form a ∧ b = c or a ∨ b = d, not to mention 0Bo(T) = 0T and 1Bo(T) = 1T . This description is however somewhat vague so we will construct Bo(T) at turtle speed to see things more clearly. 1.6. Lemma. Let T be a distributive lattice and a ∈ T. Consider the distributive lattice def T[a• ] = T/(a = 0) × T/(a = 1) and λa : T → T[a• ] be the canonical homomorphism. 1. The homomorphism λa is injective and λa (a) = (0, 1) admits (1, 0) as its complement. 2. For every homomorphism ψ : T → T0 such that ψ(a) admits a complement, there exists a unique homomorphism ϕ : T[a• ] → T0 such that ϕ ◦ λa = ψ. T ψ λa  T[a• ] ϕ! &/ T0 ψ(a) admits a complement J Lemma 1.5 gives T0 ' T0 /(ψ(a) = 0) × T0 /(ψ(a) = 1) , hence the homomorphism ϕ and the uniqueness. The injectivity of λa is not obvious but it is a grand classic: if x ∧ a = y ∧ a and x ∨ a = y ∨ a, then x = (x ∨ a) ∧ x = (y ∨ a) ∧ x = (y ∧ x) ∨ (a ∧ x). Symmetrically y = (y ∧ x) ∨ (a ∧ y), so x = y since a ∧ x = a ∧ y.  624 XI. Distributive lattices, lattice-groups 1.7. Corollary. Let a1 , . . . , an ∈ T. 1. The lattice T[a•1 ][a•2 ] · · · [a•n ] is independent, up to isomorphism, in the order of the ai ’s. It will be denoted by T[a•1 , a•2 , . . . , a•n ]. 2. A possible description is the following Y   T[a•1 , a•2 , . . . , a•n ] ' T (ai = 0)i∈I , (aj = 1)j∈J1..nK\I . I∈Pn 3. The natural homomorphism T → T[a•1 , a•2 , . . . , a•n ] is injective. It uniquely factors every homomorphism ψ from T to a distributive lattice T0 such that the ψ(ai )’s admit a complement. 1.8. Theorem. (Boolean algebra freely generated by a distributive lattice) For every distributive lattice T there exists a Boolean algebra, denoted by Bo(T), with a homomorphism λ : T → Bo(T), which uniquely factorizes every homomorphism ψ : T → B to a Boolean algebra. This pair (Bo(T), λ) is unique up to isomorphism. We have in addition the following properties. – The homomorphism λ is injective. – We have Bo(T) = T[(a• )a∈T ]. J It remains to see that the (filtering) colimit of T[a•1 , a•2 , . . . , a•n ] is indeed a Boolean algebra. This results from De Morgan’s laws.  Example. Suppose that T is a lattice of detachable subsets of a set E, in the sense that if A and B are elements of T, then so are A ∪ B and A ∩ B (with in addition ∅ and E as elements of T). Then Bo(T) identifies with the set of finite Boolean combinations of elements of T and it is a Boolean algebra of subsets of E. Comment. In classical mathematics, every distributive lattice is isomorphic to a lattice of subsets of a set. This provides an alternative “construction” of the Boolean algebra Bo(T). 2. Lattice-groups First steps In this book we limit ourselves, for the ordered groups, to the case of commutative groups. 2.1. Definition. We call an ordered group an Abelian group G equipped with a partial order relation compatible with the group law, i.e. in additive notation, ∀a, x, y ∈ G x 6 y =⇒ a + x 6 a + y. An ordered group is called a lattice-group when two arbitrary elements admit a lower bound, which we will denote by x ∧ y. If necessary, we specify §2. Lattice-groups 625 the structure by writing (G, 0, +, −, ∧). A morphism of l-groups is a group homomorphism which respects the law ∧. An Abelian group equipped with a compatible total order (we say a totally ordered group) is an l-group. The totally ordered group morphisms are then the non-decreasing group homomorphisms. An l-subgroup of an l-group G is by definition a stable subgroup for the lattice law ∧. For that it is not sufficient for the induced order relation on the subgroup to make a lattice of it. A guiding idea in the theory of l-groups is that an l-group behaves in computations as a product of totally ordered groups. This will be constructively translated by the closed covering principle 2.10. Examples. 1) (Careful, multiplicative notation!) The set Q>0 of strictly positive rationals is an l-group with as its positive subset the monoid (N>0 , 1, ×). The example of this multiplicative structure is paradigmatic. >0 (P ) We have an isomorphism Lof l-groups Q ' Z , where P is the set of (P ) prime numbers, Z = p∈P Z and the order is induced by the product order. This is just another way to express the fundamental theorem of arithmetic “every natural number is uniquely expressible as a product of powers of prime numbers.” It is by wanting to make multiplication for integers of number fields look like multiplication in N>0 at all costs that mathematicians have been brought to invent the “ideal gcd numbers.” 2) If (Gi )i∈I is a family of l-groups with a discrete indexing set I, we define the orthogonal direct sum of the family, denoted by i∈I Gi , which is an L l-group with as subjacent group the group i∈I Gi , the law ∧ being defined coordinatewise. If I = J1..3K we will let G1  G2  G3 . For example Z(P ) = p∈P Z.Q We also define the product i∈I Gi in the usual way, and it is the product in Q the category of l-groups. When I is a finite set, the l-groups i∈I Gi and i∈I Gi are naturally isomorphic. 3) If (Gi )i∈I is a family of totally ordered discrete groups with for I a totally ordered discrete set we define the lexicographic sum of thisLfamily, it is the totally ordered discrete group G whose subjacent group is i∈I Gi and the order relation is the lexicographical order: (xi )i∈I < (yi )i∈I if and only if xi0 < yi0 for the smallest index i0 such that xi0 6= yi0 . In an l-group the translations are automorphisms of the order structure, hence the distributivity rule x + (a ∧ b) = (x + a) ∧ (x + b). (9) We also see that the bijection x 7→ −x reverses the order, and thus that two arbitrary elements x, y also admits an upper bound  x ∨ y = − (−x) ∧ (−y) , 626 XI. Distributive lattices, lattice-groups  with x + y − (x ∨ y) = (x + y) + (−x) ∧ (−y) = (x + y − x) ∧ (x + y − y), so x + y = (x ∧ y) + (x ∨ y), (10) x + (a ∨ b) = (x + a) ∨ (x + b). (11) However, a minimum element and a maximum element are missing to obtain a lattice. Remarkable identities in the l-groups In this subsection G is an l-group and G+ is the submonoid of G formed from the non-negative elements. Let x+ = x ∨ 0, x− = (−x) ∨ 0 and |x| = x ∨ (−x). We respectively call them the positive part, the negative part and the absolute value of x. 2.2. Theorem. (Distributivity in the l-groups) In an l-group the laws ∧ and ∨ are distributive with respect to one another. J It suffices to show x ∨ (y1 ∧ y2 ) = (x ∨ y1 ) ∧ (x ∨ y2 ). By translating by −x, we are reduced to x = 0, i.e. to (y1 ∧ y2 )+ = y1+ ∧ y2+ . The inequality (y1 ∧ y2 )+ 6 y1+ ∧ y2+ is immediate. Let y = y1 ∧ y2 . The element yi + y + − y is > yi and > 0, so > yi+ . Hence yi+ + y 6 yi + y + . Then (y1+ + y) ∧ (y2+ + y) 6 (y1 + y + ) ∧ (y2 + y + ), i.e. (y1+ ∧ y2+ ) + y 6 (y1 ∧ y2 ) + y + , i.e. y1+ ∧ y2+ 6 y + .  Two elements x, y are said to be disjoint or orthogonal if |x| ∧ |y| = 0. 2.3. Lemma. Let x, y ∈ G. x = x+ − x− , x+ ⊥ x− , + x 6 y ⇐⇒ x 6 y + |x| = x+ + x− = x+ ∨ x− ∈ G+ − (12) − x = 0 ⇐⇒ |x| = 0 (13)  J (12). First of all x − x = (x ∨ 0) − x = (x − x) ∨ 0 + (−x) = x− . Still by distributivity we obtain  + − + − and y 6 x , + x + x = (x ∨ 0) + ((−x) ∨ 0) = (x − x) ∨ (x + 0) ∨ 0 + (−x) ∨ (0 + 0) = x ∨ x . Finally, since x+ + x− = (x+ ∨ x− ) + (x+ ∧ x− ), this gives x+ ∧ x− = 0. (13). Left to the reader.  2.4. Lemma. (Gauss’ lemma) Let x, y, z ∈ G+ . (x ⊥ y and x 6 y + z) =⇒ x 6 z x ⊥ y =⇒ x ∧ (y + z) = x ∧ z (x ⊥ y and x ⊥ z) =⇒ x ⊥ (y + z) (x ⊥ y and x 6 z and y 6 z) =⇒ x + y 6 z (14) (15) (16) (17) J (14). We have x 6 z + x because z > 0 and x 6 z + y by hypothesis, therefore x 6 (z + x) ∧ (z + y) = z + (x ∧ y) = z. §2. Lattice-groups 627 (15). Let x0 = x ∧ (y + z). It suffices to see that x0 6 x ∧ z. We have x0 > 0, x0 6 x so x0 ⊥ y. We can apply the previous item to the inequality x0 6 y + z: it provides x0 6 z, as desired. (16). Direct consequence of the previous item. (17). Because x + y = x ∨ y and x ∨ y 6 z.  2.5. Corollary. Let x, y, z ∈ G, n ∈ N∗ . (x = y − z, y > 0, z > 0, and y ⊥ z) ⇐⇒ (y = x+ and z = x− ) (18) (x > 0, y > 0, and x ⊥ y) =⇒ x ⊥ ny (19) + − + − (nx) = nx , (nx) = nx , |nx| = n |x| (20) nx = 0 =⇒ x = 0 (21) n(x ∧ y) = nx ∧ ny, n(x ∨ y) = nx ∨ ny (22) J (18). It remains to show =⇒. We have x + z = x + y. By applying + − Gauss’ lemma, we obtain y 6 x+ (because y ⊥ z) and x+ 6 y (because x+ ⊥ x− ). (19). Results from (21). (20). By (18) and (19) since nx = nx+ − nx− and nx+ ⊥ nx− . (21). By (20) since the implication is true for x > 0. (22). The elements b = x ∨ y, a = x ∧ y, x1 = x − a and y1 = y − a are characterized by the following relations x1 > 0, y1 > 0, x = x1 + a, y = y1 + a, x1 ⊥ y1 , a + b = x + y. We multiply everything by n.  Simultaneous congruences, covering principle by quotients 2.6. Definition. If a ∈ G, we define congruence modulo a as follows def x ≡ y mod a ⇐⇒ ∃n ∈ N∗ , |x − y| 6 n |a| . We denote by C(a) the set of x’s congruent to 0 modulo a. 2.7. Fact. The set C(a) is an l-subgroup of G and the lattice laws pass to the quotient in G/C(a). Thus, the canonical map πa : G → G/C(a) is a morphism of l-groups, and every l-group morphism G → G0 which annihilates a is factorized by πa . The meaning of the congruence x ≡ 0 mod a is therefore that every l-group ϕ morphism G −→ G0 that annihilates a annihilates x.6 6 In fact, by direct computation, if ϕ(a) = 0, then ϕ(|a|) = |ϕ(a)| = 0, and |ϕ(x)| = ϕ(|x|) 6 ϕ(n |a|) = nϕ(|a|) = 0, so ϕ(x) = 0. 628 XI. Distributive lattices, lattice-groups The following lemma has an arithmetic Chinese remainder theorem flavor (see Theorem XII -1.6 item 5 ) for the l-groups, but only a flavor. It is distinctly simpler. 2.8. Lemma. (Lemma of simultaneous congruences) Let (x1 , . . . , xn ) in G+ and (a1 , . . . , an ) in G. 1. If the inequalities |ai − aj | 6 xi + xj , i, j ∈ J1..nK, are satisfied there exists some a ∈ G such that |a − ai | 6 xi , i ∈ J1..nK. Moreover • If the ai ’s are in G+ we have a solution a in G+ . V • If i xi = 0, the solution a is unique. 2. Similarly, if ai ≡ aj mod xi + xj for i, j ∈ J1..nK, there exists an a ∈ G such that a ≡ ai mod xi , i ∈ J1..nK. Moreover • If the ai ’s are in G+ we have a solution a in G+ . V • If i xi = 0, the solution a is unique. J It suffices to prove item 1. Let us first take a look at uniqueness. If we have two solutions a and a0 we will have |a − a0 | 6 2xi for each i, so V |a − a0 | 6 2 i xi . Let us move on to existence. We treat the case where the ai ’s are in G+ . This is actually a matter of showing that the hypotheses imply the inequality W V + i (ai − xi ) 6 i (ai + xi ). It suffices to verify that for each i, j, we have (ai − xi ) ∨ 0 6 aj + xj . However, 0 6 aj + xj , and ai − xi 6 aj + xj by hypothesis.  2.9. Lemma. Given a finite family (aj )j∈J in an l-group G and a finite subset P of J × J, there exists a finite family (xi )i∈I in G such that V 1. i∈I xi = 0. 2. Modulo each of the xi ’s, for each (j, k) ∈ P , we have aj 6 ak or ak 6 aj . J Let yj,k = aj − (aj ∧ ak ) and zj,k = ak − (aj ∧ ak ). We have yj,k ∧ zj,k = 0. Modulo yj,k , we have aj = aj ∧ ak , i.e. aj 6 ak , and modulo zj,k , we have ak 6 aj . P By expanding by distributivity the sum 0 = (j,k)∈P (yj,k ∧ zj,k ) we obtain V P some i∈I xi , where each xi is a sum j,k tj,k , with one of the two elements yj,k or zj,k as tj,k . Modulo such a xi each of the tj,k ’s is null (because they are > 0 and their sum is null). We are therefore indeed in the stated situation.  The next principle is a kind of analogue, for l-groups, of the basic local-global principle for commutative rings. Actually this is a simple special case of item 2 of Lemma 2.8 when the ai ’s are all zeros: we apply uniqueness. §2. Lattice-groups 629 2.10. Covering principle by quotients. (For l-groups) V Let a, b ∈ G, x1 , . . . , xn ∈ G+ with i xi = 0. Then a ≡ b mod xi for each i if and only if a = b. Consequently, given Lemma 2.9, to demonstrate an equality a = b we can always suppose that the (finite number of) elements which occur in a computation for a proof of the equality are comparable, if we need it to do the proof. The principle applies just as well for inequalities as for equalities since a 6 b is equivalent to a ∧ b = a. Remark. In slightly more abstract Q terms, we could have said that the canonical l-group morphism G → i G/C(xi ) is injective, and the comment that concludes the covering principle by quotients can be paraphrased as follows: in computations, an l-group always behaves like a product of totally ordered groups. In the Riesz theorem that follows we will note that the “there exists” are abbreviations for explicit formulas which result from the proof. Thus the theorem can be seen as a family of algebraic identities in G, under certain sign conditions (which are in the hypothesis). It is also possible to regard this theorem as a family of “pure” algebraic identities in G+ , i.e. without any sign condition. In this case G+ must be considered as an algebraic def structure for which we add the operation x . y = x − (x ∧ y) (well-defined over G+ despite the fact that it calls upon the − operation of G). 2.11. Theorem. (Riesz theorem) Let G be an l-group and u, x1 , . . . , xn , y1 , . . . , ym in G+ . P + 1. If u 6 such that uj 6 yj for j yj , therePexist u1 , . . . , um ∈ G j ∈ J1..mK and u = j uj . P P 2. If i xi = j yj , there exists (zi,j )i∈J1..nK,j∈J1..mK in G+ such that for Pm Pn all i, j we have k=1 zi,k = xi and `=1 z`,j = yj . Direct proof, but clever. 1. It suffices to prove it for m = 2 (easy induction on m). If u 6 y1 + y2 , let u1 = u ∧ y1 and u2 = u − u1 . We need  to prove 0 6 u2 6 y2 . However, u2 = u − (u ∧ y1 ) = u + (−u) ∨ (−y1 ) = (u − u) ∨ (u − y1 ) 6 y2 . 2. For n = 1 or m = 1 there is nothing to do. For n = 2, it is given by item 1. Therefore let us suppose n > 3. Let z1,1 = x1 ∧ y1 , x01 = x1 − z1,1 and y10 = y1 − z1,1 . We have x01 + x2 + · · · + xn = y10 + y2 + · · · + ym . Since x01 ∧ y10 = 0, Gauss’ lemma gives x01 6 y2 + · · · + ym . By item 1 we can write x01 = z1,2 + · · · + z1,m with each z1,j 6 yj , i.e. 0 yj = z1,j + yj0 and yj0 ∈ G+ . Therefore x2 + · · · + xn = y10 + y20 + · · · + ym . This therefore allows us to perform an induction on n. Proof by the covering principle by quotients. It suffices to prove item 2. By applying the principle 2.10, we can assume 630 XI. Distributive lattices, lattice-groups that the group is totally ordered. Suppose for example x1 6 y1 . Let z1,1 = x1 , z1,k = 0 for k > 2. We replace y1 with y1 − x1 = y10 . We are reduced to solving the problem for x2 , . . . , xn and y10 , y2 , . . . , ym . Gradually, we thus decrease n + m until n = 1 or m = 1, in which case everything is clear.  2.12. Fact. (Other identities in the l-groups) Let x, y, x0 , y 0 , z, t ∈ G, n ∈ N, x1 , . . . , xn ∈ G. 1. x + y = |x − y| + 2(x ∧ y). 2. (x ∧ y)+ = x+ ∧ y + , (x ∧ y)− = x− ∨ y − , (x ∨ y)+ = x+ ∨ y + , (x ∨ y)− = x− ∧ y − . 3. 2(x ∧ y)+ 6 (x + y)+ 6 x+ + y + . 4. |x + y| 6 |x| + |y| : |x| + |y| = |x + y| + 2(x+ ∧ y − ) + 2(x− ∧ y + ). 5. |x − y| 6 |x| + |y| : |x| + |y| = |x − y| + 2(x+ ∧ y + ) + 2(x− ∧ y − ). 6. |x + y| ∨ |x − y| = |x| + |y|. 7. |x + y| ∧ |x − y| = |x| − |y| . 8. |x − y| = (x ∨ y) − (x ∧ y). 9. |(x ∨ z) − (y ∨ z)| + |(x ∧ z) − (y ∧ z)| = |x − y| . 10. |x+ − y + | + |x− − y − | = |x − y|. 11. x 6 z =⇒ (x ∧ y) ∨ z = x ∧ (y ∨ z). 12. x + y = z + t =⇒ x + y = (x ∨ z) + (y ∧ t). Vn 13. n x > k=1 (ky + (n − k)x) =⇒ x > y.  P V Pn Wn 14. i=1 xi = k=1 (−1)k−1 I∈Pk,n i∈I xi . 15. 16. 17. 18. x ⊥ y ⇐⇒ |x + y| = |x − y| ⇐⇒ |x + y| = |x| ∨ |y|. x ⊥ y =⇒ |x + y| = |x| + |y| = |x| ∨ |y|. (x ⊥ y, x0 ⊥ y, x ⊥ y 0 , x0 ⊥ y 0 , x + y = x0 + y 0 ) =⇒ (x = x0 , y = y 0 ). We define Tri(x) = [Tri1 (x), Tri2 (x), . . . , Trin (x)], where  V W Trik (x1 , . . . , xn ) = I∈Pk,n (k ∈ J1..nK). i∈I xi We have the following results.  W V a. Trik (x1 , . . . , xn ) = J∈Pn−k+1,n j∈J xj , (k ∈ J1..nK). b. Tri1 (x) 6 Tri2 (x) 6 · · · 6 Trin (x). c. If the xi ’s are pairwise comparable, the list Tr(x) is the list of the xi ’s non-decreasingly ordered (it is not necessary that the group be discrete). Suppose u, v, w ∈ G+ . 19. u ⊥ v ⇐⇒ u + v = |u − v|. 20. (u + v) ∧ w 6 (u ∧ w) + (v ∧ w). 21. (x + y) ∨ w 6 (x ∨ w) + (y ∨ w). 22. v ⊥ w =⇒ (u + v) ∧ w = u ∧ w. 23. u ⊥ v =⇒ (u + v) ∧ w = (u ∧ w) + (v ∧ w). §2. Lattice-groups 631 J All of this is just about immediate in a totally ordered group, by reasoning case-by-case. The result follows by the principle 2.10.  Remarks. 1) An implication like, for instance, (u ∧ v = 0, u > 0, v > 0) =⇒ u + v = |u − v| (see item 19) can be seen as the result of an identity which expresses, for a certain integer n, that n |u + v − |u − v|| is equal to an expression which combines u− , v − and |u ∧ v| by means of the laws ∨, ∧ and +. Actually, the equality given in item 1 directly settles the question without a sign hypothesis on u and v: |u + v − |u − v|| = 2 |u ∧ v|. 2) There is an important difference between the usual algebraic identities, which are ultimately equalities between polynomials in a free commutative ring over indeterminates, Z[X1 , . . . , Xn ], and the algebraic identities in the l-groups. The latter are certainly equalities between expressions that we can write in an l-group freely generated by a finite number of indeterminates, but the structure of such a free l-group is distinctly more difficult to decrypt than that of a polynomial ring, in which the objects have a normalized expression. The comparison of two expressions in Z[X1 , . . . , Xn ] is “easy” in so far as we bring each of them to normal form. The task is much more difficult in the free l-groups, for which there is no unique normal form (we can reduce every expression to a supremum of infima of linear combinations of indeterminates, but there is no uniqueness). Partial decomposition, complete decomposition 2.13. Definition. Let (ai )i∈I be a finite family of non-negative elements in a discrete l-group G. 1. We say that this family admits a partial decomposition if we can find a finite family (pj )j∈J of pairwise P orthogonal non-negative elements such that each ai is of the form j∈J ri,j pj with all the ri,j ∈ N. The family (pj )j∈J is then called a partial decomposition basis for the family (ai )i∈I . 2. Such a partial decomposition is called a complete decomposition if the pj ’s are irreducible (an element q > 0 is said to be irreducible if an equality q = c + d in G+ implies c = 0 or d = 0). 3. We say that an l-group admits partial decompositions if it is discrete and if every finite family of non-negative elements admits a partial decomposition. 4. We say that an l-group admits complete decompositions if it is discrete and if every non-negative element admits a complete decomposition. 5. We say that an l-group admits bounded decompositions Pn when for all x > 0 there exists an integer n such that, when x = j=1 yj with each yj > 0, at least one of the yj ’s is zero. 632 XI. Distributive lattices, lattice-groups 6. An l-group is said to be Noetherian if every non-increasing sequence of non-negative elements admits two equal consecutive terms. Examples. An empty family, or a family of null elements, admits the empty family as a partial decomposition basis. The l-group Z(N) admits complete decompositions. The l-groups Qn√(n > 1) admit partial but not complete decompositions. The l-group Q[ √2] does not admit partial decompositions (consider the finite family (1, 2)). The lexicographical product Z × Z does not admit partial decompositions. More generally a totally ordered group admitting partial decompositions is isomorphic to a subgroup of Q. It is clear that an l-group admitting complete decompositions admits bounded decompositions and that an l-group admitting bounded decompositions is Noetherian. In an l-group admitting partial decompositions, two partial decompositions for two finite families of G+ admit a common refinement for the union of two families: here we mean that a partial decomposition basis (q1 , . . . , qs ) refines another if it is a partial decomposition basis for this other. 2.14. Proposition. In an l-group, if an element > 0 admits a complete decomposition, it is unique up to the order of the factors. J It P suffices to show that if an irreducible element q is bounded above by a sum i pi of irreducible elements Pit is equal to one of them. However, we then have q = q ∧ i pi , and since q ∧ pj = 0 or pj , we can conclude with Gauss’ lemma (equality (15)). Note that we do not need to assume that the group is discrete.  2.15. Proposition. Let G be an l-group admitting complete decompositions. 1. The irreducible elements of G+ form a detachable subset P , and G is isomorphic to the orthogonal direct sum Z(P ) . 2. The group G admits bounded decompositions (and a fortiori is Noetherian). J 1. The irreducibility test is given by the complete decomposition of the element to be tested. The isomorphism is obtained from the uniqueness of the complete decomposition (up to the order of the factors). P 2. Let x ∈ G+ . Let us write x = j∈J nj pj with the irreducible pj ’s and P Pn+1 nj ∈ N, and let n = j nj . Then if x = k=1 xk with non-negative xk ’s, one xk is necessarily zero (consider the decomposition of each xk as a sum of irreducible elements).  §2. Lattice-groups 633 In classical mathematics, a discrete Noetherian l-group admits complete decompositions. This result cannot be obtained constructively. Nevertheless we obtain a partial decomposition. 2.16. Theorem. (Partial decomposition under Noetherian condition) A discrete and Noetherian l-group G admits partial decompositions. For the proof, we will use the following lemma. 2.17. Lemma. (under the hypotheses of Theorem 2.16) For a ∈ G+ and p1 , . . . , pm > 0 pairwise orthogonal, we can find pairwise orthogonal elements a0 , a1 , . . . , am in G+ satisfying the following properties. Pm 1. a = i=0 ai . 2. For all i ∈ J1..mK, there exists an integer ni > 0 such that ai 6 ni pi . 3. For all i ∈ J1..mK, a0 ∧ pi = 0. J For each i, we consider the non-decreasing sequence (a∧npi )n∈N bounded above by a. There exists an ni such that a ∧ ni pi = a ∧ (ni + 1)pi . We then take ai = a ∧ ni pi . If a = ai + bi , we have bi ∧ pi = 0 because ai 6 ai +(bi ∧pi ) 6 a∧(ni +1)pi = ai . The ai ’s are 6 a, pairwise orthogonal W P and > 0 so a > i ai = i ai . Thus, we write in G+ a = a1 + · · · + an + a0 , P with ai 6 ni pi for i ∈ J1..mK. Finally, we have bi = a0 + j6=i aj , so a0 6 bi , then a0 ∧ pi 6 bi ∧ pi = 0. As ai 6 ni pi , we a fortiori have a0 ∧ ai = 0.  Proof of Theorem 2.16. By induction on the number m of elements of the family. • Suppose m = 2, consider the elements x1 , x2 . For ease of notation, let us call them a and b. Let L1 = [a, b], m1 = 1, E1,a = [1, 0], and E1,b = [0, 1]. The algorithm proceeds in steps, at the beginning of step k we have a natural integer mk and three lists of equal length: Lk , a list of non-negative elements of G, Ek,a and Ek,b , two lists of natural integers. At the end of the step the integer mk and the three lists are replaced with a new integer and new lists, which are used at the next step (unless the algorithm terminates). The general idea is the following: if x, y are two consecutive non-orthogonal terms of Lk , we replace in Lk the segment (x, y) with the segment (x − (x ∧ y), x ∧ y, y − (x ∧ y)) (by omitting the first and/or the last term if it is null). We will denote this procedure as follows: R : (x, y) 7→ the new segment (of length 1, 2 or 3).   Note that x + y > x − (x ∧ y) + x ∧ y + y − (x ∧ y) . We have to define a loop-invariant. More precisely the conditions satisfied by the integer mk and the three lists are the following: • a is equal to the linear combination of elements of Lk with coefficients given by Ek,a , 634 XI. Distributive lattices, lattice-groups • b is equal to the linear combination of elements of Lk with coefficients given by Ek,b , • if Lk = [xk,1 , . . . , xk,rk ] the elements xk,j and xk,` are orthogonal as soon as – j < mk and ` 6= j or – j > mk and ` > j + 2 In short, the xk,j ’s are pairwise orthogonal, except perhaps for certain pairs (xk,j , xk,j+1 ) with j > mk . These conditions constitute the loop-invariant. It is clear that they are (trivially) satisfied at the start. The algorithm terminates at step k if the elements of Lk are pairwise orthogonal. In addition, does not terminate at step k, we P if the algorithm P have the inequality x∈Lk x > z∈Lk+1 z, therefore the decreasing chain condition assures the termination of the algorithm. It remains to explain the development of a step and to verify the loopinvariant. In order to not manipulate too many indices, we make a slight abuse of notation and write Lk = [p1 , . . . , pn ], Ek,a = [α1 , . . . , αn ] and Ek,b = [β1 , . . . , βn ]. The segment (x, y) of Lk which is treated by the procedure R(x, y) is the following: we consider the smallest index j (necessarily > mk ) such that pj ∧pj+1 6= 0 and we take (x, y) = (pj , pj+1 ). If such an index does not exist, the elements of Lk are pairwise orthogonal and the algorithm is terminated. Otherwise we apply the procedure R(x, y) and we update the integer (we can take mk+1 = j) and the three lists. For example by letting qj = pj ∧ pj+1 , p0j = pj − qj and p0j+1 = pj+1 − qj , if p0j 6= 0 6= p0j+1 , we will have   Lk+1 = p1 , . . . , pj−1 , p0j , qj , p0j+1 , pj+2 , . . . , pn , Ek+1,a = [α1 , . . . , αj−1 , αj , αj + αj+1 , αj+1 , αj+2 , . . . αn ] , Ek+1,b = [β1 , . . . , βj−1 , βj , βj + βj+1 , βj+1 , βj+2 , . . . βn ] . We verify without difficulty in each of the four possible cases that the loop-invariant is preserved. • If m > 2, by induction hypothesis, we have for (x1 , . . . , xm−1 ) a partial decomposition basis (p1 , . . P . , pn ). By applying Lemma 2.17 with xm and n (p1 , . . . , pn ) we write xm = i=0 ai . The case of two elements gives us for each (ai , pi ), i ∈ J1..nK, a partial decomposition basis Si . Finally, a partial decomposition basis for (x1 , . . . , xm ) is the concatenation of Si ’s and of a0 .  Remark. It is easy to convince ourselves that the partial decomposition basis computed by the algorithm is minimal: every other partial decomposition basis for (x1 , . . . , xm ) would be obtained by decomposing certain elements of the previous basis. §3. GCD-monoids, GCD-domains 635 3. GCD-monoids, GCD-domains Let G be an l-group. Since a 6 b if and only if b ∈ a + G+ , the order relation is characterized by the submonoid G+ . The equality x = x+ − x− shows that the group G can be obtained by symmetrization of the monoid G+ , and it amounts to the same thing to speak of an l-group or of a monoid satisfying certain particular properties (see Theorem 3.1). We would therefore have had good reason to begin with the theory of “non-negative submonoids of an l-group” rather than with l-groups. We would therefore have had good reasons to start by the theory of objects of the type “non-negative submonoid of an l-group” rather than by that of l-groups. Indeed, in an l-group the order relation must be given at once in the structure, whereas in its non-negative subset, only the law of the monoid intervenes, exactly as in the multiplicative theory of non-negative integers. It is therefore solely for reasons of comfort in proofs that we have chosen to start with l-groups. Non-negative submonoid of an l-group 3.1. Theorem. For a commutative monoid (M, 0, +) to be the nonnegative submonoid of an l-group, it is sufficient and necessary that conditions 1, 2 and 3 below are satisfied. In addition, we can replace condition 3 with condition 4. 1. The monoid is regular, i.e. x + y = x + z ⇒ y = z. 2. The preorder relation x ∈ y + M is an order relation. In other words, we have x + y = 0 ⇒ x = y = 0. We denote it by y 6M x, or if the context is clear, by y 6 x. 3. Two arbitrary elements admit an upper bound, i.e. ∀a, b ∃c ↑ c = (↑ a) ∩ (↑ b). 4. Two arbitrary elements admit a lower bound, i.e. ∀a, b ∃c ↓ c = (↓ a) ∩ (↓ b). J A priori condition 3 for a particular pair (a, b) is stronger than condition 4 for the following reason: if a, b ∈ M , the set of elements of M less than a and b is contained in X = ↓ ( a + b). On this set X, the map x 7→ a + b − x is a bijection that reverses the order and therefore exchanges supremum and infimum when they exist. However, in the other direction, the infimum in X (which is the absolute infimum) can a priori only be transformed into a supremum for the order relation restricted to the subset X, which need not be a global upper bound. Nevertheless, when condition 4 is satisfied for all a, b ∈ M , it implies condition 3. Indeed, let us show that m = a + b − (a ∧ b) is the supremum 636 XI. Distributive lattices, lattice-groups of (a, b) in M by considering some x ∈ M such that x > a and x > b. We want to show that x > m, i.e. by letting y = x ∧ m, that y > m. However, y is an upper bound of a and b, and y ∈ X. Since m is the supremum of a and b in X, we indeed have m 6 y. The rest of the proof is left to the reader.  The previous theorem leads to the notion of a GCD-monoid. As this notion is always used for the multiplicative monoid of the regular elements of a commutative ring, we pass to the multiplicative notation, and we accept that the divisibility relation defined by the monoid is only a preorder relation, in order to take into account the group of units. GCD-monoids In multiplicative notation, a commutative monoid M is regular when, for all a, x, y ∈ M , the equality ax = ay implies x = y. 3.2. Definition. We consider a commutative monoid, multiplicatively denoted by (M, 1, ·). We say that a divides b when b ∈ a · M , we also say that b is a multiple of a, and we write a | b. The monoid M is called a GCD-monoid when the two following properties are satisfied 1. M is regular. 2. Two arbitrary elements admits a gcd, i.e. ∀a, b, ∃g, ∀x, (x | a and x | b) ⇐⇒ x | g. Let U be the group of invertible elements (it is a submonoid), also called group of units. Two elements a and b of M are said to be associated if there exists an invertible element u such that ua = b. This is an equivalence relation (we say “the association relation”) and the monoid structure passes to the quotient. Let M/U be the quotient monoid. It is still a regular monoid, and the divisibility relation, which was a preorder relation on M , becomes an order relation on M/U . By Theorem 3.1, we obtain the following result. 3.3. Theorem. With the previous notations, a regular commutative monoid M is a GCD-monoid if and only if M/U is the non-negative submonoid of an l-group. In multiplicative notation, the decompositions, partial or complete, are called factorizations. We then speak of partial factorization basis instead of partial decomposition basis. Similarly we use the following terminology: a GCD-monoid M satisfies the divisor chain condition if the l-group M/U is Noetherian, i.e. if in every sequence of elements (an )n∈N of M such that ak+1 divides ak for every k, there are two associated consecutive terms. §3. GCD-monoids, GCD-domains 637 A GCD-monoid M is said to admit bounded factorizations if M/U admits bounded decompositions, i.e. if for each a in M there exists an integer n such that for every factorization a = a1 · · · an of a in M , one of the ai ’s is a unit. It is clear that such a monoid satisfies the divisor chain condition. GCD-rings We call a GCD-ring a commutative ring for which the multiplicative monoid of regular elements is a GCD-monoid. We define in the same way a bounded factorization ring or a ring which satisfies the divisor chain condition. A GCD-domain for which Reg(A)/A× admits partial factorizations is called a GCD-domain admitting partial factorizations. Recall that in particular, the corresponding l-group must be discrete, which here means that A× must be a detachable subset of Reg(A). An GCD-domain for which Reg(A)/A× admits complete factorizations is called a unique factorization domain, or a UFD. In this case we speak rather of total factorization. Other than the general results on the GCD-monoids (which are the translation in multiplicative language of the corresponding results in the l-groups), we establish some specific facts about GCD-rings, because the addition intervenes in the statements. They could have been extended to pp-rings without difficulty. 3.4. Fact. 1. An GCD-domain whose group of units is detachable and which satisfies the divisor chain condition admits partial factorizations (Theorem 2.16). 2. A Bézout ring is a GCD-ring. 3. A PID is an GCD-domain which satisfies the divisor chain condition. If the group of units is detachable, the ring admits partial factorizations. 4. If K is a nontrivial discrete field, K[X] is a Bézout domain, admits bounded factorizations, and the group of units is detachable. In particular, the ring K[X] admits partial factorizations. 5. The rings Z, Z[X] and Q[X] are UFD (Proposition III -8.15). J The proof is left to the reader.  J The proof of Lemma III -8.11 can be reused word for word.  3.5. Theorem. Every GCD-domain is integrally closed. We leave to the reader the proof of the following facts (for 3.8, Kronecker’s theorem must be used). 638 XI. Distributive lattices, lattice-groups 3.6. Fact. Let A be a GCD-domain and S be a monoid. Then AS is a GCD-domain, and for a, b ∈ A a gcd in A is a gcd in AS . We will say that a submonoid V of a monoid S is saturated (in S) if xy ∈ V and x, y ∈ S imply x ∈ V . In the literature, we also find V is factorially closed in S. A monoid V of a commutative ring A is therefore saturated if and only if it is saturated in the multiplicative monoid A. 3.7. Fact. A saturated submonoid V of a GCD-monoid (resp. admitting bounded factorizations) S is a GCD-monoid (resp. admitting bounded factorizations) with the same gcd and lcm as in S. 3.8. Fact. Let A be a nontrivial integrally closed ring and K be its quotient field. The multiplicative monoid of the monic polynomials of A[X] = A[X1 , . . . , Xn ] ∗ is naturally identified with a saturated submonoid of K[X] /K × . In particular, the multiplicative monoid of the monic polynomials of A[X] is a GCD-monoid admitting bounded factorizations. GCD-domains of dimension at most 1 3.9. Definition. A pp-ring A is said to be of dimension at most 1 if for every regular element a the quotient A/hai is zero-dimensional. Remark. Under the hypothesis that a is regular, we therefore obtain that for all b, there exist x, y ∈ A and n ∈ N such that bn (1 + bx) + ay = 0. (∗) If we no longer make anymore hypotheses about a, we can consider the idempotent e that generates Ann(a), and we then have an equality of the type (∗), but by replacing a by a + e, which is regular. This equality gives, after a multiplication by a that makes e disappear, a(bn (1 + bx) + ay) = 0 (+). We thus obtain an equality in accordance with that given in Chapter XIII where a constructive definition constructive of the sentence “A is a ring of Krull dimension at most r” appears, for an arbitrary ring A (see item 3 of Proposition XIII -2.8). 3.10. Lemma. (A factorization in dimension 1) 1. Let a and b be two ideals in a ring A with A/a zero-dimensional and b finitely generated. Then we can write a = a1 a2 with a1 + b = h1i and bn ⊆ a2 for a suitable integer n. This writing is unique and we have a1 + a2 = h1i , a2 = a + bn = a + bm for every m > n. §3. GCD-monoids, GCD-domains 639 2. The result applies if A is a pp-ring of dimension at most 1, a is invertible, and b is finitely generated. In this case a1 and a2 are invertible. In particular, a + bn is invertible for large enough n. J It suffices to prove item 1. Existence and uniqueness of the factorization. Consider a triple (a1 , a2 , n) susceptible of satisfying the hypotheses. Since a1 and a2 must contain a, we can reason modulo a, and therefore suppose A is zero-dimensional with the equality a1 a2 = h0i. Let a1 + b = h1i imply a1 + b` = h1i for every exponent ` > 1. In particular, A = a1 ⊕ a2 = a1 ⊕ bm for every m > n. This forces, with e being idempotent, a1 = h1 − ei and a2 = bm = hei for m such that bm = bm+1 (see Lemma II -4.4 and item 3 of Lemma IV -8.2).  Remark. Item 2 is valid without assuming that A is a pp-ring. This will become clear after the general constructive definition of the Krull dimension, since for every regular element a, if A is of dimension at most 1, the ring A/hai is zero-dimensional. 3.11. Proposition. Let A be a GCD-domain; then every locally principal ideal is principal. J Let a = ha1 , . . . , an i be locally principal and d = gcd(a1 , . . . , an ). Let us show that a = hdi. There exists a system of comaximal elements (s1 , . . . , sn ) with ha1 , . . . , an i = hai i in Asi . It suffices to see that ha1 , . . . , an i = hdi in each Asi because this equality, locally true, will be true globally. But Asi remains a GCD-domain, and the gcds do not change. Therefore, in Asi , we obtain ha1 , . . . , an i = hai i = hgcd(a1 , . . . , an )i = hdi.  3.12. Theorem. domain. A GCD-domain of dimension at most 1 is a Bézout J Since ha, bi = g ha1 , b1 i with gcd(a1 , b1 ) = 1, it suffices to show that gcd(a, b) = 1 implies ha, bi = h1i. However, gcd(a, b) = 1 implies gcd(a, bn ) = 1 for every n > 0. Finally, after item 2 of Lemma 3.10, for large enough n, ha, bn i is invertible therefore locally principal, and the result follows by Proposition 3.11.  Gcd in a polynomial ring If A is a GCD-domain and f ∈ A[X] we let GX (f ) or G(f ) be a gcd of the coefficients of f (it is defined up to unit elements multiplicatively) and we call it the G-content of f . A polynomial whose G-content is equal to 1 is said to be G-primitive. 640 XI. Distributive lattices, lattice-groups 3.13. Lemma. Let A be a GCD-domain, K be its quotient field and f be a nonzero element of K[X]. • We can write f = af1 with a ∈ K and f1 as G-primitive in A[X]. • This expression is unique in the following sense: for another expression of the same type f = a0 f10 , there exists a u ∈ A× such that a0 = ua and f1 = uf10 . • f ∈ A[X] if and only if a ∈ A, in this case a = G(f ). J The proof is left to the reader.  3.14. Proposition. (Gauss’ lemma, another) Let A be a GCD-domain and f , g ∈ A[X]. Then G(f g) = G(f )G(g). In particular, the product of two G-primitive polynomials is a G-primitive polynomial. J Let fi and gj be the coefficients of f and g. It is clear that G(f )G(g) divides G(f g). By distributivity the gcd of the fi gj ’s is equal to G(f )G(g), but Proposition III -8.13 implies that G(f g) divides the fi gj ’s therefore their gcd.  3.15. Corollary. Let A be a GCD-domain, K be its quotient field and f , g ∈ A[X]. Then f divides g in A[X] if and only if f divides g in K[X] and G(f ) divides G(g) in A. J The “only if” results from Gauss’ lemma. For the “if” we can suppose that f is G-primitive. If g = hf in K[X], we can write h = ah1 where h1 ∈ A[X] is G-primitive and a ∈ K. By Gauss’ lemma, we have f h1 G-primitive. By applying Lemma 3.13 to the equality g = a(h1 f ), we obtain a ∈ A, then h ∈ A[X].  × Recall that if A is a reduces ring, A[X] = A× (Lemma II -2.6 4). In particular, if A is a nontrivial domain and if the group of units of A is detachable, the same goes for A[X]. 3.16. Theorem. Let A be a GCD-domain and K be its quotient field. 1. A[X1 , . . . , Xn ] is a GCD-domain. 2. If A admits partial factorizations, the same goes for A[X]. 3. If A satisfies the divisor chain condition, the same goes for A[X]. 4. If A admits bounded factorizations, the same goes for A[X]. 5. If A[X] is a UFD, the same goes for A[X1 , . . . , Xn ] (Kronecker). J 1. It suffices to treat the case n = 1. Let f , g ∈ A[X]. Let us express f = af1 , g = bg1 , with G-primitive f1 and g1 . Let c = gcdA (a, b) and h = gcdK[X] (f1 , g1 ). We can assume without loss of generality that h is in A[X] and that it is G-primitive. Then, by using Corollary 3.15, we verify that ch is a gcd of f and g in A[X]. Items 2, 3 and 4 are left to the reader. §4. Zariski lattice of a commutative ring 641 5. It suffices to treat the case n = 2 and to know how to detect if a polynomial admits a strict factor. We use the Kronecker trick. To test the polynomial f (X, Y ) ∈ A[X, Y ], assumed of degree < d in X, we consider the polynomial g(X) = f (X, X d ). A complete decomposition of g(X) allows us to know if there exists a strict factor of g of the form h(X, X d ) (by considering all the strict factors of g, up to association), which corresponds to a strict factor of f . For some precisions see Exercise 6.  3.17. Corollary. If K is a nontrivial discrete field, K[X1 , . . . , Xn ] is a GCD-domain, admitting bounded factorizations and partial factorizations. The group of units is K× . Finally, K[X1 , . . . , Xn ] (n > 2) is a UFD if and only if K[X] is a UFD. 4. Zariski lattice of a commutative ring Generalities Recall the notation DA (a) with some precisions. √ 4.1. Notation. If a is an ideal of A, let DA (a) = a be the nilradical of a. If a = hx1 , . . . , xn i let DA (x1 , . . . , xn ) for DA (a). Let Zar A be the set of DA (x1 , . . . , xn ) (for n ∈ N and x1 , . . . , xn ∈ A). We therefore have x ∈ DA (x1 , . . . , xn ) if and only if a power of x is a member of hx1 , . . . , xn i. The set Zar A is ordered by the inclusion relation. 4.2. Fact. Zar A is a distributive lattice with DA (0) = 0Zar A , DA (a1 ) ∨ DA (a2 ) = DA (a1 + a2 ), DA (1) = 1Zar A , DA (a1 ) ∧ DA (a2 ) = DA (a1 a2 ). We call it the Zariski lattice of the ring A. In classical mathematics DA (x1 , . . . , xn ) can be seen as a compact-open subspace of Spec A: the set of prime ideals p of A such that at least one of the xi ’s does not belong to p, and Zar A is identified with the lattice of the compact-open subspaces of Spec A. For more details on the subject see Section XIII -1. 4.3. Fact. 1. For every morphism ϕ : A → B, we have a natural morphism Zar ϕ from Zar A to Zar B, and we thus obtain a functor from the category of commutative rings to that of distributive lattices. 2. For every ring A the natural homomorphism Zar A → Zar Ared is an isomorphism, so that we can identify the two lattices. 642 XI. Distributive lattices, lattice-groups 3. The natural homomorphism Zar(A1 × A2 ) → Zar A1 × Zar A2 is an isomorphism. 7 DB (x) is an isomorphism from 4. For a Boolean algebra B, the map x → B to Zar B. 4.4. Fact. The following properties are equivalent. 1. Zar A is a Boolean algebra. 2. A is zero-dimensional. J Recall that a distributive lattice “is” a Boolean algebra if and only if every element admits a complement (Proposition 1.4). Suppose 2. Then for every finitely generated ideal a, there exist an idempotent e and an integer n such that an = hei. Therefore DA (a) = DA (e). Moreover, it is clear that DA (e) and DA (1 − e) are complements in Zar A. Suppose 1. Let x ∈ A and a be a finitely generated ideal of A such that DA (a) is the complement of DA (x) in Zar A. Then there exist b ∈ A and a ∈ a such that bx + a = 1. As xa = x(1 − bx) is nilpotent we obtain an equality xn (1 + cx) = 0.  4.5. Fact. Let a ∈ A and a ∈ Zar A. 1. The homomorphism Zar π : Zar A → Zar(A/hai), where π : A → A/hai is the canonical projection, is surjective, and it allows us to identify Zar(A/hai) with the quotient lattice Zar(A)/(DA (a) = 0) . More generally, Zar(A/a ) is identified with Zar(A)/(a = 0) . 2. The homomorphism Zar j : Zar A → Zar(A[1/a]), where j : A → A[1/a] is the canonical homomorphism, is surjective and it allows us to identify Zar(A[1/a]) with the quotient lattice Zar(A)/(DA (a) = 1) . 3. For some ideal c and some monoid S of A we have a natural isomorphism Zar(AS /cAS ) ' Zar(A)/(b = 0, f = 1) , where b is the ideal of Zar A generated by the DA (c)’s for c ∈ c, and f is the filter of Zar A generated by the DA (s)’s for s ∈ S. Duality in the commutative rings Annihilating and inverting simultaneously In the distributive lattices we exchange the roles of ∧ and ∨ by passing to the opposite lattice, i.e. by reversing the order relation. In the commutative rings, a fecund duality also exists between the addition and the multiplication, more mysterious when we try to exchange their roles. Recall that a saturated monoid is called a filter. The notion of filter is a dual notion to that of ideal, just as important. §4. Zariski lattice of a commutative ring 643 The ideals are the inverse images of 0 under the homomorphisms. They serve to pass to the quotient, i.e. to annihilate elements by force. The filters are the inverse images of the group of units under the homomorphisms. They serve to localize, i.e. to render elements invertible by force. Given an ideal a and a monoid S of the ring A we may want to annhilate the elements of a and invert the elements of S. The solution of this problem is given by consideration of the following ring. 4.6. Definition and notation. Let (by abuse) AS /a or S −1 A/a be the ring whose elements are given by the pairs (a, s) ∈ A × S, with the equality (a, s) = (a0 , s0 ) in AS /a if and only if there exists an s00 ∈ S such that s00 (as0 − a0 s) ∈ a (we will write a/s for the pair (a, s)). The fact that AS /a defined thus answers the posed problem signifies that the following factorization theorem is true (see the analogous Facts II -1.1 and II -1.2). 4.7. Fact. (Factorization theorem) With the above notations, let ψ : A → B be a homomorphism. Then ψ is factorized by AS /a if and only if ψ(a) ⊆ {0} and ψ(S) ⊆ B× . In this case, the factorization is unique. A ψ(a) ⊆ {0} and ψ(S) ⊆ B× ψ λ  AS /a θ! &/ B Naturally we can also solve the problem by first annihilating a then by inverting (the image of) S, or by first inverting S then by annihilating (the image of) a. We thus obtain canonical isomorphisms −1 AS /a ' πA,a (S) (A/a ) ' (AS )/(jA,S (a)AS ) . Dual definitions The duality between ideals and filters is a form of duality between addition and multiplication. This is easily seen from the respective axioms that are used to define the ideals (resp. prime ideals) and the filters (resp. prime filters) ideal a ` x ∈ a, y ∈ a ` x∈a ` prime — xy ∈ a ` 0∈a x+y ∈a xy ∈ a x∈a∨y ∈a filter f ` x ∈ f, y ∈ f ` xy ∈ f ` prime — x+y ∈f ` 1∈f xy ∈ f x∈f x∈f∨y ∈f 644 XI. Distributive lattices, lattice-groups Note that according to the above definition, A is both a prime ideal and a prime filter of A. This convention can seem strange, but it happens to be the most practical one: an ideal is prime if and only if the quotient ring is without zerodivisors, a filter is prime if and only if the localized ring is a local ring. With regard to ideals we have already commented on this on page 489. We will adopt the following definition for a maximal filter: the localized ring is a zero-dimensional local ring (when the ring is reduced: a discrete field). In particular, every maximal filter is prime. We will essentially make use of this definition as a heuristic. Now suppose the ring A is nontrivial. Then a detachable strict ideal (resp. a detachable strict filter) is prime if and only if its complement is a filter (resp. an ideal). We once again find in this case the familiar ground in classical mathematics. Generally in classical mathematics the complement of a strict prime ideal is a strict prime filter and vice versa, therefore the complement of a strict maximal ideal is a minimal prime filter, and the complement of a strict maximal filter is a minimal prime ideal. The prime filters therefore seem more or less useless and have a tendency to disappear from the scene in classical mathematics. Saturated pairs A good way to understand the duality is to simultaneously treat ideals and filters. For this we introduce the notion of a saturated pair, analogous to that which we have given for distributive lattices. 4.8. Definition. Let a be an ideal and f be a filter of A. We say that a is f-saturated if we have (as ∈ a, s ∈ f) =⇒ a ∈ a, we say that f is a-saturated if we have (a + s ∈ f, a ∈ a) =⇒ s ∈ f. If a is f-saturated and f is a-saturated we say that (a, f) is a saturated pair in A. To recap the axioms for the saturated pairs (note that the last condition can be rewritten as a + f = f). ` x ∈ a, y ∈ a ` x∈a ` xy ∈ a, y ∈ f ` 0∈a x+y ∈a xy ∈ a x∈a ` x ∈ f, y ∈ f ` xy ∈ f ` x + y ∈ f, y ∈ a ` 1∈f xy ∈ f x∈f x∈f §4. Zariski lattice of a commutative ring 645 4.9. Fact.  1. For every homomorphism ϕ : A → B, the pair Ker ϕ, ϕ−1 (B× ) is a saturated pair. 2. Conversely if (a, f) is a saturated pair and if ψ : A → Af /a = C designates the canonical homomorphism, we have Ker ψ = a and ψ −1 (C× ) = f. 3. Let ϕ : A → C be a homomorphism and (b, g) be a saturated pair of C,  then ϕ−1 (b), ϕ−1 (g) is a saturated pair of A. 4.10. Fact. Let (a, f) be a saturated pair. 1. Af /a is local if and only if f is a prime filter (i.e. if and only if Af is local). 2. Af /a is without zerodivisors if and only if a is a prime ideal (i.e. if and only if A/a is without zerodivisors). 4.11. Definition. If (a, f) and (b, g) are two saturated pairs of A we say that (b, g) refines (a, f) and we write it (a, f) 6 (b, g) when a ⊆ b and f ⊆ g. The following lemma describes the saturated pair “generated” (in the sense of the refinement relation) by a pair of subsets of A. Actually it suffices to treat the case of a pair formed by an ideal and a monoid. 4.12. Lemma. Let a be an ideal and f of A be a monoid. 1. The saturated pair (b, g) generated by (a, f) is obtained as follows b = { x ∈ A | ∃s ∈ f, xs ∈ a } , and g = { y ∈ A | ∃u ∈ A, uy ∈ a + f } . 2. If f ⊆ A× , then b = a and g is the filter obtained by saturating the monoid 1 + a. In this case, Ag /a = A/a . P 3. If a = 0, then b = { x ∈ A | ∃s ∈ f, xs = 0 } = s∈f (0 : s), and g is the saturation of f. In this case, Ag /b = Af . If in addition f = sN , b = (0 : s∞ ). An important case is that of the filter obtained by saturation of a monoid S. We introduce the notation S sat , or, if necessary, S satA for this filter. Incompatible ideal and filter For some saturated pair (a, f) we have the following equivalences. a = A ⇐⇒ 1 ∈ a ⇐⇒ 0 ∈ f ⇐⇒ f = A ⇐⇒ Af /a = {0} . (23) An ideal a and a filter f are said to be incompatible when they generate the pair (A, A), i.e. when 0 ∈ a + f. An ideal a and a filter f are said to be compatible if they satsify (0 ∈ a + f ⇒ 1 = 0). If the ring is nontrivial this also means a ∩ f = ∅. In this case we can both annihilate the elements of a and render the elements of f invertible without reducing the ring to 0. 646 XI. Distributive lattices, lattice-groups 4.13. Fact. Let a be an ideal and f be a compatible filter. If a is prime, it is f-saturated, if f is prime, it is a-saturated. 4.14. Fact. (The lattice of saturated pairs) The saturated pairs of A have a lattice structure for the refinement relation, such that – The minimum element is ({0} , A× ) and the maximum element (A, A). – (a, f) ∨ (b, g) is the saturated pair generated by (a + b, f g). – (a, f) ∧ (b, g) = (a ∩ b, f ∩ g). 4.15. Fact. (Ideals and filters in a localized quotient ring) Let (a, f) be a saturated pair of A and π : A → B = Af /a be the canonical map. Then  1. The map (b, g) 7→ π −1 (b), π −1 (g) is a non-decreasing bijection (for the refinement relations) between on the one hand, the saturated pairs of B, and on the other, the saturated pairs of A which refine (a, f). 2. If (b, g) is a saturated pair of B the canonical map  Aπ−1 (g) π −1 (b) −→ Bg /b is an isomorphism. 3. In this bijection – the ideal b is prime if and only if π −1 (b) is prime, – every prime ideal of A compatible with f and containing a is obtained, – the filter g is prime if and only if π −1 (g) is prime, – every prime filter of A compatible with a and containing f is obtained. We deduce the following instructive comparison on the duality between ideals and filters. 4.16. Fact. Let a be a strict ideal of A and π : A → A/a be the corresponding homomorphism. 1. The map b 7→ π −1 (b) is a nondecreasing bijection between ideals of A/a and ideals of A containing a. In this bijection the prime ideals correspond to the prime ideals. 2. The map g 7→ π −1 (g) is a nondecreasing bijection between filters of A/a and a-saturated filters of A. 3. In this bijection the strict prime filters of A/a correspond exactly to the prime filters of A compatible with a. 4.17. Fact. Let f be a strict filter of A and π : A → Af be the corresponding homomorphism. 1. The map g 7→ π −1 (g) is a nondecreasing bijection between filters of Af and filters of A containing f. In this bijection the prime filters correspond to the prime filters. 2. The map b 7→ π −1 (b) is a nondecreasing bijection between ideals of Af and f-saturated ideals of A. 3. In this bijection the strict prime ideals of Af correspond exactly to the prime ideals of A compatible with f. §4. Zariski lattice of a commutative ring 647 Closed covering principles The duality between ideals and filters suggests that a dual principle of the local-global principle must be able to function in commutative algebra. First of all note that the ideals of Zar A bijectively correspond to the radical ideals (i.e. equal to their nilradical) of A via a (ideal of Zar A) 7→ { x ∈ A | DA (x) ∈ a } . In addition, the prime ideals correspond to the prime ideals. For filters, things are not quite so perfect, but for a filter f of A, the set { DA (x) | x ∈ f } generates a filter of Zar A, and this gives an injective map which is bijective for the first filters. Let us return to the local-global principle and look at what it means in the lattice Zar A. When we have comaximal monoids S1 , . . . , Sn of A, it corresponds to filters fi of Zar A (each generated by the DA (s)’s for s ∈ Si ) T which are “comaximal” in the sense that i fi = {1Zar A }. In this case the natural homomorphisms Q Q A → i ASi and Zar A → i Zar A/(fi = 1) are injective. By duality, we will say that a system of ideals (a1 , . . . , an ) constitutes a T Q closed covering of A when i DA (ai ) = {0Zar A }, i.e. when i ai ⊆ DA (0). In this case the natural homomorphisms Q Q A/DA (0) → i A/DA (ai ) and Zar A → i Zar A/(DA (ai ) = 0) are injective. We will say that a property P (regarding objects related to a ring A) satisfies the “closed covering principle” when: each time that ideals ai form a closed covering of A, the property P is true for A if and only if it is true after passage to the quotient by each of the ai ’s. For example we easily obtain (see also Lemma II -2.7). 4.18. Closed covering principle. (Nilpotent, comaximal elements) Consider a closed covering (a1 , . . . , ar ) of the ring A. Let x1 , . . . , xn ∈ A, b, c be two ideals and S be a monoid. 1. The monoid S contains 0 if and only if it contains 0 modulo each ai . √ √ 2. We have b ⊆ c if and only if b ⊆ c modulo each ai . 3. The elements x1 , . . . , xn are comaximal if and only if they are comaximal modulo each ai . J It suffices to prove item 2. Suppose that DA (b) 6 DA (c) ∨ DA (ai ), so V V DA (b) 6 i (DA (c) ∨ DA (ai )) = DA (c) ∨ ( i DA (ai )) = DA (c).  648 XI. Distributive lattices, lattice-groups Remark. However, there is no closed covering principle for the solutions of systems of linear equations. Indeed, consider u, v ∈ A such that uv = 0. The system of linear equations (with x as the unknown) ux = u, vx = −v, admits a solution modulo u (namely x = −1) and a solution modulo v (namely x = 1). But in the case of the ring A = Z[u, v] = Z[U, V ]/hU V i the system of linear equations has no solution in A. 4.19. Closed covering principle. (Finitely generated modules) Q Consider a closed covering (a1 , . . . , ar ) of the ring A. Suppose that i ai = 0 (this is the case if A is reduced). An A-module M is finitely generated if and only if it is finitely generated modulo each ai . J Suppose without loss of generality that r = 2. Let g1 , . . . , gk be generators modulo a1 , and gk+1 , . . . , g` be generators modulo a2 . Let x ∈ M . We Pk Pp write x = i=1 αi gi + j=1 βj xj with αi ∈ A, βj ∈ a1 , xj ∈ M . Each xj is written as a linear combination of gk+1 , . . . , g` modulo a2 . Since a1 a2 = 0, we obtain x as a linear combination of g1 , . . . , g` .  4.20. Closed covering principle. (Finitely generated projective modules) Consider a closed covering (a1 , . . . , ar ) of the ring A, a matrix F ∈ Am×n , a finitely generated ideal a and a finitely presented module M . 1. The matrix F is of rank > k if and only if it is of rank > k modulo each ai . T Suppose i ai = 0 (it is the case if A is reduced). Then 2. The matrix F is of rank 6 k if and only if it is of rank 6 k modulo each ai . 3. The finitely generated ideal a is generated by an idempotent if and only if it is generated by an idempotent modulo each ai . 4. The matrix F is locally simple if and only if it is locally simple modulo each ai . 5. The module M is finitely generated projective if and only if it is finitely generated projective modulo each ai . J Item 1 results from the closed covering principle 4.18 by considering the determinantal ideal of order k. Item 2 comes from the fact that if a determinantal ideal is null modulo each ai , it is null modulo their intersection. Item 5 is a reformulation of item 4 which is a consequence of item 3. Let us prove item 3. Suppose without loss of generality that r = 2. We use the the lemma of the ideal generated by an idempotent (Lemma II -4.5). We have a + (0 : a)A/ai = A/ai (i = 1, 2). This means that a + ai + (ai : a) = A, and since ai ⊆ (ai : a), we have 1 ∈ a + (ai : a). By taking the product we get 1 ∈ a + (a1 : a)(a2 : a) and §4. Zariski lattice of a commutative ring 649 since (a1 : a)(a2 : a) ⊆ (a1 : a) ∩ (a2 : a) = ((a1 ∩ a2 ) : a) = (0 : a), we obtain 1 ∈ a + (0 : a).  Reduced zero-dimensional closure of a commutative ring Let us begin with some results regarding a subring A of a reduced zerodimensional ring. The reader can refer to the study of reduced zerodimensional rings on page 210 and revisit Equalities (6) for the characterization of a quasi-inverse. If in a ring an element c admits a quasi-inverse, we denote it by c• , and we denote by ec = c• c the idempotent associated with c which satisfies the equalities Ann(c) = Ann(ec ) = h1 − ec i. 4.21. Lemma. (Ring generated by a quasi-inverse) 1. Let a ∈ A ⊆ B. Suppose that A and B are reduced and that a admits a quasi-inverse in B. Then B ⊇ A[a• ] ' A[a• ]/h1 − ea i × A[a• ]/hea i = A1 × A2 . In addition a. We have a well-defined natural homomorphism A[1/a] → A1 , and it is an isomorphism. In particular, the natural homomorphism A → A1 has as its kernel AnnA (a). b. The natural homomorphism A → A2 is surjective, its kernel is the intersection a = A ∩ ea A[a• ] and satisfies the double inclusion  AnnA AnnA (a) ⊇ a ⊇ DA (a). (∗) In short A[a• ] ' A[1/a] × A/a . 2. Conversely for every ideal a of A satisfying (∗), the element (1/a, 0) is a quasi-inverse of (the image of) a in the ring C = A[1/a] × A/a and the canonical homomorphism of A in C is injective. J The isomorphism A[a• ] ' A1 × A2 only means that ea is an idempotent in A[a• ]. Let πi : A[a• ] → Ai be the canonical homomorphisms. 1b. Let µ be the composed homomorphism A −→ A[a• ] −→ A2 . In A2 , we have a• = ea a• = 0, so A2 = A/(A ∩ ea A[a• ]) . Thus a = A ∩ ea A[a• ]. In A[a• ], we have a = ea a, so µ(a) = π2 (a) = π2 (ea a) = 0, and a ∈ a. As B is reduced, the three rings A[a• ], A1 and A2 are also reduced. Therefore hai ⊆ a implies DA (a) ⊆ a.  Finally, a AnnA (a) ⊆ hea i AnnA (a) = 0, so a ⊆ AnnA AnnA (a) . 1a. Since aa• =A1 1, we have a unique homomorphism λ : A[1/a] → A1 obtained from the composed homomorphism A → A[a• ] → A1 , and λ is clearly surjective. Consider an element x/an of Ker λ. Then λ(ax) = 0, 650 XI. Distributive lattices, lattice-groups so π1 (ax) = 0. As we also have π2 (ax) = 0, we deduce that ax = 0, so x =A[1/a] 0. Thus λ is injective. 2. The image of a in C is (a/1, 0), so (1/a, 0) is indeed its quasi-inverse. Now let x ∈ A whose image in C is 0. On the one hand x =A[1/a] 0, so ax =A 0. On the other hand x AnnA (a) = 0 so x2 =A 0, and x =A 0.  Comment. We see that the notation A[a• ] presents a priori a possible  ambiguity, at least when DA (a) 6= AnnA AnnA (a) . 4.22. Lemma. If A ⊆ C with C reduced zero-dimensional, the smallest zero-dimensional subring of C containing A is equal to A[(a• )a∈A ]. More generally if A ⊆ B with B reduced, and if every element of A admits a quasi-inverse in B, then the subring A[(a• )a∈A ] of B is zero-dimensional. In addition, every element of A[(a• )a∈A ] is of the form P • j aj bj ej , with • the ej ’s are pairwise orthogonal idempotents of A[(a• )a∈A ], • aj , bj ∈ A and bj b•j ej = ej for every j, • P • P • such that = j aj bj ej . j aj bj ej NB: Care will be taken, however, that we do not always have aj a•j ej = ej . We must therefore a priori replace ej with e0j = aj a•j ej to obtain an expression of the same type as the previous one. We will also be able Qto note that • every idempotent of A[(a )a∈A ] is expressible in the form ec i (1 − edi ) for a c and some di ∈ A. J Among the elements of B, those that are expressed as a sum of products ab• with a, b ∈ A clearly form a subring of B, which is therefore equal to A[(a• )a∈A ]. Moreover, ab• = ab• eb . By considering the Boolean algebra generated by the eb ’s which intervene in a finite sum of the previous type, we deduce that every element of A[(a• )a∈A ] can be expressed in the form  P P • j i ai,j bi,j ej , such that • the ej ’s are pairwise orthogonal idempotents in A[(a• )a∈A ], • ai,j , bi,j ∈ A, and bi,j b•i,j ej = ej , for all i, j. Note that b•i,j is the inverse of bi,j in A[(a• )a∈A ][1/ej ], and we can perform P the computation as for a usual sum of fractions i ai,j /bi,j . For example to simplify a term with a sum of three elements let us take (a1 b•1 + a2 b•2 + a3 b•3 )e. Since b2 b•2 e = b3 b•3 e = e, we have a1 b•1 e = a1 b2 b3 (b1 b2 b3 )• e, and (a1 b•1 + a2 b•2 + a3 b•3 )e = (a1 b2 b3 + a2 b1 b3 + a3 b1 b2 )(b1 b2 b3 )• e = dc• e, which admits for quasi-inverse cd• e.  Recall that Bred designates the quotient of a ring B by its nilradical. §4. Zariski lattice of a commutative ring 651 In the following lemma we observe what happens when we forcefully add a quasi-inverse to an element of a ring. It is an operation neighboring localization, when we forcefully add an inverse of an element, but slightly more delicate. 4.23. Lemma. Let A be a ring and a ∈ A.  1. Consider the ring A[T ] aT 2 − T, a2 T − a = A[a[ ] and the canonical homomorphism λa : A → A[a[ ] (a[ designates the image of T ). Then for every homomorphism ψ : A → B such that ψ(a) admits a quasiinverse there exists a unique homomorphism ϕ : A[a[ ] → B such that ϕ ◦ λa = ψ. A ψ λa  A[a[ ] ϕ! %/ B ψ(a) admits a quasi-inverse 2. In addition, aa[ is an idempotent and A[a[ ] ' A[1/a] × A/hai. 3. If B is reduced we have a unique factorization via (A[a[ ])red . In the rest of the text we denote by A[a• ] the ring (A[a[ ])red . 4. We have A[a• ] ' Ared [1/a] × A/DA (a) . If A is reduced the canonical homomorphism A → A[a• ] is injective. 5. Zar(A[a• ]) = Zar(A[a[ ]) is identified with (Zar A)[DA (a)• ]. J Left to the reader. The last item results from Lemma 1.6 and from  Fact 4.5. 4.24. Corollary. Let a1 , . . . , an ∈ A. 1. The ring A[a•1 ][a•2 ] · · · [a•n ] is independent, up to unique isomorphism, of the order of the ai ’s. It will be denoted by A[a•1 , a•2 , . . . , a•n ]. 2. A possible description is the following A[a•1 , a•2 , . . . , a•n ] ' A[T1 , T2 , . . . , Tn ]/a  red with a = (ai Ti2 − Ti )ni=1 , (Ti a2i − ai )ni=1 . 3. Another possible description is Y A[a•1 , a•2 , . . . , a•n ] ' (A/h(ai )i∈I i)red [1/αI ] I∈Pn Q with αI = j∈J1..nK\I aj . 652 XI. Distributive lattices, lattice-groups 4.25. Theorem. (Reduced zero-dimensional closure of a commutative ring) For every ring A there exists a reduced zero-dimensional ring A• with a homomorphism λ : A → A• , which uniquely factorizes every homomorphism ψ : A → B to a reduced zero-dimensional ring. This pair (A• , λ) is unique up to unique isomorphism. commutative rings A ψ λ  A• ϕ! /% B reduced zero-dimensional rings In addition – The natural homomorphism Ared → A• is injective. – We have A• = Ared [(a• )a∈Ared ]. J This is a corollary of the previous lemmas. We can suppose that A is reduced. The uniqueness result (Corollary 4.24) allows for a construction of a colimit (which mimics a filtering union) based on the extensions of the type A[a•1 , a•2 , . . . , a•n ], and the result follows by Lemma 4.22.  Comments. 1) A priori, since we are dealing with purely equational structures, the universal reduced zero-dimensional closure of a ring exists and we could construct it as follows: we formally add the unary operation a 7→ a• and we force a• to be a quasi-inverse of a. Our proof has also allowed us to give a simplified precise description of the constructed object and to show the injectivity in the reduced case. 2) In classical mathematics, the reduced zero-dimensional closure A• of a ring Q A can be obtained as follows. First of all we consider the product B = p Frac(A/p ), where p ranges over all the prime ideals of A. As B is a product of fields, it is reduced zero-dimensional. Next we consider the smallest zero-dimensional subring of B containing the image of A in B under the natural diagonal homomorphism. We then understand the importance of the earlier construction of A• . It allows us to have explicit access to something which looks like “the set of all the” prime ideals of A (those of classical mathematics) without needing to construct any one of them individually. The assumption is that the classical mathematical reasoning that manipulates unspecified arbitrary prime ideals of the ring A (generally inaccessible objects) can be reread as arguments about the ring A• : a mystery-free object! Examples. 1) Here is a description of the reduced zero-dimensional closure of Q Z. First of all, for n ∈ N∗ the ring Z[n• ] is isomorphic to Z[1/n] × p|n Fp , where p indicates “p prime,” and Fp = Z/pZ . Next, Z• is the colimit (that we can regard as a non-decreasing union) of the Z[(n!)• ]’s. §4. Zariski lattice of a commutative ring 653 2) Here is a description of the reduced zero-dimensional closure of Z[X]. First of all, if Q is a square-free monic polynomial, and if n ∈ N∗ is a multiple of disc(Q), the ring Z[X][n• , Q• ] is isomorphic to Y Y Y Z[X, 1/n, 1/Q] × Fp [X, 1/Q] × Z[X, 1/n]/hP i × Fp [X]/hRi p|n P |Q p|n,R|Q with p standing for “p prime,” P standing for “irreducible P in Z[X],” and R | Q standing for “irreducible R in Fp [X] divides Q in Fp [X].” Next, we pass to the colimit of the rings Z[X][u•n , Q•n ] (here, it is a nondecreasing union), where Qn is the squarefree part of the product of the first n elements in an enumeration of squarefree monic polynomials of Z[X], and where un = n! disc(Qn ). Note that we thus obtain a ring by which all the natural homomorphisms Z[X] → Frac(Z[X]/p ) are factorized for all the prime ideals p of Z[X]: such a Frac(Z[X]/p ) is indeed either Q(X), or some Q[X]/hP i, or some Fp (X), or some Fp [X]/hRi. 3) The (constructively well-defined) ring R• is certainly one of the more intriguing objects in the world “without LEM” that constitutes constructive mathematics. Naturally, in classical mathematics, R is zero-dimensional and R• = R. 4.26. Theorem. For every ring A we have natural isomorphisms Bo(Zar A) ' B(A• ) ' Zar(A• ). J This results from the last item of Lemma 4.23, and from the fact that the two constructions can be seen as colimits of “constructions at a step” E ; E[a• ] (E is a ring or a distributive lattice).  Note that if we adopted the notation T• for Bo(T) we would have the pretty formula (Zar A)• ' Zar(A• ). 4.27. Proposition. Let A be a ring, a be an ideal and S be a monoid. • The two rings (A/a )• and A• /D(aA• ) are canonically isomorphic. • The two rings (AS )• and (A• )S are canonically isomorphic. J Note that (A• )S is reduced zero-dimensional as a localization of a reduced zero-dimensional ring. Similarly, A• /D(aA• ) is reduced zero-dimensional. Let us write the proof for the localizations. Consider the natural homomorphisms A → AS → (AS )• and A → A• → (A• )S . The homomorphism A → A• uniquely “extends” to a homomorphism AS → (A• )S , and by the universal property of the reduced zero-dimensional closure, provides a unique morphism (AS )• → (A• )S which renders the ad hoc commutative diagram. Similarly, the morphism A → AS gives birth to a unique morphism A• → (AS )• which extends to a morphism 654 XI. Distributive lattices, lattice-groups (A• )S → (AS )• . By composing these two morphisms, by uniqueness, we obtain the identity twice.  5. Entailment relations and Heyting algebras A new look at distributive lattices A particularly important rule for distributive lattices, known as the cut, is the following   x∧a 6 b & a 6 x∨b =⇒ a 6 b. (24) To prove it we write x ∧ a ∧ b = x ∧ a and a = a ∧ (x ∨ b) so a = (a ∧ x) ∨ (a ∧ b) = (a ∧ x ∧ b) ∨ (a ∧ b) = a ∧ b 5.1. Notation. For a distributive lattice T we denote by A ` B or A `T B the relation defined as follows over the set Pfe (T) V W def A ` B ⇐⇒ A 6 B. Note that the relation A ` B is well-defined over Pfe (T) because the laws ∧ and ∨ are associative, commutative and idempotent. Note that ∅ ` {x} implies x = 1 and that {y} ` ∅ implies y = 0. This relation satisfies the following axioms, in which we write x for {x} and A, B for A ∪ B. a ` a A ` B =⇒ A, A0 ` B, B 0 (A, x ` B) & (A ` B, x) =⇒ A ` B (R) (M ) (T ). We say that the relation is reflexive, monotone and transitive. The third rule (transitivity) can be seen as a generalization of the rule (24) and is also called the cut rule. Let us also quote the following so-called distributivity rules: (A, x ` B) & (A, y ` B) ⇐⇒ A, x ∨ y ` B (A ` B, x) & (A ` B, y) ⇐⇒ A ` B, x ∧ y An interesting way to approach the question of distributive lattices defined by generators and relations is to consider the relation A ` B defined over the set Pfe (T) of finitely enumerated subsets of a distributive lattice T. Indeed, if S ⊆ T generates T as a lattice, then the knowledge of the relation ` over Pfe (S) suffices to characterize without ambiguity the lattice T, because every formula over S can be rewritten, either in “conjunctive normal form” (infimum of supremums in S) or in “disjunctive normal form” (supremum of infimums in S). Therefore if we want to compare two elements of the lattice generated by S we write the first in disjunctive normal form, the §5. Entailment relations 655 second in conjunctive normal form, and we observe that _ ^  ^ _  Ai 6 Bj ⇐⇒ ∀i ∈ I, ∀j ∈ J, Ai ` Bj i∈I j∈J 5.2. Definition. For an arbitrary set S, a relation over Pfe (S) which is reflexive, monotone and transitive is called an entailment relation. The following theorem is fundamental. It says that the three properties of entailment relations are exactly what is needed for the interpretation in the form of a distributive lattice to be adequate. 5.3. Theorem. (Fundamental theorem of the entailment relations) Let S be a set with an entailment relation `S over Pfe (S). We consider the distributive lattice T defined by generators and relations as follows: the generators are the elements of S and the relations are the A `T B each time that A `S B. Then, for all A, B in Pfe (S), we have A `T B =⇒ A `S B. J We give an explicit description of the distributive lattice T. The elements  of T are represented by those of Pfe Pfe (S) , i.e. X’s of the form X = {A1 , . . . , An } V W (intuitively X represents i∈J1..nK Ai ). We then inductively define the  relation A 4 Y for A ∈ Pfe (S) and Y ∈ Pfe Pfe (S) as follows • If B ∈ Y and B ⊆ A then A 4 Y . • If we have A `S y1 , . . . , ym and A, yj 4 Y for j = 1, . . . , m then A 4 Y . We easily show that if A 4 Y and A ⊆ A0 then we have A0 4 Y. We deduce that A 4 Z if A 4 Y and B 4 Z for all B ∈ Y . We can then define X 6 Y by “A 4 Y for every A ∈ X.” We finally verify that T is a distributive lattice7 with respect to the operations (0-aries and binaries) 1=∅ X ∧Y = X ∪Y 0 = {∅} X ∨ Y = { A ∪ B | A ∈ X, B ∈ Y } (25) For this we show that if C 4 X and C 4 Y , then we have C 4 X ∧ Y by induction on the proofs of C 4 X and C 4 Y . We notice that if A `S y1 , . . . , ym and A, yj `S B for all j, then we obtain A `S B by using the cut rule m times. From this, it results that if we have A `T B, that is that A 4 {{b} | b ∈ B}, then we have A `S B.  7 More precisely, as 4 is only a preorder, we take for T the quotient of Pfe Pfe (S) with respect to the equivalence relation: X 4 Y and Y 4 X.  656 XI. Distributive lattices, lattice-groups 5.4. Corollary. (Finitely presented distributive lattice) 1. A distributive lattice freely generated by a finite set E is finite. 2. A finitely presented distributive lattice is finite. J 1. Consider the minimal implicative relation on E. It is defined by def A `E B ⇐⇒ ∃x ∈ A ∩ B. We then consider the distributive lattice corresponding to this entailment  relation via Theorem 5.3. It is isomorphic to a subset of Pfe Pfe (E) , the one which is represented by the lists (A1 , . . . , Ak ) in Pfe (E) such that two Ai with distinct indices are incomparable with respect to the inclusion. The laws are obtained from (25), by simplifying the obtained lists when they do not satisfy the criteria of incompatibility. 2. If we impose a finite number of relations between the elements of E, we have to pass to a quotient lattice of the free distributive lattice over E. The equivalence relation generated by these relations and compatible with the lattice laws is decidable because the structure is defined by only using a finite number of axioms.  Remarks. 1) Another proof of item 1 could be the following. The Boolean algebra freely generated by the distributive lattice T freely generated by E is the Boolean algebra B freely generated  by E. The latter can easily be described by the elements of Pfe Pfe (E) , without any passage to the quoW V V tient: the subset {A1 , . . . , An } intuitively represents i∈J1..nK ( Ai ∧ A0i ), by designating by A0i the subset of E formed by the ¬x’s for the x ∈ / Ai . #E Therefore B has 22 elements. Finally, we have seen that T is identified with a distributive sublattice of B (Theorem 1.8). 2) The given proof of item 2 uses an altogether general argument. In the case of distributive lattices we can more precisely refer to the description of the quotients given on page 619. Duality between finite distributive lattices and finite ordered sets def If T is a distributive lattice let Spec T = Hom(T, 2). It is an ordered set called the (Zariski) spectrum of T. An element α of Spec T is characterized by its kernel. In classical mathematics such a kernel is called a prime ideal. From the constructive point of view it must be detachable. Here we are interested in the case where T is finite, which implies that Spec T is also finite (in the constructive sense). If ϕ : T → T0 is a homomorphism of distributive lattices and if α ∈ Spec T0 , then α ◦ ϕ ∈ Spec T. This defines a non-decreasing map from Spec T0 to Spec T, denoted by Spec α, called the “dual” of ϕ. §5. Entailment relations 657 Conversely, let E be a finite ordered set. Let E ? be the set of initial sections of E, i.e. the set of finite subsets of E that are stable under the operation x 7→ ↓ x. This set, ordered by the relation ⊇, is a finite distributive lattice, a sublattice of the lattice Pf (E)◦ (the opposite lattice of Pf (E)). 5.5. Fact. The number of elements of a finite ordered set E is equal to the maximum length of a strictly increasing chain of elements of E ? . J It is clear that a strictly monotone chain of elements of E ? (therefore of finite subsets of E) cannot have more than 1 + #E elements. Its “length” is therefore 6 #E. Regarding the reverse inequality, we verify it for E = ∅ (or for a singleton), then we perform an induction on #E, by regarding an ordered set with n elements (n > 1) as an ordered set with n − 1 elements that we extend by adding a maximal element.  If ψ : E → E1 is a non-decreasing map between finite ordered sets, then for every X ∈ E1? , ψ −1 (X) is an element of E ? . This defines a homomorphism E1? → E ? denoted by ψ ? , called the “dual” of ψ. 5.6. Theorem. ordered sets) (Duality between finite distributive lattices and finite 1. For every finite ordered set E let us define νE : E → Spec(E ? ) by νE (x)(S) = 0 if x ∈ S, 1 otherwise. Then, νE is an isomorphism of ordered sets. In addition, for every non-decreasing map ψ : E → E1 , we have νE1 ◦ ψ = Spec(ψ ? ) ◦ νE . 2. For every finite distributive lattice T let us define ιT : T → (Spec T)? by ιT (x) = { α ∈ Spec T | α(x) = 0 } . Then, ιT is an isomorphism of distributive lattices. In addition, for every morphism ϕ : T → T0 , we have ιT0 ◦ ϕ = (Spec ϕ)? ◦ ιT . J See Exercise 13.  In other terms, the categories of finite distributive lattices and of finite ordered sets are antiequivalent. The antiequivalence is given by the contravariant functors Spec • and •? , and by the natural transformations ν and ι defined above. The generalization of this antiequivalence of categories to the case of not necessarily finite distributive lattices will briefly be addressed on page 746. 658 XI. Distributive lattices, lattice-groups Heyting algebras A distributive lattice T is called an implicative lattice or a Heyting algebra when there exists a binary operation → satisfying for all a, b, c, a ∧ b 6 c ⇐⇒ a 6 (b → c) . (26) This means that for all b, c ∈ T, the conductor ideal def (c : b)T = { x ∈ T | x ∧ b 6 c } is principal, its generator being denoted by b → c. Therefore if it exists, the operation → is uniquely determined by the structure of the lattice. We then define the unary law ¬x = x → 0. The structure of a Heyting algebra can be defined as purely equational by giving suitable axioms, described in the following fact. 5.7. Fact. A lattice T (not assumed distributive) equipped with a law → is a Heyting algebra if and only if the following axioms are satisfied a→a a ∧ (a → b) b ∧ (a → b) a → (b ∧ c) = = = = 1, a ∧ b, b, (a → b) ∧ (a → c). Let us also note the following important facts. 5.8. Fact. In a Heyting algebra we have a6b a → (b → c) (a ∨ b) → c ¬¬¬a ¬(a ∨ b) ⇔ = = = = a → b = 1, (a ∧ b) → c, (a → c) ∧ (b → c), ¬a, ¬a ∧ ¬b, a→b a a→b ¬a ∨ b 6 6 6 6 ¬b → ¬a, ¬¬a, (b → c) → (a → c), a → b. Every finite distributive lattice is a Heyting algebra, because every finitely generated ideal is principal. A special important case of Heyting algebra is a Boolean algebra. A homomorphism of Heyting algebras is a homomorphism of distributive lattices ϕ : T → T0 such that ϕ(a → b) = ϕ(a) → ϕ(b) for all a, b ∈ T. The following fact is immediate. 5.9. Fact. Let ϕ : T → T1 be a homomorphism of distributive lattices, with T and T1 being Heyting algebras. Let a 4 b for ϕ(a) 6T1 ϕ(b). Then ϕ is a homomorphism of Heyting algebras if and only if we have for all a, a0 , b, b0 ∈ T a 4 a0 =⇒ (a0 → b) 4 (a → b), and b 4 b0 =⇒ (a → b) 4 (a → b0 ). Exercises and problems 659 5.10. Fact. If T is a Heyting algebra every quotient T/(y = 0) (i.e. every quotient by a principal ideal) is also a Heyting algebra. J Let π : T → T0 = T/(y = 0) be the canonical projection. We have π(x) ∧ π(a) 6T0 π(b) ⇐⇒ π(x ∧ a) 6T0 π(b) ⇐⇒ x∧a 6 b∨y ⇐⇒ x 6 a → (b ∨ y). However, y 6 b ∨ y 6 a → (b ∨ y), therefore  π(x) ∧ π(a) 6T0 π(b) ⇐⇒ x 6 a → (b ∨ y) ∨ y,   i.e. π(x) 6T0 π a → (b ∨ y) , which shows that π a → (b ∨ y) holds for π(a) → π(b) in T0 .  Remarks. 1) The notion of a Heyting algebra is reminiscent of the notion of a coherent ring in commutative algebra. Indeed, a coherent ring can be characterized as follows: the intersection of two finitely generated ideals is a finitely generated ideal and the conductor of a finitely generated ideal into a finitely generated ideal is a finitely generated ideal. If we “reread” this for a distributive lattice by recalling that every finitely generated ideal is principal we obtain a Heyting algebra. 2) Every distributive lattice T generates a Heyting algebra naturally. In other words we can formally add a generator for every ideal (b : c). But if we start from a distributive lattice which happens to be a Heyting algebra, the Heyting algebra which it generates is strictly greater. Let us take for example the lattice 3 which is the free distributive lattice with a single generator. The Heyting algebra that it generates is therefore the free Heyting algebra with one generator. But it is infinite (cf. [Johnstone]). A contrario the Boolean lattice generated by T (cf. Theorem 1.8) remains equal to T when it is Boolean. Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Show that the relations (2) on page 619 are exactly what is needed to define a quotient lattice. • Prove Proposition 1.2. • Prove Corollary 1.7. • Prove Facts 3.4, 3.6, 3.7 and 3.8. • Prove Fact 4.3 and all the numbered facts between 4.5 and 4.17 (for Fact 4.2 see Exercise 7). • Prove what is affirmed in the examples on page 652. • Prove Facts 5.7 and 5.8. 660 XI. Distributive lattices, lattice-groups Exercise 2. Let T be a distributive lattice and x ∈ T. We have seen (Lemma 1.6) that def λx : T → T[x• ] = T/(x = 0) × T/(x = 1) is injective, which means: if y ∧ x = z ∧ x and y ∨ x = z ∨ x, then y = z. Show that we can deduce the cut rule (24). Exercise 3. Let A be an integral ring and p, a, b ∈ Reg(A), with p irreducible. Suppose that p | ab, but p 6 | a, p 6 | b. Show that (pa, ab) does not have a gcd. Show that in Z[X 2 , X 3 ] the elements X 2 and X 3 admit a gcd, but no lcm, and that the elements X 5 and X 6 do not have a gcd. Exercise 4. (Another definition of l-groups) Show that the axioms that must satisfy a subset G+ of a group (G, 0, +, −) to define a compatible lattice-order are • G = G+ − G+ , • G+ ∩ −G+ = {0}, • G+ + G+ ⊆ G+ , • ∀a, b ∃c, c + G+ = (a + G+ ) ∩ (b + G+ ). Exercise 5. (Another proof of Gauss’ lemma) In the context of Proposition 3.14, show that G(f g) = G(f )G(g) with the help of a proof based on the Dedekind-Mertens lemma III -2.1. Exercise 6. (Kronecker’s trick) Let d be a fixed integer > 2. 1. Let A[X]<d ⊂ A[X] = A[X1 , . . . , Xn ] be the A-submodule constituted from polynomials P such that degXi P < d for every i ∈ J1..nK, and A[T ]<dn ⊂ A[T ] be the one formed from the polynomials f ∈ A[T ] of degree < dn . n−1 Show that ϕ : P (X1 , . . . , Xn ) 7→ P (T, T d , . . . , T d ) induces an isomorphism of A-modules between the A-modules A[x]<d and A[T ]<dn . 2. We assume that A[X] is a UFD. Let P ∈ A[X]<d and f = ϕ(P ) ∈ A[T ]dn . Show that any factorization of P in A[X] can be found by a finite procedure from those of f in A[T ]. Exercise 7. Verify Fact 4.2, i.e. Zar A is a distributive lattice. Show that this distributive lattice can be defined by generators and relations as follows. The generators are the symbols D(a), a ∈ A, with the system of relations: D(0) = 0, D(1) = 1, D(a + b) 6 D(a) ∨ D(b), D(ab) = D(a) ∧ D(b). Exercise 8. The context is that of the closed covering principle 4.19. We consider a Qclosed covering of the ring A by ideals a1 , . . . , ar . We do not suppose that a = 0, but we suppose that each ai is finitely generated. Show that an i i A-module M is finitely generated if and only if it is finitely generated modulo each ai . Exercises and problems 661 Exercise 9. (The ring A• ) We are in the context of classical mathematics. Let A be a ring and ϕ : A → A• be the natural homomorphism. 1. Show that the map Spec ϕ : Spec A• → Spec  A is a bijection and that for q ∈ Spec A• , the natural homomorphism Frac(A ϕ−1 (q) ) → A• /q is an isomorphism. 2. The ring A• is identified with the reduced zero-dimensional subring of def e = A Q p∈Spec A Frac(A/p ) generated by (the image of) A. Exercise 10. (Minimal prime ideals) We are in the context of classical mathematics. A prime ideal is said to be minimal if it is minimal among the prime ideals. Let Min A be the subspace of Spec A formed by the minimal prime ideals. Recall that we have defined a maximal filter as a filter whose localized ring is a reduced zero-dimensional local ring. In item 1 of this exercise we make the link with the most usual definition. 1. Show that a strict filter f is maximal among the strict filters if and only if for every x ∈ / f there exists an a ∈ f such that ax is nilpotent. Another possible characterization is that the localized ring f−1 A is local, zero-dimensional and nontrivial. In particular, every strict maximal filter among the strict filters is prime. NB: reformulation of the first characteristic property for the complementary prime ideal: a prime ideal p is minimal if and only if for all x ∈ p, there exists an a ∈ /p such that ax is nilpotent. 2. The dual notion of the Jacobson radical is the intersection filter of the maximal filters (i.e. the complement of the union of the minimal prime ideals). It can be characterized as follows in classical mathematics (compare with Lemma IX -1.1 and its proof): it is the set of a ∈ A “nilregular” in the following sense ∀y ∈ A ay nilpotent ⇒ y nilpotent. (27) In particular, in a reduced ring, it is the set of regular elements. Exercise 11. (Boolean algebra freely generated by a finite set) Let E = {x1 , . . . , xn } be a finite set. 1. Show that the Boolean algebra B freely generated by E identifies with the algebra F2 [X1 , . . . , Xn ]/a = F2 [x1 , . . . , xn ] with a = (Xi2 − Xi )n i=1 . 2. Define two “natural” F2 -bases of B, indexed by Pf (E), one being monomial and the other being a fundamental system of orthogonal idempotents. Express one in terms of the other. Exercise 12. Give a precise description of distributive lattices freely generated by sets with 0, 1, 2 and 3 elements. In particular, specify the number of their elements. 662 XI. Distributive lattices, lattice-groups Exercise 13. We detail the proof of Theorem 5.6. 1. We use (as in the course) the order relation ⊇ over E ? (the set of initial sections of the finite ordered set E). If S1 , S2 ∈ E ? , what are S1 ∧ S2 , S1 ∨ S2 equal to? 2. What is the order relation over the set of prime ideals of T corresponding to the order which has been defined for Spec T? 3. Prove item 1 of the theorem. We will start by verifying that for S ∈ E ? , S generates a prime ideal if and only if S is of the form ↓ x with x ∈ E; then that Ker νE (x) = IE ? (↓ x). 4. How to construct E ? from E? Treat the following example Ad E= c^ @b a < b < d, a < c. a Study the case where E is totally ordered, and the case where E is ordered by the equality relation. 5. Prove item 2 of the theorem. 6. Consider the same questions for the opposite order over E ? and adapt the order over Spec(E ? ). Exercise 14. Let a, b be nonzero in an integral ring. Suppose that the ideal ha, bi is invertible and that a and b admit a lcm m. Show that ha, bi is a principal ideal. Exercise 15. (A UFD with only a finite number of irreducible elements) Show that a UFD with only a finite number of irreducible elements is a PID. Exercise 16. (An interesting intersection) Let k be a discrete field. We consider the intersection A = k(x, y)[z] ∩ k(z, x + yz). They are two subrings of k(x, y, z). The first is a PID, the second is a discrete field. Show that A = k[z, x + yz], isomorphic to k[z, u]. Thus the intersection is not a PID, not even a Bézout ring. Problem 1. (Quotient lattice-groups, solid subgroups) In an ordered set E, if a 6 b, we call the segment with endpoints a and b the subset { x ∈ E | a 6 x 6 b }. We denote it by [a, b]E or [a, b]. A subset F of E is said to be convex when the implication a, b ∈ F ⇒ [a, b] ⊆ F is satisfied. A subgroup H of an l-group is said to be solid if it is a convex l-subgroup. We will see that this notion is the analogue for l-groups of that of an ideal for rings. 1. A subgroup H of an ordered group G is convex if and only if the order relation over G passes to the quotient in G/H, i.e. more precisely G/H is equipped with an ordered group structure for which (G/H)+ = G+ + H. We also say isolated subgroup for “convex subgroup of an ordered group.” Exercises and problems 663 2. The kernel H of a morphism of l-groups G → G0 is a solid subgroup of G. 3. Conversely, if H is a solid subgroup of an l-group G, the law ∧ passes to the quotient, it defines an l-group structure over G/H, and the canonical surjection from G to G/H is a morphism of l-groups which factorizes every morphism of source G which vanishes over H. 4. We have defined in 2.6 the l-subgroup C(x). Show that C(x) ∩ C(y) = C(|x| ∧ |y|), and that the solid subgroup generated by x1 , . . ., xn ∈ G is equal to C(|x1 | + · · · + |xn |). In particular, the set of solid principal subgroups, i.e. of the form C(a), is “almost” a distributive lattice (in general a maximum element is missing). Problem 2. (Polar subgroups, orthogonal direct summands) 1. If A is an arbitrary subset of an l-group G let A⊥ := { x ∈ G | ∀a ∈ A, |x| ⊥ |a| } . Show that A⊥ is always a solid subgroup. Show that, as usual in this type of situation, we have A ⊆ (A⊥ )⊥ , (A ∪ B)⊥ = A⊥ ∩ B ⊥ , A ⊆ B ⇒ B ⊥ ⊆ A⊥ and A⊥ ⊥⊥ = A⊥ . ⊥ 2. A solid subgroup H of an l-group is called a polar subgroup when H ⊥ = H. We also say a polar instead of “a polar subgroup.” A subgroup H is said to be an orthogonal direct summand when G = H ⊕ H ⊥ (direct sum of subgroups in an Abelian group), in which case G is naturally isomorphic to H  H ⊥ . We also say that G is the internal orthogonal direct sum of H and H ⊥ and let (by abuse) G = H  H ⊥ . Show that an orthogonal direct summand is always a polar subgroup. Show that if G = H  K (with H and K identified with subgroups of G) and if L is a solid subgroup, then L = (L ∩ H)  (L ∩ K). 3. Generally, we say that G is the internal orthogonal direct sum ofPa family of l-subgroups (Hi )i∈I , indexed by a discrete set I, when we have G = i∈I Hi and when the Hi ’s are pairwise orthogonal. In this case, each Hi is a polar subgroup of G and we have a natural isomorphism of l-groups i∈I Hi ' G. We write (by abuse) G = i∈I Hi . Suppose that an l-group is an orthogonal direct sum of a family of polar subgroups (Hi )i∈I , as well as of another family (Kj )j∈J . Show that these two decompositions admit a common refinement. Deduce that if the components of a decomposition as an orthogonal direct sum are nontrivial indecomposable subgroups, that is, which do not admit a strict orthogonal direct summand, then the decomposition is unique, up to bijection of the set of indices. Problem 3. (Revisiting Gauss-Joyal) Let u : A → T (A is a commutative ring, T a distributive lattice) satisfying u(ab) = u(a) ∧ u(b), u(1) = 1T , u(0) = 0T , u(a + b) 6 u(a) ∨ u(b). P For f = i ai X i ∈ A[X], we let  def W u(f ) = u c(f ) = i u(ai ). 664 XI. Distributive lattices, lattice-groups 1. Prove that “it is well-defined,” i.e. that u(f ) only depends on c(f ). We want to “directly” prove (in particular, without using Lemma II -2.6), the following version of the Gauss-Joyal lemma u(f g) = u(f ) ∧ u(g). LGJ: P j 2. Verify that if g = bj X ∈ A[X] the result is equivalent to u(ai bj ) 6 u(f g). 3. What does LGJ say if T = {True, False} and u(a) = (a 6= 0)? 4. Taking inspiration from the classical proof of the result of the previous question, prove LGJ. 5. What does LGJ say if T = Zar A and u(a) = DA (a)? Problem 4. (pp-ring closure of a commutative ring) Taking inspiration from the reduced zero-dimensional closure, give a construction of the pp-ring closure App of an arbitrary commutative ring A. The following universal problem needs to be solved: A ψ λ  App ϕ! %/ homomorphisms of rings B morphisms of pp-rings where the pp-ring morphisms are the ring homomorphisms which respect the law a 7→ ea (ea is the idempotent satisfying h1 − ea i = Ann(a)). Hereinafter, we will speak of pp-ring morphism. A pp-ring closure of a ring A “a priori” exists, from the simple fact that the theory of pp-rings is purely equational. Indeed, for any system of generators and of relations (a relation is an equality between two terms constructed from generators, of 0 and of 1, by using the laws +, −, ×, a 7→ ea ), there exists some pp-ring “the most general as possible” corresponding to this presentation: we take over the set of terms the smallest equivalence relation which respects the axioms and which places in the same equivalence class two terms related by a given relation at the start. Under these conditions the ring App is simply the pp-ring generated by the elements of A with for relations all the equalities a + b = c, a × b = d, a = −a0 true in A. But we want a precise description, as for the reduced zero-dimensional closure. We will then prove the following results. 1. (pp-ring morphisms) a. A morphism ϕ : A → B is a pp-ring morphism if and only if it transforms every regular element into a regular element. In this case, it uniquely extends to a morphism Frac(ϕ) : Frac(A) → Frac(B). b. A pp-ring morphism is injective if and only if its restriction to B(A) is injective. c. There exist injective homomorphisms between pp-rings that are not pp-ring morphisms. Exercises and problems 665 d. Every homomorphism between reduced zero-dimensional rings is a pp-ring morphism. e. If A is a pp-ring, B(Frac A) is identified with B(A) and the injection A → Frac(A) is a pp-ring morphism. 2. We have natural ring homomorphisms Ared → App → Frac(App ) → A• . They are all injective and the natural homomorphism Frac(App ) → A• is an isomorphism. 3. If A ⊆ C with C a pp-ring, the smallest pp-subring of C containing A is equal to A[(ea )a∈A ]. 4. If we identify Ared with its image in A• , we can identify App with the subring of A• generated by Ared and by the idempotents ex for x ∈ Ared . In what follows we suppose without loss of generality that A is reduced. 5. We refer to Corollary 4.24 for the description of the finite steps of the construction of A• . Given item 4, we get a description of the finite steps of a possible construction of App . For a1 , . . . , an ∈ A, we have an injection A → A[a•1 , · · · , a•n ] = C. Q Let ei be the idempotent ai a•i , B = A[e1 , . . . , en ] ⊆ C, and eI = (1 − i∈I Q ei ) j ∈I ej for I ∈ Pn . Prove the following results. / a. The family (eI )I∈Pn is a fundamental system of orthogonal idempotents of B and h1 − eI iB = h(ei )i∈I , (1 − ej )j ∈I / iB . b. AnnB (ai ) = h1 − ei iB . c. A ∩ hei , ∈ IiB = DA (ai , i ∈ I). d. By letting a0I = (DA (ai , i ∈ I) : Q isomorphism B ' I∈Pn A/a0I . Q j ∈I / aj ), we have A ∩ h1 − eI iB = a0I and an e. The ring C is a localization of the ring B: C = Bs with regular s ∈ B. In particular, let a ∈ A and A[ea ] ⊆ A[a• ] with ea = aa• . Then, AnnA[ea ] (a) = h1 − ea i, A[ea ] ' A/AnnA (a) × A/DA (a) , with ea ↔ (1, 0), and A[a• ] is the localized ring A[ea ]s with regular s = 1 − ea + a. In what follows let A[a1 ,...,an ] for A[a1 a•1 , . . . , an a•n ] 6. Let ϕ : A → D be a morphism with D reduced, a ∈ A and b = ϕ(a). Suppose that AnnD (b) = h1 − eb iD with idempotent eb . Show that we can extend ϕ to a morphism of A[a] → D realizing ea 7→ eb . However, in general, for a, b ∈ A, the rings A[a,b] and (A[a] )[b] are not isomorphic. 7. Give a precise description of Zpp . Explain why the homomorphism Zpp → (Zpp )pp is not an isomorphism. 8. (In classical mathematics) If A is pp-ring, and ı : A → Frac A is the canonical injection, then Spec ı establishes a bijection between Spec(Frac A) and Min A. 9. (In classical mathematics) For every ring A, there is a natural bijection between Min(App ) and Spec A. 666 XI. Distributive lattices, lattice-groups Comment. Despite Z being a pp-ring, Zpp is not isomorphic to Z. This is understood by observing that the natural projection Z → Z/15Z is not a pp-ring morphism. This situation is different from that of the reduced zero-dimensional closure: this comes from the fact that the quasi-inverse b of an element a, when it exists, is unique and simply defined by two equations ab2 = b and a2 b = a, which implies that every ring homomorphism respects quasi-inverses. Some solutions, or sketches of solutions Exercise 2. Indeed, (a ∧ b) ∧ x = a ∧ x since x ∧ a 6 b. And (a ∧ b) ∨ x = (a ∨ x) ∧ (b ∨ x) = a ∨ x because a ∨ x 6 b ∨ x (since a 6 x ∨ b). Therefore a ∧ b = a, i.e. a 6 b. Exercise 3. We write a ∼ b to indicate that a and b are associated. Let us prove the following form (which is actually stronger if the divisibility in A is not explicit): if p is irreducible, p | ab and (pa, ab) has a gcd d, then p | a or p | b. We have p | pa and p | ab, so p | d. Furthermore a | pa, a | ab, so a | d. Let a0 = d/a ∈ A. As d | pa, we have a0 | p. But p being irreducible, we either have a0 ∼ 1, or a0 ∼ p. In the first case, d ∼ a, and as p | d, we have p | a. In the second case, we have d ∼ ap, thus ap | ab, i.e. p | b. In Z[X 2 , X 3 ], X 2 is irreducible, X 2 | X 3 · X 3 but X 2 6 | X 3 , so X 2 · X 3 and X 3 · X 3 do not have a gcd. A fortiori they do not have a lcm. Finally, the gcd of X 2 and X 3 in Z[X 2 , X 3 ] is 1, if they had a lcm it would therefore be X 5 , but X 5 does not divide X 6 . Exercise 5. Let G(a) be the gcd of the generators of a finitely generated ideal a. We easily observe that it is well-defined. Next, the distributivity a(b ∧ c) = ab ∧ ac is generalized in the form G(a)G(b) = G(ab) for two finitely generated ideals a and b. Finally, for two polynomials f , g ∈ A[X], Dedekind-Mertens states that c(f )p+1 c(g) = c(f )p c(f g) for p > deg g.  As G(f ) = G c(f ) we obtain G(f )p+1 G(g) = G(f )p G(f g), and since they are elements of the ring, we can simplify to obtain G(f g) = G(f )G(g). Exercise 6. 1. Let X α = X1α1 · · · Xnαn ∈ A[X]<d , then ϕ(X α ) = T a with a = α1 + α2 d + · · · + αn dn−1 . We thus see that a < dn . The numbering in base d proves that ϕ transforms the An basis of A[X]<d constituting of X α ’s with αi < d into the A-basis (1, T, . . . , T d −1 ) of A[T ]<dn . 2. Let us recall that A[X]× = A× = A[X]× . Here we assume that A[T ] is a UFD. If P = QR ∈ A[X]<d then Q and R ∈ A[X]<d , and ϕ(Q) and ϕ(R) ∈ A[T ]<dn . Since ϕ(QR) = ϕ(Q)ϕ(R), and f = ϕ(P ) has only finitely many factors (in A[X]∗ /A× ), it is sufficient to test for each factor g(T ) of f (T ) if ϕ−1 (g) is a factor of P . This is possible since A is supposed to be with explicit divisibility. Solutions of selected exercises 667 Exercise 8. We reduce to r = 2. The hypothesis “M is finitely generated modulo ai ,” provides a finitely generated submodule Mi of M such that M = Mi + ai M . By substituting the value of M in the right-hand side, we obtain M = Mi + ai Mi + a2i M = Mi + a2i M. By iterating, we obtain for k > 1, M = Mi +aki M . By substituting M = M2 +ak2 M in M = M1 + ak1 M , we obtain M = M1 + M2 + (a1 a2 )k M . But a1 , a2 are finitely generated and a1 a2 ⊆ DA (0), so there exists some k such that (a1 a2 )k = {0}, and consequently M = M1 + M2 is finitely generated. Exercise 9. We can assume that A is a reduced subring of A• . 1. Let p be a prime ideal of A; the canonical morphism A → K = Frac(A/p ) can be factorized through A• : A  A• πp ) / Frac(A/p ) The morphism πp is surjective because for a ∈ A \ p, we have 1/a = πb (a• ) in K. Its kernel q = Ker πp is a maximal ideal of A• ; we then have A/p ⊆ K ' A• /q , so the natural arrow A/p → A• /q being injective, p = q ∩ A. We thus dispose of two transformations Spec A• → Spec A, q 7→ q ∩ A, and Spec A → Spec A• , p 7→ Ker πp , which are inverses of one another. Indeed, if q ∈ Spec A• and p = q ∩ A, then K = A• /q (because a• = 1/a for a ∈ A \ p) so Ker πp = q. e that factorizes the natural homo2. By item 1 the homomorphism A• → A e is injective, because its kernel is the intersection of all the morphism A → A e Lemma 4.22 describes the smallest prime ideals of A• . We identify A ⊆ A• ⊆ A. e reduced zero-dimensional subring of A containing A. We see that this is indeed of A• (by the construction of A• ). Another proof, left to the reader. Let A1 be the smallest reduced zero-dimensional e containing A. We then prove that this object satisfies the desired subring of A universal property. Exercise 10. 1. The first characterization of strict maximal filters among the strict filters is immediate: it is the same as saying that every attempt to make f grow by adding an exterior element x to it fails, because the filter generated by f and x contains 0. Let us then prove that a maximal strict filter among the strict filters is prime. Let x, y ∈ A with x + y ∈ f. We want to show that x ∈ f or y ∈ f. If x ∈ / f, there exist a ∈ f and n ∈ N such that an x = 0, so an (x + y) = an y ∈ f therefore y ∈ f. Let us now show that the localized ring is zero-dimensional, i.e. (since the ring is local) that every noninvertible element is nilpotent. A noninvertible element in the localized ring is a multiple of x/1 with x ∈ / f. It suffices to see that x/1 is nilpotent in f−1 A, but there exists an a ∈ f such that ax is nilpotent in A, and a is invertible in the localized ring. Let us finally show that if f−1 A is local zero-dimensional and nontrivial, then f 668 XI. Distributive lattices, lattice-groups is strict, maximal among the strict filters. Indeed, some x ∈ / f is not invertible, therefore is nilpotent in the localized ring, which means that there exists an a ∈ f such that ax is nilpotent in A. 2. Let S be the subset defined by Equation (27) (page 661). If a ∈ S and a ∈ /f with f a maximal filter, we have 0 ∈ aN f which means that for some x ∈ f and n ∈ N, xan = 0, so, since a ∈ S, x is nilpotent; a contradiction. If a ∈ / S, there exists some non-nilpotent x such that xa is nilpotent. Therefore there exists a strict filter containing x. By Zorn’s lemma there exists a maximal filter f containing x, and a cannot be in f because otherwise xa and therefore 0 would be in f. Exercise 11. 1. Clearly results from the definition of a Boolean algebra as a ring where all the elements are idempotent, provided that we verify that the constructed object is indeed a Boolean algebra, which offers no difficulty. Notice that B is isomorphic to F2 [x1 ] ⊗F2 · · · ⊗F2 F2 [xn ], which is the direct sum of n Boolean algebras freely generated by a single generator in the category of Boolean algebras. Indeed, the direct sum of two Boolean algebras B, B0 is the Boolean algebra B ⊗F2 B0 . 2. The monomial F2 -basis of B is (mI ) with mI = n Q xi . It is of cardinality 2n , Qi∈I so B is of cardinality 22 . We define eI by eI = mI j ∈I (1 + xj ); we easily verify / that (eI ) is a fundamental system of orthogonal idempotents, that mI eJ = eJ if I ⊆ J, and 0 otherwise. P P We have the same expression eI = mJ and mI = e (which J | J⊇I J | J⊇I J confirms that (eI ) is an F2 -basis of B). With respect to the description given in this course, xε11 · · · xεnn corresponds to  the following element of Pf Pf (E) : {{ xi | εi = 1 }}. Exercise 12. The distributive lattice freely generated by ∅ is the lattice 2. The distributive lattice freely generated by {a} is {0, a, 1}. The distributive lattice freely generated by {a, b} (a 6= b) is: {0, a ∧ b, a, b, a ∨ b, 1}. The distributive lattice freely generated by {a, b, c} (a 6= b 6= c 6= a) contains: 0, 1, a, b, c, a ∨ b, a ∨ c, b ∨ c, a ∨ b ∨ c, a ∧ b, a ∧ c, b ∧ c, a ∧ b ∧ c, a ∧ (b ∨ c), b ∧ (a ∨ c), c ∧ (a ∨ b), (a ∨ b) ∧ (a ∨ c), (a ∨ b) ∧ (b ∨ c), (a ∨ c) ∧ (b ∨ c), (a ∨ b) ∧ (a ∨ c) ∧ (b ∨ c). Exercise 13. 1. By definition of an initial section the intersection and the union of two initial sections is another initial section. Therefore in E ? : S1 ∧ S2 = S1 ∪ S2 , S1 ∨ S2 = S1 ∩ S2 , ∅ = 1E ? and E = 0E ? . 2. It amounts to the same to give α ∈ Spec T or the prime ideal Ker α. This leads us to order the set of prime ideals of T by the relation ⊇. Solutions of selected exercises 669 Indeed, if α, β : T → {0, 1} are two morphisms, we have the equivalence α 6 β ⇐⇒ Ker α ⊇ Ker β. 3. We have Ker νE (x) = { S ∈ E ? | x ∈ S } = { S ∈ E ? | ↓ x ⊆ S } = { S ∈ E ? | S 6 ↓ x } , i.e. Ker νE (x) = IE ? (↓ x). We indeed have the equivalences x 6 y ⇐⇒ ↓x ⊆ ↓y ⇐⇒ ↓y 6 ↓x ⇐⇒ I(↓y) ⊆ I(↓x) ⇐⇒ I(↓x) 6 I(↓y). Moreover, in E ? : S1 ∧ S2 6 ↓ x ⇒ (S1 6 ↓ x) or (S2 6 ↓ x) (because the first inequality means ↓ x ⊆ S1 ∪ S2 , i.e. x ∈ S1 ∪ S2 ), and since ↓ x 6= 1E ∗ = ∅, ↓ x generates a prime ideal. Conversely, let p be a prime ideal of E ? . Being finite, it is principal: p = IE ? (S) with S 6= 1E ? , i.e. S is nonempty. It must be shown that S is of the form ↓ x. If S = {x1 , . . . , xn }, we have S = (↓ x1 ) ∪ · · · ∪ (↓ xn ), i.e. (↓ x1 ) ∧ · · · ∧ (↓ xn ) = S. As S generates a prime ideal, there exists some i such that ↓ xi 6 S, i.e. S ⊆ ↓ xi , then S = ↓ xi . 4. We determine E ? by noticing that every initial section is a union of subsets ↓ x. The picture of the lattice E ? is the following ∅ ↓ a = {a} ↓ c = {a, c} ↓ b = {a, b} {a, b, c} ↓ d = {a, b, d} {a, b, c, d} ? If E is totally ordered, then E = { ↓ x | x ∈ E } ∪ {∅} is also totally ordered and #E ? = 1 + #E. If T is a finite totally ordered set, then  Spec T = IT (a) | a ∈ T \ {1T } , and # Spec T = #T − 1. If E is ordered by the equality relation, E ? = P(E) ordered by ⊇. As for Spec(E ? ), it is the set IP(E) ({x}) with x ∈ E (which is indeed isomorphic to E). 5. The reader will verify that by letting, for a ∈ T, b a = { p ∈ Spec T | a ∈ p }, we obtain an initial section, that every initial section of Spec T is of this form, and finally that a 6 b ⇐⇒ b a 6b b. 6. We now consider E ? and Spec T with the order relation ⊆. Then S1 ∧ S2 = S1 ∩ S2 , S1 ∨ S2 = S1 ∪ S2 , ∅ = 0E ? , E = 1E ? . For x ∈ E, we let x e = E \ ↑ x = { y ∈ E | y 6> x }: this element of E ? satisfies, for S ∈ E ? , the equivalence x ∈ / S ⇐⇒ S ⊆ x e. We have x e= 6 1E ? = E, and x e generates a prime ideal of the lattice E ? : S1 ∧ S2 6 x e ⇒ S1 6 x e or S2 6 x e (indeed, the hypothesis is ↑ x ⊆ (E \ S1 ) ∪ (E \ S2 ), therefore for example x ∈ / S1 , i.e. S1 ⊆ x e). We have the equivalence x 6 y ⇐⇒ x e ⊆ ye. We prove that every prime ideal of E ? is of the form x e, so the ordered set E is isomorphic, via x 7→ IE ? (x e), to the set of 670 XI. Distributive lattices, lattice-groups prime ideals of E ? , ordered by inclusion. {a, b, c, d} e c = {a, b, d} de = {a, b, c} {a, b} eb = {a, c} {a} e a=∅ Exercise 14. Since ha, bi is invertible we have s, t, u, v with sa = ub, tb = va and s + t = 1. Since m is the lcm of a and b we can write m = ab0 = ba0 and ab/m = g = b/b0 = a/a0 . Thus sa = mx = ab0 x and tb = m = ba0 y, which give s = b0 x and t = a0 y. Therefore b0 x + a0 y = 1, bx + ay = gb0 x + ga0 y = g and consequently ha, bi = hgi. Exercise 15. (A UFD with only a finite number of irreducible elements) Let (pi )i∈I be the finite family of distinct irreducible elements (up to association). We must show that A is a Bézout ring. In order to do so, it suffices to show that if a and b ∈ A∗ have as their gcd 1, then ha, bi = h1i = A. We write a= Q i∈A i pα i , b = β Q j∈B pi j , with αi ’s, βj ’s > 0 and A ∩ B = ∅. Let C = I \ (A ∪ B) and c = k∈C pk . We show that a + bc ∈ A× . Indeed, for i ∈ A, pi divides a, therefore it cannot divide a + bc, otherwise it would divide bc = (a + bc) − a. Similarly, for j ∈ B ∪ C, pj cannot divide a + bc, otherwise it would divide a = (a + bc) − bc. Thus a + bc is not divisible by any irreducible element. Q Exercise 16. (An interesting intersection) Consider the evaluation homomorphism ϕ : k[z, u] → k[z, x + yz], z 7→ z, u 7→ x + yz. It is surjective by construction. It is injective because, for f = f (z, u), by evaluating ϕ(f ) in k[x, y, z] we obtain ϕ(f )(x, 0, z) = f (z, x). It is therefore indeed an isomorphism. In what follows we can therefore let u = x + yz, with k[z, x + yz] = k[z, u] where z and u play the role of distinct indeterminates. Moreover we notice that k[z, u][y] = k[x, y, z]. As k[z, u] is a GCD-domain, this implies that two elements of k[z, u] have gcd 1 in k[z, u] if and only if they have gcd 1 in k[x, y, z]. Now let h ∈ A be an arbitrary element that we write in the form of an irreducible fraction f (z, u)/g(z, u) in k(z, u), and in the form of a fraction a/b (a ∈ k[x, y, z], b ∈ k[x, y]) as an element of k(x, y)[z]. This last fraction can itself be written in irreducible form, that is so that the gcd of a and b in k[x, y, z] is equal to 1. By uniqueness of the expression of a fraction in reduced form, we therefore have a Solutions of selected exercises 671 constant γ ∈ k∗ such that f (z, u) = γa(x, y, z) and g(z, u) = γb(x, y). It remains to show that the denominator g(z, x + yz) is a constant. By making z = 0 in the equality g(z, x + yz) = γb(x, y) we obtain g(0, x) = γb(x, y) = c(x). Finally, by making (z, y) = (1, −x) in the equality g(z, x + yz) = c(x), we obtain c(x) = g(1, 0). Problem 3. The first item is left to the reader. Let f g = k ck X k . 2. We easily have W W P u(f g) 6 u(f ) ∧ u(g). Indeed, ck = i+j=k ai bj , so u(ck ) 6 i+j=k u(ai bj ) 6 i u(ai ) = u(f ) (we have used u(ab) 6 u(a)). If we dispose of the Gauss-Joyal lemma, then u(ai bj ) 6 u(ai ) ∧ u(bj ) 6 u(f ) ∧ u(g) = u(f g). Conversely, if we know how to prove u(ai bj ) 6 u(f g) for all i, j, then  W  W W u(ai bj ) 6 u(f g), i.e. by distributivity u(ai ) ∧ u(bj ) 6 u(f g), i,j i j P i.e. u(f ) ∧ u(g) 6 u(f g). 3. If A is integral, the same goes for A[X]. 4. Let us show by decreasing induction on i0 + j0 that u(ai0 bj0 ) 6 u(f g). It is true if i0 or j0 is large because then ai0 bj0 = 0. We write the definition of the product of two polynomials P P ai0 bj0 = ci0 +j0 − ai bj − ai bj . i+j=i0 +j0 i>i0 i+j=i0 +j0 j>j0 We apply u by using on the one hand u(α + β + · · ·) 6 u(α) ∨ u(β) ∨ . . . and on the other hand u(αβ) 6 u(α) to obtain W W (?) : u(ai0 bj0 ) 6 u(ci0 +j0 ) ∨ i>i0 u(ai ) ∨ j>j0 u(bj ). We thus dispose of an inequality x 6 y which we write as x 6 x∧y. In other words, in (?), we reinsert u(ai0 bj0 ) in the right-hand side, which gives, by distributivity u(ai0 bj0 ) 6 u(ci0 +j0 ) ∨  W i>i0 u(ai ) ∧ u(ai0 bj0 ) ∨  W j>j0 u(bj ) ∧ u(ai0 bj0 ) . By using u(ai ) ∧ u(ai0 bj0 ) 6 u(ai ) ∧ u(bj0 ) and u(bj ) ∧ u(ai0 bj0 ) 6 u(bj ) ∧ u(ai0 ), and (by definition) u(ci0 +j0 ) 6 u(f g), we bound u(ai0 bj0 ) above by W W u(f g) ∨ i>i0 u(ai bj0 ) ∨ j>j0 u(ai0 bj ). By induction on i0 , j0 , u(ai bj0 ) 6 u(f g), u(ai0 bj ) 6 u(f g). Hence u(ai0 bj0 ) 6 u(f g). 5. In this case ai bj ∈ DA (ck , k = 0, . . .), which is the usual Gauss-Joyal lemma. Problem 4. (pp-ring closure of a commutative ring) Preliminary remark: if in a ring A, Ann(a) = he0a i with e0a idempotent, then e0a is the unique e0 such that e0 a = 0, e0 + a is regular and e0 is idempotent. 0 Indeed, e = e0 e0a (because e0 a = 0) and (e0 + a)e0 = (e0 + a)e0a (= e0 ) hence e0 = e0a . 1. Let A, B be pp-rings and a pp-ring morphism ϕ : A → B. 1a. If a ∈ A is regular, ea = 1 so eϕ(a) = 1 therefore ϕ(a) is regular. Conversely, 672 XI. Distributive lattices, lattice-groups let ψ : A → B be a ring homomorphism which transforms every regular element into a regular element. Let a ∈ A, b = ψ(a) and f = ψ(1 − ea ).  Then f b = ψ (1 − ea )a = 0, f + b = ψ(1 − ea + a) is regular and f 2 = f , and so f = 1 − eb . 1b. Suppose ϕ(x) = 0, then eϕ(x) = 0, i.e. ϕ(ex ) = 0. Therefore if ϕ|B(A) is injective, we obtain ex = 0, i.e. x = 0. Q 1c. We consider the unique homomorphism ρ : Z → n>0 Z/h2n i. Then ρ is injective but ρ(2) is not regular. 1d. The homomorphism preserves the quasi-inverses, therefore also the associated idempotents because ea = aa• if a• is the quasi-inverse of a. 1e. Results immediately from Fact IV -8.6. 2. Since App is reduced, there is a unique ring homomorphism Ared → App which factorizes the two canonical homomorphisms A → Ared and A → App . Since A• is a pp-ring, there is a unique pp-ring morphism App → A• that factorizes the two canonical homomorphisms A → App and A → A• . Since the morphism App → A• transforms a regular element into a regular element, and since a regular element in a (reduced or not) zero-dimensional ring is invertible, there exists a unique homomorphism Frac(App ) → A• which factorizes the two canonical homomorphisms App → Frac(App ) and App → A• . Similarly, for every homomorphism A → B with B being reduced zero-dimensional, we first obtain a unique pp-ring morphism App → B (which factorizes what is needed), then a unique morphism Frac(App ) → B which factorizes the two homomorphisms A → Frac(App ) and A → B. In other words, since Frac(App ) is reduced zero-dimensional, it solves the universal problem of the reduced zero-dimensional closure for A. Consequently the homomorphism Frac(App ) → A• that we have constructed is an isomorphism. 3. This item is copied from Lemma 4.22 which concerns the reduced zerodimensional rings: the reader could also just about copy the proof. 4. First of all note that the natural homomorphism Ared → App is injective because the homomorphism Ared → A• is injective and there is factorization. We can therefore identify Ared with a subring of App , which is itself identified with a subring of Frac(App ) that we identify with A• . In this framework App necessarily contains Ared while the elements ex = xx• for all x ∈ Ared since the morphism App → A• is a pp-ring and is injective. Let B be the subring of A• generated by Ared and the idempotents (ex )x∈Ared . It remains to see that the inclusion B ⊆ App is an equality. It is clear that Frac(B) = Frac(App ). On the one hand, as B is a pp-ring, the injection Ared → B provides a (unique) pp-ring morphism ϕ : App → B such that ϕ(a) = a for every a ∈ Ared . Since the morphism is a pp-ring morphism, we deduce that ϕ(ea ) = ea for every a ∈ Ared , then ϕ(b) = b for all b ∈ B. Let x ∈ App ; we want to show that x ∈ B; as x ∈ Frac(B), there exists a regular b ∈ B such that bx ∈ B therefore ϕ(bx) = bx i.e. bϕ(x) = bx; as b is regular in B, it is regular in Frac(B), a fortiori in App , so x = ϕ(x) ∈ B. 5a and 5b. Easy. Solutions of selected exercises 673 5c. Since aj = Q aj ej , we have, for j ∈ I, aj ∈ hei , i ∈ IiB = heiB with e the idempotent 1 − i∈I (1 − ei ). But in a reduced ring, every idempotent generates a radical ideal bm ∈ hei ⇒ bm (1 − e) = 0 ⇒ b(1 − e) = 0 ⇒ b = be ∈ hei . Therefore DA (ai , i ∈ I) ⊆ hei , i ∈ IiB . Let us now show that A ∩ hei , ∈ IiC ⊆ DA (ai , i ∈ I). Let x ∈ A ∩ hei , ∈ IiC ; by returning to the initial definition of C, we have x ∈ hai Ti , i ∈ IiA[T ] + c. Let us work on the reduced ring A0 = A/DA (ai , i ∈ I) ; we then have x ∈ DA0 [T ] (ak Tk2 − Tk , a2k Tk − ak , k ∈ J1..nK). Since A0 → A0 [a•1 , . . . , a•n ] is injective, we have x = 0 i.e. x ∈ DA (ai , i ∈ I). Q 5d. Let π be the product j ∈I aj . Let x ∈ A ∩ h1 − eI iB ; since π(1 − ej ) = 0 / for j ∈ / I, we have πx ∈ hei , i ∈ IiB , so, by 5c), πx ∈ DA (ai , i ∈ I), i.e. x ∈ a0I = (DA (ai , i ∈ I) : π). Q Conversely, let x ∈ a0I ; we write x = π 0 x + (1 − π 0 )x with π 0 = j ∈I ej . We / have 1 − π 0 ∈ h1 − ej , j ∈ / Ii. As for π 0 x, we notice that in C, hej iC = haj iC , so π 0 x ∈ hπxiC ⊆ DC (ai , i ∈ I) ⊆ hei , i ∈ IiC . Recap: x ∈ h(ei )i∈I , (1 − ej )j ∈I / iC = h1 − eI iC . But A ∩ h1 − eI iC = A ∩ h1 − eI iB , so x ∈ h1 − eI iB . Finally, B is isomorphic to the product of B h1 − eI iB and B h1 − eI iB ' A/a0I .  P Q  P Q Q 5e. Take s = I eI j ∈I aj = I i∈I (1 − ei ) j ∈I aj : s is the unique element / / Q of B which is equal to j ∈I a over the component e j I = 1. / 6. In the isomorphism A[ea ] ' A/AnnA (a) × A/DA (a) , we have ea = (1, 0) and so (x, y) = xea + y(1 − ea ). We then consider the map A × A → D, (x, y) 7→ ϕ(x)eb + ϕ(y)(1 − eb ). It is a ring morphism and since D is reduced, it passes to the quotient modulo AnnA (a) × DA (a). Let us now compare A[a,b] and (A[a] )[b] . We find A[a,b] ' A/(0 : ab) × A/(D(b) : a) × A/(D(a) : b) × A/D(a, b) ,  (A[a] )[b] ' A/(0 : ab) × A D (0 : a) + hbi   × A/(D(a) : b) × A/D(a, b) . Finally, note that D (0 : a) + hbi is contained in (D(b) : a) but that the inclusion can be strict. Take for example A = Z, a = 2p, b = 2q where p and q are two distinct odd primes. We use (x : y) = x/ gcd(x, y) for x, y ∈ Z. Then Z[a,b] ' Z×Z/qZ ×Z/pZ ×Z/2Z , but (Z[a] )[b] ' Z×Z/2qZ ×Z/pZ ×Z/2Z . In the first ring, Ann(a) is generated by (0, 0, 1, 1). In the second (the first ring is a quotient), Ann(a) generated by the idempotent (0, q, 1, 1). 8. Recall (Exercise 10) that a prime ideal p of a ring A is minimal if and only if for all x ∈ p, there exists an s ∈ A \ p such that sxn = 0 for a certain n (if A is reduced, we can take n = 1). First, a minimal prime ideal of A remains a strict prime ideal in Frac(A) (this does not use the fact that A is a pp-ring), i.e. p ∩ Reg(A) = ∅: if x ∈ p, there exist s ∈ / p and n ∈ N such that sxn = 0, which proves that x ∈ / Reg(A). Conversely, for q a prime ideal of Frac(A), let us prove that p = q ∩ A is a minimal 674 XI. Distributive lattices, lattice-groups prime ideal of A. Let x ∈ p; then x + 1 − ex is regular in A, so invertible in Frac(A), therefore 1 − ex ∈ / p. Then x(1 − ex ) = xex (1 − ex ) = 0: we have found s = 1 − ex ∈ / p such that sx = 0. 9. By Exercise 9, the injection A → A• induces a bijection Spec A• → Spec A; but A• = Frac(App ) and App is a pp-ring. Therefore, by item 8 applied to App , Spec A• is identified with Min(App ), hence the natural bijection between Spec A and Min(App ). Bibliographic comments Some reference books on the study of lattices are [Birkhoff], [Grätzer] and [Johnstone]. In [Johnstone] the focus is essentially on distributive lattices, which are the objects that primarily interest us. This book presents the theory of locales. The notion of a locale is a generalization of that of a topological space. The structure of a locale is given by the distributive lattice of its open sets, but the open sets are no longer necessarily sets of points. This is the reason why a locale is sometimes called a pointless topological space [111, Johnstone]. The author generally tries to give constructive proofs and explicitly signals the theorems whose proof uses the axiom of choice. In abstract algebra, spectral spaces are omnipresent, foremost among which we include the Zariski spectrum of a commutative ring. From the constructive point of view they are very peculiar locales which “lack points.” We will quickly present this notion in Section 1 of Chapter XIII devoted to the Krull dimension. An elegant proof of Theorem 3.16 (if A is a GCD-domain the same goes for A[X]) is found in [MRR, th. IV.4.7]. The origin of entailment relations is found in the Gentzen sequent calculus, which is the first to place a focus on the cut (the rule (T )). The link with distributive lattices has been highlighted in [29, 49, Coquand&al.]. The fundamental theorem of the implicative relations 5.3 (page 655) is found in [29]. We find the terminology of an implicative lattice in [Curry] and that of a Heyting algebra in [Johnstone]. A basic book for the theory of l-groups and of (not necessarily commutative) lattice-group rings is [Bigard, Keimel & Wolfenstein]. We have said that a guiding idea in the theory of l-groups is that an l-group behaves in computations like a product of totally ordered groups. This is translated in classical mathematics by the representation theorem which affirms that every (Abelian) l-group is isomorphic to an l-subgroup of a product of totally ordered groups (Theorem 4.1.8 in the cited book). Bibliographic comments 675 The l-groups that are Q-vector spaces somewhat constitute the purely algebraic version of the theory of Riesz spaces. Every good book on Riesz spaces starts by developing the purely algebraic properties of these spaces, which are copied (with very similar, if not identical proofs) from the theory of (Abelian) l-groups. See for example [Zaanen]. In the exercises of Bourbaki (Commutative algebra, Diviseurs) an integral Bézout ring is called a anneau bezoutien, a GCD-domain is called a anneau pseudo-bezoutien, and a Prüfer domain is called a anneau prüferien. Chapter XII Prüfer and Dedekind rings Contents 1 2 3 4 5 6 7 Introduction . . . . . . . . . . . . . . . . . . . . . . . Arithmetic rings . . . . . . . . . . . . . . . . . . . . . Locally principal ideals, principal localization matrix . . . First properties . . . . . . . . . . . . . . . . . . . . . . . Multiplicative structure of finitely generated ideals . . . . Integral elements and localization . . . . . . . . . . Prüfer rings . . . . . . . . . . . . . . . . . . . . . . . . Extensions of Prüfer rings . . . . . . . . . . . . . . . . . . Coherent Prüfer rings . . . . . . . . . . . . . . . . . . First properties . . . . . . . . . . . . . . . . . . . . . . . Kernel, image and cokernel of a matrix . . . . . . . . . . Extensions of coherent Prüfer rings . . . . . . . . . . . . pp-rings of dimension at most 1 . . . . . . . . . . . Coherent Prüfer rings of dimension at most 1 . . . When a Prüfer ring is a Bézout ring . . . . . . . . . . . . An important characterization . . . . . . . . . . . . . . . The structure of finitely presented modules . . . . . . . . Factorization of finitely generated ideals . . . . . . General factorizations . . . . . . . . . . . . . . . . . . . . Factorizations in dimension 1 . . . . . . . . . . . . . . . . Prüfer rings admitting partial factorizations . . . . . . . Dedekind rings . . . . . . . . . . . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . – 677 – . . . . . . . . . . . . . . . . . . . . . . . . . 678 679 679 681 684 686 689 693 695 695 696 698 701 704 704 705 706 708 708 708 709 710 713 725 740 678 XII. Prüfer and Dedekind rings Introduction The usual definitions of Dedekind ring do not lend themselves to an algorithmic treatment. First, the notion of Noetherianity is delicate (from the algorithmic point of view). Secondly, the questions of factorization generally demand extremely strong hypotheses. For example, even if K is a quite explicit discrete field, there is no general method (valid over all discrete fields) for factorizing the polynomials of K[X]. Thus, an essential aspect of the theory of Dedekind rings, namely that the integral closure of a Dedekind ring in a finite extension of its quotient field remains a Dedekind ring, no longer works in full generality (from an algorithmic point of view) if we require the complete factorization of the ideals (see for example the treatment of this question in [MRR]). Moreover, even if a total factorization is theoretically feasible (in the rings of integers of number fields for example), we very quickly encounter problems of a prohibitive complexity such as that of factorizing the discriminant (an impossible task in practice if it has several hundred digits). Also Lenstra and Buchmann, [25], proposed to work in the rings of integers without having a Z-basis at our disposal. An important algorithmic fact is that it is always easy to obtain a partial factorization for a family of natural numbers, that is a decomposition of each of these numbers into a product of factors taken in a family of pairwise coprime numbers (see [15, Bernstein], and [16, Bernstein] for an implementation with the ideals of number fields, see also Problem II -2 (page 71)). A goal of this chapter is to show the general validity of such a point of view and to propose tools in this framework. A crucial and simplifying role in the theory is played by the arithmetic rings (in accordance with an intuition of Gian Carlo Rota [164]), that are the rings in which the lattice of ideals is distributive, and by the principal localization matrices, which are the matrices that explicate the computational machinery of the locally principal finitely generated ideals, in an essentially equivalent way to what Dedekind [54] estimated to be a fundamental property of rings of integers in the number fields (see [4, Avigad] and item 3 0 . of our Proposition 1.1). The willingness to put off implementing, for as long as possible, Noetherian hypotheses has also prompted us to develop a constructive treatment of several important points of the theory in a simpler and less rigid framework than that of Dedekind rings. This is the context of rings that have the two following properties • the finitely generated ideals are projective (this characterizes what we call a coherent Prüfer ring), §1. Arithmetic rings 679 • the Krull dimension is at most 1. As the reader will observe, the proofs do not become more complicated, on the contrary, by this weakening of the hypotheses. Similarly, we have been brought to study the partial factorization Prüfer rings (in the local case, they are the valuation domains whose group of valuation is isomorphic to a subgroup of Q). We think that these rings constitute the natural framework suggested by Buchman and Lenstra [25]. Finally, for what concerns the Dedekind rings, we have freed ourselves of the usual hypothesis of integrity (because it is hardly preserved from an algorithmic point of view by algebraic extension) and we have left the total factorization of the finitely generated ideals in the background (for the same reason) in favor of the only Noetherian character. The Noetherianity implies the partial factorization of families of finitely generated ideals, which itself implies the dimension 6 1 in the constructive form. 1. Arithmetic rings Recall that an arithmetic ring is a ring whose finitely generated ideals are locally principal (see Section VIII -4). We begin with a few results regarding the locally principal ideals in an arbitrary ring. Locally principal ideals, principal localization matrix We take up Theorem V -7.3 again (stated for the locally cyclic finitely generated modules) in the framework of locally principal ideals. 1.1. Proposition. (Locally principal ideals) Let x1 , . . . , xn ∈ A. The following properties are equivalent. 1. The ideal a = hx1 , . . . , xn i is locally principal. 2. There exist n comaximal elements si of A such that for each i, after localization at si , a becomes principal, generated by xi . 3. There exists a principal localization matrix for (x1 , . . . , xn ), that is a matrix A = (aij ) ∈ Mn (A) that satisfies ( P aii = 1 (1) a`j xi = a`i xj ∀i, j, ` ∈ J1..nK Note: The last line is read as follows: for each row `, the minors of a`1 · · · a`n order 2 of the matrix are null. x1 · · · xn V2 4. A (a) = 0. 5. F1 (a) = h1i. 680 XII. Prüfer and Dedekind rings In the case where one of the xk ’s is regular the existence of the matrix A in item 3 has the same meaning as the following item. P 3 0 . There exist γ1 , . . . , γn in Frac A such that i γi xi = 1 and each of the γi xj ’s is in A (Dedekind formulation). J The only new thing is the formulation 3 0 . If for example x1 ∈ Reg(A) and if we dispose of A, let γi = ai1 /x1 . Conversely, if we dispose of the γi ’s, let aij = γi xj .  The following proposition takes up and adds details to Proposition V -7.4. The results could be obtained more directly, by using the Dedekind formulation, when one of the xk ’s is regular. 1.2. Proposition. Let a = hx1 , . . . , xn i be a locally principal ideal of A and A = (aij ) be a principal localization matrix for (x1 , . . . , xn ). We have the following results. 1. [ x1 · · · xn ] A = [ x1 · · · xn ]. 2. Each xi annihilates D2 (A) and A2 − A. 3. Let Ai = A[1/aii ], we have a =Ai hxi i. 4. hx1 , . . . , xn i ha1j , . . . , anj i = hxj i. P 5. More generally, if a = αi xi and t[ y1 · · · yn ] = A t[ α1 · · · αn ], then hx1 , . . . , xn i hy1 , . . . , yn i = hai . In addition, if Ann(a) = 0, the matrix tA is a principal localization matrix for (y1 , . . . , yn ). P 6. In particular, if αi xi = 0 and t[ y1 · · · yn ] = A t[ α1 · · · αn ], then hx1 , . . . , xn i hy1 , . . . , yn i = 0. P 7. Consider the linear form x : (αi ) 7→ i αi xi associated with (x1 , . . . , xn ), let N = Ann hx1 , . . . , xn i and N(n) be the cartesian product { (ν1 , . . . , νn ) | νi ∈ N, i ∈ J1..nK } ⊆ An . Then Ker x = Im(In − A) + N(n) . 8. For i ∈ J1..n − 1K the intersection hx1 , . . . , xi i ∩ hxi+1 , . . . , xn i is the ideal generated by the n coefficients of the row vector [ x1 · · · xi 0 · · · 0 ](In − A) = −[ 0 · · · 0 xi+1 · · · xn ](In − A). J Item 3 is clear, items 4 and 6 are special cases of the first part of item 5. Items 1, 2 and the first part of item 5 have been shown for the cyclic localization matrices. 5. It remains to show that, when Ann(a) = 0, tA is a principal localization matrix for (y1 , . . . , yn ). Indeed, on the one hand Tr( tA) = 1, and on the other hand, since aD2 (A) = 0, we have D2 (A) = 0, or Ai ∧ Aj = 0, Ai being the column i of A. As the vector y := t[ y1 · · · yn ] is in Im A, we also have y ∧ Aj = 0, which translates that tA is a principal localization matrix for (y1 , . . . , yn ). §1. Arithmetic rings 681 7. The inclusion Ker x ⊆ Im(In − A) + N(n) results from item 6 and the reverse inclusion of item 1. 8. Results from 7 by noticing that taking an element a of the ideal b = hx1 , . . . , xi i ∩ hxi+1 , . . . , xn i is the same as taking an element (α1 , . . . , αn ) ∈ Ker x : a = α1 x1 + · · · + αi xi = −αi+1 xi+1 − · · · − αn xn . Thus, b is generated by the coefficients of [ x1 · · · xi 0 · · · 0 ](In − A).  1.3. Corollary. Let a = hx1 , . . . , xn i be a finitely generated ideal of A. 1. If a is locally principal, for every finitely generated ideal c contained in a, there exists a finitely generated ideal b such that ab = c. 2. Conversely, if n = 2 and if there exists some ideal b such that hx1 i = ab, then a is locally principal. 3. The ideal a is a projective module of constant rank 1 if and only if it is locally principal and faithful. In this case, if A is a principal localization matrix for (x1 , . . . , xn ), it is a projection matrix of rank 1 and a ' Im A. 4. The ideal a is invertible if and only if it is locally principal and contains a regular element. J 1, 3, 4. See Lemma V -7.7, which gives slightly more general results. These items also result from the previous proposition, items 5 and 7. 2. In b we must have u1 and u2 such that on the one hand u1 x1 + u2 x2 = x1 , so (1 − u1 )x1 = u2 x2 , and on the other hand u1 x2 ∈ hx1 i. When we invert the element u1 , x1 generates a, and when we invert 1 − u1 , it is x2 that generates a.  First properties Recall that a ring is coherent if and only if on the one hand the intersection of two finitely generated ideals is a finitely generated ideal, and on the other hand the annihilator of every element is finitely generated (Theorem II -3.4). Consequently, by using item 8 of Proposition 1.2, we obtain 1.4. Fact. In an arithmetic ring the intersection of two finitely generated ideals is a finitely generated ideal. An arithmetic ring is coherent if and only if the annihilator of every element is finitely generated. Every quotient and every localized ring of an arithmetic ring is an arithmetic ring. In a strongly discrete ring, the divisibility relation is explicit. We have the (remarkable) converse for arithmetic rings. 682 XII. Prüfer and Dedekind rings 1.5. Proposition. An arithmetic ring is strongly discrete if and only if the divisibility relation is explicit. More precisely, in an arbitrary ring, if an ideal hb1 , . . . , bn i is locally principal and if A = (aij ) is a principal localization matrix for (b1 , . . . , bn ), we have the equivalence c ∈ hb1 , . . . , bn i ⇐⇒ ajj c ∈ hbj i for every j. In particular, we have 1 ∈ hb1 , . . . , bn i if and only if for all j, bj divides ajj . P J If ajj c = uj bj , then c = j uj bj . Conversely, if c ∈ hb1 , . . . , bn i, then for each j we get ajj c ∈ ha1j , . . . , anj i hb1 , . . . , bn i = hbj i .  In the following theorem we give a few possible characterizations of arithmetic rings. The simplest characterization of arithmetic rings is no doubt the one given in item 1b. Since an ideal hx, yi is locally principal if and only if there is a principal localization matrix for (x, y), condition 1b means ∀x, y ∈ A ∃u, a, b ∈ A, ux = ay, (1 − u)y = bx, which is also exactly what item 2c says. 1.6. Theorem. (Characterizations of arithmetic rings) For a ring A the following properties are equivalent. 1a. A is arithmetic (every finitely generated ideal is locally principal). 1b. Every ideal a = hx1 , x2 i is locally principal. 2a. For all finitely generated ideals b ⊆ a, there exists some finitely generated ideal c such that ac = b. 2b. For every ideal a = hx1 , x2 i, there exists some finitely generated ideal c such that ac = hx1 i. 2c. ∀x1 , x2 ∈ A the following system of linear equations BX = C admits a solution   x1 x2 0 | x1 [B | C ] = (2) x2 0 x1 | 0 2d. ∀x1 , x2 ∈ A there exists a u ∈ A such that hx1 i ∩ hx2 i = h(1 − u)x1 , ux2 i . 3. For all finitely generated ideals a and b, the following short exact sequence is split δ σ 0 −→ A/(a ∩ b) −→ A/a × A/b −→ A/(a + b) −→ 0 where δ : xa∩b 7→ (xa , xb ) and σ : (y a , z b ) 7→ (y − z)a+b . 4. For all finitely generated ideals a and b, (a : b) + (b : a) = h1i. §1. Arithmetic rings 683 5. (Chinese remainder theorem, arithmetic form) If (bk )k=1,...,n is a finite family of ideals of A and (xk )k=1,...,n is a family of elements of A satisfying xk ≡ x` mod bk + b` for all k, `, then there exists some x ∈ A such that x ≡ xk mod bk for all k. 6. The lattice of ideals of A is a distributive lattice. J 1b ⇒ 1a. If we have a finitely generated ideal with n generators, successive localizations (each time at comaximal elements) make it principal. Consider item 2a. Let a = hx1 , . . . , xn i and b = hy1 , . . . , ym i. If c exists, for each j = 1, . . . , m there exist elements ai,j ∈ c such that P i ai,j xi = yj . Moreover, for each i, i0 , j we must have ai,j xi0 ∈ b, which is expressed by the existence of elements bi,i0 ,j,j 0 ∈ A satisfying P 0 0 0 0 j 0 bi,i ,j,j yj = ai,j xi . Conversely, if we can find some elements ai,j and bi,i0 ,j,j 0 ∈ A satisfying the linear equations above (in which the xi ’s and yj ’s are coefficients), then the ideal c generated by the ai,j ’s indeed satisfies ac = b. Thus, finding c comes down to solving a system of linear equations. It follows that to prove 1a ⇒ 2a we can use suitable localizations: the two ideals a and b become principal, one being included in the other, in which case c is obvious. We easily verify that the properties 1b, 2b, 2c and 2d are equivalent (taking into account the previous remark for 1b). To show that 1a implies 3, 4, 5 and 6, note that each of the properties considered can be interpreted as the existence of a solution of a certain system of linear equations, and that this solution is obvious when the ideals that intervene are principal and totally ordered for the inclusion. It remains to show the converses. 3 ⇒ 2c and 4 ⇒ 2c. Consider in 3 or 4 the case where a = hx1 i and b = hx2 i. 5 ⇒ 1b. Let a, b ∈ A. Let c = a + b, b1 = hai , b2 = hbi , b3 = hci , x1 = c, x2 = a and x3 = b. We have b1 + b2 = b1 + b3 = b3 + b2 = ha, bi. The congruences xi ≡ xk mod bi + bk are satisfied, so there exist u, v, w in A such that c + ua = a + vb = b + wc, hence wb = (1 + u − w)a, (1 − w)a = (1 + w − v)b. Therefore the ideal ha, bi is locally principal. 6 ⇒ 1b. Take the property of distributivity a+(b∩c) = (a+b)∩(a+c), with a = hxi, b = hyi and c = hx + yi. We therefore have y ∈ hxi+(hyi∩hx + yi), 684 XII. Prüfer and Dedekind rings that is, there exist a, b, c such that y = ax + by, by = c(x + y). Hence cx = (b − c)y and (1 − c)y = (a + c)x. Thus, hx, yi is locally principal.  The isomorphism A/a ⊕ A/b ' A/(a + b) ⊕ A/(a ∩ b) which results from item 3 of the previous theorem admits the following generalization. 1.7. Corollary. Let (ai )i∈J1..nK be a family of finitely generated ideals of an arithmetic ring A. Let Pn P b1 = k=1 ak , b2 = 16j<k6n (aj ∩ ak ), . . . P Tn br = 16j1 <···<jr 6n (aj1 ∩ · · · ∩ ajr ), . . . , bn = k=1 ak . Then we have bn ⊆ · · · ⊆ b1 with an isomorphism Mn Mn A/ak ' A/bk . k=1 k=1 By bringing this result closer to Theorem IV -5.1 we obtain a complete classification of A-modules of this type. We can also compare with Fact XI -2.12 18. 1.8. Corollary. Let B be a faithfully flat A-algebra. If B is an arithmetic ring (resp. a Prüfer ring, a coherent Prüfer ring), then so is A. J Since A ⊆ B, if B is reduced, so is A. Theorem VIII -6.7 3 implies that if B is coherent, so is A. It remains to show the result for an “arithmetic ring.” Consider x, y ∈ A. We must show that there exist u, a, b ∈ A such that ux = ay and (1 − u)y = bx. This is actually a system of linear equations with coefficients in A, with the unknowns (u, a, b). However, this system admits a solution in B and B is faithfully flat over A, so it admits a solution in A.  Multiplicative structure of finitely generated ideals Recall that we denote by Ifr A the multiplicative monoid of finitely generated fractional ideals of an arbitrary ring A (see page 571). A priori an inclusion a ⊆ b in Ifr A does not imply the existence of a fractional ideal c ∈ Ifr A such that bc = a. But this is satisfied in the case of arithmetic rings. For a and b in Ifr A, let a ÷ b = { x ∈ Frac A | xb ⊆ a } . 1.9. Lemma. Let A be a coherent ring. 1. Ifr A is a lattice with respect to inclusion relation, the supremum is given by the sum and the infimum by the intersection. 2. Ifr A is a distributive lattice if and only if the ring is arithmetic. 3. Concerning invertible elements of Ifr A. a. If a a0 = A in Ifr A, we have a0 c = c ÷ a and a(c ÷ a) = c for all c ∈ Ifr A. In particular A ÷ a is the inverse of a. §1. Arithmetic rings 685 b. A fractional ideal aa (where a is a finitely generated ideal of A) is invertible in Ifr A if and only if a is an invertible ideal. c. If a(A ÷ a) = A, a is invertible in Ifr A. Let a, b ∈ Ifr A with b ∈ b ∩ Reg A. Suppose that A is integrally closed in Frac A. 4. We have a ÷ b ∈ Ifr A. 5. If in addition a ⊆ b ⊆ A, then we have a ÷ b = a : b. J Every element of Ifr A is written in the form a a a b a b for some finitely generated ideal a of A and some a ∈ Reg A. In addition = aabb . Finally, the neutral element of the monoid is A = h1i. This shows items 1, 2 and 3b. 3a. We have aa0 c = c so a0 c ⊆ c ÷ a and c = aa0 c ⊆ a(c ÷ a) = c. If x ∈ c ÷ a, i.e. xa ⊆ c, then xA = xaa0 ⊆ a0 c, so x ∈ a0 c. 3c. With a = ha1 , . . . , ak i ⊆ A, suppose that P a(A ÷ a) = A. There exist x1 , . . . , xk ∈ (A ÷ a) such that i xi ai = 1 and xi aj ∈ a for all i, j. WeP can write the xi ’s in the form bci with the same denominator c. We obtain i ai bi = c and ai bj ∈ hci for all i, j. Thus by letting b = hb1 , . . . , bk i we obtain a b = hci. 5. The inclusion a : b ⊆ a ÷ b is immediate. Conversely, if some x ∈ K satisfies xb ⊆ a, we need to show that x ∈ A. As A is integrally closed in Frac A, we apply item 3 of Fact III -8.2, with M = b and B = Frac A, because xb ⊆ a ⊆ b. 4. Results from item 5 because we are brought back to the case treated in item 5, and in a coherent ring, the conductor a : b is finitely generated if a and b is finitely generated.  The following theorem says that the multiplicative structure of the monoid of invertible ideals of an arithmetic ring has all the desired properties. Recall that by Lemma V -7.7, a finitely generated ideal is projective of constant rank 1 if and only if it is locally principal and faithful. 1.10. Theorem. In an arithmetic ring the faithful finitely generated ideals form the non-negative submonoid of an l-group. The lattice laws are a ∧ b = a + b and a ∨ b = a ∩ b. The invertible ideals (i.e. the finitely generated ideals that contain a regular element) form the non-negative submonoid of an l-subgroup of the previous l-group. J This results from Corollary 1.3, from Theorem 1.6 and from Theorem XI -3.1.  Actually the two groups coincide as soon as A is a pp-ring, or more generally when the projective modules of constant rank 1 over Frac A are free (Theorem X -5.8, item 2 ). 686 XII. Prüfer and Dedekind rings 2. Integral elements and localization The following definition generalizes Definition III -3.2 in two directions. 2.1. Definition. Let ϕ : A → C be a homomorphism between commutative rings and a be an ideal of A. 1. An element x ∈ C is said to be integral over a if there exists an integer k > 1 such that xk = ϕ(a1 )xk−1 + ϕ(a2 )xk−2 + · · · + ϕ(ak ) (∗) with each ah ∈ ah . In the case where C = A, this is equivalent to k k−1 a + hxi = a a + hxi . We also say that the equality (∗) is an integral dependence relation of x over a. 2. An ideal a of A is said to be integrally closed in C if every element of C integral over a is in ϕ(a). 3. The ring A is said to be normal if every principal ideal of A is integrally closed in A. In all cases, a normal ring is integrally closed in its total ring of fractions. We have the following partial converse. 2.2. Fact. A pp-ring is normal if and only if it is integrally closed in its total ring of fractions. J The proof is left to the reader.  It is clear that every normal ring is reduced (because a nilpotent is integral over h0i). We even have a little better. 2.3. Lemma. Every normal ring is a pf-ring. More precisely, we have for every ring A the implications 1 ⇒ 2 ⇒ 3. 1. Every principal ideal is integrally closed (i.e. A is normal). 2. For all x, y ∈ A, x2 ∈ hxyi implies x ∈ hyi . 3. Every principal ideal is flat (i.e. A is a pf-ring). J Note that the ideal 0 is integrally closed if and only if the ring is reduced. We obviously have 1 ⇒ 2, and 2 implies that the ring is reduced. Suppose 2 and let x, y ∈ A such that xy = 0. We have x2 = x(x + y) therefore x ∈ hx + yi, e.g. x = a(x + y). Then (1 − a)x = ay, ay 2 = (1 − a)xy = 0, and since the ring is reduced, ay = 0, then (1 − a)x = 0.  2.4. Fact. Let x be an element and a be an ideal of A. For the properties that follow we have 2 ⇒ 1, and 1 ⇒ 2 if a is faithful and finitely generated. 1. The element x is integral over the ideal a. 2. There exists a finitely generated faithful A-module M such that xM ⊆ aM . §2. Integral elements and localization 687 J (Compare with the proof of Fact III -8.2.) 2 ⇒ 1. Consider a matrix A with coefficients in a that represents µM,x (multiplication by x in M ) over a finite generator set of M . If f is the characteristic polynomial of A, we have by the Cayley-Hamilton theorem 0 = f (µM,x ) = µM,f (x) , and since the module is faithful, f (x) = 0. 1 ⇒ 2. If we have an integral dependence relation of degree k of x over a we take M = (a + hxi)k−1 .  Let a be an ideal of A and t be an indeterminate. Then the subalgebra A[at] of A[t], i.e. precisely A[at] = A ⊕ at ⊕ a2 t2 ⊕ · · · is called the Rees algebra of the ideal a. The proof of the two following facts is left to the reader. 2.5. Fact. Let a be an ideal of A. 1. For x ∈ A, the following properties are equivalent. a. The element x is integral over the ideal a of A. b. The polynomial xt is integral over the subalgebra A[at] of A[t]. 2. More precisely a. If a is the set of elements of A integral over a, then the integral closure of A[at] in A[t] is the subring A[at]. b. In particular, a is an ideal of A, called the integral closure of the ideal a in A. We denote it by IclA (a) or Icl(a). 2.6. Fact. Let a and b be two ideals of A.  1. Icl Icl(a) = Icl(a). 2. a Icl(b) ⊆ Icl(a) Icl(b) ⊆ Icl(ab). We now revisit two important results which have been already established. Item 2c of Kronecker’s theorem III -3.3 gives precisely the following result. 2.7. Lemma. (Kronecker’s theorem, reformulated) Suppose that we have in A[T ] an equality Pn Pm Pm+n f = i=0 fi T n−i , g = j=0 gj T m−j and h = f g = r=0 hr T m+n−r . Let k be the subring of A generated by the fi gj ’s. Then, each fi gj is integral over the ideal ck (h) of k. Note that item 2c of Kronecker’s theorem III -3.3 tells us precisely this: there exists some homogeneous polynomial Ri,j ∈ Z[Y, H0 , . . . , Hp ] (all the variables have the same weight 1), monic in Y , such that Ri,j (fi gj , h0 , . . . , hp ) = 0. Here is a new version of the Lying Over (Lemma VI -3.12). 688 XII. Prüfer and Dedekind rings 2.8. Lemma. (Lying Over, more precise form) Let A ⊆ B with B integral over A and a be an ideal of A, then aB ∩ A ⊆ DA (a). More precisely, every element of aB is integral over a. J We textually rework the proof of Lemma VI -3.12. If x ∈ aB, we have x = P ai bi , with ai ∈ a, bi ∈ B. The bi ’s generate an A-subalgebra B0 which is finite. Let G be a finite generator set (with ` elements) of the A-module B0 . Let Bi ∈ M` (A) be a matrix that expresses the multiplication by bi over P G. The multiplication by x is expressed by the matrix ai Bi , which is with coefficients in a. The characteristic polynomial of this matrix, which annihilates x (because B0 is a faithful A-module), therefore has its coefficient of degree ` − d in ad . We could also apply Fact 2.4 by taking M = B0 . Indeed, as x ∈ aB0 , we have xB0 ⊆ aB0 and so x is integral over a.  We now examine the relationships between properties of the type “integral over” and localizations. 2.9. Fact. Let a be an ideal of A, S be a monoid of A and x ∈ A. 1. The element x/1 ∈ AS is integral over aS if and only if there exists a u ∈ S such that xu is integral over a in A. 2. If A is normal, then so is AS . Let B ⊇ A be a faithfully flat algebra. 3. If A0 is the integral closure of A in B, then A0S is the integral closure of AS in BS . 4. If B is normal, then A is normal. J We only prove item 1. In the proof we confuse an element of A and its image in AS to alleviate the notation. If an equality xk = a1 xk−1 + a2 xk−2 + · · · + ak is performed in AS with each aj ∈ (aAS )j , we obtain “by reducing all the fractions to the same denominator and by getting rid of the denominator” an equality sxk = b1 xk−1 + b2 xk−2 + · · · + bk in AS with s ∈ S and each bj ∈ aj . This means an equality in A after multiplication by another element s0 of S. We can also multiply by s0k sk−1 and we obtain with u = ss0 an equality (xu)k = c1 (xu)k−1 + c2 (xu)k−2 + · · · + ck in A with each cj ∈ aj . The fact that a ring is normal is a local notion, in the following sense.  §3. Prüfer rings 689 2.10. Concrete local-global principle. (Normal rings) Let S1 , . . ., Sn be comaximal monoids of a ring A, x ∈ A and a be an ideal of A. 1. The element x is integral over a if and only if it is integral over each of the aSi ’s. 2. The ideal a is integrally closed in A if and only if each of the aSi ’s is integrally closed in ASi . 3. The ring A is normal if and only if each of the ASi ’s is normal. J It suffices to prove item 1, the passage from the local to the global. We obtain by applying Fact 2.9 for each i ∈ J1..nK some si ∈ Si such that si x is integral over the ideal a in A. We can suppose that all the integral dependence relations have the same degree k. Let us write these integral dependence relations Xk (si x)k ∈ ah (si x)k−h , i ∈ J1..nK. h=1 Pn A linear combination of these relations based on an equality i=1 bi ski = 1 gives us an integral dependence relation of x over a in A.  Note that since the property in item 1 is of finite character, Lemma II -2.12 says that the previous concrete local-global principle is equivalent in classical mathematics to the corresponding abstract local-global principle (in which the localization intervenes at any maximal ideal of A). 3. Prüfer rings Recall that a ring is said to be Prüfer when its ideals are flat, or if it is arithmetic and reduced, or if it is arithmetic and a pf-ring (Proposition VIII -4.4). 3.1. Proposition and definition. We call a ring A satisfying one of the following equivalent properties a valuation ring. 1. A is a reduced local Bézout ring. 2. A is a local Prüfer ring. 3. A is reduced and satisfies: for all a, b ∈ A, a | b or b | a. If K = Frac A, the quotient group K× /A× is equipped with the total order relation x | y defined by ∃a ∈ Reg(A), y = ax. This totally ordered group is called the valuation group of A. In addition, A is then without zerodivisors. Example. Let k be a nontrivial discrete field and (Γ, ·, 1Γ ) be a totally ordered discrete group. We construct a k-algebra which is a valuation domain with Γ as its valuation group as follows. First of all consider the k-algebra A = k[Γ+ ] described in Exercise IX -22. 690 XII. Prüfer and Dedekind rings P For an element a = i ai γi of A∗ we define v(a) as the smallest γi that intervenes in the expression of a (we have taken the pairwise distinct γi ’s, and ai 6= 0). We then prove that v(ab) = v(a)v(b), which implies that A is integral.  We also let v(0) = +∞. Finally, our valuation ring is the subring V = ab | a ∈ A, b ∈ A∗ , v(a) > v(b) of Frac A. We now give a few other characteristic properties of Prüfer rings, which add to those that we can obtain from Theorem 1.6 for arithmetic rings. 3.2. Theorem. (Characterizations of Prüfer rings) For some ring A the following properties are equivalent. 1a. A is an arithmetic pf-ring (i.e. a Prüfer ring). 1b. A is a pf-ring and for all x, y there exist n ∈ N∗ and an ideal b such that hx, yi b = hxn i. 2a. Every submodule of a flat A-module is flat. 2b. A is a pf-ring and every torsion-free module is flat. 3a. An arbitrary system of linear equations BX = C, as soon as the determinantal ideals of [ B | C ] are equal to those of B, admits a solution. 3b. Likewise if we limit ourselves to B ∈ A2×3 and C ∈ A2×1 . 4a. Every ideal is integrally closed. 4b. Every finitely generated ideal is integrally closed. 4c. Every ideal hx, yi is integrally closed. 4d. A is normal and for all x, y ∈ A, we have xy ∈ x2 , y 2 . 5a. If a, a0 and c are finitely generated ideals, we have the implication a + a0 ⊆ c, ac ⊆ a0 c =⇒ a ⊆ a0 . 0 5b. If a, a and c are finitely generated ideals, we have the implication Ann(a + a0 ) ⊇ Ann(c), ac ⊆ a0 c =⇒ a ⊆ a0 . J We first take care of equivalences between 1, 2 and 3. The implications 1a ⇒ 1b, 2a ⇒ 1a and 3a ⇒ 3b are obvious. 1b ⇒ 1a. Results from Lemma 3.3 below. 3b ⇒ 1a. The ring is arithmetic because the system of linear equations (2) in Theorem 1.6 admits a solution. In addition, the ring is reduced: if a2 = 0, the system of linear equations { ax = 0, 0x = a } admits a solution because it corresponds to     a 0 0 0 with D2 ([ B | C ]) = D2 (B) = 0 ! B= , C= 0 0 0 a 1a ⇒ 3b. First of all suppose that the ring is local. Therefore the ring is without zerodivisors and every finitely generated ideal is principal. Then, the result follows by Lemma 3.4 below. In the general case, the proof of the lemma can be reproduced after localizations at suitable comaximal monoids, §3. Prüfer rings 691 and since this is a matter of solving a system of linear equations the basic local-global principle applies. 2b ⇒ 2a. A flat module is torsion-free (Lemma VIII -3.4). Every submodule of a torsion-free module is torsion-free, therefore flat. 1a ⇒ 2b. Let M be a torsion-free module over a Prüfer ring. We want to show that it is flat. Suppose first of all that the ring is local. Let LX = 0 be a syzygy with L = [ a1 · · · am ] in A and X ∈ M m×1 . Without loss of generality, suppose that ai = bi a1 for i > 1. The syzygy is rewritten as a1 y = 0 with y = x1 + b2 x2 + · · · + bm xm . The cyclic submodule Ay is flat and the ring is local therefore a1 = 0 or y = 0. In the first case L = 0. In the second case X = HX and LH = 0 with the following triangular matrix  H  0 −b2 −b3 . . . −bm  0 1 0 ... 0     .. . . ..  . . .. .. . . . . H=     . . . .. ..  .. 0  0 ... ... 0 1 In the case of an arbitrary Prüfer ring, we repeat the previous reasoning by using the localizations (at comaximal elements) which make the ideal ha1 , . . . , am i generated by one of the ai ’s. We now pass to the equivalences between 1, 4 and 5. The implications 4a ⇔ 4b ⇒ 4c ⇒ 4d and 5b ⇒ 5a are immediate. 4d ⇒ 1a. The ring A is a pf-ring (Lemma 2.3). It therefore suffices to show that every ideal a = hx, yi is locally principal. We have xy = ax2 + by 2 , and z = ax satisfies z 2 = zy − aby 2 . Therefore, since the ring is normal, ax = a0 y for a certain a0 . Similarly, by = b0 x for a certain b0 . Therefore, xy(1 − a0 − b0 ) = 0. The elements 1 − a0 − b0 , a0 and b0 are comaximal. When we invert 1 − a0 − b0 , we obtain xy = 0, and after two new localizations, x = 0 or y = 0, so a is principal. When we invert a0 , we obtain a = hxi because a0 y = ax. Likewise when we invert b0 . 1a ⇒ 4b. Let x ∈ A be integral over a finitely generated ideal a. We have for a certain n ∈ N, a(a + hxi)n = (a + hxi)n+1 . Since the ring is arithmetic, we have a finitely generated ideal b such that (a + hxi)b = hxi. Therefore by multiplying by bn we obtain xn a = xn (a + hxi) which means that there exists some y ∈ a such that xn+1 = xn y, i.e. xn (y − x) = 0. Since the ring is a pf-ring, this implies that after comaximal localizations we have x = 0 or y − x = 0, and in each case x ∈ a. 5a ⇒ 4b. Let x ∈ A be integral over some finitely generated ideal a. We have for a certain n ∈ N, a(a + hxi)n = (a + hxi)n+1 . We apply several times the simplification property with the ideal c = a + hxi and we obtain at the end of the process a + hxi ⊆ a. 692 XII. Prüfer and Dedekind rings 4b ⇒ 5b. Let c, a, a0 be three finitely generated ideals satisfying the hypothesis in 5b. Let x be an element of a and X be a column vector column formed by a generator set of c. Since xc ⊆ a0 c, there exists a matrix G ∈ Mn (a0 ) such that xX = GX, i.e. (xIn − G)X = 0. If P is the characteristic polynomial of G, we have on the one hand P (x)X = 0, and on the other P (x) ∈ xn + a0 . Therefore P (x) ∈ Ann(c) ⊆ Ann(a+a0 ) and P (x) ∈ a+a0 . Hence P (x)2 = 0, then P (x) = 0. This is an integral dependence relation of x over a0 . Therefore x ∈ a0 .  3.3. Lemma. In a pf-ring, if we have hx, yi b = hxn i with n > 1, then hx, yi is locally principal. J It suffices to solve this problem after comaximal localizations. The pf-ring character of the ring will be used to manufacture these localizations. We have an equality hu, vi hx, yi = hxn i with xn = ux + vy, ux = u1 xn , vx = axn and uy = bxn . We get (u1 y − bx)xn = 0, (u1 x + ay − x)xn = (ux + vy − xn )x = 0. We therefore have comaximal localizations in which x = 0 and the result is clear. In the latter, u1 y = bx and u1 x + ay = x i.e. (1 − u1 )x = ay. Thus, hx, yi is locally principal.  3.4. Lemma. Let A be an arbitrary ring, B ∈ Am×n and C ∈ Am×1 . The system of linear equations BX = C admits a solution in An×1 when the following conditions are realized for all k ∈ J1.. inf(m, n)K 1. The determinantal ideal Dk (B) is of the form δk A, where δk is a minor of order k.  2. δk satisfies the condition: ∀y ∈ A (yδk = 0 ⇒ δk = 0 ∨ y = 0) . 3. Dk ([ B | C ]) = Dk (B). J We begin with k = inf(m, n). We write the identity à la Cramer δk × C = δk × (a linear combination of the columns of B), which results from the nullity of determinantal ideals of index k + 1 and from the fact that Dk ([ B | C ]) is generated by δk . Given 2, we are in one of the following two cases – we can simplify by dividing everything by δk , so C ∈ Im B. – δk = 0, or k = 1 in which case C ∈ Im B (because B = C = 0), or k > 2, and we can perform an induction by replacing k by k − 1.  §3. Prüfer rings 693 Extensions of Prüfer rings The fact that a normal ring is a pf-ring means that locally it behaves like a ring without zerodivisors. Actually the machinery of comaximal localizations at work in the definition of a pf-ring often allows us to return to the integral case, as we have already seen in the proof of Lemma 3.3. We have the following important theorem, which is a generalization of the analogous result obtained in number theory (Theorem III -8.21). 3.5. Theorem. (Normal integral extension of a Prüfer ring). Let A ⊆ B with B being normal and integral over A and A being Prüfer. Then B is a Prüfer ring. J We will show that every ideal hα, βi is locally principal. Let us first consider the case of an ideal ha, βi with (a, β) ∈ A × B. We can then reuse almost word for word the proof “à la Dedekind1 ” of Theorem III -8.21. Let f ∈ A[X] be monic and vanishing at β. We write f (X) = (X − β)h(X) where h ∈ B[X]. We therefore have f (aX) = (aX − β)h(aX), which we write as f1 = g1 h1 . Let c = cA (f1 ), b = cB (h1 ) and a = cB (g1 ) = ha, βi. If deg(f ) = n, we have an ∈ c. Let c0 be a finitely generated ideal of A with cc0 = an A. By using Kronecker’s theorem (reformulated in Lemma 2.7), we obtain cB ⊆ ab ⊆ IclB (c) and so an B = (cB)(c0 B) ⊆ ab(c0 B) ⊆ IclB (c)(c0 B) ⊆ IclB (cc0 ) = IclB (an ) = an B. Therefore ab(c0 B) = an B and a is locally principal by Lemma 3.3. Let us pass to the general case, with α, β ∈ B. If B is integral, we can suppose that α 6= 0 and we find γ 6= 0 in B such that αγ = a ∈ A, which brings us to the problem already treated. It remains to see the more delicate case where we do not suppose that B is integral. Actually we apply with perseverance the recipe of comaximal localizations provided by the pf-ring character of the ring, and it works. We write p(α) = 0 with p monic in A[X]. We perform an induction on m = deg(p). We have already treated the case m = 0. Let us pass from m to m + 1. We write p(X) = Xq(X) + a with q monic, deg(q) = m and let α e = q(α). Since αe α = −a ∈ A, we know how to find u, v ∈ B for which we have hu, vi hαe α, β α ei = hαe αi, with αe α = uαe α + vβ α e, uβ α e = u1 αe α, vβ α e = v1 αe α. If we could simplify by α e, we would have hu, vi hα, βi = hαi. The three equalities above are written as (α − uα − vβ) α e = 0, (uβ − u1 α) α e = 0 (vβ − v1 α) α e = 0. 1 This would also work with the proof à la Kronecker. 694 XII. Prüfer and Dedekind rings From these equalities, we will find comaximal localizations (as in the proof of Lemma 3.3). In some equalities, α e = 0, that is q(α) = 0, and we apply the induction hypothesis. In the last one we have hu, vi hα, βi = hαi, which shows that hα, βi is locally principal.  Remark. This proof, like that of Lemma 3.3, is more formidable than it seems. It manages to treat in a single way the case where α = 0, the case where α is regular, and “all the intermediary cases.” We also have the following easy result. 3.6. Theorem. Let A ⊆ B ⊆ Frac A. 1. If A is a pf-ring, the same goes for B. 2. If A is arithmetic, the same goes for B. 3. If A is a Prüfer ring, the same goes for B. J Item 1 is left to the reader. 2. Let x, y ∈ B. There exists a d ∈ Reg(A) such that x1 = dx, and y1 = dy are in A. Then d(x, y) = (x1 , y1 ), and a principal localization matrix in A for (x1 , y1 ) is also a principal localization matrix for (x, y).  The two previous theorems are linked to two classic results in the Noetherian framework (cf. [Freid & Jarden, page 17]): Krull-Akizuki theorem. If A is a Dedekind ring and L is a finite extension of the quotient field of A, then the integral closure of A in L is a Dedekind ring. Grell-Noether theorem. If A is a Dedekind ring, then every ring contained between A and its quotient field is a Dedekind ring. Given the characterization of Dedekind rings (in classical mathematics) as integral Noetherian Prüfer rings, we see that we have established the non-Noetherian and non-integral versions of these two theorems. We will later prove that in the analogous circumstances, the Krull dimension of B is always less than or equal to that of A, which this time is linked to the characterization of Dedekind rings as integrally closed Noetherian rings of dimension at most 1. §4. Coherent Prüfer rings 695 4. Coherent Prüfer rings First properties Recall that over a pp-ring a finitely generated ideal is faithful if and only if it contains a regular element (see Corollary IV -6.5). Actually every finitely generated ideal contains an element that has the same annihilator. In particular, over a pp-ring a projective finitely generated ideal is invertible if and only if it is faithful. After having provided characterizations of Prüfer rings (see Proposition and Definition VIII -4.4 and Theorem 3.2), here are some for coherent Prüfer rings; the reader will find others in Exercise 16. 4.1. Theorem. (Characterizations of coherent Prüfer rings) For any ring A, the following properties are equivalent. 1. A is a coherent Prüfer ring. 2. A is an arithmetic pp-ring. 3. Every finitely generated ideal is projective. 4. Every ideal with two generators is projective. 5. A is a pp-ring and every ideal ha, bi with a ∈ Reg A is invertible. 6. A is a pp-ring and every faithful finitely generated ideal is a projective module of constant rank 1. J 1 ⇔ 2. Use Fact VIII -3.5. 3 ⇒ 4. Trivial. 4 ⇒ 2. Theorem 1.6 gives the implication for the locally principal character of ideals. Moreover a ring is a pp-ring if and only if the principal ideals are projective. The implications 1 ⇒ 3, 5, 6 come from the characterization of projective ideals as locally principal ideals whose annihilator is an idempotent and that of the invertible ideals as locally principal ideals containing a regular element (Lemma V -7.7, items 2 and 6 ). For the converses, recall that a principal ideal is projective if and only if its annihilator is generated by an idempotent (Lemma V -7.5), and we can look at the solution of Exercise 16. We can also examine these converses in the integral case, where they are clear, and use the elementary local-global machinery of pp-rings.  In the local case we obtain the following result (trivial in classical mathematics, but meaningful from a constructive point of view). 696 XII. Prüfer and Dedekind rings 4.2. Fact. A valuation ring is coherent if and only if it is integral. We call it a valuation domain. J A Prüfer ring is coherent if and only if it is a pp-ring. A local ring is connected. A connected ring is integral if and only if it is a pp-ring.  In this case K = Frac A is a discrete field and for all x ∈ K× , x or 1/x is in A. Generally, we call a subring satisfying the preceding property a valuation ring of the discrete field K. It is clear that it is a valuation domain. The following stability properties are easy. 4.3. Fact. 1. A reduced zero-dimensional ring is a coherent Prüfer ring. 2. A ring obtained by localization of a coherent Prüfer ring is a coherent Prüfer ring. A reduced quotient ring of a coherent Prüfer ring by a finitely generated ideal is a coherent Prüfer ring. 3. A ring is a coherent Prüfer ring if and only if it has the same property after localization at comaximal monoids. Recall: item 1 is valid for pp-rings and item 2 for arithmetic rings. 4.4. Fact. Let A be a coherent Prüfer ring. 1. A is discrete if and only if B(A) is discrete. 2. A is strongly discrete if and only if it is with explicit divisibility. Kernel, image and cokernel of a matrix 4.5. Theorem. Let A be a coherent Prüfer ring. 1. The image of a matrix F ∈ An×m is isomorphic to a direct sum of n finitely generated ideals. 2. Every finitely generated submodule of a finitely generated projective module is a finitely generated projective module. 3. The kernel of a linear map between finitely generated projective modules is a direct summand (therefore finitely generated projective). 4. Every finitely presented module is a direct sum of its torsion submodule (which is finitely presented) and of a finitely generated projective submodule. 5. Every projective module of rank k > 0 is isomorphic to a direct sum of k invertible ideals. 6. Every projective module of rank 6 k is isomorphic to a direct sum of k finitely generated ideals. §4. Coherent Prüfer rings 697 Note: we do not require that A be discrete. J Consider an arbitrary linear map ϕ : Am → An . 1. We treat the case of the module M = Im ϕ ⊆ An . Let πn : An → A be the last coordinate form. The ideal πn (M ) = an is finitely generated therefore projective, and the surjective induced map πn0 : M → an is split, and M ' Ker πn0 ⊕ Im πn0 = (M ∩ An−1 ) ⊕ an . We end the proof by induction on n: M ∩ An−1 is finitely generated since it is isomorphic to a quotient of M . We therefore obtain M ' a1 ⊕ · · · ⊕ an . 2. Results immediately from 1. 3. This results from the image of the linear map being a finitely generated projective module. 4. We treat the case of the module N = Coker ϕ. Let us first consider the case where A is local, i.e. it is a valuation domain. The matrix of ϕ is put in Smith form (Proposition IV -7.2). Since the ring is integral, N is a direct sum of a free module (corresponding to the zero diagonal elements in the reduced Smith form) and of a torsion submodule, itself a direct sum of submodules A/hdi i corresponding to the regular diagonal elements. Next let us consider the case where A is integral. By means of a finite number of localizations at comaximal elements, say s1 , . . ., sr , we are brought back to the situation of the local case (Smith reduction of the matrix). Since AnnA (si ) = h0i or h1i, and since the localizations at 0 are useless, we can suppose that the si ’s are in Reg(A). Denote by T the torsion submodule of N and take a look at what happens after localization at Si = sN i . We easily observe that the torsion submodule of NSi is equal to TSi . Thus, T is finitely presented because it is finitely presented after localization at the Si ’s. It is a direct summand in N because TSi is a direct summand in NSi for each i: the canonical injection T → N admits a left-inverse by the local-global principle IV -3.1. Finally, the module N/T , which is finitely generated projective after localization at the Si ’s, is indeed finitely generated projective. We therefore obtain what we wanted, with a little bonus: the module T becomes, after localization at each of the elements sj of a comaximal system (s1 , . . . , sr ), a direct sum of cyclic torsion modules, i.e. isomorphic to A[1/sj ]/huk,j i, with uk,j ∈ Reg(A). Finally, let us consider the general case, where A is a pp-ring. Starting from the proof of the integral case, the elementary local-global machinery of pp-rings produces a fundamental system of orthogonal idempotents (e1 , . . . , er ) such that the result is attained in each of the components ei N (regarded as A[1/ei ]-module). This immediately gives the global result. 698 XII. Prüfer and Dedekind rings 5. In the case where A is integral, this results from item 1 since each ideal in the decomposition into a direct sum is of rank 0 or 1. We can deduce the general case by the elementary local-global machinery of pp-rings. Here is another proof,2 independent of the proof of item 1. If M is of constant rank k > 1, then its dual M ? is also of constant rank, their annihilators are null, and there exists a µ ∈ M ? such that Ann(µ) = h0i (see Lemma IV -6.4). Then µ(M ) is an invertible ideal of A because its annihilator is also null. Moreover, M ' Ker µ ⊕ Im µ, which proves that Ker µ is finitely generated projective of constant rank k − 1. We finish by induction. 6. Consider M as a direct sum of its components of constant rank, and apply item 4 to each of them.  Extensions of coherent Prüfer rings An element x of an A-algebra B is said to be primitively algebraic over A if it annihilates a primitive polynomial of A[X]. After a change of base ring, a primitively algebraic element remains primitively algebraic. The property for an element to be primitively algebraic is local in the following sense. 4.6. Concrete local-global principle. (Primitively algebraic elements) Let S1 , . . ., Sn be comaximal monoids of a ring A, B be an A-algebra and x ∈ B. Then x is primitively algebraic over A if and only if it is primitively algebraic over each of the ASi ’s. J We need to show that the condition is sufficient. We have comaximal elements s1 , . . ., sn (si ∈ Si ) and polynomials fi ∈ A[X] such that si ∈ c(fi ) and fi (x) = 0. If di > degX (fi ) + 1, we consider the polynomial f = f1 + X d1 f2 + X d1 +d2 f3 + · · · . Pn We then have f (x) = 0 and c(f ) = i=1 c(fi ) = h1i.  4.7. Lemma. (Emmanuel’s trick) Let B be a ring and A be a subring. Let A0 be the integral closure of A in B and s be an element of B which Pn annihilates a polynomial f (X) = k=0 ak X k ∈ A[X]. Pn Let g(X) = k=1 bk X k−1 be the polynomial f (X)/(X − s). 1. The elements bi and bi s are in A0 . 2. In A0 we obtain ha0 , . . . , an i = c(f ) ⊆ c(g) + c(sg) = hb1 , . . . , bn , b1 s, . . . , bn si . 3. In A0 [s] the two ideals are equal. 2 More scholarly or less scholarly, it is difficult to say. This is a matter of taste. §4. Coherent Prüfer rings 699 J Since f (X) = (X − s)g(X), Kronecker’s theorem tells us that the bi ’s and bi s’s are integral over A. We have bn = an , bn−1 = bn s + an−1 , . . . , b1 = b2 s + a1 , 0 = b1 s + a0 . Therefore each ai ∈ c(g) + c(sg) and, in A0 [s], step by step, we obtain bn ∈ c(f ), bn−1 ∈ c(f ), . . . , b1 ∈ c(f ).  4.8. Theorem. (Another characterization of coherent Prüfer rings, see also Exercises 15 and 16) A ring A is a coherent Prüfer ring if and only if it is a pp-ring, integrally closed in Frac A, and if every element of Frac A is primitively algebraic over A. J Suppose that A is a coherent Prüfer ring. It remains to show that every element of Frac A is primitively algebraic over A.  Let x= a/b ∈ Frac A. s u ∈ M2 (A), with There is a principal localization matrix for (b, a): v t s + t = 1, sa = ub and va = tb. This gives sx − u = 0 and t = vx. Thus, x annihilates the primitive polynomial −u + sX + X 2 (t − vX), or if we prefer t − (u + v)X + sX 2 . Let us prove the converse. It suffices to consider only the integral case. We need to show that every ideal ha, bi is locally principal. Suppose without loss of generality that a, b ∈ Reg(A). The element s = a/b annihilates a primitive polynomial f (X). Since c(f ) = h1i in A, by Lemma 4.7 (items 1 and 2 ), we have comaximal elements b1 , . . ., bn , b1 s, . . ., bn s in A. We then have s ∈ A[1/bi ] and 1/s ∈ A[1/(bi s)]: in each of the comaximal localizations, a divides b or b divides a.  The theorem that follows contains a new proof of the stability of the integral Prüfer rings by integral and integrally closed extension (see Theorem 3.5). It seems disconcertingly easy when compared to that given without the coherence hypothesis. 4.9. Theorem. If B is a normal pp-ring, and an integral extension of a coherent Prüfer ring A, then B is a coherent Prüfer ring. J Let us first consider the case where B is integral and nontrivial. Let s ∈ Frac B. It suffices to show that s is primitively algebraic over B. We have a nonzero polynomial f (X) ∈ A[X] such that f (s) = 0. Case where A is a Bézout domain. We divide f by c(f ) and we obtain a primitive polynomial which annihilates s. Case of a Prüfer domain. After localization at comaximal elements, the ideal c(f ) is generated by one of the coefficients of f , the first case applies. In the general case, the elementary local-global machinery of pp-rings brings us back to the integral case.  Now here is the analogue of Proposition III -8.17, which described the ring of integers of a number field. In the case where A is a Bézout domain, 700 XII. Prüfer and Dedekind rings we could have repeated almost word for word the same proofs. Also note that Theorem VI -3.18 studies a similar situation with a slightly weaker hypothesis. See also item 1 of Problem III -9. 4.10. Theorem. (Ring of integers in an algebraic extension) Let A be a coherent Prüfer ring, K = Frac(A), L ⊇ K be a reduced ring integral over K and B be the integral closure of A in L. 1. Frac B = L = (Reg A)−1 B and B is a coherent Prüfer ring. 2. If L is strictly finite over K and if A is strongly discrete, B is strongly discrete. If in addition L is étale over K, we obtain 3. If A is Noetherian, the same goes for B. 4. If A is a Dedekind ring (Definition 7.7), so is B. 5. If L = K[x] = K[X]/hf i with f ∈ A[X] monic and discX (f ) ∈ Reg A, 1 then ∆ A[x] ⊆ B ⊆ A[x] (∆ = discX (f )). 1 1 In particular A[x][ ∆ ] = B[ ∆ ]. 6. If in addition discX (f ) ∈ A× , we have B = A[x] strictly étale over A. J 1. Direct consequence of Fact VI -3.16 and of Theorem 4.9. 2. Since B is a Prüfer ring, it suffices to know how to test the divisibility in B, i.e. testing that an element of L is a member of B. Let y ∈ L and Q ∈ K[Y ] be its (monic) minimal polynomial over K. Then y is integral over A if and only if Q ∈ A[Y ]: in the non-immediate sense, let P ∈ A[Y ] be monic such that P (y) = 0, then Q divides P in K[Y ] and Lemma III -8.10 implies that Q ∈ A[Y ]. Note: we might as well have used the characteristic polynomial, but the proof that uses the minimal polynomial works in a more general framework (it suffices for L to be algebraic over K and for us to know how to compute the minimal polynomials). 5. In the case where A is a Bézout domain and L is a field, we apply Theorem VI -3.18. The result in the general case is then obtained from this proof by using the local-global machineries of pp-rings and of arithmetic rings. 3. We carry out the proof under the hypotheses of item 5. This is not restrictive because by Theorem VI -1.9, L is a product of monogenic étale K-algebras. Let b1 ⊆ b2 ⊆ · · · ⊆ bn ⊆ . . . be a sequence of finitely generated ideals of B that we write as bn = hGn iB with Gn ⊆ Gn+1 ; we define P  Ln = discX (f ) · g∈Gn Ag ⊆ A[x]. Then L1 ⊆ L2 ⊆ · · · ⊆ Ln ⊆ . . . is a sequence of finitely generated Asubmodules of A[x]. However, A[x] is a free A-module of finite rank (equal §5. pp-rings of dimension at most 1 701 to deg(f )), so Noetherian. We finish by noting that if Lm = Lm+1 , then bm = bm+1 . 4. Results from 2 and 3. 6. It is clear that B = A[x].  Remark. The previous theorem applies in two important cases in the history of commutative algebra. The first case is that of the rings of integers of number fields, with A = Z and B being the ring of integers of a number field (a case already examined in Section III -8). The second case is that of algebraic curves. Consider a discrete field k, the PID A = k[x] and a polynomial f (x, Y ) ∈ k[x, Y ] monic in Y , irreducible, with discY (f ) 6= 0. Let K = k(x). The ring A[y] = k[x, y] = k[x, Y ]/hf i is integral. The planar curve C of equation f (x, Y ) = 0 can have singular points, in which case A[y] is not arithmetic. But the integral closure B of A in K[y] = K[Y ]/hf i is indeed a Prüfer domain (Theorem 6.2). The field K[y] is called the field of functions of C. The ring B corresponds to a curve (which is no longer necessarily plane) without a singular point, with the same field of functions as C. 5. pp-rings of dimension at most 1 Most “classical” theorems regarding Dedekind domains are already valid for coherent Prüfer rings of dimension at most 1, or even for arithmetic rings. We prove a certain number of them in this and the following section. In this section the results relate to the pp-rings of dimension at most 1. The following theorem is a special case of Bass’ “stable range” for which we will give general versions (Theorems XIV -1.4 and XIV -2.6). 5.1. Theorem. Let n > 3 and t[ x1 · · · xn ] be a unimodular vector over a pp-ring A of dimension at most 1. This vector is the first column of a matrix of En (A). In particular, SLn (A) is generated by En (A) and SL2 (A) for n > 3. For n > 2 every unimodular vector is the first column of a matrix of SLn (A). J The annihilator of hx1 , . . . , xn i is null, so we can by elementary operations transform the vector v = t[ x1 · · · xn ] into a unimodular vector t [ y1 x2 · · · xn ], with y1 ∈ Reg(A) (cf. Lemma IV -6.4). Consider the ring B = A/hy1 i. This ring is zero-dimensional and the vector v becomes equal to t[ 0 x2 · · · xn ] still unimodular. Since n > 3, we can transform t[ x2 · · · xn ] into t[ 1 0 · · · 0 ] by elementary operations in B (Exercise IX -10). This gives in A: t[ y1 1 + ay1 z3 · · · zn ], hence, still by elementary operations, t[ y1 1 z3 · · · zn ], then t[ 1 0 · · · 0 ].  702 XII. Prüfer and Dedekind rings The following theorem generalizes the analogous result already obtained in number theory (Corollary V -3.2). Item 1 concerns the invertible ideals. Item 2 applies to all the finitely generated ideals of a coherent Prüfer ring of dimension at most 1. A generalization is proposed in Theorem XIII -3.4. 5.2. Theorem. (One and a half theorem) Let A be a pp-ring of dimension at most 1 and a be a locally principal ideal (thus finitely generated projective). 1. If a ∈ a ∩ Reg(A), there exists a b ∈ a such that a = han , bi for every n > 1. 2. There exists an a ∈ a such that Ann(a) = Ann(a). For such an a there exists a b ∈ a such that a = han , bi for every n > 1. J The proof of item 1 is identical to that of Corollary V -3.2 which gave the result in number theory. 2. Every finitely generated ideal a contains an element a such that Ann(a) = Ann(a) (Corollary IV -6.5). We pass to the quotient A/h1 − ei where e is the idempotent such that Ann(a) = Ann(e) and we apply item 1.  5.3. Proposition. Let A be a pp-ring of dimension at most 1, whose Jacobson radical contains a regular element, and a be an invertible ideal. Then a is principal. J Let y ∈ Rad(A) and x ∈ a both be regular. Then a ∩ Rad(A) contains a = xy which is regular. By the one and a half theorem, there exists a z ∈ a such that a = a2 , z . Therefore a = ua2 + vz which gives a(1 − ua) = vz and since a ∈ Rad(A), a ∈ hzi so a = hzi.  We now revisit the following classical result, in which we will get rid of the Noetherian hypothesis: if A is an integral Noetherian ring of dimension at most 1 and a, b are two ideals with a invertible and b 6= 0, then there exists a u ∈ Frac(A) such that u a ⊆ A and ua + b = h1i. 5.4. Lemma. Let A be a pp-ring (for example a coherent Prüfer ring) of dimension at most 1. Let a be an invertible ideal of A and b be an ideal containing a regular element. Then there exists an invertible element u in Frac(A) such that ua ⊆ A and ua + b = h1i. J We carry out the proof in the integral case, leaving it to the readers to apply the elementary local-global machinery of pp-rings. To facilitate this task, we do not assume A to be nontrivial and we put “regular” when in the nontrivial case we would have put “nonzero.” We look for a and b regular such that ab a ⊆ A, i.e. b a ⊆ aA, and A = ab a+b. If c is a regular element of b, as the condition should also be realized when b is the ideal cA, we must find a and b regular such that b a ⊆ aA and A = ab a + cA. If steps are taken so that a ∈ a, we will have b ∈ ab a, and it §5. pp-rings of dimension at most 1 703 therefore suffices to realize the conditions b a ⊆ aA and A = hb, ci. This is what we will do. Let c ∈ a ∩ b be a regular element (for example the product of two regular elements, one in a and the other in b). By the one and a half theorem, there exists an a ∈ a such that a = a, c2 = ha, ci. If a = 0 the ideal a = hci is idempotent therefore equal to h1i and there was therefore no need to overexert ourselves:3 we could have chosen b = a = 1. We therefore suppose that a is regular. Since c ∈ a, we have an equality c = αa + βc2 which gives c(1 − βc) = αa. Let b = 1 − βc such that A = hb, ci. We obtain b a = b ha, ci = hba, bci = a hb, αi ⊆ aA. If b is regular we therefore have won, and if b = 0, then 1 ∈ hci and there was no need to tire ourselves.  5.5. Proposition. Let a be an invertible ideal of an integral ring A of dimension at most 1. For every nonzero ideal b of A, we have an isomorphism of A-modules a/ab ' A/b. J By Lemma 5.4, there exists an integral ideal a0 in the class4 of A÷a such that a0 + b = A; we have aa0 = xA with x ∈ Reg A. The multiplication by x, µx : A → A, induces an isomorphism ∼ A/b −→ xA/xb = a0 a/a0 ab. Let us now consider the canonical map f : a0 a → a/ab which associates to y ∈ a0 a ⊆ a the class of y modulo ab. Let us show that f is surjective: indeed, a0 + b = A ⇒ a0 a + ab = a, so every element of a is congruent to an element of a0 a modulo ab. Let us finally examine Ker f = a0 a ∩ ab. Since a is invertible, a0 a ∩ ab = a(a0 ∩ b), and finally a0 + b = A entails that a0 ∩ b = a0 b, so Ker f = a0 ab. We thus have isomorphisms of A-modules A/b ' xA/xb = a0 a/a0 ab ' a/ab, hence the result.  5.6. Corollary. Let A be an integral ring with Kdim A 6 1, a be an invertible ideal and b be a nonzero ideal. We then have an exact sequence of A-modules 0 → A/b → A/ab → A/a → 0. 3 Note however that we are not supposed to know in advance if an invertible ideal of A contains 1, therefore we have not tired ourselves entirely for nothing, the computation has told us that 1 ∈ a. 4 See page 571. 704 XII. Prüfer and Dedekind rings 5.7. Lemma. (Jacobson radical of a domain of dimension at most 1) Let A be an integral ring of dimension at most 1. √ 1. For every nonzero a in A we have Rad(A) ⊆ A aA. 2. For finitely generated b containing Rad(A), we have  Rad(A) = b Rad(A) : b . 3. If Rad(A) is an invertible ideal, A is a Bézout domain. J Let a = Rad(A). 1. Let x ∈ a. The ring A/hai is zero-dimensional, so there exist y, z ∈ A × and m ∈ N such that xm (1+xz) √ = ay. As x ∈ Rad(A), we have 1+xz ∈ A , A m therefore x ∈ aA and x ∈ aA. 2. If a = 0 it is clear, otherwise the ring A/a is reduced zero-dimensional, so the finitely generated ideal b is equal to an ideal hei modulo a, with e idempotent modulo a. Therefore b = b + a = a + hei, then (a : b) = a + h1 − ei, and finally b(a : b) = (a + hei)(a + h1 − ei) = a. 3. Let c1 be a nonzero finitely generated ideal. We define b1 = c1 + a and c2 = (c1 : b1 ). By item 2 since a is invertible, so is b1 . If b1 b0 = hbi (b is regular), all the elements of c1 b0 are divisible by b. We then consider d = 1b c1 b0 , therefore db1 = c1 and d is finitely generated. Clearly we have d ⊆ c2 . Conversely, if xb1 ⊆ c1 then bx = xb1 b0 ⊆ bd, so x ∈ d. In short c2 = d and we have established the equality b1 c2 = c1 , with c2 finitely generated. By iterating the procedure we obtain an ascending sequence of finitely generated ideals (ck )k∈N with ck+1 = (ck : bk ) and bk = ck + a. Actually c2 = c1 : (c1 + a) = (c1 : a), then c3 = (c2 : a) = (c1 : a2 ) and more generally ck+1 = (c1 : ak ). √ Let a 6= 0 in c1 . By item √ 1, a ⊆ aA. However, a is finitely generated, therefore the inclusion a ⊆ aA implies that for a certain k, ak ⊆ aA ⊆ c1 , therefore ck+1 = h1i. Qk When ck+1 = h1i, we have c1 = i=1 bi , which is invertible as a product of invertible ideals. We have shown that every nonzero finitely generated ideal is invertible, so the ring is a Prüfer domain, and by Proposition 5.3 it is a Bézout ring.  6. Coherent Prüfer rings of dimension 6 1 When a Prüfer ring is a Bézout ring We now generalize a classical result often formulated as follows:5 an integral Dedekind ring having a finite number of maximal ideals is a PID. 5 See the constructive definition of a Dedekind ring on page 710. §6. Coherent Prüfer rings of dimension at most 1 705 6.1. Theorem. Let A be a coherent Prüfer ring of dimension at most 1 and whose Jacobson radical contains a regular element. Then A is a Bézout ring. J Let b be a finitely generated ideal. There exists a b ∈ b such that Ann b = Ann b = hei with e idempotent. Then a = b + hei contains the regular element b + e: it is invertible and b = (1 − e)a. It suffices to show that a is principal. This results from Proposition 5.3.  The previous theorem and the following are to be compared with Theorem XI -3.12 which affirms that a GCD-domain of dimension at most 1 is a Bézout ring. An important characterization The result given in Theorem 6.2 below is important: the three computational machineries of normality, coherence and dimension at most 1 combine to provide the machinery of principal localization of finitely generated ideals. 6.2. Theorem. A normal, coherent ring A of dimension at most 1 is a Prüfer ring. J Let us start by noticing that (A ÷ ab) = (A ÷ a) ÷ b. Since A is a pp-ring, it suffices to treat the integral case and to finish with the elementary local-global machinery of pp-rings. We therefore suppose that A is a domain and we show that every finitely generated ideal a containing a regular element is invertible. Let us consider (A ÷ a) ∈ Ifr A and b = a(A ÷ a), which is a finitely generated (integral) ideal of A; we want to show that b = A. Let us first show that A ÷ b = A. Let y ∈ A ÷ b, hence y(A ÷ a) ⊆ (A ÷ a). Since A ÷ a is a faithful module (it contains 1) and is finitely generated, y is integral over A (see Fact III -8.2) so y ∈ A because A is normal. By induction, by using A ÷ bk+1 = (A ÷ b) ÷ bk , we obtain A ÷ bk = A for every k > 1. Let us fix a regular element x ∈ b. By Lemma XI -3.10, there exists a k ∈ N? such that b0 := hxi + bk is invertible. Consequently b0 (A ÷ b0 ) = A. Finally, as bk ⊆ b0 ⊆ b, we have A ÷ b0 = A, hence b0 = A then b = A.  Example. Other than the example of the valuation rings given on page 689, which can have an arbitrary Krull dimension, there are other natural examples of Prüfer domains which are not of dimension 6 1. The ring of integer-valued polynomials is the subring of Q[X] formed by the polynomials f (X) such that f (x) ∈ Z for all x ∈ Z. We easily show thatit is a free Z-module admitting as its basis the combinatorial polynomials nx for  n ∈ N. The ideal generated by the nx ’s for n > 1 is not finitely generated. 706 XII. Prüfer and Dedekind rings One can show that an integer-valued polynomial can be evaluated at an arbitrary p-adic integer, which provides an uncountable set of prime ideals. This ring is a Prüfer domain of dimension two, but the proof of this result is not simple, especially if we ask that it be constructive. On this subject see [67, Ducos] and [127, Lombardi]. The structure of finitely presented modules 6.3. Theorem. Let A be a coherent Prüfer ring of dimension at most 1. Every projective module M of constant rank k > 1 is isomorphic to Ak−1 ⊕ a, where a is an invertible ideal. In particular, it is generated by k + 1 elements. Vk Finally, since a ' M , the isomorphism class of M as an A-module determines that of a. J By Theorem 4.5, M is a direct sum of k invertible ideals. It therefore suffices to treat the case M ' a ⊕ b, with invertible ideals a and b. By Lemma 5.4, we can find an ideal a1 such that a1 ' a (as A-modules) and a1 + b = h1i (as ideals). We then have the short exact sequence δ σ h0i −→ a1 b = a1 ∩ b −→ a1 ⊕ b −→ a1 + b = A −→ h0i , where δ(x) = (x, −x) and σ(x, y) = x + y. Finally, since this sequence is split, we obtain M ' a ⊕ b ' a1 ⊕ b ' A ⊕ (a1 ∩ b) = A ⊕ (a1 b).  An immediate consequence is the following structure theorem. 6.4. Corollary. Let A be a coherent Prüfer ring of dimension at most 1. Every finitely generated projective module is isomorphic to a direct sum r1 A ⊕ r2 A2 ⊕ · · · ⊕ rn An ⊕ a, where the ri ’s are orthogonal idempotents (some can be null) and a is a finitely generated ideal. 6.5. Proposition. Let A be a zero-dimensional arithmetic ring. Every matrix admits a reduced Smith form. Consequently every finitely presented A-module is isomorphic to a direct sum of cyclic modules A/hak i. J If A is local, it is a local Bézout ring and the matrix admits a reduced Smith form (Proposition IV -7.2), which gives the result. By following the proof of the local case, and by applying the local-global machinery of arithmetic rings (page 461), we produce a family of comaximal elements (s1 , . . . , sr ) such that the result is guaranteed over each ring A[1/si ]. Since A is zero-dimensional, every principal filter is generated by an idempotent (Lemma IV -8.2 2). Consider the idempotents ei corresponding to the si ’s, then a fundamental system of orthogonal idempotents (rj ) such that each ei is a sum of certain rj ’s. Q The ring is written as a finite product Aj with the Smith reduction over each Aj . The result is therefore guaranteed.  §6. Coherent Prüfer rings of dimension at most 1 707 Remarks. For the uniqueness of the decomposition, see Theorem IV -5.1. Moreover, the proof shows that the reduction can be done with products of elementary matrices. Finally, a generalization is proposed in Exercise 17. 6.6. Corollary. Let A be an arithmetic ring of dimension at most 1. Every finitely presented torsion A-module is isomorphic to a direct sum of cyclic modules A/hb, ak i with b ∈ Reg(A). J The module is annihilated by an element b ∈ Reg(A). We consider it as an A/hbi-module and we apply Proposition 6.5.  We can now synthesize Theorems 6.3 and 4.5, and Corollary 6.6 as follows. We leave it up to the reader to give the statement for the pp-ring case (i.e. for coherent Prüfer rings). 6.7. Theorem. (Theorem of the invariant factors) Over a Prüfer domain A of dimension at most 1, every finitely presented module is a direct sum • of a finitely generated projective A-module, null or of the form Ar ⊕ a (r > 0, a an invertible ideal), • and of its torsion submodule, which is isomorphic to a direct sum of cyclic modules A/hb, ak i with b ∈ Reg(A). In addition • the ideal a is uniquely determined by the module, • we can assume that the ideals hb, ak i are totally ordered with respect to the inclusion relation, and the decomposition of the torsion submodule is then unique in the precise sense given in Theorem IV -5.1. Remarks. 1) In particular, the structure theorem for finitely presented modules over a PID (Proposition IV -7.3) is valid for every Bézout domain of dimension at most 1. 2) For a torsion module M , the ideals hb, ak i of the previous theorem are the invariant factors of M , in accordance with the definition given in Theorem IV -5.1. Reduction of matrices The following theorem gives a reduced form for a column matrix, à la Bézout. It would be interesting to generalize it to an arbitrary matrix. 708 XII. Prüfer and Dedekind rings 6.8. Theorem. Let A be a coherent Prüfer ring of dimension at most 1 and x1 , . . . , xn ∈ A. There exists a matrix M ∈ GLn (A) such that M t[ x1 · · · xn ] = t[ y1 y2 0 · · · 0 ]. J It suffices to treat the case where n = 3. If e is an idempotent, then GLn (A) ' GLn (Ae ) × GLn (A1−e ): even if it entails localizing by inverting both the annihilating idempotent of hx1 , x2 , x3 i and its complement, we can therefore assume that Ann(hx1 , x2 , x3 i) = h0i. Let A be a principal localization matrix for (x1 , x2 , x3 ). The module K = Im(I3 − A) is the kernel of linear form associated with the row vector X = [ x1 x2 x3 ] and it is a projective module of rank 2 as a direct summand in A3 . Theorem 6.3 tells us that K contains a free submodule of rank 1 as a direct summand in A3 , that is a module Av where v is a unimodular vector of A3 . By Theorem 5.1, this vector is the last column of an invertible matrix U ; the last coefficient of XU is null and the matrix M = tU is the matrix we were looking for.  7. Factorization of finitely generated ideals General factorizations In a general arithmetic ring it seems that we do not have any factorization results that go beyond what stems from the fact that the invertible ideals (i.e. the finitely generated ideals containing a regular element) form a GCD-monoid, and more precisely the non-negative submonoid of an l-group. For example the Riesz theorem can be reread as follows. 7.1. Theorem. (Riesz theorem for arithmetic rings) Let A be an arithmetic ring, (ai )i∈J1..nK and (bj )j∈J1..mK be invertible Qn Qm ideals such that i=1 ai = j=1 bj . Then there exist invertible ideals (ci,j )i∈J1..nK,j∈J1..mK such that we have for all i and all j, Qm Qn ai = j=1 ci,j and bj = i=1 ci,j . Factorizations in dimension 1 7.2. Theorem. In a coherent Prüfer ring of dimension at most 1, we consider two finitely generated ideals a and b with a invertible. Then we can write a = a1 a2 with a1 + b = h1i and bn ⊆ a2 , for some suitable integer n. This expression is unique and we have a1 + a2 = h1i , a2 = a + bn = a + bn+1 . §7. Factorization of finitely generated ideals 709 J This is a special case of Lemma XI -3.10.  Remark. We do not need to assume that the ideals are detachable. 7.3. Theorem. We consider in a coherent Prüfer ring of dimension at most 1 some pairwise comaximal finitely generated ideals p1 , . . ., pn , and an invertible ideal a. We can write a = a0 · a1 · · · an with the pairwise comaximal finitely generated m ideals a0 , . . ., an and, for j > 1, pj j ⊆ aj with mj as the suitable integer. mj This expression is unique and we have aj = a + pj 1+mj = a + pj . J By induction by using Theorem 7.2 with b ∈ {p1 , . . . , pn }.  Prüfer rings admitting partial factorizations Let us re-express the definition of partial decompositions (given for l-groups) in the framework of the monoid of invertible ideals of a coherent Prüfer ring A (this is the non-negative submonoid of the l-group formed by the invertible elements of Ifr(A)). 7.4. Definition. Let F = (a1 , . . . , an ) be a finite family of invertible ideals in a ring A. We say that F admits a partial factorization if there exists a family P = (p1 , . . . , pk ) of pairwise comaximal invertible ideals such m m that every ideal aj can be written in the form: aj = p1 1j · · · pk kj (certain mij ’s can be null). We then say that P is a partial factorization basis for the family F . For the monoid Ifr(A) to be discrete we need to assume that A is strongly discrete. This leads to the following definition. 7.5. Definition. A ring is called a partial factorization Prüfer ring if it is a strongly discrete coherent Prüfer ring6 and if every finite family of invertible ideals admits a partial factorization. 7.6. Lemma. most 1. A partial factorization Prüfer ring is of dimension at J We consider a regular element y. We want to show that A/hyi is zerodimensional. For this we take a regular x and we want to find a ∈ A and n ∈ N such that xn (1 − ax) ≡ 0 mod y. The partial factorization of (x, y) gives β γ1 γi δ1 δk αi β1 j 1 hxi = pα 1 · · · pi q1 · · · qj = ab, and hyi = p1 · · · pi h1 · · · hk = cd 6 By Proposition 1.5 an arithmetic ring is strongly discrete if and only if the divisibility relation is explicit. 710 XII. Prüfer and Dedekind rings with all the exponents > 0. There exists an n > 0 such that an is a multiple of c which gives hxn i = cg. As hxi + d = 1, there exists some a ∈ A such that 1 − ax ∈ d. We therefore have hyi = cd ⊇ cgd = hxn i d ⊇ hxn (1 − ax)i, i.e. xn (1 − ax) ≡ 0 mod y.  Dedekind rings 7.7. Definition. We call a strongly discrete and Noetherian coherent Prüfer ring a Dedekind ring. A Dedekind domain is an integral Dedekind ring (or yet again a connected Dedekind ring). 7.8. Theorem. A Dedekind ring is a partial factorization Prüfer ring, so of dimension at most 1. J Theorem XI -2.16 gives the partial factorization result in the framework of distributive lattices and we finish with Lemma 7.6.  7.9. Theorem. (Characterizations of Dedekind rings) For some ring A the following properties are equivalent. 1. A is a Dedekind ring. 2. A is an arithmetic, Noetherian, pp-ring with explicit divisibility. 3. A is a normal pp-ring of dimension at most 1, with explicit divisibility, which is coherent and Noetherian. J Since A is a coherent Prüfer ring if and only if it is arithmetic and a pp-ring, and since an arithmetic ring is strongly discrete if and only if it is with explicit divisibility, items 1 and 2 are equivalent. The implication 1 ⇒ 3 results from Theorem 7.8, and Theorem 6.2 gives the converse (it simply suffices to add strongly discrete and Noetherian in the hypothesis and the conclusion).  7.10. Definition. Let a be an ideal of a ring A. We say that a admits mk 1 a total factorization if it is of the form a = pm (mi > 0, k > 0) 1 · · · pk where ideals pi are detachable, strict and maximal (in other words, each ring A/pi is a nontrivial discrete field). 7.11. Theorem and definition. (Total factorization Dedekind ring) For a nontrivial strongly discrete pp-ring A, the following properties are equivalent. 1. Every principal ideal hai = 6 h1i with a ∈ Reg A admits a total factorization. 2. The ring A is a Dedekind ring, and every invertible ideal 6= h1i admits a total factorization. §7. Factorization of finitely generated ideals 711 Such a ring is called a total factorization Dedekind ring. J We need to show that 1 implies 2. We treat the integral case (the pp-ring case is then easily deduced). We refer to Exercise III -22 and its solution. We see that every finitely generated ideal containing a regular element is invertible, and that it admits a total factorization. Theorem 4.1 then tells us that A is a coherent Prüfer ring. It remains to see that it is Noetherian. Consider a finitely generated mk 1 ideal and its total factorization a = pm 1 · · · pk . Every finitely generated nk n1 ideal b ⊇ a is of the form p1 · · · pk with all the ni ∈ J0..mi K. Every ascending sequence of finitely generated ideals starting with a therefore admits two consecutive equal terms.  Remark. Exercise III -22 uses no complex theoretical paraphernalia. So it is possible to expose the theory of Dedekind rings by starting with the previous theorem, which promptly leads to the essential results. The main drawback of this approach is that it is based on a total factorization property which is not generally satisfied from a constructive point of view, even by the PIDs, and which does not generally extend to the integral extensions. Recall that we have already established Theorem 4.10 regarding the finite extensions of Dedekind rings. We can add the following more precise result. 7.12. Theorem. (A computation of integral closure) Let A be a Dedekind ring, K = Frac(A), L ⊇ K be an étale K-algebra and B be the integral closure of A in L. Suppose that L = K[X]/hf i with monic f ∈ A[X] and discX (f ) ∈ Reg A (which is not really restrictive). If hdiscX (f )i admits a total factorization, and if for each maximal ideal m of this factorization, the residual field A/m is perfect, then B is a finitely generated projective A-module. J As A is a pp-ring, it suffices to treat the case where A is integral (elementary local-global machinery of pp-rings), so K is a discrete field. The hypothesis L = K[X]/hf i with monic f ∈ A[X] and discX (f ) ∈ Reg A is not really restrictive because by Theorem VI -1.9, L is a product of monogenic étale K-algebras. We can even suppose that L is an étale field over K (elementary local-global machinery of reduced zero-dimensional rings). Let ∆ = discX (f ). By item 5 of Theorem 4.10 we have the inclusions 1 A[x] ⊆ B ⊆ ∆ A[x]. 1 Thus B is a submodule of the finitely generated A-module ∆ A[x]. By Theorem 4.5, if B is finitely generated, it is finitely generated projective. 1 1 We have A[x, ∆ ] = B[ ∆ ], so B is finitely generated after localization 712 XII. Prüfer and Dedekind rings at ∆N . It remains to show that B is finitely generated after localization at S = 1 + ∆A. The ring AS is a Bézout ring (Theorem 6.1). If p1 , . . . , pr are the maximal ideals that intervene in the total factorization of ∆, the monoids 1 + pi are comaximal in AS , and it suffices to show that B is finitely generated after localization at each of the 1 + pi . We are thus brought back to the case treated in Lemma 7.13 that follows.  Note that a local Dedekind domain V is just as much a strongly discrete Noetherian valuation domain, as a local PID with detachable V× . The following lemma in addition requires that the radical be principal (which is automatic in classical mathematics). In this case we will also say that V is a discrete valuation ring or a DVR, according to the classical terminology; and any generator of Rad V is called a regular parameter. 7.13. Lemma. Let V be a local Dedekind domain with Rad V = pV and with perfect residual field k = V/hpi. Let f ∈ V[X] be an irreducible monic, therefore ∆ = discX (f ) ∈ Reg V. Let K = Frac(V), L = K[x] = K[X]/hf i, and W be the integral closure of V in L. Then W is finitely generated over V. J Since k is perfect, by Lemma VI -1.16, for every monic polynomial fi of V[X] we know how to compute the “squarefree subset” of fi (fi taken modulo p), i.e. a separable polynomial gi in k[X] which divides fi , and whose power is a multiple of fi . The strategy is to add some elements xi ∈ W to V[x] until we obtain a ring W0 whose radical is an invertible ideal. When this is realized, we know by Lemma 5.7 that W0 is a Prüfer domain, therefore that it is integrally closed, thus equal to W. To “construct” W0 (finitely generated over V) we will use in an induction the following fact, initialized with W1 = V[x] (x1 = x, r1 = 1). Fact. Let Wk = V[x1 , . . . , xrk ] ⊆ W, then Rad(Wk ) = p, g1 (x1 ), . . . , gk (xrk ) , where gi is the squarefree subset of fi and fi is the minimal polynomial over K of the integer xi . Theorem IX -1.8 states that Rad(Wk ) = DWk (pWk ). This ideal is the inverse image of DWk /pWk (0) and we have Wk /pWk = k[x1 , . . . , xrk ]. As the gi (xi )’s are nilpotent modulo p by construction, they are in the nilradical DWk (pWk ). Now it suffices to verify that the k-algebra  k[x1 , . . . , xrk ] g1 (x1 ), . . . , grk (xrk ) 1 is reduced. Actually Wk is a finitely generated V-submodule of ∆ V[x], therefore is free finite over V. Consequently Wk /pWk is strictly finite over k, and it is étale because it is generated by some elements that annihilate separable polynomials over k (Theorem VI -1.7).  Exercises and problems 713 Given this, since W is a Prüfer domain, we know how to invert the finitely generated ideal Rad(Wk ) in W. This means computing some elements xrk +1 , . . . , xrk+1 of W and a finitely generated ideal gk in the new ring Wk+1 such that the ideal gk Rad(Wk ) is principal (and nonzero). However, it is possible that the generators of Rad(Wk ) do not generate the ideal Rad(Wk+1 ) of Wk+1 , which forces an iteration of the process. The ascending sequence of Wk ’s is an ascending sequence of finitely genera1 ted V-modules contained in ∆ V[x], therefore it admits two equal consecutive terms. In this case we have reached the required goal.  7.14. Concrete local-global principle. (Dedekind rings) Let s1 , . . ., sn be comaximal elements of a ring A. Then 1. The ring A is strongly discrete Noetherian coherent if and only if each of the Asi ’s is strongly discrete Noetherian coherent. 2. The ring A is a Dedekind ring if and only if each of the Asi ’s is a Dedekind ring. J We already know that the concrete local-global principle works for the Prüfer rings and for the coherent rings with comaximal monoids. The same goes for the rings or Noetherian modules (a proof is given with the local-global principle XV -2.2). It remains to examine the “strongly discrete” property in the case of comaximal elements. Let a be a finitely generated ideal and x ∈ A. It is clear that if we have a test for x ∈ aAsi for each of the si ’s, this provides a test for x ∈ aA. The difficulty is in the other direction: if A is strongly discrete and if s ∈ A, then A[1/s] is strongly discrete. It is not true in general, but it is true for the Noetherian coherent rings. Indeed, the membership x ∈ aA[1/s] is equivalent to x ∈ (a : s∞ )A . However, the ideal (a : s∞ )A is the union of the ascending sequence of finitely generated ideals (a : sn )A , and as soon as (a : sn )A = (a : sn+1 )A , the sequence becomes constant.  Exercises and problems Exercise 1. (Another “determinant trick”) Let E be a faithful A-module generated by n elements and a ⊆ b be two ideals of A satisfying aE = bE. Show that abn−1 = bn . 714 XII. Prüfer and Dedekind rings Exercise 2. (Principal localization matrices in M2 (A)) Let x, y ∈ A. 1. Show that the ideal hx, yi is locally principal if and only if there exists a e is a matrix B ∈ M2 (A) of trace 1 satisfying [ x y ]B = 0; in this case, A = B principal localization matrix for (x, y). 2. Let z ∈ A; suppose that there exists an ideal b such that hx, yi b = hzi. Show  that there exists a B ∈ M2 (A) such that z[x y ]B = 0 and z 1 − Tr(B) = 0. 3. Deduce from the previous questions another proof of Lemma 3.3. Exercise 3. (A is arithmetic ⇔ A(X) is a Bézout ring ) See also Exercise XVI -5. Let A be a ring and A(X) be the Nagata ring. 1. Show that for a, b ∈ A, a | b in A if and only if a | b in A(X). 2. If A is an arithmetic ring and f ∈ A[X], we have in A(X) hf i = cA (f )A(X). Also show that A(X) is a Bézout ring. 3. Let x, y ∈ A. Show that if hx, yi is locally principal in A(X), it is locally principal in A (use Exercise 2). In particular, if A(X) is arithmetic, the same goes for A. A fortiori, if AhXi is arithmetic, the same goes for A. 4. Conclude the result. Note. Concerning the ring A(X) see Fact IX -6.7 and Exercise IX -20. Exercise 4. (A few other characteristic properties of arithmetic rings) For any ring A, the following properties are equivalent. (1) The ring A is an arithmetic ring. (2.1) For all ideals a, b and c we have a ∩ (b + c) = (a ∩ b) + (a ∩ c). (2.2) As above but limiting ourselves to the principal ideals. (2.3) As above but limiting ourselves to the case b = hxi, c = hyi and a = hx + yi . (3.1) For all ideals a, b and c we have a + (b ∩ c) = (a + b) ∩ (a + c). (3.2) As above but limiting ourselves to the principal ideals. (3.3) As above but limiting ourselves to the case a = hxi, b = hyi and c = hx + yi . (4.1) For all finitely generated ideals a, b and c we have (b+c) : a = (b : a)+(c : a). (4.2) As above with principal ideals b and c, and a = b + c. (5.1) For every ideal a and all the finitely generated ideals b and c we have the equality a : (b ∩ c) = (a : b) + (a : c). (5.2) As above with principal ideals b and c, and a = b ∩ c. Hint: to prove that the conditions are necessary we use the general method explained on page 461. Exercise 5. Prove in classical mathematics that a ring is normal if and only if it becomes normal when we localize at an arbitrary prime ideal (recall that in the integral case, normal means integrally closed in its quotient field). Exercises and problems 715 Exercise 6. (Algebraic closure: a theorem due to Zariski) Let K ⊆ L be two discrete fields, K0 be the algebraic closure of K in L. Then the algebraic closure of K(X1 , . . . , Xn ) in L(X1 , . . . , Xn ) is K0 (X1 , . . . , Xn ); an analogous result holds if we replace algebraic closure by separable algebraic closure. Exercise 7. (A lack of integrality by scalar extension) Let k be a discrete field of characteristic p > 3, a ∈ k and f = Y 2 −f (X) ∈ k[X, Y ] with f (X) = X p − a. 1. Show that Y 2 − f (X) is absolutely irreducible, that is that for every overfield k0 ⊇ k, the polynomial Y 2 − f (X) is irreducible in k0 [X, Y ]. Let k[x, y] = k[X, Y ]  Y 2 − f (X) and k(x, y) = Frac(k[x, y]). 2. Show that k is algebraically closed in k(x, y) and that for every algebraic extension k0 of k, we have k0 ⊗k k(x, y) = k0 (x, y). 3. Suppose that a ∈ / kp . Show that k[x, y] is integrally closed and that k(x, y) is not a field of rational fractions with one indeterminate over k. 4. Suppose a ∈ kp (for example a = 0). Show that k[x, y] is not integrally closed and explicate t ∈ k(x, y) such that k(x, y) = k(t). Exercise 8. (The ring of functions over the projective line minus a finite number of points) We informally use in this exercise the notions of an affine scheme and of a projective line which have already been discussed in Sections VI -3 and X -4 (see pages 556 to 559). If k is a discrete field, the k-algebra of polynomial functions defined over the affine line A1 (k) is k[t]. If we think of A1 (k) ∪ {∞} = P1 (k), the elements of k[t] are then the rational fractions over P1 (k) which are “defined everywhere, except maybe at ∞.” Let t1 , . . . , tr be points of this affine line (we can have r = 0). We equip A1 (k) \ {t1 , . . . , tr } (affine line minus r points) with a structure of an affine variety by forcing the invertibility of the t − ti ’s, i.e. by defining B = k t, (t − t1 )−1 , . . . , (t − tr )−1 ' k[t, x]/hF (t, x)i ,   with F (t, x) = (t − t1 ) · · · (t − tr ) · x − 1. This k-algebra B then appears as the algebra of rational fractions over P1 (k) defined everywhere except at the points ∞ and ti . It is an integrally closed ring and even a Bézout ring (indeed, it is a localized ring of k[t]). Analogously, for n points t1 , . . . , tn of the affine line (with n > 1 this time), we can consider the k-algebra A = k (t − t1 )−1 , . . . , (t − tn )−1 ⊆ k(t).   This ring A is a localized ring of k[(t − t1 )−1 ] (which is isomorphic to k[X]) since  by letting v = (t − t1 )−1 , we have t − ti = (t1 − ti )v + 1 /v. So,  A = k v, (t1 − t2 )v + 1 −1 , . . . , (t1 − tn )v + 1 −1  ⊆ k(v) = k(t). The k-algebra A is therefore an integrally closed ring (and even a Bézout domain). 716 XII. Prüfer and Dedekind rings By letting p(t) = (t − t1 ) · · · (t − tn ), we easily have the equality A = k[1/p, t/p, . . . , tn−1 /p]. The k-algebra A, constituted of rational fractions u/ps with deg(u) 6 ns, appears as that of rational fractions defined everywhere over P1 (k) (including at the point t = ∞) except eventually at the points ti . In short, we can agree that A is the k-algebra of the “functions” defined over the projective line minus the points t1 , . . . , tn . We study in this exercise a more general case where p is a monic polynomial of degree n > 1. Let k be a discrete field and p(t) = tn + an−1 tn−1 + · · · + a1 t + a0 ∈ k[t] (n > 1), where t is an indeterminate. Let xi = ti /p. Show that the integral closure of k[x0 ] in k(t) is the k-algebra A = k[x0 , . . . , xn−1 ] = { u/ps | s ∈ N, u ∈ k[t], deg(u) 6 ns } . In addition, Frac(A) = k(t). Exercise 9. (A presentation of the algebra of functions over the projective line minus a finite number of points) The context is that of Exercise 8, but this time k is an arbitrary ring. Let p = an tn + · · · + a1 t + a0 ∈ k[t] be a monic polynomial (an = 1) and A = k[1/p, t/p, . . . , tn−1 /p]. Let xi = ti /p for i ∈ J0..n − 1K. We can write A = k[X]/a where (X) = (X0 , . . . , Xn−1 ) and a is the ideal of the relators between (x0 , . . . , xn−1 ). It will be convenient to define xn by xn = tn /p; we therefore have xj = x0 tj and Pn i=0 ai xi = 1 or yet xn = 1 − Pn−1 i=0 ai xi . The equality on the right-hand side proves that xn ∈ A. 1. Prove that the following family R gives relators between the xj ’s. R : xi xj = xk x` for i + j = k + `, We define the subfamily Rmin with Rmin : n(n−1) 2 0 6 i, j, k, ` 6 n. relators. xi xj = xi−1 xj+1 , 1 6 i 6 j 6 n − 1. 2. Show that the family Rmin (so R also) generates the ideal of the relators between the xi ’s for i ∈ J0..n − 1K. In other words, if we let ϕ : k[X] → k[t, 1/p] be the morphism defined by Xi 7→ xi for i ∈ J0..n − 1K, this means that Ker ϕ is generated by Xi Xj − Xi−1 Xj+1 , 16i6j 6n−1 (with Xn := 1 − Pn−1 i=0 ai Xi ). You may use the k-module k[X0 ] ⊕ k[X0 ]X1 ⊕ · · · ⊕ k[X0 ]Xn−1 . Exercise 10. (Emmanuel’s trick) Give a direct proof of item 1 of Lemma 4.7 without using Kronecker’s theorem. Exercises and problems 717 Exercise 11. (Another proof of Kronecker’s theorem) Consider the polynomials f (T ) = a0 T n + · · · + an , g(T ) = b0 T m + · · · + bm and h(T ) = f (T )g(T ) = c0 T n+m + · · · + cn+m . Kronecker’s theorem III -3.3 affirms that each product ai bj is integral over the ring A = Z[c0 , . . . , cn+m ]. It suffices to treat the case where the ai ’s and bj ’s are indeterminates. Then in a ring containing Z[a0 , . . . , an , b0 , . . . , bm ] we have f (T ) = a0 (T − x1 ) · · · (T − xn ), g(T ) = b0 (T − y1 ) · · · (T − ym ). 1. By using Emmanuel’s trick (Lemma 4.7, with the proof given in Exercise 10, independent of Kronecker’s Q Q theorem), show that for all I ⊆ J1..nK, J ⊆ J1..mK, the product a0 b0 i∈I xi j∈J yj is integral over A. 2. Conclude the result. Exercise 12. (Intermediary ring A ⊆ B ⊆ Frac(A), Bézout case) Let A be a Bézout domain, K be its quotient field and B be an intermediary ring A ⊆ B ⊆ K. Show that B is a localized ring of A (therefore a Bézout ring). Exercise 13. (Intermediary ring, Prüfer case) In this exercise we generalize the result of Exercise 12 in the case where A is a Prüfer domain and we detail Theorem 3.6. This is therefore a variation around the Grell-Noether theorem (page 694). 1. Let x ∈ K = Frac A. a. Show that there exists an s ∈ Reg(A) such that sx ∈ A and 1 − s ∈ Ax. b. Let t ∈ A such that tx = 1 − s. For every intermediary ring A0 between A and K, show that A0 [x] = A0s ∩ A0t . In particular, A[x] = As ∩ At . Consequently, A[x] is integrally closed, and it is a Prüfer domain. 2. Show that every finitely generated A-subalgebra B of K is the intersection of a finite number of localized rings of A of the form As with s ∈ A. Consequently, B is integrally closed, and it is a Prüfer domain. 3. Deduce that every intermediary ring between A and K is a Prüfer domain. 4. Give an example of an integrally closed ring A, with an intermediary ring B between A and Frac(A) which is not integrally closed (in particular, B is not a localized ring of A). Exercise 14. (To be primitively algebraic) Let A = Z[A, B, U, V ]/hAU + BV − 1i = Z[a, b, u, v] and B = A[1/b]. Let x = a/b. Show that x is primitively algebraic over A, but that y = 2x is not. Exercise 15. (Characterizations of the coherent Prüfer rings, 1) Let A be a pp-ring and K = Frac A. The following properties are equivalent. 1. 2. 3. 4. 5. A is a Prüfer ring. A is normal and x ∈ A[x2 ] for every x ∈ K. Every ring A[y] where y ∈ K is normal. Every intermediary ring between A and K is normal. A is normal and x ∈ A + x2 A for every x ∈ K. 718 XII. Prüfer and Dedekind rings Exercise 16. (Characterizations of the coherent Prüfer rings, 2) For any pp-ring A, the following properties are equivalent. 1. A is a Prüfer ring. 2. Every finitely generated ideal containing a regular element is invertible. 3. Every ideal a = hx1 , x2 i with x1 , x2 ∈ Reg(A) is invertible. 4. For all a, b ∈ A, we have ha, bi2 = a2 , b2 = a2 + b2 , ab . 5. For all f , g ∈ A[X], we have c(f )c(g) = c(f g). Exercise 17. (A generalization of Proposition 6.5) Let A be a local-global coherent Prüfer ring (e.g. residually zero-dimensional). 1. Every matrix is equivalent to a matrix in Smith form (i.e. A is a Smith ring). 2. Every finitely presented A-module is characterized, up to isomorphism, by its Fitting ideals. Actually it is isomorphic to a direct sum of cyclic modules A/ak with principal ideals a1 ⊆ · · · ⊆ an (n > 0). Note: We can naturally deduce an analogous generalization of Corollary 6.6. Exercise 18. (Reduction ideal of another ideal) 1. Let E be an A-module generated by n elements, b ∈ A and a be an ideal such that bE ⊆ aE. Show that there exists a d = bn + a1 bn−1 + · · · + an−1 b + an , with the ai ∈ ai , that annihilates E. We say that an ideal a is a reduction of an ideal b if a ⊆ b and if br+1 = abr for a certain exponent r (it is then true for all the larger exponents). 2. Let f , g ∈ A[X]. Prove that c(f g) is a reduction of c(f )c(g). 3. In A[X, Y ], show that a = X 2 , Y 2 is a reduction of b = hX, Y i2 . Show that a1 = X 7 , Y 7 and a2 = X 7 , X 6 Y + Y 7 are reductions of the ideal b0 = X 7 , X 6 Y, X 2 Y 5 , Y 7 . Give the smallest possible exponents. 4. Let a ⊆ b be two ideals with b finitely generated. Show that a is a reduction of b if and only if Icl(a) = Icl(b). Exercise 19. (Normal pp-ring) Here is a light generalization of Fact 2.2. By Problem XIII -1 the hypothesis is satisfied for the strongly discrete reduced coherent Noetherian rings (in classical mathematics they are the reduced Noetherian rings). Consider a reduced ring A. Suppose that its total ring of fractions is zerodimensional. 1. If A is normal, it is a pp-ring. 2. The ring A is normal if and only if it is integrally closed in Frac A. Exercise 20. (Integral polynomial over a[X]) Let A ⊆ B be two rings, a be an ideal of A and a[X] be the ideal of A[X] constituting of polynomials with coefficients in a. For F ∈ B[X], show that F is integral over a[X] if and only if each coefficient of F is integral over a. Exercises and problems 719 Exercise 21. (Indecomposable modules) We say that a module M is indecomposable if the only direct summand submodules of M are 0 and M . The goal of the exercise is to prove that over a total factorization Dedekind domain, every finitely presented module is a direct sum of a finite number of indecomposable modules, this decomposition being unique up to the order of terms when the module is a torsion module. 1. Let A be a ring and a be an ideal. If the A-module M = A/a is a direct sum of two submodules N and P we have N = b/a, P = c/a with comaximal b ⊇ a and c ⊇ a. More precisely, b = hbi + a, c = hci + a, where b and c are complementary idempotents modulo a. 2. Let Z be a Dedekind domain. 2a. Show that a projective module of constant rank 1 is indecomposable. 2b. Show that a cyclic module Z/a with a finitely generated, 6= h0i , h1i is indecomposable if and only if a = pm for some maximal ideal p and some m > 1. 2c. Deduce that if Z admits total factorizations, every finitely presented module is a direct sum of a finite number of indecomposable modules. 3. When the module is a torsion module, show the uniqueness of the decomposition with a meaning to be specified. Problem 1. (Subring of invariants under a finite group action and arithmetic character) Note: See also Problem III -8. 1. If A is a normal ring, every locally principal ideal is integrally closed. Consequently, if f , g ∈ A[X] with c(f g) locally principal, then c(f )c(g) = c(f g). 2. Suppose that A is normal and that B ⊇ A is integral over A. If a is a locally principal ideal of A, then aB ∩ A = a. G 3. Let (B, A, G) where G ⊆ Aut(B) Q is a finite group and A = FixB (G) = B . 0 If b is an ideal of B, let NG (b) = σ∈G σ(b) (it is an ideal of B) and NG (b) = A ∩ N0G (b). Suppose that B is normal and that A is a Prüfer ring (therefore normal). a. For b ∈ B, prove that N0G (bB) = NG (b)B and NG (bB) = NG (b)A. b. If b is a finitely generated ideal of B, show that NG (b) is a finitely generated ideal of A and that N0G (b) = NG (b)B. You can write b = hb1 , . . . , bn i and introduce n indeterminates X = (X1 , . . . , Xn ) and consider the normic polynomial h(X) Q h(X) = σ∈G hσ (X) with hσ (x) = σ(b1 )X1 + · · · + σ(bn )Xn . c. For finitely generated ideals b1 , b2 of B, we obtain NG (b1 b2 ) = NG (b1 )NG (b2 ). d. A finitely generated ideal b of B is invertible if and only if NG (b) is invertible in A. Note: We know that B is a Prüfer ring (Theorem 3.5); in the case where B is integral, question 3d provides a new proof for it. 4. Let k be a discrete field with 2 ∈ k× and f (X) ∈ k[X] be a separable monic polynomial. The polynomial Y 2 − f (X) ∈ k[X, Y ] is absolutely irreducible (see 720 XII. Prüfer and Dedekind rings  Exercise 7); let k[x, y] = k[X, Y ] ring. Y 2 − f (X) . Show that k[x, y] is a Prüfer Problem 2. (Full submonoids of Nn ) Let M ⊆ Nn be a submonoid; for a ring k, let k[M ] be the k-algebra of the monoid M . It is the k-subalgebra of k[Nn ] ' k[x] = k[x1 , . . . , xn ] generated by n the monomials xm = x1m1 · · · xm for m ∈ M . We say that M is a full submonoid n of Nn if for m ∈ M , m0 ∈ Nn , we have m + m0 ∈ M ⇒ m0 ∈ M . 1. The subgroup of Zn generated by M is equal to M − M , and if M is full, then M = (M − M ) ∩ Nn . Conversely, if L ⊆ Zn is a subgroup, then the monoid M = L ∩ Nn is a full submonoid of Nn . 2. Let M ⊆ Nn be a full submonoid and k be a discrete field. a) Let A = k[M ] ⊆ B = k[x]. Show that if a ∈ A \ {0}, b ∈ B, and ab ∈ A, then b ∈ A. b) Let A ⊆ B be two domains satisfying: if a ∈ A \ {0}, b ∈ B, and ab ∈ A, then b ∈ A. i. Show that A = B ∩ Frac(A); deduce that if B is integrally closed, the same goes for A. ii. In particular, if M ⊆ Nn is a full submonoid, then k[M ] is integrally closed for every discrete field k. iii. More generally, if B ⊆ C is integrally closed in C, then A is integrally closed in C ∩ Frac(A). 3. Let M ⊆ Nn be the submonoid of magic squares (see Exercise VII -4); then k[M ] is integrally closed for every discrete field k. Problem 3. (Normal basis at infinity)  A valuation domain B with quotient field K is a DVR if K× B× ' Z (isomorphism of ordered groups). A regular parameter is every element b ∈ B such that v(b) = 1, where v : K× → Z is the map defined via the previous isomorphism (this map v is also called a valuation). Every element z of K× is then of the form ubv(z) with u ∈ B× . Let k be a discrete field, t be an indeterminate over k, A = k[t], A∞ = k[t−1 ]ht−1 i , and K = Frac(A) = k(t) = Frac(A∞ ) = k(t−1 ). If L is a finite dimensional K-vector space, we study in this problem the intersection of an A-lattice of L and of an A∞ -lattice of L (see the definitions question 2 ), an intersection which is always a finite dimensional k-vector space. In the theory of algebraic function fields this study is at the basis of the determination of Riemann-Roch spaces, however, when certain integral closures are known by bases; as a subproduct, we determine the algebraic closure of k in a finite extension of k(t). The ring A∞ is a DVR; let v : K → Z ∪ {∞} be the corresponding valuation, defined by v = − degt , and we fix π = t−1 as regular parameter. If x = t[x1 , . . . , xn ], Exercises and problems 721 let v(x) = mini v(xi ). This allows us to define a modular reduction Kn \ {0} → kn \ {0} , x 7→ ξ = x, v(x) with ξi = (xi /π ) mod π ∈ k. Generally, if V is a valuation ring of a discrete field K, of residual field k, we have a reduction Pm (K) → Pm (k), (x0 : . . . : xm ) 7→ (ξ0 : . . . : ξm ) with ξi = xi /xi0 , where xi0 | xi for all i; the element (ξ0 : . . . : ξn ) ∈ Pm (k) is well-defined: it corresponds to a unimodular vector of Vm+1 . In short we have an “isomorphism” Pm (V) ' Pm (K) and a reduction Pm (V) → Pm (k). Here the choice of the regular parameter π = t−1 gives a direct definition of the reduction Kn \ {0} → kn \ {0}, without having to change the coordinates on the projective line to understand what is happening at infinity. We will say that a matrix A ∈ GLn (K) with columns (A1 , . . . , An ) is A∞ -reduced if the matrix A ∈ Mn (k) is in GLn (k). 1. Let A ∈ GLn (K) of columns A1 , . . . , An . Show that Pn j=1 v(Aj ) 6 v(det A). 2. Let A ∈ GLn (K); compute Q ∈ GLn (A) such that AQ is A∞ -reduced. Or yet again, let E ⊂ Kn be an A-lattice, i.e. a free A-module of rank n; then E admits an A∞ -reduced A-basis (a basis (A1 , . . . , An ) such that (A1 , . . . , An ) is a k-basis  2  π π n of k ). You can start with the example A = . 1 1 3. For P ∈ GLn (A∞ ), prove the following points. a. P is a v-isometry, i.e. v(P x) = v(x) for every x ∈ Kn . b. For x ∈ Kn \ {0}, P x = P x. c. If A ∈ GLn (K) is A∞ -reduced, the same goes for P A. 4. Let A ∈ GLn (K) be triangular. What is the meaning of “A is A∞ -reduced”? 5. Let A ∈ GLn (K). Show that there exists a Q ∈ GLn (A), P ∈ GLn (A∞ ) and integers di ∈ Z such that P AQ = Diag(td1 , . . . , tdn ); moreover, if we order the di ’s by increasing order, they are unique. 6. Let L be a K-vector space of dimension n, E ⊂ L be an A-lattice, and E 0 ⊂ L be an A∞ -lattice. a. Show that there exist an A-basis (e1 , . . . , en ) of E, an A∞ -basis (e01 , . . . , e0n ) of E 0 and integers d1 , . . . , dn ∈ Z satisfying e0i = tdi ei for i ∈ J1..nK. Moreover, the di ’s ordered in increasing order only depend on (E, E 0 ). b. Deduce that E ∩ E 0 is a finite dimensional k-vector space. More precisely, E ∩ E0 = and in particular, P dimk (E ∩ E 0 ) = d L di L di >0 i >0 j=0 (1 + di ) = ktj ei , P di >−1 (1 + di ). 722 XII. Prüfer and Dedekind rings 7. Suppose that L is a finite K-extension of degree n. We define integral closures in L: B that of A, B∞ that of A∞ and k0 that of k. We say that a basis (e) = (e1 , . . . , en ) of B over A is normal at infinity if there exist r1 , . . . , rn ∈ K∗ such that (r1 e1 , . . . , rn en ) is an A∞ -basis of B∞ . Show that the elements of the basis (e) “integral at infinity,” that is which are members of B∞ , form a k-basis of the extension k0 .  8. Let k = Q, L = k[X, Y ] X 2 + Y 2 = k[x, y], A = k[x]. Show that (y + 1, y/x) is an A-basis of B but that it is not normal at infinity. Explicate an A-basis of B normal at infinity. Problem 4. (Ring of functions of an affine hyper-elliptic curve having a single point at infinity) Here we will use a notion of a norm of an ideal in the following context: B being a free A-algebra of finite rank n and b being a finitely generated ideal of B, the norm of b is the ideal def NB/A (b) = N(b) = FA,0 (B/b ) ⊆ A. It is clear that for b ∈ B, N(bB) = NB/A (b)A, that N(aB) = an for a a finitely generated ideal of A and that b1 ⊆ b2 ⇒ N(b1 ) ⊆ N(b2 ). Let k be a field of characteristic 6= 2 and f = f (X) ∈ k[X] be a separable monic polynomial of odd degree 2g+1. polynomial Y 2 −f (X) ∈ k[X, Y ] is absolutely  The 2 irreducible; let B = k[X, Y ] Y − f (X) = k[x, y] and A = k[x] ' k[X]. The ring B is integral, it is a free A-module of basis (1, y). For z = a + by with a, b ∈ A, let z = a − yb, and N = NB/A : N(z) = zz = a2 − f b2 . The goal of the problem is to parameterize the nonzero finitely generated ideals of B, to show that B is a Prüfer ring and to study the group Cl(B) of classes of invertible ideals of B. If b is a finitely generated ideal of B, its content is the Fitting ideal FA,1 (B/b ). To two elements u, v ∈ A satisfying v 2 ≡ f mod u, we associate the A-submodule of B: bu,v = Au + A(y − v). We have u 6= 0 because f is separable. We will sometimes make the polynomial w ∈ A intervene so that v 2 − uw = f and we will write bu,v,w instead of bu,v (even if w is completely determined by u, v). 1. Show that bu,v is an ideal of B and that bu,v = Au ⊕ A(y − v). Conversely, for u, v ∈ A, if Au + A(y − v) is an ideal of B, then v 2 ≡ f mod u. 2. Show that A → B/bu,v induces an isomorphism A/Au ' B/bu,v ; consequently, AnnA (B/bu,v ) = Au. Deduce “the uniqueness of u” u1 , u2 monic and bu1 ,v1 = bu2 ,v2 =⇒ u1 = u2 . Also prove that N(bu,v ) = uA and that v is unique modulo u bu,v1 = bu,v2 ⇐⇒ v1 ≡ v2 mod u. 3. Show that bu,v,w bw,v,u = hy − viB , bu,v bu,−v = huiB . Consequently, the ideal bu,v is invertible. In addition, for u = u1 u2 satisfying v 2 ≡ f mod u, we have bu,v = bu1 ,v bu2 ,v . 4. Let b be a nonzero finitely generated ideal of B. Exercises and problems 723 a. Show that there exist two unique monic polynomials d, u ∈ A and v ∈ A with v 2 ≡ f mod u, so that b = d bu,v . Consequently, b is an invertible ideal (so B is a Prüfer ring). In addition, v is unique modulo u, therefore unique if we impose deg v < deg u. b. Deduce that bb = N(b)B then that the norm is multiplicative over the ideals. c. Show that B/b is a finite dimensional k-vector space. Show that dimk (B/b ) = dimk (A/a ) with a = N(b). This integer will be denoted by deg(b). Prove that deg(bu,v ) = deg u, that deg(b) = deg N(b), and finally that deg is additive, i.e. deg(b1 b2 ) = deg(b1 ) + deg(b2 ). Let u, v ∈ A with v 2 ≡ f mod u. We say that the pair (u, v) is reduced if u is monic and deg v < deg u 6 g . By abuse of language, we also say that bu,v is reduced. For example, if (x0 , y0 ) is a point of the hyper-elliptic curve y 2 = f (x), its ideal hx − x0 , y − y0 i is a reduced ideal (take u(x) = x − x0 , v = y0 ). 5. Show that every nonzero finitely generated ideal of B is associated with a reduced ideal of B (two ideals a and a0 are said to be associated if there exist two regular elements a and a0 such that aa0 = a0 a, we then let a ∼ a0 ). 6. In this question, for a nonzero finitely generated ideal b of B, we designate by N(b) the monic polynomial generator of the ideal NB/A (b). Let bu,v be a reduced ideal. a. Let z ∈ bu,v \ {0} such that u = N(bu,v ) | N(z), i.e. N(z)/N(bu,v ) is a polynomial. Show that deg (N(z)/N(bu,v )) > deg u, with equality if and only if z ∈ k× u. b. Let b0 be a finitely generated ideal of B satisfying b0 ∼ bu,v . Show that deg(b0 ) > deg(bu,v ) with equality if and only if b0 = bu,v . In summary, in a class of invertible ideals of B, there is therefore one and only one ideal of minimum degree: it is the unique reduced ideal of the class. 7a. Show that the affine curve y 2 = f (x) is smooth; more precisely, by letting 0 F (X, Y ) = Y 2 − f (X) ∈ k[X, Y ], show that 1 ∈ hF, FX , FY0 i; this uniquely uses the fact that f is separable and that the characteristic of k is not 2, not the fact that f is of odd degree. If k is algebraically closed, we thus obtain a biunivocal correspondence between the points p0 = (x0 , y0 ) of the affine curve y 2 = f (x) and the DVRs W of k(x, y) containing B = k[x, y]: to p0 , we associate its local ring W and in the other direction, to W we associate the point p0 = (x0 , y0 ) such that hx − x0 , y − y0 iB = B ∩ m(W). b. We now study “the points at infinity of the smoothed projective curve,” at infinity relative to the model y 2 = f (x). Algebraically, these are valuation rings for k(x, y) not containing B (but containing k of course). Let A∞ = k[x−1 ]hx−1 i be the DVR. Show that there exists one and only one ring B∞ , A∞ ⊆ B∞ ⊆ Frac(B) = k(x, y), having Frac(B) as quotient field. Show that B∞ is a DVR, that B∞ /m(B∞ ) ' A∞ /m(A∞ ) ' k and that it is the only point at infinity. 724 XII. Prüfer and Dedekind rings Problem 5. (Trifolium: integral closure and parameterization) Let k be a discrete field and F (X, Y ) = (X 2 + Y 2 )2 + αX 2 Y + βY 3 , with α 6= β in k. We study the curve F (x, y) = 0, its singular points, its field of functions L = k(x, y) (we will show that F is irreducible), its ring of functions k[x, y], the integral closure B of k[x, y] in L . . . etc . . . Note that F (−X, Y ) = F (X, Y ) and therefore that the involution (x, y) 7→ (−x, y) leaves the curve F (x, y) = 0 invariant. Opposite is an example of such a curve. α = 3, β = −1 (x(t), y(t)) 1. Show that F is an absolutely irreducible polynomial. More generally: let k be an integral ring, k[T ] be a polynomial ring with several indeterminates and F ∈ k[T ], F = FN + FN +1 with nonzero homogeneous FN , FN +1 , of degrees N , N + 1, respectively. Then, in every factorization F = GH, one of the two polynomials G or H is homogeneous; finally, if k is a field, then F is irreducible if and only if FN , FN +1 are coprime. 2. Determine the singular points of the curve F = 0. Let L = k(x, y) and B be the integral closure of k[x, y] in L. 3. Let t = y/x be such that L = k(x, t). a. Determine a primitive algebraic equation of t over k[x]. Let G(X, T ) = a4 T 4 + · · · + a1 T + a0 ∈ k[X][T ], with ai = ai (X) ∈ k[X], such a primitive polynomial, therefore satisfying G(x, t) = 0. Prove that (x, t) = (0, 0) is a nonsingular point of the curve G = 0. b. Using Emmanuel’s trick (Lemma 4.7), determine the integral elements b4 , . . . , b1 associated with (G, t) with A = k[x] as a base ring. Deduce a principal localization matrix for (x, y) and describe the ideal q of B such that hxiB = q hx, yiB . 4. Show that L = k(t) and express x, y as elements of k(t). 5. Determine the integral closure B of k[x, y] in L. a. Show that B = k[g0 , g1 ] with g0 = 1/(1 + t2 ) and g1 = tg0 . Express x, y in k[g0 , g1 ]. What is “the equation” relating g0 and g1 ? b. Show that (1, y, b3 t, b2 t) is an A-basis of B.  c. Prove that dimk B hx, yiB = 3. Solutions of selected exercises 725 6. Let V be the valuation ring7 of L defined by the nonsingular point (0, 0) of the curve G = 0. It is the only valuation ring of L containing k and such that x, t ∈ Rad V (and so y ∈ Rad V also). Consider the prime ideal p1 = (Rad V) ∩ B. Show that p1 = hx, y, b4 t, b3 t, b2 t, b1 ti = hg0 − 1, g1 i and B/p1 = k, and prove that p21 = g0 − 1, g12 . 7. Determine the factorization in B of the ideal hx, yiB as a product of prime ideals. The response is not uniform at (α, β), unlike the determination of the integral closure B of A. 8. Repeat the questions by only assuming that k is an integrally closed ring and that β − α ∈ k× . Some solutions, or sketches of solutions Exercise 1. We need to show the inclusion bn ⊆ abn−1 . Let (x1 , . . . , xn ) be a generator set of E, X = t[ x1 · · · xn ], b1 , . . . , bn ∈ b and B = Diag(b1 , . . . , bn ). Since bi xi ∈ aE (i ∈ J1..nK), there exists an A ∈ Mn (a) such that B X = A X. Let C = B − A. We have C X = 0, and since E is faithful, det C = 0. Expanding this determinant, we obtain b1 · · · bn + a = 0 with a ∈ abn−1 (since a ⊆ b). Exercise 2. (Principal localization  matricesin M2 (A))  b11 b12 b22 e = 1. Immediate, because if B = , then B b21 b22 −b21 [x y ]B = [x0 y 0 ] with x0 = − −b21 x b11 y , y0 = b22 x −b12 y −b12 b11  and . 2. We have u,  v ∈ b with z = ux + vy and ux,  uy, vx,  vy are multiples of z, which y y we write as [v − u ] = zB. As [x y ] = 0, we have [x y ]zB = 0; in −x −x addition Tr(zB) = yv + xu = z. 3. In the lemma in question, z = xn and the ring is a pf-ring. The equalities xn [x y ]B = 0 and xn 1 − Tr(B) = 0 provide two comaximal localizations of A: one in which xn = 0, in which case x = 0 because the ring A and its localized rings are reduced, and the other in which [x y ]B = 0 and Tr(B) = 1. In each one of them, hx, yi is locally principal therefore it is locally principal in A. Exercise 3. 1. Indeed, A(X) is faithfully flat over A. 2. Let f = Pn k=0 ak X k ∈ A[X]. For each k, we have, in A, an equality ha0 , . . . , an i hb0,k , . . . , bn,k i = hak i with a0 b0,k + · · · + an bn,k = ak . Pn Consider then the polynomial gk = j=0 bj,k X n−j . All of the coefficients of f gk are in hak i. We can therefore write f gk = ak hk with the coefficient of degree k 7 A subring V of a discrete field L is called a valuation ring of L if for all x ∈ L× we have x ∈ V or x−1 ∈ V. 726 XII. Prüfer and Dedekind rings in hk equal to 1. This implies that in A(X), ak ∈ hf i. However, we have f ∈ ha0 , . . . , an i in A[X]. Thus, in A(X), hf i = ha0 , . . . , an i. We deduce that A(X) is a Bézout ring, because for f0 , . . . , fm ∈ A[X] of degrees < d, a consequence of the previous result is that in A(X) hf0 , . . . , fm i = f0 + X d f1 + · · · + X dm fm . 3. By Exercise 2, (x, y) admits a principal localization matrix over B if and only if there exists a B ∈ M  2 (B) of trace 1 satisfying [ x y ]B = [ 0 0 ]. So let B ∈ M2 A(X) satisfy [ x y ]B = [ 0 0 ] and Tr(B) = 1. By multiplying the coefficients of B by a common denominator, we obtain some el  p q ements p, q, r, s of A[X] such that [ x y ] = [ 0 0 ] and p + s is primitive. r s   P pi q i k We therefore have (with p = p X , . . . ): [ x y ] = [ 0 0 ]. As k k ri si P p + s is primitive, we have ui ∈ A such that ui (pi + si ) = 1. Let B 0 =   P pi q i u ∈ M2 (A): we obtain [ x y ]B 0 = [ 0 0 ] with Tr(B 0 ) = 1. i i ri si 4. AhXi is arithmetic ⇒ A is arithmetic and A is arithmetic ⇐⇒ A(X) is arithmetic ⇐⇒ A(X) is a Bézout ring. The last equivalence also results from the local-global principle IX -6.10. In addition, the monoid of divisibility in A(X), i.e. A(X)/A(X)× , is isomorphic to the monoid of finitely generated ideals of A. Exercise 6. We only show the first item. It is clear that K0 (X) is algebraic over K(X). Conversely, let z ∈ L(X) be algebraic over K(X), then there exists some nonzero a ∈ K[X] such that az is integral over K[X], a fortiori over L[X]. As L[X] is a GCD-domain, we have az ∈ L[X]. Moreover, we know that the integral closure of K[X] in L[X] is K0 [X] (Lemma III -8.4); so az ∈ K0 [X] then z = (az)/a ∈ K0 (X). Exercise 7. 1. Immediate. In what follows, we will use the fact that (1, y) is a k[x]-basis of k[x, y]; it is also a k(x)-basis of k(x, y) and the extension k(x, y)/k(x) is a Galois extension of the group hσi where σ : k(x, y) → k(x, y) is the involutive k(x)-automorphism which realizes y 7→ −y. 2. Let z = u(x) + yv(x) ∈ k(x, y) be algebraic over k. Then z + σ(z) = 2u and zσ(z) = u2 − f v 2 are algebraic over k and in k(x) so in k. Hence u ∈ k, v = 0 and z = u ∈ k. 3. As a ∈ / kp , we easily see that f (X) is irreducible in k[X]. Let us show that k[x, y] is the integral closure of k[x] in k(x, y). Let z = u(x) + yv(x) ∈ k(x, y) be integral over k[x]. Then z + σ(z) = 2u and zσ(z) = u2 − f v 2 are in k(x) and integral over k[x], so in k[x]. Thus u and f v 2 ∈ k[x]. By using the fact that f is irreducible, we see that v ∈ k[x]. Recap: z ∈ k[x, y]. 4. Let α = a1/p ∈ k, hence f (X) = (X − α)p . Let t = y/(x − α) 2 Then t = x − α, therefore x ∈ k[t], and y = t(x − α) p−1 2 p p−1 2 . = t ∈ k[t]. Solutions of selected exercises 727 Therefore k[x, y] ⊆ k[t] and k(x, y) = k(t). We see that t is integral over k[x], but that t ∈ / k[x, y] = k[x] ⊕ k[x]y. The integral closure of k[x] (or that of k[x, y]) in k(x, y) is k[t] (which indeed contains x and y). Exercise 8. Recall that x0 = p1 . The equality k[x0 , . . . , xn−1 ] = { u/ps | u ∈ k[t], deg(u) 6 ns } is easy by noticing that tn x0 ∈ k[x0 , . . . , xn−1 ] since tn p =1+ tn −p p ∈ Pn−1 i=0 k ti . p Let us write that t is algebraic over k(x0 ) as a root in T of the polynomial p(T )x0 − 1 = x0 T n + x0 an−1 T n−1 + · · · + x0 a1 T + (x0 a0 − 1). The elements determined by “Emmanuel’s trick” (see Lemma 4.7 or Exercise 10) are x0 t, x0 t2 + x0 an−1 t, x0 t3 + x0 an−1 t2 + x0 an−2 t, ..., x0 tn−1 + · · · + x0 a2 t. Thus, tk x0 is integral over k[x0 ] for k ∈ J0..n − 1K and k[x0 , . . . , xn−1 ] ⊆ A. It remains to show that A ⊆ k[x0 , . . . , xn−1 ]. We use the inclusion k[x0 ] ⊆ V∞ := k[1/t]1+h1/ti . This last ring is comprised of rational fractions of degree 6 0, i.e. defined at t = ∞. It is isomorphic to k[y]1+hyi so it is integrally closed, and A ⊆ V∞ . The ring V∞ is called “the local ring of the point t = ∞.” Let z ∈ k(t) be an integral rational fraction over k[x0 ]. By multiplying an integral dependence relation of z over k[x0 ] by pN with large enough N , we obtain pN z m + bm−1 z m−1 + · · · + b1 + b0 = 0, bi ∈ k[t]. N This entails that p z is integral over k[t] and therefore belongs to k[t] (k[t] is integrally closed). Moreover, z ∈ V∞ , i.e. deg z 6 0. Ultimately, z is a rational fraction of degree 6 0 whose denominator divides a power of p, so z ∈ k[x0 , . . . , xn−1 ]. Finally, we have x1 = tx0 so t = x1 /x0 ∈ Frac(A) then k(t) = Frac(A). Exercise 9. 1. Immediate. 2. Let b be the ideal generated by each of the Xi Xj − Xi−1 Xj+1 for 1 6 i 6 j 6 n − 1 and E be the k-module E = k[X0 ] ⊕ k[X0 ]X1 ⊕ · · · ⊕ k[X0 ]Xn−1 . We will prove that E ∩ Ker ϕ = 0 and that k[X] = E + b. As b ⊆ Ker ϕ, we will obtain k[X] = E ⊕ b. Let y ∈ Ker ϕ which we write as y = y1 + y2 with y1 ∈ E and y2 ∈ b. By applying ϕ, we obtain ϕ(y1 ) = 0, so y1 = 0, then y = y2 ∈ b. We have obtained Ker ϕ ⊆ b, hence the equality Ker ϕ = b. • Justification of E ∩ Ker ϕ = 0. Let f ∈ E f = f0 (X0 ) + f1 (X0 )X1 + · · · + fn−1 (X0 )Xn−1 . Let ϕ(f ) = 0, ϕ(f ) = f0 (1/p) + f1 (1/p)t/p + · · · + fn−1 (1/p)tn−1 /p = 0. By multiplying each fi (1/p) by pN , with large enough N , we obtain gi (p) ∈ k[p], pg0 (p) + g1 (p)t + · · · + gn−1 (p)tn−1 = 0. 728 XII. Prüfer and Dedekind rings But (1, t, . . . , tn−1 ) is a basis of k[t] over k[p], so the gk ’s = 0, then f = 0. • Justification of k[X] = E + b. Letting k[x0 , . . . , xn−1 ] = k[X]/b and E 0 = k[x0 ] + k[x0 ]x1 + · · · + k[x0 ]xn−1 , this amounts to showing that k[x] = E 0 . Moreover E 0 contains xn = 1 − Pn−1 ai xi . It therefore suffices to prove that E 0 is a subring, or that xi xj ∈ E 0 i=0 for i, j ∈ J0..n − 1K. By definition, it contains x20 , x0 x1 , . . . , x0 xn−1 and therefore also contains x0 xn . But x1 xj = x0 xj+1 for j ∈ J1..n − 1K, so E 0 contains these x1 xj ’s and therefore also contains x1 xn , and by using x2 xj = x1 xj+1 for j ∈ J2..n − 1K, we see that E 0 contains all the x2 xj ’s. And so forth. Remark. The author of the exercise proceeded as follows, for some discrete field k: he used an additional indeterminate Xn and chose, for k[X0 , X1 , . . . , Xn ], the graded monomial reversed lexicographical order by ordering the indeterminates as follows: X0 < X1 < · · · < Xn . We then observe that the trivial ideal of the ideal Pn hRmin i + 1 − i=0 ai X i is the monomial ideal generated by the monomials (?) Xn and Xi Xj for 1 6 i 6 j 6 n − 1. The k-vector space generated by the monomials wich are nondivisible by a monomial of (?) is the k-vector space E = k[X0 ] ⊕ k[X0 ]X1 ⊕ · · · ⊕ k[X0 ]Xn−1 . It is the space that appears in the above solution (in which k is an arbitrary ring, not necessarily a discrete field). Exercise 10. By multiplying the initial equation by an−1 , we obtain an s integral n over A. Let us then express the initial equation as follows (an s + an−1 )sn−1 + an−2 sn−2 + · · · + a1 s + a0 = 0, with b = bn−1 = an s + an−1 , and let us consider the ring A[b]. Thus, s annihilates a polynomial of A[b][X] whose leading coefficient is b; by what precedes, bs is integral over A[b]. But b is integral over A so bs = an s2 + an−1 s is integral over A. The following step consists in writing the initial equation in the form csn−2 + an−3 sn−3 + · · · + a1 s + a0 = 0, with c = bn−2 = an s2 + an−1 s + an−2 . Exercise 11. 1. We write J1..nK \ I = {i1 , i2 , . . .}. By using Lemma 4.7, we see that the coefficients of h1 (T ) = h(T )/(T − xi1 ) are integral over A, that those of h2 (T ) = h1 (T )/(T − xi2 ) are integral over A[coeffs. of h1 ], therefore Q integral over A and so on and so forth. Therefore by letting q(T ) = i0 ∈I (T − / Q 0 ), the coefficients of the polynomial h(T )/q(T ) are integral over xi0 ) j 0 ∈J (T − y j / Q Q A. The constant coefficient of this last polynomial is ±a0 b0 i∈I xi j∈J yj . 2. Elementary symmetric functions: we have ai = ±a0 Si (x), bj = ±b0 Sj (y), so ai bj is integral over A. Exercise 12. Let S ⊆ A \ {0} be the set of denominators b of the elements of B written in the form a/b with a, b ∈ A, b = 6 0 and 1 ∈ ha, bi. It is clearly a monoid. To show that B = AS , it suffices to prove that S −1 ⊆ B. Let a/b ∈ B be expressed irreducibly; there exist u, v ∈ A such that 1 = ua + vb which implies 1/b = u(a/b) + v ∈ AB + A ⊆ B. Solutions of selected exercises 729 Exercise 13. We want to show that an intermediary ring between A and K is a Prüfer ring. Every element of K is primitively algebraic over any arbitrary intermediary ring between A and K. It remains to prove that the intermediary ring is integrally closed in order to apply Theorem 4.8. 1.  If x = a/b, with a, b ∈ A, there exists a principal localization matrix for (b, a), s c ∈ M2 (A), with s + t = 1, sa = cb and ta = (1 − s)b. t 1−s Therefore x = c/s = (1 − s)/t and x ∈ A0s ∩ A0t . Conversely, if x0 ∈ A0s ∩ A0t , there is a0 , b0 ∈ A0 and n, m ∈ N such that x0 = a0 /sn = b0 /tm . Therefore, for u, v ∈ A, since 1/t = x/(1 − s) we have 0 m 0 ua0 + vb0 xm x0 = an = b x m = . s (1 − s) usn + v(1 − s)m It suffices to take usn + v(1 − s)m = 1 to observe that x0 ∈ A0 [x]. 2. Let B ⊆ K be an A-algebra generated by n elements (n > 1). We write B = A0 [x], where A0 is an A-algebra generated by n − 1 elements. By item 1, there exist s, t ∈ A such that A0 [x] = A0s ∩ A0t . By induction, there exist u1 , . . . , uk ∈ A such that A0 = Au1 ∩ · · · ∩ Auk . Then, A0s = Asu1 ∩ · · · ∩ Asuk and A0t = Atu1 ∩ · · · ∩ Atuk , so B = Asu1 ∩ · · · ∩ Asuk ∩ Atu1 ∩ · · · ∩ Atuk . 3. Let B be an intermediary ring and x ∈ K be integral over B. Then x is integral over a finitely generated A-subalgebra, therefore it belongs to this finitely generated A-subalgebra, therefore to B, i.e. B is integrally closed. 4. Let x, y be two indeterminates over a discrete field k and A = k[x, y]. Let B = k[x, y, (x2 + y 2 )/xy]. Then A is integrally closed but not B: indeed, x/y and y/x are integral over B (their sum and their product are members of B) but x/y and y/x ∈ / B as we can easily prove, thanks to a homogeneity argument. Exercise 14. We have bx − a = 0 with 1 = ua + vb. The reader will check that if f (Y ) ∈ A[Y ] satisfies f (y) = 0, then f is a multiple, in A[Y ], of bY − 2a. Therefore c(f ) ⊆ h2a, bi and as 1 ∈ / h2a, bi, y is not primitively algebraic over A. Exercise 15. The implications 4 ⇒ 3 ⇒ 2 and 5 ⇒ 2 are trivial. Theorem 3.6 gives 1 ⇒ 4 and Theorem 3.2 4d (page 690) gives 1 ⇒ 5. 2 ⇒ 1. x is primitively algebraic over A, we apply Theorem 4.8. Exercise 16. We already know that 1 ⇒ 2 ⇒ 3 and 1 ⇒ 5. Let us show that 3 implies that the ring is arithmetic. Consider an ideal with two arbitrary generators a = hy1 , y2 i and let ri be the idempotent annihilator of yi . Consider the orthogonal idempotents: e = (1 − r1 )(1 − r2 ), f = r1 (1 − r2 ), and g = r2 . We have e + f + g = 1. If we invert f or g, one of the yi ’s is null and the ideal a becomes principal. To see what happens if we invert e, consider the regular elements x1 = (1 − e) + ey1 and x2 = (1 − e) + ey2 . The ideal b = hx1 , x2 i is invertible in A. Then let u, v, w be such that ux1 = vx2 and (1 − u)x2 = wx1 . We multiply by e and we obtain uey1 = vey2 and (1 − u)ey2 = wey1 , which implies that the ideal aAe = hey1 , ey2 i Ae is locally principal. 5 ⇒ 4. First consider f = aX + b, g = aX − b, then f = aX + b, g = bX + a. 730 XII. Prüfer and Dedekind rings 4 ⇒ 3. Let a = ha, bi, with regular a and b. Let α, β such that ab = αa2 + βb2 , and let b = hαa, βbi. We have ab ∈ ab, therefore a2 b2 ∈ a2 b2 = a2 , b2 α2 a2 , β 2 b2 . Let us show the equality a2 b2 = a2 b2 , which will imply that a is invertible. Letting u = αa2 , v = βb2 , it suffices to show that u2 = α2 a4 and v 2 = β 2 b4 are in a2 b2 . By definition, u + v = ab ∈ ab and uv ∈ a2 b2 . Therefore u2 + v 2 = (u + v)2 − 2uv ∈ a2 b2 . As u2 , v 2 ∈ u2 + v 2 , uv , we indeed have u2 , v 2 ∈ a2 b2 . Exercise 17. We give the proof for the integral case. The pp-ring case is deduced from it by applying the usual elementary local-global machinery. 1. Let M ∈ An×m , p = inf(m, n). Proposition VIII -4.7 gives us locally principal ideals ai such that DA,1 (M ) = a1 , DA,2 (M ) = a21 a2 , DA,3 (M ) = a31 a22 a3 , DA,4 (M ) = a41 a32 a23 a4 , . . . Since the ring is local-global, the locally principal ideals aj are principal (localglobal principle IX -6.10). Let aj = haj i and consider the matrix M 0 ∈ An×m in Smith form, whose diagonal elements are a1 , a1 a2 , . . . , a1 a2 · · · ap . As in the proof of Proposition VIII -4.7 the algorithm that produces the reduced Smith form in the local case and the local-global machinery of arithmetic rings provides us with a comaximal system (s1 , . . . , sr ) such that, over each A[1/si ], the matrix M admits a reduced Smith form. By comparing the determinantal ideals we see that this reduced form can always be taken equal to M 0 (here is where the fact that over an integral ring, two generators of a principal ideal are always associated intervenes). Thus, M and M 0 are equivalent over each A[1/si ]. The result follows by the local-global principle IX -6.8 that they are equivalent. 2. Immediate consequence of 1. Exercise 18. 1. We write E = Ax1 + · · · + Axn therefore aE = ax1 + · · · + axn . By using bE ⊆ aE, we obtain a matrix A ∈ Mn (a) such that b t[ x1 · · · xn ] = A t[ x1 · · · xn ]. It then suffices to let d = det(bIn − A). 2. If deg(g) 6 m, we know that c(f )m+1 c(g) = c(f )m c(f g) (Lemma III -2.1). By multiplying by c(g)m , we obtain c(f )c(g) 2 05 04 04 m+1 03 m = c(f g) c(f )c(g) . 3. We have b = ab, b = a1 b and b = a2 b . 4. Suppose br+1 = abr . We apply the first question with E = br and b ∈ b. We obtain d = bn + a1 bn−1 + · · · + an−1 b + an ∈ Ann(br ) with ai ∈ ai . As d ∈ b and d ∈ Ann(br ), we have dr+1 = 0, which is an integral dependence relation of b over a. For the converse, let b be integral over a. For b ∈ b, by writing an integral dependence relation of b over a. We obtain n such that bn+1 ∈ abn . However, if we have i +1 two ideals b1 , b2 ⊆ b with bn ⊆ abni , we have (b1 + b2 )n1 +n2 +1 ⊆ abn1 +n2 . i By using a finite generator set of b, we obtain an exponent r with the inclusion br+1 ⊆ abr . Solutions of selected exercises 731 Exercise 19. Let K = Frac A. 1. Let a ∈ A and ea be the idempotent of K such that AnnK (a) = AnnK (ea ). The element ea is integral over A, so ea ∈ A, and AnnA (b) = AnnK (b) ∩ A for every b ∈ A. 2. Direct implication. The computation is immediate. 2. Converse implication. Let a be integral over the principal ideal hbi in A. Let us express the integral dependence relation of a over hbi. an = b(un−1 an−1 + un−2 ban−2 + · · · + u0 bn−1 ). (∗) We have (1 − eb )an = 0, therefore since A is reduced (1 − eb )a = 0. We introduce the regular element b1 = b + (1 − eb ). Then the element c = a/b1 ∈ K is integral over A. Indeed, the equality (∗) remains true when replacing b by b1 and the ui ’s by eb ui ’s, because in the component eb = 1 we obtain (∗) and over the component eb = 0 we obtain 0 = 0. Therefore c is in A, and a = eb a = eb b1 c = bc. Exercise 20. Let T be a new indeterminate over B. For b ∈ B, we will use the result (similar to Fact 2.5): b is integral over the ideal a if and only if bT is def integral over the subringA[aT ] = A ⊕ aT ⊕ a2 T 2 ⊕ . . . of B[T ]. Let us take a look at the difficult case. Let F ∈ B[X] be integral over a[X], we must show that each coefficient of F is integral over a. We write an integral dependence relation F n + G1 F n−1 + · · · + Gn−1 F + Gn = 0, Gk = Gk (X) ∈ (a[X])k = ak [X]. We therefore have an equality in B[X][T ] with some Qi ’s in B[X] T n + G1 T n−1 + · · · + Gn−1 T + Gn = (T − F )(T n−1 + Q1 T n−2 + · · · + Qn−1 ). We replace T by 1/(T X) and we multiply by (T X)n = T X × (T X)n−1 , which gives 1 + XT G1 + · · · + X n T n Gn = (1 − XT F )(1 + XT Q1 + · · · + X n−1 T n−1 Qn−1 ). We now look at this equality in B[T ][X]. If b is a coefficient of F , bT is a coefficient in X of 1 − XT F and 1 is a coefficient in X of 1 + XT Q1 + · · · + X n−1 T n−1 Qn−1 . By Kronecker’s theorem, the product bT = bT × 1 is integral over the ring generated by the coefficients (in X) of the polynomial 1 + XT G1 + · · · + X n T n Gn . But the coefficient in X k of this last polynomial is in A[aT ] = A ⊕ aT ⊕ a2 T 2 ⊕ . . . and therefore bT is integral over A[aT ] and consequently b is integral over a. Exercise 21. (Indecomposable modules) 1. Everything takes place modulo a. We therefore consider the quotient ring B = A/a. Then the result is obvious (Lemma II -4.4). 2a. If M = N ⊕ P , N and P are projective of constant rank and the sum of the ranks is equal to 1, therefore one of the two is null. 2b. We refer to item 1. If the module is decomposable, we have a ⊆ b and c with b and c finitely generated comaximal. These ideals are therefore obtained from the total factorization of a as two partial products of this factorization. Thus, we cannot have b and c comaximal if the total factorization of a makes only 732 XII. Prüfer and Dedekind rings one maximal ideal intervene. Otherwise the total factorization of a provides two comaximal ideals b and c such that bc = a. Therefore b + c = Z and b ∩ c = a which gives Z/a = b/a ⊕ c/a. Qk Qk Actually, if a = i=1 qi = i=1 pimi is the total factorization of a, we obtain by Lk induction on k that Z/a = q /a. i=1 i 2c. Results from the previous considerations and from the structure theorem for finitely presented modules over a Dedekind domain. 3. The uniqueness can be stated as follows: if M can be expressed in two ways as a sum of indecomposable modules, there is an automorphism of M which sends the modules of the first decomposition to those of the second. If a torsion finitely presented module M is decomposed into direct sums of indecomposable modules, each term of the sum is itself finitely presented and with torsion. It is therefore of the form Z/pm by item 1. By the Chinese remainder theorem we return to the case where only one maximal ideal intervenes in the direct sum, and the uniqueness then results from Theorem IV -5.1. Note also that in the case of a total factorization PID, the uniqueness is valid for the decomposition of every finitely presented module. Problem 1. Hereinafter the word “locally” means “after localization at comaximal elements.” 1. The ideal a is locally principal, therefore since A is normal, locally integrally closed, so it is integrally closed (local-global principle 2.10). We end with Lemma 2.7 (variant of Kronecker’s theorem). 2. If x ∈ aB ∩ A, then x is integral over the ideal a (Lying Over, Lemma 2.8) therefore in a by the previous question. 3a. If a = NG (b), we have NG (bB) = aB ∩ A = aA. 3b and 3c. The finitely generated ideal a = cA (h) is locally principal, so cB (h) = aB is a locally principal ideal of B. By the first question, we have Q c (hσ ) = cB (h), i.e. N0G (b) = aB. σ B By question 2, a = NG (b). Next we note that NG (b1 b2 )B = N0G (b1 b2 ) = N0G (b1 )N0G (b2 ) = NG (b1 )NG (b2 )B, hence the result when taking the intersection with A. 3d. This results from item 2 and from the two following facts. • If b ∈ B is regular then a = NG (b) ∈ A is regular in A: indeed, it is a product of regular elements in B therefore it is regular in B. • If a ∈ A is regular in A then it is regular in B. Indeed, let x ∈ B such that ax = 0. We want to show that x = 0. We consider the polynomial CG (x)(T ) = Q σ∈G  T − σ(x) . As aσ(x) = 0 for each σ, the coefficients of CG (x)(T ) are annihilated by a therefore null, except for the leading coefficient. Thus x|G| = 0, but B is normal therefore reduced. 4. Let k(x, y) = Frac k[x, y]. We will use the fact that (1, y) is a k[x]-basis of k[x, y]; it is also a k(x)-basis of k(x, y) and the extension k(x, y)/k(x) is a Galois Solutions of selected exercises 733 extension of the group hσi where σ : k(x, y) → k(x, y) is the involutive k(x)-automorphism which realizes y 7→ −y. Let us show that k[x, y] is the integral closure of k[x] in k(x, y). Let z = u(x) + yv(x) ∈ k(x, y) be integral over k[x]. Then z + σ(z) = 2u and zσ(z) = u2 − f v 2 are in k(x) and integral over k[x] therefore in k[x]. We therefore have f v 2 ∈ k[x]. By using the fact that f is separable, we see that v ∈ k[x]. Recap: z ∈ k[x, y]. Therefore k[x, y] is integrally closed. We apply the preceding with A = k[x], B = k[x, y], G = hσi. Problem 2.P P 2a) Let a = α aα xα , b = β bβ xβ . We must show that β ∈ M for each β such that bβ = 6 0. We can assume b nonzero. Let aα xα be the leading monomial of a for the lexicographical order and bβ xβ be that of b. The leading monomial of ab is aα bβ xα+β , therefore α + β ∈ M . As α ∈ M and as M is full, we have β ∈ M . We then start again by replacing b by b0 = b − bβ xβ which satisfies ab0 ∈ k[x]. We obtain b0 ∈ k[x] and finally b ∈ k[x]. Problem 3. P 1. If A = (aij ), then det A = σ∈Sn aσ(1)1 · · · aσ(n)n and v(aσ(1)1 · · · aσ(n)n ) > v(A1 ) + · · · + v(An ). We deduce that v(det A) > v(A1 ) + · · · + v(An ). 2. For the matrix given as an example: we have det(A) = π 2 − π 6= 0. 0 0 But A = is not invertible. By realizing A1 ← A1 − A2 , we obtain the 1 1 0 equality A =  π2 − π 0 π 1   and this time A0 = 1 0 0 1  is invertible. Here is the general method: if det A 6= 0, A is A∞ -reduced and that is all. Otherwise, there are some λ1 , . . . , λn ∈ k, not all zero, such that λ1 A1 + · · · + λn An = 0. We consider a column Aj with λj = 6 0 and v(Aj ) minimum; to simplify, we can suppose that it is A1 and that λ1 = 1 (even if it entails dividing the relation by λ1 ); we then perform the elementary operation A1 ← A01 = A1 + Pn j=2 λj π v(A1 )−v(Aj ) Aj . In this sum, by only making the Aj ’s for which λj = 6 0 intervene, each exponent of π is > 0. This is therefore a k[π −1 ]-elementary operation on the columns, i.e. k[t]-elementary, and we do not change the k[t]-module generated by the columns. Moreover, v(A01 ) > v(A1 ); indeed, (by remembering that λ1 = 1): def A01 /π v(A1 ) = s = and v(s) > 0 since by hypothesis P P λj 6=0 λj 6=0 λj Aj /π v(Aj ) , λj Aj = 0. We iterate this process which P eventually stops because at each step, the sum v(Aj ) strictly increases while j being bounded above by v(det A), invariant under the above operations. P 3. Let y = P x, i.e. yi = j pij xj ; we have v(pij ) > 0, v(xj ) > v(x) so v(yi ) > v(x) then v(y) > v(x). By symmetry, v(y) = v(x). The remainder poses no more difficulties. 4. A is A∞ -reduced if and only if every (necessarily nonzero) diagonal coefficient divides (in the A∞ sense) all the coefficients of its column. 734 XII. Prüfer and Dedekind rings 5. Even if it entails replacing A by AQ with suitable Q ∈ GLn (A), we can suppose that A is A∞ -reduced. We will realize some operations A ← P A with P ∈ GLn (A∞ ) (i.e. consider the A∞ -lattice generated by the rows of A), which does not modify the A∞ -reduced character of A. There exists a P ∈ GLn (A∞ ) such that P A is upper triangular and we replace A by P A. Let L1 , . . . , Ln be the rows of A; we then realize the A∞ -elementary operation 12 L2 recall : a22 |A∞ a12 , L1 ← L1 − aa22 which brings a 0 in position a12 (and the new matrix is always triangular and A∞ -reduced). We continue in order to annihilate all the coefficients of the first row (except a11 ); we can then pass to the second row and so on and so forth in order to obtain a diagonal matrix (by constantly using the fact that in an A∞ -reduced triangular matrix, each diagonal coefficient A∞ -divides all the coefficients of its column). As A∞ is a DVR, we can make sure that the final obtained diagonal matrix is Diag(π d1 , . . . , π dn ) with di ∈ Z. 6a. Let ε be an A-basis of E, ε0 be an A∞ -basis of E 0 and A = Matε,ε0 (IdL ). Then there exist P ∈ GLn (A∞ ) and Q ∈ GLn (A) such that P AQ = Diag(t−d1 , . . . , t−dn ). Let e and e0 be defined by Mate,ε (IdL ) = Q, Matε0 ,e0 (IdL ) = P . Then e is an A-basis of E, e0 an A∞ -basis of E 0 and ei = t−di e0i . 6b. Since tj ei = tj−di e0i , it is clear that tj ei ∈ E ∩ E 0 for 0 6 j 6 di . Conversely, let y ∈ E ∩ E 0 which we express as P P y = i ai ei = i a0i tdi ei , with ai ∈ A and a0i ∈ A∞ , and therefore ai = a0i tdi . If di < 0, we obtain ai = a0i = 0, and if ai = 6 0, 0 6 deg ai 6 di . Hence the stated k-basis. 7. First of all k0 = B ∩ B∞ , so B and B∞ are k0 -vector spaces. Let us show that each ri ∈ A∞ and that in addition, if ei ∈ / B∞ , then v(ri ) > 0, i.e. deg(ri ) < 0. If ei ∈ B∞ , we have ei ∈ B ∩ B∞ = k0 , so also e−1 ∈ k0 ; consequently ri = i e−1 (r e ) ∈ B therefore r ∈ B ∩ K = A . i i ∞ i ∞ ∞ i If ei ∈ / B∞ , we write ei = ri−1 (ri ei ), an equality which proves that ri−1 ∈ / A∞ (let us not forget that ri ei ∈ B∞ ) so v(ri−1 ) < 0, i.e. v(ri ) > 0. Now let c ∈ k0 which we express in the A-basis (ei ) and the A∞ -basis (ri ei ) P P c = i ai ei = i a0i ri ei , ai ∈ A, a0i ∈ A∞ , ai = a0i ri . For the i’s such that ei ∈ k0 , as ri ∈ A∞ , we have ai = a0i ri ∈ A ∩ A∞ = k. It remains to see that for ei ∈ / k0 , ai = 0; the equality ai = a0i ri and the fact that 0 ai ∈ A, ai ∈ A∞ and deg(ri ) < 0 then entail ai = a0i = 0. Recap: the ei ’s which are in k0 form a k-basis of k0 . 8. By letting i = y/x, we have i2 = −1 and  1 0 x 1  1 i   = y+1 i  . The matrix on the left-hand side has determinant 1, therefore (1, i) and (y + 1, i) are two bases of the same A-module. But y + 1 is not integral over A∞ (because x is integral over k[y] = k[y + 1] and is not integral over A∞ ). The basis (1, i) is normal at infinity but not the basis (y + 1, i). Solutions of selected exercises 735 Problem 4. 1. Let z = y − v, (1, z) is an A-basis of B and Au ∩ Az = {0}. To show that bu,v = Au ⊕ Az is an ideal, it suffices to see that z 2 ∈ bu,v . However, y 2 = (z + v)2 = z 2 + 2vz + v 2 , i.e. z 2 + 2vz + uw = 0. 2. As (1, z) is an A-basis of B and (u, z) is an A-basis of bu,v , we obtain the equality A ∩ bu,v = uA. Moreover, every element of B is congruent modulo z to an element of A, therefore A → B/bu,v is surjective uA.  with kernel  u −v The matrix M of (u, y − v) over (1, y) is M = with det(M ) = u, 0 1 which gives N(bu,v ) = uA. We also see that the content of bu,v is 1. The other points are easy. 3. We have bu,v,w = Au ⊕ Az, bw,v,u = Aw ⊕ Az. The product of these two ideals is generated (as an ideal or A-module) by the four elements uw, uz, wz, z 2 , all multiples of z (because z 2 + 2vz + uw = 0). It therefore suffices to see that z ∈ uw, uz, wz, z 2 B = huw, uz, wz, 2vziB = huw, uz, wz, vziB . 2 However, v − uw = f is separable, therefore 1 ∈ hu, w, viA , and z ∈ huz, wz, vziB . As for bu,−v it is Au ⊕ Az with zz = uw and z + z = −2v. The product π of the two ideals bu,v and bu,−v is equal to u2 , uz, uz, zz , with zz = uw, so π ⊆ hui. Finally, −2uv = uz + uz ∈ π and therefore π ⊇ uv, u2 , uw = u hv, u, wi = hui. Finally, with u = u1 u2 , we have bu1 ,v bu2 ,v = Au + Au1 z + Au2 z + Az 2 clearly included in Au + Az = bu,v . As z 2 + 2vz + uw = 0 we obtain Au+Au1 z +Au2 z +Az 2 =Au+Au1 z +Au2 z +Avz =Au+(Au1 +Au2 +Av)z. Hence bu1 ,v bu2 ,v = bu,v ; indeed, 1 ∈ hu1 , u2 , viA because v 2 − u1 u2 w = f is separable, therefore hu1 , u2 , viA z = Az. 4a. Let b be a nonzero finitely generated ideal of B.  As a free  A-module of a b rank 2, it admits an A-basis (e1 , e2 ) and we let M = be the matrix 0 d of (e1 , e2 ) over (1, y). We write that b is an ideal, i.e. yb ⊆ b: the membership ye1 ∈ Ae1 ⊕ Ae2 gives a multiple a of d and the membership  ye2 ∈ Ae 1 ⊕ Ae2 u −v gives a multiple b of d. Ultimately, M is of the form M = d and we 0 1 obtain b = dbu,v . We see that hdiA is the content of b, and d is unique if we impose d as unitary. 2 4b. We have seen that b = dbu,v therefore b = dbu,−v  then bb = d uB. u −v But we also have N(b) = d2 uA because d is the matrix of an A-basis 0 1 of b over an A-basis of B. We deduce that bb = N(b)A. Then, for two nonzero ideals b1 , b2 of B N(b1 b2 )B = b1 b2 b1 b2 = b1 b1 b2 b2 = N(b1 )N(b2 )B, hence N(b1 b2 ) = N(b1 )N(b2 ) since the three ideals are principal ideals of A. 4c. First of all, if b is a nonzero finitely generated ideal of B, it contains a regular element b and a = N(b) = be b is a regular element of b contained in A. We then 736 XII. Prüfer and Dedekind rings have a surjection B/aB  B/b and as B/aB is a finite dimensional k-vector space, the same goes for B/b . If d ∈ A \ {0}, we have an exact sequence 0 → B/b0 ' dB/db0 → B/db0 → B/dB → 0. We deduce that deg(db0 ) = deg(b0 ) + deg(dB) = deg(b0 ) + deg(d2 ). In particular, for b0 = bu,v and b = dbu,v , we obtain deg(b) = deg(u) + deg(d2 ) = deg N(b). This shows that deg is additive. 5. We first provide a reduction algorithm of (u, v) satisfying v 2 ≡ f mod u. Even if it entails replacing v by v mod u, we can assume that deg v < deg u. If deg u 6 g, then, by rendering u monic, (u, v) is reduced. Otherwise, with v 2 − uw = f let us show that deg w < deg u; this will allow us to consider u e := w, e v := (−v) mod u e, having the property bu,v ∼ bũ,ṽ and to iterate the process (u, v) ← (u e, e v ) until we obtain the inegality deg u 6 g. To show deg u > g ⇒ deg w < deg u, we consider the two following cases; either deg(uw) > 2g + 1 = deg f , in which case the equality f + uw = v 2 provides deg(uw) = 2 deg v < 2 deg u so deg w < deg u; or deg(uw) 6 2g + 1, in which case deg w 6 2g + 1 − deg u < 2g + 1 − g so deg w 6 g < deg u. Every ideal bu,v is therefore associated with a reduced ideal and as every nonzero finitely generated ideal b of B is associated with an ideal bu,v , b is therefore associated with a reduced ideal. 6a. Let w satisfy v 2 − uw = f = y 2 ; as (u, v) is reduced, we have deg v < deg u 6 g < g + 1 6 deg w and deg u + deg w = 2g + 1. 0 Let y = y − v and z = au + by 0 with a, b ∈ A. We have y 0 + y 0 = −2v, yy 0 = −(y 2 − v 2 ) = uw, so N(z) = zz = a2 u2 + aub(y 0 + y 0 ) + b2 y 0 y 0 = u(a2 u − 2vab + b2 w), hence N(z)/N(bu,v ) = N(z)/u = a2 u − 2vab + b2 w, a polynomial whose degree we need to bound from below. Consider the special case b = 0 (therefore a 6= 0) in which case N(z)/u = a2 u, of degree 2 deg a + deg u > deg u. Here we see that the equality deg(N(z)/u) = deg u is reached if and only if deg a = 0, i.e. if and only if z ∈ k× u. There is also the special case a = 0 (therefore b 6= 0) in which case N(z)/u = b2 w, which is of degree 2 deg b + deg w > deg u. Therefore it remains to show that for a 6= 0, b = 6 0, we have deg(N(z)/u) > deg u. We introduce α = deg a > 0, β = deg b > 0 and d1 =deg(a2 u)=2α+degu, d2 =deg(vab)=α+β +degv, d3 =deg(b2 w)=2β +degw. We have d1 +d3 ≡ deg u+deg w = 2g+1 mod 2 so d1 6= d3 . Also, α > β ⇒ d1 > d2 and finally β > α ⇒ d3 > max(d1 , d2 ). If d3 > max(d1 , d2 ), then deg(N(z)/u) = d3 > deg w > deg u. If d3 6 max(d1 , d2 ), then α > β, so d1 > d2 , then d1 > max(d2 , d3 ). We therefore have deg(N(z)/u) = d1 = 2α + deg u > 2 + deg u > deg u. 6b. We have b0 = dbu1 ,v1 and deg(b0 ) = 2 deg(d) + deg(bu1 ,v1 ). We can therefore assume that d = 1. We have c, c1 ∈ B \ {0} with cbu,v = c1 bu1 ,v1 , which we Solutions of selected exercises 737 denote by b. We have N(b) = uN(c) = u1 N(c1 ). The minimum degree of the N(z)/N(b)’s for z ∈ b \ {0} is deg u and it is uniquely reached for z ∈ k× cu. u2 N(c ) For z = c1 u1 ∈ b, we have N(z) = u21 N(c1 ) therefore N(z)/N(b) = u11 N(c11 ) = u1 . We therefore have deg u1 > deg u, i.e. deg(bu1 ,v1 ) > deg(bu,v ). The equality is only possible if c1 u1 ∈ k× cu. In this case, ubu1 ,v1 = u1 bu,v . Since the content of ubu1 ,v1 is u, and since that of u1 bu,v is u1 , the previous equality entails u = u1 then v = v1 . 0 7a. We have FX (X, Y ) = −f 0 (X), FY0 (X, Y ) = 2Y . 0 0 As char(k) 6= 2, we obtain f (X) ∈ hF, FX , FY0 i, then 1 ∈ hF, FX , FY0 i. 7b. We realize the change of variable x = 1/x in y 2 = f (x) = x2g+1 + a2g x2g + · · · + a1 x + a0 , and we multiply by x2g+2 to obtain  y2 = x + a2g x2 + · · · + a0 x2g+2 = x 1 + xh(x) with y = yxg+1 . Recap: the change of variable x = 1/x, y = y/xg+1 gives k(x) = k(x) and k(x, y) = k(x, y), and y is integral over k[x], a fortiori over A∞ . Let B∞ = k[x, y]hx,yi ; in this localized ring, we have hx, yi = hyi since x = y2 . Conclusion: B∞ is a DVR with regular parameter y. 1 + xh(x) Finally, let W be a valuation ring for k(x, y) containing k. If x ∈ W, then k[x] ⊂ W. Then y, integral over k[x], is in W, therefore B ⊂ W. If x ∈ / W, we have x−1 ∈ m(W), so A∞ = k[x−1 ]hx−1 i ⊂ W, and W = B∞ . Problem 5. Let ε be the unit defined by ε = β − α . 1. We decompose G and H into homogeneous components Gi , Hj , G = Ga + · · · + Gb , a 6 b, H = Hc + · · · + Hd , c 6 d. The lower homogeneous component of GH, of degree a + c, is Ga Hc while the upper homogeneous component of GH, of degree b + d, is Gb Hd . We deduce that a + c = N , b + d = N + 1; we cannot have a < b and c < d at the same time (because we would then have a + c + 2 6 b + d, i.e. N + 2 6 N + 1). If a = b, then G is homogeneous, if c = d it is H. Suppose that FN , FN +1 are coprime and let F = GH be a factorization; for example, G is homogeneous of degree g; we deduce that H = HN −g + HN +1−g and that FN = GHN −g , FN +1 = GHN +1−g : G is a common factor of FN , FN +1 , so G is invertible. The converse is easy. The polynomials (X 2 + Y 2 )2 and αX 2 Y + βY 3 = Y (αX 2 + βY 2 ) are coprime if and only if the polynomials X 2 + Y 2 and αX 2 + βY 2 are coprime; i.e. if and only if α 6= β. 2. The reader will verify that (0, 0) is the only singular point; we have the more precise result 0 ε2 X 5 , ε2 Y 5 ∈ F, FX , FY0 . 3. Let Y = T X in F (X, Y ). We obtain F (X, T X) = X 3 G(X, T ) with G(X, T ) = XT 4 + βT 3 + 2XT 2 + αT + X. The polynomial G is primitive (in T ) and (x = 0, t = 0) is a simple point of the curve G = 0. With a4 = x, a3 = β, a2 = 2x, a1 = α, a0 = x, we consider the 738 XII. Prüfer and Dedekind rings integral elements (by Emmanuel’s trick) b4 = a4 , b3 = a3 + tb4 , b2 = a2 + tb3 , b1 = a1 + tb2 . Thus, b4 = x, b3 = β + y and b2 = 2x + (β + y)y/x. P P It is clear that a4 , a3 , . . . , a0 ∈ i Abi + i Atbi . As a3 − a1 = ε is invertible, P P there are ui , vi ∈ A such that 1 = i ui bi + i vi tbi . We formally write (without worrying about the nullity of a bi ) P P t= b1 t b1 = ··· = b4 t b4 = Pi i vi bi t vi bi = Pi i ui bi t ui bi . Thus, t = y/x = a/b = c/d with a, b, c, d ∈ B and a + d = 1. The equalities by = ax, dy = cx, a + d = 1 are those coveted. Thus we obtain q hx, yiB = hxiB with q = hd, biB . Here by letting a = b2 t − b4 t, b = b2 − b4 , c = b3 t − b1 t, d = b3 − b1 , we have ε = a + d. By letting g0 = 1/(1 + t2 ), g1 = tg0 , we find b = εg1 , d = εg0 , so q = hg0 , g1 iB . We will show (question 5 ) that B = k[g0 , g1 ], so B/q = k. 4. A geometric idea leads to the equality k(t) = k(x, y). It is the parameterization of the trifolium. The polynomial defining the curve is of degree 4 and the origin is a singular point of multiplicity 3. Therefore a rational line passing through the origin intersects the curve at a rational point. Algebraically, this corresponds to the fact that the polynomial G(X, T ) is of degree 1 in X G(T, X) = (T 4 + 2T 2 + 1)X + βT 3 + αT = (T 2 + 1)2 X + T (βT 2 + α), hence x=− t(βt2 + α) , (t2 + 1)2 y = tx = − t2 (βt2 + α) . (t2 + 1)2 At t = 0, we have (x, y) = (0, 0). What are the other values of the parameter t  for which x(t), y(t) = (0, 0)? We have to first find the zeros of x(t), a rational fraction of height 4. There is the value t = ∞, for which y(t) = −β. If α = 0, we only have two zeros of x: t = 0 (of multiplicity 3) and t = ∞ (of multiplicity 1). If β = 0, we only have two zeros of x: t = 0 (of multiplicity 1) and t = ∞ (of multiplicity 3). p If β 6= 0, we have two other zeros of x (eventually coinciding): t = ± −α/β. We can render this more uniform by making the quadratic character of −αβ intervene, see question 7. Remark: in all the cases, at t = ∞, we have (x, y) = (0, −β). 5. We know by Exercise 8 that k[g0 , g1 ] is an integrally closed ring, the integral closure of k[g0 ] in k(t). To obtain a k-relator between g0 and g1 , we substitute t = g1 /g0 in the expression g0 = 1/(1 + t2 ), which gives g02 − g0 + g12 = 0 and confirms that g1 is integral over k[g0 ]. At t = 0, we have (g0 , g1 ) = (1, 0); this point is a nonsingular point of the curve g02 − g0 + g12 = 0. Actually the conic C(g0 , g1 ) = g02 − g0 + g12 is smooth over every ring since ∂C ∂C 1 = −4C + (2g0 − 1) ∂g + 2g1 ∂g . 0 1 Solutions of selected exercises 739 The same goes for the homogenized conic denoted by C, C = g02 − g0 g2 + g12 , ∂C ∂C ∂C , , which satisfies hg0 , g1 , g2 i2 ⊆ C, ∂g 0 ∂g1 ∂g2 g0 = − ∂C , ∂g2 g12 = C + (g0 − g2 ) ∂C , ∂g2 g2 = − ∂C ∂C −2 . ∂g0 ∂g2 We dispose of P1 → P2 defined by (u : v) 7→ (g0 : g1 : g2 ) = (u2 : uv : u2 + v 2 ) whose image is the homogeneous conic C = 0; more or less, this is a Veronese embedding P1 → P2 of degree 2. Moreover, the decomposition into simple elements provides the following expressions of x, y, b3 t, b2 t in k[g0 , g1 ] x = εg0 g1 − βg1 , y = εg02 + (2β − α)g0 − β = (g0 − 1)(β − εg0 ) b2 t = 2y + (β + y)t2 = −α + βg0 − εg02 , b3 t = (2β − α)g1 − εg0 g1 . We see that g0 is integral over k[y], therefore integral over k[x]; as g1 is integral over k[g0 ], it also is integral over k[x]. We have just obtained the equality B = k[g0 , g1 ]. First consider k[y] ⊂ k[g0 ] ⊂ k[g0 , g1 ]; it is clear that (1, g0 ) is a basis of k[g0 ] over k[y] and (1, g1 ) is a basis of k[g0 , g1 ] over k[g0 ], therefore (1, g0 , g1 , g0 g1 ) is a basis of k[g0 , g1 ] over k[y] (but not over A = k[x]). Let us show that (1, y, b3 t, b2 t) is an A-basis, let E be the generated A-module. By using y − b2 t = ε(g0 − 1) and x + b3 t = εg1 , we see that g0 , g1 ∈ E. Finally, E contains x + βg1 = εg0 g1 , so g0 g1 ∈ E and E = k[g0 , g1 ] = B. An invertible ideal b of B contains a regular element therefore B/b is a finite dimensional k-vector space, which allows us to define deg b by deg b = dimk B/b ; we then have (see Proposition 5.5 and its Corollary 5.6) deg(bb0 ) = deg(b)+deg(b0 ). We deduce that deg hx, yiB = 4 − 1 = 3. 6. We have p1 = hg0 − 1, g1 i, therefore to show the equality p21 = g0 − 1, g12 , it suffices to see that g0 − 1 ∈ (g0 − 1)2 , g12 . This results from the equality 1 − g0 = (1 − g0 )2 + g12 which stems from g02 − g0 + g12 = 0. 7. Let X = U Y in F (X, Y ). We obtain F (U Y, Y ) = U 3 H(U, Y ) with H(U, Y ) = Y U 4 + (2Y + α)U 2 + Y + β, H(U, 0) = αU 2 + β. This polynomial H = a04 U 4 + a02 U 2 + a00 is primitive in U (we have a02 = 2a04 + α and a00 = a04 + β therefore  = a00 − a02 + a04 ). It satisfies H(u, y) = 0 with u = x/y; the associated element b03 determined by Emmanuel’s trick is x and we therefore have b03 u ∈ B with b03 u = x2 /y = εg0 − β − y. In root t of βt2 + α = 0, we have g0 = β/ε and g12 = −αβ/ε2 , which renders the introduction of the ideal a = εg0 − β, ε2 g12 + αβ natural. We verify the equality y, x2 /y B = εg0 − β, ε2 g12 + αβ . We then have hx, yiB = p1 a and deg a = 2. If −αβ is not a square, then a is prime. Otherwise, we have a = p2 p3 with p2 , p3 expressed with the two square roots of −αβ. We have p2 = p3 if and only if the two square roots are confused; this happens when αβ = 0 for example or in characteristic 2. Finally, for α = 0, we have p1 = p2 = p3 . 740 XII. Prüfer and Dedekind rings Bibliographic comments Regarding the genesis of the theory of ideals of number fields developed by Dedekind, we can read the articles of H. Edwards [70] and of J. Avigad [4]. The Prüfer domains were introduced by H. Prüfer in 1932 in [148]. Their central role in the multiplicative theory of ideals is highlighted in the reference book on the subject [Gilmer]. See also the bibliographic comments at the end of Chapter VIII. In the classical literature a coherent Prüfer ring is often called a semihereditary ring (according to item 3 in Theorem 4.1), which is not very pretty. These rings are signaled as important in [Cartan & Eilenberg]. The constructive proof of item 1 of Theorem 4.5 is given in Chapter 1, Proposition 6.1. A hereditary ring is a ring in which every ideal is projective. This notion is badly defined in constructive mathematics because of the non-legitimate quantification “every ideal.” An example of such a non-Noetherian ring is the subring of a countable product of the field F2 , formed by the sequences which are either null almost everywhere, or equal to 1 almost everywhere. The most interesting case is that of Noetherian coherent Prüfer rings, which we described in classical mathematics as the rings in which every ideal is finitely generated projective. Our definition of a Dedekind ring (freed from the integrity constraint) corresponds exactly (in classical mathematics) to the notion of a Noetherian hereditary ring. Fairly comprehensive presentations on arithmetic rings and Prüfer rings written in the style of constructive mathematics can be found in the articles [68, Ducos&al.] and [125, Lombardi]. “Emmanuel’s trick” of Lemma 4.7 appears in Emmanuel Hallouin’s PhD thesis [96]. Theorem 4.8 is due to Gilmer and Hoffmann [91]. Theorem 6.1 for the case of a Prüfer domain is given by Heitman and Levy in [99]. Theorem 6.2 has been proven in classical mathematics by Quentel in [149]. The constructive proof is due to I. Yengui. Theorem 6.3 is classical (Steinitz’s theorem) for Dedekind rings. It has been generalized for the Prüfer domains having the one and a half property in [116, Kaplansky] and [99, Heitmann&Levy]. A detailed inspection of our proof actually shows that the hypothesis “ring of dimension at most 1” could be weakened to “ring having the one and a half property.” We find Theorem 6.7 (see also Exercise 17) in [24, Brewer&Klinger] for the integral case. It has been generalized to the case of a pp-ring in [52, Couchot]. Lemma 5.7 and Theorem 7.12 are due to Claire Tête and Lionel Ducos. Bibliographic comments 741 Problem 3 is based on the article [101, Hess]. Theorem III -8.12 says that if A is integrally closed, the same goes for A[X]. A constructive proof of the same result for normal rings is given in [?]. Chapter XIII Krull dimension Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . 1 Spectral spaces . . . . . . . . . . . . . . . . . . . . . . . The Zariski lattice and the Zariski spectrum . . . . . . . . Spectrum of a distributive lattice . . . . . . . . . . . . . . . Spectral subspaces . . . . . . . . . . . . . . . . . . . . . . . A heuristic approach to the Krull dimension . . . . . . . . 2 A constructive definition . . . . . . . . . . . . . . . . . Iterated boundaries, singular sequences, complementary sequences . . . . . . . . . . . . . . . . . . . . . . . . . . . . A regular sequence “is not” singular . . . . . . . . . . . . . Lower bounds of the Krull dimension . . . . . . . . . . . . 3 A few elementary properties of the Krull dimension 4 Integral extensions . . . . . . . . . . . . . . . . . . . . 5 Dimension of geometric rings . . . . . . . . . . . . . . Polynomial rings over a discrete field . . . . . . . . . . . . An interesting corollary . . . . . . . . . . . . . . . . . . . . Geometric rings . . . . . . . . . . . . . . . . . . . . . . . . 6 Krull dimension of distributive lattices . . . . . . . . 7 Dimension of morphisms . . . . . . . . . . . . . . . . . Definition and first properties . . . . . . . . . . . . . . . . The minimal pp-ring closure of a reduced ring . . . . . . . Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Valuative dimension . . . . . . . . . . . . . . . . . . . . Dimension of valuation rings . . . . . . . . . . . . . . . . . – 743 – 744 744 745 745 746 747 747 751 756 756 757 760 761 761 762 763 763 766 766 768 772 774 774 744 XIII. Krull dimension Valuative dimension of a commutative ring . . . . . . . . . 777 Valuative dimension of a polynomial ring . . . . . . . . . . 779 9 Lying Over, Going Up and Going Down . . . . . . . 782 Exercises and problems . . . . . . . . . . . . . . . . . . 787 Solutions of selected exercises . . . . . . . . . . . . . . . . . 794 Bibliographic comments . . . . . . . . . . . . . . . . . 802 Introduction In this chapter we introduce the Krull dimension in its elementary constructive version and we compare it to the corresponding classical notion. Next we establish the first properties of this dimension. The ease with which we obtain the Krull dimension of a polynomial ring over a discrete field shows that the constructive version of the Krull dimension can be seen as a conceptual simplification of the usual classical version. We then apply the same type of ideas to define the Krull dimension of a distributive lattice, that of a morphism of commutative rings, then the valuative dimension of commutative rings. We establish a few basic important theorems regarding these notions. We finish by indicating the constructive versions of the usual classical notions of Lying Over, Going Up, Going Down and Incomparability, with some applications. 1. Spectral spaces In this section, we describe the classical approach to Krull dimension. For us, this is above all a matter of heuristics. It is for this reason that we give no proofs. This will have no incidence in the rest of the book. Indeed, the constructive aspect of the spectral spaces is entirely concentrated in the distributive lattices obtained by duality. In particular, the constructive aspect of the Krull dimension is entirely concentrated in the Krull dimension of the distributive lattices and it can be defined completely independently from the spectral spaces. Nevertheless the heuristic given by the spectral spaces is essential to the understanding of the small miracle that will happen with the introduction of the dual constructive notions. This small miracle will only fully be realized in the following chapters, where we will see the transformation of many beautiful abstract theorems into algorithms. §1. Spectral spaces 745 The Zariski lattice and the Zariski spectrum Recall that we denote by DA (a) the nilradical of the ideal a in the ring A and that the Zariski lattice Zar A is the set of the DA (x1 , . . . , xn )’s (for n ∈ N and x1 , . . . , xn ∈ A). We therefore have x ∈ DA (x1 , . . . , xn ) if and only if a power of x belongs to hx1 , . . . , xn i. The set Zar A, ordered by the inclusion relation, is a distributive lattice with DA (a1 ) ∨ DA (a2 ) = DA (a1 + a2 ) and DA (a1 ) ∧ DA (a2 ) = DA (a1 a2 ). 1.1. Definition. We call the set of strict prime ideals of the ring A the Zariski spectrum of A and we denote it by Spec A. We equip it with the topology that has as its basis of open sets the DA (a) = { p ∈ Spec A | a ∈ / p }. We denote by DA (x1 , . . . , xn ) the set DA (x1 ) ∪ · · · ∪ DA (xn ). For p ∈ Spec A and S = A \ p, we denote AS by Ap (the ambiguity between the two contradictory notations Ap and AS is removed in practice by the context). In classical mathematics, we then obtain the following result. 1.2. Theorem∗. 1. The compact-open subspaces of Spec A are the open sets DA (x1 , . . . , xn ). 2. The map DA (x1 , . . . , xn ) 7→ DA (x1 , . . . , xn ) is well-defined. 3. It is an isomorphism of distributive lattices. Spectrum of a distributive lattice The Zariski spectrum is the paradigmatic example of a spectral space. Spectral spaces were introduced by Stone [176] in 1937. They can be characterized as the topological spaces satisfying the following properties • the space is quasi-compact, • every open set is a union of compact-open subspaces, • the intersection of two compact-open subspaces is a compact-open subspace, • for two distinct points, there is an open set containing one of them but not the other, • every irreducible closed set is the adherence of a point. The compact-open subspaces then form a distributive lattice, the supremum and the infimum being the union and the intersection, respectively. A continuous map between spectral spaces is said to be spectral if the inverse image of every compact-open subspace is a compact-open subspace. Stone’s fundamental result can be stated as follows. 746 XIII. Krull dimension In classical mathematics the category of spectral spaces and spectral maps is anti-equivalent to the category of distributive lattices. Here is how this works. First of all if T is a distributive lattice, a prime ideal is an ideal p which satisfies x ∧ y ∈ p ⇒ (x ∈ p or y ∈ p), 1T ∈ / p. The spectrum of T, denoted by Spec T, is then defined as the space whose points are the prime ideals of T and which has a basis of open sets given by the subsets DT (a) := { p ∈ Spec T | a ∈ / p } for a ∈ T. If ϕ : T → V is a morphism of distributive lattices, we define the map Spec ϕ : Spec V → Spec T, p 7→ ϕ−1 (p). It is a spectral map and all of this defines Spec as a contravariant functor. We show that the DT (a)’s are all the compact-open subspaces of Spec T. Actually Theorem∗ 1.2 applies to every distributive lattice T: 1. The compact-open subspaces of Spec T are exactly the DT (u)’s. 2. The map u 7→ DT (u) is well-defined and it is an isomorphism of distributive lattices. In the other direction, if X is a spectral space we let Oqc(X) be the distributive lattice formed by its compact-open subspaces. If ξ : X → Y is a spectral map, the map Oqc(ξ) : Oqc(Y ) → Oqc(X), U 7→ ξ −1 (U ) is a homomorphism of distributive lattices. This defines Oqc as a contravariant functor. The stated anti-equivalence of categories is defined by the functors Spec and Oqc. It generalizes the anti-equivalence given in the finite case by Theorem XI -5.6. Note that the empty spectral space corresponds to the lattice 1, and that a reduced spectral space at a point corresponds to the lattice 2. Spectral subspaces By definition, a subset Y of a spectral space X is a spectral subspace if Y is a spectral space by the induced topology and if the canonical injection Y → X is spectral. This notion is actually exactly the dual notion of the notion of a quotient distributive lattice. In other words a spectral map α : Y → X identifies Y with a spectral subspace of X if and only if the homomorphism of distributive lattices Oqc(α) identifies Oqc(Y ) to a quotient distributive lattice of Oqc(X). §2. A constructive definition 747 The closed subspaces of X are spectral and correspond to the quotients by the ideals. More precisely an ideal a of Oqc(X) = T defines the closed set VT (a) = { p ∈ X | a ⊆ p }, (provided we identify the points of X with the prime ideals of Oqc(X)) and we then have a canonical isomorphism  Oqc(VT (a) ' Oqc(X)/(a = 0) . The irreducible closed sets correspond to the prime ideals of Oqc(X). Finally, the compact-open subspaces correspond to the quotients by principal filters  Oqc(DT (u) ' Oqc(X)/(↑ u = 1) . A heuristic approach to the Krull dimension Note moreover that the Zariski spectrum of a commutative ring is naturally identified with the spectrum of its Zariski lattice. In classical mathematics, the notion of Krull dimension can be defined, for an arbitrary spectral space X, as the maximal length of the strictly increasing chains of irreducible closed sets. An intuitive way to apprehend this notion of dimension is the following. The dimension can be characterized by induction by saying that on the one hand, the dimension −1 corresponds to the empty space, and on the other hand, for k > 0, a space X is of dimension at most k if and only if for every compact-open subspace Y , the boundary of Y in X is of dimension at most k − 1 (this boundary is closed therefore it is a spectral subspace of X). Let us see, for example, for a commutative ring A, how we can define the boundary of the open set DA (a) in Spec A. The boundary is the intersection of the adherence of DA (a) and of the complementary closed set of DA (a), which we denote by VA (a). The adherence of D(a) is the intersection of all the V(x)’s that contain D(a), i.e. such that D(x) ∩ D(a) = ∅. As D(x) ∩ D(a) = D(xa), and as we have D(y) = ∅ if and only if y is nilpotent, we obtain a heuristic approach to the ideal “Krull boundary of a,” which is the ideal generated by a on the one hand (which corresponds to V(a)), and by all the x’s such that xa is nilpotent on the other hand (which corresponds to the adherence of D(a)). 2. Constructive definition and first consequences In classical mathematics, the Krull dimension of a commutative ring is defined as the maximum (eventually infinite) of the lengths of the strictly increasing chains of strict prime ideals (beware, a chain p0 ( · · · ( p` is 748 XIII. Krull dimension said to be of length `). Since the complement of a prime ideal is a prime filter, the Krull dimension is also the maximum of the lengths of the strictly increasing chains of prime filters. As this definition is impossible to manipulate from an algorithmic point of view, we replace it in constructive mathematics by an equivalent definition (in classical mathematics) but of a more elementary nature. The quantification over the set of prime ideals of the ring is then replaced by a quantification over the elements of the ring and the non-negative integers. Since this discovery (surprisingly it is very recent) the theorems that make the Krull dimension intervene have been able to become fully integrated into constructive mathematics and into Computer Algebra. 2.1. Definition. Let A be a commutative ring, x ∈ A and a be a finitely generated ideal. (1) The Krull upper boundary of a in A is the quotient ring √ AaK := A/JAK (a) where JAK (a) := a + ( 0 : a). (1) Write JAK (x) for JAK (xA) and AxK for AxA K . This ring is called the upper boundary of x in A. We will say that JAK (a) is the Krull boundary ideal of a in A. (2) The Krull lower boundary of x in A is the localized ring K −1 K N AK x := SA (x) A where SA (x) = x (1 + xA). (2) K We will say that SA (x) is the Krull boundary monoid of x in A. Recall that in classical mathematics the Krull dimension of a ring is −1 if and only if the ring does not admit any prime ideals, which means that it is trivial. The following theorem then gives in classical mathematics an elementary inductive characterization of the Krull dimension of a commutative ring. 2.2. Theorem∗. For a commutative ring A and an integer k > 0 the following properties are equivalent. 1. The Krull dimension of A is 6 k. 2. For all x ∈ A the Krull dimension of AxK is 6 k − 1. 3. For all x ∈ A the Krull dimension of AK x is 6 k − 1. Note: this is a theorem of classical mathematics which cannot admit a constructive proof. In the proof that follows all the prime or maximal ideals and filters are taken in the usual sense in classical mathematics: they are strict. J Let us first show the equivalence of items 1 and 3. Recall that the prime ideals of S −1 A are of the form S −1 p where p is a prime ideal of A which §2. A constructive definition 749 does not intersect S (Fact XI -4.17). The equivalence then clearly results from the two following statements. K (a) Let x ∈ A, if m is a maximal ideal of A it always intersects SA (x). Indeed, if x ∈ m it is clear and otherwise, x is invertible modulo m which means that 1 + xA intersects m. (b) Let a be an ideal, p be a prime ideal with p ⊂ a and x ∈ a \ p; if K p ∩ SA (x) is nonempty, then 1 ∈ a. Indeed, let xn (1 + xy) ∈ p; since x ∈ / p, we have 1 + xy ∈ p ⊂ a, which gives, with x ∈ a, 1 ∈ a. Thus, if p0 ( · · · ( p` is a chain with p` maximal, it is shortened by at least K its last term when we localize at SA (x), and it is only shortened by its last term if x ∈ p` \ p`−1 . The equivalence of items 1 and 2 is proven dually, by replacing the prime ideals by the prime filters. Let π : A → A/a be the canonical projection. We notice that the prime filters of A/a are exactly the π(S)’s, where S is a prime filter of A that does not intersect a (Fact XI -4.16). It then suffices to prove the two dual statements of (a) and (b) which are the following. (a’) Let x ∈ A, if S is a maximal filter of A it always intersects JAK (x). Indeed, if x ∈ S it is clear and otherwise, since S is maximal, SxN contains 0, which means that there is an integer √ n and an element s of S such that sxn = 0. Then (sx)n = 0 and s ∈ ( 0 : x) ⊆ JAK (x). (b’) Let S 0 be a prime filter contained in a filter S and x ∈ S\S 0 . If S 0 ∩JAK (x) is nonempty, then S = A. Indeed, let ax + b ∈ S 0 with (bx)n = 0. Then, since x ∈ / S 0 , we have ax ∈ / S 0 and, given that S 0 is prime, b ∈ S 0 ⊆ S. As n x ∈ S, we obtain (bx) = 0 ∈ S.  In constructive mathematics we replace the usual definition given in classical mathematics by the following more elementary definition. 2.3. Definition. The Krull dimension (denoted by Kdim) of a commutative ring A is defined by induction as follows 1. Kdim A = −1 if and only if A is trivial. 2. For k > 0, Kdim A 6 k means ∀x ∈ A, Kdim(AK x ) 6 k − 1. Naturally, we will say that A is infinite dimensional if and only if for every integer k > 0 we have the implication Kdim A 6 k ⇒ 1 =A 0. The following lemma immediately results from the definitions. 2.4. Lemma. A ring is zero-dimensional if and only if it is of dimension at most 0. Note that the terminology “zero-dimensional ring” therefore constitutes a slight abuse of language because affirming that the dimension is less than or equal to 0 leaves the possibility of a dimension equal to −1 open, which means that the ring is trivial. 750 XIII. Krull dimension Examples. 1) If x is nilpotent or invertible in A, the boundary ideal and the boundary monoid of x in A are both equal to A. The two boundary rings are trivial. 2) For x 6= 0, 1, −1 in Z, the boundary rings ZxK = Z/xZ and ZK x = Q are zero-dimensional. We therefore find that Kdim Z 6 1 again. 3) Let K be a field contained in a discrete algebraically closed field L. Let a be a finitely generated ideal of K[X1 , . . . , Xn ] and A = K[X1 , . . . , Xn ]/a. Let V be the affine variety corresponding to a in Ln and W be the subvariety of V defined by f . Then the “boundary of W in V ,” defined as the intersection of W with the Zariski closure of its complement in V , is the affine variety corresponding to the ring AfK . We abbreviate this as boundaryV Z(f ) = ZV (boundary of f ). 4) Let A be integral and k > 0: Kdim A 6 k is equivalent to Kdim(A/aA ) 6 k − 1 for every regular a (use the Krull boundary ideals). 5) Let A be a residually discrete local ring and k > 0: Kdim A 6 k is equivalent to Kdim A[1/a] 6 k − 1 for all a ∈ Rad A (use the Krull boundary monoids). Comments. 1) The advantage of the constructive definition of the Krull dimension with respect to the usual definition is that it is simpler (no quantification over the set of prime ideals) and more general (no need to assume the axiom of choice). However, we have only defined the sentence “A is of dimension at most k.” 2) In the context of classical mathematics. The Krull dimension of A can be defined as an element of {−1} ∪ N ∪ {+∞} by letting Kdim A = inf { k ∈ Z, k > −1 | Kdim A 6 k } , (with inf ∅Z = +∞). This definition based on the constructive definition 2.3 is equivalent to the usually given definition via chains of prime ideals (see Theorem∗ 2.2). 3) From the constructive point of view, the previous method does not define the Krull dimension of A as an element of {−1} ∪ N ∪ {+∞}. Actually it so happens that the concept in question is generally not necessary (but the reader must take our word for it). The most similar point of view to classical mathematics would be to look at Kdim A as a subset of N ∪ {−1}, defined by { k ∈ Z, k > −1 | Kdim A 6 k } . We then reason with (eventually empty) final subsets of N ∪ {−1}, the order relation is given by the reversed inclusion, the upper bound by the intersection and the lower bound by the union. This approach finds its limit with the “counterexample” of the real number field (see the comment on page 762). §2. A constructive definition 751 We use in constructive mathematics the following notations, to be closer to the classical language 2.5. Notation. Let A, B, (Ai )i∈I , (Bj )j∈J be commutative rings (with I, J finite). – Kdim B 6 Kdim A means ∀` > −1 (Kdim A 6 ` ⇒ Kdim B 6 `). – Kdim B = Kdim A means Kdim B 6 Kdim A and Kdim B > Kdim A. – supj∈J Kdim Bj 6 supi∈I Kdim Ai means ∀` > −1  &i∈I Kdim Ai 6 ` ⇒ &j∈J Kdim Bj 6 ` . – supj∈J Kdim Bj = supi∈I Kdim Ai means ∀` > −1  &i∈I Kdim Ai 6 ` ⇔ &j∈J Kdim Bj 6 ` . Iterated boundaries, singular sequences, complementary sequences Definition 2.3 can be rewritten in terms of algebraic identities. For this, we introduce the notion of a singular sequence. 2.6. Definition. For a sequence (x) = (x0 , . . . , xk ) in A we define the iterated Krull boundaries as follows. K 1. An “iterated” version of the monoid SA (x): the set K N N SA (x0 , . . . , xk ) := xN 0 (x1 · · · (xk (1 + xk A) + · · ·) + x1 A) + x0 A) (3) K is a monoid. For an empty sequence, we define SA () = {1}. 2. We define two variants for the iterated Krull boundary ideal. — 2a) The ideal JAK (x0 , . . . , xk ) = JAK (x) is defined as follows   JAK () = {0} , JAK (x0 , . . . , xk ) = DA JAK (x0 , . . . , xk−1 ) : xk + Axk . (4) K K — 2b) The ideal IA (x0 , . . . , xk ) = IA (x) is defined as follows    K N IA (x) := y ∈ A | 0 ∈ xN 0 · · · xk (y + xk A) + · · · + x0 A (5) K For an empty sequence, we define IA () = {0}. We will show (Lemma 2.13) that the two “iterated boundary” ideals defined above have the same nilradical. 2.7. Definition. A sequence (x0 , . . . , xk ) in A is said to be singular if K K 0 ∈ SA (x0 , . . . , xk ), in other words if 1 ∈ IA (x0 , . . . , xk ), i.e. if there exist a0 , . . . , ak ∈ A and m0 , . . . , mk ∈ N such that mk m1 0 xm 0 (x1 (· · · (xk (1 + ak xk ) + · · ·) + a1 x1 ) + a0 x0 ) = 0 (6) 752 XIII. Krull dimension 2.8. Proposition. For a commutative ring A and an integer k > 0, the following properties are equivalent. The Krull dimension of A is 6 k. For all x ∈ A the Krull dimension of AxK is 6 k − 1. Every sequence (x0 , . . . , xk ) in A is singular. For all x0 , . . . , xk ∈ A there exist b0 , . . . , bk ∈ A such that  DA (b0 x0 ) = DA (0),     DA (b1 x1 ) 6 DA (b0 , x0 ),   .. .. .. (7) . . .    DA (bk xk ) 6 DA (bk−1 , xk−1 ),    DA (1) = DA (bk , xk ). Q 5. For all x0 , . . . , xk ∈ A, by letting πi = j<i xj for i ∈ J0..k + 1K (so π0 = 1), there exists an n ∈ N such that n n n n+1 πk+1 ∈ πkn xn+1 , πk−1 xn+1 , π0n xn+1 . 0 k k−1 , . . . , π1 x1 1. 2. 3. 4. For example, for k = 2 item 4 corresponds to the following graph in Zar A. 1 DA (x2 ) DA (b2 ) • • DA (x1 ) DA (b1 ) • • DA (x0 ) DA (b0 ) 0 J The equivalences for dimension 0 are immediate by application of the definitions. 1 ⇔ 3. Suppose the equivalence established for dimension at most k and for every commutative ring. We then see that S −1 A is of dimension at most k if and only if we have for all x0 , . . . , xk ∈ A there exist a0 , . . . , ak ∈ A, s ∈ S and m0 , . . . , mk ∈ N such that mk m1 0 xm 0 (x1 · · · (xk (s + ak xk ) + · · · + a1 x1 ) + a0 x0 ) = 0. (8) Note that with respect to Equation (6), some s ∈ S has replaced the 1 in the center of the expression on the left-hand side. K It therefore remains to replace s by an arbitrary element of SA (xk+1 ), i.e. §2. A constructive definition 753 m k+1 an element of the form xk+1 (1 + ak+1 xk+1 ). The equivalence between 2 and 3 is proven analogously. ` 3 ⇒ 4. We take bk = 1 + ak xk , then b`−1 = xm ` b` + a`−1 x`−1 , successively for ` = k, . . . , 1. 4 ⇒ 2. Proof by induction. The implication for dimension 6 0 is clear. Suppose it established for dimension < k. Assume property 4 and let us show that for all x0 the dimension of B = AxK0 is < k. By induction hypothesis it suffices to find, for all x1 , . . . , xk , some elements b1 , . . . , bk such that  DB (b1 x1 ) = DB (0)     .. .. .. . . . DB (bk xk ) 6 DB (bk−1 , xk−1 )     DB (1) = DB (bk , xk ). However, by hypothesis we have some elements b0 , . . . , bk such that  DA (b0 x0 ) = DA (0)     DA (b1 x1 ) 6 DA (b0 , x0 )   .. .. .. . . .   DA (bk xk ) 6 DA (bk−1 , xk−1 )     DA (1) = DA (bk , xk ). and the inequalities with DA imply the same inequalities with DB . The second inequality means that (b1 x1 )m ∈ hb0 , x0 i (for a certain m); the first tells us that b0 x0 is nilpotent therefore hb0 , x0 i ⊆ JAK (x0 ). Recap: b1 x1 is nilpotent in B. We could also prove 4 ⇒ 3 by a direct, slightly more tedious, computation. 3 ⇔ 5. In the definition of a singular sequence, we can replace all the exponents mi by their maximum n. Once this is acquired, item 5 is a simple reformulation of item 3.  We could therefore have given a definition by induction of the Krull dimension based on the upper boundaries AxK rather than on the lower boundaries AK x : we have just obtained a direct constructive proof (without using Theorem∗ 2.2) of the equivalence between the two possible inductive definitions. Remark. The system of inequalities (7) in item 4 of Proposition 2.8 establishes an interesting and symmetric relation between the two sequences (b0 , . . . , bk ) and (x0 , . . . , xk ). When k = 0, this means DA (b0 ) ∧ DA (x0 ) = 0 and DA (b0 ) ∨ DA (x0 ) = 1, that is that the two elements DA (b0 ) and DA (x0 ) are complements of one another in the lattice Zar A. In Spec A this means that the corresponding 754 XIII. Krull dimension basic open sets are complementary. We therefore introduce the following terminology: when the sequences (b0 , . . . , bk ) and (x0 , . . . , xk ) satisfy the inequalities (7) we say that they are two complementary sequences. 2.9. Fact. Let (x) = (x1 , . . . , xn ) and (y) = (y1 , . . . , ym ) be two sequences of elements of A, A → A0 be a morphism and (x0 ) be the image of (x) in A0 . 1. We have the equivalences K K K K (y) ⇐⇒ 1 ∈ IA (x, y) ⇐⇒ 0 ∈ SA (x, y). ∃z ∈ IA (x) ∩ SA K K 0 2. If A → A0 is surjective, the image of SA (x) is SA 0 (x ). K K 0 3. If A0 = S −1 A, with S being a monoid of A, then S −1 IA (x) = IA 0 (x ). 2.10. Fact. Let a be an ideal of A, Z ⊆ A be an arbitrary subset and x ∈ A. xN (Z + Ax) meets a ⇐⇒ Z meets (a : x∞ ) + Ax. 2.11. Lemma. (Krull boundary ideals à la Richman) For a sequence (x) = (x1 , . . . , xn ) of elements of A, the iterated boundary K ideal IA (x) can be defined recursively as follows  K K K IA () = {0} , IA (x1 , . . . , xn ) = IA (x1 , . . . , xn−1 ) : x∞ n + Axn . For example,  ∞ K K IA (x1 ) = (0 : x∞ (0 : x∞ + Ax2 . 1 ) + Ax1 , IA (x1 , x2 ) = 1 ) + Ax1 : x2 J We temporarily define N () = {0},  N (x1 , . . . , xn ) = N (x1 , . . . , xn−1 ) : x∞ n + Axn Take n = 3 to fix the ideas. Then, for y ∈ A, we have the equivalences   N N ⇐⇒ 0 ∈ xN 1 x2 x3 (y + Ax3 ) + Ax2 + Ax1  N N x2 x3 (y + Ax3 ) + Ax2 meets N (x1 ) ⇐⇒  def N ∞ x3 (y + Ax3 ) meets N (x1 ) : x2 + Ax2 = N (x1 , x2 ) ⇐⇒  def y ∈ N (x1 , x2 ) : x∞ + Ax3 = N (x1 , x2 , x3 ), 3 K which proves that IA (x1 , x2 , x3 ) = N (x1 , x2 , x3 ).  2.12. Lemma. Iterating boundary ideals Let (x) = (x1 , . . . , xn ) and (y) = (y1 , . . . , ym ) be two sequences of elements K 0 of A. Let A0 = A/IA (x) and let (y 0 ) = (y10 , . . . , ym ) be the image of (y) in A0 .  K 0 1. The kernel of the (surjective) canonical morphism A → A0 IA 0 (y ) is K the ideal IA (x, y). §2. A constructive definition 755 K 2. We define A0 = A and Ai = Ai−1 /IA (xi ) for i ∈ J1..nK. Then i−1 the kernel of the (surjective) canonical morphism A → An is the ideal K IA (x). J It suffices to prove the first item for n = 1. Let x = x1 . K Let z ∈ A and z 0 be its image in A0 = A/IA (x). We have the equivalences K 0 z = 0 in A0 /IA 0 (y ) ⇐⇒ 0 N 0 0 A0 ) + · · · + y10 A0 0∈ · · · ym (z + ym   N N K y1 · · · ym (z + ym A) + · · · + y1 A rencontre IA (x)   N N N 0 ∈ x (y1 · · · ym (z + ym A) + · · · + y1 A) + xA K z ∈ IA (x, y). N y10   ⇐⇒ ⇐⇒ ⇐⇒  K 2.13. Fact. For every sequence (x) of elements of A, the ideals IA (x) K and JA (x) have the same nilradical. J For every ideal a and all x ∈ A, we easily prove that the nilradical of the ideal (a : x∞ ) is (DA (a) : x). By using DA (b + c) = DA (DA (b) + c), we deduce that the ideals (a : x∞ ) + Ax and (DA (a) : x) + Ax have the same nilradical. The stated result is then deduced by induction on the length of the sequence (x) by using the recursive definition of the two iterated boundary ideals.  2.14. Lemma. Let S be a monoid of A, A0 = S −1 A, x ∈ A, x0 be its K 0 −1 0 image in A0 and V = SA A is 0 (x ). Then the canonical morphism A → V 1 −1 a localization morphism and induces an isomorphism of T A over V −1 A0 , where T is the monoid xN (S + Ax). J The image in V −1 A0 of the element s + ax ∈ S + Ax is invertible since we can write s + ax = s(1 + ax/s) (with a few notation abuses). Hence a (canonical) morphism ϕ : T −1 A → V −1 A0 . Moreover, since S ⊆ T , we have a morphism A0 → T −1 A. The image under this morphism of 1 + xa/s ∈ 1 + xA0 is invertible because 1 + xa/s = (s + xa)/s, hence a morphism ϕ0 : V −1 A0 → T −1 A. We prove without difficulty that ϕ and ϕ0 are inverses of one another.  2.15. Corollary. Iterating boundary monoids K Let (x) = (x1 , . . . , xn ) and (y) = (y1 , . . . , ym ) in A, A0 = SA (y)−1 A, and (x0 ) = (x01 , . . . , x0n ) be the image of (x) in A0 . K 0 −1 0 Then, the morphism A → SA A gives by factorization an isomor0 (x ) ∼ K −1 K 0 −1 0 phism SA (x, y) A −→ SA0 (x ) A . 1 See Definition XV -4.5. 756 XIII. Krull dimension A regular sequence “is not” singular Item 4 of the following proposition implies that a regular sequence that does not generate the ideal h1i is nonsingular, which explains the title of this subsection. An advantage of the iterated Krull boundaries à la Richman is that over a coherent Noetherian ring they are finitely generated ideals. Another advantage is given by item 1 in the following proposition. 2.16. Proposition. (Regular sequences and Krull dimension) Let (x1 , . . . , xn ) be a regular sequence in A and (y1 , . . . , yr ) be another sequence. K 1. We have IA (x1 , . . . , xn ) = hx1 , . . . , xn i. 2. The sequence (x1 , . . . , xn , y1 , . . . , yr ) is singular in A if and only if the sequence (y1 , . . . , yr ) is singular in A/hx1 , . . . , xn i. 3. The following implication is satisfied for every k > −1, Kdim A 6 n + k =⇒ Kdim A/hx1 , . . . , xn i 6 k. If 1 ∈ / hx1 , . . . , xn i, we have n + Kdim A/hx1 , . . . , xn i 6 Kdim A. 4. If the sequence (x1 , . . . , xn ) is also singular, we have hx1 , . . . , xn i = h1i. Consequently if Kdim A 6 n − 1 every regular sequence of length n generates the ideal h1i. J 1. Immediate computation taking into account the recursive definition given in Lemma 2.12 (item 2 ). 2. We apply item 1 of Lemma 2.12. 3. Results from item 2. 4. Special case of item 2, with the empty sequence (y1 , . . . , yr ).  Lower bounds of the Krull dimension It can be comfortable, sometimes even useful, to define the statement “A is of Krull dimension > k.” First of all Kdim A > 0 must mean 1 6= 0. For k > 1, a possibility would be to ask: “there exists a sequence (x1 , . . . , xk ) which is not singular.” Note that from the constructive point of view this affirmation is stronger than the negation of “every sequence (x1 , . . . , xk ) is singular.” A ring then has a well-defined Krull dimension if there exists an integer k such that the ring is both of Krull dimension > k and of Krull dimension 6 k. The annoying thing is the negative character of the assertion “the sequence (x1 , . . . , xk ) is not singular.” Anyway here it seems impossible to avoid the use of the negation, because we do not see how we could define Kdim A > 0 other than by the negation 1 6= 0. Naturally, in the case where A is a discrete set, “x 6= 0” loses its negative §3. A few elementary properties of the Krull dimension 757 character, and the statement “there exists a sequence (x) = (x1 , . . . , xk ) K such that 0 ∈ / IA (x)” does not strictly speaking contain any negation. However, note that the definitions of Kdim A 6 k and Kdim A > k use an alternation of quantifiers that introduces an infinity (for an infinite ring). Consequently the definition cannot generally be certified by a simple computation: a proof is needed. Note that for the ring R, if we use the strong negation (of positive character), for which x 6= 0 means “x is invertible,” to define the sentence Kdim R > k, then it is absurd that Kdim R > 1. But we cannot constructively prove Kdim R 6 0 (see the comment on page 762). 3. A few elementary properties of the Krull dimension The stated facts in the following proposition are easy (note that we use the notation introduced in 2.5). 3.1. Proposition. Let A be a ring, a be an ideal and S be a monoid. 1. A singular sequence remains singular in A/a and AS . 2. Kdim A/a 6 Kdim A, Kdim AS 6 Kdim A. 3. Kdim(A × B) = sup(Kdim A, Kdim B). 4. Kdim A = Kdim Ared . 5. If a is regular in Ared (a fortiori if it is regular in A), then Kdim A/aA 6 sup(Kdim A, 0) − 1. 6. If a ∈ Rad A, then Kdim A[1/a] 6 sup(Kdim A, 0) − 1. Example. We give a ring B for which Frac(B) is of Krull dimension n > 0, but Bred = Frac(Bred ) is zero-dimensional. Consider B = A/xm , where A is local residually discrete, m = Rad A and x ∈ m. The ring B is local, Rad B = m0 = m/xm and B/m0 = A/m. If x = 0, then x ∈ xm, i.e. x(1 − m) = 0 with m ∈ m, which implies x = 0. For y ∈ m we have y x = 0. Therefore if y ∈ Reg B ∩ m0 , we obtain x = 0. However, we have y ∈ m0 or y ∈ B× , therefore if x 6= 0 and y ∈ Reg B, we obtain y ∈ B× . In other words, if x 6= 0, B = Frac(B). Take A = k[x0 , . . . , xn ]hx0 ,...,xn i where k is a nontrivial discrete field, and x = x0 . We then have A/hx0 i ' k[x1 , . . . , xn ]hx1 ,...,xn i and Kdim A/hx0 i = n. As x0 2 = 0 in B, we have Bred ' A/hx0 i and therefore Kdim B = n. Finally, Frac(Bred ) = k(x1 , . . . , xn ) is a zero-dimensional discrete field. Geometrically, we have considered the ring of a variety “with multiplicities” consisting at a point immersed in a hyperplane of dimension n, and we have 758 XIII. Krull dimension localized at this immersed point. Note: in classical mathematics, if C is Noetherian and reduced, Frac(C) is a finite product of fields, therefore zero-dimensional. For a constructive version we refer to Problem 1 and to [48, Coquand&al.]. 3.2. Concrete local-global principle. (For the Krull dimension) Let S1 , . . ., Sn be comaximal monoids of a ring A and k ∈ N. 1. A sequence is singular in A if and only if it is singular in each of the ASi ’s. 2. The ring A is of dimension at most k if and only if the ASi ’s are of dimension at most k. Q We could have written Kdim A = supi Kdim ASi = Kdim i ASi . J It suffices to prove the first item. Consider a sequence (x0 , . . . , xk ) in A. We look for a0 , . . . , ak ∈ A, and m0 , . . . , mk ∈ N such that   mk 0 1 xm xm 0 1 · · · xk (1 + ak xk ) + · · · + a1 x1 + a0 x0 = 0. An equation of this type at the aj ’s can be solved in each of the ASi ’s. We notice that if in a ring ASi we have a solution for certain exponents m0 , . . . , mk then we also have a solution for any system of larger exponents. Therefore by taking a system of exponents that bound from above each of those obtained separately for each ASi , we obtain a unique linear equation in the aj ’s which has a solution in each ASi . We can therefore apply the basic local-global principle II -2.3.  As the property for a sequence to be singular is of finite character, item 1 in the previous concrete local-global principle actually always applies with a family of comaximal elements, which corresponds to a finite covering of the Zariski spectrum by basic open sets. In the case of a finite covering by closed sets, the result still holds. 3.3. Closed covering principle. (Krull dimension) Let A be a ring, k be an integer > 0, and a1 , . . . , ar be ideals of A. First we assume that the ai ’s form a closed covering of A. 1. A sequence (x0 , . . . , xk ) is singular in A if and only if it is singular in each of the A/ai ’s. 2. The ring A is of dimension at most k if and only if each of the A/ai ’s is of dimension at most k. More generally, without a hypothesis on the ai ’s we have T 3. The ring A i ai is of dimension at most k if and only if each of the A/ai ’s is of dimension at most k. This can beQabbreviated to T Q Kdim A i ai = Kdim A i ai = supi Kdim A/ai = Kdim i A/ai . §3. A few elementary properties of the Krull dimension 759 J It suffices to prove item 1. The sequence (x0 , . . . , xk ) is singular if and only if the monoid S K (x0 , . . . , xk ) contains 0. K K In addition, SA/a (x0 , . . . , xk ) is none other than SA (x0 , . . . , xk ) considered i modulo ai . The result follows by the closed covering principle XI -4.18.  3.4. Theorem. (One and a half theorem) 1. a. If A is zero-dimensional, or more generally if A is local-global, every locally cyclic module is cyclic. b. If A is zero-dimensional, every finitely generated projective ideal is generated by an idempotent. 2. Let A be of dimension at most k, let (x1 , . . . , xk ) be a regular sequence and b be a locally principal ideal containing a = hx1 , . . . , xk i. Then there exists a y ∈ b such that b = hy, x1 , . . . , xk i = hyi + ba = hyi + am for any exponent m > 1. 3. Let A be such that A/Rad A is of dimension at most k, let (x1 , . . . , xk ) be a regular sequence in A/Rad A and b be a finitely generated projective ideal of A containing a = hx1 , . . . , xk i then there exists a y ∈ b such that b = hy, x1 , . . . , xk i = hyi + ba = hyi + am for any exponent m > 1. J Item 1a is a reminder (see item 4 of Theorem V -3.1 for the zero- dimensional rings and item 2 of Theorem IX -6.10 for the local-global rings). 1b. Recall that in an arbitrary ring a finitely generated projective ideal a has as its annihilator an idempotent h. In A/hhi, a is faithful, therefore so is ak , for all k > 1. In A[1/h], a = 0. Therefore Ann(ak ) = Ann(a) = hhi for k > 1. In the zero-dimensional case, since a finitely generated projective ideal is locally principal, it is principal by item 1a, let us denote it by hxi. We know k that for large enough k, hxi = hei with e idempotent. By the preliminary remark Ann(x) = Ann(e) = h1 − ei. In A/h1 − ei, x is invertible, so hxi = h1i; in A/hei, x is null; thus in A, hxi = hei. 3. Results from 2 by Nakayama’s lemma. 2. The ideal b seen as an A-module, after scalar extension to A/a , becomes the module b/ba and it remains locally cyclic. Since the quotient ring A/a is zero-dimensional, item 1a tells us that b/ba is generated by an element y. This means that b = hyi + ba and the other equalities immediately follow. Remark. In the case of dimension 1 and of an invertible ideal, item 2 of the previous theorem is often called the “One and a half theorem.” See Corollary V -3.2 and Theorem XII -5.2. 760 XIII. Krull dimension 4. Integral extensions 4.1. Proposition. Let A ⊆ B be rings with B integral over A. Every finite sequence of elements of A that is singular in B is singular in A. In particular, Kdim A 6 Kdim B. Note: the opposite inequality is proven a little later (Theorem 7.16). J Suppose for example that the sequence (x, y) ∈ A is singular in B, i.e.  ∃a, b ∈ B, ∃m, ` ∈ N, x` y m (1 + ay) + bx = 0. We want to realize the same type of equality, with some elements a0 , b0 of A instead of elements a, b in B. The intuitive idea is to transform the previous equality by the “norm” operation. Consider some monic polynomials f , g ∈ A[T ] that annihilate a and b. Let B1 = A[T, T 0 ]/hf (T ), g(T 0 )i. Let α and β be the classes of T and T 0 in B1 . The subring A[a, b] of B is a quotient of B1 = A[α, β], via an A-homomorphism which sends α and β to a and b. In addition, B1 is a free module of finite rank over A which allows for a definition of the norm and the cotransposed element of an arbitrary element of B1 [X, Y ]. Then let  U (α, β, X, Y ) = X ` Y m (1 + αY ) + βX and V (X, Y ) = NB1 [X,Y ]/A[X,Y ] (U ). By Lemma 4.2, V (X, Y ) is of the form   X p Y q 1 + A(Y )Y + B(X, Y )X , with A ∈ A[Y ], B ∈ A[X, Y ]. Moreover let W (α, β, X, Y ) ∈ B1 [X, Y ] be the cotransposed element of U (α, β, X, Y ). By specializing X, Y, α, β at x, y in A and a, b in B, we obtain an equality in B   V (x, y) = xp y q 1 + A(y)y + B(x, y)x = U (a, b, x, y)W (a, b, x, y), which ends the proof since V (x, y) = 0 is an equality in A: note that we have U (a, b, x, y) = 0 in B but that U (α, β, x, y) is perhaps nonzero in B1 . 4.2. Lemma. Let C be a free A-algebra of finite rank over A, (c0 , . . . , cn ) in C and (X0 , . . . , Xn ) = (X) be a list of indeterminates. Let   U (X) = X0k0 X1k1 · · · (Xnkn (1 + cn Xn ) + · · ·) + c1 X1 + c0 X0 ∈ C[X].  def Then V (X) = NC[X]/A[X] (U (X) is of the form   V (X) = X0`0 X1`1 · · · (Xn`n (1 + an Xn ) + · · ·) + a1 X1 + a0 X0 ∈ A[X], with an ∈ A[Xn ], an−1 ∈ A[Xn , Xn−1 ], . . . , a0 ∈ A[X]. J First of all the norm N(1 + cn Xn ) is a polynomial h(Xn ) ∈ A[Xn ] which satisfies h(0) = 1, therefore which can be expressed in the form 1 + an (Xn )Xn . Next we use the multiplicativity of the norm, and  an evaluation at Xn−1 = 0 to show that N Xnkn (1 + cn Xn ) + cn−1 Xn−1 is of §5. Dimension of geometric rings 761 the form  Xn`n 1 + an (Xn )Xn + an−1 (Xn , Xn−1 )Xn−1 . And so on and so forth. The skeptical or meticulous reader can formulate a proof by induction in good and due form.  5. Dimension of geometric rings Polynomial rings over a discrete field A first important result in the theory of Krull dimension is the dimension of polynomial rings over a discrete field. 5.1. Theorem. If K is a nontrivial discrete field, the Krull dimension of the polynomial ring K[X1 , . . . , X` ] is equal to `. We first establish the following result which needs a precise definition. Some elements x1 , . . . , x` of a K-algebra with zero-dimensional K are said to be algebraically dependent over K if they annihilate a primitive polynomial2 f ∈ K[X1 , . . . , X` ]. 5.2. Proposition. Let K be a discrete field, or more generally a zerodimensional ring, A be a K-algebra, and x1 , . . . , x` ∈ A be algebraically dependent over K. Then the sequence (x1 , . . . , x` ) is singular. J We treat the case of a discrete field. The general case is then deduced by applying the elementary local-global machinery no. 2 (page 212). Let Q(x1 , . . . , x` ) = 0 be an algebraic dependence relation over K. Let us put a lexicographical order on the nonzero monomials αp1 ,...,p` xp11 xp22 · · · xp` ` of Q, in accordance with the “words” p1 p2 . . . p` . We can assume that the coefficient of the smallest nonzero monomial equal to 1 (here we use the hypothesis that the field is discrete, because we assume that we can determine for m` 1 m2 each αp1 ,...,p` wether it is null or invertible). Let xm be this 1 x2 · · · x` monomial. By following the lexicographical order, we see that we can express Q in the form 1+m`−1 m` 1+m` m1 1 1 Q = xm R` + xm R`−1 1 · · · x` + x1 · · · x` 1 · · · x`−1 m1 1+m2 1+m1 + · · · + x1 x2 R2 + x1 R1 where Rj ∈ K[xk ; k > j]. Then Q = 0 is the desired equality.  Proof of Theorem 5.1. We first note that the sequence (X1 , . . . , X` ) is regular, which shows that the Krull dimension of K[X1 , . . . , X` ] is > `. We 2 The notion introduced here generalizes the notion of a primitively algebraic element introduced on page 698. If K were not zero-dimensional, it would be reasonable to use a more restrictive terminology such as “primitively algebraic dependence relation.” It is also clear that the local-global principle XII -4.6 can be generalized in the case of ` elements. 762 XIII. Krull dimension can also directly see that it is nonsingular: in Equality (6) (page 751) with xi = Xi the left-hand side is nonzero (consider the coefficient of X1m1 X2m2 · · · X`m` ). To prove that the dimension of K[X1 , . . . , X` ] is 6 `, it suffices, given Proposition 5.2, to show that ` + 1 elements of K[X1 , . . . , X` ] are always algebraically dependent over K. Here is an elementary proof of this classical result. Let y1 , . . . , y`+1 be these elements, and d be a bound on their degrees. δ`+1 For some integer k > 0 consider the list Lk of all the y1δ1 · · · y`+1 such that  P`+1 k+`+1 : i=1 δi 6 k. The number of elements of the list Lk is equal to k this is a polynomial of degree ` + 1 in k. The elements of Lk live in the vector space E`,kd of the elements of K[X1 , . . . , X` ] of degree 6 k d, which  is of dimension kd+` kd : this is a polynomial of degree ` in k. Thus for large enough k, the cardinal of Lk is greater than the dimension of the vector space E`,kd containing Lk , therefore there is a linear dependence relation between the elements of Lk . This provides an algebraic dependence relation between the yi ’s.  Comment. The proof of Proposition 5.2 cannot constructively provide the same result for the field of reals R (which is not discrete). Actually it is impossible to realize the test of zero-dimensionality for R: ∀x ∈ R ∃a ∈ R ∃n ∈ N, xn (1 − ax) = 0. This would indeed mean that for every real number x, we know how to find a real a such that x(1 − ax) = 0. If we have found such an a, we obtain – if ax is invertible then x is invertible, – if 1 − ax is invertible then x = 0. However, the alternative “ax or 1 − ax is invertible” is explicit over R. Thus providing the test of zero-dimensionality amounts to the same as providing the test for “is x null or invertible ?” But this is not possible from the constructive point of view. Moreover, we can show that it is impossible to have a nonsingular sequence of length 1, if we take y = 6 0 in the strong sense of “y is invertible” (in the definition of “nonsingular”). Indeed, if we have some x such that for all a ∈ R and n ∈ N, xn (1 − ax) ∈ R× , we get a contradiction: if a = 0 then x ∈ R× , therefore there exists a b such that 1 − bx = 0. An interesting corollary 5.3. Lemma. A ring generated by k elements is of finite Krull dimension. J Since the dimension can only decrease by passage to a quotient, it suffices to show that Z[X1 , . . . , Xk ] is of Krull dimension 6 2k + 1 (actually this ring is of Krull dimension k + 1 by Theorem 8.20). Let (h1 , . . . , h2k+2 ) be a sequence of 2k+2 elements in Z[X1 , . . . , Xk ] = Z[X]. §6. Krull dimension of distributive lattices 763 We need to show that it is singular. The sequence (h1 , . . . , hk+1 ) is singular in Q[X1 , . . . , Xk ] = Q[X]. This K means that the iterated boundary ideal IQ[X] (h1 , . . . , hk+1 ) contains 1. K By getting rid of the denominators we obtain that IZ[X] (h1 , . . . , hk+1 )  K contains an integer d > 0. Therefore the ring B = Z[X] IZ[X] (h1 , . . . , hk+1 ) is a quotient of the ring C = (Z/hdi)[X]. As Z/hdi is zero-dimensional, the sequence (hk+2 , . . . , h2k+2 ) is singular in C (Proposition 5.2), in other words K K the ideal IC (hk+2 , . . . , h2k+2 ) contains 1. A fortiori IB (hk+2 , . . . , h2k+2 ) contains 1. Finally, the ring .  K K Z[X] IZ[X] (h1 , . . . , h2k+2 ) = B IB (hk+2 , . . . , h2k+2 ) is trivial.  Geometric rings We call a geometric ring a ring A that is a finitely presented K-algebra with K as a nontrivial discrete field. Theorem VII-1.5 of Noether position affirms that such a quotient ring is a finite integral extension of a ring B = K[Y1 , . . . , Yr ] contained in A (here, Y1 , . . . , Yr are elements of A algebraically independent over K). 5.4. Theorem. Under the previous hypotheses, the Krull dimension of the ring A is equal to r. J Theorem 5.1 shows that Kdim B 6 r. We can get the fact that r + 1 elements of A are algebraically dependent over K in the same style as described on page 762 for a polynomial algebra. This will give Kdim A 6 r. For the Krull dimension to be > r results from Proposition 4.1. NB: Theorem 7.16, which implies Kdim A = Kdim B, gives another proof. 6. Krull dimension of distributive lattices As previously mentioned, the Krull dimension of a commutative ring A is none other than that Krull dimension of the spectral space Spec A, at least in classical mathematics. In constructive mathematics we introduce the Krull dimension of a distributive lattice T so that it is equal, in classical mathematics, to the Krull dimension of its spectrum Spec T. The proof of this equality is very nearly identical to the one which we gave for commutative rings. We will not repeat it, since in any case, we will always use the Krull dimension of a distributive lattice via the constructive definition that follows. 764 XIII. Krull dimension 6.1. Definition. 1. Two sequences (x0 , . . . , xn ) and (b0 , . . . , bn ) in a distributive lattice T are said to be complementary if  b0 ∧ x 0 = 0     b1 ∧ x1 6 b0 ∨ x0   .. .. .. (9) . . .    bn ∧ xn 6 bn−1 ∨ xn−1    1 = bn ∨ xn A sequence that has a complementary sequence will be said to be singular. 2. For n > 0 we will say that the distributive lattice T is of Krull dimension at most n if every sequence (x0 , . . . , xn ) in T is singular. Moreover, we will say that the distributive lattice T is of Krull dimension −1 if it is trivial, i.e. if 1T = 0T . 1 For example, for k = 2 item 1 corresponds to the x2 b2 following graph in T. • We will write Kdim T 6 n when the Krull dimension • is at most n. It is obvious that a lattice has the same Krull dimen- x1 b1 sion as the opposite lattice. We also immediately • see that a lattice is zero-dimensional if and only if • it is a Boolean algebra. b0 Also, a totally ordered set of n elements has for Krull x0 dimension n − 2. 0 6.2. Fact. Let S be a subset of T that generates T as a distributive lattice. Then T is of dimension at most n if and only if every sequence (x0 , . . . , xn ) in S admits a complementary sequence in T. J Let us illustrate the computations on a sufficiently general example in the case n = 4. We verify that if (x0 , x1 , x2 , x3 , x4 ) admits (a0 , a1 , a2 , a3 , a4 ) as a complementary sequence, and if (x0 , x1 , y2 , x3 , x4 ) admits (b0 , b1 , b2 , b3 , b4 ) as a complementary sequence, then the sequence (x0 , x1 , x2 ∨ y2 , x3 , x4 ) admits the complementary sequence (a0 ∨ b0 , a1 ∨ b1 , a2 ∧ b2 , a3 ∧ b3 , a4 ∧ b4 ). Dually, the sequence (x0 , x1 , x2 ∧ y2 , x3 , x4 ) admits the complementary sequence (a0 ∨ b0 , a1 ∨ b1 , a2 ∨ b2 , a3 ∧ b3 , a4 ∧ b4 ). The same computation would work for an arbitrary xi (instead of x2 above) in an arbitrary finite sequence. Thus if each sequence (z0 , . . . , zn ) in S admits a complementary sequence in T, the same will hold for every sequence of n + 1 terms in the lattice generated by S.  §6. Krull dimension of distributive lattices 765 6.3. Fact. A commutative ring has the same Krull dimension as its Zariski lattice. J The proof, based on Fact 6.2, is left to the reader. Another proof will be given later in the form of Lemma XIV -4.7.  We can also access the Krull dimension via the Krull boundary ideals as for the commutative rings. 6.4. Definition. 1. The lattice TxK = T/(JTK (x) = 0), where JTK (x) = ↓ x ∨ (0 : x)T (10) is called the (Krull) upper boundary of x in T. We also say that the ideal JTK (x) is the Krull boundary ideal of x in T. 2. More generally, for a sequence (x) in T, the iterated Krull boundary ideal JTK (x) is defined by induction as follows: JTK () = {0} , and  JTK (x0 , . . . , xk ) = JTK (x0 , . . . , xk−1 ) : xk T ∨ ↓ xk . (11) 6.5. Fact. Let n ∈ N and T be a distributive lattice. 1. A sequence (x0 , . . . , xn ) in T is singular if and only if the iterated boundary ideal JTK (x0 , . . . , xn ) contains 1. 2. We have Kdim T 6 n if and only if for every x, Kdim TxK 6 n − 1. 6.6. Fact. In a Heyting algebra, every iterated Krull boundary ideal is  principal: JTK (x) = ↓ x ∨ ¬x and more generally,  JTK (x0 , . . . , xn ) = ↓ xn ∨ xn → (· · · (x1 ∨ (x1 → (x0 ∨ ¬x0 ))) · · ·) (12) 6.7. Lemma. Let a and b be two finitely generated ideals of a ring A. In the lattice Zar A, the element DA (a) → DA (b) exists if and only if the ideal (b : a∞ ) has the same radical as a finitely generated ideal. J In a distributive lattice, the element u → v exists if the ideal (v : u) is principal (its generator is then denoted However, for some  by u → v). ∞ finitely generated ideal a, DA (b) : DA (a) = DA (b : a ). Hence the stated result.  6.8. Lemma. Suppose that Zar A is a Heyting algebra. For (x0 , . . . , xn ) in A, we have the equality   K DA JAK (x0 , . . . , xn ) = JZar A DA (x0 ), . . . , DA (xn ) . J The proof is left to the reader.  766 XIII. Krull dimension 6.9. Proposition. Let A be a Noetherian coherent ring. 1. If a and b are two finitely generated ideals, the ideal (b : a∞ ) is finitely generated. 2. Zar A is a Heyting algebra, with DA (a) → DA (b) = DA (b : a∞ ). 3. The iterated Krull boundary ideals defined on page 751 have the same radical as the finitely generated ideals. 4. If in addition A is strongly discrete, Zar A is discrete and we dispose of a test to decide if a sequence in A admits a complementary sequence. J 1. Let a, b ∈ Zar A. Let Jk = (b : ak ). Since A is coherent, each ideal Jk is finitely generated. Since A is Noetherian, the sequence admits two consecutive equal terms, for example of indices p and p + 1, from which it is clear that it becomes stationary. We then have Jp = (b : a∞ ). 2. Consequence of 1 given Lemma 6.7. 3. Results by induction of 2 given Fact 6.6 and Lemma 6.8. 4. Results from 2, from Fact 6.6 and from Lemma 6.8.  7. Dimension of morphisms Definition and first properties 7.1. Definition. Let ρ : A → B is a ring homomorphism. The Krull dimension of the morphism ρ is the Krull dimension of the ring A• ⊗A B obtained by scalar extension (Theorem VI -3.9) from A to its reduced zero-dimensional closure A• (Theorem XI -4.25). Examples. 1) If k is zero-dimensional, we have seen that Kdim k[X1 , . . . , Xn ] 6 n. We deduce that the Krull dimension of the morphism A → A[X1 , . . . , Xn ] is 6 n, with equality if A is nontrivial. 2) If B is an integral A-algebra, after scalar extension the algebra is integral over A• , therefore zero-dimensional. Thus, the morphism A → B is zerodimensional. 7.2. Lemma. Let B and C be two A-algebras. Then by scalar extension we obtain Kdim(C → C ⊗A B) 6 Kdim(A → B) in the following cases. 1. C is a quotient of A, or a localized ring of A, or the quotient of a localized ring of A. 2. C is a finite product of rings of the previous type. 3. C is a filtering colimit of rings of the previous type. §7. Dimension of morphisms 767 J We use the observation C• ⊗C (C⊗A B) ' C• ⊗A B ' C• ⊗A• (A• ⊗A B). We then prove that the functor B 7→ B• transforms a quotient into a quotient, a localized ring into a localized ring (Proposition XI -4.27), a finite product into a finite product, and a filtering colimit into a filtering colimit. Moreover, the scalar extension also commutes with all these constructions. Finally, the Krull dimension can only decrease by these constructions.  Remark. It is not true that C ⊗A B is zero-dimensional as soon as the three rings are zero-dimensional. For example we can take A to be a discrete field and B = C = A(X). Then Kdim(C ⊗A B) = 1 (see Exercise 13). It follows that the scalar extension, even in the case of a faithfully flat extension, can strictly increase the Krull dimension of morphisms. A contrario we have the following concrete local-global principle. 7.3. Concrete local-global principle. Let S1 , . . ., Sn be comaximal monoids of a ring A, k > −1 be an integer and B be an A-algebra. The Krull dimension of the morphism A → B is 6 k if and only if the Krull dimension of each of the morphisms ASi → BSi is 6 k. J As (ASi )• ' (A• )Si (Proposition XI -4.27), we obtain (ASi )• ⊗ASi BSi ' (A• ⊗A B)Si , and we are brought back to the local-global principle 3.2.  The goal of this section is to show, for a morphism ρ : A → B, the inequality 1 + Kdim B 6 (1 + Kdim A)(1 + Kdim ρ) . Note that for Kdim A 6 0 we trivially have Kdim B = Kdim ρ. We then treat a simple but nontrivial case to get a clear picture. The truly simple case would be the one where A is integral and Kdim A 6 1. As the proof is unchanged, we will only suppose that A is a pp-ring, which will make the rest easier. 7.4. Proposition. Let ρ : A → B be a morphism, with A a pp-ring. If Kdim ρ 6 n and Kdim A 6 1, then Kdim B 6 2n + 1. J Let h = (h0 , . . . , h2n+1 ) be a sequence of 2n + 2 elements in B. We need to show that it is singular. By hypothesis the ring A• ⊗A B is of dimension at most n. Let K = Frac A be the total ring of fractions. It is reduced zero-dimensional and generated by A as a reduced zero-dimensional ring, therefore it is a quotient of A• . We conclude that the sequence (h0 , . . . , hn ) is singular e = K ⊗A B. in B This means that the iterated boundary ideal I K (h0 , . . . , hn ) contains 1, e B K and by getting rid of the denominators, that IB (h0 , . . . , hn ) contains some 768 XIII. Krull dimension a ∈ Reg(A).  K Therefore B0 = B IB (h0 , . . . , hn ) is a quotient of B/aB = A/aA ⊗A B. Since a is regular and Kdim A 6 1, the quotient A/aA is zero-dimensional, so (A/aA )red is a quotient of A• and the ring (B0 )red is a quotient of A• ⊗A B. We deduce that the sequence (hn+1 , . . . , h2n+1 ) is singular in (B0 )red , therefore also in B0 .  K K Therefore the ring B IB (h) = B0 IB (hn+1 , . . . , h2n+1 ) is trivial.  0 To pass from the pp-ring case to the general case we want to say that every reduced ring can behave in the computations like an integral ring provided we replace A with A/AnnA (a) × A/AnnA (AnnA (a)) when an algorithm asks to know if the annihilator of a is equal to 0 or 1. The important thing in this construction is that the closed covering principle for the singular sequences applies since the product of the two ideals AnnA (a) and AnnA (AnnA (a)) is null. This type of proof will probably be easier to grasp when we will familiarize ourselves with the basic local-global machinery explained on page 869. Here we do not proceed by successive comaximal localizations but by successive “closed coverings.” Actually we will not introduce a dynamic computation tree as such, we will instead construct a universal object. This universal object is a “constructive finitary approximation” of the product of all the quotients of A by its minimal prime ideals, a slightly too ideal object of classical mathematics to be considered constructively, at least in the form that we just defined: actually, if B is this product and if A1 is the natural image of A in B, then the universal ring that we are constructing should be equal to the pp-ring closure of A1 in B, at least in classical mathematics. The minimal pp-ring closure of a reduced ring In what follows we denote by a⊥ the annihilator ideal of the element a when the context is clear (here the context is simply the ring in which we must consider a). We will also use the notation a⊥ for the annihilator of an ideal a. The facts stated below are immediate. a ⊆ (a⊥ )⊥ ⊥ (13) ⊥ a ⊆ b =⇒ b ⊆ a ⊥ a =  ⊥ ⊥ ⊥ (a ) (a + b)⊥ = a⊥ ∩ b⊥ (14) (15) (16) §7. Dimension of morphisms 769 a⊥ ⊆ b⊥ ⇐⇒ (a + b)⊥ = a⊥ ⊥ ⊥ ⊥ ⊥ ⊥ ⊥ a ⊆ b ⇐⇒ (b ) ⊆ (a ) ⊥ ⊥ (a : b) = (ab)  ⊥  ⊥  (A a ) b = A (ab)⊥ (17) (18) (19) (20) Remarks. 1) An ideal a is an annihilator (of another ideal) if and only if a = (a⊥ )⊥ . ⊥ 2) The inclusion a⊥ + b⊥ ⊆ (a ∩ b)⊥ can be strict, even if a = a⊥ 1 and b = b1 . Take for example A = Z[x, y] = Z[X, Y ]/hXY i, a1 = hxi and b1 = hyi. ⊥ ⊥ ⊥ ⊥ ⊥ Then, a = a⊥ 1 = hyi, b = b1 = hxi, a + b = hx, yi, and (a ∩ b) = h0i = h1i. If we assume that A is reduced, we also have the following results. √ √ a⊥ = a⊥ = ( a)⊥ = (a2 )⊥ ⊥ (ab) ⊥ ⊥ ⊥ = (a ∩ b) ⊥ a ⊆ b ⇐⇒ (ab) = b (21) (22) ⊥ (23) 7.5. Lemma. Let A be a reduced ring and a ∈ A. We define   def A{a} = A a⊥ × A (a⊥ )⊥ and we let ψa : A → A{a} be the canonical homomorphism. 1. ψa (a)⊥ is generated by the idempotent (0, e 1), so ψa (a)⊥ = (1, e 0)⊥ . 2. ψa is injective (we can identify A with a subring of A{a} ). 3. Let b be an ideal in A{a} , then the ideal ψa−1 (b⊥ ) = b⊥ ∩ A is an annihilator ideal in A. 4. The ring A{a} is reduced. J 1. We have ψa (a) = (a, e0), where x is the class modulo a⊥ and xe is the class modulo (a⊥ )⊥ . If c = (y, ze), the equality ψa (a)c = 0 means ya = 0, i.e. ya2 = 0, or yet ya = 0, i.e. y = 0. 2 2. If xa = 0 and xy  = 0 for every y ∈ a⊥ then  ⊥x ⊥= 0 so x = 0. ⊥ 3. Let ψ1 : A → A a and ψ2 : A → A (a ) be the two projections. We have b = b1 × b2 . If x ∈ A we have ψa (x) ∈ b⊥ ⇐⇒ ψ1 (x)b1 = 0 and ψ2 (x)b2 = 0, −1 ⊥ −1 ⊥ i.e. x ∈ ψ1−1 (b⊥ 1 ) ∩ ψ2 (b2 ). Equality (20) tells us that each ψi (bi ) is an annihilator ideal. The result follows by Equality (16). 4. In a reduced ring, every annihilator ideal b⊥ is radical: indeed, if x2 b = 0, then xb = 0.  770 XIII. Krull dimension 7.6. Lemma. Let A be reduced and a, b ∈ A. Then with the notations of Lemma 7.5 the two rings (A{a} ){b} and (A{b} ){a} are canonically isomorphic. J The ring (A{a} ){b} can be described symmetrically as follows     A{a,b} = A (ab)⊥ × A (ab⊥ )⊥ × A (a⊥ b)⊥ × A (a⊥ b⊥ )⊥ , and if ψ : A → A{a,b} is the canonical homomorphism, it is clear that we have ψ(a)⊥ = (1, 1, 0, 0)⊥ and ψ(b)⊥ = (1, 0, 1, 0)⊥ .  Remark. The case where ab = 0 is typical: when we meet it, we would like to split the ring into components where things are “clear.” The previous construction then gives the three components    A (ab⊥ )⊥ , A (a⊥ b)⊥ and A (a⊥ b⊥ )⊥ . In the first one, a is regular and b = 0, in the second one b is regular and a = 0, and in the third one a = b = 0. The following lemma regarding pp-rings is copied from Lemma XI -4.22 which concerned reduced zero-dimensional rings (the reader will also be able to just about copy the proof). 7.7. Lemma. If A ⊆ C with C a pp-ring, the smallest pp-subring of C containing A is equal to A[(ea )a∈A ], where ea is the idempotent of C such that AnnC (a) = h1 − ea iC . More generally if A ⊆ B with reduced B, and if every element a of A admits an annihilator in B generated by an idempotent 1 − ea , then the subring A[(ea )a∈A ] of B is a pp-ring. 7.8. Theorem and definition. (Minimal pp-ring closure) Let A be a reduced ring. We can define a ring Amin as a filtering colimit by iterating the basic construction which consists in replacing E (the “current” ring, which contains A) by   def E{a} = E a⊥ × E (a⊥ )⊥ = E/AnnE (a) × E/AnnE (AnnE (a)) , when a ranges over A. 1. This ring Amin is a pp-ring, contains A and is integral over A. 2. For all x ∈ Amin , x⊥ ∩ A is an annihilator ideal in A. This ring Amin is called the minimal pp-ring closure of A. def When A is not necessarily reduced, we will take Amin = (Ared )min . J 1. By Lemma 7.7, it suffices to add an idempotent ea for each a ∈ A to obtain a pp-ring. The colimit is well-defined due to the relation of commutation given by Lemma 7.6. For item 2 note that x is obtained at a finite stage of the construction, and that x⊥ ∩ A stops changing from the moment where x is reached because §7. Dimension of morphisms 771 the successive homomorphisms are injections. We can therefore call upon item 3 of Lemma 7.5.  Remark. We can ask ourselves if Amin could not be characterized by a universal property related to item 2. By “iterating” the description of (A{a} ){b} given in the proof of Lemma 7.6 we obtain the following description of each ring obtained at a finite stage of the construction of Amin (see Exercise 18). 7.9. Lemma. Let A be a reduced ring and (a) = (a1 , . . . , an ) be a sequence of n elements of A. For I ∈ Pn , let aI be the ideal ⊥ ⊥ Q ⊥Q ⊥Q aI = = hai , i ∈ Ii . i∈I hai i j ∈I / aj j ∈I / aj n Then Amin contains the following ring, a product of 2 quotient rings of A (some eventually null) Q A{a} = I∈Pn A/aI . 7.10. Fact. 1. Let A be a pp-ring. a. Amin = A. b. A[X] is a pp-ring, and B(A) = B(A[X]). 2. For every ring A we have a canonical isomorphism Amin [X1 , . . . , Xn ] ' (A[X1 , . . . , Xn ])min . J 1a. Results from the construction of Amin . 1b. The result is clear for integral rings. We can apply the elementary local-global machinery no. 1 (page 204). We could also use McCoy’s lemma, Corollary III -2.3 2. 2. We suppose without loss of generality that A is a reduced ring. It also suffices to treat the case of a single variable. Given Lemma 7.6 we can “start” the construction of A[X]min with the constructions E ; E{a} for some a ∈ A. But if E = B[X] and a ∈ A ⊆ B then E{a} = B{a} [X]. Thus Amin [X] can be seen as a first step of the construction of A[X]min . But since by item 1 Amin [X] is a pp-ring and that for a pp-ring C we have C = Cmin , the construction of A[X]min is completed with Amin [X].  Comment. In practice, to use the ring Amin , we only need the finite stages of the construction. We can however note that even a single stage of the construction is a little mysterious, insofar as the ideals a⊥ and (a⊥ )⊥ are difficult to handle. It is only in the case of coherent rings that we know how to describe them with finite generator sets. Actually if the ring is Noetherian, the construction must end in a finite number of steps (at least from the point of view of classical mathematics), and needs to replace the ring with the product of its quotients with the minimal prime ideals. Here 772 XIII. Krull dimension we are in a situation where the construction of Amin meeting the standards of constructive mathematics seems more complicated than the result in classical mathematics (at least if the ring is Noetherian). Nevertheless, since we do not need to know the minimal prime ideals, our method is more general (it does not needLEM). In addition, its complication is mostly apparent. When we use A a⊥ for example, we actually make computations in A by forcing a to be regular, i.e. by forcefully annihilating  ⊥ ⊥every x that presents itself and that annihilates a. When we use A (a ) , things are less easy, because a priori, we need a proof (and not simply the result of a computation) to certify that an element x is in (a⊥ )⊥ . It is a fact that the use of minimal prime ideals in a proof of classical mathematics can in general be made innocuous (i.e. constructive) by using Amin (or another universal ring of the same type3 ), even if we do not dispose of other means to “describe an ideal (a⊥ )⊥ ” than the one of applying the definition. Application 7.11. Corollary. Let ρ : A → B be a morphism of finite Krull dimension. We “extend the scalars” from A to Amin : we obtain B0 = Amin ⊗A B and let ρ0 : Amin → B0 be the natural morphism. Then Kdim Amin = Kdim A, Kdim B = Kdim B0 and Kdim ρ0 6 Kdim ρ. J The first two items result from the fact that in the construction of the ring Amin , at each elementary step E E/AnnE (a) × E/AnnE (AnnE a) , the product of the two ideals is null, which is found again after tensorization by B. Therefore, the closed covering principle for the Krull dimension 3.3 applies. Finally, the inequality Kdim ρ0 6 Kdim ρ results from Lemma 7.2. Remark. Generally the ring Frac Amin seems a better concept than A• to replace the quotient field in the case of a non-integral reduced ring. In the case where A is a pp-ring, we indeed have Amin = A, so Frac Amin = Frac A, while A• is in general significantly more cumbersome (as the example A = Z shows). 7.12. Corollary. Let ρ : A → B be a morphism. If Kdim ρ 6 n and Kdim A 6 1, then Kdim B 6 2n + 1. J This clearly results from Proposition 7.4 and from Corollary 7.11. 3A  min corresponds to using all the quotients by the minimal prime ideals, Frac(Amin ) corresponds to using all the quotient fields of these quotients. §7. Dimension of morphisms 773 7.13. Theorem. Let ρ : A → B be a morphism. If Kdim ρ 6 n and Kdim A 6 m, then Kdim B 6 mn + m + n. J We perform a proof by induction on m. The case m = 0 is trivial. The proof given for m = 1 in the case where A is a pp-ring (Proposition 7.4), which relied on the dimension 0 case to prove the result in dimension m = 1, can easily be adapted to pass from dimension m to dimension m + 1. We copy the proof in the case where A is a pp-ring. To pass to the case of an arbitrary ring we use Corollary 7.11. We therefore suppose that A is a pp-ring and we consider a sequence (h) = (h0 , . . . , hp ) in B with p = (m + 1)(n + 1) − 1. We need to show that it is singular. By hypothesis the ring A• ⊗A B is of dimension at most n. The total ring of fractions K = Frac A is reduced zero-dimensional, and it is generated by A as a reduced zero-dimensional ring, so it is a quotient of A• . We conclude e = K ⊗A B. that the sequence (h0 , . . . , hn ) is singular in the ring B K This means that the iterated boundary ideal I (h0 , . . . , hn ) contains 1, e B K and by getting rid of the denominators thatIB (h0 , . . . , hn ) contains some K a ∈ Reg(A). Therefore the ring B0 = B IB (h0 , . . . , hn ) is a quotient of B/aB = A/aA ⊗A B. Since a is regular and Kdim A 6 m, the quotient A/aA is of dimension at most m−1. The natural homomorphism A/aA → B/aB remains of dimension at most n (Lemma 7.2). Therefore, by induction hypothesis, the sequence (hn+1 , . . . , hp ) is singular in B/aB . Therefore the sequence (hn+1 , . . . , hp ) is singular in B0 .  K  K (hn+1 , . . . , hp ) is trivial.  In conclusion, the ring B IB (h) = B0 IB 0 7.14. Corollary. Suppose Kdim A 6 m. Then Kdim A[X1 , . . . , Xn ] 6 mn + m + n. J We know that if K is reduced zero-dimensional, Kdim K[X1 , . . . , Xn ] 6 n. def Thus Kdim(A → A[X1 , . . . , Xn ]) = Kdim A• [X1 , . . . , Xn ] 6 n. We apply Theorem 7.13.  We dispose equally of a lower bound of Kdim A[X1 , . . . , Xn ]. 7.15. Lemma. For every nontrivial ring A and all n > 0 we have n + Kdim A 6 Kdim A[X1 , . . . , Xn ]. More precisely, the following implication is satisfied for every k > −1 and for every ring Kdim A[X1 , . . . , Xn ] 6 n + k =⇒ Kdim A 6 k J Immediate consequence of Proposition 2.16.  774 XIII. Krull dimension 7.16. Theorem. Consider an algebra ρ : A → B. 1. Suppose that B is generated by elements which are primitively algebraic over A, then Kdim ρ 6 0 and so Kdim B 6 Kdim A. 2. If ρ is injective and B is integral over A, then Kdim B = Kdim A. J 1. Given Fact VII -1.3, the ring A• ⊗A B is zero-dimensional, in other words Kdim ρ 6 0. The result follows by Theorem 7.13. 2. By item 1 and Proposition 4.1.  For a more direct proof of the inequality Kdim B 6 Kdim A, see Exercise 10. 8. Valuative dimension Dimension of valuation rings Recall that a valuation ring is a reduced ring in which we have, for all a, b: a divides b or b divides a. In other words it is a Bézout and reduced local ring. A valuation ring is a normal, local ring without zerodivisors. It is integral if and only if it is coherent. It is clear that the Zariski lattice of a valuation ring is a totally ordered set. 8.1. Fact. In a distributive lattice if a subsequence of (x) = (x1 , . . . , xn ) is singular, the sequence (x) is singular. J We consider a singular sequence (y1 , . . . , yr ), with a complementary sequence (b1 , . . . , br ). Let us add a term z to (y1 , . . . , yr ). To obtain a complementary sequence from it, we proceed as follows. If z is placed at the end, we add 1 at the end of (b1 , . . . , br ). If z is placed at the start, we add 0 at the start of (b1 , . . . , br ). If z is intercalated between yi and yi+1 we intercalate bi between bi and bi+1 .  8.2. Fact. In a distributive lattice, if (x) = (x1 , . . . , xn ) and if we have x1 = 0, or xn = 1, or xi+1 6 xi for some i ∈ J1..n − 1K, then the sequence (x) is singular. J We apply the previous fact by noting that (0) and (1) are two complementary sequences and that the sequence (xi , xi+1 ) with xi+1 6 xi admits (0, 1) as the complementary sequence.  To recap: the constructive meaning of the phrase “the number of elements of E is bounded by k” (which we denote by #E 6 k) is that for every finite list of k + 1 elements in E, two of them are equal. §8. Valuative dimension 775 8.3. Lemma. For a non-decreasing sequence (a) = (a1 , . . . , an ) in a totally ordered lattice the following properties are equivalent. 1. The sequence is singular. 2. a1 = 0, or an = 1, or there exists an i ∈ J1..n − 1K such that ai = ai+1 . 3. The number of elements in (0, a1 , . . . , an , 1) is bounded by n + 1. J 1 ⇒ 2. Let us do the computation for the case n = 3 by leaving the induction to the skeptical reader. Consider a complementary sequence (b1 , b2 , b3 ). We have 1 6 a 3 ∨ b3 a3 ∧ b3 6 a2 ∨ b2 a2 ∧ b2 6 a1 ∨ b1 a1 ∧ b1 6 0 Thus, a1 = 0 or b1 = 0. If b1 = 0, then a1 ∨ b1 = a1 > a2 ∧ b2 . Therefore a2 6 a1 or b2 6 a1 . In the first case, a1 = a2 . In the second case, b2 6 a1 6 a2 therefore a2 ∨ b2 = a2 . This implies a3 6 a2 or b3 6 a2 . In the first case, a2 = a3 . In the second case, b3 6 a2 6 a3 , therefore a3 ∨ b3 = a3 = 1. 2 ⇒ 1. By Fact 8.2. 3 ⇒ 2. If we have two equal elements in a non-decreasing sequence, then there are also two consecutively equal elements.  The following theorem gives a precise and elementary constructive interpretation of the Krull dimension of a totally ordered set. It directly results from Fact 8.2 and from Lemma 8.3. 8.4. Theorem. For a totally ordered distributive lattice T, the following properties are equivalent. 1. T is of dimension at most n. 2. The number of elements of T is bounded by n + 2 (#T 6 n + 2). 3. For every non-decreasing sequence (x0 , . . . , xn ) in T, we have x0 = 0, or xn = 1, or xi+1 = xi for some i ∈ J0, n − 1K. Note that the previous theorem applies to the Zariski lattice of a valuation ring. We now present two very simple and useful facts regarding valuation rings. P 8.5. Fact. In a valuation ring let u1 , . . . , um be elements with i ui = 0 (and m > 2). Then there exists a j 6= k and an invertible element v such that hu1 , . . . , um i = huj i = huk i and vuj = uk . J First of all there exists a j such that hu1 , . . . , um i = huj i. Then for each k let vk be an element suchP that uk = vk uj , with vj = 1. We obtain the equality uj (1 + k6=j vk ) = 0. Therefore uj = 0 or 1 + 776 P k6=j If 1 + XIII. Krull dimension vk = 0. If uj = 0, we can take all the vk ’s equal to 1. P k6=j vk = 0, one of the vk ’s is invertible since V is local.  8.6. Fact. Let V be a valuation a sequence (a1 , . . . , an ) in V∗ . Qnringpand i For exponents pi all > 0, let a = i=1 ai . Then there exists some j ∈ J1..nK such that DV (a) = DV (aj ). J Consider a j such that ai P divides aj for all i ∈ J1..nK. Then aj divides a which divides apj , where p = n i=1 pi .  We will need the following combinatorial lemma. 8.7. Lemma. Let E ⊆ F be two sets. We suppose that for every sequence (x0 , . . . , xm ) in F , one of the following two alternatives takes place • there exist i < j ∈ J0..mK such that xi = xj , • there exists an i ∈ J0..mK such that xi ∈ E. Then #E 6 ` implies #F 6 ` + m. J We consider a sequence (y0 , . . . , y`+m ) in F . We need to show that there are two equal terms. We consider the first m + 1 terms. Either two of them are equal, and the case is closed, or one of the terms is in E. In this case, we delete the term which is in E from the sequence (y0 , . . . , y`+m ) and we consider the first m + 1 terms of this new sequence. Either two of them are equal, and the case is closed, or one of the terms is in E . . . In the worst case, we follow the procedure till the end and we finally obtain ` + 1 terms in E and two of them are equal.  8.8. Theorem. Let V be a valuation domain, K be its quotient field, L ⊇ K be a discrete field of transcendence degree 6 m over K, and W ⊇ V be a valuation ring of L. Then Kdim W 6 Kdim V + m. J We need to show that if Kdim V 6 n, then Kdim W 6 n + m. Since these are valuation rings, we must simply show that # Zar V 6 n + 2 implies # Zar W 6 n + m + 2. (See Theorem 8.4.) It therefore suffices to show that the hypotheses of Lemma 8.7 are satisfied for the integers ` = n + 2 and m, and for the sets E = Zar V and F = Zar W. Let V0 = W ∩ K. Since V0 is a localized ring of V, we have Kdim V0 6 Kdim V. We are thus brought back to the case where V = W ∩ K, which implies Zar V ⊆ Zar W. Now let x0 , . . . , xm ∈ Reg W, denoted by W∗ . Consider an algebraic dependence relation over K for (x0 , . . . , xm ). We can suppose that the coefficients of the polynomial P ∈ K[X0 , . . . , Xm ] which gives this algebraic dependence relation are in V ∩ K× = V∗ . By letting, for p ∈ Nm+1 , xp = xp00 · · · xpmm , Fact 8.5 gives us p and q distinct in Nm+1 §8. Valuative dimension 777 such that axp and bxq are associated in W with a, b ∈ V∗ . By simplifying by xp∧q , we can assume p ∧ q = 0. Since a divides b or b divides a, we can assume that b = 1. We therefore have axp associated with xq in W. If q = 0, then each xj contained in xp (there is at least one) is invertible in W, i.e. DW (xj ) = DW (1). Otherwise, Fact 8.6 applied to xq gives us some xj present in xq such that DW (xq ) = DW (xj ); applied to axp , this tells us that DW (axp ) = DW (a) or DW (xk ) with xk present in xp ; we therefore have DW (xj ) = DW (a), or DW (xj ) = DW (xk ). The proof is complete.  Valuative dimension of a commutative ring 8.9. Definition. 1. If A is a pp-ring, the valuative dimension is defined as follows. Let d ∈ N ∪ {−1} and K = Frac A. We say that the valuative dimension of A is less than or equal to d and we write Vdim A 6 d if for every finite sequence (x) in K we have Kdim A[x] 6 d. 2. In the general case we define “Vdim A 6 d” by “Vdim Amin 6 d.” We immediately have • Kdim A 6 Vdim A, • Vdim A = −1 if and only if A is trivial, • Vdim A 6 0 if and only if Kdim A 6 0, • if A is a pp-ring then – Kdim A = Vdim A if and only if Kdim B 6 Kdim A for every intermediary ring B between A and Frac A, – if B is intermediary between A and Frac A, we have Vdim B 6 Vdim A. The following fact results directly from the construction of Amin . 8.10. Fact. If A is an arithmetic ring, then so is Amin . 8.11. Lemma. If A is an arithmetic ring, we have Kdim A = Vdim A. J Since Kdim A = Kdim Amin , and since Amin is an arithmetic ring if A is arithmetic, it suffices to treat the case where A is a pp-ring. We then apply Theorem XII -4.8 which says that every element of Frac A is primitively algebraic over A, and Theorem 7.16 which says that in such a case Kdim B 6 Kdim A for every intermediary ring B between A and Frac A. Remark. Here is the end of a less scholarly proof (for the case where A is an arithmetic pp-ring). We first suppose that A is local, i.e. it is an integral valuation ring. For every x = a/b ∈ Frac A, we have the alternative: b divides a, in which case x ∈ A, or a divides b, that is, ac = b in which case c 778 XIII. Krull dimension is regular and x = 1/c such that A[x] is a localized valuation ring of A, so Kdim A[x] 6 Kdim A. We finish by induction on the number of elements of Frac A which we add to A. Finally, in the general case, we re-express the previous proof. We replace the alternative “b divides a or a divides b” by the creation of two comaximal localizations of A. In the first b divides a, in the second a divides b. 8.12. Lemma. Let A be an integral ring, n > 1 and k > −1. If Kdim A[X1 , . . . , Xn ] 6 n + k, then for all x1 , . . . , xn in Frac A, we have Kdim A[x1 , . . . , xn ] 6 k. J We introduce the intermediary rings B0 = A[X1 , . . . , Xn ], B1 = A[x1 , X2 , . . . , Xn ], . . . , Bn = A[x1 , . . . , xn ]. For i ∈ J1..nK, let ϕi be the homomorphism of evaluation Bi−1 → Bi defined by Xi 7→ xi . If xi = ai /bi , the kernel Ker ϕi contains fi = bi Xi − ai . Let i ∈ J0..n − 1K. Since bi+1 ∈ Reg A[(xj )16j6i ], we have fi+1 ∈ Reg Bi (McCoy’s lemma, Corollary III -2.3). Therefore, by item 5 of Proposition 3.1, we have Kdim Bi /hfi+1 i 6 Kdim Bi − 1. Finally, since Bi+1 is a quotient of Bi /hfi+1 i, we obtain Kdim Bi+1 6 Kdim Bi − 1.  In the following proposition, as we will see a little later, the three properties are actually equivalent (Theorem 8.19 item 2 ). 8.13. Proposition. Let A be an integral ring and n > 1, then we have for the following items the implications 1 ⇒ 2 ⇒ 3. 1. We have Kdim A[X1 , . . . , Xn ] 6 2n. 2. For all x1 , . . . , xn in Frac A, we have Kdim A[x1 , . . . , xn ] 6 n. 3. We have Vdim A 6 n. J 1 ⇒ 2. Special case of Lemma 8.12. 2 ⇒ 3. We consider an arbitrary sequence (y1 , . . . , yr ) in Frac A, then an arbitrary sequence (x0 , . . . , xn ) in B = A[y1 , . . . , yr ]. We need to prove that the sequence (x0 , . . . , xn ) is singular in B. It suffices to show that it is singular in C = A[x0 , . . . , xn ], or that the sequence (x1 , . . . , xn ) is singular K in C/IC (x0 ). We write x0 = a0 /b0 with b0 ∈ Reg A. If a0 = 0, we are done. K K If a0 is regular, then IC (x0 ) = x0 C ⊇ a0 C. Therefore C/IC (x0 ) is a quotient of C/ha0 i which is equal to A[x1 , . . . , xn ]/ha0 i, which is of K dimension at most n − 1. Thus C/IC (x0 ) is of dimension at most n − 1, K and the sequence (x1 , . . . , xn ) is singular in C/IC (x0 ).  §8. Valuative dimension 779 Valuative dimension of a polynomial ring The aim of this subsection is to prove the equality Vdim A[X1 , . . . , Xn ] = n + Vdim A , for all n > 1. We deduce the same equality for the Krull dimensions in the case of an arithmetic ring. By definition, this equality of dimensions means the following equivalence ∀k > −1, Vdim A 6 k ⇐⇒ Vdim A[X1 , . . . , Xn ] 6 n + k . (24) Thus the first framed equality does not quite stick for the trivial ring (we should say that the dimension of the trivial ring is −∞ rather than −1). Preliminary remark. Given that Vdim A = Vdim Amin by definition, and that Amin [X1 , . . . , Xn ] ' (A[X1 , . . . , Xn ])min (Fact 7.10), it suffices to treat the case where A is a pp-ring, and by the elementary local-global machinery of pp-rings, it suffices to treat the integral case. In the rest of the subsection, we will therefore sometimes use the saving phrase “we can without loss of generality suppose that the ring is integral,” or sometimes, if we want to explain the functioning of the elementary local-global machinery, “we can without loss of generality suppose that the ring is a pp-ring.” 8.14. Fact. In (24), the converse implication (from right to left) is correct. J Suppose without loss of generality that A is integral. Let [X] = [X1 , . . . , Xn ]. Suppose Vdim A[X] 6 n+k. Let B = A[y1 , . . . , yr ], with yi ∈ Frac A for i ∈ J1..nK. We want to prove that Kdim B 6 k. However, B[X] = A[X][y1 , . . . , yr ] with the yi ’s in Frac(A[X]). Therefore Kdim B[X] 6 n + k, and by Lemma 7.15, Kdim B 6 k.  We now study the difficult direct implication in (24). In classical mathematics we have the following result: (∗) the valuative dimension of an integral ring A is also the maximum of the dimensions of valuation rings containing A and contained in its quotient field. This affirmation (∗) is no longer true in general from a constructive point of view (by lack of valuation rings), but it is a direct consequence (in classical mathematics) of Corollary 8.17, which is therefore a constructive version of (∗). 780 XIII. Krull dimension 8.15. Lemma. Let x0 , x1 , . . . , x` , u, v, α be indeterminates over a ring A, P0 (α), . . . , P` (α) ∈ A[α] and Q0 (α−1 ), . . . , Q` (α−1 ) ∈ A[α−1 ]. For some mi , ni ∈ N, we define P = P (α) and Q = Q(α−1 ) as follows m m1 0 ` P = xm 0 (x1 (· · · (x` (u + P` (α)x` ) + · · ·) + P1 (α)x1 ) + P0 (α)x0 ), Q = n` n1 0 xn 0 (x1 (· · · (x` (v + Q` (α−1 )x` ) + · · ·) + Q1 (α−1 )x1 ) + Q0 (α−1 )x0 ). If P is of formal degree p (in α), Q of formal degree q (in α−1 ), we consider the resultant R = Resα (αq Q, q, P, p) ∈ A[x0 , . . . , x` , u, v]. Then, by letting ri = qmi + pni and w = uq v p , R is of the form r R = xr00 (xr11 (· · · (x` ` (w + a` x` ) + · · ·) + a1 x1 ) + a0 x0 ) with ai ∈ A[x, u, v]. J Writing Resα,q,p (U, V ) in place of Resα (U, q, V, p), we suppose n = 1 and we let x = x0 , y = x1 , such that P = xm0 S, αq Q = xn0 T , with S = y m1 (u + P1 (α)y) + P0 (α)x, T = y n1 (vαq + T1 (α)y) + T0 (α)x. We obtain R = xr0 Resα,q,p (T, S), r0 = qm0 + pn0 . By letting x := 0 we have Resα,q,p (T, S)x:=0 = Resα,q,p (Tx:=0 , Sx:=0 )  = Resα,q,p (y n1 (vαq + T1 (α)y), y m1 (u + P1 (α)y) = y r1 Resα,q,p (vαq + T1 (α)y, u + P1 (α)y), with r1 = qm1 + pn1 . By letting y := 0 we have Resα,q,p (vαq + T1 (α)y, u + P1 (α)y)y:=0 = Resα,q,p (vαq , u) = uq v p , which gives the stated result.  8.16. Proposition. Let A ⊆ B, (x) = (x0 , . . . , xn ) be a sequence in A and α0 , β0 in B such that α0 β0 = 1. Suppose that the sequence is singular in A[α0 ] and A[β0 ], then it is singular in A. J We apply the previous lemma by specializing u and v in 1. Since the polynomials P (α) and αq Q(α−1 ) have a common root α0 in B, their resultant is null (Lemma III -7.2).  8.17. Corollary. Let a and b be regular elements of a pp-ring A. Then  Vdim A = sup Vdim A[ ab ], Vdim A[ ab ] . J The inequalities Vdim A[ ab ] 6 Vdim A and Vdim A[ ab ] 6 Vdim A result from the definition of the valuative dimension. Finally, suppose that Vdim A[ ab ] 6 n and Vdim A[ ab ] 6 n for some n ∈ N. Let (x0 , . . . , xn ) be a sequence in A. It is singular in Vdim A[ ab ] and Vdim A[ ab ], therefore it is singular in A by Proposition 8.16.  §8. Valuative dimension 781 8.18. Proposition. For every ring A and all n > 1, we have Vdim A[X1 , . . . , Xn ] 6 n + Vdim A. J We need to show that if Vdim A 6 k then Vdim A[X1 , . . . , Xm ] 6 k + m. By Fact 7.10, it suffices to treat the case where A is a pp-ring. We first suppose that A is integral. We re-express the proof of Theorem 8.8 and we use the dynamic method. Each time that we have a disjunction of the type “a divides b or b divides a” we introduce the rings C[ ab ] and C[ ab ], where C is the “current” ring. At each leaf of the tree constructed thus we have a ring A[u1 , . . . , u` ] ⊆ Frac A in which the considered sequence is singular. We conclude by Proposition 8.16 that the sequence is singular in A. In the case where A is a pp-ring we can call upon the elementary local-global machinery of pp-rings. We can also reason more directly: a and b produce the decomposition of “the current ring” C in a product of four components. In three of them, a or b is null and everything is easy. In the fourth one, a and b are regular and we are brought back to the integral case.  As corollaries we obtain the following theorems. 8.19. Theorem. For a ring A, we have the following equivalences. 1. If n > 1 and k > −1, then Vdim A 6 k ⇐⇒ Vdim A[X1 , . . . , Xn ] 6 n + k. In other words, Vdim A[X1 , . . . , Xn ] = n + Vdim A. 2. If n > 0, then Vdim A 6 n ⇐⇒ Kdim A[X1 , . . . , Xn ] 6 2n. In the case where A is a pp-ring, it is also equivalent to: for all x1 , . . . , xn in Frac A, we have Kdim A[x1 , . . . , xn ] 6 n. J 1. Proved in Fact 8.14 and Proposition 8.18. 2. The case n = 0 has already been done. Let us look at the case n > 1. The direct implication results from item 1 because Kdim A[X1 , . . . , Xn ] 6 Vdim A[X1 , . . . , Xn ]. The converse implication is given (in the integral case, but it is not restrictive) in Proposition 8.13.  8.20. Theorem. 1. If A is an arithmetic ring of finite Krull dimension we have Vdim A[X1 , . . . , Xn ] = Kdim A[X1 , . . . , Xn ] 6 n + Kdim A. with equality if A is nontrivial. 2. Vdim Z[X1 , . . . , Xn ] = Kdim Z[X1 , . . . , Xn ] = 1 + n. 3. Every ring generated by n elements is of valuative dimension (therefore of Krull dimension) 6 1 + n. 782 XIII. Krull dimension 4. Let A be a pp-ring generated by n elements and B be an intermediary ring between A and Frac A. Then Vdim B 6 1 + n. J Item 1 results from the most general theorem (Theorem 8.21) and item 2 is a special case. 3. The ring A is a quotient of Z[X1 , . . . , Xn ], so A[Y1 , . . . , Yn+1 ] is a quotient of Z[X1 , . . . , Xn ][Y1 , . . . , Yn+1 ] which is of Krull dimension 2n + 2 by item 2 Therefore Vdim A 6 n + 1 by item 2 of Theorem 8.19. 4. Consequence of item 3 since Vdim A 6 n + 1.  8.21. Theorem. For a ring A of dimension at most n (n > 1) the following properties are equivalent. 1. Vdim A = Kdim A. 2. For all k > 1, Kdim(A[X1 , . . . , Xk ]) 6 k + Kdim A. 3. Kdim(A[X1 , . . . , Xn ]) 6 n + Kdim A. Morevover if A is nontrivial we can replace 6 by = in items 2 and 3. When Vdim A = Kdim A, for all k > 1, we have the equality Kdim(A[X1 , . . . , Xk ]) = Vdim(A[X1 , . . . , Xk ]). J Note that we do not assume that the Krull dimension of A is exactly known. 1 ⇒ 2. We fix some k > 1 and we need to show that for every m > −1, we have Kdim A 6 m ⇒ Kdim(A[X1 , . . . , Xk ]) 6 m + k. We have Vdim(A) 6 m, so Vdim(A[X1 , . . . , Xk ]) 6 m + k by Proposition 8.18, therefore Kdim(A[X1 , . . . , Xk ]) 6 m + k because we still have Kdim B 6 Vdim B. 2 ⇒ 3. This is the special case where k = n. 3 ⇒ 1. Suppose Kdim A 6 m and we need to show Vdim A 6 m. Without loss of generality 0 6 m 6 n. If m = n the result follows by item 2 of Theorem 8.19. If n = m + r, we have Kdim(A[X1 , . . . , Xn ]) 6 n + m by hypothesis. As (Xm+1 , . . . , Xn ) is singular of length r, item 3 of Proposition 2.16 gives us Kdim(A[X1 , . . . , Xm ]) 6 n + m − r = 2m and the result follows by item 2 of Theorem 8.19. The last statement is left to the reader.  9. Lying Over, Going Up and Going Down In this section we are interested in understanding in constructive terms certain properties of commutative rings and of their morphisms which are introduced in classical mathematics via the notions of Zariski spectrum or of spectral morphism (corresponding to a ring homomorphism). §9. Lying Over, Going Up and Going Down 783 As the goal of the current book is to develop the constructive framework, we will not prove that the elementary definitions that we propose are equivalent to the definitions usually given in classical mathematics. By making our constructive definitions work we hope to obtain constructive versions of several theorems of classical mathematics, truly usable in practice. Actually, it is what will happen systematically in the following chapters. Lifting prime ideals (Lying Over) In classical mathematics we say that a homomorphism α : T → V of distributive lattices “has the lifting property of prime ideals” when the dual homomorphism Spec α : Spec V → Spec T is surjective, in other words when every prime ideal of Spec T is the inverse image of a prime ideal of Spec V. To abbreviate we also say that the morphism is “Lying Over.” We will give a pertinent constructive definition without using the dual homomorphism. For the equivalence in classical mathematics with the definition via the spectra, see Exercise 23. 9.1. Definition. 1. A homomorphism α : T → V of distributive lattices is said to be Lying Over when for all a, b ∈ T we have the implication: α(a) 6 α(b) =⇒ a 6 b. It amounts to the same to say that α is injective. 2. A commutative ring homomorphism ϕ : A → B is said to be Lying Over when the homomorphism Zar ϕ : Zar A → Zar B is injective. Remark. We also have the following equivalent formulations for the Lying Over morphisms. • For the distributive lattices:  – For all b ∈ T, α−1 (↓ α(b) = ↓ b.  – For every ideal a of T, α−1 IV (α(a)) = a. • For the commutative rings: – For all the finitely generated ideals a, b of A we have the implication ϕ(a) ⊆ ϕ(b)B =⇒ a ⊆ DA (b). – For every finitely generated ideal a of A we have ϕ−1 (hϕ(a)i) ⊆ DA (a).  – For every ideal a of A we have ϕ−1 DB (hϕ(a)i) = DA (a). 9.2. Fact. Let B ⊇ A be an extension. If B is integral or faithfully flat (over A), the inclusion morphism A → B is Lying Over. J The first case is a simple reformulation of Lemma VI -3.12 (Lying Over). In the second case, for every finitely generated ideal a of A, we have aB ∩ A = a.  784 XIII. Krull dimension Going Up In classical mathematics we say that a homomorphism α : T → V of distributive lattices “has the going up property for chains of prime ideals” when we have the following property. If q ∈ Spec V and α−1 (q) = p, every chain p1 ⊆ · · · ⊆ pn of prime ideals of Spec T with p1 = p is the inverse image of a chain q1 ⊆ · · · ⊆ qn of prime ideals of Spec V with q1 = q. Naturally we could limit ourselves to the case n = 2. Here are the constructive definitions in terms of distributive lattices and of commutative rings. 9.3. Definition. 1. A homomorphism α : T → V of distributive lattices is said to be Going Up when for all a, c ∈ T and y ∈ V we have α(a) 6 α(c) ∨ y =⇒ ∃x ∈ T (a 6 c ∨ x and α(x) 6 y). 2. A homomorphism ϕ : A → B of commutative rings is said to be Going Up when the homomorphism Zar ϕ : Zar A → Zar B is Going Up. Remarks. 1) For item 1, if a = α−1 (0V ) and T1 = T/(a = 0) , then α is Going Up if and only if α1 : T1 → V is going up. For item 2, if T = Zar A, then T1 ' Zar(ϕ(A) . We deduce, by letting A1 = ϕ(A), that ϕ is Going Up if and only if ϕ1 : A1 → B is going up. 2) For the distributive lattices, if α−1 (0) = 0 and if α is Going Up, then it is Lying Over. For the commutative rings, if Ker ϕ ⊆ DA (0) and if ϕ is Going Up, then it is Lying Over. 9.4. Proposition. If B is an integral A-algebra, the morphism A → B is Going Up. J By the previous remark we can assume A ⊆ B. We then know that the homomorphism is Lying Over, that is we know that Zar A → Zar B is injective, so we can identify Zar A with a sublattice of Zar B. We need to show that given a1 , . . . , an , c1 , . . . , cq in A and y1 , . . . , yp in B satisfying DB (a) 6 DB (c) ∨ DB (y), we can find a sequence (x) in A such that DA (a) 6 DA (c) ∨ DA (x) and DB (x) 6 DB (y). Let b = DB (y), a = b ∩ A, B1 = B/b and A1 = A/a . We consider the integral extension B1 ⊇ A1 . The hypothesis is now that DB1(a) 6 DB1(c). By Lying Over we know that this implies that DA1(a) 6 DA1(c). This means that for each i ∈ J1..nK we have some xi ∈ a such that DA (ai ) 6 DA (c) ∨ DA (xi ). We have therefore attained the sought goal with (x) = (x1 , . . . , xn ).  §9. Lying Over, Going Up and Going Down 785 Going Down In classical mathematics we say that a homomorphism α : T → V of distributive lattices “has the going down property for chains of prime ideals” when we have the following property. If q ∈ Spec V and α−1 (q) = p, every chain p1 ⊆ · · · ⊆ pn of prime ideals of Spec T with pn = p is the inverse image of a chain q1 ⊆ · · · ⊆ qn of prime ideals of Spec V with qn = q. Naturally we could limit ourselves to the case n = 2. 9.5. Definition. 1. A homomorphism α : T → V of distributive lattices is said to be Going Down when the same homomorphism for the opposite lattices T◦ and V◦ is Going Up. In other words for all a, c ∈ T and y ∈ V we have α(a) > α(c) ∧ y =⇒ ∃x ∈ T (a > c ∧ x and α(x) > y). 2. A homomorphism ϕ : A → B of commutative rings is said to be Going Down when the homomorphism Zar ϕ : Zar A → Zar B is Going Down. Remarks. 1) The definition in item 1 comes down to saying that theimage by α of the conductor ideal (a : c)T generates the ideal (α(a) : α(c) V . So if the distributive lattices are Heyting algebras, it means that the lattice homomorphism is also a homomorphism of Heyting algebras. 2) Same remarks as for Going Up. If f = α−1 (1V ) and T2 = T/(f = 1) , then α is Going Down if and only if α2 : T2 → V is Going Down. This gives for the commutative rings: if S = ϕ−1 (B× ) and A2 = AS , then ϕ is Going Down if and only if ϕ2 : A2 → B is Going Down. For the distributive lattices, if α−1 (1) = 1 and α is Going Down, then it is Lying Over. For the commutative rings, if ϕ−1 (B× ) ⊆ A× and ϕ is Going Down, then it is Lying Over. 9.6. Theorem. If a homomorphism α : X → Y (of distributive lattices or of commutative rings) is Lying Over and Going Up, or if it is Lying Over and Going Down, we have Kdim X 6 Kdim Y . Remark. This is the case, for example, when the ring B is an integral extension of A. We thus find Proposition 4.1 again. For the flat extensions, see Proposition 9.8. J It suffices to treat the Going Up case with lattices. Suppose Kdim Y 6 n and consider a sequence (a0 , . . . , an ) in X. We have in Y a complementary sequence (y0 , . . . , yn ) of α(a) α(a0 ) ∧ y0 6 0, . . . , α(an ) ∧ yn 6 α(an−1 ) ∨ yn−1 , 1 6 α(an ) ∨ yn . 786 XIII. Krull dimension We will construct a complementary sequence (x0 , . . . , xn ) of (a) in X. At step n, by Going Up, there exists an xn ∈ X such that 1 6 an ∨ xn and α(xn ) 6 yn . This gives at the stage n − 1 the inequality: α(an ∧ xn ) 6 α(an−1 ) ∨ yn−1 . By Going Up there exists an xn−1 ∈ X such that an ∧ xn 6 an−1 ∨ xn−1 and α(xn−1 ) 6 yn−1 . We continue in the same way until stage 0, where this time we need to use the Lying Over.  9.7. Lemma. For a ring homomorphism ϕ : A → B to be Going Down it is necessary and sufficient that for all c, a1 , . . . , aq ∈ A and y ∈ B such  that ϕ(c)y ∈ DB (ϕ(a) , there exist some elements x1 , . . . , xm ∈ A such that  DA (c) ∧ DA (x) 6 DA (a) and DB (y) 6 DB (ϕ(x) . J In the definition we have replaced an arbitrary element DA (c) of Zar A and an arbitrary element DB (y) of Zar B by generators DA (c) and DB (y). As the generators DA (c) (resp. DB (y)) generate Zar A (resp. Zar B) by finite suprema, the rules of distributivity imply that the restriction to these generators is sufficient (computations left to the reader).  9.8. Proposition. A homomorphism ϕ : A → B of commutative rings is Going Down in the following two cases. 1. B is a flat A-algebra. 2. B ⊇ A is a domain integral over A, and A is integrally closed. J We assume the hypotheses of Lemma 9.7, with an equality in B, ϕ(c)` y ` + Pq i=1 bi ϕ(ai ) =0 (∗) ` 1. We consider (∗) as a B-syzygy between the elements c , a1 , . . . , aq . We express that it is a B-linear combination of A-syzygies. These relations are Pq written as xj c` + i=1 uj,i ai = 0 for j ∈ J1..mK, with the xj ’s and the uj,i ’s in A. Hence DA (cxj ) 6 DA (a), and DA (c) ∧ DA (x) 6 DA (a). Finally, y ` is  a B-linear combination of the ϕ(xj )’s, hence DB (y) 6 DB (ϕ(x) . 2. By (∗), (cy)` ∈ hai B. By the Lying Over XII -2.8, (cy)` , and a fortiori cy, is integral over haiA . We write an integral dependence relation for cy over the ideal haiA in the form f (cy) = 0 with Pk j f (X) = X k + j=1 µj X k−j where µj ∈ haiA . Moreover, y annihilates a monic polynomial g(X) ∈ A[X]. Consider in (Frac A)[X] the monic gcd h(X) = X m + x1 X m−1 + · · · + xm of the two polynomials f (cX) and g(X). Since A is integrally closed, Kronecker’s theorem says that xj ∈ A, and the equality h(y) = 0 gives y ∈ DB (x). Exercises and problems 787 It remains to see that cxj ∈ DA (a) for j ∈ J1..mK. By formally replacing X with Y /c, we get that the polynomial hc (Y ) = Y m + cx1 Y m−1 + · · · + cm xm divides f (Y ) in (Frac A)[Y ]. Kronecker’s theorem (under the form of Lemma XII -2.7) tells us that cxj ∈ DA (µ1 , . . . , µk ).  Finally, as DA (µ1 , . . . , µk ) 6 DA (a), we indeed have cxj ∈ DA (a). Incomparability In classical mathematics we say that a homomorphism α : T → T0 of distributive lattices “has the incomparability property” when the fibers of the dual homomorphism Spec α : Spec T0 → Spec T are constituted of pairwise incomparable elements. In other words, for q1 and q2 in Spec T0 , if α−1 (q1 ) = α−1 (q2 ) and q1 ⊆ q2 , then q1 = q2 . The corresponding constructive definition is that the morphism T → T0 is zero-dimensional. We have already given the definition of the dimension of a morphism in the case of commutative rings. An analogous definition can be provided for the distributive lattices, but we will not be using it. The principal consequence of the incomparability situation for a homomorphism ϕ : A → B is the fact that Kdim B 6 Kdim A. This is a special case of Theorem 7.13 with the important Theorem 7.16. Exercises and problems Exercise 1. We recommend that the proofs which are not given, or are sketched, or left to the reader, etc, be done. But in particular, we will cover the following cases. • Prove Proposition 3.1. • Prove what is stated in Examples on page 750. • Prove Fact 6.3. • Prove Facts 6.5 and 6.6. • Check the details in the proof of Proposition 6.9. • Prove Lemma 7.7 using the proof of Lemma XI -4.22 as inspiration. • Check the details in the proof of Lemma 9.7. Exercise 2. If f is a filter of the ring A, let us define its complement ef as being { x ∈ A | x ∈ f ⇒ 0 ∈ f }. In particular, we still have 0 ∈ ef, even if 0 ∈ f. Similarly, if a is an ideal of the ring A, let us define its complement ā as being { x ∈ A | x ∈ a ⇒ 1 ∈ a }. Show that if f is a prime filter its complement is an ideal. If in addition f is detachable, then a is a detachable prime ideal. Also show the dual affirmations. 788 XIII. Krull dimension Exercise 3. 1. If the sequence (X1 , . . . , Xn ) is singular in the ring A[X1 , . . . , Xn ], then A is trivial. 2. Let k ∈ N. Prove that if A[X] is a ring of dimension at most k then A is of dimension at most k − 1. Thus obtain once again item 1. Exercise 4. Prove that if K is a ring of Krull dimension exactly equal to 0 then K[X1 , . . . , Xn ] is of Krull dimension exactly equal to n. Exercise 5. (Partition of unity associated with an open covering of the spectrum) Let A be a ring and (Ui )i be an open covering of Spec(A). Show in classical mathematics that there exists a family (fi )i of elements of A with fi = 0 except for a finite number of indices i and (?) DA (fi ) ⊆ Ui , P i fi = 1. Remark: thus, we replace every open covering of Spec(A) by a finite system of elements of A which “cover” A (since their sum is equal to 1), without “losing information” since (?) confirms once again that (Ui )i is a covering. Exercise 6. For a finitely presented algebra A over a nontrivial discrete field, let us call the “Noether dimension of A” the number of algebraically independent variables after a Noether position. 1. Let f ∈ A ⊇ K[Y1 , . . . , Yr ] = K[Y ] (A integral over K[Y ]). 1a. Show that the boundary ideal of f contains  aKg ∈ K[Y ] \ {0}. 1b. Deduce that the Krull boundary ring A JA (f ) is a quotient of a finitely presented algebra whose Noether dimension is 6 r − 1. 2. Deduce a direct proof of the equality of Krull and Noether dimensions of the finitely presented algebras over a nontrivial discrete field. Exercise 7. 1. Let K be a nontrivial discrete field, K[X] = K[X1 , . . . , Xn ] and f ∈ K[X] \ {0}, then Kdim K[X][1/f ] = n. 2. More generally, give a sufficient condition on the polynomial δ ∈ A[X] for us to have Kdim(A[X][1/δ]) = Kdim A[X] (see the proof of Lemma X -4.6). Exercise 8. (Characterization of integral Prüfer rings of dimension at most 1) Let A be an integrally closed ring. 1. Show that if Kdim A[X] 6 2, then A is a Prüfer ring, by showing that every element of Frac A is primitively algebraic over A. 2. Show that A is a Prüfer ring of dimension at most 1 if and only if Kdim A[X] 6 2. 3. Can we generalize to a normal ring? Exercise 9. (A multiplicative property of boundary ideals) 1. For a, b ∈ A and two sequences (x), (y) of elements of A, show that K K K IA (x, a, y) IA (x, b, y) ⊆ IA (x, ab, y). K 2. Deduce that IA (a1 b1 , . . . , an bn ) contains the product n Q c K IA (c), in which the sequence (c) = (c1 , . . . , cn ) ranges over the set of 2 sequences such that ci = ai or ci = bi for each i. Exercises and problems 789 Exercise 10. (Boundary ideals and algebraic relations) 1. We consider the lexicographical order over Nn . Let α = (α1 , . . . , αn ) ∈ Nn . Prove, for β > α, that α n−1 X β ∈ X11+α1 , X1α1 X21+α2 , X1α1 X2α2 X31+α3 , · · · , X1α1 X2α2 · · · Xn−1 Xn1+αn . 2. Let A be a reduced ring, (x) = (x1 , . . . , xn ) be a sequence in A and P = P a X β in A[X], which annihilates x. β β a. Show, for α ∈ Nn , that aα b. Deduce Q β Q β<α Ann(aβ ) ⊆ I K (x). I K (aβ ) ⊆ I K (x) + Q β Ann(aβ ). 3. Let A → B be an algebra with reduced B and let x ∈ B be primitively Pd algebraic over A: a xi = 0 with ai ∈ A and 1 ∈ hai , i ∈ J0..dKi. Deduce i=0 i K from the previous question that IB (x) contains the image of Qd i=0 K IA (ai ). 4. Deduce a new proof of Theorem 7.16: if every element of B is primitively algebraic over A, then Kdim B 6 Kdim A. Exercise 11. (Integral extension of the boundary ideal I K ) Let A ⊆ B be an integral extension of rings. 1. If a is an ideal of A, b is an ideal of B, show that A ∩ (b + aB) ⊆ DA (a + A ∩ b). 2. Deduce, for a0 , . . . , ad ∈ A, K K A ∩ IB (a0 , . . . , ad ) ⊆ DA IA (a0 , . . . , ad ) .  3. Give a new proof of the fact that Kdim A 6 Kdim B, see Proposition 4.1 and Theorem 9.6. Compare with Exercise 12. Exercise 12. (Integral extension of the boundary monoid S K ) Let A ⊆ B be an integral extension of rings. 1. Let a be an ideal of A and S ⊆ A be a monoid. Show that S + aB ⊆ (S + a)satB . 2. Deduce, for a0 , . . . , ad ∈ A, K K SB (a0 , . . . , ad ) ⊆ SA (a0 , . . . , ad )satB . 3. Give a new proof of the fact that Kdim A 6 Kdim B. Exercise 13. Let K be a nontrivial discrete field. Denote (X1 , . . . , Xn ) by (X) and (Y1 , . . . , Ym ) and (Y ) Let A = K(X) ⊗K K(Y ). We intend to determine the Krull dimension of A. 1. A is the localization of K[X, Y ] at S = (K[X])∗ (K[Y ])∗ . It is also a localization of K(X)[Y ] and of K(Y )[X]. Consequently Kdim A 6 inf(m, n). 2. Suppose n 6 m. Show that the sequence (X1 − Y1 , . . . , Xn − Yn ) is a regular sequence in A. Conclude that Kdim A = inf(n, m). 790 XIII. Krull dimension Exercise 14. (Prime ideals, boundaries and duality) Let p0 ( p1 ( · · · ( pd−1 ( pd ( A be a chain of detachable prime ideals with x1 ∈ p1 \ p0 , x2 ∈ p2 \ p1 , . . . , xd ∈ pd \ pd−1 , according to the following diagram. x1 ∈ / 0 ∈ p0 x2 ∈ ∈ / p1 ( xd−1 ∈ ∈ / ( ··· ( p2 ( pd−2 xd ∈ pd−1 ( ∈ ∈ / pd 63 1 ( 1. Show that I K (x1 , . . . , xi ) ⊆ pi for i ∈ J0..dK. Therefore I K (x1 , . . . , xd ) ⊆ pd . In addition, if xd+1 ∈ / pd , then I K (x1 , . . . , xd , xd+1 ) ⊆ pd + Axd+1 . Consequently, if xd+1 ∈ / pd and 1 ∈ I K (x1 , . . . , xd , xd+1 ), then 1 ∈ pd + Axd+1 . 2. Consider the complementary prime filters fi = A \ pi for i ∈ J0..dK. We have the dual diagram of the previous one. xd 1 ∈ fd xd−1 ∈ ∈ / ( fd−1 x2 ∈ ∈ / fd−2 ( ( ··· ( f2 x1 ∈ ∈ / ( ∈ ∈ / f1 ( f0 63 0 Show that S K (xi+1 , . . . , xd ) ⊆ fi for i ∈ J0..dK. Therefore S K (x1 , . . . , xd ) ⊆ f0 . In addition, if x0 ∈ / f0 , i.e. if x0 ∈ p0 , then S K (x0 , x1 , . . . , xd ) ⊆ xN0 f0 . Consequently, if x0 ∈ / f0 and 0 ∈ S K (x0 , x1 , . . . , xd ), then 0 ∈ xN0 f0 . Note: pd + Axd+1 is the ideal generated by pd and xd+1 , dually xN0 f0 is the monoid generated by f0 and x0 . Exercise 15. (Elimination and boundary ideals in polynomial rings) Here is a detailed proof of the inequality Kdim A[T ] 6 1 + 2 Kdim A (Section 7), with a few further results. Without loss of generality A is assumed to be reduced. 1. Let f ∈ A[T ] be a polynomial such that the annihilator of each coefficient is generated by an idempotent. For g ∈ A[T ], define R ∈ A[X, Y ] such that  Ann(R) = 0 and R(f, g) = 0: note that the polynomial ResT (f (T ) − X, Y − g(T ) solves the question when f is monic of degree > 1 (why?), and use Lemma IV -6.4. 2. By using Exercise 10, show that if R = Q i,j P i,j rij X i Y j , we have K K IA[T ] (rij ) ⊆ IA[T ] (f, g). 3. By using a ring of type A{a} (Lemma 7.9 and Exercise 18), find the inequality Kdim A[T ] 6 1 + 2 Kdim A. 4. Show the following more precise result: for a reduced ring A and f , g ∈ A[T ],  K K the ideal DA[T ] IA[T ] (f, g) contains a finite product of boundary ideals IA (a), a ∈ A. 5. More generally: if A[T ] = A[T1 , . . . , Tr ] and f0 , . . . , fr ∈ A[T ], then the K nilradical of the boundary ideal IA[T ] (f0 , . . . , fr ) contains a finite product of K boundary ideals IA (ai ), with ai ∈ A. We once again deduce that 1 + Kdim A[T ] 6 (1 + r)(1 + Kdim A). Exercises and problems 791 Exercise 16. (Boundary ideals of polynomials) Continued from Exercise 15. Q 1. Let x, y ∈ B and (zj ) be a finite family in B satisfying j I K (zj ) ⊆ I K (x, y). Show that for (b1 , . . . , bn ) in B, Q j I K (zj , b1 , . . . , bn ) ⊆ I K (x, y, b1 , . . . , bn ). 2. Let T be an indeterminate over a ring A. K K a. For (a1 , . . . , an ) in A, prove that IA (a1 , . . . , an )A[T ] = IA[T ] (a1 , . . . , an ). b. Show that the boundary ideal of 2d polynomials of A[T ] contains, up to radical, a product of boundary ideals of d elements of A. Consequently Kdim A < d ⇒ Kdim A[T ] < 2d; this is another form of the inequality Kdim A[T ] 6 1 + 2 Kdim A. 3. How can we generalize the first and second item? Exercise 17. (Another definition of the Krull dimension of distributive lattices, see [79, Español]) In an ordered set, a sequence (x0 , . . . , xn ) is called a chain of length n if we have x0 6 x1 6 · · · 6 xn . In a distributive lattice, two chains (x0 , . . . , xn ) and (b0 , . . . , bn ) are said to be linked, if there exists a chain (c1 , . . . , cn ) with  x0 ∧ b0 = 0    x1 ∧ b1 = c1 = x0 ∨ b0   .. .. .. .. .. (25) . . . . .    xn ∧ bn = cn = xn−1 ∨ bn−1   1 = xn ∨ bn Please compare with Definition 6.1 for the complementary sequences. Also note that if the sequences (x0 , . . . , xn ), (b0 , . . . , bn ) and (c1 , . . . , cn ) are linked by equations (25), then they are chains. 1. If in a distributive lattice we have x 6 y and x ∨ a > y ∧ b, then we can explicate a0 and b0 such that x ∧ a0 = x ∧ a, y ∨ b0 = y ∨ b, x ∨ a0 = y ∧ b0 . Therefore from a left-configuration (by still assuming that x 6 y), we can construct a right-configuration ( x∧a = p x∨a > y∧b q = y∨b ( x ∧ a0 = p x ∨ a0 = y ∧ b0 q = y ∨ b0 2. In a distributive lattice, a chain (x0 , . . . , xn ) has a complementary sequence if and only if there exists a chain which is linked to it. 3. For a distributive lattice T the following properties are equivalent. a. T has Krull dimension 6 n. b. Any chain of length n has a complementary sequence. c. Any chain of length n has a linked une chain. 792 XIII. Krull dimension Exercise 18. (A few results on the finite stages of Amin ) Let A be a reduced ring. For ideals a, b of A let a  b = (a⊥ b)⊥ = (a⊥⊥ : b). 1. Prove that A/a  b is a reduced ring in which a is null and b faithful.  2. Prove that (A/a1  b1 ) (a2  b2 ) ' A/a3  b3 with a3 = a1 + a2 , b3 = b1 b2 . 3. Let (a) = (a1 , . . . , an ) in A. In Lemma 7.9 we have defined (for I ∈ Pn ) aI = hai , i ∈ Ii  Q aj j ∈I / A{a} = Q I∈Pn A/aI . Thus, modulo aI , ai is null for i ∈ I and regular for i ∈ / I. Finally, let εi be the idempotent of A{a} whose coordinate in A/aI is 1 if i ∈ I, 0 if i ∈ / I. a. Prove that the intersection (and a fortiori the product) of the ideals aI is null; consequently, the morphism A → A{a} is injective and Kdim A = Kdim A{a} . b. Prove that AnnA{a} (ai ) = hεi iA {a} . Exercise 19. (A few results on Amin ) See Problem XI -4 for App . A ring homomorphism A → B is said to be regular when the image of every regular element is a regular element. Let A be a reduced ring. 1. Let θ : A → B be a regular morphism and a ∈ A. If a⊥ is generated by an idempotent e, then θ(a)⊥ is generated by the idempotent θ(e). In particular, as already mentioned in Problem XI -4, a morphism between pp-rings is a pp-ring morphism if and only if it is regular. 2. The natural morphism App → Amin is regular and surjective. 3. For a ∈ A, the natural morphism ψa : A → A{a} is regular. 4. The natural morphism ψ : A → Amin is regular and the natural morphism Z → Zqi is not regular. Exercise 20. Explicate the proof of Lemma 8.12 in terms of singular sequences. Exercise 21. (A generalization of Theorem 8.19) For A ⊆ B and ` ∈ N, if for every sequence (x) = (x0 , . . . , x` ) in B, we have a primitive polynomial of A[X] which annihilates (x), then Vdim B 6 ` + Vdim A. Exercise 22. (Lying Over morphism) Prove what is affirmed in the remark following the definition of the Lying Over on page 783. Exercise 23. (Lying Over morphism, 2) In the category of finite ordered sets, it is clear that a morphism is surjective if and only if it is an epimorphism. This therefore corresponds, for the dual distributive lattices, to a monomorphism, which here means an injective homomorphism, i.e. a Lying Over morphism. Give a proof in classical mathematics of the equivalence, for some homomorphism α : T → T0 of distributive lattices, between: α is Lying Over on the one hand, and Spec α : Spec T0 → Spec T is surjective, on the other hand. Idea: use Krull’s lemma, which can be easily proven à la Zorn: If in a distributive lattice we have an ideal a and a filter f which do not intersect, there exists a prime ideal containing a whose complement is a filter containing f. Exercises and problems 793 Exercise 24. (Going Up, Going Down morphisms) Prove what is stated in the remark following the definition of Going Up on page 784 (use the description of the quotient lattice T/(a = 0) given on page 621). Do the same thing for Going Down. Problem 1. (Annihilator of an ideal in a reduced Noetherian ring) We consider a reduced ring A such that every ascending sequence of ideals of the form DA (x) has two equal consecutive terms. 1. Let a be an ideal of A such that we know how to test for y ∈ A if Ann(y)a = 0 (and in case of a negative answer provide the corresponding certificate). 1a. If some x ∈ a satisfies Ann(x)a 6= 0, determine some x0 ∈ a such that DA (x) ( DA (x0 ). 1b. Deduce the existence of some x ∈ a such that Ann(x) = Ann(a). 2. Suppose moreover that every regular element of A is invertible, and that for all y, z we know how to test if Ann(y)Ann(z) = 0. Show that Kdim A 6 0. 3. Let B ne a strongly discrete coherent Noetherian ring. Show that Frac(Bred ) is a zero-dimensional ring. Note: in classical mathematics B admits a finite number of minimal prime ideals p1 , . . . , pk and Frac(Bred ) is isomorphic to the finite product of corresponding fields: Frac(A/p1 )×· · ·×Frac(A/pk ). However, in general, we have no algorithmic access to the pi ’s. Problem 2. (Lying Over, Going Up, Going Down, examples) 1. Let A ⊆ B be an inclusion of rings such that, as an A-module, A is a direct factor in B. Show that aB ∩ A = a for every ideal a of A. In particular, A ,→ B is Lying Over. 2. Let G be a finite group acting on a ring B with |G| 1B invertible in B. Let A = BG be the subring of fixed points. We define the Reynolds operator RG : B → A: P 1 RG (b) = |G| g(b). g∈G Prove that RG is an A-projector of image A; in particular, A is a direct summand (as an A-module) in B. 3. Let A ,→ B with A as a direct summand (as an A-module) in B. Provide a direct proof of Kdim A 6 Kdim B. 4. Let k be a nontrivial discrete field, A = k[XZ, Y Z] ⊂ B = k[X, Y, Z]. Then A is a direct summand in B, therefore A ,→ B is Lying Over. But A ,→ B is neither Going Up nor Going Down. Problem 3. (Potential chains of prime ideals) Over a ring A we call a potential chain of prime ideals, or potential chain a list [(I0 , U0 ), . . . , (In , Un )], where the Ij ’s and Uj ’s are subsets of A (i.e. each (Ij , Uj ) is a potential prime ideal of A). A potential chain is said to be finite if the Ij ’s and Uj ’s are finitely enumerated subsets. A potential chain is said to be complete if the following conditions are satisfied • the Ij ’s are ideals and the Uj ’s are monoids, 794 XIII. Krull dimension • I0 ⊆ I1 ⊆ · · · ⊆ In and U0 ⊇ U1 ⊇ · · · ⊇ Un , • Ij + Uj = Uj for each j. We say that the potential chain [(I0 , U0 ), . . . , (In , Un )] refines the chain [(J0 , V0 ), . . . , (Jn , Vn )] if we have the inclusions Jk ⊆ Ik and Vk ⊆ Uk for each k. 1. Show that every potential chain generates a complete potential chain (in the sense of the refinement relation). More precisely, from [(I0 , U0 ), . . . , (In , Un )], we successively construct • aj = hIj i, bj = P i6j 4 ai (j ∈ J0..nK), • fn = M(Un ) + bn , fn−1 = M(Un−1 ∪ fn ) + bn−1 , . . . , f0 = M(U0 ∪ f1 ) + b0 . And we consider [(b0 , f0 ), . . . , (bn , fn )]. 2. We say that a potential chain C collapses if in the complete chain that it generates [(b0 , f0 ), . . .] we have 0 ∈ f0 . Show that a sequence (x1 , . . . , xn ) is singular if and only if the potential chain [(0, x1 ), (x1 , x2 ), . . . , (xn−1 , xn ), (xn , 1)] collapses. 3. Show in classical mathematics that a potential chain C of A collapses if and only if it is impossible to find prime ideals p0 ⊆ p1 ⊆ · · · ⊆ pn , such that the chain [(p0 , A \ p0 ), . . . , (pn , A \ pn )] refines the chain C. 4. Given a potential chain C = [(I0 , U0 ), . . . , (In , Un )], we saturate it by adding, in Ik , (resp. in Uk ) every x ∈ A which, added to Uk (resp. to Ik ) would lead to a collapse. Thus a potential chain collapses if and only if its saturated chain is [(A, A), . . . , (A, A)]. Show that we obtain thus a potential chain [(J0 , V0 ), . . . , (Jn , Vn )] which refines the complete chain generated by C. Show in classical mathematics that Jk is the intersection of the prime ideals that appear in position k in a chain of prime ideals which refines C (as in the previous question). Also prove the dual statement for Vk . Some solutions, or sketches of solutions Exercise 3. 2. Consider a sequence of length k in A, to it we add X at the start, and it becomes singular in A[X]. We then get rid of X in the corresponding Equality (6) (page 751). Note: we can also invoke item 3 of Proposition 2.16. Exercise 4. We can assume that K is reduced (Kred [X] = K[X]red has the same dimension as K[X1 , . . . , Xn ]). Two possibilities are then offered. The first is to rewrite the proof given in the case of a discrete field by using Exercise IV -13 and local-global principle 3.2. The second is to apply the elementary local-global machinery no. 2. 4 Recall that M(A) is the monoid generated by the subset A. Solutions of selected exercises 795 S Exercise 5. We write each Ui in the form Ui = j∈J DA (gij ). Saying that i the DA (gij )’sP cover Spec(A) means that 1 ∈ h DA (gij ) | j ∈ Ji , i ∈ Ii, hence an equality 1 = j,i uji gij , the uji ’s being null except for a finite number of them P (i.e. i ∈ I0 , j ∈ Ji , where I0 and the Ji ’s are finite). Let fi = j∈J uji gij . We i obtain DA (fi ) ⊆ Ui because for p ∈ DA (fi ), we / p, therefore an index j Phave fi ∈ such that gij ∈ / p, i.e. p ∈ DA (gij ) ⊆ Ui . And f = 1. i∈I0 i Exercise 6. 1a. We write an integral dependence relation of f over K[Y1 , . . . , Yr ] f n + an−1 f n−1 + · · · + ak f k = 0, with n > 1, the ai ’s in K[Y1 , . . . , Yr ] and ak = 6 0. The equality (ak + bf )f k = 0 K shows that ak + bf ∈ (DA (0) : f ) (even if k = 0). Therefore ak ∈ JA (f ). Exercise 7. 1. We write K[X][1/f ] = K[X, T ]/h1 − f T i. A Noether position of the nonconstant polynomial 1 − f T brings us to an integral extension of K[Y1 , . . . , Yn ]. 2. We write A[X][1/δ] = A[X, T ]/h1 − δT i. We seek to apply Theorem 7.16 to integral extensions. On the one hand we want δ to be regular, for the homomorphism A[X] → A[X][1/δ] to be injective, and on the other hand we want to be able to put the polynomial 1 − δT into Noether position, for the ring A[X][1/δ] to be integral over a ring A[Y1 , . . . , Yn ]. The first condition means that the ideal c(δ) is faithful (McCoy, Corollary III -2.3). The second condition is satisfied if we are in the same situation as for Lemma X -4.6 • δ is of formal degree d, • one of the monomials of degree d, relating to a subset of variables (Xi )i∈I , has as its coefficient an element of A× , • and it is the only monomial of degree d in the variables (Xi )i∈I present in δ. Indeed, the change of variables “Xi0 = Xi + T if i ∈ I, Xi0 = Xi otherwise,” then renders the polynomial 1 − δT monic in T (up to inverse). Note that in this case the polynomial δ is primitive and the first condition is also satisfied. Exercise 8. 1. Consider s = a/b ∈ Frac A with b regular. The sequence (bX − a, b, X) is singular in A[X]. This gives an equality in A[X] of the following type (bX − a)k1 bk2 X k3 1 + Xp3 (X) + bp2 (X) + (bX − a)p1 (X) = 0.    Since A[X] is integral, we can delete the factor (bX − a)k1 , after which we specialize X in s. We get bk2 sk3 1 + sp3 (s) + bp2 (s) = 0,  and since b is regular,  sk3 1 + sp3 (s) + bp2 (s) = 0.   Thus s annihilates g(X) = X k3 1 + Xp3 (X) + bp2 (X) and f (X) = bX − a. Finally, since the coefficient of X k3 in g is of the form 1 + bc, we obtain that 1 ∈ c(f ) + c(g) = c(f + X 2 g). 2. Results from 1 and from the general results on the dimension of A[X], for an arbitrary ring and for a Prüfer ring. 3. The answer seems to be yes. 796 XIII. Krull dimension Exercise 9. 1. It suffices to show, for two ideals a, b and two elements u, v ∈ A,   that (a : u∞ ) + Au (b : u∞ ) + Au ⊆ (ab : u∞ ) + Au and (a : u∞ ) + Au  (a : v ∞ ) + Av ⊆ (a : (uv)∞ ) + Auv.  The first inclusion stems from (a : u∞ ) (b : u∞ ) ⊆ (ab : u∞ ) and the second from (a : u∞ ) + (a : v ∞ ) ⊆ (a : (uv)∞ ). Exercise 10. 1. As β > α, X β is a multiple of one of the following monomials α 1+α n−1 X1α1 X2α2 · · · Xn−1 Xn1+αn , X1α1 X2α2 · · · Xn−1 n−1 , . . . , X1α1 X21+α2 , X11+α1 . 2a. Let y ∈ Q β<α Ann(aβ ); by letting Q(X) = yP (X), we have Q(X) = yaα X α + P β>α yaβ X β and Q(x) = 0. K To show that yaα ∈ I (x), we can therefore suppose that we have y = 1 P and P (X) = aα X α + β>α aβ X β . By using the equality P (x) = 0 and the first question, we obtain aα ∈ I K (x). 2b. First, since A is reduced, we have I K (a) = Ann(a) + Aa, ∀a ∈ A. Next, we use the following remark: let c be an ideal and 2m ideals a1 , b1 , . . . , am , bm such that a1 · · · ak−1 bk ⊆ c for every k ∈ J1..mK. Then we obtain the inclusion (a1 + b1 ) · · · (am + bm ) ⊆ c + a1 · · · am . Indeed, by induction on m, if (a1 + b1 ) · · · (am−1 + bm−1 ) ⊆ c + a1 · · · am−1 , we deduce a1 + b1 ) · · · (am + bm ) ⊆ c + a1 · · · am−1 am + a1 · · · am−1 bm ⊆ c + a1 · · · am−1 am + c, hence the stated inclusion. Let us apply this to c = I K (x) and to the ideals aβ = Ann(aβ ), bβ = Aaβ . As Ann(aβ ) + Aaβ = I K (aβ ), we obtain the desired inclusion. 3. Direct application with n = 1. 4. We can suppose that A, B are reduced even if it entails replacing A → B with Ared → Bred (every z ∈ B remains primitively algebraic). We can also suppose that A ⊆ B even if it entails replacing A with its image in B. Let us show that Kdim A 6 m⇒ Kdim B 6 m by induction on m. It suffices to show, for x ∈ B, K K that Kdim(B IB (x) ) 6 m − 1; but IB (x) contains an ideal a of A, finite products K of boundary ideals IA (a), a ∈ A.  K We therefore have an algebra A/a → B IB (x) to which we can apply the induction hypothesis since Kdim A/a 6 m − 1. Exercise 11. 1. We use the integral extension A = A/A ∩ b ,→ B = B/b . Let a ∈ A ∩ (b + aB); the Lying Over (VI -3.12) with A ⊆ B, gives an ∈ a, i.e. an ∈ a + b and as a ∈ A, an ∈ a + A ∩ b. 2. By induction on d. Let K (a , . . . , a 0 K K 0 K a = IA 0 d−1 ), a = IA (a0 , . . . , ad ), b = IB (a0 , . . . , ad−1 ), b = IB (a0 , . . . , ad ). 0 ∞ We therefore have by definition a0 = (a : a∞ d )A + Aad and b = (b : ad )B + 0 0 0 Bad . We want to show that A ∩ b ⊆ DA (a ). Item 1 gives A ∩ b ⊆ DA (c) ∞ with c = Aad + A ∩ (b : a∞ d )B = Aad + (A ∩ b : ad )A . Solutions of selected exercises 797 By induction, A ∩ b ⊆ DA (a), therefore def ∞ 0 c ⊆ Aad + (DA (a) : a∞ d )A ⊆ DA (Aad + (a : ad )A ) = DA (a ), hence A ∩ b0 ⊆ DA (a0 ). Exercise 12. 1. Let t ∈ S+aB; i.e. t+s ∈ aB with s ∈ S. So, t+s is integral over a, i.e. is a zero of a monic polynomial P (X) ∈ X n + aX n−1 + · · · + an−1 X + an . We write P (T + s) = T Q(T ) + P (s). Thus P (s) ∈ sn + a and tQ(t) ∈ S + a. K K 2. By induction on d. Let V = SB (a0 , . . . , ad ) = aN0 (SB (a1 , . . . , ad ) + a0 B); the K K satB induction provides SB (a1 , . . . , ad ) ⊆ SA (a1 , . . . , ad ) so K K V ⊆ aN0 (SA (a1 , . . . , ad )satB + a0 B) ⊆ aN0 (SA (a1 , . . . , ad ) + a0 B)satB . The first question provides K K V ⊆ aN0 (SA (a1 , . . . , ad ) + a0 A)satB ⊆ (aN0 (SA (a1 , . . . , ad ) + a0 A) i.e. V ⊆ satB , K SA (a0 , . . . , ad )satB . Exercise 13. 2. The quotient ring A/hX1 − Y1 i can be seen as the localization of K[X1 , . . . , Xn , Y2 , . . . , Ym ] at the monoid S1 = (K[X1 , . . . , Xn ])∗ (K[X1 , Y2 , . . . , Ym ])∗ . It is therefore integral. In the same way, we describe the successive quotients. Exercise 14. 1. Let ai := I K (x1 , . . . , xi ), with ai+1 = (ai : x∞ i+1 ) + Axi+1 . By induction, ai ⊆ pi : xi+1 ∈ / pi gives (pi : x∞ i+1 ) ⊆ pi , then ai+1 ⊆ pi + Axi+1 , so ai+1 ⊆ pi+1 . The rest poses no difficulties. 2. By letting Si = S K (xi+1 , . . . , xd ), we have Sd = 1 and Si−1 = xNi (Si + Axi ). Step by step, we prove Si ⊆ fi by using xi ∈ pi and xi ∈ fi−1 : Si−1 = xNi (Si + Axi ) ⊆ xNi (fi + pi ) = xNi fi ⊆ xNi fi−1 ⊆ fi−1 . The rest poses no difficulties. Exercise 15. If f is monic of degree n > 1, the polynomial R(X, Y ) defined in the statement of the question is Y -monic of degree n, therefore Ann(R) = 0, and R(f, g) = 0 because R ∈ hf (T ) − X, Y − g(T )iA[T,X,Y ] . Pn 1. Let f = k=0 ak T k . By Lemma IV -6.4 there exists a fundamental system of orthogonal idempotents (tn , tn−1 , . . . , t0 , t−1 ) such that: – in the component tk = 1 for k ∈ J0..nK, we have ai = 0 for i > k and ak regular; – in the component t−1 = 1, we have f = 0, i.e. t−1 f = 0 and even Ann(f ) = ht−1 i. Let m be the formal degree of g. For 1 6 k 6 n, we let Rk (X, Y ) = tk ResT (tk f (T ) − X, k, Y − g(T ), m). We define R0 (X, Y ) = t0 (t0 f (T ) − X) and R−1 (X, Y ) = t−1 X. For k ∈ J−1..nK, Pn we have Ann(Rk ) = h1 − tk i and Rk (f, g) = 0. Thus by letting R = k=−1 Rk (X, Y ), we have Ann(R) = 0 and R(f, g) = 0. 2. Direct application of the referenced exercise. 3. By induction on the Krull dimension of A. We can replace A by a ring A0 := A{a} such that the annihilator (in A0 ) of each coefficient of f is generated by an idempotent (recall that Kdim A = Kdim A0 ). 798 XIII. Krull dimension  K K Then, if a = i,j IA (rij ), the ring A[T ] IA[T ] (f, g) is a quotient of (A/a )[T ]. As Kdim(A/a ) < Kdim A, we obtain by induction hypothesis Q Kdim(A/a )[T ] 6 1 + 2 Kdim(A/a ) 6 1 + 2(Kdim A − 1), then  K Kdim A[T ] 6 2 + Kdim A[T ] IA[T ] (f, g) 6 2 + 1 + 2(Kdim A − 1) = 1 + 2 Kdim A. K 4. We preserve the notations of the previous questions. Each IA 0 (rij ) contains a finite product of boundary ideals of A (Exercise 10) therefore the product of the K IA 0 (rij )’s contains an ideal a of A, a finite product of boundary ideals of A.  K K Thus a ⊂ A[T ] ∩ IA (Exercise 11). 0 [T ] (f, g) ⊆ DA[T ] (IA[T ] (f, g) Exercise 16. 1. By induction on n, the case n = 0 being the hypothesis. Let us add an element b to b1 , . . . , bn and let b0j = I K (zj , b1 , . . . , bn , b). By definition b0j = Bb + (bj : b∞ ) with bj = I K (zj , b1 , . . . , bn ); the product of the bj ’s is contained in I K (x, y, b1 , . . . , bn ) (by induction). By using inclusions of the type (b : b∞ )(b0 : b∞ ) ⊆ (bb0 : b∞ ), we obtain Q j b0j ⊆ Bb + Q (bj : b∞ ) ⊆ Bb + j K Q j bj : b∞  ⊆ Bb + (I (x, y, b1 , . . . , bn ) : b∞ ) = I K (x, y, b1 , . . . , bn , b). 2a. Results from the fact that for two ideals a, b of A, we have (a : b)A A[T ] = (a : b)A[T ] . 2b. For two ideals a, b, let a b b for a ⊆ D(b). We reason by induction on d, the case d = 1 appearing in Exercise 15. Consider 2(d + 1) polynomials p, q, g1 , . . . , g2d ∈ A[T ]. There exist aj ’s ∈ A Q K K such that j IA (aj ) b IA[T ] (p, q) (the case d = 1). By the first question, Q j K K IA[T ] (aj , g1 , . . . , g2d ) b IA[T ] (p, q, g1 , . . . , g2d ). K It suffices therefore to show, for a ∈ A, that a boundary ideal IA[T ] (a, g1 , . . . , g2d ) contains, up to radical, a product of boundary ideals of d + 1 elements of A. Let   K  (a) A = A I K (a) and ϕ : A[T ] → A[T ] ' A[T ] (IA[T be the homomorphism ] K of passage to the quotient. By induction, the boundary ideal IA[T (g , . . . , g2d ) ] 1 contains, up to radical, a product Q j aj where each aj is a boundary ideal of d elements of A. By taking the inverse image under ϕ, we obtain Q i ϕ−1 (ai ) ⊆ ϕ−1 K (g , . . . , g2d ) . ai b ϕ−1 IA[T ] 1  Q i  By using Lemma 2.12, we have on the one hand K K ϕ−1 IA[T (g , . . . , g2d ) = IA[T ] (a, g1 , . . . , g2d ), ] 1  and on the other hand ϕ−1 (ai ) is a boundary ideal of d + 1 elements of A (the K first element being a). This shows that IA[T ] (a, g1 , . . . , g2d ) contains up to radical, a product of boundary ideals of d + 1 elements of A. 3. If A[T ] = A[T1 , . . . , Tr ], the boundary ideal of (r + 1)d polynomials of A[T ] contains, up to radical, a product of boundary ideals of d elements of A. Consequently, Kdim A < d =⇒ Kdim A[T ] < (r + 1)d, i.e. Kdim A[T ] + 1 6 (r + 1)(Kdim A + 1). Solutions of selected exercises 799 Exercise 17. 1. We take a0 = y ∧ a and b0 = x ∨ b ∨ a0 . Then x ∧ a0 = x ∧ y ∧ a = x ∧ a (because x 6 y). Then y ∨ b0 = y ∨ x ∨ b ∨ a0 = (x ∨ a0 ) ∨ (y ∨ b) = y ∨ b (the last equality uses x ∨ a0 6 y which stems from x 6 y and a0 6 y, a fortiori x ∨ a0 6 y ∨ b). Ir remains to see that y ∧ b0 = x ∨ a0 ; we have the identity for all y, b, z, y ∧ (b ∨ z) = y ∧ z 0 with z 0 = (y ∧ b) ∨ z that we use with z = x ∨ a0 . But we have y ∧ b 6 x ∨ a0 because the hypothesis is y∧b 6 x∨a, so y∧b 6 (x∨a)∧y = (x∧y)∨(y∧a) 6 x∨a0 . Therefore z 0 = x ∨ a0 and y ∧ b0 = y ∧ (x ∨ a0 ). Finally, y ∧ (x ∨ a0 ) = x ∨ a0 because x ∨ a0 6 y (by using x 6 y and a0 6 y). 2. By 1 by induction on n. 3. Item 3a implies item 3c by item 2. Item 3c implies item 3b because a linked chain is a particular case of complementary sequence. In order to see that 3b implies 3a, let y0 , . . . , yn be arbitrary. We define x0 = y0 , xi = yi ∨ xi−1 (i ∈ J1..nK). Let (a0 , . . . , an ) be a complementary sequence of (x0 , . . . , xn ). We define b0 = a0 and bi = ai ∨ xi−1 for i ∈ J1..nK. We have xi ∨ ai = yi ∨ bi for i ∈ J0..nK. Thus 0 = x0 ∧ a0 = y0 ∧ b0 and 1 = xn ∨ an = yn ∨ bn . Let us see the intermediary inequalities. For i ∈ J1..nK we have xi ∧ ai 6 xi−1 ∨ ai−1 , so yi ∧ ai 6 xi ∧ ai 6 xi−1 ∨ ai−1 = yi−1 ∨ bi−1 Then we have yi ∧ bi = yi ∧ (ai ∨ xi−1 ) = (yi ∧ ai ) ∨ (yi ∧ xi−1 ) 6 (yi ∧ ai ) ∨ xi−1 As the two terms after 6 are bounded by xi−1 ∨ ai−1 = yi−1 ∨ bi−1 we get the inequality yi ∧ bi 6 yi−1 ∨ bi−1 . Exercise 18. First of all, for every ideal c, the ring A c⊥ is reduced. ⊥ ⊥ ⊥ ⊥ Let us show that (a⊥ = (a1 + a2 )⊥⊥ : the equality a⊥ 1 a2 ) 1 ∩ a2 = (a1 + a2 ) ⊥ ⊥ ⊥ ⊥ ⊥ implies that the ideals a1 ∩ a2 , a1 a2 and (a1 + a2 ) have the same nilradical therefore the same annihilator. We deduce that  ⊥ ⊥ (a⊥ 1 a2 b) = (a1 + a2 )  b. Indeed ⊥ ⊥ ⊥ ⊥ ⊥ ⊥⊥ (a⊥ : b = (a1 + a2 )  b. 1 a2 b) = (a1 a2 ) : b = (a1 + a2 )   1. As a⊥ b ⊆ a⊥ , we have a  b ⊇ a⊥⊥ ⊇ a. Let x ∈ A such that in the quotient we have x b = 0, that is xb ⊆ a  b, i.e. xba⊥ b = 0. We therefore have xba⊥ = 0, that is x ∈ a  b, i.e. x = 0. 2. We have ⊥ ⊥ (A/a1  b1 ) (a2  b2 ) ' A (a⊥ =A 1 a2 b1 b2 )     (a1 + a2 )  (b1 b2 ) . Exercise 19. 1. Let y ∈ B and suppose yθ(a) = 0. Let e0 = θ(e). We must show that y = ye0 . Since e + a is regular, e0 + θ(a) is regular. However, y(e0 + θ(a) = ye0 = ye0 (e0 + θ(a) because e0 is idempotent. 2. The homomorphism App → Amin comes from the universal property of App . It is surjective because Amin = A[(ex )x∈A ] and because the morphism App → Amin is a pp-ring. 800 XIII. Krull dimension 3. Let x be regular in A and u = (y, ze) ∈ A{a} = A a⊥ × A (a⊥ )⊥ , with ux = 0.   We must show that u = 0, i.e. y = 0 and ze = e 0. We have xy ∈ a⊥ , i.e. xay = 0, so ay = 0, then y = 0. To see that ze = e 0 we consider an arbitrary element t of a⊥ and we must show that zt = 0. However, xz e =e 0, so xzt = 0, then zt = 0. 4. If a ∈ A is regular, it remains regular at the finite stages of the construction of Amin by item 3 and this is sufficient for it to be regular in Amin . If the natural homomorphism Z → Zqi were regular all the homomorphisms from Z to pp-rings would be regular given the universal property of Zqi . However, the surjection Z → Z/hni is not a regular homomorphism for n > 2. Note that the argument applies to every ring A for which there exists a regular element x such that A/hxi is a pp-ring and is nontrivial. Exercise 20. Let us write the computation for n = k = 2.  Let x1 = ab11 , x2 = ab22 ∈ Frac A and s = P (x1 , x2 ), (Q(x1 , x2 ), (R(x1 , x2 ) be a sequence in A[x1 , x2 ], with P , Q, R ∈ A[X1 , X2 ]. We must show that the sequence s is singular. Let A1 = A[x1 ]. We know that the sequence (b1 X1 − a1 , b2 X2 − a2 , P, Q, R) = (f1 , f2 , P, Q, R) is singular in A[X1 , X2 ], which gives an equality f1m (f2m (P m (Qm (Rm (1 + AR) + BQ) + CP ) + Df2 ) + Ef1 ) = 0 in A[X1 , X2 ]. Since b1 ∈ Reg A, we have f1 ∈ Reg A[X1 , X2 ] (McCoy’s lemma, Corollary III -2.3). We therefore simplify the equality by f1m , then we evaluate it in A1 [X2 ] by the morphism X1 7→ x1 . We obtain the following equality in A1 [X2 ] f2m (pm (q m (rm (1 + ar) + bq) + cp) + df2 ) = 0, with p = P (x1 , X2 ), q = Q(x1 , X2 ), . . . , d = D(x1 , X2 ). Since b2 ∈ Reg A1 , we have f2 ∈ Reg A1 [X2 ]. We can therefore simplify the equality by f2m , then evaluate it in A[x1 , x2 ] by the morphism X2 7→ x2 . We obtain an equality which says that the sequence s is singular. Exercise 22. Let a, b and c be the three properties for the commutative rings. The equivalence of a and b is easy. The implication a ⇒ c has been given as a remark after the Lying Over (Lemma VI -3.12). c ⇒ a. In classical mathematics DA (a) is the intersection of the prime ideals that contain a. We therefore want to show that for every prime ideal p such that a ⊆ p, we have ϕ−1 (hϕ(a)i) ⊆ p. Let q be a prime ideal of B above p, i.e. ϕ−1 (q) = p. Then, hϕ(a)i ⊆ hϕ(p)i ⊆ q, hence ϕ−1 (hϕ(a)i) ⊆ p. Problem 1. 1a. We have some nonzero a ∈ Ann(x)a, in particular ax = 0. Let us show that a ∈ / D(x): if an ∈ hxi, then an+1 ∈ haxi = 0, and so a = 0. Therefore D(x) ( D(x, a) = D(ax, a + x) = D(a + x): we take x0 = a + x (which is indeed in a). 1b. Let x0 = 0. If Ann(x0 )a = 0, that is a = 0, then Ann(x0 ) ⊆ Ann(a), so Ann(x0 ) = Ann(a). In this case we let xi = x0 for every i > 0. Otherwise, there is some x1 ∈ a with D(x0 ) ( D(x1 ). If Ann(x1 )a = 0, then Ann(x1 ) ⊆ Ann(a), so Ann(x1 ) = Ann(a). In this case we let xi = x1 for every i > 1. Otherwise, there is some x2 ∈ a with D(x1 ) ( D(x2 ) . . . . . . Solutions of selected exercises 801 This way we construct a non-decreasing infinite sequence of ideals D(xi ), which is stationary as soon as two consecutive terms are equal, in which case the initial problem is solved.5 2. Let y ∈ A. By the hypothesis, we apply item 1 with the ideal a = Ann(y) and  we know how to determine some x ∈ Ann(y) such that Ann(x) = Ann(Ann(y) , 2 i.e. xy = 0 and Ann(x)Ann(y) = 0. We then have (Ann(y) ∩ Ann(x) ⊆ Ann(x)Ann(y) = 0, so Ann(x) ∩ Ann(y) = 0 (the ring is reduced). Let us show that x + y is regular; suppose z(x + y) = 0. By multiplying by y, zy 2 = 0, so zy = 0, then zx = 0, so z ∈ Ann(x)∩Ann(y) = 0. Consequently, x+y is invertible and this element is in the boundary ideal of y since x ∈ Ann(y). 3. For every ring C, every regular element of Frac(C) is invertible. We can apply the result of item 2 to the ring C = Frac(Bred ). Indeed, the first hypothesis that needs to be checked is that every ascending sequence of ideals of the form DC (xn /yn ) (xn ∈ Bred , yn ∈ Reg(Bred )) admits two equal consecutive terms. However, in C we have the equality DC (xn /yn ) = DC (xn ), and the result follows by the fact that in B, the ascending sequence hx0 , . . . , xn iB admits two equal consecutive terms. The second hypothesis is that we know how to test, for ux , yv ∈ C, Ann x u  Ann y v  = 0? which is the same thing as Ann(x)Ann(y) = 0 in Bred . However, in Zar B we have the equality AnnBred (x) = DB (x) → DB (0), and we know that Zar B is a discrete Heyting algebra (Proposition 6.9). Problem 2. 1. Let P π : B → A be an A-projector of image A. P Let a ∈ aB ∩ A, a = i ai bi with ai ∈ a, bi ∈ B; so a = π(a) = i ai π(bi ) ∈ a. 2. It is clear that RG is A-linear and that RG (a) = a for all a ∈ A. The rest stems from this. 3. Let us suppose that Kdim B 6 d and show that Kdim A 6 d. Let a0 , . . . , ad ∈ A; as Kdim 6 d, there exists an n > 0 such that (a0 . . . ad )n ∈ hcd , cd−1 , · · · , c0 iB with ci = (a0 . . . ai−1 )n an+1 . i But hcd , cd−1 , · · · , c0 iB ∩ A = hcd , cd−1 , · · · , c0 iA . Therefore Kdim A 6 d. 4. (Proof in classical mathematics) We graduate B by deg X = deg Y = 1 and deg Z = −1. Then A is the homogeneous component of degree 0, so is a direct summand in B. Let q0 = hZiB (it is a prime ideal) and p0 := A ∩ q0 = hXZ, Y Zi. Let p = hXZiA ; it is a prime ideal with p ⊂ p0 but there does not exist a prime 5 The proof that the algorithm terminates under the constructive Noetherian hypothesis which has just been given is a little confusing. Spontaneously we would have preferred to say: the algorithm needs to end some day because otherwise, we would have a strictly increasing infinite sequence. The problem with this last argument is that it is an argument by contradiction. Here we have used the Noetherian hypothesis in constructive form and this provided us with the means to know a priori when the algorithm will terminate. This delicate point sends us back to the discussion about the Markov principle (Annex page 974). 802 XIII. Krull dimension ideal q of B contained in q0 and above p. Thus A ⊆ B is not Going Down. Let q = X, Y 2 Z − 1 B (it is a prime ideal) and p := A ∩ q = hXY i. Let p0 = hXZ, Y ZiA ; it is a prime ideal with p ⊂ p0 but there does not exist a prime ideal q0 of B containing q and lying over p0 (a prime ideal lying over p0 must contain Z, or X and Y ). Thus A ⊆ B is not Going Up. Bibliographic comments A very good presentation of the Krull dimension from the point of view of classical mathematics is found in [Eisenbud]. The spectral spaces were introduced by Stone [176] in 1937. The theory of spectral spaces is at the heart of this book [Johnstone]. An important Hochster theorem [104] states that every spectral space is homeomorphic to the spectrum of a commutative ring. A pointless version of the Hochster theorem is: every distributive lattice is isomorphic to the Zariski lattice of a commutative ring (for a nonconstructive proof see [5, Banaschewski]). The delicate point is to know how to construct a ring whose Zariski lattice is a given finite ordered set. The constructive definition of the Krull dimension of distributive lattices and commutative rings dates back to the works of André Joyal [112, 113] and Luis Español [74, 75, 76, 77, 78, 79]. Joyal’s idea was to construct for each integer ` > 1, from the distributive lattice T, a distributive lattice T` , that satisfies an adequate universal property such that, in classical mathematics, the prime ideals of T` can be identified with the chains p0 ⊆ · · · ⊆ p` of prime ideals of T (the inclusions being not necessarily strict). This then allows for a definition of Kdim T 6 ` by means of a property relating T`+1 and T` . Finally, the Krull dimension of a commutative ring can be defined in the same way as the dimension of its Zariski lattice. For further details on the subject, see the articles [43, 44, 46, Coquand&al.]. Theorem 2.2, which gives an elementary inductive characterization of the Krull dimension of a commutative ring, is found in [47, Coquand&al.]. The characterization in terms of algebraic identities given in Proposition 2.8 are found in [43, Coquand&Lombardi] and [126, Lombardi]. Even though the characterization in terms of complementary sequences is already present for the distributive lattices in [43], it only appears for the commutative rings in [46, Coquand&al.]. Additional results on the treatment of the Krull dimension in integral extensions are found in [41, Coquand&al.] The classical theory of valuative dimension can be found in [Jaffard], [Gilmer, Chap. 5, §30] and [26, Cahen]. Regarding the valuative dimension and Bibliographic comments 803 Theorem 8.20, a very elegant constructive treatment is given in the integral case by T. Coquand in [38]. The result of Exercise 10 is due to Lionel Ducos. Problem 1 is directly related to the article [48, Coquand&al.]. Problem 3 is drawn from the articles [21, Brenner], [44, Coquand&Lombardi] and [126]. A variant for distributive lattices is found in [43]. Chapter XIV The number of generators of a module Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . 1 Kronecker’s theorem and Bass’ stable range . . . . Kronecker’s theorem . . . . . . . . . . . . . . . . . . . . . Bass’ “stable range” theorem, 1 . . . . . . . . . . . . . . The local Kronecker theorem . . . . . . . . . . . . . . . . 2 Heitmann dimension and Bass’ theorem . . . . . . Bass’ “stable range” theorem, 2 . . . . . . . . . . . . . . “Improved” variant of Kronecker’s theorem . . . . . . . . 3 Serre’s Splitting Off and Forster-Swan theorems . Serre’s Splitting Off theorem . . . . . . . . . . . . . . . . The Forster-Swan theorem . . . . . . . . . . . . . . . . . Bass’ cancellation theorem . . . . . . . . . . . . . . . . . A simple characteristic property for Gdim A < n . . . . . 4 Supports and n-stability . . . . . . . . . . . . . . . . Supports, dimension, stability . . . . . . . . . . . . . . . Constructions and patchings of supports . . . . . . . . . 5 Elementary column operations . . . . . . . . . . . . With the stability of a support . . . . . . . . . . . . . . . With the Heitmann dimension . . . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . – 805 – . . . . . . . . . . . . . . . . . . . . . . 806 806 806 808 808 810 812 813 814 816 817 820 822 823 824 828 831 831 833 834 836 840 806 XIV. The number of generators of a module Introduction In this chapter we establish the elementary, non-Noetherian and constructive version of some “grand” theorems of commutative algebra. These theorems, due in their original version to Kronecker, Bass, Serre, Forster and Swan, regard the number of radical generators of a finitely generated ideal, the number of generators of a module, the possibility of producing a free submodule as a direct summand in a module, and the possibility of simplifying isomorphisms, in the following style: if M ⊕ N ' M 0 ⊕ N , then M ' M 0. Decisive progress was made by Heitmann [98, (1984)] who proved how to get rid of Noetherian hypotheses. Further progress was made by T. Coquand who proved in several articles how to obtain all the classical results (sometimes in a stronger form) by means of proofs that are both constructive and elementary. The proofs given here are essentially those of [35, 37, Coquand] and of [45, 46, Coquand&al.]. 1. Kronecker’s theorem and Bass’ stable range (non-Noetherian versions of Heitmann) Kronecker’s theorem Kronecker’s theorem1 is usually stated in the following form ([120]): an algebraic variety in Cn can always be defined by n + 1 equations. For Kronecker it was more about replacing a system of arbitrary equations in Q[X1 , . . . , Xn ] with an “equivalent” system having at most n + 1 equations. The equivalence of two systems as seen by Kronecker is translated in the current language by the fact that the two ideals have the same nilradical. It is by using the Nullstellensatz that we obtain the above formulation in the language of “algebraic varieties.” In the version proven in this section, we give the formulation à la Kronecker by replacing the ring Q[X1 , . . . , Xn ] with an arbitrary ring of Krull dimension 6 n. The following lemma, although terribly trivial, is an essential key. 1 This theorem of Kronecker is different from the one given in Chapter III. §1. Kronecker’s theorem and Bass’ stable range 807 1.1. Lemma. For u, v ∈ A we have DA (u, v) = DA (u + v, uv) = DA (u + v) ∨ DA (uv) . In particular, if uv ∈ DA (0), then DA (u, v) = DA (u + v). J We obviously have hu + v, uvi ⊆ hu, vi, therefore DA (u + v, uv) ⊆ DA (u, v). Moreover, u2 = (u+v)u−uv ∈ hu + v, uvi, so u ∈ DA (u+v, uv). Recall that two sequences that satisfy the inequalities (7) in Proposition XIII -2.8 are said to be complementary. 1.2. Lemma. Let ` > 1. If (b1 , . . . , b` ) and (x1 . . . , x` ) are two complementary sequences in A then for every a ∈ A we have DA (a, b1 , . . . , b` ) = DA (b1 + ax1 , . . . , b` + ax` ), i.e. a ∈ DA (b1 + ax1 , . . . , b` + ax` ). J We have the inequalities DA (b1 x1 ) DA (b2 x2 ) .. . = DA (0) 6 DA (b1 , x1 ) .. .. . . DA (b` x` ) 6 DA (b`−1 , x`−1 ) DA (1) = DA (b` , x` ). We deduce these DA (ax1 b1 ) DA (ax2 b2 ) .. . = DA (0) 6 DA (ax1 , b1 ) .. .. . . DA (ax` b` ) 6 DA (ax`−1 , b`−1 ) DA (a) 6 DA (ax` , b` ). We therefore have by Lemma 1.1 6 DA (ax` + b` ) ∨ DA (ax` b` ) 6 DA (ax`−1 + b`−1 ) ∨ DA (ax`−1 b`−1 ) .. .. . . DA (ax3 b3 ) 6 DA (ax2 + b2 ) ∨ DA (ax2 b2 ) DA (ax2 b2 ) 6 DA (ax1 + b1 ) ∨ DA (ax1 b1 ) = DA (ax1 + b1 ). DA (a) DA (ax` b` ) .. . Therefore finally DA (a) 6 DA (ax1 + b1 ) ∨ DA (ax2 + b2 ) ∨ · · · ∨ DA (ax` + b` ) = DA (ax1 + b1 , ax2 + b2 , . . . , ax` + b` ).  808 XIV. The number of generators of a module 1.3. Theorem. (Non-Noetherian Kronecker-Heitmann theorem, with the Krull dimension) 1. Let n > 0. If Kdim A < n and b1 , . . . , bn ∈ A, there exist x1 , . . . , xn such that for every a ∈ A, DA (a, b1 , . . . , bn ) = DA (b1 + ax1 , . . . , bn + axn ). 2. Consequently, in a ring of dimension at most n, every finitely generated ideal has the same nilradical as an ideal generated by at most n + 1 elements. J 1. Clear by Lemma 1.2 and Proposition XIII -2.8 (if n = 0, the ring is trivial and DA (a) = DA (∅)). 2. Stems from 1 because it suffices to iterate the procedure. Actually, if Kdim A 6 n and a = DA (b1 , . . . , bn+r ) (r > 2), we finally obtain a = DA (b1 + c1 , . . . , bn+1 + cn+1 ) with ci ∈ hbn+2 , . . . , bn+r i.  Bass’ “stable range” theorem, 1 1.4. Theorem. (Bass’ theorem, with the Krull dimension, without Noetherianity) Let n > 0. If Kdim A < n, then Bdim A < n. Abbreviated to: Bdim A 6 Kdim A. In particular, if Kdim A < n, every stably free A-module of rank > n is free (see Theorem V -4.10). J Recall that Bdim A < n means that for all b1 , . . . , bn ∈ A, there exist some xi ’s such that the following implication is satisfied ∀a ∈ A (1 ∈ ha, b1 , . . . , bn i ⇒ 1 ∈ hb1 + ax1 , . . . , bn + axn i). This results directly from the first item in Theorem 1.3.  The local Kronecker theorem 1.5. Proposition and definition. In a ring we consider two sequences (a0 , . . . , ad ) and (x0 , . . . , xd ) such that  a0 x0 ∈ D(0)     a1 x1 ∈ D(a0 , x0 )     a2 x2 ∈ D(a1 , x1 ) a3 x3 ∈ D(a2 , x2 )    ..   .    ad xd ∈ D(ad−1 , xd−1 ) We will say that these two sequences are disjoint. Then for 0 6 i < d, we have D(a0 , . . . , ai , x0 , . . . , xi , ai+1 xi+1 ) = D(a0 + x0 , . . . , ai + xi ). §1. Kronecker’s theorem and Bass’ stable range 809 J An inclusion is obvious. To prove the converse inclusion, we use the equalities D(ai , xi ) = D(ai xi , ai + xi ). We then successively get D(0) = D() = D() ⊇ a0 x0 ∈ ⊇ a0 , x0 , a1 x1 ∈ D(a0 , x0 ) = D(a0 x0 , a0 + x0 ) = D(a0 + x0 ) ⊇ a1 , x1 , a2 x2 ∈ D(a1 , x1 ) = D(a1 x1 , a1 + x1 ) ⊆ D(a0 + x0 , a1 + x1 ) a2 , x2 , a3 x3 ∈ D(a2 , x2 ) = D(a2 x2 , a2 + x2 ) ⊆ D(a0 + x0 , a1 + x1 , a2 + x2 ) .. .. .. .. .. .. .. . . . . . . . ai , xi , ai+1 xi+1 ∈ D(ai , xi ) = D(ai xi , ai + xi ) ⊆ D(a0 + x0 , . . . , ai + xi ).  Note that the sequences (a0 , . . . , ad ) and (x0 , . . . , xd ) are complementary if and only if they are disjoint and 1 ∈ had , xd i. 1.6. Theorem. Let A be a residually discrete local ring of dimension at most d, with Jacobson radical m. We suppose that m is radically finitely generated, i.e. there exist z1 , . . . , zn ∈ A such that m = DA (z1 , . . . , zn ). Then m is radically generated by d elements. J Since Kdim A 6 d and m is radically finitely generated, Kronecker’s theorem 1.3 tells us that m = D(x0 , . . . , xd ). In addition, there exists a complementary sequence (a) = (a0 , . . . , ad ) of (x) = (x0 , . . . , xd ). In particular (disjoint sequences), for every i 6 d, we have D(a0 , . . . , ai−1 , x0 , . . . , xi−1 , ai xi ) = D(a0 + x0 , . . . , ai−1 + xi−1 ), but also (complementary sequences) 1 ∈ had , xd i. This shows that ad is invertible since xd ∈ m. Let i be the smallest index such that ai is invertible (here we use the hypothesis that m is detachable). We then get a0 , . . . , ai−1 ∈ m, then D(x0 , . . . , xi−1 , xi ) ⊆ D(a0 + x0 , . . . , ai−1 + xi−1 ) ⊆ m, and finally m = D(x0 , . . . , xi−1 , xi , xi+1 , . . . , xd ) ⊆ D(a0 + x0 , . . . , ai−1 + xi−1 , xi+1 , . . . , xd ) ⊆ m. | {z } d elements  Remark. For a generalization see Exercises XV -7 and XV -8. 810 XIV. The number of generators of a module 2. Heitmann dimension and Bass’ theorem We will introduce a new dimension, which we will call the Heitmann dimension of a commutative ring. Its definition will be copied from the inductive definition of the Krull dimension, and we will denote it by Hdim. Beforehand, we introduce the dimension Jdim defined by Heitmann. 2.1. Definition and notation. – If a is an ideal of A we let JA (a) be its Jacobson radical, i.e. the inverse image of Rad(A/a ) by the canonical projection A → A/a . – If a = hx1 , . . . , xn i we denote JA (a) by JA (x1 , . . . , xn ). In particular, JA (0) = Rad A. – Let Heit A be the set of ideals JA (x1 , . . . , xn ). We call it the Heitmann lattice of the ring A. – We define Jdim A as equal to Kdim(Heit A). We therefore have x ∈ JA (a) if and only if for every y ∈ A, 1 + xy is invertible modulo a. In other words x ∈ JA (a) ⇐⇒ 1 + xA ⊆ (1 + a)sat , and JA (a) is the largest ideal b such that 1 + b ⊆ (1 + a)sat . sat  We therefore have 1 + JA (a) = (1 + a)sat and JA JA (a) = JA (a).  In particular JA JA (0) = JA (0) and the ring A/ Rad A has its Jacobson radical reduced to 0. 2.2. Lemma.   1. For an arbitrary ideal a we have JA (a) = JA DA (a) = JA JA (a) . Consequently, Heit A is a quotient distributive lattice of Zar A. 2. For u, v ∈ A we have JA (u, v) = JA (u + v, uv) = JA (u + v) ∨ JA (uv). In particular, if uv ∈ JA (0), then JA (u, v) = JA (u + v).   J We have a ⊆ DA (a) ⊆ JA (a), therefore JA (a) = JA DA (a) = JA JA (a) . The equality DA (u, v) = DA (u + v, uv) therefore implies JA (u, v) = JA (u + v, uv).  Comment. The Jdim introduced by Heitmann in [98] corresponds to the following spectral space Jspec A: it is the smallest spectral subspace of Spec A containing the set Max A of the maximal ideals of A. This space can be described as the adherence of Max A in Spec A for the constructible topology. A topology having as its generator set of open sets the DA (a)’s and their complements VA (a). Heitmann notices that the dimension used in Swan’s theorem or in Serre’s Splitting Off theorem, namely the dimension of Max A, only works well in the case where this space is Noetherian. In addition, in this case, the dimension of Max A is that of a spectral space, the space §2. Heitmann dimension and Bass’ theorem 811 jspec A formed by the prime ideals which are intersections of maximal ideals. However, in the general case, the subspace jspec A of Spec A is no longer spectral, and so, according to a remark which he qualifies as philosophical, jspec A must be replaced by the spectral space that naturally offers itself as a spare solution, namely Jspec A. Actually, Jspec A is identified with the spectrum of the distributive lattice Heit A (see [46, Theorem 2.11]), and the compact-open subspaces of Jspec A form a quotient lattice of Zar A, canonically isomorphic to Heit A. In constructive mathematics, we therefore define Jdim A as equal to Kdim(Heit A). The definition of the Heitmann dimension given below is quite natural, insofar as it mimics the constructive definition of the Krull dimension by replacing DA with JA . 2.3. Definition. Let A be a commutative ring, x ∈ A and a be a finitely generated ideal. The Heitmann boundary of a in A is the quotient ring AaH := A JAH (a) with JAH (a) := a + (JA (0) : a). This ideal is called the Heitmann boundary ideal  of a in A. We also let JAH (x) := JAH (xA) and AxH := A JAH (x) . 2.4. Definition. The Heitmann dimension of A is defined by induction as follows – Hdim A = −1 if and only if 1A = 0A . – Let ` > 0, we have the equivalence Hdim A 6 ` ⇐⇒ for every x ∈ A, Hdim(AxH ) 6 ` − 1. This dimension is less than or equal to the Jdim defined by Heitmann in [98], i.e. the Krull dimension of the distributive lattice Heit(A). 2.5. Fact. 1. The Heitmann dimension can only decrease by passage to a quotient ring. 2. The Heitmann dimension is always less than or equal to the Krull dimension.  3. More precisely Hdim A 6 Kdim A/JA (0) 6 Kdim A.  4. Finally, Hdim A 6 0 if and only if Kdim A/JA (0) 6 0 (i.e. A is residually zero-dimensional). J 1. By induction on Hdim A(2 ) by noticing that for every x ∈ A, the ring (A/a)xH is a quotient of AxH . 2. By induction on Kdim A (by using 1 ) by noticing that AxH is a quotient of AxK . 2 Actually by induction on n such that Hdim A 6 n. 812 XIV. The number of generators of a module 3 and 4. Let B = A/JA (0). Then JB (0) = h0i, and we have AxH ' BxH = BxK for all x ∈ A.  Bass’ “stable range” theorem, 2 2.6. Theorem. (Bass’ theorem, with the Heitmann dimension, without Noetherianity) Let n > 0. If Hdim A < n, then Bdim A < n. Abbreviated to: Bdim A 6 Hdim A. In particular if Hdim A < n, every stably free A-module of rank > n is free. J The same proof would give Theorem 1.4 by replacing the Heitmann boundary with the Krull boundary. Recall that Bdim A < n means that for all b1 , . . . , bn ∈ A, there exist some xi ’s such that the following implication is satisfied: ∀a ∈ A (1 ∈ ha, b1 , . . . , bn i ⇒ 1 ∈ hb1 + ax1 , . . . , bn + axn i). Recall that 1 ∈ hLi is equivalent to 1 ∈ JA (L) for every list L. We reason by induction on n. When n = 0 the ring is trivial and JA (1) = JA (∅). Suppose n > 1. Let j = JAH (bn ). The induction hypothesis gives x1 , . . . , xn−1 ∈ A such that 1 ∈ hb1 + x1 a, . . . , bn−1 + xn−1 ai in A/j. (1) Let L = (b1 + x1 a, . . . , bn−1 + xn−1 a). An arbitrary element of j is written in the form bn y + x with xbn ∈ JA (0). The membership (1) therefore means that there exists an xn such that xn bn ∈ JA (0) and 1 ∈ hL, bn , xn i . A fortiori 1 ∈ JA (L, bn , xn ) = JA (L, bn ) ∨ JA (xn ). (2) Note that by hypothesis 1 ∈ ha, b1 , . . . , bn i = hL, bn , ai. Therefore 1 ∈ JA (L, bn , a) = JA (L, bn ) ∨ JA (a). (3) As JA (xn a) = JA (a) ∧ JA (xn ), (2) and (3) give by distributivity 1 ∈ JA (L, bn ) ∨ JA (xn a) = JA (L, bn , xn a). Since bn xn a ∈ JA (0), Lemma 2.2 gives JA (bn , xn a) = JA (bn + xn a), and so 1 ∈ JA (L, bn + xn a) = JA (L, bn , xn a), as required.  §2. Heitmann dimension and Bass’ theorem 813 “Improved” variant of Kronecker’s theorem 2.7. Lemma. Let a, c1 , . . . , cm , u, v, w ∈ A and Z = (c1 , . . . , cm ). 1. a ∈ DA (Z) ⇐⇒ 1 ∈ hZiA[a−1 ] .  2. w ∈ Rad(A[a−1 ]) and a ∈ DA (Z, w) =⇒ a ∈ DA (Z).  3. uv ∈ Rad(A[a−1 ]) and a ∈ DA (Z, u, v) =⇒ a ∈ DA (Z, u + v). J 1. Immediate. 2. Suppose a ∈ DA (Z, w) and work in the ring A[a−1 ]. We have 1 ∈ hZiA[a−1 ] + hwiA[a−1 ] , and as w is in Rad(A[a−1 ]), this implies that 1 ∈ hZiA[a−1 ] , i.e. a ∈ DA (Z). 3. Results from item 2 because DA (Z, u, v) = DA (Z, u+v, uv) (Lemma 1.1). Remark. We can ask ourselves if the ideal Rad A[a−1 ] is the best possible. The answer is yes. The implication of item 2 is satisfied (for every Z) by replacing Rad A[a−1 ] with J if and only if J ⊆ Rad A[a−1 ]. 2.8. Lemma. Suppose that Hdim A[1/a] < n, L ∈ An and DA (b) 6 DA (a) 6 DA (b, L). Then there exists an X ∈ An such that DA (L + bX) = DA (b, L), which is equivalent to b ∈ DA (L + bX), or to a ∈ DA (L + bX). In addition, we can take X = aY with Y ∈ An . J Preliminary remark. If DA (L + bX) = DA (b, L), we have a ∈ DA (L + bX) because a ∈ DA (b, L). Conversely, if a ∈ DA (L + bX), we have b ∈ DA (L + bX) (since b ∈ DA (a)), so DA (L + bX) = DA (b, L). We reason by induction on n. The case n = 0 is trivial. Let L = (b1 , . . . , bn ) and we start by looking for X ∈ An . H Let j = JA[1/a] (bn ) and A0 = A/(j ∩ A), where j ∩ A stands for “the inverse image of j in A.” We have an identification A[1/a]/j = A0 [1/a]. As Hdim A0 [1/a] < n − 1, we can apply the induction hypothesis to A0 and (a, b, b1 , . . . , bn−1 ), by noticing that bn = 0 in A0 . We then obtain x1 , . . . , xn−1 ∈ A such that, by letting Z = (b1 + bx1 , . . . , bn−1 + bxn−1 ), we have D(Z) = D(b, b1 , . . . , bn−1 ) in A0 . By the preliminary remark, this last equality is equivalent to a ∈ DA0 (Z), which, by Lemma 2.7 1, means that 1 ∈ hZi in A0 [1/a], i.e. 1 ∈ hZi + j in A[1/a]. By definition of the Heitmann boundary, this means that there exists an xn , which we can choose in A, such that xn bn ∈ Rad A[1/a] and 1 ∈ hZ, bn , xn iA[1/a] . We therefore have a ∈ DA (Z, bn , xn ). But we also have a ∈ DA (Z, bn , b), since def hZ, bn , bi = hb1 , , . . . , bn−1 , bn , bi = hL, bi, and since a ∈ DA (L, b) by hypothesis. Recap: a ∈ DA (Z, bn , xn ), a ∈ DA (Z, bn , b) so a ∈ DA (Z, bn , bxn ). The application of Lemma 2.7 3 with 814 XIV. The number of generators of a module u = bn , v = bxn provides a ∈ DA (Z, bn + bxn ), i.e. a ∈ DA (L + bX) where X = (x1 , . . . , xn ). Finally, if bp ∈ haiA , we can apply the result with bp+1 instead of b since DA (b) = DA (bp+1 ). Then L + bp+1 X is re-expressed as L + baY .  For a ∈ A, we always have Hdim A[1/a] 6 Kdim A[1/a] 6 Kdim A. Consequently the following theorem improves Kronecker’s theorem. 2.9. Theorem. (Kronecker’s theorem, Heitmann dimension) 1. Let n > 0. If a, b1 , . . ., bn ∈ A and Hdim A[a−1 ] < n, then there exist x1 , . . ., xn ∈ A such that DA (a, b1 , . . . , bn ) = DA (b1 + ax1 , . . . , bn + axn ). 2. Consequently, if a1 , . . . , ar , b1 , . . . , bn ∈ A and Hdim A[1/ai ] < n for i ∈ J1..rK, then there exist y1 , . . . , yn ∈ ha1 , . . . , ar i such that DA (a1 , . . . , ar , b1 , . . . , bn ) = DA (b1 + y1 , . . . , bn + yn ). J 1. Direct consequence of Lemma 2.8 by making a = b. 2. Deduced from 1 by induction on r: DA (a1 , . . . , ar , b1 , . . . , bn ) a = = b ∨ DA (ar ), b = DA (b1 + z1 , . . . , bn + zn ) = DA (a1 , . . . , ar−1 , b1 , . . . , bn ) ∨ DA (ar ) with where z1 , . . . , zn ∈ ha1 , . . . , ar−1 i, so a = DA (ar , b1 + z1 , . . . , bn + zn ), and we once again apply the result.  3. Serre’s Splitting Off theorem, the Forster-Swan theorem, and Bass’ cancellation theorem In this section, we describe the matrix properties of a ring that allow us to make Serre’s Splitting Off theorem and the Forster-Swan theorem (control of the number of generators of a finitely generated module in terms of the number of local generators) work. The following sections consist in developing results that show that certain rings satisfy the matrix properties in question. The first rings that appeared (thanks to Serre and Forster) were the Noetherian rings with certain dimension properties (the Krull dimension for Forster and the dimension of the maximal spectrum for Serre and Swan). Later Heitmann showed how to get rid of the Noetherianity regarding the Krull dimension, and gave the guiding ideas to do the same for the dimension of the maximal spectrum. In addition Bass also introduced a generalization in which he would replace the Krull dimension by the maximum of the Krull dimensions for the rings associated §3. Serre’s Splitting Off and Forster-Swan theorems 815 with a partition of the Zariski spectrum in constructible subsets. Finally, Coquand brought a “definitive” light to these questions by generalizing the results and by treating them constructively thanks to two subjacent notions to the previous proofs: n-stability on the one hand and Heitmann dimension on the other. The purely matrix aspect of the problems to be solved has clearly been highlighted in a review paper by Eisenbud-Evans [71, (1973)]. The present section can be considered as a non-Noetherian and constructive approach to these works. 3.1. Definition. Let A be a ring and n > 0 be an integer. 1. We write Sdim A < n if, for every matrix F of rank > n, there is a unimodular linear combination of the columns. In other words 1 = Dn (F ) ⇒ ∃X, 1 = D1 (F X). 2. We write Gdim A < n when the following property is satisfied. For every matrix F = [ C0 | C1 | . . . | Cp ] (the Ci ’s are the columns, and let G = [ C1 | . . . | Cp ]) that 1 = D1 (C0 ) + Dn (G), there is a linear Psuch p combination C0 + i=1 αi Ci , which is unimodular. In the acronym Sdim, S refers to “splitting” or to “Serre” and is justified by Theorem 3.4. Similarly, in Gdim, G refers to “generators” and is justified by Theorem 3.6. The notations Sdim A < n and Gdim A < n are justified by the following obvious implications, for every n > 0, Sdim A < n ⇒ Sdim A < n + 1 and Gdim A < n ⇒ Gdim A < n + 1. Note that Dn (F ) ⊆ D1 (C0 ) + Dn (G), and consequently the hypothesis for F in Sdim A < n implies the hypothesis for F in Gdim A < n. Moreover the conclusion in Gdim A < n is stronger. This gives the following item 2. 3.2. Fact. 1. Sdim A < 0 ⇐⇒ Gdim A < 0 ⇐⇒ the ring A is trivial. 2. For all n > 0, we have Gdim A < n =⇒ Sdim A < n. Abbreviated to Sdim A 6 Gdim A. 3. If B = A/a, we have Sdim B 6 Sdim A and Gdim B 6 Gdim A. 4. We have Sdim A = Sdim A/Rad A and Gdim A = Gdim A/Rad A. 5. If A is n-stable (Section 4), then Gdim A < n (Theorem 5.3). Abbreviated to Gdim A 6 Cdim A. 6. If Hdim A < n, then Gdim A < n (Theorem 5.7). Abbreviated to Gdim A 6 Hdim A. J It suffices to prove items 3 and 4. Item 4 is clear because an element of A is invertible in A if and only if it is invertible in A/(Rad A). 3 for Sdim. Let F ∈ Am×r with Dn (F ) = 1 modulo a. If n > inf(m, r) we obtain 1 ∈ a and all is well. Otherwise, let a ∈ a such that 1 − a ∈ Dn (F ). 816 XIV. The number of generators of a module Consider the matrix H ∈ A(m+n)×r obtained by superposing F and the matrix aIn followed by r − n null columns. We have 1 − an ∈ Dn (F ), so 1 ∈ Dn (H). A linear combination of the columns of H is unimodular. The same linear combination of the columns of F is unimodular modulo a. 3 for Gdim. The same technique works, but here it suffices to consider the matrix H ∈ A(m+1)×r obtained by inserting the row [ a 0 · · · 0 ] underneath F .  The proof of the following fact helps to justify the slightly surprising definition chosen for Gdim A < n. 3.3. Fact. For all n > 0, we have Gdim A < n ⇒ Bdim A < n. Abbreviated to Bdim A 6 Gdim A. J For example with n = 3. Consider (a, b1 , b2 , b3 ) with 1 = ha, b1 , b2 , b3 i. We want some xi ’s such b1 a the matrix F =  b2 0 b3 0 that 1 =  hb1 + ax1 , b2 + ax2 , b3 + ax3 i. Consider 0 0 a 0  = [ C0 | G ] with G = aI3 . We have 0 a 1 = D1 (C0 ) + D3 (G), i.e. 1 = hb1 , b2 , b3 i + a3 , because 1 = hb1 , b2 , b3 i + hai. By applying the definition of Gdim A < 3 to F , we obtain a unimodular vector t[ b1 + ax1 b2 + ax2 b3 + ax3 ].  Serre’s Splitting Off theorem The following version of Serre’s theorem is relatively easy, the delicate part being to establish that Sdim A < k for a ring A. Modulo Theorems 5.3 and 5.7 we obtain the truly strong versions of the theorem. 3.4. Theorem. (Serre’s Splitting Off theorem, with Sdim) Let k > 1 and M be a projective A-module of rank > k, or more generally isomorphic to the image of a matrix of rank > k. Suppose that Sdim A < k. Then M ' N ⊕ A for a certain module N isomorphic to the image of a matrix of rank > k − 1. J Let F ∈ An×m be a matrix with Dk (F ) = 1. By definition, we have a vector u = t[ u1 · · · un ] ∈ Im F which is unimodular in An . Therefore Au is a free submodule of rank 1 and a direct summand in An , and a fortiori in M . More precisely, if P ∈ AGn (A) is a projector of image Au, we obtain M = Au ⊕ N with  N = Ker(P ) ∩ M = (In − P )(M ) = Im (In − P ) F . It remains to see that (In −P ) F is of rank > k−1. Even if it entails localizing and making a change of basis, we can suppose that P is the standard §3. Serre’s Splitting Off and Forster-Swan theorems 817 projection I1,n . Then the matrix G = (In − P ) F is the matrix F in which we have replaced its first row by 0, and it is clear that Dk (F ) ⊆ Dk−1 (G).  Thus, if M is the image of F ∈ An×m of rank > k, we obtain a decomposition M = N ⊕ L where L is free of rank 1 as a direct summand in An and N isomorphic to the image of a matrix of rank > k − 1. Now if F is of greater rank, we can iterate the procedure and we have the following corollary (with the correspondence h ↔ k − 1). 3.5. Corollary. Let A be a ring such that Sdim A 6 h, and M be a module isomorphic to the image of a matrix of rank > h + s. Then M contains as a direct summand a free submodule of rank s. More precisely, if M is the image of F ∈ An×m of rank > h + s, we have M = N ⊕ L where L is free of rank s and a direct summand in An , and N is the image of a matrix of rank > h. The Forster-Swan theorem Recall that a finitely generated module M is said to be locally generated by r elements if Fr (M ) = 1. On this subject see the local number of generators lemma (Lemma IX -2.4). The Forster-Swan theorem below was first established for the Krull dimension (Kdim instead of Gdim). The version presented here is relatively easy, and the delicate part is to establish that Gdim A 6 Kdim A for every ring A. Modulo Theorems 5.3 and 5.7 we obtain the known better versions of the theorem, under an entirely constructive form. 3.6. Theorem. (Forster-Swan theorem, with Gdim) Let k > 0 and r > 1. If Gdim A 6 k, or even only if Sdim A 6 k and Bdim A 6 k + r, and if a finitely generated A-module M is locally generated by r elements, then it is generated by k + r elements. In the first case, more precisely, if M is generated by y1 , . . . , yk+r+s , we can compute z1 , . . . , zk+r in hyk+r+1 , . . . , yk+r+s i such that M is generated by y1 + z1 , . . ., yk+r + zk+r . J Since M is finitely generated and Fr (M ) = 1, M is the quotient of a finitely presented module M 0 satisfying Fr (M 0 ) = 1. We can therefore suppose that M is finitely presented. Starting from a generator set with more than k + r elements, we are going to replace it with a generator set of the stated form minus an element. Therefore let (y0 , y1 , . . . , yp ) be a generator set of M with p > k + r, and F be a presentation matrix of M for this system. Then by hypothesis 1 = Fr (M ) = Dp+1−r (F ), and since p + 1 − r > k + 1 we have 1 = Dk+1 (F ). 818 XIV. The number of generators of a module First case. Let L0 , . . . , Lp be the rows of F . We apply the definition of Gdim A < k + 1 with the transposed matrix of F (which is of rank > k + 1). We obtain some ti ’s such that the row L0 + t1 L1 + · · · + tp Lp is unimodular. Replacing the row L0 with the row L0 + t1 L1 + · · · + tp Lp amounts to the same as replacing the generator set (y0 , y1 , . . . , yp ) with (y0 , y1 − t1 y0 , . . . , yp − tp y0 ) = (y0 , y10 , . . . , yp0 ). Since the new row L0 is unimodular, a suitable linear combination of the columns is of the form t[ 1 y1 · · · yp ]. This means that we have y0 + y1 y10 + · · · + yp yp0 = 0 in M , and thus that (y10 , . . . , yp0 ) generates M . Second case. We apply the definition of Sdim A < k + 1 with the matrix F . We obtain a unimodular linear combination of columns, and we add this column in the first position in front of F . Then, by applying Fact V -4.9 with Bdim A < k + r + 1 6 p + 1, by elementary row operations, we obtain a new presentation matrix of M (for another generator set) with the first column equal to t[ 1 0 · · · 0 ]. This means that the first element of the new generator set is null.  Theorem 3.6 is obviously valid by replacing the ring A with the ring A/Ann(M ) or A/F0 (M ). We propose in Theorem 3.8 a slightly more subtle refinement. 3.7. Proposition. Let F = [ C0 | C1 | . . . | Cp ] ∈ An×(p+1) (the Ci ’s are the columns) and G = [ C1 | . . . | Cp ], such that F = [ C0 | G ]. If 1 = D1 (F ) and if we have Gdim(A/Dk+1 (F )) < k for k ∈ J1..qK, then there exist t1 , . . . , tp such that the vector C0 +t1 C1 +· · ·+tp Cp is unimodular modulo Dq+1 (F ). J First consider the ring A2 = A/D2 (F ). Since D1 (F ) = 1 and Gdim(A2 ) < 1, we obtain some t1,i ’s and C1,0 = C0 + t1,1 C1 + · · · + t1,p Cp such that D1 (C1,0 ) = 1 modulo D2 (F ), i.e. D1 (C1,0 ) + D2 (G) = 1. We change F into F1 by replacing C0 with C1,0 without changing G. Note that we have Di (F1 ) = Di (F ) for every i. We then consider the ring A3 = A/D3 (F1 ) with Gdim(A3 ) < 2. Since D1 (C1,0 ) + D2 (G) = 1, we obtain C2,0 = C1,0 + t2,1 C1 + · · · + t2,p Cp such that D1 (C2,0 ) = 1 modulo D3 (F ), i.e. D1 (C2,0 ) + D3 (G) = 1. We change F1 into F2 by replacing C1,0 with C2,0 without changing G. We once again have Di (F2 ) = Di (F ) for every i. We continue as above until we obtain a vector Cq,0 of the form C0 + t1 C1 + · · · + tp Cp unimodular modulo Dq+1 (F ).  §3. Serre’s Splitting Off and Forster-Swan theorems 819 3.8. Theorem. (Forster-Swan theorem, more general, with Gdim) Let M be a finitely generated module over A. Let fk = Fk (M ) be its Fitting ideals. Suppose that 1 ∈ fm (i.e. M is locally generated by m elements) and that for k ∈ J0..m − 1K, we have Gdim(A/fk ) < m − k. Then M is generated by m elements. More precisely, if M = hy1 , . . . , ym+s i, we can compute some zi ’s in hym+1 , . . . , ym+s i such that M = hy1 + z1 , . . . , ym + zm i. J Since f0 annihilates M , we can replace A with A/f0 , or, which amounts to the same thing, suppose that f0 = F0 (M ) = 0, which we do from now on. Starting with a generator set of M with more than m elements we are going to replace it by a generator set of the stated form minus an element. Therefore let (y0 , y1 , . . . , yp ) be a generator set of M with p > m. When the module is finitely presented we reason as for Theorem 3.6. Let F be a presentation matrix of M for the considered generator set. We have fk+1 = Dp−k (F ), and in particular 1 ∈ fp = D1 (F ). The hypotheses of Proposition 3.7 are then satisfied with q = p for the transposed matrix of F . If L0 , . . . , Lp are the rows of F , we obtain some ti ’s with L0 +t1 L1 +· · ·+tp Lp unimodular modulo Dp+1 (F ) = f0 = 0. The remainder of the argument is as in Theorem 3.6. The reasoning in the case where M is only assumed to be finitely generated consists in showing that M is the quotient of a finitely presented module which has a presentation matrix supporting with success the proof of Proposition 3.7. Let y = [ y0 · · · yp ]. Every syzygy between the yi ’s is of the form y C = 0 for some C ∈ Ap+1 . The Fitting ideal fp+1−i of M is the ideal ∆i , the sum of the determinantal ideals Di (F ), for F ∈ A(p+1)×n that satisfy y F = 0, i.e. for the matrices that are “syzygy matrices for (y0 , . . . , yp ).” By the hypotheses, we have ∆1 = 1 and Gdim(A/∆k+1 ) < k for k ∈ J1..pK. The fact that ∆1 = 1 is observed over a syzygy matrix F1 . Consider the matrix tF 1 and the ring A2 = A/∆2 . As Gdim(A2 ) < 1, we obtain a linear combination C1,0 of the columns of tF 1 unimodular modulo ∆2 , i.e. such that 1 = D1 (C1,0 ) + ∆2 . More precisely, we obtain C1,0 = tF 1 X1 with X1 = t[ 1 x1,1 · · · x1,p ]. The equality 1 = D1 (C1,0 ) + ∆2 provides an element a ∈ ∆2 obtained as a linear combination of a finite number of minors of order 2 of syzygy matrices, and so a ∈ D2 (F2 ) for a syzygy matrix F2 . Then consider the matrix F20 = [ F1 | F2 ]. For the transposed matrix of F20 we first obtain that the column C2 = tF20 X1 is unimodular. We replace the first column of tF20 by C2 , which gives a matrix tF200 suitable for the hypotheses of Gdim A3 < 2 (where A3 = A/∆3 ), i.e. 1 = D1 (C2 ) + D2 (F200 ). We ultimately obtain a linear combination C2,0 of the columns of tF20 unimodular modulo ∆3 , i.e. such that 1 = D1 (C2,0 ) + ∆3 . More precisely, C2,0 = tF20 X2 with X2 = t[ 1 x2,1 · · · x2,p ]. And so forth. 820 XIV. The number of generators of a module We ultimately obtain a syzygy matrix for y, F = [ F1 | · · · | Fp ] t and a vector Xp = [ 1 xp,1 · · · xp,p ] with the linear combination tF Xp unimodular (since it is unimodular modulo ∆p+1 = f0 = 0). The remainder of the argument is as in Theorem 3.6.  Comment. Theorem 3.8 with Hdim or Kdim instead of Gdim has as an easy consequence in classical mathematics some much more abstract statements, which seem much more scholarly. For example the usual statement of the Forster-Swan theorem3 (stated in the case where Max A is Noetherian) uses the maximum,4 for p ∈ jspec A of µp (M ) + Kdim(A/p): here µp (M ) is the minimum number of generators of Mp . This type of statement suggests that the prime ideals that are intersections of maximal ideals play an essential role in the theorem. In reality, it is not necessary to scare children with jspec A, because this abstract theorem is exactly equivalent (in the considered case, and in classical mathematics) to Theorem 3.8 for the Jdim, which in this envisaged case is equal to the Hdim. In addition, from a strictly practical point of view it is unclear how to access the quite mysterious maximum of the µp (M ) + Kdim(A/p). By contrast, the hypotheses of Theorem 3.8 are susceptible to a constructive proof, which in this case will lead to an algorithm making it possible to explicate the conclusion. Bass’ cancellation theorem 3.9. Definition. Given two modules M and L we say that M is cancellative for L if M ⊕ L ' N ⊕ L implies M ' N . 3.10. Lemma. Let M and L be two A-modules. In the following statements we have 1 ⇔ 2 and 3 ⇒ 2. 1. M is cancellative for L. 2. For every decomposition M ⊕ L = M 0 ⊕ L0 with L0 ' L, there exists an automorphism σ of M ⊕ L such that σ(L0 ) = L. 3. For every decomposition M ⊕ L = M 0 ⊕ L0 with L0 ' L, there exists an automorphism θ of M ⊕ L such that θ(L0 ) ⊆ M . J The equivalence of 1 and 2 is a game of photocopies. ∼ 1 ⇒ 2. Suppose M ⊕ L = M 0 ⊕ L0 . Since L −→ L0 , we obtain an isomor∼ ∼ 0 0 phism M ⊕ L −→ M ⊕ L, so M −→ M , and by performing the sum we ∼ obtain an isomorphism M ⊕ L −→ M 0 ⊕ L0 , i.e. an automorphism of M ⊕ L 3 Corollary 2.14 (page 108) in [Kunz] or Theorem 5.8 (page 36) in [Matsumura]. In addition, the authors replace A with A/Ann(M ) , which costs nothing. 4 Recall that jspec A designates the subspace of Spec A formed by the prime ideals which are intersections of maximal ideals. §3. Serre’s Splitting Off and Forster-Swan theorems 821 which sends L to L0 . ∼ 2 ⇒ 1. Suppose N ⊕ L −→ M ⊕ L. This isomorphism sends N to M 0 and L to L0 , such that M ⊕ L = M 0 ⊕ L0 . Therefore there is an automorphism σ of M ⊕ L which sends L to L0 , and say M to M1 . Then, N ' M 0 ' (M 0 ⊕ L0 )/L0 = (M ⊕ L)/L0 = (M1 ⊕ L0 )/L0 ' M1 ' M. 3 ⇒ 2. Since θ(L0 ) is a direct summand in M ⊕ L, it is a direct summand in M , which we write as M1 ⊕ θ(L0 ). Let λ be the automorphism of M ⊕ L which swaps L and θ(L0 ) by fixing M1 . Then σ = λ ◦ θ sends L0 to L.  Recall that an element x of an arbitrary module M is said to be unimodular when there exists a linear form λ ∈ M ? such that λ(x) = 1. It amounts to the same as saying that Ax is free (of basis x) and a direct summand in M (Proposition II -5.1). 3.11. Theorem. (Bass’ cancellation theorem, with Gdim) Let M be a finitely generated projective A-module of rank > k. If Gdim A < k, then M is cancellative for every finitely generated projective A-module: if Q is finitely generated projective and M ⊕ Q ' N ⊕ Q, then M ' N . J Suppose that we have shown that M is cancellative for A. Then, since M ⊕ A` also satisfies the hypothesis, we show by induction on ` that M is cancellative for A`+1 . As a result M is cancellative for every direct summand in A`+1 . Finally, M is cancellative for A because it satisfies item 3 of Lemma 3.10 for L = A. Indeed, suppose that M = Im F ⊆ An , where F is a projection matrix (of rank > k), and let L0 be a direct summand in M ⊕ A, isomorphic to A: L0 = A(x, a) with (x, a) unimodular in M ⊕ A. Since every linear form over M extends to An , there exists a form ν ∈ (An )? such that 1 ∈ hν(x), ai. By Lemma 3.12 below, with x = C0 , there exists a y ∈ M such that x0 = x + ay is unimodular in M . Consider a form µ ∈ M ? such that µ(x0 ) = 1. We then define an automorphism θ of M ⊕ A as follows        1 0 1 y m m + by θ= i.e. 7→ . −aµ 1 0 1 b µ(x)b − aµ(m) Then θ(x, a) = (x0 , 0), so θ(L0 ) ⊆ M . The result follows by Lemma 3.10. In the following lemma, which ends the proof of Theorem 3.11, we use the notations of Proposition 3.7, the matrix F = [ C0 | C1 | . . . | Cp ] being that of the previous theorem. 3.12. Lemma. If Gdim A < k and Dk (F ) = 1 = DA (C0 ) ∨ DA (a), then there exist t1 , . . . , tp such that 1 = DA (C0 + at1 C1 + · · · + atp Cp ). 822 XIV. The number of generators of a module J Consider the matrix [ C0 | aC1 | . . . | aCp ], obtained by replacing G by aG in F . As DA (C0 ) ∨ Dk (G) = 1 = DA (C0 ) ∨ DA (a), we indeed have by distributivity DA (C0 ) ∨ Dk (aG) = 1. The result follows since Gdim A < k. A simple characteristic property for Gdim A < n In order to prove Gdim A < n for a ring A it suffices to verify the conclusion (in the definition of Gdim A < n) for particularly simple matrices. This is the subject of the following proposition. 3.13. Proposition. For a ring A we have Gdim A < n if and only if for every matrix V ∈ Mn+1 (A) of the form   b c1 · · · · · · cn  b1 a 0 ··· 0     .. ..  .. . .  . . .  0 V = .  = [ V0 | V1 | . . . | Vn ],  .  . . . .. .. .. 0   .. bn 0 · · · 0 a and for every d ∈ A such that 1 = hb, a, di, there exist xi ’s ∈ A such that 1 = D1 (V0 + x1 V1 + · · · + xn Vn ) + hdi . Remark. Instead of using an element d subjected to the constraint 1 = ha, b, di, we could have used a pair (u, v) not subjected to any constraint and replaced d by 1 + au + bv in the conclusion. In this form, it is particularly obvious that if the condition above is satisfied for the ring A, it is satisfied for every quotient of A. J To show that the condition is necessary, we reason with the quotient ring B = A/hdi and we consider the matrix F = V = [ V0 | V1 | . . . | Vn ]. With the notations of Definition 3.1 we have p = n, F = [ C0 | G ], and Ci = Vi for i ∈ J0..nK. Since 1 = hb, a, di in A, we have 1 = hb, an i ⊆ D1 (C0 )+Dn (G) in B, and the hypothesis of the definition is satisfied. Since Gdim B < n, we obtain xi ’s in A such that 1 = D1 (C0 + x1 C1 + · · · + xn Cn ) in B. Hence the desired conclusion in A. To prove the converse we proceed in two steps. First of all recall that if the condition is satisfied for the ring A, it is satisfied for every quotient of A. We will actually use this condition with d = 0 (the hypothesis over V then becomes of the same type as that which serves to define Gdim < n), with the ring A and certain of its quotients. §4. Supports and n-stability 823 First step: the case where the matrix F has n + 1 columns, i.e. p = n. With F ∈ Am×(n+1) , we have by hypothesis a linear form ϕ0 : Am → A and an n-multilinear alternating form ψ : (Am )n → A such that 1 = ϕ0 (C0 ) + ψ(C1 , . . . , Cn ). For j ∈ J1..nK let ϕj : Am → A be the linear form X 7→ ψ(C1 , . . . , Cj−1 , X, Cj , . . . , Cn ). By letting a = ψ(C1 , . . . , Cn ), we then have • ϕ1 (C1 ) = · · · = ϕn (Cn ) = a, • ϕi (Cj ) = 0 if 1 6 i 6= j 6 n Considering the matrix of the ϕi (Cj )’s, we obtain  ϕ0 (C0 ) ϕ0 (C1 ) · · ·  a 0  ϕ1 (C0 )   .. .. . V = [ V0 | . . . | Vn ] :=  . 0   . . ..  .. .. .  ϕn (C0 ) 0 ··· · · · ϕ0 (Cn )  ··· .. . .. .     ,     0   that is V = [ ϕ(C0 ) | . . . | ϕ(Cn ) ] by letting ϕ(Z) =  0 .. . 0 a  ϕ0 (Z) .. . .  ϕn (Z) We can apply the hypothesis with d = 0. We find x1 , . . . , xn ∈ A such that the vector V0 + x1 V1 + · · · + xn Vn is unimodular. This vector is equal to ϕ(C0 + x1 C1 + · · · + xn Cn ) = ϕ(C). Since this vector is unimodular and since ϕ is linear, the vector C is itself unimodular. Second step: the general case. As 1 = D1 (C0 ) + Dn (G), we have a family (αi )i∈J1..qK of subsets with n P elements of J1..pK such that 1 = D1 (C0 ) + i Dn (Gαi ), where Gαi is the extracted matrix of G by uniquely P considering the columns whose index is in αi . Let C0,0 = C0 and J` = i>` Dn (Gαi ). We then apply the case of the first step successively with ` = 1, . . . , q to obtain 1 = D1 (C0,` ) = D1 (C0,`−1 ) + Dn (Gα` ) in A/J` and therefore D1 (C0,q ) = 1 in A. Note that in this second step, we use the result of the first step with quotient rings of A.  4. Supports and n-stability In Section 5 we will establish theorems regarding the elementary operations on matrices. They will have as corollaries some grand theorems due to Serre, 824 XIV. The number of generators of a module Forster, Bass and Swan. We will give them in two similar but nevertheless different versions. We do not think that they can be reduced to a unique form. The first version is based on the notion of n-stability. This version leads inter alia to a sophisticated result due to Bass in which a partition of the Zariski spectrum intervenes in a finite number of subsets which are all of small dimension (smaller than the Krull dimension of the ring). This result will be used in Chapter XVI to prove Bass’ theorem (Theorem XVI -6.8) regarding the extended modules. The second version uses the Heitmann dimension, introduced in Section 2, less than or equal to the Krull dimension, but for which we do not know of an analogue of Bass’ sophisticated version. Section 4 gives a few necessary preliminaries for the first version based on the n-stability. Supports, dimension, stability 4.1. Definition. A support over a ring A in a distributive lattice T is a map D : A → T, which satisfies the following axioms • D(0A ) = 0T , D(1A ) = 1T , • D(ab) = D(a) ∧ D(b), • D(a + b) 6 D(a) ∨ D(b). Let D(x1 , . . . , xn ) = D(x1 ) ∨ · · · ∨ D(xn ). It is clear that DA : A → Zar A is a support, called the Zariski support. The following lemma shows that the Zariski support is the “free” support. 4.2. Lemma. For every support D we have 1. D(am ) = D(a) for m > 1, D(ax) 6 D(x), D(a, b) = D(a + b, ab). 2. hx1 , . . . , xn i = hy1 , . . . , yr i implies D(x1 , . . . , xn ) = D(y1 , . . . , yr ). 3. DA (y) 6 DA (x1 , . . . , xn ) implies D(y) 6 D(x1 , . . . , xn ). 4. There exists a unique homomorphism θ of distributive lattices which makes the following diagram commute: A DA  Zar A D supports &/ T homomorphisms of distributive lattices J The proof is left to the reader.  θ! Thus every support D : A → T such that D(A) generates T as a distributive lattice is obtained by composing the Zariski support with a passage to the §4. Supports and n-stability 825 quotient Zar A → Zar A/∼ by an equivalence relation compatible with the lattice structure. Denote D(a) by D(x1 , . . . , xn ) if a = hx1 , . . . , xn i. We say that a vector X ∈ An is D-unimodular if D(X) = 1. Dimension of a support, Kronecker’s theorem 4.3. Definition. Given two sequences (x0 , . . . , xn ) and (b0 , . . . , bn ) in A and a support D over A, we say that the two sequences are D-complementary if we have the following inequalities  D(b0 x0 ) = D(0)     D(b1 x1 ) 6 D(b0 , x0 )   .. .. .. (4) . . .   D(bn xn ) 6 D(bn−1 , xn−1 )     D(1) = D(bn , xn ) The support D is said to be of Krull dimension 6 n if every sequence (x0 , . . . , xn ) in A admits a D-complementary sequence. Let Kdim(D) 6 n. For example for n = 2 the complementary sequences correspond to the following picture in T. 1 D(x2 ) D(b2 ) • • D(x1 ) D(b1 ) • • D(x0 ) D(b0 ) 0 Remark. Note that Kdim A = Kdim(DA ). The proof of the following lemma can be copied from that of Lemma 1.2 by replacing DA by D. Kronecker’s theorem is then a direct consequence. 4.4. Lemma. Let ` > 1. If (b1 , . . . , b` ) and (x1 , . . . , x` ) are two Dcomplementary sequences in A, then for every a ∈ A we have D(a, b1 , . . . , b` ) = D(b1 + ax1 , . . . , b` + ax` ), i.e. D(a) 6 D(b1 + ax1 , . . . , b` + ax` ). 826 XIV. The number of generators of a module 4.5. Theorem. (Kronecker’s theorem, for the supports) If D is a support of Krull dimension 6 n, for every finitely generated ideal a there exists an ideal b generated by n + 1 elements such that D(a) = D(b). Actually, for all b1 , . . . , bn+r (r > 2), there exist cj ∈ hbn+2 , . . . , bn+r i such that D(b1 + c1 , . . . , bn+1 + cn+1 ) = D(b1 , . . . , bn+r ). Faithful supports In this subsection we prove in particular that the Krull dimension of a ring (which we already know is equal to the dimension of its Zariski support) is equal to that of its Zariski lattice: here we keep the promise made in XIII -6.3. 4.6. Definition. A support D : A → T is said to be faithful if T is generated by the image of D and if, for every a ∈ A and L ∈ Am , the inequality D(a) 6 D(L) implies the existence of a b ∈ hLi such that D(a) 6 D(b). For example the Zariski support DA is always faithful. Let D : A → T be a support. If the image of A generates T, since we have the equality D(a1 ) ∧ · · · ∧ D(an ) = D(a1 · · · an ), every element of T can be written in the form D(L) for a list L of elements of A. 4.7. Lemma. If D is faithful and Kdim T < k then Kdim(D) < k. In particular the Krull dimension of a ring is equal to that of its Zariski lattice. J Let (a1 , . . . , ak ) be a sequence in A. We must show that it admits a D-complementary sequence.  Since Kdim T < k, the sequence D(a1 ), . . . , D(ak ) has a complementary  sequence D(L1 ), . . . , D(Lk ) in T with lists in A for Li , D(a1 ) ∧ D(L1 ) D(a2 ) ∧ D(L2 ) .. . = D(0) 6 D(a1 , L1 ) .. .. . . D(ak ) ∧ D(Lk ) 6 D(ak−1 , Lk−1 ) D(1) = D(ak , Lk ). Since D is faithful, there exists a ck in hak , Lk i such that D(1) 6 D(ck ), which gives bk ∈ hLk i such that D(1) 6 D(ak , bk ). Note that we have D(ak bk ) = D(ak ) ∧ D(bk ) 6 D(ak ) ∧ D(Lk ) 6 D(ak−1 , Lk−1 ). Since D is faithful, we have ck−1 ∈ hak−1 , Lk−1 i with D(ak bk ) 6 D(ck−1 ), which gives bk−1 ∈ hLk−1 i such that D(ak bk ) 6 D(ak−1 , bk−1 ). And so forth. Ultimately, we have constructed a sequence (b1 , . . . , bk ) which is D-complementary to (a1 , . . . , ak ).  §4. Supports and n-stability 827 n-stable supports We now abstract the property described in Lemma 4.4 for the complementary sequences in the following form. 4.8. Definition. 1. Let n > 1. A support D : A → T is said to be n-stable when, for all a ∈ A and L ∈ An , there exists an X ∈ An such that D(L, a) = D(L + aX), i.e. D(a) 6 D(L + aX). 2. The ring A is said to be n-stable if its Zariski support DA is n-stable. We will write Cdim A < n to say that A is n-stable. 3. The ring A is said to be 0-stable if it is trivial. In the acronym Cdim, C alludes to “Coquand.” Naturally, if Kdim(D) < n then D is n-stable. In particular, with the free support DA , we obtain Cdim A 6 Kdim A. Moreover, Kronecker’s theorem applies (almost by definition) to every n-stable support. The notation Cdim A < n is justified by the fact that if D is n-stable, it is (n + 1)-stable. Finally, item 3 in the definition was given for the sake of clarity, but it is not really necessary: by reading item 1 for n = 0, we obtain that for every a ∈ A, D(a) 6 D(0). Examples. 1) A valuation ring, or more generally a ring V which satisfies “a | b or b | a for all a, b,” is 1-stable, even in infinite Krull dimension. For all (a, b) it suffices to find some x such that ha, bi = hb + xai. If a = qb, we have ha, bi = hbi and we take x = 0. If b = qa, we have ha, bi = hai and we take x = 1 − q. 2) A Bézout domain is 2-stable. More generally, a strict Bézout ring (see Section IV -7 on page 206 and Exercise IV -7) is 2-stable. More precisely, for a, b1 , b2 ∈ A, there exist x1 , x2 such that a ∈ hb1 + x1 a, b2 + x2 ai, i.e. ha, b1 , b2 i = hb1 + x1 a, b2 + x2 ai. Indeed, by question 1.c of the exercise, there exist comaximal u1 and u2 such that u1 b1 + u2 b2 = 0. We take x1 , x2 such that u1 x1 + u2 x2 = 1 and we obtain the equality a = u1 b1 + a + u2 b2 = u1 (b1 + x1 a) + u2 (b2 + x2 a). 4.9. Fact. We always have Bdim A 6 Cdim A. J If A is n-stable, then Bdim A < n: indeed, we apply the definition with (a, a1 , . . . , an ) in A satisfying 1 ∈ ha, a1 , . . . , an i.  n 4.10. Fact. If D is n-stable, for every a ∈ A and L ∈ A , there exists an X ∈ An such that D(L, a) = D(L + a2 X), i.e. D(a) 6 D(L + a2 X). Indeed, D(a) = D(a2 ) and D(L, a) = D(L, a2 ). 828 XIV. The number of generators of a module Constructions and patchings of supports 4.11. Definition. The map JA : A → Heit A defines the Heitmann support. Remark. A priori Kdim DA = Kdim A > Kdim JA > Jdim A. We lack examples that would show that the two inequalities can be strict. 4.12. Lemma. (Variant of the Gauss-Joyal lemma II -2.6) If D is a support over A, we obtain a support D[X] over A[X] by letting  D[X](f ) = D c(f ) .    J Lemma II -2.6 gives DA c(f g) = DA c(f ) ∧ DA c(g) .  4.13. Lemma. (Support and quotient) Let D : A → T be a support and a be a finitely generated ideal of A. We obtain a support def D/a : A → T/a = T/(D(a) = 0) by composing D with the projection ΠD(a) : T → T/(D(a) = 0) . 1. DA /a is canonically isomorphic to DA/a ◦ Zar(πa ), where πa is the canonical map A → A/a . 2. If D is faithful, then so is D/a. 3. If D is n-stable, then so is D/a. In particular Cdim A/a 6 Cdim A. J Recall that ΠD(a) (x) 6 ΠD(a) (y) ⇐⇒ x ∨ D(a) 6 y ∨ D(a). 1. Results from Fact XI -4.5. 2. Let D0 = D/a . Let a ∈ A and L be a vector such that D0 (a) 6 D0 (L). We seek some b ∈ hLi such that D0 (a) 6 D0 (b). By definition of D0 we have D(a) 6 D(L, a), and since D is faithful, there exists a c ∈ hLi + a such that D(a) 6 D(c), which gives some b ∈ L such that D(a) 6 D(b, a), in other words D0 (a) 6 D0 (b). 3. Let a ∈ A and L ∈ An . We seek X ∈ An such that D0 (a) 6 D0 (L + aX), i.e. D(a) ∨ D(a) 6 D(L + aX) ∨ D(a). However, we have some X which is suitable for D, that is D(a) 6 D(L + aX), therefore it is suitable for D0 . Dually we have the following lemma. 4.14. Lemma. (Support and localization) Let D : A → T be a support and u be an element of A. We obtain a support def D[1/u] : A → T[1/u] = T/(D(u) = 1) by composing D with jD(u) : T → T/(D(u) = 1) . 1. DA [1/u] is canonically isomorphic to DA[1/u] ◦ Zar(ιu ), where ιu is the canonical map A → A[1/u]. 2. If D is faithful, then so is D[1/u]. §4. Supports and n-stability 829 3. If D is n-stable, then so is D[1/u]. In particular Cdim A[1/u] 6 Cdim A. J Recall that jD(u) (x) 6 jD(u) (y) ⇐⇒ x ∧ D(u) 6 y ∧ D(u). 1. Results from Fact XI -4.5. 2. Let D0 = D[1/u]. Let a ∈ A and L be a vector such that D0 (a) 6 D0 (L). By definition of D0 we have D(au) = D(a) ∧ D(u) 6 D(L). Since D is faithful, there exists a b ∈ hLi such that D(au) 6 D(b), i.e. D0 (a) 6 D0 (b). 3. As for Lemma 4.13 by replacing D/a and ∨ by D[1/u] and ∧.  4.15. Lemma. 1. Let D : A → T be a support and b ∈ A. a. D/b and D[1/b] are n-stable if and only if D is n-stable. b. If D is faithful and if T/b and T[1/b] are of Krull dimension < n, then D is n-stable. 2. Let A be a ring and b ∈ A. Then A/hbi and A[1/b] are n-stable if and only if A is n-stable.  Abbreviated to: Cdim A = sup Cdim A/hbi , Cdim A[1/b] . J It suffices to show the direct implication in item 1a. Let a ∈ A and L ∈ An . Since D/b is n-stable, we have some Y ∈ An such  that D(a) 6 D(L + aY ) in T/ D(b) = 0 , i.e. in T, D(a) 6 D(b) ∨ D(L + aY ). (∗) Next we apply the n-stability of D[1/b] with ab and L + aY which provides  some Z ∈ An such that D(ab) 6 D(L + aY + abZ) in T/ D(b) = 1 . In T, by letting X = Y + bZ, this is expressed as D(ab) ∧ D(b) 6 D(L + aX), i.e. D(ab) 6 D(L + aX). (#) But we have hb, L + aXi = hb, L + aY i, therefore D(b, L + aX) = D(b, L + aY ). The inequalities (∗) and (#) are then expressed as D(a) 6 D(b) ∨ D(L + aX) and D(a) ∧ D(b) 6 D(L + aX). This implies (by “cut,” see page 654) that D(a) 6 D(L + aX).  Constructible partitions of the Zariski spectrum A constructible subset of Spec A is a Boolean combination of open sets of basis D(a). In classical mathematics, if we equip the set Spec A with the “constructible topology” having as its basis of open sets the constructible subsets, we obtain a spectral space, the constructible spectrum of the ring A, which we can identify with Spec A• . From a constructive point of view, we have seen that we can replace Spec A (an object a little too ideal) by the lattice Zar A (a concrete object), isomorphic in classical mathematics to the lattice of compact-open subspaces of 830 XIV. The number of generators of a module Spec A. When we pass from the Zariski topology to the constructible topology in classical mathematics, we pass from Zar A to Bo(Zar A) ' Zar(A• ) in constructive mathematics (for this last isomorphism, see Theorem XI -4.26). Hyman Bass took interest in the partitions of the constructible spectrum. An elementary step of the construction of such a partition consists in the replacement of a ring B by the two rings B/hbi and B[1/b], for an element b of B. An important remark made by Bass is that these two rings can each have a strictly smaller Krull dimension than that of B, whereas certain properties of the ring, to be satisfied in B, only need to be satisfied in each of its two children. This is the case for the n-stability of the free support. In any case, this is the analysis that T. Coquand made from a few pages of [Bass]. In classical mathematics, from any covering of Spec A by open sets of the constructible topology, we can extract a finite covering, which we can refine into a finite partition by some compact-open subspaces (i.e. some finite Boolean combinations of open sets with basis D(a)). These are a lot of high caliber abstractions, but the result is extremely concrete, and this is the result that interests us in practice. We define in constructive mathematics a constructible partition of the Zariski spectrum by its dual version, which is a fundamental system of orthogonal idempotents in the Boolean algebra Zar A• = Bo(Zar A). In practice, an element of Zar A• is given by a double list in the ring A (a1 , . . . , a` ; u1 , . . . , um ) = (I; U ) that defines the following element of Zar A• V Q V • • • • i ¬DA (ai ) ∧ j DA (uj ) = ¬DA (a1 , . . . , a` ) ∧ DA (u), where u = j uj . To this element (I; U ) is associated the ring (A/hIi)[1/u].5 A fundamental system of orthogonal idempotents of Bo(Zar A) can then be obtained as a result of a tree construction which starts with the double list (0; 1) and which authorizes the replacement of a list (I; U ) by two double lists (I, a; U ) and (I; a, U ) for some a ∈ A. The following crucial theorem is a corollary of item 2 of Lemma 4.15. 4.16. Theorem. Consider a constructible partition of Spec A, described as above by a family (Ik ; Uk )k∈J1..mK . Let ak be the ideal hIk i and uk be the product of the elements of Uk . 1. If D : A → T is a support, and if all the (D/ak )[1/uk ]’s are n-stable, then D is n-stable. 2. In particular, if each ring A[1/uk ]/ak is n-stable (for example if its Krull dimension is < n), then A is n-stable. T T 5 In classical mathematics Spec(A/hIi)[1/u] = designates the complement of D(a). a∈I V(a) ∩ v∈U D(v), where V(a) §5. Elementary column operations 831 Remarks. 1) The paradigmatic case of an n-stable ring is given in the previous theorem when each ring A[1/ui ]/ai is of Krull dimension < n. 2) Every constructible partition of Spec A can be refined in the partition described by the 2n complementary pairs formed from a finite list (a1 , . . . , an ) in A. 3) Analogous tree constructions appear in Chapter XV in the framework of the basic concrete local-global principle, but there are other rings, localized rings denoted by AS(I;U ) , that intervene then. 5. Elementary column operations In this section we establish analogous theorems in two different contexts. The first uses the stability of a support, the second uses the Heitmann dimension. The reader can visualize most of the results of the chapter in the following picture, keeping in mind Theorems 3.4, 3.6, 3.8 and 3.11. An arrow such that Sdim −→ Gdim is added for Sdim A 6 Gdim A. Sdim Fac t 3. 2 −−− 2 → Bdim −−−→ 3.3 Fact 7 . 5. Thm → −−− Gdim −−− → Th m. 5.3 Hdim Fac t −−− 2.5 → Cdim −−−→ 4.8 Def. Kdim With the stability of a support In this subsection, D : A → T is a fixed support We fix the following notations, analogous to those used to define Gdim A < n in Definition 3.1. 5.1. Notation. Let F = [ C0 | C1 | . . . | Cp ] be a matrix in Am×(p+1) (the Ci ’s are the columns) and G = [ C1 | . . . | Cp ], such that F = [ C0 | G ].   Notice that for every n we have DA C0 , Dn (F ) = DA C0 , Dn (G) , and a   fortiori D C0 , Dn (F ) = D C0 , Dn (G) . 832 XIV. The number of generators of a module 5.2. Lemma. Suppose that D is n-stable and take the notation 5.1 with m = p = n. Let δ = det(G). There exist x1 , . . . , xn such that  D(C0 , δ) 6 D C0 + δ(x1 C1 + · · · + xn Cn ) .  J It suffices to realize D(δ) 6 D C0 + δ(x1 C1 + · · · + xn Cn ) , i.e. D(δ) 6 D(C0 + δGX) for some X ∈ An . e be the adjoint matrix of G and L = GC e 0 . For any X ∈ An , we Let G e 0 + δGX) = L + δ 2 X, so DA (L + δ 2 X) 6 DA (C0 + δGX), and have G(C a fortiori D(L + δ 2 X) 6 D(C0 + δGX). Since D is n-stable, by Fact 4.10, we have some X ∈ An such that D(δ) 6 D(L + δ 2 X). Therefore D(δ) 6 D(C0 + δGX), as required.  5.3. Theorem. (Coquand’s theorem, 1: Forster-Swan and others with the n-stability) We have Gdim A 6 Cdim A. Consequently, Serre’s Splitting Off, Forster-Swan’ and Bass’ cancellation theorems (3.4, 3.6, 3.8, 3.11) apply with the Cdim. J We assume Cdim A < n and we prove Gdim A < n. We use the characterization of Gdim A < n given in Proposition 3.13. Lemma 5.2 with the support D = DA/hdi tells us that the equivalent property described in 3.13 is satisfied if Cdim A/hdi < n. We conclude by observing that Cdim A/hdi 6 Cdim A.  5.4. Theorem. (Coquand’s theorem, 2: elementary column operations, support and n-stability) With the notations 5.1, let n ∈ J1..pK. If D is n-stable there exist t1 , . . . , tp ∈ Dn (G) such that  D C0 , Dn (G) 6 D(C0 + t1 C1 + · · · + tp Cp ). The proof of this theorem as a consequence of Lemma 5.2 is analogous to the proof of the difficult implication in Proposition 3.13, in a slightly different context. The result is stronger because Proposition 3.13 is only interested in the special case given in Corollary 5.5, with in addition D = DA . J We need to find t1 , . . . , tp in Dn (G) such that, for every minor ν of order n of G, we have D(C0 , ν) 6 D(C0 + t1 C1 + · · · + tp Cp ). Actually it suffices to know how to realize D(C0 , δ) 6 D C0 + δ(x1 C1 + · · · + xp Cp )  for one minor δ of order n of G, and  as previously mentioned, for this D(δ) 6 D C0 + δ(x1 C1 + · · · + xp Cp ) is sufficient. Indeed in this case, we replace C0 by C00 = C0 + δ(x1 C1 + · · · + xp Cp ) in F (without changing G), and we can pass to another minor δ 0 of G for which we will obtain x01 , . . . , x0p , satisfying  D(C0 , δ, δ 0 ) 6 D(C00 , δ 0 ) 6 D C00 + δ 0 (x01 C1 + · · · + x0p Cp ) = D(C000 ), §5. Elementary column operations 833 with C000 = C0 + t001 C1 + · · · + t00p Cp and so forth. To realize the inequality  D(δ) 6 D C0 + δ(x1 C1 + · · · + xp Cp ) for some minor δ of order n of G, we use Lemma 5.2 with the extracted matrix Γ corresponding to the minor δ, and for C0 we limit ourselves to the rows of Γ, which gives us a vector Γ0 . We obtain some X ∈ An such that D(δ) 6 D(Γ0 + δΓX) 6 D(C0 + δGZ). where Z ∈ Ap is obtained by completing X with 0’s.  Still with the notations 5.1, we obtain as a corollary the following result, which implies, when D = DA , that Gdim A 6 Cdim A. 5.5. Corollary. With the notations 5.1, let n ∈ J1..pK. If D is n-stable and 1 = D C0 , Dn (G) , there exist t1 , . . . , tp such that the vector C0 + t1 C1 + · · · + tp Cp is D-unimodular. With the Heitmann dimension 5.6. Lemma. We consider a matrix  b0 c 1 · · ·  b1 a 0   .. . ..  . 0   . . . .. ..  .. bn 0 · · · of the form  · · · cn ··· 0   .  .. . ..  ,  .. . 0  0 a for which we denote the columns by V0 , V1 , . . . , Vn . If Hdim A < n and 1 = DA (b0 , a), then there exist x1 , . . . , xn ∈ aA such that 1 = DA (V0 + x1 V1 + · · · + xn Vn ). J The proof is by induction on n. For n = 0, it is clear. H If n > 0, let j = IA (bn ). We have bn ∈ j and Hdim A/j < n − 1, therefore by induction hypothesis, we can find y1 , . . . , yn−1 ∈ A such that 1 = D(U0 + ay1 U1 + · · · + ayn−1 Un−1 ) in A/j, (α) where Ui designates the vector Vi minus its last coordinate. Let U00 = U0 + ay1 U1 + · · · + ayn−1 Un−1 , we have DA (U00 , a) = DA (U0 , a). The equality (α) means that there exists a yn such that bn yn ∈ JA (0) and 1 = DA (U00 ) ∨ DA (bn , yn ). V00 (β) Let = V0 + ay1 V1 + · · · + ayn−1 Vn−1 + ayn Vn . The lemma is proven if 1 ∈ DA (V00 ). Notice that V00 minus its last coordinate is the vector U00 + an yn Un and that its last coordinate is bn + a2 yn , hence the tight game 834 XIV. The number of generators of a module that comes with bn , a, yn . We have DA (U00 + ayn Un ) ∨ DA (a) = DA (U00 , a) = DA (U0 , a) ⊇ DA (b0 , a) = 1, (γ) and, by (β), DA (U00 + ayn Un ) ∨ DA (bn , yn ) = DA (U00 ) ∨ DA (bn , yn ) = 1. (δ) Next (γ) and (δ) imply DA (U00 + ayn Un ) ∨ DA (bn , a2 yn ) = 1 = JA (U00 + ayn Un , bn , a2 yn ), (η) and by Lemma 2.2, since bn a2 yn ∈ JA (0), 1 = JA (U00 + ayn Un , bn + a2 yn ), i.e. 1 = DA (V00 ).  5.7. Theorem. (Coquand’s theorem, 3: Forster-Swan and others with the Heitmann dimension) We have Gdim A 6 Hdim A. Consequently, Serre’s Splitting Off, Forster-Swan’ and Bass’ cancellation theorems apply with the Hdim (Theorems 3.4, 3.6, 3.8, 3.11). J We use the characterization of Gdim A < n given in Proposition 3.13. Lemma 5.6 tells us that the equivalent property described in 3.13 is satisfied if Hdim A/hdi < n. We conclude by noticing that Hdim A/hdi 6 Hdim A. Final remark. All the theorems of commutative algebra which we have proven in this chapter are ultimately brought back to theorems regarding matrices and their elementary operations. Exercises and problems Exercise 1. Explicate the computation that gives the proof of Theorem 1.3 in the case n = 1. Exercise 2. (A property of regular sequences) Let (a1 , . . . , an ) be a regular sequence of A and a = ha1 , . . . , an i (n > 1). 1. Show that (a1 , . . . , an ) is an (A/a )-basis of a a2 . 2. Deduce, when 1 ∈ / a, that n is the minimum number of generators of the ideal a. For example, if k is a nontrivial ring and A = k[X1 , . . . , Xm ], then for n 6 m, the minimum number of generators of the ideal hX1 , . . . , Xn i is n. Exercise 3. (Number of generators of a/a2 and of a) Let a be a finitely generated ideal of A with a/a2 = ha1 , · · · , an i. 1. Show that a is generated by n + 1 elements. 2. Show that a is locally generated by n elements in the following precise sense: there exists an s ∈ A such that over the two localized rings As and A1−s , a is generated by n elements. 3. Deduce that if A is local-global (for example if A is residually zero-dimensional), then a is generated by n elements. Exercises and problems 835 Exercise 4. 1. Let E be an A-module and F be a B-module. If E and F are generated by m elements, the same goes for the (A × B)-module EQ× F . s 2. Let a ⊆ A[X] be an ideal containing a separable polynomial P = i=1 (X − ai ). Let evai : A[X]  A be the evaluation morphism that specializes X in ai . Suppose that each ai := evai (a) is generated by m elements. Show that a is generated by m + 1 elements. 3. Let K be a discrete field and V ⊂ Kn be a finite set. Show that the ideal a(V ) = { f ∈ K[X1 , . . . , Xn ] | ∀ w ∈ V, f (w) = 0 } is generated by n elements (note that this bound does not depend on #V and that the result is clear for n = 1). Exercise 5. (The left cubic of P3 , image of P1 under the Veronese embedding of degree 3) The base ring k is arbitrary, except in the first question where it is a discrete field. We define the Veronese morphism ψ : P1 → P3 by ψ : (u : v) 7→ (x0 : x1 : x2 : x3 ) with x0 = u3 , x1 = u2 v, x2 = uv 2 , x3 = v 3 . 1. Show that Im ψ = Z(a) where a = hD1 , D2 , D3 i = D2 (M ) with the matrix  M= X0 X1 X1 X2 X2 X3  , D1 = X1 X3 − X22 , D2 = −X0 X3 + X1 X2 , D3 = X0 X2 − X12 . 2. Show that a is the kernel of ϕ : k[X0 , X1 , X2 , X3 ] → k[U, V ], Xi 7→ U 3−i V i . In particular, if k is integral, a is prime and if k is reduced, a is radical. We will show that by letting a• = A ⊕ AX1 ⊕ AX2 with A = k[X0 , X3 ], we get k[X0 , X1 , X2 , X3 ] = a + a• and Ker ϕ ∩ a• = 0. 3. Show that a cannot be generated by two generators. 4. Explicate a homogeneous polynomial F3 of degree 3 such that DA (a) = DA (D1 , F3 ). In particular, if k is reduced, a = DA (D1 , F3 ). Exercise 6. Show that if two sequences are disjoint (see page 808) they remain disjoint when we multiply one of the sequences by an element of the ring. Exercise 7. (Transitivity of the action of GL2 (k[x, y]) on the systems of two generators of hx, yi) The result of question 1 is due to Jean-Philippe Furter, of the Université de La Rochelle. Let k be a ring, A = k[x, y] and p, q ∈ A satisfying hp, qi = hx, yi.  1. Construct a matrix A ∈ GL2 (A) such that A x y   = p q  and det(A) ∈ k× . 2. We write p = αx + βy + . . ., q = γx + δy + . . . with α, β, γ, δ ∈ k.  a. Show that α γ β δ  ∈ GL2 (k). b. Let G ⊂ GL2 (A) be the intersection of SL2 (A) and of the kernel of the homomorphism “reduction modulo hx, yi” GL2 (A) → GL2 (k). The subgroup G is distinguished in GL2 (A). The subgroup G GL2 (k) = GL2 (k) G of GL2 (A) operates transitively on the systems of two generators of hx, yi. 836 XIV. The number of generators of a module 3. Let p = x + i+j=2 pij xi y j , q = y + i+j=2 qij xi y j . We have hx, yi = hp, qi if and only if the following equations are satisfied 2 p20 p02 + p02 q11 + q02 = p20 p11 + p02 q20 + p11 q11 − p20 q02 + q11 q02 = 2 p20 + p11 q20 + q20 q02 = 0 4. Generalize the result of the previous question. P P Exercise 8. (About Smith rings and Sdim) For the notions of a strict Bézout ring and a Smith ring, see Section IV -7 on page 206 and Exercises IV -7 and IV -8. Exercise IV -8 gives a direct solution of item 5. 1. If A is a Smith ring, we have Sdim A 6 0. Deduce Sdim Z, Bdim Z, Gdim Z and Cdim Z. In questions 2 and 3, the ring A is arbitrary. 2. Let A ∈ M2 (A) and u ∈ A2 be a unimodular vector. Show that u ∈ Im A if and only if there exists a Q ∈ GL2 (A) such that u is the first column of AQ. 3. Let A ∈ M2 (A) of rank > 1. Then A is equivalent to a diagonal matrix if and only if Im A contains a unimodular vector. 4. Let A be a strict Bézout ring. Show that Sdim A 6 0 if and only if A is a Smith ring. 5. Deduce that a ring A is a Smith ring  if and only  if it is a strict Bézout ring a b and if for comaximal a, b, c the matrix has a unimodular vector in 0 c its image. This last condition can be expressed by the condition known as the Kaplansky condition: 1 ∈ ha, b, ci ⇒ there exist p, q such that 1 ∈ hpa, pb + qci . Remark: we dispose of the elementary characterization: A is a strict Bézout ring if and only if for every a, b ∈ A, there exist d and comaximal a0 , b0 such that a = da0 and b = db0 . If we add the Kaplansky condition above, we obtain an elementary characterization of Smith rings. Some solutions, or sketches of solutions Exercise 1. The given proof says this. Since Kdim A 6 0, there exists some x1 such that b1 x1 ∈ DA (0) and 1 ∈ DA (b1 , x1 ). A fortiori b1 ax1 ∈ DA (0) and a ∈ DA (b1 , ax1 ). Lemma 1.1 tells us that DA (b1 , ax1 ) = DA (b1 + ax1 ), so a ∈ DA (b1 + ax1 ).  Exercise 2. 1. Let b1 , . . . , bn ∈ A such that b a = 0 in a a2 . In i i i P P other words ba = c a with ci ∈ a. By Lemma IV -2.4, there exists an i i i i i i alternating matrix M ∈ Mn (A) such that [ b1 − c1 · · · bn − cn ] = [ a1 · · · an ]M . Hence bi − ci ∈ a, and so bi ∈ a. Same thing, presented more abstractly. We know that a presentation matrix of the A-module a for the generator set (a1 , . . . , an ) is Ra . By changing the base ring A → A/a , this gives a null presentation matrix (Ra mod a) of the A/a -module a/a2 for (a1 , . . . , an ), which means that this system is a basis. P Solutions of selected exercises 837 2. If (y1 , . . . , yp ) is a generator set of the ideal a, (y1 , . . . , yp ) is a generator set of the free (A/a )-module a/a2 of rank n. Therefore, if p < n, A/a is trivial. Exercise 3. 1. By letting b = ha1 , · · · , an i, the equality a/a2 = ha1 , · · · , an i means that a = b + a2 . We then have (a/b)2 = (a2 + b)/b = a/b, and the finitely generated ideal a/b of A/b is idempotent, therefore generated by an idempotent. Therefore there exists some e ∈ a, idempotent modulo b, such that a = b + hei: a = ha1 , . . . , an , ei. 2. With the same notations we see that (1 − e)a ⊆ b + e2 − e ⊆ b. Therefore in A1−e , (a1 , . . . , an ) generates a whereas in Ae , 1 ∈ a. Variant. We introduce S = 1 + a and work on AS : aAS ⊆ Rad(AS ) and  so, by Nakayama, a generator set of aS a2S is also a generator set of aS . We therefore have aS = bS , hence the existence of some s ∈ S such that sa ⊆ b. In As , (a1 , . . . , an ) generates a, whereas in A1−s , 1 ∈ a (s ∈ 1 + a, so 1 − s ∈ a). Exercise 4. Item 1 is obvious, and we deduce 2 since a/hP i ' a1 × · · · × as . We deduce 3 by induction on n. We observe that the Chinese remainder theorem used in item 2 is concretely realized by the interpolation à la Lagrange. Note: see also Exercise III -2. Exercise 5. 1. ψ is homogeneous of degree 3. Let p = (x0 : x1 : x2 : x3 ) in Z(a). If x0 6= 0, we are brought back to x0 = 1, so (x0 , x1 , x2 , x3 ) = (1, x1 , x21 , x31 ) = ψ(1 : x1 ). If x0 = 0, then x1 = 0, then x2 = 0, so p = ψ(0 : 1). 2. Let k[x] = k[X]/a and A = k[x0 , x3 ]. Showing the equality k[X] = a + a• amounts to showing that k[x] = A + Ax1 + Ax2 . We have the relations x31 = x20 x3 ∈ A, and x32 = x0 x23 ∈ A, therefore A[x1 , x2 ] is the A-module generated by the xi1 xj2 ’s for i, j ∈ J0..2K. But we also have x1 x2 = x0 x3 , x21 = x0 x2 , x22 = x1 x3 , which completes the proof of A[x1 , x2 ] = A + Ax1 + Ax2 . Let h = a + bX1 + cX2 ∈ a• satisfy ϕ(h) = 0 (a, b, c ∈ A = k[X0 , X3 ]). We therefore have a(U 3 , V 3 ) + b(U 3 , V 3 )U 2 V + c(U 3 , V 3 )U V 2 = 0. By letting p(T ) = a(U 3 , T ), q(T ) = b(U 3 , T )U 2 , r(T ) = c(U 3 , T )U , we obtain the equality p(V 3 ) + q(V 3 )V + r(V 3 )V 2 = 0, and an examination modulo 3 of the exponents in V of p, q, r provides p = q = r = 0. Hence a = b = c = 0, i.e. h = 0. Now, if f ∈ Ker ϕ, by writing f = g + h with g ∈ a, h ∈ a• , we obtain h ∈ Ker ϕ ∩ a• = 0, so f = g ∈ a. 3. Let E = a/hXi a. It is a k[X]/hXi-module generated by di = Di . In other words E = kd1 + kd2 + kd3 . Moreover, d1 , d2 , d3 are k-linearly independent. Indeed, if ad1 +bd2 +cd3 = 0, then aD1 +bD2 +cD3 ∈ hXi a, which for homogeneity reasons gives aD1 + bD2 + cD3 = 0, then a = b = c = 0. Therefore E is free of rank 3 over k. If G is a generator set of a, then G is a generator set of the k-module E, therefore #G > 3, a fortiori #G > 3. 838 XIV. The number of generators of a module 4. Let F3 = X0 D2 + X1 D3 = −X02 X3 + 2X0 X1 X2 − X13 ∈ hD2 , D3 i. We have D22 = −(X3 F3 + X12 D1 ) ∈ hD1 , F3 i , D32 = −(X1 F3 + X02 D1 ) ∈ hD1 , F3 i , D2 D3 = X0 X1 D1 + X2 F3 ∈ hD1 , F3 i then p 2 hD1 , D2 , D3 i = hD1 , D2 , D3 i ⊆ hD1 , F3 i ⊆ hD1 , D2 , D3 i , hence p hD1 , F3 i. Exercise 7. 1. Let us first notice that for mij ∈ A = k[x, y], an equality  m11 m21  m12 m22 x y   0 0 =  entails mij ∈ hx, yi. Moreover, we will use the following identities for 2 × 2 e and matrices: det(A + B) = det(A) + det(B) + Tr(AB)  v −u for H =   [ y − x ], e = [u v]A Tr(AH)  x y . By hypothesis, we have A, B ∈ M2 (A) such that  A  therefore (BA − I2 )  x y  =  x y  = p q   0 0  and B p q    x y = . Thus, modulo hx, yi = hp, qi, we have × BA ≡ I2 . Therefore a = det(A)(0, v ∈ A,  0) ∈ k and we can express, with u,   v 0 x det(A) = a + up + vq. Let H = [ y − x ]. We have H = , −u y 0 det(H) = 0, and we change A to A0 = A − H. Then A0  x y   p q  p q  = e = a + up + vq − [ u v ] det(A0 ) = det(A) + det(H) − Tr(AH)  and = a. 2. We decompose A into homogeneous    components: A = A0 + A1 + . . ., and we x p examine the equality A = .   y q α β The examination of the homogeneous component of degree 1 gives A0 = , γ δ × and we know that det(A) = det(A 0) ∈ k .     x p −1 We then can write A0 (A0 A) = with A0 ∈ GL2 (k) and A−1 0 A ∈ G. y q     x p 3. We write A = with A ∈ G. For degree reasons, we obtain an y q equality A = I2 + xB + yC with B, C ∈ M2 (k). We then have  p q   =A  x y   = x y   +B x2 xy   +C x + b11 x2 + (c11 + b12 )xy + c12 y 2 y + b21 x2 + (c21 + b22 )xy + c22 y 2  xy y2  = (?) Solutions of selected exercises 839 Moreover, we notice that the coefficient of det(A) − 1 in xi y j is a homogeneous polynomial of degree i + j in the coefficients of B and C e det(A) − 1 = Tr(B)x + Tr(C)y + det(B)x2 + Tr(BC)xy + det(C)y 2 . If k was an algebraically closed field, we could give the following argument. The equality det(A) = 1 defines a projective subvariety V ⊂ P8−1 (2 × 4 coefficients for (B, C)); on the other hand (?) defines a morphism V → P6−1 (6 for the coefficients of p − x, q − y). The image of this morphism is the set W defined by the equations of the statement. The ring k being arbitrary, we carefully examine the equations (?); by using Tr(B) = Tr(C) = 0, we can express B and C in terms of the coefficients of p and q  B= p20 q20 p11 + q02 −p20   , C= −q02 p20 + q11 p02 q02  . We thus construct a section s : W → G of the map (?), and in fact the three e equations of W appearing in the statement are, up to sign, det(C), Tr(BC) and det(B). Exercise 8. 1. A “diagonal” rectangular matrix of rank > 1 has in its image a unimodular vector (this for every ring). Let A be a matrix of rank > 1, if A is a Smith ring, A is equivalent to a “diagonal” matrix D, therefore Im D contains a unimodular vector, and also Im A. We therefore have Sdim Z = 0. Moreover, Cdim Z 6 1 (Z is 2-stable because Z is a Bézout domain). Finally, Bdim Z > 0 because 1 ∈ h2, 5i without finding some x ∈ Z such that 1 ∈ h2 + 5xi. Recap: Bdim Z = Gdim Z = Cdim Z = 1 but Sdim Z = 0. 2. If u = Av, then v is unimodular. Therefore v = Q · e1 with Q ∈ SL2 (A) and u is the first column of AQ. The other direction is immediate. 3. Suppose that Im A contains a unimodular vector. By item 2, we have A ∼ B with B · e1 unimodular. Therefore the space of rows of B contains a vector of the form [ 1 ∗ ]. Item 2 for tB gives t B∼  1 ∗ ∗ ∗   ∼ 1 0 0 ∗  , diagonal. Recap: A is equivalent to a diagonal matrix. The other direction is immediate. 4. Let A be a strict Bézout ring with Sdim A 6 0. We show that every triangular matrix M ∈ M2 (A) is equivalent to a diagonal matrix. We can write M = dA with A of rank > 1 (because A is a strict Bézout ring). Since Sdim A 6 0, Im A contains a unimodular vector therefore is equivalent to a diagonal matrix D. Ultimately M ∼ dD. 5. Now easy. 840 XIV. The number of generators of a module Bibliographic comments If we stick to the constructive aspect of the results, the whole chapter is essentially due to T. Coquand, with at times the help of the authors of the book that you are holding in your hands. This is a remarkable success for the constructive approach of the theory of the Krull dimension. Without this approach, it was simply unthinkable to obtain in a general constructive form the “grand” classical theorems proven here. In addition, this approach has guided the development of a new dimension, which we call Heitmann dimension, thanks to which the remarkable Heitmann non-Noetherian results were able to be improved further, namely the general non-Noetherian version of Serre’s Splitting Off theorem and of the Forster-Swan theorem. Kronecker’s theorem is usually stated in the following form: an algebraic variety in Cn can always be defined by n + 1 equations. It was extended to the case of Noetherian rings by van der Waerden [191] in the following form: in a Noetherian ring of Krull dimension n, every ideal has the same nilradical as an ideal generated by at most n + 1 elements. Kronecker’s version was improved by various authors in the articles [177, Storch] and [72, Eisenbud&Evans] which showed that n equations generally suffice. A constructive proof of this last theorem is in [48, Coquand&al.]. Moreover, we still do not know whether every curve in the complex space of dimension 3 is an intersection of two surfaces or not (see [Kunz], Chapter 5). Lemma 2.8 is Heitmann’s Corollary 2.2 [98], (for us, the Hdim replaces the Jdim) which leads to Theorem 2.9 (Heitmann’s improvement of Kronecker’s theorem). The local Kronecker’s theorem 1.6 is due to Lionel Ducos [66]. Note regarding the “stable range.” Theorem 2.6 is due to Bass in the Noetherian case (with the dimension of the maximal spectrum, which in this case coincides with the Jdim and the Hdim) and to Heitmann in the nonNoetherian case with the Jdim. Theorem 1.4 is a non-Noetherian version, but with the Krull dimension, of Theorem 2.6. Note regarding the Jdim. In [98] Heitmann introduces the Jdim for a not necessarily Noetherian ring as the correct substitute for the dimension of the maximal spectrum Max A. It is the dimension of Jspec A, the smallest spectral subspace of Spec A containing Max A. He establishes Bass’ “stable range” theorem for this dimension. However, for the theorems by Serre and Forster-Swan, he has to use an ad hoc dimension, the upper bound of the Jdim(A[1/x])’s for x ∈ A. As this ad hoc dimension is bounded above by the Krull dimension anyway, he is then able to obtain, in particular, a non-Noetherian version of the cited grand theorems for the Krull dimension. Note regarding Serre’s theorem and the Forster-Swan theorem. Serre’s theorem is in [169, Serre]. The Forster-Swan theorem (Noetherian version) Bibliographic comments 841 is in [85, Forster] for the Krull dimension and in [182, Swan] for the dimension of the maximal spectrum. Non-Noetherian versions for the Krull dimension are due to Heitmann [97, 98]. Finally, the article by Eisenbud-Evans [71] has greatly helped to clarify matters regarding Forster, Swan and Serre’s theorems. Sections 3 and 5 (second part: Heitmann dimension) are inspired by the outline of [71, Eisenbud&Evans] and [98, Heitmann]. These sections give constructive versions of Serre’s (Splitting Off), Forster-Swan’s, and Bass’ (cancellation) theorems. This improves (even without taking into account the constructive aspect of the proof) all the known theorems on the subject, by answering positively for the Heitmann dimension (and a fortiori for the Jdim) a question left open by Heitmann. Note regarding the Hdim. The Heitmann dimension, denoted by Hdim, was introduced in [45] (see also [46]). Fundamentally it is the dimension that makes the proofs work in the article by Heitmann [98]. The fact that it is better a priori than the Jdim is not the core point. It is rather the fact that Serre’s and Forster-Swan’s theorems work with the Hdim, and so a fortiori with the Jdim, which gives the complete non-Noetherian version of these theorems, which had been conjectured by Heitmann. In the case of a Noetherian ring, the Hdim, Heitmann’s Jdim and the dimension of the maximal spectrum Max A which intervenes in Serre’s and Swan’s [182] theorems are the same (refer to [46, 98]). Note regarding n-stability. The notion of a support dates back to Joyal [113] and Español [74], who use it to give a constructive characterization of the Krull dimension of commutative rings. It is used systematically in the recent articles by T. Coquand. In Section 4 and in the first part of Section 5 the notion of an n-stable support is decisive. It was invented by T. Coquand [37] to update the constructive content of Bass’ rhetoric on the finite partitions of Spec A in [Bass]. The version of Bass’ cancellation theorem for the Hdim was first proved by Lionel Ducos [65]. The proof that we give is based on [46] instead. Regarding Exercise 7, Murthy, in [139], proved the following general result. Let A = k[x1 , . . . , xm ] be a polynomial ring (k being a commutative ring) and r > 1 be fixed. Suppose, for every n ∈ J1..rK, that every unimodular vector of An is completable and consider, for n 6 inf(r, m), the set of systems of r generators of the ideal hx1 , . . . , xn i of A, such as for example (x1 , . . . , xn , 0, . . . , 0) where there are r − n zeros. Then the group GLr (A) operates transitively on this set (Murthy’s result is actually much more precise). Chapter XV The local-global principle Contents Introduction . . . . . . . . . . . . . . . . . . . . . . . . 844 1 Comaximal monoids, coverings . . . . . . . . . . . . . 845 2 A few concrete local-global principles . . . . . . . . . 848 Linear systems . . . . . . . . . . . . . . . . . . . . . . . . . 848 Finiteness properties for modules . . . . . . . . . . . . . . . 850 Properties of commutative rings . . . . . . . . . . . . . . . 851 Concrete local-global principles for algebras . . . . . . . . . 851 3 A few abstract local-global principles . . . . . . . . . 853 4 Concrete patching of objects . . . . . . . . . . . . . . 857 Glue and scissors . . . . . . . . . . . . . . . . . . . . . . . . 857 A simple case . . . . . . . . . . . . . . . . . . . . . . . . . . 859 Patching of objects in modules . . . . . . . . . . . . . . . . 859 Patching of modules . . . . . . . . . . . . . . . . . . . . . . 862 Patching of homomorphisms between rings . . . . . . . . . 866 5 The basic constructive local-global machinery . . . . 867 Decryption of classical proofs using localization at all primes 867 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869 First example . . . . . . . . . . . . . . . . . . . . . . . . . 869 Second example: a quasi-global result . . . . . . . . . . . 870 6 Quotienting by all the maximal ideals . . . . . . . . 872 7 Localizing at all the minimal prime ideals . . . . . . 877 8 Local-global principles in depth 1 . . . . . . . . . . . . 878 McCoy’s theorem . . . . . . . . . . . . . . . . . . . . . . . 880 9 Local-global principles in depth 2 . . . . . . . . . . . . 881 – 843 – 844 XV. The local-global principle Patchings in depth 2 . . . . . . Exercises and problems . . . Solutions of selected exercises . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 884 888 891 895 Introduction In this chapter, we discuss a few important methods directly related to what is commonly called the local-global principle in commutative algebra. In Section 2 we develop it in the form of concrete local-global principles. This is to say that certain properties are globally true as soon as they are locally true. Here the term locally is taken in the constructive sense: after localization at a finite number of comaximal monoids. In Section 3, we establish the corresponding abstract local-global principles, by using, inevitably, non-constructive proofs: here locally is taken in the abstract sense, i.e. after localization at any prime ideal. In Section 4, we explain the construction of “global” objects from objects of the same nature only defined locally. Sections 5, 6 and 7 are devoted to the “dynamic and constructive decryption” of methods used in abstract algebra. Recall that in Section VII -2 we presented the general philosophy of this dynamic method. In Section 5, we discuss the constructive decryption of abstract methods that fall within a general framework of the type “local-global principle.” We give a general statement (but inevitably a little informal) for this, and we give simple examples, which could be treated more directly. The truly pertinent examples will come in Chapter XVI. This dynamic method is a fundamental tool of constructive algebra. We could have written this work by starting with this preliminary explanation and by systematically using this decryption. We preferred to start by developing everything that could be directly developed, by establishing the concrete local-global principles that usually allow us to avoid using the dynamic decryption as such. In short, rather than highlighting the magic at work in classical algebra we preferred to first show a different kind of magic at work in constructive algebra under the general slogan: “why make things complicated when you can make them simple?” In Section 6, we analyze the method of abstract algebra, which consists in “seeing what happens when we quotient by an arbitrary maximal ideal.” In Section 7, we analyze the method which consists in “seeing what happens when we localize at an arbitrary minimal prime ideal.” In Sections 8 and 9, we examine to what extent certain local-global principles remain valid when we replace in the statements the lists of comaximal elements by lists of depth > 1 or of depth > 2. §1. Comaximal monoids, coverings 845 1. Comaximal monoids, coverings We treat in Section 2 concrete versions of principles of the local-global type. For these concrete versions, the localization have to be done in a finite number of comaximal elements (or of comaximal monoids) of A: if the considered property is true after localization at a finite number of comaximal elements, then it is true. We introduce a generalization. 1.1. Definition. We say that the monoids S1 , . . . , Sn of the ring A cover the monoid S if S is contained in the saturated monoid of each Si and if an ideal of A that intersects each of the Si ’s always intersects S, in other words if we have Pn ∀s1 ∈ S1 . . . ∀sn ∈ Sn ∃ a1 , . . . , an ∈ A i=1 ai si ∈ S. Monoids are comaximal if they cover the monoid {1}. In classical mathematics (with the axiom of the prime ideal)1 we have the characterization given in the following lemma. For some monoid S, we denote by US the subset of Spec A defined by US = { p ∈ Spec A | p ∩ S = ∅ } . If S is the monoid generated by the element s, we denote US by Us . From a constructive point of view, Spec A is a topological space known via its basis of open sets Us = DA (s) but whose points are often difficult to access. Recall that we denote by S sat the saturated monoid of the monoid S. 1.2. Lemma∗. T 1. For every monoid S we have S sat = p∈US (A \ p). Consequently for two monoids S and T , S sat ⊆ T sat ⇔ UT ⊆ US . S 2. S1 , . . . , Sn are comaximal if and only if Spec A = i USi . S 3. S1 , . . . , Sn cover the monoid S if and only if US = i USi . J 1. Results from the Krull lemma: if an ideal a does not intersect a monoid S, there exists a prime ideal p such that a ⊆ p and p ∩ S = ∅. 2. We can assume that A is not trivial. If the monoids are comaximal and if p is a prime ideal not belonging to any of the USi ’s, there is in each Si an element si of p, therefore by the definition of the comaximal monoids, 1 ∈ p, 1 The axiom of the prime ideal affirms that every strict ideal of a ring is contained in a prime ideal. This is a weakened version of the axiom of choice. In the classical set theory ZF, the axiom of choice is equivalent to the axiom of the maximal ideal, which states that every strict ideal of a ring is contained in a maximal ideal. This is a little stronger that the axiom of the prime ideal. The latter is equivalent to the fact that every consistent formal theory admits a model (this is the compactness theorem in classical logic). In classical set theory with the axiom of choice, the axiom of the prime ideal becomes a theorem and is called “Krull’s lemma.” 846 XV. The local-global principle S a contradiction. Conversely assume that Spec A = i USi and let s1 ∈ S1 , . . . , sn ∈ Sn . If hs1 , . . . , sn i does not contain 1, it is contained in a prime ideal p. Therefore p is in none of the USi ’s, a contradiction.  The following lemma is a variation on the theme: a covering of coverings is a covering. It is also a generalization of Fact V -7.2. The corresponding computations are immediate. In classical mathematics it would be even faster via Lemma∗ 1.2. 1.3. Lemma. (Successive localizations lemma, 2) 1. (Associativity) If the monoids S1 , . . . , Sn of the ring A cover the monoid S and if each S` is covered by monoids S`,1 , . . . , S`,m` , then the S`,j ’s cover S. 2. (Transitivity) a. Let S be a monoid of the ring A and S1 , . . . , Sn be monoids of the ring AS . For ` ∈ J1..nK let V` be the monoid of A formed by the numerators of the elements of S` . Then the monoids V1 , . . . , Vn cover S if and only if the monoids S1 , . . . , Sn are comaximal. b. More generally let S0 , . . . , Sn be monoids of the ring AS and for ` = 0, . . . , n let V` be the monoid of A formed by the numerators of elements of S` . Then the monoids V1 , . . . , Vn cover V0 if and only if S1 , . . . , Sn cover S0 in AS . 1.4. Definition and notation. Let U and I be subsets of the ring A. Let M(U ) be the monoid generated by U , and S(I, U ) be the monoid S(I, U ) = hIiA + M(U ). The pair q = (I, U ) is also called a potential prime ideal, and we write (by abuse) Aq for AS(I,U ) . Similarly we let S(a1 , . . . , ak ; u1 , . . . , u` ) = ha1 , . . . , ak iA + M(u1 , . . . , u` ). We say that such a monoid admits a finite description. The pair ({a1 , . . . , ak } , {u1 , . . . , u` }) is called a finite potential prime ideal. It is clear that for u = u1 · · · u` , the monoids S(a1 , . . . , ak ; u1 , . . . , u` ) and S(a1 , . . . , ak ; u) are equivalent, i.e. have the same saturated monoid. Remark. The potential prime ideal q = (I, U ) is constructed for the following goal: when we localize at S(I, U ), we obtain U ⊆ A× q and I ⊆ Rad(Aq ). Similarly, for every prime ideal p such that I ⊆ p and U ⊆ A \ p, we have U ⊆ A× p and I ⊆ Rad(Ap ). The pair q = (I, U ) therefore represents partial information on such a prime ideal. It can be considered as an approximation of p. This explains the terminology of a potential prime ideal and the notation Aq . We can compare the approximations of p by finite potential prime ideals with approximations of a real number by rational intervals. §1. Comaximal monoids, coverings 847 1.5. Lemma. (Successive localizations lemma, 3) Let U and I be subsets of the ring A and a ∈ A, then the monoids def def S(I; U, a) = S(I, U ∪ {a}) and S(I, a; U ) = S(I ∪ {a} , U ) cover the monoid S(I, U ). In particular, the monoids S = M(a) = S(0; a) and S 0 = S(a; 1) = 1 + aA are comaximal. J Let x ∈ S(I; U, a), y ∈ S(I, a; U ). We need to see that hx, yi meets hIi + M(U ), or that hx, yi + hIi meets M(U ). We have k > 0, u, v ∈ M(U ) and z ∈ A such that x ∈ uak + hIi and y ∈ v − az + hIi . Modulo hx, yi + hIi, uak ≡ 0, v ≡ az so uv k ≡ 0, i.e. uv k ∈ hx, yi + hIi with uv k ∈ M(U ).  Comment. The previous lemma is fundamental. It is the constructive counterpart of the following banal observation in classical mathematics: after localizing at a prime ideal every element is found to be either invertible or in the radical. When dealing with this type of argument in a classical proof, most of the time it can be interpreted constructively by means of this lemma. Its proof is very simple, in the image of the banality of the observation made in the classical proof. But here there is a true computation. We can in fact ask whether the classical proof avoids this computation. A detailed analysis shows that no: it is found in the proof of Lemma∗ 1.2. The examples given in the following lemma are frequent. 1.6. Lemma. Let A be a ring, U and I be subsets of A, and S = S(I, U ). 1. If s1 , . . . , sn ∈ A are comaximal elements, the monoids M(si ) are comaximal. More generally, if s1 , . . . , sn ∈ A are comaximal elements in AS , the monoids S(I; U, si ) cover the monoid S. 2. Let s1 , . . . , sn ∈ A. The monoids S1 = S(0; s1 ), S2 = S(s1 ; s2 ), S3 = S(s1 , s2 ; s3 ), . . . , Sn = S(s1 , . . . , sn−1 ; sn ) and Sn+1 = S(s1 , . . . , sn ; 1) are comaximal. More generally, the monoids V1 = S(I; U, s1 ), V2 = S(I, s1 ; U, s2 ), V3 = S(I, s1 , s2 ; U, s3 ), . . . , Vn = S(I, s1 , . . . , sn−1 ; U, sn ) and Vn+1 = S(I, s1 , . . . , sn ; U ) cover the monoid S = S(I, U ). 3. If S, S1 , . . ., Sn ⊆ A are comaximal monoids and if a ∈ A, then the monoids S(I; U, a), S(I, a; U ), S1 , . . ., Sn are comaximal. J Items 2 and 3 result immediately from Lemmas 1.3 and 1.5. 1. The first case results from the fact that for k1 , . . . , kn > 1, we have, for P k large enough k, hs1 , . . . , sn i ⊆ sk11 , . . . , sknn (e.g. k = i (ki − 1) + 1). 848 XV. The local-global principle For the general case, let t1 , . . . , tn with ti ∈ S(I; U, si ); we want to show that ht1 , . . . , tn i meets S = S(I, U ). By definition, there is some ui ∈ M(U ) and ki > 0 such that ti ∈ ui ski i + hIi; by letting u = u1 · · · un ∈ M(u), we obtain uski i ∈ hti i + hIi ⊆ ht1 , . . . , tn i + hIi. Therefore for large enough k, k u hs1 , . . . , sn i ⊆ u sk11 , . . . , sknn ⊆ ht1 , . . . , tn i + hIi . But as s1 , . . ., sn are comaximal elements in AS , there is some s ∈ S such that s ∈ hs1 , . . . , sn i; therefore usk ∈ ht1 , . . . , tn i+hIi, i.e. ht1 , . . . , tn i meets usk + hIi ⊆ S.  2. A few concrete local-global principles Linear systems The following concrete local-global principle is a slight generalization of the local-global principle II -2.3 (basic concrete local-global principle), which only concerned item 4 below in the case of free modules of finite rank. Actually the essential result has already been given in the local-global principle II -6.7 (concrete local-global principle for modules). We give the proofs again to emphasize their great simplicity. Let M1 , . . ., M` , P be A-modules. We say that a map Φ : M1 ×· · ·×M` → P is homogeneous if there exist integers r1 , . . ., r` such that we identically have Φ(a1 x1 , . . . , a` x` ) = ar11 · · · ar` ` Φ(x1 , . . . , x` ). In such a case, the map Φ “passes to the localizations”: it can be naturally extended to a map ΦS : S −1 M1 × · · · × S −1 M` → S −1 P for any monoid S. The prototype of a homogeneous map is a map given by homogeneous polynomials in the coordinates when the modules are free of finite rank. 2.1. Concrete local-global principle. Let S1 , . . ., Sn be comaximal monoids of A, M , N , P be A-modules, ϕ, ψ be linear maps from M to N , θ : N → P be linear map, and x, y be elements of N . We write Ai for ASi , Mi for MSi , etc. Then we have the following equivalences. 1. Concrete patching of the equalities x=y in N ⇐⇒ ∀i ∈ J1..nK x/1 = y/1 in 2. Concrete patching of the equalities of linear maps ϕ = ψ in LA (M, N ) ⇐⇒ ∀i ∈ J1..nK ϕ/1 = ψ/1 in 3. Concrete patching of the regular elements x is regular in N LAi (Mi , Ni ). ⇐⇒ ∀i ∈ J1..nK x/1 is regular in Ni . Ni . §2. A few concrete local-global principles 849 4. Concrete patching of the solutions of systems of linear equations x ∈ Im ϕ ⇐⇒ ∀i ∈ J1..nK x/1 ∈ Im ϕi . 5. Concrete patching of the solutions of systems of linear equations under homogeneous conditions. Let (Φ` ) be a finite family of homogeneous maps Φ` : LA (M, N ) × N → Q` , or Φ` : LA (M, N ) → Q` , or Φ` : N → Q` .   Then &` Φ` (ϕ, y) = 0 ⇒ y ∈ Im ϕ ⇐⇒   ∀i ∈ J1..nK &` Φ` (ϕ, y) =Q`,i 0 ⇒ y/1 ∈ Im ϕi . where we have written Q`,i for (Q` )Si . 6. Concrete patching of the exact sequences. The sequence ϕ θ M −−→ N −−→ P is exact if and only if the sequences ϕS θS i i Mi −−→ Ni −−→ Pi are exact for i ∈ J1..nK. 7. Concrete patching of direct summands in the finitely presented modules. Here M is a finitely generated submodule of a finitely presented module N . M is a direct summand in N ⇐⇒ ∀i ∈ J1..nK Mi is a direct summand in Ni . J The conditions are necessary because of Fact II -6.4. A direct verification is immediate anyway. Let us prove that the local conditions are sufficient. 1. Suppose that x/1 =P0 in each Ni . For suitable si ∈ Si we therefore n have si x = 0 in N . As i=1 ai si = 1, we obtain x = 0 in N . 2. Immediate consequence of 1. 3. Suppose that x/1 is regular in each Ni . Let a ∈ A with ax = 0 in A, therefore also ax/1 = 0 in each Ni . We therefore have a/1 = 0 in each Ai , so also in A. 4. Suppose that the equation ϕ(z) = x admits a solution zi in each Mi . We can write zi = yi /si with yi ∈ M ui ϕ(yi ) = Pnand si ∈ Si . We therefore Phave n si ui x in N with ui ∈ Si . As i=1 ai si ui = 1, let z = i=1 ai ui yi . We obtain ϕ(z) = x in N . 5. This is a simple variant of 4. The homogeneity of the Φ` ’s intervenes so that the local property is well-defined, and so that it results from the global property. 6. This is a special case of the previous item. 7. Let ρ : N → N/M be the canonical projection. The module N/M is also a finitely presented module. The module M is a direct summand in N if and only if ρ is right-invertible. We can therefore conclude by the local-global principle IV -3.1.  850 XV. The local-global principle Remark. We can see that item 5, a simple variant of item 4, implies all the others as special cases. Moreover, item 4 results from item 1 with y = 0 by considering the module N/ϕ(M ) S ' NSi /ϕSi (MSi ). We could therefore i have stated item 1 as the only basic principle and, from it, deduce items 2 to 6 as corollaries. Finally, item 7 also directly results from item 4 (see the proof of the local-global principle IV -3.1). Finiteness properties for modules The usual finiteness properties of modules have a local character. Most have already been proven, we summarize. 2.2. Concrete local-global principle. (Concrete patching of finiteness properties for modules) Let S1 , . . ., Sn be comaximal monoids of A and M be an A-module. Then we have the following equivalences. 1. M is finitely generated if and only if each of the MSi ’s is an ASi -finitely generated module. 2. M is finitely presented if and only if each of the MSi ’s is an ASi -finitely presented module. 3. M is flat if and only if each of the MSi ’s is an ASi -flat module. 4. M is finitely generated projective if and only if each of the MSi ’s is an ASi -finitely generated projective module. 5. M is projective of rank k if and only if each of the MSi ’s is a projective ASi -module of rank k. 6. M is coherent if and only if each of the MSi ’s is an ASi -coherent module. 7. M is Noetherian if and only if each of the MSi ’s is a Noetherian ASi module. J 1. See the local-global principle II -3.6. 2. See the local-global principle IV -4.13. 3. See the local-global principle VIII -1.7. 4. See the local-global principle V -2.4. We can also use the fact that a finitely presented module is projective if and only if it is flat (and apply items 2 and 3 ). 5. Results from item 4 and from the fact that the polynomial rank can be locally computed (it is equal to X k if and only if it is equal to X k after localization at comaximal monoids). 6. See the local-global principle II -3.5. 7. We exhibit the proof for the Noetherianity constructively defined à la Richman-Seidenberg. Let us limit ourselves to the case of two comaximal localizations at S1 and S2 . Consider a non-decreasing sequence (Mk )k∈N of finitely generated submodules of M . It admits an infinite subsequence §2. A few concrete local-global principles 851  Mσ(k) k∈N , where σ(k) < σ(k + 1) ∀ k, with Mσ(k) = Mσ(k)+1 after localization at S1 for all k. Consider the infinite sequence Mσ(k) seen in MS2 . It admits two equal consecutive terms Mσ(k) and Mσ(k+1) . So Mσ(k) and Mσ(k)+1 are equal both in MS1 and MS2 . Therefore they are equal in M . Properties of commutative rings We recall a few results already established regarding the local character of a few interesting properties for commutative rings, in the sense of the localization at comaximal monoids. 2.3. Concrete local-global principle. (Concrete patching of properties of commutative rings) Let S1 , . . ., Sn be comaximal monoids and a be an ideal of A. Then we have the following equivalences. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. A is coherent if and only if each ASi is coherent. A is a pf-ring if and only if each ASi is a pf-ring. A is a pp-ring if and only if each ASi is a pp-ring. A is reduced if and only if each ASi is reduced. The ideal a is locally principal if and only if each aSi is locally principal. A is arithmetic if and only if each ASi is arithmetic. A is a Prüfer ring if and only if each ASi is a Prüfer ring. The ideal a is integrally closed if and only if each aSi is integrally closed. A is normal if and only if each ASi is normal. A is of Krull dimension 6 k if and only if each ASi is of Krull dimension 6 k. 11. A is Noetherian if and only if each ASi is Noetherian. Moreover recall that for localizations at comaximal elements, the concrete local-global principle also applies for the notions of a Dedekind ring and of a strongly discrete Noetherian coherent ring (local-global principle XII -7.14). Concrete local-global principles for algebras Localization at the source 2.4. Concrete local-global principle. Let S1 , . . ., Sn be comaximal monoids of a ring k and A be a k-algebra. Then the following properties are equivalent. 1. A is finitely generated (resp. flat, faithfully flat, finitely presented, finite, integral, strictly finite, separable, strictly étale) over k. 2. Each of the algebras ASi is finitely generated (resp. flat, faithfully flat, finitely presented, finite, integral, strictly finite, separable, strictly étale) over kSi . 852 XV. The local-global principle Similarly if A is strictly finite and if λ ∈ A? , then λ is dualizing if and only if each of the forms λSi is dualizing. Q J 1 ⇔ 2. We introduce the faithfully flat k-algebra i kSi . It then suffices to apply Theorem VIII -6.8. The question of the dualizing form (when A is strictly finite) is a question of isomorphism of modules and stems from the concrete local-global principles for modules (by taking into account Fact VI -6.11).  Localization at the sink There are also the local-global principles that correspond to properties said to be “local in A.” Here we need localizations at comaximal elements (comaximal monoids are not sufficient). 2.5. Concrete local-global principle. Let A be a k-algebra and s1 , . . . , sm be comaximal elements of A. Then the following properties are equivalent. 1. A is finitely generated (resp. finitely presented, flat) over k. 2. Each of the algebras Asi is finitely generated (resp. finitely presented, flat) over k. J First of all if A = k[x1 , . . . , xn ] = k[X1 , . . . , Xn ]/a and s = S(x) (where S ∈ k[X]), then As = k[x1 , . . . , xn , t] with t = 1/s in As , which also gives As = k[X1 , . . . , Xn , T ]/(a + hT S(X) − 1i) . Thus the property of being finitely generated or finitely presented is stable by localization at an element (but it is not stable for a localization at an arbitrary monoid). Regarding the flatness, as As is flat over A, if A is flat over k, As is flat over k (Fact VIII -6.4). P Now suppose that i si ui = 1 in A. First of all let us see what we obtain if each of the k-algebras Asi is finitely generated. We can suppose that the generators are derived from elements of A (by considering the corresponding fraction of denominator 1). Let us make a single list (x1 , . . . , xn ) with all these elements of A. The reader will then observe by a small computation that A is generated by (x1 , . . . , xn , s1 , . . . , sm , u1 , . . . , um ) = (y1 , . . . , yp ), with p = n + 2m. Now let us consider the case where all the algebras Asi are finitely presented. We consider some indeterminates Yi corresponding to the list (y1 , . . . , yp ) defined above. We write si = Si (x), ui = Ui (x) (polynomials in k[x]). For the common generator set (x1 , . . . , xn ) that we have just considered, and for each i ∈ J1..mK, we have a corresponding polynomial system, say §3. A few abstract local-global principles 853 Fi , in k[X, Yn+i , Ti ], which allows us to define the isomorphism k[X, Yn+i , Ti ]/ai → Asi , with ai = hFi , Yn+i − Si (X), Yn+i Ti − 1i. For each f ∈ Fi there is an k exponent kf such that si f f (x) = 0 in A. We can take all the kf ’s equal, say, to k. We then consider the following polynomial system in k[Y1 , . . . , Yp ], with Yj = k Xj for j ∈ J1..nK. First of all we take all the Yn+i f (X)’s for f ∈ Fi and i ∈ J1..mK. Next we write the relations Yn+i − Si (X)’s and Yn+m+i − Ui (X)’s for the indices i ∈ J1..mK. Finally, we take the relation that corresponds P Pm to i ui si = 1, i.e. i=1 Yn+i Yn+m+i − 1. The readers will do the computation to convince themselves that we indeed have a faultless description of the k-algebra A. The contrary would have been surprising, even immoral, since we have transcribed all that we could have known about the situation. The key was that this could have been expressed by a finite system of relations over a finite system of indeterminates. Actually we proceeded exactly as in the proof of the local-global principle IV -4.13 for the finitely presented modules. Regarding the flatness, consider (a1 , . . . , an ) in k and (x1 , . . . , xn ) in A P such that i xi ai = 0. We want to show that (x1 , . . . , xn ) is an A-linear combination of linear dependence relations in k. We know that this is true after localization at each of the sk ’s. We therefore have an exponent N such that for each k we have an equality Ppj sN j=1 bk,j (x1,k,j , . . . , xn,k,j ), k (x1 , . . . , xn ) = P (xi,k,j ∈ k, bk,j ∈ A) with i xi,k,j ai = 0. We finish by taking an A-linear combination of the sN  k ’s equal to 1. 3. A few abstract local-global principles An essential tool in classical algebra is the localization at (the complement of) a prime ideal. This tool is a priori difficult to use constructively because we do not know how to construct the prime ideals which intervene in the classical proofs, and whose existence relies on the axiom of choice. However, we observe that those prime ideals are generally used in proofs by contradiction, and this gives an explanation of the fact that the use of these “ideal” objects can be avoided and even interpreted constructively (see Section 5). The abstract local-global principle in commutative algebra is an informal principle according to which certain properties regarding modules over 854 XV. The local-global principle commutative rings are true if and only if they are true after localization at any prime ideal. We now recall a few cases where the abstract local-global principle applies in classical mathematics, by explaining the link with the corresponding concrete principles. An abstract version of the concrete local-global principle 2.1 is the following. 3.1. Abstract local-global principle∗ . Let ϕ, ψ be linear maps M → N , θ be a linear map N → P , and x, y be elements of N . Then we have the following equivalences. 1. Abstract patching of the equalities x=y in N ⇐⇒ ∀p ∈ Spec A x/1 = y/1 in Np . 2. Abstract patching of the equalities of linear maps ϕ=ψ in LA (M, N ) ∀p ∈ Spec A ϕ/1 = ψ/1 in ⇐⇒ LAp (Mp , Np ). 3. Abstract patching of the regular elements x is regular in N ⇐⇒ ∀p ∈ Spec A x/1 is regular in Np . 4. Abstract patching of the solutions of systems of linear equations x ∈ Im ϕ ⇐⇒ ∀p ∈ Spec A x/1 ∈ Im ϕp . 5. Abstract patching of the solutions of systems of linear equations under homogeneous conditions. Let (Φ` ) be a finite family of homogeneous maps Φ` : LA (M, N ) × N → Q` , or Φ` : LA (M, N ) → Q` , or Φ` : N → Q` .   Then &` Φ` (ϕ, y) = 0 ⇒ y ∈ Im ϕ ⇐⇒   ∀p ∈ Spec A &` Φ` (ϕ, y) =Q`,p 0 ⇒ y/1 ∈ Im ϕp , where we have written Q`,p for (Q` )p . 6. Abstract patching of the exact sequences. The sequence ϕ θ ϕp θp M −→ N −→ P is exact if and only if the sequence Mp −→ Np −→ Pp is exact for every p ∈ Spec A . 7. Abstract patching of direct summands in finitely presented modules. Here M is a finitely generated submodule of a finitely presented module N . M is a direct summand in N ⇐⇒ ∀p ∈ Spec A Mp is a direct summand in Np . §3. A few abstract local-global principles 855 Proofs (nonconstructive). The conditions are necessary because of Fact II -6.4. A direct verification is actually immediate. For the converses, we assume without loss of generality that the ring A is nontrivial. It suffices to treat item 4 (see the remark on page 850). Actually we have already established item 6, which implies item 4, in the abstract local-global principle II -6.8 (page 63), but we think that it is usefull to give two distinct classical proofs (the second is the one given in Chapter II) and to compare their degree of effectivity. First proof. Suppose x ∈ / Im ϕ, it amounts to the same as saying that x 6= 0 in N/ϕ(M ).  Since for a prime ideal p we have N/ϕ(M ) p ' Np /ϕp (Mp ), it suffices to prove item 1 with y = 0. We reason by contradiction by assuming x 6= 0 in N . In other words AnnA (x) 6= h1i, and there  exists a p ∈ Spec A which contains AnnA (x). Then, since AnnA (x) p = AnnAp (x/1), we obtain x 6=Np 0. Second proof. The property x ∈ Im ϕ is of finite character. We can therefore apply Fact∗ II -2.12 which says (in classical mathematics) that for a finite character property, the concrete local-global principle (localization at comaximal monoids) is equivalent to the abstract local-global principle (localization at all the maximal ideals).  Comments. 1) It seems impossible that the second proof, which is too general, can ever be made into a constructive proof. The first proof is not “generally” constructive either, but there exist some cases where it is. For this it suffices to satisfy the following conditions, in the case of item 4. – The module N is finitely presented and the module M is finitely generated. – The ring A is coherent and strongly discrete. – For every strict finitely generated ideal a of A we know how to construct a prime ideal p containing a. The last two conditions are satisfied when A is a finitely presented algebra over Z or over a “fully factorial” field (see [MRR]). 2) This allows us, for example, to give another constructive proof of the explicit matrix form theorem (Theorem X -1.7). As mentioned on page 541, it suffices to treat the generic case and to show certain equalities ri rj = 0 and rh u = 0. As the ring Gn is a finitely presented algebra over Z, we can show these equalities by applying the abstract patching of the equalities. We are therefore brought back to the case of a local ring obtained as a 856 XV. The local-global principle localization of Gn , and in this case the equalities are true since the module is free by applying the local freeness lemma. 3) In practice, we can understand the abstract local-global principle 3.1 in the following intuitive form: to prove a theorem of commutative algebra whose meaning is that a certain system of linear equations over a commutative ring A admits a solution, it suffices to treat the case where the ring is local. It is a principle of the same type as the Lefschetz principle: to prove a theorem of commutative algebra whose meaning is that a certain algebraic identity takes place, it suffices to treat the case where the ring is the complex number field (or any subring that suits us best, in fact). This remark is developed in Section 5. 4) In the article [10], Hyman Bass makes the following comment regarding a Noetherian version of the abstract local-global principle 3.1, item 7. The latter result, elementary as it is, seems to defy any proof which does not either use, or essentially reconstruct, the functor Ext1 . This comment is surprising, in view of the perfectly trivial character of our proof of the corresponding concrete principle, which computes nothing that resembles an Ext1 . Actually, when the goal is to show that a short exact sequence splits, it seems that the efficient computational machinery of the Ext’s is often useless, and that it can be short-circuited by a more elementary argument. 5) The abstract local-global principle above also works by uniquely using the localization at any maximal ideal, as seen in the abstract local-global principle II -6.8 (page 63). But this is not really useful because the localizations at the maximal ideals are the least extensive (among the localizations at the prime ideals). However, there are cases where the classical reasoning uniquely uses localizations at minimal prime ideals. They are more subtle proofs that are more difficult to decrypt constructively. We will elaborate on this in Section 7. 6) As mentioned on page 33, the abstract local-global principle for finitely generated modules does not work: just because a module is finitely generated after localization at every prime ideal does not mean it is necessarily finitely generated. The same would hold for the concrete patching principle of finitely presented modules or for that of coherent modules. This denotes a certain superiority of the concrete local-global principles over the abstract local-global principles. §4. Concrete patching of objects 857 4. Concrete patching of objects Glue and scissors Here we give a brief discussion regarding patching methods in differential geometry and their translations in commutative algebra. First of all we examine the possibility of constructing a smooth manifold from local charts, i.e. by a patching of open sets Ui of Rn by means of diffeomorphisms (or isomorphisms) ϕij : Uij → Uji : Uij is an open set of Ui and ϕji = ϕ−1 ij . U2 U2 U1 U1 U3 U3 We will consider the simple case where the variety is obtained by only patching a finite number of open sets of Rn . In this case the condition to fulfil is that the morphisms of patchings must be compatible between them three by three. This precisely means the following. For each triple of distinct indices (i, j, k) we consider the open set Uijk = Uij ∩ Uik (therefore with Uijk = Uikj ). The compatibility means on the one hand that, for each (i, j, k), the restriction ϕij |Uijk establishes an isomorphism from Uijk to Ujik , and on the other hand that if we compose the isomorphisms ϕij |U ijk Uijk −−−−→ Ujik and ϕik |U ϕjk |U jki Ujki −−−−→ Ukji ijk we obtain the isomorphism Uijk −−−−→ Ukij : ϕik |• = ϕjk |• ◦ ϕij |• . If we try to do the same thing in commutative algebra, we will consider some rings Ai (corresponding to the rings C ∞ (Ui )) and some elements fij ∈ Ai . The ring C ∞ (Uij ) would correspond to Ai [1/fij ] and the patching morphism ϕij to an isomorphism ωij : Ai [1/fij ] → Aj [1/fji ]. We will also have to 858 XV. The local-global principle formulate some three-by-three compatibility conditions. We then hope to construct a ring A and some elements fi ∈ A, such that Ai could be identified with A[1/fi ], fij with “fj seen in A[1/fi ],” and ωij with the identity between A[1/fi ][1/fj ] and A[1/fj ][1/fi ]. Unfortunately, this does not always work well. The ring A that is supposed to patch the Ai ’s does not always exist (however, if it exists it is welldetermined, up to unique isomorphism). The first example of this obvious failure of the patching is in projective space. The complex projective space Pn (C) is obtained by patching affine charts Cn , but the corresponding rings of functions, isomorphic to C[X1 , . . . , Xn ], do not patch together: there are no polynomial functions defined over Pn (C), besides the constants, and by localizing the ring C there is no chance of obtaining the ring C[X1 , . . . , Xn ]. This illustrates the fact that algebraic geometry is much more rigid than C ∞ geometry. This unpleasant phenomenon is at the origin of the creation of Grothendieck’s schemes, which are the abstract objects formally obtained by patching rings along patching morphisms when the three-by-three compatibility conditions are satisfied, but whose patching no ring wants to perform. Let us now consider the question of the patching of vector bundles when they are locally defined over a fixed smooth variety U , covered by a finite number of open sets Ui . Let Uij = Ui ∩ Uj . The vector bundle π : W → U that we want to construct, whose every fiber is isomorphic to a given vector space F , is known a priori only by its restrictions πi : Wi → Ui . In order to patch, we need patching diffeomorphisms ψij : Wij → Wji where Wij = πi−1 (Uij ). These morphisms must first of all respect the structure of the vector space fiber by fiber. In addition, again, we need three-by-three compatibility conditions, analogous to those which we have defined in the first case. Now if we pass to the analogous case in commutative algebra, we must start from a ring A with a system of comaximal elements (f1 , . . . , f` ). Let Ai = A[1/fi ] and Aij = A[1/fi fj ]. For each index i, we give the “module of the sections of the fiber πi : Wi → Ui ,” i.e. an Ai -module Mi . The ψij ’s are now represented by isomorphisms of Aij -modules θij ∼ Aij ⊗Ai Mi −−→ Aji ⊗Aj Mj −→ Mij = Mji . We will see in the following subsections that this time everything goes well: if the three-by-three compatibility conditions are satisfied, we indeed have an A-module M that “patches” the Ai -modules Mi . §4. Concrete patching of objects 859 A simple case 4.1. Theorem. Let A be an integral ring with quotient field K, N be a torsion-free A-module, S1 , . . . , Sn be comaximal monoids of A and for each i ∈ J1..nK let Mi be ASi-submodule of Si−1 N ⊆ K ⊗A N . Suppose that for each i, j ∈ J1..nK we have Sj−1 Mi = Si−1 Mj (seen as A-submodules of K ⊗A N ). Then we have the following results. 1. There exists a unique A-submodule M of N such that we have Si−1 M = Mi for each i ∈ J1..nK. 2. This submodule M is equal to the intersection of the Mi ’s. 3. If the Mi ’s are finitely generated (resp. finitely presented, coherent, finitely generated projective), the same goes for M . T J 1 and 2. Let P = i Mi . First of all P ⊆ N because one element of the intersection is of the form P P P x1 xn i ai xi i ai si = 1 in A s1 = · · · = sn = P ai si = i ai xi if i (with xi ∈ N , si ∈ Si for i ∈ J1..nK). Let us show that the module P satisfies the required conditions. First of all P ⊆ Mi so Si−1 P ⊆ Mi for each i. Conversely, let x1 ∈ M1 for example, we want to see that x1 is in S1−1 P . Since Sj−1 M1 = S1−1 Mj , there exists a u1,j ∈ S1 such that u1,j x1 ∈ Mj . By Q T letting s1 = j6=1 u1,j , we indeed obtain s1 x1 ∈ i Mi . Now let us prove the uniqueness. Let Q be a module satisfying the required conditions. We have Q ⊆ Si−1 Q = Mi and thus Q ⊆ P . Then consider the sequence Q → P → 0. Since it is exact after localization at comaximal monoids, it is exact (local-global principle II -6.7), i.e. the inclusion homomorphism is surjective, so Q = P . Finally, item 3 results from already established concrete local-global principles.  If we do not assume that the ring is integral and the module is torsion-free, the previous theorem is a little more delicate. This will be the object of the local-global principle 4.4. Patching of objects in modules Let A be a commutative ring, (Si )i∈J1..nK be comaximal monoids of A. Let Ai := ASi and Aij := ASi Sj (i = 6 j) such that Aij = Aji . Let αi : A → Ai and αij : Ai → Aij be natural homomorphisms. In the remainder, notations like (Mij )i<j∈J1..nK and (ϕij )i6=j∈J1..nK ) mean that we have Mij = Mji but (a priori) not ϕij = ϕji . 860 XV. The local-global principle 4.2. Concrete local-global principle. (Concrete patching of elements in a module, and of homomorphisms between modules) Q 1. Let (xi )i∈J1..nK be an element of i∈J1..nK Ai . So that there exists some x ∈ A satisfying αi (x) = xi in each Ai , it is sufficient and necessary for each i < j we have αij (xi ) = αji (xj ) in Aij . In addition, this x is then uniquely determined. In other terms the ring A (with the homomorphisms αi ) is the limit of the diagram  (Ai )i∈J1..nK , (Aij )i<j∈J1..nK ; (αij )i6=j∈J1..nK 4< Ai ψi C αj ψj αk ψk / Aij D αji αi /A ψ! αij αik *"  ; Aik Aj %  Ak αkj # / Ajk 2. Let M be an A-module. Let Mi := MSi and Mij := MSi Sj (i 6= j) such that Mij = Mji . Let ϕi : M → Mi and ϕij : Mi → Mij be the natural linear maps. Then the A-module M (with the linear maps ϕi : M → Mi ) is the limit of the diagram  (Mi )i∈J1..nK , (Mij )i<j∈J1..nK ; (ϕij )i6=j∈J1..nK . 3. Let N be another module, let Ni := NSi , Nij := NSi Sj . For each i ∈ J1..nK let ψi : Mi → Ni be an Ai -linear map. So that there exists an A-linear map ψ : M → N satisfying ψSi = ψi for each i, it is sufficient and necessary, for each i < j, for the two linear maps (Sj )−1 ψi and (Si )−1 ψj from Mij to Nij to be equal. In addition, the linear map ψ is then uniquely determined. ψi / Ni Mi 8 9 ϕi φi ϕij / N ψ! M ϕj  Mj ϕji φij φj  M 9 ij ψj  / Nj φji  / Nij 9 In other terms the A-module LA (M, N ) is the limit of the diagram formed by the LAi (Mi , Ni )’s, the LAij (Mij , Nij )’s and the natural linear maps. §4. Concrete patching of objects 861 J 1. Special case of 2. Q 2. Let (xi )i∈J1..nK be an element of i∈J1..nK Mi . We need to show that for some x ∈ M satisfying ϕi (x) = xi in each Mi to exist, it is sufficient and necessary that for each i < j we have ϕij (xi ) = ϕji (xj ) in Mij . In addition, this x must be unique. The condition is clearly necessary. Let us show that it is sufficient. Let us show the existence of x. There exist si ’s in Si and yi ’s in M such that we have xi = yi /si in each Mi . If A is integral, M torsion-free and each si 6= 0, we have in the module obtained by scalar extension to the quotient field P P y1 y2 yn i ai yi s1 = s2 = · · · = sn = P ai si = i ai yi = x ∈ M, i P with i ai si = 1. In the general case we do just about the same thing. For each pair (i, j) with i = 6 j, the fact that xi /1 = xj /1 in Mij means that for Q certain uij ∈ Si and uji ∈ Sj we have sj uij uji yi = si uij uji yj . Let ui = k6=i uik ∈ Si . We have sj ui uj yi = si ui uj yj . Let (ai ) be elements P P of A such that i ai si ui = 1. Let x = ai ui yi . We need to show that x/1 = xi in Mi for each i. For example for i = 1, we write the following equalities in M P P s1 u1 x = s1 u1 i ai ui yi = ai s1 u1 ui yi i P P = i ai si u1 ui y1 = i ai si ui u1 y1 = u1 y1 . Thus s1 u1 x = u1 y1 in M and x = y1 /s1 in MS1 . Finally, the uniqueness of x results from the concrete patching principle of equalities. 3. The composites of the linear maps M → Mi → Ni are compatible with the natural linear maps Ni → Nij . We conclude with the fact that N is the limit of the diagram of the Ni ’s and Nij ’s (item 2 ).  A delicate point (regarding item 3). If M is a finitely presented A-module or if A is integral and M finitely generated, the natural Ai -linear maps LA (M, N )si → LAi (Mi , Ni ) are isomorphisms (see Propositions V -9.3 and VIII -5.7). In the general case, the notation ψsi is made ambiguous because it can either represent an element of LAi (Mi , Ni ) or an element of LA (M, N )si , and the natural linear map LA (M, N )si → LAi (Mi , Ni ) is a priori only injective if M is finitely generated. This ambiguity can be a source or error. Especially as LA (M, N ) then appears as a limit of two essentially distinct diagrams: the one based on the LAi (Mi , Ni )’s (the most interesting of the two) and the one based on the LA (M, N )si ’s. An example of a patching of elements. Given that the determinants of endomorphisms of free modules are well-behaved under localization, given 862 XV. The local-global principle the theorem that affirms that the finitely generated projective modules are locally free (in the strong sense) and given the previous concrete local-global principle, we obtain the possibility of defining the determinant of an endomorphism of a finitely generated projective module by only using determinants of endomorphisms between free modules, after suitable comaximal localizations. In other words the following fact can be established independently of the theory of determinants developed in Chapters V and X. Fact. For an endomorphism ϕ of a finitely generated projective A-module M, there exists a unique element det ϕ satisfying the following property: if s ∈ A is such that the module Ms is free, then (det ϕ)s = det(ϕs ) in As . Patching of modules The patching principle 4.4 that follows specifies which conditions are needed in order for the limit of an analogous system of modules to fall within the framework indicated in the local-global principle 4.2. 4.3. Definition. Let S be a monoid of A, M be an A-module and N be an AS -module. An A-linear map α : M → N is called a localization morphism at S if it is a morphism of scalar extension from A to AS for M (see page 196). In other words, if α : M → N is a localization morphism at S, and if βM,S : M → MS is the natural linear map, the unique A-linear map ϕ : MS → N such that ϕ ◦ βM,S = α is an isomorphism. A localization morphism at S can be characterized by the following conditions:  – ∀x, x0 ∈ M, α(x) = α(x0 ) ⇐⇒ ∃s ∈ S, sx = sx0 , – ∀y ∈ N, ∃x ∈ M, ∃s ∈ S, sy = α(x). 4.4. Concrete local-global principle. (Concrete patching of modules) Let S1 , . . ., Sn be comaximal monoids of A. Let Ai = ASi , Aij = ASi Sj and Aijk = ASi Sj Sk . We give in the category of A-modules a commutative diagram D  (Mi )i∈I ), (Mij )i<j∈I , (Mijk )i<j<k∈I ; (ϕij )i6=j , (ϕijk )i<j,i6=k,j6=k as in the following figure. Mi ϕij  ϕji Mij ) u ϕijk Suppose that Mj ϕik ) Mk ϕki ϕjk Mik  ) u ϕikj Mijk u ϕjki  ϕkj Mjk §4. Concrete patching of objects 863 • For all i, j, k (with i < j < k), Mi is an Ai -module, Mij is an Aij module and Mijk is an Aijk -module. Recall that according to our notation conventions we let Mji = Mij , Mijk = Mikj = . . . • For i 6= j, ϕij : Mi → Mij is a localization morphism at Sj (seen in Ai ). • For i = 6 k, j 6= k and i < j, ϕijk : Mij → Mijk is a localization morphism at Sk (seen in Aij ).  Then, by letting M, (ϕi )i∈J1..nK be the limit of the diagram, each morphism  ϕi : M → Mi is a localization morphism at Si . In addition M, (ϕi )i∈J1..nK is, up to unique isomorphism, the unique system that makes the diagram commutative and that makes each ϕi a localization morphism at Si . J The first item does not depend on the fact that the Si ’s are comaximal. Indeed the construction of a limit of A-modules for an arbitrary diagram is stable by flat scalar extension (because this is the kernel of a linear map between two products). However, if we take as a scalar extension the localization morphism A → Ai , the diagram can be simplified as follows Mi ϕij ϕik  Mij % ϕijk % Mik  ϕikj Mijk and it trivially admits the limit Mi . To prove the uniqueness, we reason without loss of generality with a system of comaximal elements (s1 , . . . , sn ). Let N, (ψi ) be a competitor. Since M is the limit of the diagram, there is a unique A-linear map λ : N → M such  that ψi = ϕi ◦ λ for every i. Actually we have λ(v) = ψ1 (v), . . . , ψn (v) . Let us show that λ is injective. If λ(v) = 0 all the ψi (v)’s are null, and since ψi is a localization morphism at si , there exist exponents mi such that i sm i v = 0. Since the si ’s are comaximal, we have v = 0. As λ is injective we can assume N ⊆ M and ψi = ϕi |N . Let us show that N = M . Let x ∈ M . As ψi and ϕi are two localization morphisms at si , there is an exponent mi i such that xsm ∈ N . Since the si ’s are comaximal, x ∈ N .  i Remark. To understand why the comaximality condition is really necessary for the uniqueness, let us examine the following “overly simple” example. With the ring Z, and the unique element s = 2, let us take for M a free Z[1/2]-module with basis (a) (where a is an arbitrary individual object). For clarity, let M 0 be the Z-module M . Also consider the free Z-module N with basis (a). Consider two localization morphisms at 2N , ϕ : M 0 → M and ψ : N → M . They both 864 XV. The local-global principle send a to a. Thus M 0 and N are not isomorphic as Z-modules and the uniqueness does not hold. If we had taken s = 1 we could have defined two distinct localization morphisms at 1, namely φ1 : N → N, a 7→ a, and φ2 : N → N, a 7→ −a, and the uniqueness would be guaranteed in the sense required in the statement. In practice, we often construct a module by taking some Ai -modules Mi and by patching them via their localizations Mij = Mi [1/sj ]. In this case the modules Mij and Mji are distinct, and we must give for each (i, j) an isomorphism of Aij -modules θij : Mij → Mji . This gives the following variant, in which the modules Mijk are not given in the hypothesis, but where we indicate the compatibility conditions that the θij ’s need to satisfy. Concrete local-global principle 4.4 bis (Concrete patching of modules) Let S1 , . . ., Sn be comaximal monoids of A. Let Ai = ASi , Aij = ASi Sj and Aijk = ASi Sj Sk . Assume we are given some Ai -modules Mi and let Mj` = Mj [1/s` ] and Mjk` = Mj [1/sk s` ] for all distinct j, k, ` ∈ J1..nK, such that Mjk` = Mj`k , with the localization morphisms ϕj` : Mj → Mj` and ϕj`k : Mj` → Mj`k . Also assume we are given some morphisms of Aij -modules θij : Mij → Mji . k Let θij : Mijk → Mjik be the morphism of Aijk -modules obtained by localization at sk from θij . Finally, we suppose that the following compatibility relations are satisfied • θji ◦ θij = IdMij for i 6= j ∈ J1..nK, • for distinct i, j, k in J1..nK, by circularly composing k θij i θjk θj ki Mijk −−−→ Mjik = Mjki −−−→ Mkji = Mkij −−−→ Mikj we must obtain the identity.  Then, if M, (ϕi )i∈J1..nK is the limit of the diagram  (Mi )i∈J1..nK ), (Mij )i6=j∈J1..nK ; (ϕij )i6=j , (θij )i6=j , each morphism ϕi : M → Mi is a localization morphism at Si .  In addition, M, (ϕi )i∈J1..nK is, up to unique isomorphism, the unique system that makes the diagram commutative and that makes each ϕi a §4. Concrete patching of objects 865 localization morphism at Si . Mi Mj  Mij o θij ( / Mji v θji ϕjik k θij ~  ϕki ( / Mki v θik Mik o ϕikj ϕijk Mk ϕjk ϕji ϕik ϕij Mjk o θki ( 3 Mjik v θjk  / Mkj θkj ϕjki ϕkij ϕkji i θjk + Mijk o ϕkj j θ ki  Mkij J Note that the diagram above is commutative by construction, except eventually the bottom triangle in dotted lines, each time that it is possible to join two modules using two different paths: for example ϕij ◦ ϕijk = ϕik ◦ ϕikj k and θij ◦ ϕijk = ϕjik ◦ θij . Here we need to convince ourselves that the indicated compatibility conditions are exactly what is necessary and sufficient to be brought back to the situation described in the local-global principle 4.4. For this, when i < j < k we only keep Mij , Mik , Mjk and Mijk = Mikj . This forces us to replace ϕji ϕki ϕkj ϕjki : : : : Mj → Mji Mk → Mki Mk → Mkj Mjk → Mjik γji = θji ◦ ϕji γki = θki ◦ ϕki γkj = θkj ◦ ϕkj k γjki = θji ◦ ϕjki with with with with : : : : Mj → Mij , Mk → Mik , Mk → Mjk , Mjk → Mijk . So far everything is taking place unhindered (in relation to the modules with two and three indices that we chose to preserve): the squares (Mi , Mij , Mijk , Mik ) and (Mj , Mij , Mijk , Mjk ) are commutative and the arrows are localization morphisms. It is only with the two localization morphisms Mk → Mijk that we will see the problem. Mi ϕij Mj γji ϕik  v $ Mij Mik ϕjk $ v Mk γki  γkj Mjk ϕikj ϕijk "  u γjki Mijk These two localization morphisms are now imposed, namely the one that 866 XV. The local-global principle passes through Mik , which must be j ϕikj ◦ γki = ϕikj ◦ θki ◦ ϕki = θki ◦ ϕkij ◦ ϕki , and the one that passes through Mjk , which must be i k k ◦ θkj ◦ ϕkji ◦ ϕkj . ◦ ϕjki ◦ θkj ◦ ϕkj = θji γjki ◦ γkj = θji j k i As ϕkij ◦ ϕki = ϕkji ◦ ϕkj , the fusion is successful if θki = θji ◦ θkj . Actually the condition is also necessary because “every localization morphism is an epimorphism”: if ψ1 ◦ ϕ = ψ2 ◦ ϕ with ϕ being a localization morphism, then ψ1 = ψ2 .  Patching of homomorphisms between rings 4.5. Definition. Let S be a monoid of A. A morphism α : A → B is called a localization morphism at S if every morphism ψ : A → C such that ψ(S) ⊆ C× can be uniquely factored by α. Remark. If α : A → B is a localization homomorphism, and if S = α−1 (B× ), then B is canonically isomorphic to AS . Moreover, a localization morphism can also be characterized as follows – ∀x, x0 ∈ A (α(x) = α(x0 ) ⇐⇒ ∃s ∈ S sx = sx0 ) – ∀y ∈ B, ∃x ∈ A, ∃s ∈ S sy = α(x). In the theory of schemes developed by Grothendieck, the localization morphisms A → A[1/s] play a preponderant role. We have already discussed at the beginning of this section (Section 4) the impossibility of patching rings in general, with the example of Pn (C), which leads to the definition of schemes. The possibility of defining a category of schemes as “patchings of rings” ultimately relies on the following concrete patching principle for homomorphisms between rings. The proof of the principle is very simple. The important thing is that the morphism is uniquely defined using localizations and that the compatibility conditions are themselves described via more advanced localizations. 4.6. Concrete local-global principle. (Patching of morphisms of rings) Let A and B be two rings, s1 , . . ., sn be comaximal elements of A and t1 , . . ., tn be comaximal elements of B. Let Ai = A[1/si ], Aij = A[1/si sj ], Bi = B[1/ti ] and Bij = B[1/ti tj ]. For each i ∈ J1..nK, let ϕi : Ai → Bi be a homomorphism. Suppose that the following compatibility conditions are satisfied: for i 6= j the two homomorphisms βij ◦ ϕi : Ai → Bij and βji ◦ ϕj : Aj → Bij can be factorized via Aij and give the same homomorphism ϕij : Aij → Bij (see §5. The basic constructive local-global machinery the diagram). αi 9 Ai ϕi βi αij αj  Aj αji / 9 Bi / B ϕ! A 867 βij βj  9 Aij ϕij ϕj  / Bj βji  / 9 Bij Then there exists a unique homomorphism ϕ : A → B such that for each i, we have ϕi ◦ αi = βi ◦ ϕ. J The compatibility conditions are clearly necessary. Let us show that they are sufficient. By the local-global principle 4.2, B is the limit of the diagram of the Bi ’s, Bij ’s and βij ’s. The compatibility conditions imply that we also have the equalities βij ◦ (ϕi ◦ αi ) = βji ◦ (ϕj ◦ αj ) which are the conditions guaranteeing the existence and the uniqueness of ϕ.  5. The basic constructive local-global machinery Therefore localize at any prime ideal. A classical mathematician Recall that we presented in Section VII -2 the general philosophy of the dynamic method in constructive algebra. We now indicate how several proofs using the local-global principle in abstract algebra can be decrypted into constructive proofs leading to the same results in an explicit form. In Section 6 we will focus on the decryption of abstract proofs that use the quotients by all the maximal ideals and in Section 7 we will focus on the decryption of abstract proofs that use localizations at all the minimal prime ideals. Decryption of classical proofs using localization at all primes A typical argument of localization works as follows in classical mathematics. When the ring is local a certain property P is satisfied in virtue of a sufficiently concrete proof. When the ring is not local, the same property is 868 XV. The local-global principle still true (from a nonconstructive classical point of view) because it suffices to satisfy it locally. This in virtue of an abstract local-global principle. We examine with some attention the first proof. We then see certain computations appear that are feasible in virtue of the following principle ∀x ∈ A x ∈ A× ∨ x ∈ Rad(A), a principle which is applied to elements x derived from the proof itself. In other words, the given classical proof in the local case provides us with a constructive proof under the hypothesis of a residually discrete local ring. Now here is our constructive dynamic decryption. In the case of an arbitrary ring, we repeat the same proof, by replacing each disjunction “x is invertible or x is in the radical” with the consideration of the two rings AS(I,x;U ) and AS(I;x,U ) , where AS(I,U ) is the “current” localization of the starting ring A, at this point in the proof. When the initial proof is deployed thus, we will have constructed in the end a certain, finite because the proof is finite, number of localized rings ASi , for which the property is true. From a constructive point of view, we obtain at least the “quasi-global” result, i.e. after localization at comaximal monoids, in virtue of Lemma 1.5. We then call upon a concrete local-global principle to conclude the result. Our decryption of the classical proof is made possible by the fact that the property P is of finite character (see Section II -2 from page 26, and Section V -9): it is preserved by localization, and if it is true after localization at a monoid Si , it is also true after localization at some si ∈ Si . The complete decryption therefore contains two essential ingredients. The first is the decryption of the given proof in the local case which allows us to obtain a quasi-global result. The second is the constructive proof of the concrete local-global principle corresponding to the abstract local-global principle used in classical mathematics. In all the examples that we have encountered, this constructive proof offers no difficulty because the proof found in the classical literature already gives the concrete argument, at least in a telegraphic form (except sometimes in Bourbaki, where the concrete arguments are skilfully hidden). The general conclusion is that the classical proofs “by abstract local-global principle” are already constructive, if we bother to read them in detail. This is good news, other than the fact that this confirms that no supernatural miracles take place in mathematics. The method indicated above therefore gives, as a corollary of Lemma 1.5, the following general decryption principle, which allows us to automatically obtain a global constructive version (or at least quasi-global) of a theorem from its local version. §5. The basic constructive local-global machinery 869 Local-global machinery with prime ideals. When we reread a constructive proof, given for the case of a residually discrete local ring, with an arbitrary ring A, such that at the start we consider it as A = AS(0;1) and at each disjunction (for an element a that occurs during the computation in the local case) a ∈ A× ∨ a ∈ Rad(A), we replace the “current” ring AS(I,U ) with the two rings AS(I;U,a) and AS(I,a;U ) (in each of which the computation can be continued), at the end of the rereading we obtain a finite family of rings AS(Ij ,Uj ) with the comaximal monoids S(Ij , Uj ) and finite Ij , Uj . In each of these rings, the computation has been successfully continued and has produced the desired result. Please take note that if “the current ring” is A0 = AS(I;U ) and if the disjunction relates to × b ∈ A0 ∨ b ∈ Rad(A0 ), with b = a/(u + i), a ∈ A, u ∈ M(U ) and i ∈ hIiA , then the localized rings AS(I;U,a) and AS(I,a;U ) must be considered. In what follows we will speak of the local-global machinery with prime ideals as we do of the “basic local-global machinery.” Examples of the basic local-global machinery First example We want to prove the following result. 5.1. Lemma. Let f ∈ A[X] be a primitive polynomial and r ∈ A be a regular element with Kdim A 6 1. Then the ideal hf, ri contains a monic polynomial. J We begin by proving the lemma in the case where A is a residually discrete local ring. We can write f = f1 + f2 with f1 ∈ (Rad A)[X] and f2 pseudomonic. Moreover, for every e ∈ Rad A we have an equality rm (em (1 + ye) + zr) = 0, so r divides em . Consequently r divides a power of f1 , say with exponent N . We have f2 N = (f − f1 )N ∈ f, f1N ⊆ hf, ri. Then, f2N provides the monic polynomial required. For an arbitrary ring we re-express the previous proof dynamically. For example if f = aX 2 + bX + c, we explicate the previous reasoning in the following form. 870 XV. The local-global principle S(0; 1) S(0; a) aN z % S(a; b) bN + hai S(a; 1) 1 + hai { $ z S(a, b; c) cN + ha, bi S(a, b; 1) 1 + ha, bi $ S(a, b, c; 1) 1 + ha, b, ci Either a is invertible, or it is in the radical. If a is invertible, then we take f2 = f, f1 = 0. Otherwise, either b is invertible, or it is in the radical. If b is invertible, then we take f2 = bX + c, f1 = aX 2 . Otherwise, either c is invertible, or it is in the radical. If c is invertible, then we take f2 = c, f1 = aX 2 + bX. Otherwise h1i = ha, b, ci ∈ Rad A so the ring is trivial. See above the graph of the tree of the successive localizations. The comaximal monoids are found at the leaves of the tree, the last one contains 0 and does not intervene in the computation. Let us complete the proof by indicating how we construct a monic polynomial in the ideal hf, ri of AS(I,U ) [X] from two monic polynomials g and h in the ideals hf, ri of AS(I,y;U ) [X] and AS(I;y,U ) [X]. On the one hand we have sg = sX m + g1 with deg g1 < m, s ∈ S(I, y; U ) and sg ∈ hf, riA[X] , and on the other hand th = tX n + h1 with deg h1 < n, t ∈ S(I; y, U ) and th ∈ hf, riA[X] . The polynomials sX n g and tX m h of formal degree n + m have for formally leading coefficients s and t. By taking us + vt ∈ S(I, U ), the work ends with usX n g + vtX m h.  Second example: a quasi-global result obtained from a given proof for a local ring Dynamic reread of the local freeness lemma. The dynamic rereading of “Azumaya’s proof” (page 492) of the local freeness lemma gives a new proof of the theorem which states that the finitely generated projective modules are locally free, with the following precise formulation. §5. The basic constructive local-global machinery 871 If F ∈ Mn (A) is a projection matrix, there exist 2n comaximal elements si such that over each Asi , the matrix is similar to a standard projection  matrix. More precisely, for each k = 0, . . . , n there are nk localizations at which the matrix is similar to Ik,n . First recall (see the graph below) how the computation tree for a local ring with a matrix F in M3 (A) is presented. 1 2 3 4 8 5 9 10 6 11 12 7 13 14 15 At the point 1 the computation starts with the test “f11 or 1 − f11 is invertible” (note that the disjunction is generally not exclusive, and the test must only certify that one of the two possibilities takes place). If the test certifies that f11 is invertible, we follow the left branch, we go to 2 where we make a base change that allows us to reduce the matrix to the form 1 0 with G ∈ M2 (A) and G2 = G. If the test certifies that 1 − f11 0 G is invertible, we follow the right branch, we go to 3 where we make a base 0 0 change that allows us to reduce the matrix to the form with 0 H 2 H = H. If we reach 2, we test the element g in position (1, 1) in G. According to the result, we head towards 4 or  5 to make a base change thatreduces us to   1 0 0 1 0 0 one of the two forms  0 1 0  with a2 = a, or  0 0 0  with b2 = b. 0 0 a 0 0 b If we reach 3, we test the element h in position (1, 1) in H. According to the result, we head towards 6 or  7 to make a base change thatreduces us to   0 0 0 0 0 0 one of the two forms  0 1 0  with c2 = c, or  0 0 0  with d2 = d. 0 0 c 0 0 d 872 XV. The local-global principle In all cases, we finish with an invertibility test that certifies that the idempotent is equal to 1 or to 0, which gives one of the 8 possible diagonal projection matrices (with only 0’s and 1’s on the diagonal). If we dynamically reread this computation with an arbitrary ring, we obtain the following comaximal localizations. At the start at 1, we have the ring A1 = A. At 2 and 3 we have the comaximal localizations A2 = A1 [1/f11 ] and A3 = A1 [1/(1 − f11 )]. At 4 and 5 we have the following comaximal localizations of A2 : A4 = A2 [1/g] and A5 = A2 [1/(1 − g)]. At 6 and 7 we have the following comaximal localizations of A3 : A6 = A3 [1/h] and A7 = A3 [1/(1 − h)]. We move on to the final level. At 8 and 9 we create the following comaximal localizations of A4 : A8 = A4 [1/a] and A9 = A4 [1/(1 − a)]. At 10 and 11 we create the following comaximal localizations of A5 : A10 = A5 [1/b] and A11 = A5 [1/(1 − b)] etc. Ultimately, by considering the denominators di (i = 8, . . . , 15) of the fractions created in the different branches (for example d11 is the denominator in A of the fraction 1/f11 (1 − g)(1 − b), where g ∈ A2 and b ∈ A5 ), we obtain eight comaximal elements of A, and for each of the localizations we obtain the corresponding reduced diagonal form of the starting matrix F . In other words, the dynamic rereading of the proof given in the case of a local ring created eight comaximal elements, where the abstract classical proof would instruct us to localize at all the maximal ideals, which could take quite some time. 6. Quotienting by all the maximal ideals A ring that has no maximal ideals is reduced to 0. A classical mathematician In the literature we find a certain number of proofs in which the author proves a result by considering “the passage to the quotient by an arbitrary maximal ideal.” The analysis of these proofs shows that the result can be understood as the fact that a ring obtained from more or less complicated constructions is actually reduced to 0. For example, if we want to prove that an ideal a of A contains 1, we reason by contradiction, we consider a maximal ideal m that would contain a, and we find a contradiction by making a computation in the residual field A/m . This comes down to applying the quoted principle: a ring that has no maximal ideals is reduced to 0. The idea of presenting the reasoning as a proof by contradiction is the result of an occupational bias. Proving that a ring is reduced to 0 is a fact of a concrete nature (we must prove that 1 = 0 in the considered ring), §6. Quotienting by all the maximal ideals 873 and not a contradiction, and the computation performed in the field A/m only leads to a contradiction because one day we decided that, in a field, 1 = 0 is prohibited. But the computation has nothing to do with such a prohibition. The computation in a field uses the fact that every element is null or invertible, but not the fact that this disjunction would be exclusive. Consequently, the dynamic reread of the proof by contradiction in a constructive proof is possible according to the following method. Let us follow the computation that we are required to do as if the ring A/a were truly a field. Each time that the computation demands to know if an element xi is null or invertible modulo a, let us bet on xi = 0 and add it to a. After a while, we find that 1 = 0 modulo the constructed ideal. Instead of losing courage in the face of such a contradiction, let us take a look at the good side of things. For example we have just observed that 1 ∈ a + hx1 , x2 , x3 i. This is a positive fact and not a contradiction. We have actually just computed an inverse y3 of x3 in A modulo a + hx1 , x2 i. We can therefore examine the computation that the classical proof requires us to do when x1 , x2 ∈ m and x3 is invertible modulo m. Except that we do not need m since we have just established that x3 is invertible modulo a + hx1 , x2 i. Contrary to the strategy that corresponds to the localization at any prime ideal, we do not try to deploy all of the computation tree that seems to reveal itself to us. We only use quotients, and for this we systematically follow the “to be null” branch (modulo m) rather than the “to be invertible” branch. This creates more and more advanced successive quotients. When a so-called contradiction appears, i.e. when a computation reaches a certain result of positive nature, we backtrack by taking advantage of the information that we have just collected: an element has been certified invertible in the previous quotient. For example, with a deployed tree of the type of that of page 871 and by taking as its general context the ring A/a , if every time the right branch corresponds to x = 0 and the left one to an invertible x, it is necessary to start by following the path 1 → 3 → 7 → 15 and to consider the successive quotients. At 15 the computation gives us a positive result which allows us to backtrack to 7 to follow the branch 7 → 14. At 14 a positive result allows us to backtrack to point 3 (by the path 14 → 7 → 3) by knowing that the element a3 that produces the disjunction at this point is actually invertible. We can then follow the proposed computation for the branch 3 → 6 → 13. At 13 the classical proof gives us a so-called contradiction, actually a positive result in the considered quotient at 6. We will ultimately follow the path 1 → 3 → 7 → 15 → 7 → 14 → 3 → 6 → 13 → 6 → 12 → 1 → 2 → 5 → 11 → 5 → 10 → 2 → 4 → 9 → 4 → 8 → 1. 874 XV. The local-global principle We will uniquely compute in quotients of A/a and the final result is that 1 = 0 in A/a , i.e. a = A, which was the pursued objective. Note that during the first passage to the point 7, we work with the ring A1,3,7 = A/(a + ha1 , a3 , a7 i) . Arriving at 15, we learn that this ring is trivial therefore that a7 is invertible in A1,3 = A/(a + ha1 , a3 i) . At 14, we learn that A1,3 is trivial, i.e. a3 is invertible in the ring A1 = A/(a + ha1 i) . We therefore head for the point 6 with both the ring A1 and an inverse of a3 in hand . . . Thus in repeated passages to the same point we are not working with the same ring, because new information accumulates as we progress through the computations. The argument of passage to the quotient by all the maximal ideals of A/a (assumed by contradiction non-reduced to 0), which seemed a little magical, is thus replaced by a very concrete computation, implicitly given by the classical proof. Let us summarize the previous discussion. Local-global machinery with maximal ideals. To reread a classical proof that proves by contradiction that a ring A is trivial by assuming the contrary, then by considering a maximal ideal m of this ring, by making a computation in the residual field and by finding the contradiction 1 = 0, proceed as follows. First ensure that the proof becomes a constructive proof that 1 = 0 under the additional hypothesis that A is a discrete field. Secondly, delete the additional hypothesis and follow step-by-step the previous proof by favoring the branch x = 0 each time that the disjunction “x = 0 or x is invertible” is required for the rest of the computation. Each time that we prove 1 = 0 we have actually showed that in the previously constructed quotient ring, the last element to have undergone the test was invertible, which allows us to backtrack to this point to follow the branch “x is invertible” according to the proposed proof for the invertible case (which is now certified). If the considered proof is sufficiently uniform (experience shows that it is always the case), the computation obtained as a whole is finite and ends at the desired conclusion. Example. The following crucial lemma was the only truly nonconstructive ingredient in the solution by Suslin of Serre’s problem. We will expose this solution beginning on page 919 (see namely the proof of Theorem XVI -5.10). Here, we give the proof of the crucial lemma by Suslin in classical mathematics, then its constructive decryption. §6. Quotienting by all the maximal ideals 875 6.1. Lemma. Let A be a ring, n be an integer > 2 and U = t[ v1 · · · vn ] be a unimodular vector in A[X]n×1 with v1 monic. Let V = t[ v2 · · · vn ]. There exist matrices E1 , . . . , E` ∈ En−1 (A[X]), such that, by letting wi be the first coordinate of the vector Ei V , the ideal a below contains 1 a = hResX (v1 , w1 ), ResX (v1 , w2 ), . . . , ResX (v1 , w` )iA . J If n = 2, we have u1 v1 +u2 v2 = 1 and since v1 is monic, Res(v1 , v2 ) ∈ A× : Res(v1 , v2 )Res(v1 , u2 ) = Res(v1 , u2 v2 ) = Res(v1 , u2 v2 + u1 v1 ) = Res(v1 , 1) = 1. If n > 3, let d1 = deg v1 . We suppose without loss of generality that the vi ’s are formal polynomials of degrees di < d1 (i > 2). At the start we have some polynomials ui such that u1 v1 + · · · + un vn = 1. Suslin’s classical proof. We show that for every maximal ideal m, we can find a matrix Em ∈ En−1 (A[X]) such that, by letting wm be the first coordinate of Em V , we have 1 ∈ hResX (v1 , wm )i modulo m. For this we work over the field k = A/m . By using the Euclidean algorithm, the gcd wm of the vi ’s (i > 2) is the first coordinate of a vector obtained by elementary manipulations over V . We lift the elementary matrix that was computed in En−1 (k[X]) at a matrix Em ∈ En−1 (A[X]). Then, since v1 and wm are coprime, the resultant ResX (v1 , wm ) is nonzero in the field A/m. Constructive proof (by decryption). We perform a proof by induction on the smallest of the formal degrees di , which we denote by m (recall that i > 2). To fix the ideas suppose that it is d2 . Basic step: if m = −1, v2 = 0 and by an elementary transformation we put u3 v3 + · · · + un vn in position 2, which brings us to the case n = 2. Inductive step: from m − 1 to m. Let a be the coefficient of v2 of degree m and B be the ring A/hai. In this ring the induction hypothesis is satisfied. Thus, we have matrices E1 , . . . , E` ∈ En−1 (B[X]), such that, by letting w fi be the first coordinate of Ei V , we have the equality hResX (v1 , w f1 ), ResX (v1 , w f2 ), . . . , ResX (v1 , w f` )iB = h1i . This means, by lifting the matrices in En−1 (A[X]) without changing their name, and by letting wi be the first coordinate of Ei V that we have ha, ResX (v1 , w1 ), ResX (v1 , w2 ), . . . , ResX (v1 , w` )iA = h1i . Then consider b = hResX (v1 , w1 ), ResX (v1 , w2 ), . . . , ResX (v1 , w` )iA , and C = A/b . Since a is invertible in C, we can by an elementary manipulation replace v3 with a polynomial v30 = v3 − qv2 with deg v30 6 m − 1. We apply the induction hypothesis with the ring C, we have elementary matrices E10 , . . . , Eq0 ∈ En−1 (C[X]) that we lift in En−1 (A[X]) without changing their name. If w10 , . . . , wq0 are the corresponding polynomials (for each j, wj0 is 876 XV. The local-global principle the first coordinate of Ej0 V ), we obtain 1 ∈ ResX (v1 , w1 ), . . . , ResX (v1 , w` ), ResX (v1 , w10 ), . . . , ResX (v1 , wq0 ) A .  Comment. Now let us see why this elegant proof is indeed a decryption of that of Suslin according to the method indicated beforehand. Let a2 = u2 v2 + · · · + un vn . When we want to treat the vector V over a discrete field by the Euclidean algorithm, we have to do divisions. One division depends on the degree of the dividend (the polynomial by which we divide). In the dynamic decryption, we therefore have tests to do on the coefficients of the dividend to determine its degree. If we choose to start with the division of v3 by v2 , the indicated method therefore requires us to first consider the case where v2 is identically null. Note that this corresponds to the basic step of the induction. Let a1 = (v2,i )i∈J0..d2 K be the ideal generated by the coefficients of v2 . If v2 is identically null, we have the resultant r1 = Res(v1 , a2 ) = Res(v1 , w1 ) (invertible) with w1 which is of the first coordinate type of E1 V for an explicit matrix E1 ∈ En−1 . Naturally, this is only true modulo a1 , which gives a1 + hr1 i = h1i. Let a2 = (v2,i )i∈J1..d2 K . We have established that a2 + hr1 i + hv2,0 i = h1i. We now reason modulo b2 = a2 + hr1 i. Since v2,0 is invertible and v2 = v2,0 , we can reduce to 0 the vector v3 by elementary manipulations then put in position 3 an element equal to a2 modulo b2 , then bring it back to position 2. We therefore have a matrix E2 ∈ En−1 with w2 being the first coordinate of E2 V and Res(v1 , w2 ) = r2 is invertible in A/b2 , i.e. a2 + hr1 i + hr2 i = h1i. Let a3 = (v2,i )i∈J2..d2 K . We have just established that a3 + hr1 , r2 i + hv2,1 i = h1i. We now reason modulo b3 = a3 + hr1 , r2 i. Since v2,1 is invertible and a3 = 0, we can reduce the vector v3 to a constant by elementary manipulations (corresponding to the division of v3 by v2 ), then bring it in position 2. We find ourselves in the situation studied previously (where v2 was reduced to a constant). We therefore know how to compute two new elementary matrices E3 and E4 such that, by letting w3 and w4 be their first coordinates, and ri = Res(v1 , wi ), we obtain a3 + hr1 , r2 , r3 , r4 i = h1i. Let a4 = (v2,i )i∈J3..d2 K . We have established that a4 + hr1 , r2 , r3 , r4 i + hv2,2 i = h1i. We now reason modulo b4 = a4 + hr1 , r2 , r3 , r4 i. Since v2,2 is invertible and a4 = 0, we can reduce the vector v3 to the degree 1 by elementary manipulations (corresponding to the division of v3 by v2 ), then bring it in position 2. We find ourselves in the situation studied previously (where v2 §7. Localizing at all the minimal prime ideals 877 was of degree 1). . . . . . . We obtain a4 + hr1 , r2 , . . . , r8 i = h1i. Let a5 = (v2,i )i∈J4..d2 K . We have established that a5 + hr1 , r2 , . . . , r8 i + hv2,3 i = h1i. And so on and so forth . . . . . . The important part of this is that the inverses of leading coefficients of successive v2 that appear in the algorithm are always computed as elements of the ring and not by a localization procedure. Each time they are only invertible modulo a certain specified ideal, but it does not matter, the ideal grows by incorporating the authorized resultants but decreases by expelling intruders that are the coefficients of v2 . 7. Localizing at all the minimal prime ideals A ring that has no minimal prime ideals is reduced to 0. A classical mathematician The readers are now called upon to convince themselves of the correctness of the following method, by replacing in the previous section addition by multiplication and passage to the quotient by localization. Local-global machinery with minimal prime ideals. To reread a classical proof that proves by contradiction that a ring A is trivial by assuming the contrary, then by considering a minimal prime ideal of this ring, by making a computation in the localized ring (which is local and zero-dimensional, therefore a field in the reduced case) and by finding the contradiction 1 = 0, proceed as follows. First ensure that the proof becomes a constructive proof of the equality 1 = 0 under the additional hypothesis that A is local and zero-dimensional. Secondly, delete the additional hypothesis and follow step-by-step the previous proof by favoring the “x is invertible” branch each time that the disjunction “x is nilpotent or x is invertible” is required for the rest of the computation. Each time that we prove 1 = 0 we actually have shown that in the previously constructed localized ring, the last element to be subjected to the test was nilpotent, which allows us to backtrack to this point to follow the “x is nilpotent” branch according to the proposed proof for the nilpotent case (which is now certified). If the considered proof is sufficiently uniform (experience shows that this is always the case), the computation obtained as a whole is finite and ends at the desired conclusion. Example. A quite spectacular example is given in the next chapter with the constructive decryption of an abstract proof of Traverso’s theorem regarding seminormal rings. 878 XV. The local-global principle 8. Local-global principles in depth 1 Until now the different variants of the local-global principle were based on the families of comaximal elements, that is on the finite families that generate the ideal h1i. A weaker notion is sufficient for questions of regularity: these are the finite families that generate a faithful ideal, or more generally an E-regular ideal. We say that they are families of depth > 1. In Section 9, we will examine what we call the families of depth > 2. 8.1. Definition. 1. A finite family (a1 , . . . , an ) of a ring A is called a system of coregular elements if the ideal ha1 , . . . , an i is faithful.2 We also say that the ideal a, or the list (a1 , . . . , an ), is of depth > 1, and we express this in the form GrA (a1 , . . . , an ) > 1. 2. Let E be an A-module. • We say that an element a ∈ A is E-regular (or regular for E) if ∀x ∈ E, (ax = 0 =⇒ x = 0). • A finite family (a1 , . . . , an ) is said to be once E-regular if  ∀x ∈ E, (a1 x = 0, . . . , an x = 0) =⇒ x = 0 . We also say that the ai ’s are coregular for E. We express this in the form GrA (a1 , . . . , an , E) > 1. • A finitely generated ideal a ⊆ A is said to be E-regular if some (every) generator set of a is once E-regular. We also say that the depth of E relative to a is greater than or equal to 1, and we express this in the form GrA (a, E) > 1. Thus GrA (a) > 1 means GrA (a, A) > 1. In what follows, we will often only give the statement with GrA (a, E) > 1. Remark. The notation Gr(a, E) comes from [Northcott]. In this wonderful book, Northcott defines the “true grade” à la Hochster as the better nonNoetherian substitute for the usual depth. 8.2. Fact. • The product of two E-regular finitely generated ideals is E-regular. • If a ⊆ a0 with a E-regular, then a0 is E-regular. 2 Not to be confused with the notion of a coregular sequence introduced by Bourbaki, as a dual notion of that of a regular sequence. §8. Local-global principles in depth 1 879 8.3. Lemma. ((a, b, ab) trick for depth 1) Suppose that the ideals ha, c2 , . . . , cn i and hb, c2 , . . . , cn i are E-regular. Then the ideal hab, c2 , . . . , cn i is E-regular. J Let x ∈ E such that abx = c1 x = · · · = cn x = 0. Then abx = c1 bx = · · · = cn bx = 0, so bx = 0, therefore x = 0.  We have the following immediate corollary.3 8.4. Lemma. Let ha1 , . . . , an i be an E-regular ideal and let pi ∈ N. Then the ideal ap11 , . . . , apnn is E-regular. We can compare the following local-global principle to items 1 and 3 of the local-global principle 2.1. Note that the statement “b is E-regular” is stable under localization when b is finitely generated. This gives the implication in the direct sense for item c in the following local-global principle. 8.5. Concrete local-global principle. (Localizations in depth > 1) Let b, a1 , . . . , an ∈ A, and b be a finitely generated ideal. Let Ai = A[1/ai ]. 1. Suppose that the ai ’s are coregular. a. We have x = 0 in A if and only if x = 0 in each Ai . b. The element b is regular if and only if it is regular in Ai for each i. c. The ideal b is faithful if and only if it is faithful in Ai for each i. 2. Let E be an A-module and let Ei = E[1/ai ]. Suppose that the ideal ha1 , . . . , an i is E-regular. a. We have x = 0 in E if and only if x = 0 in each Ei . b. The element b is E-regular if and only if it is Ei -regular for each i. c. The ideal b is E-regular if and only if it is Ei -regular for each i. J It suffices to treat item 2. a. If x = 0 in Ei there is an exponent ki such that aki i x = 0 in E. We conclude by Lemma 8.4 (with the module Ax) that x = 0. c. Suppose that b is Ei -regular for each i, and b x = 0. Then x = 0 in each Ei , so x = 0 by item a.  We often implicitly use the following lemma, which is a variant of Lemma V -7.2 stated for the systems of comaximal elements. also could have noticed that for large enough q, the ideal ha1 , . . . , an iq , which is E-regular, is contained in the ideal ap1 , . . . , apn . 3 We 880 XV. The local-global principle 8.6. Fact. (Lemma of successive coregular localizations) If GrA (s1 , . . . , sn , E) > 1 and if for each i, we have elements si,1 , . . . , si,ki , coregular for E[1/si ], then the si si,j ’s are coregular for E. J Let b be the ideal generated by the si si,j ’s. By item 2c of the local-global principle 8.5, it suffices to prove that it is E-regular after localization at coregular elements for E. The si ’s are suitable.  McCoy’s theorem As an application of the local-global principle 8.5, we give a new proof of McCoy’s theorem (II -5.22 item 2 ). 8.7. McCoy’s theorem. A matrix M ∈ Am×n is injective if and only if the determinantal ideal Dn (M ) is faithful. J The implication “if” is simple. Let us show that if the matrix M is injective, the ideal Dn (M ) is faithful. We perform an induction on the number of columns. Since M is injective, the coefficients of the first column (which represents the image of the first basis vector), generate a faithful ideal. By the local-global principle 8.5, it therefore suffices to prove that Dn (M ) is faithful over the ring Aa = A[1/a], where a is a coefficient of the first column. Over this ring it is clear that the matrix M is equivalent to a matrix of the 1 0 form . In addition N is injective therefore by induction hypothesis 0 N the ideal Dn−1 (N ) is faithful over Aa . Finally DAa ,n−1 (N ) = DAa ,n (M ). Remarks. 1) The proof also gives that if m < n and M is injective, then the ring is trivial. Indeed at each step of the induction, when we replace M with N the difference m − n remains constant. Therefore if m < n we obtain “at the base step” an injective map from A0 in An−m which implies 1 = 0 in A. This is in accordance with the general statement of Theorem 8.7, because for m < n, Dn (M ) = 0, and if 0 is a regular element, the ring is trivial. 2) We often find in the literature McCoy’s theorem stated as follows, in a contrapositive form (in appearance). If the ideal is not faithful, the map is not injective. Or more precisely. If a nonzero element x ∈ A annihilates Dn (M ), there exists a nonzero column vector C ∈ Am×1 such that M C = 0. Unfortunately, this statement can only be proven with classical logic, and the existence of the vector C cannot result from a general algorithm. Here §9. Local-global principles in depth 2 881 is a counterexample, well-known by numerical analysts. If M is a matrix with real coefficients with m < n, we do not know how to produce a nonzero vector in its kernel so long as we do not know the rank of the matrix. For example for m = 1 and n = 2, we give two reals (a, b), and we look for a pair (c, d) 6= (0, 0) such that ac + bd = 0. If the pair (a, b) is a priori indistinguishable from the pair (0, 0), it is impossible to provide a suitable pair (c, d) so long as we have not established whether |a| + |b| is null or not. Constructive variants of the contraposition are proposed in Exercises 11 and 12. 9. Local-global principles in depth 2 9.1. Definition. Let a1 , . . . , an ∈ A and E be an A-module. • The list (a) = (a1 , . . . , an ) is said to be of depth > 2 if it is of depth > 1 and if, for every list (x) = (x1 , . . . , xn ) in A proportional4 to (a), there exists an x ∈ A such that (x) = x(a). We express this in the form GrA (a) > 2 or Gr(a) > 2. • The list (a) = (a1 , . . . , an ) is said to be twice E-regular if GrA (a, E) > 1 and if, for every list (x) = (x1 , . . . , xn ) in E proportional to (a) there exists an x ∈ E such that (x) = (a)x. We express this in the form GrA (a1 , . . . , an , E) > 2 or Gr(a, E) > 2. We also say5 that the depth of E relative to (a1 , . . . , an ) is greater than or equal to 2. Examples. 1) In an integral ring a list (a, b) with a, b ∈ Reg(A) is of depth > 2 if and only if hai ∩ hbi = habi, i.e. ab is the lcm of a and b in the sense of divisibility. 2) In a GCD-domain a list (a1 , . . . , an ) is of depth > 2 if and only if 1 is the gcd of the list. 3) If n = 1 and the list is reduced to the single term a, Gr(a, E) > 2 means that each y ∈ E is of the form y = ax, i.e. aE = E. In particular GrA (a) > 2 means a ∈ A× . 4) Every list of comaximal elements is of depth > 2 (by the basic local-global principle). It is clear that Gr(a) > 2 means Gr(a, A) > 2. In the remainder this exempts us from duplicating the statements: we represent them with Gr(a, E) > 2 for an arbitrary module E whenever possible. 4 Recall that this means that the determinants ai aj xi xj are all null. 5 Eisenbud speaks of the depth of a over E, and Matsumura of the a-depth of E. The terminology adopted here is that of Bourbaki. 882 XV. The local-global principle 9.2. Proposition and definition. Let (a) = (a1 , . . . , an ) and (b) = (b1 , . . . , br ) in A and E be an A-module. If GrA (a, E) > 2 and hai ⊆ hbi, then GrA (b, E) > 2. Consequently, we say that a finitely generated ideal a is twice E-regular if every finite generator set of a is twice E-regular (it suffices to verify it for a single one). We express this in the form GrA (a, E) > 2. J It suffices to prove the two following facts. • If Gr(a1 , . . . , an , E) > 2, then Gr(a1 , . . . , an , b, E) > 2. • If a ∈ ha1 , . . . , an i and Gr(a1 , . . . , an , a, E) > 2, then Gr(a1 , . . . , an , E) > 2. This indeed first shows that we can replace a generator set of a finitely generated ideal by another without changing “the depth > 2” and then that when we replace a by a larger finitely generated ideal, the depth > 2 is preserved. Let us consider the first item. We have a list (x1 , . . . , xn , y) in E proportional to (a1 , . . . , an , b). We find some x (unique, in fact) such that (x) = (a)x. We must show that bx = y. However, ai y = bxi and bxi = bai x for i ∈ J1..nK. Therefore ai (y − bx) = 0 and we conclude that y = bx because Gr(a, E) > 1. The second item is left to the reader.  9.3. Lemma. ((a, b, ab) trick for depth 2) Suppose that the lists (a1 , . . . , an , a) and (a1 , . . . , an , b) are twice E-regular. Then the list (a1 , . . . , an , ab) is twice E-regular. J We already know that (a1 , . . . , an , ab) is once E-regular. Let (x1 , . . . , xn , y) be a list in E proportional to (a1 , . . . , an , ab). The list (x1 b, . . . , xn b, y) is proportional to (a1 , . . . , an , a). So there exists a z ∈ E such that x1 b = a1 z, . . . , xn b = an z, y = az This implies the list (x1 , . . . , xn , z) is proportional to (a1 , . . . , an , b). So there exists an x ∈ E such that x1 = a1 x, . . . , xn = an x, z = bx and a fortiori y = abx  9.4. Concrete local-global principle. (For divisibility and integrally closed rings, localizations in depth 2) Consider a family (s) = (s1 , . . . , sn ) in A with GrA (s, E) > 2. Let Ai = A[ s1i ] and Ei = E[ s1i ]. 1. Let a ∈ A be a E-regular element and y ∈ E. Then a “divides” y in E if and only if a divides y after localization at each si . 2. Let (b1 , . . . , bm ) in A. Then GrA (b1 , . . . , bm , E) > 2 if and only if GrAi (b1 , . . . , bm , Ei ) > 2 for each i. 3. Suppose that A is integral and GrA (s) > 2. The ring A is integrally closed if and only if each ring Ai is integrally closed. §9. Local-global principles in depth 2 883 J 1. Suppose that a divides y after localization at si . We have axi = ui y in E for some ui = sni i and some xi ∈ E. The list of the ui ’s is twice E-regular (Lemma 9.3). We have auj xi = ui uj y = aui xj and as a is Eregular, uj xi = ui xj . Therefore we have some x ∈ E such that xi = ui x for each i. This gives ui ax = ui y and as Gr(u1 , . . . , un , E) > 1, we obtain ax = y. 2. Consider in A a sequence (x1 , . . . , xm ) proportional to (b1 , . . . , bm ). We seek some x ∈ E such that x` = xc` for every ` ∈ J1..mK. In each Ei we find some yi such that x` = yi c` for every ` ∈ J1..mK. This means that we have some ui ∈ sN i and some zi ∈ E such that ui x` = zi c` in E for every ` ∈ J1..mK. It suffices to show that there exists some z ∈ E such that zi = ui z for each i, because then ui (x` − zc` ) = 0 for each i (and the ui ’s are coregular for E). It therefore suffices to show that the zi ’s form a family proportional to the ui ’s, i.e. ui zj = uj zi for all i, j ∈ J1..nK. However, we know that the c` ’s are coregular for E (by the local-global principle 8.5). Therefore it suffices to show that we have the equalities ui zj c` = uj zi c` , but the two members are equal to ui uj x` . 3. Let x and y in A with y integral over the ideal xA. This remains true for each localized ring Ai , which is integrally closed. Therefore x divides y in each Ai . Therefore by item 1 with E = A, x divides y in A.  9.5. Fact. (Successive localizations lemma, with depth 2) If GrA (s1 , . . . , sn , E) > 2 and if for each i we have a list (si,1 , . . . , si,ki ) in A which is twice E[1/si ]-regular, then the system of the si si,j ’s is twice E-regular. J Applying 9.4 2., it suffices to verify that the si sij ’s are twice E-regular after localization at elements that form a list twice E-regular. This works with the list of the si ’s.  9.6. Lemma. Let (a) = (a1 , . . . , an ) and (b) = (b1 , . . . , br ) in A and E be an A-module. Let (a ? b) be the finite family of the ai bj ’s. If GrA (a, E) > 2 and GrA (b, E) > 2 then GrA (a ? b, E) > 2. In terms of finitely generated ideals: • if GrA (a, E) > 2 and GrA (b, E) > 2 then GrA (ab, E) > 2. J Applying 9.4 2., it suffices to show that the family of ai bj ’s is twice E-regular after localization in each ai . E.g., when localizing in a1 , the list of a1 bj ’s generate the same ideal ideal as the bj ’s, and this ideal is twice E-regular.  884 XV. The local-global principle Patchings in depth 2 The following definition allows us to simplify the writing of certain proofs a little. 9.7. Definition. (System of monoids twice E-regular) A system (S1 , . . . , Sn ) = (S) of monoids of A is said to be twice E-regular if for all s1 ∈ S1 , . . . , sn ∈ Sn , we have GrA (s1 , . . . , sn , E) > 2. N The most important case is the system of monoids (sN 1 , . . . , sn ) when GrA (s1 , . . . , sn , E) > 2. We now re-express the local-global principle 4.2 by replacing the hypothesis according to which the monoids are comaximal by a weaker hypothesis (system of monoids twice regular). The context is the following. Consider a system of monoids (S) = (Si )i∈J1..nK . Let Ai := ASi and Aij := ASi Sj (i 6= j) such that Aij = Aji . Let ϕi : A → Ai and ϕij : Ai → Aij be the natural homomorphisms. In what follows notations like (Eij )i<j∈J1..nK and (ϕij )i6=j∈J1..nK ) mean that we have Eij = Eji but (a priori) not ϕij = ϕji . 9.8. Concrete local-global principle. (Concrete patching of elements of a module in depth 2) Consider the context described above. 1. Suppose that (S) is twice regular. Consider an element (xi )i∈J1..nK Q of i∈J1..nK Ai . So that there exists some x ∈ A satisfying ϕi (x) = xi in each Ai , it is sufficient and necessary that for each i < j we have ϕij (xi ) = ϕji (xj ) in Aij . In addition, this x is then uniquely determined. In other terms the ring A (with the homomorphisms ϕi ) is the limit of the diagram  (Ai )i∈J1..nK , (Aij )i<j∈J1..nK ; (ϕij )i6=j∈J1..nK . 2. Let E be an A-module. Suppose that (S) is twice E-regular. Let Ei := ESi and Eij := ESi Sj (i 6= j) such that Eij = Eji . Let ϕi : E → Ei and ϕij : Ei → Eij be the natural linear maps. Then  the pair E, (ϕi )i∈J1..nK gives the limit of the following diagram in the category of A-modules  (Ei )i∈J1..nK , (Eij )i<j∈J1..nK ; (ϕij )i6=j∈J1..nK . §9. Local-global principles in depth 2 885 28 E i ψi F ϕi /E ψ! ψj ψk ϕij / Eij @ ϕji ϕik ϕj ϕk &, (  8 Eik Ej Ek & ϕkj / Ejk J 1. Special case of 2. Q 2. Let (xi )i∈J1..nK be an element of i∈J1..nK Ei . We must show the following equivalence: there exists an x ∈ E satisfying ϕi (x) = xi in each Ei if and only if for each i < j we have ϕij (xi ) = ϕji (xj ) in Eij . In addition, this x must be unique. The condition is clearly necessary. Let us prove that it is sufficient. Let us show the existence of x. Let us first note that there exist some si ’s in Si and some yi ’s in E such that we have xi = yi /si in each Ei . If A is integral, E is torsion-free and each si 6= 0, we have in the vector space obtained by scalar extension to the quotient field the equalities y1 y2 yn s1 = s2 = · · · = sn , and given the hypothesis regarding the si ’s there exists some x ∈ E such that xsi = yi for each i. In the general case we do just about the same thing. For each pair (i, j) with i 6= j, the fact that xi /1 = xj /1 in Eij means that for certain uij ∈ Si and uji ∈ Sj we have sj uij uji yi = si uij uji yj . For each i, let ui ∈ Si be a common multiple of the uik ’s (for k 6= i). We then have (sj uj )(ui yi ) = (si ui )(uj yj ). Thus the vector of the ui yi ’s is proportional to the vector of the si ui ’s. Since the system (S) is twice E-regular, there exists some x ∈ E such that ui yi = si ui x for every i, which gives the equalities ϕi (x) = usiiuyii = ysii = xi . Finally, this x is unique because the Si ’s are E-coregular.  Now here is a variant of the local-global principle 4.4. This variant appears this time as a converse of the previous local-global principle. 9.9. Concrete local-global principle. (Concrete patching of modules in depth 2) Let (S) = (S1 , . . . , Sn ) be a system of monoids of A. Let Ai = ASi , Ai = ASi , Ai =ASi , Aij =ASi Sj and Aijk =ASi Sj Sk . Suppose that a commutative diagram  (Ei )i∈J1..nK ), (Eij )i<j∈J1..nK , (Eijk )i<j<k∈J1..nK ; (ϕij )i6=j , (ϕijk )i<j,i6=k,j6=k (as in the figure below) is given in the category of A-modules with the following properties. 886 XV. The local-global principle • For all i, j, k (with i < j < k), Ei is an Ai -module, Eij is an Aij - module and Eijk is an Aijk -module. Recall that according to our con- ventions of notation we let Eji = Eij , Eijk = Eikj = . . . • For i 6= j, ϕij : Ei → Eij is a localization morphism at Sj (see in Ai ). §9. Local-global principles in depth 2 887 • For i 6= k, j 6= k and i < j, ϕijk : Eij → Eijk is a localization morphism at Sk (seen in Aij ). Ei ϕij Ej ϕik ϕji  u ) Eij ϕijk ) Ek ϕki ϕjk Eik  ) u ϕikj Eijk u  ϕkj Ejk ϕjki  Then, if E, (ϕi )i∈J1..nK is the limit of the diagram, we have the following results. 1. Each morphism ϕi : E → Ei is a localization morphism at Si . 2. The system (S) is twice E-regular.  3. The system E, (ϕi )i∈J1..nK is, up to unique isomorphism, the unique  system F, (ψi )i∈J1..nK with the ψi ∈ LA (F, Ei ) satisfying the following items: • the diagram is commutative, • each ψi is a localization morphism at Si , • the system (S) is twice F -regular. J 1. This property is valid with no hypothesis on the considered system of monoids (see the proof of the local-global principle 4.4). 2. Consider some si ∈ Si and a sequence (xi )i∈J1..nK in E proportional to (si )i∈J1..nK . Let xi = (xi1 , . . . , xin ). The proportionality of the two sequences means that si xjk = sj xik in Ek for all i, j, k. Let x = ( xsiii )i∈J1..nK . Next x we prove that si x = xi , i.e. si sjjj = xij in each Ej . Indeed, this results from the equality of proportionality si xjk = sj xik for k = j. 3. Since E is the limit of the diagram, there is a unique A-linear map ψ : F → E such that ψi = ϕi ◦ ψ for all i.  Actually we have ψ(y) = ψ1 (y), . . . , ψn (y) . Let us first show that ψ is injective. If ψ(y) = 0, all the ψi (y)’s are null, and since ψi is a localization morphism at Si , there exist some si ∈ Si such that si y = 0. Since (S) is an F -regular system, we have y = 0. As ψ is injective we can suppose that F ⊆ E and ψi = ϕi |F . In this case showing that ψ is bijective comes down to showing that F = E. Let x ∈ E. As ψi and ϕi are two localization morphisms at Si , there are ui ∈ Si such that ui x ∈ F . Since (S) is twice F -regular, and since the sequence of the ui x’s is proportional to the sequence of the ui ’s, there exists some y ∈ F such that ui x = ui y for every i, so y = x ∈ F .  888 XV. The local-global principle Exercises and problems Exercise 1. Let S1 , . . . , Sn , S be monoids of A such that S is contained in the saturated monoid of each Si . The following properties are equivalent. 1. The Si ’s cover S. 2. The Si ’s are comaximal in AS . Exercise 2. Let I be an ideal and U be a monoid of A. Let S = S(I, U ). 1. In AS , the monoid S(I; U, a) is equivalent to S(I; a) = I + aN . 2. In AS , the monoid S(I, a; U ) is equivalent to S(a; 1) = 1 + hai. Exercise 3. Give a proof of Lemma 1.5 based on the previous two exercises. Exercise 4. Let A be a ring. 1. For a1 , . . . , an in A, if a1 · · · an ∈ Rad A, the monoids 1 + hai i are comaximal. 2. If a1 , . . . , a` are ideals of A, the monoids 1 + ai cover the monoid 1 + Q i ai . Exercise 5. (In accordance with the definition of the prime ideals, if a product of factors is in a potential prime ideal, we can open branches of computation in each of which at least one of the factors is in the new potential prime ideal) We reuse the notations of Definition 1.4. Consider two subsets I and U of A and the corresponding monoid S(I, U ). Let a1 , . . . , ak ∈ A for which we have Qk i=1 ai ∈ hIiAS(I,U ) . 1. Show that the monoids S(I ∪ {ai } , U ) cover the monoid S(I, U ). 2. If we have ai − aj ∈ S(I, U ), then aj is invertible in AS(I∪{ai },U ) . 3. Suppose that for each j ∈ J1..kK, we have an automorphism of A that fixes the monoid S(I, U )sat and that sends a1 to aj , and that each of the AS(I∪{ai },U ) ’s is trivial, then AS(I,U ) is trivial. Exercise 6. Let S = (S1 , . . . , Sn ) be a family of monoids of A. 1. Consider the family S 0 obtained from S by repeating each Si a certain number of times (at least once) S 0 = (S1 , S1 , . . . , S2 , S2 , . . . , Sn , Sn , . . .) Show that S is a family of comaximal monoids of A if and only if the same goes for S 0 . 2. Consider a second family U = (U1 , . . . , Um ) of monoids of A. Suppose that for each i ∈ J1..nK, there exists a j ∈ J1..mK such that Si ⊆ Uj and for each j ∈ J1..mK there exists an i ∈ J1..nK such that Uj ⊇ Si . Show that if U is a family of comaximal monoids of A, the same goes for S. Exercises and problems 889 Exercise 7. (Variation on the local Kronecker’s theorem, page 809) To solve the exercise, we observe that the desired result is a “quasi-global” statement that we can obtain by rereading the proof of the local Kronecker’s theorem. Let x0 , . . . , xd ∈ A and a = DA (x0 , . . . , xd ). If Kdim A 6 d and Kdim A/a 6 0, there exist some elements s0 , . . . , sd ∈ A and some ideals b0 , . . . , bd , each generated by d elements, such that6 √ (s0 , . . . , sd ) is a f.s.o.i. of A/a and ∀i, si a ⊆ bi ⊆ a (locally, a is maximal and radically generated by d elements). Exercise 8. (Second variation on the local Kronecker’s theorem) Let A be a ring and a be a finitely generated ideal. If Kdim A/a 6 0 and Kdim A1+a 6 d, there exist some elements s0 , . . . , sd ∈ A and some ideals b0 , . . . , bd ⊆ a, each generated by d elements, such that √ (s0 , . . . , sd ) is a s.f.i.o. of A/a and ∀i, si a ⊆ bi . Exercise 9. Given the concrete patching principle of the modules (concrete local-global principle 4.4), and given the canonical isomorphism  LA (M, N ) S → LAS (MS , NS ) in the case of finitely presented modules (Proposition V -9.3), we have local characterizations for the determinant of a finitely generated projective module and that of a homomorphism between finitely generated projective modules (see Exercise X -19). 1. The module det(M ) is characterized up to unique isomorphism by the following property: if s ∈ A is such that Ms is free, then det(M )s ' det(Ms ), with compatible isomorphisms when we make a more advanced localization.7 2. If ϕ : M → N is a homomorphism of A-finitely generated projective modules, the homomorphism det(ϕ) is characterized by the following property: if s ∈ A is such that Ms and Ns are free, then det(ϕ)s = det(ϕs ) (modulo the canonical isomorphisms). Exercise 10. Let n > 3, s1 , s2 be two comaximal elements of A. We propose to concretely patch two finitely generated projective modules P1 and P2 respectively defined over As1 and As2 which have isomorphic extensions to As1 s2 . By using the enlargement lemma, we can suppose that they are images of projection matrices F1 and F2 over As1 s2 conjugated by means of a product of elementary matrices. 1. Let E ∈ En (As1 s2 ). Show that there exists an E1 ∈ En (As1 ) and E2 ∈ En (As2 ) such that E = E1 E2 over As1 s2 . 2. Let F1 ∈ Mn (As1 ) and F2 ∈ Mn (As2 ) be two projection matrices over As1 s2 conjugated by means of a matrix E ∈ En (As1 s2 ). What to do? 6 f.s.o.i.: fundamental system of orthogonal idempotents. precisely means: if s00 = ss0 , then the isomorphism (det(M ))s00 ' det(Ms00 ) is given by the localization of the isomorphism (det(M ))s ' det(Ms ). 7 This 890 XV. The local-global principle Exercise 11. (Contrapositive McCoy’s theorem, distressing version) Let A be a nontrivial discrete ring and M ∈ Am×n be a matrix. 1. If Dn (M ) is faithful, M is injective. 2. If we know an integer k < n and some nonzero x ∈ A, such that xDk+1 (M ) = 0 and Dk (M ) is faithful, then we can construct a nonzero vector in the kernel of M . Exercise 12. (Contrapositive McCoy’s theorem, digestible version) Let A be a nontrivial discrete coherent ring and M ∈ Am×n be a matrix. 1. Either Dn (M ) is faithful, and M is injective. 2. Or we can construct in the kernel of M a vector with at least a coordinate in A∗ . Exercise 13. We notice that some definitions of depth 1 and of depth 2 are given in terms that do not make the additive structure of the considered ring intervene, but only its multiplicative structure, i.e. the monoid (A, ×, 1). As the statement of Lemma 9.3 does not make use of the additive structure either, we can hope for a purely multiplicative proof of this lemma. The inspection of the proof given in the course shows that this is not the case. We therefore propose to the reader to find a proof of Lemma 9.3 which works for any monoid. Problem 1. (Avoiding the prime ideals) In this problem, we examine how to constructively decrypt a classical proof that uses as a basis tool “go see what happens in the fields Frac(A/p) for all the prime ideals p of A.” 1. Let t be an indeterminate and a, b, c1 , . . . , cn ∈ A such that (at + b, c1 , . . . , cn ) is a unimodular vector over A[t, t−1 ]. We want to show that ab ∈ DA (c1 , . . . , cn ). The following proof, typical in classical mathematics, uses LEM and the axiom of choice. If ab ∈ / DA (c1 , . . . , cn ), there exists a prime ideal p with ci ∈ p for i ∈ J1..nK and ab ∈ / p. Over the field K = Frac(A/p), since a is nonzero, the equation at + b = 0 has a unique solution t = −b/a, which is nonzero because b is nonzero; we can then define a morphism ϕ : A[t, t−1 ] → K by t 7→ −b/a; ϕ transforms the unimodular vector (at + b, c1 t, . . . , cn t) into the null vector of Kn+1 . A contradiction. What do you think? 2. If B is a reduced ring describe the units of B[t, 1/t]. P We will be able to show that if p, q ∈ B[t] satisfies pq = tm (with p = k pk tk P and q = k qk tk ), then 1 ∈ c(p), 1 ∈ c(q) and pk p` = qk q` = 0 if k 6= `, pk q` = 0 if k + ` 6= m, pi = qi = 0 if i > m. Consequently, for k ∈ J0..mK, hpk i is generated by some idempotent ek . We then have a fundamental system of orthogonal idempotents available (e0 , . . . , em ) in B such that hek i = hpk i = hqm−k i for k ∈ J0..mK and ek p = ek pk tk , ek q = ek qm−k tm−k and ek = ek pk qm−k . Solutions of selected exercises 891 The result is clear when the ring is integral, so the reflex in classical mathematics is to use some prime ideals. A possible solution to constructively decrypt this reasoning is to use the formal Nullstellensatz (Theorem III -9.9). Some solutions, or sketches of solutions Exercise 1. 2 ⇒ 1. Let s1 , . . . , sn with si ∈ Si . We want bi ’s ∈ A such that b1 s1 + · · · + bn sn ∈ S. The fact that the Si ’s are comaximal in AS provides an s ∈ S and some ai ’s ∈ A such that a1 s1 + · · · + an sn = s in AS ; therefore there exists a t ∈ S such that, in A, (ta1 )s1 + · · · + (tan )sn = ts ∈ S. Exercise 2. 1. An element s of S(I; U, a) is of the form x + uak . We see that s divides the element xu−1 + ak ∈ S(I; a) in AS . 2. An element s of S(I, a; U ) is of the form x + ya + u. Let x0 = u−1 x and y 0 = u−1 . Then s divides in AS the element x0 + y 0 a + 1, which divides 1 + y 00 a, where y 00 = (1 + x0 )−1 y 0 . Exercise 3. Let S = S(I, U ), S1 = S(I; U, a) and S2 = S(I, a; U ). We must prove that S1 and S2 are comaximal in AS . In AS , S1 is equivalent to I + aN , and S2 is equivalent to 1 + hai. Let us use the following identity y k (x + ak ) + P j<k  y j aj (1 − ya) = y k (x + ak ) + 1 − y k ak = 1 + y k x. Applied to x ∈ I, it proves that x + ak and 1 − ya are comaximal in AS (since 1 + y k x ∈ 1 + I and since I is contained in the radical of AS ). Exercise 1. For j ∈ J1..nK let bj = 1 − aj xj in the monoid 1 + aj A. Q 4. Let a = i ai . We must show that the ideal m = hb1 , . . . , bn i contains 1. Q However, modulo m we have 1 = aj xj , therefore 1 = a i xi = ax. Thus 1 − ax ∈ m, but 1 − ax ∈ A× because a ∈ Rad A. Q 2. It is clear that S = 1 + i ai ⊆ 1 + aj = Sj for each j. We must therefore prove (Exercise 1) that the 1 + aj given in AS are comaximal. However, the product Q a , seen in AS , is in Rad AS . Therefore it suffices to apply item 1. i i Exercise 5. The hypothesis means that we have a u ∈ M(U ) and a j ∈ hIiA Qk Qk such that (u + j) i=1 ai ∈ hIiA , or u i=1 ai ∈ hIiA . 1. First solution, by direct computation. Consider xi ∈ Si = S(I ∪ {ai } , U ) and look for a linear combination which is in S = S(I, U ). For each i we write xi = ui + ji + ai zi with ui ∈ M(U ), ji ∈ hIiA and zi ∈ A. In the product Qk Qk u i=1 (xi − (ui + ji )) = u a z ∈ hIiA , i=1 i i we re-express the left-hand side in the form Pk i=1 and we obtain, by moving ±u membership Pk i=1 ci xi ± u Qk i=1 ci xi ∈ S(I, U ). Qk i=1 (ui + ji ) (ui + ji ) to the right-hand side, the desired 892 XV. The local-global principle Second solution, conceptual. It is clear that S ⊆ Si . It therefore suffices (Exercise 1) to show that the Si ’s are comaximal in AS . In AS , (Exercise 2) the monoids Si and 1 + hai i have the same saturated monoid. It therefore suffices to see that the monoids 1 + hai i are comaximal in AS . Moreover, we know that, seen in AS , I is contained in Rad(AS ). We therefore apply item 1 of Exercise 4. 2. Clear since aj ∈ S(I, U ) + hai i ⊆ S(I ∪ {ai } , U ). 3. If one of the ASi ’s is trivial, all of them are also trivial because they are pairwise isomorphic. Since the Si ’s cover S, AS is itself trivial. Exercise 6. 1. It suffices to show it for S 0 = (S1 , S1 , S2 , . . . , Sn ). Suppose that the family S is comaximal. Let s01 , s001 ∈ S1 , and si ∈ Si for i ∈ J2..nK. The elements s01 s001 , s2 , . . . , sn are comaximal, and since s01 s001 ∈ hs01 , s001 i, the same goes for s01 , s001 , s2 , . . ., sn . In the other direction, suppose that S 0 is comaximal and let si ∈ Si for i ∈ J1..nK; then s1 , s1 , s2 , . . ., sn are comaximal therefore the same goes for s1 , s2 , . . ., sn . 2. By repeating some of the Si ’s and the Uj ’s, we obtain two families S 0 , U 0 of monoids of A, indexed by the same interval J1..pK and satisfying Sk0 ⊆ Uk0 for k ∈ J1..pK. Since U is comaximal, the same goes for U 0 so for S 0 then for S. Exercise 7. As Kdim A 6 d, there exists a sequence (a) = (a0 , . . . , ad ) complementary to (x) = (x0 , . . . , xd ). Therefore (disjoint sequences), for every i 6 d, we have D(a0 , . . . , ai−1 , x0 , . . . , xi−1 , ai xi ) = D(a0 + x0 , . . . , ai−1 + xi−1 ). As Kdim A/a 6 0 and a = DA (a), we also have A = Aai + (a : ai ) for all i. We then construct the triangle A = Aa0 + (a : a0 ) = Aa0 + (a : a0 )a1 + (a : a0 )(a : a1 ) . .. = Aa0 + (a : a0 )a1 + · · · + (a : a0 ) · · · (a : ad−1 )ad + (a : a0 ) · · · (a : ad ). Now, we write 1 = b0 a0 + b1 a1 + · · · + bd ad + t with bi ∈ (a : a0 ) · · · (a : ai−1 ) and t ∈ (a : a0 ) · · · (a : ad ). For i 6 d, on the one hand we have  bi hx0 , . . . , xi−1 i ⊆ D bi (a0 + x0 ), . . . , bi (ai−1 + xi−1 ) ⊆ D(bi a0 , x0 , . . . , bi ai−1 , xi−1 ) ⊆ D(a) = a, and on the other hand bi ai xi ∈ bi D(a0 + x0 , . . . , ai−1 + xi−1 )  ⊆ D bi (a0 + x0 ), . . . , bi (ai−1 + xi−1 ) ⊆ a. Solutions of selected exercises 893 Now let si = bi ai . Thus we reach  si hx0 , . . . , xi−1 , xi i ⊆ D bi (a0 + x0 ), . . . , bi (ai−1 + xi−1 ) ⊆ a, then si hx0 , . . . , xi−1 , xi , xi+1 , . . . , xd i ⊆  D bi (a0 + x0 ), . . . , bi (ai−1 + xi−1 ), si xi+1 , . . . , si xd ⊆ a. | {z generate bi (def.) } Therefore there exists an ideal bi generated by d elements satisfying si a ⊆ D(si a) ⊆ D(bi ) ⊆ a. We end the proof by using 1 ∈ had , xd i. We get t ∈ t had , xd i ⊆ htad , xd i ⊆ a, so much so that the sum of the si ’s is equal to 1 mod a. Moreover, for i > j, si sj ∈ bi aj A ⊆ a, which allows us to conclude that (s0 , . . . , sd ) is a fundamental system of orthogonal idempotents of A/a. √ Exercise 8. To begin with, Kronecker’s theorem gives that a is√radically generated by d + 1 elements. Next we apply the result of Exercise 7 to a in the localized ring (1 + a)−1 A. This provides some si ’s forming a fundamental system √ √ of orthogonal idempotents modulo a and some bi ⊆ a. Even if it entails taking multiples of powers of the si ’s, we can impose that (s0 , . . . , sd ) is a fundamental system of orthogonal idempotents of A/a. Even if it entails taking powers of the generators of the bi ’s, we can impose bi ⊆ a. Exercise 10. 1. [Lam06, page 208 Proposition 1.14]. 2. We have F1 E = EF2 . We write E = E1 E2 , so F1 E1 E2 = E1 E2 F2 and f1 F1 E1 =As s E2 F2 E f2 . E 1 2 f1 F1 E1 (resp. E2 F2 E f2 ) is a projection matrix over As1 (resp. over As2 ) The matrix E f1 E1 = In (resp. E f2 E2 = In ). By the local-global principle of patching of because E the elements in a module (here Mn (A)), there exists a unique matrix F ∈ Mn (A) f1 F1 E1 over As1 and to E2 F2 E f2 over As2 . To prove that which is equal to E F 2 = F , it suffices to prove it over As1 and As2 . Let P = Im F ⊆ An . By construction, for i = 1, 2 Psi =Ansi Im Fsi 'Ansi Im Fi 'Ansi Pi . Exercise 11. (Contrapositive McCoy’s theorem, distressing version) 1. Already seen. 2. We have x 6= 0, Dk (M ) is faithful and the ring is discrete, therefore there exists a minor µ of order k of M such that xµ = 6 0. Suppose for example that µ is the north-west minor and let C1 , . . . , Ck+1 be the first columns of M , let µi (i ∈ J1..kK) be the suitably signed determinants of the matrices extracted on the rows J1..kK and the previous columns, except the column of index i + 1. Then the Pk Cramer formulas give the equality xµi Ci + xµCk+1 = 0. As xµ 6= 0, this i=1 gives a nonzero vector in the kernel of M . Comment. In classical mathematics, if Dn (M ) is not faithful, as D0 (M ) = h1i is faithful, there exists some k < n such that Dk (M ) is faithful and Dk+1 (M ) is not 894 XV. The local-global principle faithful. Still in classical mathematics, if Dk+1 (M ) is not faithful, there exists some x 6= 0 such that xDk+1 (M ) = 0. For these things to become explicit, we need for example to dispose of a test for the faithulness of the finitely generated ideals, in a very strong sense. Exercise 12. (Contrapositive McCoy’s theorem, digestible version) Since the determinantal ideals are finitely generated ideals, and the ring is coherent, their annihilators are also finitely generated ideals, and we can test the nullity of a finitely generated ideal because the ring is discrete. The hypotheses of Exercise 11 are therefore satisfied. Note: The alternative “1 or 2 ” is exclusive because the ring is nonzero, this justifies the “either, . . . , or” of the statement. Problem 1. 1. There is no miracle: a certificate for ab ∈ DA (c1 , . . . , cn ) can be obtained from a certificate of unimodularity of (at + b, c1 t, . . . , cn t) in A[t, t−1 ]. By replacing A by A1 = A/DA (c1 , . . . , cn ) , we are brought back to A being reduced and ci = 0. The hypothesis is then at + b is invertible in A[t, t−1 ], and the result to be shown is ab = 0 (symmetric result in a, b just like the hypothesis). We have (at + b)g(t) = te for some g ∈ A[t] and some e ∈ N, therefore the polynomial at + b is primitive. To show ab = 0, it suffices to localize at a then at b. Over the localized ring at a, we take t = −b/a in (at + b)g(t) = te , we obtain (−b/a)e = 0. Thus, we have b = 0, then ab = 0. By symmetry, we obtain in Ab , a = 0 so ab = 0. Actually, if ua + vb = 1, the ring A1 is split in two by the idempotent ua. In the first component, at + b = a with a invertible, in the second, at + b = b with b invertible. 2. In classical mathematics: if we pass to the quotient by a prime ideal the result is clear. By continuity, the spectrum is partitioned into a finite number of open sets corresponding to the coveted fundamental system of orthogonal idempotents. A constructive proof is given in [193, Yengui]. The reader will also be able to draw from the proof of item 1. A method that we can systematically use consists in calling upon the formal Nullstellensatz (Theorem III -9.9). In the current case, we note that the problem comes down to proving that the pk p` ’s are null for k 6= ` and that the pm+r ’s null for r > 0. Once this is observed, since the pk ’s are comaximal, we obtain a fundamental system of orthogonal idempotents (e0 , . . . , em ) such that ek p = ek pk tk for all k, from which the result follows. The philosophy is the following: if we take all the coefficients of the problem as indeterminates over Z, the hypothesis comes down to passing to the quotient by the radical a of a finitely generated ideal, which represents the hypotheses. The goal is then to prove that the conclusions are also in a. For this it suffices to prove that it is indeed the case when we evaluate the problem in an arbitrary finite field. Here the indeterminates are p0 , . . . , pn , q0 , . . . , qn . Bibliographic comments For p = Pn k=0 pk tk and q = 895 Pn k=0 P qk tk ; we define the polynomial def rj tj = pq − tm (with all rj ∈ Z[p0 , . . . , pn , q0 , . . . , qn ]) and the ideal a is D(r0 , . . . , r2n ). We will show that the pk p` ’s and qk q` ’s are in a if k 6= `, that the pk q` ’s are in a for k + ` 6= m and that the pm+r ’s and qm+r ’s are in a for r > 0. However, this directly results from item 2 in the formal Nullstellensatz (or then from item 4 in Corollary III -9.10). In geometric terms: if n > m, the variety of the zeros of pq − tm over a field K is a space formed of m + 1 copies of K× isolated from one another; over a reduced ring the response is fundamentally the same, but the isolated components in the case of the fields here make a fundamental system of orthogonal idempotents appear. Thus, the formal Nullstellensatz (Theorem III -9.9) provides a constructive method to decrypt the hidden algorithms in certain reasonings from classical mathematics, when the argument consists in seeing what happens in all the Frac(A/p)’s for all the prime ideals of A. Bibliographic comments The dynamic method as it is explained in the local-global machinery with prime ideals (Section 5) consists for the most part in flattening the computations implied by the method of dynamic evaluation given in [124, Lombardi], a successor of the dynamic method implemented in [51, Coste&al.] for proofs of the Nullstellensatz type, itself a successor of the dynamic evaluation à la D5 in Computer Algebra [55, Duval&al.]. With respect to what is proposed in [51, 124], the difference in the previous chapter is mainly that we have avoided the reference to formal logic. In classical mathematics, we find the concrete patching principle of the finitely generated projective modules (item 4 of the local-global principle 2.2) for example in [Knight, Proposition 2.3.5 and Lemma 3.2.3] (with an almost entirely constructive proof) and in [Kunz, rule 1.14 of Chapter IV]. The constructive treatment of Suslin’s lemma 6.1 is due to Ihsen Yengui [196], who gives the key to the local-global machinery with maximal ideals. The local-global machinery with minimal prime ideals is due to Thierry Coquand [36, On seminormality]. Exercises 7 and 8 are due to Lionel Ducos [66]. The dynamic method was applied for the computation of “dynamic Gröbner bases” by Yengui in [194]. Chapter XVI Extended projective modules Contents Introduction . . . . . . . . . . . . 1 Extended modules . . . . . . . . . The problem of the extension . . . . The case of the polynomial rings . . 2 The Traverso-Swan’s theorem . . Preliminaries . . . . . . . . . . . . . Seminormal rings . . . . . . . . . . The case of integral rings . . . . . . General case . . . . . . . . . . . . . 3 Patching à la Quillen-Vaserstein A Roitman theorem . . . . . . . . . 4 Horrocks’ theorem . . . . . . . . . 5 Solution to Serre’s problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 898 898 898 899 900 901 902 903 907 908 910 912 916 À la Quillen . . . . . . . . . . . . . . . . . . . . . . . . . . 916 À la Suslin, Vaserstein or Rao . . . . . . . . . . . . . . . 6 Projective modules extended from arithmetic rings The univariate case . . . . . . . . . . . . . . . . . . . . . The multivariate case . . . . . . . . . . . . . . . . . . . . Conclusion: a few conjectures . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . – 897 – . . . . . . . . 919 925 926 931 936 937 939 941 898 XVI. Extended projective modules Introduction In this chapter we constructively establish a few important results regarding the situations where the finitely generated projective modules over a polynomial ring are extended from the base ring. We especially treat Traverso-Swan’s theorem (Section 2), the patching à la Vaserstein-Quillen (Section 3), Horrocks’ theorems (Section 4), QuillenSuslin’s theorem (Section 5), and in Section 6, Bass’ theorem (Theorem 6.2) and the Lequain-Simis theorem (Theorem 6.16). 1. Extended modules ρ Given an algebra A −→ B, the scalar extension from A to B transforms a module M over A into a module ρ? (M ) ' B ⊗A M over B. Recall that a B-module isomorphic to such a module ρ? (M ) is said to be extended from A. We also say that it comes from the A-module M by scalar extension. In the case of a finitely presented module, from the point of view of the presentation matrices, this corresponds to considering the matrix transformed by the homomorphism ρ. A necessary condition for a finitely presented module to be extended is that its Fitting ideals are of the form ρ(ai )B for finitely generated ideals ai of A. This condition is realized for the finitely generated projective modules if and only if the idempotents of B are all images of idempotents of A. The problem of the extension For the finitely generated projective modules, the following problem arises naturally given the morphism GK0 ρ : GK0 A → GK0 B. Problem no. 1. Does every finitely generated projective module over B come from a finitely generated projective module over A? Or yet again: is GK0 ρ surjective? Recall that GK0 Ared = GK0 A and GK0 Bred = GK0 B, such that the problem of the extension of the finitely generated projective modules can be narrowed down to the case of reduced rings. Moreover, if H0 ρ : H0 A → H0 B is not surjective, the answer to problem no. 1 is negative “for the wrong reason” and the following problem is then more natural. Problem no. 2. Does every projective module of constant rank over B come from a finitely generated projective module over A? For the finitely presented modules the natural generalization of the previous problem is then the following. §1. Extended modules 899 Problem no. 3. Does every finitely presented module over B whose Fitting ideals are extensions of finitely generated ideals of A come from a finitely presented module over A? The case of the polynomial rings Let B = A[X1 , . . . , Xr ] = A[X]. If (a) ∈ Ar we denote by eva the evaluation homomorphism at a eva : B → A, p 7→ p(a). j eva The two homomorphisms A −→ B −−→ A are composed according to the identity. Most of what follows in this subsection could be written in the more general context of an A-algebra B possessing a character (cf. Proposition IV -2.7). For polynomial rings we obtain the following results (with an obvious intuitive notation for M (X)). 1.1. Fact. With B = A[X]. 1. A B-module M = M (X) is extended from A if and only if it is isomorphic to M (0). 2. In particular, if M is finitely presented with a presentation matrix G(X) ∈ Bq×m , Lemma IV -1.1 implies that M is extended from A if and only if the matrices H(X) and H(0), where H is illustrated below, are equivalent over the ring B m q q m G(X) 0 0 0 q 0 Iq 0 0 q H(X) = Remark. By Lemma IV -1.1 when the matrices H(X) and H(0) are equivalent, they are elementarily equivalent. Regarding the finitely generated projective modules we obtain homomorphisms of semirings which are composed according to the identity GK0 j GK0 eva GK0 A −−−→ GK0 A[X] −−−−→ GK0 A. Consequently GK0 j is injective, and the phrase “every finitely generated projective module over A[X] is extended from A” means that GK0 j is an isomorphism, which we abbreviate to “GK0 A = GK0 A[X].” 900 XVI. Extended projective modules Similarly, for the Grothendieck rings K0 j K0 eva K0 A −−→ K0 A[X] −−−−→ K0 A, with K0 (eva ) ◦ K0 (j) = IdK0 A . Moreover we have the following elementary results, in which each equality has the meaning that a natural morphism is an isomorphism. 1.2. Fact. With B = A[X]. 1. DB (0) = DA (0)B (a polynomial is nilpotent if and only if all its coefficients are nilpotent). In particular, Bred = Ared [X]. 2. If A is reduced, B× = A× . More generally, B× = A× + DA (0) hXi. 3. B(A) = B(A[X]) and H0 A = H0 A[X]. 4. GK0 A = GK0 Ared . 5. GK0 A = GK0 A[X] ⇐⇒ GK0 Ared = GK0 Ared [X]. 6. Pic A = Pic B ⇐⇒ Pic Ared = Pic Ared [X]. J 1 and 2. See Lemma II -2.6. 3. We must show that every idempotent polynomial is constant. This is done (in a single variable) by induction on the formal degree of the polynomial. 4. This is Theorem X -5.10. Items 5 and 6 result from items 1 and 4.  2. The Traverso-Swan’s theorem, seminormal rings This section is devoted to the study of the rings A for which the natural homomorphism from Pic A to Pic A[X1 , . . . , Xr ] is an isomorphism (i.e. the projective modules of constant rank 1 over A[X1 , . . . , Xr ] are all extended from A). The answer is given by the Traverso-Swan-Coquand theorem ([185, 183, 36]): Theorem (Traverso-Swan-Coquand) The following properties are equivalent. 1. The ring Ared is seminormal (definition 2.5). Pic j 2. The natural homomorphism Pic A −−→ Pic A[X] is an isomorphism. 3. ∀r > 1, the natural homomorphism Pic A → Pic A[X1 , . . . , Xr ] is an isomorphism. 4. ∃r > 1, the natural homomorphism Pic A → Pic A[X1 , . . . , Xr ] is an isomorphism. We will show 1 ⇒ 3 and 2 ⇒ 1. As a corollary, A is seminormal if and only if A[X] is seminormal. §2. The Traverso-Swan’s theorem 901 Preliminaries First of all recall the following result (see Proposition V -2.11). 2.1. Lemma. A projection matrix of rank 1, P , has a free image if and only if there exists a column vector C and a row vector L such that LC = 1 and CL = P . In addition, C and L are unique, up to the product by a unit, under the only condition that CL = P . Moreover recall that the natural morphism Pic A → Pic A[X] is an isomorphism if and only if the natural morphism Pic Ared → Pic Ared [X] is an isomorphism (Fact 1.2 6). The two group homomorphisms Pic j Pic ev0 Pic A −−−→ Pic A[X] −−−→ Pic A are composed according to the identity. The first is injective, the second surjective. They are isomorphisms if and only if the first is surjective, if and only if the second is injective. This last property means: every idempotent square matrix P (X) of   rank 1 over A[X] which satisfies “Im P (0) is free,” satisfies “Im(P X) is free” in itself.  Actually, if Im P (0) is free, the matrix Diag(P (0), 01 ) is similar to a standard projection matrix I1,n = Diag(1, 0n−1,n−1 ) (enlargement lemma V -2.10). Hence the following lemma. 2.2. Lemma. The following properties are equivalent. 1. The natural homomorphism Pic A → Pic A[X] is an isomorphism. 2. For every matrix M (X) = (mi,j ) ∈ AGn (A[X]) such that M (0) = I1,n , there exist f1 , . . . , fn , g1 , . . . , gn ∈ A[X] such that mi,j = fi gj for all i, j. Note that the hypothesis M (0) = I1,n implies rk(M ) = 1 because the homomorphism H0 (A[X]) → H0 (A) is an isomorphism. Convention. We abbreviate the statement “the natural morphism from Pic A to Pic A[X] is an isomorphism” by writing: “Pic A = Pic A[X].” 2.3. Lemma. Let A ⊆ B be reduced rings and f1 , . . . , fn , g1 , . . . , gn be polynomials in B[X] that satisfy the following properties  f (0) = g1 (0) = 1, fi (0) = gi (0) = 0 (i = 2, . . . , n),   1 def (∗) mij = fi gj ∈ A[X] (i, j = 1, . . . , n),  P i fi gi = 1. Under these hypotheses, the matrix M := (mij ) is a projection matrix of rank 1, M (0) = I1,n , and the following properties are equivalent. 902 XVI. Extended projective modules 1. The module Im M is free over A[X], i.e. extended from A. 2. The fi ’s and the gi ’s are in A[X]. 3. f1 ∈ A[X]. J 3 ⇒ 2. The gj ’s are obtained from f1 and from the m1j ’s by making divisions by non-decreasing powers, because the constant coefficient of f1 is equal to 1. Similarly, we then obtain the fi ’s from g1 and from the mi1 ’s. The converse implication is trivial. 2 ⇔ 1. By Lemma 2.1, the problem is to find suitable fi ’s and gj ’s from the matrix (mij ). However, these fi ’s and gj ’s exist in B[X], and the condition f1 (0) = 1 forces their uniqueness because the rings are reduced (so the invertible elements in polynomial ring are constants).  Lemmas 2.2 and 2.3 imply the following result. 2.4. Corollary. Let A ⊆ B be two reduced rings with Pic B = Pic B[X]. The following properties are equivalent. 1. Pic A = Pic A[X]. 2. If polynomials f1 , . . . , fn , g1 , . . . , gn in B[X] satisfy the conditions (∗) of Lemma 2.3, then the fi ’s and the gi ’s are in A[X]. 3. If polynomials f1 , . . . , fn , g1 , . . . , gn in B[X] satisfy the conditions (∗), then f1 ∈ A[X]. Seminormal rings An integral ring A is said to be seminormal if, each time that b2 = c3 = 6 0, the element a = b/c of Frac(A) is actually in A. In this case, a3 = b and a2 = c. 2.5. Definition. An arbitrary ring A is said to be seminormal if each time that b2 = c3 , there exists an a ∈ A such that a3 = b and a2 = c. 2.6. Fact. 1. A seminormal ring is reduced. 2. In a reduced ring, x2 = y 2 and x3 = y 3 imply x = y. J 1. If b2 = 0, then b2 = 03 , hence a ∈ A with a3 = b and a2 = 0, so b = 0. 2. In every ring, (x − y)3 = 4(x3 − y 3 ) + 3(y 2 − x2 )(x + y).  Consequently the element a in Definition 2.5 is always unique. In addition, Ann(b) = Ann(c) = Ann(a). 2.7. Fact. Every normal ring is seminormal. J A ring is normal when every principal ideal is integrally closed. Such a ring is a pf-ring: if uv = 0, there exists an s such that su = (1 − s)v = 0 (Lemma XII -2.3). Let b and c such that b3 = c2 , then c is integral over the ideal hbi, hence some x such that c = xb, hence b3 = c2 = x2 b2 §2. The Traverso-Swan’s theorem 903 and b2 (x2 − b) = 0. Therefore there exists an s such that s(x2 − b) = 0 and b2 (1 − s) = 0. This gives b(1 − s) = 0, then (sx)2 = s2 b = sb = b. By letting a = sx, we get a2 = b, a3 = bsx = bx = c.  The condition is necessary: Schanuel’s example 2.8. Lemma. If A is reduced and Pic A = Pic A[X], then A is seminormal. J Let b, c ∈ A with b2 = c3 . Let B = A[a] = A + aA be a reduced ring containing A, with a3 = b, a2 = c. Consider the polynomials fi and gj (i, j = 1, 2) defined as follows f1 = 1 + aX, f2 = g2 = cX 2 and g1 = (1 − aX)(1 + cX 2 ). We have f1 g1 + f2 g2 = 1, f1 (0) = g1 (0) = 1, f2 (0) = g2 (0) = 0, and each product mij = fi gj is in A[X]. We apply Lemma 2.3: the image of the matrix (mij ) is free if and only if f1 ∈ A[X], i.e. a ∈ A.    Note: For B we can take A[T ] T 2 − c, T 3 − b red . If a suitable element a is already present in A, we obtain by uniquness B = A. The case of integral rings We first treat the GCD-domains, then the normal rings and finally the seminormal rings. The case of a GCD-domain Recall that a GCD-domain is an integral ring in which two arbitrary elements admit a greatest common divisor, i.e. an upper bound for the divisibility relation. Also recall that if A is a GCD-domain, the same goes for the polynomial ring A[X]. 2.9. Lemma. If A is a GCD-domain, then Pic A = {1}. J We use the characterization given in Lemma 2.1. P Let P = (mij ) be an idempotent matrix of rank 1. Since i mii = 1, we can assume that m1,1 is regular. Let f be the gcd of the elements of the first row. We write m1j = f gj with the gcd of the gj ’s equal to 1. The equality m1,1 mij = m1j mi1 gives, by simplifying by f , g1 mij = mi1 gj . Thus, g1 divides all the mi1 gj ’s, and so also divides their gcd mi1 . We write mi1 = g1 fi . Since g1 f1 = m1,1 = f g1 , this gives f1 = f . Finally, m1,1 mij = m1j mi1 gives the equality f1 g1 mij = f1 gj g1 fi , then mij = fi gj .  We then have the following corollary. 904 XVI. Extended projective modules 2.10. Proposition. If A is a discrete field or a reduced zero-dimensional ring, then Pic A = Pic A[X] = {1}. J Lemma 2.9 gives the result for the discrete fields. It then suffices to apply the elementary local-global machinery no. 2 (page 212).  The case of a normal domain 2.11. Lemma. If A is a normal domain, then Pic A = Pic A[X]. J We use the characterization given in Corollary 2.4 3, with here A ⊆ K, the quotient field of A. Let fi and gj , (i, j ∈ J1..nK) be the suitable polynomials of K[X]. Then, since f1 g1 = m1,1 ∈ A[X] and g1 (0) = 1, given Kronecker’s theorem III -3.3, the coefficients of f1 are integral over the ring generated by the coefficients of m1,1 . Thus f1 ∈ A[X].  Remark. As for Proposition 2.10, we can extend the result of Lemma 2.11 to the case of a reduced ring A integrally closed in a reduced zero-dimensional ring K ⊇ A. The case of a seminormal integral ring 2.12. Proposition. Pic A[X]. If A is integral and seminormal, then Pic A = Start of the proof. As in the proof of Lemma 2.11, we start with polynomials f1 (X), . . . , fn (X), g1 (X), . . . , gn (X) in K[X] that satisfy the conditions (∗) of Lemma 2.3. We call B the subring of K generated by A and by the coefficients of the fi ’s and the gj ’s, or, what amounts to the same thing, generated by A and the coefficients of f1 . Then, given Kronecker’s theorem, B is a finite extension of A. Our goal is to show that A = B. Let a be the conductor of B into A, i.e. the set { x ∈ B | xB ⊆ A }. It is both an ideal of A and B. Our goal is now to show a = h1i, i.e. C = A/a is trivial.  We start with two lemmas. 2.13. Lemma. If A ⊆ B, A is seminormal and B is reduced, then the conductor a of B into A is a radical ideal of B. J We must show that if u ∈ B and u2 ∈ a, then u ∈ a. So let c ∈ B. We must show that uc ∈ A. We know that u2 c2 and u3 c3 = u2 (uc3 ) are in A since u2 ∈ a. Since (u3 c3 )2 = (u2 c2 )3 , we have some a ∈ A such that a2 = (uc)2 and a3 = (uc)3 . As B is reduced, we obtain a = uc, and so uc ∈ A.  Remark. The seminormal closure of a ring A in a reduced ring B ⊇ A is obtained by starting from A and adding the elements x of B such that x2 and x3 are in the previously contructed ring. Note that by Fact 2.6, x is §2. The Traverso-Swan’s theorem 905 uniquely determined by the given x2 and x3 . The proof of the previous lemma can then be interpreted as a proof of the following variant. 2.14. Lemma. Let A ⊆ B be reduced, A1 be the seminormal closure of A in B, and a be the conductor of B into A1 . Then, a is a radical ideal of B. 2.15. Lemma. Let A ⊆ B, B = A[c1 , . . . , cq ] be reduced and finite over A and a be the conductor of B into A. Suppose that a is a radical ideal, then it is equal to { x ∈ A | xc1 , . . . , xcq ∈ A }. J Indeed, if xci ∈ A, then x` c`i ∈ A for all `, and so for some large enough N , xN y ∈ A for all y ∈ B, so x is in the nilradical of a (if d is the upper bound of the degrees of the equations of integral dependence of the ci ’s over A, we can take N = (d − 1)q).  End of the proof of Proposition 2.12. We first give it in classical mathematics. The natural classical reasoning would proceed by contradiction: the ring C is trivial because otherwise, it would have a minimal prime ideal and the localization at this minimal prime ideal would lead to a contradiction. To avoid the nonconstructive character of the argument by contradiction, we localize at a maximal filter, recalling our definition “without negation” according to which a filter is maximal if and only if the localized ring is a zero-dimensional local ring. In other words we tolerate for the maximal filters of a ring not only the complements of the minimal prime ideals but also the filter generated by 0 which gives by localization the trivial ring. In classical mathematics a ring is then trivial if and only if its only maximal filter is the whole ring (in other words, the filter generated by 0). Let us insist on the fact that it is only in the previous affirmation that the “classical” character of the argument is located. Because the proof of what follows is perfectly constructive: if S is a maximal filter of C, then 0 ∈ S (so S = C). Consider the inclusion C = A/a ⊆ B/a = C0 . Let S be a maximal filter of C, and S1 be the corresponding maximal filter of A (the inverse image of S by the canonical projection). Since S is a maximal filter, and since C is reduced, S −1 C = L is a reduced zero-dimensional local ring, that is a discrete field, contained in the reduced ring S −1 C0 = L0 . If x is an object defined over B, let us denote by x what it becomes after the base change B → L0 . Since L is a discrete field, L[X] is a GCD-domain, and the fi ’s and gj ’s are in L[X]. This means that there exists an s ∈ S1 such that sf1 ∈ A[X]. By Lemma 2.15, this implies that s ∈ a. Thus s = 0 and s ∈ S.  The proof given above for Proposition 2.12 is in fact quite simple. It is however not entirely constructive and it seems to only treat the integral case. 906 XVI. Extended projective modules Constructive proof of Proposition 2.12. We rewrite the proof given in classical mathematics by considering that the maximal filter S of C is a purely generic object which guides us in the constructive proof. Imagine that the ring C is a discrete field, i.e. that we have already done the localization at a maximal filter. Then, polynomials Fi and Gj of C[X] satisfying Fi Gj = mij and F1 (0) = 1 are computed from the mij ’s according to an algorithm that we deduce from the previously given constructive proofs for the case of discrete fields (Lemma 2.9). The uniqueness of the solution then forces the equality F1 = f1 , which shows that f1 ∈ C[X], and therefore that C is trivial. This algorithm uses the disjunction “a is null or a is invertible,” for the elements a ∈ C which are produced by the algorithm from the coefficients of the polynomials mi,j . As C is only a reduced ring, with neither a test for equality to 0 nor an invertibility test, the algorithm for discrete fields, if we execute it with C, must be replaced by a tree in which we open two branches each time a question “is a null or invertible?” is asked by the algorithm. Here we are, facing a gigantic, but finite, tree. Say that we have systematically placed the “a is invertible” branch on the left-hand side, and the “a = 0” branch on the right. Let us look at what happens in the extreme left branch. We have successively inverted a1 , . . . , ap and we have obtained an s that shows that the ring C[1/(a1 · · · ap )] is trivial. Conclusion: in the ring C, we have the equality a1 · · · ap = 0. Let us take one step back up the tree. In the ring C[1/(a1 · · · ap−1 )], we know that ap = 0. The left branch should not have been opened. Let us take a look at the computation in the branch ap = 0. Let us follow from here the extreme left branch. We have inverted a1 , . . . , ap−1 , then, say b1 , . . . , bk (eventually, k = 0). We obtain an s that shows that the ring C[1/(a1 · · · ap−1 b1 · · · bk )] is trivial. Conclusion: in the ring C, we have the equality a1 · · · ap−1 b1 · · · bk = 0. Let us take one step back up the tree. We know that bk = 0 (or, if k = 0, ap−1 = 0) in the ring that was there just before the last branching; namely the ring C[1/(a1 · · · ap−1 b1 · · · bk−1 )] (or, if k = 0, C[1/(a1 · · · ap−2 )]). The left branch should not have been opened. Let us look at the computation in the branch bk = 0 (or, if k = 0, the branch ap−1 = 0) . . . And so forth. When we follow the process all the way through, we find ourselves at the root of the tree with the ring C = C[1/1], which is trivial. By using Lemma 2.14 instead of Lemma 2.13 we will obtain the following result, which is more precise than Proposition 2.12. §2. The Traverso-Swan’s theorem 907 2.16. Proposition. If A is an integral ring and P is a projective module of rank 1 over A[X] such that P (0) is free, there exist c1 , . . . , cm in the quotient field of A such that 1. c2i and c3i are in A[(cj )j<i ] for i = 1, . . . , m, 2. P is free over A[(cj )j6m ][X]. Remark. Actually, only the quotient field of the subring generated by the coefficient present in a projection matrix, whose image is isomorphic to P , intervenes. General case 2.17. Proposition. (Coquand) Let A ⊆ K with K reduced. n 1. Given f and g ∈ K[X] that satisfy the conditions (∗) of Lemma 2.3, we can construct c1 , . . . , cm in K such that – c2i and c3i are in A[(cj )j<i ] for i ∈ J1..mK, – f and g have their coordinates in A[(ck )k∈J1..mK ][X]. 2. If Pic K = Pic K[X] and if P is a projective module of rank 1 over A[X], there exist c1 , . . . , cm in K such that – c2i and c3i are in A[(cj )j<i ] for i ∈ J1..mK, – P ' P (0) over A[(ck )k∈J1..mK ][X]. J The proof of Proposition 2.12, or of its more precise variant 2.16, is in fact a proof of item 1 above. Item 2 is easily deduced.  2.18. Theorem. (Traverso-Swan-Coquand) If A is a seminormal ring, then Pic A = Pic A[X]. J We deduce it from the previous proposition by using the fact that there exists an overring K of A such that Pic K = Pic K[X]. Indeed, every reduced ring is contained in a reduced zero-dimensional ring (Theorem XI -4.25 or XIII -7.8) K, which satisfies Pic K = Pic K[X] = {1} (Proposition 2.10). A direct computation leading to the result As is often the case when trying to implement on a machine a constructive theorem that has an elegant proof, we are led to finding certain shortcuts in the computations that give a definitively simpler solution. But this solution partially hides at least the thought process that developed the proof, if not the deep mechanism of the initial proof. See for example how Exercise X -3 trivializes the proof of the local structure theorem for finitely generated projective modules. This is what happened with Proposition 2.17 which was finally realized by a quite elementary algorithm in [7, Barhoumi&Lombardi], based on the theory of the resultant ideal (see Section IV -10) and of the subresultant modules. 908 XVI. Extended projective modules 3. Patching à la Quillen-Vaserstein In this section we present the so called Quillen patching. It is a deep result that could a priori seem a little too abstract (abusive usage of maximal ideals) but which happens to make a lot of constructive sense. The proofs that we give are (for the most part) copied from [Kunz]. We have replaced the localization at any maximal ideal with the localization at comaximal monoids. 3.1. Lemma. Let S be a monoid of the ring A and P ∈ A[X] be a polynomial such that P =AS [X] 0 and P (0) = 0. Then, there exists an s ∈ S such that P (sX) = 0. J The proof is left to the reader.  Here is a slight variant. 3.2. Fact. Let S be a monoid of the ring A and P ∈ AS [X] be a polynomial such that P (0) = 0. Then, there exist s ∈ S and Q ∈ A[X] such that P (sX) =AS [X] Q. 3.3. Lemma. Let S be a monoid of the ring A. Consider three matrices with coefficients in A[X], A1 , A2 , A3 such that the product A1 A2 has the same format as A3 . If A1 A2 =AS [X] A3 and A1 (0) A2 (0) = A3 (0), there exists an s ∈ S such that A1 (sX) A2 (sX) = A3 (sX). J Apply Lemma 3.1 to the coefficients of the matrix A1 A2 − A3 .  3.4. Lemma. Let S be a monoid of the ring A and C(X) ∈ GLp (AS [X]). There exist s ∈ S and U (X, Y ) ∈ GLp (A[X, Y ]) such that U (X, 0) = Ip , and, over the ring AS [X, Y ], U (X, Y ) = C(X + sY )C(X)−1 . J Let E(X, Y ) = C(X + Y )C(X)−1 . Let F (X, Y ) = E(X, Y )−1 . We have E(X, 0) = Ip , so E(X, Y ) = Ip + E1 (X)Y + · · · + Ek (X)Y k . For some s1 ∈ S, the s1 j Ej ’s can be rewritten “without denominator.” We thus obtain a matrix E 0 (X, Y ) ∈ Mp (A[X, Y ]) such that E 0 (X, 0) = Ip and, over AS [X, Y ], E 0 (X, Y ) = E(X, s1 Y ). We proceed similarly with F (and we can choose some common s1 ). We then have E 0 (X, Y )F 0 (X, Y ) = Ip in Mp (AS [X, Y ]) and E 0 (X, 0)F 0 (X, 0) = Ip . By applying Lemma 3.3 in which we replace X with Y and A with A[X], we obtain s2 ∈ S such that E 0 (X, s2 Y )F 0 (X, s2 Y ) = Ip . Hence the desired result with U = E 0 (X, s2 Y ) and s = s1 s2 .  §3. Patching à la Quillen-Vaserstein 909 q×m 3.5. Lemma. Let S be a monoid of A and G ∈ A[X] . If G(X) and G(0) are equivalent over AS [X], there exists an s ∈ S such that G(X + sY ) and G(X) are equivalent over A[X, Y ]. J Let G = C G(0) D with C ∈ GLq (AS [X]) and D ∈ GLm (AS [X]). We therefore have G(X + Y ) = C(X + Y )G(0)D(X + Y ) = C(X + Y )C(X)−1 G(X)D(X)−1 D(X + Y ). By applying Lemma 3.4, we obtain s1 ∈ S, U (X, Y ) ∈ GLq (A[X, Y ]) and V (X, Y ) ∈ GLm (A[X, Y ]), such that U (X, 0) = Iq , V (X, 0) = Im , and, over the ring AS [X, Y ], U (X, Y ) = C(X + s1 Y )C(X)−1 and V (X, Y ) = D(X)−1 D(X + s1 Y ). Therefore G(X) = U (X, 0)G(X)V (X, 0), and over the ring AS [X, Y ] : G(X + s1 Y ) = U (X, Y )G(X)V (X, Y ). By applying Lemma 3.3 (as in Lemma 3.4), we obtain s2 ∈ S such that G(X + s1 s2 Y ) = U (X, s2 Y )G(X)V (X, s2 Y ). Hence the result with s = s1 s2 .  3.6. Concrete local-global principle. (Vaserstein patching) Let G be a matrix over A[X] and S1 , . . ., Sn be comaximal monoids of A. 1. The matrices G(X) and G(0) are equivalent over A[X] if and only if they are equivalent over ASi [X] for each i. 2. Same result for “the left-equivalence”: two matrices M and N with the same format over a commutative ring are said to be left-equivalent if there exists an invertible square matrix H such that H M = N . J 1. One sees easily that the set of s ∈ A such that the matrix G(X +sY ) is equivalent to G(X) over A[X, Y ] forms an ideal of A. By applying Lemma 3.5, this ideal contains an element si in Si for each i, so it contains 1, and G(X + Y ) is equivalent to G(X). It remains to make X = 0. 2. In all the previous proofs, we can replace equivalence with left-equivalence.  3.7. Concrete local-global principle. (Quillen patching) Let M be a finitely presented module over A[X] and S1 , . . ., Sn be comaximal monoids of A. Then, M is a module extended from A if and only if each MSi is extended from ASi . J This is a corollary of the previous theorem because the isomorphism between the modules M (X) and M (0) can be expressed by the equivalence 910 XVI. Extended projective modules of two matrices H(X) and H(0) constructed from a presentation matrix G of M (see Fact 1.1).  Comment. The original formulation by Quillen, equivalent to the local-global principle 3.7 in classical mathematics, is the following: if Mm is extended from Am after localization at every maximal ideal m, then M is extended from A. To constructively decipher a classical proof based on the Quillen patching in the original formulation, we will have to call upon the basic local-global machinery explained in Section XV -5. A Roitman theorem This subsection is devoted to the proof of the following theorem, which consists in a kind of converse of the Quillen patching theorem. 3.8. Theorem. (Roitman’s theorem) Let r be an integer > 1 and A[X] = A[X1 , . . . , Xr ]. If every finitely generated projective A[X]-module is extended from A, then every localization AS of A satisfies the same property. The univariate case 3.9. Lemma. If every finitely generated projective A[X]-module is extended from A, then every localization AS of A satisfies the same property. J Special case: AS is a residually discrete local ring. Let ρ : A[X] → AS [X] be the natural morphism. Let M ∈ AGn (AS [X]). Since AS is local, M (0) is similar to a standard projector Ik,n . We can therefore suppose without loss of generality that M (0) = Ik,n , i.e. M (X) = Ik,n + M 0 (X) with M 0 (X) ∈ Mn (AS [X]) and M 0 (0) = 0. Let v be the “product of the denominators” in the coefficients of the entries of M 0 (X). Since M 0 (0) = 0, we have a matrix N 0 = N 0 (X) ∈ Mn (A[X]) such that M 0 (vX) =AS [X] N 0 (X)ρ and N 0 (0) = 0. With N (X) = Ik,n + N 0 (X) we obtain N (0) = Ik,n and M (vX) = N (X)ρ . Since M 2 =AS [X] M , we have some s ∈ S such that s(N 2 − N ) = 0. As (N 2 − N )(0) = 0, we write N 2 − N = XQ(X). Now sXQ(X) = 0 implies sQ(X) = 0. A fortiori sQ(sX) = 0, so N (sX)2 = N (sX). However, the finitely generated projective modules over A[X] are extended from A, therefore the projection matrix N (sX) has a kernel and an image isomorphic to the kernel and to the image of N (0) = Ik,n . Therefore §3. Patching à la Quillen-Vaserstein 911 N (sX) is similar to Ik,n : there exists a G = G(X) ∈ GLn (A[X]) such that G−1 (X)N (sX)G(X) = Ik,n . By letting H(X) = G(X)ρ ∈ GLn (AS [X]), we obtain over AS [X] the equality H −1 (X)M (svX)H(X) = Ik,n and therefore H −1 (X/sv)M (X)H(X/sv) =AS [X] Ik,n with H(X/sv) ∈ GLn (AS [X]). General case. Let P be an arbitrary finitely generated projective AS [X]module. Let B = AS . As usual, P (0) denotes the B-module obtained by scalar extension via the morphism ev0 : B[X] → B. We apply the basic local-global machinery (page 869) to the constructive proof that we have just given in the special case. We obtain comaximal monoids V1 , . . . , Vm of B with P 'BVi P (0). We conclude with the Quillen patching: P 'B P (0).  Remark. To implement the algorithm corresponding to this proof. Actually the only particular property that we have used in the proof of the special case, it is that the finitely generated projective AS -modules are free. Therefore the implementation of the basic local-global machinery here is very elementary. It consists in constructing comaximal localizations for which the matrix M (0) becomes similar to a standard projection matrix, and to get the algorithm given by the proof of the special case running in each of these localizations. Naturally, we end with the algorithm corresponding to the constructive proof of the Quillen patching. The multivariate case Proof of Roitman’s theorem 3.8. We reason by induction on r. The case r = 1 has already been treated. Let us pass from r > 1 to r + 1. Consider a monoid S of a ring A. Let (X1 , . . . , Xr ) = (X). We have AS [X, Y ] = A[X, Y ]S = (A[Y ]S )[X]. Let P be a finitely generated projective AS [X, Y ]-module. By the induction hypothesis applied with the ring A[Y ], P is extended from A[Y ]S = AS [Y ], that is, P (X, Y ) is isomorphic to P (0, Y ) as an AS [X, Y ]-module, and by the case r = 1 applied with the ring A, P (0, Y ) is extended from AS .  A long-open question solved negatively That question is the following. If every finitely generated projective A[X]-module is extended from A, is it always true that for any r every finitely generated projective A[X1 , . . . , Xr ]module is extended from A? A negative response is given in [50, Cortiñas & al., (2011)]. 912 XVI. Extended projective modules A local-global principle à la Roitman 3.10. Concrete local-global principle. Let n and r > 0. Consider the following property for a ring A. Pn,r (A) : every projective module of constant rank r over A[X1 , . . . , Xn ] is extended from A. Let S1 , . . . , Sk be comaximal monoids of a ring A. Then A satisfies the property Pn,r if and only if each of the ASi ’s satisfies it. In particular A is seminormal if and only if each of the ASi ’s is seminormal. J The condition is necessary by Roitman’s theorem 3.8, whose proof remains valid if we limit ourselves to the projective modules of constant rank r. The condition is sufficient by the Quillen patching 3.7.  4. Horrocks’ theorem The following lemma is a special case of Proposition V -9.1 4. 4.1. Lemma. Let S be a monoid of A and P , Q be finitely generated projective A-modules such that PS ' QS . Then, there exists an s ∈ S such that Ps ' Qs . 4.2. Notation. Let AhXi be the ring S −1 A[X], where S is the monoid of the monic polynomials of A[X]. 4.3. Theorem. (Local Horrocks’ theorem) Let A be a residually discrete local ring and P be a finitely generated projective module over A[X]. If PS is free over AhXi, then P is free over A[X] (so extended from A). We use the proof by [141, Nashier & Nichols] which is almost constructive, as presented in [Lam06] or [Ischebeck & Rao]. We need a few preliminary results. 4.4. Lemma. Let A be a ring, m = Rad A and S ⊆ A[X] be the monoid of the monic polynomials. The monoids S and 1 + m[X] are comaximal. J Let f (X) ∈ S and g(X) ∈ 1 + m[X]. The resultant ResX (f, g) belongs to the ideal hf, gi of A[X]. Since f is monic, the resultant is successfully subjected to the specialization A → A/m . Therefore ResX (f, g) ≡ ResX (f, 1) = 1 mod m.  4.5. Lemma. Let A ⊆ B, s ∈ Reg(B), and P , Q be two finitely generated projective B-modules with sQ ⊆ P ⊆ Q. If B and B/hsi are (not necessarily finitely generated) projective A-modules, then the same goes for the A-module Q/P . J Since s is regular and since Q and P are submodules of a free module, the multiplication by s (denoted µs ) is injective in P and in Q. We have §4. Horrocks’ theorem 913 the following exact sequences of A-modules. µs −−→ P −→ P/sQ → 0 0→ Q 0 → sQ/sP −−→ P/sP −→ P/sQ → 0 The A-module P is projective by transitivity, the B/sB-module P/sP is projective, therefore by transitivity P/sP is a projective A-module. We can then apply Schanuel’s lemma (Lemma V -2.7): (P/sP ) ⊕ Q ' (sQ/sP ) ⊕ P as A-modules. Since Q is a projective A-module, the same goes for sQ/sP . But since µs is injective, sQ/sP is isomorphic to P/Q.  4.6. Lemma. (Murthy & Pedrini, [140]) Let A be a ring, B = A[X], S be the monoid of the monic polynomials of A[X], P , Q be two finitely generated projective modules over B, and f ∈ S. 1. If f Q ⊆ P ⊆ Q, then P and Q are stably isomorphic. 2. If PS ' QS , then P and Q are stably isomorphic. 3. If in addition P and Q are of rank 1, then P ' Q. J 1. Since f is monic, the A-algebra B/hf i is a free A-module of rank deg f . The B/hf i-module Q/f Q is finitely generated projective over A. By the previous lemma, the A-module M = Q/P is projective, and it is finitely generated over B/hf i, so over A. Therefore M [X] is a finitely generated projective B-module. We have two exact sequences (µX is multiplication by X) 0 → P −−→ Q −→ M → 0, µX 0 → M [X] −−→ M [X] −→ M → 0. By Schanuel’s lemma (Lemma V -2.7) we have P ⊕ M [X] ' Q ⊕ M [X] as B-modules. Since M [X] is finitely generated projective over B, P and Q are stably isomorphic. 2. We know that Pf ' Qf for some f ∈ S. By hypothesis, we have F ∈ AGn (B) and G ∈ AGn (B) with P ' Im F , and Q ' Im G. We know that F 0 = Diag(F, 0m ) and G0 = Diag(G, 0n ) are conjugated over Bf (enlargement lemma V -2.10). This means that there exists a matrix H ∈ Mm+n (B) such that HF 0 = G0 H and det(H) = δ divides a power of f . We then have P1 = Im(HF 0 ) ⊆ Im G0 . Then, by e (HF 0 )H e = δG0 , which implies δ Im G0 ⊆ Im(HF 0 ). postmultiplying by H, Since H is injective, we have P1 ' P , and moreover Im G0 = Q1 ' Q. We can conclude with item 1 since δQ1 ⊆ P1 ⊆ Q1 . 3. The modules P and Q are of rank 1 and stably isomorphic, therefore isomorphic (Fact X -5.6).  Proof of Theorem 4.3. Notations: m = Rad A, k = A/m (discrete field) B = A[X], n = rk(P ) 914 XVI. Extended projective modules (n ∈ N since B is connected), U = 1 + m[X], and E be the object E reduced modulo m. 1. We show by induction on n that we have an isomorphism P ' P1 ⊕ Bn−1 . For n = 1 it is trivial. Little lemma (see the proof below) There exist z, y2 , . . . , yn , z2 , . . . , zn in P such that (z, y2 , . . . , yn ) is a basis of PS over BS and (z, z2 , . . . , zn ) is a basis of P over B = k[X]. The BU -module PU is free with basis (z, z2 , . . . , zn ): indeed, m ⊆ Rad BU , and modulo m, (z, z2 , . . . , zn ) generates P = PU , so (z, z2 , . . . , zn ) generates PU by Nakayama’s lemma. Finally, a finitely generated projective module of rank n generated by n elements is free. Let P 0 = P/Bz. The two modules PU0 and PS0 are free. The monoids U and S are comaximal (Lemma 4.4), so P 0 is finitely generated projective over B, hence P ' P 0 ⊕ Bz. By induction hypothesis, P 0 ' P1 ⊕ Bn−2 , which gives P ' P1 ⊕ Bn−1 2. The isomorphism P ' P1 ⊕ Bn−1 with P1 of rank 1 gives by localization that (P1 )S is stably free. We apply item 3 of Lemma 4.6: we obtain that P1 is free.  Proof of the little lemma. Let (y1 , . . . , yn ) in P which is a BS -basis of PS . There exists a basis (z1 , z2 , . . . , zn ) of P , with the zi ’s in P such that y1 ∈ k[X] z2 (by dividing y1 by the gcd of its coefficients, we obtain a unimodular vector, and over a Bézout ring, every unimodular vector is completable). We look for z in the form z1 + X r y1 . It is clear that, for any r, (z, z2 , . . . , zn ) is a basis of P . Since (y1 , . . . , yn ) is a BS -basis of PS , Pn there exists an s ∈ S such that sz1 = i=1 bi yi , with the bi ’s in B. P n Then, sz = (b1 + sX r )y1 + i=2 bi yi , and for large enough r, b1 + sX r is a monic polynomial: (z, y2 , . . . , yn ) is a BS -basis of PS .  We now give the global version. 4.7. Theorem. (Affine Horrocks’ theorem) Let S be the monoid of the monic polynomials of A[X] and P be a finitely generated projective module over A[X]. If PS is extended from A, then P is extended from A. J We apply the basic local-global machinery (page 869) with the constructive proof of Theorem 4.3. We obtain a finite family of comaximal monoids of A, (Ui )i∈J , with each localized module PUi extended from AUi . We conclude with the Quillen patching (concrete local-global principle 3.7).  This important theorem can be completed by the following subtle result, which does not seem possible to extend to the finitely presented modules. §4. Horrocks’ theorem 915 4.8. Theorem. (Bass) Let P and Q be two finitely generated projective A-modules. If they are isomorphic after scalar extension to AhXi, they are isomorphic. J We reason with projection matrices and similarities between these matri- ces that correspond to isomorphisms between the image modules. Therefore implicitly, we systematically use the enlargement lemma V -2.10, without mentioning it. We start with F and G in AGn (A), conjugated over the ring AhXi. The finitely generated projective modules are P ' Im F and Q ' Im G. We therefore have a matrix H ∈ Mn (A[X]), with det(H) ∈ S (monoid of the monic polynomials), and HF = GH. By letting Y = 1/X, for large enough N , the matrix Y N H = H 0 is in Mn (A[Y ]), with det(H 0 ) = Y r 1 + Y g(Y ) = Y r h(Y ) where h(0) = 1, and obviously H 0 F = GH 0 . In other words, F ∼ G over the ring A[Y ]Y h . The elements Y and h are comaximal, so, by applying the patching theorem of the modules (concrete local-global principle XV -4.4), there exists some A[Y ]-module M such that MY is isomorphic to “P extended to A[Y ]Y ,” and Mh is isomorphic to “Q extended to A[Y ]h .” And M is finitely generated projective since there are two comaximal localizations which are finitely generated projective modules. This provides a projection matrix E with coefficients in A[Y ] such that E ∼ F over A[Y ]Y and E ∼ G over A[Y ]h . Since Y is a monic polynomial, Horrocks’ theorem tells us that Im E comes by scalar extension from a finitely generated projective A-module M 0 . Consequently, for all a, b ∈ A the “evaluated” matrices E(a) and E(b) are conjugated over A (their images are both isomorphic to M 0 ). Finally, F ∼ E(1) and G ∼ E(0) over A, therefore F ∼ G over A.  Remark. For the mathematician who wishes to implement the algorithm subjacent to the previous proof, we suggest suggest using presentation matrices (whose cokernels are the modules) rather than projection matrices (whose images are the modules). This in particular avoids having to repetitively use an implementation of the enlargement lemma. We finish this section with a corollary of Lemma 4.6. This theorem is to be compared with Theorem 5.4. 4.9. Theorem. (Concrete Quillen induction, stably free case) Let F be a class of rings that satisfy the following properties. 1. If A ∈ F, then AhXi ∈ F. 2. If A ∈ F, every projective A-module of constant rank is stably free. Then, for A ∈ F and r ∈ N, every projective A[X1 , . . . , Xr ]-module of constant rank is stably free. 916 XVI. Extended projective modules J We proceed by induction on r, the case r = 0 being clear. We pass from r − 1 to r (r > 1). Let A be a ring in the class F, and P be a projective module of constant rank over A[X1 , . . . , Xr ]. Let B = A[(Xi )i<r ], C = A[Xr ], and V be the monoid of the monic polynomials of A[Xr ]. Thus A[X1 , . . . , Xr ] ' B[Xr ] ' C[(Xi )i<r ]. The ring AhXr i = V −1 C is in the class F. The AhXr i[(Xi )i<r ]-module PV , which is projective of constant rank, is stably free by induction hypothesis. If S is the monoid of the monic polynomials of B[Xr ], we have V ⊆ S, and so PS is stably free over the ring S −1 B[Xr ]. By item 2 of Lemma 4.6, P is stably free.  4.10. Corollary. If K is a discrete field, every finitely generated projective module over K[X1 , . . . , Xr ] is stably free. J We apply the previous result with the class F of the discrete fields: if K is a discrete field, then KhXi = K(X) is also a discrete field.  5. Solution to Serre’s problem In this section we present several constructive solutions to Serre’s problem, in which K is a discrete field. The finitely generated projective modules over K[X1 , . . . , Xr ] are free À la Quillen The solution by Quillen of Serre’s problem is based on the Local Horrocks’ theorem and on the following Quillen induction (see [Lam06]). 5.1. Abstract Quillen induction. Let F be a class of rings that satisfies the following properties. (Q1) If A ∈ F, then AhXi ∈ F. (Q2) If A ∈ F, then Am ∈ F for every maximal ideal m of A. (Q3) If A ∈ F is local, every finitely generated projective A[X]-module is extended from A (i.e. free). Then, for all A ∈ F and all r > 1, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. Actually, the properties (Q1), (Q2) and (Q3) are first used by Quillen to obtain the case r = 1, by using the Local Horrocks’ theorem and the Quillen patching. The “proof by induction” part is based over the case r = 1, over (Q1) and over Horrocks’ theorem (local or affine). §5. Solution to Serre’s problem 917 In what follows we isolate this proof by induction, which we qualify as a “concrete” Quillen induction. We replace (Q3) with a stronger version (q3) which is case r = 1. In a posterior comment, we explain how we can actually somehow replace (q3) with (Q3) without losing the constructive character of the proof. The proof by induction itself 5.2. Theorem. (Concrete Quillen induction) Let F be a class of rings that satisfy the following properties. (q1) If A ∈ F, then AhXi ∈ F. (q3) If A ∈ F, every finitely generated projective A[X]-module is extended from A. Then, for all A ∈ F and all r > 1, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. J Let us pass from r > 1 to r + 1. Consider a finitely generated projective A[X1 , . . . , Xr , Y ]-module P = P (X1 , . . . , Xr , Y ) = P (X, Y ). Let – P (X, 0) be the A[X]-module obtained by the homomorphism Y 7→ 0, – P (0, Y ) be the A[Y ]-module obtained by the homomorphism X 7→ 0, – P (0, 0) be the A-module obtained by the homomorphism X, Y 7→ 0, 0. We must show that P (X, Y ) ' P (0, 0) over A[X, Y ]. We call S the monoid of the monic polynomials of A[Y ], that is contained in the monoid S 0 of the monic polynomials of A[X][Y ]. We then have 1. P (X, Y ) ' P (0, Y ) over AhY i[X] = A[X, Y ]S by induction hypothesis since AhY i ∈ F, 2. a fortiori P (X, Y ) ' P (0, Y ) over A[X]hY i = A[X, Y ]S 0 , 3. P (0, Y ) ' P (0, 0) over A[Y ] by the case r = 1, 4. P (0, 0) ' P (X, 0) over A[X] by induction hypothesis, 5. by combining 2, 3 and 4, we have P (X, Y ) ' P (X, 0) over A[X]hY i, 6. so, by the Affine Horrocks’ theorem, P (X, Y ) ' P (X, 0) over A[X, Y ], 7. we combine this last isomorphism with the isomorphism between P (X, 0) and P (0, 0) over the ring A[X] obtained by induction hypothesis.  918 XVI. Extended projective modules 5.3. Corollary. (Quillen-Suslin theorem, Quillen’s proof ) If K is a discrete field (resp. a zero-dimensional ring), every finitely generated projective module over K[X1 , . . . , Xr ] is free (resp. quasi-free). J The concrete Quillen induction applies with the class F of discrete fields: note that K[X] is a Bézout domain, therefore the finitely generated projective modules over K[X] are free, and a fortiori extended. We pass to the reduced zero-dimensional rings by the elementary local-global machinery no. 2. Finally, for the zero-dimensional rings, we use the equality GK0 (A) = GK0 (Ared ).  Remarks. 1) Recall that a zero-dimensional ring is connected if and only if it is local. If K is such a ring, every finitely generated projective module over K[X1 , . . . , Xr ] is free. 2) The concrete Quillen induction applies to the Bézout domain of Krull dimension 6 1 (see Exercise 5) and more generally to the Prüfer rings of dimension 6 1 (see Theorem 6.11). This generalizes the case of the Dedekind domains obtained by Quillen. For the case of regular Noetherian rings of Krull dimension 6 2 (which we do not treat in this book), see [Lam06]. (Q3) versus (q3) The abstract Quillen induction (which does not provide any constructive results) presents the advantage of using a hypothesis (Q3) weaker than the hypothesis (q3) used in the concrete induction. We now explain how we can constructively recoup the situation, even for the hypothesis (Q3). The free case. In the case where the class F is such that the finitely generated projective modules are free, we observe that the hypothesis (q3) is actually useless. Indeed, let P be a finitely generated projective A[X]-module and S be the monoid of the monic polynomials of A[X]. Then, by (q1) the AhXi-module PS is free, so extended from A. But then, by the Affine Horrocks’ theorem, the module P is extended from A. In other words we have proved the following particularly simple version, for the free case. 5.4. Theorem. (Concrete Quillen induction, free case) Let F be a class of rings that satisfies the following properties. (q0) If A ∈ F, every finitely generated projective A-module is free. (q1) If A ∈ F, then AhXi ∈ F. Then, for all A ∈ F and all r > 1, every finitely generated projective module over A[X1 , . . . , Xr ] is free. §5. Solution to Serre’s problem 919 The general case. We would have noticed that the property (Q2) does not intervene in the concrete Quillen induction: this hypothesis is rendered useless by the hypothesis (q3). The property (Q2) however intervenes when we want to replace (q3) with (Q3), which is a hypothesis a priori weaker than (q3). We think that this weakening of the hypothesis is always possible in practice, without losing the constructive character of the result. However, this is based on the basic local-global machinery (local-global machinery with prime ideals), and as the latter is a proof method and not strictly speaking a theorem, we were not able to formulate our concrete induction directly with (Q3), because we wanted a theorem in due form. Let us move on to the explanation of the replacement of the strong hypothesis (q3) with the weak hypothesis (Q3). We re-express the hypothesis (Q2) in the following more general form. (q2) If A ∈ F and S is a monoid of A, then AS ∈ F. We suppose that (Q3) is satisfied in the following form: under the hypothesis that A is a residually discrete local ring in the class F we have a constructive proof of the fact that every finitely generated projective module P over A[X] is extended, which is translated into a computation algorithm (for the isomorphism between P and P (0)) based on the properties of the class F and on the disjunction a ∈ A× or a ∈ Rad(A) for the elements a that occur during the algorithm. Under these conditions the basic local-global machinery applies. Consequently for a finitely generated projective module P over A[X] for an arbitrary ring A ∈ F, the proof given in the local residually discrete case, followed step by step, provides us with comaximal monoids S1 , . . . , S` such that for each of them, the module PSi (over ASi [X]) is extended from ASi . Note that for this method to work, the considered class of rings must satisfy (q2), and that we can limit ourselves to the localizations at monoids S(a1 , . . . , an ; b). It then only remains to apply the Quillen patching (concrete local-global principle 3.7) to obtain the desired result: the module P is extended from A. À la Suslin, Vaserstein or Rao The solution by Suslin to Serre’s conjecture consists in showing that every stably free module over K[X1 , . . . , Xr ] is free (Serre had already proven that every finitely generated projective module over K[X1 , . . . , Xr ] is stably free), in other words that the kernel of every surjective matrix is free, or that every unimodular vector is the first column of an invertible matrix (see Fact V -4.1 and Proposition V -4.6). 920 XVI. Extended projective modules G If G is a subgroup of GLn (A) and A, B ∈ An×1 , we will write A ∼ B to say that there exists a matrix H ∈ G such that HA = B. It is clear that this is an equivalence relation. Recall that a unimodular vector f ∈ An×1 is said to be completable if it is the first column vector of a matrix G ∈ GLn (A). This amounts to saying that we have GLn (A) t f ∼ [ 1 0 · · · 0 ]. The goal in this subsection is therefore to obtain a constructive proof of the following theorem. 5.5. Theorem. (Suslin) Every unimodular vector f with coordinates in K[X1 , . . . , Xr ] = K[X] (where K is a discrete field) is completable. We will give three distinct proofs, in chronological order. First proof Here we follow very closely Suslin’s original proof. We only have to get rid of a nonconstructive usage of a generic maximal ideal, and have already done this work when we gave a constructive proof of Suslin’s lemma (Lemma XV -6.1) in Chapter XV. f and 5.6. Fact. Let M , N ∈ M2 (A). We have Tr(M ) I2 = M + M f N ) + det(N ). det(M + N ) = det(M ) + Tr(M f is linear, so J For the matrices in M2 (A), the map M 7→ M e +N e )(M + N ) = M e M + (M eN + N eM ) + N eN det(M + N ) I2 = (M  e = det(M ) + Tr(M N ) + det(N ) I2 .  5.7. Lemma. Let B ∈ M2 (A), H = H(X) ∈ M2 (A[X]), B be an Aalgebra and x ∈ B. Let C(X) = B + XH. Suppose det C = det B = a. By e e = C(ax). e letting S = I2 + xH(ax) B, we then have S ∈ SL2 (A) and S B J Fact 5.6 gives det(C) = det(B) + X (Tr(He B) + X det H), and therefore e B) + X det H = 0. E(X) = Tr(H Let H1 = H(ax) and C1 = C(ax). e=B e + xH f1 B B e=B e + axH f1 = C f1 and We have then S B f1 B) + det(xH f1 B) det(S) = 1 + x Tr(H 2 f1 B) + x a det(H1 ) = 1 + xE(ax) = 1. = 1 + x Tr(H  §5. Solution to Serre’s problem 921 5.8. Lemma. (Suslin’s lemma) Let u, v ∈ A[X], a ∈ A ∩ hu, vi, B be an A-algebra and b, b0 ∈ B.     u(b) SL2 (B) u(b0 ) If b ≡ b0 mod aB, then ∼ . v(b) v(b0 ) J Let p, q ∈ A[X] such that up + vq = a and x ∈ B such that b0 = b + ax.   p q ∈ M2 (A[X]). We apply Lemma 5.7 −v u with the matrices B = M (b) and C(X) = M (b + X).   u(b) e Note that the first  column of B is v(b) and that the first column of 0 u(b ) e C(ax) is .  v(b0 ) Consider the matrix M = n×1 5.9. Lemma. Let f ∈ A[X] , B be an A-algebra and G be a subgroup of GLn (B), then the set   G a = a ∈ A ∀b, b0 ∈ B, (b ≡ b0 mod aB) ⇒ f (b) ∼ f (b0 ) is an ideal of A. J The proof is left to the reader.  n×1 with f1 5.10. Theorem. Let n > 2, f be a unimodular vector of A[X] monic, B be an A-algebra, and G ⊆ GLn (B) be the subgroup generated by G En (B) and SL2 (B).1 Then, for all b, b0 ∈ B, we have f (b) ∼ f (b0 ). J It suffices to show that the ideal a defined in Lemma 5.9 contains 1. For an elementary matrix E = E(X) ∈ En−1 (A[X]), we consider the vector     g2 f2  ..   .   .  = E  ..  . gn fn We will show that the resultant a = ResX (f1 , g2 ), which is well-defined since f1 is monic, is an element of a. We will therefore finish by invoking Suslin’s lemma XV -6.1. Let us therefore show that a ∈ a. We just use the fact that a ∈ hf1 , g2 i ∩ A. G We take b, b0 ∈ B with b ≡ b0 mod aB. We want to reach f (b) ∼ f (b0 ). Note that for i > 2 we have gi (b0 ) − gi (b) ∈ hb0 − bi ⊆ hai ⊆ hf1 (b), g2 (b)i , i.e. gi (b0 ) ∈ gi (b) + hf1 (b), g2 (b)i . 1 SL (B) 2 is embedded in GLn (B) by the injection A 7→ Diag(A, In−2 . (1) 922 XVI. Extended projective modules We then have a sequence of equivalences           f1 (b0 ) f1 (b0 ) f1 (b) f1 (b) f1 (b)  f2 (b0 )   g2 (b0 )   g2 (b)   g2 (b)   f2 (b)             f3 (b)  E(b)  g3 (b)  En (B)  g3 (b0 )  SL2 (B)  g3 (b0 )  E(b0 )−1  f3 (b0 )  .  ∼   ∼   ∼   ∼    ..   ..   ..   ..   ..   .   .   .   .   .  fn (b) gn (b) gn (b0 ) fn (b0 ) gn (b0 ) The second is given by Equation (1), the third by Lemma 5.8 applied to u = f1 and v = g2 .  n×1 5.11. Corollary. Let n > 2, f be a unimodular vector of A[X] with f1 monic and G be the subgroup of GLn (A[X]) generated by En (A[X]) and G SL2 (A[X]). Then f ∼ f (0). J In Theorem 5.10, we take B = A[X], b = X and b0 = 0.  5.12. Corollary. Let K be a discrete field, n > 2, f be a unimodular vector n×1 of K[X] , where K[X] = K[X1 , . . . , Xr ], and G ⊆ GLn (K[X]) be the G subgroup generated by En (K[X]) and SL2 (K[X]). Then f ∼ t[ 1 0 · · · 0 ]. J If f1 = 0, we easily transform the vector f into t[ 1 0 · · · 0 ] by elementary operations. Otherwise, a change of variables allows us to transform f1 into a pseudomonic polynomial in Xr (Lemma VII -1.4). We can therefore assume that f1 is monic in Xr , we apply Corollary 5.11 with the ring A = G K[X1 , . . . , Xr−1 ], and we obtain f ∼ f (X1 , . . . , Xr−1 , 0). We conclude by induction on r.  We have indeed obtained Theorem 5.5, actually with an interesting precision over the group G. Second proof We now closely follow a proof by Vaserstein [188] such as it is presented in [Lam06] but by using constructive arguments. More generally we are interested in the possibility of finding in the equivalence class of a vector defined over A[X] a vector defined over A, in a suitable sense. We will use the following lemma. 5.13. Lemma. Let A be a ring and f (X) = t[ f1 (X) · · · fn (X) ] be a n×1 unimodular vector in A[X] , with f1 monic of degree > 1. Then, the ideal a = c(f2 ) + · · · + c(fn ) contains 1. J We have 1 = u1 f1 in A/a . This equality in the ring (A/a )[X], with f1 monic of degree > 1 implies that A/a is trivial (by induction on the formal degree of u1 ).  §5. Solution to Serre’s problem 923 5.14. Theorem. (Little Horrocks’ local theorem) Let n > 3 be an integer, A be a residually discrete local ring and f (X) = n×1 t [ f1 (X) · · · fn (X) ] be a unimodular vector in A[X] , with f1 monic. Then       f1 f1 (0) 1  ..   ..    .  En (A[X])    0  En (A)    . . f (X) =  ∼ ∼   ..  .    .  .   ..   ..  0 fn fn (0) J Let d be the degree of f1 . By elementary row operations, we bring the polynomials f2 , . . . , fn to being of degrees < d. Let fi,j be the coefficient of X j in fi . The vector t[ f1 (X) · · · fn (X) ] remains unimodular. If d = 0, we are done. Otherwise given Lemma 5.13 and since the ring is local, one of the fi,j ’s for i ∈ J2..nK is a unit. Suppose for example that f2,k is invertible. We will see that we can find two polynomials v1 and v2 such that the polynomial g2 = v1 f1 + v2 f2 is monic of degre d − 1. If k = d − 1, this works with v1 = 0 and v2 constant. If k < d − 1, consider the following disjunction f2,d−1 ∈ A× or f2,d−1 ∈ Rad(A). In the first case, we are reduced to k = d − 1. In the second case the polynomial q2 = Xf2 − f2,d−1 f1 is of degree 6 d − 1 and satisfies: q2,k+1 is a unit. We have gained some ground: it now suffices to iterate the process. Now we therefore have g2 = v1 f1 + v2 f2 of degree d − 1 and monic. So we can divide f3 by g2 and we obtain g3 = f3 − g2 q of degree < d − 1 (q ∈ A), so the polynomial h1 = g2 + g3 = f3 + g2 (1 − q) = f3 + (1 − q)v1 f1 + (1 − q)v2 f2 is monic of degree d − 1. Thus, by an elementary row operation we were able to replace t[ f1 f2 f3 ] with t[ f1 f2 h1 ], with h1 monic of degree d − 1. We can therefore by a sequence of elementary row operations bring the vector t[ f1 (X) . . . fn (X) ], with f1 monic of degree d, to t [ h1 (X) . . . hn (X) ] with h1 monic of degree d − 1. We obtain the desired result by induction on d.  Terminology. We consider a system of formal polynomials (fi ) with deg fi = di . We then call the “head ideal of the system (fi )” the ideal of the formally leading coefficients of the fi ’s. 924 XVI. Extended projective modules 5.15. Theorem. (Little Horrocks’ global theorem) n×1 Let n > 2 be an integer, A be a ring and f ∈ A[X] be a unimodular vector. Suppose that the head ideal of the fi ’s contains 1. Then     f1 f1 (0)   GLn (A[X])   .. f (X) =  ...  ∼   = f (0). . fn fn (0) J The case n = 2 is an exception: if u1 f1 + u2 f2 = 1, the equality  u1 −f2 u2 f1  f1 f2   = 1 0  gives the required matrix, in SL2 (A[X]). For n > 3, we apply the basic local-global machinery (page 869) with the constructive proof of Theorem 5.14. We obtain a finite family of comaximal En (AS [X]) monoids, (Si )i∈J in A, such that for each i we have f (X) ∼i f (0). We conclude with the Vaserstein patching for the equivalences of matrices on the left-hand side (item 2 of the local-global principle 3.6).  Conclusion. We have just obtained a (slightly weaker) variant of Corollary 5.11, and this gives the proof of Suslin’s theorem 5.5 in the same way as in the first solution. Comment. The little Horrocks’ global theorem can also be obtained as a consequence of the “grand” Horrocks’ global theorem 4.7. Let P = Ker tf (X). By localizing at f1 , P becomes free. The Affine Horrocks’ theorem tells us that P is free, which means that f (X) ∼ t[ 1 0 · · · 0 ] over GLn (A[X]). Third proof We now closely follow a proof by Rao. This time we will not need any induction on the number of variables to reach Suslin’s theorem. 5.16. Lemma. We consider a vector x = (x1 , . . . , xn ) ∈ An and s ∈ A. If x is unimodular over A/hsi and over A[1/s], it is unimodular. J Let a = hx1 , . . . , xn i. We have sr ∈ a (for a certain r) and 1 − as ∈ a (for a certain a). We write 1 = ar sr + (1 − as)(1 + as + · · ·) ∈ a.  5.17. Lemma. Let n > 2 be an integer, A be a ring, and f be a n×1 unimodular vector in A[X] : f = t[ f1 (X) · · · fn (X) ]. For each fi of ? formal degree di , let fi be the formal reciprocal polynomial X di fi (1/X). Let f ? (X) = t[ f1? (X), · · · fn? (X) ]. If f ? (0) is unimodular, the same goes for f ? . §6. Projective modules extended from arithmetic rings 925 J By Lemma 5.16, it suffices to prove that f ? (0) is unimodular (it is true by hypothesis) and that f ? is unimodular over A[X, 1/X], which comes P P from the equality i ui (1/X)X −di fi? = 1 (where i ui fi = 1 in A[X]).  5.18. Theorem. (Rao’s theorem, [153]) Let n > 2 be an integer, A be a ring, and f = t[ f1 (X) · · · fn (X) ] be a n×1 unimodular vector in A[X] , with 1 in the head ideal of the fi ’s. Then f GLn (A[X]) ∼ f (0) GLn (A) ∼ f ? (0) GLn (A[X]) If in addition one of the fi ’s is monic, we have f ∼ f ?. GLn (A[X]) t ∼ [ 1 0 · · · 0 ]. J Since f ∼ f (0) by the little Horrocks’ global theorem, we deduce that f ∼ f (1). In addition, f ? (0) is unimodular therefore f ? is unimodular (by Lemma 5.17). Moreover, 1 is in the head ideal of the fi? ’s, which allows us to apply to f ? the little Horrocks’ global theorem. We conclude: f ∼ f (0) ∼ f (1) = f ? (1) ∼ f ? .  Comment. The same result is valid by replacing GLn by En , but the proof is strictly more delicate (see Theorem XVII -4.7). Conclusion. We then obtain Suslin’s theorem 5.5 (page 920) as follows. We take for A the ring K[X1 , . . . , Xr−1 ] and we make a change of variables that renders pseudomonic one of the polynomials. Thus, • on the one hand, the solution is much more “efficient” than in the first two proofs since there is no longer an induction on the number of variables, • and on the other hand, the theorem is much more general. 6. Projective modules extended from valuation or arithmetic rings Recall that a valuation ring is a reduced ring in which we have, for all a, b, a divides b or b divides a. It is a normal, local ring without zerodivisors. We begin with a useful result regarding valuation rings and the Krull dimension (we can also refer back to Exercise XII -3). 6.1. Lemma. If A is a valuation ring, then so is A(X). If A is a valuation ring of finite Krull dimension, then A(X) has the same Krull dimension. J If A is a valuation ring, every f ∈ A[X] is expressible in the form f = ag with a ∈ A and g ∈ A[X] which admits a coefficient equal to 1. In 926 XVI. Extended projective modules particular, g is invertible in A(X). If F1 = a1 g1 /u1 and F2 = a2 g2 /u2 are two arbitrary elements of A(X) (with ai ∈ A and gi , ui primitive in A[X]), then F1 divides F2 in A(X) if and only if a1 divides a2 in A. Therefore “the divisibility is identical in A and A(X)” and A(X) is a valuation ring. In addition, since the finitely generated ideals are principal, the canonical homomorphism Zar A → Zar A(X) is an isomorphism of distributive lattices (note: these are totally ordered sets), which implies that the Krull dimension is the same.  The univariate case This subsection is devoted in the most part to a constructive proof of the following Bass’ theorem. 6.2. Theorem. If V is a valuation ring of finite Krull dimension, every finitely generated projective V[X]-module is free. We will actually prove slightly stronger variants: we can get rid off the hypothesis on the Krull dimension, and we have a version for arithmetic rings. We start with a simple example. A simple example 6.3. Proposition. Every finitely generated projective module over Z[X] is free. J Let M be a finitely generated projective Z[X]-module. First of all note that if M is of rank 1, it is free because Z[X] is a GCD-domain (Lemma 2.9). Now suppose that M is of rank r > 1. If we extend the scalars to Q[X], the module becomes free. Therefore there exists an integer d > 0 such that M becomes free over Z[1/d][X]. If d = 1, nothing needs to be done. Otherwise, let p1 , . . . , pk be the prime factors of d. The monoids dN , 1 + p1 Z, . . . , 1 + pk Z are comaximal (see the fundamental example on page 22). It therefore suffices to show that the modules M1+pi Z are free (therefore extended), because then the Quillen patching implies that M is extended from Z, therefore free. Let p be any of the pi ’s. Since Z1+pZ [X] is 2-stable (lemma below), by applying Serre’s Splitting Off theorem (Theorem XIV -3.4), we obtain an isomorphism M1+pZ ' Z1+pZ [X]r−1 ⊕ N , with N being a projective Z1+pZ [X]-module of constant rank 1. By the initial remark (which applies by replacing Z by Z1+pZ ), N is free, so M is free.  §6. Projective modules extended from arithmetic rings 927 6.4. Lemma. The ring Z1+pZ [X] is 2-stable. J Consider the partition of Spec(Z1+pZ [X]) attached to {p}: more precisely, the ring Z1+pZ [X] is replaced by the two rings Z1+pZ [X][1/p] ' Q[X] and (Z1+pZ [X])/hpi ' Fp [X], which are of Krull dimension 1. Theorem XIV -4.16 then tells us that Z1+pZ [X] is 2-stable.  Remark. Actually the use of prime factors of d, although intuitively natural, introduce an unnecessary complication. Indeed, the monoids dN and 1 + dZ being comaximal, it suffices to prove that M1+dZ is free. As Z1+dZ [X] is a GCD-domain, the previous reasoning applies if we know how to show that Z1+dZ [X] is 2-stable. The proof of Lemma 6.4 works by replacing p by d, because Z1+dZ [X][1/d] ' Q[X] and Z1+dZ [X]/hdi ' (Z/hdi)[X], which are of Krull dimension 1 (Z/hdi is zero-dimensional). A more elaborate example Given the previous remark we leave the proof of the following generalization to the reader. 6.5. Proposition. Let A be an integral ring of Krull dimension 6 1, d be an element of Reg(A), and M be a finitely generated projective A[X]module. 1. A1+dA [1/d] = Frac A is zero-dimensional. 2. A1+dA /hdi ' A/hdi is zero-dimensional. 3. A1+dA [X] is 2-stable. 4. a. If A is a Bézout ring, M is free. b. If A is seminormal, M is extended from A. An example in finite Krull dimension > 0 Let V be an integral ring with some elements a1 , . . . , ak . Suppose DV (a1 ) 6 DV (a2 ) 6 · · · 6 DV (ak ). The partition in constructible subsets of Spec V associated with this family contains only k + 1 elements DV (a1 ), DV (a2 ) \ DV (a1 ), . . . , DV (ak ) \ DV (ak−1 ), DV (1) \ DV (ak ), that correspond to the rings V[1/a1 ], (V/ha1 i)[1/a2 ], . . . , (V/hak−1 i)[1/ak ] and V/hak i . Now suppose that these rings are all zero-dimensional. Then, we similarly have a partition into k + 1 constructible subsets of Spec V[X] and the corresponding rings V[1/a1 ][X], (V/ha1 i)[1/a2 ][X], . . . , (V/hak−1 i)[1/ak ][X] and (V/hak i)[X] 928 XVI. Extended projective modules are all of Krull dimension 6 1. Theorem XIV -4.16 then tells us that V[X] is 2-stable. Therefore if M is a projective V[X]-module of constant rank r, r−1 by Serre’s Splitting Off theorem, we obtain M ' V[X] ⊕ N , with N of constant rank 1. If V is in addition a seminormal ring (resp. a GCD-domain), then N is extended from V (resp. then N is free), so M is extended from V (resp. M is free). The result “V[X] is 2-stable” is satisfied when V is a valuation domain of Krull dimension k for which we have a precise sufficient knowledge of the valuation group. In classical mathematics (with LEM but without using the prime ideals or the axiom of choice) we therefore already obtain the desired Bass’ theorem for valuation domains of finite Krull dimension. However, the result is not of an algorithmic nature if we do not know how to compute some suitable elements ai . This difficulty will be bypassed dynamically. Constructive proof of Bass’ theorem We need to establish the following theorem. 6.6. Theorem. If V is a valuation ring, V[X] is 2-stable. We start with the following lemma (the proof of the theorem is postponed until page 929). 6.7. Lemma. Let V be a valuation ring and V0 be the valuation subring of V generated by a finite family of elements of V. Then, V0 [X] is 2-stable. J Let V1 be the subring of V generated by the finite family. We define V0 = { c/b | c, b ∈ V1 , regular b divides c in V } ⊆ Frac(V1 ). It is easily seen that V0 is a valuation domain. Moreover, since Kdim V1 6 m for some m (see Lemma XIII -5.3), we have also Kdim V0 6 m. Indeed, consider a sequence (z1 , . . . , zm+1 ) in V0 , write zi = xi /b with a common denominator b, and introduce a complementary sequence of (x1 , . . . , xm+1 ) in V1 . A fortiori it is complementary in V0 . Let `1 , `2 and a in W = V0 [X]. Let L = (`1 , `2 ) and Q = (q1 , q2 ). We are searching for q1 , q2 ∈ W that satisfy DW (a, L) = DW (L + aQ). If V0 were a discrete field, we would have an algorithm to compute Q from L. By executing this algorithm, we would use the test “y = 0 or y invertible?” for some elements y ∈ V1 that occur during the computation (indeed, in the case where V0 is a discrete field, some y/z in V0 is null if y is null, invertible if y is invertible, z having been already certified as invertible). We can transform the algorithm dynamically by replacing each test “y = 0 or y invertible?” by the splitting of “the current ring A,” which gives the §6. Projective modules extended from arithmetic rings 929 two rings A[1/y] and A/DA (y) . At the beginning A = V0 . As in V0 the elements are comparable with respect to divisibility, all the introduced rings can be brought back to the standard form V0 /DV0 (yi ) [1/yi−1 ] (i ∈ J2..kK) for a finite family (yi )i∈J1..kK of V1 , with yi−1 dividing yi in V0 for i ∈ J2..kK. Here we might have the impression of having succeeded insofar as we could say that: we now apply Lemma XIV -4.15. However, by reading the proof of this lemma, we see that during a splitting B 7→ (B[1/b], B/hbi), first the given L and a produce some Q for B/hbi, then L + aQ and ab produce some R for B[1/b], the final result being that Q + bR suits for L and a in B. Thus the dynamic of our transformed algorithm must be more carefully controlled.2 What saves us is that in our dynamic use of Lemma XIV -4.15, the computations that start with L and a remain entirely in V0 ⊆ Frac(V1 ). Consequently, we can be certain not to fall into an infinite loop where the number of rings V0 /DV0 (yi ) [1/yi−1 ] would increase indefinitely, which would prevent the algorithm from halting. Indeed, if k > m (where Kdim V0 6 m), the sequence (y1 , . . . , yk ) is singular, and since DV0 (yi−1 ) 6 DV0 (yi ) and Zar V0 is totally ordered, Lemma XIII -8.3 tells us that one of the following three situations occurs • DV0 (y1 ) = 0, in which case the ring V0 /DV0 (y2 ) [1/y1 ] is trivial and the list is shortened by deleting y1 , • DV0 (ym+1 ) = 1, in which case the ring V0 /DV0 (ym+1 ) [1/ym ] is trivial and the list is shortened by deleting ym+1 , • for some i ∈ J2, m + 1K, we have the equality DV0 (yi−1 ) = DV0 (yi ), in which case the ring V0 /DV0 (yi ) [1/yi−1 ] is trivial and the list is shortened by deleting yi .  Remark. Thus, once V1 is fixed, the ring V0 behaves, with regard to the 2-stability of V0 [X] as the ring of finite Krull dimension “> 0 but entirely controlled” which was given in the previous subsection: the sequence of the yi ’s, limited to m terms, behaves like the sequence of the ai ’s of the previous subsection, except that the yi ’s are produced dynamically as the algorithm executes whereas the ai ’s were given at the start. Proof of Theorem 6.6. Let `1 , `2 and a in V[X]. We search for q1 , q2 ∈ V[X] satisfying DV[X] (a, L) = DV[X] (L + aQ) (with L = (`1 , `2 ) and Q = (q1 , q2 )). We apply Lemma 6.7 with the finite family constituted by the coefficients of `1 , `2 and a. We find q1 , q2 in V0 [X] ⊆ V[X].  2 Otherwise, the lemma could actually be proven without any hypothesis on V. 930 XVI. Extended projective modules 6.8. Theorem. (Bass-Simis-Vasconcelos) If V is a valuation ring, every finitely generated projective V[X]-module is free. J Let M be a finitely generated projective module over V[X]. Since V[X] is connected, M has a constant rank r ∈ N. Since V[X] is 2-stable, Serre’s r−1 Splitting Off theorem gives us that M ' V[X] ⊕ N , where N is a projective V[X]-module of constant rank 1. It remains to show that N ' V[X]. If V is integral we finish like this: since V[X] is a GCD-domain, N ' V[X]. In general we can say: V is normal, therefore every projective module of constant rank 1 over V[X] is extended from V. However, V is local, in conclusion N is free over V[X].  The case of arithmetic rings 6.9. Theorem. (Bass-Simis-Vasconcelos) If A is an arithmetic ring, every finitely generated projective A[X]-module is extended from A. J First of all, since GK0 (A) = GK0 (Ared ) and A[X]red = Ared [X], it suffices to prove the theorem in the reduced case, i.e. for the Prüfer rings. Consider a finitely generated projective A[X]-module M . In classical mathematics we would apply the Quillen abstract patching theorem: a finitely generated projective module over A[X] is extended because it is extended if we localize at an arbitrary prime ideal of A (the ring becomes a valuation ring). In constructive mathematics, we rewrite the constructive proof given in the local case (for Theorem 6.8) by applying the basic local-global machinery. More precisely, suppose that in the local case (i.e. for a valuation ring) we use the disjunction “a divides b or b divides a.” Since we are dealing with a Prüfer ring, we know u, v, s, t such that s + t = 1, sa = ub and tb = va. If B is the “current” ring, we consider the two comaximal localizations B[1/s] and B[1/t]. In the first, a divides b, and in the second, b divides a. Ultimately we obtain a finite family (Si ) of comaximal monoids of A such that after localization at any of the Si ’s, the module M becomes free, therefore extended. We conclude with the Quillen patching (concrete localglobal principle 3.7).  Remarks. 1) We did not need to assume that the valuation ring was residually discrete to make the constructive proof of Theorems 6.6, 6.8 and 6.9 work. This is especially translated by the fact that in the last proof, the comaximal monoids are based on the disjunction (in a local ring) “s or 1 − s is invertible” and are directly given by comaximal elements. 2) In this type of passage from the local to the global, to make sure that the algorithm halts, we have to make sure that the version given in the local case is “uniform,” meaning that its execution is done in a number of §6. Projective modules extended from arithmetic rings 931 steps that is bounded by a function of the discrete parameters of the input: the size of the matrix and the degrees of its coefficients. This is indeed the case here, modulo the proof of Lemma XIII -5.3. Note that the fact that the algorithm in the local case does not use any tests of equality to 0 greatly simplifies life and helps us to appreciate the validity of its dynamic implementation in the passage from the local to the global. The multivariate case This subsection is devoted to the constructive proof of the following LequainSimis theorem. Theorem (Lequain-Simis) If A is an arithmetic ring, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. A dynamic comparison between the rings A(X) and AhXi In the following theorem, we prove that for a ring A of dimension at most d, the ring AhXi dynamically behaves like the ring A(X) or like a localization of a ring AS [X] for a monoid S of A with Kdim AS 6 d − 1. 6.10. Theorem. (Dynamic comparison of A(X) with AhXi) Pm Let A be a ring, f = j=0 aj X j ∈ A[X] be a primitive polynomial, and, K for j ∈ J1..mK, Sj = SA (aj ) = aN j (1 + aj A) be the Krull boundary monoid of aj in A. Then, the monoids f N , S1 , . . . , Sm are comaximal in AhXi. In particular, if Kdim A and d > 0, each ring AhXiSj is a localization of a ring ASj [X] with Kdim ASj 6 d − 1. J For x1 , . . . , xm ∈ A and n, d1 , . . . , dm ∈ N, we must show that the following elements of A[X] f n , admm (1 − am xm ), . . . , ad11 (1 − a1 x1 ), generate an ideal of A[X] that contains a monic polynomial. We reason by induction on m; it is obvious for m = 0 because am = a0 is invertible. For m > 1 and j ∈ J1..m − 1K, let d a = am , x = xm , d = dm and a0j = aj j (1 − aj xj ).  Consider the quotient B = A ad (1 − ax) ; we must show that the family F = (f n , a0m−1 , . . . , a01 ) generates an ideal of B[X] which contains a monic polynomial. Since ad (1 − ax) = 0, e = ad xd is an idempotent and hei = ad . Let Be ' B/h1 − ei and B1−e ' B/hei. It suffices to show that hFiBe [X] and hFiB1−e [X] contain a monic polynomial. In Be [X], it is immediate because a is invertible. In B1−e [X], we have Pm−1 ad = 0. Let f = aX m + r with r = j=0 aj X j . In B, for every exponent δ, 932 XVI. Extended projective modules the elements of (aδ , am−1 , . . . , a1 , a0 ) are comaximal. For δ = d, we deduce that in B1−e [X], the polynomial r is primitive. Since r = f − aX m and ad = 0, we have rd ∈ hf i so rdn ∈ hf n i. We apply the induction hypothesis to the polynomial r ∈ B1−e [X] of (formal) degree m − 1: the ideal rdn , a0m−1 , · · · , a01 of B1−e [X] contains a monic polynomial; therefore the same holds for the ideal f n , a0m−1 , · · · , a01 .  Remark. The previous theorem seems to have fallen from the sky as if by magic. Actually it is the result of a slightly complicated story. In the article [73], the following theorem was proved by starting with the special case of a residually discrete local ring, then by generalizing to an arbitrary ring by means of the basic local-global machinery. Theorem. Let A be a ring such that Kdim A 6 d ∈ N. Let f ∈ A[X] be a primitive polynomial. There exist comaximal monoids V1 , . . . , V` of AhXi such that for each i ∈ J1..`K, either f is invertible in AhXiVi , or AhXiVi is a localization of an ASi [X] with Kdim ASi < d. By explicating the algorithm contained in the proof of this theorem, we have obtained Theorem 6.10. Dynamic machinery with AhXi and A(X) The previous theorem allows us to implement a dynamic machinery of a new type. Suppose that we have established a theorem for the valuation rings of Krull dimension 6 n. We want the same theorem for the rings AhXi when A is a valuation ring of Krull dimension 6 n. Suppose also that the property to be proven is stable by localization and that it comes from a concrete local-global principle. We perform a proof by induction on the Krull dimension. When the Krull dimension is null, A is a discrete field and we have AhXi = A(X), which is also a discrete field, therefore the theorem applies. Let us look at the passage from the dimension k to the dimension k + 1 (k < n). Notice that A(X) is a valuation ring with the same Krull dimension as A (Lemma 6.1). We assume that Kdim A 6 k +1. We have a constructive proof of the theorem for the valuation rings of Krull dimension 6 n, in particular it works for A(X). We try to make this proof (i.e. this algorithm) work with AhXi instead of A(X). This proof uses the fact that in A(X) the primitive polynomials of A[X] are invertible. Each time that the initial proof uses the inverse of such a polynomial f , we call upon Theorem 6.10, which replaces the “current” ring by comaximal localizations. In the first localization the polynomial f has been inverted, and the proof can be continued as if AhXi were A(X). In each of the other localizations we have §6. Projective modules extended from arithmetic rings 933 replaced AhXi by a localization of a ring ASi [X] with Kdim ASi 6 k, and, if we are lucky, the induction hypothesis allows us to conclude. Ultimately we have proven the theorem for comaximal localizations of AhXi. Since the conclusion stems from a concrete local-global principle, we have proven the theorem for AhXi. Application to the theorem of Maroscia and Brewer & Costa The dynamic machinery explained in the previous subsection applies for the first of the following results. (i) If A is a valuation ring with Kdim A 6 1, then AhXi is a Prüfer ring with Kdim AhXi 6 1. Indeed, it suffices to prove the conclusion locally (here, after localization of AhXi at comaximal monoids). However, Theorem 6.10 allows us to split the ring AhXi into components that behave (for the computation to be done) either like A(X), or like a localized ring of a K[X] where K is reduced zero-dimensional. In the two cases we obtain a Prüfer ring of Krull dimension 6 1. (ii) If A is a Prüfer ring with Kdim A 6 1, then so is AhXi. Indeed, it suffices to prove the conclusion locally (here, after localization of A at comaximal monoids). We apply the local-global machinery of arithmetic rings to the proof of item (i): the ring A is subjected to comaximal localizations, in each of which it behaves like a valuation ring. As a consequence we obtain a special version of the Lequain-Simis theorem by using the concrete Quillen induction (Theorem 5.2). 6.11. Theorem. (Maroscia, Brewer & Costa) If A is an arithmetic ring with Kdim A 6 1, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. J Since Ared [X] = A[X]red and GK0 (B) = GK0 (Bred ), it suffices to treat the reduced case, i.e. the case of the Prüfer rings. Let us verify that the class of Prüfer rings of Krull dimension 6 1 satisfies the hypotheses of Theorem 5.2. The first condition is item (ii) above that we have just proven. The second condition is that the finitely generated projective modules over A[X] are extended from A. This is the Bass-Simis-Vasconcelos theorem. The Lequain-Simis induction For the purpose of generalizing the Quillen-Suslin theorem to Prüfer domains, and observing that this class of rings is not stable under the passage from A to AhXi, Lequain and Simis [123] have found a skillful way to bypass the difficulty by proving a new induction theorem “à la Quillen,” suitably modified. 934 XVI. Extended projective modules 6.12. Abstract Lequain-Simis induction. Let F be a class of rings that satisfy the following properties. (LS1) If A ∈ F, every nonmaximal prime ideal p of A has a finite height.3 (LS2) If A ∈ F, then A[X]p[X] ∈ F for every prime ideal p of A. (LS3) If A ∈ F, then Ap ∈ F for every prime ideal p of A. (LS4) If A ∈ F is local, every finitely generated projective module over A[X] is free. Then, for all A ∈ F and all r > 1, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. Here note that if A is local with Rad A = m, then A(X) = A[X]m[X] . We propose a “constructive variation” on the theme of the Lequain-Simis induction. This is an important application of our dynamic comparison between A(X) and AhXi. This constructive induction “à la Lequain-Simis” is due to I. Yengui. 6.13. Theorem. (Yengui induction) Let F be a class of commutative rings of finite Krull dimension (not necessarily bounded) which satisfies the following properties. (ls1) If A ∈ F, then A(X) ∈ F. (ls2) If A ∈ F, then AS ∈ F for every monoid S of A. (ls3) If A ∈ F, then every finitely generated projective A[X]-module is extended from A. Then, for all A ∈ F and all r > 1, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. Note: (ls1) replaces (LS2), (ls2) replaces (LS3) and (ls3) replaces (LS4). J Due to Fact 1.2 5, we limit ourselves to the case of reduced rings. We reason by double induction on the number r of variables and over the Krull dimension d of A. The basic step for r = 1 (arbitrary d) is given by (ls3), and for d = 0 (with arbitrary r) it is the Quillen-Suslin theorem. We suppose that the result is proven in r variables for the rings in F. We consider the case of r + 1 variables and we perform an induction proof on (an upper bound d of) the Krull dimension of a ring A ∈ F. Therefore let A be a ring of Krull dimension 6 d + 1. Let P be a finitely generated projective module over A[X1 , . . . , Xr , Y ] = A[X, Y ]. Let G = G(X, Y ) be a presentation matrix of P with coefficients in A[X, Y ]. Let H(X, Y ) be the matrix constructed from G as in Fact 1.1. By using the induction hypothesis for r and (ls1), we obtain that the 3 I.e., Kdim(Ap ) < ∞. §6. Projective modules extended from arithmetic rings 935 matrices H(X, Y ) and H(0, Y ) are elementarily equivalent over A(Y )[X]. This means that there exist matrices Q1 , R1 over A[X, Y ] such that with Q1 H(X, Y ) = H(0, Y )R1 det(Q1 ) and det(R1 ) primitive in A[Y ]. We now show that H(X, Y ) and H(0, Y ) are equivalent over AhY i[X]. By the Vaserstein patching it suffices to show that they are equivalent over AhY iSi [X] for comaximal monoids Si of AhY i. We consider the primitive polynomial f = det(Q1 ) det(R1 ) ∈ A[Y ], and we apply Theorem 6.10. If f is of formal degree m, we obtain monoids (Si )i∈J1..mK of A such that the monoids V = f N and (Si )i∈J1..mK are comaximal in AhY i. In addition, Kdim ASi 6 d for i ∈ J1..mK. For the ring localized at V , det(Q1 ) and det(R1 ) are invertible in AhY iV . This implies that H(X, Y ) and H(0, Y ) are equivalent over AhY iV [X]. For a localized ring at Si (i ∈ J1..mK), by induction hypothesis over d and by using (ls2), H(X, Y ) and H(0, 0) are equivalent over ASi [X, Y ]. A fortiori H(X, Y ) and H(0, Y ) are equivalent over ASi [X, Y ], therefore also over AhY iSi [X], which is a localization of ASi [Y ][X] = ASi [X, Y ]. Thus, we have fulfilled the contract and we obtain invertible matrices Q and R over AhY i[X] ⊆ A[X]hY i such that Q H(X, Y ) = H(0, Y ) R. Moreover, we know by (ls3) that H(0, 0) and H(0, Y ) are equivalent over A[Y ] ⊆ A[X]hY i, and by induction hypothesis over r that H(0, 0) and H(X, 0) are equivalent over A[X] ⊆ A[X]hY i. In conclusion H(X, 0) and H(X, Y ) are equivalent over A[X]hY i. Therefore by the Affine Horrocks’ theorem, P is extended from A[X].  Finally, by induction hypothesis over r, P (X, 0) is extended from A. Remark. We have asked in (ls2) that the class F is stable under localization for any monoid. Actually in the proof only localizations at Krull boundary monoids intervene, or by inversion of a unique element (all this in an iterative way). Lequain-Simis in finite dimension 6.14. Corollary. If A is an arithmetic ring of finite Krull dimension, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. J We show that the class of arithmetic rings of finite Krull dimension satisfies the concrete Lequain-Simis induction. The condition (ls1) is given by Exercise XII -3, (ls3) by the Bass-Simis-Vasconcelos theorem, and (ls2) is clear.  936 XVI. Extended projective modules Local Lequain-Simis without the dimension hypothesis 6.15. Corollary. If V is a valuation ring, every finitely generated projective module over V[X1 , . . . , Xr ] is extended from V (i.e. free). J Let M be a finitely generated projective module over V[X1 , . . . , Xr ]. We must show that M is free. Let F = (fij ) ∈ AGq (V[X1 , . . . , Xr ]) be a matrix whose image is isomorphic to the module M . Let V1 be the subring of V generated by the coefficients of the polynomials fij and V0 be the valuation subring of V generated by V1 . Item 4 of Theorem XIII -8.20 tells us that every ring between V1 and Frac V1 , in particular V0 , is of finite Krull dimension. We apply Corollary 6.14.  General Lequain-Simis theorem 6.16. Theorem. (Lequain-Simis) If A is an arithmetic ring, every finitely generated projective module over A[X1 , . . . , Xr ] is extended from A. J This results from Corollary 6.14 (the local case) with the same proof as as the proof which deduces Theorem 6.9 from Theorem 6.8.  Conclusion: a few conjectures The solution to Serre’s problem has naturally led to a few conjectures about possibles generalizations. We will cite the two most famous ones and refer to [Lam06, chap.V,VIII] for detailed information on the subject. The first, and the strongest, is the Hermite rings conjecture, that can be stated in two equivalent forms, one local and another global, given the Quillen patching principle. Recall that a ring is called a “Hermite ring” when the stably free finitely generated modules are free, which amounts to saying that the unimodular vectors are completable. (H) If A is a Hermite ring, then so is A[X]. (H’) If A is a residually discrete local ring, then A[X] is a Hermite ring. Bass’ “stable-range” gives a first approach of the problem (see Proposition V -4.4, Corollary V -4.9 and Theorem V -4.10). Special cases are treated for example in [163, Roitman] and [197, 198, Yengui], which treats the n = 1 case of the following conjecture: over a ring A of Krull dimension 6 1, the stably free A[X1 , . . . , Xn ]-modules are free. The second is the Bass-Quillen conjecture. A coherent ring is called a regular ring if every finitely presented module admits a finite projective resolution (for the definition and an example of a finite projective resolution, see Problem X -8). For the Bass-Quillen Exercises and problems 937 conjecture there are also two equivalent versions, a local one and a global one. (BQ) If A is a regular coherent Noetherian ring,4 then the finitely generated projective modules over A[X1 , . . . , Xn ] are extended from A. (BQ’) If A is a regular coherent Noetherian residually discrete local ring,5 then the finitely generated projective modules over A[X1 , . . . , Xn ] are free. Actually, since A regular Noetherian implies A[X] regular Noetherian, it would suffice to prove the n = 1 case. Partial results have been obtained. For example, the conjecture is proven in Krull dimension 6 2, for arbitrary n (but at the moment we do not dispose of a constructive proof). We can a priori also consider a non-Noetherian version for the regular coherent rings of fixed Krull dimension 6 k. Exercises and problems Exercise 1. Let A be an ideal of A[X] containing a monic polynomial and a  be an ideal of A. Then A ∩ (A + a[X]) is contained in DA (A ∩ A) + a . In particular, if 1 ∈ A + a[X], then 1 ∈ (A ∩ A) + a. Exercise 2. (Top-Bottom lemma) Let A be a ring and m = Rad A. 1. Let S ⊆ A[X] be the monoid of the monic polynomials. The monoids S and 1 + m[X] are comaximal.  2. Let U ⊆ A[X] be the monoid X n + k<n ak X k | n ∈ N, ak ∈ m (k < n) . The monoids U and 1 + m + XA[X] are comaximal. P Exercise 3. The goal of the exercise is to show a result similar to the Vaserstein patching (local-global principle 3.6) in which we replace GLn by SLn . 1. Let B be a ring and S be monoid of B. a. Let P ∈ B[Y ] such that P (0) = 0 and P = 0 in BS [Y ]. Show that there exists an s ∈ S such that P (sY ) = 0. b. Let H ∈ Mn (B[Y ]) such that H(0) ∈ SLn (B) and H ∈ SLn (BS [Y ]). Show that there exists an s ∈ S such that H(sY ) ∈ SLn (B[Y ]). 2. Prove Lemma 3.4 by replacing GL by SL. 3. Prove the local-global principle 3.6 by replacing GL by SL. 4 Naturally, 5 Naturally, in classical mathematics the hypothesis “coherent” is superfluous. in classical mathematics the hypotheses “coherent” and “residually discrete” are superfluous. 938 XVI. Extended projective modules Exercise 4. Let A be a residually discrete local ring and b ⊆ A[X] be an invertible ideal containing a monic polynomial. We want to show that b is a principal ideal. This constitutes a special case of the Local Horrocks’ theorem (Theorem 4.3): indeed, on the one hand b is a projective A[X]-module, and on the other hand, if f ∈ b is a monic polynomial, then by localizing at f , bf = A[X]f , and so, by the Local Horrocks’ theorem, b is a free A[X]-module. This exercise gives a proof independent from the current one. In the special case studied here, we add the assumption that b is generated by a monic polynomial. Let A be a ring, let m = Rad A and k = A/m. Let b ⊆ A[X] be an ideal containing a monic polynomial. Let a be the reduction of a modulo m. 1. Prove that every monic polynomial of b ⊆ k[X] can be lifted to a monic polynomial of b. Now suppose that A is residually discrete and local. 2. Show the existence of a monic polynomial f ∈ b such that b = hf i in k[X] and so b = hf i + b ∩ m[X]. Now suppose that the ideal b is invertible. 3. Show that b ∩ m[X] = bm[X]. 4. Consider the ring A[X]/hf i. Show that m(b/hf i) = b/hf i. Deduce that b = hf i. We propose a generalization. 5. Does the proof work with a residually zero-dimensional ring A? Exercise 5. (Brewer & Costa theorem: the case of Bézout domains of dimension 6 1) See also Exercise XII -3 and Theorem 6.11. Let F be the class of Bézout domains of dimension 6 1, and A ∈ F . 1. Show that Kdim AhXi 6 1 (use Exercise XIII -9). 2. Deduce that AhXi is a Bézout ring. 3. The class F satisfies the hypotheses of Theorem 5.4 (concrete Quillen induction, free case). Thus, every finitely generated projective A[X1 , . . . , Xr ]-module is free. Exercise 6. (Local-global principle for seminormal rings) We give a direct proof of principle 3.10 in the special case of seminormal pf-rings. 1. In a pf-ring, if xc = b and b2 = c3 , then there exists a z such that zc = b and z 2 = c, so z 3 = b. 2. Let S1 , . . . , Sn be comaximal monoids of a ring A. Suppose that each of the ASi ’s is a seminormal pf-ring. Show that A is a seminormal pf-ring. Solutions of selected exercises 939 Exercise 7. (Rings satisfying some of the conditions of the section “An example in finite Krull dimension > 0” page 927) Let a1 , . . . , ak ∈ A, a0 = 0, ak+1 = 1. Let A1 , . . . , Ak+1 be the following rings  Ai = A/hai−1 i [1/ai ] for i ∈ J1..k + 1K. We will show that if each Ai is zero-dimensional, then Kdim A 6 k. The same  result holds with Ai = A/DA (ai−1 ) [1/ai ]. 1. Let a ∈ A. If Kdim A[1/a] 6 n and Kdim A/hai 6 m, then Kdim A 6 n + m + 1. 2. Deduce the stated result. Some solutions, or sketches of solutions Exercise 1. Let B = A/A ∩ A , B0 = A[X]/A , b = a, b0 = b B0 . The ring B0 is an integral extension of B. We apply the Lying Over (VI -3.12). Another solution. Let f ∈ A be monic. Let a ∈ A ∩ (A+a[X]), there exists a g ∈ A such that g ≡ a mod a. Then Res(f, g) ≡ Res(f, a) mod a. But Res(f, a) = adeg f and Res(f, g) ∈ A ∩ A. Exercise 2. Use the resultant.  Exercise 3. 1b. Let P (Y ) = 1 − det H(Y ) . We apply item 1a. 2. Lemma 3.4 provides us with a matrix U (X, Y ) ∈ GLr (A[X, Y ]) such that U (X, 0) = Ir and, over AS [X, Y ], U (X, Y ) = C(X + sY )C(X)−1 . By item 1, there exists a t ∈ S such that U (X, tY ) ∈ SLr (A[X, Y ]). Let V (X, Y ) = U (X, tY ) and we replace s by st. 3. Lemma 3.5 is successfully subjected to the replacement of GL (implicit in the word “equivalent”) by SL. Likewise for the Vaserstein patching. Exercise 4. 1. We first show the following result: if we have g, f ∈ b with g monic of degree r and f monic of degree r + 1, then g can be lifted to a monic polynomial of b (of degree r). We write g = aX r+δ + . . ., with δ ∈ N and we show by induction on δ that g can be lifted to a monic polynomial in b. If δ = 0, we have a ≡ 1 mod m (because g is monic), so a is invertible and the monic polynomial a−1 g ∈ b lifts g. If δ > 1, we have a ∈ m (because g is monic), and we consider h = g − aX δ−1 f ∈ b. It is of the form bX r+δ−1 + . . ., and it satisfies h = g. We apply the induction hypothesis. It then suffices to show that for all g ∈ b such that g is monic of degree r, the ideal b contains a monic polynomial of degree r + 1. By hypothesis, b contains a monic polynomial f . If deg(f ) 6 r + 1, then the result is clear. If n = deg(f ) > r + 1, then the polynomial X n−(r+1) g is monic of degree n − 1, and by the first step, b contains a monic polynomial of degree n − 1. We conclude by induction on n − r. 2. The ideal b is a finitely generated ideal of k[X], therefore b is principal. As b contains a monic polynomial we can take the monic generator h and we lift it to a monic polynomial of b by the previous question. 3. Let f be monic in b, and b1 be the ideal that satisfies bb1 = hf i. We consider b0 = b1 (b ∩ m[X])/f (it is an ideal of A[X]). Then bb0 = b ∩ m[X]. 940 XVI. Extended projective modules We have f b0 ⊆ m[X] and f is monic so b0 = 0, i.e. b0 ⊆ m[X]. By multiplying by b, we obtain b ∩ m[X] ⊆ bm[X], so b ∩ m[X] = bm[X]. 4. We have m(b/hf i) = c/hf i with c = mb + hf i = m[X]b + hf i = m[X] ∩ b + hf i = b. The A[X]/hf i-module b/hf i is finitely generated and as f is monic, A[X]/hf i is a finitely generated A-module. We deduce that b/hf i is a finitely generated A-module. By Nakayama’s lemma we obtain b/hf i = 0, i.e. b = hf i. K Exercise 5. 1. We must show that for f , g ∈ A[X], we have 1 ∈ IAhXi (f, g). Since A is a Bézout domain, every polynomial of A[X] is the product of an element of A by a primitive polynomial. By Exercise XIII -9, it suffices to show that K 1 ∈ IAhXi (f, g), either when f or g is primitive, or when f and g are constants a, b. K K In the latter case, since Kdim A 6 1, this stems from 1 ∈ IA (a, b) ⊆ IAhXi (a, b). Therefore suppose that f or g is primitive, for example f . It suffices to show that K 1 ∈ IAhXi (f, g) after localization at comaximal monoids. However, Theorem 6.10 provides boundary monoids Sj in A such that f N and the Sj ’s are comaximal in AhXi. For the localization at f N , it is clear that 1 ∈ I K (f, g). As for Sj−1 AhXi, it is a localization of ASj [X] with ASj zero-dimensional, which gives Kdim ASj [X] 6 1. Therefore 1 ∈ I K (f, g) in ASj [X], and a fortiori in the localized ring Sj−1 AhXi. 2. The ring A[X] is a GCD-domain, so the same holds for its localized ring AhXi. As Kdim AhXi 6 1, Theorem XI -3.12 tells us that AhXi is a Bézout ring. 3. We have proven the property (q1) and we already know that the property (q0) is satisfied (Theorem X -5.4). Exercise 6. 1. We have x2 c2 = b2 = c3 , so c2 (x2 −c) = 0, therefore c(x2 −c) = 0. Then let s, t such that s + t = 1, sc = 0 and t(x2 − c) = 0. Let z = tx. We have tc = c, z 2 = t2 c = c and zc = xtc = xc = b. 2. Suppose that each of the ASi ’s is a seminormal pf-ring. Therefore A is a pf-ring. Let b, c ∈ A with b2 = c3 . If the ASi ’s are seminormal, there exist xi ∈ ASi such that x2i = c and x3i = b, and so xi c = b. This implies that there exists an x ∈ A such that xc = b. We conclude by item 1. Note: There are seminormal rings that are not pf-rings: for example k[x, y] with xy = 0 where k is a discrete field. Exercise 7. 1. Let (x) = (x0 , . . . , xn ), (y) = (y0 , . . . , ym ) be n + m + 2 elements of A. By K considering the iterated boundary monoid of (y) in A/hai, we obtain that SA (y) contains a multiple of a, say ba. By considering the iterated boundary ideal of (x) K in A[1/a], we obtain that IA (x) contains a power of a, say ae . e K K K Then (ba) ∈ IA (x) ∩ SA (y), so 1 ∈ IA (x, y) by Fact XIII -2.9, item 1. 2. By using the previous question, we show by induction on i ∈ J0..k + 1K that we have Kdim A[1/ai ] 6 i − 1; for i = k + 1, we obtain Kdim A 6 k. Bibliographic comments 941 Bibliographic comments Carlo Traverso proved the theorem that bears his name in [185], for a reduced Noetherian ring A (with an additional restriction). For the integral case without the Noetherian hypothesis we can refer back to [150, Querré], [23, Brewer&Costa] and [90, Gilmer&Heitmann]. The most general case is given by [183, Swan]. Traverso-Swan’s theorem over the seminormal rings has been decrypted from the constructive point of view by Coquand in [36]. The decryption began with the elementary proof of Proposition 2.12 as it is given here. This proof is a (quite spectacular) simplification of the existing proofs in the literature. It was then necessary to bypass the argument of the consideration of a minimal prime ideal to obtain a complete constructive proof of the result. It is remarkable that, at the same time, the case of a non-integral ring could have been treated effortlessly, in contrast to what happens in Swan’s proof in [183]. For a detailed explanation of [36] see [129, Lombardi&Quitté]. For a “simple” algorithm that realizes the theorem in the univariate case, see [7, Barhoumi&Lombardi]. A direct proof, in the same spirit, for the implication “seminormal ring A implies seminormal ring A[X]” is found in [6, Barhoumi]. Roitman’s theorem 3.8 is found in [162]. As for the history of the resolution of Serre’s problem over polynomial rings, the reader can refer to Chapter III of Lam’s book [Lam06] as well as the presentation by Ferrand to Bourbaki [81]. The original proofs of Quillen-Suslin’s theorem (solution to Serre’s problem) are found in [151, Quillen] and [178, Suslin]. Horrocks’ theorems have their source in [105, Horrocks]. The “Quillen patching” that appears in [151] is often called the Quillen local-global principle. A remarkable overview of the applications of this principle and of its extensions is found in [9, Basu&al.]. Also read [155, Rao&Selby]. The ring AhXi played a great role in the solution of Serre’s problem by Quillen and in its successive generalizations (the theorems of Maroscia and Brewer&Costa, and of Lequain&Simis). The ring A(X) proved to be an efficient tool for several results of commutative algebra. Refer to the article [92, Glaz] for a considerably comprehensive bibliography regarding these two rings. Lam’s book [Lam06] (which follows [Lam]) is a gold mine regarding the extended projective modules. It contains especially several proofs of Horrocks’ theorems (local and affine), with all the details and all the necessary references, at least from a classical mathematics’ point of view. 942 XVI. Extended projective modules The Affine Horrocks’ theorem (Theorem 4.7) was constructively proven, first (for a slightly weaker variant) in the article [128, Lombardi&Quitté], then in [130, Lombardi,Quitté&Yengui]. The version given on page 914 reuses the latter article by specifying all the details. It is based on the books by Kunz and Lam. Theorem 6.8 by Bass-Simis-Vasconcelos ([Bass, 170]) was decrypted from a constructive point of view by Coquand in [37]. Regarding the theorem of Maroscia and Brewer&Costa (Theorem 6.11), see the original articles [22, 132]. A constructive proof can be found in [130]. This theorem is a slight antecessor of the theorem of Lequain&Simis. The latter was mostly decrypted from a constructive point of view by I. Yengui [8, 73]. Many algorithms for Quillen-Suslin’s theorem (the field case) have been proposed in Computer Algebra, generally based on the proof by Suslin. Quillen-Suslin’s theorem has been studied from the point of view of its algorithmic complexity in [83, Fitchas&Galligo] and [27, Caniglia&al.] (for efficient algorithms, but that seem yet to be implemented). A new, simple and efficient algorithm for SuslinÍs theorem (complete a unimodular vector containing a monic polynomial) is given in [131, Lombardi&Yengui] and improved in [137, Mnif&Yengui]. Chapter XVII Suslin’s stability theorem, the field case Contents 1 2 3 4 Introduction . . . . . . . . . . . . . . . . . . . . . . . The elementary group . . . . . . . . . . . . . . . . . Transvections . . . . . . . . . . . . . . . . . . . . . . . . . Special matrices . . . . . . . . . . . . . . . . . . . . . . . The Mennicke symbol . . . . . . . . . . . . . . . . . . Unimodular polynomial vectors . . . . . . . . . . . . Suslin’s and Rao’s local-global principles . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Solutions of selected exercises . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . . . . . . . . . . . 943 944 944 945 947 949 951 954 956 958 Introduction In this chapter, we give an entirely constructive treatment of Suslin’s stability theorem for the case of discrete fields. – 943 – 944 XVII. Suslin’s stability theorem 1. The elementary group Transvections Regarding the elementary group En (A), recall that it is generated by the (n) elementary matrices Ei,j (a) = Ei,j (a). If we let (eij )16i,j6n be the canonical basis of Mn (A), we have  ek if k 6= j Ei,j (a) = In + aeij , Ei,j (a) ek = (i 6= j), ej + aei if k = j with for example   1 0 0 0  0 1 a 0   E2,3 (a) =   0 0 1 0 . 0 0 0 1 For fixed i (resp. for fixed j) the matrices Ei,j (•) commute, and form a subgroup of En (A) isomorphic to (An−1 , +). For example   1 0 0 0  a 1 b c   E2,1 (a) · E2,3 (b) · E2,4 (c) =   0 0 1 0  0 0 0 1 and       1 0 0 0 1 0 0 0 1 0 0 0  a 1 b c   a0 1 b0 c0   a + a0 1 b + b0 c + c0       .  0 0 1 0 · 0 0 1 0 = 0 0 1 0  0 0 0 1 0 0 0 1 0 0 0 1 More generally let P be a finitely generated projective A-module. We will say that a pair (λ, w) ∈ P ? × P is unimodular if λ(w) = 1. In this case w is a unimodular element of P , λ is a unimodular element of P ? and the A-linear map θP (λ ⊗ w) : P → P defined by x 7→ λ(x)w is the projection over L = Aw parallel to K = Ker λ, represented over K × L by the matrix     0K→K 0L→K 0K→K 0 = . 0K→L 1L→L 0 IdL If u ∈ K, the A-linear map τλ,u := IdP + θP (λ ⊗ u), x 7→ x + λ(x)u is called a transvection, it is represented over K × L by the matrix     1K→K (λ ⊗ u)|L IdK (λ ⊗ u)|L = . 0K→L 1L→L 0 IdL For example, if P = An , an elementary matrix defines a transvection. Let GL(P ) be the group of linear automorphisms of P and SL(P ) be the subgroup of endomorphisms of determinant 1. The subgroup of SL(P ) 1. The elementary group 945 e ). The affine map generated by the transvections will be denoted by E(P u 7→ τλ,u , Ker λ → EndA (P ) e ). provides a homomorphism of the group (Ker λ, +) in the group E(P In the case where P = An , if λ is a coordinate form, we find that the matrix of the transvection is a product of elementary matrices. For example, with the vector u = t[ u1 u2 u3 0 ]:   1 0 0 u1   3 Y  0 1 0 u2  I3 u0   =  = Ei,4 (ui ). 0 1 0 0 1 u3  i=1 0 0 0 1 e n ). This shows However, note that a priori En (A) is only contained in E(A that the elementary group is a priori deprived of clear geometric meaning. As a crucial point, En (A) is a priori not stable under GLn (A)-conjugation. Special matrices We now only speak of the groups En (A).   u1    Let u =  ...  ∈ An×1 and v = v1 · · · vn  ∈ A1×n to which we un associate the matrix In + uv ∈ Mn (A). We will provide results specifying the membership of this matrix to the elementary group En (A). Since det(In + uv) = 1 + tr(uv) = 1 + vu, it is imperative to demand the equaldef ity vu = v1 u1 + · · · + vn un = 0. In this case, we have (In + uv)(In − uv) = In . The transvections admit for matrices the matrices of this type, with v being unimodular. In addition, the set of these matrices In + uv (with vu = 0) is a stable set under GLn (A)-conjugation. For example, for A ∈ GLn (A), we obtain A Eij (a) A−1 = In + auv, where u is the column i of A and v is the row j of A−1 . Take care, however, that if we do not assume that v is unimodular these matrices do not in general represent transvections. If neither u nor v is e n ). unimodular the matrix does not even a priori represent an element of E(A 1.1. Lemma. Suppose u ∈ An×1 , v ∈ A1×n and vu = 0.   In + uv 0 Then ∈ En+1 (A). 0 1 J We have a sequence of elementary operations on the right-hand side (the 946 XVII. Suslin’s stability theorem first uses the equality vu = 0)     β In + uv 0 In + uv −u α −→ −→ 0 1 0 1       γ In −u In 0 I 0 δ −→ −→ n . v 1 v 1 0 1   In + uv 0 This implies = δ −1 γ −1 β −1 α−1 , i.e. 0 1          In + uv 0 In 0 In −u In 0 In = · · · 0 1 v 1 0 1 −v 1 0 u 1  .  A column vector u is said to be special if at least one of its coordinates is null. If vu = 0 and if u is special we say that In + uv is a special matrix. 1.2. Corollary. Let u ∈ An×1 and v ∈ A1×n satisfy vu = 0. If u special, then In + uv ∈ En (A). In other words every special matrix in En (A).    J We can assume that n > 2 and un = 0. Let u = ů , v = v̊ vn 0 with ů ∈ A(n−1)×1 and v̊ ∈ A1×(n−1) . Then      In−1 + ův̊ vn ů In−1 vn ů In−1 + ův̊ 0 . In + uv = = 0 1 0 1 0 1 Since v̊ ů = vu = 0, Lemma 1.1 applies and In + uv ∈ En (A). is is  ,  The special matrices are easily “lifted” from a localized ring AS to A itself. More precisely, we obtain the following. 1.3. Fact. Let S ⊆ A be a monoid, u ∈ An×1 , v ∈ A1×n with vu = 0 and S S n×1 u be special. Then there exist s ∈ S, u e ∈ A , ve ∈ A1×n with veu e = 0, u e special and u = u e/s, v = ve/s over AS . J By definition, u = u0 /s1 , v = v0 /s1 with s1 ∈ S, u0 ∈ An×1 and v0 ∈ A1×n . The equality vu = 0 provides some s2 ∈ S such that s2 v 0 u0 = 0, and ui = 0 provides some s3 ∈ S such that s3 u0i = 0. Then s = s1 s2 s3 , u e = s2 s3 u0 and 0 ve = s2 s3 v fulfill the required conditions.  e n ) = En (A). In particular, En (A) is 1.4. Theorem. If n > 3, then E(A stable under GLn (A)-conjugation. Precisions: Let u ∈ An×1 , v ∈ A1×n with vu = 0 and v unimodular. Then, we can write u in the form u = u01 + u02 + · · · + u0N , with vu0k = 0 and each u0k has at most two nonzero components. The matrix In + uv is then expressible as a product of special matrices In + uv = (In + u01 v) (In + u02 v) · · · (In + u0N v) and consequently, it belongs to En (A). 2. The Mennicke symbol 947 J The canonical basis of An is denoted (e1 , . . . , en ). We have a1 , . . . , an in A such that a1 v1 + · · · + an vn = 1. For i 6 j, let us define aij ∈ A by aij = ui aj − uj ai . Then P P u = i<j aij (vj ei − vi ej ) = i6j aij (vj ei − vi ej ). Indeed, for fixed k, the coefficient of ek in the right-hand sum is X X X X akj vj − aik vi = (uk aj − uj ak )vj − (ui ak − uk ai )vi j>k i<k j>k = uk i<k Xn j=1 aj vj − ak Xn j=1 uj vj = uk . For i < j, we then define u0ij ∈ An×1 by u0ij = aij (vj ei − vi ej ). It is clear that u0ij has at most two nonzero components and that vu0ij = 0.  2. The Mennicke symbol 2.1. Lemma. Let a, b be comaximal elements in A. Then the equivalence a b 0 class in SL3 (A)/E3 (A) of the matrix  c d 0  does not depend on the 0 0 1 choice of c and d satisfying 1 = ad − bc. We denote by {a, b} the element of SL3 (A)/E3 (A) obtained thus. We call it the Mennicke symbol of (a, b).     J Let A = a b , A0 = a0 b0 with ad − bc = ad0 − bc0 = 1. Then c d c d   0    a b d −b 1 0 0−1 AA = = , c d −c0 a cd0 − c0 d 1   −1   A 02,1 A0 02,1 AA0−1 02,1 and = is in E3 (A).  01,2 1 01,2 1 01,2 1 2.2. Proposition. The Mennicke symbol satisfies the following properties. 1. If a ∈ A× , then {a, b} = 1 for all b ∈ A. 2. If h1i = ha, bi = ha0 , bi then 1 ∈ haa0 , bi and {aa0 , b} = {a, b}{a0 , b}. 3. If 1 ∈ ha, bi, then {a, b} = {b, a} = {a + tb, b} for all t ∈ A.   b J 1. The matrix a −1 is a member of E2 (A). 0 a 2. We have  a  c 0   b 0 a 0 E3 (A) d 0  ∼  0 1 0 1 c 0  b 0 , d 948 and XVII. Suslin’s stability theorem a0  c0 0  b d0 0   0 0 a E3 (A) 0  ∼  c0 1 0   0 0 −b a E (A) 3 0 −d0  ∼  c0 1 0 0 The product {a, b}{a0 , b} is represented the right-hand side, i.e. by    aa0 b 0 aa0 b E3 (A) 0 0  c 0 −d  ∼  ∗ ∗ ca0 d 1 ca0 d by the product of the matrices on   0 aa0 E3 (A) 0  ∼  ∗ 1 0 and therefore {a, b}{a0 , b} = {aa0 , b}.    a b E2 (A) −b 3. If ad − bc = 1, then ∼ c d −d  Finally, a c  0 −b 0 −d0  . 1 a a c  b 0 ∗ 0 , 0 1  , and so {a, b} = {−b, a} = {−1, a}{b, a} = {b, a}.    b E2 (A) a + tb b ∼ , so {a, b} = {a + tb, b}. d c + td d  2.3. Lemma. (Local version) Let A be a residually discrete local ring and f , g ∈ A[X] be comaximal with f monic. Then we have {f, g} = {f (0), g(0)} = 1. J Let af + bg = 1. First note that we can divide b by f and that we then obtain an equality a1 f + b1 g = 1 with deg(b1 ) < deg(f ), and so, since f is monic, deg(a1 ) < deg(g). Therefore assume without loss of generality that deg(b) < deg(f ) and deg(a) < deg(g). Let r be the remainder of the Euclidean division of g by f . Then {f, g} = {f, r}. In particular, if deg(f ) = 0 we are done. Otherwise, we can assume deg(g) < deg(f ) and we reason by induction on deg(f ). Since A is local and residually discrete, g(0) ∈ A× or g(0) ∈ m = Rad A. First of all suppose that g(0) is invertible. Then {f, g} = {f − g(0)−1 f (0)g, g}, so that we can assume that f (0) = 0 and f = Xf1 . Then {Xf1 , g} = {X, g}{f1 , g} = {X, g(0)}{f1 , g} = {f1 , g} and the proof ends by induction since f1 is monic. Now suppose that g(0) is in m. As a(0)f (0) + b(0)g(0) = 1, we have a(0)f (0) ∈ 1 + m ⊆ A× , and so a(0) ∈ A× . However,     f g 0 f −b g+a 0  −b a 0  ≡  −b a 0  mod E3 (A[X]), 0 0 1 0 0 1 3. Unimodular polynomial vectors 949 so {f, g} = {f − b, g + a}, with f − b monic, deg(f − b) = deg(f ), deg(g + a) < deg(f ) and (g + a)(0) in m + A× = A× . We are therefore brought back to the previous case.  Our basic local-global machinery (page 869) applied to the previous local proof, gives the following quasi-global lemma. 2.4. Lemma. (Quasi-global version) Let A be a ring and f , g be elements of A[X] comaximal with f monic. Then, there exists in A a system of comaximal elements (si ) such that in each localized ring A[1/si ], we have the following equality of the Mennicke symbols {f, g} = {f (0), g(0)} = 1. 3. Unimodular polynomial vectors 3.1. Notation. If b is an ideal of B, let GLn (B, b) be the subgroup of GLn (B) that is the kernel of the natural morphism GLn (B) → GLn (B/b ). We adopt an analogous notation for SLn . Be careful for the group En ! Let En (B, b) be the normal subgroup generated by the Eij (b)’s with b ∈ b. The group En (B, b) is a subgroup of the kernel of En (B) → En (B/b ), and in general, it is a strict subgroup. However, in the case where B = A[X] and b = hXi, the two groups coincide. This result is given by the following lemma. 3.2. Lemma. The group En (A[X], hXi) is the kernel of the canonical homomorphism En (A[X]) → En (A[X]/hXi) = En (A). It is generated by the matrices of the type γ Eij (Xg) γ −1 with γ ∈ En (A) and g ∈ A[X]. J Let H be this kernel. We will use the following decomposition, valid in every group, of a product α1 β1 α2 β2 · · · αm βm , for example with m = 3    α1 β1 α1−1 (α1 α2 )β2 (α1 α2 )−1 (α1 α2 α3 )β3 (α1 α2 α3 )−1 (α1 α2 α3 ). Qm Therefore let E = E(X) ∈ H, E = i=1 Eik ,jk (fk ) with fk ∈ A[X]. We write fk = ck + Xgk with ck = fk (0) ∈ A and Eik ,jk (fk ) = αk βk , with αk = Eik ,jk (ck ), βk = Eik ,jk (Xgk ). We finish by applying the decomposition given above and by using the equality α1 · · · αm = E(0) = In .  950 XVII. Suslin’s stability theorem 3.3. Proposition. Let n > 3, s ∈ A and E = E(X) ∈ En (As [X], hXi). There exist k ∈ N and E 0 = E 0 (X) ∈ En (A[X], hXi) satisfying E 0 (X) = E(sk X) over As [X]. J We can suppose E = γEij (Xg)γ −1 with γ ∈ En (As ) and g ∈ As [X]. Letting u ∈ An×1 be the column i of γ and v ∈ A1×n be the row j of γ −1 , s s we have E(X) = γEij (Xg)γ −1 = In + (Xg)uv, vu = 0, v unimodular. Theorem 1.4 allows us to write u = u01 + u02 + · · · + u0N with vu0k = 0 and u0k ∈ An×1 has at most two nonzero components. We therefore have s E(X) = (In + (Xg)u01 v) (In + (Xg)u02 v) · · · (In + (Xg)u0N v). By using an analogous method to Fact 1.3, we easily prove that there exist k ∈ N, ge ∈ A[X], u ek ∈ An×1 and ve ∈ A1×n such that we have over As the equalities g = ge/sk , u0k = u ek /sk , v = ve/sk , veu ek = 0, and u ek has at most two nonzero components. Then let E 0 (X) = (In + (Xe g )e u1 ve) (In + (Xe g )e u2 ve) · · · (In + (Xe g )e uN ve). By Corollary 1.2, each In + (Xe g )e uk ve belongs to En (A[X]). We therefore have E 0 (X) ∈ En (A[X]), E 0 (0) = In and E 0 (s3k X) = E(X) over As [X].  3.4. Lemma. Let n > 3 be an integer, s ∈ A and E = E(X) ∈ En (As [X]). There exists an integer k > 0 such that for all a, b ∈ A congruent modulo sk , the matrix E −1 (aX)E(bX) is in the image of the natural homomorphism En (A[X], hXi) −→ En (As [X], hXi). Note: in short, but less precisely, if a and b are sufficiently “close”, the coefficients of the matrix E −1 (aX) E(bX) have no more denominator. J We introduce two new indeterminates T , U and let  E 0 (X, T, U ) = E −1 (T + U )X E(T X). We have E 0 (X, T, 0) = In . We apply Proposition 3.3 with F = E 0 by taking A[X, T ] instead of A and U instead of X: there exist a matrix G in En (A[X, T, U ], hU i) and an integer k > 0 such that E 0 (X, T, sk U ) = G(X, T, U ) in En (As [X, T, U ], hU i).  Therefore G(X, T, U ) = E −1 (T + sk U )X E(T X) over As , and if b = a + sk c, then E −1 (aX) E(bX) = G(X, a, c) over As . We have G(0, T, U ) = In over As , but not necessarily over A. Let H(X, T, U ) = G−1 (0, T, U ) G(X, T, U ). We then have H(0, T, U ) = In over A and H(X, T, U ) = G(X, T, U ) over As . 4. Suslin’s and Rao’s local-global principles 951 We therefore obtain E −1 (aX) E(bX) = H(X, a, c) in En (As [X], hXi), with H(X, a, c) ∈ En (A[X], hXi).  3.5. Lemma. Let n > 3 be an integer, s ∈ A and E = E(X) ∈ GLn (A[X]) ∩ En (As [X]). There exists an integer k > 0 such that for all a, b ∈ A congruent modulo sk , the matrix E −1 (aX)E(bX) is in En (A[X], hXi). J The proof is left to the reader.  3.6. Lemma. Let n > 3, s, t be comaximal in A and E ∈ GLn (A[X], hXi) ∩ En (As [X]) ∩ En (At [X]). Then E ∈ En (A[X]). J By Lemma 3.5, there exists some k such that for all a, b ∈ A congruent modulo sk , or modulo tk , the matrix E −1 (aX)E(bX) is in En (A[X], hXi). Let c ∈ A such that c ≡ 0 mod sk and c ≡ 1 mod tk . Then we write E = E −1 (0 · X) E(c · X) E −1 (c · X) E(1 · X).  4. Suslin’s and Rao’s local-global principles Now we prove [Gupta & Murthy, Lemma I 5.9 (page 26)]. 4.1. Theorem. Let n > 3 and A = A(X) ∈ GLn (A[X]). 1. If A(0) = In , then a = { s ∈ A | A ∈ En (As [X]) } is an ideal of A.  En (As [X]) 2. The set a = s ∈ A A(X) ∼ A(0) is an ideal of A. J The two formulations are equivalent; we prove the second from the first by considering A(X)A(0)−1 . 1. It is clear that s ∈ a ⇒ as ∈ a for all a ∈ A. Now let s, t in a. We must show that s + t ∈ a, or that 1 ∈ aAs+t . In short, we suppose that s and t = 1 − s are in a, and we must show that 1 ∈ a. By definition, we have A ∈ En (As [X]) and A ∈ En (At [X]); by Lemma 3.6, we have A ∈ En (A[X]), i.e. 1 ∈ a.  This lemma could have been written in the form of the following concrete local-global principle (very nearly [Gupta & Murthy, Lemma I 5.8]). 4.2. Concrete local-global principle. (For the elementary group) Let n > 3, S1 , . . ., Sk be comaximal monoids of A and A ∈ GLn (A[X]), with A(0) = In . Then A ∈ En (A[X]) ⇐⇒ for i ∈ J1..kK, A ∈ En (ASi [X]). The following theorem re-expresses [Gupta & Murthy, corollary II 3.8]. 952 XVII. Suslin’s stability theorem 4.3. Theorem. (Global version of Lemma 2.3) Let n > 3, and f , g ∈ A[X] be comaximal, with f monic. Then, we have the following equality of Mennicke symbols: {f, g} = {f (0), g(0)}.   f g 0 J Let af − bg = 1. Let B =  b a 0 . 0 0 1 The equality {f, g} = {f (0), g(0)} means A = BB(0)−1 ∈ E3 (A[X]). We obviously have A(0) = I3 . The concrete local-global principle 4.2 tells us that it suffices to prove the assertion after localization at comaximal elements (si ), and Lemma 2.4 has constructed such a family.  4.4. Corollary. (Triviality of the Mennicke symbol over K[X]) Let K be a discrete field, and f , g ∈ K[X] be comaximal. Then {f, g} = 1. J We reason by induction on the number r of variables in X. The case r = 0, i.e. K[X] = K stems from E3 (K) = SL3 (K) (K is a discrete field). For r > 1, we suppose without loss of generality that f is nonzero. A change of variables allows us to transform f into a pseudomonic polynomial in Xr (Lemma VII -1.4), say f = ah with a ∈ K∗ and h monic in Xr . Then, by letting h0 = h(X1 , . . . , Xr−1 , 0) and g0 = g(X1 , . . . , Xr−1 , 0), which are in K[X1 , . . . , Xr−1 ], we have {f, g} = {h, g} = {h0 , g0 }.  At the end of this section the results are proved in the case of an integral ring. They are actually true for an arbitrary ring. For the general case, we must refer back to [152, 153, 154]. 4.5. Theorem. Let n > 3, A be an integral ring and f (X) be a unimodular n vector in A[X] .  En (As [X]) Then the set a = s ∈ A f (X) ∼ f (0) is an ideal. We express the same thing in the following concrete local-global principle. 4.6. Concrete Rao local-global principle. Let n > 3, A be an integral n ring, f (X) be unimodular vector in A[X] , and S1 , . . ., Sk be comaximal monoids of A. The following properties are equivalent. 1. f (X) 2. f (X) En (A[X]) ∼ f (0). En (ASi [X]) ∼ f (0) for each i. Proof of Theorem 4.5. We must show that the set  En (As [X]) a = s ∈ A f (X) ∼ f (0) is an ideal. Since all the computations in As are valid in Asa , we have: s ∈ a implies as ∈ a. Now let s1 and s2 be in a. We must show s1 + s2 ∈ a, or 1 ∈ aAs1 +s2 . In short, we suppose that s1 and s2 = 1 − s1 are in a, and we 4. Suslin’s and Rao’s local-global principles 953 must show 1 ∈ a. By definition, for i = 1, 2, we have a matrix Ei = Ei (X) ∈ En (Asi [X]) such that Ei f (X) = f (0). We have Ei (0)f (0) = f (0). Therefore, even if it entails replacing Ei by Ei−1 (0)Ei , we can assume that Ei (0) = In . We introduce E = E1 E2−1 ∈ En (As1 s2 [X], hXi), which gives an integer k > 0 satisfying the conclusion of Lemma 3.4 for the matrix E and for the two localizations As1 → As1 s2 and As2 → As1 s2 . Let c ∈ A with c ≡ 1 mod sk1 and c ≡ 0 mod sk2 . We therefore have two matrices E10 ∈ En (As1 [X], hXi), E20 ∈ En (As2 [X], hXi) that satisfy – E −1 (cX)E(X) = E20 over As1 s2 (since c ≡ 1 mod sk1 ), – E(cX) = E(cX)E(0 · X) = E10 over As1 s2 (since c ≡ 0 mod sk2 ). −1 We obtain E = E10 E20 = E1 E2−1 over As1 s2 , and E10 E1 = E20 E2 over −1 As1 s2 . Since E10 E1 = F1 is defined over As1 , that E20 E2 = F2 is defined over As2 , that they are equal over As1 s2 , and that s1 and s2 are comaximal, there exists a unique matrix F ∈ Mn (A[X]) which gives F1 over As1 and F2 over As2 . Once again we must prove that F ∈ En (A[X]) and F f = f (0). The first item results from Lemma 3.6. To satisfy F f = f (0), we will assume that A is integral, which legitimizes the following equalities over A −1 −1 Ff = E10 E1 f = E10 f (0) = −1 E −1 (cX)f (0) = E2 (cX)E1 (cX)f (0) = E2 (cX)f (cX) = f (0).  Note: In this proof the last verification is the only place where we need to assume that the ring is integral.  4.7. Theorem. Let n > 3, A be a ring and f = t f1 (X), . . . , fn (X) be n a unimodular vector in A[X] , with 1 in the head ideal of the fi ’s. Then f En (A[X]) ∼ f (0) En (A) ∼ If one of the fi ’s is monic, we have f f ? (0) En (A[X]) ∼ f ?. En (A[X]) t ∼ [ 1 0 · · · 0 ]. J The little Horrocks’ local theorem (Theorem XVI -5.14) and Rao’s localglobal principle gives the first equivalence. Next we copy the proof of Rao’s theorem (Theorem XVI -5.18) by replacing GLn by En .  4.8. Corollary. (Transitivity of En for n > 3) If K is a discrete field and K[X] = K[X1 , . . . , Xr ], then En (K[X]) acts n transitively over the set of unimodular vectors of K[X] for n > 3. J We reason by induction on r. The case r = 0 stems from the fact that K is a discrete field. n Let r > 1 and f = t[ f1 (X) · · · fn (X) ] be a unimodular vector of K[X] . Let A = K[X1 , . . . , Xr−1 ]. One of the fi ’s is nonzero and a change of 954 XVII. Suslin’s stability theorem variables allows for the transformation into a pseudomonic polynomial in Xr (Lemma VII -1.4). With fi monic in Xr , we apply Theorem 4.7 to obtain En (K[X]) f ∼ f (X1 , . . . , Xr−1 , 0). This last vector is a unimodular vector of An . We apply the induction hypothesis.  Finally, the proof that Theorem 4.3 implies Suslin’s stability theorem is simple and constructive, as in [Gupta & Murthy]. 4.9. Theorem. (Suslin’s stability theorem, case of discrete fields) Let K be a discrete field. For n > 3, we have SLn (K[X]) = En (K[X]). J Let us prove the following preliminary result. For A ∈ GLn (K[X]), there exist P , Q ∈ En (K[X]) such that P A Q ∈ GL2 (K[X]) ⊆ GLn (K[X]).1 Indeed, let us consider the last row of A. It is a unimodular vector, therefore (Corollary 4.8), there exists a Qn ∈ En (K[X]) such that the last row of A Qn is [ 0 · · · 0 1 ]. Hence Pn ∈ En (K[X]) such that the last column of Pn (A Qn ) is t[ 0 · · · 0 1 ], i.e. Pn A Qn ∈ GLn−1 (K[X]). By iterating, we find matrices P , Q ∈ En (K[X]) of the form P = P3 · · · Pn , Q = Qn · · · Q3 , such that P A Q ∈ GL2 (K[X]). If in addition A ∈ SLn (K[X]), we obtain P A Q ∈ SL2 (K[X]) ,→ SL3 (K[X]). We can then consider its image in SL3 (K[X])/E3 (K[X]) . As the corresponding Mennicke symbol equals 1 (Corollary 4.4), we obtain P A Q ∈ E3 (K[X]), and ultimately A ∈ En (K[X]).  Exercises and problems Exercise 1. Let U ∈ An×m and V ∈ Am×n . 1. Prove, for N ∈ Mn (A), that  (Im − V N U )(Im + V U ) = Im + V In − N (In + U V ) U. Deduce that if In + U V is invertible with inverse N , then Im + V U is invertible with inverse Im − V N U . 2. Deduce that In + U V is invertible if and only if Im + V U is invertible, and establish symmetrical formulas for their inverses. 3. Show that det(In + V U ) = det(Im + U V ) in all cases. 1 The inclusion GLr ,→ GLn is defined as usual by B 7→ Diag(B, In−r ). Exercises and problems 955 4. Suppose that Im + V U is invertible. Show the following membership, due to Vaserstein.  In + U V 0 0 (Im + V U )−1  ∈ En+m (A). What happens when V U = 0? Exercise 2. With the notations of Lemma 2.1, prove that the matrix A0−1 A is of the form I2 + uv with u, v ∈ A2×1 , vu = 0 and v unimodular. Exercise 3. Let a, b, u, v ∈ A satisfy 1 = au + bv. Show, only using the properties of the Mennicke symbol appearing in Proposition 2.2, that {a, b} = {u, v} = {a − v, b + u}. Exercise 4. A stably free A-module E of rank r is said to be of type t if E ⊕ At ' Ar+t . Here we are interested in the relations between on the one hand the isomorphism classes of the stably free modules of rank n − 1, of type 1, and on the other hand the GLn (A)-set Umn (A) consisting of the unimodular vectors of An . 1. Let x ∈ Umn (A). Prove that the module An /Ax is stably free of rank n − 1, of type 1, and that for x0 ∈ Umn (A), we have An /Ax ' An /Ax0 if and only GLn (A) if x ∼ x0 . Show that we thus obtain a (first) bijective correspondence: x ←→ An /Ax Umn (A) (1) stably free modules of rank n − 1, of type 1 ' GLn (A) isomorphism What are the unimodular vectors that correspond to a free module? def 2. Let x ∈ Umn (A). Show that x⊥ = Ker tx is a stably free module of rank n − 1, of type 1, and that for x0 ∈ Umn (A), we have x⊥ ' x0⊥ if and only if GLn (A) x ∼ x0 . Prove that we thus obtain a (second) bijective correspondence: x ←→ x⊥ Umn (A) (2) stably free modules of rank n − 1, of type 1 ' GLn (A) isomorphism 3. If E is stably free of rank r and of type t, the same goes for its dual E ? . For t = 1, describe the involution of Umn (A)/GLn (A) induced by the involution E ↔ E?. GLn (A) 4. Let x, x0 , y ∈ An such that txy = tx0 y = 1. Why do we have x ∼ x0 ? Explicate g ∈ GLn (A) such that gx = x0 , g of the form In + uv with vu = 0 and v unimodular. Deduce that for n > 3, g ∈ En (A), and so x En (A) ∼ x0 . 956 XVII. Suslin’s stability theorem Exercise 5. (Autodual stably free modules of type 1) 1. Let a, b ∈ A, x = (x1 , . . . , xn ) ∈ An with n > 3 and ax1 + bx2 be invertible modulo hx3 , . . . , xn i (in particular, x is unimodular). Let x0 = (−b, a, x3 , . . . , xn ). Explicate z ∈ An such that hx | zi = hx0 | zi = 1. Deduce, for G = GLn (A) (or better yet for G = En (A)), that G G x ∼ x0 ∼ (a, b, x3 , . . . , xn ). E4 (A) 2. Let x, y ∈ A4 such that hx | yi = 1. Show that x ∼ y. In particular, the stably free module x⊥ = Ker tx is isomorphic to its dual. 3. Analogous question to the previous one by replacing 4 with any even number n > 4. Some solutions, or sketches of solutions Exercise 1. 2. We establish the formulas N = (In + U V )−1 = In − U M V, M = (Im + V U )−1 = Im − V N U 4. We know that In + U V is invertible. Let N = (In + U V )−1 , M = (Im + V U )−1 . We have therefore N +U V N = In = N +N U V and M +V U M = Im = M +M V U . We realize the following elementary operations  In + U V 0  then In + U V 0  −U M In MV  In 0 −N U Im −U M  In V   0 M U Im In 0 =   0 Im In MV  In + U V 0 =  = −U M In MV 0 MV U + M   −U M  = ,  , In MV 0 Im and finally  In MV 0 Im  In −M V  0 Im  = In 0 0 Im  . We therefore have explicated matrices α, β, γ, δ ∈ En+m (A) such that  hence In + U V 0 0 (Im + V U )−1  In + U V 0 0 (Im + V U )−1  In MV  0 Im In 0 −U Im    α β γ δ = In+m , = δ −1 γ −1 β −1 α−1 = In −V 0 Im  In the special case where V U = 0, we have shown that  In + U V 0 0 Im  ∈ En+m (A). In 0 NU Im  .  , Solutions of selected exercises 957 Exercise 2. By using ad0 = 1 + bc0 , ad = 1 + bc, we obtain for A0−1 A  d0 −b −c0 a  a b c d   = ad0 − bc bd0 − bd ac − ac0 ad − bc0   = 1 + b(c0 − c) b(d0 − d) a(c − c0 ) 1 + b(c − c0 )  . By replacing b(c0 − c) with a(d0 − d), we see that A0−1 A = I2 + uv with  u= d0 − d c − c0  ,v=  a b  , vu = 0, and v unimodular. Exercise 3. We have {au, b} = {a, b}{u, b}. But au = 1 − bv so {au, b} = {1 − bv, b} = {1, b} = 1. Recap: {a, b}{u, b} = 1. Similarly, {u, b}{u, v} = 1, so {a, b} = {u, v}. Finally, (a − v)u + (b + u)v = 1, so {a − v, b + u} = {u, v}. Exercise 4. 1. Let y ∈ An such that tyx = 1. We have An = Ax ⊕ Ker ty and so An /Ax ' Ker ty is stably free. GLn (A) If x ∼ x0 , it is clear that An /Ax ' An /Ax0 . Conversely, let ϕ : M = An /Ax → M 0 = An /Ax0 be an isomorphism. We have An ' M ⊕ Ax ' M 0 ⊕ Ax0 . We define ψ : Ax → Ax0 , ax 7→ ax0 . Then ϕ ⊕ ψ GLn (A) seen in GLn (A) transforms x into x0 , so x ∼ x0 . A unimodular vector x ∈ An provides a free module An /Ax if and only if x is part of a basis of An . 2. Let M = x⊥ , M 0 = x0⊥ and assume M ' M 0 . By denoting by M̊ ⊆ (An )? the orthogonal of M ⊆ An , we have M̊ = A tx and M̊ 0 = A tx0 . If hx | yi = 1, hx0 | y 0 i = 1, we have An = Ay ⊕ M = Ay 0 ⊕ M 0 , hence an automorphism of An transforming M into M 0 (send y to y 0 ), then by duality, an automorphism u of (An )? ' An transforming A tx into A tx0 . We deduce u( tx) = ε tx0 with ε ∈ A× . Then, ε−1 tu transforms x into x0 . 3. If G = E ⊕ F , then G? ' E ? ⊕ F ? ; with G = Ar+t ' G? , F = Ar ' F ? , we obtain the result. The involution induced over Umn (A)/GLn (A) is the following: to the class modulo GLn (A) of x ∈ Umn (A), we associate the class modulo GLn (A) of an element y ∈ Umn (A) that satisfies hx | yi = 1. Naturally, there are several y that are suitable but their class modulo GLn (A) is well-defined. GLn (A) 4. We have An = Ay ⊕ x⊥ = Ay ⊕ x0⊥ hence x⊥ ' x0⊥ ' An /Ay so x ∼ x0 . To determine g ∈ GLn (A) realizing gx = x0 , we use An = Ax ⊕ y ⊥ = Ax0 ⊕ y ⊥ . Generally, let G = E ⊕ F = E 0 ⊕ F ; to explicate some automorphism of G mapping E to E 0 , we proceed as follows. Let π be the projection over E, π 0 be the projection over E 0 and p = IG − π, p0 = IG − π 0 . The projectors p and p0 have the same image F . Let h = p0 − p = π − π 0 . We obtain h2 = 0 and (IG − h)p(IG + h) = p0 , or (IG − h)π(IG + h) = π 0 . Therefore IG − h is an automorphism of G transforming Im π = E into Im π 0 = E 0 . Here E = Ax, E 0 = Ax0 , F = y ⊥ , so π(z) = hz | yix, π 0 (z) = hz | yix0 , h(z) = hz | yi(x − x0 ). The desired automorphism of An that transforms x into x0 is therefore In − h : z 7→ z + hz | yi(x0 − x) 0 i.e. In − h = In + uv with u = x − x ∈ An×1 , v = ty ∈ A1×n ; we indeed have vu = 0 and v unimodular. 958 XVII. Suslin’s stability theorem Exercise 5. 1. The key to the problem is found in the double equality, for some u in A, z1 = u(a + x2 ), z2 = u(b − x1 ), which implies z1 x1 + z2 x2 = u(ax1 + bx2 ) = z1 b + z2 (−a). Let u such that u(ax1 + bx2 ) + z3 x3 + · · · + zn xn = 1 and z = (z1 , z2 , z3 , . . . , zn ). G E2 (A) We then have hz | xi = hz | x0 i = 1. By Exercise 4, x ∼ x0 . As (b, −a) ∼ (a, b), G we have x ∼ (a, b, x3 , . . . , xn ). 2. As x1 y1 + x2 y2 + x3 y3 + x4 y4 = 1, we have G G (x1 , x2 , x3 , x4 ) ∼ (y1 , y2 , x3 , x4 ) ∼ (y1 , y2 , y3 , y4 ) The rest of the question immediately stems from this. 3. Analogous method to the previous question. Bibliographic comments Section 2 and the proof of Theorem 4.9 follow very closely the presentation in [Gupta & Murthy]. For the most part we have only transformed a few abstract local-global arguments into concrete arguments via the use of the local-global machinery with prime ideals explained in Section XV -5. Section 3 is directly inspired by [Lam06, chapter VI, section 2]. Annex. Constructive logic Contents 1 2 3 4 5 6 Introduction . . . . . . . . . . . . . . . . . . . . . . . Basic objects, Sets, Functions . . . . . . . . . . . . . Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The non-negative integers . . . . . . . . . . . . . . . . . Sets of pairs . . . . . . . . . . . . . . . . . . . . . . . . Functions . . . . . . . . . . . . . . . . . . . . . . . . . . Finite, bounded, enumerable and countable sets . . . . Subsets of a set . . . . . . . . . . . . . . . . . . . . . . . Asserting means proving . . . . . . . . . . . . . . . . Connectives and quantifiers . . . . . . . . . . . . . . Mechanical computations . . . . . . . . . . . . . . . Principles of omniscience . . . . . . . . . . . . . . . . The Little Principle of Omniscience . . . . . . . . . . . The Lesser Limited Principle of Omniscience . . . . . . The Law of Excluded Middle . . . . . . . . . . . . . . . Problematic principles . . . . . . . . . . . . . . . . . . Markov’s Principle . . . . . . . . . . . . . . . . . . . . . Principles of uniform continuity . . . . . . . . . . . . . Exercises and problems . . . . . . . . . . . . . . . . . Bibliographic comments . . . . . . . . . . . . . . . . – 959 – . . . . . . . . . . . . . . . . . . . . 960 960 960 961 961 961 963 964 965 966 968 969 969 971 973 973 974 974 975 975 960 Annex Introduction This annex is devoted to presenting a few basic concepts of constructive mathematics in Bishop’s style, illustrated by the three founding works [Bishop, Bishop & Bridges, MRR]. By constructive logic, we mean the logic of constructive mathematics. 1. Basic objects, Sets, Functions Non-negative integers and constructions are two primitive notions. They cannot be defined. Other primitive notions are closely tied to common language and are difficult to place. For example the equality of the number 2 in two distinct occurrences. The formalization of a piece of mathematics can be used to better understand what we are doing to it. However, to speak about a formalism it is necessary to understand a lot of things that are of the same type of complexity as the non-negative integers. Thus, the formalism is only a tool and it cannot replace intuition and basic experience (for example the non-negative integers, the constructions): as powerful as a computer may be, it will never understand “what it does,” or, as René Thom used to say, “All that is rigorous is insignificant.” Sets A set (X, =X , 6=X ) is defined by saying: — how to construct an element of the set (we say that we have defined a preset X) — what is the meaning of the equality of two elements of the set (we have to prove that it is indeed an equivalence relation) — what is the meaning of the distinction 1 of two elements of the set (we then say that the elements are discernible or distinct). We need to show the following properties: – (x 6=X y ∧ x =X x0 ∧ y =X y 0 ) ⇒ x0 6=X y 0 , – x 6=X x is impossible, – x 6=X y ⇒ y 6=X x. 1 This terminology is not a homage to Pierre Bourdieu. All in all, we prefer distinction to non-equality, which presents the disadvantage of a negative connotation, and to inequality which is rather used in the context of order relations. For the real numbers for example, it is the equality and not the distinction that is a negative assertion. 1. Basic objects, Sets, Functions 961 Ordinarily, we drop the index X for the symbols = and 6=. If the distinction is not specified, it is implicitly defined as meaning the absurdity of the equality. A distinction relation is called a separation relation if it satisfies the following cotransitivity property (for three arbitrary elements x, y, z of X): – x 6=X y ⇒ (x 6=X z ∨ y 6=X z). A separation relation 6=X is said to be narrow if x =X y is equivalent to the absurdity of x 6=X y. In a set with a narrow separation, distinction is often more important than equality. A set (X, =X , 6=X ) is said to be discrete if we have ∀x, y ∈ X (x =X y ∨ x 6=X y). In this case the distinction is a narrow separation and it is equivalent to the absurdity of the equality. The non-negative integers The set N = {0, 1, 2, . . .} of non-negative integers is considered as a priori well-defined. However, note that constructively this is a potential infinity and not an actual infinity. By the idea of a potential infinite we mean that the infiniteness of N is apprehended as an essentially negative notion; we never stop exhausting the non-negative integers. On the contrary, the semantic of N in classical mathematics is that of a completed infinite, which exists “somewhere,” at least in a purely ideal way. A non-negative integer can be encoded in the usual way. The comparison of two integers given in a coded form can be made reliably. In short, the set of non-negative integers is a discrete set and the order relation is decidable ∀n, m ∈ N (n < m ∨ n = m ∨ n > m) Sets of pairs When two sets are defined their Cartesian product is also naturally defined: the fabrication of the pairs of objects is an elementary construction. Equality and distinction over a Cartesian product are naturally defined. Functions The set NN of sequences of non-negative integers depends on the primitive notion of construction. An element of NN is a construction that takes as input an element of N and gives as output an element of N. The equality of two elements in NN is the extensional equality (un ) =NN (vn ) signifies ∀n ∈ N un = vn . Thus, the equality between two elements of NN a priori asks for an infinity of “elementary computations,” actually the equality demands a proof. 962 Annex The distinction of two elements of NN is the extensional distinction relation (un ) 6=NN (vn ) def ⇐⇒ ∃n ∈ N un 6= vn . Thus, the distinction of two elements of NN can be observed by a simple computation. 1.1. Example. The distinction of NN is a narrow separation relation. Cantor’s diagonalization argument is constructive. It shows that NN is much more complicated than N. From a constructive point of view, N and NN are only potential infinities: it holds no meaning to say that a potential infinity is greater than another. Digression. When you say “I give you a sequence of non-negative integers,” you must prove that the construction n 7→ un that you propose works for any input n. Moreover, when you say “Let us consider an arbitrary sequence of non-negative integers (un )n∈N ,” the only thing that you know for certain is that for all n ∈ N, you have un ∈ N, and that this un is nonambiguous: you can for example conceive the sequence as given by an oracle. Actually, you could a priori ask, symmetrically, what exactly is the construction n 7→ un , and a proof that this construction works for every input n. However, in the constructivism à la Bishop, we make no specific assumptions regarding “what the legitimate constructions from N to N are,” nor on “what precisely is a proof that a construction works.” Thus we are in a dissymmetrical situation. This dissymmetry has the following consequence. Everything you prove has a computational content, but everything you prove is also valid from a classical point of view. Classical mathematics could regard constructive mathematics as only speaking of constructive objects, and Bishop’s constructive mathematics is certainly primarily interested in constructive objects (see [17]). But in fact, the constructive proofs à la Bishop work for any type of mathematical object.2 The theorems that we find in [Bishop & Bridges] and [MRR] are valid in classical mathematics, but they also support the Russian constructive interpretation (in which all the mathematical objects are words from a formal language that we could fix once and for all) or yet again Brouwer’s intuitionist philosophy, which has a significantly idealistic component. After this digression let us get back on topic: functions. Generally, a function f : X → Y is a construction that takes as input some x ∈ X and a proof that x ∈ X, and gives as output some y ∈ Y and a proof that y ∈ Y . 2. . . if there exist nonconstructive mathematical objects. 1. Basic objects, Sets, Functions 963 In addition, this construction must be extensional x =X x0 ⇒ f (x) =Y f (x0 ) and f (x) 6=Y f (x0 ) ⇒ x 6=X x0 . When X and Y are well-defined sets, we consider (in constructive mathematics à la Bishop) that the set F(X, Y ) of functions f : X → Y is also well-defined. For the equality and the distinction we take the usual extensional definitions. A function f : X → Y is injective if it satisfies f (x) =Y f (x0 ) ⇒ x =X x0 and x 6=X x0 ⇒ f (x) 6=Y f (x0 ). Finite, bounded, enumerable and countable sets We now give a certain number of pertinent constructive definitions related to the concepts of finite, infinite and countable sets in classical mathematics. • A set is said to be finite if there is a bijection between this set and the set of integers < n for a certain integer n (this is the definition given page 84). • A set X is said to be finitely enumerable if there is a surjective map [0, n[ → X for some integer n (this is the definition given page 84). • A preset X is said to be enumerable if we have given a means to enumerate it that allows it to possibly be empty, which happens in N practice as follows.3 We give some α ∈ {0, 1} and some operation ϕ that satisfy the following two assertions: – if α(n) = 1 then ϕ constructs from the input n an element of X, – every element of X is constructed as such. • A set is said to be countable if it is enumerable (as a preset) and discrete. • If n is a nonzero integer, we say that a set has at most n elements if for every family (ai )i=0,...,n in the set there exist integers h and k (0 6 h < k 6 n) such that ah = ak . • A set X is bounded in number, or bounded, if there exists some nonzero integer n such that X has at most n elements (this is the definition given page 408). • A set X is weakly finite if for every sequence (un )n∈N in X there exist m and p > m such that um = up . • A set X is infinite if there exists an injective map N → X. 1.2. Example. with N. 3 The An infinite and countable set can be put in bijection definition given on page 84 is only for nonempty sets. 964 Annex Subsets of a set A subset of a set (X, =X , 6=X ) is defined by a property P (x) regarding the elements of X, i.e. satisfying  ∀x, y ∈ X ( x = y ∧ P (x) ) =⇒ P (y) . An element of the subset { x ∈ X | P (x) } is given by a pair (x, p) where x is an element of X and p is a proof that P (x).4 Two properties concerning the elements of X define the same subset when they are equivalent. We can also present this as follows, which, although amounting to the same thing, causes a slightly milder headache to the newcomer. A subset of X is given by a pair (Y, ϕ) where Y is a set and ϕ is an injective function of Y into X.5 Two pairs (Y, ϕ) and (Y 0 , ϕ0 ) define the same subset of X if we have ∀y ∈ Y ∃y 0 ∈ Y 0 ϕ(y) = ϕ0 (y 0 ) and ∀y 0 ∈ Y 0 ∃y ∈ Y ϕ(y) = ϕ0 (y 0 ). In constructive mathematics the subsets of a set X are not considered to form a set, but a class. This class is clearly not a set (in the sense given earlier). The intuition is the following: the sets are sufficiently well-defined classes so that we can universally or existentially quantify over their elements. For this, it is necessary for the procedure of construction of elements to be clear. Recall that a subset Y of X is said to be detachable when we have a test for “x ∈ Y ?” when x ∈ X. The detachable subsets of X form a set that can be identified with {0, 1}X . Constructively, we do not know of any detachable subsets of R, besides ∅ and R: there are no holes in the continuum without the logic of the excluded middle. Remark. An interesting constructive variant for “a subset Y1 of X” is obtained by considering a pair (Y1 , Y2 ) of subsets of X that satisfy the following two properties ∀x1 ∈ Y1 ∀x2 ∈ Y2 x1 6=X x2 and ∀x ∈ X ¬(x ∈ / Y1 ∧ x ∈ / Y2 ). The complement is then given by the pair (Y2 , Y1 ), which re-establishes a certain symmetry. The class of subsets of a set Let P(X) be the class of subsets of the set X. If we admitted P({0}) as a 4 For 5 For example, a nonnegative real number is slightly more than a real number. example we can define the real numbers > 0 as those that are given by the Cauchy sequences of non-negative rational numbers. 2. Asserting means proving 965 set, then P(X) would also be a set  and there would be a natural bijection between P(X) and F X, P({0}) = P({0})X . This shows that all the difficulties with the set of subsets are focused on the class P({0}), i.e. the class of truth values. In classical mathematics, we admit that this class is a set with two elements. This is the Law of Excluded Middle LEM: P({0}) = {{0}, ∅} (the class of truth values reduces to the set {True, False}) and we obviously no longer have any issues with P(X). 2. Asserting means proving In constructive mathematics truth is also the result of a construction. If P is a mathematical assertion, we write “ ` P ” for “we have a proof of P .” The elementary assertions can be tested by simple computations. For example, the comparison of two non-negative integers. When an assertion means an infinity of elementary assertions (e.g. the Goldbach conjecture6 ), constructive mathematics consider it not to be a priori “true or false.” A fortiori, the assertions having an even greater logical complexity are not considered (from a constructive point of view) as having a priori the truth value True or False. This must not be necessarily considered as a philosophical position concerning truth, but it is surely a mathematical position concerning mathematical assertions. Actually, it is necessary to assume this position; in order to be of computational significance, all theorems must be proven constructively. Downright philosophical digression. This position is also to be distinguished from the position that consists in saying that there certainly are different possible mathematical universes, for instance one in which the continuum hypothesis7 is true, another in which it is false. This position is naturally perfectly defendable (Cantor, and no doubt Gödel, would have rejected it in the name of a Platonic realism of Ideas), but it is of little interest to constructive mathematics à la Bishop which have as its object of study an abstraction of the concrete universe of finite computations, with the idea that this abstraction must correspond as closely as possible to the reality that it wants to describe. Thus, the continuum hypothesis is in this framework rather considered as empty of meaning, because it is vain to 6 Every 7 The even number > 4 is the sum of two prime numbers. continuum hypothesis is, in classical set theory, the assertion that there is no cardinal strictly between that of N and that of R, in other words, that every infinite subset of R is equipotent to N or to R. 966 Annex want to compare potential infinites according to their size. If we desire to compare them according to their complexity, we quickly realize that there is no hope of defining a true total order relation on this mess. Consequently, the continuum hypothesis today seems to be nothing other than a game of experts in the formal theory of ZF. But each one of us is free to believe Plato, or even Cantor, or Zermelo-Frankel, or yet again Ð why not Ð to believe in the multiplicity of worlds. No one will ever be able to prove the latter wrong. In fact nothing says that the ZF game will not one day prove to be really useful, for instance in understanding certain subtle points of mathematics that have a concrete meaning. 3. Connectives and quantifiers Here we give the “Brouwer-Heyting-Kolmogorov” explanation for the constructive meaning of the usual logical symbols. They are only informal explanations, not definitions.8 These are “detailed” explanations, as for the logical connectives and the quantifiers, regarding what we mean by the slogan “asserting means proving.” When we write ` P we imply that we have a constructive proof of P . We will make this explicit by giving a name, for example p, to this mathematical object that is the proof of P . Then the explanations regard these particular objects p, but all of this remains informal. Conjunction: ` P ∧ Q means: “ ` P and ` Q” (as for classical logic). In other terms: a proof of P ∧ Q is a pair (p, q) where p is a proof of P and q a proof of Q. Disjunction: ` P ∨ Q means: “ ` P or ` Q” (which does not work with classical logic). In other terms: a proof of P ∨ Q is a pair (n, r) with n ∈ {0, 1}. If n = 0, r must be a proof of P , and if n = 1, r must be a proof of Q. Implication: ` P ⇒ Q has the following meaning: a proof of P ⇒ Q is a construction p 7→ q that transforms every proof p of P into a proof q of Q. Negation: ¬P is an abbreviation of P ⇒ 0 =N 1. Universal quantifier: (similar to implication). A quantification is always a quantification on the objects of a previously defined set. Let P (x) be a property regarding the objects x of a set X. 8 For Kolmogorov’s point of view, more precisely on “the logic of problems”, see [118, Kolmogorov] and [33, Coquand]. 3. Connectives and quantifiers 967 Then ` ∀x ∈ X P (x) has the following meaning: we have a construction (x, q) 7→ p(x, q) that takes as input any pair (x, q), where x is an object and q is a proof that x ∈ X, and gives as output a proof p(x, q) of the assertion P (x). For a quantification on N, giving a non-negative integer x (in the standard form) suffices to prove that x ∈ N: the proof q in the pair (x, q) above can be omitted. 3.1. Example. Suppose that the properties P and Q depend on a variable x ∈ N. Then a proof of ∀x ∈ N P (x) ∨ Q(x) is a construction N 3 x 7→  n(x), r(x) , where n(x) ∈ {0, 1}: if n(x) = 0, r(x) is a proof of P (x), and if n(x) = 1, r(x) is a proof of Q(x). Existential quantifier: (similar to disjunction) A quantification is always a quantification on the objects of a previously defined set. Let P (x) be a property regarding the objects x of a set X. Then ` ∃x ∈ X P (x) has the following meaning: a proof of ∃x ∈ X P (x) is a triple (x, p, q) where x is an object, p is a proof of x ∈ X, and q a proof of P (x). 3.2. Example. Let P (x, y) be a property regarding the non-negative integers x and y. Then the assertion ` ∀x ∈ N ∃y ∈ N P (x, y) means: here is a pair (u, p) where u is a construction  u : x 7→ y = u(x) from N to N and p is a proof of ` ∀x ∈ N P x, u(x) . 3.3. Example. (Propositional logics) The class of truth values in constructive mathematics is a Heyting algebra. NB: By P({0}) being a class and not a set we simply mean that the connectives ∧, ∨ and → and the constants True and False satisfy the axioms of the Heyting algebras. In particular, let A, B, C be mathematical properties. We have the following equivalences.   ` (A ⇒ C) ∧ (B ⇒ C) ⇐⇒ (A ∨ B) ⇒ C   ` A ⇒ (B ⇒ C) ⇐⇒ (A ∧ B) ⇒ C ` ¬(A ∨ B ) ⇐⇒ (¬A ∧ ¬B) ` (A ⇒ B) =⇒ (¬B ⇒ ¬A) ` ¬¬¬A ⇐⇒ ¬A In addition, if we have ` A ∨ ¬A and ` B ∨ ¬B, then we have ` ¬¬A ⇐⇒ A ` ¬(A ∧ B ) ⇐⇒ (¬A ∨ ¬B) ` (A ⇒ B) ⇐⇒ (¬A ∨ B) 968 Annex Remark. Since ¬¬¬A ⇔ ¬A, a property C is equivalent to a property ¬B (for a certain property B not yet specified) if and only if ¬¬C ⇒ C. Thus, in constructive mathematics we can define the concept of negative property. In classical mathematics, the concept is pointless since every property is negative. In constructive mathematics, care must be taken because True is also a negative property, since False ⇒ False, ¬False is equal to True. 4. Mechanical computations Here we discuss a point that classical mathematicians often fail to appreciate. A function from N to N is given by a construction. The usual constructions correspond to algorithmic programs that can run on an “ideal” computer.9 This leads to the notion of mechanical computations. A function f ∈ NN obtained by such a mechanical computation is called a recursive function. The subset Rec ⊂ NN formed by the recursive functions can then be described more formally as we will now explain. Recall that a primitive recursive function is a function Nk → N that can be defined by composition or by simple recurrence from primitive recursive functions already defined (we start with the constant functions and addition +). Let us denote by Prim2 the set of primitive recursive functions N2 → N. We easily prove that Prim2 is an enumerable set. A function β ∈ Prim2 can be thought of as simulating the execution of a program as follows. For an input n we compute β(n, m) for m = 0, 1, . . . until β(n, m) 6= 0 (intuitively: until the program reaches the instruction Halt). Then, the function α ∈ Rec computed by the “program” β ∈ Prim2 is: f : n 7→ β(n, mn ) − 1 where mn is the first value of m such that β(n, m) 6= 0. Thus, we obtain a surjective map from a subset Rec of Prim2 onto Rec, and Rec can be identified with the preset Rec equipped with the suitable equality and distinction. This means that Rec is defined as a “quotient”(10 ) of a subset of an enumerable set. The elements of the subset Rec of Prim2 are defined by the following condition: def β ∈ Rec ⇐⇒ (∗) : ∀n ∈ N ∃m ∈ N β(n, m) 6= 0. From a classical point of view, for any β ∈ Prim2 , the above assertion (∗) is true or false in the absolute, in reference to the logic of the excluded middle (or, if you prefer, to the actual infinity of N): the notion of a mechanical computation can thus be defined without any reference to a primitive notion of construction. 9A computer having all the space and time necessary for the considered computation. 10 Since Rec is the image of Rec under a surjective map. 5. Principles of omniscience 969 However, from a constructive point of view, the assertion (∗) must be proven, and such a proof is itself a construction. Thus the notion of a mechanical computation depends on the notion of construction, which cannot be defined. To finish this section, let us note that the Russian constructivism à la Markov admits as a fundamental principle the equality Rec = NN , a principle sometimes called the false Church’s thesis. See [Beeson, Bridges & Richman] and [159, Richman]. The true Church’s thesis is that no automated system of computation will ever be able to compute other functions than the recursive functions: we will be able to improve the performances of computers, but no automated system of computation will be able to surpass what they know how to compute “in principle” (i.e. if they dispose of the necessary time and space). The true Church’s thesis is extremely likely, but obviously it is unlikely to have a proof. 5. Principles of omniscience A principle of omniscience is a principle that, although true in classical mathematics, clearly poses a problem in constructive mathematics, because it a priori assumes knowledge of what happens with a potential infinity. The word omniscience here is therefore valid for “prescience of the potential infinite.” The principles of omniscience in general have strong counterexamples in Russian constructive mathematics. They however cannot be disproven in constructive mathematics à la Bishop, because they are compatible with classical mathematics. The Little Principle of Omniscience Let α = (αn ) ∈ {0, 1}N be a binary sequence, i.e. a construction that gives for each non-negative integer (as input) an element of {0, 1} (as output). Consider the following assertions ∀α P (α) ¬P (α) P (α) ∨ ¬P (α)  P (α) ∨ ¬P (α) : : : : αn = 1 for some n, αn = 0 for all n, P (α) or ¬P (α), for every binary sequence α, P (α) or ¬P (α). A constructive proof of P (α) ∨ ¬P (α) should provide an algorithm that either shows that αn = 0 for all n, or computes a non-negative integer n such that αn = 1. Such an algorithm is much too efficient, because it would allow us to automatically solve a great number of important conjectures. In fact we know that if such an algorithm exists, it is certainly not “mechanically computable”: a program that runs on a machine can surely not accomplish 970 Annex such a thing even when we impose the limitation on the input α that it be an explicit primitive recursive binary sequence. This impossibility is a grand theorem of computability theory, often indicated under the name “undecidability of the Halting Problem.” Undecidability of the Halting problem (We cannot know everything) In three immediately equivalent forms: • We cannot automatically assure the halting of programs: there exists no program T that can test if an arbitrary program P will eventually reach its Halt instruction. • There exists no program that can test if an arbitrary primitive recursive sequence is identically null. • There exists no program U that takes as input two integers, gives as output a Boolean, and that enumerates all the programmable binary sequences (the sequence n 7→ U (m, n) is the mth sequence enumerated by U ). Not only does this theorem, in its last formulation, resemble Cantor’s theorem which asserts that we cannot enumerate the set of binary sequences, but the (very simple) proof is essentially the same. Although the previous theorem does not a priori forbid the existence of an effective but not mechanizable procedure to systematically solve this type of problem, it confirms the intuitive idea according to which new ingenuity will always have to be shown to progress in our knowledge of the mathematical world. Thus, from a constructive point of view, we reject the Limited Principle of Omniscience. LPO: If (αn ) is a binary sequence, then either there exists some n such that αn = 1, or αn = 0 for every n. Here it is in a more concentrated form. LPO: ∀α ∈ NN , (α 6= 0 ∨ α = 0) We will call an elementary property a property equivalent to ∃n α(n) 6= 0 for a certain α ∈ NN . The principle LPO has several equivalent forms. Here are a few of them. 1. If A is an elementary property, we have A ∨ ¬A. 2. Every sequence in N is either bounded, or unbounded. 3. Every decreasing sequence in N is constant from a certain rank. 5. Principles of omniscience 971 4. From a bounded sequence in N we can extract a constant infinite subsequence. 5. Every enumerable subset of N is detachable. 6. Every enumerable subset of N is either finite, or infinite. 7. For every double sequence of integers β : N2 → N we have ∀n ∃m β(n, m) = 0 ∨ ∃n ∀m β(n, m) 6= 0 8. Every detachable subgroup of Z is generated by a single element. 9. Every subgroup of Zp generated by an infinite sequence is finitely generated. 10. ∀x ∈ R, ( x 6= 0 ∨ x = 0 ). 11. ∀x ∈ R, ( x > 0 ∨ x = 0 ∨ x < 0 ). 12. Every monotone bounded sequence in R converges. 13. From a bounded sequence in R we can extract a convergent subsequence. 14. Every real number is either rational or irrational. 15. Every finitely generated vector subspace of Rn admits a basis. 16. Every separable Hilbert space admits – either a finite Hilbert basis – or a countable Hilbert basis. The Lesser Limited Principle of Omniscience Another, weaker, principle of omniscience LLPO (Lesser Limited Principle of Omniscience) is the following. LLPO: If A and B are two elementary properties, we have ¬(A ∧ B) =⇒ (¬A ∨ ¬B) This principle LLPO has several equivalent forms. 1. ∀ α, β non-decreasing sequences ∈ NN , if ∀n α(n)β(n) = 0, then α = 0 or β = 0. 2. ∀α, β ∈ NN , if ∀n, m ∈ N α(n) 6= β(m) then ∃γ ∈ NN such that  ∀n, m ∈ N γ(α(n)) = 0 ∧ γ(β(m)) = 1 . 3. ∀α ∈ NN , ∃k ∈ {0, 1}, ( ∃n α(n) = 0 ⇒ ∃m α(2m + k) = 0). 4. ∀x ∈ R ( x 6 0 ∨ x > 0 ) (this allows us to make many proofs by dichotomy with the real numbers.) 5. ∀x, y ∈ R ( xy = 0 ⇒ ( x = 0 ∨ y = 0 ) ). 6. The image of an interval [a, b] ⊂ R under a uniformly continuous real function is an interval [c, d]. 972 Annex 7. A uniformly continuous real function over a compact metric space attains its least upper bound and its greatest lower bound. 8. KL1 (one of the versions of König’s lemma) Every explicit, infinite, finitely branching tree has an infinite path. It is known that if an algorithm exists for the third item it cannot be “mechanically computable” (i.e. recursive): we can construct mechanically computable α and β satisfying the hypothesis, but for which no mechanically computable γ satisfies the conclusion. Similarly, Kleene’s singular tree is an infinite countable recursive finitely branching tree that has no infinite recursive path. This gives a “recursive counterexample” for KL1 . We will now prove the equivalence KL1 ⇔ LLPO. 11 An explicit infinite finitely branching tree can be defined by a set A ⊂ Lst(N) of lists of integers satisfying the following properties (the first four corresponding to the notion of an explicit finitely branching tree). • The empty list [ ] represents the root of the tree, it belongs to A, • an a = [a1 , . . . , an ] ∈ A represents both a node of the tree and the path that goes from the root to the node, • if [a1 , . . . , an ] ∈ A and n > 1, then [a1 , . . . , an−1 ] ∈ A, • if a = [a1 , . . . , an ] ∈ A the x’s ∈ N such that [a1 , . . . , an , x] ∈ A form a segment { x ∈ N | x < µ(a) } where µ(a) is explicitly given in terms of a: the branches stemming from a are numbered 0, . . . , µ(a) − 1. • For all n ∈ N there is at least one [a1 , . . . , an ] ∈ A (the tree is explicitly infinite). Thus the subset A of Lst(N) is detachable (this is ultimately what the word “explicit” means here), and A is countable. Proof of KL1 ⇔ LLPO. We use the variant of LLPO given in item 1. Assume KL1 . Let α, β ∈ NN as in item 1. Consider the following tree. The root has two children. They form two distinct paths that grow indefinitely without ever branching out, until α(n) 6= 0 or β(n) 6= 0 (if this ever occurs). If this occurs with α(n) 6= 0, we stop the left branch and we continue the one on the right. If it occurs with β(n) = 0, we do the opposite. Explicitly giving an infinite branch in this tree amounts to certifying in advance that α = 0 or β = 0. 11 As for all the proofs in this annex, it is informal and we do not specify in which formal framework it could be written. The readers will notice in this proof a use of a construction by induction which actually stems from the Axiom of Dependent Choice, generally considered as non-problematic in constructive mathematics. 6. Problematic principles . . . 973 Conversely, assume LLPO. Consider an explicit infinite finitely branching tree. Suppose without loss of generality that the tree is binary: beyond a node there are at most two branches. We prove by induction that we can select up to depth n a path that reaches a node Kn underneath which the tree is infinite. This is true for n = 0 by hypothesis. If this is true for n, there is at least one branch underneath the selected node Kn . If there are two, consider the sequences αn and βn ∈ NN defined as follows — αn (m) = 0 if there is at least one branch of length m below Kn going to the right-hand side, otherwise αn (m) = 1 — βn (m) = 0 if there is at least a branch of length m below Kn going to the left-hand side, otherwise βn (m) = 1. By induction hypothesis the sequences (αn )n∈N and (βn )n∈N are nondecreasing and their product is null. We apply item 1 of LLPO: one of the two sequences is null and this gives us the means to select the path on the right or the left.  The Law of Excluded Middle The Law of Excluded Middle (LEM) states that P ∨ ¬P is true for every proposition P . This extremely strong principle of omniscience implies LPO. It implicitly assumes that sets such as N or NN or even significantly more complicated, are actual infinities. It also implies that every set X is discrete if we define x 6=X y as meaning ¬(x =X y). 6. Problematic principles in constructive mathematics By a problematic principle we mean a principle that, although satisfied in practice if we do constructive mathematics in Bishop’s style, is constructive unprovable. In classical mathematics, these principles are known as true or known as false. For example, in practice, if some α ∈ NN is constructively well-defined, it can be computed by a program. In other words, in practice, the false Church’s thesis, which we can write in the form Rec = NN , is satisfied in constructive mathematics. But it cannot be proven in the minimalist framework of constructive mathematics à la Bishop, which is compatible with classical mathematics, because the false Church’s thesis is a principle that is false in classical mathematics, in virtue of a cardinality argument. However, Russian constructive mathematics takes it as a fundamental axiom. Here we will (briefly) only examine two problematic principles, both true in classical mathematics. 974 Annex Markov’s Principle Markov’s Principle, MP, is the following ∀x ∈ R (¬x = 0 ⇒ x 6= 0). Asserting MP amounts to saying: for every binary sequence α, if it is impossible for all its terms to be null, then it must have a nonzero term. Or even: if A is an elementary property then ¬¬A ⇒ A. The Russian constructive school admits MP. Actually, for some α ∈ NN , it seems impossible to give a constructive proof of ¬(α = 0) without finding some n such that α(n) 6= 0. Thus MP is valid from a practical point of view in the constructivism à la Bishop. Note that LPO clearly implies MP. Principles of uniform continuity The principle of uniform continuity asserts that every pointwise continuous function over a compact metric space is uniformly continuous. It is equivalent to the same assertion in a special case, which is itself very close to one of the classical forms of König’s lemma. It is of particular interest to study the mutual relations between the following problematic principles, especially as they frequently appear in classical analysis. UC+ Every pointwise continuous function f : X → Y , with X a compact metric space and Y a metric space, is uniformly continuous. UC Every pointwise continuous function f : {0, 1}N → N is uniformly continuous. Min Every uniformly continuous real function > 0 over a compact metric space is bounded below by a real > 0. Min− Every uniformly continuous real function > 0 over a compact interval [a, b] is bounded below by a real > 0. Min+ Every continuous real function > 0 over a compact metric space is bounded below by a real > 0. FAN An explicit binary tree A that has no infinite path (i.e. ∀α ∈ {0, 1}N ∃m ∈ N α|m ∈ / A) is finite. In the formulation of FAN, we see that this principle is seemingly related to LLPO (see the last equivalent form KL1 cited on page 972). Actually, we can show that it is a consequence of LPO. But this is not a principle of omniscience. Besides, it does not imply LLPO. In constructive mathematics, LLPO is obviously false in practice, whereas FAN is satisfied in practice, because each time that we know how to constructively prove that a finitely branching tree has no infinite path, we also know how to prove that it is finite. Exercises and problems 975 Exercises and problems Exercise 1. Give proofs for examples 1.1, 1.2, 3.1, 3.2 and 3.3. Exercise 2. Explain why the notions of a finite set, a finitely enumerable set, a bounded set, a weakly finite set, and an enumerable bounded set cannot be identified in constructive mathematics. Explain why these notions coincide if we admit LEM. Exercise 3. Prove a few of the equivalences mentioned for LPO. Exercise 4. Prove a few of the equivalences mentioned for LLPO. Bibliographic comments The controversy on the nature and the use of the infinite in mathematics was very strong at the beginning of the 20th century: see for example Hilbert [103, 1926], Poincaré [147, 1909], H. Weyl [192, 1918], [Brouwer, 1951] and [Infinito, 1987]). The debate seems at first to have ended in favor of the point of view represented by classical logic. Actually, since the 60s and especially since the publication of BishopÕs book, the two points of view are considerably less contradictory than when they first appeared. A few interesting references on this theme: [Lorenzen, 1962], [161, Fred Richman, 1990], [Dowek2, 2007] and [135, Per Martin-Löf, 2008]. Constructive logic is often called “intuitionistic logic.” It was developed as a formal system by A. Heyting. There are pleasant presentations of such formal systems in the books [Lorenzen, 1962] and [David, Nour & Raffali, 2001]. The small book [Dowek1, 1995] also gives an interesting informal presentation. Concerning the discussion on the links between effectiveness and recursiveness, see [39, Coquand], [102, Heyting] and [171, Skolem]. The book [Beeson, 1985] carries out a systematic study of several problematic principles in constructive mathematics. For Kleene’s singular tree, see [Beeson, page 68] and [Kleene & Vesley, 1965]. The development and the comparison of formal systems able to serve as frameworks for the constructive mathematics employed in [Bishop] or [MRR] has been a very active research subject for a long time. We make sure to note the preponderant influence of the constructive theory of the types CTT of Per Martin-Löf, [133, 134] and [Martin-Löf, 1984], and of the theory CZF of Peter Aczel and Michael Rathjen ([1, Aczel] and [Aczel & Rathjen]). See also the recent developments in [HoTT, 2014] and Thierry Coquand’s webpage: http://www.cse.chalmers.se/~coquand/. 976 Annex Let us also cite the beautiful book [Feferman, 1998] which is inline with the propositions of Hermann Weyl. For a discussion of the “Fan Theorem”, see [34, Coquand]. The systematic study of the comparison (in constructive mathematics) of principles of omniscience (such as LPO or LLPO), as well as that of problematic principles (such as MP or FAN), has recently been the subject of a major boom. On this subject, we can refer to [12, 13, 14, Berger&al.] and [107, 108, 109, Ishihara]. Tables of theorems Dynamic methods Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . page Elementary local-global machinery of pp-rings . . . . . . . . . . . . . . . . . IV -6 204 Elementary local-global machinery of reduced zero-dimensional rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The dynamic method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -8 212 VII -2 394 Local-global machinery of arithmetic rings . . . . . . . . . . . . . . . . . . . . VIII -4 461 Basic local-global machinery (with prime ideals) . . . . . . . . . . . . . . . XV -5 869 Dynamic machinery with maximal ideals . . . . . . . . . . . . . . . . . . . . . . . XV -6 874 Dynamic machinery with minimal prime ideals . . . . . . . . . . . . . . . . . XV -7 877 Dynamic machinery with AhXi and A(X) . . . . . . . . . . . . . . . . . . . . . XVI -6 932 Concrete local-global principles Basic concrete local-global principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -2.3 22 Basic transfer principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -2.8 26 Coherent modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -3.5 33 Finitely generated modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -3.6 33 Rank of a matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -5.8 44 Locally simple linear maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -5.19 50 Exact sequences of modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -6.7 63 For monoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -6.9 64 Integral elements over a ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -8.9 127 Properties of linear maps between finitely presented modules . . . IV -3.1 189 Finitely presented modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -4.13 199 Quasi-integral rings (pp-rings) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -6.6 205 Finitely generated projective modules . . . . . . . . . . . . . . . . . . . . . . . . . . V -2.4 248 Galois algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -7.4 349 Flat modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII -1.7 447 pf-rings, arithmetic rings, Prüfer rings, locally principal ideals . . VIII -4.5 460 Flat or faithfully flat algebras, localization at the source . . . . . . . VIII -6.6 469 Similar or equivalent matrices (local-global ring) . . . . . . . . . . . . . . . IX -6.8 515 Isomorphic finitely presented modules (local-global ring) . . . . . . . IX -6.9 516 Quotient modules (local-global ring) . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -6.10 516 978 Tables of theorems Normal rings and integrally closed ideals . . . . . . . . . . . . . . . . . . . . . . . XII -2.10 689 Primitively algebraic elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -4.6 698 Dedekind rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -7.14 713 Krull dimension of rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -3.2 758 Krull dimension of morphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -7.3 767 Exact sequences and generalizations . . . . . . . . . . . . . . . . . . . . . . . . . . . XV -2.1 848 Finiteness properties for modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XV -2.2 850 Properties of commutative rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XV -2.3 851 Finiteness properties of algebras, localization at the source . . . . . XV -2.4 851 Finiteness properties of algebras, localization at the sink . . . . . . . XV -2.5 852 Concrete patching of elements of a module, or of homomorphisms between modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concrete patching of modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XV -4.2 860 XV -4.4 862 Concrete patching of ring homomorphisms . . . . . . . . . . . . . . . . . . . . . XV -4.6 866 Concrete local-global principle for equality in depth 1 . . . . . . . . . . XV -8.5 879 Concrete local-global principle for divisibility in depth 2 . . . . . . . XV -9.4 882 Concrete patching of elements in a module in depth 2 . . . . . . . . . . XV -9.8 884 Concrete patching of modules in depth 2 . . . . . . . . . . . . . . . . . . . . . . . XV -9.9 885 Vaserstein patching: equivalent matrices over A[X] . . . . . . . . . . . . XVI -3.6 909 Quillen patching: extended modules . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -3.7 909 Local-global principle à la Roitman . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -3.10 912 Concrete patching in the elementary group . . . . . . . . . . . . . . . . . . . . XVII -4.2 951 Rao’s concrete local-global principle . . . . . . . . . . . . . . . . . . . . . . . . . . . XVII -4.6 952 Closed covering principles For l-groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XI -2.10 629 Nilpotent, comaximal elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XI -4.18 Finitely generated modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XI -4.19 648 Rank of a matrix, finitely generated projective modules . . . . . . . . XI -4.20 648 Krull dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -3.3 758 647 Stability under scalar extension Finitely generated and finitely presented modules, tensor products, symmetric and exterior powers, exterior algebra . . . . . . . . . . . . . Fitting ideals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -4.11 197 IV -9.5 220 Finitely generated projective modules . . . . . . . . . . . . . . . . . . . . . . . . . . V -5.1 259 Determinant, characteristic polynomial, fundamental polynomial, rank polynomial, cotransposed endomorphism . . . . . . . . . . . . . . . V -8.8 275 Tables of theorems 979 Finitely generated, finitely presented, strictly finite algebras . . . . VI -3.11 318 Dualizing forms, Frobenius algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -5.3 328 Strictly étale algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -5.6 330 Separable algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -6.11 342 Separating automorphisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -7.3 349 Galois algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -7.13 355 Universal decomposition algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VII -4.1 405 Flat modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII -1.15 450 Converses in the faithfully flat extensions case . . . . . . . . . . . . . . . . . VIII -6.8 470 Theorems The basic local-global principle and systems of linear equations Basic concrete local-global principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -2.3 22 Gauss-Joyal lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -2.6 25 Characterization of coherent modules . . . . . . . . . . . . . . . . . . . . . . . . . . II -3.4 32 Fundamental system of orthogonal idempotents . . . . . . . . . . . . . . . . II -4.3 37 Lemma of the finitely generated idempotent ideal . . . . . . . . . . . . . . II -4.6 38 Chinese remainder theorem, general form (for the arithmetic form see Theorem XII -1.6) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Lemma of the invertible minor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -4.7 II -5.9 38 45 Freeness lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -5.10 45 Generalized Cramer formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -5.13 47 Magic formula à la Cramer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -5.14 48 Finitely generated submodules as direct summands of a free module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Injectivity and surjectivity criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -5.20 II -5.22 50 51 Locally simple matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II -5.26 53 Transitivity formulas for the trace and the determinant . . . . . . . . II -5.29 55 Transitivity formula for the discriminants . . . . . . . . . . . . . . . . . . . . . . II -5.36 59 The method of undetermined coefficients Elementary symmetric polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -1.5 88 Dedekind-Mertens lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -2.1 90 Kronecker’s theorem (1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -3.3 92 Uniqueness of the splitting field (strictly finite case). . . . . . . . . . . . III -6.7 107 Isomorphism extension theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -6.11 109 Galois correspondence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -6.14 112 980 Tables of theorems Construction of a splitting field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic elimination lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -6.15 113 III -7.5 121 Integrally closed polynomial ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -8.12 127 Splitting field, primitive element theorem . . . . . . . . . . . . . . . . . . . . . . III -8.16 129 Every nonzero finitely generated ideal of a number field is invertible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Multiplicative structure of finitely generated ideals of a number field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dedekind’s theorem, ideals that avoid the conductor . . . . . . . . . . . III -8.22 133 III -8.24 136 Weak Nullstellensatz and Noether position, see also theorem VII -1.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Classical Nullstellensatz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -9.5 140 III -9.7 142 Nullstellensatz over Z, formal Nullstellensatz . . . . . . . . . . . . . . . . . . . III -9.9 143 III -8.21 132 Nullstellensatz over Z, formal Nullstellensatz, 2 . . . . . . . . . . . . . . . . III -9.10 144 Newton’s method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -10.3 Residual idempotents lemma. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III -10.4 148 147 Finitely presented modules Matrices that present the same module . . . . . . . . . . . . . . . . . . . . . . . . IV -1.1 182 An ideal generated by a regular sequence is finitely presented . . IV -2.6 186 The ideal of a point is a finitely presented module . . . . . . . . . . . . . IV -2.8 Coherence and finite presentation (see also Proposition IV -4.12) IV -4.3 190 187 Direct sum of cyclic modules (uniqueness) . . . . . . . . . . . . . . . . . . . . . IV -5.1 201 An isomorphic quotient is a quotient by 0 . . . . . . . . . . . . . . . . . . . . . . IV -5.2 202 Quasi integral splitting lemma. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -6.3 203 Zero-dimensional splitting lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -8.10 212 The reduced zero-dimensional ring paradise . . . . . . . . . . . . . . . . . . . . IV -8.12 214 Zero-dimensional system over a discrete field . . . . . . . . . . . . . . . . . . . IV -8.16 216 Stickelberger’s theorem (zero-dimensional system) . . . . . . . . . . . . . IV -8.17 217 Annihilator and first Fitting ideal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -9.6 221 General elimination lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV -10.1 222 Algebraic elimination theorem: the resultant ideal . . . . . . . . . . . . . IV -10.2 223 Finitely generated projective modules, 1 Finitely generated projective modules . . . . . . . . . . . . . . . . . . . . . . . . . . V -2.1 245 Presentation matrix of a finitely generated projective module . . V -2.3 Schanuel’s lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enlargement lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 V -2.8 249 V -2.10 251 Zero-dimensional freeness lemma: item 2 of the theorem . . . . . . . V -3.1 253 Incomplete basis theorem: item 5 of the theorem . . . . . . . . . . . . . . . V -3.1 253 Tables of theorems 981 Bass’ theorem, stably free modules, with Bdim . . . . . . . . . . . . . . . . . V -4.10 259 Local structure theorem for finitely generated projective modules. See also Theorems II -5.26, V -8.14, X -1.5 and X -1.7 . . . . . . . . . Successive localizations lemma, 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V -6.1 261 V -7.2 263 Locally cyclic finitely generated modules, see also V -7.4 . . . . . . . . V -7.3 263 Determinant of an endomorphism of a finitely generated projective module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The fundamental system of orthogonal idempotents associated with a finitely generated projective module . . . . . . . . . . . . . . . . . . Explicit computations: determinant, characteristic polynomial, etc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Decomposition of a finitely generated projective module into a direct sum of modules of constant rank . . . . . . . . . . . . . . . . . . . . . . V -8.1 269 V -8.4 272 V -8.7 274 V -8.13 277 Strictly finite algebras and Galois algebras Structure theorem for étale K-algebras, 1 . . . . . . . . . . . . . . . . . . . . . . VI -1.4 303 Separable elements in a K-algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -1.6 304 Characterization of étale K-algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -1.7 305 Primitive element theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -1.9 305 Structure theorem for étale K-algebras, 2 . . . . . . . . . . . . . . . . . . . . . . VI -1.11 307 Separable closure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -1.18 309 Characterization of Galois extensions . . . . . . . . . . . . . . . . . . . . . . . . . . VI -2.3 Galois correspondence, synthesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -2.5 312 Direct sum in the category of k-algebras . . . . . . . . . . . . . . . . . . . . . . . VI -3.9 311 317 Lying Over: see also Lemma XII -2.8 . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -3.12 318 A weak Nullstellensatz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -3.15 320 When a k-algebra is a finitely presented k-module . . . . . . . . . . . . . VI -3.17 322 Transitivity for strictly finite algebras . . . . . . . . . . . . . . . . . . . . . . . . . . VI -4.5 326 Characterization of the dualizing forms in the strictly finite case VI -5.2 Characterization of strictly étale algebras . . . . . . . . . . . . . . . . . . . . . . VI -5.5 329 327 If k is reduced, so is any strictly étale k-algebra. . . . . . . . . . . . . . . . VI -5.8 330 Idempotents and scalar extension, strictly étale algebras . . . . . . . VI -5.12 332 Separability idempotent of a strictly étale algebra . . . . . . . . . . . . . . VI -6.8 340 Characteristic properties of separable k-algebras . . . . . . . . . . . . . . . VI -6.9 341 A strictly finite separable algebra is strictly étale. . . . . . . . . . . . . . . VI -6.13 343 Finiteness property of separable algebras. . . . . . . . . . . . . . . . . . . . . . . VI -6.14 344 Over a discrete field, a finitely presented separable algebra is strictly étale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dedekind’s lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -6.15 344 VI -7.7 350 Artin’s theorem, Galois algebras version . . . . . . . . . . . . . . . . . . . . . . . VI -7.11 353 982 Tables of theorems Scalar extension for Galois algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -7.13 355 Characterizations of Galois algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -7.14 356 Characterizations of free Galois algebras . . . . . . . . . . . . . . . . . . . . . . . VI -7.15 Galois correspondence, Galois algebras version . . . . . . . . . . . . . . . . . VI -7.16 358 357 Galois correspondence, connected Galois algebras . . . . . . . . . . . . . . VI -7.19 360 Galois quotient of a Galois algebra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -7.23 362 Lüroth’s theorem (exercise) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VI -1 367 The dynamic method Weak Nullstellensatz and Noether position, 2 . . . . . . . . . . . . . . . . . . VII -1.1 386 Weak Nullstellensatz and Noether position, 3 . . . . . . . . . . . . . . . . . . VII -1.5 390 Simultaneous Noether position . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VII -1.7 Classical Nullstellensatz, general constructive version . . . . . . . . . . VII -1.8 392 Nullstellensatz with multiplicities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VII -1.9 392 391 A finitely presented algebra over a discrete field is a strongly discrete coherent ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VII -1.10 393 Structure theorem for finite Boolean algebras . . . . . . . . . . . . . . . . . . VII -3.3 399 Galois structure theorem (1), G-Boolean algebras . . . . . . . . . . . . . . VII -3.10 401 Galois structure theorem (2), Galois quotients of pre-Galois algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Universal splitting algebra and separability. See also Theorem VII -4.11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Universal splitting algebra and fixed points . . . . . . . . . . . . . . . . . . . . VII -4.8 409 VII -4.9 411 The universal splitting algebra as a Galois algebra . . . . . . . . . . . . . VII -4.10 412 VII -4.3 406 Diagonalization of a universal splitting algebra, see also Theorem VII -4.13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VII -4.12 412 Triangular basis of the ideal defining a Galois algebra . . . . . . . . . . VII -4.15 415 Eventual uniqueness of the splitting field of a separable polynomial VII -5.2 Dynamic management of a splitting field, see also Theorem VII -6.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Uniqueness of the splitting field, dynamic version . . . . . . . . . . . . . . VII -5.3 418 VII -5.4 419 Galois structure theorem (3), Galois quotients of the universal splitting algebra of a separable polynomial over a discrete field Where the computations take place: the subring Z of K is sufficient . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Nullstellensatz and Nœther position, reduced zero-dimensional rings case (exercise) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VII -6.2 417 421 VII -6.4 422 VII -3 429 Flat modules Characterization of flat modules, 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII -1.3 446 Tables of theorems 983 Characterization of finitely generated projective modules by the flatness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII -1.4 446 Characterization of flat modules, 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII -1.11 449 Flat quotients . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII -1.16 450 Characterization of flat algebras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VIII -5.6 465 Characterization of faithfully flat algebras . . . . . . . . . . . . . . . . . . . . . VIII -6.1 466 Every extension of a discrete field is faithfully flat. . . . . . . . . . . . . . VIII -6.2 468 Faithfully flat extensions and finiteness properties of modules . . VIII -6.7 469 Faithfully flat extensions and finiteness properties of algebras . . VIII -6.8 470 Local rings, or just about Jacobson radical and units of an integral extension . . . . . . . . . . . . . IX -1.7 490 Local properties of integral extensions . . . . . . . . . . . . . . . . . . . . . . . . . IX -1.8 Nakayama’s lemma (the determinant trick) . . . . . . . . . . . . . . . . . . . . IX -2.1 491 491 Local freeness lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -2.2 492 Lemma of the locally simple map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -2.3 493 Local number of generators lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -2.4 494 Localized finite ring lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -3.2 496 Localized zero-dimensional ring lemma . . . . . . . . . . . . . . . . . . . . . . . . . IX -3.3 496 Cotangent space at ξ and mξ /mξ 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -4.4 502 A simple isolated zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -4.6 503 Isolated zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IX -4.7 504 The ideal of a non-singular point of a locally complete intersection curve. See also Theorem IX -4.10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . Integral extension of a local-global ring . . . . . . . . . . . . . . . . . . . . . . . . IX -4.9 505 IX -6.13 518 Finitely generated projective modules, 2 The modules of constant rank are locally free . . . . . . . . . . . . . . . . . . X -1.4 537 The finitely generated projective modules are locally free; see also Theorems X -1.6 and X -1.7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modules of constant rank k as submodules of Ak . . . . . . . . . . . . . . . X -1.5 538 X -1.11 541 Strictly finite A-algebras: transitivity formula for the ranks . . . . X -3.10 550 The functor Gn,k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X -4.1 552 Second freeness lemma. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X -4.4 553 Tangent space to a Grassmannian, see also Theorem X -4.13. . . . X -4.9 563 Every projective module of constant rank over a Bézout pp-ring is free . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . e0 A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pic A and K X -5.4 567 X -5.7 570 Picard group and group of classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X -5.8 572 GK0 (A) ' GK0 (Ared ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X -5.10 573 984 Tables of theorems Milnor square . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . X -5.11 574 A complete classification of GK0 (A); see also Theorem X -6.2 . . . X -6.3 579 Distributive lattices, lattice-groups Boolean algebra freely generated by a distributive lattice . . . . . . . XI -1.8 624 Distributivity in the l-groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XI -2.2 626 Riesz theorem (l-groups) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XI -2.11 629 Partial decomposition theorem under Noetherian condition . . . . XI -2.16 633 A GCD-domain is integrally closed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . A GCD-domain of dimension 6 1 is a Bézout ring . . . . . . . . . . . . . XI -3.5 637 XI -3.12 639 GCD-domains: A and A[X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XI -3.16 640 Reduced zero-dimensional closure of a commutative ring . . . . . . . XI -4.25 652 Fundamental theorem of the entailment relations . . . . . . . . . . . . . . XI -5.3 655 Duality theorem between distributive lattices and finite ordered sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XI -5.6 657 Prüfer and Dedekind rings Characterizations of arithmetic rings, Chinese remainder theorem XII -1.6 682 Multiplicative structure of the invertible ideals in an arithmetic ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -1.10 685 Characterizations of Prüfer rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -3.2 690 Normal integral extension of a Prüfer ring . . . . . . . . . . . . . . . . . . . . . XII -3.5 693 Overring of a Prüfer ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -3.6 694 Characterizations of coherent Prüfer rings . . . . . . . . . . . . . . . . . . . . . XII -4.1 695 Finitely presented modules over a coherent Prüfer ring . . . . . . . . . XII -4.5 696 Another characterization of coherent Prüfer rings . . . . . . . . . . . . . . XII -4.8 699 Finite extension of a coherent Prüfer ring (see also Theorem XII -4.10) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SL3 = E3 for a pp-ring of dimension 6 1 . . . . . . . . . . . . . . . . . . . . . . . XII -4.9 699 XII -5.1 701 One and a half theorem: pp-rings of dimension 6 1 . . . . . . . . . . . . XII -5.2 702 A Bézout coherent Prüfer ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -6.1 705 A normal, coherent ring of dimension 6 1 is a Prüfer ring . . . . . . XII -6.2 705 Projective modules of rank k over a Prüfer domain of dimension 6 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Theorem of the invariant factors: finitely presented modules over a Prüfer domain of dimension 6 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . Reduction of a row matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -6.3 706 XII -6.7 707 XII -6.8 708 Riesz theorem for arithmetic rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -7.1 708 Factorization of finitely generated ideals over a coherent Prüfer ring of dimension 6 1 (see also Theorem XII -7.3) . . . . . . . . . . . . XII -7.2 708 Tables of theorems A Dedekind ring admits partial factorizations . . . . . . . . . . . . . . . . . . 985 XII -7.8 710 Characterizations of Dedekind rings. . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -7.9 710 Total factorization Dedekind rings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XII -7.11 710 A computation of integral closure (Dedekind rings) . . . . . . . . . . . . XII -7.12 711 Krull dimension The duality between Zariski spectrum and Zariski lattice. . . . . . . XIII -1.2 745 Elementary characterization of the Krull dimension . . . . . . . . . . . . XIII -2.2 748 One and a half theorem (variant) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -3.4 759 Krull dimension of a polynomial ring over a field . . . . . . . . . . . . . . . XIII -5.1 761 Krull dimension and Noether position. . . . . . . . . . . . . . . . . . . . . . . . . . XIII -5.4 763 Minimal pp-ring closure of a ring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -7.8 770 Krull dimension of a morphism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -7.13 773 Krull dimension of a polynomial ring . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -7.14 773 Krull dimension of an integral extension . . . . . . . . . . . . . . . . . . . . . . . XIII -7.16 774 Krull dimension of a totally ordered set . . . . . . . . . . . . . . . . . . . . . . . . XIII -8.4 775 Krull dimension of an extension of valuation rings . . . . . . . . . . . . . XIII -8.8 776 Valuative dimension of a polynomial ring . . . . . . . . . . . . . . . . . . . . . . XIII -8.19 781 Krull dimension and arithmetic rings . . . . . . . . . . . . . . . . . . . . . . . . . . XIII -8.20 781 Going Up, Going Down and Krull dimension . . . . . . . . . . . . . . . . . . . XIII -9.6 785 The number of generators of a module Non-Noetherian Kronecker-Heitmann theorem, with the Krull dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bass’ “stable range” theorem, with the Krull dimension, without Noetherianity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Kronecker’s theorem, local version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIV -1.3 808 XIV -1.4 808 XIV -1.6 809 Bass’ theorem, with the Heitmann dimension, without Noetherianity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIV -2.6 812 Kronecker’s theorem, Heitmann dimension . . . . . . . . . . . . . . . . . . . . . XIV -2.9 814 Serre’s Splitting Off theorem, with Sdim . . . . . . . . . . . . . . . . . . . . . . . XIV -3.4 816 Forster-Swan theorem, with Gdim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIV -3.6 General Forster-Swan theorem, with Gdim . . . . . . . . . . . . . . . . . . . . . XIV -3.8 819 817 Bass’ cancellation theorem, with Gdim . . . . . . . . . . . . . . . . . . . . . . . . . XIV -3.11 821 Kronecker’s theorem, for the supports. . . . . . . . . . . . . . . . . . . . . . . . . . XIV -4.5 826 Constructible partition of the Zariski spectrum and k-stability . XIV -4.16 830 Coquand’s theorem, 1: Forster-Swan and others with the nstability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIV -5.3 832 Coquand’s theorem, 2: elementary column operations and n-stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIV -5.4 832 986 Tables of theorems Coquand’s theorem, 3: Forster-Swan and others with the Heitmann dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XIV -5.7 834 The local-global principle Dynamic machineries and various local-global principles are indicated pages 977 and 978. Extended projective modules Traverso-Swan-Coquand theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -2.18 Roitman’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Local Horrocks’ theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 907 XVI -3.8 910 XVI -4.3 912 Affine Horrocks’ theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -4.7 914 Bass’ theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concrete Quillen induction, stably free case . . . . . . . . . . . . . . . . . . . . XVI -4.8 915 XVI -4.9 915 Abstract Quillen induction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concrete Quillen induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -5.1 916 XVI -5.2 917 Quillen-Suslin theorem, Quillen’s proof . . . . . . . . . . . . . . . . . . . . . . . . Concrete Quillen induction, free case. . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -5.3 918 XVI -5.4 918 Suslin’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -5.5 920 (Another) Suslin’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -5.10 921 Little Horrocks’ theorem à la Vaserstein (and Theorem XVI -5.15) XVI -5.14 923 Rao’s theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -5.18 925 (Another) Bass’ theorem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -6.2 926 The 2-stability of V[X], for Theorem XVI -6.2 . . . . . . . . . . . . . . . . . Bass-Simis-Vasconcelos theorem(and Theorem XVI -6.9) . . . . . . . XVI -6.6 928 XVI -6.8 930 Dynamic comparison of A(X) with AhXi. . . . . . . . . . . . . . . . . . . . . . XVI -6.10 931 Maroscia & Brewer-Costa theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -6.11 933 Abstract Lequain-Simis induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -6.12 934 Yengui induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -6.13 934 Lequain-Simis theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . XVI -6.16 936 Bibliography [Abdeljaoued & Lombardi] Abdeljaoued A., Lombardi H. Méthodes Matricielles. Introduction à la Complexité Algébrique. Springer, (2003). 102 [Aczel & Rathjen] Aczel P., Rathjen M. Notes on Constructive Set Theory, http://www1.maths.leeds.ac.uk/~rathjen/book.pdf. 975 [Adams & Loustaunau] Adams W., Loustaunau P. An Introduction to Gröbner Bases. American Mathematical Society, (1994). 35 [Apéry & Jouanolou] Apéry F., Jouanolou J.-P. Élimination. Le cas d’une variable. Hermann, (2006). 176 [Atiyah & Macdonald] Atiyah M.F., Macdonald I.G. Introduction to Commutative Algebra. Addison Wesley, (1969). xxvii [Basu, Pollack & Roy] Basu S., Pollack R., Roy M.-F. Algorithms in real algebraic Geometry. Springer, (2006). 176, 218 [Bass] Bass H. Algebraic K-theory. W. A. Benjamin, Inc., New York-Amsterdam, (1968). 830, 841, 942 [Beeson] Beeson M. Foundations of Constructive Mathematics. Springer-Verlag, (1985). 193, 969, 975 [Bhaskara Rao] Bhaskara Rao K. The Theory of Generalized Inverses over a Commutative Ring. Taylor & Francis. Londres, (2002). 48, 79 [Bigard, Keimel & Wolfenstein] Bigard A., Keimel K., Wolfenstein S. Groupes et anneaux réticulés. Springer LNM 608, (1977). 674 [Birkhoff] Birkhoff G. Lattice theory. Third edition. American Mathematical Society Colloquium Publications, Vol. XXV American Mathematical Society, Providence, R.I., (1967). 674 [Bishop] Bishop E. Foundations of Constructive Analysis. McGraw Hill, (1967). 193, 409, 960, 975 [Bishop & Bridges] Bishop E., Bridges D. Constructive Analysis. SpringerVerlag, (1985). 193, 409, 960, 962 [Bourbaki] Bourbaki. Commutative Algebra. Chapters 1-7. English translation of Algèbre Commutative, Hermann, Paris. Springer-Verlag, Berlin 1989. Chapters 8-9. Reprint from the original. Springer-Verlag, Berlin 2006. Chapter 10. Reprint from the original. . Springer-Verlag, Berlin 2007. xxvii, 614 [Bridges & Richman] Bridges D., Richman F. Varieties of Constructive Mathematics. London Math. Soc. LNS 97. Cambridge University Press, (1987). 193, 969 [Brouwer] Brouwer L. Brouwer’s Cambridge Lectures on Intuitionism, 1951. (Van Dalen ed.) Cambridge University Press, (1981). 975 – 987 – 988 Bibliography [Burris & Sankappanavar] Burris S., Sankappanavar H. A Course in Universal Algebra. Springer, (1981). 242 [Cartan & Eilenberg] Cartan H., Eilenberg S. Homological algebra. Princeton University Press, (1956). 740 [COCOA] Kreuzer M., Robbiano L. Computational commutative algebra. Springer Verlag, Berlin. Vol. 1 (2000), Vol. 2 (2005) xxvii [Cohn] Cohn P. Basic Algebra. Groups, rings and fields. (2nd edition) Springer Verlag, (2002). 242 [Cox] Cox D. Galois theory. Wiley-Interscience, (2004). 441 [Cox, Little & O’Shea] Cox D., Little J, O’Shea D. Ideals, Varieties, and Algorithms. (2nd edition) Springer Verlag UTM, (1998). xxvii [CRA] Eds: Fontana M., Kabbaj S.-E., Wiegand S. Commutative ring theory and applications. Lecture notes in pure and applied mathematics vol 231. M. Dekker, (2002). 993, 999 [Curry] Curry H. B. Foundations of mathematical logic. McGraw-Hill Book Co., Inc., New York, (1963). 674 [David, Nour & Raffali] David R., Nour K., Raffali C. Introduction à la logique. Dunod, (2001). 975 [Demeyer & Ingraham] Demeyer F., Ingraham E. Separable algebras over commutative rings. Springer Lecture Notes in Mathematics 181, (1971). 381 [Dowek1] Dowek G. La logique. Flammarion. Collection Dominos, (1995). 975 [Dowek2] Dowek G. Les métamorphoses du calcul. Une étonnante histoire de mathématiques. Le Pommier, (2007). 975 [Edwards89] Edwards H. Divisor Theory. Boston, MA: Birkhäuser, (1989). xvi [Edwards05] Edwards H. Essays in Constructive Mathematics. Springer Verlag, (2005). xvi [Eisenbud] Eisenbud D. Commutative Algebra with a view toward Algebraic Geometry. Springer Verlag, (1995). xxvii, 381, 802 [Elkadi & Mourrain] Elkadi M., Mourrain B. Introduction à la résolution des systèmes polynomiaux. Collection Mathématiques & Applications, 59, Springer Verlag, Berlin (2007). xxvii [Feferman] Feferman S. In the Light of Logic. Oxford University Press, (1998). 976 [Frege-Gödel] van Heijenoort J. (ed.), From Frege to Gödel: a source book in mathematical logic. Harvard University Press, Cambridge, Massachussets (1967). (third printing, 2002). 997 [Freid & Jarden] Freid M. D., Jarden M. Field Arithmetic. Springer-Verlag, (1986). 694 [von zur Gathen & Gerhard] von zur Gathen J. Gerhard J. Modern computer algebra. Cambridge University Press, Cambridge, (2003). xxvii Bibliography 989 [Gilmer] Gilmer R. Multiplicative Ideal Theory. Queens papers in pure and applied Math, vol. 90, (1992). xxvii, 483, 740, 802 [Glaz] Glaz S., Commutative Coherent Rings. Lecture Notes in Math., vol. 1371, Springer Verlag, Berlin-Heidelberg-New York, second edition, (1990). xxvii [Grätzer] Grätzer G. General Lattice Theory. Birkhäuser, second edition, (2003). 674 [Gupta & Murthy] Gupta S., Murthy M. Suslin’s work on linear groups over polynomial rings and Serre’s conjecture. ISI Lecture Notes 8. The Macmillan Company of India Limited, (1980). 951, 954, 958 [HoTT] Homotopy Type Theory: Univalent Foundations of Mathematics. http: //homotopytypetheory.org/ (2014). 975 [Infinito] Toraldo di Francia G. (ed.), L’infinito nella scienza. Istituto della Enciclopedia Italiana, Rome, (1987). 975 [Ireland & Rosen] Ireland K., Rosen M. A classical introduction to modern number theory. Graduate Texts in Mathematics, vol. 84, Springer-Verlag, Berlin-Heidelberg-New York, (1989). 124 [Ischebeck & Rao] Ischebeck F., Rao R. Ideals and Reality. Projective modules and number of generators of ideals. Springer Monograph in Mathematics, Berlin-Heidelberg-New York, (2005). 242, 912 [Jaffard] Jaffard, P. Théorie de la dimension dans les anneaux de polynômes Gauthier-Villars, Paris, (1960). 802 [Jensen, Ledet & Yui] Jensen C., Ledet A., Yui N. Generic Polynomials, Constructive Aspects of the Inverse Galois Problem. Cambridge University Press, MSRI Publications 45, (2002). 614 [Johnstone] Johnstone P. Stone spaces. Cambridges studies in advanced mathematics 3. Cambridge University Press, (1982). 659, 674, 802 [Kaplansky] Kaplansky I. Commutative rings. Boston, Allyn and Bacon, (1970). xxvii [Kleene & Vesley] Kleene S.C., Vesley R. The Foundations of intuitionistic mathematics. Amsterdam (North-Holland), (1965). 975 [Knight] Knight J. Commutative Algebra. London Mathematical Society LNS 5. Cambridge University Press, (1971). 895 [Kunz] Kunz E. Introduction to Commutative Algebra and Algebraic Geometry. Birkhäuser, (1991). xvii, xxvii, 242, 297, 531, 820, 840, 895, 908 [Lafon & Marot] Lafon J.-P., Marot J. Algèbre locale. Hermann, Paris, (2002). xxvii, 509, 531 [Lakatos] Lakatos I. Proofs and refutations. Cambridge: Cambridge University Press. (1976). xxvi [Lam] Lam T.Y. Serre’s conjecture. Lecture Notes in Mathematics, Vol. 635. Springer Berlin Heidelberg New York, (1978). 941 990 Bibliography [Lam06] Lam T.Y. Serre’s Problem on Projective Modules. Springer Berlin Heidelberg New York, (2006). xxvii, 242, 893, 912, 916, 918, 922, 936, 941, 958 [Lancaster & Tismenetsky] Lancaster P., Tismenetsky M. The Theory of Matrices, 2/e. Academic Press, (1985). 48 [Lawvere & Rosebrugh] Lawvere W., Rosebrugh R. Sets for Mathematics. Cambridge University Press, (2003). 242 [Lorenzen] Lorenzen P. Metamathematik. Mannheim: Bibliographisches Institut, (1962). 975 [Mac Lane] Mac Lane, S. Categories for the Working Mathematician, Second edition, Springer, (1998). 242 [Martin-Löf] Martin-Löf P. Intuitionistic type theory. Notes by Giovanni Sambin. Studies in Proof Theory. Lecture Notes, 1. Bibliopolis, Naples, (1984). 975 [Matsumura] Matsumura H. Commutative ring theory. Cambridge studies in advanced mathematics 8. Cambridge University Press, (1989). xxvii, 820 [MITCA] Eds: Brewer J., Glaz G., Heinzer W., Olberding B. Multiplicative Ideal Theory in Commutative Algebra: A tribute to the work of Robert Gilmer. Springer, (2006) 991, 996 [MRR] Mines R., Richman F., Ruitenburg W. A Course in Constructive Algebra. Universitext. Springer-Verlag, (1988). v, xvi, 31, 35, 79, 193, 202, 208, 241, 249, 262, 380, 385, 396, 418, 440, 474, 499, 531, 674, 678, 855, 960, 962, 975 [Mora] Mora T. Solving Polynomial Equation Systems I: The Kronecker-Duval Philosophy. Cambridge University Press, (2003) xxvii [Northcott] Northcott D. Finite free resolutions. Cambridge tracts in mathematics No 71. Cambridge University Press, (1976). xxvii, 79, 219, 242, 296, 297, 878 [PFCM] Crosilla L., Schuster P., eds. From Sets and Types to Analysis and Topology: Towards Practicable Foundations for Constructive Mathematics. Oxford University Press, (2005). 994, 997 [Pohst & Zassenhaus] Pohst, Zassenhaus Algorithmic algebraic number theory (Encyclopedia of Mathematics and its Applications). Cambridge University Press, (1989). 441 [Rao & Mitra] Rao C., Mitra S. Generalized Inverses of Matrices and its Applications. John Wiley & Sons, (1971). 79 [Raynaud] Raynaud M. Anneaux locaux henséliens. Springer Lecture Notes in Mathematics 169, (1970). 509, 531 [SINGULAR] Greuel G.-M., Pfister G. A Singular Introduction to Commutative Algebra. Springer (2002). http://www.singular.uni-kl.de/ xxvii Bibliography 991 [Stacks-Project] Stacks-Project. http://stacks.math.columbia.edu xxvii, 241 [TAPAS] Cohen A., Cuypers H., Sterk H. (eds) Some Tapas of Computer Algebra. Springer Verlag, (1999). xxvii [Tignol] Tignol J.-P. Galois’ theory of algebraic equations. World Scientific Publishing Co., Inc., River Edge, NJ, (2001). 441 [Yengui] Yengui I. Constructive commutative algebra. Projective modules over polynomial rings and dynamical Gröbner bases. Springer LNM no. 2138 (2015). xvi, 440 [Zaanen] Zaanen A. Introduction to Operator Theory in Riesz Spaces. Springer Verlag, (1997). 675 Articles [1] Aczel P. Aspects of general topology in constructive set theory. Ann. Pure Appl. Logic. 137, (2006), 3–29. 975 [2] Aubry P., Valibouze A. Using Galois Ideals for Computing Relative Resolvents. J. Symbolic Computation. 30, (2000), 635–651. 441 [3] Auslander M., Goldman O. The Brauer group of a commutative ring. Trans. Amer. Math. Soc. 97, (1960), 367–409. 381 [4] Avigad J. Methodology and metaphysics in the development of Dedekind’s theory of ideals. In: José Ferreirós and Jeremy Gray, editors, The Architecture of Modern Mathematics, Oxford University Press. (2006), 159–186. 678, 740 [5] Banaschewski B. Radical ideals and coherent frames. Comment. Math. Univ. Carolin. 37 (2), (1996), 349–370. 802 [6] Barhoumi S. Seminormality and polynomial rings. Journal of Algebra. 322, (2009), 1974–1978. 941 [7] Barhoumi S., Lombardi H. An Algorithm for the Traverso-Swan theorem on seminormal rings. Journal of Algebra. 320, (2008), 1531–1542. 907, 941 [8] Barhoumi S., Lombardi H., Yengui I. Projective modules over polynomial rings: a constructive approach. Math. Nachrichten. 282 (2009), 792–799. 942 [9] Basu R., Rao R., Khanna R. On Quillen’s Local Global Principle. Contemporary Mathematics, Commutative Algebra and Algebraic Geometry, Volume 390, (2005), 17–30. 941 [10] Bass H. Torsion free and projective modules. Trans. Amer. Math. Soc. 102, (1962), 319–327. 856 [11] Bazzoni S., Glaz S. Prüfer rings. in [MITCA], 55–72. 484 [12] Berger J. Constructive Equivalents of the Uniform Continuity Theorem. Journal of Universal Computer Science. 11 (12), (2005), 1878–1883. 976 992 Bibliography [13] Berger J., Bridges D. A fan-theoretic equivalent of the antithesis of Specker’s theorem. Proc. Koninklijke Nederlandse Akad. Wetenschappen. Indag. Math. 18 (2), (2007), 195-202. 976 [14] Berger J., Ishihara H. Brouwer’s fan theorem and unique existence in constructive analysis. Math. Logic Quarterly. 51, (2005), 360–364. 976 [15] Bernstein D. Factoring into coprimes in essentially linear time. Journal of Algorithms. 54, (2005), 1–30. 678 [16] Bernstein D. Fast ideal arithmetic via lazy localization. Cohen, Henri (ed.), Algorithmic number theory. Second international symposium, ANTSII, Talence, France, May 18-23, 1996. Proceedings. Berlin: Springer. Lect. Notes Comput. Sci. 1122 (1996), 27–34. 678 [17] Bishop, E. Mathematics as a numerical language. in Intuitionism and Proof Theory. Eds. Myhill, Kino, and Vesley, North-Holland, Amsterdam, (1970). 962 [18] Boniface J., Schappacher N. "Sur le concept de nombre en mathématique": cours inédit de Leopold Kronecker à Berlin (1891). Rev. Histoire Math. 7, (2001), 206–275. 82 [19] Bosma W., Cannon J., Playoust C. The Magma algebra system. I. The user language. J. Symbolic Comput. 24, (1997), 235–265. 441 [20] Brandl R. Integer polynomials that are reducible modulo all primes. Amer. Math. Month. 93 (4), (1986), 286–288. 441 [21] Brenner H. Lifting chains of prime ideals. J. Pure Appl. Algebra. 179, (2003), 1–5. 803 [22] Brewer J., Costa D. Projective modules over some non-Noetherian polynomial rings. J. Pure Appl. Algebra. 13 (2), (1978), 157–163. 942 [23] Brewer J., Costa D. Seminormality and projective modules over polynomial rings. J. Algebra. 58 (1), (1979), 208–216. 941 [24] Brewer J., Klinger L. Pole assignability and the invariant factor theorem in Prüfer domains and Dedekind domains. J. Algebra. 111, (1987), 536–545. 740 [25] Buchmann J., Lenstra H. Approximating rings of integers in number fields. J. Théor. Nombres Bordeaux. 6 (2), (1994), 221–260. 678, 679 [26] Cahen, P.-J., Construction B, I, D et anneaux localement ou résiduellement de Jaffard. (B, I, D construction and locally or residually Jaffard rings)., Archiv der Mathematik, 54, (1990), 125–141. 802 [27] Caniglia L., Cortinas G., Danón S., Heintz J., Krick T., Solernó P. Algorithmic Aspects of Suslin’s Proof of Serre’s Conjecture. Computational Complexity. 3, (1993), 31–55. 942 [28] Cannon J., Bosma W. Handbook of Magma functions. Version 2.14, Oct. 2007, 4400 pages. 441 Bibliography 993 [29] Cederquist J., Coquand T. Entailment relations and Distributive Lattices. Logic Colloquium ’98 (Prague), 127–139, Lect. Notes Log., 13. Assoc. Symbol. Logic, Urbana, (2000). 674 [30] Chase S., Harrison D., Rosenberg A. Galois theory and Galois cohomology of commutative rings. Mem. Amer. Math. Soc. 52, (1965), 15–33. 381 [31] Chervov A., Talalaev D. Hitchin systems on singular curve I. Theor. Math. Phys. 140, (2004), 1043–1072. 614 [32] Chervov A., Talalaev D. Hitchin systems on singular curve II. Glueing subschemes. Int. J. Geom. Meth. Mod. Phys 4, (2007), 751–787. 614 [33] Coquand T. Kolmogorov’s contribution to intuitionistic logic. p. 19–40 in: Kolmogorov’s Heritage in Mathematics. Charpentier E., Lesne A., Nikolski N. (Eds.). Sringer, (2007). 966 [34] Coquand T. About Brouwer’s fan theorem. Revue internationale de philosophie. 230, (2004), 483–489. 976 [35] Coquand T. Sur un théorème de Kronecker concernant les variétés algébriques. C. R. Acad. Sci. Paris, Ser. I 338, (2004), 291–294. 806 [36] Coquand T. On seminormality. Journal of Algebra. 305 (1), (2006), 585– 602. 895, 900, 941 [37] Coquand T. A refinement of Forster’s theorem. Techincal report (2007). 806, 841, 942 [38] Coquand T. Space of valuations, Annals of Pure and Applied Logic, 157, (2009), 97–109. 803 [39] Coquand T. Recursive functions and constructive mathematics. p. 159– 167 in: Bourdeau M., Dubucs J. (Eds.), Calculability and Constructivity. Historical and Philosophical Aspects. Logic, Epistemology and the Unity of Science, Vol. 34. Springer (2014). 975 [40] Coquand T., Ducos L., Lombardi H., Quitté C. L’idéal des coefficients du produit de deux polynômes. Revue des Mathématiques de l’Enseignement Supérieur. 113 (3), (2003), 25–39. 79 [41] Coquand T., Ducos L., Lombardi H., Quitté C. Constructive Krull Dimension. I: Integral Extensions. Journal of Algebra and Its Applications. 8, (2009), 129–138. 802 [42] Coquand T., Lombardi H. A logical approach to abstract algebra (survey). Math. Struct. in Comput. Science. 16, (2006), 885–900. xxviii [43] Coquand T., Lombardi H. Hidden constructions in abstract algebra (3) Krull dimension of distributive lattices and commutative rings, in [CRA], 477–499. 802, 803 [44] Coquand T., Lombardi H. Constructions cachées en algèbre abstraite (3) Dimension de Krull, Going Up, Going Down. Technical report (2001) http://hlombardi.free.fr/publis/GoingUpDownFrench.pdf (english version http://hlombardi.free.fr/publis/GoingUpDown.pdf). 802, 803 994 Bibliography [45] Coquand T., Lombardi H., Quitté C. Generating non-Noetherian modules constructively. Manuscripta mathematica. 115, (2004), 513–520. 806, 841 [46] Coquand T., Lombardi H., Quitté C. Dimension de Heitmann des distributive lattices et des anneaux commutatifs. Publications Mathématiques de Besançon. Théorie des nombres (2006). 51 pages. 802, 806, 811, 841 [47] Coquand T., Lombardi H., Roy M.-F. An elementary characterization of Krull dimension, in [PFCM], 239–244. 802 [48] Coquand T., Lombardi H., Schuster P. A nilregular element property. Archiv der Mathematik, 85, (2005), 49–54. 758, 803, 840 [49] Coquand T., Persson H. Valuations and Dedekind Prague theorem. J. Pure Appl. Algebra. 155, (2001), 121–129. 674 [50] Cortiñas G., Haesemayer C., Walker M.E. and Weibel C. A negative answer to a question of Bass. Proc. AMS. 139, (2011), 1187–1200. 911 [51] Coste M., Lombardi H., Roy M.-F. Dynamical method in algebra: Effective Nullstellensätze. Annals of Pure and Applied Logic. 111, (2001), 203–256. 895 [52] Couchot F. Finitely presented modules over semihereditary rings. Communications in Algebra, 35 (9), (2007) 2685–2692. 740 [53] Dedekind R. Über einen arithmetischen Satz von Gauss. Mitt. dtsch. math. Ges. Prag. (1892), 1–11. 176 [54] Dedekind R. Über die Begründung der IdealTheorie. Nachr. K. Ges. Wiss. Göttingen. (1894), 272–277. 678 [55] Della Dora J., Dicrescenzo C., Duval D. About a new method for computing in algebraic number fields. In Caviness B.F. (Ed.) EUROCAL ’85. Lecture Notes in Computer Science 204, 289–290. Springer (1985). 395, 424, 895 [56] Díaz-Toca G. Galois theory, splitting fields and computer algebra. J. Symbolic Computation. 41 (11), (2006), 1174–1186. 441 [57] Díaz-Toca G., Gonzalez-Vega L., Lombardi H. Generalizing Cramer’s Rule: Solving uniformly linear systems of equations. SIAM Journal on Matrix Analysis and Applications. 27 (3), (2005), 621–637. 531 [58] Díaz-Toca G., Gonzalez-Vega L., Lombardi H., Quitté C. Modules projectifs de type fini, linear maps croisées et inverses généralisés. Journal of Algebra. 303 (2), (2006), 450–475. 79, 223, 531, 588 [59] Díaz-Toca G., Lombardi H. A polynomial bound on the number of comaximal localizations needed in order to make free a projective module. Linear Algebra and its Application. 435, (2011), 354–360. 297 [60] Díaz-Toca G., Lombardi H., Quitté C. L’algèbre de décomposition universelle. Proceedings du colloque TC2006 (Granada), 169–184. 441 Bibliography 995 [61] Díaz-Toca G., Lombardi H. Dynamic Galois Theory. Journal of Symbolic Computation. 45, (2010), 1316–1329. 441 [62] Drach J. Essai sur la théorie générale de l’intégration et sur la classification des transcendantes. Ann. Sci. Ec. Norm. Sup. 3 (15), (1898), 243–384. 176, 440 [63] Ducos L. Effectivité en théorie de Galois. Sous-résultants. Université de Poitiers, Thèse doctorale. Poitiers (1997). 441 [64] Ducos L. Construction de corps de décomposition grâce aux facteurs de résolvantes. (French) [Construction of splitting fields in favour of resolvent factors]. Communications in Algebra. 28 (2), (2000), 903–924. 441 [65] Ducos L. Vecteurs unimodulaires et systèmes générateurs. Journal of Algebra. 297, (2006), 566–583. 841 [66] Ducos L. Sur la dimension de Krull des anneaux noethériens. Journal of Algebra. 322, (2009), 1104–1128. 840, 895 [67] Ducos L. Polynômes à valeurs entières: un anneau de Prüfer de dimension 2. (2011) To appear in Communications in Algebra. 706 [68] Ducos L., Lombardi H., Quitté C., Salou M. Théorie algorithmique des anneaux arithmétiques, des anneaux de Prüfer et des anneaux de Dedekind. Journal of Algebra. 281, (2004), 604–650. 484, 740 [69] Ducos L., Valibouze A., Yengui I. Computing syzygies over V [X1 , . . . , Xk ], V a valuation domain. Journal of Algebra 425, (2015), 133–145. 440 [70] Edwards H. The genesis of ideal theory. Arch. Hist. Exact Sci. 23 (4), (1980/81), 321–378. 740 [71] Eisenbud D., Evans E., Jr. Generating modules efficiently: theorems from algebraic K-theory. J. Algebra. 27, (1973), 278–305. 815, 841 [72] Eisenbud D., Evans E., Jr. Every algebraic set in n-space is the intersection of n hypersurfaces. Inventiones math. 19, (1973), 107–112. 840 [73] Ellouz A., Lombardi H., Yengui I. A constructive comparison of the rings R(X) and RhXi and application to the Lequain-Simis Induction Theorem. Journal of Algebra. 320 (2008), 521–533. 932, 942 [74] Español L. Dimensión en álgebra constructiva. Doctoral thesis. Universidad de Zaragoza, Zaragoza, 1978. 802, 841 [75] Español L. Constructive Krull dimension of lattices. Rev. Acad. Cienc. Zaragoza (2) 37, (1982), 5–9. 802 [76] Español L. Le spectre d’un anneau dans l’algèbre constructive et applications à la dimension. Cahiers de topologie et géométrie différentielle catégorique. 24 (2), (1983), 133–144. 802 [77] Español L. Dimension of Boolean Valued Lattices and Rings. Journal of Pure and Applied Algebra. 42, (1986), 223–236. 802 996 Bibliography [78] Español L. The spectrum lattice of Baer rings and polynomials. Categorical algebra and its applications. (Louvain-La-Neuve, 1987), 118–124, Lecture Notes in Math., 1348, Springer, Berlin-New York, (1988). 79, 802 [79] Español L. Finite chain calculus in distributive lattices and elementary Krull dimension. Contribuciones cientificas en honor de Mirian Andres Gomez. Eds. L. Lamban, A. Romero y J. Rubio, Servicio de Publicaciones, Universidad de La Rioja, Logrono, Spain, (2010). 791, 802 [80] Estes R., Guralnick R. Module equivalences: local to global when primitive polynomials represent units. J. of Algebra. 77, (1982), 138–157. 531 [81] Ferrand D. Les modules projectifs de type fini sur un anneau de polynômes sur un corps sont libres. Sém. Bourbaki, exposé 484, (1975-1976), 202–221. 941 [82] Ferrero M., Paques A. Galois theory of commutative rings revisited. Contributions to Algebra and Geometry. 38, (1997), 399–410. 381 [83] Fitchas N., Galligo A. Nullstellensatz effectif et Conjecture de Serre (Théorème de Quillen-Suslin) pour le Calcul Formel. Math. Nachr. 149, (1990), 231–253. 942 [84] Fontana M., Loper A. An historical overview of Kronecker function rings, Nagata rings and related star and semistar operations. in [MITCA], 169–187. 176 [85] Forster O. Über die Anzahl der Erzeugenden eines Ideals in einem Noetherschen Ring. Math. Z. 84, (1964), 80–87. 841 [86] Fuchs L. Über die Ideale arithmetischer ringe. Math. Helv. 23, (1949), 334–341. 483 [87] Carl Friedrich Gauss Demonstratio nova altera theorematis omnem functionem algebraicam rationalem integram unius variabilis in factores reales primi vel secundi gradus resolvi posse. Comm. Recentiores (Gottingae). 3 (1816), 107–142. Also in Werke III, 31–56. English translation: http: //www.monad.me.uk/misc/gauss-web.php on the web page of Paul Taylor. http://www.monad.me.uk/ 82 [88] Geissler K., Klüners J. Galois Group Computation for Rational Polynomials. J. Symbolic Computation. 30, (2000), 653–674. 441 [89] Gillman L., Henriksen M. Some remarks about elementary divisor rings. Trans. Amer. Soc. 82, (1956) 362–365 226 [90] Gilmer R., Heitmann R. On Pic R[X] for R seminormal. J. Pure Appl. Algebra. 16 (1980), 251–257. 941 [91] Gilmer R., Hoffmann, J. A characterization of Prüfer domains in terms of polynomials. Pacific J. Math. 60 (1), (1975), 81–85. 740 [92] Glaz S. Finite conductor properties of R(X) and RhXi. in: Proceeding of conference in honor to J. Huckaba’s retirement, Missouri, (1999). Marcel Dekker Lecture Notes. 941 Bibliography 997 [93] Glaz, S., Vasconcelos W. Gaussian polynomials. Marcel Dekker Lecture Notes 186 (1997), 325–337. 79 [94] Goldman O. Determinants in projective modules. Nagoya Math. J. 18, (1961), 27–36. 296 [95] Hallouin E. Parcours initiatique à travers la théorie des valuations. Rapport technique. Université de Poitiers, (1996). http://www.picard. ups-tlse.fr/~hallouin/eh-valuation.ps 147 [96] Hallouin E. Calcul de fermeture intégrale en dimension 1 et factorisation intégrale. Thèse. Université de Poitiers, (1998). http://www.picard. ups-tlse.fr/~hallouin/eh-these.ps 740 [97] Heitmann R. Generating ideals in Prüfer domains. Pacific J. Math. 62, (1976), 117–126. 841 [98] Heitmann R. Generating non-Noetherian modules efficiently. Michigan Math. 31 2 (1984), 167–180. xxiv, 806, 810, 811, 840, 841 [99] Heitmann R., Levy L. 1 1/2 and 2 generator ideals in Prüfer domains. Rocky Mountain J. Math. 5 (3), (1975), 361–673. 740 [100] Hermida J., Sánchez-Giralda T. Linear Equations over Commutative Rings and Determinantal Ideals. Journal of Algebra. 99, (1986), 72–79. 460, 483 [101] Hess F. Computing Riemann-Roch space in algebraic function fields. Journal of Symbolic Computation. 33, (2002), 425–445. 741 [102] Heyting A. After thirty years. In: 1962 Logic, Methodology and Philosophy of Science (Proc. 1960 Internat. Congr.) pp. 194–197 Stanford Univ. Press, Stanford, Calif. 975 [103] Hilbert D. Über das Unendliche. Math. Annalen 95 (1926), 161–190. English translation in [Frege-Gödel] 367–392. 975 [104] Hochster M. Prime ideal structure in commutative rings. Trans. Amer. Math. Soc. 142, (1969), 43–60. 802 [105] Horrocks G. Projective modules over an extension of a local ring. Proc. Lond. Math. Soc. 14, (1964), 714–718. 941 [106] Hulpke A. Konstruktion transitiver Permutationsgruppen. Dissertation, Rheinisch-Westfälische Technische Hochschule, Aachen, Germany. (1996). 441 [107] Ishihara H. Constructive reverse mathematics: compactness properties. in [PFCM], 245–267. 976 [108] Ishihara H. Weak König lemma implies Brouwer’s fan theorem: a direct proof. Notre Dame J. Formal Logic 47, (2006), 249–252. 976 [109] Ishihara H. Reverse mathematics in Bishop’s constructive mathematics. Philosophia Scientiae, Cahier Spécial 6, (2006), 43–59. 976 998 Bibliography [110] Jacobsson C., Löfwall C. Standard Bases for General Coefficient Rings and a New Constructive Proof of Hilbert’s Basis Theorem. J. Symb. Comput. 12, (1991), 337–372. 79 [111] Johnstone, P. The art of pointless thinking: a student’s guide to the category of locales. Category theory at work (Bremen, 1990), 85–107, Res. Exp. Math., 18, Heldermann, Berlin, 1991. 674 [112] Joyal A. Spectral spaces and distibutive lattices. Notices AMS 18, (1971), 393. 802 [113] Joyal A. Le théorème de Chevalley-Tarski. Cahiers de topologie et géometrie différentielle catégorique. (1975). 802, 841 [114] van der Kallen W. The K2 of rings with many units. Ann. Sci. É.N.S. 4th série. 10, (1977), 473–515. 531 [115] Kaplansky I. Elementary divisors and modules. Transactions of the AMS. 66, (1949), 464–491. 226, 242 [116] Kaplansky I. Modules over Dedekind Rings and Valuation Rings. Trans. Amer. Math. Soc. 72, (1952), 327–340. 740 [117] Klüners J., Malle G. Explicit Galois realization of transitive groups of degree up to 15. J. Symbolic Comput. 30 (6), (2000), 675–716. 441 [118] Kolmogorov A. Zur Deutung der intuitionistischen Logik. Math. Zeitschr., 35 (1932) 58–65. 966 [119] Kronecker L. Zur Theorie der Formen höherer Stufen. Ber. K. Akad. Wiss. Berlin (1883), 957–960. (Werke 2, 417–424). 92, 176 [120] Kronecker L. Grundzüge einer arithmetischen Theorie der algebraischen Grössen. J. reine angew. Math. 92, (1882) 1–123. Reprinted in Leopold Kronecker’s Werke, II, 237–387. 806 [121] Landau, S., Miller, G. Solvability by radicals is in polynomial time. J. Comput. Syst. Sci. 30, (1985), 179–208. 441 [122] Lecerf, G. Fast separable factorization and applications. Applicable Algebra in Engineering, Communication and Computing, 19 (2) (2008), 135–160. 380 [123] Lequain, Y., Simis, A. Projective modules over R[X1 , ..., Xn ], R a Prüfer domain. J. Pure Appl. Algebra. 18 (2), (1980), 165–171. 568, 933 [124] Lombardi H. Le contenu constructif d’un principe local-global avec une application à la structure d’un module projectif de type fini. Publications Mathématiques de Besançon. Théorie des nombres. Fascicule (1997), 94–95 & 95–96. 895 [125] Lombardi H. Platitude, localisation et anneaux de Prüfer: une approche constructive. 64 pages. Publications Mathématiques de Besançon. Théorie des nombres. Années 1998-2001. 484, 740 [126] Lombardi H. Dimension de Krull, Nullstellensätze et Évaluation dynamique. Math. Zeitschrift, 242, (2002), 23–46. 802, 803 Bibliography 999 [127] Lombardi H. Un anneau de Prüfer. Third International Meeting on IntegerValued Polynomials. Actes des rencontres du CIRM, 2 (2010). http://acirm. cedram.org/cgi-bin/browse 706 [128] Lombardi H., Quitté C. Constructions cachées en algèbre abstraite (2) Le principe local global. in [CRA] 461–476. 942 [129] Lombardi H., Quitté C. Seminormal rings (following Thierry Coquand). Theoretical Computer Science. 392, (2008), 113–127. 941 [130] Lombardi H., Quitté C., Yengui I. Hidden constructions in abstract algebra (6) The theorem of Maroscia, Brewer and Costa. Journal of Pure and Applied Algebra. 212 7 (2008), 1575–1582. 942 [131] Lombardi H., Yengui I. Suslin’s algorithms for reduction of unimodular rows. Journal of Symbolic Computation. 39, (2005), 707–717. 942 [132] Maroscia P. Modules projectifs sur certains anneaux de polynômes. C.R.A.S. Paris 285 série A (1977), 183–185. 942 [133] Per Martin-Löf. An intuitionistic theory of types: Predicative part. In H. E. Rose and J. C. Shepherdson, editors, Logic Colloquium’73, pages 73–118. North Holland, (1975). 975 [134] Martin-Löf P. An intuitionistic theory of types, 127–172, in: Twenty-five years of constructive type theory (Venice, 1995), Oxford Logic Guides, 36, Oxford Univ. Press, New York, 1998. 975 [135] Per Martin-Löf The Hilbert-Brouwer controversy resolved? in: One hundred years of intuitionism (1907-2007), (Cerisy), (Mark Van Atten & al., editors) Publications des Archives Henri Poincaré, Birkhäuser Basel, (2008), pp. 243–256. 975 [136] Mertens F. Über einen algebraischen Satz. Ber. K. Akad. Wiss. Wien (1892). 176 [137] Mnif A., Yengui I. An algorithm for unimodular completion over Noetherian rings. J. Algebra. 316, (2007), 483–498. 942 [138] Mulmuley K. A fast parallel algorithm to compute the rank of a matrix over an arbitrary field. Combinatorica, 7/1, (1987), 101–104. 588 [139] Murthy M. Generators of a general ideal. in: A tribute to C. S. Seshadri, (Chennai, 2002). Trends in Math., Birkhäuser, Basel, (2003), 379–384. 841 [140] Murthy M., Pedrini C. K0 and K1 of polynomial rings. in Algebraic K-Theory II, Lecture Notes in Math. 342, (1973), 109–121. 913 [141] Nashier B., Nichols W. Ideals containing monics. Proc. Amer. Math. Soc. 99, (1987), 634–636. 912 [142] Nicholson W. Lifting idempotents and exchange rings. Trans. Amer. Math. Soc. 229, (1977), 269–278. 524 [143] Northcott D. A generalization of a theorem on the content of polynomials. Proc. Cambridge Philos. Soc. 55, (1959), 282–288. 79, 176 1000 Bibliography [144] Orange S., Renault G., Valibouze A. Calcul efficace de corps de décomposition. Technial Report LIP6 2003/005. 441 [145] Perdry H. Strongly Noetherian rings and constructive ideal theory. J. Symb. Comput. 37, (2004), 511–535. 79 [146] Perdry H. Lazy bases: a minimalist constructive theory of Noetherian rings. Math. Log. Quart. 54, (2008), 70–82. 79 [147] Poincaré H. La logique de l’infini, Revue de Métaphysique et de Morale 17, 461–482, (1909) Reprint in Dernières pensées, Flammarion (1913). 975 [148] Prüfer H. Untersuchunger uber teilbarkeitseigenschaften in korpen. Angew. Mat. 168, (1932), 1–36. 483, 740 [149] Quentel Y. Sur une caractérisation des anneaux de valuation de hauteur 1. C. R. Acad. Sci., Paris, Ser. A 265, (1967), 659–661. 740 [150] Querré J. Sur le groupe de classes de diviseurs. C. R. Acad. Sci., Paris. 284, (1977), 397–399. 941 [151] Quillen D. Projective modules over polynomial rings. Invent. Math. 36, (1976), 167–171. 941 [152] Rao R. On projective Rf1 ,...,ft -modules. Amer. J. Math. 107, (1985), 387– 406. 952 [153] Rao R. An elementary transformation of a special unimodular vector to its top coefficient vector. Proc. Amer. Math. Soc. 93, (1985), 21–24. 925, 952 [154] Rao R. A note on the Serre dimension of polynomial rings. J. Pure Appl. Algebra 38, (1985), 87–90. 952 [155] Rao R., Selby J. Quillen-Suslin theory revisited. J. Pure Appl. Algebra 211, (2007), 541–546. 941 [156] Richman F. Constructive aspects of Noetherian rings. Proc. Amer. Mat. Soc. 44, (1974), 436–441. 31, 79 [157] Richman F. Seidenberg’s condition P. in: Constructive Mathematics. Springer LNM 873 (1981), 1–11. 380 [158] Richman F. Finite dimensional algebras over discrete fields. L. E. J. Brouwer centenary symposium, Troelstra and van Dalen eds., North-Holland Pub. Co. (1982), 397–411. 380 [159] Richman F. Church Thesis without tears. Journal of Symbolic Logic. 48 (3), (1983), 797–803. 969 [160] Richman F. Non trivial uses of trivial rings. Proc. Amer. Math. Soc. 103, (1988), 1012–1014. 531 [161] Richman F. Intuitionism as generalization. Philosophia Mathematica. 5, (1990), 124–128. 975 [162] Roitman M. On projective modules over polynomial rings. Journal of Algebra. 58, (1979), 51–63. 941 Bibliography 1001 [163] Roitman M. On stably extended projective modules over polynomial rings. Proc. Amer. Math. Soc. 97, (1986), 585–589. 936 [164] Rota Gian Carlo. The many lives of lattice theory. Notices Amer. Math. Soc. 44 11 (1997), 1440–1445. 678 [165] Sander T. Existence and uniqueness of the real closure of an ordered field without Zorn’s Lemma. J. Pure and Applied Algebra 73, (1991), 165–180. 440 [166] Seidenberg A. What is Noetherian ? Rend. Sem. Mat. e Fis. Milano 44, (1974), 55–61. 31, 79 [167] Seidenberg A. On the Lasker-Noether decomposition theorem. Amer. J. Math 106, (1984), 611–638. 79 [168] Serre J.-P. Géométrie algébrique et géométrie analytique. Ann. Inst. Fourier Grenoble 6, (1955-1956), 1–42. xxi, 444 [169] Serre J.-P. Modules projectifs et espaces fibrés à fibre vectorielle. Séminaire P. Dubreil, Année 1957/1958. 840 [170] Simis A., Vasconcelos W. Projective modules over R[X], R a valuation ring, are free. Notices. Amer. Math. Soc. 18 (5), (1971). 942 [171] Skolem T. A critical remark on foundational research. Norske Vid. Selsk. Forh., Trondheim 28, (1955), 100–105. 975 [172] Soicher L., McKay J. Computing Galois groups over the rationals. J. Number Theory. 20, (1985), 273–281. 441 [173] Stauduhar R. The determination of Galois groups. Math. Comp. 27, (1973), 981–996. 441 [174] Steel A. A New Scheme for Computing with Algebraically Closed Fields. Lecture Notes In Computer Science 2369. Proceedings of the 5th International Symposium on Algorithmic Number Theory, (2002), 491–505. 441 [175] Steel A. Computing with algebraically closed fields. Journal of Symbolic Computation. 45, 342–372, (2010). 441 [176] Stone M. H. Topological representations of distributive lattices and Brouwerian logics. Cas. Mat. Fys. 67, (1937), 1–25. 745, 802 [177] Storch U. Bemerkung zu einem Satz von M. Kneser. Arch. Math. 23, (1972), 403–404. 840 [178] Suslin A. Projective modules over polynomial rings are free. (Russian). Dokl. Akad. Nauk SSSR. 229 (5), (1976), 1063–1066. 941 [179] Suslin A. On the structure of the special linear group over polynomial rings. (Russian). Izv. Akad. Nauk. SSSR Ser. Mat. 41, (1977), 235–252. English translation: Math. USSR Izvestija. 11 (2), 221–238. [180] Suslin A. Stably Free Modules. (Russian). Mat. Sb. (N.S.) 102, (1977), 537–550. English translation: Math. USSR Sb. 31, 479–491. 297 1002 Bibliography [181] Swan R. Factorization of Polynomials over Finite Fields. Pacific Journal of Mathematics. 12 (3), (1962), 1099–1106. 168 [182] Swan R. The Number of Generators of a Module. Math. Z. 102, (1967), 318–322. 841 [183] Swan R. On Seminormality. Journal of Algebra. 67, (1980), 210–229. 900, 941 [184] Tennenbaum J. B. A constructive version of Hilbert’s basis theorem. Dissertation, University of California San Diego, (1973). 79 [185] Traverso C. Seminormality and the Picard group. Ann. Scuola Norm. Sup. Pisa. 24, (1970), 585–595. 900, 941 [186] Valibouze A. Sur le corps des racines d’un polynôme. Acta Arithmetica. 131 (1), (2008), 1–27. 441 [187] Vaserstein L.N. (with A.A. Suslin) Serre’s problem on projective modules over polynomial rings and algebraic K-theory. Funk. An. 8, (1974), 65–66 = Funct. Anal. Appl. 8, 148–150. [188] Vaserstein L.N. Serre’s problem on projective modules over polynomial rings after Suslin and Quillen. (1976), unpublished notes. 922 [189] Vaserstein L.N. (with A.A. Suslin) Serre’s problem on projective modules over polynomial rings and algebraic K-theory. Izv. Akad. Nauk SSSR Ser. Mat. 40, (1976), 993–1054 = Math. USSR Izv. 10, 937–1001. [190] Vessiot E. Sur la théorie de Galois et ses diverses généralisations. Ann. Sci. E.N.S. 3ème série 21, (1904), 9–85. 440 [191] Van der Waerden. Review Zentralblatt für Math 24, (1941), 276. 840 [192] Weyl H. Das Kontinuum, Kritische Untersuchungen über die Grundlagen der Analysis. Veit, Leipzig (1918). Italian: Il Continuo. Indagine critiche sui fondamenti dell’ Analisi. translated by A. B. Veit Riccioli, Bibliopolis, Naples (1977). English: The Continuum. A critical examination of the foundations of Analysis. translated by S. Polard and T. Bole. Thomas Jefferson Press, University Press of America (1987). French: Le continu et autres écrits. Traduits et commentés par Jean Largeault. Librairie Vrin (1994). 975 [193] Yengui I. An algorithm for the divisors of monic polynomials over a commutative ring. Math. Nachr. 260, (2003), 93–99. 894 [194] Yengui I. Dynamical Gröbner bases. Journal of Algebra 301, (2006), 447– 458. Corrigendum: [195] 895 [195] Yengui I. Corrigendum to Dynamical Gröbner bases [J. Algebra 301 (2) (2006) 447–458] and to Dynamical Gröbner bases over Dedekind rings [J. Algebra 324 (1) (2010) 12–24]. Journal of Algebra. 339, (2011), 370–375. 1002 [196] Yengui I. Making the use of maximal ideals constructive. Theoretical Computer Science. 392, (2008) 174–178. 895 Bibliography 1003 [197] Yengui I. The Hermite ring conjecture in dimension one. Journal of Algebra. 320, (2008), 437–441. 936 [198] Yengui I. Stably free modules over R[X] of rank > dim R are free. Mathematics of Computation. 80, (2011), 1093–1098. 936 Index of notation page Examples DerR (B, M ) the B-module of the derivations of B in M . . . . . . . . . . . . . . . . . 6 Der(B) the B-module of the derivations of B . . . . . . . . . . . . . . . . . . . . . . . . . 6 ΩB/R the B-module of the differentials (of Kähler) of B, see also page 338 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 The basic local-global principle and systems of linear equations the canonical homomorphism A → A/a . . . . . . . . . . . . . . . . . . . . . . 18 × A the multiplicative group of invertible elements of A . . . . . . . . . . 19 AS (or S −1 A) the localized ring of A at S . . . . . . . . . . . . . . . . . . . . . . . 19 jA,S the canonical homomorphism A → AS . . . . . . . . . . . . . . . . . . . . . . . 19 sat the saturated monoid of the monoid S . . . . . . . . . . . . . . . . . . . . . . . 20 (or As ) the localized ring of A at sN . . . . . . . . . . . . . . . . . . . . . . . . . 20 (b : a)A the conductor of the ideal a into the ideal b . . . . . . . . . . . . . . . . . . 20 (P : N )A the conductor of the module N into the module P . . . . . . . . . . . 20 AnnA (x) πA,a S A[1/s] the annihilator of the element x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 AnnA (M ) the annihilator of the module M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 { x ∈ M | ax ⊆ N } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 (N : a)M ∞ n (N : a )M { x ∈ M | ∃n a x ⊆ N }. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Reg A monoid of the regular elements of A. . . . . . . . . . . . . . . . . . . . . . . . . . 21 Frac A total ring of fractions of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Am×p (or Mm,p (A)) matrices with m rows and p columns. . . . . . . . . . . 22 Mn (A) Mn,n (A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 GLn (A) group of invertible matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 SLn (A) group of matrices with determinant 1 . . . . . . . . . . . . . . . . . . . . . . . . 22 AGn (A) projection matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . √ (or a) nilradical of the ideal a of A . . . . . . . . . . . . . . . . . . . . . . . . . 22 DA (a) 24 Ared A/DA (0) : reduced ring associated with A. . . . . . . . . . . . . . . . . . . . 24 cA,X (f ) (or c(f )) ideal of A, content of the polynomial f ∈ A[X] . . . . . 24 rkA (M ) rank of a free module, see also the generalizations to the finitely generated projective modules pages 255, 273 and 543. . . . . . . 40 Adj B e cotransposed matrix of B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . (or B) 40 1006 Index of notation Dk (G) determinantal ideal of order k of the matrix G . . . . . . . . . . . . . . . Dk (ϕ) determinantal ideal of order k of the linear map ϕ, see also page 587 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . notation understood with Definition II -5.7, see also notation X -6.5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . same thing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . rk(ϕ) > k rk(ϕ) 6 k (n) 42 43 44 44 Ei,j (λ) En (A) (or Ei,j (λ)) elementary matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 elementary group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Ik identity matrix of order k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 0k square matrix of order k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 0k,` null matrix of type k × ` . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Ik,q,m standard simple matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Ik,n standard projection matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Aα,β extracted matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Adjα,β (A) see notation II -5.12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 P` set of finite subsets of {1, . . . , `} . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Pk,` subsets with k elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 AGn,k (A) subsets of AGn (A): projection matrices of rank k . . . . . . . . . . . . 51 Gn,k (A) projective Grassmannian over A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Gn (A) projective Grassmannian over A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Pn (A) projective space of dimension n over A . . . . . . . . . . . . . . . . . . . . . . . 51 Diag(a1 , . . . , an ) diagonal square matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 trace of ϕ (endomorphism of An ), see also page 269 . . . . . . . . . . 54 Tr(ϕ) Cϕ (X) characteristic polynomial of ϕ (idem), see also page 269 . . . . . . 54 [B : A] rkA (B), see also page 326 and X -3.6 . . . . . . . . . . . . . . . . . . . . . . . . . 55 TrB/A (a) trace of (the multiplication by) a, see also VI -3.1 . . . . . . . . . . . . . 55 NB/A (a) norm of a, see also VI -3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 characteristic polynomial of (the multiplication by) a, see also VI -3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GramA (ϕ, x) Gram matrix of (x) for ϕ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 57 CB/A (a) gramA (ϕ, x) Gram determinant of (x) for ϕ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 discB/A (x) discriminant of the family (x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 DiscB/A discriminant of a free extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 LA (M, N ) A-module of linear maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 EndA (M ) LA (M, M ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 ? dual module of M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 A[X]d A-submodule of A[X] of the homogeneous polynomials of degree d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 M Index of notation 1007 The method of undetermined coefficients Pf (E) set of finite subsets of E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Pfe (E) set of finitely enumerated subsets of E . . . . . . . . . . . . . . . . . . . . . . . 84 0 0 HomA (B, B ) set of homomorphisms of A-algebras from B to B . . . . . . . 91 µM,b (or µb ) y 7→ by, ∈ EndB (M ) (b ∈ B, M a B-module) . . . . . . . . . 92 J (f ) ideal of the symmetric relators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 AduA,f universal splitting algebra of f over A . . . . . . . . . . . . . . . . . . . . . . . . 95 discX (f ) discriminant of the monic polynomial f of A[X] . . . . . . . . . . . . . . 98 Tschg (f ) Tschirnhaus transform of f by g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 MinK,x (T ) or Minx (T ), monic minimal polynomial of x (over the field K) 105 G.x orbit of x under G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 G.x = {x1 , . . . , xk } orbit enumerated without repetition with x1 = x . . . . 108 StG (x) (or St(x)) stabilizer subgroup of the point x . . . . . . . . . . . . . . . . . . 108 StpG (F ) (or Stp(F )) point by point stabilizer of the subset F . . . . . . . . . 108 |G : H | index of the subgroup H in the group G: #(G/H) . . . . . . . . . . . 108 FixE (H) (or E H ) subset of E formed from the fixed points of H . . . . . . . 108 σ ∈ G/H we take a σ in each left coset of H in G . . . . . . . . . . . . . . . . . . . . . . CG (x)(T ) = Q NG (x) = Q TrG (x) = (T − σ(x)) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . σ∈G 108 108 σ(x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 σ(x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 RvG,x (T ) resolvent of x (relative to G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 AutA (B) Pσ∈G σ∈G group of A-automorphisms of B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 Gal(L/K) idem, for a Galois extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 GL/K finite subgroups of AutK (L) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 KL/K strictly finite K-subextensions of L . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 GalK (f ) Galois group of the separable polynomial f . . . . . . . . . . . . . . . . . . . 109 SylX (f, p, g, q) Sylvester matrix of f and g in degrees p and q . . . . . . . . . . . . 116 ResX (f, p, g, q) resultant of the polynomials f and g in degrees p and q . . 116 char(K) characteristic of a field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 AdjB/A (x) or x e: cotransposed element, see also page 325 . . . . . . . . . . . . . . . . 129 (A : B) 135 conductor of B into A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RX (f, g1 , . . . , gr ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 JACX (f ) Jacobian matrix of a polynomial system . . . . . . . . . . . . . . . . . . . . . . 145 JacX (f ) Jacobian of a polynomial system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 | L : E |A index of a finitely generated submodule in a free module . . . . . 153 1008 Index of notation Finitely presented modules Ra hx | zi mξ matrix of the trivial relators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pn x z .................................................... i=1 i i hx1 − ξ1 , . . . , xn − ξn iA : ideal of the zero ξ . . . . . . . . . . . . . . . . . . . 183 184 186 M ⊗A N tensor product of two A-modules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192 Vk kth exterior power of M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 M A k SA M ρ? (M ) Fn (M ) ResX (f) Kn (M ) th k symmetric power of M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-module obtained from the A-module M by the scalar extension ρ : A → B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . or FA,n (M ): nth Fitting ideal of the finitely generated A-module M ......................................................... resultant ideal of f (with a monic polynomial in f) . . . . . . . . . . . . 219 223 nth Kaplansky ideal of the A-module M . . . . . . . . . . . . . . . . . . . . . 229 194 197 Finitely generated projective modules, 1 θM,N natural A-linear map M ? ⊗A N → LA (M, N ) . . . . . . . . . . . . . . . . θM natural A-linear map M ? ⊗A M → EndA (M ) . . . . . . . . . . . . . . . . Diag(M1 , . . . , Mn ) block diagonal matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bdim A < n stable range (of Bass) less than or equal to n . . . . . . . . . . . . . . . . det ϕ determinant of the endomorphism ϕ of a finitely generated projective module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cϕ (X) characteristic polynomial of ϕ . . . (idem) . . . . . . . . . . . . . . . . . . . ϕ e cotransposed endomorphism of ϕ . . . (idem) . . . . . . . . . . . . . . . . Fϕ (X) fundamental polynomial of ϕ, i.e., det(IdP + Xϕ) . . . . . . . . . . . . TrP (ϕ) trace of the endomorphism ϕ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RP (X) rank polynomial of the finitely generated projective module P eh (P ) the idempotent associated with the integer h and with the projective module P . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . component of the module P in rank h . . . . . . . . . . . . . . . . . . . . . . . . P (h) 245 245 251 258 269 269 269 272 272 272 273 277 Strictly finite algebras and Galois algebras CB/A (x)(T ) characteristic polynomial of (the multiplication by) x . . . . . . . FB/A (x)(T ) fundamental polynomial of (the multiplication by) x . . . . . . . . . NB/A (x) norm of x: determinant of the multiplication by x . . . . . . . . . . . . TrB/A (x) trace of (the multiplication by) x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . aα α ◦ µa : x 7→ α(ax) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AdjB/A (x) or x e: cotransposed element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . [B : A] rkA (B), see also pages 55 and 549 . . . . . . . . . . . . . . . . . . . . . . . . . . . . ΦA/k,λ Φλ (x, y) = λ(xy) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0 φ⊗φ tensor product of bilinear forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 313 313 313 324 325 326 327 331 Index of notation 1009 Aek A ⊗k A, enveloping algebra of A/k . . . . . . . . . . . . . . . . . . . . . . . . . . 334 JA/k ideal of Aek . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 ∆A/k ∆(x) = x ⊗ 1 − 1 ⊗ x. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . µA/k µA/k P  a ⊗ bi = i i P 335 a b ................................. i i i 335 Derk (A, M ) the A-module of the derivations of A in M . . . . . . . . . . . . . . . . . 338 Der(A) the A-module of the derivations of A . . . . . . . . . . . . . . . . . . . . . . . . 338 ΩA/k the A-module of the differentials (of Kähler) of A . . . . . . . . . . . . 338 εA/k idempotent that generates Ann(JA/k ), if it exists . . . . . . . . . . . . . 341 Link(A, A) A-module of k-linear maps from A to A . . . . . . . . . . . . . . . . . . . . . PGLn (A) quotient group GLn (A)/A× . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 367 An subgroup of even permutations of Sn . . . . . . . . . . . . . . . . . . . . . . . . . 364 k[G] algebra of a group, or of a monoid. . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 The dynamic method B(A) Boolean algebra of the idempotents of A . . . . . . . . . . . . . . . . . . . . . 399 B(f ) “canonical” basis of the universal splitting algebra . . . . . . . . . . . . 405 Local rings, or just about Rad(A) radical of Jacobson of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 Nagata ring of A[X] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Suslin(b1 , . . . , bn ) Suslin set of (b1 , . . . , bn ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514 A(X) 518 Finitely generated projective modules, 2 Gn = Z[(fi,j )i,j∈J1..nK ]/Gn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gn 2 541 Gn relations obtained when writing F = F . . . . . . . . . . . . . . . . . . . . . . 541 H+ 0 (A) [P ]H+ (A) semi-ring of ranks of quasi-free A-modules . . . . . . . . . . . . . . . . . . . 542 or [P ]A , or [P ]: class of a quasi-free A-module in H+ 0 (A) . . . . . 542 H0 A (generalized) rank of the finitely generated projective A-module M ......................................................... ring of the ranks over A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 544 [B : A] rkA (B), see also pages 55 and 326 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 549 0 rkA (M ) Gn (A) Gn ⊗Z A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551 Gn,k Gn + h1 − rk i, with (in Gn ) rk = ek (Im F ) . . . . . . . . . . . . . . . . . . . 551 Gn,k Gn,k = Z[(fi,j )i,j∈J1..nK ]/Gn,k or Gn [1/rk ] . . . . . . . . . . . . . . . . . . . . 551 AGn,k (A) “subvariety” of AGn (A): projectors of rank k . . . . . . . . . . . . . . . . 551 GK0 A Pic A K0 A semi-ring of the isomorphism classes of finitely generated projective modules over A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 group of isomorphism classes of projective modules of constant rank 1 over A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 Grothendieck ring of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 1010 [P ]K0 (A) Index of notation or [P ]A , or [P ]: class of a finitely generated projective A-module in K0 (A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 568 e0 A K kernel of the rank homomorphism rk : K0 A → H0 A . . . . . . . . . . 569 Ifr A monoid of the finitely generated fractional ideals of the ring A 571 Gfr A group of invertible elements of Ifr A . . . . . . . . . . . . . . . . . . . . . . . . . . 571 Cl A group of classes of invertible ideals (quotient of Gfr A by the subgroup of invertible principal ideals) . . . . . . . . . . . . . . . . . . . . . 571 Distributive lattices, lattice-groups ↓a { x ∈ X | x 6 a }, see also page 620 . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 ↑a { x ∈ X | x > a }, see also page 620 . . . . . . . . . . . . . . . . . . . . . . . . . . . 617 ◦ T opposite lattice of the lattice T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619 IT (J) ideal generated by J in the distributive lattice T . . . . . . . . . . . . . 620 FT (S) filter generated by S in the distributive lattice T . . . . . . . . . . . . . 620 T/(J = 0, U = 1) particular quotient lattice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621 Bo(T) Boolean algebra generated by the distributive lattice T . . . . . . . 624 (P ) orthogonal direct sum of copies of Z, indexed by P . . . . . . . . . . . 625 i∈I Gi orthogonal direct sum of ordered groups . . . . . . . . . . . . . . . . . . . . . . 625 C(a) solid subgroup generated by a (in an l-group) . . . . . . . . . . . . . . . . 627 DA (x1 , . . . , xn ) DA (hx1 , . . . , xn i): an element of Zar A . . . . . . . . . . . . . . . . . . . . 641 Zar A 641 Z AS /a Zariski lattice of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . −1 (or S A/a ) we invert the elements of S and we annihilate the elements of a . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643 satA or S : the filter obtained by saturating the monoid S in A . . 645 • A reduced zero-dimensional ring generated by A . . . . . . . . . . . . . . . . 652 A ` B V B: implicative relation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 654 Spec T spectrum of the finite distributive lattice T, see also page 746 656 (b : a)T the conductor ideal of a in b (distributive lattices) . . . . . . . . . . . . 658 App pp-ring closure of A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 664 Min A subspace of Spec A formed by the minimal prime ideals . . . . . . 661 S sat A 6 W Prüfer and Dedekind rings a÷b { x ∈ Frac A | xb ⊆ a } . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684 A[at] Rees algebra of the ideal a of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 IclA (a) integral closure of the ideal a in A . . . . . . . . . . . . . . . . . . . . . . . . . . . 687 Index of notation 1011 Krull dimension Spec A Zariski spectrum of the ring A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DA (x1 , . . . , xn ) compact-open set of Spec A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Spec T spectrum of the distributive lattice T . . . . . . . . . . . . . . . . . . . . . . . . DT (u) compact-open set of Spec T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oqc(T) distributive lattice of the compact-open sets of Spec T . . . . . . . . K hxi + (DA (0) : x): Krull boundary ideal of x in A . . . . . . . . . . . . (x) JA K a + (DA (0) : a): Krull boundary ideal of a in A . . . . . . . . . . . . . . . JA (a)  K AxK (x) : upper boundary ring of x in A . . . . . . . . . . . . . . . . . . . A JA K (x) SA AK x N x (1 + xA): Krull boundary monoid of x in A . . . . . . . . . . . . . . . K (x))−1 A: lower boundary ring of x in A . . . . . . . . . . . . . . . . . . (SA Kdim A 6 r the Krull dimension of the ring A is 6 r . . . . . . . . . . . . . . . . . . . . . Kdim A 6 Kdim B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . K (x0 , . . . , xk ) iterated Krull boundary monoid . . . . . . . . . . . . . . . . . . . . . . . . . . SA K (x0 , . . . , xk ) iterated Krull boundary ideal . . . . . . . . . . . . . . . . . . . . . . . . . . . . JA K IA (x0 , . . . , xk ) iterated Krull boundary ideal, variant . . . . . . . . . . . . . . . . . . . . Kdim T 6 r the Krull dimension of the distributive lattice T is 6 r . . . . . . ↓ x ∨ (0 : x)T : Krull boundary ideal of x in the distributive JTK (x) lattice T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TxK T JTK (x) : upper boundary lattice of x . . . . . . . . . . . . . . . . . . . . . . 745 745 746 746 746 748 748 748 748 748 749 751 751 751 751 764 765 765 JTK (x0 , . . . , xk ) iterated Krull boundary ideal in a distributive lattice . . . . Kdim ρ Krull dimension of the morphism ρ . . . . . . . . . . . . . . . . . . . . . . . . . . .   A{a} A a⊥ × A (a⊥ )⊥ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 769 minimal pp-ring closure of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . valuative dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 770 777 Amin Vdim A 765 766 The number of generators of a module JA (a) Jacobson radical of the ideal a of A . . . . . . . . . . . . . . . . . . . . . . . . . . JA (x1 , . . . , xn ) JA (hx1 , . . . , xn i): an element of Heit A . . . . . . . . . . . . . . . . . . . Heit A Heitmann lattice of A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Jdim dimension of the Heitmann J-spectrum . . . . . . . . . . . . . . . . . . . . . . . Max A subspace of Spec A formed by the maximal ideals . . . . . . . . . . . . Jspec A Spec(Heit A): Heitmann J-spectrum . . . . . . . . . . . . . . . . . . . . . . . . . . H hxi + (JA (0) : x): Heitmann boundary ideal (of x in A) . . . . . . JA (x)  H AxH A JA (x) : the Heitmann boundary ring of x . . . . . . . . . . . . . . . . . 810 810 810 810 810 810 811 Hdim Heitmann dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sdim A < n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Gdim A < n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cdim A < n the ring A is n-stable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811 815 815 827 811 1012 Index of notation The local-global principle M(U ) the monoid generated by the element or the subset U of A . . . 846 S(I, U )  ................. 846 S(a1 , . . . , ak ; u1 , . . . , u` ) S({a1 , . . . , ak } , {u1 , . . . , u` }) . . . . . . . . . . . . . . . . . . . . 846 v ∈ A | ∃u ∈ M(U ) ∃a ∈ hIiA , v = u + a Extended projective modules AhXi localized ring of A[X] at the monic polynomials . . . . . . . . . . . . . . 912 G there exists a matrix H ∈ G such that HA = B . . . . . . . . . . . . . . . 920 A∼B Suslin’s stability theorem group of linear automorphisms of P . . . . . . . . . . . . . . . . . . . . . . . . . . subgroup of GL(P ) generated by the transvections . . . . . . . . . . . 944 944 Mennicke symbol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GLn (B, b) kernel of GLn (B) → GLn (B/b ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . En (B, b) normal subgroup of En (B) generated by the Eij (b) with b ∈ b. 949 949 GL(P ) e(P ) E {a, b} 947 Annex: constructive logic P(X) the class of subsets of X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 964 Index absolute value, 626 absolutely irreducible, 715 actual infinity, 961 adjoint matrix, 40 algebra Boolean —, 397 enveloping —, 334 étale — over a discrete field, 301 exterior — of a module, 194 faithfully flat —, 462 finite —, 124 finitely generated —, 313 finitely presented —, 313 finitely presented reduced —, 313 flat —, 462 Frobenius —, 327 Galois —, 348 Heyting —, 658 integral —, 92 of a monoid, 525 over a ring, 91 pre-Galois —, 405 separable —, 342 separable algebraic over a discrete field, 301 strictly étale —, 327 strictly finite —, 313 strictly finite — over a discrete field, 105 algebra of a monoid, 364 algebraic element over a discrete field, 92 field over a subfield, 92 primitively — element over a ring, 698 algebraic variety over an algebraically closed field, 556 algebraically closed discrete field, 122 algebraically independent elements over a subring, 85 algorithm for squarefree factorization, 308 alternating matrix, 185 amalgamated sum of two arrows of same source in a category, 317 annihilator of a module, 20 of an element, 20 Artin theorem, 353 Artinian ring, 209 associated elements in A, 57 elements in a monoid, 636 associates see associated elements, 57 association, 636 atom, 398 axiom of the prime ideal, 845 Bézout domain, 206 matrix, 337 ring, 206 strict — ring, 207 Bézoutian determinant of a polynomial system, 366 Basic elimination lemma, 121 basic local-global machinery (with prime ideals), xxvi, 523, 768, 867, 869, 895, 910, 911, 914, 919, 924, 930, 932, 949, 958 basic local-global principle, 18, 22–24, 26, 28, 29, 50, 60, 205, 264, – 1013 – 1014 273, 460, 464, 555, 601, 628, 691, 758, 848 basis adapted to an inclusion, 208, 227 bilinear form non-degenerate —, 327 bimodule, 318 Binet-Cauchy formula, 70 block diagonal matrix, 251 Boolean algebra, 397 Boolean G-algebra, 400 transitive —, 400 bounded set, 408 bounded (in number) set, 963 cancellative module, 820 Cartesian square, 573 Cauchy modules, 96 Cayley-Hamilton, 87 chain in an ordered set, 617 potential — of prime ideals, 793 change of the base ring, 196, 317 change of variables, 388 character of an algebra, 186 characteristic of a field, 123 polynomial of an element, 55 polynomial of an endomorphism, 54 Church’s thesis, 969 False —, 969 class, 964 class group of a ring, 571 class of invertible ideals, 571 clean ring, 524 closed covering, 647 Index closure algebraic —, 137 minimal pp-ring —, 770 perfect —, 308 pp-ring —, 664 reduced zero-dimensional —, 652 separable —, 309 co-morphism, 557 coherent module, 30 ring, 29 comaximal elements, 21 ideals , 38 monoids, 21 companion matrix of a polynomial, 87 compatible saturated pair, 645 ideal and filter, 645 complement (in a Boolean algebra), 398 (in a distributive lattice), 621 of an idempotent, 36 complementary sequences for a support, 825 in a commutative ring, 754 in a distributive lattice, 764 completable unimodular vector, 288 vector, 257 complete symmetric function of degree r, 151 complex, 60 conductor of a ring into a subring, 135 of a submodule into another, 20 of an ideal into another, 20 of one ideal into another (distributive lattice), 658 congruence modulo a in an l-group, 627 congruential ring, 519 system, 518 connected Index ring , 36 constructible, 829 constructible spectrum, 829 content of a polynomial, 24 contraction of an ideal (in a subring), 135 convex subset of an ordered set, 662 coordinate system, 246, 344 coregular elements, 878 cotransitivity, 961 cotransposed element (in a strictly finite algebra), 325 element (in a free algebra), 129 endomorphism, 88, 269 matrix, 40 countable set, 963 covering, 846 cut, 654 cyclic module, 262 D-complementary sequences, 825 De Morgan’s laws, 622 decomposable ring, 510 element in a ring, 509 decomposed ring, 511 decomposition bounded —, 632 complete —, 632 partial —, 632 Dedekind ring, 710 ideals that avoid the conductor, 136 inversion of an ideal à la —, 133 lemma, 350 polynomial, 160 total factorization — ring, 710 Dedekind-Mertens, xviii, 83, 90, 91, 138, 151, 176, 660, 666, 979 1015 dependence relation algebraic —, 92 integral —, 92, 686 linear —, 30 depth finite family of — > 1, 878 finite family of — > 2, 881 derivation at a point (a character) of an algebra, 500 at a point of a manifold, 6 module of —, 6 module of —s, 338 of an algebra in a module, 6, 338 of an algebra, 6, 338 universal —, 338 detachable, 35 determinant Gram —, 57 of an endomorphism, 269 determinant trick, 491 determinantal ideals, 43 of a linear map (finitely generated projective modules), 587 of a linear map (free modules), 43 of a matrix, 42 diagonalize, 333 different of an element in a strictly finite algebra, 313 of an element in a finite free algebra, 103 differential (Kähler) —, 7, 338 dimension of a polynomial system over a discrete field, 390 of a vector space, 39 of an finitely presented algebra over a discrete field, 390 of an affine variety, 390 (Krull) dimension 6 1 pp-ring of —, 638 direct sum in a category, 316 discrete 1016 field, 34 set, 33 discrete valuation ring (DVR), 507, 712 discriminant, 57, 98 of a number field, 130 disjoint sequences, 808 distinction, 960 distributive lattice quotient —, 619 divisor chain condition, 636 domain Bézout —, 206 GCD- — admitting partial factorizations, 637 principal ideal —, 208 Prüfer —, 159 unique factorization —, 637 valuation —, 696 dualizing, 327 Dunford Jordan-Chevalley- — decomposition, 154 D-unimodular vector, 825 DVR, 712 E-regular element, 878 ideal, 878 elementarily equivalent matrices, 45 elementary column operation, 45 group, 45 matrix, 45 row operation, 45 elementary local-global machinery of pp-rings, xix, 204, 567, 695, 697–700, 702, 705, 711, 730, 771, 779, 781 elementary local-global machinery of reduced zero-dimensional rings, xix, 212, 214, 228, 234, 320, 371, 389, 393, 429, 454, 512, 711, 761, 794, 904, 918 Index elimination algebraic — theorem, 223 basic — lemma, 121 general — lemma, 222 ideal, 117, 121, 122, 222, 230 of a variable, 138 theory, 116 enumerable nonempty — set, 84 set, 963 equivalent matrices, 45 monoids, 20 étale algebra over a discrete field, 301 Euclidean ring, 156 evaluation homomorphism, 85 exact sequence of linear maps, 60 explicit divisibility ring with —, 154 extension, 91 of an ideal (in an overring), 135 extension principle for algebraic identities, 86 extensional distinction, 962 equality, 961 exterior algebra of a module, 194 exterior power of a linear map, 42 of a module, 41 factorially closed submonoid, 638 factorization bounded —, 637 bounded — ring, 637 complete —, 637 partial —, 84, 637, 709 squarefree —, 308 total —, 637, 710 factors invariant — (of a module), 201, 208 Index faithful ideal, 20, 267 module, 20 support, 826 faithfully flat algebra, 462 ring homomorphism, 462 field, 34, 487 algebraically closed discrete —, 122 discrete —, 34 Heyting —, 487 prime —, 123 residual — of a local ring, 487 separably closed —, 309 separably factorial, 306 field of fractions of an integral ring, 105 field of roots of a polynomial, 106 filter maximal —, 644 of a commutative ring, 20 of a distributive lattice, 620 prime —, 644 principal — of a commutative ring, 20 principal — of a distributive lattice, 620 filtering union, 445 finite family, 84 set, 84 finite character property, 26 finite dimensional vector space, 39 finitely enumerable set, 84, 963 finitely generated projective module, 2, 245 Fitting ideal, 219 flat algebra, 462 module, 444 1017 ring homomorphism, 462 Forking lemma, 161, 174 formal degree, 24 formally leading coefficient , 24 fractional ideal, 571 Freeness lemma, 45 Frobenius algebra, 327 Frobenius’ automorphism, 152 function regular —, 557 fundamental system of orthogonal idempotents, 37 associated to a finitely generated projective module, 272 G-content, 639 G-primitive, 639 Galois correspondence, 108 Galois extension, 108 Galois group, 108 Galois quotient of an algebra, 362 Galoisian element in a Boolean algebra, 400 ideal, 362 idempotent in an algebra provided with a finite group of automorphisms, 362 Gauss-Joyal Lemma, 25, 65, 79, 663, 828 GCD-domain, 637 GCD-monoid, 636 GCD-ring, 637 general elimination lemma, 222 generalized inverse, 49 Going Down morphism, 785 Going Up morphism, 784 Gram determinant, 57 matrix, 57 Grothendieck group, 568 1018 Index group elementary —, 45 valuation —, 689 group of classes of invertible ideals, 571 group of invertible fractional ideals, 571 group of units, 19 Hasse derivative, 368, 576 height of a rational fraction, 368 Heitmann lattice, 810 Heitmann boundary quotient ring, ideal, 811 Heitmann dimension, 811 hereditary ring, 740 Heyting algebra, 658 field, 487 Hilbert, 31, 35, 137, 214, 369, 378, 395, 975 homogeneous map, 848 polynomial, 88 homomorphism local —, 468 ideal conductor —, 20 conductor — (in a distributive lattice), 658 determinantal —, 587 elimination —, 117, 121, 122, 222, 224, 230 faithful —, 20, 267 finite potential prime —, 846 Fitting —, 219 fractional —, 571 Galoisian —, 362 Heitmann boundary —, 811 integrally closed —, 686 invertible —, 131, 268 iterated Krull boundary —, 751 iterated Krull boundary — (distributive lattice), 765 Kaplansky —, 229 Krull boundary —, 748 Krull boundary — (distributive lattice), 765 locally principal —, 263 maximal —, 489 of a distributive lattice, 620 of a point, 187 of the symmetric relators, 95 potential prime —, 846 prime —, 489 prime — (distributive lattice), 656 principal —, 131 principal — (of a distributive lattice), 620 radical —, 24 radically finitely generated —, 809 resultant —, 223 idempotent, 36 complementary —, 36 separability —, 342 implicative lattice, 658 incompatible saturated pair, 645 ideal and filter, 645 indecomposable element in a Boolean algebra, 399 idempotent, 334 index of a subgroup in a group, 108 of a submodule in a free module, 153 infinite actual —, 961 potiential —, 961 set, 963 integral element over a ring, 92 element over an ideal, 686 quasi — ring (or pp-ring), 202 ring, 23, 202 ring over a subring, 92 integral closure of A in B ⊇ A, 125 Index of the ideal a in A, 687 integrally closed, 124, 126, 686 internal orthogonal direct sum, 663 of a family of l-subgroups, 663 interpolation Lagrange —, 148 invariant factors, 201, 208, 707 invertible ideal, 131, 268 Invertible minor lemma, 45 irreducible element in an l-group, 632 isolated subgroup, 662 isolated subgroup of an ordered group, 662 isolated zero of a polynomial system, 505 Jacobian of a polynomial system, 145 Jacobson radical, 487, 810 Jacobson radical of a ring, 487 of an ideal, 810 Kähler differential, 7, 338 Kaplansky ideal, 229 Kernels’ Lemma, 38 Kronecker theorem (1), xviii, 83, 92, 95, 125–128, 130, 151, 170, 176, 307, 637, 687, 693, 699, 716, 717, 732, 786, 787, 806, 808, 825, 904, 979 theorem (2), xxiv, 806, 808, 809, 814, 825, 826, 840, 889, 893 trick, 95, 515, 641, 660 Kronecker product, 259 Krull boundary ideal, 748 iterated — ideal, 751 iterated — monoid, 751 1019 monoid, 748 Krull dimension of a commutative ring, 749 of a distributive lattice, 764 of a support, 825 Krull lower boundary, 748 Krull upper boundary, 748 (distributive lattice), 765 Krull’s lemma, 319, 845 Kummer little theorem, 132 Lagrange interpolation, 148 lattice, 397, 618 distributive —, 397, 618 opposite —, 619 Zariski —, 641 lattice-group, 625 admitting bounded decompositions, 632 admitting complete decompositions, 632 admitting partial decompositions, 632 lattice-subgroup, 625 left-equivalent matrices, 909 Legendre symbol, 154 LEM , xxvii, 973 Lemma of the finitely generated idempotent ideal, 38 Lemma of the locally simple map, 493 length of a chain in an ordered set, 617 linear dependence relation (syzygy), 30 linear form dualizing —, 327 LLPO , 971 local homomorphism, 468 ring, 206 local algebra in a zero of a polynomial system, 498 Local freeness lemma, 492 1020 Local number of generators lemma, 494 local-global ring, 512 local-global machinery of arithmetic rings, 461, 700, 706, 730, 933 local-global machinery of maximal ideals, 520, 874 locale, 674 localization characteristic property of the —, 19 cyclic — matrix, 264 morphism (rings), 866 morphism (modules), 862 principal — matrix, 264 localization morphism at S, 866 Localized finite ring lemma, 496 Localized zero-dimensional ring lemma, 496 locally cyclic module, 23, 263 module — generated by k elements, 495 monic polynomial, 585 principal ideal, 263 ring — without zerodivisors, 457 simple linear map, 49 simple matrix, 53 LPO , 970 Lüroth theorem, 368 Lying Over, 318 morphism, 783 lying over, 687 manipulation Bézout —, 208 map regular —, 557 matrices elementarily equivalent —, 45 equivalent —, 45 left-equivalent —, 909 similar —, 44 matrix, 67 Index adjoint (cotransposed) —, 40 alternating —, 185 Bézout —, 337 block diagonal —, 251 companion — of a polynomial, 87 cyclic localization — for the ntuple (x1 , . . . , xn ), 264 elementary —, 45 generalized Sylvester —, 224 Gram —, 57 in Smith form, 206 Jacobian —, 145 locally simple —, 53 of a linear map in coordinate systems, 251 of rank > k, 44 of rank 6 k, 44 of rank k, 44 of trivial syzygies, 183 presentation —, 179 principal localization —, 264 projection —, 2 simple —, 46 special —, 946 standard — of projection, 46 standard simple —, 46 Sylvester —, 118 maximal filter, 644 ideal, 489 McCoy theorem, 51 McCoy’s Lemma, 91 Mennicke symbol, 947 method Newton’s —, 145, 147, 162, 166, 320 minor, 41 dominant principal —, 41 of order k, 41 principal —, 41 module locally cyclic —, 23 localization at S, 20 cancellative —, 820 coherent —, 30 Index dual —, 61 extended, 196 faithful —, 20 finitely generated projective —, 2, 245 finitely presented —, 179 flat —, 444 free — of finite rank, 1, 39 free — of rank k, 39 locally cyclic —, 263 locally generated by k elements, 495 Noetherian —, 31 of (Kähler) differentials, 7, 338 quasi-free —, 214 stably free —, 2, 255 strongly discrete —, 35 syzygy —, 30 torsion-free —, 445, 457 monoid, 19 equivalent —, 20 iterated Krull boundary —, 751 Krull boundary —, 748 saturated —, 20 saturated — in another, 638 morphism decomposable ring —, 523 localization — (rings), 866 localization — (modules), 862 of scalar extension, 196 of pp-rings, 664 regular —, 792 multiplicative polynomial, 272 multiplicity of an isolated zero (field case), 505 Nagata ring, 514 Nakayama lemma, 491 Nakayama’s lemma, 491 negative part, 626 Newton method, 145, 147, 162, 166, 320 sums, 150, 152, 303 1021 Newton sums, 150 nilpotent, 24 nilradical of a ring, 24 of an ideal, 24 Noether position, 140, 215, 217, 218, 227, 321, 384, 386, 388, 390, 391, 429, 556, 763, 788, 795 Noetherian module, 31 ring, 31 noetherian lattice-group, 632 non-degenerate bilinear form, 327 non-invertible, 486 nonzerodivisor, 20 norm of an ideal, 722 normal overfield, 311 ring, 686 n-stable ring, 827 support, 827 Null tensor lemma, 200 Nullstellensatz, xviii, xx, xxxi, 10, 11, 83, 137, 140–145, 176, 213–215, 218, 316, 320, 377, 383, 384, 386, 390–392, 429, 440, 497, 504, 555–557, 806, 891, 894, 895, 980–982 omniscience LEM , 973 LLPO , 971 LPO , 970 principles, 973 one and a half Theorem —, 254 theorem , 740, 759 theorem, 702 operation elementary —, 45 ordered group, 625 1022 orthogonal idempotents, 36 projectors, 562 orthogonal direct sum, 625 pair unimodular —, 944 parameter regular —, 712 partial factorization basis, 84, 709 partial factorization algorithm, 84 perfect field, 308 pf-ring, 457 Picard group, 568 PID (principal ideal domain), 208 polar subgroup, 663 polynomial characteristic — of an element, 55 characteristic — of an endomorphism, 54, 269 cyclotomic —, 155, 158 elementary symmetric —, 88 formal —, 117 fundamental —, 272 locally monic —, 585 multiplicative —, 272 primitive —, 24 primitive — by values, 511 pseudomonic —, 389 rank —, 272 separable monic —, 98 polynomial system, 140, 187, 312 zero-dimensional —, 217 polynomial systems, 116 positive part, 626 potential chain of prime ideals, 793 potential infinity, 961 pp-ring (or quasi-integral ring), 202, 267 preset, 960 prime ideal of a commutative ring, 489 filter, 644 Index ideal of a distributive lattice, 656 subfield of a field, 123 subring of a ring, 123 primitive ring, 531 polynomial, 24 primitive by values polynomial —, 511 principal filter of a commutative ring, 20 filter of a distributive lattice, 620 ideal, 131 ideal of a distributive lattice, 620 minor, 41 principal ideal domain (PID), 208 projective finitely generated — module, 245 module, 248 projective space of dimension n over a ring, 51 projector, 2, 246 property finite character —, 26 Prüfer ring , 460 domain, 159, 444 partial factorization — ring, 709 pseudomonic polynomial, 389 push out of two arrows of same source in a category, 317 quasi-free module, 214 quasi-integral, 267 ring (or pp-ring), 202 quasi-inverse, 211 Quillen, 909, 916, 918, 936, 941 Quillen induction, 916 abstract —, 916 concrete —, 917, 933 concrete —, free case, 918 concrete —, stably free case, 915 Quillen patching, 909, 910, 914, 919, 926 Index quotient algebra for a polynomial system, 315 quotient field of an integral ring, 105 Rabinovitch trick, 142 radical ideal, 24 Jacobson —, 487, 810 nilpotent —, 24 radically finitely generated ideal, 809 rank (generalized) — of a finitely generated projective module, 543 polynomial of a finitely generated projective module, 272 free module of — k, 39 module of constant —, 273 of a free module, 39 of a linear map, 44, 587 of a matrix, 44 of a module which admits finite projective resolution, 597 reduced ring, 24 Rees algebra of the ideal a, 687 refine, 645 reflects the units homomorphism that —, 466 regular element, 20 function, 557 map, 557 monoid, 635 morphism, 792 parameter, 712 sequence, 185 relator symmetric —, 95 residually zero-dimensional ring, 489 resolvent, 108 1023 restriction homomorphism, 549 resulant of two polynomials, 118 resultant ideal, 223 Reynolds operator, 793 ring absolutely flat —, 211 arithmetic —, 460 Artinian —, 209 Bézout —, 206 bounded factorization —, 637 clean —, 524 coherent —, 29 congruential —, 519 connected —, 36 decomposable —, 510 decomposed —, 511 Dedekind —, 710 discrete valuation —, 507, 712 Euclidean —, 156 geometric —, 763 hereditary —, 740 Hermite —, 242 integral —, 23, 202 integral — over a subring, 92 integrally closed —, 126 integrally closed — in . . . , 124 local —, 206 local-global —, 511 localized — at a monoid S, 19 locally without zerodivisors (or pf-ring), 457 Noetherian —, 31 normal, 686 n-stable —, 827 ordered —, 545 partial factorization Prüfer —, 709 primitive —, 531 Prüfer —, 460 quasi-integral — (or pp-ring), 202, 267 quotient — by the ideal a, 18 reduced —, 24 1024 residually zero-dimensional —, 489 residually discrete local —, 488 semi-local —, 524 semihereditary —, 740 seminormal —, 902 Smith —, 226 strict Bézout —, 207 strict semi-local —, 524 strongly discrete —, 35 that lifts the idempotents, 511 total — of fractions, 21 total factorization Dedekind —, 710 total quotient —, 21 trivial —, 20 valuation —, 206, 689, 696 with explicit divisibility, 154 without zerodivisors, 456 zero-dimensional, 209 ring of (generalized) ranks over A, 544 ring of integers of a number field, 130 root simple —, 98 saturated a- — filter, 621, 644 f- — ideal, 644 f- — ideal , 621 monoid, 20 pair, 621, 644 submonoid, 638 saturated pair, 621 saturation of N by a in M , 20 scalar extension, 196, 317 section of a split surjection, 248 semi-local ring, 524 semi-ring, 542 semihereditary ring, 740 seminormal Index closure in a reduced overring, 905 ring, 902 separable algebra, 342 monic polynomial, 98 separable algebraic algebra over a discrete field, 301 element over a discrete field, 301 separably closed discrete field, 309 separably factorial discrete field, 306 separating automorphism, 348 group of automorphisms, 348 separation, 961 narrow —, 961 sequence regular —, 185 singular —, 751, 764 unimodular —, 40 sequences disjoint —, 808 Serre’s Splitting Off theorem, xxv, 810, 814, 816, 832, 834, 840, 926, 928, 930, 985 set bounded —, 408, 963 countable —, 963 discrete —, 34, 961 enumerable —, 963 finite —, 84 finitely enumerable —, 84, 963 infinite —, 963 of detachable subsets, 35 of finite subsets, 84 of finitely enumerable subsets, 84 of functions from E to F , 35 weakly finite —, 963 short exact sequence split —, 248 similar matrices, 44 simple linear map , 46 isolated zero, 505 Index matrix, 46 root, 98 zero, 98 simple isolated zero of a polynomial system, 505 singular sequence, 751, 764 Smith matrix in — form, 206 ring, 226 solid subgroup, 662 solid subgroup of an l-group, 662 space spectral —, 745 tangent —, 7, 499, 559 specialization, 85 spectral map, 745 space, 745 spectral space, 745 spectral subspace, 746 spectrum of a distributive lattice, 656, 746 split short exact sequence, 248 surjection, 248 stabilizer, 108 stable range, 258 stably free module, 255 stably isomorphic modules, 569 Stickelberger theorem, 217 strict semi-local ring, 524 strictly étale algebra, 327 strictly finite algebra, 313 algebra over a discrete field, 105 strongly discrete ring, module, 35 Successive localizations lemma, 1, 263 1025 Successive localizations lemma, depth 1, 880 Successive localizations lemma, depth 2, 883 Successive localizations lemma, 2, 846 Successive localizations lemma, 3, 847 support faithful —, 826 Heitmann —, 828 n-stable —, 827 over a commutative ring, 824 Zariski —, 824 surjection split —, 248 Suslin, 288, 297, 874, 895, 898, 919– 921, 941, 942, 954 set of a finite sequence, 518 Suslin’s lemma, 921 Sylvester generalized — mapping, 223 identities, 87 matrix, 118 symmetric powers of a module, 194 system congruential —, 518 system of coregular elements, 878 syzygy trivial —, 183 syzygy (linear dependence relation), 30 syzygy module, 30 of a vector V ∈ M n , 30 tangent space, 7, 499, 559 tensor product, 191 of algebras, 317 torsion submodule, 445 torsion-free module, 445, 457 total quotient ring, 21 ring of fractions, 21 total factorization Dedekind ring, 710 1026 of an ideal in a ring, 710 totally ordered group, 625 set, 461 trace of an endomorphism of a finitely generated projective module, 272 trace form, 327 trace system of coordinates, 329 transfer principle, 26 transitive Boolean G-algebra, 400 transvection, 944 trivial ring, 20 Tschirnhaus transform, 102 UFD, 637 unimodular element of a module, 40 matrix, 51 pair, 944 sequence (or vector), 40 vector, 257 union filtering —, 445 unique factorization domain, 637 universal splitting algebra of f over k, 95 valuation discrete —, 712 discrete — ring (DVR), 507 domain, 696 group, 689 ring, 206, 689 ring of a discrete field, 696 valuative dimension, 777 variety of the zeros of a polynomial system, 315 of an algebra over another, 315 vector unimodular —, 40 vector space finite dimensional —, 39 Index Von Neumann regular, 211 weakly finite set, 963 well-separated maps, 348 without zerodivisors ring —, 456 Zariski spectrum, 745 zero of a polynomial system, over an algebra, 315 of a polynomial, 98 simple — of a polynomial, 98 zero-dimensional ring, 209 polynomial system, 217
0math.AC
Fairness in Supervised Learning: An Information Theoretic Approach arXiv:1801.04378v1 [cs.LG] 13 Jan 2018 AmirEmad Ghassami∗ , Sajad Khodadadian∗ , Negar Kiyavash∗† Departments of ECE∗ and ISE† , and Coordinated Science Laboratory∗ , University of Illinois at Urbana-Champaign, Urbana, USA. {ghassam2,sajadk2,kiyavash}@illinois.edu Abstract—Automated decision making systems are increasingly being used in real-world applications. In these systems for the most part, the decision rules are derived by minimizing the training error on the available historical data. Therefore, if there is a bias related to a sensitive attribute such as gender, race, religion, etc. in the data, say, due to cultural/historical discriminatory practices against a certain demographic, the system could continue discrimination in decisions by including the said bias in its decision rule. We present an information theoretic framework for designing fair predictors from data, which aim to prevent discrimination against a specified sensitive attribute in a supervised learning setting. We use equalized odds as the criterion for discrimination, which demands that the prediction should be independent of the protected attribute conditioned on the actual label. To ensure fairness and generalization simultaneously, we compress the data to an auxiliary variable, which is used for the prediction task. This auxiliary variable is chosen such that it is decontaminated from the discriminatory attribute in the sense of equalized odds. The final predictor is obtained by applying a Bayesian decision rule to the auxiliary variable. Index Terms—Fairness, Equalized odds, Supervised learning. I. I NTRODUCTION Automated decision making systems based on statistical inference and learning are increasingly common in a wide range of real-world applications such as health care, law enforcement, education, and finance. These systems are trained based on historical data, which might be biased towards certain attributes of the data points [1]–[3]. Hence, such data without noticing possible biases could result in discrimination, which is defined as gratuitous distinction between individuals with different sensitive attribute. These attributes include sex, race, religion, and are referred to as protected attributes in the literature. As an example, in the US justice system, courts use features of criminals such as their age, race, sex, years being in jail, etc., to estimate their possible recidivism–future arrest. After considering these features, the court assigns a score to each in-jail individual, and decides on whether to release that person. If the score exceeds some certain limit, it will be safe to release that individual. For instance, as noted by Angwin et al. analysis [4], risk scores in the criminal justice system–the COMPAS risk tool–are biased negatively towards African-Americans. They showed that this risk score unjustifiably shows high risk of recidivism for African-American people compared to what it should actually be. As another example, the authors in [5] have studied the accuracy of gender representation in online image searches. The results indicate that for instance, in a Google image search for “C.E.O.”, 11 percent of the depicted results are women, even though 27 percent of U.S. chef executives are women; and in a search for “telemarketer”, 64 percent of the people depicted were female, while the occupation is evenly split between men and women. There is an interesting connection between the problem of fairness and differential privacy [6]–[8]. As in the differential privacy problem one tries to hide the identity of individuals, in the fairness problem, the goal is to hide the information about the protected attribute. More details regarding this connection is presented in [1]. Different criteria for assessing discrimination has been suggested in the literature. The most commonly used criterion is the so-called demographic parity, which requires the predictor to be statistically independent from the protected attribute. That is, denoting the protected attribute and the prediction by A and Ŷ , respectively, demographic parity requires the model to satisfy P (A, Ŷ ) = P (A)P (Ŷ ). While demographic parity and its variants have been used in several works [9]–[12], in some scenarios this criterion fails to provide fairness to all demographics [1]. For example, in the case of hiring an employee, where majority of the applicants are from a certain demographic, if we force the decision making system to be independent of that demographic, the system has to pick equal number of applicants from each demographic. Therefore, the system may admit a lower qualified individual from the smaller demographic to guarantee that the percentages of hired people from different demographics matches. Moreover, denoting the true label by Y , in most of the cases, as in the image search example, Y is correlated with the protected attribute (see Figure 1). Therefore, as demographic parity forces Ŷ to be independent of A, this criterion will not be satisfied for the ideal predictor Ŷ = Y . Hardt, Price and Srebro have recently proposed equalized odds as a new criterion of fairness [2]. This notion demands that the predictor should be independent of the protected at- tribute conditioned on the actual label Y . Therefore, equalized odds requires the model to satisfy P (A, Ŷ |Y ) = P (A|Y )P (Ŷ |Y ). (1) Returning to the example of hiring an employee, this measure implies that among the qualified applicants, the probability of hiring two people from different demographics should be the same. That is, if two people from different demographics are both qualified, or both not qualified, the system should hire them with equal probability. Also, note that unlike demographic parity, equalized odds allows for the ideal predictor Ŷ = Y . In this paper, we present a new framework for designing fair predictors from data. We utilize an information theoretic approach to model the information content of variables in the system relative to one another. We use equalized odds as the criterion to assess discrimination. In our proposed scheme, a data variable X, is first mapped to an auxiliary variable U , to decontaminate it from the discriminatory attribute as well as ensuring generalization. To design this auxiliary variable, for input variable X and true label Y , we seek to find a compact representation U of X that contains at most a certain level of information about the variable X (to avoid overfitting), but maximizes I(Y ; U ) (quality of decision). The auxiliary variable U is in turn used as the input for the prediction task. Similar to [2], our framework is only based on joint statistics of the variables rather than functional forms; hence, such a formulation is more general. Furthermore, as in many cases, the functional form of the score and underlying training data are not public. Our formulation (unlike that of [2], for instance) allows both A and Y to have arbitrary cardinality, which implies that we can have multi-level protected attributes and labels. We cast the task of finding a fair predictor as an optimization problem and propose an iterative solution for solving this problem. We observe that the proposed solution does not necessarily converge for some levels of fairness. This suggests that for a given requirement on the accuracy of a predictor, certain levels of fairness may not be achievable. A somewhat similar idea to our approach is presented in [9], in which the authors used an intermediate representation space with elements called prototypes. However, besides the fact that in that work demographic parity is used as the measure of discrimination, the method used for choosing the prototypes is quite different. Specifically, the main approach to avoid overfitting in the learning process is limiting the number of prototypes1 , while we achieve the same goal by controlling the information in the auxiliary variable about the data. The approach in [9] has extended in [13] with deep variational auto-encoders with priors that encourage independence between sensitive and latent factors of variation. The rest of the paper is organized as follows. In Section II we review the notion of equalized odds and introduce our model as well as the details of our proposed learning 1 Unfortunately, nothing is said in that work about choosing the number of prototypes. 𝑌 𝐴 𝑋 𝑈 𝑌 Fig. 1: Graphical model of the proposed framework. A, X and Y denote the protected attribute, the rest of the attributes and the true label, respectively. U is the compressed representor of X, which is used for designing the prediction Ŷ . procedure. Additionally, we propose the optimization that must be solved to address the fairness issue. In Section III we propose an iterative approach for solving the optimization problem introduced. Our concluding remarks are presented in Section IV. II. M ODEL D ESCRIPTION We consider a purely observational setting in which we train a predictor from labeled data. For each sample, we have a set of attributes, which includes protected attributes such as gender, race, religion, etc. The protected attributes are denoted by A. We use X to denote the rest of the attributes. We denote the true label by Y and the prediction of the label Y by Ŷ . For instance, for the example regarding risk of recidivism explained in Section I, A represents the race of each individual, X represents other features of that individual (which could be correlated to the individual’s race) and Y determines whether he/she has committed any crimes after being released from the jail. The graphical model of our setup is depicted in Figure 1. As seen in this figure, X and A can be correlated, and given X, A is independent of the true label Y . This property is essential, otherwise, the protected attribute is in fact a direct cause of the label and using this attribute in the prediction process should not be considered as discriminatory. Generalization: Since in a real-life application the number of available samples is finite, to prevent overfitting (ensuring generalization) we should constraint our hypothesis space. To do so, we compress our variable X to an auxiliary variable U , which in turn is used for the prediction task. We also choose U such that it is not contaminated by discrimination in the sense of equalized odds [2] defined in the following. Definition 1. [Equalized odds] We say that a variable U satisfies equalized odds with respect to protected attribute A and outcome Y , if U and A are independent conditional on Y , that is, I(A; U |Y ) = 0. Clearly this definition is equivalent to the one presented in expression (1). Once U is decontaminated from discriminatory attribute A, one can use any predictor to predict Y from this auxiliary variable. We propose to apply a Bayesian empirical risk minimization decision rule in this work for the prediction task. To obtain the mechanism for generating the auxiliary variable, we seek for a compact representation U of X that maximizes the utility/quality of prediction I(Y ; U ), while it contains at most a certain level of information about the variable X. This is in essence similar to the goal in the information bottleneck (IB) method [14]. Maximizing I(Y ; U ) corresponds to maximizing the utility of U , and keeping I(X; U ) bounded could be viewed as regularization, which rejects complex hypotheses to ensure generalization. Note that the fact that we present fairness, accuracy and compactness via mutual information, provides us with a setting in which we do not need to have any requirement on the cardinality of variables (as opposed to [2], [9]). Next, we present the details of designing the transition probability kernel for generating the auxiliary variable, as well as designing the final predictor. A. Designing the Auxiliary Variable As stated earlier, the goal of our learning scheme is to produce a compressed representor of X, which has as much information about the true label as possible, and is fair in the sense of Definition 1. We relax the equalized odds requirement in that we allow U to have a certain amount of information about the variable A conditioned on Y . The reason for this choice will become clear in Section III. Therefore, the objective is to find mechanism PU |X , which maximizes I(U ; Y ) as well as 1) Ensures fairness: The information shared between the protected attribute and U given the true label does not exceed a certain threshold C, that is I(A; U |Y ) ≤ C. 2) Ensures generalization: The mutual information in X and U does not exceed a certain threshold D, that is I(X; U ) ≤ D. Therefore, we aim to solve the following optimization problem. max I(U ; Y ) PU |X s.t. I(A; U |Y ) ≤ C, I(X; U ) ≤ D. B. Designing the Predictor As stated before, after obtaining a decontaminated variable U , this variable can be used for the prediction task. We utilize a Bayesian decision rule described in the following. Let U be the alphabet of the variable U and Y be the alphabet of variables Y and Ŷ . To quantify the quality of a decision, define a loss function ` : Y × Y → R+ , where `(ŷ, y) determines the cost of predicting ŷ when the true label was y. The decisions are based on auxiliary variable U , which is statistically related to the true label. We denote the decision rule by δ : U → Y. The loss of the decision rule δ is defined as follows. L(δ) = EU,Y [`(δ(U ), Y )]. Using L(δ), the Bayesian risk minimization decision rule is δ ∗ = arg min L(δ). δ For instance, for the case of binary labels with Hamming loss, defined as `(y, ŷ) = 1[y 6= ŷ], we have δ ∗ (u) = 1[P (Y = 1|u) ≥ P (Y = 0|u)], which implies that we vote for the label with the maximum posterior probability. III. S OLVING THE FAIRNESS O PTIMIZATION P ROBLEM In this Section, we propose a solution for the fairness optimization problem presented in Section II. The Lagrangian for this problem will be as follows L(PU |X ) = αI(X; U ) + βI(A; U |Y ) − I(U ; Y ), (2) where the parameters α and β determine the trade off between accuracy, information compression, and fairness. Equation (2) is similar to the objective function in [15], where for given variables X, Y + , and Y − , the authors aimed to uncover structures in P (X, Y + ) that do not exist in P (X, Y − ), used for hierarchical text categorization. The characterization of the solution of the problem above is given in Theorem 1 below. With slight abuse of notation, in the following, when it is clear from the context, we drop the subscripts in the notation for probability distributions. Theorem 1. For values of β in a certain range and any arbitrary value α, a stationary point of the Lagrangian L given in equation (2) is the conditional distribution PU |X obtained as follows. P (u|x) = f (x, u, β) P (u) exp( ), Z(x, α, β) αP (x) (3) where Z is a partition function calculated as follows. X f (x, u, β) Z(x, α, β) = exp( ), αP (x) u and f (x, u, β) is obtained from the following equation. X P (y 0 |u) f (x, u, β) = P (x, y 0 ) log P (y 0 ) 0 y −β X P (y 0 |x)P (x, a0 ) log a0 ,y 0 P (a0 |u, y 0 ) . P (a0 |y 0 ) (4) See Appendix A for a proof. Note that in equation (4), f depends on P (y|u), P (u), and P (a|u, y), that all are functions of P (u|x). Hence, the solution given in Theorem 1 is implicit. To find a solution for this problem, we use an iterative algorithm described in the following. In the t-th iteration, the algorithm obtains the values for P t (y|u), P t (u), and P t (a|u, y) using the previous Algorithm 1 PU |X Designer. for designing fair predictors from data via an information Input: Empirical distribution P̂ (A, X, Y ), initial distribu- theoretic machinery. Equalized odds was used as the criterion for discrimination, which demands that the prediction should tion PU0 |X , parameters α, β, termination threshold . be independent of the protected attribute conditioned on the 0 1 Initiate L = 0, L = , and t = 1. actual label. In our proposed scheme, a data variable is first t t−1 while L − L ≥  do mapped to an auxiliary variable to decontaminate it from the P P t (u) ← x0 P t−1 (u|x0 )P (x0 ), ∀u. discriminatory attribute as well as ensuring generalization. We P 1 t 0 t−1 0 0 modeled the task of designing the auxiliary variable as an (u|x )P (x ), ∀u, y. P (y|u) ← P t (u) x0 P (y|x )P optimization problem which aims to force the variable to be P P t (u|a, y) ← P t (u)P1 t (y|u) x0 P (y|x0 )P t−1 (u|x0 )P (x0 ), fair in the sense of equalized odds and maximizes the mutual ∀a, u, y. information between the auxiliary variable and the true label, t whilst keeping the information that this variable contains about f (x,u,α,β) 1 P t (u|x) ← Z t (x,α,β) exp( αP (x) ), ∀u, x. the data limited. We proposed an iterative solution for solving this optimization problem. We observed that the proposed Lt ← αI(X; U ) + βI(A; U |Y ) − I(U ; Y ). solution does not necessarily converge for some levels of t = t + 1. fairness. This suggests that for a given requirement on the end while accuracy of a predictor, certain levels of fairness may not Output: Conditional distribution PU |X . be achievable. The final predictor is obtained by applying a Bayesian decision rule to the auxiliary variable. Finding an exact bound on the achievable level of fairness, as well as iteration’s P t−1 (u|x) as described below in equation (5), and applying the proposed method to real data is considered as then update P t (u|x) according to equation (3). our future work.  t P t−1 0 0  P (u) = x0 P P(u|x )P (x ), A PPENDIX A P t (y|u) = P t1(u) x0 P (y|x0 )P t−1 (u|x0 )P (x0 ), P ROOF OF T HEOREM 1  t P  P P (a|u, y) = P t (u)P1 t (y|u) x0 P (y|x0 )P t−1 (u|x0 )P (a, x0 ). We add one more term λ(x)( u P (u|x) − 1) to the La(5) grangian in (2) for the constraint that for each x, P (u|x) The updates in (5) are obtained to be consistent with the joint should sum up to 1. We consider each term of the Lagrangian, distribution in equation (3). The pseudo-code of the proposed and calculate their derivative separately. Here the derivative is approach is presented in Algorithm 1. taken with respect to P (u|x) for different values of u and x. In general there is no guarantee that Algorithm 1 converges For the first term in L we have to the global minimum of the Lagrangian. Nevertheless, TheX P (u0 |x0 ) orem 2 shows that this algorithm converges to a stationary . L1 = I(X; U ) = P (u0 |x0 )P (x0 ) log P (u0 ) fixed point. Note that since achieving the global optimum is x0 ,u0 not guaranteed, one should initiate the algorithm from several P 0 00 00 Noting that P (u0 ) = different starting distributions. x00 P (u |x )P (x ), we have 0 ∂P (u )/∂P (u|x) = P (x)δuu0 , where δ denotes the Kronecker Theorem 2. For a certain range of values for parameter delta function. Therefore, β, Algorithm 1 converges to a stationary fixed point of the ∂L1 P (u|x) X P (x0 ) Lagrangian L given in equation (2). = P (x) log + ∂P (u|x) P (u) P (u0 ) x0 ,u0 See Appendix B for a proof. × (δuu0 δxx0 P (u0 ) − P (u0 |x0 )P (x)δuu0 ) The fact that convergence occurs only for a certain range of P (u|x) = P (x) log . values for parameter β, suggests that for a given requirement P (u) on the accuracy of a predictor, certain levels of fairness may not be achievable. This can imply an inherent bound for the For the second term in L we have level of fairness that any algorithm can achieve, a conclusion L2 = I(A; U |Y ) which could have not been obtained from the other existing X P (u0 |a0 , y 0 ) works. = P (a0 , u0 , y 0 , x0 ) log . P (u0 |y 0 ) a0 ,u0 ,y 0 ,x0 IV. C ONCLUSION Due to the graphical model in Figure 1, we have We studied the problem of fairness in supervised learning, which is motivated by the fact that automated decision making P (a0 , u0 , y 0 , x0 ) = P (a0 )P (x0 |a0 )P (u0 |x0 )P (y 0 |x0 ), systems may inherit biases related to sensitive attributes, such X 1 as gender, race, religion, etc., from the historical data that P (u0 |a0 , y 0 ) = P (y 0 |x00 )P (u0 |x00 )P (x00 |a0 )P (a0 ), 0 0 P (a , y ) 00 they have been trained on. We presented a new framework x P (u0 |y 0 ) = 1 X P (y 0 |x00 )P (u0 |x00 )P (x00 ). P (y 0 ) 00 terms are convex in Q(u|x) and hence, the second derivative of their sum with respect to Q(u|x) is positive. The second term is not convex in Q(u|x), yet setting β to be sufficiently small, the second derivative of the expression in brackets with respect to Q(u|x) can be kept positive. Therefore, there exists βmax such that for β ≤ βmax the expression in brackets is convex in Q(u|x). Hence, in each step of Algorithm 1, the value of L decreases. Moreover, since the first three terms of L are linear combinations of KL-divergences, and hence nonnegative, L is lower bounded by I(A; X|Y ) − I(X; Y ) which is a constant. Therefore, for values of β ≤ βmax , the algorithm converges to a stationary point. x Therefore, ∂P (a0 , u0 , y 0 , x0 ) = P (a0 )P (x0 |a0 )δuu0 δxx0 P (y 0 |x0 ), ∂P (u|x) ∂P (u0 |a0 , y 0 ) 1 = P (y 0 |x)δuu0 P (x|a0 )P (a0 ), ∂P (u|x) P (a0 , y 0 ) ∂P (u0 |y 0 ) = P (x|y 0 )δuu0 . ∂P (u|x) Therefore, we have X ∂L2 P (u|a0 , y 0 ) = P (y 0 |x)P (x|a0 )P (a0 ) log ∂P (u|x) P (u|y 0 ) 0 0 ACKNOWLEDGMENT This work was in part supported by MURI grant ARMY W911NF-15-1-0479, Navy N00014-16-1-2804 and NSF CNS 17-18952. The content is solely the responsibility of the authors and does not necessarily represent the official views of the supporters. a ,y = X P (y 0 |x)P (x, a0 ) log a0 ,y 0 P (a0 |u, y 0 ) . P (a|y 0 ) As for the third term in L we have X P (u0 |y 0 ) . L3 = I(Y ; U ) = P (x0 , u0 |y 0 )P (y 0 ) log P (u0 ) 0 0 0 R EFERENCES u ,y ,x Therefore, again, using the graphical model in Figure 1, we have X ∂L3 P (u|y 0 ) = P (y 0 , x) log . ∂P (u|x) P (u) 0 y Summing up all terms of the derivative and setting it equal to zero, we get the desired result in (3). A PPENDIX B P ROOF OF T HEOREM 2 First we note that the optimization of the Lagrangian in equation (2) could be written as follows. X Q(u|x) min L(QU |X ) = min α P (x)Q(u|x) log P (u) Q(u|x) Q(u|x) x,u P X P (a|x) x0 P (x0 , y)Q(u|x0 ) −β P (x, y)Q(u|x) log P 0 0 x0 P (a, x , y)Q(u|x ) x,u,y X P (y|x) + P (x, y)Q(u|x) log P (y|u) x,u,y + βI(A; X|Y ) − I(X; Y ) h X Q(u|x) = min min min α P (x)Q(u|x) log R(u) S(y|u) R(u) Q(u|x) x,u X P (y|x) i − βG(Q(u|x)) + P (x, y)Q(u|x) log S(y|u) x,u,y (6) + βI(A; X|Y ) − I(X; Y ), where the last equality follows from [16, Lemma 10.8.1], and P X P (a|x) x0 P (x0 ,y)Q(u|x0 ) P (x, y)Q(u|x) log P 0 P (a,x . G(Q(u|x)) = 0 ,y)Q(u|x0 ) x,u,y x We note that in (6), the expression in brackets is convex in R(u) and S(y|u), independently. Also, the first and the third [1] C. Dwork, M. Hardt, T. Pitassi, O. Reingold, and R. Zemel, “Fairness through awareness,” in Proceedings of the 3rd Innovations in Theoretical Computer Science Conference. ACM, 2012, pp. 214–226. [2] M. Hardt, E. Price, N. Srebro et al., “Equality of opportunity in supervised learning,” in Advances in Neural Information Processing Systems, 2016, pp. 3315–3323. [3] L. E. Celis, D. Straszak, and N. K. Vishnoi, “Ranking with fairness constraints,” arXiv preprint arXiv:1704.06840, 2017. [4] J. Angwin, J. Larson, S. Mattu, and L. Kirchner, “Machine bias,” Pro Publica, 2016. [5] M. Kay, C. Matuszek, and S. A. Munson, “Unequal representation and gender stereotypes in image search results for occupations,” in Proceedings of the 33rd Annual ACM Conference on Human Factors in Computing Systems. ACM, 2015, pp. 3819–3828. [6] C. Dwork, “Differential privacy: A survey of results,” in International Conference on Theory and Applications of Models of Computation. Springer, 2008, pp. 1–19. [7] C. Dwork, F. McSherry, K. Nissim, and A. Smith, “Calibrating noise to sensitivity in private data analysis,” in TCC, vol. 3876. Springer, 2006, pp. 265–284. [8] K. Kalantari, L. Sankar, and A. D. Sarwate, “Optimal differential privacy mechanisms under hamming distortion for structured source classes,” in Information Theory (ISIT), 2016 IEEE International Symposium on. IEEE, 2016, pp. 2069–2073. [9] R. Zemel, Y. Wu, K. Swersky, T. Pitassi, and C. Dwork, “Learning fair representations,” in Proceedings of the 30th International Conference on Machine Learning (ICML-13), 2013, pp. 325–333. [10] M. Feldman, S. A. Friedler, J. Moeller, C. Scheidegger, and S. Venkatasubramanian, “Certifying and removing disparate impact,” in Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. ACM, 2015, pp. 259–268. [11] M. B. Zafar, I. Valera, M. Gomez Rodriguez, and K. P. Gummadi, “Fairness constraints: Mechanisms for fair classification,” arXiv preprint arXiv:1507.05259, 2017. [12] H. Edwards and A. Storkey, “Censoring representations with an adversary,” arXiv preprint arXiv:1511.05897, 2015. [13] C. Louizos, K. Swersky, Y. Li, M. Welling, and R. Zemel, “The variational fair autoencoder,” arXiv preprint arXiv:1511.00830, 2015. [14] N. Tishby, F. C. Pereira, and W. Bialek, “The information bottleneck method,” in The 37th Allerton Conference on Communication, Control, and Computing, 1999. [15] G. Chechik and N. Tishby, “Extracting relevant structures with side information,” in Advances in Neural Information Processing Systems, 2003, pp. 881–888. [16] T. M. Cover and J. A. Thomas, Elements of information theory. John Wiley & Sons, 2012.
7cs.IT
Statistical and Computational Limits for Sparse Matrix Detection arXiv:1801.00518v1 [math.ST] 1 Jan 2018 T. Tony Cai and Yihong Wu∗ January 3, 2018 Abstract This paper investigates the fundamental limits for detecting a high-dimensional sparse matrix contaminated by white Gaussian noise from both the statistical and computational perspectives. We consider p×p matrices whose rows and columns are individually k-sparse. We provide a tight characterization of the statistical and computational limits for sparse matrix detection, which precisely describe when achieving optimal detection is easy, hard, or impossible, respectively. Although the sparse matrices considered in this paper have no apparent submatrix structure and the corresponding estimation problem has no computational issue at all, the detection problem has a surprising computational barrier when the sparsity level k exceeds the cubic root of the matrix size p: attaining the optimal detection boundary is computationally at least as hard as solving the planted clique problem. The same statistical and computational limits also hold in the sparse covariance matrix model, where each variable is correlated with at most k others. A key step in the construction of the statistically optimal test is a structural property for sparse matrices, which can be of independent interest. Contents 1 Introduction 1.1 Setup . . . . . . . . . . . . . . . . . 1.2 Statistical and computational limits 1.3 Related work . . . . . . . . . . . . . 1.4 Organization and notations . . . . . . . . . . . . . 2 Main results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3 4 5 6 7 3 Test procedures and upper bounds 9 3.1 A structural property of sparse matrices . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Highly sparse regime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.3 Moderately sparse regime . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 ∗ T.T. Cai is with the Statistics Department, The Wharton School, University of Pennsylvania, Philadelphia, PA 19104, USA, [email protected]. The research of T.T. Cai was supported in part by NSF Grant DMS-1712735 and NIH Grant R01 GM-123056. Y. Wu is with the Department of Statistics and Data Science, Yale University, New Haven, CT, [email protected]. The research of Y. Wu was supported in part by the NSF Grant IIS-1447879, CCF-1527105, and an NSF CAREER award CCF-1651588. 1 4 Minimax lower bound 4.1 General strategy . . . . . 4.2 Least favorable prior . . . 4.3 Key lemmas . . . . . . . . 4.4 Proof of Theorem 1: lower . . . . . . . . . . . . bound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 14 15 15 17 5 Detecting sparse covariance matrices 19 5.1 Test procedures and upper bounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.2 Proof of the lower bound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6 Computational limits 24 7 Discussions 26 7.1 Alternative hypothesis defined by the Frobenius norm . . . . . . . . . . . . . . . . . 26 7.2 Localization and denoising . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 1 Introduction The problem of detecting sparse signals arises frequently in a wide range of fields and has been particularly well studied in the Gaussian sequence setting (cf. the monograph [38]). For example, detection of unstructured sparse signals under the Gaussian mixture model was studied in [37, 25] for the homoskedastic case and in [14] for the heteroscedastic case, where sharp detection boundaries were obtained and adaptive detection procedures proposed. Optimal detection of structured signals in the Gaussian noise model has also been investigated in [7, 6, 19]. One common feature of these vector detection problems is that the optimal statistical performance can always be achieved by computationally efficient procedures such as thresholding or convex optimization. Driven by contemporary applications, much recent attention has been devoted to inference for high-dimensional matrices, including covariance matrix estimation, principle component analysis (PCA), image denoising, and multi-task learning, all of which rely on detecting or estimating high-dimensional matrices with low-dimensional structures such as low-rankness or sparsity. For a suite of matrix problems, including sparse PCA [10], biclustering [9, 45, 52, 15], sparse canonical correlation analysis (CCA) [30] and community detection [32], a new phenomenon known as computational barriers has been recently discovered, which shows that in certain regimes attaining the statistical optimum is computationally intractable, unless the planted clique problem can be solved efficiently.1 In a nutshell, the source of computational difficulty in the aforementioned problems is their submatrix sparsity, where the signal of interests is concentrated on a submatrix within a large noisy matrix. This combinatorial structure provides a direct connection to, and allows these matrix problems to be reduced in polynomial time from, the planted clique problem, thereby creating computational gaps for not only the detection but also support recovery and estimation. In contrast, another sparsity structure for matrices postulates the rows and columns are individually sparse, which has been well studied in covariance matrix estimation [12, 40, 20, 26]. The motivation is that in many real-data applications each variable is only correlated with a few others. Consequently, each row and each column of the covariance matrix are individually sparse but, unlike sparse PCA, biclustering, or group-sparse regression, their support sets need not be √ The planted clique problem [2] refers to detecting or locating a clique of size o( n) planted in the Erdös-Rényi graph G(n, 1/2). Conjectured to be computationally intractable [39, 28], this problem has been frequently used as a basis for quantifying hardness of average-case problems [35, 1]. 1 2 aligned. Therefore this sparsity model does not postulate any submatrix structure of the signal; indeed, it has been shown for covariance matrix estimation that entrywise thresholding of the sample covariance matrix proposed in [12] attains the minimax estimation rate [20]. The focus of the present paper is to understand the fundamental limits of detecting sparse matrices from both the statistical and computational perspectives. While achieving the optimal estimation rate does not suffer from any computational barrier, it turns out the detection counterpart does when and only when the sparsity level exceeds the cubic root of the matrix size. This is perhaps surprising because the sparsity model itself does not enforce explicitly any submatrix structure, which has been responsible for problems such as sparse PCA to be reducible from the planted clique. Our main result is a tight characterization of the statistical and computational limits of detecting sparse matrices in both the Gaussian noise model and the covariance matrix model, which precisely describe when achieving optimal detection is easy, hard, and impossible, respectively. 1.1 Setup We start by formally defining the sparse matrix model: Definition 1. We say a p × p matrix M is k-sparse if all of its rows and columns are k-sparse vectors, i.e., with no more than k non-zeros. Formally, denote the ith row of M by Mi∗ and the ith column by M∗i . The following parameter set M(p, k) = {M ∈ Rp×p : kMi∗ k0 ≤ k, kM∗i k0 ≤ k, ∀i ∈ [p]}. (1) P denotes the collection of all k-spares p × p matrices, where kxk0 , i∈[p] 1{xi 6= 0} for x ∈ Rp . Consider the following “signal + noise” model, where we observe a sparse matrix contaminated with Gaussian noise: X =M +Z (2) where M is a p × p unknown mean matrix, and Z consists of i.i.d. entries normally distributed as N (0, σ 2 ). Without loss of generality, we shall assume that σ = 1 throughout the paper. Given the noisy observation X, the goal is to test whether the mean matrix is zero or a k-sparse nonzero matrix, measured in the spectral norm. Formally, we consider the following hypothesis testing problem: ( H0 : M = 0 (3) H1 : kM k2 ≥ λ, M is k-sparse where the mean matrix M belongs to the parameter space Θ(p, k, λ) = {M ∈ Rp×p : M ∈ M(p, k), kM k2 ≥ λ}. (4) Here we use the spectral norm k · k2 , namely, the largest singular value, to measure the signal strength under the alternative hypothesis. It turns out that if we use the Frobenius norm to define the alternative hypothesis, the sparsity structure does not help detection, in the sense that, the minimal λ required to detect 1-sparse matrices is within a constant factor of that in the non-sparse case; furthermore, the matrix problem collapses to its vector version (see Section 7.1 for details). For covariance model, the counterpart of the detection problem (4) is the following. Consider the Gaussian covariance model, where we observe n independent samples drawn from the p-variate normal distribution N (0, Σ) with an unknown covariance matrix Σ. In the sparse covariance matrix model, each coordinate is correlated with at most k others. Therefore each row of the covariance 3 matrix Σ has at most k non-zero off-diagonal entries. This motivates the following detection problem: ( H0 : Σ = I (5) H1 : kΣ − Ik2 ≥ λ, Σ − I is k-sparse Under the null hypothesis, the samples are pure noise; under the alternative, there exists at least one significant factor and the entire covariance matrix is k-sparse. The goal is to determine the smallest λ so that the factor can be detected from the samples. 1.2 Statistical and computational limits For ease of exposition, let us focus on the additive Gaussian noise model and consider the following asymptotic regime, wherein the sparsity and the signal level grow polynomially in the dimension as follows: k = pα and λ = pβ with α ∈ [0, 1] and β > 0 held fixed and p → ∞. Theorem 1 in Section 2 implies that the critical exponent of λ behaves according to the following piecewise linear function: ( α α ≤ 31 ∗ β = 1+α α ≥ 13 4 in the sense that if β > β ∗ , there exists a test that achieves vanishing probability of error of detection uniformly over all k-sparse matrices; conversely, if β < β ∗ , no test can outperform random guessing asymptotically. β spectrum 1 2 impossible t 1 3 h + r es h sp o ec ldi tr ng um PC hard 0 1 3 1 1 2 α Figure 1: Statistical and computational limits in detecting sparse matrices. More precisely, as shown in Figure 1, the phase diagram of α versus β is divided into four regimes: 4 (I) β > α: The test based on the largest singular value of the entrywise thresholding estimator  √ √ Th Th succeeds. In particular, we reject if kX k2 & k log p, where Xij = Xij 1 |Xij | = Ω( log p) . (II) β > 12 : The test based on the large singular value of the direct observation succeeds. In √ particular, we reject if kXk2 & p. (III) 1+α 4 < β < α ∧ 12 : detection is as hard as solving the planted clique problem. (IV) β < α ∧ 1+α 4 : detection is information-theoretically impossible. As mentioned earlier, the computational intractability in detecting sparse matrices is perhaps surprising because (a) achieving the optimal estimation rate does not present any computational difficulty; (b) unlike problems such as sparse PCA, the sparse matrix model in Definition 1 does not explicitly impose any submatrix sparsity pattern as the rows are individually sparse and need not share a common support. The result in Figure 1 shows that in the moderately sparse regime of p1/3 ≪ k ≪ p, outperforming entrywise thresholding is at least as hard as solving planted clique. However, it is possible to improve over entrywise thresholding using computationally inefficient tests. We briefly describe the construction of the optimal test: The first stage is a standard χ2 -test, which rejects the null hypothesis if the mean matrix M has a large Frobenius norm. Under the alternative, if the data can survive this test, meaning kM kF is small, then M has small stable rank (i.e. kM k2F /kM k22 ) thanks to the assumption that kM k2 is large. The key observation is that for sparse matrices with small stable rank there exists a sparse approximate singular vector v, in the sense that kM vk & kM k2 kvk. Then in the second stage we perform a scan test designed in the similar spirit as in detecting submatrices or sparse principle components. The key structural property of sparse matrices is established using a celebrated result of Rudelson and Vershynin [49] in randomized numerical linear algebra which shows that the Gram matrix of any matrix M of low stable rank can be approximated by that of a small submatrix of M . This shows the existence of sparse approximate singular vector by means of probabilistic method but does not provide a constructive method to find it, which, as Figure 1 suggests, is likely to be computationally intractable. To conclude this part, we mention that, the same statistical and computational limits in Figure 1 √ also apply to detecting sparse covariance matrices when λ is replaced by λ n, under appropriate assumptions on the sample size; see Section 6 for details. 1.3 Related work As opposed to the vector case, there exist various notions of sparsity for matrices as motivated by specific applications, such as: • Vector sparsity: the total number of nonzeros in the the matrix is constrained [21], e.g., in robust PCA. • Row sparsity: each row of the matrix is sparse, e.g. matrix denoising [41]. • Group sparsity: each row of the matrix is sparse and shares a common support, e.g., groupsparse regression [44]. • Submatrix sparsity: the matrix is zero except for a small submatrix, e.g., sparse PCA [11, 17], biclustering [13, 9, 45, 52], sparse SVD [53], sparse CCA [30], and community detection [33]. 5 The sparse matrix model (Definition 1) studied in this paper is stronger than the vector or row sparsity and weaker than submatrix sparsity. The statistical and computational aspects of detecting matrices with submatrix sparsity has been investigated in the literature for the Gaussian mean, covariance and the Bernoulli models. In particular, for the spiked covariance model where the leading singular vector is assumed to be sparse, the optimal detection rate has been obtained in [11, 18]. Detecting submatrices in additive Gaussian noise was studied by Butucea and Ingster [13] who not only found the optimal rate but also determined the sharp constants. In the random graph (Bernoulli) setting, the problem of detecting the presence of a small denser community planted in an Erdös-Rényi graph was studied in [8]; here the entry of the mean adjacency matrix is p on a small submatrix and q < p everywhere else. The computational lower bounds in all three models were established in [10, 45, 33] by means of reduction to the planted clique problem. Another work that is closely related to the present paper is [3, 4], where the goal is to detect covariance matrices with sparse correlation. Specifically, in the n-sample Gaussian covariance model, the null hypothesis is the identity covariance matrix and the alternative hypothesis consists of covariances matrices whose off-diagonals are equal to a positive constant on a submatrix and zero otherwise. Assuming various combinatorial structure of the support set, the optimal tradeoff between the sample size, dimension, sparsity and the correlation level has been studied. Other work on testing high-dimensional covariance matrices that do not assume sparse alternatives include testing independence and sphericity, with specific focus on asymptotic power analysis and the limiting distribution of test statistics [22, 16, 47, 48]. Finally, we mention that yet another twodimensional detection problem in Gaussian noise [5], where the sparse alternative corresponds to paths in a large graph. 1.4 Organization and notations We introduce the main notation used in this paper: For any sequences {an } and {bn } of positive numbers, we write an & bn if an ≥ cbn holds for all n and some absolute constant c > 0, an . bn if an & bn , and an ≍ bn if both an & bn and an . bn hold. In addition, we use ≍k to indicate that the constant depends only on k. For any q ∈ [1, ∞], the ℓq → ℓq induced operator norm of an matrix M is defined as kM kq , maxkxkℓq ≤1 kM xkℓq . In particular, kM k2 is the spectral norm, i.e., the largest singular value of M , and kM k1 (resp. kM k∞ ) is the largest ℓ1 -norm of the columns (resp. rows) of M . For any p × p matrix M and I, J ⊂ [p], let MIJ denote the submatrix (Mij )i∈I,j∈J . Let I and J denote the identity and the all-one matrix. Let 1 denote the all-one vector. Let Sp denotes the set of p × p positive-semidefinite matrices. The rest of the paper is organized as follows: Section 2 presents the main results of the paper in terms of the minimax detection rates for both the Gaussian noise model and the covariance matrix model. Minimax upper bounds together with the testing procedures for the mean model are presented in Section 3, shown optimal by the lower bounds in Section 4; in particular, Section 3.1 introduces a structural property of sparse matrices which underpins the optimal tests in the moderately sparse regime. Results for the covariance model are given in Section 5 together with additional proofs. Section 6 discusses the computational aspects and explains how to deduce the computational limit in Figure 1 from that of submatrix detection and sparse PCA. Section 7 concludes the paper with a discussion on related problems. 6 2 Main results We begin with the Gaussian noise model. To quantify the fundamental limit of the hypothesis testing problem (3), we define ǫ∗ (p, k, λ) as the optimal sum of Type-I and Type-II probability of error: ( ) ǫ∗ (p, k, λ) = inf φ P0 (φ = 1) + sup PM (φ = 0) (6) M ∈Θ(p,k,λ) where PM denotes the distribution of the observation X = M + Z conditioned on the mean matrix M , and the infimum is taken over all decision rules φ : Rp×p → {0, 1}. Our main result is a tight characterization of the optimal detection threshold for λ. We begin with the Gaussianq noise model.  Define the following upper and lower bounds, which differ by at most a factor of O log p log log p : λ1 (k, p) , and ( √ k log p kp log ep k 1 1 4 k ≤ ( logp p ) 3 1 k ≥ ( logp p ) 3  r    1 k log p log p k ≤ (p log p) 3 3 k . λ0 (k, p) ,  1  kp log ep  14 3 k ≥ (p log p) k (7) (8) Theorem 1 (Gaussian noise model). There exists absolute constant k0 , c0 , c1 , such that the following holds for all k0 ≤ k ≤ p: 1. For any c > c1 , if λ ≥ cλ1 (k, p), (9) λ ≤ cλ0 (p, k), (10) then ǫ∗ (k, p, λ) ≤ ǫ1 (c), where ǫ1 (c) → 0 as c → ∞. 2. Conversely, for any c > c0 , if then ǫ∗ (k, p, λ) ≥ ǫ0 (c) − op→∞ (1), where ǫ0 (c) → 1 as c → 0. To parse the result of Theorem 1, let us denote by λ∗ (p, k) the optimal detection threshold, i.e., the minimal value of λ so that the optimal probability of error ǫ∗ (p, k, λ) is at most a constant, say, 0.1. Then we have the following characterization: • High sparsity: k ≤ p1/3−δ : λ∗ ≍δ k • Moderate sparsity: k & (p log p)1/3 : p log p  ep  41 λ∗ ≍ kp log k • Boundary case: ( logp p )1/3 . k . (p log p)1/3 : r  ep  14 ep log p ∗ k log . λ . kp log , k3 k  q log p where the upper and lower bounds are within a factor of O log log p . 7 Furthermore, two generalizations of Theorem 1 will be evident from the proof: (a) the upper bound in Theorem 1 as well as the corresponding optimal tests apply as long as the noise matrix consists of independent entries with subgaussian distribution with constant proxy variance; (b) the lower bound in Theorem 1 continues to hold up even if the mean matrix is constrained to be symmetric. Thus, symmetry does not improve the minimax detection rate. Next we turn to the sparse covariance model: Given n independent samples drawn from N (0, Σ), the goal is to test the following hypothesis ( H0 : Σ = I H1 : Σ ∈ Ξ(p, k, λ, τ ), where the parameter space for sparse covariances matrices is Ξ(p, k, λ, τ ) = {Σ ∈ Sp : Σ ∈ M(p, k), kΣ − Ik2 ≥ λ, kΣk ≤ τ }. (11) In other words, under the alternative, the covariance is equal to identity plus a sparse perturbation. Throughout the paper, the parameter τ is assumed to be a constant. Define the minimax probability of error as: ( ) ǫ∗n (p, k, λ) = inf φ PI (φ = 1) + sup PΣ (φ = 0) (12) Σ∈Ξ(p,k,λ,τ ) i.i.d. where φ ∈ {0, 1} is a function of the samples (X1 , . . . , Xn ) ∼ N (0, Σ). Analogous to Theorem 1, the next result characterizes the optimal detection threshold for sparse covariance matrices. Theorem 2 (Covariance model). There exists absolute constants k0 , C, c0 , c1 , such that the following holds for all k0 ≤ k ≤ p. 1. Assume that n ≥ C log p. For any c > c1 , if c λ ≥ √ λ1 (k, p), n (13) then ǫ∗n (k, p, λ) ≤ ǫ1 (c), where ǫ1 (c) → 0 as c → ∞. 2. Assume that n ≥ Cλ0 (p, k)2 log p and n≥C· ( k6 p p p 2δ k3 log2 p k ≤ p1/3 k ≥ p1/3 (14) , (15) where δ is any constant in (0, 23 ]. If c λ ≤ √ λ0 (k, p), n then ǫ∗ (k, p, λ) ≥ ǫ0 (c) − op→∞ (1), where ǫ0 (c) → 1 as c → 0 8 (16) In comparison with Theorem 1, we note that the rate-optimal lower bound in Theorem 2 holds under the assumption that the sample size is sufficiently large. In particular, the condition (14) is very mild because, by the assumption that kΣk2 is at most a constant, in order for the right hand side of (16) to be bounded, it is necessary to have n ≥ λ0 (p, k)2 . The extra assumption (15), when k ≥ p1/4 , does impose a non-trivial constraint on the sample size. This assumption is due to the current lower bound technique based on the χ2 -divergence. In fact, the lower bound in [16] for testing covariance matrix without sparsity uses the same method and also requires n & p. The results of Theorems 1 and 2 also demonstrate the phenomenon of the separation of detection and estimation, which is well-known in the Gaussian sequence model. The minimax estimation of sparse matrices has been systematically studied by Cai and Zhou [20] in the covariance model, where the spectral norm loss q it is shown that entrywise thresholding achieves the minimax rate in √ log p 3 2 of k n provided that n & k log p and log n . log p; similar rate of k log p also holds for the Gaussian noise model. In view of this result, an interesting question is whether a “plug-in” approach for testing, namely, using the spectral norm of the minimax estimator as the test statistic, achieves the optimal detection rate. This method is indeed optimal in the very sparse regime of k ≪ p1/3 , but fails to achieve the optimal detection rate in the moderately sparse regime of k ≫ p1/3 , which, in turn, can be attained by a computationally intensive test procedure. This observation should be also contrasted with the behavior in the vector case. To detect the presence of a k-sparse pdimensional vector in Gaussian noise, entrywise thresholding, which is the optimal estimator for √ all sparsity levels, achieves the minimax detection rate in ℓ2 -norm when k ≪ p, while the χ2 -test, √ which disregards sparsity, is optimal when k ≫ p. 3 Test procedures and upper bounds In this section we consider the two sparsity regimes separately and design the corresponding 1 rate-optimal testing procedures. In the highly sparse regime of k . ( logp p ) 3 , tests based on componentwise thresholding turns out to achieve the optimal rate of detection. In the moderately sparse 1 regime of k & ( logp p ) 3 , chi-squared test combined with the approximate singular vector property in Section 3.1 is optimal. 3.1 A structural property of sparse matrices Before we proceed to the construction of the rate-optimal tests, we first present a structural property of sparse matrices, which may be of independent interest. Recall that a matrix M is k-sparse in the sense of Definition 1 if its rows and columns are sparse but need not to have a common support. If we further know that M has low rank, then the row support sets must be highly aligned, and therefore M has a sparse eigenvector. The main result of this section is an extension of this result to approximately low-rank matrices and their approximate eigenvectors. Definition 2. We say v ∈ Rp is an ǫ-approximate singular vector of Σ if kΣvk2 ≥ (1 − ǫ) kΣk2 kvk. We also need the notion of stable rank (also known as numerical rank): sr(M ) , kM k2F kM k22 , (17) which is always a lower bound of rank(M ). The following lemma gives sufficient conditions for a sparse matrix to have sparse approximate singular vectors. The key ingredient of the proof is a celebrated result of Rudelson-Vershynin [49] 9 in randomized numerical linear algebra which shows that the Gram matrix of any matrix M of stable rank at most r can be approximated by that of a submatrix of M formed by O(r log r) rows. The following is a restatement of [49, Theorem 3.1] without the normalization: Lemma 1. There exists an absolute constant C0 such that the following holds. Let y ∈ Rn be a random vector with covariance matrix K = E[yy ⊤ ]. Assume that kyk2 ≤ M holds almost surely. Let y1 , . . . , yd be iid copies of y. Then d 1X ⊤ yi yi − K E d i=1 2 ≤ C0 M r kKk2 log d , d provided that the right-hand side is less than kKk2 . Theorem 3 (Concentration of operator norm on small submatrices). Let k ∈ [p]. Let M be a p × p k-sparse matrix (not necessarily symmetric) in the sense that all rows and columns are k-sparse. Let r = sr(M ). Then there exists I, J ⊂ [p], such that kMIJ k2 ≥ 1 kM k2 , 8 |I| ≤ Ckr, |J| ≤ Ckr log r where C is an absolute constant. Remark 1. The intuition behind the above result is the following: consider the ideal case where X is low-rank, say, rank(X) ≤ r. Then its right singular vector belongs to the span of at most r rows and is hence kr-sparse; so is the left singular vector. Theorem 3 extends this simple observation to stable rank with an extra log factor. Furthermore, the result in Theorem 3 cannot be improved beyond this log factor. To see this, consider a matrix M consisting of an m × m submatrix with independent Bern(q) entries and zero elsewhere, where q = k/(2m) ≪ 1. Then with high probability, M is k-sparse, kM k2 ≈ qm, and kM k2F ≈ qm2 . Although the rank of M is approximately m, its stable rank is much lower sr(M ) ≈ 1q , and the leading singular vector of M is m-sparse, with m = Θ(k sr(M )). In fact, this example plays a key role in constructing the least favorable prior for proving the minimax lower bound in Section 4. Proof. Denote the ith row of M by Mi∗ . Denote the j th row of M by M∗j . Let I0 , {i ∈ [p] : kMi∗ k2 ≥ τ } J0 , {j ∈ [p] : kM∗j k2 ≥ τ } , where τ > 0 is to be chosen later. Then |I0 | ∨ |J0 | ≤ kM k2F . τ2 (18) Since the operator norm and Frobenius norm are invariant under permutation of rows and columns, we may  and will assume that I0 , J0 corresponds to the first few rows or columns of M . Write M = A C where B = M c c . Since each row of B is k-sparse, by the Cauchy-Schwartz inequality its D B √ I0 J0 ℓ√1 -norm is at most kτ . Consequently its √ ℓ∞ → ℓ∞ operator norm satisfies kBk∞ = maxi kBi∗ k1 ≤ kτ . Likewise, kBk1 = maxj kB∗j k1 ≤ kτ . By duality (see, e.g., [31, Corollary 2.3.2]), √ p (19) kBk2 ≤ kBk1 kBk∞ ≤ kτ. 10 A D Let X = (A C) and Y = Setting τ = kM k2 √ , 2 k  . By triangle inequality, we have kM k2 ≤ kXk2 + kY k2 + kBk2 . we have kBk2 ≤ kM k2 /2 and hence kXk2 ∨ kY k2 ≥ kM k2 4 . Set kM k2 |I| ≤ τ 2 F generality, assume henceforth kXk2 ≥ Note that X ∈ Rℓ×p , where ℓ = kM k2F kM k22 /16 kM k2 4 . Without loss of I = I0 . = 4kkM k2F kM k22 = 4L. Furthermore, sr(X) = kXk2F kXk22 ≤ = 16r. Next we show that X has a submatrix formed by a few columns whose operator norm is large. We proceed as in the proof of [49, Theorem 1.1]. Write " y⊤ # " x⊤ # 1 1 1 .. . X = ... , X̃ = √ d . yd⊤ x⊤ ℓ n Define the random vector y by P y = y. Then X ⊤ X = E[yy ⊤ ] and X̃ ⊤ X̃ = E[yy ⊤ ] 2 = kXk22 . By Lemma 1, ⊤ ⊤ E X̃ X̃ − X X o kxi k22 kXkF = and let y1 , . . . , yd which are iid copies of x i kxi k2 kXk2F 1 Pd ⊤ i=1 yi yi . Furthermore, kyk2 ≤ kXkF almost surely and d 2 ≤ C0 r log d 1 kXkF kXk2 ≤ kXk22 , d 4 where the last inequality follows by choosing d = ⌈Cr log r⌉ with C being a sufficiently large universal constant. Therefore there exists a realization of X̃ so that the above inequality holds. Let J be the column support of X̃. Since the rows of X̃ are scaled version of those of X which are k-sparse, we have |J| ≤ dk. Let v denote a leading right singular vector of X̃, i.e., X̃ ⊤ X̃v = kX̃k22 v and kvk2 = 1. Then supp(v) ⊂ J. Note that kXvk22 = v ⊤ X ⊤ Xv = v ⊤ X̃ ⊤ X̃v + v ⊤ (X ⊤ X − X̃ ⊤ X̃)v ≥ kX̃k22 − kX ⊤ X − X̃ ⊤ X̃k2 ≥ kXk22 − 2kX ⊤ X − X̃ ⊤ X̃k2 1 ≥ kXk22 . 2 Therefore kX∗J k2 ≥ kXvk2 ≥ X∗J = MIJ . 3.2 √1 2 kXk2 ≥ 1 √ 4 2 kM k2 . The proof is completed by noting that Highly sparse regime It is has been shown that, in the covariance model, entrywise thresholding is rate-optimal for estimating the matrix itself with respect to the spectral norm [20]. It turns out that in the very sparse regime entrywise thresholding is optimal for testing as well. Define M̂ = (Xij 1{|Xij | ≥ τ }). and the following test Theorem 4. For any ǫ ∈ (0, 1), if n o ψ(X) = 1 kM̂ k2 ≥ λ λ > 2k r 2 log 11 4p2 ǫ (20) (21) then the test (20) with τ = q 2 log 4p2 ǫ satisfies P0 (ψ = 1) + sup M ∈Θ(p,k,λ) PM (ψ = 0) ≤ ǫ for all 1 ≤ k ≤ p. Proof. Denote the event E = {kZkℓ∞ ≤ τ }. Conditioning on E, for any k-sparse matrix M ∈ M(p, k), we have M̂ ∈ M(p, k) and kM̂ − M k2 ≤ kτ. (22) To see this, note that for any i, j, M̂ij = 0 whenever Mij = 0. Therefore kM̂i∗ − Mi∗ kℓ1 ≤ kkZkℓ∞ ≤ kτ and, consequently, kM̂ − M k1 = maxi kM̂i∗ − Mi∗ kℓ1 ≤ kτ . Similarly, kM̂ − M k∞ = maxj kM̂∗j − M∗j kℓ1 ≤ kτ . Therefore (22) follows from the fact that k · k22 ≤ k · k1 k · k∞ for matrix induced norms. Therefore if λ > 2kτ , then P0 (ψ = 1) + sup M ∈Θ(p,k,λ) PM (ψ = 0) ≤ 2P {kZkℓ∞ > τ } ≤ 4p2 e−τ 2 /2 . This completes the proof. 3.3 Moderately sparse regime Our test in the moderately sparse regime relies on the existence of sparse approximate eigenvectors established in Theorem 3. More precisely, the test procedure is a combination of the matrix-wise χ2 -test and the scan test based on the largest spectral norm of m × m submatrices, which is detailed as follows: Let s kp m=C . log ep k where C is the universal constant from Theorem 3. Define the following test statistic Tm (X) = max{kXIJ k2 : I, J ⊂ [p], |I| = |J| = m} (23)  ψ(X) = 1 kXk2F ≥ p2 + s ∨ 1{Tm (X) ≥ t} (24) and the test where 1 s , 2 log + 2p ǫ r r √ ep t , 2 m + 4 m log . m 1 log , ǫ (25) Theorem 5. There exists a universal constant C0 such that the following holds. For any ǫ ∈ (0, 1/2), if    1 4 p 1 1 λ ≥ C0 kp log log , (26) log ǫ k ǫ then the test (24) satisfies P0 (ψ = 1) + sup M ∈Θ(p,k,λ) holds for all 1 ≤ k ≤ p. 12 PM (ψ = 0) ≤ ǫ Proof. First consider the null hypothesis, where M = 0 and X = Z has iid standard normal entries so that kZk2F − p2 = OP (p). By standard concentration equality for χ2 distribution, we have  P |kZk2F − p2 | > s ≤ ǫ, where 1 s , 2 log + 2p ǫ Consequently the false alarm probability satisfies r 1 log . ǫ  2  p 2 2 P0 (ψ = 1) ≤ P kZkF − p > C0 p + P {kW k2 ≥ t}. m | {z } ≤ǫ q √ where t = 2 m + 4 m log ep m and W , Z[m],[m] . By the Davidson-Szarek inequality [24, Theorem s.t. √ m II.7], kW k2 ≤ N (2 m, 1). Then P {kW k2 ≥ t} ≤ ( em p ) . Hence the false alarm probability vanishes. Next consider the alternative hypothesis, where, by assumption, M is row/column k-sparse and √ kM k ≥ λ. To begin, suppose that kM kF ≥ 2 s. Then since kXk2F − p2 = kM k2F + 2 hM, Zi + kZk2F − p2 , we have   P{kM + Zk2F − p2 < s} ≤ P kM k2F + 2 hM, Zi < 2s + P kZk2F − p2 < −s ≤ exp(−s2 /8) + ǫ. Therefore, as usual, if kM kF is large, the χ2 -test will succeeds with high probability. Next assume √ that kM kF < 2 s. Therefore M is approximately low-rank: 4s . λ2 By Theorem 3, there exists an absolute constant C and I, J ⊂ [p] of cardinality at most sr(M ) ≤ r , 4s 4s log 2 , 2 λ λ 1 such that kMIJ k2 ≥ 8 λ. Therefore the statistic defined in (23) satisfies Tm (X) ≥ kXIJ k2 ≥ √ λ λ 8 − kZIJ k2 . Therefore Tm (X) ≥ 8 − 3 m with probability at least 1 − exp(−Ω(m)). Choose λ so that √ λ − 3 m ≥ t, 8 q q q √ √ ep ep , it suffices to ensure that λ ≥ c Since t + 3 m = 5 m + 4 m log m ≤ 9 m log ep 0 m log m m for some absolute constant c0 . Plugging the expression of m, we found a sufficient condition 1 4 is λ ≥ C0 (ks log es k ) for some absolute constant C0 . The proof is completed by noting that 1 1 s ≤ 2p(log ǫ + log ǫ ) and s 7→ s log es k is increasing. m = Ckr log r = Ck 4 Minimax lower bound In this section we prove the lower bound part of Theorem 1. In Section 4.1, we first present a general strategy of deriving minimax lower bound for functional hypothesis testing problems, which involves priors not necessarily supported on the parameter space. To apply this strategy, in Section 4.2 we specify a prior under which the matrix is k-sparse with high probability. The lower bound is proved by bounding the χ2 -divergence between the null distribution and the mixture of the alternatives. 13 4.1 General strategy We begin by providing a general strategy of constructing lower bounds for composite hypothesis testing problem, which is in particular useful for testing functional values. Given an experiment {Pθ : θ ∈ Θ} and two parameter subsets Θ0 , Θ1 ⊂ Θ, consider the following composite hypothesis testing problem H0 : θ ∈ Θ0 v.s. H1 : θ ∈ Θ1 (27) Define the minimax sum of Type-I and Type-II error probabilities as E(Θ0 , Θ1 ) , inf sup{Pθ0 (A) + Pθ1 (Ac ) : θi ∈ Θi , i = 0, 1}, A where the infimum is taken over all measurable sets A. By the minimax theorem (c.f., e.g., [43, p. 476]), the minimax probability error is given by least favorable Bayesian problem: E(Θ0 , Θ1 ) = 1 − inf{TV(Pπ0 , Pπ1 ) : π0 ∈ M(Θ0 ), π1 ∈ M(Θ1 )}. (28) R where M(Θi ) denotes the set of all probability measures supported on Θi , and Pπ (·) = Pθ (·)π(dθ) denotes the mixture induced by the prior π. Therefore, any pair of priors give rise to a lower bound on the probability of error; however, sometimes it is difficult to construct priors that are supported on the respective parameter subsets. To overcome this hurdle, the following lemma, which is essentially the same as [50, Theorem 2.15 (i)], allows priors to be supported on a possibly extended parameter space Θ′ . For completeness, we state a simpler and self-contained proof using the data processing inequality [23] and the triangle inequality for total variation. Lemma 2 (Lower bound for testing). Let Θ′ ⊃ Θ. Let π0 , π1 be priors supported on Θ′ . If TV(Pπ0 , Pπ1 ) ≤ 1 − δ (29) and πi (Θi ) ≥ 1 − ǫi , i = 0, 1, (30) then E(Θ0 , Θ1 ) ≥ δ − ǫ0 − ǫ1 . Proof. Define the following priors by conditioning: for i = 0, 1, let π̃i = πi |Θi , i.e., π̃i (·) = Then, by triangle inequality, (31) πi (·∩Θi ) πi (Θi . TV(Pπ̃0 , Pπ̃1 ) ≤ TV(Pπ0 , Pπ1 ) + TV(Pπ̃0 , Pπ0 ) + TV(Pπ̃1 , Pπ1 ) (a) ≤ TV(Pπ0 , Pπ1 ) + TV(π̃0 , π0 ) + TV(π̃1 , π1 ) (b) ≤ 1 − δ + ǫ0 + ǫ1 . where (a) follows from the data-processing inequality (or convexity) of the total variation distance; (b) follows from that TV(π̃i , πi ) = πi (Θci ). The lower bound (31) then follows from the characterization (28). 14 4.2 Least favorable prior To apply Lemma 2 to the detection problem (3), we have Θ0 = {0} and Θ1 = Θ(p, k, λ), with π0 = δ0 and π1 a prior distribution under which the matrix is sparse with high probability. Next we describe the prior that leads to the optimal lower bound in Theorem 1. Let I be chosen uniformly at random from all subsets of [p] of cardinality m. Let u = (u1 , . . . , up ) be independent k Rademacher random variables. Let B be a p × p matrix with i.i.d. Bern( m ) entries and let (u, I, B) be independent. Let UI denote the diagonal matrix defined by (UI )ii = ui 1{i ∈ I}. Let t > 0 be specified later. Let the prior π1 be the distribution of the following random sparse matrix: M = tUI BUI , (32) Equivalently, we can define M by mij = 1{i ∈ I}1{j ∈ I}ui uj bij . Therefore the non-zero pattern of M has the desired marginal distribution Bern( kp ), but the entries of M are dependent. Alternatively, M can be generated as follows: First choose an m × m principal k ) entries, then pre- and submatrix with a uniformly chosen support I, fill it with i.i.d. Bern( m post-multiply by a diagonal matrix consisting of independent Rademacher variables, which used to randomize the sign of the leading eigenvector. By construction, with high probability, the matrix M is O(k)-sparse and, furthermore, its operator norm satisfies kM k2 ≥ kt. Furthermore, the corresponding eigenvector is approximately 1J , which is m-sparse. The construction of this prior is based on the following intuition. The operator norm of a matrix highly depends on the correlation of the rows. Given the ℓ2 -norm of the rows, the largest spectral norm is achieved when all rows are aligned (rank-one), while the smallest spectral norm is achieved when all rows are orthogonal. In the sparse case, aligned support results in large spectral norm while disjoint support in small spectral norm. However, if all rows are aligned, then the signal is prominent enough to be distinguished from noise. Note that a submatrix structure strikes a precise balance between the extremal cases of completely aligned and disjoint support, which enforces that the row support sets are contained in a set of cardinality m, which is much larger than the row sparsity k but much√smaller than the matrix size p. In fact, the optimal choice of the submatrix size given by m ≍ k2 ∧ kp, which matches the structural property given in Theorem 3. The structure of the least favorable prior, in a way, shows that the optimality of tests based on approximate singular vector is not a coincidence. Another perspective is that the sparsity constraint on the matrix forces the marginal distribution of each entry in the nonzero pattern (1{Mij 6= 0}) to be Bern( kp ). However, if all the entries were independent, then it would be very easy to test from noise. Indeed, perhaps the most straighti.i.d. k k forward P choice of prior is Mij ∼ t · Bern( p ), where t ≍ p . However, the linear test statistic based on ij Mij succeeds unless λ . 1. We can improve the prior by randomize the eigenvector, i.e., √ i.i.d. Mij ∼ tui uj Bern( kp ), but the χ2 -test in Theorem 5 unless λ . k, which still falls short of the desired λ ≍ (kp)1/4 . Thus, we see that the coupling between the entries is useful to make the mixture distribution closer to the null hypothesis. 4.3 Key lemmas The main tool for our lower bound is the χ2 -divergence, defined by 2 Z  dP 2 − 1 dQ, χ (P k Q) , dQ 15 dP under Q. The χ2 -divergence is related to the total which is the variance of the likelihood ratio dQ variation via the following inequality [27, p. 1496]: χ2 ≥ TV log 1 + TV 1 − TV (33) Therefore the total variation distance cannot goes to one unless the χ2 -divergence diverges. Furthermore, if χ2 -divergence vanishes, then the total variation also vanishes, which is equivalently to, in view of (28), that P cannot be distinguished from Q better than random guessing. The following lemma due to Ingster and Suslina (see, e.g., [38, p. 97]) gives a formula for the χ2 -divergence of a normal location mixture with respect to the standard normal distribution. Lemma 3. Let P be an arbitrary distribution on Rm . Then χ2 (N (0, Im ) ∗ P kN (0, Im )) = E[exp(hX, X̃i)] − 1 where ∗ denotes convolution and X and X̃ are independently drawn from P . The proof of the lower bound in Theorem 1 relies on the following lemmas. These results give non-asymptotic both necessary and sufficient conditions for certain moment generating functions involving hypergeometric distributions to be bounded, which show up in the χ2 -divergence (m)(p−m) calculation. Let H ∼ Hypergeometric(p, m, m), with P {H = i} = i pm−i , i = 0, . . . , m. (m) Lemma 4 ([18, Lemma 1]). Let p ∈ N and m ∈ [p]. Let B1 , . . . , Bm be independently Rademacher distributed. Denote by m X Bi Gm , i=1 the position of a symmetric random walk on Z starting at 0 after m steps. Then there exist an a absolute constant a0 > 0 and function A : (0, a0 ) 7→ R+ with A(0+) = 0, such that if t = m log ep m and a < a0 , then   E exp tG2H ≤ A(a). (34) an absolute Lemma 5 ([32, Lemma 15, Appendix C]). Let p ∈ N and m ∈ [p]. Then there exist   p2 1 constant b0 > 0 and function B : (0, b0 ) 7→ R+ with B(0+) = 0, such that if λ = b m log ep ∧ 4 m m and b < b0 , then   E exp λH 2 ≤ B(b). (35) Remark 2 (Tightness of Lemmas  4–5). The  purpose of Lemma 4 is to seek the largest t, as a function of p and m, such that E exp tG2H is upper bounded by a constant non-asymptotically. 1 log ep The condition that t ≍ m m is in fact both necessary and sufficient. To see the necessity, note −i that P {GH = H|H = i} = 2 . Therefore       2p 2 2 −H 2 −m 2 E exp tGH ≥ E exp(tH )2 ≥ exp(tm )2 P {H = m} ≥ exp tm − m log , m 1 log ep which cannot be upper bound bounded by an absolute constant unless t . m m. ep p2 1 Similarly, the condition λ . m log m ∧ m4 in Lemma 5 is also necessary. To see this, note that   4 2 ). Therefore a necessary E [H] = mp . By Jensen’s inequality, we have E exp λH 2 ≥ exp( λm p2   p2 log B condition for (34) is that λ ≤ m4 . On the other hand, we have E exp λH 2 ≥ exp(λm2 − p 1 ), which implies that λ . m log ep m log m m. 16 4.4 Proof of Theorem 1: lower bound Proof. Step 1 : Fix t > 0 to be determined later. Recall the random sparse matrix M = tUI BUI defined in (32), where I is chosen uniformly at random from all subsets of [p] of cardinality k, k ) u = (u1 , . . . , up )⊤ consists of independent Rademacher entries, B is a p×p matrix with i.i.d. Bern( m entries, and (u, I, B) are independent. Equivalently, mij = 1{i ∈ I}1{j ∈ J}ui uj bij . Next we show that the hypothesis H0 : X = Z versus H1 : X = M + Z cannot be tested with ˜ B̃) be an vanishing probability of error, by showing that the χ2 -divergence is bounded. Let (Ũ , I, independent copy of (U, I, B). Then M̃ = ŨI˜B̃ ŨI˜ is an independent copy of M . Put s = t2 . By Lemma 3, we have h  i χ2 (PX|H0 k PX|H1 ) + 1 = E exp hM, M̃ i h  i = E exp t2 hUI BUI , ŨI˜B̃ ŨI˜i    X X = E exp s ui ũi uj ũj bij b̃ij  i∈I∩I˜ j∈I∩I˜ (a)  (b)   = E exp s = E (c)  Y X X i∈I∩I˜ j∈I∩I˜ Y  i∈I∩I˜ j∈J∩J˜ 1+  ui uj aij  k2 m2 (esui uj   k2 X X   − 1)    − 1)   (esui uj  m2 i∈I∩I˜ j∈I∩I˜     k2 X X   = E exp (u u sinh(s) + cosh(s) − 1) i j  m2  i∈I∩I˜ j∈I∩I˜    !2   k2 sinh(s) X 2 k (cosh(s) − 1) 2  ˜ |I ∩ I| , u + = E exp i   m2 m2 ≤ E exp (36) i∈I∩I˜ (d) i.i.d. 2 k where (a) is due to (um ũm , . . . , um ũm ) = (u1 , . . . , um ); (b) follows from aij , bij b̃ij ∼ Bern( m 2 ); (c) follows from the fact that log(1 + x) ≤ x for all x > −1; (d) is because for b ∈ {±1}, we have exp(sb) = b sinh(s) + cosh(s) − 1. Recall from Lemma 4 that {Gm : m ≥ 0} denotes the symmetric random walk on Z. Since I, I˜ are independently and uniformly drawn from all subsets of [p] of ˜ ∼ Hypergeometric(p, m, m). Define cardinality k, we have H , |I ∩ I|    2 2k sinh(s) 2 GH , (37) A(m, s) , E exp m2   2  2k (cosh(s) − 1) 2 H B(m, s) , E exp . (38) m2 17 Applying the Cauchy-Schwartz inequality to the right-hand side of (36), we obtain p χ2 (PX|H0 k PX|H1 ) + 1 ≤ A(m, s)B(m, s). (39) Therefore upper bounding the χ2 -divergence boils down to controlling the expectations in (37) and (38) separately. Applying Lemma 4 and Lemma 5 to A(m, s) and B(m, s) respectively, we conclude that   1 ep p2 k2 (cosh(s) − 1) ≤c log ∧ ⇒ A(m, s) ≤ C (40) m2 m m m4 k2 sinh(s) c ep ≤ log ⇒ B(m, s) ≤ C (41) m2 m m where c, C are constants so that C → 0 as c → 0. Therefore the best lower bound we get for s is      cp2 ep ep  −1 cm ∗ −1 cm ∧ log log ∧ sinh , (42) s = max (cosh −1) k≤m≤p k2 m m2 k 2 k2 m where the inverses sinh−1 and (cosh −1)−1 are defined with the domain restricted to R+ . To simplify the maximization in (42), we use the following bounds of the hyperbolic functions: sinh−1 (y) ≥ log(2y), (cosh −1)−1 (y) ≥ log y, y ≥ 0. Therefore ∗ s ≥ log max Choosing m =  p2 log p 1 3 k≤m≤p  ep cp2 cm log ∧ k2 m m2 k 2  (43) . yields ∗ s & log  + p log p k3  , (44) 1 where log+ , max{log, 0}. Note that the above lower bound is vacuous unless k ≤ (p log p) 3 . To 1 produce a non-trivial lower bound for k ≥ (p log p) 3 , note that (43) can be improved as follows. If the argument y is restricted to the unit interval, then √ sinh−1 (y) ≥ sinh−1 (1) y, (cosh −1)−1 (y) ≥ y, y ∈ [0, 1], (45) which follows from the Taylor expansion of cosh and the convexity of sinh. Applying (45) to (42), ! r −1 2 c sinh (1)m ep cp ∧ log s∗ = cmmaxep . m2 k 2 k2 m m: 2 log m ≤1 k Choosing m = q pk 4c2 log ep k yields cm k2 log ep k ≤ 1. We then obtain ∗ s & r p ep log . k3 k (46) √ Step 2 : We invoke Lemma 2 to conclude kt as a valid lower bound for λ with t = s∗ given in (44) and (46). To this end, we need to show that with high probability, M is O(k)-sparse and kM k2 = Ω(kt). Define events E1 = {M ∈ M(p, 2k)}, 18 E2 = {kM k2 ≥ kt/2}. It remains to show that both are high-probability events. Since I is independent of B, we shall assume, without loss of generality, that I = [m]. For the event E1 , by the union bound and Hoeffding’s inequality, we have (m ) X P {E1c } = P {BII ∈ / Θ(m, 2k)} ≤ m2 P bi1 ≥ 2k ≤ m2 exp(−mk2 ) = o(1), (47) i=1 i.i.d. k ). For the event E2 , again by Hoeffding’s inequality, where bi1 ∼ Bern( m   k P {E2 } = P {kBII k2 ≥ k/2} ≥ P kM 1I k2 ≥ k1I k2 2     m m X  X k k bij ≥ , ∀i ∈ [m] ≥ 1 − m P ≥P b1j <    2 2 j=1 (48) j=1 2 ≥ 1 − m exp(−mk /4) = 1 − o(1). (49) The desired lower bound now follows from Lemma 2. Finally, we note that the lower bound continues to hold up to constant factors even if M is constrained to be symmetric. Indeed, we can replace M with the symmetrized version M ′ = [ M0⊤ M ] 0 and note that the bound on χ2 -divergence remains valid since hM ′ , M̃ ′ i = 2hM, M̃ i. 5 Detecting sparse covariance matrices 5.1 Test procedures and upper bounds Let X1 , . . . , Xn be independently sampled from N (0, Σ). Define the sample covariance matrix as n S= 1X Xi Xi⊤ , n (50) i=1 which is a sufficient statistic for Σ. The following result is the counterpart of Theorem 4 for entrywise thresholding that is optimal in the highly sparse regime: Theorem q 6. Let C, C ′ be constants that only depend on τ . Let ǫ ∈ (0, 1). Define Σ̂ = (Snij 1{|Sij | ≥ot}), √ where τ = C log pǫ . Assume that n ≥ C ′ log p. If λ n > 2kt, then the test ψ(S) = 1 kΣ̂k2 ≥ λ satisfies PI (ψ = 1) + sup PΣ (ψ = 0) ≤ ǫ Σ∈Ξ(p,k,λ,τ ) for all 1 ≤ k ≤ p. To extend the test (24) to covariance model, we need a test statistic for kΣ − Ik2F . Consider the following U-statistic proposed in [22, 16]: Q(S) = p + 1  n 2 X 1≤i<j≤n hXi , Xj i2 − hXi , Xi i − hXj , Xj i , (51) Then Q(S) is a unbiased estimator of kΣ − Ik2F . We have the following result for the moderately sparse regime: 19 Theorem 7. Let m=C s kp . log ep k where C is the universal constant from Theorem 3. Define the following test statistic Tm (S) = max{kSII k2 : I ⊂ [p], |I| = m} (52) ψ(S) = 1{Q(S) ≥ s} ∨ 1{Tm (X) ≥ t} (53) and the test where r r √ 1 ep 1 s , 2 log + 2p log , t , 2 m + 4 m log . ǫ ǫ m There exists a universal constant C0 such that the following holds. For any ǫ ∈ (0, 1/2), if   1  4 p 1 1 λ ≥ C0 kp log log log , ǫ k ǫ (54) (55) then the test (53) satisfies P0 (ψ = 1) + sup M ∈Θ(p,k,λ) PM (ψ = 0) ≤ ǫ holds for all 1 ≤ k ≤ p. The proofs of Theorems 6 and 7 parallel those of Theorems 4 and 5. Next we point out the main distinction. For Theorem 6, the only difference is the Gaussian tail is replaced by the concentration inequality P {|Sij − Σij | ≥ a} ≤ c0 exp(−c1 nt2 ) for all |t| ≤ c2 , where ci ’s are constants depending 1 1 only on τ [20, Eq. (26)]. For Theorem 7, let S̃ , Σ− 2 SΣ− 2 , which is a k × k standard Wishart matrix with n degrees of freedom. Applying the deviation inequality inh [17, Proposition 4], we 2have i  2 k k2 2 2 E[kS̃ − Ik k2 ] . n + n2 . Since kS − Σk2 ≤ kΣk2 kS̃ − Ik k2 , we have E kS − Σk2 . λ nk + nk 2 . 5.2 Proof of the lower bound In this subsection we prove the lower bound part of Theorem 2. We begin by stating a counterpart of Lemma 3 for covariance model, which also gives an inequality relating the χ2 -divergences of the mean model and the covariance model: Lemma 6. Let λ ≥ 0. Let Q be the distribution of a p × p symmetric random matrix T such that R n , kT k2 ≤ λ almost surely. Let πQ N (0, λIp + T )⊗n Q(dT ) denote the n-sample scale mixture. Then i h n n (56) χ2 (πQ kN (0, λIp )⊗n ) = E det(Ip − λ−2 T T̃ )− 2 − 1 h  n i ≥ E exp hT, T̃ i − 1. (57) 2λ2 where T and T̃ are independently drawn from Q. Furthermore, if kT k2 ≤ δλ almost surely for some δ ∈ (0, 1), then   1 i 1  h n 2 n 2 2 2 n ⊗n E exp kT T̃ kF − 1. χ (πQ kN (0, λIp ) ) ≤ E exp 2 hT, T̃ i 2 4 λ (1 − δ )λ 20 (58) Proof. Let gi be the density function of N (0, Σi ) for i = 0, 1 and 2, respectively. Then Z 1 g1 g2 = det(Σ0 )−1 [det (Σ0 (Σ1 + Σ2 ) − Σ1 Σ2 )]− 2 g0 (59) provided that Σ0 (Σ1 + Σ2 )  Σ1 Σ2 (60) otherwise, the integral on the right-hand side of (59) is infinite. Conditioning on two independent copies T, T̃ and applying (59) with Σ0 = λIp , Σ1 = λIp + T and Σ2 = λIp + T̃ , which satisfies (60), we obtain Z   g1 g2 n 2 n ⊗n χ (πQ kN (0, λIp ) ) + 1 = ET,T̃ g0 h i n = E det(Ip − λ−2 T T̃ )− 2 i h  n = E exp − log det(Ip − λ−2 T T̃ ) 2 h n i (a) ≥ E exp λ−2 Tr(T T̃ ) h  2n D Ei = E exp T, T̃ 2λ2 2 = χ (Q ∗ N (0, 2λ2 n−1 Ip ) kN (0, 2λ2 n−1 Ip )) + 1 where (a) is due to log det(I + A) ≤ Tr(A). If λmax (T ) ≤ δλ < λ, then λmax (λ−2 T T̃ ) < δ2 . Using log(1 − λ) ≥ − λ2 λ2 λ = −λ − ≥ −λ − , 1−λ 1−λ 1 − δ2 for all λ ≤ δ2 < 1, we have log det(I − λ−2 T T̃ ) ≥ −λ−2 Tr(T T̃ ) − 1 kT T̃ k2F , (1 − δ2 )λ4 which gives χ 2 n (πQ kN (0, λIp )⊗n )    n n 2 ≤ E exp hT, T̃ i + kT T̃ kF − 1, 2λ2 2(1 − δ2 )λ4 and, upon applying Cauchy-Schwarz, (58). Next we apply Lemma 6 to obtain minimax lower bound for testing sparse covariance matrices as defined in (11). Throughout the remainder of this subsection, c, c′ , c0 , · · · denote absolute constants whose value might p s vary at each occurrence. Recall that M is the p × p random matrix defined in (32), with t = n , and s > 0 and k ≤ m ≤ p are to be specified later. Define the event   1 E3 = kM k2 ≤ (61) 2 v  ! u   u log m (62) E4 = kBII − pJII k2 ≤ tc0 k ∨  log e log m  k 21 and set E ⋆ = E3 ∩ E4 . Next we show that P {E ⋆ } ≥ 1 − o(1). (63) For E3 , note that kM k2 = t kBII k. Since I is independent of B, we shall assume that I = [m] and let B ′ = BII . Since kBII k2 ≤ kBII k1 kBII k∞ , similar to (49), Hoeffding inequality implies that P {kBII k1 ≥ 2k} = P {kBII k∞ ≥ 2k} ≤ m2 exp(−mk2 /4). Therefore kM k2 ≤ 2tk with probability at least 1 − 2m2 exp(−mk2 /4). For E4 , it follows2 from [34, Theorem 5] that v ! u u log m kBII − E[BII ]k2 ≤ tc0 k ∨ , m log e log k with probability at least 1 − exp(−c1 (k ∨ Consider Σ = I2p + T , where  log m m log e log k )). Thus P {E4 } = 1 − o(1).   0 M T = . M⊤ 0  MM⊤ 0 and hence kT k2 = kM k2 . Let Q denote the law of T condi0 M ⊤M tioned on the event E ⋆ , and By (47) and (49), we have Σ ∈ Ξ(2p, 2k, kt/2, 3/2) with probability tending to one. Thus it remains to bound the χ2 -divergence. n denote the mixture of N (0, I + T )⊗n induced by the prior Q. Let M̃ , S̃ and Ẽ ⋆ are Let πQ 2p independent copies of M , T , and E ⋆ , respectively. Applying Lemma 6 with λ = 1 and δ = 12 , we have Note that T T ⊤ = ≤ = (a) ≤ ≤ n χ2 (πQ kN (0, I2p )⊗n ) h   i1 h  i1  2 2 E exp nhT, T̃ i E ⋆ , Ẽ ⋆ E exp 2nkT T̃ k2F E ⋆ , Ẽ ⋆ − 1 i1 h i1 h     2 2 E exp 2nhM, M̃ i E ⋆ , Ẽ ⋆ E exp 2n(kM M̃ ⊤ k2F + kM ⊤ M̃ k2F ) E ⋆ , Ẽ ⋆ − 1 i1  i1 h h    2 2 E exp 2nhM, M̃ i E ⋆ , Ẽ ⋆ E exp 4nkM M̃ k2F E ⋆ , Ẽ ⋆ − 1 h  i 1 h i 1  1 2 2 2 E exp 2nhM, M̃ i E exp 4nkM M̃ k −1 F P {E ⋆ }2 where (a) follows from the Cauchy-Schwarz inequality and the fact that M and M ⊤ have the same distribution. h  i is bounded by a constant, In Section 4.4 we have already shown that E exp 2nhM, M̃ i provided that (40) and (41) holds. To complete the proof of the lower bound, it remains to show that i h  (64) E exp 4nkM M̃ k2F is bounded under the condition of (14) and (15). To this end, recall from (32) that M = tH and k . Write M̃ = tH̃, where H = UI BUI and H̃ = ŨI˜B̃ ŨI˜. Note that E[B] = ǫJ, where ǫ = m H = UI BUI = UI (B − ǫJ)UI + ǫUI JUI = UI (B − ǫJ)UI + ǫvv ⊤ 2 The result in [34, Theorem 5] deals with symmetric matrices. Here, since BII is an m × m matrix consisting of iid Bern(k/m) entries, the result follows from combining [34, (15)] and Talagrand’s concentration inequality at the end of the proof therein. 22 where v = UI 1 is supported on I with m independent Rademacher non-zeros. Then ⊤ ⊤ H H̃ = |ǫ2 vv{z ṽṽ } + ǫUI (B − ǫJ)UI ṽṽ ⊤ + ǫvv ⊤ ŨI˜(B̃ − ǫJ)ŨI˜ + UI (B − ǫJ)UI ŨI˜(B̃ − ǫJ)ŨI˜ {z } | | {z } | {z } h1 h2 h3 h4 P where the first three terms are rank-one matrices. Since kH H̃k2F ≤ 4 4i=1 kh1 k2F , Hölder’s inequality implies 4 i Y h    1/4 E exp 64nt4 khi k2F E exp 4nkM M̃ k2F ≤ i=1 We proceed to bound the four terms separately. First note that h1 = ǫ2 hv, ṽivṽ ⊤ and hence (d) kh1 k2F = ǫ4 hv, ṽi2 kvk22 kṽk22 = ǫ4 m2 hv, ṽi2 . Note that hv, ṽi = GH , where GH , defined in Lemma 4, is the sum of Hypergeometric(p,  m, m) numberof independent Rademacher random variables. In view of Lemma 4, we have E exp 64nt4 kh1 k2F . 1, provided that nt4 ǫ4 m2 = 1 ep k 4 s2 . log . m2 n m m (65) Next we bound h2 and h3 , which have the same distribution. Note that h2 = ǫUI (B − ǫJ)UI ṽṽ ⊤ and hence kh2 k2F = ǫ2 kUI (B − ǫJ)UI ṽk22 kṽk2 = ǫ2 mk1I (B − ǫJ)UI ṽk22 . Therefore     E exp 64nt4 kh2 k2F = E exp 64nt4 ǫ2 mk1I (B − ǫJ)UI ṽk2F i h  = E exp 64nt4 ǫ2 mk(B − ǫJ)I,I∩I˜k2F ,    m  = E E exp τ (S − ǫL)2 |L , ˜ S ∼ Binom(L, ǫ), and where L , |I ∩ I|, τ , 64nt4 ǫ2 m = 64 k 2 s2 . mn Assume that 1 . (66) m Recall that for any ǫ, Bern(ǫ) is subgaussian with parameter at most a constant c. Therefore S is subgaussian with parameter at most cL. By the equivalent characterization of subgaussian random variables [51, Proposition 2.5.2], we have     E exp τ (S − ǫL)2 |L ≤ exp cτ 2 L τ. provided that τ 2 L ≤ c′ . Therefore     E exp 64nt4 kh2 k2F ≤ E exp cτ 2 mL m  (a)  m 2 ≤ 1 + (exp cτ m − 1) p  2 3  (c) (b) τ m .1 ≤ exp c p where (a) follows from the fact that hypergeometric distribution is stochastically dominated by 2 3 binomial in the convex ordering [36]; (b) and (c) follow from (66) and hence τ 2 m ≤ 1 and τ pm ≤ τ 2 m2 . 1. 23 Finally, we deal with h4 , which is the term that requires the extra condition (15) on the sample ˜ and that kh4 k2 ≤ kBII − ǫJII k kB̃ ˜˜ − ǫJ ˜˜k2 . In view of the size. Note that rank(h4 ) ≤ |I ∩ I| 2 II II ⋆ event E we have conditioned on, Therefore ˜ ≤ cρ2 |I ∩ I|, ˜ kh4 k2F ≤ kBII − ǫJII k22 kB̃I˜I˜ − ǫJI˜I˜k22 |I ∩ I| where ρ , k ∨ log m m. log e log k Hence    2 2 h  i   cρ s 4 2 4 2 ˜ ˜ E exp 64nt kh4 kF ≤ E exp cnt ρ |I ∩ I| = E exp |I ∩ I| n    2 2 m m cρ s ≤ 1+ exp −1 p n  2 2 2 cm ρ s ≤ exp . 1, np provided that and ρ2 s 2 .1 n (67) m2 ρ2 s2 . 1. np (68) To finish the proof, we need to choose the parameters to ensure that that (40), (41), (65)–(68) hold simultaneously. Let  p δ p m = k2 3 , s = δ log 3 , ck sk r ep cp cpk log , m= , s= k3 k log ep k if k ≤ p1/3 if k ≥ p1/3 so that (40) and (41) hold; here δ is any constant in (0, 23 ]. Moreover, the basic assumption on the sample size n & k2 s log2 p (69) guarantees (65), (66) and (67). Finally, the extra assumption on the sample size that ( 6 p 2δ k log2 p k ≤ p1/3 m2 k 2 s 2 3 n& = p k p p k ≥ p1/3 ensures (68) hold simultaneously. The lower bound k completing the proof. 6 ps n (70) follows from Lemma 2 and Lemma 6, Computational limits In this section we address the computational aspects of detecting sparse matrices in both the Gaussian noise and the covariance model. 24 Gaussian noise model The computational hardness of the red region (reducibility from planted clique) in Figure 1 follows from that of submatrix detection in Gaussian noise [13, 45], which is a special case of the model considered here. The statistical and computational boundary of submatrix detection is shown in Figure 2(b), in terms of the tradeoff between the sparsity k = pα and the spectral norm of the signal λ = pβ . Below we explain how Figure 2(b) follows from the results in [45]. The setting in [45] also deals with the additive Gaussian noise model (2), where, under the alternative, the entries of the mean matrix M is at least θ on a k × k submatrix and zero elsewhere, with k = pα and θ = p−γ . Since kM k2 ≥ kθ, this instance is included in the alternative hypothesis in (3) with λ = pβ and β = α − γ. It is shown that (see [45, Theorem 2 and Fig. 1]) detection is computationally at least as hard as solving the planted clique problem when γ > 0 ∨ (2α − 1), i.e., β < α ∧ (1 − α). Note that this bound is not monotone in α, which can be readily improved to β < α ∧ 12 , corresponding to the computational limit in Figure 2(b). Similarly, detection is statistically impossible when γ > α2 ∨ (2α − 1), i.e., β < α2 ∧ (1 − α). Taking the monotone upper envelope leads to β < α2 ∧ 13 , yielding the statistical limit in Figure 2(a). Finally, Figure 1 can be obtained by superimposing the statistical-computational limits in Figure 2(a) on top of the statistical limit obtained in the present paper as plotted in Figure 2(b). β β 1 easy possible 1 2 1 3 1 3 PC impossible 0 1 3 (a) Statistical boundary for sparse matrices (this paper). 1 α 0 rd ha impossible 1 2 2 3 1 α detecting (b) Statistical-computational boundary for detecting submatrices [45]. Figure 2: Detection boundary for k-sparse matrices and k ×k submatrices M in noise, where k = pα and kM k2 = λ = pβ . Sparse covariance model For the problem of detecting sparse covariance matrices, which is defined by the 4-tuple (n, p, k, λ), the picture is less complete than the additive-noise counterpart; this is mainly due to the extra parameter n. Indeed, the statistical lower bound in Theorem 2 holds under the extra assumptions (14) and (15) that the sample size is sufficiently large, while the current computational lower bound for sparse PCA in the literature [13, 52, 30] also requires a number of conditions including the assumption of n ≤ p. Nevertheless, if we still let k = pα √ and λ n = pβ and focus on the tradeoff between the (α, β) pair, the statistical and computational limits in Figure 1 continue to hold. Next we explain how to deduce the computational hardness of the red region from that of sparse PCA in the spiked Gaussian covariance model [30]. To this end, due to monotonicity, it suffices to demonstrate a “hard instance”, i.e., a sequence 25 1 2 and β < 1. Given samples H1 : Σ = I + λuu⊤ , (71) of triples (n, λ, k) indexed by p, for every (α, β) such that i.i.d. 1 3 <α< X1 , . . . , Xn ∼ N (0, Σ), the computational aspect of testing H0 : Σ = I, versus where the eigenvector u is both k-sparse and unit-norm, has been studied in [30]. Fix α ∈ ( 31 , 12 ). ck 2 1 Let n = pη , k = pα and λ = n log 2 , so that β = 2α − η, and let a ≤ η ≤ 1 to be chosen later; here n a > 1 and c > 0 are absolute constants from [30, Theorem 5.4]. By assumption, (2α, 4α)∩( a1 , 1) 6= ∅; pick any η therein. Then we have λ ≪ 1 and (71) is indeed an instance of (5). By the choice of the parameters, the conditions of [30, Theorem 5.4] are fulfilled, namely, β < α and α > η4 , and the detection problem (71) and hence (5) are at least as hard as the planted clique problem. 7 Discussions In this paper, we studied the fundamental limits for sparse matrix detection from both the statistical and computational perspectives, where the alternative hypothesis is defined in terms of the spectral norm. The sparse matrices considered here have no apparent combinatorial structure and the corresponding estimation problem has no computational issue at all, but the detection problem has a surprising computational barrier when the sparsity level exceeds the cubic root of the matrix size. In this section we discuss two related problems, one is the detection problem when the alternative hypothesis is defined in terms of the Frobenius norm and another is the localization and estimation of a sparse matrix. 7.1 Alternative hypothesis defined by the Frobenius norm As opposed to the alternative hypothesis in (3) for k-sparse matrices defined by the spectral norm, one can consider the detection problem with the alternative hypothesis defined in terms of the Frobenius norm: ( H0 : M = 0 (72) H1 : kM kF ≥ λ, M ∈ Θ(p, k, λ). It turns out that in this case the sparsity plays no role in improving the detection boundary, in the √ sense that the optimal separation scales as λ∗ (k, p) ≍ p for all k ≥ 1. The intuition behind this result is the well-known fact that in the Gaussian sequence model, the sparsity of the signal does not help in the so-called “dense regime” when the sparsity level exceeds the square-root of the dimension [37, 25]. Here for k-sparse p × p matrices in the sense of Definition 1, the number of nonzeros can be as large as kp (e.g., block diagonal consisting of p/k number of k × k blocks), which, since the ambient dimension is p2 , lies in the dense regime. This result can be proved rigorously as follows. By the classical result of detection in the Gaussian sequence model (cf. e.g. [38, Sec. 3.3.6]), without sparsity, the optimal λ for (72) is Θ(p), achieved by the χ2 -test, namely, thresholding on kXkF . Next we show that this is optimal even when k = 1. To see this, consider the prior where M is a random permutation matrix, which is 1-sparse by definition and kM kF = p with probability one. By Lemma 3, the χ2 -divergence between the null and the alternative is h  i χ2 (PX|H0 k PX|H1 ) + 1 = E exp hM, M̃ i = E [exp(Sp )] (73) where Sp is the number of fixed points of a uniform random permutation over p elements. Furthermore, it is well-known that (cf. [29, Section IV.4]) Sp converges in distribution to Poisson(1) as 26 Pn−ℓ (−1)m 2 p → ∞ and, furthermore, P {Sn = ℓ} = ℓ!1 m=0 m! ≤ ℓ! for any ℓ ≥ 0, which is faster than any exponential tail. Therefore, by [42, Theorem 1], the moment generating function of Sn converges to that of Poisson(1) pointwise. In particular, E [exp(Sp )] → ee−1 as p → ∞. Hence the probability of error for testing is non-vanishing in view of (33). 7.2 Localization and denoising A problem that is closely related to detecting the presence of a sparse matrix is localization. That is, the goal is to identify the support of the mean or covariance matrix with high probability. Under the row/column-wise sparsity assumption, if we measure the signal strength by the minimum non-zero entrywise magnitude, then it is easy to show that entrywise thresholding attains the minimax rate and there is no computational issue. In contrast, in the submatrix model, achieving the optimal rate for localization is again computationally difficult as shown in [15] and [33] in the context of Gaussian noise model and the community detection model, respectively. Denoising high-dimensional matrices with submatrix sparsity was studied in [46], where the goal is to estimate the mean matrix M based on the noisy observation in (2). It turns out the computational difficulty of attaining the optimal rates crucially depends on the loss function [45, Section 5.2]. For instance, for Frobenius norm loss entrywise thresholding is rate-optimal, while achieving the optimal rate for the spectral norm loss is no easier than planted clique whenever k = pα for any fixed 0 < α < 1. In contrast, as mentioned earlier, for the sparsity model studied in this paper, entrywise thresholding achieves the minimax rate simultaneously for both the Frobenius norm and the spectral norm losses [20]. References [1] N. Alon, A. Andoni, T. Kaufman, K. Matulef, R. Rubinfeld, and N. Xie. Testing k-wise and almost k-wise independence. In Proceedings of the thirty-ninth annual ACM symposium on Theory of computing, pages 496–505. ACM, 2007. [2] N. Alon, M. Krivelevich, and B. Sudakov. Finding a large hidden clique in a random graph. Random Structures and Algorithms, 13(3-4):457–466, 1998. [3] E. Arias-Castro, S. Bubeck, and G. Lugosi. Detection of correlations. The Annals of Statistics, 40(1):412–435, 2012. [4] E. Arias-Castro, S. Bubeck, and G. Lugosi. Detecting positive correlations in a multivariate sample. Bernoulli, 21(1):209–241, 2015. [5] E. Arias-Castro, E. J. Candés, H. Helgason, and O. Zeitouni. Searching for a trail of evidence in a maze. The Annals of Statistics, 36(4):1726–1757, 2008. [6] E. Arias-Castro, E. J. Candès, and Y. Plan. Global testing under sparse alternatives: ANOVA, multiple comparisons and the higher criticism. The Annals of Statistics, 39(5):2533–2556, 2011. [7] E. Arias-Castro, D. L. Donoho, and X. Huo. Near-optimal detection of geometric objects by fast multiscale methods. IEEE Transactions on Information Theory, 51(7):2402–2425, 2005. [8] E. Arias-Castro and N. Verzelen. Community detection in dense random networks. Ann. Statist., 42(3):940–969, 2014. 27 [9] S. Balakrishnan, M. Kolar, A. Rinaldo, A. Singh, and L. Wasserman. Statistical and computational tradeoffs in biclustering. In NIPS 2011 Workshop on Computational Trade-offs in Statistical Learning, 2011. [10] Q. Berthet and P. Rigollet. Complexity theoretic lower bounds for sparse principal component detection. Journal of Machine Learning Research: Workshop and Conference Proceedings, 30:1046–1066, 2013. [11] Q. Berthet and P. Rigollet. Optimal detection of sparse principal components in high dimension. The Annals of Statistics, 41(4):1780–1815, 2013. [12] P. J. Bickel and E. Levina. Covariance regularization by thresholding. The Annals of Statistics, 36(6):2577–2604, 2008. [13] C. Butucea and Y. I. Ingster. Detection of a sparse submatrix of a high-dimensional noisy matrix. Bernoulli, 19(5B):2652–2688, 2013. [14] T. T. Cai, J. X. Jeng, and J. Jin. Optimal detection of heterogeneous and heteroscedastic mixtures. Journal of the Royal Statistical Society. Series B (Methodological), 73(5):629 – 662, 2011. [15] T. T. Cai, T. Liang, and A. Rakhlin. Computational and statistical boundaries for submatrix localization in a large noisy matrix. The Annals of Statistics, 45:1403–1430, 2017. [16] T. T. Cai and Z. Ma. Optimal hypothesis testing for high dimensional covariance matrices. Bernoulli, 19(5B):2359–2388, 2013. [17] T. T. Cai, Z. Ma, and Y. Wu. Sparse PCA: Optimal rates and adaptive estimation. The Annals of Statistics, 41(6):3074 – 3110, 2013. [18] T. T. Cai, Z. Ma, and Y. Wu. Optimal estimation and rank detection for sparse spiked covariance matrices. Probability Theory and Related Fields, 161(3-4):781–815, 2015. [19] T. T. Cai and M. Yuan. Minimax rate optimal detection of very short signal segments. arXiv preprint arXiv:1407.2812, 2014. [20] T. T. Cai and H. H. Zhou. Optimal rates of convergence for sparse covariance matrix estimation. The Annals of Statistics, 40:2389–2420, 2012. [21] E. J. Candès, X. Li, Y. Ma, and J. Wright. Robust principal component analysis? Journal of the ACM (JACM), 58(3):11, 2011. [22] S. X. Chen, L.-X. Zhang, and P.-S. Zhong. Tests for high-dimensional covariance matrices. Journal of the American Statistical Association, 105(490):810–819, 2010. [23] I. Csiszár. Eine informationstheoretische ungleichung und ihre anwendung auf den beweis der ergodizitat von markoffschen ketten. Publ. Math. Inst. Hungar. Acad. Sci., Ser. A, 8:85–108, 1963. [24] K. Davidson and S. Szarek. Handbook on the Geometry of Banach Spaces, volume 1, pages 317–366. Elsevier Science, 2001. [25] D. L. Donoho and J. Jin. Higher criticism for detecting sparse heterogeneous mixtures. The Annals of Statistics, 32(3):962–994, 2004. 28 [26] J. Fan, P. Rigollet, and W. Wang. Estimation of functionals of sparse covariance matrices. The Annals of statistics, 43(6):2706, 2015. [27] A. A. Fedotov, P. Harremoës, and F. Topsøe. Refinements of Pinsker’s inequality. Information Theory, IEEE Transactions on, 49(6):1491–1498, 2003. [28] V. Feldman, E. Grigorescu, L. Reyzin, S. Vempala, and Y. Xiao. Statistical algorithms and a lower bound for detecting planted cliques. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pages 655–664. ACM, 2013. [29] W. Feller. An Introduction to Probability Theory and Its Applications: Volume I. John Wiley & Sons New York, 1968. [30] C. Gao, Z. Ma, and H. H. Zhou. Sparse CCA: Adaptive estimation and computational barriers. The Annals of Statistics, 45(5):2074–2101, 2017. [31] G. H. Golub and C. F. Van Loan. Matrix Computations. Johns Hopkins University Press, Baltimore, MD, USA, 3rd edition, 1996. [32] B. Hajek, Y. Wu, and J. Xu. Computational lower bounds for community detection on random graphs. Conference on Learning Theory (COLT), 2015. arxiv:1406.6625. [33] B. Hajek, Y. Wu, and J. Xu. Computational lower bounds for community detection on random graphs. In Proceedings of COLT 2015, pages 899–928, 2015. [34] B. Hajek, Y. Wu, and J. Xu. Achieving exact cluster recovery threshold via semidefinite programming. IEEE Transactions on Information Theory, 62(5):2788–2797, 2016. [35] E. Hazan and R. Krauthgamer. How hard is it to approximate the best nash equilibrium? SIAM Journal on Computing, 40(1):79–91, 2011. [36] W. Hoeffding. Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58(301):13–30, 1963. [37] Y. I. Ingster. On some problems of hypothesis testing leading to infinitely divisible distributions. Mathematical Methods of Statistics, 6(1):47 – 69, 1997. [38] Y. I. Ingster and I. A. Suslina. Nonparametric Goodness-of-fit Testing under Gaussian Models. Springer, New York, NY, 2003. [39] M. Jerrum. Large cliques elude the Metropolis process. Random Structures & Algorithms, 3(4):347–359, 1992. [40] N. E. Karoui. Operator norm consistent estimation of large-dimensional sparse covariance matrices. The Annals of Statistics, pages 2717–2756, 2008. [41] O. Klopp and A. B. Tsybakov. Estimation of matrices with row sparsity. Problems of Information Transmission, 51(4):335–348, 2015. [42] W. Kozakiewicz. On the convergence of sequences of moment generating functions. Annals of Mathematical Statistics, 18(1):61–69, 1947. [43] L. Le Cam. Asymptotic Methods in Statistical Decision Theory. Springer-Verlag, New York, NY, 1986. 29 [44] K. Lounici, M. Pontil, S. Van De Geer, and A. B. Tsybakov. Oracle inequalities and optimal inference under group sparsity. The Annals of Statistics, 39(4):2164–2204, 2011. [45] Z. Ma and Y. Wu. Computational barriers in minimax submatrix detection. The Annals of Statistics, 43(3):1089–1116, 2015. [46] Z. Ma and Y. Wu. Volume ratio, sparsity, and minimaxity under unitarily invariant norms. IEEE Transactions on Information Theory, 61(12):6939 – 6956, Dec 2015. [47] A. Onatski, M. J. Moreira, and M. Hallin. Asymptotic power of sphericity tests for highdimensional data. The Annals of Statistics, 41(3):1204–1231, 2013. [48] A. Onatski, M. J. Moreira, and M. Hallin. Signal detection in high dimension: The multispiked case. The Annals of Statistics, 42(1):225–254, 2014. [49] M. Rudelson and R. Vershynin. Sampling from large matrices: An approach through geometric functional analysis. Journal of the ACM (JACM), 54(4):21, 2007. [50] A. B. Tsybakov. Introduction to Nonparametric Estimation. Springer Verlag, New York, 2009. [51] R. Vershynin. High-dimensional probability: An introduction with applications in data science. Book draft, available at https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-book.pdf. [52] T. Wang, Q. Berthet, and R. J. Samworth. Statistical and computational trade-offs in estimation of sparse principal components. The Annals of Statistics, 44(5):1896–1930, 2016. [53] D. Yang, Z. Ma, and A. Buja. Rate optimal denoising of simultaneously sparse and low rank matrices. The Journal of Machine Learning Research, 17(1):3163–3189, 2016. 30
7cs.IT
Margin Sample Mining Loss: A Deep Learning Based Method for Person Re-identification Qiqi Xiao , Hao Luo , Chi Zhang arXiv:1710.00478v3 [cs.CV] 7 Oct 2017 [email protected], [email protected], [email protected] Abstract Person re-identification (ReID) is an important task in computer vision. Recently, deep learning with a metric learning loss has become a common framework for ReID. In this paper, we propose a new metric learning loss with hard sample mining called margin smaple mining loss (MSML) which can achieve better accuracy compared with other metric learning losses, such as triplet loss. In experiments, our proposed methods outperforms most of the state-ofthe-art algorithms on Market1501, MARS, CUHK03 and CUHK-SYSU. min(dn) CNN max(dp) … … input features distance matrix Figure 1. Framework of our method. Input data are designed to be groups of identities. Distace matrix of features extracted by CNN is calculated. The minimum of negative pair distances and the maximum of positive pair distances are sent to the loss function. 1. Introduction Person re-identification (ReID) is an important and challenging task in computer vision. It has many applications in surveilance video, such as person tracking across multiple cameras and person searching in a large gallery etc. However, some issues make the task difficult such as large variations in poses, viewpoints, illumination, background environments and occlusion. And the similarity of appearances among different persons also increases the difficulty. Some traditional ReID approaches focus on low-level features such as colors, shapes and local descriptors [8, 10]. With the development of deep learning, the convolutional neural network (CNN) is commonly used for feature representation [26, 38, 5]. The CNN based methods can present high-level features and thus improve the performance of person ReID. In supervised learning, current methods can be divided into representation learning and metric learning in terms of the target loss. For the representation learning, ReID is considered as a verification or identification problem. For instance, in [57], the authors make the comparison between the verification baseline and the identification baseline: (1) For the former, two images are judged whether they belong to the same person. (2) For the latter, the method treats each identity as a category, and then minimizes the softmax loss. In some improved work, Lin et al. combined the verification loss with attributes loss [19], while Matsukawa et al. combined the identifica- tion loss with attributes loss [26]. Representation learning based methods have prominent advantages, having reasonable performance and being easily trained and reproducible. But those methods do not care about the similarity of different pairs, leading it difficult to distinguish between pairs of same persons and different persons. To mitigate that problem, different distance losses, such as contrastive loss [38], triplet loss [21], improved triplet loss [5], quadruplet loss [3], etc. are proposed. And [12] also proposes hard batch by sampling hard image pairs. These methods can directly evaluate the similarity of two input images according to their embedding features. Although these distance losses are sensitive to image pairs, which increases the training difficulty, they can generally get better performance than representation learning based methods. In this paper, we propose a novel metric learning loss with hard sample mining called margin smaple mining loss (MSML). It can minimize the distance of positive pairs while maximizing the distance of negative pairs in feature embedding space. For original triplet or quadruplet loss, the pairs are randomly sampled. In our method, we put each K images of P persons into a batch, and then calculate an N × N distance matrix where N = K × P denotes the 1 2.2. Deep metric learning batch size. Then, we choose the maximum distance of positive pairs and the minimum distance of negative pairs to calculate the final loss. In this way, we sample the most dissimilar positive pair and the most similar negative pair, both of which are hardest to be distinguished in the batch. On Market1501, MARS, CUHK03 and CUHK-SYSU, our method outperforms most of state-of-the-art ones. In the following, we overview the main contents of our method and summarize the contributions: Before deep learning, most traditional metric learning methods focus on learning a Mahalanobis distance in Euclidean space. Cross-view Quadratic Discriminant Analysis (XQDA) [18] and Keep It Simple and Straightforward Metric Learning (KISSME) [14] were both classic metric learning methods in person ReID in the past. However, deep metric learning methods usually transform raw images into embedding features, and then compute the similarity scores or feature distances directly in Euclidean space. In deep metric learning, two images of the same person are defined as a positive pair while two of different persons are a negative pair. The triplet loss is motivated by the threshold enforced between positive and negative pairs. In improved triplet loss, a distance loss of positive pairs is used to reinforce clustering of the same person images in the feature space. The positive pair and the negative one in a triplet share a common image. A triplet only has two identities. Quadruplet loss adds a new negative pair, and a quadruplet samples four images from three identities. For the quadruplet loss, a new loss enforces the distance between positive pairs of one identity and negative pairs of the other two identities. Deep metric learning methods is sensitive to the samples of pairs. Selecting suitable samples for training model by hard mining is shown to be effective [12, 3]. A common practice is to pick out dissimilar positive pairs and similar negative pairs according to similarity scores. Compared with identification or verification loss, distance loss for metric learning can lead to a margin between inter-class distance. But combining softmax loss with distance loss to speed up convergence is also popular. • We propose a new loss with extremely hard sample mining named margin smaple mining loss, which outperforms other metric learning losses on person ReID task. • Our method shows significant performance on those four datasets, being superior to most of state-of-the-art methods. The paper is organized as follows: related works with more details are presented in section 2. In section 3, we introduce our MSML. Datasets and experiments are presented in section 4. Conclusions and outlook are presented in section 5. 2. Related Work 2.1. Deep convolutional networks Including AlexNet(CaffeNet) [15], GoogleNet [36] and Resnet [11] etc. , several popular deep networks have been proposed in the past few years. A lots of works show that Resnet is better than other baseline models on person ReID task [60, 55, 59]. Most current paper choose Resnet50 pre-trained on the ImageNet LSVRC image classification datasets [32] as baseline networks. In this paper, we also choose Resnet50 as our baseline network but reconstruct it. Resnet is the origin of deep residual networks, and there are some improved versions such as ResNeXt [45], DenseNet [13] and ShuffleNet [51] . All these works use efficient channel-wise convolutions or group convolutions into the building blocks to balance representation capability and computational cost. Different from traditional regular convolutions, group convolutions divide feature maps into several groups concatenated together after respective convolutions. The channel-wise convolutions in which the number of groups equal to the number of channels is a special case of group convolutions. Channel-wise convolutions can effectively reduce computational cost. GoogLeNet Xception [6] uses a large number of channel-wise convolutions. Using building blocks designed with group convolutions and channel-wise convolutions to replace regular convolutions in Resnet is popular and improves accuracy with less computational cost. 2.3. Other proposed ReID methods Some successful unsupervised or transfer learning methods have been proposed recently [7, 30, 29, 48]. One important concern is that there exists bias among datasets collected in different environments. Another problem is the lack of labeled data, which can cause overfitting easily. Despite that supervised learning methods based on CNN have been successful in some certain dataset, the network trained with that dataset could perform poorly on other datasets. There, one method of transfer learning is to train one task with one dataset, and then fine-tune from the trained model to train another task with another dataset. For example, the model trained on one dataset clusters the other dataset to predict the fake labels which are used to fine-tune the model [7]. In [29], an unsupervised multi-task dictionary learning is proposed to solve dataset-biased problem. In addition, some paper focus on getting better global or local features. For instance, pose invariant embedding (PIE) aligns pedestrians to a standard pose to reduce the impact of pose [55] variation. Natural language description [16] and image data generated by generative adversarial networks 2 (GANs) [59] are respectively regarded as additional information input into networks. Inspite of image-based learning methods above, there are some video-based person ReID works, which take into account the sequence information such as motion or optical flow [41, 47, 46, 24, 27, 54, 22]. RNN architectures and attention model are also applied into embedding sequence features. After getting image features, most current works choose L2 euclidean distance to compute similarity score for ranking or retrieval task. In [40, 60, 1], some re-ranking methods are proposed and obviously improve the ReID accuracy. w.r.t. the same probe image. As a result, it suffers poor generalization, and is difficult to be applied for tracking tasks. The quadruplet loss [3] extends the triplet loss by adding a different negative pair. A quadruplet contains four different images {IA , IA0 , IB , IC }, where IA and IA0 are images of the same identity while IB and IC are images of another two identities respectively. Accordingly, a quadruplet of `2 normalized features {fA , fA0 , fB , fC } would be used to calculate distances. The quadruplet loss is formulated as following:   relative distance N z }| { X 1 kfA − fA0 k − kfA − fB k + α Lquad = 2 2 N 3. Our Method + Despite the deep network for feature extracting, our method includes a metric learning loss with hard sample mining called MSML.   absolute distance N }| { 1 X z kfA − fA0 k2 − kfC − fB k2 + β  + N + 3.1. Margin Sample Mining Loss for Metric Learning (2) where α and β are the values of the margins in two terms. The first term is the same as (1), which focuses on the distance between positive pairs and negative pairs containing one same probe image. The second term considers the distance between positive pairs and negative pairs which contain different probe images. With the second constraint, an inter-class distance is supposed to be larger than an intraclass distance. In[3], the margin β is set to be smaller than the margin α to achieve a relatively weeker constraint, so the second term does not play the leading role. However, we can well combine these two terms into one and extend (2) to: The goal of metric embedding learning is to learn a function g(x) : RF → RD which maps semantically similar instances from the data manifold in RF onto metrically close points in RD [12]. The deep metric learning aims to find the function through minimizing the metric loss of training data. Then we should define a metric function D(x, y) : RD × RD → R to measure the distances in the embedding space. The distances are used to re-identity the person images. 3.1.1 Related Metric Learning Methods One of the widely used metric learning loss is triplet loss [33] which helps generate features as discriminative as possible compared to softmax loss for classification. It is trained on groups of triplets. A triplet contains three different images{IA , IA0 , IB }, where IA and IA0 are images of the same identity while IB is an image of a different identity. Each image would generate one extracted feature after a deep network. A triplet of `2 -normalized features {fA , fA0 , fB } would be used to calculate distances and the triplet loss is formulated as following:   to largen to shorten N z }| { z }| { 1 X  Ltrp = kfA − fA0 k2 − kfA − fB k2 +α (1) N L quad0 N 1 X = (kfA − fA0 k2 − kfC − fB k2 + α)+ N (3) where C can share the same identity with A or not. A direct application of the loss given in (3) does not achieve good performance. The reason is that the possible number of quadruplets grows rapidly as the dataset gets lager. The number of all the pairs generated from the quadruplets increases accordingly. Most of the samples are relatively easy, especially for the negative pairs, the number of which is squarely larger than that of positive ones. Although a margin is set to restrict the distance between positive and negative pairs, most samples are still too easy to the network, causing the “precious” hard samples overwhelmed and limiting the model performance. In order to relieve this, we apply hard sample mining as in [12]. Triplet loss with hard sample mining computes a batch of samples together. In each batch, it contains different identities, each of which have the same number of samples. For each sample, it picks the most dissimilar sample with the same identity and the most similar sample with a different identity to + where (z)+ = max(z, 0) [31], and α is the value of the margin set to allow the network distinguish the positive samples with the negative ones. The first term shortens the distances of positive pairs, while the second term largens the distances of negative pairs. In triplet loss, each positive pair and negative pair share one same image, which makes it pay more attention to obtaining correct orders for pairs 3 we randomly sample the training data in each batch, which allows the pairs diversity as training epoch grows. In (5), the first term is the upper bound of the distance of all positive pairs, and the second term is the lower bound of the distance of all negative pairs in a batch. Different from other metric learning losses, which push away positive pairs and negative pairs by each sample, our MSML push away the bounds of two sets in a batch. With training epoch growing, there is a sharp demarcation between positive pairs and negative pairs in feature embedding space. We think it is a useful characteristic for some special tasks. In summary, compared with other metric learning losses, our MSML has following advantages. First, MSML not only considers the relative distances between positive and negative pairs containing the same probe sample, but also considers absolute distances between positive and negative pairs from different probe samples. Second, it inherits the advantage of hard sample mining and other approaches. And we extend it to edge mining, which leads to a better performance. Finally, we think our MSML is easy to implement and combine with other methods. get a triplet. In [12], the triplet loss with hard sample mining is formulated as following: hard positive pair Ltrihard 1 = N X A∈batch z }| { max(kfA − fA0 k2 ) A0 hard negative pair ! }| { z − min(kfA − fB k2 ) +α B + (4) where N is the batch size. With hard sample mining, easy samples are filtered and thus improving the robustness of the model. 3.1.2 Margin sample mining loss We apply a new hard example mining strategy for (3) named margin smaple mining loss (MSML). It picks the most dissimilar positive pairs and the most similar negative pair in the whole batch, as: hardest positive pair hardest negative pair ! }| { z }| { z max(kfA − fA0 k2 ) − min(kfC − fB k2 ) +α Leml = A,A0 4. Experiments C,B + We first conduct two sets of experiments: 1) to compare different networks on person ReID tasks; 2) to evaluate the performance of different losses. Then we compare the proposed approach with other state-of-the-art methods. Note that train a single model using all datasets as [42, 53]. (5) where C and B can share the same identity with A or not. HardNet [28] also proposed a loss that maximizes the distance between the closest positive and close negative patch in a batch and shows great performance in some other tasks. As shown in Figure 2, the connections are extremely sparse, only two pairs in a batch participating in training phase. There are two examples in our margin smaple mining loss. In Figure 2(a), the positive pair and the negative pair have one common identity, which considers the relative distance. It covers the samples that the triplet loss (or with hard sample mining) can get. And in Figure 2(b), the positive pair and the negative pair do not have any common identities, which considers the absolute distance. Therefore, it can cover the second term of quadruplet loss. It seems that we waste a lot of training data. But the two chosen pairs are determined by all the data of one batch. With the loss reducing, not only the two chosen pairs, but the distances of most positive pairs and negative pairs will get larger. In addition, 4.1. Datasets We use public datasets including CUHK03 [17], CUHKSYSU [43], Market1501 [56] and MARS [35] in our experiments. CUHH03 contains 14,097 images of 1,467 identities. It provides the bounding boxes detected from deformable part models (DPM) and manually labeling. In this paper, we evaluate our method on the labeled set. Following the evaluation procedure in [17], we randomly pick 100 identities for testing. Since we train one single model for all benchmarks, it is a bit different from the standard procedure, which splits the dataset randomly for 20 times. We only split the dataset once for training and testing. CUHK-SYSU is a large scale benchmark for person search, containing 18,184 images and 8,432 identities. The dataset is close to real world application scenarios for images are cropped from whole images. The training set contains 11,206 images of 5,532 query persons while the test set contains 6,978 images of 2,900 persons. Market1501 contains more than 25,000 images of 1,501 labeled persons of 6 camera views. There are 751 identities in the training set and 750 identities in the testing set. In average, each identity contains 17.2 images with different appearances. All images are detected by the DPM detector dp dp dn (a) Relative distance dn (b) Absolute distance Figure 2. Two examples of edge mining samples. 4 Table 1. Comparison of different methods. Cls stands for classfication, Tri stands for triplet loss [33], TriHard stands for triplet loss with hard sample mining [12], Quad stands for quadruplet loss [3] and MSML stands for our margin smaple mining loss. We combine metric learning loss above with classification loss. Market1501 MARS CUHK-SYSU CUHK03 Base model Methods mAP r = 1 r = 5 mAP r = 1 r = 5 mAP r = 1 r = 5 r=1 r=5 r = 10 Cls 41.3 65.8 83.5 43.3 59.3 75.2 70.7 75.0 88.1 51.2 72.6 81.8 Tri 54.8 75.9 89.6 62.1 76.1 89.6 82.6 85.1 94.1 73.0 92.0 96.0 Resnet50 Quad 61.1 80.0 91.8 62.1 74.9 88.9 85.6 87.8 95.7 79.1 95.3 97.9 TriHard 68.0 83.8 93.1 71.3 82.5 92.1 82.4 85.1 94.7 79.5 95.0 98.0 MSML 69.6 85.2 93.7 72.0 83.0 92.6 87.2 89.3 96.4 84.0 96.7 98.2 Cls 40.7 66.3 84.1 45.0 62.6 77.9 74.2 78.2 89.7 50.5 68.8 77.4 Tri 57.9 78.3 91.8 55.5 70.7 85.2 87.7 89.7 96.6 76.9 93.7 97.2 Inception-v2 Quad 66.2 83.9 93.6 65.3 77.8 89.9 88.3 90.2 96.6 81.9 96.1 98.3 TriHard 73.2 86.8 95.4 74.3 84.1 93.5 83.5 86.1 95.2 85.5 97.2 98.7 MSML 73.4 87.7 95.2 74.6 84.2 95.1 88.4 90.4 96.8 86.3 97.5 98.7 Cls 46.5 70.8 87.0 48.0 63.8 80.2 74.2 78.2 89.7 57.2 77.7 85.6 Tri 69.2 86.2 94.7 68.2 79.5 91.7 89.6 91.4 97.0 82.0 96.3 98.4 Resnet50-X Quad 64.8 83.3 93.8 63.6 77.7 89.4 87.3 89.6 96.2 80.7 94.9 97.9 TriHard 71.6 86.9 94.7 69.9 82.5 92.4 86.4 88.8 96.3 82.8 96.1 98.1 MSML 76.7 88.9 95.6 72.0 83.4 93.3 89.6 90.9 97.4 87.5 97.7 98.9 and thus include 2,793 false alarms to mimic the real scenario. MARS (Motion Analysis and Re-identification Set) dataset is an extenstion verion of the Market1501 dataset. It is a large scale video based person ReID dataset. Since all bounding boxes and tracklets are generated automatically, it contains distractors and each identity may have more than one tracklets. In total, MARS has 20,478 tracklets of 1,261 identities of 6 camera views. We evaluate our method with rank-1, 5, 10 accuracy and mean average precision (mAP), where the rank-i accuracy is the mean accuracy that images of the same identity appear in top-i. For each query, we calculate the average precision (AP). And the mean of the average precision (mAP) shows the performance in another dimension. several contrast experiments and the results are shown in Table 1. 4.3. Results analysis of Different Losses 4.2. Implementation Details (a) TriHard Each image is resized into 224 × 224 pixels and conducted with data augmentaion. The augmentation includes randomly horizontal flipping, shifting, zooming and bluring. The base models (Resnet50, Inception-v2, Resnet50-Xception (Resnet50-X)) are pre-trained from ImageNet dataset. The final feature dimensions of Resnet50, Inception-v2 and Resnet50-X are transformed to 1024 through a fully-connected layer. The margin of triplet loss is set to α = 0.3 and the margins of the quadruplet loss is set to α = 0.3 and β = 0.2. The margin of triplet loss with hard mining and our loss with edge mining are also set to α = 0.3. Adam optimizer is used and the inital learning rate is set to 10−3 in the first 50 epoches. Learning rate decreases to 10−4 in the next 150 epoches and 10−5 until convergence. And the batch size is set to 128. We use Resnet50, Inception-v2 and Resnet50-X as base model respectively with different loss functions. There are (b) MSML Figure 3. Distance distributions of two different metric learning losses. Blue boxes are positive pairs while red boxes are negative pairs. Note that the direction arrows are only used for viewing. We conduct experiments with different losses and provide the results to illustrate the effectiveness of our proposed MSML. They are shown in Table 1. Cls (classification loss) is the baseline experiment. Then, we combine different metric learning losses with classification loss. For Tri (triplet loss), the mAP and rank-1 accuracy increase by approximately 10.0% compared to baseline experiments. TriHard (triplet loss with hard sample mining) and Quad (quadruplet loss) both have better performance than triplet loss. TriHard is a little better on Market1501, MARS and CUHK-03 while Quad does better on CUHK-SYSU. Finally, our MSML gets best accuracy on most experiments datasets for all different base models. 5 Table 4. Comparison with existing methods on CUHK03 Methods r=1 r=5 r=10 Person [18] 44.6 Learning [49] 62.6 90.0 94.8 Gated [38] 61.8 57.3 80.1 88.3 A [39] In [12] 75.5 95.2 99.2 Joint [44] 77.5 Deep [9]∗ 84.1 Looking [2]∗ 72.4 95.2 95.8 Unlabeled [59]∗ 84.6 97.6 98.9 A [58]∗ 83.4 97.1 98.7 Spindle[53] 88.5 97.8 98.6 Our 87.5 97.7 98.9 Table 2. Comparison on Market1501 with single query Methods mAP r=1 Temporal [25] 22.3 47.9 Learning [49] 35.7 61.0 Gated [38] 39.6 65.9 45.5 71.8 Person [4] Pose [55] 56.0 79.3 Scalable [1] 68.8 82.2 Improving [19] 64.7 84.3 In [12] 69.1 84.9 Spindle[53] 76.9 Deep[52]∗ 68.8 87.7 Our 76.7 88.9 Table 3. Comparison on MARS with single query Methods mAP r=1 Re-ranking [60] 68.5 73.9 Learning [50]∗ 55.5 68.2 Multi [37]∗ 49.3 68.3 Mars [35] In [12] 67.7 79.8 Quality [23]∗ 51.7 73.7 50.7 70.6 See [61] Our 74.6 84.2 Table 5. Comparison with existing methods on CUHK-SYSU Methods mAP r=1 End[43] 55.7 62.7 77.9 81.2 Neural [20]∗ Deep [34]∗ 74.0 76.7 Our 89.6 90.9 calculate a distance matrix and then choose the maximum distance of positive pairs and the minimum distance of negative pairs to calculate the final loss. In this way, MSML uses the most dissimilar positive pair and most similar negative pair to train the model. We use Resnet50, Inception-v2 and Resnet50-X as base models to do some contrast experiments with different metric learning losses. The results show our MSML gets best performance and learns a finer metric in feature embedding space. Then, we compare our method with some state-ofthe art methods. On several benchmark datasets, including Market1501, MARS, CUHK-SYSU and CUHK-03, our method shows better performance than most of other methods. In terms of accuracy, TriHard and MSML can both get high scores. We further visualize the distance distributions of some randomly chosen image pairs in Figure 3. The numeric values below the image pairs stand for the distances of their features in the embedding space. As we can see, the distances of negative pairs may be smaller than positive pairs, because TriHard does not focus on absolute distance. In contrast, our MSML can get a finer metric in feature embedding space. For Quad and TriHard, some experiments were unable to reach its best accuracy with the same setting. And in Inception-v2 and Resnet-X experiments, they can be even worse than Tri. However, compared with them, our MSML can always have the best performance. 4.4. Comparison with state-of-the-art methods We compare our method with representative ReID methods on several benchmark datasets (∗ means it is on ArXiv but not published). The results are shown in Table 2, 3, 4, 5. Methods which applied re-ranking[60] skills are not included. 5. Conclusion In this paper, we propose a new metric learning loss with hard sample mining named MSML in person reidentification (ReID). For triplet and quadruplet loss, the positive pairs and negative pairs are randomly sampled. With hard sample mining, easy samples are filtered and thus improving the robustness of the model. In our method, we 6 References [1] S. Bai, X. Bai, and Q. Tian. Scalable person reidentification on supervised smoothed manifold. arXiv preprint arXiv:1703.08359, 2017. [2] I. B. Barbosa, M. Cristani, B. Caputo, A. Rognhaugen, and T. Theoharis. Looking beyond appearances: Synthetic training data for deep cnns in re-identification. arXiv preprint arXiv:1701.03153, 2017. [3] W. Chen, X. Chen, J. Zhang, and K. Huang. Beyond triplet loss: a deep quadruplet network for person re-identification. arXiv preprint arXiv:1704.01719, 2017. [4] Y.-C. Chen, X. Zhu, W.-S. Zheng, and J.-H. Lai. Person reidentification by camera correlation aware feature augmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. [5] D. Cheng, Y. Gong, S. Zhou, J. Wang, and N. Zheng. Person re-identification by multi-channel parts-based cnn with improved triplet loss function. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1335–1344, 2016. [6] F. Chollet. Xception: Deep learning with depthwise separable convolutions. arXiv preprint arXiv:1610.02357, 2016. [7] H. Fan, L. Zheng, and Y. Yang. Unsupervised person reidentification: Clustering and fine-tuning. arXiv preprint arXiv:1705.10444, 2017. [8] M. Farenzena, L. Bazzani, A. Perina, V. Murino, and M. Cristani. Person re-identification by symmetry-driven accumulation of local features. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 2360–2367. IEEE, 2010. [9] M. Geng, Y. Wang, T. Xiang, and Y. Tian. Deep transfer learning for person re-identification. arXiv preprint arXiv:1611.05244, 2016. [10] O. Hamdoun, F. Moutarde, B. Stanciulescu, and B. Steux. Person re-identification in multi-camera system by signature based on interest point descriptors collected on short video sequences. In Distributed Smart Cameras, 2008. ICDSC 2008. Second ACM/IEEE International Conference on, pages 1–6. IEEE, 2008. [11] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016. [12] A. Hermans, L. Beyer, and B. Leibe. In defense of the triplet loss for person re-identification. arXiv preprint arXiv:1703.07737, 2017. [13] G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. arXiv preprint arXiv:1608.06993, 2016. [14] M. Koestinger, M. Hirzer, P. Wohlhart, P. M. Roth, and H. Bischof. Large scale metric learning from equivalence constraints. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 2288–2295. IEEE, 2012. [15] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] 7 Advances in neural information processing systems, pages 1097–1105, 2012. S. Li, T. Xiao, H. Li, B. Zhou, D. Yue, and X. Wang. Person search with natural language description. arXiv preprint arXiv:1702.05729, 2017. W. Li, R. Zhao, T. Xiao, and X. Wang. Deepreid: Deep filter pairing neural network for person re-identification. pages 152–159, 2014. S. Liao, Y. Hu, X. Zhu, and S. Z. Li. Person re-identification by local maximal occurrence representation and metric learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2197–2206, 2015. Y. Lin, L. Zheng, Z. Zheng, Y. Wu, and Y. Yang. Improving person re-identification by attribute and identity learning. arXiv preprint arXiv:1703.07220, 2017. H. Liu, J. Feng, Z. Jie, K. Jayashree, B. Zhao, M. Qi, J. Jiang, and S. Yan. Neural person search machines. arXiv preprint arXiv:1707.06777, 2017. H. Liu, J. Feng, M. Qi, J. Jiang, and S. Yan. End-to-end comparative attention networks for person re-identification. IEEE Transactions on Image Processing, 2017. H. Liu, Z. Jie, K. Jayashree, M. Qi, J. Jiang, S. Yan, and J. Feng. Video-based person re-identification with accumulative motion context. arXiv preprint arXiv:1701.00193, 2017. Y. Liu, J. Yan, and W. Ouyang. Quality aware network for set to set recognition. arXiv preprint arXiv:1704.03373, 2017. X. Ma, X. Zhu, S. Gong, X. Xie, J. Hu, K.-M. Lam, and Y. Zhong. Person re-identification by unsupervised video matching. Pattern Recognition, 65:197–210, 2017. N. Martinel, A. Das, C. Micheloni, and A. K. RoyChowdhury. Temporal model adaptation for person reidentification. In European Conference on Computer Vision, pages 858–877. Springer, 2016. T. Matsukawa and E. Suzuki. Person re-identification using cnn features learned from combination of attributes. In Pattern Recognition (ICPR), 2016 23rd International Conference on, pages 2428–2433. IEEE, 2016. N. McLaughlin, J. Martinez del Rincon, and P. Miller. Recurrent convolutional network for video-based person reidentification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1325– 1334, 2016. A. Mishchuk, D. Mishkin, F. Radenovic, and J. Matas. Working hard to know your neighbor’s margins: Local descriptor learning loss. CoRR, abs/1705.10872, 2017. P. Peng, T. Xiang, Y. Wang, M. Pontil, S. Gong, T. Huang, and Y. Tian. Unsupervised cross-dataset transfer learning for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1306–1315, 2016. F. Radenović, G. Tolias, and O. Chum. Cnn image retrieval learns from bow: Unsupervised fine-tuning with hard examples. In European Conference on Computer Vision, pages 3–20. Springer, 2016. L. Rosasco, E. De Vito, A. Caponnetto, M. Piana, and A. Verri. Are loss functions all the same? Neural Computation, 16(5):1063–1076, 2004. [47] D. Zhang, W. Wu, H. Cheng, R. Zhang, Z. Dong, and Z. Cai. Image-to-video person re-identification with temporally memorized similarity learning. IEEE Transactions on Circuits and Systems for Video Technology, 2017. [48] L. Zhang, T. Xiang, and S. Gong. Learning a discriminative null space for person re-identification. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. [49] L. Zhang, T. Xiang, and S. Gong. Learning a discriminative null space for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1239–1248, 2016. [50] W. Zhang, S. Hu, and K. Liu. Learning compact appearance representation for video-based person re-identification. arXiv preprint arXiv:1702.06294, 2017. [51] X. Zhang, X. Zhou, M. Lin, and J. Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. arXiv preprint arXiv:1707.01083, 2017. [52] Y. Zhang, T. Xiang, T. M. Hospedales, and H. Lu. Deep mutual learning. arXiv preprint arXiv:1706.00384, 2017. [53] H. Zhao, M. Tian, S. Sun, J. Shao, J. Yan, S. Yi, X. Wang, and X. Tang. Spindle net: Person re-identification with human body region guided feature decomposition and fusion. CVPR, 2017. [54] R. Zhao, W. Oyang, and X. Wang. Person re-identification by saliency learning. IEEE transactions on pattern analysis and machine intelligence, 39(2):356–370, 2017. [55] L. Zheng, Y. Huang, H. Lu, and Y. Yang. Pose invariant embedding for deep person re-identification. arXiv preprint arXiv:1701.07732, 2017. [56] L. Zheng, L. Shen, L. Tian, S. Wang, J. Wang, and Q. Tian. Scalable person re-identification: A benchmark. In Computer Vision, IEEE International Conference, 2015. [57] L. Zheng, Y. Yang, and A. G. Hauptmann. Person reidentification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016. [58] Z. Zheng, L. Zheng, and Y. Yang. A discriminatively learned cnn embedding for person re-identification. arXiv preprint arXiv:1611.05666, 2016. [59] Z. Zheng, L. Zheng, and Y. Yang. Unlabeled samples generated by gan improve the person re-identification baseline in vitro. arXiv preprint arXiv:1701.07717, 2017. [60] Z. Zhong, L. Zheng, D. Cao, and S. Li. Re-ranking person re-identification with k-reciprocal encoding. arXiv preprint arXiv:1701.08398, 2017. [61] Z. Zhou, Y. Huang, W. Wang, L. Wang, and T. Tan. See the forest for the trees: Joint spatial and temporal recurrent neural networks for video-based person re-identification. [32] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. [33] F. Schroff, D. Kalenichenko, and J. Philbin. Facenet: A unified embedding for face recognition and clustering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 815–823, 2015. [34] A. Schumann, S. Gong, and T. Schuchert. Deep learning prototype domains for person re-identification. arXiv preprint arXiv:1610.05047, 2016. [35] Springer. MARS: A Video Benchmark for Large-Scale Person Re-identification, 2016. [36] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 1–9, 2015. [37] Y. T. Tesfaye, E. Zemene, A. Prati, M. Pelillo, and M. Shah. Multi-target tracking in multiple non-overlapping cameras using constrained dominant sets. arXiv preprint arXiv:1706.06196, 2017. [38] R. R. Varior, M. Haloi, and G. Wang. Gated siamese convolutional neural network architecture for human reidentification. In European Conference on Computer Vision, pages 791–808. Springer, 2016. [39] R. R. Varior, B. Shuai, J. Lu, D. Xu, and G. Wang. A siamese long short-term memory architecture for human reidentification. In European Conference on Computer Vision, pages 135–153, 2016. [40] J. Wang, S. Zhou, J. Wang, and Q. Hou. Deep ranking model by large adaptive margin learning for person reidentification. arXiv preprint arXiv:1707.00409, 2017. [41] T. Wang, S. Gong, X. Zhu, and S. Wang. Person reidentification by discriminative selection in video ranking. IEEE transactions on pattern analysis and machine intelligence, 38(12):2501–2514, 2016. [42] T. Xiao, H. Li, W. Ouyang, and X. Wang. Learning deep feature representations with domain guided dropout for person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1249– 1258, 2016. [43] T. Xiao, S. Li, B. Wang, L. Lin, and X. Wang. Endto-end deep learning for person search. arXiv preprint arXiv:1604.01850, 2016. [44] T. Xiao, S. Li, B. Wang, L. Lin, and X. Wang. Joint detection and identification feature learning for person search. In Proc. CVPR, 2017. [45] S. Xie, R. Girshick, P. Dollár, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. arXiv preprint arXiv:1611.05431, 2016. [46] J. You, A. Wu, X. Li, and W.-S. Zheng. Top-push videobased person re-identification. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1345–1353, 2016. 8
1cs.CV
CLAD: A Complex and Long Activities Dataset with Rich Crowdsourced Annotations Journal Title XX(X):1–6 c The Author(s) 2016 Reprints and permission: sagepub.co.uk/journalsPermissions.nav DOI: 10.1177/ToBeAssigned www.sagepub.com/ arXiv:1709.03456v2 [cs.CV] 21 Sep 2017 Jawad Tayyub1 , Majd Hawasly2 ∗ , David C. Hogg1 and Anthony G. Cohn1 Abstract This paper introduces a novel activity dataset which exhibits real-life and diverse scenarios of complex, temporallyextended human activities and actions. The dataset presents a set of videos of actors performing everyday activities in a natural and unscripted manner. The dataset was recorded using a static Kinect 2 sensor which is commonly used on many robotic platforms. The dataset comprises of RGB-D images, point cloud data, automatically generated skeleton tracks in addition to crowdsourced annotations. Furthermore, we also describe the methodology used to acquire annotations through crowdsourcing. Finally some activity recognition benchmarks are presented using current state-of-the-art techniques. We believe that this dataset is particularly suitable as a testbed for activity recognition research but it can also be applicable for other common tasks in robotics/computer vision research such as object detection and human skeleton tracking. Keywords Activity Dataset, Crowdsourcing 1 Introduction An artificial intelligence system embedded in a human environment, such as a robot, is required to perform activity recognition in order to fully comprehend its environment so it could take appropriate steps and make decisions to gain utility. Recognisable/human activities largely vary in complexity, length and expressiveness from short primitive actions lasting for a few seconds, such as ‘pick’, ‘wave’, ‘approach’ etc., to longer activities lasting minutes, hours or days, such as ‘dinner at a restaurant’, ‘surgery in a hospital’, ‘studying for exams’, etc. Currently, most research in human activity recognition has been focused on recognising relatively short activities[]. Though there has been a steady shift towards slightly longer activity recognition, there is still a need for standardised datasets that present longer and more complex activities. In the service robotics domain, this requirement has now become imperative to tackle. A fully autonomous system capable of autonomously running for days or months amongst humans, for example the Strands project Hawes et al. (2016), needs to be equipped with the capability of recognising long-term activities that last hours or days using embedded sensors. However, popular activity datasets, e.g. OPPORTUNITY Activity Dataset Roggen et al. (2010), offer sensor data from a multitude of inertial and other sensors that are either body worn or installed in a perspective point, such as on the ceiling or corners of rooms, whose outputs are not normally available to an embedded robot in general environments. It is more natural to assume that the robot has to rely primarily on video data from onboard cameras for activity analysis and recognition in these settings. In this paper, we propose a dataset called Complex and Long Activities Dataset (CLAD). The dataset can be accessed at this web address : https://doi.org/10. Prepared using sagej.cls [Version: 2016/06/24 v1.10] 5518/249. This dataset is i) recorded from the perspective of a mobile robot using a video RGBD camera which is commonly found sensor on a robot and ii) aimed to promote research on long-term complex activities that span longer periods of time than previous datasets. One of the biggest challenges in gathering a datasets consisting of long activity videos comes with the challenge of accurate annotation in a timely and cost effective manner. We therefore further provide a mechanism for obtaining annotations effectively through the use of crowdsourcing. Crowdsourced annotations are achieved through a worldwide pool of non-expert users who independently annotate samples of the videos in an objective and unbiased manner. This generates annotations which reflect aspects of true human understanding of the activities within the video, but adds to the complexity from the use of unconstrained natural language in the annotations which exhibit large variability when describing the videos. The remainder of this paper is organised as follows: in Section 2 we describe some related datasets that are presently available. Then, in Section 3 we provide a detailed description of the presented CLAD dataset. In Section 4 we describe the ground-truth collection process and finally we conclude in Section 5. 1 University 2 Five of Leeds, UK AI, UK Corresponding author: Jawad Tayyub, University of Leeds Woodhouse Ln., Leeds, LS2 9JT, UK. Email: [email protected] 2 Journal Title XX(X) (a) Raw images from the dataset (b) Images overlayed with skeleton tracks Figure 1. Sample images from the dataset. Each column shows different recordings of a single high-level activity (eating, studying, ...). It can be seen that there is high variability in the performance of these high-level activities between instances. 2 Related Datasets Activity recognition has been a popular research direction in robotics. Many activity datasets are openly available for activity recognition research ranging from datasets consisting of simple repetitive action such as jumping, walking etc. (e.g., []) to more complex activities such as cooking food, cleaning microwave etc. (e.g., []). Most available datasets are can be categorised into three categories: heterogeneous actions, specific actions and others Chaquet et al. (2013). Our dataset falls in the ’activities of daily living’ subcategory of the ’specific actions category’. Early activity datasets, such as the Weizmann datasets Zelnik-Manor and Irani (2001); Blank et al. (2005), captured many instances of various activities which were scripted, recorded in a controlled environment and would rarely be observed naturally. A more natural environment was presented in the KTH dataset Schuldt et al. (2004) and the Caviar dataset 1 , but the activities presented in these datasets were limited to heterogeneous and repetitive motion such as walking, jumping, running etc., aiming to model the repetitive nature of short activities. UCF datasets (UCF 101, UCF Youtube Dataset) Soomro et al. (2012); Liu et al. (2009) and Hollywood-2 dataset Marszałek et al. (2009) were some of the first datasets aimed to model everyday activities in a natural setting such as eating, hugging, kissing etc. from a large number of naturally recorded instances. These datasets were mostly generated from movies or YouTube videos. However, videos in these datasets, though longer than previous datasets, were still short activities where each video only comprised of one basic activity thus temporal segmentation was assumed. Duckworth et al. (2017) collected a dataset comprising of long videos of human activities recorded by a mobile robot in a kitchen setting. Videos were continuous and comprised of multiple activities. However, the annotations of this dataset were for Prepared using sagej.cls segmented short actions such as pick up, put down, pour etc. The Cornell Activity Datasets (CAD-120 and CAD60) Koppula et al. (2013); Sung et al. (2012) presented challenging and datasets consisting of longer videos than before and with complex activities such as stacking boxes, taking medicine etc. Though this was a benchmarking dataset, it did have some shortcomings. The videos in this dataset only consisted of a single actor and the annotations provided were limited to two levels of granularity: highlevel activities per video and sub-level actions within each high-level activity video. In all above mentioned datasets, annotations for activity labels were consistent, extracted from pre-set label lists and collected with a set of welldefined rules in place. The CLAD dataset presented in this paper is created with particular focus to address some of these shortcomings. The dataset presented here consists of much longer activities for example service at a restaurant, consisting of multiple actors, contains deep hierarchy of activities and has crowd-sourced freely descriptive annotation i.e. annotators were given the freedom to describe the activities using their own words. Given the advancement towards long-running autonomous robots gathering longer videos of activity data, using crowdsourcing to elicit annotations is becoming popular and therefore such annotations are included in our dataset. To our knowledge, this is the only dataset that presents multiple new challenges to the research community namely, modelling longer naturally occurring and variable activities with many levels of granularity as well as semantic analysis and extraction of information from crowdsourced annotations. 3 Dataset Description The dataset presented in this paper can be accessed from [Dataset URL DOI]. The full size of the dataset available Tayyub et al. 3 of files labelled person {person’s Id}. Depending on the number of subjects in the video, each person would have a dedicated file of their skeleton tracks identified by the person’s Id. In each of the person {person Id} file, there are files labelled frame {frame number}.txt. These files are generated per frame and contain a list of (x,y) coordinates that define the location of all joints, of the skeleton onto the image frame in the following order: head, neck, r-shoulder, r-elbow, rhand, l-shoulder, l-elbow, l-hand, r-hip, r-knee, r-foot, l-hip, l-knee, l-foot, torso where r and l refer to right and left. • Point Cloud: This folder consists of the point cloud files labelled pc {frame number}. These are not available on-line but can be acquired upon request. These are not uploaded due to their large file sizes. • Annotations: This folder contains annotations of the recording acquired through crowdsourcing. Since there are multiple annotators employed for each video, the annotation files are split by annotator id. The Annotations folder therefore contains files labelled annot{annotator’s Id}. Each of the files then contains a list of annotations where each row corresponds to the format: {subject performing the activity}, {activity label/description}, {starting frame}, {ending frame}. These files are simple CSV files which are easy and quick to parse and use. More details on how these annotations are gathered is provided in section 4. Moreover, the IDs of Involved Subjects.txt is a file that specifies the unique Ids of the actors performing the activity in that scene. This is just a list of unique numbers corresponding to each actor through out the dataset. on-line is 222 GB. This is the entire dataset except the point clouds data of the scenes which are available upon request. 3.1 Recording Setup This dataset comprises of 62 videos recorded at a high resolution of 1920x1080 pixels using a Microsoft Kinect 2 sensor. The sensor was installed at a height of approximately 4.5 feet from the ground. The aim of this view point was to simulate one that a commonly used robot such as a PR2, Tiago, Scitos G5 etc. would normally have when patrolling in an environment. Approximately 8-10 objects relevant to the activity were available to the subjects to use. Five subjects were then employed to act out the scenes. The subjects were told of the top-level activity to act out, after which they were free to use the objects available to act out the task. There were 1-2 subjects involved in each scene. These subjects were carefully selected from outside the faculty having no computer science research experience in order to capture natural acting of activities which is unbiased due to any research knowledge. Minimal to no instructions were given to the subjects as to how to act out the requested scenes; in fact, they were encouraged to be variable and random in performing the task during different recordings. This allowed for a natural and unbiased data capture of activities exhibiting high variation. In natural setting such as an actual restaurant for a variety of practical and ethical reasons, all the videos were recorded in our research lab; this is a short coming of the dataset which otherwise tries to capture activities in as natural way as possible. Every effort was made to minimise the influence of the environment on the actors by clearing and neutralising any irrelevant items where possible. 3.2 Dataset Content This dataset comprises of 62 videos of everyday activities ranging from 3 to 10 minutes in length. Only one toplevel activity occurs within each of the full videos however numerous sub-level activities occur during the entire video. The top-level activities comprise of three natural scenes of having breakfast, lunch in a restaurant and working in an office. These scenarios were chosen as normally occurring in a at home, restaurant or an office locations likely for a robot to be deployed in. Sample images from the dataset are shown in figure 1. Each of the 62 recordings consists of the following data and meta-data: • Video: A low-resolution compressed .mp4 video of the recording. • Images: Uncompressed high definition images of the recording where each image is labelled Kinect {frame number}.{format} and has a resolution of 1920x1080 pixels. {*} denotes a wildcard for variables in the file names. The images are provided in .png or .jpg formats. • Skeletons: Two state-of-the-art skeleton trackers are used to generate skeleton tracks for all subjects in the recording Wei et al. (2016); Rafi et al. (2016). These are provided in the skeletons files for each recording. Each skeleton file contains two files corresponding to the two different skeleton trackers used namely cpm and aachen. Each of the skeleton tracker file consists Prepared using sagej.cls The file structure of the entire dataset is shown in figure 2. 4 Dataset Annotations Annotation of videos involves the identification of activities occurring within the video along with their temporal boundary (their start and end times). Traditionally this task has been performed manually, usually by experts who hold some domain knowledge. The task is expensive, timeconsuming and, in case of having domain knowledgeable experts, can result in biased annotations (Roggen et al. 2010; Nguyen-Dinh et al. 2013). In order to reduce cost and time taken to annotate activities, crowdsourcing platforms are increasingly gaining popularity. A crowdsourcing platform offer a large pool of world-wide workers that are able to perform a human intelligent task (HIT), such as annotation of a video, for a small financial incentive. For large datasets and long videos, as is the case for our dataset, this is a suitable option to attain annotations in a cost-effective and efficient manner. Furthermore, since many annotators are employed to annotate each single video, this helped ensure that a rich and varied perspective of the latent activities were reflected in the annotations. A single person usually tends to annotate videos sequentially one activity after the other in a flat temporal sequence. With multiple annotators, we increased the degree to which we obtained annotations at multiple level of temporal granualirty. Combining these annotations from different workers provides a richer annotation of the video. 4 Journal Title XX(X) Dataset/ Videos/ vid 1.mp4 vid 2.mp4 ... Images/ vid 1/ Kinect 0001.jpg Kinect 0002.jpg ... vid 2/ ... Skeletons/ vid 1/ cpm/ frame 0001.txt frame 0002.txt ... aachen/ frame 0001.txt frame 0002.txt ... vid 2/ ... Annotations/ vid 1/ annot{annotatorId}.txt ... IDs of Involved Subjects.txt vid 2/ ... Figure 2. File structure of the dataset directory For our dataset, we make use of a popular crowdsourcing platform called Amazon Mechanical Turk(AMT) 2 . There are however many challenges and design decisions to be taken when developing a system to elicit annotations using crowdsourcing such as deciding on the payment amount, making a clear interface for workers to perform the task, detection and removal of spam or non-diligent workers etc. Overcoming these challenges factors greatly affects the ability to obtain accurate annotations as shown by NguyenDinh et al. (2013). We will describe our design process next. 4.1 Interface Design For the success of a crowd-sourced annotation system, it is crucial that an easy-to-use interface is provided for workers to submit their annotations through. An image of our interface is shown in figure 3. The interface can be divided into the following parts for ease of description: • Instructions: This part simply provides instructions for worker on what is required from them and how to use the interface. The instructions provided in our interface are simply worded since some annotators may not be native English speakers. Also, only the top-level scenario of the activity video is mentioned, no other instructions are given to worker in order to obtain a maximally unbiased set of annotations. • Video Player: An easy to use video player with frame skipping control is provided along with the current frame number display. This allows the worker to fine tune the temporal boundaries of identified activities. • Verification Questions: An important aspect of the interface is the qualification questions. In order to Prepared using sagej.cls Figure 3. The web interface developed for Amazon Mechanical Turkers to submit their annotations. filter out workers who are inputting spam data or tend to fill in the form with random character inputs, we included two verification questions. These questions are objective, randomly placed and have been preanswered. A boolean question and a numeric question was used. The aim of the questions was to enforce the user to watch the entire video before answering. For example, a sample boolean question is ’Did the subject use the teapot?’ and a sample numeric question is ’How many times did the subject flip the newspaper pages?’. Each numeric question had answers within a range pre-specified? If the worker failed to answer these correctly, they would be disqualified from continuing the task. Through experimenting, we found that inclusion of verification questions helped in discouraging non-diligent user from trying to cheat the task. • Annotation Submission Form: This section allows the user to input the start and end frames of the activity, the activity label and the actor/s performing the activity. The workers are not allowed to type in frame numbers but rather use a button to automatically insert them in the fields. This is done to minimise erroneous input in the frame number’s numeric fields. An important design decision made here was to allow the user to freely enter the activity label with minor restrictions such as alphabetical input only and 4 words maximum per activity label to disallow long essay-like descriptions and sentences but produce concise short labels of activities. For example ’consuming coffee’ instead of ’the subject is now drinking a cup of coffee’. It is common to preset a list of labels for workers to choose from to avoid ambiguity and variability in natural language but at the same time limits the descriptive power of the worker. We have chosen to allow the workers full control over the choice of words to describe the identified activity to ensure that annotations captured are as expressive Tayyub et al. 5 without being excessively lengthy. This also removes the requirement of generating a pre-set list of labels for workers to choose from, which can be a timeconsuming process in itself. • Annotations Table: In this section the worker can observe the annotations they have identified so far, edit them or delete them. We further impose a restriction of a minimum number of annotations required for each task. Longer tasks would require a higher number of minimum annotations and shorter would require a smaller number. The worker is unaware of this number and is prompted with an error if he/she tries to submit the task without having met the minimum activities identified. Repeated attempts to submit the task with insufficient number of identified activities results in a disqualification warning followed by disqualification. • Annotation Time-line: The annotation time-line is simply a graphical representation of the annotations identified along the time-line of the video in frames. This tool is intended to encourage workers to identify parallel and overlapping activities as two overlapping activities will appear on different rows. We are, however, unable to quantify the utility of this feature as there seemed to be no significant change in the quality of annotations received with and without this feature included. Further investigation of the time-line remains as future work. 4.2 Parameters Besides the design decisions that were made regarding the interface used, Amazon Mechanical Turk allows the setting of various crucial parameters that affect the quality of annotations produced. We will briefly describe the important parameters and our choices of their values in this section. An overview of the chosen parameters is shown in table 1. Parameter Assignment Duration Max Assignments Qualification Requirements Reward Description Maximum amount of time to finish the task which is 1000 frames long Number of submissions for the task by unique workers Minimum Minimum requirement Approved Tasks of the worker’s qualification % Assignments Approved Amount in US dollars paid per task which is 1000 frames long Value 15 minutes 5 Conclusion In this paper, we have presented an activity dataset of naturally occurring daily activities as might be observed by mobile robots. The dataset can be accessed at https:// doi.org/10.5518/249. We further presented the activity annotations gathered through the use of crowdsourcing. We believe this dataset will be useful in robotics and computer vision research. The dataset presents new challenges for long-term autonomous robots systems to comprehend activities they observe. In future, we plan to augment the dataset with object tracks as well as add other activities that involve more subjects interacting and boasts higher complexity. We also plan to record videos in a real-life setting such as a real restaurant or a real office. Acknowledgements We acknowledge our colleagues in the School of Computing Robotics Lab, other schools in the university, and in the STRANDS project consortium (http://strands-project.eu) for their contributions. We further acknowledge the financial support provided by EU FP7 project 600623 (STRANDS). 5-7 Notes ≥20 1. http://homepages.inf.ed.ac.uk/rbf/CAVIAR/caviar.htm 2. https://www.mturk.com/mturk/welcome ≥90% References up to $3 Table 1. Overview of the parameters used for annotation gathering using Amazon Mechanical Turk. It can be seen from the table that there are multiple parameters that require careful thought and experimentation in order optimise the quality of annotations gathered. We will further elaborate some of our choices for the parameters. The ’Assignment Duration’ defines maximum time allotted to the worker to finish the task. A pilot study with 6 volunteers was performed to estimate the average maximum needed time (15 minutes) for a task of annotating a 1000 frames video. Given this, any task of f number of frames is give Prepared using sagej.cls a maximum time of (f ∗ 15)/1000 minutes following a linear relationship. The ’Reward’ amount is computed at a maximum of $3 for a task of 1000 frames. This amount is split into three parts: i) $1.5 for passing the verification test and submitting minimum number of required annotations, ii) up to $1 for quality of labels, start and end times accuracy which were manually checked for a few randomly selected labels and iii) up to $0.5 for identification of parallel or overlapping activities. Furthermore, bonuses of up to $1 for a 1000 frame long video were awarded for exceptional work as additional motivation for workers to perform well. Similar to the assignment duration, the reward was linearly adjusted depending on the length of the video in frames. Given the above price model, we ensured that workers were sufficiently motivated to perform the task effectively and within a reasonable amount of time. Blank M, Gorelick L, Shechtman E, Irani M and Basri R (2005) Actions as space-time shapes. In: Computer Vision, 2005. ICCV 2005. Tenth IEEE International Conference on, volume 2. IEEE, pp. 1395–1402. Chaquet JM, Carmona EJ and Fernández-Caballero A (2013) A survey of video datasets for human action and activity recognition. Computer Vision and Image Understanding 117(6): 633–659. Duckworth P, Al-Omari M, Charles J, Hogg DC and Cohn AG (2017) Latent dirichlet allocation for unsupervised activity analysis on an autonomous mobile robot. In: AAAI. pp. 3819– 3826. Hawes N, Burbridge C, Jovan F, Kunze L, Lacerda B, Mudrová L, Young J, Wyatt J, Hebesberger D, Körtner T et al. (2016) 6 The STRANDS project: Long-term autonomy in everyday environments. arXiv preprint arXiv:1604.04384 . Koppula HS, Gupta R and Saxena A (2013) Learning human activities and object affordances from RGB-D videos. The International Journal of Robotics Research 32(8): 951–970. Liu J, Luo J and Shah M (2009) Recognizing realistic actions from videos in the wild. In: Computer vision and pattern recognition, 2009. CVPR 2009. IEEE conference on. IEEE, pp. 1996–2003. Marszałek M, Laptev I and Schmid C (2009) Actions in context. In: IEEE Conference on Computer Vision & Pattern Recognition. Nguyen-Dinh LV, Waldburger C, Roggen D and Tröster G (2013) Tagging human activities in video by crowdsourcing. In: Proceedings of the 3rd ACM conference on International conference on multimedia retrieval. ACM, pp. 263–270. Rafi U, Leibe B, Gall J and Kostrikov I (2016) An efficient convolutional network for human pose estimation. In: BMVC, volume 1. p. 2. Roggen D, Calatroni A, Rossi M, Holleczek T, Förster K, Tröster G, Lukowicz P, Bannach D, Pirkl G, Ferscha A et al. (2010) Collecting complex activity datasets in highly rich networked sensor environments. In: Networked Sensing Systems (INSS), 2010 Seventh International Conference on. IEEE, pp. 233–240. Schuldt C, Laptev I and Caputo B (2004) Recognizing human actions: a local svm approach. In: Pattern Recognition, 2004. ICPR 2004. Proceedings of the 17th International Conference on, volume 3. IEEE, pp. 32–36. Soomro K, Zamir AR and Shah M (2012) Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402 . Sung J, Ponce C, Selman B and Saxena A (2012) Unstructured human activity detection from RGBD images. In: Robotics and Automation (ICRA), 2012 IEEE International Conference on. IEEE, pp. 842–849. Wei SE, Ramakrishna V, Kanade T and Sheikh Y (2016) Convolutional pose machines. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. pp. 4724–4732. Zelnik-Manor L and Irani M (2001) Event-based analysis of video. In: Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on, volume 2. IEEE, pp. II–II. Prepared using sagej.cls Journal Title XX(X)
1cs.CV
Under consideration for publication in Theory and Practice of Logic Programming 1 arXiv:1006.4442v1 [cs.PL] 23 Jun 2010 On the Implementation of the Probabilistic Logic Programming Language ProbLog Angelika Kimmig, Bart Demoen and Luc De Raedt Departement Computerwetenschappen, K.U. Leuven Celestijnenlaan 200A - bus 2402, B-3001 Heverlee, Belgium (e-mail: {Angelika.Kimmig,Bart.Demoen,Luc.DeRaedt}@cs.kuleuven.be) Vı́tor Santos Costa and Ricardo Rocha CRACS & INESC-Porto LA, Faculty of Sciences, University of Porto R. do Campo Alegre 1021/1055, 4169-007 Porto, Portugal (e-mail: {vsc,ricroc}@dcc.fc.up.pt) submitted 19 June 2009; revised 14 October 2009; accepted 9 December 2009 Abstract The past few years have seen a surge of interest in the field of probabilistic logic learning and statistical relational learning. In this endeavor, many probabilistic logics have been developed. ProbLog is a recent probabilistic extension of Prolog motivated by the mining of large biological networks. In ProbLog, facts can be labeled with probabilities. These facts are treated as mutually independent random variables that indicate whether these facts belong to a randomly sampled program. Different kinds of queries can be posed to ProbLog programs. We introduce algorithms that allow the efficient execution of these queries, discuss their implementation on top of the YAP-Prolog system, and evaluate their performance in the context of large networks of biological entities. To appear in Theory and Practice of Logic Programming (TPLP) 1 Introduction In the past few years, a multitude of different formalisms combining probabilistic reasoning with logics, databases, or logic programming has been developed. Prominent examples include PHA and ICL (Poole 1993b; Poole 2000), PRISM (Sato and Kameya 2001), SLPs (Muggleton 1995), ProbView (Lakshmanan et al. 1997), CLP(BN ) (Santos Costa et al. 2003), CP-logic (Vennekens et al. 2004), Trio (Widom 2005), probabilistic Datalog (pD) (Fuhr 2000), and probabilistic databases (Dalvi and Suciu 2004). Although these logics have been traditionally studied in the knowledge representation and database communities, the focus is now often on a machine learning perspective, which imposes new requirements. First, these logics must be simple enough to be learnable and at the same time sufficiently expressive to support interesting probabilistic inferences. Second, because learning is computationally expensive and requires answering long sequences of possibly complex queries, inference 2 A. KIMMIG et al in such logics must be fast, although inference in even the simplest probabilistic logics is computationally hard. In this paper, we study these problems in the context of a simple probabilistic logic, ProbLog (De Raedt et al. 2007), which has been used for learning in the context of large biological networks where edges are labeled with probabilities. Large and complex networks of biological concepts (genes, proteins, phenotypes, etc.) can be extracted from public databases, and probabilistic links between concepts can be obtained by various techniques (Sevon et al. 2006). ProbLog is essentially an extension of Prolog where a program defines a distribution over all its possible non-probabilistic subprograms. Facts are labeled with probabilities and treated as mutually independent random variables indicating whether or not the corresponding fact belongs to a randomly sampled program. The success probability of a query is defined as the probability that it succeeds in such a random subprogram. The semantics of ProbLog is not new: it is an instance of the distribution semantics (Sato 1995). This is a well-known semantics for probabilistic logics that has been (re)defined multiple times in the literature, often in a more limited database setting; cf. (Dantsin 1991; Poole 1993b; Fuhr 2000; Poole 2000; Dalvi and Suciu 2004). Sato has, however, shown that the semantics is also well-defined in the case of a countably infinite set of random variables and formalized it in his well-known distribution semantics (Sato 1995). However, even though relying on the same semantics, in order to allow efficient inference, systems such as PRISM (Sato and Kameya 2001) and PHA (Poole 1993b) additionally require all proofs of a query to be mutually exclusive. Thus, they cannot easily represent the type of network analysis tasks that motivated ProbLog. ICL (Poole 2000) extends PHA to the case where proofs need not be mutually exclusive. In contrast to the ProbLog implementation presented here, Poole’s AILog2, an implementation of ICL, uses a meta-interpreter and is not tightly integrated with Prolog. We contribute exact and approximate inference algorithms for ProbLog. We present algorithms for computing the success and explanation probabilities of a query, and show how they can be efficiently implemented combining Prolog inference with Binary Decision Diagrams (BDDs) (Bryant 1986). In addition to an iterative deepening algorithm that computes an approximation along the lines of (Poole 1993a), we further adapt the Monte Carlo approach used by (Sevon et al. 2006) in the context of biological network inference. These two approximation algorithms compute an upper and a lower bound on the success probability. We also contribute an additional approximation algorithm that computes a lower bound using only the k most likely proofs. The key contribution of this paper is the tight integration of these algorithms in the state-of-the-art YAP-Prolog system. This integration includes several improvements over the initial implementation used in (De Raedt et al. 2007), which are needed to use ProbLog to effectively query Sevon’s Biomine network (Sevon et al. 2006) containing about 1,000,000 nodes and 6,000,000 edges, as will be shown in the experiments. This paper is organised as follows. After introducing ProbLog and its semantics in Section 2, we present several algorithms for exact and approximate inference in On the Implementation of ProbLog 3 Section 3. Section 4 then discusses how these algorithms are implemented in YAPProlog, and Section 5 reports on experiments that validate the approach. Finally, Section 6 concludes and touches upon related work. 2 ProbLog A ProbLog program consists of a set of labeled facts pi :: ci together with a set of definite clauses. Each ground instance (that is, each instance not containing variables) of such a fact ci is true with probability pi , that is, these facts correspond to random variables. We assume that these variables are mutually independent.1 The definite clauses allow one to add arbitrary background knowledge (BK). Figure 1 shows a small probabilistic graph that we shall use as running example in the text. It can be encoded in ProbLog as follows: 0. 8 :: edge(a, c). 0. 6 :: edge(b, c). 0. 7 :: edge(a, b). 0. 9 :: edge(c, d). 0. 8 :: edge(c, e). 0. 5 :: edge(e, d). (1) Such a probabilistic graph can be used to sample subgraphs by tossing a coin for each edge. Given a ProbLog program T = {p1 :: c1 , · · · , pn :: cn } ∪ BK and a finite set of possible substitutions {θj 1 , . . . θjij } for each probabilistic fact pj :: cj , let LT denote the maximal set of logical facts that can be added to BK , that is, LT = {c1 θ11 , . . . , c1 θ1i1 , · · · , cn θn1 , . . . , cn θnin }. As the random variables corresponding to facts in LT are mutually independent, the ProbLog program defines a probability distribution over ground logic programs L ⊆ LT : Y Y P (L|T ) = pi (1 − pi ). (2) ci θj ∈L ci θj ∈LT \L Since the background knowledge BK is fixed and there is a one-to-one mapping between ground definite clause programs and Herbrand interpretations, a ProbLog program thus also defines a distribution over its Herbrand interpretations. Sato has shown how this semantics can be generalized to the countably infinite case; we refer to (Sato 1995) for details. For ease of readability, in the remainder of this paper we will restrict ourselves to the finite case and assume all probabilistic facts in a ProbLog program to be ground. We extend our example with the following background knowledge: path(X, Y) : − edge(X, Y). path(X, Y) : − edge(X, Z), path(Z, Y). (3) We can then ask for the probability that there exists a path between two nodes, say c and d, in our probabilistic graph, that is, we query for the probability that a randomly sampled subgraph contains the edge from c to d, or the path from c to d via e (or both of these). Formally, the success probability Ps (q|T ) of a query q in a ProbLog program T is the marginal of P (L|T ) with respect to q, i.e. X Ps (q|T ) = P (q|L) · P (L|T ) , (4) L⊆LT 1 If the program contains multiple instances of the same fact, they correspond to different random variables, i.e. {p :: c} and {p :: c, p :: c} are different ProbLog programs. 4 A. KIMMIG et al a 0.8 0.9 d c 0.7 0.6 0.8 b 0.5 e Figure 1. Example of a probabilistic graph: edge labels indicate the probability that the edge is part of the graph. where P (q|L) = 1 if there exists a θ such that L ∪ BK |= qθ, and P (q|L) = 0 otherwise. In other words, the success probability of query q is the probability that the query q is provable in a randomly sampled logic program. In our example, 40 of the 64 possible subprograms allow one to prove path(c, d ), namely all those that contain at least the edge from c to d or both the edge from c to e and from e to d, so the success probability of that query is the sum of the probabilities of these programs: Ps (path(c, d )|T ) = P ({ab, ac, bc, cd , ce, ed }|T ) + . . . + P ({cd }|T ) = 0. 94, where xy is used as a shortcut for edge(x , y) when listing elements of a subprogram. We will use this convention throughout the paper. Clearly, listing all subprograms is infeasible in practice; an alternative approach will be discussed in Section 3.1. A ProbLog program also defines the probability of a specific proof E , also called explanation, of some query q, which is again a marginal of P (L|T ). Here, an explanation is a minimal subset of the probabilistic facts that together with the background knowledge entails qθ for some substitution θ. Thus, the probability of such an explanation E is that of sampling a logic program L ∪ E that contains at least all the probabilistic facts in E , that is, the marginal with respect to these facts: X Y P (E |T ) = P (L ∪ E |T ) = pi (5) L⊆(LT \E ) ci ∈E The explanation probability Px (q|T ) is then defined as the probability of the most likely explanation or proof of the query q Y Px (q|T ) = maxE ∈E (q) P (E |T ) = maxE ∈E (q) pi , (6) ci ∈E where E (q) is the set of all explanations for query q, i.e., all minimal sets E ⊆ LT of probabilistic facts such that E ∪ BK |= q (Kimmig et al. 2007). In our example, the set of all explanations for path(c, d ) contains the edge from c to d (with probability 0.9) as well as the path consisting of the edges from c to e and from e to d (with probability 0. 8 · 0. 5 = 0. 4). Thus, Px (path(c, d )|T ) = 0. 9. The ProbLog semantics is essentially a distribution semantics (Sato 1995). Sato has rigorously shown that this class of programs defines a joint probability distribution over the set of possible least Herbrand models of the program (allowing functors), that is, of the background knowledge BK together with a subprogram L ⊆ LT ; for further details we refer to (Sato 1995). The distribution semantics has been used widely in the literature, though often under other names or in a more On the Implementation of ProbLog 5 restricted setting; see e.g. (Dantsin 1991; Poole 1993b; Fuhr 2000; Poole 2000; Dalvi and Suciu 2004). 3 Inference in ProbLog This section discusses algorithms for computing exactly or approximately the success and explanation probabilities of ProbLog queries. It additionally contributes a new algorithm for Monte Carlo approximation of success probabilities. 3.1 Exact Inference Calculating the success probability of a query using Equation (4) directly is infeasible for all but the tiniest programs, as the number of subprograms to be checked is exponential in the number of probabilistic facts. However, as we have seen in our example in Section 2, we can describe all subprograms allowing for a specific proof by means of the facts that such a program has to contain, i.e., all the ground probabilistic facts used in that proof. As probabilistic facts correspond to random variables indicating the presence of facts in a sampled program, we alternatively denote proofs by conjunctions of such random variables. In our example, query path(c,d) has two proofs in the full program: {edge(c,d)} and {edge(c,e),edge(e,d)}, or, using logical notation, cd and ce ∧ ed . The set of all subprograms containing some proof thus can be described by a disjunction over all possible proofs, in our case, cd ∨ (ce ∧ ed ). This idea forms the basis for the inference method presented in (De Raedt et al. 2007), which uses two steps: 1. Compute the proofs of the query q in the logical part of the theory T , that is, in BK ∪ LT . The result will be a DNF formula. 2. Compute the probability of this formula. Similar approaches are used for PRISM (Sato and Kameya 2001), ICL (Poole 2000) and pD (Fuhr 2000). The probability of a single given proof, cf. Equation (5), is the marginal over all programs allowing for that proof, and thus equals the product of the probabilities of the facts used by that proof. However, we cannot directly sum the results for the different proofs to obtain the success probability, as a specific subprogram can allow several proofs and therefore contributes to the probability of each of these proofs. Indeed, in our example, all programs that are supersets of {edge(c,e),edge(e,d),edge(c,d)} contribute to the marginals of both proofs and would therefore be counted twice if summing the probabilities of the proofs. However, for mutually exclusive conjunctions, that is, conjunctions describing disjoint sets of subprograms, the probability is the sum of the individual probabilities. This situation can be achieved by adding negated random variables to a conjunction, thereby explicitly excluding subprograms covered by another part of the formula from the corresponding part of the sum. In the example, extending ce ∧ ed to 6 A. KIMMIG et al ?- path(c,d). :- edge(c,d). cd :- edge(d,d). :- edge(c,A),path(A,d). cd ce :- path(d,d). :- path(e,d). :- edge(d,B),path(B,d). :- edge(e,d). :- edge(e,C),path(C,d). ed ed :- path(d,d). :- edge(d,d). :- edge(d,D),path(D,d). Figure 2. SLD-tree for query path(c, d ). ce ∧ ed ∧ ¬cd reduces the second part of the sum to those programs not covered by the first: Ps (path(c, d )|T ) = P (cd ∨ (ce ∧ ed )|T ) = P (cd |T ) + P (ce ∧ ed ∧ ¬cd |T ) = 0. 9 + 0. 8 · 0. 5 · (1 − 0. 9) = 0. 94 However, as the number of proofs grows, disjoining them gets more involved. Consider for example the query path(a,d) which has four different but highly interconnected proofs. In general, this problem is known as the disjoint-sum-problem or the two-terminal network reliability problem, which is #P-complete (Valiant 1979). Before returning to possible approaches to tackle the disjoint-sum-problem at the end of this section, we will now discuss the two steps of ProbLog’s exact inference in more detail. Following Prolog, the first step employs SLD-resolution to obtain all different proofs. As an example, the SLD-tree for the query ?- path(c, d ). is depicted in Figure 2. Each successful proof in the SLD-tree uses a set of ground probabilistic facts {p1 :: c1 , · · · , pk :: ck } ⊆ T . These facts are necessary for the proof, and the proof is independent of other probabilistic facts in T . Let us now introduce a Boolean random variable bi for each ground probabilistic fact pi :: ci ∈ T , indicating whether ci is in a sampled logic program, that is, bi has probability pi of being true.2 A particular proof of query q involving ground facts {p1 :: c1 , · · · , pk :: ck } ⊆ T is thus represented by the conjunctive formula b1 ∧· · ·∧bk , which at the same time represents the set of all subprograms containing these facts. Furthermore, using E (q) to denote the set of proofs or explanations of the goal q, the set of all subprograms containing some proof of q can be denoted 2 For better readability, we do not write substitutions explicitly here. On the Implementation of ProbLog by W e∈E (q) _ V 7 bi , as the following derivation shows:   ^ _ ^ ^  bi = bi ∧ (bi ∨ ¬bi ) ci ∈e e∈E (q) ci ∈e ci ∈e e∈E (q) ci ∈LT \e  _ = _  ^ bi ∧   ci ∈e e∈E (q) L⊆LT \e  ^ ^ bi ∧ ci ∈L ci ∈LT \(L ∪ e)   _ = ^ ^ bi ∧  e∈E (q),L⊆LT \e ci ∈L ∪ e _  ^  L⊆LT ,∃θL ∪ BK |=qθ ¬bi  ci ∈LT \(L ∪ e)  = ¬bi  ci ∈L bi ∧ ^ ¬bi  ci ∈LT \L We first add all possible ways of extending a proof e to a full sampled program by considering each fact not in e in turn. We then note that the disjunction of these fact-wise extensions can be written on the basis of sets. Finally, we rewrite the condition of the disjunction in the terms of Equation (4). This is possible as each subprogram that is an extension of an explanation of q entails some ground instance of q, and vice versa, each subprogram entailing q is an extension of some explanation of q. As the DNF now contains conjunctions representing fully specified programs, its probability is a sum of products, which directly corresponds to Equation (4):   ^ _ ^  P( bi ∧ ¬bi ) L⊆LT ,∃θL ∪ BK |=qθ ci ∈L ci ∈LT \L  = =  Y X  pi · L⊆LT ,∃θL ∪ BK |=qθ ci ∈L X P (L|T ) Y (1 − pi ) ci ∈LT \L L⊆LT ,∃θL ∪ BK |=qθ We thus obtain the following alternative characterisation of the success probability:   _ ^ Ps (q|T ) = P  bi  (7) e∈E (q) ci ∈e where E (q) denotes the set of proofs or explanations of the goal q and bi denotes the Boolean variable corresponding to ground probabilistic fact pi :: ci . Thus, the problem of computing the success probability of a ProbLog query can be reduced to that of computing the probability of a DNF formula. However, as argued above, due to overlap between different conjunctions, the proof-based DNF of Equation (7) cannot directly be transformed into a sum of products. Computing the probability of DNF formulae thus involves solving the disjoint-sum-problem, and therefore is itself a #P-hard problem. Various algorithms have been developed to tackle this problem. The pD-engine HySpirit (Fuhr 2000) 8 A. KIMMIG et al uses the inclusion-exclusion principle, which is reported to scale to about ten proofs. For ICL, which extends PHA by allowing non-disjoint proofs, (Poole 2000) proposes a symbolic disjoining algorithm, but does not report scalability results. Our implementation of ProbLog employs Binary Decision Diagrams (BDDs) (Bryant 1986), an efficient graphical representation of a Boolean function over a set of variables, which scales to tens of thousands of proofs; see Section 4.4 for more details. PRISM (Sato and Kameya 2001) and PHA (Poole 1993b) differ from the systems mentioned above in that they avoid the disjoint-sum-problem by requiring the user to write programs such that proofs are guaranteed to be disjoint. On the other hand, as the explanation probability Px exclusively depends on the probabilistic facts used in one proof, it can be calculated using a simple branchand-bound approach based on the SLD-tree, where partial proofs are discarded if their probability drops below that of the best proof found so far. 3.2 Approximative Inference As the size of the DNF formula grows with the number of proofs, its evaluation can become quite expensive, and ultimately infeasible. For instance, when searching for paths in graphs or networks, even in small networks with a few dozen edges there are easily O(106 ) possible paths between two nodes. ProbLog therefore includes several approximation methods. 3.2.1 Bounded Approximation The first approximation algorithm, a slight variant of the one proposed in (De Raedt et al. 2007), uses DNF formulae to obtain both an upper and a lower bound on the probability of a query. It is closely related to work by (Poole 1993a) in the context of PHA, but adapted towards ProbLog. The method relies on two observations. First, we remark that the DNF formula describing sets of proofs is monotone, meaning that adding more proofs will never decrease the probability of the formula being true. Thus, formulae describing subsets of the full set of proofs of a query will always give a lower bound on the query’s success probability. In our example, the lower bound obtained from the shorter proof would be P (cd |T ) = 0. 9, while that from the longer one would be P (ce ∧ ed |T ) = 0. 4. Our second observation is that the probability of a proof b1 ∧ . . . ∧ bn will always be at most the probability of an arbitrary prefix b1 ∧ . . . ∧ bi , i ≤ n. In our example, the probability of the second proof will be at most the probability of its first edge from c to e, i.e., P (ce|T ) = 0. 8 ≥ 0. 4. As disjoining sets of proofs, i.e., including information on facts that are not elements of the subprograms described by a certain proof, can only decrease the contribution of single proofs, this upper bound carries over to a set of proofs or partial proofs, as long as prefixes for all possible proofs are included. Such sets can be obtained from an incomplete SLD-tree, i.e., an SLD-tree where branches are only extended up to a certain point. This motivates ProbLog’s bounded approximation algorithm. The algorithm relies on a probability threshold γ to stop growing the SLD-tree and thus obtain On the Implementation of ProbLog 9 Algorithm 1 Bounded approximation using iterative deepening with probability thresholds. function Bounds(interval width δp , initial threshold γ, constant β ∈ (0, 1)) d1 = False; d2 = False; P (d1 |T ) = 0; P (d2 |T ) = 1; while P (d2 |T ) − P (d1 |T ) > δp do p =True; repeat Expand current proof p until either p: (a) Fails, in this case backtrack to the remaining choice points; (b) Succeeds, in this case set d1 := d1 ∨ p and d2 := d2 ∨ p; (c) P (p|T ) < γ, in this case set d2 := d2 ∨ p if d2 == False then set d2 = True Compute P (d1 |T ) and P (d2 |T ) γ := γ · β return [P (d1 |T ), P (d2 |T )] DNF formulae for the two bounds3 . The lower bound formula d1 represents all proofs with a probability above the current threshold. The upper bound formula d2 additionally includes all derivations that have been stopped due to reaching the threshold, as these still may succeed. Our goal is therefore to grow d1 and d2 in order to decrease P (d2 |T ) − P (d1 |T ). Given an acceptance threshold δp , an initial probability threshold γ, and a shrinking factor β ∈ (0, 1), the algorithm proceeds in an iterative-deepening manner as outlined in Algorithm 1. Initially, both d1 and d2 are set to False, the neutral element with respect to disjunction, and the probability bounds are 0 and 1, as we have no full proofs yet, and the empty partial proof holds in any model. It should be clear that P (d1 |T ) monotonically increases, as the number of proofs never decreases. On the other hand, as explained above, if d2 changes from one iteration to the next, this is always because a partial proof p is either removed from d2 and therefore no longer contributes to the probability, or it is replaced by proofs p1 , . . . , pn , such that pi = p∧si , hence P (p1 ∨. . .∨pn |T ) = P (p∧s1 ∨. . .∨p∧sn |T ) = P (p∧(s1 ∨. . .∨sn )|T ). As proofs are subsets of the probabilistic facts in the ProbLog program, each literal’s random variable appears at most once in the conjunction representing a proof, even if the corresponding subgoal is called multiple times when constructing the proof. We therefore know that the literals in the prefix p cannot be in any suffix si , hence, given ProbLog’s independence assumption, P (p ∧ (s1 ∨ . . . ∨ sn )|T ) = P (p|T )P (s1 ∨ . . . ∨ sn |T ) ≤ P (p|T ). Therefore, P (d2 ) monotonically decreases. As an illustration, consider a probability threshold γ = 0. 9 for the SLD-tree in 3 Using a probability threshold instead of the depth bound of (De Raedt et al. 2007) has been found to speed up convergence, as upper bounds have been found to be tighter on initial levels. 10 A. KIMMIG et al Figure 2. In this case, d1 encodes the left success path while d2 additionally encodes the path up to path(e, d ), i.e., d1 = cd and d2 = cd ∨ce, whereas the formula for the full SLD-tree is d = cd ∨ (ce ∧ ed ). The lower bound thus is 0. 9, the upper bound (obtained by disjoining d2 to cd ∨ (ce ∧ ¬cd )) is 0. 98, whereas the true probability is 0. 94. Notice that in order to implement this algorithm we need to compute the probability of a set of proofs. This task will be described in detail in Section 4. 3.2.2 K-Best Using a fixed number of proofs to approximate the probability allows better control of the overall complexity, which is crucial if large numbers of queries have to be evaluated, e.g., in the context of parameter learning. (Gutmann et al. 2008) therefore introduces the k -probability Pk (q|T ), which approximates the success probability by using the k -best (that is, the k most likely) explanations instead of all proofs when building the DNF formula used in Equation (7):   _ ^ Pk (q|T ) = P  bi  (8) e∈Ek (q) bi ∈var (e) where Ek (q) = {e ∈ E (q)|Px (e) ≥ Px (ek )} with ek the k th element of E (q) sorted by non-increasing probability. Setting k = ∞ leads to the success probability, whereas k = 1 corresponds to the explanation probability provided that there is a single best proof. The branch-and-bound approach used to calculate the explanation probability can directly be generalized to finding the k -best proofs; cf. also (Poole 1993b). To illustrate k -probability, we consider again our example graph, but this time with query path(a, d ). This query has four proofs, represented by the conjunctions ac ∧ cd , ab ∧ bc ∧ cd , ac ∧ ce ∧ ed and ab ∧ bc ∧ ce ∧ ed , with probabilities 0. 72, 0. 378, 0. 32 and 0. 168 respectively. As P1 corresponds to the explanation probability Px , we obtain P1 (path(a, d )) = 0. 72. For k = 2, the overlap between the best two proofs has to be taken into account: the second proof only adds information if the first one is absent. As they share edge cd , this means that edge ac has to be missing, leading to P2 (path(a, d )) = P ((ac ∧ cd ) ∨ (¬ac ∧ ab ∧ bc ∧ cd )) = 0. 72 + (1 − 0. 8) · 0. 378 = 0. 7956. Similarly, we obtain P3 (path(a, d )) = 0. 8276 and Pk (path(a, d )) = 0. 83096 for k ≥ 4. 3.2.3 Monte Carlo As an alternative approximation technique, we propose a Monte Carlo method, where we proceed as follows. Execute until convergence: 1. Sample a logic program from the ProbLog program 2. Check for the existence of some proof of the query of interest On the Implementation of ProbLog 11 3. Estimate the query probability P as the fraction of samples where the query is provable We estimate convergence by computing the 95% confidence interval at each m samples. Given a large number N of samples, we can use the standard normal approximation interval to the binomial distribution: r P · (P − 1) δ ≈2× N Notice that confidence intervals do not directly correspond to the exact bounds used in our previous approximation algorithm. Still, we employ the same stopping criterion, that is, we run the Monte Carlo simulation until the width of the confidence interval is at most δp . A similar algorithm (without the use of confidence intervals) was also used in the context of biological networks (not represented as Prolog programs) by (Sevon et al. 2006). The use of a Monte Carlo method for probabilistic logic programs was suggested already by (Dantsin 1991), although he neither provides details nor reports on an implementation. Our approach differs from the MCMC method for Stochastic Logic Programs (SLPs) introduced by (Cussens 2000) in that we do not use a Markov chain, but restart from scratch for each sample. Furthermore, SLPs are different in that they directly define a distribution over all proofs of a query. Investigating similar probabilistic backtracking approaches for ProbLog is a promising future research direction. 4 Implementation This section discusses the main building blocks used to implement ProbLog on top of the YAP-Prolog system. An overview is shown in Figure 3, with a typical ProbLog program, including ProbLog facts and background knowledge (BK), at the top. The implementation requires ProbLog programs to use the problog module. Each program consists of a set of labeled facts and of unlabeled background knowledge, a generic Prolog program. Labeled facts are preprocessed as described below. Notice that the implementation requires all queries to non-ground probabilistic facts to be ground on calling. In contrast to standard Prolog queries, where one is interested in answer substitutions, in ProbLog one is primarily interested in a probability. As discussed before, two common ProbLog queries ask for the most likely explanation and its probability, and the probability of whether a query would have an answer substitution. We have discussed two very different approaches to the problem: • In exact inference, k -best and bounded approximation, the engine explicitly reasons about probabilities of proofs. The challenge is how to compute the probability of each individual proof, store a large number of proofs, and compute the probability of sets of proofs. 12 A. KIMMIG et al ProbLog Program Facts Background ProbLog Library Trie2BDD Script Trie Library Queries Array Library Yap Prolog SimpleCUDD Figure 3. ProbLog Implementation: A ProbLog program (top) requires the ProbLog library which in turn relies on functionality from the tries and array libraries. ProbLog queries (bottom-left) are sent to the YAP engine, and may require calling the BDD library CUDD via SimpleCUDD. • In Monte Carlo, the probabilities of facts are used to sample from ProbLog programs. The challenge is how to compute a sample quickly, in a way that inference can be as efficient as possible. ProbLog programs execute from a top-level query and are driven through a ProbLog query. The inference algorithms discussed above can be abstracted as follows: • Initialise the inference algorithm; • While probabilistic inference did not converge: — initialise a new query; — execute the query, instrumenting every ProbLog call in the current proof. Instrumentation is required for recording the ProbLog facts required by a proof, but may also be used by the inference algorithm to stop proofs (e.g., if the current probability is lower than a bound); — process success or exit substitution; • Proceed to the next step of the algorithm: this may be trivial or may require calling an external solver, such as a BDD tool, to compute a probability. Notice that the current ProbLog implementation relies on the Prolog engine to efficiently execute goals. On the other hand, and in contrast to most other probabilistic language implementations, in ProbLog there is no clear separation between logical and probabilistic inference: in a fashion similar to constraint logic programming, probabilistic inference can drive logical inference. From a Prolog implementation perspective, ProbLog poses a number of interesting challenges. First, labeled facts have to be efficiently compiled to allow mutual calls between the Prolog program and the ProbLog engine. Second, for exact inference, k -best and bounded approximation, sets of proofs have to be manipulated and transformed into BDDs. Finally, Monte Carlo simulation requires representing and manipulating samples. We discuss these issues next. On the Implementation of ProbLog 13 4.1 Source-to-source transformation We use the term expansion mechanism to allow Prolog calls to labeled facts, and for labeled facts to call the ProbLog engine. As an example, the program: 0. 715 :: edge(0 PubMed 21968780 ,0 MIM 6090650 ). 0. 659 :: edge(0 PubMed 87645710 ,0 HGNC 50140 ). (9) would be compiled as: edge(A, B) : − problog edge(ID, A, B, LogProb), grounding id(edge(A, B), ID, GroundID), add to proof(GroundID, LogProb). (10) problog edge(0,0 PubMed 21968780 ,0 MIM 6090650 , −0. 3348). problog edge(1,0 PubMed 87645710 ,0 HGNC 50140 , −0. 4166). Thus, the internal representation of each fact contains an identifier, the original arguments, and the logarithm of the probability4 . The grounding id procedure will create and store a grounding specific identifier for each new grounding of a non-ground probabilistic fact encountered during proving, and retrieve it on repeated use. For ground probabilistic facts, it simply returns the identifier itself. The add to proof procedure updates the data structure representing the current path through the search space, i.e., a queue of identifiers ordered by first use, together with its probability. Compared to the original meta-interpreter based implementation of (De Raedt et al. 2007), the main benefit of source-to-source transformation is better scalability, namely by having a compact representation of the facts for the YAP engine (Santos Costa 2007) and by allowing access to the YAP indexing mechanism (Santos Costa et al. 2007). 4.2 Proof Manipulation Manipulating proofs is critical in ProbLog. We represent each proof as a queue containing the identifier of each different ground probabilistic fact used in the proof, ordered by first use. The implementation requires calls to non-ground probabilistic facts to be ground, and during proving maintains a table of groundings used within the current query together with their identifiers. Grounding identifiers are based on the fact’s identifier extended with a grounding number, i.e. 5 1 and 5 2 would refer to different groundings of the non-ground fact with identifier 5. In our implementation, the queue is stored in a backtrackable global variable, which is updated by calling add to proof with an identifier for the current ProbLog fact. We thus exploit Prolog’s backtracking mechanism to avoid recomputation of shared proof prefixes when exploring the space of proofs. Storing a proof is simply a question of adding the value of the variable to a store. As we have discussed above, the actual number of proofs can grow very quickly. 4 We use the logarithm to avoid numerical problems when calculating the probability of a derivation, which is used to drive inference. 14 A. KIMMIG et al ProbLog compactly represents a proof as a list of numbers. We would further like to have a scalable implementation of sets of proofs, such that we can compute the joint probability of large sets of proofs efficiently. Our representation for sets of proofs and our algorithm for computing the probability of such a set are discussed next. 4.3 Sets of Proofs Storing and manipulating proofs is critical in ProbLog. When manipulating proofs, the key operation is often insertion: we would like to add a proof to an existing set of proofs. Some algorithms, such as exact inference or Monte Carlo, only manipulate complete proofs. Others, such as bounded approximation, require adding partial derivations too. The nature of the SLD-tree means that proofs tend to share both a prefix and a suffix. Partial proofs tend to share prefixes only. This suggests using tries to maintain the set of proofs. We use the YAP implementation of tries for this task, based itself on XSB Prolog’s work on tries of terms (Ramakrishnan et al. 1999), which we briefly summarize here. Tries (Fredkin 1962) were originally invented to index dictionaries, and have since been generalised to index recursive data structures such as terms. Please refer to (Bachmair et al. 1993; Graf 1996; Ramakrishnan et al. 1999) for the use of tries in automated theorem proving, term rewriting and tabled logic programs. An essential property of the trie data structure is that common prefixes are stored only once. A trie is a tree structure where each different path through the trie data units, the trie nodes, corresponds to a term described by the tokens labelling the nodes traversed. For example, the tokenized form of the term f (g(a), 1) is the sequence of 4 tokens: f /2, g/1, a and 1. Two terms with common prefixes will branch off from each other at the first distinguishing token. Trie’s internal nodes are four field data structures, storing the node’s token, a pointer to the node’s first child, a pointer to the node’s parent and a pointer to the node’s next sibling, respectively. Each internal node’s outgoing transitions may be determined by following the child pointer to the first child node and, from there, continuing sequentially through the list of sibling pointers. When a list of sibling nodes becomes larger than a threshold value (8 in our implementation), we dynamically index the nodes through a hash table to provide direct node access and therefore optimise the search. Further hash collisions are reduced by dynamically expanding the hash tables. Inserting a term requires in the worst case allocating as many nodes as necessary to represent its complete path. On the other hand, inserting repeated terms requires traversing the trie structure until reaching the corresponding leaf node, without allocating any new node. In order to minimize the number of nodes when storing proofs in a trie, we use Prolog lists to represent proofs. For example, a ProbLog proof [3, 5 1, 7, 5 2] uses ground fact 3, a first grounding of fact 5, ground fact 7 and another grounding of fact 5, that is, list elements in proofs are always either integers or two integers with an underscore in between. Figure 4 presents an example of a trie storing three proofs. Initially, the trie On the Implementation of ProbLog (a) (b) 15 (c) root node root node root node LIST LIST LIST 3 3 3 5_1 5_1 7 7 9 5_2 5_2 END_LIST END_LIST 5_1 4 7 9 7 7 5_2 7 END_LIST 5_2 END_LIST 5_2 END_LIST END_LIST Figure 4. Using tries to store proofs. Initially, the trie contains the root node only. Next, we store the proofs: (a) [3, 5 1, 7, 5 2]; (b) [3, 5 1, 9, 7, 5 2]; and (c) [3, 4, 7]. 0.2 0 0.5 0.1 cd ce 0.8 ed 0.5 0.9 1 Figure 5. Binary Decision Diagram encoding the DNF formula cd ∨ (ce ∧ ed ), corresponding to the two proofs of query path(c,d) in the example graph. An internal node labeled xy represents the Boolean variable for the edge between x and y, solid/dashed edges correspond to values true/false and are labeled with the probability that the variable takes this value. contains the root node only. Next, we store the proof [3, 5 1, 7, 5 2] and six nodes (corresponding to six tokens) are added to represent it (Figure 4(a)). The proof [3, 5 1, 9, 7, 5 2] is then stored which requires seven nodes. As it shares a common prefix with the previous proof, we save the three initial nodes common to both representations (Figure 4(b)). The proof [3, 4, 7] is stored next and we save again the two initial nodes common to all proofs (Figure 4(c)). 4.4 Binary Decision Diagrams To efficiently compute the probability of a DNF formula representing a set of proofs, our implementation represents this formula as a reduced ordered Binary Decision Diagram (BDD) (Bryant 1986), which can be viewed as a compact encoding of a Boolean decision tree. Given a fixed variable ordering, a Boolean function f can be represented as a full Boolean decision tree, where each node on the i th level 16 A. KIMMIG et al Algorithm 2 Translating a trie T representing a DNF to a BDD generation script. Replace(T , C , ni ) replaces each occurence of C in T by ni . function Translate(trie T ) i := 1 while ¬leaf (T ) do S∧ := {(C , P )|C leaf in T and single child of its parent P } for all (C , P ) ∈ S∧ do write ni = P ∧ C T := Replace(T , (C , P ), ni ) i := i + 1 S∨ := {[C1 , . . . , Cn ]| leaves Cj are all the children of some parent P in T } for all [C1 , . . . , Cn ] ∈ S∨ do write ni = C1 ∨ . . . ∨ Cn T := Replace(T , [C1 , . . . , Cn ], ni ) i := i + 1 write top = ni−1 is labeled with the i th variable and has two children called low and high. Leaves are labeled by the outcome of f for the variable assignment corresponding to the path to the leaf, where in each node labeled x , the branch to the low (high) child is taken if variable x is assigned 0 (1). Starting from such a tree, one obtains a BDD by merging isomorphic subgraphs and deleting redundant nodes until no further reduction is possible. A node is redundant if the subgraphs rooted at its children are isomorphic. Figure 5 shows the BDD for the existence of a path between c and d in our earlier example. We use SimpleCUDD5 as a wrapper tool for the BDD package CUDD6 to construct and evaluate BDDs. More precisely, the trie representation of the DNF is translated to a BDD generation script, which is processed by SimpleCUDD to build the BDD using CUDD primitives. It is executed via Prolog’s shell utility, and results are reported via shared files. During the generation of the code, it is crucial to exploit the structure sharing (prefixes and suffixes) already in the trie representation of a DNF formula, otherwise CUDD computation time becomes extremely long or memory overflows quickly. Since CUDD builds BDDs by joining smaller BDDs using logical operations, the trie is traversed bottom-up to successively generate code for all its subtrees. Algorithm 2 gives the details of this procedure. Two types of operations are used to combine nodes. The first creates conjunctions of leaf nodes and their parent if the leaf is a single child, the second creates disjunctions of all child nodes of a node if these child nodes are all leaves. In both cases, a subtree that occurs multiple times in the trie is translated only once, and the resulting BDD is used for all occurrences of that subtree. Because of the optimizations in CUDD, the resulting BDD can have 5 6 http://www.cs.kuleuven.be/~theo/tools/simplecudd.html http://vlsi.colorado.edu/~fabio/CUDD On the Implementation of ProbLog cd ac ab ce bc ed cd ce ed (a) cd ac ab ac ab n1 bc n2 bc cd n1 (b) 17 n3 ab n2 (c) n4 (d) n3 n5 (e) Figure 6. Translating the DNF for path(a,d). Algorithm 3 Calculating the probability of a BDD. function Probability(BDD node n ) If n is the 1-terminal then return 1 If n is the 0-terminal then return 0 let h and l be the high and low children of n prob(h) := call Probability(h) prob(l ) := call Probability(l ) return pn · prob(h) + (1 − pn ) · prob(l ) a very different structure than the trie. The translation for query path(a,d) in our example graph is illustrated in Figure 6, it results in the following script: n1 = ce ∧ ed n2 = cd ∨ n1 n3 = ac ∧ n2 n4 = bc ∧ n2 n5 = ab ∧ n4 n6 = n3 ∨ n5 top = n6 After CUDD has generated the BDD, the probability of a formula is calculated by traversing the BDD, in each node summing the probability of the high and low child, weighted by the probability of the node’s variable being assigned true and false respectively, cf. Algorithm 3. Intermediate results are cached, and the algorithm has a time and space complexity linear in the size of the BDD. For illustration, consider again Figure 5. The algorithm starts by assigning probabilities 0 and 1 to the 0- and 1-leaf respectively. The node labeled ed has probability 0. 5 · 1 + 0. 5 · 0 = 0. 5, node ce has probability 0. 8 · 0. 5 + 0. 2 · 0 = 0. 4; finally, node cd , and thus the entire formula, has probability 0. 9 · 1 + 0. 1 · 0. 4 = 0. 94. 18 A. KIMMIG et al Algorithm 4 Monte Carlo Inference. function MonteCarlo(query q, interval width δp , constant m) c = 0; i = 0; p = 0; δ = 1; while δ > δp do Generate a sample P 0 ; if P 0 |= q then c := c + 1; i := i + 1; if i mod m == 0 then p := c/i q δ := 2 × return p p·(p−1) i 4.5 Monte Carlo The Monte Carlo implementation is shown in Algorithm 4. It receives a query q, an acceptance threshold δp and a constant m determining the number of samples generated per iteration. At the end of each iteration, it estimates the probability p as the fraction of programs sampled over all previous iterations that entailed the query, and the confidence interval width to be used in the stopping criterion as explained in Section 3.2.3. Monte Carlo execution is quite different from the approaches discussed before, as the two main steps are (a) generating a sample program and (b) performing standard refutation on the sample. Thus, instead of combining large numbers of proofs, we need to manipulate large numbers of different programs or samples. Our first approach was to generate a complete sample and to check for a proof. In order to accelerate the process, proofs were cached in a trie to skip inference on a new sample. If no proofs exist on a cache, we call the standard Prolog refutation procedure. Although this approach works rather well for small databases, it does not scale to larger databases where just generating a new sample requires walking through millions of facts. We observed that even in large programs proofs are often quite short, i.e., we only need to verify whether facts from a small fragment of the database are in the sample. This suggests that it may be a good idea to take advantage of the independence between facts and generate the sample lazily: we verify whether a fact is in the sample only when we need it for a proof. YAP represents samples compactly as a three-valued array with one field for each fact, where 0 means the fact was not yet sampled, 1 it was already sampled and belongs to the sample, 2 it was already sampled and does not belong to the sample. In this implementation: 1. New samples are generated by resetting the sampling array. 2. At every call to add to proof, given the current ProbLog literal f : (a) if s[f ] == 0, s[f ] = sample(f ); (b) if s[f ] == 1, succeed; (c) if s[f ] == 2, fail; On the Implementation of ProbLog 19 Note that as fact identifiers are used to access the array, the approach cannot directly be used for non-ground facts. The current implementation of Monte Carlo therefore uses the internal database to store the result of sampling different groundings of such facts. 5 Experiments We performed experiments with our implementation of ProbLog in the context of the biological network obtained from the Biomine project (Sevon et al. 2006). We used two subgraphs extracted around three genes known to be connected to the Alzheimer disease (HGNC numbers 983, 620 and 582) as well as the full network. The smaller graphs were obtained querying Biomine for best paths of length 2 (resulting in graph Small) or all paths of length 3 (resulting in graph Medium) starting at one of the three genes. Small contains 79 nodes and 144 edges, Medium 5220 nodes and 11532 edges. We used Small for a first comparison of our algorithms on a small scale network where success probabilities can be calculated exactly. Scalability was evaluated using both Medium and the entire Biomine network with roughly 1,000,000 nodes and 6,000,000 edges. In all experiments, we queried for the probability that two of the gene nodes mentioned above are connected, that is, we used queries such as path(’HGNC 983’,’HGNC 620’,Path). We used the following definition of an acyclic path in our background knowledge: path(X, Y, A) : − path(X, Y, [X], A), path(X, X, A, A). path(X, Y, A, R) : − X \ == Y, edge(X, Z), absent(Z, A), path(Z, Y, [Z|A], R). (11) As list operations to check for the absence of a node get expensive for long paths, we consider an alternative definition for use in Monte Carlo. It provides cheaper testing by using the internal database of YAP to store nodes on the current path under key visited: memopath(X, Y, A) memopath(X, X, A, A). memopath(X, Y, A, R) : − eraseall(visited), memopath(X, Y, [X], A). : − X \ == Y, edge(X, Z), recordzifnot(visited, Z, ), memopath(Z, Y, [Z|A], R). (12) 20 A. KIMMIG et al 983 − 620 TB P 983 − 582 TB P 620 − 582 TB P path k TP 1 2 4 8 16 32 64 128 256 512 1024 0 0 0 10 0 20 20 50 140 450 1310 13 12 12 12 12 34 74 121 104 118 537 0.07 0.08 0.10 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0.11 0 0 10 0 10 10 10 40 80 370 950 7 6 6 6 6 17 46 161 215 455 494 0.05 0.05 0.06 0.06 0.06 0.07 0.09 0.10 0.10 0.11 0.11 0 0 0 0 0 0 10 20 90 230 920 26 6 6 6 6 7 38 257 246 345 237 0.66 0.66 0.86 0.92 0.92 0.96 0.99 1.00 1.00 1.00 1.00 exact 670 450 0.11 8060 659 0.11 630 721 1.00 TP TP Table 1. k -probability on Small. Finally, to assess performance on the full network for queries with smaller probabilities, we use the following definition of paths with limited length: lenpath(N, X, Y, Path) lenpath(N, X, X, A, A) lenpath(N, X, Y, A, P) :− :− :− lenpath(N, X, Y, [X], Path). N ≥ 0. X\ == Y, N > 0, edge(X, Z), absent(Z, A), NN is N − 1, lenpath(NN, Z, Y, [Z|A], P). (13) All experiments were performed on a Core 2 Duo 2.4 GHz 4 GB machine running Linux. All times reported are in msec and do not include the time to load the graph into Prolog. The latter takes 20, 200 and 78140 msec for Small, Medium and Biomine respectively. Furthermore, as YAP indexes the database at query time, we query for the explanation probability of path(’HGNC 620’,’HGNC 582’,Path) before starting runtime measurements. This takes 0, 50 and 25900 msec for Small, Medium and Biomine respectively. We report TP , the time spent by ProbLog to search for proofs, as well as TB , the time spent to execute BDD programs (whenever meaningful). We also report the estimated probability P . For approximate inference using bounds, we report exact intervals for P , and also include the number n of BDDs constructed. We set both the initial threshold and the shrinking factor to 0. 5. We computed k -probability for k = 1, 2, . . . , 1024. In the bounding algorithms, the error interval ranged between 10% and 1%. Monte Carlo recalculates confidence intervals after m = 1000 samples. We also report the number S of samples used. On the Implementation of ProbLog path δ 0.10 0.05 0.01 983 − 620 TP TB n P 0 48 4 0 71 6 0 83 7 [0.07,0.12] [0.07,0.11] [0.11,0.11] TP 983 − 582 TB n 10 74 6 0 75 6 140 3364 10 P [0.06,0.11] [0.06,0.11] [0.10,0.11] 21 620 − 582 TP TB n P 0 25 2 0 486 4 60 1886 6 [0.91,1.00] [0.98,1.00] [1.00,1.00] Table 2. Inference using bounds on Small. 983 − 620 TP P path δ S 0.10 0.05 0.01 1000 1000 16000 10 10 130 0.11 0.11 0.11 S 983 − 582 TP P 1000 1000 16000 10 10 170 0.11 0.10 0.11 S 620 − 582 TP P 1000 1000 1000 30 20 30 1.00 1.00 1.00 Table 3. Monte Carlo Inference on Small. Small Sized Sample We first compared our algorithms on Small. Table 1 shows the results for k -probability and exact inference. Note that nodes 620 and 582 are close to each other, whereas node 983 is farther apart. Therefore, connections involving the latter are less likely. In this graph, we obtained good approximations using a small fraction of proofs (the queries have 13136, 155695 and 16048 proofs respectively). Our results also show a significant increase in running times as ProbLog explores more paths in the graph, both within the Prolog code and within the BDD code. The BDD running times can vary widely, we may actually have large running times for smaller BDDs, depending on BDD structure. However, using SimpleCUDD instead of the C++ interface used in (Kimmig et al. 2008) typically decreases BDD time by at least one or two orders of magnitude. Table 2 gives corresponding results for bounded approximation. The algorithm converges quickly, as few proofs are needed and BDDs remain small. Note however that exact inference is competitive for this problem size. Moreover, we observe large speedups compared to the implementation with meta-interpreters used in (De Raedt et al. 2007), where total runtimes to reach δ = 0. 01 for these queries were 46234, 206400 and 307966 msec respectively. Table 3 shows the performance of the Monte Carlo estimator. On Small, Monte Carlo is the fastest approach. Already within the first 1000 samples a good approximation is obtained. The experiments on Small thus confirm that the implementation on top of YAPProlog enables efficient probabilistic inference on small sized graphs. Medium Sized Sample For graph Medium with around 11000 edges, exact inference is no longer feasible. Table 4 again shows results for the k -probability. Comparing these results with the corresponding values from Table 1, we observe that the estimated probability is higher now: this is natural, as the graph has both more 22 A. KIMMIG et al 983 − 620 TB P path k TP 1 2 4 8 16 32 64 128 256 512 1024 180 180 180 220 260 710 1540 1680 2190 2650 8100 6 6 6 6 6 6 7 6 7 7 41 0.33 0.33 0.33 0.33 0.33 0.40 0.42 0.42 0.55 0.64 0.70 TP 983 − 582 TB P 1620 1620 1630 1630 1660 1710 1910 2230 2720 3730 5080 6 6 6 6 6 7 6 6 6 7 8 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.30 0.49 0.53 0.56 620 − 582 TB P TP 10 20 10 20 30 110 200 240 290 1310 3070 6 6 6 6 6 6 6 9 196 327 1357 0.92 0.92 0.92 0.92 0.99 1.00 1.00 1.00 1.00 1.00 1.00 Table 4. k -probability on Medium. memo δ S 0.10 0.05 0.01 1000 2000 29000 983 − 620 TP 1180 2320 33220 P S 0.78 0.77 0.77 1000 2000 29000 983 − 582 TP 2130 4230 61140 P S 0.76 0.74 0.77 1000 1000 1000 620 − 582 TP P 1640 1640 1670 1.00 1.00 1.00 Table 5. Monte Carlo Inference using memopath/3 on Medium. nodes and is more connected, therefore leading to many more possible explanations. This also explains the increase in running times. Approximate inference using bounds only reached loose bounds (with differences > 0. 2) on queries involving node ’HGNC 983’, as upper bound formulae with more than 10 million conjunctions were encountered, which could not be processed. The Monte Carlo estimator using the standard definition of path/3 on Medium did not complete the first 1000 samples within one hour. A detailed analysis shows that this is caused by some queries backtracking too heavily. Table 5 therefore reports results using the memorising version memopath/3. With this improved definition, Monte Carlo performs well: it obtains a good approximation in a few seconds. Requiring tighter bounds however can increase runtimes significantly. Biomine Database The Biomine Database covers hundreds of thousands of entities and millions of links. On Biomine, we therefore restricted our experiments to the approximations given by k -probability and Monte Carlo. Given the results on Medium, we directly used memopath/3 for Monte Carlo. Tables 6 and 7 show the results on the large network. We observe that on this large graph, the number of possible paths is tremendous, which implies success probabilities practically equal to 1. Still, we observe that ProbLog’s branch-and-bound search to find the best On the Implementation of ProbLog 983 − 620 TB path k TP 1 2 4 8 16 32 64 128 256 512 1024 5,760 5,800 6,200 7,480 11,470 15,100 53,760 71,560 138,300 242,210 364,490 49 48 48 48 49 49 84 126 277 730 10,597 983 − 582 TB P TP 0.16 0.16 0.16 0.16 0.50 0.57 0.80 0.88 0.95 0.98 0.99 8,910 10,340 13,640 15,550 58,050 106,300 146,380 230,290 336,410 501,870 1,809,680 48 48 48 49 49 49 101 354 520 2,744 100,468 23 620 − 582 TB P TP 0.11 0.17 0.28 0.38 0.53 0.56 0.65 0.76 0.85 0.88 0.93 10 180 360 500 630 2,220 3,690 7,360 13,520 23,910 146,890 48 48 48 48 48 167 167 369 1,106 3,444 10,675 P 0.59 0.63 0.65 0.66 0.92 0.95 0.95 0.98 1.00 1.00 1.00 Table 6. k -probability on Biomine. memo δ S 983 − 620 TP P S 983 − 582 TP P S 620 − 582 TP P 0.10 0.05 0.01 1000 1000 1000 100,700 100,230 93,120 1.00 1.00 1.00 1000 1000 1000 1,656,660 1,671,880 1,710,200 1.00 1.00 1.00 1000 1000 1000 1,696,420 1,690,830 1,637,320 1.00 1.00 1.00 Table 7. Monte Carlo Inference using memopath/3 on Biomine. solutions performs reasonably also on this size of network. However, runtimes for obtaining tight confidence intervals with Monte Carlo explode quickly even with the improved path definition. Given that sampling a program that does not entail the query is extremely unlikely for the setting considered so far, we performed an additional experiment on Biomine, where we restrict the number of edges on the path connecting two nodes to a maximum of 2 or 3. Results are reported in Table 8. As none of the resulting queries have more than 50 proofs, exact inference is much faster than Monte Carlo, which needs a higher number of samples to reliably estimate probabilities that are not close to 1. Altogether, the experiments confirm that our implementation provides efficient inference algorithms for ProbLog that scale to large databases. Furthermore, compared to the original implementation of (De Raedt et al. 2007), we obtain large speedups in both the Prolog and the BDD part, thereby opening new perspectives for applications of ProbLog. 6 Conclusions ProbLog is a simple but elegant probabilistic logic programming language that allows one to explicitly represent uncertainty by means of probabilistic facts denoting 24 A. KIMMIG et al len δ 983 − 620 T S P S 983 − 582 T P S 620 − 582 T P 0.10 0.05 0.01 1000 1000 6000 21,400 19,770 112,740 0.04 0.05 0.04 1000 1000 16000 18,720 20,980 307,520 0.11 0.10 0.11 1000 2000 40000 19,150 35,100 764,700 0.58 0.55 0.55 exact - 477 0.04 - 456 0.11 - 581 0.55 0.10 0.05 0.01 1000 1000 19000 106,730 107,920 2,065,030 0.14 0.14 0.14 1000 2000 37000 105,350 198,930 3,828,520 0.33 0.34 0.35 1000 1000 6000 45,400 49,950 282,400 0.96 0.96 0.96 exact - 9,413 0.14 - 9,485 0.35 - 15,806 0.96 Table 8. Monte Carlo inference for different values of δ and exact inference using lenpath/4 with length at most 2 (top) or 3 (bottom) on Biomine. For exact inference, runtimes include both Prolog and BDD time. independent random variables. The language is a simple and natural extension of the logic programming language Prolog. We presented an efficient implementation of the ProbLog language on top of the YAP-Prolog system that is designed to scale to large sized problems. We showed that ProbLog can be used to obtain both explanation and (approximations of) success probabilities for queries on a large database. To the best of our knowledge, ProbLog is the first example of a probabilistic logic programming system that can execute queries on such large databases. Due to the use of BDDs for addressing the disjoint-sum-problem, the initial implementation of ProbLog used in (De Raedt et al. 2007) already scaled up much better than alternative implementations such as Fuhr’s pD engine HySpirit (Fuhr 2000). The tight integration in YAP-Prolog presented here leads to further speedups in runtime of several orders of magnitude. Although we focused on connectivity queries and Biomine in this work, similar problems are found across many domains; we believe that the techniques presented apply to a wide variety of queries and databases because ProbLog provides a clean separation between background knowledge and what is specific to the engine. As shown for Monte Carlo inference, such an interface can be very useful to improve performance as it allows incremental refinement of background knowledge, e.g., graph procedures. Initial experiments with Dijkstra’s algorithm for finding the explanation probability are very promising. ProbLog is closely related to some alternative formalisms such as PHA and ICL (Poole 1993b; Poole 2000), pD (Fuhr 2000) and PRISM (Sato and Kameya 2001) as their semantics are all based on Sato’s distribution semantics even though there exist also some subtle differences. However, ProbLog is – to the best of the authors’ knowledge – the first implementation that tightly integrates Sato’s original distribution semantics (Sato 1995) in a state-of-the-art Prolog system without On the Implementation of ProbLog 25 making additional restrictions (such as the exclusive explanation assumption made in PHA and PRISM). As ProbLog, both PRISM and the ICL implementation AILog2 use a two-step approach to inference, where proofs are collected in the first phase, and probabilities are calculated once all proofs are known. AILog2 is a meta-interpreter implemented in SWI-Prolog for didactical purposes, where the disjoint-sum-problem is tackled using a symbolic disjoining technique (Poole 2000). PRISM, built on top of B-Prolog, requires programs to be written such that alternative explanations for queries are mutually exclusive. PRISM uses a meta-interpreter to collect proofs in a hierarchical datastructure called explanation graph. As proofs are mutually exclusive, the explanation graph directly mirrors the sum-of-products structure of probability calculation (Sato and Kameya 2001). ProbLog is the first probabilistic logic programming system using BDDs as a basic datastructure for probability calculation, a principle that receives increased interest in the probabilistic logic learning community, cf. for instance (Riguzzi 2007; Ishihata et al. 2008). Furthermore, as compared to SLPs (Muggleton 1995), CLP(BN ) (Santos Costa et al. 2003), and BLPs (Kersting and De Raedt 2008), ProbLog is a much simpler and in a sense more primitive probabilistic programming language. Therefore, the relationship between probabilistic logic programming and ProbLog is, in a sense, analogous to that between logic programming and Prolog. From this perspective, it is our hope and goal to further develop ProbLog so that it can be used as a general purpose programming language with an efficient implementation for use in statistical relational learning (Getoor and Taskar 2007) and probabilistic programming (De Raedt et al. 2008). One important use of such a probabilistic programming language is as a target language in which other formalisms can be efficiently compiled. For instance, it has already been shown that CP-logic (Vennekens et al. 2004), a recent elegant probabilistic knowledge representation language based on a probabilistic extension of clausal logic, can be compiled into ProbLog (Riguzzi 2007) and it is well-known that SLPs (Muggleton 1995) can be compiled into Sato’s PRISM, which is closely related to ProbLog. Further evidence is provided in (De Raedt et al. 2008). Another, related use of ProbLog is as a vehicle for developing learning and mining algorithms and tools (Kimmig et al. 2007; De Raedt et al. 2008; Gutmann et al. 2008; Kimmig and De Raedt 2009; De Raedt et al. 2009). In the context of probabilistic representations (Getoor and Taskar 2007; De Raedt et al. 2008), one typically distinguishes two types of learning: parameter estimation and structure learning. In parameter estimation in the context of ProbLog and PRISM, one starts from a set of queries and the logical part of the program and the problem is to find good estimates of the parameter values, that is, the probabilities of the probabilistic facts in the program. (Gutmann et al. 2008) introduces a gradient descent approach to parameter learning for ProbLog that extends the BDD-based methods discussed here. In structure learning, one also starts from queries but has to find the logical part of the program as well. Structure learning is therefore closely related to inductive logic programming. The limiting factor in statistical relational learning and probabilistic logic learning is often the efficiency of inference, as learning requires repeated computation of the probabilities of many queries. Therefore, 26 A. KIMMIG et al improvements on inference in probabilistic programming implementations have an immediate effect on learning. The above compilation approach also raises the interesting and largely open question whether not only inference problems for alternative formalisms can be compiled into ProbLog but whether it is also possible to compile learning problems for these logics into learning problems for ProbLog. Finally, as ProbLog, unlike PRISM and PHA, deals with the disjoint-sum-problem, it is interesting to study how program transformation and analysis techniques could be used to optimize ProbLog programs, by detecting and taking into account situations where some conjunctions are disjoint. At the same time, we currently investigate how tabling, one of the keys to PRISM’s efficiency, can be incorporated in ProbLog (Mantadelis and Janssens 2009; Kimmig et al. 2009). Acknowledgements We would like to thank Hannu Toivonen, Bernd Gutmann and Kristian Kersting for their many contributions to ProbLog, the Biomine team for the application, and Theofrastos Mantadelis for the development of SimpleCUDD. This work is partially supported by the GOA project 2008/08 Probabilistic Logic Learning. Angelika Kimmig is supported by the Research Foundation-Flanders (FWO-Vlaanderen). Vı́tor Santos Costa and Ricardo Rocha are partially supported by the research projects STAMPA (PTDC/EIA/67738/2006) and JEDI (PTDC/ EIA/66924/2006) and by Fundação para a Ciência e Tecnologia. References Bachmair, L., Chen, T., and Ramakrishnan, I. V. 1993. Associative Commutative Discrimination Nets. In International Joint Conference on Theory and Practice of Software Development. LNCS, vol. 668. Springer, 61–74. Bryant, R. E. 1986. Graph-based algorithms for boolean function manipulation. IEEE Trans. Computers 35, 8, 677–691. Cussens, J. 2000. Stochastic logic programs: Sampling, inference and applications. In Uncertainty in Artificial Intelligence, C. Boutilier and M. Goldszmidt, Eds. Morgan Kaufmann, 115–122. Dalvi, N. N. and Suciu, D. 2004. Efficient query evaluation on probabilistic databases. In International Conference on Very Large Databases, M. A. Nascimento, M. T. Özsu, D. Kossmann, R. J. Miller, J. A. Blakeley, and K. B. Schiefer, Eds. Morgan Kaufmann, 864–875. Dantsin, E. 1991. Probabilistic logic programs and their semantics. In Russian Conference on Logic Programming, A. Voronkov, Ed. LNCS, vol. 592. Springer, 152–164. De Raedt, L., Demoen, B., Fierens, D., Gutmann, B., Janssens, G., Kimmig, A., Landwehr, N., Mantadelis, T., Meert, W., Rocha, R., Santos Costa, V., Thon, I., and Vennekens, J. 2008. Towards Digesting the Alphabet-Soup of Statistical Relational Learning. In NIPS Workshop on Probabilistic Programming. De Raedt, L., Frasconi, P., Kersting, K., and Muggleton, S., Eds. 2008. Probabilistic Inductive Logic Programming - Theory and Applications. LNCS, vol. 4911. De Raedt, L., Kersting, K., Kimmig, A., Revoredo, K., and Toivonen, H. 2008. Compressing probabilistic Prolog programs. Machine Learning 70, 2-3, 151–168. On the Implementation of ProbLog 27 De Raedt, L., Kimmig, A., Gutmann, B., Kersting, K., Santos Costa, V., and Toivonen, H. 2009. Probabilistic inductive querying using ProbLog. Tech. Rep. CW 552, Department of Computer Science, Katholieke Universiteit Leuven. De Raedt, L., Kimmig, A., and Toivonen, H. 2007. ProbLog: A probabilistic Prolog and its application in link discovery. In International Joint Conference on Artificial Intelligence, M. M. Veloso, Ed. 2462–2467. Fredkin, E. 1962. Trie Memory. Communications of the ACM 3, 490–499. Fuhr, N. 2000. Probabilistic Datalog: Implementing logical information retrieval for advanced applications. Journal of the American Society for Information Science (JASIS) 51, 2, 95–110. Getoor, L. and Taskar, B., Eds. 2007. Statistical Relational Learning. The MIT press. Graf, P. 1996. Term Indexing. LNAI, vol. 1053. Springer. Gutmann, B., Kimmig, A., Kersting, K., and De Raedt, L. 2008. Parameter learning in probabilistic databases: A least squares approach. In European Conference on Machine Learning, W. Daelemans, B. Goethals, and K. Morik, Eds. LNCS, vol. 5211. Springer, 473–488. Ishihata, M., Kameya, Y., Sato, T., and ichi Minato, S. 2008. Propositionalizing the EM algorithm by BDDs. In Proceedings of Inductive Logic Programming (ILP 2008), Late Breaking Papers, F. Železný and N. Lavrač, Eds. Prague, Czech Republic, 44–49. Kersting, K. and De Raedt, L. 2008. Basic principles of learning bayesian logic programs. In Probabilistic Inductive Logic Programming, L. De Raedt, P. Frasconi, K. Kersting, and S. Muggleton, Eds. LNCS, vol. 4911. Springer, 189–221. Kimmig, A. and De Raedt, L. 2009. Local query mining in a probabilistic Prolog. In International Joint Conference on Artificial Intelligence, C. Boutilier, Ed. 1095–1100. Kimmig, A., De Raedt, L., and Toivonen, H. 2007. Probabilistic explanation based learning. In European Conference on Machine Learning, J. N. Kok, J. Koronacki, R. L. de Mántaras, S. Matwin, D. Mladenic, and A. Skowron, Eds. LNCS, vol. 4701. Springer, 176–187. Kimmig, A., Gutmann, B., and Santos Costa, V. 2009. Trading memory for answers: Towards tabling ProbLog. In International Workshop on Statistical Relational Learning. Kimmig, A., Santos Costa, V., Rocha, R., Demoen, B., and De Raedt, L. 2008. On the Efficient Execution of ProbLog Programs. In International Conference on Logic Programming, M. G. de la Banda and E. Pontelli, Eds. Number 5366 in LNCS. Springer, 175–189. Lakshmanan, L. V. S., Leone, N., Ross, R. B., and Subrahmanian, V. S. 1997. ProbView: A flexible probabilistic database system. ACM Transactions on Database Systems 22, 3, 419–469. Mantadelis, T. and Janssens, G. 2009. Tabling relevant parts of SLD proofs for ground goals in a probabilistic setting. In International Colloquium on Implementation of Constraint and LOgic Programming Systems. Muggleton, S. 1995. Stochastic logic programs. In Advances in ILP, L. De Raedt, Ed. Poole, D. 1993a. Logic programming, abduction and probability. New Generation Computing 11, 377–400. Poole, D. 1993b. Probabilistic Horn abduction and Bayesian networks. Artificial Intelligence 64, 81–129. Poole, D. 2000. Abducing through negation as failure: stable models within the independent choice logic. Journal of Logic Programming 44, 1-3, 5–35. Ramakrishnan, I. V., Rao, P., Sagonas, K., Swift, T., and Warren, D. S. 1999. 28 A. KIMMIG et al Efficient Access Mechanisms for Tabled Logic Programs. Journal of Logic Programming 38, 1, 31–54. Riguzzi, F. 2007. A top down interpreter for LPAD and CP-logic. In Congress of the Italian Association for Artificial Intelligence (AI*IA), R. Basili and M. T. Pazienza, Eds. LNCS, vol. 4733. Springer, 109–120. Santos Costa, V. 2007. Prolog performance on larger datasets. In Practical Aspects of Declarative Languages, 9th International Symposium, PADL 2007, Nice, France, January 14-15, 2007., M. Hanus, Ed. LNCS, vol. 4354. Springer, 185–199. Santos Costa, V., Page, D., Qazi, M., and Cussens, J. 2003. CLP(BN): constraint logic programming for probabilistic knowledge. In Conference on Uncertainty in Artificial Intelligence, C. Meek and U. Kjærulff, Eds. Morgan Kaufmann, 517–524. Santos Costa, V., Sagonas, K., and Lopes, R. 2007. Demand-driven indexing of prolog clauses. In International Conference on Logic Programming, V. Dahl and I. Niemelä, Eds. LNCS, vol. 4670. Springer, 305–409. Sato, T. 1995. A statistical learning method for logic programs with distribution semantics. In International Conference on Logic Programming, L. Sterling, Ed. MIT Press, 715–729. Sato, T. and Kameya, Y. 2001. Parameter learning of logic programs for symbolicstatistical modeling. Journal of Artificial Intelligence Research (JAIR) 15, 391–454. Sevon, P., Eronen, L., Hintsanen, P., Kulovesi, K., and Toivonen, H. 2006. Link discovery in graphs derived from biological databases. In Data Integration in the Life Sciences, U. Leser, F. Naumann, and B. A. Eckman, Eds. LNCS, vol. 4075. Springer, 35–49. Valiant, L. G. 1979. The complexity of enumeration and reliability problems. SIAM Journal on Computing 8, 3, 410–421. Vennekens, J., Verbaeten, S., and Bruynooghe, M. 2004. Logic programs with annotated disjunctions. In International Conference on Logic Programming, B. Demoen and V. Lifschitz, Eds. LNCS, vol. 3132. Springer, 431–445. Widom, J. 2005. Trio: A system for integrated management of data, accuracy, and lineage. In Conference on Innovative Data Systems Research. 262–276.
6cs.PL
arXiv:1710.01649v1 [math.PR] 4 Oct 2017 A note on parameter estimation for discretely sampled SPDEs Igor Cialenco Yicong Huang [email protected] http://math.iit.edu/~ igor [email protected] Department of Applied Mathematics, Illinois Institute of Technology 10 W 32nd Str, Building REC, Room 208, Chicago, IL 60616, USA First Circulated: October 4, 2017 Abstract: We consider a parameter estimation problem for one dimensional stochastic heat equations, when data is sampled discretely in time or spatial component. We establish some general results on derivation of consistent and asymptotically normal estimators based on computation of the p-variations of stochastic processes and their smooth perturbations. We apply these results to the considered SPDEs, by using some convenient representations of the solutions. For some equations such results were ready available, while for other classes of SPDEs we derived the needed representations along with their statistical asymptotical properties. We prove that the real valued parameter next to the Laplacian, and the constant parameter in front of the noise (the volatility) can be consistently estimated by observing the solution at a fixed time and on a discrete spatial grid, or at a fixed space point and at discrete time instances of a finite interval, assuming that the mesh-size goes to zero. Keywords: p-variation, statistics for SPDEs, discrete sampling, stochastic heat equation, inverse problems for SPDEs, Malliavin calculus. MSC2010: 60H15, 35Q30, 65L09 1 Introduction Consider the following (parabolic) Stochastic Partial Differential Equations (SPDEs) du(t) = (θA1 + A0 )u(t) dt + σ(Mu(t) + g(t)) dW (t) , (1.1) where A0 , A1 , M are some (linear or nonlinear) operators acting in suitable Hilbert spaces, g is an adapted vector-valued function, W is a cylindrical Brownian motion, and θ and σ are unknown parameters (to be estimated) belonging to a subset of real line. Implicitly we will assume that (1.1) is parabolic and admits a unique solution, although usually this has to be established on a case by case basis. Major part of the existing literature on statistical inference for SPDEs (estimating θ and σ) lies within the spectral approach, where it is assumed that one path of the first N Fourier modes of the solution is observed continuously over a finite interval of time. In this case, the coefficient σ can be determine explicitly and exactly, similar to the case of finite dimensional diffusions, by employing quadratic variation type arguments, and due to the fact that a path is observed continuously in time. A general method of estimating θ is to construct Maximum Likelihood Estimators (MLEs) based on the information revealed by the first N Fourier modes, and prove that these estimators satisfy the desired statistical properties, such as consistency, asymptotic normality, and efficiency, as N increases. We refer the reader to the recent monograph [LR17, Chapter 6] for a 1 2 I. Cialenco and Y. Huang comprehensive survey of this method applied to diagonalizable SPDEs. For MLE based estimators applied to nonlinear SPDEs see for instance [CGH11]. For other type of estimators, assuming the same observation scheme, see [CGH16]. Beyond spectral approach, the literature on parameter estimation for SPDEs is limited, and only few papers are devoted to discretely sampled SPDEs [PR97, Mar03, PvsT07]. Of course, one way to deal with discretely sampled data, is to discretize or approximate the MLEs using the available discrete data, and show that the statistical properties are preserved. On the other hand, if we assume that the solution itself is observed at some space-time grid points, one needs to approximate additionally the Fourier modes. To best of our knowledge, a rigourous asymptotic analysis of this idea is still to be done. Finally, it needs to be mentioned, that by its very nature, the Fourier decomposition has to be performed with the respect to the basis formed by the eigenfunctions of the operator A1 . Usually, A1 is a differential operator, and thus essentially one has to deal with bounded domains. The main goal of this notes is to study the parameter estimation problem for simple parabolic SPDEs, when data is sampled discretely. Namely, we consider the stochastic heat equation, one dimensional, driven by an additive or multiplicative space-time noise, either on bounded domain or whole space, and when the solution u is observed at some discrete space-time points. As such, we do not rely on spectral approach, but rather use some suitable representations of the solution to derive the corresponding estimators. The key idea of the proposed method relies on an intuitively simple observation: the p-variation of a stochastic process is invariant with respect to smooth perturbations. Hence, if the p-variation of a process X can be computed by an explicit formula, and the parameter of interest enters non-trivially into this formula, one can derive consistent estimators of this parameter (similar to estimating the volatility through quadratic variation). However, since the p-variation of the perturbed process X + Y remains the same, given that Y is smooth enough, then the same estimator remains consistent assuming that X + Y is observed. Analogous arguments remain valid for asymptotic normality property. See Section 2.1 for the formal result and some simple applications to parameter estimation problems. Thus, it remains to find suitable representations of the solution u as a sum of two processes. In Section 3, we start with the heat equation on the whole real line, and driven by an additive noise. It turns out that for any fixed instance of time t > 0, the solution as a function of x ∈ R can be represented as a scaled two-sided Brownian motion plus a smooth process. Similarly, if we fix a spacial point, then the solution is a smoothly perturbed scaled fractional Brownian motion. We refer to [Kho14, Section 3] for details on these representations. With these at hand, using the p-variation idea described above, both θ and σ can be estimated in either time or space sampling regime. Hence, to construct a consistent, and asymptotically normal estimator for θ or σ it is enough to observe the solution at one time instant and discretely on a spacial grid of a finite interval, with mesh diameters going to zero. By the same token, it is sufficient to observe the solution just at one spacial point, and over a time-grid interval. We focus our study on these two sampling schemes. It should be mentioned that similar estimators, and same sampling schemes were studied in [PvsT07], where the authors considered the heat equation on R driven by a multiplicative noise. The methods of proof in [PvsT07] are different from ours. For the sake of completeness we present some relevant results in Section 5. In Section 4 we investigate the case of bounded domain and additive noise. There are no ready available results on the representations of the solution, and we first establish the corresponding result when time is fixed, which can be easily done via Karhunen–Loève expansion. The case of sampling the solution in time at a fixed spacial point for bounded domains is more delicate. We prove that the solution can be represented as a sum of a smooth process and a zero-mean Gaussian process with known finite fourth variation. Moreover, using some elements of Malliavin calculus, as well as a version of the cental limit theorem from [NOL08], we establish a central limit type theorem for the fourth variation of the solution. Consequently, we derive weakly consistent estimators for 3 Parameter estimation for discretely sampled SPDEs θ and σ, and prove their asymptotic normality. The results on the representation of the solution are of independent interest, and could be used beyond statistical inference problems. It would be fair to note that a similar methodology of using Malliavin calculus technics to establish cental limit theorem can be found in [Cor12], albeit applied to similar processes but with a simpler covariance structure. To streamline the presentation, most of the proofs and some auxiliary technical results are moved to Appendix. Finally, we want to mention that there are many natural questions that are left open, such as: considering more general sampling schemes, by sampling simultaneously in time and space; investigate equations in higher dimensions and of more complicated structure; equations on bounded domains and driven by multiplicative noise; nonlinear equations, etc. Some of these questions will be addressed by the authors in the future works. 2 Setup of the problem Let (Ω, F , {Ft }t≥0 , P) be a stochastic basis satisfying the usual assumptions, and let G be either a bounded smooth domain in R or the whole real line R. We consider the following stochastic partial differential equation on H = L2 (G) du(t, x) = θuxx (t, x) dt + σg(u) dW (t, x), 2 u(0, x) = u0 (x) ∈ L (G), u(t, ·)|∂D = 0, x ∈ G, t > 0, (2.1) t > 0, where W is an H-valued (cylindrical) Brownian motion, g : R → R, and θ, σ are some positive constants. Under some fairly general assumptions on the structure of the noise W , the function g and the parameters θ and σ, the solution to (2.1) exists and is unique [Cho07, LR17]. As usual, everywhere below, all equalities and inequalities between random variables, unless othD erwise noted, will be understood in the P-a.s. sense. The notations − → will be used for convergence P in distribution, while − → or P−lim will stand for convergence in probability. We assume that θ ∈ Θ ⊂ (0, +∞) and σ ∈ S ⊂ (0, +∞) are the (unknown) parameters of interest. In this work we focus on two sampling schemes1 : (A) Fixed time and discrete space. For a fixed instant of time t > 0, and given interval [a, b] ⊂ G, the solution u is observed at points (t, xj ), j = 1, . . . , m, with xj = a + (b − a)j/m, j = 0, 1, . . . , m. (B) Fixed space and discrete time. For a fixed x from the interior of G, and given time interval [c, d] ⊂ (0, +∞), the solution u is observed at points {(ti , x), i = 1, . . . , n}, where ti := c + (d − c)i/n, i = 0, 1, . . . , n. The main goal of this paper is to derive consistent estimators for the parameters θ and σ under these sampling schemes, and to study the asymptotic properties of these estimators. In what follows, we will use the notation Υm (a, b) = {aj | aj = a + (b − a)j/m, j = 0, 1, . . . , m} for the uniform partition of size m of a given interval [a, b] ⊂ R. For a given stochastic process X p on some interval [a, b], and p ≥ 1, we will denote by Vm (X; [a, b]) the sum p Vm (X; [a, b]) := m X j=1 |X(tj ) − X(tj−1 )|p , 1 For simplicity of writing, we assume that the sampling points form a uniform grid. Generally speaking all the results hold true assuming only that the mesh size of the grid goes to zero. 4 I. Cialenco and Y. Huang where tj ∈ Υm (a, b). Correspondingly, p Vp (X; [a, b]) := lim Vm (X; [a, b]), P − a.s., m→∞ p VPp (X; [a, b]) := P− lim Vm (X; [a, b]), m→∞ will denote the p-variation of X on [a, b], in P-a.s. sense and respectively in probability. If no p p confusions arise, we will simply write Vp (X), and Vm (X) instead of Vp (X; [a, b]) and Vm (X; [a, b]); p same applies to VP (X). 2.1 Statistical properties for smoothly perturbed stochastic processes As already mentioned, the estimators proposed in this work are derived using the p-variation of some suitable processes. The next result shows that the ‘quadratic variation type arguments’ of estimating the diffusion coefficient are invariant with respect to smooth perturbations. Proposition 2.1. Let X(t), Y (t), t ∈ [a, b], be stochastic processes with continuous paths, and assume that the process Y has C 1 [a, b] sample paths, and there exists p > 1, such that 0 < Vp (X) < ∞. Then, Vp (X + Y ; [a, b]) = Vp (X; [a, b]). (2.2) Similarly, if 0 < VPp (X) < ∞, then VPp (X + Y ; [a, b]) = VPp (X; [a, b]). (2.3) If in addition, there exist α, σ0 > 0 such that, α + 1/p < 1, D nα (Vnp (X; [a, b]) − Vp (X; [a, b])) −−−→ N (0, σ02 ), n→∞ then D nα (Vnp (X + Y ; [a, b]) − Vp (X; [a, b])) −−−→ N (0, σ02 ). n→∞ (2.4) (2.5) Moreover, if Y has C 2 [a, b] sample paths, and (2.4) holds for p = 2 and α = 1/2, then (2.5) holds true too, with p = 2, α = 1/2. The proof is deferred to Appendix B. This result allows to construct directly consistent and asymptotically normal estimators for some parameter entering the true law of the perturbed process X + Y , given that the p-variation Vp (X; [a, b]) of the unperturbed process X depends non-trivially on the parameter of interest, and this dependence can be computed explicitly. For example, let B be a two-sided Brownian motion, and Y be a process with a C 2 (R) version, and consider the stochastic process p Z(x) = βB(x) + Y (x), x ∈ R, where β is a positive, unknown parameter. Assume that Z is observed at grid points Υm (a, b), for some interval [a, b] ⊂ R. In view of (2.2), p V2 (Z; [a, b]) = V2 ( βB; [a, b]) = β(b − a). Consequently, the estimator m βbm = 1 X (Z(xj ) − Z(xj−1 ))2 , b−a j=1 5 Parameter estimation for discretely sampled SPDEs is a consistent estimator of β, namely limm→∞ βbm = β, P-a.s.. (cf. [Nou08, AES16]) that Moreover, it is well known √ D 2 m(Vm (B, [a, b]) − (b − a)) −−−−→ N (0, 2(b − a)2 ), m→∞ and thus, by Proposition 2.1, the estimator βbm is asymptotically normal, with the convergence √ D m(βbm − β) −−−−→ N (0, 2β 2 ). m→∞ Similarly, let be a fractional Brownian Motion (fBM) with Hurst index H = 41 , and Y be a process with continuously differentiable paths in (0, +∞). Assume that η is the parameter of interest, and suppose that the process BH Z H (t) = η 1/4 B H (t) + Y (t), t > 0. is sampled at grid points ti ∈ Υn (c, d), i = 0, 1, . . . , n, with [c, d] ⊂ (0, ∞). Then, n X 4 1 Z H (ti ) − Z H (ti−1 ) , ηbn = 3(d − c) i=1 is a consistent estimator of η, since an fBM with Hurst index H has a finite, non-zero p = 1/Hvariation. The asymptotic normality of Vn4 (B H ; [c, d]) is established in Theorem A.1, and Corollary A.2, and hence, by (2.5), ηbn is also asymptotically normal, and satisfying √ 1 D n(b ηn − η) −−−→ N (0, σ̌ 2 η 2 ). n→∞ 9 where σ̌ 2 is an explicit constant given in Corollary A.2. 3 Additive noise, whole space In this section, we consider the SPDE (2.1) on the whole space G = R, driven by an additive spacetime white noise, and for simplicity we take zero initial data. Namely, we consider the following evolution equation du(t, x) = θuxx (t, x) dt + σ dW (t, x), u(0, x) = 0, x ∈ R. x ∈ R, t > 0, (3.1) The estimators for θ and σ are obtained by using the following representations (cf. [Kho14, Section 3]) of the solution u of (3.1): (a) For every fixed t > 0, there exist a two-sided Brownian motion B(x) and a Gaussian process X(x) with a C ∞ (R) version, such that σ u(t, x) = √ B(x) + X(x), 2θ x ∈ R. (3.2) (b) For every fixed x ∈ R, there exists a fractional Brownian motion B H (t) with Hurst index H = 1/4 and a Gaussian process Y (t) that is continuous on R+ and infinitely differentiable on (0, ∞), such that u(t, x) = σ B H (t) + Y (t), (θπ)1/4 t > 0. (3.3) 6 I. Cialenco and Y. Huang It turns out that to estimate one of the parameters θ or σ, while the second one is known, it is enough to observe the solution u at one time instant, and at discrete space points with the mesh diameter going to zero. Similarly, it is enough to observe the solution at one fixed spatial point, and at discrete time points in a finite time interval (past initial time) with vanishing step size. These results are proved in the next subsections. 3.1 Space sampling at a fixed time instance Assume that t > 0 is a fixed time instant, and consider the partition Υm (a, b) of the fixed interval [a, b] ⊂ R. Suppose that the solution u of (3.1) is observed at the grid points {(t, xj ) | xj ∈ Υm (a, b), j = 1, . . . , m}. Consider the following estimators for θ and σ 2 respectively θbm,t := 2 σ bm,t := 2 (b − a)σ 2 , 2 j=1 (u(t, xj ) − u(t, xj−1 )) Pm (3.4) m 2θ X (u(t, xj ) − u(t, xj−1 ))2 . b−a (3.5) j=1 Clearly, (3.4) assumes that σ is known, while (3.5) assumes that θ is known. The following results show that these estimators are consistent and asymptotically normal. Theorem 3.1. Assuming that σ is known, the estimator (3.4) of θ is: (i) consistent, that is limm→∞ θbm,t = θ, P − a.s., (ii) asymptotically normal, √ D m(θbm,t − θ) −−−−→ N (0, 2θ 2 ). m→∞ (3.6) Proof. Using the representation (3.2), and in view of Proposition 2.1, consistency of θbm,t follows at once. In addition, we also have that   m 2 X √ (b − a)σ (b − a)2 σ 4 D  −−− m  (u(t, xj ) − u(t, xj−1 ))2 − ). −→ N (0, m→∞ 2θ 2θ 2 j=1 Consequently, a direct application of Delta-Method yields (3.6), and this concludes the proof. Similarly, employing again Proposition 2.1, one has the following result. Theorem 3.2. Assuming that θ is known, the estimator (3.5) is a consistent and asymptotically normal estimator of σ 2 , with √ 3.2 D 2 m(b σm,t − σ 2 ) −−−−→ N (0, 2σ 4 ). m→∞ (3.7) Time sampling at a fixed space point In this section we assume that the solution u of (3.1) is observed at the grid points {(ti , x) : i = 1, . . . , n}, where x ∈ R is a fixed spatial point, and 0 < c < d < ∞. We consider the following 7 Parameter estimation for discretely sampled SPDEs estimators for θ, and σ 2 respectively, 3(d − c)σ 4 Pn , π i=1 (u(ti , x) − u(ti−1 , x))4 v u n u θπ X t (u(ti , x) − u(ti−1 , x))4 . := 3(d − c) θbn,x := 2 σ bn,x (3.8) (3.9) i=1 Similar the previous section, the following results about asymptotic properties of these estimators hold. Theorem 3.3. Given that σ is known, we have that lim θbn,x = θ, n→∞ √ P − a.s. 1 D n(θbn,x − θ) −−−→ N (0, θ 2 σ̌ 2 ). n→∞ 9 Assuming that θ is known, we have that 2 lim σ bn,x = σ2, n→∞ √ P − a.s. D 2 n(b σn,x − σ 2 ) −−−→ N (0, n→∞ 1 4 2 σ σ̌ ). 36 where σ̌ 2 is the constant given in (A.2). The proof is analogous to the proofs of Theorems 3.1 and 3.2 and is omitted here. 4 Additive noise, bounded domain In this section we consider the stochastic evolution equation (2.1) on bounded domain G = [0, π], with zero initial data, zero boundary conditions, and driven by a space-time white noise: du(t, x) = θuxx (t, x) dt + σ dW (t, x), u(0, x) = 0, x ∈ (0, π), u(t, 0) = u(t, π) = 0, x ∈ (0, π), t > 0, (4.1) t > 0, In this case, the Laplace operator ∆ = ∂xx has only discrete p spectrum, with eigenvalues λk = 2/π sin(kx), k ∈ N. Moreover, the −k2 , k ∈ N, and corresponding eigenfunctions hk (x) = functions {hk , k ∈ N} form a complete orthonormal system in L2 (G), and the noise term can be conveniently written as X W (t, x) = wk (t)hk (x), k≥1 where wk , k ∈ N, are independent standard Brownian motions. The solution of this equation admits a Fourier series decomposition, u(t, x) = X k≥1 uk (t)hk (x), t > 0, x ∈ (0, π), 8 I. Cialenco and Y. Huang where each Fourier mode uk (t) is an Ornstein–Uhlenbeck process of the form duk (t) = −θk2 uk (t) dt + σ dwk (t), t > 0, uk (0) = 0. Equivalently, we have that uk (t) = σ −2θk2 t )σ 2 Clearly, uk (t) ∼ N (0, (1−e 2θk2 4.1 Z t e−θk 2 (t−s) dwk (s). (4.2) 0 ), and uk , k ∈ N, are independent random variable. Space sampling at a fixed time instance First we will establish the counterpart of the representation (3.2). Theorem 4.1. For every fixed t > 0, there is a Brownian motion B(x) on [0, π], and a Gaussian process R(x), x ∈ [0, π] with a C ∞ (0, π) version, such that σ u(t, x) = √ B(x) + R(x), 2θ x ∈ [0, π]. Proof. A similar result, left as an exercise, can be found in [Wal86, Exercise 3.10]. For the sake of completeness, we sketch the proof here. It is enough to note that the solution u can be represented, for any t > 0, as σ u(t, x) = √ B(x) + R(x), 2θ where B(x) = ξ0 + ξk = s X1 k≥1 k ξk hk (x), 2θk2 uk (t), (1 − e−2θk2 t )σ 2 σx σ X ak − 1 R(x) = − √ ξk hk (x), ξ0 + √ 2θπ 2θ k≥1 k ak = p 1 − e−2θk2 t . Note that ξk are i.i.d. standard Gaussian random variables. It is easy to check that B is a standard Brownian motion on [0, π], for example by noting that v is the Karhunen–Loève expansion for the Brownian motion, up to some change of variables. It is also straightforward to show that R is smooth. This completes the proof. With this at hand, similar to Theorem 3.1, we have the following result. Theorem 4.2. Let u be the solution to (4.1), and assume that u is sampled at discrete points {(t, xj ) | xj ∈ Υm (a, b)}, for some fixed t > 0 and a, b ∈ (0, π). Then, assuming σ is known, θbm,t given by (3.4) is a consistent and asymptotically normal estimator for θ, satisfying (3.6). 2 in (3.5) is a consistent and asymptotically normal estimator Respectively, if θ is known, then σ bm,t 2 of σ , satisfying (3.7). 9 Parameter estimation for discretely sampled SPDEs 4.2 Time sampling at a fixed space point The case of sampling the solution in time at a fixed spatial point for bounded domains is more delicate, primarily since there is no ready available representation similar to (3.3). In [Wal81] the author proved that for a similar SPDE at x = 0 the 4-variation (in time) of the solution converges to a constant. We start by proving that the 4−variation converges to a constant at any fixed space point x. In addition, we also establish the asymptotic normality property of the 4-variation. Proposition 4.3. Let x ∈ (0, π) be a fixed space point. Then, the solution u(t, x) of the equation (4.1) admits the following decomposition u(t, x) = σ v(t) + S(t), (πθ)1/4 t > 0, (4.3) where v and S are zero-mean Gaussian processes such that: (a) S(t) is continuous on [0, +∞), and infinitely differentiable on (0, ∞); (b) v(t) has finite 4−variation (with convergence in probability) P − lim Vn4 (v; [c, d]) = 3(d − c). (4.4) n→∞ (c) the 4-variation admits the asymptotic normality property   4 √ Vn (v; [c, d]) D − 3 −−−→ N (0, σ̄22 + σ̄42 ), n 4 n→∞ nσn (4.5) where 2 X sin2 (kx) 2 σn2 = √ (1 − e−(d−c)θk /n ), 2 k πθ k≥1 σ̄22 = 72 + 144 lim n→∞ n−1 X j=1 (1 − j F (j) ) | 2 | 2, n σn n−1 X j F (j) (1 − ) | 2 | 4 , n→∞ n σn σ̄42 = 24 + 48 lim j=1 and  1 X sin2 (kx)  −j(d−c)θk2 /n −(j+1)(d−c)θk 2 /n −(j−1)(d−c)θk 2 /n . 2e − e − e F (j) = √ k2 πθ k≥1 Moreover, √ n   πθVn4 (u(·, x); [c, d]) D − 3 −−−→ N (0, σ̄22 + σ̄42 ). n→∞ nσn4 σ 4 (4.6) where σn2 , σ̄22 and σ̄42 are given above. The proof is deferred to the Appendix B. To prove (4.5), we use some techniques from Malliavin calculus (cf. [NOL08]). The general idea of the proof is in line with the proof of the central limit theorem in [Cor12] established for a similar but simpler covariance structure. Next, we present the main results of this subsection on consistency and asymptotic normality of the estimators (3.8) and (3.9). 10 I. Cialenco and Y. Huang Theorem 4.4. Let u be the solution to (4.1), and assume that u is sampled at discrete points {(ti , x) | ti ∈ Υn (c, d)}, for some fixed x ∈ (0, π), and 0 < c < d < ∞. Then, assuming σ is known, θbn,x given by (3.8) is a weakly consistent estimator for θ, that is P− lim θbn,x = θ. (4.7) n→∞ 2 Respectively, if θ is known, then σ bn,x in (3.9) is a weakly consistent estimator of σ 2 . Moreover, 2 θbn,x and σ bn,x satisfy the following central limit type convergence    √ (d − c)θ D b n θn,x − −−−→ N (0, θ 2 σ̄22 + σ̄42 ), (4.8) 4 n→∞ nσn  √ 2   √ nσn 2 1 D 2 √ n σ bn,x − σ −−−→ N (0, σ 4 σ̄22 + σ̄42 ). (4.9) n→∞ 36 d−c Proof. Consistency is a direct consequence of Proposition 4.3.(a)-(b) and (2.3) from Proposition 2.1. Combining (3.8) and (4.6), we have ! √ 3(d − c)θ D n − 3 −−−→ N (0, σ̄22 + σ̄42 ). 4 n→∞ b θn,x nσ n Due to (4.7), and by Slutsky’s theorem, (4.8) follows at once. Relationship (4.9) is proved similarly. This completes the proof. 5 Multiplicative noise, whole space Let us consider the SPDE (2.1), on G = R, and driven by a multiplicative noise: du(t, x) = θuxx (t, x) dt + σu(t, x) dW (t, x), u(0, x) = u0 , x ∈ R. x ∈ R, t > 0, (5.1) The problem of estimating θ and σ for this equation, assuming sampling scheme (A) or (B), have been essentially studied in [PvsT07]. The estimators are similar to those derived above for the additive noise, and for sake of completeness, we present them here too. Assume that the solution u of (5.1) is observed according to sampling scheme (A). Then, given that σ is known, the estimator P 2 (b − a)σ 2 m j=1 u (t, xj ) Pm . θbm,t := 2m j=1 (u(t, xj ) − u(t, xj−1 ))2 is an weakly consistent estimator of θ. Respectively, if θ is known, then P 2 2mθ m j=1 (u(t, xj ) − u(t, xj−1 )) 2 Pm 2 σ bm,t = . (b − a) j=1 u (t, xj ) is an weakly consistent estimator of σ 2 . Analogously, let u being observed by sampling scheme (B), and let P 3(d − c)σ 4 ni=1 u4 (ti , x) b P , θn,x := nπ ni=1 (u(ti , x) − u(ti−1 , x))4 s P nθπ ni=1 (u(ti , x) − u(ti−1 , x))4 2 P σ bn,x := . 3(d − c) ni=1 u4 (ti , x) 11 Parameter estimation for discretely sampled SPDEs Then, assuming that σ is known (resp. θ is known), then estimator θbn,x (resp. θbn,x ) is an weakly consistent estimator of θ (resp. σ 2 ). The asymptotic normality of the estimators in this section remains an open problem. A Appendix A.1 Auxiliary technical results In this section we will provide some technical results used in the paper. Theorem A.1. Let {Xt , t ≥ 0} be a Gaussian process with the following properties t ≥ 0. (i) X0 = 0, and EXt = 0, (ii) Xt+s − Xt ∼ N (0, σ 2 (s)), where σ(s) is a deterministic function of s. law (iii) There exists a constant γ > 0 such that (Xαt , t ≥ 0) = αγ (Xt , t ≥ 0), for any α > 0. (iv) For any t ≥ 0, ∆t > 0, the sequence Xt+n∆t − Xt+(n−1)∆t , n ∈ N is stationary. In particular, −Xn−1 , n ∈ N, is a zero mean and stationary Gaussian sequence with unit variance. Yn = Xn σ(1) (v) Let r be the Pcovariance function of Y , r(n) = EYm Ym+n , and assume that for some positive integer k, n≥1 r k (n) < ∞. Then, n 1 X √ H n j=1   nγ Xj/n − X(j−1)/n ; k σ(1)  D −−−→ σ̌N (0, 1), n→∞ where σ̌ 2 = ∞ X n c2l l!σ̌l2 , n 1 XX l r (|i − j|). n→∞ n σ̌l2 = lim i=1 j=1 l=k Proof. By [BM83, Theorem 1], applied to the sequence Y , we immediately get n 1 X D √ H(Yj ; k) −−−→ σ̌N (0, 1), n→∞ n j=1 where σ̌ 2 = ∞ X l=k n c2l l!σ̌l2 , n 1 XX l r (|i − j|). n→∞ n σ̌l2 = lim i=1 j=1 Since law (Xj/n − X(j−1)/n , j = 1, 2, . . . , n) = 1 (Xj − Xj−1 , j = 1, 2, . . . , n), nγ we conclude that (A.1) holds. The following result is an immediate consequence of Theorem A.1. (A.1) 12 I. Cialenco and Y. Huang Corollary A.2. Let B H be a fractional Brownian motion with Hurst parameter H = 1/4. Then, √ where  D n Vn4 (B H ; [a, b]) − 3(b − a) −−−→ (b − a)σ̌N (0, 1), n→∞ n n 1 XX l r (|i − j|). n→∞ n σ̌ 2 = 72σ̌22 + 24σ̌42 , σ̌l2 = lim (A.2) i=1 j=1 For reader’s convenience we also present here a result from [NOL08], used in the proof of Proposition 4.3. For most of this part, we will use the standard notations from [Nua06] and [NOL08]. We will denote by H(x; k) a polynomial with Hermite rank k, that is, H can be expanded in the form H(x; k) = ∞ X cj Hj (x), j=k where Hj is the jth Hermite polynomial (with leading coefficient 1), and ck 6= 0. Let H be a separable Hilbert space. For every n ≥ 1, the notation H ⊗n will stand for the nth tensor product of H, √ and H ⊙n will denote the nth symmetric tensor product of H, endowed with the modified norm n!k · kH ⊗n . Suppose that X = {X(h), h ∈ H} is an isonormal Gaussian process on H, on some fixed probability space, say (Ω, F , P), and assume that F is generated by X. For every n ≥ 1, let Hn be the nth Wiener chaos of X, that is, the closed linear subspace of L2 (Ω, F, P) generated by the random variables {Hn (X(h)), h ∈ H, khkH = 1}, where Hn is the nth Hermite polynomial. We denote by H0 the space of constant random variables. The mapping In (h⊗n ) = Hn (X(h)), for n ≥ 1, provides a linear isometry between H ⊙n and Hn . For n = 0, we have that H0 = R, and take I0 to be the identity map. It is well known that any square intergrable random variable F ∈ L2 (Ω, F , P) admits the following expansion F = ∞ X In (fn ), n=0 where f0 = EF , and the fn ∈ H ⊙n are uniquely determined by F . Let {ek , k ≥ 1} be a complete orthonormal system in H. Given f ∈ H ⊙n and g ∈ H ⊙m , for ℓ = 0, . . . , n ∧ m, the contraction of f and g of order ℓ is the element of H ⊗(n+m−2ℓ) defined by X f ⊗ℓ g = hf, ei1 ⊗ · · · ⊗ eiℓ iH ⊗l ⊗ hg, ei1 ⊗ · · · ⊗ eiℓ iH ⊗l i1 ,...,iℓ Theorem A.3 ([NOL08]). For d ≥ 2, fix d natural numbers 1 ≤ n1 ≤ · · · ≤ nd . Let {Fk }k∈N be a sequence of random vectors of the form Fk = (Fk1 , . . . , Fkd ) = (In1 (fk1 ), . . . , Ind (fkd )), where fki ∈ H ⊙ni and Ini is the Wiener integral of order ni , such that, for every 1 ≤ i, j ≤ d, i h (A.3) lim E Fki Fkj = δij . k→∞ The following two2 statements are equivalent. 2 The original result [NOL08, Theorem 7] contains six equivalent conditions; we list only those two that we use in this paper. 13 Parameter estimation for discretely sampled SPDEs (i) (i) (N1) For all 1 ≤ i ≤ d, 1 ≤ ℓ ≤ ni − 1, kfk ⊗ℓ fk k2H 2⊗(ni −ℓ) → 0, as k → ∞. (N2) The sequence {Fk }k∈N , as k → ∞, converges in distribution to a d-dimensional standard Gaussian vector Nd (0, Id ). We conclude this section with a result used to obtain the exact rates of convergence of some estimators from Section 4.2. Lemma A.4. For any x ∈ (0, π) and θ > 0, the following holds true  √πθ √ X sin2 (kx)  −θk 2 /n . = 1−e lim n n→∞ k2 2 (A.4) k≥1 Proof. Note that sin2 (kx) = 1 sin((2k + 1)x) − sin((2k − 1)x) − , 2 4 sin x and therefore,  √ X sin2 (kx)  −θk 2 /n 1 − e n k2 k≥1   √ X sin((2k + 1)x) − sin((2k − 1)x)  √ X 1  −θk 2 /n −θk 2 /n 1 − e − 1 − e n n 2k2 4k2 sin x =: k≥1 L1n − k≥1 L2n . √ To prove (A.4), we will show that L1n → πθ/2, and L2n → 0. It is straightforward to check that for any ε > 0, the function (1 − e−ǫx )/x, x > 0, is decreasing. It is also easy to show that Z ∞ 2 √ 1 − e−z dz = π. 2 z 0 Using these, we obtain L1n Z   √ X k 1  1  −θk 2 /n −θz 2 /n dz ≤ dz 1 − e 1 − e n 2k2 2z 2 k≥1 k−1 k≥1 k−1 √ Z ∞ √ Z ∞  p  1  1  n n −y 2 −θz 2 /n dy n/θ 1 − e dz = 1 − e = 2 0 z2 2 0 y 2 n/θ √ Z ∞ √  θ πθ 1  −y 2 = dy = . 1−e 2 2 0 y 2 √ X = n Z k (A.5) On the other hand, L1n Z √ X = n Z   √ X k+1 1  1  −θk 2 /n −θz 2 /n dz ≥ dz 1 − e 1 − e n 2k2 2z 2 k≥1 k k≥1 k √ Z ∞ √ Z ∞  p  n n 1  1  −y 2 −θz 2 /n = dy n/θ 1 − e dz = 1 − e √ 2 2 1 z2 2 θ/n y n/θ √ Z ∞ √  θ 1  πθ −y 2 = . dy −→ 1−e √ 2 n→∞ 2 2 θ/n y k+1 (A.6) 14 I. Cialenco and Y. Huang Combing (A.5) and (A.6), we conclude that L1n → Denote by 1 − e−θk fk := k2 √ πθ/2. 2 /n , k ≥ 1, and as above, one can show that {fk , k ∈ N} is a decreasing sequence. By simple rearrangement of terms, we get √ √ X sin((2k − 1)x) (fk−1 − fk ) − n sin xf1 . Ln2 = n k≥2 Thus, |L2n | ≤ √ X n k≥2 sin((2k − 1)x) (fk−1 − fk ) + √ n sin xf1  √ X √ √ √  ≤ n (fk−1 − fk ) + nf1 ≤ 2 nf1 = 2 n 1 − e−θ/n k≥2 √ θ θ ≤ 2 n = 2 √ −→ 0. n n n→∞ The proof is complete. B Proofs Proof of Proposition 2.1 First we prove (2.2). It should be noted that a similar result is proved in [CNW06, Corollary 2]. For completeness, we outline out proof too. All ‘p-variations’ below are on the fixed interval [a, b], and as agreed above, we will omit writing their dependence on [a, b]. By Minkowski’s inequality, we have that | (Vnp (X))1/p − (Vnp (Y ))1/p | ≤ (Vnp (X + Y ))1/p ≤ (Vnp (X))1/p + (Vnp (Y ))1/p . (B.1) Since Y has C 1 [a, b] sample paths, we have limn→∞ Vnp (Y ) = 0. Hence, passing to the limit in (B.1), the identity (2.2) follows. As far as (2.3), note that in view of (B.1), for any ǫ > 0, n o (Vnp (X + Y ))1/p − (VPp (X))1/p ≥ ǫ n o n o 1/p 1/p = (Vnp (X + Y ))1/p ≥ VPp (X) + ǫ ∪ (Vnp (X + Y ))1/p ≤ VPp (X) −ǫ n o 1/p ⊂ (Vnp (X))1/p + (Vnp (Y ))1/p ≥ VPp (X) +ǫ n o 1/p ∪ (Vnp (X))1/p − (Vnp (Y ))1/p ≤ VPp (X) −ǫ n o 1/p ⊂ (Vnp (X))1/p + (Vnp (Y ))1/p − VPp (X) ≥ǫ n o 1/p ∪ (Vnp (X))1/p − (Vnp (Y ))1/p − VPp (X) ≥ǫ n o n o 1/p = (Vnp (X))1/p − VPp (X) ≥ ǫ/2 ∪ (Vnp (Y ))1/p ≥ ǫ/2 (B.2) 15 Parameter estimation for discretely sampled SPDEs Due to continuity of x1/p , based on our initial assumptions, we have that P − limn→∞ (Vnp (X)) 1/p 1/p , and P − limn→∞ (Vnp (Y )) = 0. Thus, by (B.2), we get at once that VPp (X) 1/p , P − lim (Vnp (X + Y ))1/p = VPp (X) 1/p = n→∞ which consequently implies (2.3). In view of Slutsky’s Theorem, to prove (2.5), it is enough to show that lim nα (Vnp (X + Y ) − Vnp (X)) = 0. n→∞ By (B.1) and by mean-value theorem, we have p  Vnp (X + Y ) ≤ (Vnp (X))1/p + (Vnp (Y ))1/p p−1  = Vnp (X) + p (Vnp (X))1/p + η1,n (Vnp (Y ))1/p (Vnp (Y ))1/p , (B.3) for some η1,n ∈ [0, 1]. Since Y has C 1 [a, b] sample paths, denoting M = supa≤t≤b | Y ′ (t) | , and again by mean-value theorem, we get Vnp (Y )= n X j=1 p |Y (tj ) − Y (tj−1 )| = n X j=1 |(tj − tj−1 )Y ′ (ζj )|p ≤ n(M/n)p . (B.4) Therefore, by (B.3), and since α + 1/p < 1, we conclude that p−1  nα (Vnp (X + Y ) − Vnp (X)) ≤ p (Vnp (X))1/p + η1 (Vnp (Y ))1/p nα+1/p−1 M −→ 0. n→∞ Similarly, we have that p−1  nα (Vnp (X + Y ) − Vnp (X)) ≥ −p (Vnp (X))1/p − η2 (Vnp (Y ))1/p nα+1/p−1 M −→ 0, n→∞ and therefore, (2.5) is proved. Now suppose that Y has C 2 [a, b] sample paths, and assume that (2.4) holds true for p = 2, α = 1/2. To show that (2.5) also holds true, it is enough to prove that  lim n1/2 Vn2 (X + Y ) − Vn2 (X) = 0. (B.5) n→∞ Note that, Vn2 (X + Y ) − Vn2 (X) = 2 n X j=1 (X(tj ) − X(tj−1 )) (Y (tj ) − Y (tj−1 )) + Vn2 (Y ). Using (B.4), we have n1/2 Vn2 (Y ) ≤ n3/2 (M/n)2 → 0. By mean value theorem, n 1/2 n X j=1 (X(tj ) − X(tj−1 )) (Y (tj ) − Y (tj−1 )) = n −1/2 (b − a) n X i=1  (X(tj ) − X(tj−1 )) Y ′ (ζj ) − Y ′ (tj−1 ) + n−1/2 (b − a) =: K1 + K2 . n X i=1 (X(tj ) − X(tj−1 )) Y ′ (tj−1 ) 16 I. Cialenco and Y. Huang Applying Cauchy-Schwartz inequality, we get |K1 | ≤ n−3/2 (b − a)2 n X i=1 (X(tj ) − X(tj−1 )) max | Y ′′ (t) | a≤t≤b ≤ n−1 (b − a)2 max | Y ′′ (t) | a≤t≤b We rewrite K2 as p  Vn2 (X) −→ 0. n→∞ K2 = n−1/2 (b − a) X(b)Y ′ (b) − X(a)Y ′ (a) − Since, limn→∞ that Pn j=1 X(tj ) (Y ′ (t j) − Y ′ (tj−1 )) = Rb a n X j=1   X(tj ) Y ′ (tj ) − Y ′ (tj−1 )  . X(t)dY ′ (t) = Rb a X(t)Y ′′ (t)dt, we have at once   Z b X(t)Y ′′ (t)dt = 0. lim K2 = lim n−1/2 (b − a) X(b)Y ′ (b) − X(a)Y ′ (a) − n→∞ n→∞ a Combining the above, (B.5) is proved. This concludes the proof. Proof of Proposition 4.3 Assume that x ∈ (0, π) is fixed. We start by constructing the Gaussian processes S, v. Let {ηk , k ∈ N} be a sequence of i.i.d. standard normal random variables, independent of {uk , k ∈ N}, and let σ −θk2 t e ηk , 2θk ∞ X S(t) := Sk (t)hk (x), Sk (t) := √ k=1 k ∈ N, t ≥ 0, t ≥ 0. Consequently, we put (θπ)1/4 (uk (t) − Sk (t)) , k ∈ N, t ≥ 0, Xσ v(t) := vk (t)hk (x), t ≥ 0, x ∈ (0, π). vk (t) := k≥1 Clearly, S and v are zero-mean Gaussian processes that satisfying (4.3). (a) It is straightforward to check that S is continuous on [0, +∞)] and infinitely differentiable on (0, ∞). Moreover, E |Sk (t + ǫ) − Sk (t)|2 = 2 σ 2 −2θk2 t  −θk 2 ǫ 1 − e , e 2θk2 k ∈ N, t ≥ 0. (B.6) (b) By direct computations, using (4.2), one can show that E |uk (t + ǫ) − uk (t)|2 =   σ2 −θk 2 ǫ −θk 2 ǫ −2θk 2 t , (1 − e ) 2 − (1 − e )e 2θk2 (B.7) 17 Parameter estimation for discretely sampled SPDEs for t ≥ 0, ε > 0, k ∈ N. Combining (B.6), (B.7) and the independence between Sk and uk , we deduce that √ 2 π 2 (1 − e−θk ǫ ), k ∈ N, t ≥ 0. E |vk (t + ǫ) − vk (t)| = √ 2 θk Consequently, we have that E |v(t + ǫ) − v(t)|2 = X 2 X sin2 (kx) 2 (1 − e−θk ǫ ). E |vk (t + ǫ) − vk (t)|2 h2k (x) = √ 2 k πθ k≥1 k≥1 We will prove (4.4) by showing that  lim E Vn4 (v; [c, d]) = 3(d − c), n→∞  lim Var Vn4 (v; [c, d]) = 0. (B.8) (B.9) n→∞ Denote by 2 X sin2 (kx) 2 σn2 := E |v(tj ) − v(tj−1 )|2 = √ (1 − e−(d−c)θk /n ), 2 k πθ k≥1 n ∈ N. In view of Lemma A.4, lim n→∞ √ nσn2 = √ d − c. (B.10) Since v is a zero-mean Gaussian process, we have 2  E |v(tj ) − v(tj−1 )|4 = 3 E |v(tj ) − v(tj−1 )|2 = 3σn4 , therefore lim E n→∞  Vn4 (v; [c, d]) = lim n→∞ n X j=1 E |v(tj ) − v(tj−1 )|4 = lim 3nσn4 = 3(d − c), n→∞ and hence (B.8) is proved. Next, note that  2 Var Vn4 (v; [c, d]) = E Vn4 (v; [c, d]) − E Vn4 (v; [c, d]) n 2  X E |v(tj , x) − v(tj−1 , x)|4 − 3σn4 = j=1 +2 X i<j    E |v(ti , x) − v(ti−1 , x)|4 − 3σn4 |v(tj , x) − v(tj−1 , x)|4 − 3σn4 =: J1 + J2 . According to (B.10), we deduce that J1 = n X j=1   E |v(tj , x) − v(tj−1 , x)|8 − 9nσn8 = 96nσn8 −→ 0. n→∞ (B.11) 18 I. Cialenco and Y. Huang As far as J2 , for j ≥ 1, we put F (j) := E (v(ti , x) − v(ti−1 , x)) (v(ti+j , x) − v(ti+j−1 , x))  1 X sin2 (kx)  −j(d−c)θk2 /n −(j+1)(d−c)θk 2 /n −(j−1)(d−c)θk 2 /n 2e − e − e =√ k2 πθ k≥1 = Gj − Gj−1 , where  1 X sin2 (kx)  −j(d−c)θk2 /n −(j+1)(d−c)θk 2 /n , e − e Gj := √ k2 πθ k≥1 j ≥ 0, and also put F (0) := σn2 . Since F (j) < 0, we have that Gj < Gj−1 . Using the property of joint normal distributions, we continue   X  J2 = 2 E |v(ti , x) − v(ti−1 , x)|4 − 3σn4 |v(tj , x) − v(tj−1 , x)|4 − 3σn4 i<j =2 X i<j  24F 4 (j − i) + 72F 2 (j − i)σn4 . From here, since |F (j − i)| ≤ σn2 , we deduce that X X  J2 ≤ 2 24|F (j − i)|σn6 + 72|F (j − i)|σn6 = 192 |F (j − i)|σn6 i<j i<j = 192σn6 n−1 X j=1 Note that Pn−1 j=1 (n (n − j) (Gj−1 − Gj ) . − j) (Gj−1 − Gj ) = nG0 − n−1 X j=0 Pn−1 j=0 Gj , and since  1 X sin2 (kx)  −j(d−c)θk2 /n −(j+1)(d−c)θk 2 /n √ e − e k2 πθ k≥1 j=0  1 1 X sin2 (kx)  −(d−c)θk 2 =√ = σ12 , 1 − e k2 2 πθ Gj = n−1 X k≥1 and G0 = 21 σn2 , we conclude that       2 2 X X 1 2 1 2 sin (kx) sin (kx) J2 ≤ 192σn6 n √ 1 − e−(d−c)θk /n − √ 1 − e−(d−c)θk  2 2 k k πθ k≥1 πθ k≥1   n 2 1 2 n→∞ σ − σ = 192σn6 −→ 0. (B.12) 2 n 2 1 according to (B.10). Combining (B.11) and (B.12), (B.9) is proved. Consequently, by (B.8) and (B.9), we also have that Vn4 (v; [c, d]) converges to 3(d − c), both in L2 and in probability. (c) We will apply Theorem A.3, by showing that (A.3) and along with condition (N1) are satisfied. We begin by establishing the following estimates r X j=−l |F (|j|)| m ≤ 2σn2m , (B.13) 19 Parameter estimation for discretely sampled SPDEs for any m ≥ 1, ℓ, r ∈ N. Since m ≥ 1, r X j=1 r X |F (j)|m = j=1 r X = j=1 |F (j)|m−1 |F (j)| ≤ r X j=1 σn2(m−1) |F (j)| σn2(m−1) (Gj−1 − Gj ) = σn2(m−1) (G0 − Gr−1 ) 1 ≤ σn2(m−1) G0 = σn2m , 2 where we used the fact that Gj ≥ 0 and G0 = 12 σn2 . Therefore, r X j=−l |F (|j|)|m = (σn2 )m + r X j=1 |F (j)|m + l X j=1 |F (j)|m 1 1 ≤ σn2m + σn2m + σn2m = 2σn2m . 2 2 With slight abuse of notations, just in this proof, we denote by ∆vjn := v(tj , x) − v(tj−1 , x). Let H ∆vn be the closed subspace of L2 (Ω, F, P) generated by the random variables σnj , 1 ≤ j ≤ n; j, n ∈ N. Then, ! ! ∆vjn 4 ∆vjn 2 ∆vjn 2 ∆vjn 4 −3= −6 +3 +6 −1 σn σn σn σn " "  n  #  #  n ∆vj ∆vjn ⊗2 ∆vjn ⊗4 ∆vj = H4 + 6I2 . + 6H2 = I4 σn σn σn σn Therefore, √ n  Vn4 (v; [c, d]) nσn4 Let      ⊗4 ⊗2 n  n  n n X X ∆vj ∆vj 1  + I2  √6  − 3 = I4  √ n σn n σn j=1 n fn(2) 6 X := √ n j=1  ∆vjn σn ⊗2 n , (B.14) j=1 fn(4) 1 X := √ n j=1  ∆vjn σn ⊗4 , (B.15)   (2) (4) and consider the sequence of two dimensional random vectors Fn := I2 (fn ), I4 (fn ) , n ∈ N, to which we will apply Theorem A.3. Using the properties of Wiener integral, we obtain that   lim E I2 (fn(2) )I4 (fn(4) ) = 0, n→∞ and hence (A.3) is satisfied. Next, we move to verification of condition (N1), which in this case becomes lim kfn(m) ⊗r fn(m) k2H 2⊗(m−r) = 0. n→∞ for m = 2, 4, and 1 ≤ r ≤ m − 1. (B.16) 20 I. Cialenco and Y. Huang Using the linearity of the inner products and the properties of the tensor products of Hilbert spaces, we obtain ⊗2 X  n  n   2 ∆vjn ⊗2 E 72 D X ∆vjn , E I2 (fn(2) ) = 2hfn(2) , fn(2) iH⊗2 = n σn σn H⊗2 j=1 j=1  n ⊗2 E   n n ∆vj 72 X D ∆vin ∆vjn E2 72 X D ∆vin ⊗2 = , , = n σn σn n σn σn H H⊗2 i,j=1 i,j=1 n   n n 2 72 X 72 X |F (|j − i|)|2 ∆vin ∆vj = = · E n σn σn n σn4 i,j=1 i,j=1     n−1 n X X X 72  72  4 = (n − j)|F (j)|2  |F (0)|2 + 2 |F (j − i)|2  = nσn + 2 4 nσn nσn4 j=1 = 72 + j=1 i<j n−1 n−1 X j F (j) j 144 X 2 (1 − ) (1 − )|F (j)| = 72 + 144 4 σn n n σn2 2 . j=1 j=1 In view of (B.13), we have that n−1 X j=1 (1 − j F (j) ) n σn2 2 ≤ ∞ X F (j) σn2 j=1 2 < ∞, and thus σ̄22 n−1  2 X j F (j) (2) (1 − ) := lim E I2 (fn ) = 72 + 144 lim n→∞ n→∞ n σn2 2 < ∞. j=1 Similarly, ⊗4 X  n  n  ∆vjn ⊗4 E 24 D X ∆vjn = , n σn σn H⊗4 H⊗4 j=1 j=1  n ⊗4 E   n n ∆vj 24 X D ∆vin ∆vjn E4 24 X D ∆vin ⊗4 , , = = n σn σn n σn σn H H⊗4 i,j=1 i,j=1 4 n   n n n X X 24 24 |F (|j − i|)|4 ∆vi ∆vj = · = E n σn σn n σn8 E  2 D E I4 (fn(4) ) = 24 fn(4) , fn(4) i,j=1 ≤ 24 + 48 i,j=1 n−1 X j=1 F (j) σn2 4 ≤ 24 + 48 ∞ X j=1 F (j) σn2 4 < ∞, and consequently, σ̄42 n−1  2 X j F (j) (4) (1 − ) := lim E I4 (fn ) = 24 + 48 lim n→∞ n→∞ n σn2 j=1 4 < ∞. 21 Parameter estimation for discretely sampled SPDEs Let a2 = 6, a4 = 1. Then,  ⊗m n  ∆vjn ⊗m am X ∆vjn ⊗r √ k2H ⊗2(m−r) σn n σn j=1 j=1     n ⊗m ∆vjn ⊗m 2 a2 X ∆vin ⊗r kH ⊗2(m−r) =k m n σn σn i,j=1  n ⊗(m−r)   n 2 ∆vj am X ∆vin ∆vjn r ∆vin ⊗(m−r) ⊗ k2H ⊗2(m−r) , =k H n σn σn σn σn i,j=1   n ⊗(m−r)  n ∆vj a2m X |F (|j − i|)|r ∆vin ⊗(m−r) ⊗ k2H ⊗2(m−r) =k 2r n σn σn σn n kfn(m) ⊗r fn(m) k2H 2⊗(m−r) am X = k√ n  i,j=1 = n X a4m |F (|j n2 σn4m ′ ′ i,j,i ,j =1 ≤ a4m n2 σn4m = a4m n2 σn8 n X i,j,i′ ,j ′ =1 n X i,j,i′ ,j ′ =1 − i|)|r |F (|j ′ − i′ |)|r |F (|i′ − i|)|m−r |F (|j ′ − j|)|m−r F (|j − i|)F (|j ′ − i′ |)F (|i′ − i|)F (|j ′ − j|) σn4m−8 F (|j − i|)F (|j ′ − i′ |)F (|i′ − i|)F (|j ′ − j|) = O1 + 2O2 , where O1 := O2 := n n a4m X X n2 σn8 ′ ′ i ,j =1 i=1 n 4 am X X n2 σn8 ′ ′ i ,j =1 i<j F (0)F (|j ′ − i′ |)F (|i′ − i|)F (|j ′ − i|) , F (|j − i|)F (|j ′ − i′ |)F (|i′ − i|)F (|j ′ − j|) . First note that, by direct computations and using (B.13), we have O1 = n n a4m X X n2 σn6 ′ ′ i ,j =1 i=1 ≤ ≤ F (|j ′ − i′ |)F (|i′ − i|)F (|j ′ − i|) n n F (|i′ − i|)2 + F (|j ′ − a4m X X ′ ′ | F (|j − i |) | n2 σn6 ′ ′ 2 i ,j =1 i=1 n n a4m X 2a4m X 2σn4 + 2σn4 ′ ′ ≤ 2 2 | F (|j − i |) | n2 σn6 ′ ′ 2 n σn ′ ′ i ,j =1 i ,j =1   n X 2a4m X |F (0)| + 2 | F (j − i) |  ≤ 2 2 n σn j=1 ≤ i|)2 | F (|j ′ − i′ |) | i<j n−1 n−1 2a4 4a4 X 4a4 X j F (j) 2a4m (n − j) | F (j) | = m + m + 2 m2 (1 − ) | 2 | n n σn n n n σn −→ 0. n→∞ j=1 j=1 22 I. Cialenco and Y. Huang Similarly, O2 = n n−1 n−i a4m X X X n2 σn8 ′ ′ i ,j =1 i=1 k=1 = n n−1 n−i a4m X X X n2 σn8 ′ ′ i ,j =1 i=1 k=1 ≤ ≤ n n−1 n−i a4m X X X n2 σn8 ′ ′ i ,j =1 i=1 k=1 n n−1 2a4m X X n2 σn4 ′ ′ i ,j =1 i=1 −→ 0. F (|i + k − i|)F (|j ′ − i′ |)F (|i′ − i|)F (|j ′ − i − k|) F (k)F (|j ′ − i′ |)F (|i′ − i|)F (|j ′ − i − k|) F (|j ′ − i′ |)F (|i′ − i|) F (|j ′ − i′ |)F (|i′ − i|) ≤ F (k)2 + F (|j ′ − i − k|)2 2 n 4a4m X n2 σn2 ′ ′ i ,j =1 F (|j ′ − i′ |) n→∞ Thus, (B.16) holds true. Therefore, (N2) from Theorem A.3 holds true, namely, we have that    σ̄22 0 D Fn −−−→ N 0, . (B.17) n→∞ 0 σ̄42 Consequently, (4.5) follows from (B.14),(B.15) and (B.17). Finally, (4.5) implies (4.6), by using that   √ πθVn4 (u(·, x); [c, d]) Vn4 (v; [c, d]) → 0, in L2 and in probability. (B.18) − n nσn4 σ 4 nσn4 The proof of (B.18) follows by similar arguments as in proof of Proposition 2.1 and we omit it here. The proof is complete. Acknowledgments The authors would like to thank Prof. Robert C. Dalang and Prof. Sergey V. Lototsky for fruitful discussions that lead to some of the questions investigated in this manuscript. References [AES16] S. Aazizi and K. Es-Sebaiy. Berry-Esseen bounds and almost sure CLT for the quadratic variation of the bifractional Brownian motion. Random Oper. Stoch. Equ., 24(1):1–13, 2016. [BM83] P. Breuer and P. Major. Central limit theorems for nonlinear functionals of Gaussian fields. J. Multivariate Anal., 13(3):425–441, 1983. [CGH11] I. Cialenco and N. Glatt-Holtz. Parameter estimation for the stochastically perturbed NavierStokes equations. Stochastic Process. Appl., 121(4):701–724, 2011. [CGH16] I. Cialenco, R. Gong, and Y. Huang. Trajectory fitting estimators for SPDEs driven by additive noise. Forthcoming in Statistical Inference for Stochastic Processes, 2016. [Cho07] P. Chow. Stochastic partial differential equations. Chapman & Hall/CRC Applied Mathematics and Nonlinear Science Series. Chapman & Hall/CRC, Boca Raton, FL, 2007. [CNW06] J. M. Corcuera, D. Nualart, and J. H. C. Woerner. Power variation of some integral fractional processes. Bernoulli, 12(4):713–735, 2006. Parameter estimation for discretely sampled SPDEs 23 [Cor12] J. M. Corcuera. New central limit theorems for functionals of Gaussian processes and their applications. Methodol. Comput. Appl. Probab., 14(3):477–500, 2012. [Kho14] D. Khoshnevisan. Analysis of stochastic partial differential equations, volume 119 of CBMS Regional Conference Series in Mathematics. the American Mathematical Society, Providence, RI, 2014. [LR17] S. V. Lototsky and B. L. Rozovsky. Stochastic partial differential equations. Universitext. Springer, Cham, 2017. [Mar03] B. Markussen. Likelihood inference for a discretely observed stochastic partial differential equation. Bernoulli, 9(5):745–762, 2003. [NOL08] D. Nualart and S. Ortiz-Latorre. Central limit theorems for multiple stochastic integrals and malliavin calculus. Stochastic Processes and their Applications, 118(4):614 – 628, 2008. [Nou08] I. Nourdin. Asymptotic behavior of weighted quadratic and cubic variations of fractional Brownian motion. Ann. Probab., 36(6):2159–2175, 2008. [Nua06] David Nualart. The Malliavin calculus and related topics. Probability and its Applications (New York). Springer-Verlag, Berlin, second edition, 2006. [PR97] L. I. Piterbarg and B. L. Rozovskii. On asymptotic problems of parameter estimation in stochastic PDE’s: discrete time sampling. Math. Methods Statist., 6(2):200–223, 1997. [PvsT07] J. Pospı́ šil and R. Tribe. Parameter estimates and exact variations for stochastic heat equations driven by space-time white noise. Stoch. Anal. Appl., 25(3):593–611, 2007. [Wal81] J. B. Walsh. A stochastic model of neural response. Adv. in Appl. Probab., 13(2):231–281, 1981. [Wal86] J. B. Walsh. An introduction to stochastic partial differential equations. In École d’été de probabilités de Saint-Flour, XIV—1984, volume 1180 of Lecture Notes in Math., pages 265–439. Springer, Berlin, 1986.
10math.ST
Causal inference for interfering units with cluster and population level treatment allocation programs arXiv:1711.01280v1 [stat.ME] 3 Nov 2017 Georgia Papadogeorgou, Fabrizia Mealli, Corwin Zigler Abstract Interference arises when an individual’s potential outcome depends on the individual treatment level, but also on the treatment level of others. A common assumption in the causal inference literature in the presence of interference is partial interference, implying that the population can be partitioned in clusters of individuals whose potential outcomes only depend on the treatment of units within the same cluster. Previous literature has defined average potential outcomes under counterfactual scenarios where treatments are randomly allocated to units within a cluster. However, within clusters there may be units that are more or less likely to receive treatment based on covariates or neighbors’ treatment. We define estimands that describe average potential outcomes for realistic counterfactual treatment allocation programs taking into consideration the units’ covariates, as well as dependence between units’ treatment assignment. We discuss these estimands, propose unbiased estimators and derive asymptotic results as the number of clusters grows. Finally, we estimate effects in a comparative effectiveness study of power plant emission reduction technologies on ambient ozone pollution. keywords: interference, causal inference, air pollution 1 Introduction Most causal inference literature assumes that a unit’s potential outcome depends solely on its treatment, and does not depend on the treatments of other units in the population. However, this assumption is often not reasonable. Perhaps the most classical example arises in vaccination studies (Ali et al., 2005; Hudgens and Halloran, 2008) where a unit’s disease status depends on their own vaccination status but also on the vaccination status of others in their social network. The presence of interference can lead to misleading results for familiar causal estimands (Sobel, 2006), or estimands that lack clear causal interpretation (Tchetgen Tchetgen and VanderWeele, 2012), but can also introduce new estimands of intrinsic scientific interest. Sobel (2006) defined estimands for interference when the population can be partitioned into clusters for which a unit’s potential outcomes depend only on the treatment of units within the same cluster. Such assumption is called partial interference, and the interference clusters are also called interference groups. Hudgens and Halloran (2008) formalized causal inference in the presence of interference in the context of two-stage randomization designs, which was extended to observational studies by Tchetgen Tchetgen and VanderWeele (2012); Perez-Heydrich et al. (2015). In order to continue development in the context of observational studies, we highlight a key distinction that arises when formulating average potential outcomes in the presence of interference, which generally requires consideration of vectors of treatment assignments. We use the term treatment allocation strategy to refer to a process giving rise to either observed or hypothesized vectors of treatment assignments. The observed treatment allocation strategy refers to that which gives rise to observed treatments. The counterfactual treatment allocation strategy refers to how treatments may have been assigned in some hypothesized counterfactual world for which causal contrasts can be considered. This distinction between observed and counterfactual treatment allocation programs helps illuminate that existing causal estimands, such as those in Tchetgen Tchetgen and VanderWeele (2012), are limited to counterfactual treatment allocation programs that remain agnostic with regard to covariate information (as would be the case in a two-stage randomized study). These estimands ignore the possible role of unit-level covariates that relate to treatment adoption, implicitly assuming an intervention manipulating each individual unit’s treatment propensity. Consequently, these estimands pertain to counterfactual worlds where, for example, treatments are allocated to units according to a Bernoulli distribution with equal probability for each unit within a cluster. In many settings, however, treatment allocations corresponding to unit-level manip- 1 ulation are difficult to conceive. For example, policy interventions may be designed to increase the prevalence of a treatment without direct control over the individual treatment propensity. In such settings, individual treatment adoption might generally depend on unit-level covariates or the treatment status of neighboring units. To address such settings, we develop new causal estimands anchored to counterfactual treatment allocations that are conceived at the cluster level, where a particular allocation strategy dictates the cluster-average propensity of receiving treatment without directly specifying individuallevel treatment propensities. Specifically, under the assumption of partial interference, we introduce estimands for counterfactual treatment allocation programs which 1) do not assume unit-level manipulation of treatment propensities; 2) but allow for correlation of treatment assignment within a cluster; and 3) unit-level propensity of treatment that depends on individual and group level covariates. Note that, in focusing on new estimands for covariate-dependent counterfactual treatment allocations programs, our work has commonalities with independent ongoing work in Barkley and Hudgens (2017). Causal inference may also be motivated to investigate interventions on the distribution of cluster-average treatment propensities. Such may be the case when evaluating policies that are not designed to manipulate individual or cluster-average treatment propensity, but rather change the distribution of cluster-average propensities of receiving treatment by, for example, providing a population-wide incentive to adopt treatment. Accordingly, we also define estimands for counterfactual treatment allocation strategies defined at the population level that shift the distribution of the cluster-average propensity of receiving the treatment, without specifying the average treatment propensity of any specific cluster. Definition of the new causal estimands described above is accompanied here by new estimators and derivation of corresponding asymptotic properties as the number of clusters grows. Related work can be found in Ferracci et al. (2012). Other relevant work includes Liu and Hudgens (2014) where asymptotic results are derived for growing number of clusters or number of individuals within clusters, Perez-Heydrich et al. (2015) where large sample variance estimators for the estimator of Tchetgen Tchetgen and VanderWeele (2012) are derived, and Liu et al. (2016), where estimands and estimators are extended to the case of a network where partial interference does not hold, but asymptotic results are derived under the assumption of partial interference. The motivating context for this work is the evaluation of interventions to limit harmful pollution from power plants that are geographically clustered. The movement of air pollution through space leads to interference: intervening on one power plant can affect the air pollution surrounding nearby power plants. Existing estimands such as those in Tchetgen Tchetgen and VanderWeele (2012) represent quantities for counterfactual 2 treatment allocations in two steps where 1) a constant treatment probability governs the proportion of power plants that would be “treated” within a cluster, and 2) based on that probability, power plants within the cluster are randomly and independently assigned the treatment. However, this structure does not cohere to that of air pollution regulations, where, in reality, the adoption of treatments at power plants is not directly mandated and is heavily influenced by power-plant characteristics (e.g., the size or operating capacity of the plant). Instead, regulatory programs often work by incentivizing regions of power plants to adopt certain technologies (e.g., by changing the penalties for overemission), but which power plants actually adopt them is highly dependent on covariates and may be spatially correlated. Thus, new estimands for counterfactual treatment allocations where individual-level treatment adoption depends on covariates - subject to a cluster average treatment propensity - coheres more closely to the realities of air pollution regulations. Additionally, estimands at the population level of clusters could refer to counterfactual situations where some higher level of government (e.g., federal) issues additional incentives for power plants to install the technologies, but cannot mandate installation, and different regions can comply to different degrees. The new estimators are deployed here to an analysis of U.S. power plants investigating the comparative effectiveness of Selective Catalytic or non-Catalyitic Reduction systems (relative to other strategies) for reducing ambient ozone pollution. A preliminary investigation of these same data in Papadogeorgou et al. (2017) ignored interference and indicated that these systems causally reduced NOx emissions (an important precursor to ozone pollution) but did not lead to a reduction in ambient ozone. The analysis here to address the possibility of interference produces meaningfully different results that are more consistent with the literature relating NOx emissions to ambient ozone pollution. Note that, despite the focus on air pollution interventions, similar considerations could be construed in more classical interference settings such as vaccine studies, where certain types of community members might be more likely to receive the vaccine and vaccine programs may be designed to increase vaccine coverage at the community, or national level. In §2 we introduce the notation and the new estimands for the cluster-level intervention, for which estimators are presented in §3, along with unbiasedness, consistency and asymptotic distribution results for an increasing number of clusters. In §4, the estimand for interventions at the population of clusters level is introduced. The rest of the paper presents some simulations in §5, our data application in §6 and concludes with some discussion on the limitations and future directions of this paper in §7. 3 2 Estimands under partial interference We adopt the notation used in Tchetgen Tchetgen and VanderWeele (2012). Let N be the number of clusters, and ni the number of units in cluster i, i ∈ {1, 2, . . . , N }. Furthermore, denote Ai = (Ai1 , Ai2 , . . . , Aini ) ∈ A(ni ) to be the cluster treatment vector, and Ai,−j = (Ai1 , Ai2 , . . . , Aij−1 , Aij+1 , . . . , Aini ) ∈ A(ni − 1) to be the treatment of all units in cluster i apart from unit j, where A(n) = {0, 1}n . Furthermore, let Lij be a vector of individual and cluster-level covariates, and Li = (Li1 , Li2 , . . . , Lini ) be the collection of coviarates within a cluster including and excluding the covariates of unit j. Under the assumption of partial interference, the potential outcome of unit j in cluster i may depend on the treatment of units in cluster i, but not on the treatment of units in different clusters. For every i we postulate the existence of group i’s potential outcomes Yi (·) = {Yi (ai ), ai ∈ Ai }, where Yi (ai ) = (Yi1 (ai ), Yi2 (ai ), . . . , Yini (ai )). 2.1 Average potential outcome Under the assumption of partial interference, we define the individual average potential outcome for a counterfactual treatment allocation strategy with two features: 1) treatment assignment for units within a cluster is unlikely to be independent, and 2) individual covariates can be predictive of a unit’s treatment probability. Let Pα,L represent the (arbitrarily specified) counterfactual treatment allocation program, specified specifically to depend on covariates and/or allow correlated assignments within clusters. Pα,L is governed by parameters α, which represent features of the counterfactual treatment allocation program of interest. For the purpose of this paper, we consider α to represent the cluster-average propensity of treatment. The individual average potential outcome is defined as: X L Y ij (a; α) = Yij (Aij = a, Ai,−j = s)Pα,L (Ai,−j = s|Aij = a, Li ), (2.1) s∈A(ni −1) and represents the expected outcome for unit j in cluster i in the counterfactual world where treatment is assigned with respect to Pα,L , but the treatment of unit j is fixed to a. This estimand is well-defined for any fixed choice of Pα,L . Based on the individual average potential outcome, group and population average potential outcomes are defined as ni 1 X L Y (a; α), ni j=1 ij (2.2) N 1 X L Y (a; α) = Y (a; α). N i=1 i (2.3) L Y i (a; α) = L 2.2 The counterfactual treatment allocation in existing literature As men- tioned previously, Pα,L can be arbitrarily chosen and represents the process with which 4 treatment is assigned in the counterfactual world, driving the interpretation of all estimands. The above development has left unspecified the term Pα,L in (2.1) providing relative weights to different cluster treatment vectors in the individual average potential outcomes. The estimands in Tchetgen Tchetgen and VanderWeele (2012) and PerezHeydrich et al. (2015) correspond to counterfactual treatment strategies Pα,L (ai |Li ) = ni Y π(ai ; α) = αaij (1 − α)1−aij , giving equal probability to all cluster-treatment vectors j=1 with the same number of treated units, irrespective of which those units are. For this choice of Pα,L the estimands represent quantities in counterfactual worlds where individual treatment probability can be manipulated and units are assigned to treatment independently and with equal probability α. 2.3 Realistic counterfactual treatment allocation program However, in some situations, counterfactual treatment allocations can only be realistically conceived if allowed to depend on covariates or if they incorporate correlation between treatment of units in the same cluster. In the study of power plant interventions on ambient air quality, the decision of whether to “treat” a power plant is at the discretion of the power company and heavily influenced by power plant covariates. Therefore, a hypothesized counterfactual treatment allocation is realistic only when such covariates are incorporated. As an example, consider the power-plant level covariate ‘heat input’, a proxy for the size of the power plant, and let Lij be the heat input of power plant j in cluster i. Then, one specification of a counterfactual treatment allocation strategy that would acknowledge that different-sized power plants are more or less likely to adopt treatment is: logitPα,L (Aij = 1|Lij ) = ξiα + δL Lij , for some fixed, pre-specified value of δL , and ξiα such that ni 1 X expit (ξiα + δL Lij ) = α. ni j=1 The value δL here could be specified according to knowledge of how the size of the power plant is expected to impact the propensity to adopt treatment. Based on this specification of Pα,L , the estimands of interest correspond to quantities in a hypothesized world where treatment is assigned independently across units with treatment propensity that depends on Lij , but is on average equal to α. A data-driven way to choose Pα,L is presented in §6. Alternatively, a counterfactual treatment allocation strategy can also be defined to incorporate dependence of treatments in the same cluster. For example, consider logitPα,L (Aij = 1|Lij ) = ξiα + δL Lij + γij , 5 where γij is a mean 0 spatial random effect with fixed correlation matrix decaying with distance. This choice of Pα,L corresponds to a counterfactual treatment allocation program that depends on covariates and incorporates dependent treatment assignment of units within a cluster. 2.4 Direct and indirect effects Different contrasts of average potential outcomes can be considered to characterize how treatment affects the outcome of interest. For counterfactual allocation strategy Pα,L , direct effects represent contrasts in average potential outcomes when only the individual treatment changes. On the other hand, indirect effects contrast average potential outcomes for a fixed level of individual treatment, but different specification of the parameter α governing the counterfactual allocation program. For that reason, indirect effects represent expected changes in potetntial outcomes for changes only in the “treatment of neighbors”, and they can be thought of as a measure of interference. Indirect effects are also known in the literature as spillover effects. Based on the individual, group and population average potential outcomes, one can define the individual, group and population direct effects as L L DEijL (α) =Y ij (1; α) − Y ij (0; α), DEiL (α) =Y L i (1, α) −Y L i (0; α) ni 1 X = DEijL (α) ni j=1 N 1 X DE (α) =Y (1, α) − Y (0; α) = DEiL (α) N i=1 L L L accordingly. Similarly, the individual indirect effect is defined as L L IEijL (α1 , α2 ) = Y ij (0, α2 ) − Y ij (0, α1 ), based on which group and population indirect effects can be defined. Contrasts other than the difference can also be considered. Based on these estimands, total effects can be defined as the sum of direct and indirect effects (Hudgens and Halloran, 2008), while similar development can lead to the definition of overall effects. 3 Estimating the population average potential outcome For a fixed choice of Pα,L , we provide estimators of the population average poten- tial outcome in (2.3), unbiasedness and consistency results, and derive the estimator’s asymptotic distribution when the number of clusters increases to infinity, for a known or correctly specified parametric cluster-propensity score model (defined below). Based on 6 these, estimators and asymptotic distributions for the estimands in §2.4 can be acquired as demonstrated in Example A.1. Proofs are in Appendix A. We start by making the sample cluster-level positivity, and ignorability assumptions: Assumption 1. Positivity. For i ∈ {1, 2, . . . , N }, the probability of observing cluster treatment vector ai given cluster covariates Li is denoted by fA|L,i (Ai = ai |Li ) and is positive for all ai ∈ A(ni ). fA|L,i is the cluster-propensity score. Assumption 2. Ignorabililty. For i ∈ {1, 2, . . . , N }, the observed cluster treatment Ai is conditionally independent of the set of cluster potential outcomes Yi (·) given the covariates Li , denoted as Ai q Yi (·)|Li . 3.1 Let Estimators of the group and population average potential outcome ni 1 X Pα,L (Ai,−j |Aij = a, Li ) L b Yi (a; α) = I(Aij = a)Yij ni j=1 fA|L,i (Ai |Li ) (3.1) N 1 X bL Yb L (a; α) = Y (a; α) N i=1 i (3.2) where fA|L,i (Ai |Li ) is the cluster-level propensity score for the observed treatment, and Pα,L (Ai,−j |Aij = a, Li ) is the probability of the observed treatment on units other than j given Aij = a, under the counterfactual treatment allocation program. Assuming that the group level propensity score fA|L,i (·|Li ) is known, and AssumpL L tions 1, 2 hold, then Yb L (a; α), Yb L (a; α) are unbiased for Y (a, α), Y (a, α) accordingly. i i Unbiasedness is derived for a fixed set of clusters with respect to the distribution of the observed treatment assignment. (Proof in Appendix A.) The population average potential outcome (2.3) is defined as the average of the group average potential outcomes. Alternative definitions could weigh each cluster by cluster sample size (which is what the population average potential outcome of Liu et al. (2016) simplify to under the assumption of partial interference). In Appendix C, we discuss this distinction and provide an argument why an equal-weight estimand and the corresponding estimator (3.2) might be preferable. 3.2 Asymptotic results for Yb L (a; α) for known propensity score We derive the asymptotic properties of the estimator in (3.2) for an increasing number of clusters  T N , denoted by Yb L (a; α). Let Yb L (α) = Yb L (0; α), Yb L (1; α) . N N N N Assume that the N clusters are a sample of an infinite superpopulation of clusters from which they are sampled randomly. Therefore (Yi (·), Ai , Li ) are now independent and identically distributed random vectors, whose distribution is denoted as F0 . (For 7 notational simplicity, ni is included in Li .) The sample positivity and ignorability assumptions are translated to their super-population counterparts. Assumption 3. Super-population positivity. There exists ∃ρ > 0 such that fA|L,i (Ai |Li ) > ρ with probability 1. Assumption 4. Super-population ignorability. For F0 , Ai q Yi (·)|Li . h L i a 1 T 0 Theorem 1. Let µ0 = (µ0 , µ0 ) where µ0 = EF0 Y i (a; α) . Under Assumptions 3, 4, for known propensity score, and bounded outcome (there exists M > 0 : |Yij | < M with probability 1), Yb L (α) is  consistent for µ0 and asymptotically normal with limiting √  LN d distribution N YbN (α) − µ0 → N (0, V (µ0 )), where   V (µ0 ) = EF0 ψ(yi , li , ai ; µ0 )ψ(yi , li , ai ; µ0 )T ,  T ψ(yi , li , ai ; µ0 ) = ψ0,α yi , li , ai ; µ00 , ψ1,α yi , li , ai ; µ10 ψa,α (yi , li , ai ; µa0 ) = ni 1 X Pα,L (Ai,−j |Aij = a, Li ) I(Aij = a)Yij − µa0 . ni j=1 fA|L,i (Ai |Li ) The above theorem leads to the approximation YbNL (α) approx ∼  M V N2 µ0 , N −1 V (µ0 ) for large numberh of clusters. Even ifiassumptions about F0 are made, the elements of T V (µ0 ) = CovF0 Y i (0, α), Y i (1, α) (proof in Appendix B) are often hard to calculate analytically. Instead, the asymptotic variance of Yb L (α) can be estimated using the N empirical expectation N  1 X b ψ(Yi , Li , Ai ; µ)ψ(Yi , Li , Ai ; µ)T , V (µ) = N i=1 evaluated  at µ =  YbNL (α). Under regularity conditions, discussed in Iverson and Randles (1989), Vb Yb L (α) will be consistent for V (µ0 ). Using Theorem 1 one can acquire the N asymptotic distribution of a contrast between Yb L (0; α), Yb L (1; α) specifying a direct effect, by an application of the multivariate delta method, as shown in Example A.1. 3.3 Asymptotic results for Yb L (a; α) for estimated propensity score from a correctly-specified parametric model However, most of the times the propensity score is not known, and has to be estimated using the observed data. In the next theorem, we provide the asymptotic distribution of Yb L (α) when the propensity score is estimated N using a correctly specified parametric propensity score model. In this case, the clusterpropensity score for the observed treatment vector will be denoted by fA|L,i (Ai |Li ; γ) where γ are the model parameters. 8 Theorem 2. Assume that assumptions 3, 4 hold, the outcome is bounded with probability 1 (as in Theorem 1) and the parametric form of the propensity score model indexed by γ, fA|L,i (ai |li ; γ), is correctly specified and differentiable with respect to γ. Let µ0 be as in b of the propensity score Theorem 1, and YbNL (a, α) calculated using consistent estimates γ ∂ ∂γ T fA|L,i . Let ψ γ (li , ai ; γ) = log f (ai |li ; γ) be the score functions. Assume that: 1. γ 0 is in an open subset of the Euclidean space 2. γ → ψ γ (li , ai ; γ) is twice continuously differentiable ∀(li , ai ) 2 3. EF0 ψ γ (Li , Ai ; γ 0 ) 2 < ∞   · 4. EF0 ψ γ (Li , Ai ; γ 0 ) exists and is non-singular ·· ·· 5. ∃ measurable integrable function ψ γ (li , ai ) fixed such that ψ γ dominates the second partial derivatives of ψ γ for all γ in a neighborhood of γ 0 . · where γ 0 are the true parameters of the propensity score model, and ψ γ (li , ai ; γ) isthe √  L d matrix of partial derivatives of ψ γ (li , ai ; γ) with respect to γ. Then, n YbN (α) − µ0 → N (0, W (γ 0 , µ0 )), where T −1 T −1 −1 W (γ 0 , µ0 ) = V (µ0 ) + A21 B11 A21 + A21 B11 B12 + A21 B11 B12 , h h i h i T A21 = E ∂ψ0 /∂γ ∂ψ1 /∂γ , B11 = E ψ γ ψ Tγ , B12 = E ψ γ ψ0 , ψ γ ψ1 , evaluated at (γ 0 , µ0 ), ψa = ψa,α (Yi , Ai , Li ; µa0 ) and V (µ0 ) is that of Theorem 1.   L c (γ, µ) is the matrix c b b , YN (α) , where W W (γ 0 , µ0 ) can be easily estimated using W γ W (γ, µ) where all expectations are substituted with the empirical expectations. For b11 = 1 PN ψ γ (Li , Ai ; γ)ψ γ (Li , Ai ; γ)T . example, B N i=1 b IE = Next, we derive the asymptotic distribution for µ  YbNL (0; α0 ), YbNL (0; α1 ) T for the estimated propensity score from a correctly specified parametric model.  h L i h L iT IE Theorem 3. Denote µ0 = EF0 Y i (0, α0 ) , EF0 Y i (0, α1 ) , and assume that the  √  IE b − µIE → N (0, Q(γ 0 , µ0 )), where Assumptions of Theorem 2 hold. Then, n µ 0 −1 −1 −1 T Q(γ, µ) = D22 + C21 B11 C21 + C21 B11 D12 + C21 B11 D12 D22 = Cov  Y T L L (0, α ), Y (0, α ) 1 2 i i    , D12 = E ψ γ ψ0,α1 , ψ γ ψ0,α2 ,   C21 = E ∂ψ0,α1 /∂γ ∂ψ0,α2 /∂γ , and B11 as in Theorem 2. 9 T 4 Counterfactual distribution of cluster-average treatment propensity In §2 we defined the individual average potential outcome for unit j in cluster i (and other estimands based on it) when the cluster-average propensity of treatment α is fixed to a counterfactual value. Those estimands correspond to quantities of interest in counterfactual worlds were one intervenes at the level of the cluster, but units within the cluster are still allowed to choose their own treatment. In this section, new individual average potential outcomes are defined, when the unit’s treatment is set to a, but the cluster average propensity of treatment is not fixed to a specific value α but arises from a hypothesized distribution. These estimands play an important role for policy interventions that occur at a high (vs. local) administrative level. For example, consider an observed distribution of clusteraverage treatment propensity Fbα , and an intervention that takes place over all clusters incentivizing the increase of cluster treatment coverage. This intervention does not enforce a specific average propensity of treatment for each cluster separately, but leads to an overall shift in the distribution of cluster average propensity of treatment. Let Fα (·) denote the observed or a hypothesized distribution of cluster-average propensity of treatment. Then, define the Fα -individual potential outcome as Z L L Y ij (a; Fα ) = Y ij (a; α) dFα (α) (4.1) Z X = Yij (Aij = a, Ai,−j = s) Pα,L (Ai,−j = s|Aij = a, Li ) dFα (α). s∈A(ni −1) L Thus, Y ij (a; Fα ) describes the average potential outcome of unit j in cluster i, for cluster average probability of treatment arising from Fα . Consequently, the Fα -group and ni 1 X L L population average potential outcomes are defined as Y i (a; Fα ) = Y ij (a; Fα ) and ni j=1 N 1 X L Y (a; Fα ) = Y (a; Fα ) accordingly. Although the above estimands are well-defined N i=1 i for a distribution Fα different than the observed one, Fα needs to have overlapping support with the empirical distribution Fbα in order to reliably estimate such quantities. L Similar arguments to the ones in §3 lead to estimators of the Fα -group and population average potential outcome as Z ni 1 X PFα ,L (Ai,−j |Aij = a, Li ) L L b b Yi (a; Fα ) = Yi (a; α)dFα = I(Aij = a)Yij , ni j=1 fA|L,i (Ai |Li ) Z ni 1 X L L b b Yb L (a; Fα ) Y (a, Fα ) = Y (a; α)dFα = N i=1 i 10 (4.2) (4.3) accordingly, where PFα ,L (Ai,−j |Aij = a, Li ) = R Pα,L (Ai,−j |Aij = a, Li ) dFα (α). Even though direct effect estimands based on the Fα -population average potential L L outcome can easily be defined as DE(Fα ) = Y (1; Fα ) − Y (0; Fα ), the contrast of Fα population average potential outcomes is more interesting for the indirect effect. For two hypothesized distributions of cluster-average propensity of treatment Fα1 , Fα2 , define    L L IE Fα1 , Fα2 = Y 0; Fα2 − Y 0; Fα1 . Then, IE (Fα1 , Fα2 ) represents the expected outcome change for control units when the distribution of cluster-average propensity of treatment changes from Fα1 to Fα2 . Assume that Fα1 , Fα2 represent discrete distributions with values α1 , α2 , . . . , αK ∈ (0, 1) and probability p1k and p2k of assigning value αk to a cluster accordingly, such that PK k=1 pjk = 1, j = 1, 2. Then, Y 0, Fαj  = K X pjk Y (0, αk ) ⇒ IE Fα1 , Fα2 k=1  = K X (p2k − p1k )Y (0, αk ). k=1 Clearly, a consistent estimator for IE (Fα1 , Fα2 ) is K  X c F 1, F 2 = (p2k − p1k )Yb (0, αk ). IE α α k=1 c (F 1 , F 2 ) is straightforward following simAcquiring the asymptotic distribution of IE α α ilar 3 to acquire the asymptotic distribution of  arguments to the ones in Theorem T Yb (0, α1 ), Yb (0, α2 ), . . . , Yb (0, αK ) and applying the multivariate delta method. 5 Simulations We generate a fixed population of 2,000 clusters including 14 to 18 units each, resulting to a total of 31,553 units. Four independent N (0, 1) covariates were generated, and are denoted as L1 , L2 , L3 , L4 . For every individual in the population (unit j in cluster i), the potential outcomes under all possible treatment allocations were generated, following a model Y ∼ Bernoulli(expit(lY )) where lY = 0.5 − 0.6a − 1.4 a+k a+k − 0.098L1ij − 0.145L2ij + 0.1L3ij + 0.3L4ij + 0.351a , (5.1) ni ni L1ij , L2ij , L3ij , L4ij are the values of the covariates for observation j of cluster i, a is the individual treatment, k is the number of treated neighbors, and (a + k)/ni is the percentage of units in the cluster that are treated. 11 5.1 A simulated data set The simulations test the operating characteristics of the estimator in (3.2) using the true and estimated propensity score in terms of the resampling of the observed treatment vector. Specifically, each simulated dataset includes the whole population, but a different set of potential outcomes is observed according to a treatment vector generated as Aij ∼ Bernoulli(expit(lA )) where lA = −0.2 + bi + 0.3L1ij − 0.15L2ij + 0.2L3ij − 0.18L4ij , bi ∼ N (0, 0.52 ). (5.2) Once the observed treatment is generated, the observed outcome is the corresponding value of the potential outcomes. Clusters with all treated or all control units are dropped. Ybi (a; α) is estimated from (3.1) for counterfactual treatment allocation described in §5.2, and fA|L,i (Ai |Li ; γ) = Z Y ni  fe (Aij |Lij , δ0 , βi , δ) φ βi |σβ2 dβi , j=1 where fe (Aij |Lij , δ0 , βi , δ) = expit δ0 + bi + LTij δ  Ai  1−Ai 1 − expit δ0 + bi + LTij δ ,    LTij = (L1ij , L2ij , L3ij , L4ij ), φ ·; σβ2 the density of a N 0, σβ2 , and γ = δ0 , δ, σβ2 known and equal to the coefficients in (5.2), or the maximum likelihood estimates from the correctly specified propensity score model. We calculate the population average potential outcomes, direct and indirect effects, and the corresponding asymptotic variances. 5.2 Covariate-dependent counterfactual treatment allocation The counter- factual treatment allocation Pα,L is allowed to depend on the same covariates that are included in the observed propensity score, using the log odds coefficients used to generate the observed treatment. Specifically, for a fixed α ∈ (0, 1), logitPα,L (Aij = 1|Lij ) = ξiα + 0.3L1ij − 0.15L2ij + 0.2L3ij − 0.18L4ij , for ξiα satisfying 5.3 1 ni Pni j=1 Pα,L (Aij = 1|Lij ) = α. Calculating the true average potential outcomes For every observation j in cluster i, the individual average potential outcome for individual treatment a and for cluster-average propensity of treatment α is calculated based on (2.1). Based on the individual average potential outcome, the true group and population average potential outcome are calculated according to (2.2), (2.3). 12 Table 1: Range of calculated coverage over 500 simulated data sets for the population average potential outcome, direct and indirect effects for the true or the correctly specified propensity score.. L 5.4 L Y (0; α) Y (1; α) DE L (α) IE L (α1 , α2 ) True PS 94.4 - 96.2% 94.4 - 97.2% 94.4 - 95.6% 92-97.2% Estimated PS 86.6 - 96% 92.8 - 96.6% 91.6 - 96% 78.4 - 95.6% Simulation results We present results for values of alpha between 0.3 and 0.6 th corresponding to the 20 and 80th quantiles of the distribution of the observed treatment proportions across clusters and simulated data sets. As expected, the estimator based on the true propensity score is unbiased, while the estimator based on the estimated propensity score, which is consistent but not unbiased, indicates small biases. Figure 1 shows the mean estimate across 500 simulated data sets for the population average potential outcome for a = 1 (results were similar for a = 0), direct and indirect effect, and Table 1 shows the coverage range over different values of α of the population average potential outcome, direct and indirect effect. Moreover, Figure 5 in Appendix E shows the mean of the estimated variance based Y(1, α) DE(α) −0.11 method truth 0.36 TruePS EstPS Mean Estimate Mean Estimate 0.38 method truth −0.12 TruePS EstPS −0.13 0.34 −0.14 0.3 0.4 α 0.5 0.6 0.3 IE(0.3, α) 0.4 α 0.5 0.6 IE(0.4, α) 0.04 0.000 Mean Estimate method truth −0.050 TruePS EstPS Mean Estimate 0.02 −0.025 −0.075 method 0.00 truth TruePS −0.02 EstPS −0.04 −0.06 −0.100 0.3 0.4 α 0.5 0.6 0.3 0.4 α 0.5 0.6 Figure 1: Mean estimate of population average potential outcome, direct, and indirect effect over 500 simulated data sets for the true or the correctly specified propensity score. 13 on the asymptotic results, against the variance of the estimates calculated over the 500 simulated data sets. The points (one for each value of α) lie mostly on the 45 degree line indicating that, on average, the variance based on the asymptotic theory is a good approximation of the true variance. 6 Application: Effectiveness of Power Plant Emissions Controls for Reducing Ambient Ozone Pollution Limited literature exists in the evaluation of U.S. air pollution regulations in a causal inference framework. Power plant regulations for the reduction of NOx emissions have been predicated on the knowledge that reducing NOx emissions would lead to a subsequent reduction in ambient ozone. Among various NOx emission reduction strategies, SCR and SNCR are believed to be the most effective in reducing emissions. While work in Papadogeorgou et al. (2017) corroborated this effectiveness of SCR and SNCR in an analysis for NOx emissions, the analysis of ambient ozone pollution in that paper ignores the possibility of interference and estimates a null effect on ambient ozone. However, interference is a key component in the study of air pollution: ambient pollution concentrations near a power plant will depend on the treatment levels of other nearby power plants. Causal estimands tailored to settings of interference can answer important questions related to the effectiveness of interventions in the presence of long-range pollution transport. We use the same data as in Papadogeorgou et al. (2017) to estimate direct and indirect effects of SCR/SNCR against alternatives on ambient ozone under realistic counterfactual programs. The publicly-available data set includes 473 coal or gas burning power generating facilities in the U.S. operating during June, July and August 2004, with covariate information on power plant characteristics, weather and demographic information of the surrounding areas. For every power plant, the value of ozone is calculated as the average across EPA monitoring locations within 100km of the 4th highest ozone measurements. See Papadogeorgou et al. (2017) for a full description of the data set and linkage. Power plant facilities are grouped into 50 clusters according to Ward’s agglomerative clustering method (Ward, 1963) based on coordinates. The grouping and treatment of facilities are depicted in Figure 2. 10 out of 50 clusters were excluded from the analysis because they included only control power plants. 6.1 Plausibility of the ignorability and positivity assumption While regu- latory programs provide incentives to install emission-control technologies, power plants have latitude to select which (if any) technology to adopt. Such decisions are largely 14 determined by the plant’s characteristics such as plant size and operating capacity, as well as by factors related to local or regional air pollution incentives that are influenced by area-level characteristics such as population density and urbanicity. To capture such factors, 18 covariates are included in the data set describing power plant, weather, and demographic characteristics, based on which ignorability is expected to hold. The variability in the observed proportion of treated power plants across clusters provides an additional indication that the positivity assumption is plausible. Based on these covariates, the propensity score was modeled as in Papadogeorgou et al. (2017) augmented with a cluster-specific random effect logitP (Aij = 1|Lij ) = δ0 + bi + LTij δ, bi ∼ N (0, σb2 ). 6.2 (6.1) Counterfactual treatment allocation for the installation of SCR/SNCR emission control technologies Recall from §2.3 that Pα,L governing treatment as- signment in the counterfactual allocation programs of interest must be specified. To specify counterfactual treatment allocations that reflect realistic relationships between covariates and the propensity to adopt treatment, we specify Pα,L such that the log-odds of treatment installation related to individual covariates are as observed in the propensity score model for the observed treatment in (6.1). Even though this choice of Pα,L depends on the data through the estimated log-odds, the corresponding estimands are well-defined and the asymptotic results are valid for Pα,L fixed across replications of the sampling or an increasing number of clusters. Values of α were considered between the 20th and 80th quantiles of the observed cluster treatment proportions, corresponding to α ∈ [0.141, 0.508]. Figure 3 shows the population direct effect DE(α), and population indirect effect IE(α1 , α2 ) for a subset of values Other SCR/SNCR Figure 2: Treated (SCR/SNCR) and control (Other) power plant facilities during June, July, August of 2004. Shaded areas depict the interference clusters according to the agglomerative clustering method. 15 −0.02 −0.04 0.2 0.3 α 0.4 0.00 IE(0.414,alpha) IE(0.226,alpha) DE(α) 0.00 −0.02 −0.04 −0.06 0.5 0.2 0.3 α 0.4 0.050 0.025 0.000 0.5 0.2 0.3 α 0.4 0.5 Figure 3: Direct effect of control versus treated power plants on ozone concentrations as a function of α, and indirect effect where the first value of α is fixed to a specific value. Ozone is measured in parts per million. of α1 (for presentation simplicity). The direct effect is significantly negative for all values of α, but has a somewhat increasing trend, implying that in a world where the average probability of SCR/SNCR among power plants in a cluster is fixed, the installation of SCR/SNCR at one power plant would lead to significant reductions in ozone concentrations in the surrounding area, but these reductions are smaller when the cluster average propensity of treatment is high (larger number of treated neighbors). The indirect effect is, in a way, a measure of pollution transport since it quantifies the effect of changes in the cluster average propensity of treatment on ozone concentrations near control power plants. For all values of α1 , IE(α1 , α2 ) is decreasing in α2 , and almost all contrasts considered were significant at the 0.05 significance level. The decreasing trend in IE(α1 , α2 ) for a fixed value of α1 implies that higher cluster-average SCR/SNCR propensity leads to further decrease in ambient ozone concentrations in the surrounding area of control power plants. Next, we considered estimating the effect of hypothesized federal regulations that would shift the distribution of cluster-average propensity of treatment. Fα1 (Fα2 ) was assumed to be a discrete distribution within the 20th (50th ) and 80th quantiles of the observed cluster-treatment proportions. In Figure 4, we show the empirical probability mass function, as well as the two counterfactual treatment allocations. IE (Fα1 , Fα2 ) was estimated to be −0.0162 parts per million (95% CI: −0.0252 to −0.007) implying that federal regulations that encourage the installation of SCR/SNCR and would lead to cluster average treatment probabilities like Fα2 would reduce ambient ozone concentrations in the surrounding areas of control power plants by 0.0162 parts per million compared to similar regulations that would lead to Fα1 . For reference, these effect estimates can be compared against the national ozone air quality standard of 0.07 parts per million. 16 Observed Observed−restricted Counterfactual α 0.75 0.50 0.25 0.00 0.05 0.10 0.15 0.20 0.25 0.00 0.05 0.10 0.15 0.20 0.25 0.00 0.05 0.10 0.15 0.20 0.25 Probability mass function Figure 4: Observed cluster treatment proportions (“Observed”), and two discrete hypothesized distributions of cluster-average probability of treatment. One corresponds to the observed restricted within the 20th and 80th quantiles of the observed cluster treatment proportions (“Observed-restricted”), and the other one (“Counterfactual”) corresponds to the observed (or the Observed-restricted) further restricted between the 50th and 80th quantiles of the observed cluster treatment proportions. We explored the sensitivity of the data application results to the choice of hierarchical clustering method and number of clusters, and saw that the qualitative results for the effectiveness of SCR/SNCR emission reduction technologies are mostly consistent. We further estimated the estimands of Tchetgen Tchetgen and VanderWeele (2012) that assume manipulation of individual power-plant treatment propensities and ignore the fact that covariates can be important predictors of the treatment received by power plants. These estimators returned results with similar pattern as the ones in Figure 3, but of smaller magnitude. Therefore, the potential benefits of SCR/SNCR would be understated, if counterfactual scenarios of independent and identically distributed treatment assignment was considered. These results can be found in Appendix F. 7 Discussion Analyzing data in the context of interference disentangles the effect of the individual treatment from the treatment of one’s neighbors. New estimands in the presence of interference were proposed for counterfactual strategies that manipulate treatment at the cluster-level, or at the level of population of clusters. These new estimands represent scenarios where individual treatment in the counterfactual world is allowed to depend on covariates and the treatment of one’s neighbors. Such estimands are relevant for public health interventions that do not manipulate treatment at the unit level. For the estimands referring to interventions at the population level, the counterfactual distribution Fα represented the distribution of the cluster-average propensity of treatment, and each cluster was assumed to be equally likely to receive α from Fα . However, 17 Fα could be alternatively defined to depend on cluster-level covariates that act as predictors of cluster-average propensity of treatment. Consistent estimators were proposed for which the asymptotic distribution was derived. These estimators were employed in the comparative effectiveness of power plant emission control strategies on ambient ozone, and showed the potential of a set of emission reduction technologies in reducing ozone concentrations. These results are more in line with subject-matter knowledge than results from a previous study that assumed no interference. Through comparison with existing estimands in the literature, this analysis also highlighted the potential gains of the proposed estimands in a setting where relevant counterfactual treatment allocations depend on covariates, showing that existing estimands would understate the potential benefits of treatment. Even though the data application showed the potential for causal inference methods for interference to lead to important results in air pollution research, there are several limitations to the analysis. First of all, the number of clusters was low, rising questions for the appropriateness of use of asymptotic distributions to acquire variance estimates. Furthermore, in air pollution studies the assumption of partial interference may be violated, since pollution from one power plant can travel long distances and affect ozone concentrations within a different cluster. However, we considered it important to analyze air quality data, which in our knowledge have not been previously analyzed to acknowledge interference. Despite the approximation entailed by the partial interference assumption, we believe this is an important advance for studies of air pollution interventions, and methods relaxing the assumption of partial interference for unknown networks are the topic of future research. Lastly, asymptotic results show that the sampling distribution F0 plays an important role in better understanding the proposed estimands. It is important to consider what the superpopulation of clusters we imagine corresponds to, and how the observed clusters arise from the superpopulation. Acknowledgements The authors thank Dr. Christine Choirat for tools created to reproducibly manage and link the disparate (publicly-available) data used for this analysis. References Ali, M., Emch, M., Von Seidlein, L., Yunus, M., Sack, D. A., Rao, M., Holmgren, J., and Clemens, J. D. (2005). Herd immunity conferred by killed oral cholera vaccines in 18 Bangladesh: A reanalysis. Lancet 366, 44–49. Barkley, B. and Hudgens, M. G. (2017). Poster presentation at the Atlantic Causal Inference Conference. Ferracci, M., Jolivet, G., and Van Den Berg, G. J. (2012). Evidence of Treatment Spillovers Within Markets. Hudgens, M. G. and Halloran, M. E. (2008). Toward Causal Inference With Interference. Journal of the American Statistical Association 103, 832–842. Iverson, H. K. and Randles, R. H. (1989). The Effects on Convergence of Substituting Parameter Estimates into U-Statistics and Other Families of Statistics. Probability Theory and Related Fields 81, 453–471. Liu, L. and Hudgens, M. G. (2014). Large sample randomization inference of causal effects in the presence of interference. Journal of the American Statistical Association pages 288–301. Liu, L., Hudgens, M. G., and Becker-Dreps, S. (2016). On inverse probability-weighted estimators in the presence of interference. Biometrika 103, 829–842. Papadogeorgou, G., Choirat, C., Zigler, C., and Chan, H. T. H. (2017). Adjusting for Unmeasured Spatial Confounding with Distance Adjusted Propensity Score Matching. Perez-Heydrich, C., Hudgens, M. G., Halloran, M. E., Clemens, J. D., Ali, M., and Emch, M. E. (2015). Assessing Effects of Cholera Vaccination in the Presence of Interference. Biometrics 33, 395–401. Serfling, R. J. (1980). Approximation Theorems of Mathematical Statistics. Sobel, M. E. (2006). What Do Randomized Studies of Housing Mobility Demonstrate? Journal of the American Statistical Association 101, 1398–1407. Tchetgen Tchetgen, E. J. and VanderWeele, T. J. (2012). On causal inference in the presence of interference. Statistical Methods in Medical Research 21, 55–75. van der Vaart, A. W. (1998). Asymptotic statistics. Cambridge University Press. Ward, J. H. J. (1963). Hierarchical Grouping to Optimize an Objective Function. Journal of the American Statistical Association 58, 236–244. 19 A Proofs of unbiasedness, consistency and asymptotic normality A.1 Unbiasedness Theorem A.1. If fA|L,i (·|Li ) is known, and Assumptions 1, 2 hold, then YbiL (a; α) is an unbiased estimator for the group average potential outcome, and Yb L (a; α) is an unbiased estimator of the population average potential outcome for individual treatment a and cluster average propensity of treatment α. Proof. All expectations are taken with respect to the conditional distribution Ai |Li , Yi (·), where Yi (·) are all the potential outcomes for all units in cluster i. Yi j, Yi denote the observed individual outcome, and the vector of observed outcomes in cluster i accordingly. E[YbiL (a; α)]   ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X = E I(Aij = a)Yij ni j=1 fA|L,i (Ai |Li )   ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X I(Aij = a)Yij (Ai ) E = ni j=1 fA|L,i (Ai |Li ) ni X fA|L,i,α (Ai,−j = si,−j |Aij = a, Li , α) 1 X I(sij = a)Yij (s)P (Ai = s|Li , Yi (·)) = ni j=1 fA|L,i (Ai = s|Li ) s∈A(ni ) = 1 ni ni X X fA|L,i,α (Ai,−j = si,−j |Aij = a, Li , α)I(sij = a)Yij (s) j=1 s∈A(ni ) (From Assumption 2 P (Ai = s|Li , Yi (·)) = P (Ai = s|Li ) = fA|L,i (Ai = s|Li ).) ni 1 X = ni j=1 X fA|L,i,α (Ai,−j = s|Aij = a, Li , α)Yij (aij = a, ai,−j = s) s∈A(ni −1) L =Y i (a; α). By linearity of expectations, the proof for the population average potential outcome is trivial. A.2 Proofs of asymptotic results for known propensity score For notational simplicity, denote Õi = (Ai , Li ), Oi = (Yi , Ai , Li ), õi = (ai , li ), and oi = (yi , ai , li ). Also, denote as F0 the distribution of (Yi (·), Ai , Li ) in the superpopulation. P Consider the estimating equation ΨN (µ) = N i=1 ψa,α (Oi ; µ) = 0, where ! ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X ψa,α (Oi ; µ) = I(Aij = a)Yij − µ. ni j=1 fA|L,i (Ai |Li ) 20 It is easy to see that the solution to this equation is µ b = YbNL (a; α): ! # " ni N X fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X I(Aij = a)Yij − µ = 0 ⇐⇒ ni j=1 fA|L,i (Ai |Li ) i=1 N X i=1 N 1 X bL YbiL (a; α) = N µ ⇐⇒ µ b= Y (a; α) = YbNL (a; α) N i=1 i R If µa0 is the solution to Ψ0 (µ) = ψa,α (Oi ; µ)dF0 (oi ) = 0. Then, # Z " X n 1 i fA|L,i,α (Ai,−j |Aij = a, Li , α) I(Aij = a)Yij − µa0 dF0 (oi ) = 0 ⇐⇒ ni j=1 fA|L,i (Ai |Li ) # " ni h L i X f (A |A = a, L , α) 1 i,−j ij i A|L,i,α I(Aij = a)Yij = EF0 Y i (a; α) µa0 = EF0 ni j=1 fA|L,i (Ai |Li ) Proof of Theorem 1. First, we will show that YbNL (α) is consistent for µ0 . For this proof, we use an alteration of Lemma A in section 7.2.1 of Serfling (1980). · Note that ψa,α (Oi ; µ) is monotone in µ with ψ a,α (Oi ; µ) = ∂ ψ (Oi ; µ) ∂µ a,α = −1 < 0. Therefore, ΨN (µ), Ψ0 (µ) are also monotone in µ (implying uniqueness of their roots). a.s. From the strong law of large numbers we have that ΨN (µ) → Ψ0 (µ). From this, we have that: |Ψ0 (b µ) − Ψ0 (µ0 )| = |Ψ0 (b µ) − Ψn (b µ)| ≤ sup |Ψ0 (µ) − Ψn (µ)| → 0, µ a.s. a.s. which, b → µ0 , and YbNL (a; α) → h Lby thei uniqueness of the roots for Ψ0 , ΨN , implies µ EF0 Y i (a; α) . a.s. a.s. From basic probability laws we have that (Xn , Yn )T → (X, Y )T if and only if Xn → X a.s. and Yn → Y . We showed that the individual components converge almost surely to their limit, and therefore  T  T   a.s YbNL (0, α), YbNL (1; α) → EF0 ȲiL (0, α) , EF0 ȲiL (1, α) , which also establishes convergence in probability. Now we will show that YbNL (a; α) has an asymptotically univariate normal distribution, for a = 0, 1, and afterwards we extend this to showing that Yb L (α) has an asymptotically N bivariate normal distribution. Univariate result h L i p L b Based on the above, Y (a, α) → EF0 Y i (a, α) = µa0 . Theorem A in section 7.2.2 of Serfling (1980) requires: (i) µa0 is an isolated root of Ψ0 (µ) = 0 and ψa,α (·; µ) is monotone in µ. (Shown above) 21 (ii) Ψ0 (µ) is differentiable at µa0 with Ψ00 (µa0 ) 6= 0. R 2 (oi ; µ)dF0 (oi ) is finite in a neighborhood of µa0 . (iii) ψa,α Proof of (ii) Z " Ψ0 (µ) = 1 = ni # ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X I(Aij = a)Yij − µ dF0 (oi ) ni j=1 fA|L,i (Ai |Li ) Z X ni fA|L,i,α (Ai,−j |Aij = a, Li , α) I(Aij = a)Yij dF0 (oi ) − µ f (A |L ) i i A|L,i j=1 So Ψ0 is linear in µ and therefore differentiable everywhere, with Ψ00 (µ) = −1 6= 0. Proof of (iii) Consider a neighborhood of µa0 of the form (µa0 − , µa + ), for some  > 0. Then, Z 2 ψa,α (Oi ; µ)dF0 (oi ) !2 Z ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X I(Aij = a)Yij − µ dF0 (oi ) = ni j=1 fA|L,i (Ai |Li ) Z = 2 ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X I(Aij = a)Yij − µ dF0 (oi ) ni j=1 fA|L,i (Ai |Li ) I will show that 1 ni Pni j=1 fA|L,i,α (Ai,−j |Aij =a,Li ,α) I(Aij fA|L,i (Ai |Li ) = a)Yij − µ is bounded by a con- stant c in a neighborhood of µ0 and therefore the integral is bounded by c2 . ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X I(Aij = a)Yij − µ ni j=1 fA|L,i (Ai |Li ) ni fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X ≤ |Yij | + |µ| ni j=1 fA|L,i (Ai |Li ) ni 1 X |Yij | ≤ + |µ| ni j=1 fA|L,i (Ai |Li )  Z ni X 2 −1 ⇒ ψa,α (Oi ; µ)dF0 (oi ) ≤ |µ| + (ni ) EF0 j=1 ≤ |µ| + (ni )−1 |Yij | fA|L,i (Ai |Li ) ni q X  EF0 (Yij2 )EF0 (fA|L,i (Ai |Li )−2 ) < |µ| + M ρ−1 = c (A.1) j=1 We have shown that the conditions of Theorem A (section 7.2.2 of Serfling (1980)) are satisfied, and therefore h L i √  L d n YbN (a; α) − EF0 Y i (a, α) → N (0, σ 2 ),  2  where σ 2 = E ψa,α (Oi ; µa0 ) , since Ψ00 (µ0 ) = −1. 22 Bivariate result We will use Theorem 5.41 of van der Vaart (1998). The assumptions of this theorem are the so-called “classical” conditions, and are stricter than necessary to prove asymptotic normality. However, this theorem is often used in practice, since the conditions are sometimes easy to prove, as they are here. We denote ψ(oi ; µ) = (ψ0,α (oi ; µ0 ), ψ1,α (oi ; µ1 ))T , for µ = (µ0 , µ1 ),. and Ψn (µ), Ψ0 (µ) similarly as above, but for the vector ψ. It was shown that µ0 satisfies Ψ0 (µ) = 0, and that YbNL (α) is a consistent estimator of µ0 . In order to apply Theorem 5.41, we show that (i) the function µ → ψ(oi ; µ) is twice 2 continuously differentiable for every vector oi , (ii)   EF0 kψ(Oi ; µ0 )k2 < ∞ (where k · k2 · is the 2-norm1 ), (iii) The matrix EF0 ψ(Oi ; µ0 ) exists and is nonsingular, (iv) ∃ fixed ·· ·· integrable function ψ(oi ) such that ψ dominates the second order partial derivatives of ψ ∀µ in a neighborhood of µ0 . Proof of (i). It has already been shown that ψa,α (oi ; µ) is linear in µ and therefore twice continuously differentiable with respect to µ for every vector (oi ). Proof of (ii).  " #2  ni  X  X 1 Pα,L (Ai,−j |Aij = a, Li ) I(Aij = a)Yij − µa0 EF0 kψ(Oi ; µ0 )k22 =E   ni j=1 fA|L,i (Ai |Li ) a∈{0,1} " #2 ni X fA|L,i,α (Ai,−j |Aij = a, Li , α) 1 X = E I(Aij = a)Yij − µa0 ni j=1 fA|L,i (Ai |Li ) a∈{0,1} ≤2c2 (because of (A.1)) Proof of (iii).  · ψ(oi ; µ) ∂ψ0,α (oi ;µ0 ) 0 =  ∂ψ ∂µ 1 1,α (oi ;µ ) 0 ∂µ  ∂ψ0,α (oi ;µ0 ) ∂µ1  ∂ψ1,α (oi ;µ1 ) ∂µ1 = ! −1 0 0 −1 = −I2 < ∞ and non-singular, (A.2) where the diagonal elements of partial derivatives are calculated in the proof of consistency, and the non-diagonal elements are clearly 0 since the functions do not include the corresponding components of µ. Proof of (iv). Based on equation (A.2), we have that all second order derivatives are ·· equal to 0, and are therefore dominated by the integrable function ψ(oi ) = 0. 1 k(v1 , v2 , . . . , vn )k2 = (v12 + v22 + . . . , vn2 )1/2 23 From Theorem 5.41 of van der Vaart (1998), we have that   −1 N  · √  L 1 X b √ n YN (α) − µ0 = − E ψ(Oi ; µ0 ) ψ(Oi ; µ0 ) + oP (1) n i=1   T   √  d ⇒ n YbNL (α) − µ0 → N 0, A(µ0 )−1 V (µ0 ) A(µ0 )−1 ,     where A(µ0 ) = E −ψ(Oi ; µ0 ) = I2 (from A.2), and V (µ0 ) = E ψ(Oi ; µ0 )ψ(Oi ; µ0 )T . · Example A.1. We provide an example of the application of the delta method on the L L L result of Theorem 1. Consider the direct effect defined as DE (α) = Y (0; α) − Y (1; α). d L (α) = Yb L (0; α) − Yb L (1, α) is a consistent estimator, and can be written as Then DE g(b µ) for g((x1 , x2 )T ) = x1 − x2 . From the Delta method, we know that  √  L L d n DE (α) − DE (α) → N (0, σ 2 ) ∂g for σ 2 = ∇g(µ0 )T V (µ0 )∇g(µ0 ), where ∇g((x1 , x2 )T ) = ( ∂x , ∂g )T = (1, −1)T , and 1 ∂x2 V (µ0 ) is as in Theorem 1. A.3 Proofs of asymptotic results for correctly specified propensity score   Lemma 1. If condition 3 of Theorem 2 holds, then E ψ γ (Li , Ai ; γ 0 ) < ∞ Proof of Lemma 1. Denote ψ γ = (ψγ1 , ψγ2 , . . . , ψγp )T . Then, EF2 0 ψγk  ≤E h 2 ψγk i ≤ p X E h ψγl 2 i = EF2 0 ψ γ (Li , Ai ; γ) 2  < ∞ ⇒ EF0 ψγk < ∞ l=1 where the first inequality uses Jensen’s inequality for g(x) = x2 . From this, we see that the score functions are integrable with finite expectation. Lemma 2. Assuming that the conditions of Theorem 2 hold, the estimator YbNL (α) using the estimates of the correctly specified propensity score model is consistent for µ0 . Proof of Lemma 2. Consider the augmented estimated equations defined as Ψn (θ) = PN i=1 ψ(Yi , Ai , Li ; θ), where   ψ γ (Li , Ai ; γ)   0  ψ(Yi , Ai , Li ; θ) =  ψ (Y , A , L ; µ , γ) 0,α i i i   1 ψ1,α (Yi , Ai , Li ; µ , γ) (p+2)×1 where θ = (γ T , µ0 , µ1 )T and p is the number of parameters of the parametric propensity score model. Note that ψa,α is now a function of γ since it uses the estimated propensity 24 b The first p elements of θ b correspond score. Denote the vector that solves Ψn (θ) = 0 as θ. to estimators of the propensity score model parameters, which are consistent for γ 0 . Since Yb L (α) based on the true propensity score is consistent, f (ai |li ; γ) is differentiable N p b which correspond in γ and therefore continuous, and γ → γ 0 , the last two elements of θ to Yb L (0, α), Yb L (1, α) using the estimated propensity score are consistent estimators of L L Y (0, α), Y (0, α). Proof of Theorem 2. We will again use Theorem 5.41 of van der Vaart (1998). Since consistency has been established in Lemma 2, showing the four conditions stated in the proof of Theorem 1 for the augmented ψ will establish asymptotic normality. Denote θ 0 = (γ T0 , µT0 )T . Proof of (i). By the conditions of the theorem, γ → ψ γ (li , ai ; γ) is twice continuously differentiable. This implies that ψa,α (yi , li , ai ; µa0 , γ), a = 0, 1 are three times continuously differentiable with respect to γ. Therefore, the second order partial derivatives with respect to γ exist and are continuous. Moreover, since ψ γ (li , ai ; γ) is not a function of µa , and using (A.2), the second partial derivatives with respect to elements of µ = (µ0 , µ1 ) exist and are continuous. Lastly, all second order derivatives with respect to an element of µ and an element of γ exist and are 0, and therefore continuous. This shows that θ → ψ(yi , li , ai ; θ) is twice continuously differentiable. Proof of (ii). We want to show that EYi ,Li ,Ai kψ(Yi , Li , Ai ; θ 0 )k22 < ∞. But EYi ,Li ,Ai kψ(Yi , Li , Ai ; θ 0 )k22 = ELi ,Ai kψ γ (Li , Ai ; γ 0 )k22 + X EYi ,Li ,Ai kψa,α (Yi , Ai , Li ; µa0 )k2 , a∈{0,1} where the first term is finite from the assumptions on the propensity score model, and the terms in the summation are finite from (A.1).   · Proof of (iii). We want to show that the matrix EYi ,Li ,Ai ψ(yi , li , ai ; θ 0 ) exists and is non singular. We have  ∂ ∂γ T ψ γ (Li , Ai ; γ)p×p ·  ∂ 0 ψ(yi , li , ai ; θ) =   ∂γ T ψ 0,α (Yi , Li , Ai ; µ , γ)1×p ∂ ∂γ T ψ 1,α (Yi , Li , Ai ; µ1 , γ)1×p 0p×1 0p×1 −1 0   0  , −1 0 1 where the theh0’s in the top row iare because ψ γ is not a function h of µ , µ . We have as- i sumed that E ∂γ∂T ψ γ (Li , Ai ; γ 0 ) exists and we will show that E ∂γ∂T ψa,α (Yi , Li , Ai ; µa0 , γ 0 ) exists for a = 0, 1. 25 Showing that E h ∂ ∂γ T i ψa,α (Yi , Li , Ai ; µa0 ) < ∞ for a = 0, 1. 2 !  ni 1 X ∂ 1 Pα,L (Ai,−j |Aij = a, Li )I(Aij = a)Yij ni j=1 ∂γk fA|L,i (Ai |Li ) ! ! ni ∂ log fA|L,i (Ai |Li ) 1 X ∂γk Pα,L (Ai,−j |Aij = a, Li )I(Aij = a)Yij =− ni j=1 fA|L,i (Ai |Li ) ! ni   1 X P (A |A = a, L ) α,L i,−j ij i = − ψγk Õi ; γ I(Aij = a)Yij , (A.3) ni j=1 fA|L,i (Ai |Li )     h  i where ψγk Õi ; γ is the k th component of ψ γ Õi ; γ for which EF0 ψγk Õi ; γ 0 < ∂ ψa,α (Oi ; µa , γ) = ∂γk ∞ (Lemma 1). Also, Pα,L (Ai,−j |Aij =a,Li ) I(Aij fA|L,i (Ai |Li ) = a)Yij < M/δo using the conditions of i Theorem 1. So, we have shown that E ∂γ∂T ψa,α (Yi , Li , Ai ; µa0 ) < ∞.   · From this, we conclude that EF0 ψ(yi , li , ai ; θ) exists. Furthermore, from the theh i orem assumptions we have that E ∂γ∂T ψ γ (Li , Ai ; γ 0 ) is non-singular and the rows of h ∂ψ γ /∂γ T are linearly independent. The bottom two rows are linearly independent to the rest since they are the only ones to includenon-zero elements  in the last two columns. · From this, we conclude that the rows of E ψ(Yi , Li , Ai ; θ 0 ) are linearly independent, and the matrix is full rank and non-singular. Proof of (iv). We need to show that ∃ integrable function α(oi ) fixed, such that α(oi ) dominates all the second order partial derivatives of ψ(oi ; θ). Therefore, we need to show that for k, l ∈ {1, 2, . . . , p}, a ∈ {0, 1}: 1. ∂ 2 ψ γ (õi ; γ) ≤ αkl (oi ), ∂γk ∂γl ∂ 2 ψ γ (õi ; γ) 2. ≤ αka (oi ), a ∂γk ∂µ 3. ∂ 2 ψ γ (õi ; γ) ≤ αa1 a2 (oi ), ∂µa1 ∂µa2 4. ∂ 2 ψa,α (oi ; µa , γ) ≤ ξ a1 a2 (oi ), ∂µa1 ∂µa2 ∂ 2 ψa,α (oi ; µa , γ) 5. ≤ ξka1 (oi ), a 1 ∂µ ∂γk 6. 2 ∂ 2 ψa,α (oi ; µa , γ) ≤ ξkl (oi ), ∂γk ∂γl Note that even if the estimates of γ were used to define the counterfactual treatment allocation Pα,L (Ai,−j |Aij = a, Li ), it is considered fixed as a function of γ, since it is used to represent a fixed realistic treatment allocation program. 26 for θ in a neighborhood of θ 0 , where αkl (oi ), αka (oi ), αa1 a2 (oi ), ξ a1 a2 (oi ), ξka (oi ), ξkl (oi ) are F0 -integrable. If we show the above, by setting α(oi ) = maxk,l,a {αkl (oi ), αka (oi ), αa1 a2 (oi ), ξ a1 a2 (oi ), ξka (oi ), ξkl (oi )} we have that all second order partial derivatives are dominated by the F0 integrable α(oi ). Since ψ γ (õi ; γ) is not a function of µa , conditions 2, 3 are easy to satisfy by setting αka (oi ) = αa1 a2 (oi ) = 0. The same is true for conditions 4, 5, since ∂ψa,α (oi ; µa , γ)/∂µa1 = −I(a = a1 ) and therefore all second order derivatives that include at least one derivative with respect to µa1 will be equal to 0. So we can set ξ a1 a2 (oi ) = ξka (oi ) = 0. ·· From the assumptions of the theorem, we know that ∃ ψ γ (li , ai ) integrable such that ·· ·· ∂ 2 ψ γ (li , ai ; γ) ≤ ψ γ (li , ai ), for all γ in a neighborhood of γ 0 . Then, αkl (oi ) = ψ γ (oi ) ∂γk ∂γl satisfy condition 1. Since γ0 is in an open subset of the Euclidean space, there exists  > 0 ·· such that the second partial derivatives of ψ γ are dominated by ψ for all γ ∈ N  (γ 0 ) = {γ : kγ − γ 0 k < }, subset of the parameter space. Let N /2} ⊂ N  (γ 0 ). Then, N /2 /2 (γ 0 ) = {γ : kγ − γ 0 k ≤ (γ 0 ) is a compact subset of the Euclidean space. We will show that for γ ∈ N /2 (γ 0 ) the second order partial derivatives in 6 are bounded by an integrable function. First, let’s acquire their form: !# " ni   1 X ∂ ∂ 2 ψa,α (Oi ; µa , γ) P (A |A = a, L ) α,L i,−j ij i = −ψγl Õi ; γ I(Aij = a)Yij ∂γk ∂γl ∂γk ni j=1 fA|L,i (Ai |Li ) ! ni  1 X ∂ l Pα,L (Ai,−j |Aij = a, Li ) =− I(Aij = a)Yij ψ Õi ; γ ∂γk γ ni j=1 fA|L,i (Ai |Li )   ∂ l − ψγ Õi ; γ ψa,α (Oi ; µa , γ) ∂γk  ∂ l =− ψγ Õi ; γ ∂γk ni Pα,L (Ai,−j |Aij = a, Li ) 1 X I(Aij = a)Yij ni j=1 fA|L,i (Ai |Li ) ! ! ni X 1 P (A |A = a, L ) α,L i,−j ij i + ψγl I(Aij = a)Yij ni j=1 fA|L,i (Ai |Li ) #   " X ni      ∂ l 1 Pα,L (Ai,−j |Aij = a, Li ) = ψγl Õi ; γ ψγk Õi ; γ − ψγ Õi ; γ I(Aij = a)Yij ∂γk ni j=1 fA|L,i (Ai |Li )     Õi ; γ ψγk Õi ; γ where the first and third equation use (A.3), and the second equation is an application of the chain rule. Then     ∂ 2 ψa,α (Oi ; µa , γ) M l ∂ l k < ψ Õi ; γ ψγ Õi ; γ − ψ Õi ; γ ∂γk ∂γl δo γ ∂γk γ 27 (A.4)   For all k, l ∈ {1, 2, . . . , p}, ψγl Õi ; γ , ∂ ψl ∂γk γ  Õi ; γ  are differentiable and therefore continuous in γ, implying that the function on the right-hand side of (A.4) is continuous in γ.      ∂ l Define g(γ) = EF0 ψγl Õi ; γ ψγk Õi ; γ − ψγ Õi ; γ . Then g(γ) is continuous ∂γk /2 /2 in γ. But since N (γ 0 ) is a compact set, g(γ) is bounded in N (γ 0 ), and in fact achieves a maximum. Let ξkl (oi ) = ξkl = n o M /2 max g(γ), γ ∈ N (γ 0 ) . δo ∂ 2 ψa,α (Oi ; µa , γ) /2 < ξkl (oi ), ∀γ ∈ L (γ 0 ), and ξkl is integrable since it is a ∂γk ∂γl constant function. Then Then, set α(oi ) = max{αkl (oi ), αka (oi ), αa1 a2 (oi ), ξ a1 a2 (oi ), ξka (oi ), ξkl (oi )}, and all second order partial derivatives are dominated by the F0 -integrable α(oi ), for all θ ∈ N /2 (θ 0 ) = {θ : kθ − θ0 k < /2}. From Theorem 5.41 of van der Vaart (1998), we have that  √  N →∞ n θb − θ0 → N (0, Q(θ0 )), where Q(θ0 ) = A(θ0 )−1 B(θ)[A(θ0 )−1 ]T   ·   for A(θ0 ) = E ψ(Oi ; θ 0 ) , and B(θ0 ) = E ψ(Oi ; θ 0 )ψ(Oi ; θ 0 )T . However, we are only interested in the bottom-right 2 × 2 submatrix of Q(θ0 ) which corresponds to the asymptotic variance of (b µ0 , µ b1 )T when the propensity score model is estimated. Note that A(θ), B(θ) can be rewritten as " #     A11 0 ∂ψγ ∂(ψ0 , ψ1 )T A(θ) = where A11 = E A21 = E , ∂γ T p×p ∂γ T A21 −I2 2×p " #   B11 B12 T , and B(θ) = for B11 = E ψγ ψγT p×p B12 = E[ψγ ψ0 , ψγ ψ1 ]p×2 , B21 = B12 B21 B22 " # ψ02 ψ0 ψ1 B22 =E , ψ1 ψ0 ψ12 where the arguments (Yi , Li , Ai ) have been suppressed. Then, " A(θ)−1 B(θ)[A(θ)−1 ]T = A−1 11 0 A21 A−1 −I2 11 28 #" #" B11 B12 A−1 11 B21 B22 0 A21 A−1 −I2 11 #T " = = A−1 11 B12 #" # −1 T T (A−1 ) (A A ) 21 11 11 −1 A21 A−1 0 −I2 11 B11 − B21 A21 A11 B12 − B22 " #" # −1 −1 T −1 T −Ip −B11 B12 −(B11 ) −(A21 B11 ) −1 −A21 − B21 −A21 B11 B12 − B22 " = ... ... " = A−1 11 B11 (A21 + ... ... + −1 A21 B11 B12 + B22 −1 (B11 symmetric ⇒ B11 symmetric) # ... −1 T A21 B11 A21 + (Since A11 = −B11 .) # ... −1 T B21 )B11 A21 −I2 0 −1 A21 B11 B12 + T −1 A21 B11 B12 + B22 T (B21 = B12 ) −1 T −1 So the asymptotic covariance matrix of (b µ0 , µ b1 ) is equal to A21 B11 A21 + A21 B11 B12 +  T −1 A21 B11 B12 + B22 . B Asymptotic variance of the population average potential outcome estimator Denote [V (µ0 )]ij the ij element of the covariance matrix, and remember that µa = EF0 [Y i (a, L0i , α)]. Then  [V (µ0 )](a+1)(a+1) [V (µ0 )]12 C !2  ni X 1 Pα,L (Ai,−j |Aij = a, Li ) =EF0  I(Aij = a)Yij − µa  ni j=1 fA|L,i (Ai |Li )  !2  ni X Pα,L (Ai,−j |Aij = a, Li ) 1 I(Aij = a)Yij  + µ2a − =EF0  ni j=1 fA|L,i (Ai |Li ) # " ni Pα,L (Ai,−j |Aij = a, Li ) 1 X I(Aij = a)Yij − 2µa EF0 ni j=1 fA|L,i (Ai |Li )   L   L =EF0 Y i (a, α)2 + µ2a − 2µa EF0 Y i (a, α)  L    L   L =EF0 Y i (a, α)2 − EF2 0 Y i (a, α) = V arF0 Y i (a, α) h  i L b Yi (1, α) − µ1 =EF0 h i h i h i =EF0 YbiL (0, α)YbiL (1, α) − µ0 EF0 YbiL (1, α) − µ1 EF0 YbiL (0, α) + µ0 µ1 h i h i h i =EF0 YbiL (0, α)YbiL (1, α) − EF0 YbiL (0, α) EF0 YbiL (1, α)  L  L =CovF0 Y i (0, α), Y i (1, α) YbiL (0, α) − µ0 Population average potential outcome definitions in the literature Assuming partial interference, Hudgens and Halloran (2008), and Tchetgen Tchetgen and VanderWeele (2012) defined the population average potential outcome as an average 29 1 N of the group-level potential outcomes Y (a; α) = PN i=1 Y i (a; α). On the other hand, Liu et al. (2016) define the population average potential outcomes without assuming partial interference (and therefore without assuming the existence of interference clusters) as the average of the individual average potential outcomes. However, their asymptotic results are based on the assumption of partial interference, under which the population average potential outcome can be written as Y Liu ni N X X 1 (a; α) = PN i=1 ni Y ij (a; α) = N X ni PN i=1 i=1 j=1 i=1 ni Y i (a; α). Therefore, the estimand of Liu et al. (2016), if partial interference is assumed, is equal to a weighted average of the group average potential outcomes with weights proportional to the number of individuals in the cluster. Estimators for both quantities can be written in the form Yb (a; α) = N X di PN i=1 i=1 di Ybi (a; α), di > 0, (C.1) where Ybi (a; α) is an unbiased estimator of the group average potential outcome for cluster i. The difference of the population average estimators lies in the specification of di , where di = 1 and di = ni accordingly, for the two definitions of population average potential outcome. Proposition 1. Under the assumption of partial interference (which is also assumed by Liu et al. (2016) in their asymptotic results), all population average potential outcome estimators of the form (C.1) for which di > 0 does not depend on N , EF0 [di ] < ∞, and   di q Y i (a; α) are consistent for EF0 Y i (a; α) . Proof of Proposition 1. This can be shown by considering the estimating equation PN i=1 Gi (Yi , Li , Ai , di ; µ) = 0, where h i Gi (Yi , Li , Ai , di ; µ) = di Ybi (a; α) − µ , The solution to this equation is µ b= N X i=1 and the solution to di PN i=1 di R Ybi (a, α), Gi (yi , li , ai , di ; µ)dF0 (yi , li , ai ) = 0 is n  n o  o b b E E d Y (a; α)|d E d E Y (a; α) i i i i i E[di Ybi (a; α)] µ0 = = = E[di ] E[di ] E[di ]     E di Y i (a; α) = = EF0 Y i (a; α) , E[di ] 30 since di q Y i (a; α). Since Gi is monotone in µ, both PN i=1 Gi and R Gi are monotone in µ which implies p uniqueness of the roots and establishes µ b → µ0 . Based on this, both estimators are consistent for the same quantity (assuming ni q Y i (a; α)3 ). However, when the propensity score is known, the weighting scheme di = c, constant, leads to the asymptotically most efficient estimator among all of the estimators of the form (C.1), based on the following proposition. Since two estimators using di and d0i = cdi are exactly the same, the estimator (C.1) for di = 1 is the asymptotically efficient estimator. Proposition 2. Assuming that the conditions of Theorem 1 and Proposition 1 hold, and P b ∃Md such that di < Md , ∀i, then Yb (a; α) = N1 N i=1 Yi (a; α) is the asymptotically most   efficient estimator of EF0 Y i (a; α) among all estimators of the class (C.1). PN di b P Y (a; α) are Proof of Proposition 2. Based on Proposition 1, µ bd (a; α) = h i=1 di ii   consistent for µ0 = EF0 Y i (a; α) . Since Gi (Yi , Li , Ai , di ; µ) = di Ybi (a; α) − µ is mono∂ tone decreasing in µ with ∂µ Gi (Yi , Li , Ai , di ; µ) = −di < 0, we have that µd and µ0 are R PN ∂ isolated roots of i=1 Gi = 0 and Gi = 0. Also, E[ ∂µ Gi (Yi , Li , Ai , di ; µ)] = −E[di ] 6= 0. R 2 Lastly, from (A.1) and di < Md we have that Gi is bounded by Md2 c2 . We can straightforwardly use M-estimation theory to acquire the asymptotic variance. Lemma √ d A in section 7.2.1 of Serfling (1980), n(b µd − µ0 ) → N (0, σ 2 (d)), where σ 2 (d) = EF0 [G2i (·, di ; µ0 )]/EF2 0 [di ]. We will show that σ 2 (d) is minimized h when di = 1, ∀i. i Since di qY i (a; α), we have that h i EF0 d2i (Yb (a; α) − µ0 )2 EF0 [d2i ] 2 2 2 2 b ( Y (a; α) − µ ) = di q(Y i (a; α)−µ0 ) . Then σd = = E F i 0 [EF0 di ]2 EF2 0 [di ] 0 EF0 [d2i ] 2 σ , where σ12 is the asymptotic variance of the estimator for di = 1. From Jensen’s EF2 0 [di ] 1 inequality, and since φ(x) = x2 is a convex function, we have that EF2 0 [di ] ≤ EF0 [d2i ], which establishes σd2 ≥ σ12 . Equality holds if and only if all values di are equal. D Computation notes D.1 Propensity score intercept for a specific cluster average propensity of treatment As described in section 5.3, ξiα is chosen such that ni 1 X Pα,L (Aij = 1|Li ) = α, ni j=1 3 Note that for di = 1, the independence condition is satisfied. 31 (D.1) where logitPα,L (Aij = 1|Li ) = ξiα + Lij δ, and Lij = (L1ij , L2ij , . . . , Lpij )T the value of the p predictors of the propensity score model. Then, (D.1) can be rewritten as ni ni ni 1 X 1 X exp {ξiα + Lij δ} 1 X exp {Lij δ} Pα,L (Aij = 1|Li ) = = =α α ni j=1 ni j=1 1 + exp {ξi + Lij δ} ni j=1 exp {ξiα } + exp {Lij δ} ⇐⇒ ni 1 X exp{Lij δ} −α =0 ni j=1 exp{−ξiα } + exp{Lij δ} Since the only unknown is ξiα , we use optimization techniques and set ξiα to be the value ξ at which the function ni 1 X exp {Lij δ} −α g(ξ) = ni j=1 exp{−ξ} + exp{Lij δ} is minimized. D.2 Product of small numbers Calculating the estimator (3.1) above can lead to problems since it includes (both in the numerator and the denominator) products of probabilities. This can be simplified by rewriting the estimator as: 1 Ybi (a; α) = ni ni X Pα,L (Ai,−j |Aij = a, Li ) I(Aij = a)Yij fA|L,i (Ai |Li ) j=1 ni 1 X Pα,L (Ai,−j |Aij = a, Li ) π(Ai ; α) I(Aij = a)Yij = , ni j=1 π(Ai,−j ; α) fA|L,i (Ai |Li ) αa (1 − α)1−a where π(ai ; α) = Qni j=1 αaij (1 − α)1−aij , and fA|L,i (Ai |Li ) = Z Y ni fA|L,i (Aij |Lij , δ̃, σb2 , bi )f (bi ; σb2 )dbi . j=1 For the first ratio, we write Pα,L (Ai,−j |Aij = a, Li ) Y fA|L,i,α (Aij |Lij , α) , = π(Ai,−j ; α) αAij0 (1 − α)1−Aij0 j 0 6=j and for the second ratio #−1 2 2 f (A |L , δ̃, σ , b )f (b ; σ )db ij ij i i i A|L,i b b j=1 Qni A ij (1 − α)1−Aij α j=1 #−1 "Z n i Y fA|L,i (Aij |Lij , δ̃, σb2 , bi ) 2 f (bi ; σb )dbi , = αAij (1 − α)1−Aij j=1 π(Ai ; α) = fA|L,i (Ai |Li ) " R Qn i which is much more stable to calculate. 32 E Simulation results Estimated PS Estimated PS Estimated PS DE(α ) IE(0.3, α ) Y(1, α ) 9e-05 6e-05 8e-05 5e-05 7e-05 4e-05 4e-05 6e-05 2e-05 Monte Carlo variance 5e-05 3e-05 4e-05 4e-05 0e+00 6e-05 8e-05 1e-04 0e+00 2e-05 True PS DE(α ) 0.000175 4e-05 6e-05 3e-05 4e-05 5e-05 True PS True PS IE(0.3, α ) Y(1, α ) 6e-05 0.00020 0.000150 8e-05 0.00015 0.000125 0.00010 6e-05 0.000100 0.00005 0.000075 4e-05 0.000050 0.00005 0.00000 0.00010 0.00015 0.000000.000050.000100.000150.00020 3e-05 5e-05 7e-05 9e-05 Mean of estimated variances Figure 5: Mean estimated variance from the asymptotic distribution, and Monte Carlo variance of the estimates. The diagonal lines correspond to the 45 degree line, and each point corresponds to a value of α. F F.1 Data application Sensitivity of data application results to the choice of clustering Rows correspond to the direct effect DE(α) and the indirect effects IE(α1 , α2 ) for α1 ∈ {0.32, 0.41}. Columns correspond to the clustering method and correspond to Ward’s Ward (1963) method for 30 and 70 clusters, and complete clustering with 50 clusters. The increasing trend in the indirect effect persists for all clustering specifications, while the direct effect results are sensitive to the specification of the hierarchical clustering method used. 33 Ward 30 Ward 70 Complete 50 Ward 30 Ward 70 Complete 50 Ward 30 Ward 70 Complete 50 DE(α) 0.01 0.00 −0.01 IE(0.226, α) 0.01 0.00 −0.01 −0.02 IE(0.414, α) 0.03 0.02 0.01 0.00 −0.01 0.2 F.2 0.3 0.4 0.5 0.2 0.3 α 0.4 0.5 0.2 0.3 0.4 0.5 Estimates and confidence intervals of the direct and indirect effect under an independent Bernoulli treatment allocation We estimate the direct and indirect effects under the counterfactual scenario found in Tchetgen Tchetgen and VanderWeele (2012) that considers assigning treatment to units independently and with equal probability. Confidence intervals are based on asymptotic distributions derived as in Theorems 2, 3. 0.01 0.04 −0.01 −0.02 IE(0.414,alpha) 0.00 IE(0.226,alpha) DE(α) 0.00 −0.01 −0.02 −0.03 0.03 0.02 0.01 0.00 −0.04 −0.01 −0.05 0.2 0.3 α 0.4 0.5 0.2 0.3 α 0.4 0.5 0.2 0.3 α 0.4 0.5 The results’ pattern is similar to the ones in Figure 3, but all estimates are closer to 0. This implies that basing our inferences on estimands in unrealistic counterfactual treatment allocation programs would underestimate the potential benefits of SCR/SNCR. 34
10math.ST
arXiv:1603.08661v2 [cs.LG] 6 May 2016 Regret Analysis of the Anytime Optimally Confident UCB Algorithm Tor Lattimore Department of Computing Science University of Alberta, Canada [email protected] Abstract I introduce and analyse an anytime version of the Optimally Confident UCB (OCUCB) algorithm designed for minimising the cumulative regret in finitearmed stochastic bandits with subgaussian noise. The new algorithm is simple, intuitive (in hindsight) and comes with the strongest finite-time regret guarantees for a horizon-free algorithm so far. I also show a finite-time lower bound that nearly matches the upper bound. 1 Introduction The purpose of this article is to analyse an anytime version of the Optimally Confident UCB algorithm for finite-armed subgaussian bandits [Lattimore, 2015]. For the sake of brevity I will give neither a detailed introduction nor an exhaustive survey of the literature. Readers looking for a gentle primer on multi-armed bandits might enjoy the monograph by Bubeck and Cesa-Bianchi [2012] from which I borrow notation. Let K be the number of arms and It ∈ {1, . . . , K} be the arm chosen in round t. The reward is Xt = µIt + ηt where µ ∈ RK is the unknown vector of means and the noise term ηt is assumed to be 1-subgaussian (therefore zero-mean). The n-step pseudo-regret of strategy π given mean vector µ with maximum mean µ∗ = maxi µi is Rµπ (n) = nµ∗ − E n X µIt , t=1 where the expectation is taken with respect to uncertainty in both the rewards and actions. In all analysis I make the standard notational assumption that µ1 ≥ µ2 ≥ . . . ≥ µK . The new algorithm is called OCUCB-n and depends on two parameters η > 1 and ρ ∈ (1/2, 1]. The algorithm chooses It = t in rounds t ≤ K and subsequently It = arg maxi γi (t) with s 2η log(Bi (t − 1)) γi (t) = µ̂i (t − 1) + , (1) Ti (t − 1) where Ti (t − 1) is the number of times arm i has been chosen after round t − 1 and µ̂i (t − 1) is its empirical estimate and  −1     K   X  ρ 1−ρ  . Bi (t − 1) = max e, log(t), t log(t)  min Ti (t − 1), Tj (t − 1) Ti (t − 1)     j=1 Besides the algorithm, the contribution of this article is a proof that OCUCB-n satisfies a nearly optimal regret bound. 1 Theorem 1. If ρ ∈ [1/2, 1] and η > 1, then   X  n∆2i log(n) 1 OCUCB-n log max , log(n) , Rµ (n) ≤ Cη ∆i + ∆i ki,ρ i:∆i >0 PK 2ρ 2ρ where ∆i = µ − µi and ki,ρ = j=1 min{1, ∆i /∆j } and Cη > 0 is a constant that depends only on η. Furthermore, for all ρ ∈ [0, 1] it holds that lim supn→∞ RµOCUCB-n (n)/ log(n) ≤ P 2η i:∆i >0 ∆i . ∗ Asymptotically the upper bound matches lower bound given by Lai and Robbins [1985] except for a factor of η. In the non-asymptotic regime the additional terms inside the logarithm significantly improves on UCB. √ The bound in Theorem 1 corresponds to a worst-case regret that is suboptimal by a factor of just log log n. Algorithms achieving the minimax rate are MOSS [Audibert and Bubeck, 2009] and OCUCB, but both require advance knowledge of the horizon. The quantity ki,ρ ∈ [1, K] may be interpreted as the number of “effective” arms with larger values leading to improved regret. A simple observation is that ki,ρ is always non-increasing in ρ, which makes ρ = 1/2 the canonical choice. In the special case that all suboptimal arms have the same expected payoff, then ki,ρ = K for all ρ. Interestingly I could not find a regime for which the algorithm is empirically sensitive to ρ ∈ [1/2, 1]. If ρ = 1, then except for log log additive terms the problem dependent regret enjoyed by OCUCB-n is equivalent to OCUCB. Finally, if ρ = 0, then the asymptotic result above applies, but the algorithm in that case essentially reduces to MOSS, which is known to suffer suboptimal finite-time regret in certain regimes [Lattimore, 2015]. Intuition for regret bound. Let us fix a strategy π and mean vector µ ∈ RK and suboptimal arm i. Suppose that E[Ti (n)] ≤ ∆−2 i log(1/δ)/2 for some δ ∈ (0, 1). Now consider the alternative mean reward µ′ with µ′j = µj for j 6= i and µ′i = µi + 2∆i , which means that i is the optimal action for mean vector µ′ . Standard information-theoretic analysis shows that µ and µ′ are not statistically separable at confidence level δ and in particular, if ∆i is large enough, then Rµπ′ (n) = Ω(nδ∆i ). For mean µ′ we have ∆′j = µ′i − µ′j ≈ max{∆i , ∆j } and for any reasonable algorithm we would like X log(n) ≥ Rµπ′ (n) = Ω(nδ∆i ) . ′ ∆ j ′ j:∆j >0 But this implies that δ should be chosen such that     X log(n)ki,1/2 log(n) 1   δ=O =O , n ∆′j ∆i n∆2i ′ j:∆j >0 which up to log log terms justifies the near-optimality of the regret guarantee given in Theorem 1 for ρ close to 1/2. Of course ∆ is not known in advance, so no algorithm can choose this confidence level. The trick is to notice that arms j with ∆j ≤ ∆i should be played about as often as arm i and arms j with ∆j > ∆i should be played about as much as arm i until Tj (t − 1) ≈ ∆−2 j . This means that as Ti (t − 1) approaches the critical number of samples ∆−2 we can approximate i K X K n o X  ki,1/2 1 1 −1 −1 . min Ti (t − 1), Tj (t − 1) 2 Ti (t − 1) 2 ≈ min ∆−2 = i , ∆j ∆i ∆2i j=1 j=1 Then the index used by OCUCB-n is justified by ignoring log log terms and the usual n ≈ t used by UCB and other algorithms. Theorem 1 is proven by making the above approximation rigorous. The argument for this choice of confidence level is made concrete in Appendix A where I present a lower bound that matches the upper bound except for log log(n) additive terms. 2 Concentration The regret guarantees rely on a number of concentration inequalities. For this section only let Pn X1 , X2 , . . . be i.i.d. 1-subgaussian and Sn = X and µ̂n = Sn /n. The first lemma bet t=1 low is well known and follows trivially from the maximal inequality and the fact that the rewards are 1-subguassian. 2 Important remark. For brevity I use Oη (1) to indicate a constant that depends on η but not other variables such as n and µ. The dependence is never worse than polynomial in 1/(η − 1).  2 ε Lemma 2. If ε > 0, then P {∃t ≤ n : St ≥ ε} ≤ exp − . 2n √ The following lemma analyses the likelihood that Sn ever exceeds f (n) p = 2ηn log log n where η > 1. By the law of the iterated logarithm lim supn→∞ Sn /f (n) = 1/η a.s. and for small δ it has been shown by Garivier [2013] that s ( )  log(n) = O(δ) . P ∃n : Sn ≥ 2n log δ The case where δ = Ω(1) seems not to have been analysed and relies on the usual peeling trick, but without the union bound. Lemma 3. There exists non-decreasing function n a monotone o p : (1, ∞) → (0, 1] such that for all p η > 1 it holds that P ∀n : Sn ≤ 2ηn log max {e, log n} ≥ p(η).   q Lemma 4. Let b > 1 and ∆ > 0 and τ = min n : supt≥n µ̂t + 2η log(b) < ∆ , then t E[τ ] ≤   p 1 E[τ 2 ] = Oη (1) · 1 + 2 log+(b) ∆ where log+(x) = max {1, log(x)} . The final concentration lemma is quite powerful and forms the lynch-pin of the following analysis. Lemma 5. Let ∆ > 0 and ρ ∈ [0, 1] and d ∈ {1, 2, . . .} and λ1 , . . . , λd ∈ [1, ∞] be constants. Furthermore, let α be the random variable given by v   ( ) u   u 2η α ≥ −∆ α = inf α ≥ 0 : inf µ̂s + t log max 1, Pd . ρ 1−ρ s   s } i=1 min {s, λi s Finally let β = inf {β ≥ 0 : β log(β) = α}. Then (a) If ρ ∈ (1/2, 1], then ∆E[α] = O  (b) If ρ ∈ [1/2, 1], then ∆E[β] = O  1 (2ρ − 1)(η − 1)2 1 (η − 1)2  X d n p o min ∆−1 , λi · i=1  X d n p o min ∆−1 , λi · i=1 The proofs of Lemmas 3 to 5 may be found in Appendices B to D. 3 Analysis of the KL-UCB+ Algorithm Let us warm up by analysing a simpler algorithm, which chooses the arm that maximises the following index. s   2η t γi (t) = µ̂i (t − 1) + . (2) log Ti (t − 1) Ti (t − 1) Strategies similar to this have been called KL-UCB+ and suggested as a heuristic by Garivier and Cappé [2011] (this version is specified to the subgaussian noise model). Recently Kaufmann [2016] has established the asymptotic optimality of strategies with approximately this form, but finite-time analysis has not been available until now. Bounding the regret will follow the standard path of bounding E[Ti (n)] for each suboptimal arm i. Let µ̂i,s be the empirical estimate of 3 the mean of the ith arm having observed s samples. Define τi and τ∆ by ( ) r 2η ∆i 2 2 τi = min t ≥ 1/∆i : sup µ̂i,s + log (n∆i ) < µi + s 2 s≥t s ) (   ∆i t 2η ≥ µ1 − . log max 1, τ∆ = min t : inf µ̂1,s + 1≤s≤n s s 2 If Ti (t − 1) ≥ τi and t ≥ τ∆i , then by the definition of τ∆i we have γ1 (t) ≥ µi + ∆i /2 and by the definition of τi s s 2η log(t/Ti (t − 1)) 2η log(n∆2i ) ∆i γi (t) = µ̂i (t − 1) + ≤ µ̂i (t − 1) + < µi + , Ti (t − 1) Ti (t − 1) 2 which means that It 6= i. Therefore Ti (n) may be bounded in terms of τi and τ∆i as follows: Ti (n) = n X t=1 1{It = i} ≤ τ∆i + n X t=τ∆i +1 1{It = i and Ti (t − 1) < τi } ≤ τi + τ∆i . It remains to bound the expectations of τi and τ∆i . By Lemma 5a with d = 1 and ρ = 1 and λ1 = ∞ it follows that E[τ∆i ] = Oη (1) · ∆−2 i and by Lemma 4   1 2 E[τi ] = Oη (1) · 1 + 2 log(n∆i ) . ∆i Therefore the strategy in Eq. (2) satisfies:  X X  1 2 KL-UCB+ log(n∆i ) . Rµ (n) = ∆i E[Ti (n)] = Oη (1) · ∆i + ∆i i:∆i >0 i:∆i >0 Remark 6. Without changing the algorithm and by optimising the constants in the proof it is posP sible to show that lim supn→∞ RµKL-UCB+ (n)/ log(n) ≤ i:∆i >0 2η/∆i , which is just a factor of η away from the asymptotic lower bound of Lai and Robbins [1985]. 4 Proof of Theorem 1 The proof follows along similar lines as the warm-up, but each step becomes more challenging, especially controlling τ∆ . Step 1: Setup and preliminary lemmas Define Φ to be the random set of arms for which the empirical estimate never drops below the critical boundary given by the law of iterated logarithm. ) ( r 2η1 log max {e, log s} ≥ µi for all s , (3) Φ = i > 2 : µ̂i,s + s where η1 = (1 + η)/2. By Lemma 3, P {i ∈ Φ} ≥ p(η1 ) > 0. It will be important that Φ only includes arms i > 2 and that the events i, j ∈ Φ are independent for i 6= j. From the definition of the index γ and for i ∈ Φ it holds that γi (t) ≥ µi for all t. The following lemma shows that the pull counts for optimistic arms “chase” those of other arms up the point that they become clearly suboptimal. Lemma 7. There exists a constant cη ∈ (0, 1) depending only on η such that if (a) j ∈ Φ and (b) µ̂i (t − 1) ≤ µi + ∆i /2 and (c) Tj (t − 1) ≤ cη min{Ti (t − 1), ∆−2 j }, then It 6= i. Proof. First note that Tj (t − 1) ≤ Ti (t − 1) implies that Bj (t − 1) ≥ Bi (t − 1). Comparing the indices: s s 2η log Bi (t − 1) 2ηcη log Bj (t − 1) ∆i γi (t) = µ̂i (t − 1) + ≤ µi + + . Ti (t − 1) Tj (t − 1) 2 4 On the other hand, by choosing cη small enough and by the definition of j ∈ Φ: s s r 2η log Bj (t − 1) 2ηcη log Bj (t − 1) cη γj (t) = µ̂j (t − 1) + ≥ µj + + Tj (t − 1) Tj (t − 1) Tj (t − 1) s 2ηcη log Bj (t − 1) ≥ µ1 + > γi (t) , Tj (t − 1) which implies that It 6= i. Let J = min Φ be the optimistic arm with the largest return where if Φ = ∅ we define J = K + 1 and ∆J = maxi ∆i . By Lemma 3, i ∈ Φ with constant probability, which means that J is subexponentially distributed with rate dependent on η only. Define Ki,ρ by ) ( X ∆2ρ i , (4) Ki,ρ = 1 + cη min 1, 2ρ ∆j j∈Φ,j6=i where cη is as chosen in Lemma 7. Since P {i ∈ Φ} = Ω(1) we will have Ki,ρ = Ω(ki,ρ ) with high probability (this will be made formal later). Let     n∆2i log(n) n∆2i log(n) bi = max , log(n), e and Bi = max , log(n), e ki,ρ Ki,ρ ) ( r 1 ∆i 2η . (5) τi = min s ≥ 2 : sup µ̂i,s′ + log(Bi ) ≤ µi + ∆i s′ ≥s s′ 2 The following lemma essentially follows from Lemma 4 and the fact that J is sub-exponentially distributed. Care must be taken because J and τi are not independent. The proof is found in Appendix E.   1 Lemma 8. E[τi ] ≤ E[Jτi ] = Oη (1) · 1 + 2 log(bi ) . ∆i The last lemma in this section shows that if Ti (t − 1) ≥ τi , then either i is not chosen or the index of the ith arm is not too large. Lemma 9. If Ti (t − 1) ≥ τi , then It 6= i or γi (t) < µi + ∆i /2. Proof. By the definition of τi we have τi ≥ ∆−2 and µ̂i (t − 1) ≤ µi + ∆i /2. By Lemma 7, i  −2 if j ∈ Φ and Tj (t − 1) ≤ cη min ∆i , ∆−2 , then It 6= i. Now suppose that Tj (t − 1) ≥ j  −2 −2 cη min ∆i , ∆j for all j ∈ Φ. Then  −1     K   X  ρ 1−ρ   Bi (t − 1) = max e, log(t), t log(t) min Ti (t − 1), Tj (t − 1) Ti (t − 1)     j=1   n∆2i log(n) = Bi . ≤ max e, log(n), Ki,ρ Therefore from the definition of τi we have that γi (t) < µi + ∆i /2. Step 2: Regret decomposition By Lemma 9, if Ti (n) ≥ τi , then It 6= i or γi (t) < µi + ∆i /2. Now we must show there exists a j for which γj (t) ≥ µi + ∆i /2. This is true for arms i with ∆i ≥ 2∆J since by definition γJ (t) ≥ µJ ≥ µi + ∆i /2 for all t. For the remaining arms we follow the idea used in Section 3 and define a random time for each ∆ > 0.   ∆ . (6) τ∆ = min t : inf sup γj (s) ≥ µ1 − s≥t j 2 5 Then the regret is decomposed as follows  X RµOCUCB-n (n) ≤ E  ∆i τi + 2∆J τ∆J /4 + i:∆i >0 X i:∆i <∆J /4  ∆i τ∆i  . (7) The next step is to show that the first sum is dominant in the above decomposition, which will lead to the result via Lemma 8 to bound E[∆i τi ]. Step 3: Bounding τ∆ This step is broken into two quite technical parts as summarised in the following lemma. The proofs of both results are quite similar, but the second is more intricate and is given in Appendix G. Lemma 10. The following hold: s X   log(bi ) (a). E ∆J τ∆J /4 ≤ Oη (1) · 1+ ∆2i i:∆i >0   s X X log(bi ) 1+ . ∆i τ∆i  ≤ Oη (1) · (b). E  ∆2i i:∆i >0 i:∆i <∆J /4 Proof of Lemma 10a. Preparing to use Lemma 5, let λ ∈ (0, ∞]K be given by λi = τi for i with ∆i ≥ 2∆J and λi = ∞ otherwise. Now define random variable α by v   ) ( u   u 2η ∆ α J α = inf α ≥ 0 : inf µ̂1,s + t log max 1, PK ≥ µ − 1 ρ 1−ρ s  s 8  } i=1 min {s, λi s and β = min {β ≥ 0 : β log(β) = α}. Then for t ≥ β and abbreviating s = T1 (t − 1) we have r 2η log B1 (t − 1) γ1 (t) = µ̂1,s + s v )! ( u u 2η t log(t) t = µ̂1,s + log max e, log(t), PK ρ 1−ρ } s i=1 min {s, Ti (t − 1) s v ( ) u u 2η α t ≥ µ̂1,s + log max 1, PK ρ 1−ρ } s i=1 min {s, Ti (t − 1) s v ) ( u u 2η ∆J α t ≥ µ1 − log max 1, PK , ≥ µ̂1,s + ρ 1−ρ s 8 min {s, λ s } i i=1 where the second last inequality follows since for arms with ∆i ≥ 2∆J we have Ti (n) ≤ τi = λi and for other arms λi = ∞ by definition. The last inequality follows from the definition of α. Therefore τ∆J /4 ≤ β and so E[∆J τ∆J /4 ] ≤ E[∆J β], which by Lemma 5b is bounded by " # d n o X p min ∆−1 λi E[∆J β] = E[E[∆J β|λ]] ≤ Oη (1) · E 1{∆J > 0} J , i=1  ≤ Oη (1) · E  X i:λi =∞,∆i =0  # " X √ X √ 1{∆J > 0}  + τi ≤ Oη (1) · E τi , (8) ∆min i:∆i >0 i:∆i >0 where the last line follows since E[J] = Oη (1) and     o n p X 1 J 1{∆ > 0} J   ≤ Oη (1) · ≤ Oη (1) max i : E[τi ] . ≤E E ∆min ∆min ∆min i:λi =∞,∆i =0 6 p √ The resulting is completedsubstituting E[ τi ] ≤ E[τi ] into Eq. (8) and applying Lemma 8 to i) show that E[τi ] ≤ Oη (1) · 1 + log(b . ∆2 i Step 4: Putting it together By substituting the bounds given in Lemma 10 into Eq. (7) and applying Lemma 8 we obtain s X X log(bi ) RµOCUCB-n (n) ≤ ∆i E[τi ] + Oη (1) · 1+ ∆2i i:∆i >0 i:∆i >0   X  1 n∆2i log(n) ≤ Oη (1) · ∆i + log max , log(n), e , ∆i ki,ρ i:∆i >0 which completes the proof of the finite-time bound. 1 −4 (n)} and Asymptotic analysis. Lemma 5 makes this straightforward. Let εn = min{ ∆min 2 , log ) ( r  α  2η ≥ −εn . log αn = min α : inf µ̂1,s + s s Ks Then by Lemma 5a with ρ = 1 and λ1 , . . . , λK = ∞ we have supn E[αn ] = Oη (1)Kε−2 n . Then we modify the definition of τ by ) ( r 2η log(n log(n)) ≤ µ1 − εn , τi,n = min s : sup µ̂i,s + s s′ ≥s which is chosen such that if Ti (t − 1) ≥ τi,n , then γi (t) ≤ µ1 − εn . Therefore RµOCUCB-n (n) ≤ ∆max E[αn ] + X i:∆i >0 ∆i E[τi,n ] ≤ Oη (1) · X ∆max K + ∆i E[τi,n ] . 2 εn i:∆i >0 −2 Classical analysis shows that lim supn→∞ E[τi,n ]/ log(n) ≤ 2η∆−2 i and limn→∞ εn / log(n) = 0, which implies the asymptotic claim in Theorem 1. lim sup n→∞ X 2η RµOCUCB-n (n) . ≤ log(n) ∆i i:∆i >0 This naive calculation demonstrates a serious weakness of asymptotic results. The ∆max Kε−2 n term in the regret will typically dominate the higher-order terms except when n is outrageously large. A more careful argument (similar to the derivation of the finite-time bound) would lead to the same asymptotic bound via a nicer finite-time bound, but the details are omitted for readability. Interestingly the result is not dependent on ρ and so applies also to the MOSS-type algorithm that is recovered by choosing ρ = 0. 5 Discussion The UCB family has a new member. This one is tuned for subgaussian noise and roughly mimics the OCUCB algorithm, but without needing advance knowledge of the horizon. The introduction of ki,ρ is a minor refinement on previous measures of difficulty, with the main advantage being that it is very intuitive. The resulting algorithm is efficient and close to optimal theoretically. Of course there are open questions, some of which are detailed below. Shrinking the confidence level. Empirically the algorithm improves significantly when the logarithmic terms in the definition of Bi (t − 1) are dropped. There are several arguments that theoretically justify this decision. First of all if ρ > 1/2, then it is possible to replace the t log(t) term in the definition of Bi (t − 1) with just t and use part (a) of Lemma 5 instead of part (b). The price 7 is that the regret guarantee explodes as ρ tends to 1/2 (also not observed in practice). The second improvement is to replace log(t) in the definition of Bi (t − 1) with   −1  K X    min Ti (t − 1), Tj (t − 1)ρ Ti (t − 1)1−ρ   , log+ t ·  j=1 which boosts empirical performance and rough sketches suggest minimax optimality is achieved. I leave details for a longer article. Improving analysis and constants. Despite its simplicity relative to OCUCB, the current analysis is still significantly more involved than for other variants of UCB. A cleaner proof would obviously be desirable. In an ideal world we could choose η = 1 or (slightly worse) allow it to converge to 1 as t grows, which is the technique used in the KL-UCB algorithm [Cappé et al., 2013, and others]. I anticipate this would lead to an asymptotically optimal algorithm. Informational confidence bounds. Speaking of KL-UCB, if the noise model is known more precisely (for example, it is bounded), then it is beneficial to use confidence bounds based on the KL divergence. Such bounds are available and could be substituted directly to improve performance without loss [Garivier, 2013, and others]. Repeating the above analysis, but exploiting the benefits of tighter confidence intervals would be an interesting (non-trivial) problem due to the need to exploit the non-symmetric KL divergences. It is worth remarking that confidence bounds based on the KL divergence are also not tight. For example, for Gaussian random variables they lead to the right exponential rate, but with the wrong leading factor, which in practice can improve performance as evidenced by the confidence bounds used by (near) Bayesian algorithms that exactly exploit the noise model (eg., Kaufmann et al. [2012], Lattimore [2016], Kaufmann [2016]). This is related to the “missing factor” in Hoeffding’s bound studied by Talagrand [1995]. Precise lower bounds. Perhaps the most important remaining problem for the subgaussian noise model is the question of lower bounds. Besides the asymptotic results by Lai and Robbins [1985] and Burnetas and Katehakis [1997] there has been some recent progress on finite-time lower bounds, both in the OCUCB paper and a recent article by Garivier et al. [2016]. Some further progress is made in Appendix A, but still there are regimes where the bounds are not very precise. References Jean-Yves Audibert and Sébastien Bubeck. Minimax policies for adversarial and stochastic bandits. In Proceedings of Conference on Learning Theory (COLT), pages 217–226, 2009. Sébastien Bubeck and Nicolò Cesa-Bianchi. Regret Analysis of Stochastic and Nonstochastic Multiarmed Bandit Problems. Foundations and Trends in Machine Learning. Now Publishers Incorporated, 2012. ISBN 9781601986269. Apostolos N Burnetas and Michael N Katehakis. Optimal adaptive policies for markov decision processes. Mathematics of Operations Research, 22(1):222–255, 1997. Olivier Cappé, Aurélien Garivier, Odalric-Ambrym Maillard, Rémi Munos, and Gilles Stoltz. Kullback–Leibler upper confidence bounds for optimal sequential allocation. The Annals of Statistics, 41(3):1516–1541, 2013. Aurélien Garivier. Informational confidence bounds for self-normalized averages and applications. arXiv preprint arXiv:1309.3376, 2013. Aurélien Garivier and Olivier Cappé. The KL-UCB algorithm for bounded stochastic bandits and beyond. In Proceedings of Conference on Learning Theory (COLT), 2011. Aurélien Garivier, Pierre Ménard, and Gilles Stoltz. Explore first, exploit next: The true shape of regret in bandit problems. arXiv preprint arXiv:1602.07182, 2016. Emilie Kaufmann. On Bayesian index policies for sequential resource allocation. arXiv preprint arXiv:1601.01190, 2016. 8 Emilie Kaufmann, Olivier Cappé, and Aurélien Garivier. On Bayesian upper confidence bounds for bandit problems. In International Conference on Artificial Intelligence and Statistics, pages 592–600, 2012. Tze Leung Lai and Herbert Robbins. Asymptotically efficient adaptive allocation rules. Advances in applied mathematics, 6(1):4–22, 1985. Tor Lattimore. Optimally confident UCB: Improved regret for finite-armed bandits. Technical report, 2015. URL http://arxiv.org/abs/1507.07880. Tor Lattimore. Regret analysis of the finite-horizon Gittins index strategy for multi-armed bandits. In Proceedings of Conference on Learning Theory (COLT), 2016. Michel Talagrand. The missing factor in Hoeffding’s inequalities. In Annales de l’IHP Probabilités et statistiques, volume 31, pages 689–702, 1995. Alexandre B Tsybakov. Introduction to nonparametric estimation. Springer Science & Business Media, 2008. A Lower Bounds I now prove a kind of lower bound showing that the form of the regret in Theorem 1 is approximately correct for ρ close to 1/2. The result contains a lower order − log log(n) term, which for large n dominates the improvements, but is meaningful in many regimes. Theorem 11. Assume a standard Gaussian noise model and let π be any strategy and µ ∈ [0, 1]K n∆2i be such that ki,1/2 log(n) ≥ 1 for all i. Then one of the following holds: 1. Rµπ (n)   n∆2i 1 X 1 . log ≥ 4 ∆i ki,1/2 log(n) i:∆i >0 2. There exists an i with ∆i > 0 such that Rµπ′ (n) 1 X 1 ≥ log 2 ′ ∆′i i:∆i >0 n∆′2 i ′ ki,1/2 log(n) ! ′ where µ′i = µi + 2∆i and µ′j = µj for j 6= i and ∆′i and ki,ρ are defined as ∆i and ki,ρ ′ but using µ . Proof. On our way to a contradiction, assume that neither of the items hold. Let i be a suboptimal arm and µ′ be as in the second item above. I write P′ and E′ for expectation when when rewards are sampled from µ′ . Suppose   1 n∆2i . (9) E[Ti (n)] ≤ log 4∆2i ki,1/2 log(n) Then Lemma 2.6 in the book by Tsybakov [2008] and the same argument as used by Lattimore [2015] gives P {Ti (n) ≥ n/2} + P′ {Ti (n) < n/2} ≥ ki,1/2 log(n) ≡ 2δ . n∆2i By Markov’s inequality 2E[Ti (n)] 1 P {Ti (n) ≥ n/2} ≤ log ≤ n 2n∆2i  n∆2i ki,1/2 log(n)  Therefore P′ {Ti (n) < n/2} ≥ δ, which implies that   K 1 1 1 X 1 δn∆i 1X min log(n) ≥ Rµπ′ (n) ≥ , = 2 2 j=1 ∆i ∆j 2 ∆′j ′ j:∆j >0 9 ≤ log(n) ≤ δ. 2n∆2i n∆′j ′ kj,1/2 log(n) ! , which is a contradiction. Therefore Eq. (9) does not hold for all i with ∆i > 0, but this also leads immediately to a contradiction, since then   X 1 X 1 n∆2i Rµπ (n) = ∆i E[Ti (n)] ≥ . log 4 ∆i ki,1/2 log(n) i:∆i >0 i:∆i >0 B Proof of Lemma 3 Monotonicity ε > 0 be such that η = 1o+ 2ε and and Gk = [(1 + ε)k , (1 + ε)k+1 ] n is obvious. Let p and Fk = ∃n ∈ Gk : Sn > 2ηn log max {e, log n} . Then ∞ n o Y p P ∀n : Sn ≤ 2ηn log max {e, log n} = P {∀k ≥ 0 : ¬Fk } = P {¬Fk |¬F1 , . . . , ¬Fk−1 } . k=0 Now we analyse the failure event Fk . P {Fk |¬F1 , . . . , ¬Fk−1 } ≤ P {Fk } n o p = P ∃n ∈ Gk : Sn > 2ηn log max {e, log n}   2η(1 + ε)k log+ log(1 + ε)k ≤ exp − 2(1 + ε)k+1 ε  1+ 1+ε 1 . = k log(1 + ε) Since this is vacuous when k is small we need also need a naive bound. o n p P ∃n ∈ Gk : Sn ≥ 2ηn log max {e, log n} ≤ exp (−η) < 1 . Combining these completes the results since for sufficiently large k0 (depending only on η) we have that ε ! 1+ 1+ε  ∞ ∞ Y Y 1 > 0. 1− (1 − P {Fk }) ≥ exp (−ηk0 ) p(η) ≥ exp (−ηk0 ) k log(1 + ε) k=k0 k=k0 C Proof of Lemma 4   Let α ≥ 1 be fixed and t0 = 8η log+(b)/∆2 and tk = t0 2k . Then P {τ ≥ αt0 } ≤ P {∃t ≥ αt0 : µ̂t ≥ ∆/2} ≤ ≤ ∞ X exp k=0  α2 22k−2 t20 ∆2 − 8α2k t0  ∞ X  P ∃t ≤ tk : St ≥ α2k−1 t0 ∆/2 k=0 ∞ X ≤ k=0   α2k = O (exp (−α/4)) . exp − 4 i h 2 Therefore E (τ /t0 ) = O(1) and so the result follows. D Proof of Lemma 5 Let η1 = (1 + η)/2 and η2 = η/η1 and Λ= d X i=1 min    λρi 1 1 . , log + ∆2 ∆2−2ρ λi ∆2 10 Let x > 0 be fixed and let Gk = [η1k , η1k+1 ]. We will use the peeling trick. First, by Lemma 2. v   ( ) u   u 2η xΛ qk = P inf µ̂s + t log max 1, Pd ≤ −∆ ρ 1−ρ s∈Gk  s } i=1 min {s, λi s   v   u   u     xΛ u o + ∆η1k ≤ 0 n ≤ P ∃s ≤ η1k+1 : Ss + t2ηη1k log max 1, P (k+1)(1−ρ)  d k+1      , λρi η1 i=1 min η1 o n η2  Pd ! (k+1)(1−ρ) k+1 2 k−1 , λρi η1 (a) i=1 min η1 ∆ η 1  exp − ≤ xΛ 2 o n  Pd η (k+1)(1−ρ) k+1  2  , λρi η1 2 k i=1 min η1 ∆ η 1  = , exp − xΛ 2η where (a) follows by Lemma 2. By the union bound v   ) ( u ∞  X  u 2η xΛ ≤ −∆ ≤ qk P inf µ̂s + t log max 1, Pd ρ 1−ρ }   s s i=1 min {s , λi s k=0 o n  Pd η (k+1)(1−ρ) k+1  2  ∞ , λρi η1 2 k X i=1 min η1 ∆ η 1   ≤ exp − xΛ 2η k=0 !η2  d ∞ o n 1 XX ∆2 η1k ρ (k+1)(1−ρ) k+1 ≤ exp − min η1 , λi η1 xΛ i=1 2η k=0   η · x−η2 , =O η−1   η where the last line follows from Lemma 12. Therefore P {α ≥ xΛ} ≤ O η−1 · x−η2 .   R∞ η Now the first part follows easily since E[α] ≤ 0 P {α ≥ xΛ} = O (η−1) · Λ. Therefore 2   X   d 1 ρ 2ρ−1 1 min · , λi ∆ log+ ∆ λi ∆2 i=1   X   d 1 p η min · , λi . ≤O (2ρ − 1)(η − 1)2 ∆ i=1 ∆E[α] ≤ O  η (η − 1)2 For the second part let x0 = Λ/ productlog(Λ) where productlog is the inverse of the function x → x exp(x). Z ∞ Z ∞ n o x P α ≥ log(x) dx E[β] ≤ P {β ≥ x} dx ≤ x0 + Λ 0 x0  Z ∞ η2  Λ η dx · ≤ x0 + O η−1 x log(x) x   0 η2 Z ∞ η Λ ≤ x0 + O · x−η2 dx η−1 log(x0 ) x0 η2      Λ η Λ η 1−η2 x = O · · ≤ x0 + O . 0 2 2 (η − 1) log(x0 ) (η − 1) productlog(Λ) 11 If Λ < e, then the result is trivial. For Λ ≥ e we have productlog(Λ) ≥ 1. Then   ∆Λ productlog(Λ)   X    d 1 λρi ∆2ρ−1 1 1 min · . , log ≤O + (η − 1)2 ∆ productlog(Λ) λi ∆2 i=1 ∆E[β] ≤ O 1 (η − 1)2 · −1 1 −1 By examining the inner minimum we see that if ∆ ≥ λi 2 , then 1/∆ ≤ λi2 . If ∆ < λi 2 , then min  1     1 1 1 λρi ∆2ρ−1 λi2 , log+ log < + ∆ productlog(Λ) λi ∆2 max {1, productlog(∆−2 )} λi ∆2 1 ≤ 2λi2 . Therefore E[∆t] ≤ O  η (η−1)2  P  √ d · i=1 min ∆−1 , λi as required. E Proof of Lemma 8 Since J is sub-exponentially distributed with rate dependent only on η we have By using Lemma 4 we obtain p E[J 2 ] = O(1). q q E[τi2 ] = E[E [τi2 |Ki,ρ ]] v " u  2 #   u 1 1 t = Oη (1) · 1 + 2 log (bi ) . = Oη (1) · E 1 + 2 log(Bi ) ∆i ∆i The latter inequality follows by noting that Bi ≥ e and (1 + c log(x))2 is concave for x ≥ e and c > 0. v " u  2 # u 1 tE 1 + 1 log(Bi ) ≤ 1 + 2 log(E[Bi ]) 2 ∆i ∆i     n∆2i log(n) 1 = 1 + 2 log E max log(n), ∆i Ki,ρ     1 n∆2i log(n) = Oη (1) · 1 + 2 log max log(n), , ∆i ki,ρ where the last inequality follows from (a) Ki,ρ ≥ 1 and (b) Azuma’s concentration inequality im−1 plies that P {Ki,ρ ≤ cη ρ(η)ki,ρ /2} = O(ki,ρ ) as shown in the following appendix. Finally by Holder’s inequality E[Jτi ] ≤   q 1 E[J 2 ]E[τi2 ] ≤ Oη (1) · 1 + 2 log (bi ) . ∆i 12 F Tail Bound on Ki,ρ o o n n PK P 2ρ 2ρ 2ρ . and k = 1 + min 1, ∆ /∆ /∆ Recall that Ki,ρ = 1 + cη j∈Φ,j6=i min 1, ∆2ρ i,ρ i j i j j6=i Therefore by Azuma’s inequality and naive simplification we have    X o ρ(η) X n o n 2ρ 2ρ ≤ P {Ki,ρ ≤ cη ρ(η)ki,ρ /2} ≤ P min 1, ∆2ρ min 1, ∆2ρ i /∆j i /∆j   2 j∈Φ,j6=i j6=i    n o2 P 2ρ 2ρ min 1, ∆ /∆ ρ(η) (a) i j6 = i J   ≤ exp − o2  n P 2ρ 2ρ 2 j6=i min 1, ∆i /∆j o n  P 2ρ ρ(η)2 j6=i min 1, ∆2ρ (b) i /∆J  ≤ exp − 2 (c) −1 = O(ki,ρ ), where (a) follows from Azuma’s inequality and (b) since min{1, x}2 ≤ min{1, x} and (c) by exp(−x) ≤ 1/x for all x ≥ 0. G Proof of Lemma 10b Recall that we are trying to show that   X ∆i τ∆i  = O E i:∆i <∆J /4 X ∆i E[Jτi ] i:∆i >0 ! . (10) Let E be the event that ∆2 ≤ ∆J /4 and define random sets A1 = {i : ∆i ∈ (2∆J , ∞)} and A2 = {i : ∆i ∈ [∆J , 2∆J ]}. For i ∈ A1 we have ∆i > 2∆J and since J ∈ Φ we have γJ (t) ≥ µJ ≥ µ1 − ∆i /2. Therefore i ∈ A1 implies that τ∆i = 1 and so Ti (n) ≤ τi . Let λ ∈ (0, ∞]K be given by λi = τi for i ∈ A1 and λi = ∞ otherwise. v   ) ( u   u 2η ∆ α J ≥ µ − . α = min α : inf µ̂2,s + t log max 1, PK 2 ρ 1−ρ s  s 4  } i=1 min {s, λi s It is important to note that we have used µ̂2,s in the definition of α and not µ̂1,s that appeared in the proof of part (a) of this lemma. The reason is to preserve independence when samples from the first arm are used later. Let β = min {β ≥ 0 : β log(β) = α}. If E holds, then for t ≥ β we have γ2 (t) ≥ µ2 − ∆J /4 ≥ µ1 − ∆J /2, which implies that X X X 1{E} Ti (n) ≤ t∆J + τi ≤ β + τi . i∈A2 i∈A2 i∈A2 Therefore for any s, t ≤ n the concavity of min {s, ·} and x → xρ combined with Jensen’s inequality implies that ) (  P ρ X X  β + i∈A2 τi 1−ρ ρ 1−ρ 1{E} s . min s, Ti (t − 1) s ≤ min s, |A2 | i∈A2 i∈A2 We are getting close to an application of Lemma 5. Let ω ∈ (0, ∞]K be given by  if j ∈ A1 τj P ωj = β/|A2 | + j∈A2 τj /|A2 | if j ∈ A2  ∞ otherwise , 13 which has been chosen such that for T1 (t − 1) = s and if E holds, then ( ) t log(t) B1 (t − 1) ≥ max 1, PK ρ 1−ρ } j=1 min {s, Tj (t − 1) s ) ( t log(t) . ≥ max 1, PK  ρ 1−ρ j=1 min s, ωj s (11) Now let i be the index of some arm for which ∆i < ∆J /4 and define v   ) ( u   u 2η ∆ α i ≥ µ − αi = min α : inf µ̂1,s + t log max 1, PK  1 ρ 1−ρ s  s 2  j=1 min s, ωj s and βi = min {β ≥ 0 : β log(β) = αi }. Therefore by Eq. (11), if E holds and t ≥ βi , then γ1 (t) ≥ µ1 − ∆i /2 and so t∆i ≤ βi . At last we are able to write t∆i in terms of something for which the expectation can be controlled.     X X ∆i τ∆i  ≤ E  ∆i βi  E i:∆i <∆J /4 i:∆i <∆J /4  ≤ Oη (1) · E  X ≤ Oη (1) · E  X K X min i:∆i <∆J /4 j=1  i:∆i <∆J /4  ≤ Oη (1) · E  X j∈A1   X√  j∈A1   1 √ , ωj  ∆i √ τj + |A2 | ωj +  J2 √  √ + J|A2 | ωj . J τj + ∆min  J  ∆min (12) The first two terms are easily bounded as we shall soon see. For the last we have v   u u q X  u √  E J|A2 | ωj ≤ Oη (1) · E [|A2 |2 ωj ] = Oη (1) · tE |A2 | τj + |A2 |β  j∈A2  v  u  u X p  u τj  + E [|A2 |β] ≤ Oη (1) · tE |A2 | (13) j∈A2  Bounding each term separately. For the first, let Ãℓ = j : ∆j ∈ [2ℓ , 2ℓ+2 ) , which is chosen such that no matter the value of ∆J there exists an ℓ ∈ Z with A2 ⊆ Aℓ . v   u sX u X X u   tE |A2 | τj ≤ O(1) · E[τj ] |Ãℓ | j∈A2 ℓ∈Z ≤ O(1) · sX ≤ Oη (1) · ℓ∈Z X j∈Ãℓ |Ãℓ |2 max E[τj ] j:∆j >0 j∈Aℓ s 1+ log(bj ) , ∆2j (14) P where the last inequality follows because ℓ∈Z 1{j ∈ Ãℓ } = 2 for each j and from Lemma 8, which gives the same order-bound on E[τj ] for all j ∈ Ãℓ for fixed ℓ. For the second term in 14 Eq. (13) we have v  u u hp i (a) X u E |A2 |β ≤ Oη (1) · E t|A2 |  j:λj =∞ v u  u X (b) u ≤ Oη (1) · tE |A2 | j:λj =∞ (c) ≤ Oη (1) X j:∆j >0 s 1+ 1 1 + ∆2J ∆J   X √  τj  j:λj <∞   |A2 | 1  + +E ∆2J ∆J X j:∆j >0 log(bj ) , ∆2j  √  E[ τj ] √ √ √ where √ (a) follows from Lemma 5 and (b) since for all x, y ≥ 0 it holds that x + y ≤ x + y and xy ≤ x + y. To get (c) we bound the first term as in Eq. (14), the second by the fact that arms in j ∈ A2 have ∆j ≤ 2∆J and the third using Lemma 8. Finally by substituting this into Eq. (12) we have    " ! # 2 X X X √ log(b ) J j +  E 1+ ∆i τ∆i ≤ Oη (1) · E  J τj + ∆min ∆2j i∈A3 j:∆j >0 j∈A1 ! X log(bj ) ≤ Oη (1) 1+ , ∆2j j:∆j >0 where the last line follows since E[J 2 /∆min ] = Oη (1)∆−1 min and by Lemma 8 s q log(bj ) √ 2 E[J τj ] ≤ E[J ]E[τj ] = Oη (1) · 1 + , ∆2j which completes the proof. H Technical Lemmas Lemma 12. Let η > 1 and ρ ∈ [0, 1] and λ ∈ (0, ∞] and x > 0, then    ∞ 1 2 + η o n X  if xλ ≥ 1 e log(η) min η k+1 , λρ η (1−ρ)(k+1) exp −xη k ≤ xρ ρ−1  λ x 1 1  otherwise . k=0 log(η) 1 + e + log λx      1 1 ρ ρ−1 η ,λ x log+ · min . =O η−1 x λx  Proof. Let f (k) = min R η k+1 , λρ η (k+1)(1−ρ) exp(−xη k ), which is unimodal and so P∞ ∞ k=0 f (k) ≤ 2 supk f (k) + 0 f (k)dk. If xλ ≥ 1, then Z ∞ Z ∞  η . η k exp −η k x dk = f (k)dk ≤ η x log(η) 0 0 If xλ < 1, then let kλ be such that η kλ = λρ η kλ (1−ρ) and kx be such that η k = 1/x. Z ∞ Z kx Z kλ Z ∞  ρ kx (1−ρ) k λρ η k(1−ρ) exp −xη k dk λ η dk + η η dk + η f (k)dk ≤ η kx kλ 0 0 Z ∞  λ−1 ρ ρ−1 ρ ρ−1 = + η (kx − kλ ) λ x + ηλ x η (k−kx )(1−ρ) exp −η kx −k dk log(η) kx  1 ηλρ xρ−1 log λx ηλρ xρ−1 λ−1 + + ≤ log(η) log(η) e log(η) 15 Finally sup f (k) ≤ min k  1 , ηλρ xρ−1 ex  . Therefore    1 2 + η o n  x e log(η) k k+1 ρ (1−ρ)(k+1) exp −xη ≤ min η ,λ η  λρ xρ−1 1 + 1 + log k=0 log(η) e ∞ X 1 λx  if xλ ≥ 1 otherwise . I Table of Notation K number of arms n horizon t current time step η constant parameter greater than 1 determining width of confidence interval ρ constant parameter in (1/2, 1] η1 , η2 η1 = (1 + η)/2 and η2 = η/η1 µi expected return of arm i µ̂i,s empirical estimate of return of arm i based on s samples µ̂i (t) empirical estimate of return of arm i after time step t ∆i gap between the expected returns of the best arm and the ith arm ∆min minimal non-zero gap ∆min = min {∆i : ∆i > 0} ∆max log+(x) Bi and bi maximum gap ∆max = maxi ∆i max {1, log(x)} Ki,ρ see Eq. (5) PK 2ρ 2ρ j=1 min{1, ∆i /∆j } τi see Eq. (5) τ∆ see Eq. (6) p(η) see Lemma 3 Φ set of optimistic arms Eq. (3) J J = min Φ ki,ρ see Eq. (4) 16
10math.ST
arXiv:1206.5386v1 [cs.PL] 23 Jun 2012 Elaborating Intersection and Union Types Joshua Dunfield arXiv:1206.5386v1 [cs.PL] 23 Jun 2012 Max Planck Institute for Software Systems Kaiserslautern and Saarbrücken, Germany [email protected] Abstract For both legitimate and historical reasons, intersection types have not been used as widely as parametric polymorphism. One of the legitimate reasons for the slow adoption of intersection types is that no major language has them. A restricted form of intersection, refinement intersection, was realized in two extensions of SML, SML-CIDRE (Davies 2005) and Stardust (Dunfield 2007). These type systems can express properties such as bitwise parity: after refining a type bits of bitstrings with subtypes even (an even number of ones) and odd (an odd number of ones), a bitstring concatenation function can be checked against the type Designing and implementing typed programming languages is hard. Every new type system feature requires extending the metatheory and implementation, which are often complicated and fragile. To ease this process, we would like to provide general mechanisms that subsume many different features. In modern type systems, parametric polymorphism is fundamental, but intersection polymorphism has gained little traction in programming languages. Most practical intersection type systems have supported only refinement intersections, which increase the expressiveness of types (more precise properties can be checked) without altering the expressiveness of terms; refinement intersections can simply be erased during compilation. In contrast, unrestricted intersections increase the expressiveness of terms, and can be used to encode diverse language features, promising an economy of both theory and implementation. We describe a foundation for compiling unrestricted intersection and union types: an elaboration type system that generates ordinary λ-calculus terms. The key feature is a Forsythe-like merge construct. With this construct, not all reductions of the source program preserve types; however, we prove that ordinary call-byvalue evaluation of the elaborated program corresponds to a typepreserving evaluation of the source program. We also describe a prototype implementation and applications of unrestricted intersections and unions: records, operator overloading, and simulating dynamic typing. (even ∗ even → even) ∧ (odd ∗ odd → even) ∧ (even ∗ odd → odd) ∧ (odd ∗ even → odd) which satisfies the refinement restriction: all the intersected types refine a single simple type, bits ∗ bits → bits. But these systems were only typecheckers. To compile a program required an ordinary Standard ML compiler. SML-CIDRE was explicitly limited to checking refinements of SML types, without affecting the expressiveness of terms. In contrast, Stardust could typecheck some kinds of programs that used general intersection and union types, but ineffectively: since ordinary SML compilers don’t know about intersection types, such programs could never be run. Refinement intersections and unions increase the expressiveness of otherwise more-or-less-conventional type systems, allowing more precise properties of programs to be verified through typechecking. The point is to make fewer programs pass the typechecker; for example, a concatenation function that didn’t have the parity property expressed by its type would be rejected. In contrast, unrestricted intersections and unions, in cooperation with a term-level “merge” construct, increase the expressiveness of the term language. For example, given primitive operations Int.+ : int ∗ int → int and Real.+ : real ∗ real → real, we can easily define an overloaded addition operation by writing a merge: Categories and Subject Descriptors F.3.3 [Mathematical Logic and Formal Languages]: Studies of Program Constructs—Type structure Keywords intersection types 1. Introduction In type systems, parametric polymorphism is fundamental. It enables generic programming; it supports parametric reasoning about programs. Logically, it corresponds to universal quantification. Intersection polymorphism (the intersection type A ∧ B) is less well appreciated. It enables ad hoc polymorphism; it supports irregular generic programming. Logically, it roughly corresponds to conjunction1 . Not surprisingly, then, intersection is remarkably versatile. 1 In val + = Int.+ ,, Real.+ In our type system, this function + can be checked against the type (int ∗ int → int) ∧ (real ∗ real → real). In this paper, we consider unrestricted intersection and union types. Central to the approach is a method for elaborating programs with intersection and union types: elaborate intersections into products, and unions into sums. The resulting programs have no intersections and no unions, and can be compiled using conventional means—any SML compiler will do. The above definition of + is elaborated to a pair (Int.+, Real.+); uses of + on ints become first projections of +, while uses on reals become second projections of +. We present a three-phase design, based on this method, that supports one of our ultimate goals: to develop simpler compilers for full-featured type systems by encoding many features using intersections and unions. our setting, this correspondence is strong, as we will see in Sec. 2. This work is licensed under the Creative Commons Attribution—No Derivative Works License. ICFP ’12, September 9–15, 2012, Copenhagen, Denmark. Copyright c 2012 Joshua Dunfield 1 Source language →, ∗, + →, ∧, ∨ Program e:A elaboration M:T v:A elaboration Contents: In Section 2, we give some brief background on intersection types, discuss their introduction and elimination rules, introduce and discuss the merge construct, and compare intersection types to product types. Section 3 gives background on union types, discusses their introduction and elimination rules, and shows how the merge construct is also useful for them. Section 4 has the details of the source language and its (unusual) operational semantics, and describes a non-elaborating type system including subsumption. Section 5 presents the target language and its (entirely standard) typing and operational semantics. Section 6 gives the elaboration typing rules, and proves several key results relating source typing, elaboration typing, the source operational semantics, and the target operational semantics. Section 7 discusses a major caveat: the approach, at least in its present form, lacks the theoretically and practically important property of coherence, because the meaning of a target program depends on the choice of elaboration typing derivation. Section 8 shows encodings of type system features into intersections and unions, with examples that are successfully elaborated by our prototype implementation (Section 9). Related work is discussed in Section 10, and Section 11 concludes. standard evaluation (cbv) nondeterministic evaluation (cbv + merge) Result tions with two computationally distinct branches (unlike markers for union elimination in work such as Pierce (1991a)). As usual, we have no source-level intersection eliminations and no sourcelevel union introductions; elaboration puts all needed projections and injections into the target program. Target language W:T Figure 1. Elaboration and computation 1. An encoding phase that straightforwardly rewrites the program, for example, turning a multi-field record type into an intersection of single-field record types, and multi-field records into a “merge” of single-field records. 2. An elaboration phase that transforms intersections and unions into products and (disjoint) sums, and intersection and union introductions and eliminations (implicit in the source program) into their appropriate operations: tupling, projection, injection, and case analysis. 3. A compilation phase: a conventional compiler with no support for intersections, unions, or the features encoded by phase 1. 2. Intersection Types Contributions: Phase 2 is the main contribution of this paper. Specifically, we will: What is an intersection type? The simplistic answer is that, supposing that types describe sets of values, A ∧ B describes the intersection of the sets of values of A and B. That is, v : A ∧ B if v : A and v : B. Less simplistically, the name has been used for substantially different type constructors, though all have a conjunctive flavour. The intersection type in this paper is commutative (A ∧ B = B ∧ A) and idempotent (A ∧ A = A), following several seminal papers on intersection types (Pottinger 1980; Coppo et al. 1981) and more recent work with refinement intersections (Freeman and Pfenning 1991; Davies and Pfenning 2000; Dunfield and Pfenning 2003). Other lines of research have worked with nonlinear and/or ordered intersections, e.g. Kfoury and Wells (2004), which seem less directly applicable to practical type systems (Møller Neergaard and Mairson 2004). For this paper, then: What is a commutative and idempotent intersection type? One approach to this question is through the Curry-Howard correspondence. Naively, intersection should correspond to logical conjunction—but products correspond to logical conjunction, and intersections are not products, as is evident from comparing the standard2 introduction and elimination rules for intersection to the (utterly standard) rules for product. (Throughout this paper, k is existentially quantified over {1, 2}; technically, and in the Twelf formulation, we have two rules ∧E1 and ∧E2 , etc.) • develop elaboration typing rules which, given a source expres- sion e with unrestricted intersections and unions, and a “merging” construct e1 ,, e2 , typecheck and transform the program into an ordinary λ-calculus term M (with sums and products); ∗ ) for source programs containing merges, in which not all reductions preserve types; • give a nondeterministic operational semantics ( • prove a consistency (simulation) result: ordinary call-by-value evaluation (7→∗ ) of the elaborated program produces a value corresponding to a value resulting from (type-preserving) reductions of the source program—that is, the diagram in Figure 1 commutes; • describe an elaborating typechecker that, by implementing the elaboration typing rules, takes programs written in an ML-like language, with unrestricted intersection and union types, and generates Standard ML programs that can be compiled with any SML compiler. All proofs were checked using the Twelf proof assistant (Pfenning and Schürmann 1999; Twelf 2012) (with the termination checker silenced for a few inductive cases, where the induction measure was nontrivial) and are available on the web (Dunfield 2012). For convenience, the names of Twelf source files (.elf ) are hyperlinks. While the idea of compiling intersections to products is not new, this paper is its first full development and practical expression. An essential twist is the source-level merging construct e1 ,, e2 , which embodies several computationally distinct terms, which can be checked against various parts of an intersection type, reminiscent of Forsythe (Reynolds 1996) and (more distantly) the λ&calculus (Castagna et al. 1995). Intersections can still be introduced without this construct; it is required only when no single term can describe the multiple behaviours expressed by the intersection. Remarkably, this merging construct also supports union elimina- e : A1 e : A2 ∧I e : A1 ∧ A2 e1 : A1 e2 : A2 ∗I (e1 , e2 ) : A1 ∗ A2 2 For e : A1 ∧ A2 ∧Ek e : Ak e : A1 ∗ A2 projk e : Ak ∗Ek impure call-by-value languages like ML, ∧I ordinarily needs to be restricted to type a value v, for reasons analogous to the value restriction on parametric polymorphism (Davies and Pfenning 2000). Our setting, however, is not ordinary: the technique of elaboration makes the more permissive rule safe, though user-unfriendly. See Section 6.5. 2 Here ∧I types a single term e which inhabits type A1 and type A2 : via Curry-Howard, this means that a single proof term serves as witness to two propositions (the interpretations of A1 and A2 ). On the other hand, in ∗I two separate terms e1 and e2 witness the propositions corresponding to A1 and A2 . This difference was suggested by Pottinger (1980), and made concrete when Hindley (1984) showed that intersection (of the form described by Coppo et al. (1981) and Pottinger (1980)) cannot correspond to conjunction because the following type, the intersection of the types of the I and S combinators, is uninhabited:  (A → A) ∧ (A→B→C) → (A→B) → A → C {z } | For union ∨, introduction is straightforward, as elimination was straightforward for ∧ (again, k is either 1 or 2): Γ ⊢ e : Ak ∨Ik Γ ⊢ e : A1 ∨ A2 Coming up with a good elimination rule is trickier. A number of appealing rules are unsound; a sound, yet acceptably strong, rule is Γ, x1 : A1 ⊢ E [x1 ] : C Γ ⊢ e0 : A1 ∨ A2 Γ, x2 : A2 ⊢ E [x2 ] : C ∨E Γ ⊢ E [e0 ] : C This rule types an expression E [e0 ]—an evaluation context E with e0 in an evaluation position—where e0 has the union type A1 ∨ A2 . During evaluation, e0 will be some value v0 such that either v0 : A1 or v0 : A2 . In the former case, the premise x1 : A1 ⊢ E [x1 ] : C tells us that substituting v0 for x1 gives a welltyped expression E [v0 ]. Similarly, the premise x2 : A2 ⊢ E [x2 ] : C tells us we can safely substitute v0 for x2 . The restriction to a single occurrence of e0 in an evaluation position is needed for soundness in many settings—generally, in any operational semantics in which e0 might step to different expressions. One simple example is a function f : (A → A → C) ∧ (B → B → C) and expression e0 : A ∨ B, where e0 changes the contents pointed to by a reference of type (A ∨ B) ref, before returning the new value. The application f e0 e0 would be welltyped by a rule allowing multiple occurrences of e0 , but unsound: the first e0 could evaluate to an A and the second e0 to a B. The evaluation context E need not be unique, which creates some difficulties for practical typechecking (Dunfield 2011). For further discussion of this rule, see Dunfield and Pfenning (2003). We saw in Section 2 that, in the usual λ-calculus, ∧ does not correspond to conjunction; in particular, no λ-term behaves like both the I and S combinators, so the intersection (A→A) ∧ D (where D is the type of S) is uninhabited. In our setting, though, (A→A) ∧ D is inhabited, by the merge of I and S. Something similar comes up when eliminating unions. Without the merge construct, certain instances of union types can’t be usefully eliminated. Consider a list whose elements have type int ∨ string. Introducing those unions to create the list is easy enough: use ∨I1 for the ints and ∨I2 for the strings. Now suppose we want to print a list element x : int ∨ string, converting the ints to their string representation and leaving the strings alone. To do this, we need a merge; for example, given a function g : (int → string) ∧ (string → string) whose body contains a merge, use rule ∨E on g x with E = g [ ] and e0 = x. Like intersections, unions can be tamed by elaboration. Instead of products, we elaborate unions to products’ dual, sums (tagged unions). Uses of ∨I1 and ∨I2 become left and right injections into a sum type; uses of ∨E become ordinary case expressions. “D” yet the prospectively corresponding proposition is provable in intuitionistic logic:  (A ⊃ A) and (A⊃B⊃C) ⊃ (A⊃B) ⊃ A ⊃ C (*) Hindley notes that every term of type A → A is β-equivalent to e1 = λx. x, and every term of type D is β-equivalent to e2 = λx. λy. λz. x z (y z), the S combinator. Any term e of type (A → A) ∧ D must therefore have two normal forms, e1 and e2 , which is impossible. But that impossibility holds for the usual λ-terms. Suppose we add a merge construct e1 ,, e2 that, quite brazenly, can step to two different things: e1 ,, e2 7→ e1 and e1 ,, e2 7→ e2 . Its typing rule chooses one subterm and ignores the other (throughout this paper, the subscript k ranges over {1, 2}): ek : A mergek e1 ,, e2 : A In combination with ∧I, the mergek rule allows two distinct implementations e1 and e2 , one for each of the components A1 and A2 of the intersection: e1 : A1 e2 : A2 merge1 merge2 e1 ,, e2 : A1 e1 ,, e2 : A2 ∧I e1 ,, e2 : A1 ∧ A2 Now (A → A) ∧ D is inhabited: e1 ,, e2 : (A → A) ∧ D With this construct, the “naive” hope that intersection corresponds to conjunction is realized through elaboration: we can elaborate e1 ,, e2 to (e1 , e2 ), a term of type (A → A) ∗ D, which does correspond to the proposition (*). Inhabitation and provability again correspond—because we have replaced the seemingly mysterious intersections with simple products. For source expressions, intersection still has several properties that set it apart from product. Unlike product, it has no elimination form. It also lacks an explicit introduction form; ∧I is the only intro rule for ∧. While the primary purpose of mergek is to derive the premises of ∧I, the mergek rule makes no mention of intersection (or any other type constructor). b B as a proposition Pottinger (1980) presents intersection A & with some evidence of A that is also evidence of B—unlike A & B, corresponding to A ∗ B, which has two separate pieces of evidence for A and for B. In our system, though, e1 ,, e2 is a single term that provides evidence for A and B, so it is technically consistent with this view of intersection, but not necessarily consistent in spirit (since e1 and e2 can be very different from each other). 4. Source Language 4.1 Source Syntax Source types A, B, C ::= ⊤ | A → B | A ∧ B | A ∨ B Typing contexts Source expressions 3. Union Types Source values Having discussed intersection types, we can describe union types as intersections’ dual: if v : A1 ∨ A2 then either v : A1 or v : A2 (perhaps both). This duality shows itself in several ways. Evaluation contexts Γ ::= · | Γ, x : A e ::= x | () | λx. e | e1 e2 | fix x. e | e1 ,, e2 v ::= x | () | λx. e | v1 ,, v2 E ::= [ ] | E e | v E | E ,, e | e,, E Figure 2. Syntax of source types, contexts and expressions 3 The source language expressions e are standard, except for the feature central to our approach, the merge e1 ,, e2 . The types A, B, C are a “top” type ⊤ (which will be elaborated to unit), the usual function space A → B, intersection A ∧ B and union A ∨ B. Values v are standard, but a merge of values v1 ,, v2 is considered a value, even though it can step! But the step it takes is pure, in the sense that even if we incorporated (say) mutable references, it would not interact with them. flexibility, we’ll incorporate a subtyping system that can conclude, for example, A → C ≤ (A ∧ B) → C. The logic of the subtyping rules (Figure 4, top) is taken straight from Dunfield and Pfenning (2003), so we only briefly give some intuition. Roughly, A ≤ B is sound if every value of type A can be treated as having type B. Under a subset interpretation, this would mean that A ≤ B is justified if the set of A-values is a subset of the set of B-values. For example, the rule ∧R≤, if interpreted settheoretically, says that if A ⊆ B1 and A ⊆ B2 then A ⊆ (B1 ∩B2 ). It is easy to show that subtyping is reflexive and transitive; see sub-refl.elf and sub-trans.elf . (Building transitivity into the structure of the rules makes it easy to derive an algorithm; an explicit transitivity rule would have premises A ≤ B and B ≤ C, which involve an intermediate type B that does not appear in the conclusion A ≤ C.) Having said all that, the subsequent theoretical development is easier without subtyping. So we will show (Theorem 1) that, given a typing derivation that uses subtyping (through the usual subsumption rule), we can always construct a source expression of the same type that never applies the subsumption rule. This new expression will be the same as the original one, with a few additional coercions. For the example above, we essentially ηexpand g f to g (λx. f x), which lets us apply ∧E1 to x : A ∧ B. Operationally, all the coercions are identities; they serve only to “articulate” the type structure, making subsumption unnecessary. Note that the coercion in rule ∨L≤ is eta-expanded to allow ∨E to eliminate the union in the type of x; as discussed later, the subexpression of union type must be in evaluation position. 4.2 Source Operational Semantics e expression e e ′ Source steps to e ′ e1′ step/app1 e1′ e2 e1 e1 e2 (λx. e)v e1 e1 ,, e2 e1 e2 v1 e2 [v/x]e step/unmerge left e1′ step/merge1 e1′ ,, e2 e e,, e e2′ step/app2 v1 e2′ step/beta [(fix x. e)/x]e fix x. e e1 ,, e2 step E E’ in step.elf step/fix step/unmerge right e1 ,, e2 e2 e2 e1 ,, e2 e2′ step/merge2 e1 ,, e2′ 4.4 Source Typing step/split The source typing rules (Figure 4) are either standard or have already been discussed in Sections 2 and 3, except for direct. The direct rule was introduced and justified in Dunfield and Pfenning (2003, 2004). It is a 1-ary version of ∨E, a sort of cut: a use of the typing e0 : A within the derivation of E [e0 ] : C is replaced by a derivations of e0 : A, along with a derivation of E [x] : C that assumes x : A. Curiously, in this system of rules, direct is admissible: given e0 : A, use ∨I1 or ∨I2 to conclude e0 : A ∨ A, then use two copies of the derivation x : A ⊢ E [x] : C in the premises of ∨E (α-converting x as needed). So why include it? Typing using these rules is undecidable; our implementation (Section 9) follows a bidirectional version of them (where typechecking is decidable, given a few annotations, similar to Dunfield and Pfenning (2004)), where direct is not admissible. (A side benefit is that direct and ∨E are similar enough that it can be helpful to do the direct case of a proof before tackling ∨E.) Remark. Theorem 1, and all subsequent theorems, are proved only for expressions that are closed under the appropriate context, even though mergek does not explicitly require that the unexamined subexpression be closed; Twelf does not support proofs about objects with unknown variables. Figure 3. Source language operational semantics: call-by-value + merge construct The source language operational semantics (Figure 3) is standard (call-by-value function application and a fixed point expression) except for the merge construct. This peculiar animal is a descendant of “demonic choice”: by the ‘step/unmerge left’ and ‘step/unmerge right’ rules, e1 ,, e2 can step to either e1 or e2 . Adding to its misbehaviours, it permits stepping within itself (‘step/merge1’ and ‘step/merge2’—note that in ‘step/merge2’, we don’t require e1 to be a value). Worst of all, it can appear by spontaneous fission: ‘step/split’ turns any expression e into a merge of two copies of e. The merge construct makes our source language operational semantics interesting. It also makes it unrealistic: -reduction does not preserve types. For type preservation to hold, the operational semantics would need access to the typing derivation. Worse, since the typing rule for merges ignores the unused part of the merge, reduction can produce expressions that have no type at all, or are not even closed! The point of the source operational semantics is not to directly model computation; rather, it is a basis for checking that the elaborated program (whose operational semantics is perfectly standard) makes sense. We will show in Section 6 that, if the result M of elaborating e can step to some M ′ , then we can step e ∗ e ′ where e ′ elaborates to M ′ . Theorem 1 (Coercion). If D derives Γ ⊢ e : B then there exists an e ′ such that D ′ derives Γ ⊢ e ′ : B, where D ′ never uses rule sub. Proof. By induction on D. The interesting cases are for sub and ∨E. In the case for sub with A ≤ B, we show that when the coercion ecoerce —which always has the form λx. e0 —is applied to an expression of type A, we get an expression of type B. For example, for ∧L1 ≤ we use ∧E1 . This shows that e ′ = (λx. e0 ) e has type B. For ∨E, the premises typing E [xk ] might “separate”, say if the first includes subsumption (yielding the same E [x1 ]) and the second doesn’t. Furthermore, inserting coercions could break evaluation positions: given E = f [ ], replacing f with an application (ecoerce f) 4.3 (Source) Subtyping Suppose we want to pass a function f : A → C to a function g : ((A ∧ B) → C) → D. This should be possible, since f requires only that its argument have type A; in all calls from g the argument to f will also have type B, but f won’t mind. With only the rules discussed so far, however, the application g f is not well-typed: we can’t get inside the arrow (A ∧ B) → C. For 4 Source type A is a subtype of source type B, A ≤ B ::: e with coercion e of type · ⊢ e : A → B sub A B Coe CoeTyping in typeof+sub.elf B1 ≤ A1 ::: e A2 ≤ B2 ::: e ′ →≤ A1 → A2 ≤ B1 → B2 ::: λf. λx. e ′ (f (e x)) Ak ≤ B ::: e ∧Lk ≤ A1 ∧ A2 ≤ B ::: e A ≤ ⊤ ::: λx. () A ≤ B1 ::: e1 A ≤ B2 ::: e2 ∧R≤ A ≤ B1 ∧ B2 ::: e1 ,, e2 A2 ≤ B ::: e2 A1 ≤ B ::: e1 ∨L≤ A1 ∨ A2 ≤ B ::: λx. (λy. e1 y,, e2 y) x Γ ⊢ e : A Source expression e has source type A Γ1 , x : A, Γ2 ⊢ x : A Γ, x : A ⊢ e : B →I Γ ⊢ λx. e : A → B Γ, x : A ⊢ e : A fix Γ ⊢ fix x. e : A ⊤I Γ ⊢ e : A1 ∧ A2 ∧Ek Γ ⊢ e : Ak Γ ⊢ e : Ak ∨Ik Γ ⊢ e : A1 ∨ A2 Γ ⊢ e:A Γ ⊢ v:⊤ Γ ⊢ e1 : A → B Γ ⊢ e2 : A →E Γ ⊢ e1 e2 : B Γ ⊢ e : A1 Γ ⊢ e : A2 ∧I Γ ⊢ e : A1 ∧ A2 Γ ⊢ e0 : A Γ, x : A ⊢ E [x] : C direct Γ ⊢ E [e0 ] : C A ≤ Bk ::: e ∨Rk ≤ A ≤ B1 ∨ B2 ::: e typeof+sub E A in typeof+sub.elf Γ ⊢ ek : A mergek Γ ⊢ e1 ,, e2 : A var ⊤R≤ Γ, x1 : A1 ⊢ E [x1 ] : C Γ ⊢ e0 : A1 ∨ A2 Γ, x2 : A2 ⊢ E [x2 ] : C ∨E Γ ⊢ E [e0 ] : C A ≤ B ::: ecoerce sub Γ ⊢ e:B Figure 4. Source type system, with subsumption, non-elaborating means that [ ] is no longer in evaluation position. To handle these issues, let e ′ = (λy. e1′ ,, e2′ ) e0′ , where e0′ comes from applying the induction hypothesis to the derivation of Γ ⊢ e0 : A1 ∨ A2 , and e1′ and e2′ come from applying the induction hypothesis to the other two premises. Now e0′ is in evaluation position, because it follows a λ; the mergek typing rule will choose the correct branch. For details, see coerce.elf . We actually encode the typings for ecoerce as hypothetical derivations in the subtyping judgment itself (typeof+sub.elf ), making the sub case here trivial. 5.2 Target Typing 5. Target Language Theorem 2 (Target Type Safety). If · ⊢ M : T then either M is a value, or M 7→ M ′ and · ⊢ M ′ : T . Proof. By induction on the given derivation, using a few standard lemmas; see tm-safety.elf . (The necessary substitution lemma comes for free in Twelf.) The typing rules for the target language (Figure 6) lack any form of subtyping, and are completely standard. 5.3 Target Operational Semantics The operational semantics M 7→ M ′ is, likewise, standard; functions are call-by-value and products are strict. As usual, we write M 7→∗ M ′ for a sequence of zero or more 7→s. Naturally, a type safety result holds: Our target language is just the simply-typed call-by-value λcalculus extended with fixed point expressions, products, and sums. 5.1 Target Syntax Target types Typing contexts And to calm any doubts about whether M might step to some other, not necessarily well-typed term: T ::= unit | T → T | T ∗ T | T + T Theorem 3 (Determinism of 7→). If M 7→ N1 and M 7→ N2 then N1 = N2 (up to α-conversion). Proof. By simultaneous induction. See tm-deterministic in tm-safety.elf . G ::= · | G, x : T Target terms M, N ::= x | () | λx. M | M N | fix x. M | (M1 , M2 ) | projk M | injk M | case M of inj1 x1 ⇒ N1 | inj2 x2 ⇒ N2 Target values 6. Elaboration Typing W ::= x | () | λx. M | (W1 , W2 ) | injk W We elaborate source expressions e into target terms M. The source expressions, which include a “merge” construct e1 ,, e2 , are typed with intersections and unions, but the result of elaboration is completely standard and can be typed with just unit, →, ∗ and +. Figure 5. Target types and terms The target types and terms (Figure 5) are completely standard. 5 G ⊢ M : T Target term M has target type T typeoftm M T in typeoftm.elf G, x : T ⊢ M : T typeoftm/ G ⊢ fix x. M : T fix typeoftm/ G1 , x : T, G2 ⊢ x : T var G, x : T1 ⊢ M : T2 typeoftm/ G ⊢ λx. M : (T1 → T2 ) arrintro G ⊢ M1 : T → T ′ G ⊢ M2 : T typeoftm/ arrelim G ⊢ M1 M2 : T ′ G ⊢ M1 : T1 G ⊢ M2 : T2 typeoftm/ G ⊢ (M1 , M2 ) : (T1 ∗ T2 ) prodintro G ⊢ M : Tk typeoftm/ G ⊢ (injk M) : (T1 + T2 ) sumintrok typeoftm/ G ⊢ () : unit unitintro G ⊢ M : (T1 ∗ T2 ) typeoftm/ G ⊢ (projk M) : Tk prodelimk G, x1 : T1 ⊢ N1 : T G ⊢ M : T1 + T2 G, x2 : T2 ⊢ N2 : T typeoftm/ G ⊢ (case M of inj1 x1 ⇒ N1 | inj2 x2 ⇒ N2 ) : T sumelim Figure 6. Target type system with functions, products and sums M 7→ M ′ Target term M steps to M ′ M1 → 7 M1′ M1 M2 → 7 M1′ M2 (λx. M)W 7→ [W/x]M |⊤| |A1 → A2 | |A1 ∧ A2 | |A1 ∨ A2 | steptm M M’ in steptm.elf M2 → 7 M2′ W1 M2 → 7 W1 M2′ = = = = unit |A1 | → |A2 | |A1 | ∗ |A2 | |A1 | + |A2 | Figure 8. Type translation fix x. M 7→ [(fix x. M)/x]M 6.1 Connecting Elaboration and Typing ′ M 7→ M projk M ′ 7→ projk M ′ M2 7→ (W1 , M2 ) 7→ (W1 , M2′ ) M 7→ M ′ injk M 7→ injk M ′ M 7→ M ′ case M of MS 7→ case M ′ of MS M1 7→ (M1 , M2 ) 7→ (M1′ , M2 ) Equivalence of elaboration and source typing: The non-elaborating type assignment system of Figure 4, minus sub, can be read off from the elaboration rules in Figure 9: simply drop the ֒→ . . . part of the judgment. Consequently, given e : A ֒→ M we can always derive e : A: projk (W1 , W2 ) 7→ Wk M1′ M2′ Theorem 4. If Γ ⊢ e : A ֒→ M then Γ ⊢ e : A (without using rule sub). case injk W of inj1 x1 ⇒ N1 | inj2 x2 ⇒ N2 7→ [W/xk ]Nk Proof. By straightforward induction on the given derivation; see typeof-erase in typeof-elab.elf . Figure 7. Target language operational semantics: call-by-value + products + sums More interestingly, given e : A we can always elaborate e, so elaboration is just as expressive as typing: The elaboration judgment Γ ⊢ e : A ֒→ M is read “under assumptions Γ , source expression e has type A and elaborates to target term M”. While not written explicitly in the judgment, the elaboration rules ensure that M has type |A|, the type translation of A (Figure 8). For example, |⊤ ∧ (⊤→⊤)| = unit ∗ (unit→unit). To simplify the technical development, the elaboration rules work only for source expressions that can be typed without using the subsumption rule sub (Figure 4). Such source expressions can always be produced (Theorem 1, above). The rest of this section discusses the elaboration rules and proves related properties: Theorem 5 (Completeness of Elaboration). If Γ ⊢ e : A (without using rule sub) then Γ ⊢ e : A ֒→ M. Proof. By straightforward induction on the given derivation; see elab-complete in typeof-elab.elf . Elaboration produces well-typed terms: Any target term M produced by the elaboration rules has corresponding target type. In the theorem statement, we assume the obvious translation |Γ |, e.g. |x : ⊤, y : ⊤ ∨ ⊤| = x : |⊤|, y : |⊤ ∨ ⊤| = x : unit, y : unit + unit). 6.1 connects elaboration, source typing, and target typing; Theorem 6 (Elaboration Type Soundness). If Γ ⊢ e : A ֒→ M then |Γ | ⊢ M : |A|. 6.2 gives lemmas useful for showing that target computations correspond to source computations; Proof. By induction on the given derivation. For example, the case for direct, which elaborates to an application, applies typeoftm/arrintro and typeoftm/arrelim. Exploiting a bijection between source types and target types, we actually prove Γ ⊢ M : A, interpreting A and types in Γ as target types: ∧ as ∗, etc. See elab-type-soundness.elf . 6.3 states and proves that correspondence (consistency, Thm. 13); 6.4 summarizes the metatheory through two important corollaries of our various theorems. Finally, Section 6.5 discusses whether we need a value restriction on ∧I. 6 Source expression e has source type A Γ ⊢ e : A ֒→ M and elaborates to target term M (of type |A|) Γ1 , x : A, Γ2 ⊢ x : A ֒→ x var Γ ⊢ ek : A ֒→ M mergek Γ ⊢ e1 ,, e2 : A ֒→ M Γ, x : A ⊢ e : B ֒→ M →I Γ ⊢ λx. e : A → B ֒→ λx. M elab E A M in elab.elf Γ, x : A ⊢ e : A ֒→ M fix Γ ⊢ fix x. e : A ֒→ fix x. M Γ ⊢ v : ⊤ ֒→ () ⊤I Γ ⊢ e1 : A → B ֒→ M1 Γ ⊢ e2 : A ֒→ M2 →E Γ ⊢ e1 e2 : B ֒→ M1 M2 Γ ⊢ e : A1 ∧ A2 ֒→ M ∧Ek Γ ⊢ e : Ak ֒→ projk M Γ ⊢ e : A2 ֒→ M2 Γ ⊢ e : A1 ֒→ M1 ∧I Γ ⊢ e : A1 ∧ A2 ֒→ (M1 , M2 ) Γ ⊢ e : Ak ֒→ M ∨Ik Γ ⊢ e : A1 ∨ A2 ֒→ injk M Γ ⊢ e0 : A ֒→ M0 Γ, x : A ⊢ E [x] : C ֒→ N direct Γ ⊢ E [e0 ] : C ֒→ (λx. N)M0 Γ, x1 : A1 ⊢ E [x1 ] : C ֒→ N1 Γ ⊢ e0 : A1 ∨ A2 ֒→ M0 Γ, x2 : A2 ⊢ E [x2 ] : C ֒→ N2 ∨E Γ ⊢ E [e0 ] : C ֒→ case M0 of inj1 x1 ⇒ N1 | inj2 x2 ⇒ N2 Figure 9. Elaboration typing rules (1) e (2) e 6.2 Relating Source Expressions to Target Terms Elaboration produces a term that corresponds closely to the source expression: a target term is the same as a source expression, except that the intersection- and union-related aspects of the computation become explicit in the target. For instance, intersection elimination via ∧E2 , implicit in the source program, becomes the explicit projection proj2 . The target term has nearly the same structure as the source; the elaboration rules only insert operations such as proj2 , duplicate subterms such as the e in ∧I, and omit unused parts of merges. This gives rise to a relatively simple connection between source expressions and target terms—much simpler than a logical relation, which relates all appropriately-typed terms that have the same extensional behaviour. In fact, stepping in the target preserves elaboration typing, provided we are allowed to step the source expression zero or more times. This consistency result, Theorem 13, needs several lemmas. Lemma 7. If e ∗ e ′ then E [e] ∗ ∗ ∗ e1′ and Γ ⊢ e1′ : A1 ֒→ M1 , and e2′ and Γ ⊢ e2′ : A2 ֒→ M2 . Proof. By induction on the given derivation; the only possible cases are ∧I and merge. See elab-sect.elf . Lemma 10 (Arrows/Lambdas). If · ⊢ e : A → B ֒→ λx. M0 then there exists e0 such that e ∗ λx. e0 and x : A ⊢ e0 : B ֒→ M0 . Proof. By induction on the given derivation; the only possible cases are →I and merge. See elab-arr.elf . Our last interesting lemma shows that if an expression e elaborates to a target value W, we can step e to some value v that also elaborates to W. Lemma 11 (Value monotonicity). If Γ ⊢ e : A ֒→ W then e ∗ v where Γ ⊢ v : A ֒→ W. Proof. By induction on the given derivation. The most interesting case is for ∧I, where we apply the induction hypothesis to each premise (yielding v1′ , v2′ such that e ∗ v1′ and e ∗ v2′ ), apply the ‘step/split’ rule to turn e into (e,, e), and use the ‘step/merge1’ and ‘step/merge2’ rules to step each part of the merge, yielding v1′ ,, v2′ , which is a value. In the mergek case on a merge e1 ,, e2 , we apply the induc∗ tion hypothesis to ek , giving ek v. By rule ‘step/unmerge’, e1 ,, e2 ek , from which e1 ,, e2 ∗ v. See value-mono.elf . E [e ′ ]. Proof. By induction on the number of steps, using a lemma (step-eval-context ) that e e ′ implies E [e] E [e ′ ]. See step*eval-context in step-eval-context.elf . Next, we prove inversion properties of unions, intersections and arrows. Roughly, we want to say that if an expression of union type elaborates to an injection injk M0 , it also elaborates to M0 . For intersections, the property is slightly more complicated: given an expression of intersection type that elaborates to a pair, we can step the expression to get something that elaborates to the components of the pair. Similarly, given an expression of arrow type that elaborates to a λ-abstraction, we can step the expression to a λ-abstraction. Lemma 12 (Substitution). If Γ, x : A ⊢ e : B ֒→ M and Γ ⊢ v : A ֒→ W then Γ ⊢ [v/x]e : B ֒→ [W/x]M. Proof. By induction on the first derivation. As usual, Twelf gives us this substitution lemma for free. Lemma 8 (Unions/Injections). If Γ ⊢ e : A1 ∨ A2 ֒→ injk M0 then Γ ⊢ e : Ak ֒→ M0 . 6.3 Consistency This theorem is the linchpin: given e that elaborates to M, we can preserve the elaboration relationship even after stepping M, though we may have to step e some number of times as well. The expression e and term M, in general, step at different speeds: Proof. By induction on the derivation of Γ ⊢ e : C ֒→ M. The only possible cases are mergek and ∨Ik . See elab-inl and elab-inr in elab-union.elf . • M steps while e doesn’t—for example, if M is inj1 (W1 , W2 ) Lemma 9 (Intersections/Pairs). If Γ ⊢ e : A1 ∧ A2 ֒→ (M1 , M2 ) then there exist e1′ and e2′ such that and steps to W1 , there is nothing to do in e because the injection corresponds to implicit union introduction in rule ∨I1 ; 7 • e may step more than M—for example, if e is (v1 ,, v2 ) v and Theorem 14 (Multi-step Consistency). If · ⊢ e : A ֒→ M and M 7→∗ W then there exists v such that e ∗ v and · ⊢ v : A ֒→ W. M is (λx. x) W, then M β-reduces to W, but e must first ‘step/unmerge’ to the appropriate vk , yielding vk v, and then apply ‘step/beta’. Proof. By induction on the derivation of M 7→∗ W. If M is some value w then, by Lemma 11, e is some value v. The source expression e steps to itself in zero steps, so v ∗ v, and · ⊢ v : A ֒→ W is given (e = v and M = W). Otherwise, we have M 7→ M ′ where M ′ 7→∗ W. We want to show · ⊢ e ′ : A ֒→ M ′ , where e ∗ e ′ . By Theorem 13, either · ⊢ e : A ֒→ M ′ , or e e ′ and · ⊢ e ′ : A ֒→ M ′ . (Note that the converse—if e e ′ then M 7→∗ M ′ —does not hold: we could pick the wrong half of a merge and get a source expression with no particular relation to M.) Theorem 13 (Consistency). If · ⊢ e : A ֒→ M and M 7→ M ′ then there exists e ′ such that e ∗ e ′ and · ⊢ e ′ : A ֒→ M ′ . Proof. By induction on the derivation D of · ⊢ e : A ֒→ M. We show several cases here; the full proof is in consistency.elf . • Case var, ⊤I, →I: • Case ∧I: D :: • If · ⊢ e : A ֒→ M ′ , let e ′ = e, so · ⊢ e ′ : A ֒→ M ′ and e ′ in zero steps. e ′ and · ⊢ e ′ : A ֒→ M ′ , we can use the i.h., showing ′ ∗ that e v and · ⊢ v : A ֒→ W. e Impossible because M cannot step. · ⊢ e : A1 ֒→ M1 · ⊢ e : A2 ֒→ M2 · ⊢ e : A1 ∧ A2 ֒→ (M1 , M2 ) See consistency* in consistency.elf . 6.4 Summing Up By inversion, either M1 7→ M1′ or M2 7→ M2′ . Suppose the former (the latter is similar). By i.h., e ∗ e1′ and · ⊢ e1′ : e,, e. Repeatedly applying A1 ֒→ M1′ . By ‘step/split’, e ‘step/merge1’ gives e,, e ∗ e1′ ,, e. For typing, apply merge1 with premise · ⊢ e1′ : A1 ֒→ M1′ and with premise · ⊢ e : A2 ֒→ M2 . Finally, by ∧I, we have · ⊢ e1′ ,, e : A1 ∧ A2 ֒→ (M1′ , M2 ). • Case ∧Ek : · ⊢ e : A1 ∧ A2 ֒→ M0 D :: · ⊢ e : Ak ֒→ projk M0 Theorem 15 (Static Semantics). If · ⊢ e : A (using any of the rules in Figure 4) then there exists e ′ such that · ⊢ e ′ : A ֒→ M and · ⊢ M : |A|. Proof. By Theorems 1 (coercion), 5 (completeness of elaboration) and 6 (elaboration type soundness). Theorem 16 (Dynamic Semantics). If · ⊢ e : A ֒→ M and M 7→∗ W then there is a source value v such that e ∗ v and · ⊢ v : A. If projk M0 7→ projk M0′ with M0 7→ M0′ , use the i.h. and apply ∧Ek . If M0 = (W1 , W2 ) and projk M0 7→ Wk , use Lemma 9, yielding e ∗ ek′ and Γ ⊢ ek′ : Ak ֒→ Wk . • Case mergek : · ⊢ ek : A ֒→ M D :: · ⊢ e1 ,, e2 : A ֒→ M Proof. By Theorems 14 (multi-step consistency) and 4. Recalling the diagram in Figure 1, Theorem 16 shows that it commutes. Both theorems are stated and proved in summary.elf . Combined with a run of the target program (M 7→∗ W), they show that elaborated programs are consistent with source programs. ∗ By i.h., ek e ′ and · ⊢ e ′ : A. By rule ‘step/unmerge’, e1 ,, e2 ek . Therefore e1 ,, e2 ∗ e ′ . • Case →E: · ⊢ e1 : A→B ֒→ M1 · ⊢ e2 : A ֒→ M2 D :: · ⊢ e1 e2 : B ֒→ M1 M2 6.5 The Value Restriction Davies and Pfenning (2000) showed that the then-standard intersection introduction (that is, our ∧I) was unsound in a call-by-value semantics in the presence of effects (specifically, mutable references). Here is an example (modeled on theirs). Assume a base type nat with values 0, 1, 2, . . . and a type pos of strictly positive naturals with values 1, 2, . . . ; assume pos ≤ nat. We show one of the harder subcases (consistency/app/beta in consistency.elf ). In this subcase, M1 = λx. M0 and M2 is a value, with M1 M2 7→ [M2 /x]M0 . We use several easy lemmas about stepping; for example, step*app1 says that if e1 ∗ e1′ then e1 e2 ∗ e1′ e2 . Elab1 :: · ⊢ e1 : A → B ֒→ λx. M0 Subd. ElabBody :: x : A ⊢ e0 : B ֒→ M0 By Lemma 10 ′′ StepsFun :: e1 ∗ λx. e0 ∗ StepsApp :: e1 e2 (λx. e0 )e2 By step*app1 let r = (ref 1) : (nat ref) ∧ (pos ref) in r := 0; (!r) : pos Using the unrestricted ∧I rule, r has type (nat ref) ∧ (pos ref); using ∧E1 yields r : nat ref, so the write r := 0 is well-typed; using ∧E2 yields r : pos ref, so the read !r produces a pos. In an unelaborated setting, this typing is unsound: (ref 1) creates a single cell, initially containing 1, then overwritten with 0, so !r 0, which does not have type pos. Davies and Pfenning proposed, analogously to ML’s value restriction on ∀-introduction, an ∧-introduction rule that only types values v. This rule is sound with mutable references: Elab2 :: · ⊢ e2 : A ֒→ M2 Subd. M2 value Above Elab2 ′ :: · ⊢ e2 ∗ v2 By Lemma 11 · ⊢ v2 : A ֒→ M2 ′′ (λx. e0 )e2 ∗ (λx. e0 )v2 By step*app2 e1 e2 ∗ (λx. e0 )v2 By step*append (λx. e0 )v2 [v2 /x]e0 By ‘step/beta’ StepsAppBeta :: e1 e2 ∗ [v2 /x]e0 ElabBody :: x : A ⊢ e0 : B ֒→ M0 ∗ • If e v : A1 v : A2 ∧I (Davies and Pfenning) v : A1 ∧ A2 By step*snoc Above In an elaboration system like ours, however, the problematic example above is sound, because our ∧I elaborates ref 1 to two distinct expressions, which create two unaliased cells: · ⊢ [v2 /x]e0 : B ֒→ [M2 /x]M0 By Lemma 12 (Elab2 ′ ) 8 val mul = Int.* val toString = Int.toString ref 1 : nat ref ֒→ ref 1 ref 1 : pos ref ֒→ ref 1 ∧I ref 1 : nat ref ∧ pos ref ֒→ (ref 1, ref 1) val mul = mul ,, Real.* (∗ shadows earlier ‘mul’ ∗) val toString = toString ,, Real.toString Thus, the example elaborates to (*[ val square : (int → int) ∧ (real → real) ]*) val square = fn x ⇒ x * x let r = (ref 1, ref 1) in (proj1 r) := 0; (!proj2 r) : pos val _ = print (toString (mul (0.5, 300.0)) ^ "; ") val _ = print (toString (square 9) ^ "; ") val _ = print (toString (square 0.5) ^ "\n") which is well-typed, but does not “go wrong” in the type-safety sense: the assignment writes to the first cell (∧E1 ), and the dereference reads the second cell (∧E2 ), which still contains the original value 1. The restriction-free ∧I thus appears sound in our setting. Being sound is not the same as being useful, though; such behaviour is less than intuitive, as we discuss in the next section. Output of target program after elaboration: 150.0; 81; 0.25 Figure 10. Example of overloading lists of lists; the version of toString for lists would use the earlier occurrence of toString, defined for integers and reals only. Adding a mechanism for naming a type and then “unioning” it, recursively, is future work. 7. Coherence The merge construct, while simple and powerful, has serious usability issues when the parts of the merge have overlapping types. Or, more accurately, when they would have overlapping types— types with nonempty intersection—in a merge-free system: in our system, all intersections A ∧ B of nonempty A, B are nonempty: if vA : A and vB : B then vA ,, vB : A ∧ B by mergek and ∧I. According to the elaboration rules, 0,, 1 (checked against nat) could elaborate to either 0 or 1. Our implementation would elaborate 0,, 1 to 0, because it tries the left part 0 first. Arguably, this is better behaviour than actual randomness, but hardly helpful to the programmer. Perhaps even more confusingly, suppose we are checking 0,, 1 against pos ∧ nat, where pos and nat are as in Section 6.5. Our implementation would elaborate 0,, 1 to (1, 0), but 1,, 0 to (1, 1). Since the behaviour of the target program depends on the particular elaboration typing used, the system lacks coherence (Reynolds 1991). To recover a coherent semantics, we could limit merges according to their surface syntax, as Reynolds did in Forsythe, but this seems restrictive; also, crafting an appropriate syntactic restriction depends on details of the type system, which is not robust as the type system is extended. A more general approach might be to reject (or warn about) merges in which more than one part checks against the same type (or the same part of an intersection type). Implementing this seems straightforward, though it would slow typechecking since we could not skip over e2 when e1 checks in e1 ,, e2 . Leaving merges aside, the mere fact that ∧I elaborates the expression twice creates problems with mutable references, as we saw in Section 6.5. For this, we could revive the value restriction in ∧I, at least for expressions whose types might overlap. 8.2 Records Reynolds (1996) developed an encoding of records using intersection types and his version of the merge construct; similar ideas appear in Castagna et al. (1995). Though straightforward, this encoding is more expressive than SML records. The idea is to add single-field records as a primitive notion, through a type {fld : A} with introduction form {fld= e} and the usual eliminations (explicit projection and pattern matching). Once this is done, the multi-field record type {fld1 : A1 , fld2 : A2 } is simply {fld1 : A1 } ∧ {fld2 : A2 }, and the corresponding intro form is a merge: {fld1= A1 },, {fld2= A2 }. More standard concrete syntax, such as {fld1= A1 , fld2= A2 }, can be handled trivially during parsing. With subtyping on intersections, we get the desired behaviour of what SML calls “flex records”—records with some fields not listed—with fewer of SML’s limitations. Using this encoding, a function that expects a record with fields x and y can be given any record that has at least those fields, whereas SML only allows one fixed set of fields. For example, the code in Figure 11 is legal in our language but not in SML. One problem with this approach is that expressions with duplicated field names are accepted. This is part of the larger issue discussed in Section 7. 8.3 Heterogeneous Data A common argument for dynamic typing over static typing is that heterogeneous data structures are more convenient. For example, dynamic typing makes it very easy to create and manipulate lists containing both integers and strings. The penalty is the loss of compile-time invariant checking. Perhaps the lists should contain integers and strings, but not booleans; such an invariant is not expressible in traditional dynamic typing. A common rebuttal from advocates of static typing is that it is easy to simulate dynamic typing in static typing. Want a list of integers and strings? Just declare a datatype 8. Applying Intersections and Unions 8.1 Overloading A very simple use of unrestricted intersections is to “overload” operations such as multiplication and conversion of data to printable form. SML provides overloading only for a fixed set of built-in operations; it is not possible to write a single square function, as we do in Figure 10. Despite its appearance, (*[ val square : . . . ]*) is not a comment but an annotation used to guide our bidirectional typechecker (this syntax, inherited from Stardust, was intended for compatibility with SML compilers, which saw these annotations as comments and ignored them). In its present form, this idiom is less powerful than type classes (Wadler and Blott 1989). We could extend toString for lists, which would handle lists of integers and lists of reals, but not datatype int_or_string = Int of int | String of string and use int_or_string lists. This guarantees the invariant that the list has only integers and strings, but is unwieldy: each new element must be wrapped in a constructor, and operations on the list elements must unwrap the constructor, even when those operations accept both integers and strings (such as a function of type (int → string) ∧ (string → string)). 9 9. Implementation (*[ val get_xy : {x:int, y:int} → int*int ]*) fun get_xy r = (#x(r), #y(r)) Our implementation is faithful to the spirit of the elaboration rules above, but is substantially richer. It is based on Stardust, a typechecker for a subset of core Standard ML with support for inductive datatypes, products, intersections, unions, refinement types and indexed types (Dunfield 2007), extended with support for (first-class) polymorphism (Dunfield 2009). We do not yet support all these features; support for first-class polymorphism looks hardest, since Standard ML compilers cannot even handle higher-rank predicative polymorphism. Elaborating programs that use ML-style prenex polymorphism should work, but we currently lack any proof or even significant testing to back that up. Our implementation does currently support merges, intersections and unions, a top type, a bottom (empty) type, single-field records and encoded multi-field records (Section 8.2), and inductive datatypes (if their constructors are not of intersection type, though they can take intersections and unions as argument; removing this restriction is a high priority). (*[ val tupleToString : int * int → string ]*) fun tupleToString (x, y) = "(" ^ Int.toString x ^ "," ^ Int.toString y ^ ")" val rec1 = {y = 11, x = 1} val rec2 = {x = 2, y = 22, extra = 100} val rec3 = {x = 3, y = 33, other = "a string"} val _ = print ("get_xy rec1 = " ^ tupleToString (get_xy rec1) ^ "\n") val _ = print ("get_xy rec2 = " ^ tupleToString (get_xy rec2) ^ " (extra = " ^ Int.toString #extra(rec2) ^ ")\n") val _ = print ("get_xy rec3 = " ^ tupleToString (get_xy rec3) ^ " (other = " ^ #other(rec3) ^ ")\n") 9.1 Bidirectional Typechecking Output of target program after elaboration: get_xy rec1 = (1,11) get_xy rec2 = (2,22) (extra = 100) get_xy rec3 = (3,33) (other = a string) Our implementation uses bidirectional typechecking (Pierce and Turner 2000; Dunfield and Pfenning 2004; Dunfield 2009), an increasingly common technique in advanced type systems; see Dunfield (2009) for references. This technique offers two major benefits over Damas-Milner type inference: it works for many type systems where annotation-free inference is undecidable, and it seems to produce more localized error messages. Bidirectional typechecking does need more type annotations. However, by following the approach of Dunfield and Pfenning (2004), annotations are never needed except on redexes. The present implementation allows some annotations on redexes to be omitted as well. The basic idea of bidirectional typechecking is to separate the activity of checking an expression against a known type from the activity of synthesizing a type from the expression itself: Figure 11. Example of flexible multi-field records datatype ’a list = nil | :: of ’a * ’a list type dyn = int ∨ real ∨ string (*[ val toString : dyn → string ]*) fun toString x = (Int.toString ,, (fn s ⇒ s : string) ,, Real.toString) x Γ ⊢ e⇐A Γ ⊢ e⇒A (*[ val hetListToString : dyn list → string ]*) fun hetListToString xs = case xs of nil ⇒ "nil" | h::t ⇒ (toString h) ^ "::" ^ (hetListToString t) e checks against known type A e synthesizes type A In the checking judgment, Γ , e and A are inputs to the typing algorithm, which either succeeds or fails. In the synthesis judgment, Γ and e are inputs and A is output (assuming synthesis does not fail). Syntactically speaking, crafting a bidirectional type system from a type assignment system (like the one in Figure 4) is a matter of taking the colons in the Γ ⊢ e : A judgments, and replacing some with “⇐” and some with “⇒”. Except for mergek , our typing rules can all be found in Dunfield and Pfenning (2004), who argued that introduction rules should check and elimination rules should synthesize. (Parametric polymorphism muddies this picture, but see Dunfield (2009) for an approach used by our implementation.) For functions, this leads to the bidirectional rules val _ = print "\n\n" val _ = print (hetListToString [1, 2, "what", 3.14159, 4, "why"]) val _ = print "\n\n\n" Output of target program after elaboration: 1::2::what::3.14159::4::why::nil Figure 12. Example of heterogeneous data Γ, x : A ⊢ e ⇐ B →I Γ ⊢ λx. e ⇐ A → B In this situation, our approach provides the compile-time invariant checking of static typing and the transparency of dynamic typing. The type of list elements (if we bother to declare it) is just a union type: Γ ⊢ e1 ⇒ A → B Γ ⊢ e2 ⇐ A →E Γ ⊢ e1 e2 ⇒ B The merge rule, however, neither introduces nor eliminates. We implement the obvious checking rule (which, in practice, always tries to check against e1 and, if that fails, against e2 ): type int_union_string = int ∨ string Γ ⊢ ek ⇐ A Γ ⊢ e1 ,, e2 ⇐ A Elaboration transforms programs with int_union_string into programs with int_or_string. Along these lines, we use in Figure 12 a type dyn, defined as int ∨ real ∨ string. It would be useful to also allow lists, but the current implementation lacks recursive types of a form that could express “dyn = ... ∨ dyn list”. Since it can be inconvenient to annotate merges, we also implement synthesis rules, including one that can synthesize an intersection. Γ ⊢ ek ⇒ A Γ ⊢ e1 ,, e2 ⇒ A 10 Γ ⊢ e1 ⇒ A1 Γ ⊢ e2 ⇒ A2 Γ ⊢ e1 ,, e2 ⇒ A1 ∧ A2 information. In their work, terms have both compile-time types and run-time types (the run-time types become more precise as the computation continues); the semantics of applying a &-term depends on the run-time type of the argument to choose the branch. The choice of the smallest compatible domain is consistent with notions of inheritance in object-oriented programming, where a class can override the methods of its parent. Given a bidirectional typing derivation, it is generally easy to show that a corresponding type assignment exists: replace all “⇒” and “⇐” with “:” (and erase explicit type annotations from the expression). 9.2 Performance Intersection typechecking is PSPACE-hard (Reynolds 1996). In practice, we elaborate the examples in Figures 10, 11 and 12 in less than a second, but they are very small. On somewhat larger examples, such as those discussed by Dunfield (2007), the nonelaborating version of Stardust could take minutes, thanks to heavy use of backtracking search (trying ∧E1 then ∧E2 , etc.) and the need to check the same expression against different types (∧I) or with different assumptions (∨E). Elaboration doesn’t help with this, but it shouldn’t hurt by more than a constant factor: the shapes of the derivations and the labour of backtracking remain the same. To scale the approach to larger programs, we will need to consider how to efficiently represent elaborated intersections and unions. Like the theoretical development, the implementation has 2-way intersection and union types, so the type A1 ∧ A2 ∧ A3 is parsed as (A1 ∧ A2 ) ∧ A3 , which becomes (A1 ∗A2 )∗A3 . A flattened representation A1 ∗ A2 ∗ A3 would be more efficient, except when the program uses values of type (A1 ∧ A2 ) ∧ A3 where values of type A1 ∧ A2 are expected; in that case, nesting the product allows the inner pair to be passed directly with no reboxing. Symmetry is also likely to be an issue: passing v : A1 ∧ A2 where v : A2 ∧ A1 is expected requires building a new pair. Here, it may be helpful to put the components of intersections into a canonical order. The foregoing applies to unions as well—introducing a value of a three-way union may require two injections, and so on. Semantic subtyping. Following the λ&-calculus, Frisch et al. (2008) investigated a notion of purely semantic subtyping, where the definition of subtyping arises from a model of types, as opposed to the syntactic approach used in our system. They support intersections, unions, function spaces and even complement. Their language includes a dynamic type dispatch which, very roughly, combines a merge with a generalization of our union elimination. Again, the semantics relies on run-time type information. Pierce’s work. The earliest reference I know for the idea of compiling intersection to product is Pierce (1991b): “a language with intersection types might even provide two different objectcode sequences for the two versions of + [for int and for real]” (p. 11). Pierce also developed a language with union types, including a term-level construct to explicitly eliminate them (Pierce 1991a). But this construct is only a marker for where to eliminate the union: it has only one branch, so the same term must typecheck under each assumption. Another difference is that this construct is the only way to eliminate a union type in his system, whereas our ∨E is markerfree. Intersections, also present in his language, have no explicit introduction construct; the introduction rule is like our ∧I. Flow types. Turbak et al. (1997) and Wells et al. (2002) use intersections in a system with flow types. They produce programs with virtual tuples and virtual sums, which correspond to the tuples and sums we produce by elaboration. However, these constructs are internal: nothing in their work corresponds to our explicit intersection and union term constructors, since their system is only intended to capture existing flow properties. They do not compile the virtual constructs into the ordinary ones. 10. Related Work Intersections were originally developed by Coppo et al. (1981) and Pottinger (1980), among others; Hindley (1992) gives a useful introduction and bibliography. Work on union types began later (MacQueen et al. 1986); Barbanera et al. (1995) is a key paper on type assignment for unions. Heterogeneous data and dynamic typing. Several approaches to combining dynamic typing’s transparency and static typing’s guarantees have been investigated. Soft typing (Cartwright and Fagan 1991; Aiken et al. 1994) adds a kind of type inference on top of dynamic typing, but provides no ironclad guarantees. Typed Scheme (Tobin-Hochstadt and Felleisen 2008), developed to retroactively type Scheme programs, has a flow-sensitive type system with union types, directly supporting heterogeneous data in the style of Section 8.3. Unlike soft typing, Typed Scheme guarantees type safety and provides genuine (even first-class) polymorphism, though programmers are expected to provide some annotations. Forsythe. In the late 1980s3 , Reynolds invented Forsythe (Reynolds 1996), the first practical programming language based on intersection types. In addition to an unmarked introduction rule like ∧I, the Forsythe type system includes rules for typing a construct p1 ,p2 — “a construction for intersecting or ‘merging’ meanings” (Reynolds 1996, p. 24). Roughly analogous to e1 ,, e2 , this construct is used to encode a variety of features, but can only be used unambiguously. For instance, a record and a function can be merged, but two functions cannot (actually they can, but the second phrase p2 overrides the first). Forsythe does not have union types. Type refinements. Restricting intersections and unions to refinements of a single base type simplifies many issues, and is conservative: programs can be checked against refined types, then compiled normally. This approach has been explored for intersections (Freeman and Pfenning 1991; Davies and Pfenning 2000), and for intersections and unions (Dunfield and Pfenning 2003, 2004). The λ&-calculus. Castagna et al. (1995) developed the λ&calculus, which has &-terms—functions whose body is a merge, and whose type is an intersection of arrows. In their semantics, applying a &-term to some argument reduces the term to the branch of the merge with the smallest (compatible) domain. Suppose we have a &-term with two branches, one of type nat → nat and one of type pos → pos. Applying that &-term to a value of type pos steps to the second branch, because its domain pos is (strictly) a subtype of nat. Despite the presence of a merge-like construct, their work on the λ&-calculus is markedly different from ours: it gives a semantics to programs directly, and uses type information to do so, whereas we elaborate to a standard term language with no runtime type 11. Conclusion We have laid a simple yet powerful foundation for compiling unrestricted intersections and unions: elaboration into a standard functional language. Rather than trying to directly understand the behaviours of source programs, we describe them via their consistency with the target programs. The most immediate challenge is coherence: While our elaboration approach guarantees type safety of the compiled program, the 3 The citation year 1996 is the date of the revised description of Forsythe; the core ideas are found in Reynolds (1988). 11 meaning of the compiled program depends on the particular elaboration typing derivation used; the meaning of the source program is actually implementation-defined. One possible solution is to restrict typing of merges so that a merge has type A only if exactly one branch has type A. We could also partially revive the value restriction, giving non-values intersection type only if (to a conservative approximation) both components of the intersection are provably disjoint, in the sense that no merge-free expression has both types. Another challenge is to reconcile, in spirit and form, the unrestricted view of intersections and unions of this paper with the refinement approach. Elaborating a refinement intersection like (pos → neg) ∧ (neg → pos) to a pair of functions seems pointless (unless it can somehow facilitate optimizations in the compiler). It will probably be necessary to have “refinement” and “unrestricted” versions of the intersection and union type constructors, at least during elaboration; it may be feasible to hide this distinction at the source level. Joshua Dunfield and Frank Pfenning. Tridirectional typechecking. In Principles of Programming Languages, pages 281–292, 2004. Tim Freeman and Frank Pfenning. Refinement types for ML. In Programming Language Design and Implementation, pages 268–277, 1991. Alain Frisch, Giuseppe Castagna, and Véronique Benzaken. Semantic subtyping: dealing set-theoretically with function, union, intersection, and negation types. J. ACM, 55(4):1–64, 2008. J. Roger Hindley. Coppo-Dezani types do not correspond to propositional logic. Theoretical Computer Science, 28:235–236, 1984. J. Roger Hindley. Types with intersection: An introduction. Formal Aspects of Computing, 4:470–486, 1992. Assaf J. Kfoury and J. B. Wells. Principality and type inference for intersection types using expansion variables. Theoretical Computer Science, 311(1–3):1–70, 2004. David MacQueen, Gordon Plotkin, and Ravi Sethi. An ideal model for recursive polymorphic types. Information and Control, 71: 95–130, 1986. Peter Møller Neergaard and Harry G. Mairson. Types, potency, and idempotency: Why nonlinearity and amnesia make a type system work. In ICFP, pages 138–149, 2004. Frank Pfenning and Carsten Schürmann. System description: Twelf—a meta-logical framework for deductive systems. In Int’l Conf. Automated Deduction (CADE-16), pages 202–206, 1999. Benjamin C. Pierce. Programming with intersection types, union types, and polymorphism. Technical Report CMU-CS-91-106, Carnegie Mellon University, 1991a. Benjamin C. Pierce. Programming with intersection types and bounded polymorphism. PhD thesis, Carnegie Mellon University, 1991b. Technical Report CMU-CS-91-205. Benjamin C. Pierce and David N. Turner. Local type inference. ACM Trans. Prog. Lang. Syst., 22:1–44, 2000. Garrel Pottinger. A type assignment for the strongly normalizable lambda-terms. In To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pages 561–577. Academic Press, 1980. John C. Reynolds. Preliminary design of the programming language Forsythe. Technical Report CMU-CS-88-159, Carnegie Mellon University, 1988. http://doi.library.cmu.edu/ 10.1184/OCLC/18612825. John C. Reynolds. The coherence of languages with intersection types. In Theoretical Aspects of Computer Software, volume 526 of LNCS, pages 675–700. Springer, 1991. John C. Reynolds. Design of the programming language Forsythe. Technical Report CMU-CS-96-146, Carnegie Mellon University, 1996. Sam Tobin-Hochstadt and Matthias Felleisen. The design and implementation of Typed Scheme. In Principles of Programming Languages, pages 395–406, 2008. Franklyn Turbak, Allyn Dimock, Robert Muller, and J. B. Wells. Compiling with polymorphic and polyvariant flow types. In Int’l Workshop on Types in Compilation, 1997. Twelf. Twelf wiki, 2012. http://twelf.org/wiki/Main_Page. Philip Wadler and Stephen Blott. How to make ad-hoc polymorphism less ad hoc. In Principles of Programming Languages, pages 60–76, 1989. J.B. Wells, Allyn Dimock, Robert Muller, and Franklyn Turbak. A calculus with polymorphic and polyvariant flow types. J. Functional Programming, 12(3):183–227, 2002. Acknowledgments In 2008, Adam Megacz suggested (after I explained the idea of compiling intersection to product) that one could use an existing ML compiler “as a backend”. The anonymous ICFP reviewers’ suggestions have (I hope) significantly improved the presentation. Finally, I had useful discussions about this work with Yan Chen, Matthew A. Hammer, Scott Kilpatrick, Neelakantan R. Krishnaswami, and Viktor Vafeiadis. References Alexander Aiken, Edward L. Wimmers, and T. K. Lakshman. Soft typing with conditional types. In Principles of Programming Languages, pages 163–173, 1994. Franco Barbanera, Mariangiola Dezani-Ciancaglini, and Ugo de’Liguoro. Intersection and union types: syntax and semantics. Information and Computation, 119:202–230, 1995. Robert Cartwright and Mike Fagan. Soft typing. In Programming Language Design and Implementation, pages 278–292, 1991. Giuseppe Castagna, Giorgio Ghelli, and Giuseppe Longo. A calculus for overloaded functions with subtyping. Information and Computation, 117(1):115–135, 1995. M. Coppo, M. Dezani-Ciancaglini, and B. Venneri. Functional characters of solvable terms. Zeitschrift f. math. Logik und Grundlagen d. Math., 27:45–58, 1981. Rowan Davies. Practical Refinement-Type Checking. PhD thesis, Carnegie Mellon University, 2005. CMU-CS-05-110. Rowan Davies and Frank Pfenning. Intersection types and computational effects. In ICFP, pages 198–208, 2000. Joshua Dunfield. Refined typechecking with Stardust. In Programming Languages meets Program Verification (PLPV ’07), 2007. Joshua Dunfield. Greedy bidirectional polymorphism. In ML Workshop, pages 15–26, 2009. http://www.cs.cmu.edu/ ~joshuad/papers/poly/. Joshua Dunfield. Untangling typechecking of intersections and unions. In 2010 Workshop on Intersection Types and Related Systems, volume 45 of EPTCS, pages 59–70, 2011. arXiv: 1101.4428v1[cs.PL]. Joshua Dunfield. Twelf proofs accompanying this paper, March 2012. http://www.cs.cmu.edu/~joshuad/intcomp.tar or http://www.cs.cmu.edu/~joshuad/intcomp/. Joshua Dunfield and Frank Pfenning. Type assignment for intersections and unions in call-by-value languages. In Found. Software Science and Computation Structures (FoSSaCS ’03), pages 250– 266, 2003. 12 A. Guide to the Twelf development This is the PDF part of the auxiliary material to the ICFP 2012 submission, “Elaborating Intersection and Union Types”. The rest of the auxiliary material is Twelf code, and is available on the web: http://www.cs.cmu.edu/~joshuad/intcomp.tar http://www.cs.cmu.edu/~joshuad/intcomp/ tar archive browsable files We give an overview and briefly describe each file (mapping back to the paper). A.1 Overview All the lemmas and theorems in the paper were proved in Twelf (version 1.7.1). The only caveat is that, to avoid the tedium of using nontrivial induction measures (Twelf only knows about subterm ordering), we use the %trustme directive to define pacify, yielding a blatantly unsound induction measure; see base.elf . All uses of this unsound measure can be found with grep pacify *.elf You can easily verify that in each case where pacify is used, the real inductive object is smaller according to either the standard depth (maximum path length) or weight (number of constructors, i.e. number of inference rules used) measures. In any case, you will need to set the unsafe flag to permit the use of %trustme in the definition of pacify. A.2 Files • base.elf : Generic definitions not specific to this paper. • syntax.elf : Source expressions exp, target terms tm, and types ty, covering much of Figures 2, 5, and 8. • is-value.elf : Which source expressions are values (Figure 2). • eval-contexts.elf : • is-valuetm.elf : Evaluation contexts (Figure 2). Which target terms are values (Figure 5). • typeof.elf : A system of rules for a version of Γ ⊢ e : A without subtyping. This system is related to the one in Figure 4 by Theorem 1 (coerce.elf ). The rules for Γ ⊢ e : A (Figure 4). Also defines subtyping sub A B Coe CoeTyping, corresponding to A ≤ B ֒→ Coe. In the Twelf development, this judgment carries its own typing derivation (in the typeof.elf system, without subtyping) CoeTyping, which shows that the coercion Coe is well-typed. • typeof+sub.elf : • sub-refl.elf and sub-trans.elf : Reflexivity and transitivity of subtyping. • coerce.elf : Theorem 1: Given an expression well-typed in the system of typeof+sub.elf , with full subsumption, coercions for function types can be inserted to yield an expression well-typed in the system of typeof.elf . Getting rid of subsumption makes the rest of the development easier. • elab.elf : Elaboration rules deriving Γ ⊢ e : A ֒→ M from Figure 9. • typeof-elab.elf : Theorems 4 and 5. The typing rules deriving G ⊢ M : T from Figure 6. • typeoftm.elf : • elab-type-soundness.elf : • step.elf : Stepping rules e • step-eval-context.elf : • steptm.elf : Theorem 6. e ′ (Figure 3). Lemma 7 (stepping subexpressions in evaluation position). Stepping rules M 7→ M ′ (Figure 7). • tm-safety.elf : Theorems 2 and 3 (target type safety and determinism). • elab-union.elf , elab-sect.elf , elab-arr.elf Inversion properties of elaboration for ∨, ∧ and → (Lemmas 8, 9, and 10). • value-mono.elf : • consistency.elf : • summary.elf : Value monotonicity of elaboration (Lemma 11). The main consistency result (Theorem 13) and its multi-step version (Theorem 14). Theorems 15 and 16, which are corollaries of earlier theorems. 13
6cs.PL
SEPARATING HYPERPLANES OF EDGE POLYTOPES arXiv:1112.5047v2 [math.CO] 9 Aug 2012 TAKAYUKI HIBI, NAN LI AND YAN X ZHANG Abstract. Let G be a finite connected simple graph with d vertices and let PG ⊂ Rd be the edge polytope of G. We call PG decomposable if PG decomposes into integral polytopes PG+ and PG− via a hyperplane. In this paper, we explore various aspects of decomposition of PG : we give an algorithm deciding the decomposability of PG , we prove that PG is normal if and only if both PG+ and PG− are normal, and we also study how a condition on the toric ideal of PG (namely, the ideal being generated by quadratic binomials) behaves under decomposition. introduction A simple graph is a graph with no loops and no multiple edges. Let G be a finite connected simple graph with vertex set [d] = {1, . . . , d} and edge set E(G) = {e1 , . . . , en }. Let ei be the i-th unit coordinate vector of the euclidean space Rd . If e = (i, j) is an edge of G, then we set ρ(e) = ei + ej ∈ Rd . The edge polytope PG of G is the convex hull of {ρ(e1 ), . . . , ρ(en )} in Rd . The basics of edge polytopes are studied in [4], [5], [6], [7] and [8]. In this paper, we study the decompositions of edge polytopes via hyperplanes. Recall that a convex polytope is integral if all of its vertices have integral coordinates; in particular, PG is an integral polytope. Let ∂P denote the boundary of a polytope P . We say that P is decomposable if there exists a hyperplane H of Rd with H ∩ (P \ ∂P ) 6= ∅ such that each of the convex polytopes P ∩ H(+) and P ∩ H(−) is integral. Here H(+) and H(−) are the closed half-spaces of Rd with H(+) ∩ H(−) = H. Such a hyperplane H is called a separating hyperplane of P . We start with a nice fact, Lemma 1.8, which shows that when PG is decomposable into PG+ and PG− , the two subpolytopes are again edge polytopes. This lemma sets the theme for our paper, namely that certain polytope properties (in this case, being an edge polytope) are well-behaved under decomposition when we restrict to edge polytopes. Furthermore, thanks to edge polytopes having associated graphs, these properties may correspond to easily-visualized combinatorial properties of the underlying graphs. When both of these conditions are in place, checking difficult properties on a decomposable polytope may then be reduced to checking those properties on the graphs corresponding to the smaller pieces in its decomposition. This is one motivation for the study of decomposable edge polytopes. 2010 Mathematics Subject Classification: Primary 00000; Secondary 00000. Keywords: edge polytope, normal edge polytope, separating hyperplane. 1 After the basics, we look at the fundamental problem of determining which edge polytopes are decomposable. In Corollary 1.6, we see that a necessary condition for the decomposability of PG is that G possesses at least one cycle of length 4. We also provide Algorithm 1.13, which decides the decomposability of an edge polytope. We then focus on the case when G is a complete multipartite graph and count the number of separating hyperplanes for such PG in Theorem 2.5. Then, we consider the property of normality under decomposition. The characterization of normal polytopes is one of the fundamental questions of the study of lattice polytopes that can also shed light on other properties. For example, it is hard to check combinatorially whether a toric ring of a polytope is Cohen-Macaulay, but Hochster’s Theorem [3] gives that this is implied by the normality of the polytope. This paper is part of a continuing effort to understand normality in edge polytopes that started in [4] and [10]. It is known [4, Corollary 2.3] that an edge polytope PG is normal if and only if G satisfies the so-called “odd cycle condition” ([1]). We use this combinatorial criterion to show that normality of edge polytopes also behaves nicely under decomposition in Theorem 3.2; specifically, in a decomposition of an edge polytope PG , then PG is normal if and only if both subpolytopes are normal. Finally, we examine the connections between toric ideals and lattice polytopes. In the theory of toric ideals ([11]), special attention has been given to toric ideals generated by quadratic binomials. As before, we study this property under decomposition by checking a combinatorial condition on the graph, in this case with the help of [7]. We show in Theorem 4.3 that IG is generated by quadratic binomials if both toric ideals corresponding to the subpolytopes have this property. However, we stress that the converse does not hold. There are other similar questions to be asked following our work. For example, we can ask how the property of the toric ring possessing a quadratic (or squarefree) Gröbner basis behaves under decomposition. Unfortunately, we currently do not have a combinatorial description for this property and thus do not know how to approach this problem. 1. Separating Hyperplanes and Decompositions The vertices of the edge polytope PG of G are ρ(e1 ), . . . , ρ(en ), but not all edges of the form (ρ(ei ), ρ(ej )) actually occur. For i 6= j, let co(ei , ej ) be the convex hull of the pair {ρ(ei ), ρ(ej )}. The edges of PG will be a subset of these co(ei , ej ). For edges e = (i, j) and f = (k, `), call the pair of edges (e, f ) cycle-compatible with C if there exists a 4-cycle C in the subgraph of G induced by {i, j, k, `} (in particular, this implies that e and f do not share any vertices). The following result allows us to identify the co(ei , ej ) that are actually edges of PG using the notion of cycle-compatibility. 2 Lemma 1.1 ([9]). Let e and f be edges of G with e 6= f . Then co(e, f ) is an edge of PG if and only if e and f are not cycle-compatible. Example 1.2. Let Kd denote the complete graph on [d] and e and f be edges of Kd . We have that e ∩ f = ∅ exactly when e and f are cycle-compatible. We can then compute the number of edges of PKd by counting the 2-element subsets {e, f } of E(Kd ) with e ∩ f 6= ∅, which is   d−1 d2 (d − 1) d = . 2 2 Question 1.3. Fix integers d ≥ 2. What is the maximal number of possible edges of PG , as G ranges among all finite connected simple graphs on [d]? The condition that PG ∩H(+) and PG ∩H(−) are integral is equivalent to having no edge in PG intersecting H except possibly at the endpoints. This is, by Lemma 1.1, equivalent to the the following condition: we say that G satisfies the 4-cycle condition if for any pair of edges e, f ∈ E(G) such that ρ(e) ∈ H(+) \H and ρ(f ) ∈ H(−) \H, e and f are cycle-compatible. We can make a simplification of H: Lemma 1.4. If PG is decomposable via a hyperplane H that does not go through the origin, there exists a hyperplane H0 that gives the same decomposition, with the additional condition that H goes through the origin. Proof. Suppose H ⊂ Rd is defined by a1 x1 + · · · + ad xd = b, with each ai , b ∈ R. Let H0 denote the hyperplane defined by the equation (a1 − b/2)x1 + · · · + (ad − b/2)xd = 0. Since H ∩ PG lies in the hyperplane defined by the equation x1 + · · · + xd = 2, it follows that H ∩ PG = H0 ∩ PG and the decomposition is not affected.  Lemma 1.4 allows us to assume that all our separating hyperplanes for edge polytopes go through the origin; we will always make this assumption from now P on. When we do, assume that H(+) contains points (x1 , . . . , xn ) where ai x i ≥ 0 P (−) and H contains points where ai xi ≤ 0. We now introduce the function sH : E(G) → {0, 1, −1} defined by setting sH ((i, j)) to be the sign of ai + aj , allowing 0. The function sH enables us to call an edge e “positive,” “negative,” or “zero,” corresponding to whether the associated vertex ρ(e) in PG is in H(+) \H, H(−) \H, or H, respectively. We will repeatly use the following fact: Corollary 1.5. For any positive edge e and negative edge f in a decomposition, e and f must be cycle-compatible in a cycle (e, g, f, h), where g and h are zero edges. 3 Proof. The cycle-compatibility is an immediate corollary of Lemma 1.1. This also implies we cannot have a positive edge sharing a vertex with a negative edge, so since the other two edges share a vertex with both e and f , they must be zero edges.  Since the hyperplane H decomposes PG , we must have at least one positive edge and at least one negative edge. Thus, we also have: Corollary 1.6. Suppose that PG is decomposable. Then G must possess at least one cycle of length 4. Example 1.7. The converse of Corollary 1.6 does not hold for all graphs. Let G be the following graph. 1 e1 6 2 5 3 e2 4 Even though G possesses a cycle of length 4, the edge polytope PG is indecomposP able. If H were a separating hyperplane with equation 6i ai xi = 0, since there is only one 4-cycle and the two pairs of nonadjacent edges are symmetric, we may assume without loss of generality that e1 is positive and e2 is negative. Since any pair of positive and negative edges must form a 4-cycle and there are no other 4-cycles, all remaining ei must be zero edges. Therefore, we have a2 + a3 = a1 + a4 = a1 + a5 = a2 + a5 = a2 + a6 = a3 + a6 = 0. Thus a1 = a2 = a3 = −a4 = −a5 = −a6 . In particular a3 + a4 = 0. However, since ρ(e2 ) ∈ H(−) \ H, one has a3 + a4 6= 0, a contradiction. The following important result tells us that being an edge polytope is hereditary under decomposition: Lemma 1.8. Let G be a finite connected simple graph on [d] and suppose that PG ⊂ Rd is decomposable by H. Then each of the subpolytopes PG ∩ H(+) and PG ∩ H(−) is again an edge polytope. More precisely, one has connected spanning subgraphs G+ and G− with PG ∩ H(+) = PG+ PG ∩ H(−) = PG− . Proof. Let G+ and G− be subgraphs of G with E(G+ ) = {e ∈ E(G) : sH (e) ≥ 0} and E(G− ) = {e ∈ E(G) : sH (e) ≤ 0}. Let PG+ be the subpolytope of PG which is the convex hull of {ρ(e) : e ∈ E(G+ )} and let PG− be the subpolytope of PG which 4 is the convex hull of {ρ(e) : e ∈ E(G− )}. One can assume PG ∩ H(+) = PG+ and PG ∩ H(−) = PG− . Since the dimension of each of the subpolytopes PG+ and PG− coincides with that of PG , it follows from [4, Proposition 1.3] that both subgraphs G+ and G− must be connected spanning subgraphs of G, as desired.  Example 1.9. An example of a decomposition of a graph G using the hyperplane −x1 +x4 −x5 +x6 = 0. For edges (i, j) in G, ai +aj is only nonzero for {i, j} = {1, 2} or {3, 4}, with values −1 and 1 respectively. These correspond to the two non-zero edges. We give two equivalent graphical representations of this decomposition, one by showing G+ and G− explicitly and one by marking the non-zero edges + or −. G G+ G− 1 1 1 6 2 6 2 6 2 5 3 5 3 5 3 4 4 4 1 − 6 5 2 3 + 4 We will now prove a result that allows us to normalize the coefficients used in the hyperplane in a decomposition. Let the weight of a vertex i of G be ai and let the signature of the edge (i, j) (or the corresponding vertex ρ((i, j)) in PG ) be the set of weights {ai , aj } and the weight of (i, j) be ai + aj . An edge e has the sign function sH (e) equal to the sign of the sum of the weights in its signature. (+) (−) Proposition 1.10. Suppose we have a decomposition PG = PG ∪ PG . Then for some fixed a, b with a + b > 0, every positive edge must have signature {a, b} and every negative edge must have signature {−a, −b}. Furthermore, we can assume that all weights take values in {0, 1, −1}. Proof. Take a positive edge (i, j) and a negative edge (k, `), both of which must exist since H decomposes PG . Lemma 1.1 and the 4-cycle condition give that {i, j} ∩ {k, `} = ∅ and the two edges are cycle-compatible with some cycle C. Without loss of generality, say C = (i, j, k, `). Since sH ((j, k)) = sH ((`, i)) = 0, one has aj = −ak and a` = −ai . So the claim holds true for one pair of edges with opposite sign. 5 However, we can say a lot more. Take any other positive or negative edge e = (i , j 0 ) of G. By using Lemma 1.1 again, we can use a cycle of length 4 between e and either (i, j) or (k, `) (whichever one with the opposite sign as e) in order to show {|ai0 |, |aj 0 |} = {|ai |, |aj |}. Consequently, if q is a vertex belonging to either a positive or negative edge, then aq can take at most two possible absolute values. Now, since G is connected, any other vertex is connected to one of those vertices via a chain of zero edges. Note that if (k 0 , `0 ) is a zero edge, then |ak0 | = |a`0 |. Thus the other vertices cannot introduce any new absolute values, and one has at most two absolute values among all ai ’s, as desired. (+) (−) We now show that we can move the ai without changing PG and PG such that there is at most one nonzero absolute value. If not, without loss of generality only a and b exist as absolute values and a < b. Note that moving all ai with absolute value a to 0 does not change any of the signs of the edges and thus the decomposition. So we can assume that besides 0’s, there is only one absolute value b. We can then scale all these vertices with values ±b to ±1 without changing the signs.  0 Proposition 1.10 and Lemma 1.4 allow us to restrict attention to hyperplanes of the following form: (1.1) H: X i ±xi = 0. An intuitive restatement is that we can consider a hyperplane as an assignment of a zero, negative, or positive charge to each vertex, corresponding to assigning the value of 0, −1, or 1 respectively to the weight ai . We can then read the signs of the edges off the graph by just adding the charges at the two incident vertices. Example 1.11. We revisit Example 1.9. We can represent the hyperplane −x1 + x4 − x5 + x6 = 0 by assigning positive charges to {4, 6} and negative charges to {1, 5} and zero charges to the other vertices. This makes (1, 2) a negative edge and (3, 4) a positive edge; the other edges have zero charge. 1 − 6 + 5 − − 2 3 + 4 + Corollary 1.12. Suppose we have a decomposition of the edge polytope PG . Then we can assume one of the following two cases for the vertices of G: 6 (1) There are no vertices with weight 0. All positive edges have signature {1, 1} and all negative edges have signature {−1, −1}. (2) There is at least one vertex with weight 0. All positive edges have signature {1, 0} and all negative edges have signature {−1, 0}. Proof. If there are no vertices with weight 0, it is easy to see that we are in the first case. It suffices to prove that when we have at least one vertex with weight 0, the conditions in the second case apply. Since G is connected, there must be at least one edge of signature {0, a} where a ∈ {−1, 1}. Proposition 1.10 gives that all positive edges must then be of signature {0, 1} and all negative edges must have signature {0, −1}. Thus, no edges of signatures {1, 1} or {−1, −1} can occur, which is equivalent to saying that all nonzero signatures are {1, 0} or {−1, 0} (equivalently, the 1-weighted vertices and the (−1)-weighted vertices are isolated sets).  We call the two types of labelings from Corollary 1.12 type I and type II respectively. Using these two types, we give an algorithm to check the decomposability of an edge polytope PG from its graph: Algorithm 1.13. We check for type I and type II decomposability separately. (type I) Create an empty list F . For every pair of vertex-disjoint edges e− and e+ : (1) set the signatures of e− and e+ to {−1, −1} and {1, 1} respectively by setting the weights of relevant vertices. (2) try to set weights −1 and 1 to the other vertices one at a time, each time setting the weight of a vertex adjacent to a vertex with weight already set, until one of the following occurs: (a) the weights of all vertices are set, in which case we have a decomposition; (b) If we have forced any edge e to be a positive or negative edge, check it against every edge f with opposite sign. We cannot continue if one of the following two things happen: (i) if e and f are not cycle-compatible (4-cycle condition) (ii) if (e, f ) is in F (we have failed to assign opposite signs to these edges in the past). if one of these happens, add (e− , e+ ) to F and stop the search. (type II) Create an empty list F . For every pair of vertex-disjoint edges e− and e+ : (1) set the signatures of e− and e+ to {−1, 0} and {1, 0} respectively by setting the weights of relevant vertices (we do 4 for-loops in this case, corresponding to the 4 possible assignments of the weights). (2) try to set weights −1, 0, or 1 to the other vertices one at a time, each time setting the weight of a vertex adjacent to a vertex already set with weight −1 or 1 (note this means we always have at most 2 choices, since we cannot put two 1’s adjacent to each other or two −1’s adjacent to each other by Corollary 1.12), until one of the following occurs: 7 (a) all vertices are set, in which case we have a decomposition; (b) there are no non-set vertices adjacent to vertices set with −1 and 1, in which case we may set all the unset vertices to weight 0 and obtain a decomposition; (c) we prune in a similar manner to the type I case (for every new weighted edge, check if it is compatible with the existing edges of the other parity via checking both the 4-cycle condition and F ). If we cannot continue, add (e− , e+ ) to F and stop the search. Naively, Proposition 1.10 tells us we can check decomposability by iterating over 3n cases. Algorithm 1.13 cuts the base of the exponent to 2 in each of the two types. Though the result is still exponential in the worst possible cases (namely very dense graphs), the pruning process should usually provide large optimizations. Note that checking the compatibility conditions of edges with opposite parity is not a bottleneck of the calculation, as in both types we can keep a precomputed hash for all cycle-compatible edge pairs with a one-time O(n4 ) calculation. Question 1.14. Is there a polynomial-time algorithm to decide if PG is decomposable? Is there a polynomial-time algorithm to decide if PG is type I (or type II) decomposable? 2. Counting Decompositions Given a graph G, we may also be interested in counting the number of decompositions. Since even the decidability of the existence of a decomposition seems to be difficult, we do not expect this to be a tractable problem except in specific cases; moreover, we need to be careful since different separating hyperplanes may give the same decomposition. Example 2.1. Consider the four-cycle C4 with vertices 1, 2, 3, 4. Then the hyperplanes x1 − x4 = 0, x2 − x3 = 0 and x1 + x2 − x3 − x4 = 0 give us the same decomposition of PC4 . Notice that the first two hyperplanes are of type II (with at least one zero coefficient) and the third hyperplane is of type I (with no zero coefficient). If we restrict to type I hyperplanes, however, we get a unique decomposition (up to sign): Lemma 2.2. Two different type I hyperplanes will result in different decompositions of the edge polytope, unless they differ only by an overall sign on the weights. Proof. Suppose two hyperplanes give the same decomposition PG = PG+ ∪ PG− . Then up to sign, we can suppose that the edges in G0 = G+ ∩ G− are all zero, the edges in G+ \G0 are all positive, and the edges in G− \G0 are all negative. Since both hyperplances are of type I, we have ai = aj = 1 for the coefficients in the 8 hyperplane for each positive edge (i, j) and ak = a` = −1 for each negative edge (k, `). Then all the other coefficients are uniquely determined.  Using this fact, we now prove a couple of auxiliary results that combine to count the number of decompositions for complete multipartite graphs. Lemma 2.3. In a type II decomposition, no vertex with weight 1 may share a neighbor with a vertex of weight −1. Proof. By Corollary 1.12, such a neighbor must be 0. However, we now have a positive edge next to a negative one, a contradiction.  Proposition 2.4. For a connected bipartite graph G with a type II separating hyperplane, there exists a type I separating hyperplane which gives the same decomposition. Proof. Let the bipartition of the vertices be L ∪ R. By Corollary 1.12, positive edges must have signature {1, 0} and negative edges must have signature {0, −1}. Without loss of generality there is one positive edge (i, j) with i ∈ L and j ∈ R, such that ai = 1 and aj = 0. Then by Corollary 1.5, all negative edges (k, `) with ak = 0 and a` = −1 must have k ∈ L and ` ∈ R. By the same reasoning all positive edges must have their weight-1 vertex in L and weight-0 vertex in R. At this point, we have covered all vertices involved in nonzero edges, so only zero edges remain. Consider a vertex i with weight 1 that we have not yet considered. If it exists, since G is connected, there must exist a path starting at i with weights 1, −1, 1, −1, . . . until we get to a vertex next to a nonzero edge. It is then clear that i must be in L. Using this and a symmetric argument repeatedly, we see that all vertices with weight 1 must be in L and all vertices with weight −1 must be in R. Finally, consider the following transformation: change all zero weights in R to 1 and all zero weights in L to −1. We claim that no edge will change sign: any positive edge (with signature {1, 0}) will change to signature {1, 1}, any negative edge (with signature {0, −1}) will change to signature {−1, −1}, any zero edge with signature {0, 0} will change to {−1, 1}, and any zero edge with signature {1, −1} is unchanged. The result is then a type II hyperplane which gives the same decomposition.  Theorem 2.5. Let G be a complete multipartite graph on vertices [d] = V1 ∪ · · · ∪ Vk with k ≥ 2. Then the number of decompositions is X 2d−1 − (2|Vi | − 1) − 1. i Proof. First, we show that we only need to consider type I hyperplanes. The proof is different for the cases k = 2 and k > 2: when k = 2, we appeal to Proposition 2.4. When k > 2, every two vertices share a neighbor, so we use Lemma 2.3. There are 2d ways of assigning 1 or −1 to all the vertices. Each of these assignments gives a decomposition unless: 9 (1) all vertices have the same weight, or (2) both weights occur, but all vertices of one of the weights are inside a single Vi (in which case we do not have an edge of the corresponding sign). There are 2 assignments for the first case, and 2(2|Vi | − 1) ways of confining all weights of some sign (and having at least one) into Vi . Summing and dividing by 2 (using Lemma 2.2) gives the desired answer.  In the special case of a complete graph (i.e. |Vi | = 1 for all i), this reduces to 2 − d − 1. We remark that this recovers a special case of Theorem 5.3 in [2] when k = 2, which studies the splitting of hypersimplices ∆(k, n). d−1 3. Normal edge polytopes Recall that an integral convex polytope P ⊂ Rd is normal if, for all positive integers N and for all β ∈ N P ∩ Zd , where N P = {N α : α ∈ P}, there exists P β1 , . . . , βN belonging to P ∩ Zd such that β = i βi . Now, consider the following condition on G: If C and C 0 are cycles of G of odd length, then either they share a vertex or there is an edge (i, j) of G such that i ∈ C and j ∈ C 0 (such an edge is called a bridge between C and C 0 ). This condition is called the odd cycle condition, which was first investigated by [1] in classical combinatorics. Its relevance to our situation is the following result, which changes the algebraic condition into a combinatorial condition: Proposition 3.1 (Corollary 2.3 of [4]). PG is normal if and only if G satisfies the odd cycle condition. With this result, we now give the main theorem of this section, showing that normality is a hereditary condition on edge polytopes under decomposition: Theorem 3.2. Let G be a finite connected simple graph on [d] and suppose that the edge polytope decomposes as PG = PG+ ∪ PG− . Then PG is normal if and only if both PG+ and PG− are normal. Proof. Recall that G+ has all the zero and positive edges and G− has all the zero and negative edges. Suppose that both PG+ and PG− are normal but PG is not. It follows from the odd cycle condition that G contains two disjoint odd cycles C and C 0 with no bridge. Without loss of generality, we may assume that these are minimal in the sense that we cannot pick a smaller odd cycle to replace C while keeping C 0 fixed such that they are still disjoint and bridgeless (and vice-versa). In particular, it follows that neither cycle contains a chord, since then a smaller odd cycle could have been selected. If either G+ or G− contains all the edges in both cycles, then PG cannot be normal. Thus there is at least one positive and at least one negative edge in the edges of C 10 and C 0 . If they are in the same cycle C, then since the two edges induce a cycle of length 4, C must have a chord, a contradiction. If they are in different cycles, then a cycle of length 4 between them introduces two bridges that are zero edges, which is also a contradiction. Thus PG is normal. Conversely, suppose that PG is normal and that PG+ is nonnormal. Since PG is normal, there is at least one bridge between C and C 0 in G. Again by the odd cycle condition, the subgraph G+ contains two disjoint odd cycles C and C 0 such that no bridge between C and C 0 belongs to G+ . Therefore, all of the bridges between C and C 0 in G must be negative edges. We claim all of the edges of C and C 0 must be zero edges. In fact, if we had an edge e of either C or C 0 which is nonzero, then since e belongs to G+ it must be positive, and a cycle of length 4 arises from e and a (negative) bridge, yielding a zero edge bridge between C and C 0 , a contradiction. Now, let a1 x1 + · · · + ad xd = 0 define the separating hyperplane H. Since all of the edges of C and C 0 must be zero edges, one has ai + aj = 0 if (i, j) is an edge of either C or C 0 . However, since both C and C 0 are odd, it follows that ai = 0 for all vertices i of C and C 0 . Hence there exists no negative bridge between C and C 0 , which gives a contradiction. Hence PG+ is normal. Similarly, PG− is normal.  Example 3.3. When PG is not normal, different types of decompositions can occur, as shown in the following examples: (1) It is possible for a nonnormal edge polytope to be decomposed into two nonnormal polytopes. Let G be the finite graph with the following decomposition: 7 + 1 − 2 5 6 − 4 + 3 8 9 10 PG is not normal because of the two 3-cycles C1 = (5, 6, 7) and C2 = (8, 9, 10). Both subpolytopes PG+ and PG− are also nonnormal. (2) It is possible for a nonnormal edge polytope to be decomposed into one normal polytope and one nonnormal polytope. Let G be the finite graph with the following decomposition: 11 + 1 − 8 + 2 − − − 7 3 + − 6 4 + + + 5 PG− is normal and PG+ is nonnormal. 4. Quadratic toric ideals Fix a graph G. Let K[t] = K[t1 , . . . , td ] and K[x] = K[x1 , . . . , xn ] be the polynomial rings over a field K in d and n variables respectively. For each edge e = {i, j} ∈ E(G), we write te for the squarefree quadratic monomial ti tj ∈ K[t], and define the edge ring K[G] of G to be the subalgebra of K[t] generated by te1 , te2 , . . . , ten over K. Now define the surjective homomorphism of semigroup rings π : K[x] → K[G] by π(xi ) = tei for all 1 ≤ i ≤ n. The kernel of π is called the toric ideal of G and denoted by IG . We call a graph G (or its edge polytope PG ) quadratic if its toric ideal IG is generated by quadratic binomials. In the previous section, we studied how the normality property behaves under decomposition; in this section, we do the same with the quadratic property. Given an even cycle C = (1, 2, . . . , k): (1) call (i, j) an even (odd) chord of C if (j − i) 6= 0 is odd (even). The naming convention corresponds to the parities of the two subcycles created by (i, j) inside C. For example, if j − i = 2, then we create a triangle, which is odd. The fact that C is even makes this notion well-defined, as the two subcycles will have the same parity. (2) call C long if it has length at least 6. (3) given two chords e1 and e2 of C, say that they cross if they contain 4 distinct vertices that, when we place them in order around C, gives the sequence (a1 , a2 , a3 , a4 ) where the set of edges {e1 , e2 } is the set {(a1 , a3 ), (a2 , a4 )}. (4) call a triple of chords S = (c1 , c2 , c3 ) of C an odd-triple if at least two of them cross. 12 As before, our strategy is to convert the criterion of being quadratic to that of a combinatorial criterion (Theorem 4.1) on graphs, which we will use to prove our final main result, Theorem 4.3. Theorem 4.1 (Theorem 1.2 of [7]). G is quadratic if and only if the following two conditions hold: (1) For every even long cycle, there exists either an even chord or an odd-triple. (2) The induced graph of any two odd-cycles are 2-connected by bridges (namely, for any two odd cycles which share exactly one node, there exists a bridge which does not go through the common node, and for any two odd cycles which do not share any nodes, there exist two bridges). Lemma 4.2. Let C be an even cycle inside a quadratic G, with edges e1 , e2 , . . . , e2k . Suppose C contains exactly one positive ei and one negative edge ej . Then j ∼ = i (mod 2). Proof. Suppose not. Without loss of generality e1 is positive and e2l is negative. We can assume that C has vertices c1 , . . . , c2k with ei = (ci , ci+1 ), where it is understood the vertices are labeled modulo 2k, and that either c1 or c2 is 1. Without loss of generality c2 = 1. Since the edges e2 , . . . , e2l−1 are all zero edges, we must have c3 = −1, c4 = 1, c5 = −1, . . . , c2l = 1, which is a contradiction because e2l = (c2l , c2l+1 ) is negative.  Theorem 4.3. Let PG = PG+ ∪ PG− be a decomposition. If PG+ and PG− are both quadratic, then PG is quadratic. Proof. Suppose PG were not quadratic. Then G fails at least one property listed in Theorem 4.1. This means one of the following must be true: (1) G has a even long cycle C without even chords or odd triples. (2) G has two edge-disjoint odd cycles C1 and C2 that have at most one bridge between them and do not share a vertex. (3) G has two edge-disjoint odd cycles C1 and C2 that have no bridges and share a vertex. We’ll show that each of these cases causes a contradiction: (1) There must be at least one positive edge e1 in C, since otherwise C would appear in G− , failing the assumption that G− was quadratic. Similarly, C must contain a negative edge e2 as well. There must be a 4-cycle (e1 , u, e2 , v), so u and v are a pair of chords of C with the same parity. By assumption on C having no even chords, u and v must be odd chords of C. Thus, by Lemma 4.2, there must be at least one more nonzero edge e3 in C. Without loss of generality it is negative; then e3 forms a 4-cycle with e1 as well and creates another pair of odd chords C by the same reasoning above and one 13 of them must intersect one of u and v. However, this creates a odd triple inside C, which is a contradiction. 1 e1 6 2 u v 5 3 e2 e3 4 (2) Suppose d is a chord in C1 ; then d forms a smaller odd cycle with a subset of vertices of C1 that must still have at most one bridge with C2 and share no vertices. Thus, we can assume both C1 and C2 are chordless. By the same reasoning as the previous case of the long even cycle, there must be at least one positive edge e1 (and negative edge e2 ) in C1 or C2 , else G− (respectively G+ ) would not be quadratic. First, note that e1 and e2 must not be in different cycles, since this would create a 4-cycle between them that would serve as 2 bridges, creating a contradiciton. Thus, all the nonzero edges must be in one of the cycles, without loss of generality C1 . But this is impossible, since the 4-cycle created by e1 and e2 must introduce two chords in C1 , which we assumed to be chordless. Thus, we again have a contradiction. (3) Again, if d is a chord in C1 , then either we get a smaller odd cycle that does not share a vertex or any bridges with C2 , or we get a smaller cycle that shares a vertex with C2 and no bridges. Thus, we can again assume both C1 and C2 are chordless. The same reasoning as above gives a contradiction.  Example 4.4. Knowing now that we cannot have both G+ and G− be quadratic while G is not quadratic, we end this paper with examples showing that all other possibilities under decomposition can be realized. This shows that we cannot extend the statement of Theorem 4.3 to include the “only if” case. (1) G is quadratic, G+ , G− are quadratic. Note that this is Example 1.9 again. − 1 + 6 − − 5 + + 4 2 3 (2) G is quadratic, G+ is not quadratic, and G− is quadratic. 14 − 1 + 2 + 6 − + + 5 3 4 (3) G is quadratic, G+ and G− are not quadratic. + 1 − 6 − + + 5 + 2 − − 3 + − 4 (4) G is not quadratic, G+ and G− are not quadratic. 1 6 2 + 7 + 5 3 − 8 − 4 (5) G is not quadratic, G+ is quadratic, and G− is not quadratic. − + − 6 5 4 7 + − 8 − + 1 − + 2 3 + − References [1] D. R. Fulkerson, A. J. Hoffman and M. H. McAndrew, Some properties of graphs with multiple edges, Canad. J. Math. 17 (1965), 166–177. [2] S. Herrmann and M. Joswig, Splitting polytopes, Münster J. of Math. 1 (2008), 109–142. [3] M. Hochster, Rings of invariants, Cohen-Macaulay rings generated by monomials, and polytopes, Ann. Math. 96 (1972), 318–338. [4] H. Ohsugi and T. Hibi, Normal Polytopes Arising from Finite Graphs, J. Algebra 207 (1998), 409–426. [5] H. Ohsugi and T. Hibi, A normal (0, 1)-polytope none of whose regular triangulations is unimodular, Discrete Comput. Geom. 21 (1999), 201–204. [6] H. Ohsugi and T. Hibi, Koszul bipartite graphs, Advances in Applied Math. 22 (1999), 25–28. 15 [7] H. Ohsugi and T. Hibi, Toric ideals generated by quadratic binomials, J. Algebra 218 (1999), 509–527. [8] H. Ohsugi and T. Hibi, Compressed polytopes, initial ideals and complete multipartite graphs, Illinois J. Math. 44 (2000), 391–406. [9] H. Ohsugi and T. Hibi, Simple polytopes arising from finite graphs ITSLCSREA Press 44 (2008), 73–79. [10] A. Simis, W. V. Vasconcelos and R. H. Villarreal, The integral closure of subrings associated to graphs, J. Algebra 199 (1998), 281–289. [11] B. Sturmfels, “Gröbner bases and convex polytopes,” Amer. Math. Soc., Providence, RI, 1995. Takayuki Hibi, Department of Pure and Applied Mathematics, Graduate School of Information Science and Technology, Osaka University, Toyonaka, Osaka 5600043, Japan E-mail address: [email protected] Nan Li, Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA 02139, USA E-mail address: [email protected] Yan X Zhang, Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA 02139, USA E-mail address: [email protected] 16
0math.AC
Towards Zero-Overhead Disambiguation of Deep Priority Conflicts Luis Eduardo de Souza Amorima , Michael J. Steindorfera , and Eelco Vissera a Delft University of Technology, Delft, The Netherlands Abstract Context Context-free grammars are widely used for language prototyping and implementation. They allow formalizing the syntax of domain-specific or general-purpose programming languages concisely and declaratively. However, the natural and concise way of writing a context-free grammar is often ambiguous. Therefore, grammar formalisms support extensions in the form of declarative disambiguation rules to specify operator precedence and associativity, solving ambiguities that are caused by the subset of the grammar that corresponds to expressions. Inquiry Implementing support for declarative disambiguation within a parser typically comes with one or more of the following limitations in practice: a lack of parsing performance, or a lack of modularity (i.e., disallowing the composition of grammar fragments of potentially different languages). The latter subject is generally addressed by scannerless generalized parsers. We aim to equip scannerless generalized parsers with novel disambiguation methods that are inherently performant, without compromising the concerns of modularity and language composition. Approach In this paper, we present a novel low-overhead implementation technique for disambiguating deep associativity and priority conflicts in scannerless generalized parsers with lightweight data-dependency. Knowledge Ambiguities with respect to operator precedence and associativity arise from combining the various operators of a language. While shallow conflicts can be resolved efficiently by one-level tree patterns, deep conflicts require more elaborate techniques, because they can occur arbitrarily nested in a tree. Current state-of-the-art approaches to solving deep priority conflicts come with a severe performance overhead. Grounding We evaluated our new approach against state-of-the-art declarative disambiguation mechanisms. By parsing a corpus of popular open-source repositories written in Java and OCaml, we found that our approach yields speedups of up to 1.73 x over a grammar rewriting technique when parsing programs with deep priority conflicts—with a modest overhead of 1 % to 2 % when parsing programs without deep conflicts. Importance A recent empirical study shows that deep priority conflicts are indeed wide-spread in realworld programs. The study shows that in a corpus of popular OCaml projects on Github, up to 17 % of the source files contain deep priority conflicts. However, there is no solution in the literature that addresses efficient disambiguation of deep priority conflicts, with support for modular and composable syntax definitions. ACM CCS 2012 Software and its engineering → Syntax; Parsers; Keywords declarative disambiguation, data-dependent grammars, operator precedence, performance, parsing The Art, Science, and Engineering of Programming Submitted December 1, 2017 Published March 29, 2018 doi 10.22152/programming-journal.org/2018/2/13 © Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser This work is licensed under a “CC BY 4.0” license. In The Art, Science, and Engineering of Programming, vol. 2, no. 3, 2018, article 13; 26 pages. Towards Zero-Overhead Disambiguation of Deep Priority Conflicts 1 Introduction Context-free grammars have been established as the main formalism for concisely describing the syntax of programming languages (e.g., in reference manuals). Yet, context-free grammar definitions still cause problems when used to generate parsers in practice. On the one hand, a parser generator may expect a deterministic grammar that fits a certain grammar class, such as LL or LR. On the other hand, natural and concise context-free grammars may be inherently ambiguous, more specifically when considering the subset of the grammar that defines expressions and operators. Mainstream parser generators, such as YACC [13], extend their grammar formalism with declarative constructs for disambiguation, allowing users to specify the precedence and associativity of operators. In order to not compromise performance, under the hood, YACC’s translation of disambiguation rules highly depends on specific characteristics of LR parsing technology—exploiting LR shift/reduce conflicts—rather than building upon a generalized solution. Furthermore, YACC does not support the composition of modular grammar fragments (of potentially different languages). In contrast, the SDF2 syntax definition formalism [25] allows modular and composable language specifications, providing mechanisms for declaratively specifying operator precedence and associativity [15, 22]. The semantics for SDF2 disambiguation is parsing independent, but it only addresses ambiguities that are caused by so called shallow conflicts, i.e., conflicts that can be solved by checking whether a certain parse node is a direct descendant of another node in the parse tree. However, some ambiguities that occur in expressions can only be solved by checks in the final tree of unbounded depth [3, 19]. Such ambiguities are caused by deep priority conflicts. Several approaches have been proposed to solve deep priority conflicts. Many of these approaches are based on grammar transformations and thus are parser independent [2, 3, 19]. However, those techniques typically result in large unambiguous grammars, which may impact on the performance of the parser and be somewhat inefficient, as considerable parts of the grammar are not exercised at runtime, even after parsing many programs [20]. Alternative solutions of so called data-dependent grammars [5] postpone solving of priority conflicts to parse time. Data-dependent grammars are context-free grammars, extended with arbitrary computations, parameters, variable binding, and constraints that can be evaluated at parse time [12]. Data dependent grammars that address disambiguation of priority conflicts can be generated from a context-free grammar with disambiguation constructs, but they are fairly complex and arguably hard to read and understand. The additional complexity comes from the bindings and constraints, and by the fact that data can be propagated “downwards” and “upwards” at parse time, when building the parse tree. Finally, data-dependent grammars have not yet been generalized to solve frequent types of deep priority conflicts such as longest match or the well known dangling else problem. This paper proposes a different solution to disambiguate deep priority conflicts at parse time based on data-dependent contextual grammars. Our approach relies on lightweight data dependency that does not require arbitrary computation nor variable bindings at parse time, and instead expresses disambiguation in terms of set-algebraic 13:2 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser operations that can be implemented scoped and efficiently. The contributions of the paper are: We define a lightweight data-dependent extension of the scannerless generalized LR parsing algorithm for disambiguating deep priority conflicts. We show that this data-dependent extension yields the same disambiguation as contextual grammars, an approach that solves deep priority conflicts through grammar rewriting. We compare the performance of disambiguation strategies and show that our lightweight data-dependent disambiguation is up to 1.73 x faster when parsing programs with deep priority conflicts and has very low overhead for programs without deep priority conflicts. We implemented our solution as a modified parser generator for SDF3 [26], which supports modular and composable syntax definitions. Furthermore, we evaluated our approach using OCaml, an expression-based language that contains many deep priority conflicts; and Java, a statement-based language that contains a small number of deep priority conflicts. Given that deep priority conflicts may occur in about one in five real-world programs for OCaml [20], we provide a technique that supports efficient disambiguation of such conflicts, showing that for programs without conflicts, our approach has a modest overhead of 1 % to 2 % on parsing time. The paper is organized as follows: Section 2 details background information on declarative disambiguation and deep priority conflicts. Section 3 describes datadependent contextual grammars. Next, in Section 4 we evaluate our approach by comparing to disambiguation techniques that rely on grammar transformations. Finally, we discuss related work in Section 5, before concluding. 2 Disambiguating Priority Conflicts We start by presenting the notation for grammars, grammar productions and parse trees that will be used throughout the paper. The remainder of this section then discusses background on the issue of deep priority conflicts and a grammar rewriting technique, contextual grammars [19], that addresses the resolution of such conflicts. 2.1 Notation Grammars A context-free grammar G can be formally defined as a tuple (Σ, N , P ) with the set Σ representing the terminal symbols; the set N consisting of the nonterminal symbols defined in the grammar; and the set P representing the productions. When not mentioned, we adopted the letter A to represent arbitrary non-terminals; the letter X to represent a symbol from Σ ∪ N ; and Greek letters α, β or γ to represent a symbol in (Σ ∪ N )∗ , also known as sentential forms. Productions We use the same notation for productions as in the syntax definition formalism SDF3 [26]. A production in a grammar G has the form A = α or A.C = α, 13:3 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts where C represents a constructor. SDF3 productions may have constructors to specify the name of the abstract syntax tree node constructed when imploding the parse tree. A non-terminal and a constructor uniquely identify a production, i.e., a production A.C = α may also be referred as A.C. Note that SDF3 constructors are orthogonal to our approach. A production A.C = X1 ... Xn may be used to construct a tree of form [A.C = t1 ... tn ], with the subtree ti being defined by the symbol Xi . Explicit subtrees are indicated by their productions using nested square brackets, whereas arbitrary subtrees and terminal elements that occur as leaves do not require brackets. For example, the tree [Exp.Add = e1 + [Exp.Mul = e2 * e3 ]] constructed with a production Exp.Add = Exp "+" Exp has an arbitrary subtree e1 as its leftmost subtree, and a rightmost explicit subtree defined by the production Exp.Mul = Exp "*" Exp, with arbitrary subtrees e2 and e3 . Parse Trees 2.2 Background on Deep Priority Conflicts In context-free grammars of programming languages, ambiguities are often caused by the subset of the language that contains expressions and operators. To address this issue, grammar formalisms used in practice support the specification of declarative disambiguation rules to define operator precedence and associativity among the grammar productions. E.g., in SDF3, a grammar production can have an annotation—either left, right, or non-assoc—to specify its associativity. SDF3 also supports context-free priorities, which form a partial order, defining a priority relation between productions. E.g., the disambiguation rule Exp.Add > Exp.If defines that addition has a higher priority than conditional expressions. The most common ambiguities from expression grammars involve the direct combination of operators with different priorities. These ambiguities are caused by so-called shallow priority conflicts and can be efficiently solved by subtree filtering [15], i.e., disallowing certain kinds of trees to occur as a direct child of others. A small but complicated-to-solve subset of ambiguities is caused by deep priority conflicts. Unlike shallow conflicts, deep priority conflicts cannot be filtered by observing the direct parent-child relationship of nodes within a parse tree. Deep priority conflicts can occur arbitrarily nested (i.e., in unbounded depth) in a parse tree. In general, deep conflicts can occur when a low-priority operator shadows a nested higher priority operator on the left- or rightmost edges along a sub-tree [3, 20]. Deep priority conflicts are commonly found in the expression parts of grammars of ML-like languages. A recent empirical pilot study suggests that up to 17 % of OCaml source files originating from popular projects on Github do contain deep priority conflicts [20], raising the question how such conflicts can be disambiguated efficiently. Deep priority conflicts are categorized in three classes, according to their nature [19]: 13:4 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser Listing 1 Expression grammars with various archetypes of deep priority conflicts. (a) Operator-Style Conflict 1 context-free syntax 2 3 4 5 Exp.If = "if" "(" Exp ")" Exp Exp.Add = Exp "+" Exp {left} Exp.Int = INT 6 7 context-free priorities 8 9 Exp.Add > Exp.If 10 11 causes conflict in sentence 12 13 e1 + if(e2 ) e3 + e4 14 15 with interpretations 16 17 e1 + if(e2 ) (e3 + e4 ) 18 19 (e1 + if(e2 ) e3 ) + e4 (b) Dangling-Else Conflict 1 context-free syntax 2 3 4 5 Exp.If = "if" "(" Exp ")" Exp Exp.IfElse = "if" "(" Exp ")" Exp "else" Exp Exp.Int = INT 6 7 causes conflict in sentence 8 9 if(e1 ) if(e2 ) e3 else if(e4 ) e5 else e6 10 11 with interpretations 12 13 if(e1 ) (if(e2 ) e3 else (if(e4 ) e5 else e6 )) 14 15 if(e1 ) (if(e2 ) e3 else (if(e4 ) e5 )) else e6 16 17 if(e1 ) (if(e2 ) e3 ) else (if(e4 ) e5 else e6 ) (c) Longest-Match Conflict 1 context-free syntax 2 3 4 5 Exp.Match = "match" Exp "with" Pat+ Pat.Pattern = ID "->" Exp Exp.Int = INT 6 7 causes conflict in sentence 8 9 match e1 with id -> match e2 with p1 p2 10 11 with interpretations 12 13 match e1 with id -> (match e2 with p1 p2 ) 14 15 match e1 with id -> (match e2 with p1 ) p2 13:5 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts Operator-Style Conflicts Operator-style conflicts involve two operators: 1) a prefix operator1 with lower priority, and 2) a postfix or infix operator with higher priority.2 Listing 1a contains a minimal grammar example, illustrating an operator-style conflict. In our case, it involves an addition expression that has higher priority than the conditional expression. Parsing the example sentence on line 13 causes an ambiguity due to a deep priority conflict and yields two possible interpretations (lines 17 and 19). In the example, the first instance represents the supposedly correct interpretation, since the addition to the left of the conditional expression extends as far as possible. The second and incorrect interpretation cannot be filtered by checking the direct parent-child relation of parse nodes, since the first addition expression shadows that the conditional (prefix operator with lower-priority) occurs indirectly nested at the rightmost position of the second addition (infix operator with higher-priority). Dangling-Else Conflicts Dangling-else describes a pattern for a deep priority conflict involving two productions that share the same prefix or suffix, where the shorter production is (left or right) recursive. Listing 1b illustrates a conflict involving the Exp.If and Exp.IfElse productions. For the sentence on line 9, a parser cannot decide where the else branches should be connected. Note that the first interpretation (line 13) is supposedly the correct one, where the else branches are connected to the closest if-expressions. Longest-Match Conflicts Another type of deep priority conflict involves indirectly nested lists [19]. The example grammar in Listing 1c defines Exp.Match expressions ending with a list of patterns. However, match expressions can themselves occur at the end of a pattern. E.g., for the sentence in line 9, the parser cannot decide whether the pattern p2 belongs to the list of the match e1 (cf. line 15) or the list of the match e2 expression (cf. line 13). The first interpretation should be preferred if the list construct (Pat+) itself follows longest match. 2.3 Disambiguating Deep Priority Conflicts with Contextual Grammars Many disambiguation approaches achieve independence from a particular parsing technology by relying on grammar rewriting (i.e., transforming an ambiguous contextfree grammar into a context-free grammar that does not contain any priority conflicts). In the following, we discuss the disambiguation approach of contextual grammars [19] as a representative example for rewriting-based disambiguation strategies, since our contribution builds upon it. (An extensive discussion and comparison of related work on the subject of disambiguation can be found in Section 5). We consider the definition of operators used in [19]: prefix operators are defined by right recursive productions, postfix operators by left recursive productions and infix operators by productions that are both left and right recursive. 2 Operator-style conflicts may also involve lower priority postfix operators, but these are uncommon, as postfix operators usually have higher priority in most programming languages. 1 13:6 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser Listing 2 Contextual grammar that solves an operator-style deep priority conflict involving if and addition expressions in ML-like languages. 1 context-free syntax 2 3 4 5 Exp.If = "if" "(" Exp ")" Exp Exp.Add = Exp{Exp.If} "+" Exp {left} Exp.Int = INT 6 7 8 Exp{Exp.If} .Add = Exp{Exp.If} "+" Exp{Exp.If} {left} Exp{Exp.If} .Int = INT 9 10 context-free priorities 11 12 Exp.Add > Exp.If 13 14 uniquely parses sentence 15 16 e1 + if(e2 ) e3 + e4 17 18 with interpretation 19 20 e1 + if(e2 ) (e3 + e4 ) Contextual grammars [19] are context-free grammars that can be used to solve deep priority conflicts. Under the hood, contextual grammars express invalid parse-tree patterns with respect to the disambiguation rules defined in the grammar. These patterns can be deeply matched to filter trees that would cause an ambiguity. The deep pattern matches do not occur at parse-time, but rather are implemented as a grammar transformation. A “black-list” of forbidden patterns, represented by so-called contextual tokens drives the recursive rewriting algorithm, restricting which parse trees a production may produce along the (leftmost or rightmost) positions of sub-trees. Recursive Rewriting by Example Listing 2 illustrates an example for a contextual grammar that solves the operator-style conflicts of Listing 1a. A grammar transformation recursively rewrites the grammar and adds new productions for the symbol Exp{Exp.If} (lines 7– 8). The rewriting propagates the contextual tokens to all leftmost and rightmost non-terminals of the newly added production. By using the tokens to create new non-terminal symbols that implement filters, the rewriting avoids the construction of invalid trees. According to this grammar, the example sentence in line 16 now can be unambiguously parsed as shown in line 20. The invalid sentence (e1 + if(e2 ) e3 ) + e4 cannot be parsed anymore, because the addition . . . + e4 that is parsed with Exp.Add must not have an if-expression on the rightmost position of the first addition e1 + if(e2 ) e3 . One issue with the rewriting is that the propagation of constraints might result in many additional productions in the final contextual grammar, as productions of the 13:7 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts A.C1 = lm rm A … lm' rm' A A.C2 = … lm rm A .C1 = lm rm A … lm' rm' ∪ rm A lm rm A .C2 = … .C1 = lm' rm' .C2 = … A .C1 = … lm' rm' ∪ rm .C2 = … A A lm' rm' A lm' rm' ∪ rm lm' ∪ lm rm A … lm' rm' A lm' ∪ lm rm A .C1 = … lm' ∪ lm rm A .C2 = … … Figure 1 Generalized recursive propagation of contextual tokens in contextual grammars. original grammar need to be duplicated (recursively) for each new contextual symbol. While the previous example is relatively concise, the general case is not. Recursive Rewriting in General Formally, a contextual symbol lm Arm is a regular nonterminal A that is uniquely identified by the tuple (lm, A, rm), where lm and rm are sets containing contextual tokens. For brevity we omit lm or rm respectively when the set is empty. The set lm stores unique references to productions that are not allowed to occur in any, possibly deeply nested, leftmost node of the tree defined by the contextual symbol lm Arm . Similarly, the productions referenced in the set rm cannot be used to construct any, possibly deeply nested, rightmost node of the tree defined by lm Arm . Finally, the tree for the symbol A itself cannot be constructed using any of the productions referenced in lm and rm. Figure 1 highlight the general case of how productions are recursively rewritten. The starting point are the first two productions A.C1 and A.C2 , where the production A.C1 contains deep priority conflicts, as indicated by the contextual symbols on the right-hand side of the production. For each unique contextual symbol, the productions for the symbol A need to be duplicated excluding the productions in the sets lm and rm, while propagating the contextual tokens accordingly. In the second pair of rules in the grammar, new productions are created for the symbol lm Arm assuming that C1 and C2 are not in the sets lm and rm, and the set rm is propagated to the rightmost symbol of that rule (cf. dotted arrow). When propagating the set containing the rightmost contextual tokens rm to the rightmost symbol of this rule, a new unique contextual 0 0 symbol lm Arm ∪ rm is generated, causing a ripple effect: new productions need to be recursively generated for the new symbol as well (cf. the dashed arrows). The 0 0 same ripple effect might occur for the symbol lm ∪ lm Arm and for any other unique contextual symbol resulting from the propagation of contexts. 13:8 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser Contextual grammars can correctly disambiguate all previously discussed conflicts, however at a high cost. For expression-based languages with many deep priority conflicts—such as OCaml—the grammar can get about three times bigger [19]. In the case of contextual grammars, the duplication is necessary to solve deep conflicts, however, many productions are not exercised in practice, even after parsing a large set of programs [20]. The duplication directly introduces a performance penalty, causing larger parse tables, and longer parse times in practice. Our aim is to avoid the blow-up in productions caused by grammar transformations, without giving up the correctness properties guaranteed by contextual grammars. In the next section we illustrate how the underlying concepts of contextual grammars can be repurposed to disambiguate deep priority conflicts efficiently at parse time. 3 Data-dependent Contextual Grammars In this section, we focus on declarative disambiguation techniques that are more general than, for example, YACC’s approach, in order to support modular and composable syntax definitions. In particular, we illustrate how low-overhead disambiguation can be implemented in SDF3 [26] with a scannerless generalized LR parser (SGLR) [24]. Figure 2 highlights the different stages in the context of parser generation using SDF3 and parsing in SGLR. First, a normalized3 SDF3 grammar is first transformed by recursive rewriting into a contextual grammar, which contains additional productions to remove deep priority conflicts (cf. Section 2.3). Second, the parse table generator produces a parse table given the contextual grammar, solving shallow priority conflicts directly when constructing the table, by filtering goto-transitions according to the priorities specified in the grammar [22]. Afterwards, the SGLR parser uses the generated parse table for processing arbitrary input programs. The parser may use other disambiguation mechanisms at parse time to address, for example, ambiguities in the lexical syntax using reject productions [24]. The SGLR parser returns a compact representation of a parse forest that contains all trees that were derived when parsing an input program. As a final step, a (post-parse) disambiguator may still remove invalid trees from the parse forest according to given constraints. According to Figure 2, we can identify four different stages when disambiguation of priority conflicts can occur: (1) before parse table generation, (2) at parser generation, (3) at parse time, and (4) after parsing. Post-parse disambiguation is conceptually the most expensive approach, since ambiguities can grow exponentially with the size of the input [10]. Disambiguation should preferably occur in the first three identified stages of disambiguation (i.e., avoiding the construction of invalid trees beforehand). Nevertheless, disambiguating early in the pipeline does not necessarily guarantee the best performance either, as we will discuss next. 3 SDF3 grammars are normalized to handle lexical and context free syntax declarations, derive additional productions for symbols that represent lists or optionals, insert optional layout in between context-free symbols, and expand priority groups and chains. 13:9 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts 2 normalized grammar 1 contextual grammar parse table parse table generator 3 Figure 2 parser input trees 4 Parsing a program with a scannerless generalized parser, and the times when disambiguation might occur. When to Disambiguate (Deep) Priority Conflicts? Disambiguating priority conflicts by grammar rewriting occurs before parse table generation. Rewriting techniques have the advantage that the remainder of the parser generation and parsing pipeline can operate oblivious of priority conflicts. Especially for resolving deep priority conflicts, grammar rewriting unfortunately adds many productions for forbidding conflicting patterns and may result in large grammars that negatively impact performance. Disambiguating conflicts during parse table generation does not require any grammar rewriting and can be achieved by modifying the LR parse table generator. In a scannerless parser, disambiguation at parse table generation can only resolve shallow priority conflicts, requiring that deep priority conflicts are addressed earlier or later [19]. As noted previously, using post-parse disambiguation filters to solve priority conflicts can be inefficient in practice, because the number of ambiguities in expressions can grow exponentially with the size of an expression. Hence, a post-parse filter would have to traverse a large number of trees in the parse forest to filter invalid trees. According to the reasoning above, in the next sections we will explore a solution to disambiguate deep priority conflicts efficiently at parse time, while keeping the disambiguation of shallow conflicts when generating the parse table. 3.1 Disambiguation of Deep Conflicts with Lightweight Data Dependency Data-dependent grammars [12] extend context-free grammars allowing parameterized non-terminals, variable binding, evaluation of constraints, and arbitrary computation at parse time. Data-dependent grammars can be translated into stack-based automata, i.e., push-down automata with environments to track data-dependent parsing states. For example, consider the productions: Iter(n).Conc = [n >= 1] Iter(n - 1) A Iter(n).Empty = [n == 0] ε In the example above, the non-terminal Iter is parameterized by an integer n, which indicates the length of the iteration over the non-terminal A. The constraint [n >= 1] is checked before trying to parse Iter(n - 1) A, i.e., if n ≥ 1 the first production is used, otherwise, the second. Purely data dependent grammars are powerful enough to disambiguate priority conflicts of grammars for programming languages at parse time [5]. They allow 13:10 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser resolution of possible priority conflicts in the grammar by means of constraints that forbid the creation of invalid trees. Nevertheless, just relying on data-dependency might negatively impact the performance of the parser, especially when parsing files that are free of priority conflicts. For that reason, we selectively use a lightweight form of data-dependency to solely solve deep priority conflicts, without requiring variable bindings or arbitrary computations at parse time. Leveraging Data-Dependency to Avoid Duplicating Productions Contextual grammars (cf. Section 2.3) can be treated as pure context-free grammars, if we consider that every unique contextual symbol specifies a new non-terminal. Transforming a contextual grammar into a context-free one, occurs by duplicating productions (recursively) for each unique contextual symbol. Without duplicating the productions, a contextual grammar would have exactly the same shape and number of productions as the original grammar, since contextual symbols consist of essentially annotated non-terminals that originate from an analysis phase. Without rewriting, the grammar itself is still ambiguous, but the inferred contextual tokens that occur in the grammar can be reused to solve deep priority conflicts at parse time. Bottom-up Constraint Aggregation instead of Top-Down Rewriting Instead of propagating the constraints in the form of contextual tokens in the grammar productions, which may result in new contextual symbols and consequently new productions, we propagate the data to which the constraints are applied at parse time. Since the SGLR parser constructs trees bottom-up, we propagate the information about the productions used to construct the possibly nested leftmost and rightmost nodes of a tree bottom-up as contextual tokens during tree construction. Each node of the parse tree of the adapted data-dependent SGLR parser contains two additional sets that indicate the productions used to construct its leftmost and rightmost (nested) subtrees, respectively. For every node, the set representing the leftmost contextual tokens is the union of the the production used to construct the current node with the leftmost set of the leftmost direct child. Similarly, the set representing the rightmost contextual tokens is the union of the production used to construct the node itself with the rightmost set of contextual tokens of the rightmost direct child. Note that only productions that can cause deep priority conflicts are added to the sets of contextual tokens; the number of tokens propagated is significantly lower than the total number of productions, even for highly ambiguous grammars. (The largest number of contextual tokens—33—was required for OCaml, which contains a highly ambiguous expression grammar.) Data-Dependent Contextual Token Propagation by Example The tree in Figure 3a for the sentence INT + if INT was parsed using the data-dependent contextual grammar of Listing 3. Since Exp.If is the only production that appears in the contextual tokens in the grammar, it is the only token that needs to be propagated upwards. Because the if-expression occurs as a direct right subtree of the addition, only its rightmost set of contextual tokens is propagated upwards, discarding the leftmost set of tokens. 13:11 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts lm10 Exp Exp INT prod(t) t prod(t) … lm1n1 ∪ rm1n 1 Exp.If Exp.If + ∪ Exp if lm10 Exp.If Exp t10 … rm10 … … t1n1 rm1n1 … INT tk0 lmk0 (a) Propagation by Example rmk0 lmknk tknk rmknk (b) Schema of Generic Propagation Figure 3 Propagation of contextual tokens in contextual grammars with data-dependency. Listing 3 A (truncated) succinct syntax for a data-dependent contextual grammar with if-expressions, to be used for illustrating concise parse tree examples. 1 context-free syntax 2 3 4 5 Exp.If = "if" Exp Exp.Add = Exp{Exp.If} "+" Exp {left} Exp.Int = INT 6 7 context-free priorities 8 9 Exp.Add > Exp.If Data-Dependent Contextual Token Propagation in General Consider the tree schema indicating the propagation of possible contextual tokens of Figure 3b. Assuming that the tree has depth k, the tokens will be propagated bottom-up through the leaves until reaching the root t . However, for a leaf node t k0 , its set of contextual tokens consist only of prod(t k0 ) (the production used to construct t k0 ). As we will discuss in Section 3.3, we only propagate contextual tokens that occur in the contextual grammar, i.e., if prod(t k0 ) cannot cause a deep priority conflict, the set is in fact, an empty set. Thus, besides limiting the propagation to the depth of the trees being constructed, for grammars with few conflicts, only a small amount of data is actually propagated when constructing the tree. Customization of Parsing Algorithm The algorithm for the data-dependent scannerless generalized LR parser requires only a few changes in the original SGLR algorithm shown in [24]. More specifically, the algorithm needs to propagate contextual tokens corresponding to the productions used to construct the leftmost and rightmost (possibly nested) subtrees (t.LeftmostTokens and t.RighmostTokens),⁴ and to check 4 In the original SGLR algorithm, creating a parse tree node consisted simply of applying a production to the trees collected when calculating the path for the reduce action. In the 13:12 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser Listing 4 Pseudocode for the modified DO-REDUCTIONS and CREATE-TREE-NODE methods from the original SGLR, in the implementation of the data-dependent SGLR. 1 2 3 4 5 6 7 8 9 10 11 1 2 3 4 5 6 function DO-REDUCTIONS(Stack st, Production A.C = X 1 ...X n ) for each path from stack st to stack st0 of length n} do List<Tree> [ t 1 , ..., t n ] = the trees from the links in the path from st to st0 for each X i such that X i is a contextual symbol lm X rm do if t i .LeftmostTokens ∩ lm 6= ; or t i .RightmostTokens ∩ rm 6= ; then return end if end for REDUCER(st0 , goto(state(st0 ), A.C = X 1 ...X n ), A.C = X 1 ...X n , [ t 1 , ..., t n ]) end for end function function CREATE-TREE-NODE(Production A.C = X 1 ...X n , List<Tree> [ t 1 , ..., t n ]) Tree t = [A.C = t 1 , ..., t n ] t .LeftmostTokens = t 1 .LeftmostTokens ∪ A.C t .RightmostTokens = t n .RightmostTokens ∪ A.C return t end function the constraints when performing reduce actions. We show the pseudocode for the modified methods of the original SGLR in Listing 4. Note that because we leverage the analysis done by contextual grammars, our data-dependent SGLR algorithm can solve the same types of deep priority conflicts that can be solved by regular contextual grammars, i.e., operator-style, dangling else and longest match. Furthermore, because we propagate the data representing possible conflicts at parse time, and enforce the constraints when performing a reduce operation, the grammar does not require modifications that increase its number of productions. 3.2 Scannerless Generalized LR Parsing with Data-Dependent Disambiguation To illustrate how our implementation of a data-dependent SGLR performs disambiguation at parse time, consider the scenario when parsing the input INT + if INT + INT, which contains an operator-style deep priority conflict, using the data-dependent contextual grammar shown previously. After parsing INT + if INT, the parser reaches a state with a shift/reduce conflict in the parse table shown in configuration (I) from Figure 4. Before this point, SGLR performs actions according to the parse table to construct the single stack shown in this configuration, with the links between states (represented by the boxes) containing the trees that have been created so far, or the terminal symbols that have been shifted. Note that in this first configuration, when reaching the conflict in the parse table, a parser that uses the disambiguation mechanism from YACC (see Section 5) can data-dependent algorithm, the sets of leftmost and rightmost subtrees need to be updated by propagating the information from the rightmost and leftmost direct subtrees. 13:13 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts remaining input: + INT [Exp.Int = INT] shift/reduce conflict + if [Exp.Int = INT] reduce! ✔ II remaining input: + INT [Exp.Int = INT] Exp.If + if [Exp.Int = INT] [Exp.If = if [Exp.Int = INT]] Exp.If reduce! ✔ III remaining input: + INT [Exp.Int = INT] + if [Exp.Int = INT] shift! [Exp.Add = [Exp.Int = INT] + [Exp.If = if [Exp.Int = INT]]] ✔ Exp.If remaining input: [Exp.Int = INT] I reduce! + if [Exp.Int = INT] + ✔ IV [Exp.Int = INT] + reduce! [Exp.Add = [Exp.Int = INT] + [Exp.If = if [Exp.Int = INT]]] ✘ Exp.If Figure 4 The configurations of SGLR when solving a deep priority conflict when parsing program INT + if INT + INT. make the decision of which action to take based on the next input token. In this case, the parser would choose shifting over reducing because the next token in the input is + and the addition has higher priority over the if expression. However, this approach of looking at the next input token does not extend to scannerless parsers or character-level grammars, since the parser operates on characters, and the character + might be preceded by layout, or could be the prefix of a different operator. Thus, instead of making a decision at the configuration (I), a generalized parser such as SGLR performs both actions in pseudo-parallel, producing an ambiguity if both actions lead to a successful parse. First, SGLR performs all possible reduce actions, which may result in the creation of different stacks. That is, the parser continues by forking a new stack, adding a link to the original one, creating a graph structured stack. This occurs at the configuration (II), as a reduce action has been performed to construct the tree: 13:14 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser [Exp.If = if [Exp.Int = INT]] Because the production used to construct the tree appears in the rightmost set of contextual tokens of the contextual symbol Exp{Exp.If} in the grammar, the tree is constructed with the sets of leftmost and rightmost tokens containing Exp.If. As the parser can still perform another reduce action from configuration (II), it does so, reaching configuration (III). Using the tree for the if expression, SGLR creates the following tree, by reducing using an Exp.Add production: [Exp.Add = [Exp.Int = INT] + [Exp.If = if [Exp.Int = INT]]] Note that since the tree for the if expression is used as the rightmost tree when applying the reduce action, and this tree has a non-empty set of rightmost contextual tokens, the set is propagated when creating the tree for the addition. After shifting the additional symbols from the input, and performing a reduce action that creates the last [Exp.Int = INT] tree, the parser reaches configuration (IV). At this point, there is no other symbol to shift, so only reduce actions are left to be performed. When reducing using an Exp.Add production, there are two possible paths from the state at the top at the stack. The first path, at the top of the graph, creates a tree corresponding to the addition of two integers, which does not contain any deep priority conflict. The second path, at the bottom, contains a conflict since the set of rightmost tokens for the first tree intersects with the rightmost set of contextual tokens for the contextual symbol Exp{Exp.If} in the Exp.Add production. Thus, the data-dependent SGLR uses this information to forbid the reduce action on the path at the bottom. By doing that, it produces only a single tree, solving the deep priority conflict. 3.3 Performance Optimizations As shown in the algorithm for the data-dependent SGLR, the operations necessary to perform disambiguation of deep priority conflicts consist of set-algebraic operations such as union (for data propagation) and intersection (for constraint checking). To optimize our solution, we first map all productions that occur in the sets of contextual tokens of contextual symbols from the grammar to a bitset, limiting the amount of data that needs to be propagated. Thus, if a certain production belongs to a set of tokens, its corresponding bit is set to 1, or to 0, otherwise. Using this approach, constraint checking and data propagation can be achieved at a very low cost by performing bitwise operations on these bitsets. With such optimization we were able to achieve near zero-overhead when comparing our data-dependent approach and the original SGLR, for programs that do not contain deep priority conflicts, as we will show in the next section. 13:15 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts 4 Evaluation In this section, we evaluate our approach of declarative disambiguation for solving deep priority conflicts, by applying it to a corpus of real programs. We are interested in answering the following research questions: RQ1 For files that do not contain deep priority conflicts, how much overhead is introduced by data-dependent contextual grammars? RQ2 For files that do contain deep priority conflicts, how do data-dependent contextual grammars perform when solving such conflicts, in comparison to related work? In order to tackle the aforementioned research questions, it is essential to partition a data set in files that are free of deep priority conflicts, and files that are known to have deep priority conflicts. We re-use a corpus of the top-10 trending OCaml and Java projects on GitHub. The corpus was qualitatively analyzed by Souza Amorim, Steindorfer, and Visser [20], listing the types of priority conflicts each file from the projects contains. For both languages we partitioned the files into two groups according to their analysis results: files are free of deep priority conflicts (and therefore can be parsed by parsers without sophisticated disambiguation mechanisms), and files that contain deep priority conflicts. Table 1 lists the projects contained in the corpus, the total number of source files contained in those project, and the (relative) number of files with deep priority conflicts for OCaml and Java, respectively. Based on the research questions listed before, we can formulate our hypotheses: H1 Due to our lightweight data-dependent disambiguation, we expect single-digit percentage overhead when parsing files that do not contain deep priority conflicts. H2 Since disambiguation by grammar transformation produces up to three times bigger [20] grammars, we expect our lightweight data-dependent disambiguation to perform significantly better (i.e., higher double-digit percentage improvements). 4.1 Experiment Setup The benchmarks were executed on a computer with 16 GB RAM and an Intel Core i7-6920HQ CPU with a base frequency of 2.9 GHz and a 8 MB Last-Level Cache. The software stack consisted of Apple’s macOS operating system version 10.13.1 (17B48) and an Oracle’s Java Virtual Machine (version 8u121). To obtain statistically rigorous performance numbers, we adhere to best practices for (micro-)benchmarking on the Java Virtual Machine (JVM) as, for example, discussed in Georges, Buytaert, and Eeckhout [11] and Kalibera and Jones [14]. We measure the execution time of batch-parsing the corpus of OCaml and Java sources with the Java Microbenchmarking Harness (JMH), which is a framework to overcome the pitfalls of (micro-)benchmarking. Since the batch-parsing execution times are expected to be in terms of minutes—rather than microbenchmarks that execute in milliseconds—we configured JMH to perform 15 single-shot measurements: i.e., forking a fresh virtual machine 15 times and measuring the total batch-parsing time including cold startup. 13:16 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser Table 1 Deep Priority Conflicts in OCaml and Java Corpus. OCaml Project Affected Files Java Project Affected Files FStar 6 / 160 (3.8%) Matisse 0 / 41 (0.0%) bincat 5 / 26 (19.2%) RxJava 0 / 1469 (0.0%) bucklescript 85 / 885 ( 9.6%) aurora-imui 0 / 55 (0.0%) coq 158 / 417 (37.9%) gitpitch 0 / 45 (0.0%) flow 52 / 305 (17.0%) kotlin 0 / 3854 (0.0%) infer 33 / 234 (14.1%) leetcode 0 / 94 (0.0%) ocaml 112 / 909 (12.3%) litho 0 / 510 (0.0%) reason 4 / 36 (11.1%) lottie-android 0 / 109 (0.0%) spec 4 / 40 (10.0%) spring-boot 2 / 3444 (0.06%) tezos 71 / 149 (47.7%) vlayout 0 / 46 (0.0%) All 530 / 3161 (16.8%) All 2 / 9667 (0.02%) For executing the benchmarks, we disabled CPU frequency scaling, disabled background processes as much as possible, and fixed the virtual machine heap sizes to 10 GB for benchmark execution. The benchmark setup was tested and tuned to yield accurate measurements with relative errors of typically less than 2 % of the execution time. We report the measurement error as Median Absolute Deviation (MAD), which is a robust statistical measure of variability that is resilient to small numbers of outliers. 4.2 Experiment Results The results of our experiment are illustrated in Table 2. We first report the precision of the individual data points. For all the data points, the relative measurement errors are in the range of 1.0 % to 4.1 % with a median error of 1.6 %; the absolute amounts are printed in the table next to the benchmark runtimes (cf. column Time (seconds)). Column Cost shows how the parser’s performance is affected by supporting the disambiguation of deep priority conflicts. The cost measurements were performed solely for the data sets that are guaranteed to be free of deep priority conflicts, since we use a parser without deep priority conflict disambiguation as a baseline. The results show that the cost of disambiguation with data-dependency is between 1 % (OCaml) and 2 % (Java), supporting Hypothesis H1. Note that the result for OCaml is not statistically significant, i.e., the 1 % difference may as well be in the margin of error. For the Java case, the result is statistically significant, however the error intervals are very close and almost overlap. We conclude that Hypothesis H1 is supported by our experiment: the cost of declarative disambiguation is clearly below 10 %. Cost of Disambiguating Deep Priority Conflicts (Hypothesis H1) 13:17 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts Table 2 Benchmark Results when parsing the OCaml and Java Corpus. Language Data Set Disambiguation Time (seconds) Java with conflicts data-dependent 0.18 ± 0.00 1.29 x — rewriting 0.23 ± 0.00 1.00 x — data-dependent 270.64 ± 1.28 1.73 x 1.02 x rewriting 467.20 ± 4.03 1.00 x 1.77 x none 264.20 ± 2.36 — 1.00 x data-dependent 80.60 ± 1.48 1.54 x — rewriting 123.75 ± 1.02 1.00 x — data-dependent 89.82 ± 0.51 1.46 x 1.01 x rewriting 130.71 ± 0.55 1.00 x 1.48 x none 88.58 ± 0.98 — 1.00 x without Java conflicts OCaml with conflicts without OCaml conflicts Speedup Cost Data-Dependent Disambiguation versus Grammar Rewriting (Hypothesis H2) Column Speedup of Table 2 shows the performance improvements of data-dependent disambiguation over disambiguation via grammar rewriting (baseline). In all tested configurations, data-dependent disambiguation speeds-up from 1.29 x to 1.73 x, reducing batch parse times considerably. E.g., parse time for the conflict-free Java corpus reduced from 467.20 s to 270.64 s. We conclude that Hypothesis H2 is supported by our experiment: data-dependent disambiguation outperforms disambiguation via grammar rewriting as discussed in Adams and Might [2] and Souza Amorim, Haudebourg, and Visser [19]. 4.3 Threats to Validity To counter internal threats to validity, we properly tested the data-dependent implementation and assured that it produces abstract syntax trees identical to the contextual grammars. For the data sets that are guaranteed to be free of deep priority conflicts, we also assured that the resulting parse trees are identical to the trees from the corresponding non-disambiguating grammar. In all scenarios, we checked that each resulting parse tree is indeed free of ambiguities, cross-validating the findings from the empirical pilot study [20] that accompanies the corpus. To counter external threats to validity, we carefully designed and implemented our approach to use a lightweight form of data-dependency selectively, solely disambiguating deep priority conflicts. The delta to a baseline SGLR parser without support for disambiguation of deep conflicts is minimal: it requires the addition of a few lines of code, as shown in Listing 4. Therefore, we are confident that the observed cost of 1 % to 2 % for disambiguating deep priority conflicts remains steady, even when using different or larger data sets. We are also confident that the significance of the 13:18 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser performance improvement remains clearly observable regardless of the used data sets, because it is commonly known that grammar rewriting blows-up the grammars and the resulting parse tables [20], negatively impacting parsing performance. Nevertheless, the size and choice of our corpus arguably remains an external threat to validity.⁵ 5 Related Work In the following section, we highlight previous work on disambiguation of conflicts that arise from the declarative specification of operator precedence and associativity in context-free grammars, grouped by the phase when disambiguation happens. 5.1 Disambiguation by Grammar Rewriting Ambiguities that arise from operator precedence and associativity can be avoided by rewriting the grammar to an unambiguous one. In the following, we list declarative disambiguation techniques that try to automatically derive unambiguous grammars. Aasa [1] proposes a grammar rewriting technique that addresses priority conflicts by generating new non-terminals with explicit precedence levels, forbidding the construction of trees that could cause a conflict. The approach addresses shallow conflicts as well as deep conflicts of type operator-style. Due to a restriction—productions may not have overlapping prefixes or suffixes—it cannot solve dangling-else conflicts. Thorup [21] presents a grammar transformation algorithm that constructs an unambiguous grammar, given an ambiguous grammar, and a set of counterexamples (i.e., illegal parse trees). The resulting grammar encodes the parse trees bottom-up, while removing grammar symbols that correspond to illegal trees. Thorup’s approach specifically supports dangling-else, but does not generalize the construction of counterexamples to capture arbitrary deep priority conflicts. Conceptually similar to Thorup’s idea, Adams and Might [2] propose a grammar rewriting solution, where invalid patterns are expressed using tree automata [9]. Each type of conflict should be expressed as a tree automaton, representing the pattern of the counterexample. Intersecting the counterexample automata with the original context-free grammar yields an unambiguous grammar as result. The authors address all conflicts shown in this paper, with the exception of longest match.⁶ Afroozeh, Brand, Johnstone, Scott, and Vinju [3] describe a safe semantics for disambiguation by grammar rewriting that only excludes trees that are part of an ambiguity. While their semantics does cover shallow priority conflicts and deep priority conflicts of type operator-style, it addresses neither dangling-else nor longest match. 5 For the Java data set with conflicts, we would even assume that performance further improves with a larger data set. Unlike the other data sets, the current Java data set with conflicts consists of only two files, because deep conflicts are scarce in Java. The small data set is disadvantaged, because we compare batch-parsing time including cold startup time. 6 Due to the expressivity of tree automata, we assume that longest match could be supported. 13:19 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts Contextual grammars [19] generalize the approach by Afroozeh, Brand, Johnstone, Scott, and Vinju [3], by supporting a “safe” semantics for disambiguation of arbitrary deep priority conflicts. The authors analyze and address the root causes of deep priority conflicts. Their grammar analysis yields as a result, combinations of conflicting productions that may rise to a deep priority conflict. The authors show that deep conflicts can only occur in specific paths in the parse trees. Illegal patterns are conceptually described as deep pattern matches, and implemented by means of recursive grammar rewriting that forbids invalid trees to be constructed. Rewriting is used solely for solving deep priority conflicts; disambiguation of shallow conflicts happens at parse table generation. All related work mentioned above suffers from the same performance issues: large unambiguous grammars as a result of recursive rewriting, with even larger parse tables that have a low-coverage of parsing states when parsing programs [20]. By contrast, our lightweight data-dependent disambiguation technique avoids grammar transformations and is able to reuse LR parse tables of grammars that do not solve deep priority conflicts, resulting in high parse table coverage and a low overhead of 1 % to 2 % for disambiguation. By reusing the grammar analysis results of contextual grammars, but implementing our mechanism for disambiguation via lightweight data-dependency, we are able to handle arbitrary deep priority conflicts, including deep conflicts caused by indirect recursion. 5.2 Disambiguation at Parser Generation Instead of changing the original grammar, some techniques perform disambiguation of priority conflicts at parser generation time. Even though these solutions do not require changing the productions of the original grammar, they might still be restricted to a certain parser, e.g., by depending on specific characteristics of a parsing technique, or by requiring modifications in the parser generation algorithm. YACC [13] resolves ambiguities concerning operator precedence and associativity by solving shift/reduce conflicts that occur in LR parse tables. Even though the decision is made dynamically depending on the current lookahead token, the grammar has to specify the default action to take in the conflicting state, given the precedence of the operators involved in the conflict specified in the grammar. This technique has two major drawbacks. First, users have to reason in terms of shift/reduce conflicts, and annotate the grammar if a shift action should be preferred over reduce, or vice versa, to resolve conflicts. Second, YACC’s disambiguation does not apply to scannerless parsers, since it requires knowing the lookahead token for decision making. More specifically, YACC’s disambiguation does not apply to any parser that relies on character-level grammars [17, 18, 25], which are useful to avoid issues when composing grammars of different languages [6, 7]. Klint and Visser [15] propose a semantics for declarative disambiguation based on disambiguation filters. This semantics has been implemented by SDF2, so invalid tree patterns can be constructed from SDF2 priority declarations [23], and used in a disambiguation filter. The implementation relies on a custom LR parse table generator, as SDF2 parse tables encode goto transitions between states using productions, forbidding transitions that could construct an invalid tree according to the tree patterns. 13:20 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser Because this semantics only targets conflicts by checking a parent-child relation in a tree, this solution is not able to solve deep priority conflicts. 5.3 Disambiguation while Parsing Ambiguities from operator precedence may also be addressed at parse time. Such approaches have the advantage of using the original (or a slightly modified) grammar as input, but require adaptations of the parsing algorithm that may cause overhead when parsing programs that are free of priority conflicts. Afroozeh and Izmaylova [5] introduce a solution for disambiguating priority conflicts on the basis of a full-fledged data-dependent grammar formalism. The authors implemented their approach in a generalized LL parser named Iguana [4]. Iguana addresses shallow priority conflicts and operator-style deep conflicts using datadependent grammars, but the approach does not extend to dangling-else nor longest match. Given the experimental setup described in their paper [5], it is not possible to assess the overhead of solving deep priority conflicts, because no analysis has been performed on programs free of deep priority conflicts. When solving the shallow conflicts present in the Java 7 grammar, Afroozeh and Izmaylova’s approach causes, on average, 5 % overhead compared to the unambiguous Java grammar that directly encodes precedence and associativity. In contrast, in this paper we measure the cost of disambiguating deep priority conflicts by parsing programs that are known to be free of deep priority conflicts. Our lightweight data-dependent solution has negligible overhead to solve deep priority conflicts, furthermore, it is able to address more types of deep priority conflicts than Iguana. The ALL(*) parsing algorithm of ANTLR [16] also handles operator precedence dynamically by means of semantic predicates. Because top-down parsers cannot handle left-recursive rules, the grammar is first rewritten to eliminate direct recursion using a technique known as precedence climbing [8]. Next, semantic predicates that are evaluated at parse time may filter invalid trees according to the order in which productions are defined in the grammar. The predicates are interwoven in the grammar productions representing the constraints to avoid producing invalid trees. In our case, the constraints are encoded in contextual non-terminals, as they indicate the trees that a non-terminal should not produce as its leftmost or rightmost child. Furthermore, we assume that the ANTLR solution to disambiguate deep conflicts have a bigger impact on performance than our lightweight data-dependency, more specifically when parsing programs without conflicts, as it uses similar techniques to data-dependent grammars. Finally, Erdweg, Rendel, Kästner, and Ostermann [10] implemented a disambiguation strategy at parse time for SGLR, to support layout-sensitive languages. The disambiguation mechanism consists of propagating information about layout when constructing the parse trees, and enforcing constraints that are defined as attributes of productions in SDF grammars. While we only propagate information about leftmost and rightmost subtrees, their approach needs to propagate line and column positions of all terminal symbols that were used to construct a tree. In our case, we express constraints using sets of contextual symbols, checking them using set-algebraic operations. By using an optimized bitset representation, our approach achieves near 13:21 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts zero-overhead when disambiguating deep priority conflicts. In contrast, Erdweg, Rendel, Kästner, and Ostermann state that their layout-sensitive parsing approach is practicable with an average slowdown of 1.8 x compared to a layout-insensitive solution. The authors mix enforcing constraints at parse-time and post-parse, compared to our solution that solely disambiguates deep priority conflicts at parse time. 6 Conclusions In this paper, we presented a novel low-overhead implementation technique for disambiguating deep priority conflicts with data-dependency. The approach was implemented in a scannerless generalized LR parser, and evaluated by benchmarking parsing performance of a corpus of popular Java and OCaml projects on Github. Results show that our data-dependent technique cuts down the cost of disambiguating deep priority conflicts to 1 % to 2 %, improving significantly over contextual grammar rewriting strategies that have an overhead of 48 % to 77 %, as shown in Section 4. By using data-dependency selectively for just solving deep priority conflicts, we were able to reuse the (compact) LR parse tables of grammars that do not disambiguate deep conflicts, avoiding the typical problems of parse-table blowup of grammar rewriting strategies. Overall, we showed that declarative disambiguation can indeed be solved with almost no cost. Acknowledgements The work presented in this paper was partially funded by CAPES (Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brazil) and by the NWO VICI Language Designer’s Workbench project (639.023.206). We would also like to thank Jasper Denkers for his work on JSGLR2, and Peter Mosses and the anonymous reviewers for their detailed feedback. References [1] Annika Aasa. “Precedences in Specifications and Implementations of Programming Languages”. In: Theoretical Computer Science 142.1 (1995), pages 3–26. doi: 10.1016/0304-3975(95)90680-J. [2] Michael D. Adams and Matthew Might. “Restricting Grammars with Tree Automata”. In: Proceedings of the ACM on Programming Languages 1.OOPSLA (Oct. 2017), 82:1–82:25. issn: 2475-1421. doi: 10.1145/3133906. [3] Ali Afroozeh, Mark G. J. van den Brand, Adrian Johnstone, Elizabeth Scott, and Jurgen J. Vinju. “Safe Specification of Operator Precedence Rules”. In: Software Language Engineering - 6th International Conference, SLE 2013, Indianapolis, IN, USA, October 26-28, 2013. Proceedings. Edited by Martin Erwig, Richard F. Paige, and Eric Van Wyk. Volume 8225. Lecture Notes in Computer Science. Springer, 2013, pages 137–156. isbn: 978-3-319-02653-4. doi: 10.1007/978-3-319-026541_8. 13:22 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser [4] Ali Afroozeh and Anastasia Izmaylova. “Faster, Practical GLL Parsing”. In: Compiler Construction - 24th International Conference, CC 2015, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2015, London, UK, April 11-18, 2015. Proceedings. Edited by Björn Franke. Volume 9031. Lecture Notes in Computer Science. Springer, 2015, pages 89–108. isbn: 978-3662-46662-9. doi: 10.1007/978-3-662-46663-6_5. [5] Ali Afroozeh and Anastasia Izmaylova. “Operator precedence for data-dependent grammars”. In: Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2016, St. Petersburg, FL, USA, January 20 - 22, 2016. Edited by Martin Erwig and Tiark Rompf. ACM, 2016, pages 13–24. isbn: 978-1-4503-4097-7. doi: 10.1145/2847538.2847540. [6] Martin Bravenboer, Éric Tanter, and Eelco Visser. “Declarative, formal, and extensible syntax definition for AspectJ”. In: Proceedings of the 21th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2006. Edited by Peri L. Tarr and William R. Cook. ACM, 2006, pages 209–228. isbn: 1-59593-348-4. doi: 10.1145/1167473.1167491. [7] Martin Bravenboer and Eelco Visser. “Concrete syntax for objects: domainspecific language embedding and assimilation without restrictions”. In: Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2004. Edited by John M. Vlissides and Douglas C. Schmidt. Vancouver, BC, Canada: ACM, 2004, pages 365–383. isbn: 1-58113-831-8. doi: 10.1145/1028976.1029007. [8] Keith Clarke. The Top-down Parsing of Expressions. University of London. Queen Mary College. Department of Computer Science and Statistics, 1986. [9] Hubert Comon, Max Dauchet, Rémi Gilleron, Christof Löding, Florent Jacquemard, Denis Lugiez, Sophie Tison, and Marc Tommasi. Tree Automata Techniques and Applications. Available on: http://www.grappa.univ-lille3.fr/tata. release October, 12th 2007. 2007. [10] Sebastian Erdweg, Tillmann Rendel, Christian Kästner, and Klaus Ostermann. “Layout-Sensitive Generalized Parsing”. In: Software Language Engineering, 5th International Conference, SLE 2012, Dresden, Germany, September 26-28, 2012, Revised Selected Papers. Edited by Krzysztof Czarnecki and Görel Hedin. Volume 7745. Lecture Notes in Computer Science. Springer, 2012, pages 244–263. isbn: 978-3-642-36089-3. doi: 10.1007/978-3-642-36089-3_14. [11] Andy Georges, Dries Buytaert, and Lieven Eeckhout. “Statistically Rigorous Java Performance Evaluation”. In: OOPSLA ’07: Proceedings of the ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications. ACM, 2007. isbn: 978-1-59593-786-5. doi: 10.1145/1297027.1297033. [12] Trevor Jim, Yitzhak Mandelbaum, and David Walker. “Semantics and algorithms for data-dependent grammars”. In: Proceedings of the 37th ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, POPL 2010, Madrid, Spain, January 17-23, 2010. Edited by Manuel V. Hermenegildo and Jens Palsberg. 13:23 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts ACM, 2010, pages 417–430. isbn: 978-1-60558-479-9. doi: 10.1145/1706299. 1706347. [13] Stephen C. Johnson. YACC—yet another compiler-compiler. Technical report CS-32. Murray Hill, N.J.: AT & T Bell Laboratories, 1975. [14] Tomas Kalibera and Richard Jones. “Rigorous Benchmarking in Reasonable Time”. In: ISMM ’13: Proceedings of the International Symposium on Memory Management. ACM, 2013. doi: 10.1145/2464157.2464160. [15] Paul Klint and Eelco Visser. “Using Filters for the Disambiguation of Contextfree Grammars”. In: Proceedings of the Algebraic and Syntactic Methods in Computer Science Workshop on Parsing Theory. Milano, Italy: Tech. Rep. 126– 1994, Dipartimento di Scienze dell’Informazione, Università di Milano, Oct. 1994. url: https://homepages.cwi.nl/~paulk/publications/ASMICS94.ps. [16] Terence John Parr, Sam Harwell, and Kathleen Fisher. “Adaptive LL(*) parsing: the power of dynamic analysis”. In: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA 2014, part of SPLASH 2014, Portland, OR, USA, October 20-24, 2014. Edited by Andrew P. Black and Todd D. Millstein. ACM, 2014, pages 579–598. isbn: 978-1-4503-2585-1. doi: 10.1145/2660193.2660202. [17] Daniel J. Salomon and Gordon V. Cormack. “Scannerless NSLR(1) Parsing of Programming Languages”. In: Proceedings of the ACM SIGPLAN 1989 Conference on Programming Language Design and Implementation. PLDI ’89. Portland, Oregon, USA: ACM, 1989, pages 170–178. isbn: 0-89791-306-X. doi: 10.1145/ 73141.74833. [18] Daniel J. Salomon and Gordon V. Cormack. The disambiguation and scannerless parsing of complete character-level grammars for programming languages. Technical report 95/06. Winnipeg, Canada: Department of Computer Science, University of Manitoba, 1995. [19] Luis Eduardo de Souza Amorim, Timothée Haudebourg, and Eelco Visser. Declarative Disambiguation of Deep Priority Conflicts. Technical report TUDSERG-2017-014. Delft University of Technology., 2017. [20] Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser. “Deep priority conflicts in the wild: a pilot study”. In: Proceedings of the 10th ACM SIGPLAN International Conference on Software Language Engineering, SLE 2017, Vancouver, BC, Canada, October 23-24, 2017. Edited by Benoît Combemale, Marjan Mernik, and Bernhard Rumpe. ACM, 2017, pages 55–66. isbn: 978-14503-5525-4. doi: 10.1145/3136014.3136020. [21] Mikkel Thorup. “Disambiguating Grammars by Exclusion of Sub-Parse Trees”. In: Acta Informatica 33.6 (1996), pages 511–522. [22] Eelco Visser. “A Case Study in Optimizing Parsing Schemata by Disambiguation Filters”. In: International Workshop on Parsing Technology (IWPT 1997). Massachusetts Institute of Technology. Boston, USA, Sept. 1997, pages 210–224. 13:24 Luis Eduardo de Souza Amorim, Michael J. Steindorfer, and Eelco Visser [23] Eelco Visser. “A Family of Syntax Definition Formalisms”. In: ASF+SDF 1995. A Workshop on Generating Tools from Algebraic Specifications. Edited by Mark G. J. van den Brand and Vania Vieira Estrela. Technical Report P9504, Programming Research Group, University of Amsterdam, May 1995. url: https://ivi.fnwi.uva. nl/tcs/pub/reports/1995/P9504/7.html. [24] Eelco Visser. Scannerless Generalized-LR Parsing. Technical report P9707. Programming Research Group, University of Amsterdam, July 1997. url: https: //pdfs.semanticscholar.org/90f2/8a411455fb783da17ad4b4efdda4464606c4.pdf . [25] Eelco Visser. “Syntax Definition for Language Prototyping”. PhD thesis. University of Amsterdam, Sept. 1997. [26] Tobi Vollebregt, Lennart C. L. Kats, and Eelco Visser. “Declarative specification of template-based textual editors”. In: International Workshop on Language Descriptions, Tools, and Applications, LDTA ’12, Tallinn, Estonia, March 31 - April 1, 2012. Edited by Anthony Sloane and Suzana Andova. ACM, 2012, pages 1–7. isbn: 978-1-4503-1536-4. doi: 10.1145/2427048.2427056. 13:25 Towards Zero-Overhead Disambiguation of Deep Priority Conflicts About the authors Luis Eduardo de Souza Amorim is a PhD student working at the Programming Languages/Software Technologies group at Delft University of Technology. His work focuses on syntax definition formalisms and parsing. Eduardo received degrees in computer science from Universidade Federal de Viçosa, in Brazil (BSc 2011, MSc 2013). Contact him at [email protected]. Michael J. Steindorfer is a senior software engineer working in industry and a guest researcher at the Delft University of Technology. His research and engineering efforts focus on optimizing functional data structures, the design and implementation of programming languages, and improving big data processing runtimes for cloud infrastructures. You can contact him at [email protected]. Eelco Visser is Antoni van Leeuwenhoek Professor of Computer Science and chair of the Programming Languages Group at Delft University of Technology. His current research is on the foundation and implementation of declarative specification of programming languages. Contact him at [email protected], and find further information at https://eelcovisser.org. 13:26
6cs.PL
The high-conductance state enables neural sampling in networks of LIF neurons Mihai A. Petrovici, Ilja Bytschok, Johannes Bill, Johannes Schemmel and Karlheinz Meier∗ arXiv:1601.00909v1 [q-bio.NC] 5 Jan 2016 26.02.2015 The apparent stochasticity of in-vivo neural circuits has long been hypothesized to represent a signature of ongoing stochastic inference in the brain [1, 2, 3]. More recently, a theoretical framework for neural sampling has been proposed, which explains how sample-based inference can be performed by networks of spiking neurons [4, 5]. One particular requirement of this approach is that the membrane potential of these neurons satisfies the so-called neural computability condition (NCC), which in turn leads to a logistic neural response function νk (ūk ): ūk = ln p(zk = 1|z\k ) p(zk = 0|z\k ) =⇒ νk ∝ p(zk = 1|z\k ) = 1 1 + exp(−ūk ) , (1) where ūk represents the mean free membrane potential of the neuron. Analytical approaches to calculating neural response functions have been the subject of many theoretical studies. In order to make the problem tractable, particular assumptions regarding the neural or synaptic parameters are usually made. One common assumption is that synaptic time constants are negligible (τ syn → 0) compared to the membrane time constant, which, in the diffusion approximation, allows treating the membrane potential as an Ornstein-Uhlenbeck (OU) process [6]. The particular appeal of this formal equivalence is that it allows calculating the mean first-passage time hT (ϑ, %)i of the neural membrane potential u from the reset potential % to the threshold potential ϑ [7], which is equivalent to the inverse of the firing rate ν. This p approach can be further refined by considering nonzero, but small τ syn by means of an expansion in τ syn /τ m [8]. However, biologically significant activity regimes exist which are not covered by the underlying assumption: Under strong synaptic bombardment, as is often the case in cortex, the summation of synaptic conductances shifts the neuron into a high-conductance state (HCS), which is eff characterized p by a very fast effective membrane time constant τ . In this case, the opposite limit may syn eff appear ( τ /τ → ∞), and the correlation between the membrane potential before and after an output spike becomes significant (Figure 1A, black curve). The specific limit of τ syn  τ m has also been studied [9], albeit with a different approach. In this limit, an adiabatic (or quasistatic) approximation can be made, since the membrane reacts much faster than the synaptic input changes. This allows calculating the response function as an integral of the firing rate ν̃(I) for constant input current I over the probability density function (PDF) p(I syn ), which, for an OU process, can be given in closed form. The adiabatic assumption, however, also represents the limitation of this approach. When the synaptic time constants are in the order of the refractory period τ ref , the synaptic input current is no longer quasistatic with respect to the time of spiking compared to the time when the membrane is released from the reset potential (Figure 1A, blue curve). The regime in which τ eff  τ syn ∼ τ ref is, however, not only biologically relevant, but also particularly interesting from a functional point of view. In [5], we have shown that LIF neurons that are shifted into a HCS by background synaptic bombardment can attain the correct firing statistics (i.e., satisfy the NCC) to sample from well-defined probability distributions. This framework builds on the abstract model from ∗ This research was supported by EU grants #269921 (BrainScaleS), #237955 (FACETS-ITN), #604102 (Human Brain Project), the Austrian Science Fund FWF #I753-N23 (PNEUMA) and the Manfred Stärk Foundation. 1 [4], which explicitly establishes an approximate equivalence of τ ref and τ syn . In order to calculate the response function of neurons in this regime, we were therefore required to consider a different approach. Here, we present an extended version of this theory, which remains valid for a larger parameter space. The core idea of this approach is to separately consider two different “modes” of spiking dynamics: burst spiking, where the effective membrane potential is suprathreshold and the inter-spike-intervals are close to the refractory time, and transient quiescence, in which the neuron does not spike for longer periods. For the bursting mode, we explicitly take into consideration the autocorrelation of the membrane potential before and after refractoriness by propagating the PDF of the effective membrane potential from spike to spike within a burst. For the membrane potential evolution between bursts, we consider an OUlike approximation. The response function can then be given by P ref n nPn τ   , (2) νk = P Pn−1 b ref + n Pn nτ k=1 τk + Tn where Pn , Tn and τkb represent quantities that are associated with a burst length of n spikes and can be calculated recursively:  hR i Pn−1  R ∞ ϑ Pn = 1 − i=1 Pi ϑ dun−1 p(un−1 |un−1 ≥ ϑ) −∞ dun p(un |un−1 ) , (3) h i R∞ Rϑ Tn = ϑ dun−1 p(un−1 |un−1 ≥ ϑ) −∞ dun p(un |un < ϑ, un−1 ) hT (ϑ, un )i , (4)   R ∞ %−uk p(uk |uk > ϑ, uk−1 ) . (5) τkb = τ eff ϑ duk ln ϑ−u k In the limit of small τ eff , we show that the neural activation function p(zk = 1|I syn ) = νk τ ref becomes symmetric and can be well approximated by a logistic function, thereby providing the correct dynamics in order to perform neural sampling (Figure 1B). Such stochastic firing units can then be used to sample from arbitrary probability distributions over binary random variables (RVs) zk [5, 4, 10, 11]. Figure 1C shows a network of 5 neurons sampling from an exemplary Boltzmann distribution. Inference in these spaces is readily performed by injecting a strong current into the neurons corresponding to observed RVs, allowing the network to sample from the resulting posterior distribution. This spike-based sampling approach offers several important advantages: it allows an increasingly accurate representation of the underlying probability distribution at any time (“anytime computing”), marginalization comes at no cost, as it can be done by simply neglecting the values of the “uninteresting” or unobserved RVs, and the physical implementation of the sampling algorithm, i.e., the network structure, is massively parallel by construction. We thereby provide not only a normative framework for Bayesian inference in cortex, but also powerful applications of low-power, accelerated neuromorphic systems to highly relevant machine learning problems. References [1] Konrad Körding and Daniel Wolpert. Bayesian integration in sensorimotor learning, Nature, 2004 [2] József Fizser, Pietro Berkes, Gergő Orbán and Máté Lengyel. Statistically optimal perception and learning: from behavior to neural representations, Trends in Cognitive Sciences, 2010 [3] Karl Friston, Jérémie Mattout and James Kilner. Action understanding and active inference, Biological Cybernetics, 2011 2 Figure 1: (A) Prediction of the neural response function for an LIF neuron under Poisson bombardment of intermediate strength. Existing theories (black and blue curves) do not hold in this regime, due to particular assumed approximations. Our theory, based on a propagation of the membrane autocorrelation throughout spike bursts (red dots), accurately reproduces simulation results (green crosses). The theoretical approach presented here represents an extension of the one we previously developed in [5] (dashed red curve). (B) Prediction of the neural response function for an LIF neuron in the HCS (red dots) and simulation data (green crosses). In this regime, the response function becomes a (linearly transformed) logistic function (cyan curve). (C) A recurrent network of 5 LIF neurons in the HCS sampling from a (randomly drawn) Boltzmann distribution. The joint probability distribution sampled by the network after 104 ms (blue bars) is compared to the target distribution (red bars). Errors are calculated over 10 different trials. [4] Lars Büsing, Johannes Bill, Bernhard Nessler and Wolfgang Maass. Neural dynamics as sampling: A model for stochastic computation in recurrent networks of spiking neurons PLoS Computational Biology, 2011. [5] Mihai A. Petrovici*, Johannes Bill*, Ilja Bytschok, Johannes Schemmel and Karlheinz Meier. Stochastic inference with deterministic spiking neurons, arXiv preprint arXiv:1311.3211, 2013. [6] Luigi M. Ricciardi and Laura Sacerdote. The Ornstein-Uhlenbeck process as a model for neuronal activity, Biological Cybernetics, 1979. [7] Luigi M. Ricciardi and Shunsuke Sato. First-passage-time density and moments of the OrnsteinUhlenbeck process, Journal of Applied Probability, 1988. [8] Nicolas Brunel and Simone Sergi. Firing Frequency of leaky integrate-and-fire neurons with synaptic current dynamics, Journal of Theoretical Biology, 1998. [9] Rubén Moreno-Bote and Néstor Parga. Role of synaptic filtering on the firing response of simple model neurons, Physical Review Letters, 2004. [10] Dejan Pecevski, Lars Büsing and Wolfgang Maass. Probabilistic inference in general graphical models through sampling in stochastic networks of spiking neurons PLoS Computational Biology, 2011. [11] Dimitri Probst*, Mihai A. Petrovici*, Ilja Bytschok, Johannes Bill, Dejan Pecevski, Johannes Schemmel and Karlheinz Meier. Probabilistic inference in discrete spaces can be implemented into networks of LIF neurons Frontiers in Neuroscience, 2015. 3
9cs.NE
arXiv:1802.09370v1 [math.ST] 26 Feb 2018 Averaging of density kernel estimators O. Chernova∗, F. Lavancier†and P. Rochet† February 27, 2018 Abstract Averaging provides an alternative to bandwidth selection for density kernel estimation. We propose a procedure to combine linearly several kernel estimators of a density obtained from different, possibly data-driven, bandwidths. The method relies on minimizing an easily tractable approximation of the integrated square error of the combination. It provides, at a small computational cost, a final solution that improves on the initial estimators in most cases. The average estimator is proved to be asymptotically as efficient as the best possible combination (the oracle), with an error term that decreases faster than the minimax rate obtained with separated learning and validation samples. The performances are tested numerically, with results that compare favorably to other existing procedures in terms of mean integrated square errors. Keywords: Aggregation ; Density estimation ; Bandwidth selection ; Non-parametric estimation. 1 Introduction Kernel estimation is an efficient and commonly used method to estimate a density from a sample of independent identically distributed random variables. It relies on the convolution of the empirical measure with a function ∗ Taras Shevchenko National University of Kyiv, 64 Volodymyrska, 01601 Kyiv, Ukraine University of Nantes, Laboratoire de Mathématiques Jean Leray, 2 rue de la Houssinière, 44322 Nantes, France † 1 K (the kernel), adjusted by a unique tuning parameter h (the bandwidth). In the extremely vast literature on density kernel estimation, it is widely accepted that the most important aspect is the choice of the bandwidth, the kernel playing only a minor role. While several commonly used data-driven methods for bandwidth selection have stood the test of time, none can be recognized as objectively best. Among the most classical examples are Silverman’s rule of thumb [16] or Sheater and Jones’ bandwidth [15]. In the past decades, aggregation for kernel density estimators has been investigated as an alternative to bandwidth selection. In [13], an aggregated estimator is obtained as a linear (or convex) combination of the initial estimators based on a quadratic minimization. A different approach was proposed by [2] and [17] to aggregate density estimators using a sequential process. More recently, a Kullback-Leibler criterion has been used, see e.g. [1]. In these papers, the initial estimators are assumed non-random, which is generally achieved by dividing the sample to separate training and validation. The aim of the present article is to propose a new procedure to combine several competing density kernel estimators obtained from different, possibly data-driven, bandwidths. The method, in the spirit of model averaging, aims at minimizing the integrated square error of a linear combination of the kernel estimators. In this particular context, the first order asymptotic of the error is known up to a single parameter γ equal to the integrated squared second derivative of the density. The easily tractable error is precisely what makes kernel estimation a good candidate for averaging procedures, as we discuss in Section 2. Furthermore, the estimation of γ can be made from the same data used to estimate the density so that no sample splitting is needed. The method is detailed in Section 3, where it is proved to be asymptotically as efficient as the best possible combination, referred to as the oracle. The error term is further proved to have a better rate of convergence than when sample splitting is used, as studied in [13]. Our simulation study in Section 4 demonstrates that our method compares favorably to other existing procedures and confirms that sample splitting may lead to poorer results in this setting. 2 2 Some facts on kernel estimators 2.1 Integrated square errors with deterministic bandwidths Let X1 , ..., Xn be a sample of independent and identically distributed real random variables with density f with respect to the Lebesgue measure. Given a kernel K : R → R and a bandwidth h > 0, the kernel estimator of f is given by   n Xi − x 1 X ˆ K , x ∈ R. fh (x) := nh i=1 h Henceforth, we assume that K is a bounded density function on R such that Z Z 2 2 kKk := K (u)du < ∞ and cK := u2 K(u)du < ∞. (HK ) Concerning f , we assume that f ∈ C 2 (R) and f , f 0 and f 00 are bounded and square integrable. (Hf ) We measure the performance of an estimator fˆ of f by its integrated square error (ISE), defined by Z 2 2 ˆ ˆ fˆ(x) − f (x) dx. (1) ISE(f ) = kf − f k = R Under (HK ) and (Hf ), an asymptotic approximation for the ISE of the kernel estimator fˆh is given by   h4 c2K 1 kKk2 4 ˆ ISE(fh ) = +γ + op +h , (2) nh 4 nh where Z γ := f 00 (x)2 dx. This result can be viewed as a consequence of the integrated square error and the mean integrated square error being asymptotically equivalent (see [3]). Let us point out that the integrated squared second derivative γ is the only unknown in the dominating term on the right-hand side. In the 3 typical case where (nh)−1 and h4 balance out, that is when h = O(n−1/5 ) and lim inf n→∞ n1/5 h > 0 which we shall denote h  n−1/5 , approximating ISE(fˆh ) can be achieved from estimating γ only. In fact, the same statement holds for the asymptotic behavior of the integrated crossed error between two bandwidths hi and hj . Specifically, consider a collection of different bandwidths h = (h1 , ..., hk ) of arbitrary size k that all vanish at the rate n−1/5 and let Σ be the Gram matrix with general term Z   Σij = fˆhi (x) − f (x) fˆhj (x) − f (x) dx. (3) We have the following asymptotic approximation. We recall that given two matrices U and V , we write U = V + op (1) when kU − V k = op (1), where k.k denotes a matrix norm. Theorem 2.1. Assume (HK ) and (Hf ). If hi  n−1/5 for all i, then Σ = A + γB + op (n−4/5 ), where the matrices A = O(n−4/5 ) and B = O(n−4/5 ) are given by  2 2 2  Z  hi hj cK 1 , B= . K(u/hi )K(u/hj )du A= n 4 i,j=1,...,k i,j=1,...,k (4) This result is as straightforward generalization of (2). Similarly, it provides a first order approximation of Σ that is known up to the scalar γ. In the important particular case where K is the Gaussian kernel, A and B have the simple form    2 2 hi hj 1 1  q A= and B = . n 4 i,j=1,...,k 2π(h2 + h2 ) i 2.2 j i,j=1,...,k Integrated square errors with adaptive bandwidths The asymptotic expansion of Σ in Theorem 2.1 is technically only valid for deterministic bandwidths. In practice however, most if not all common methods for bandwidth selection rely on some tuning parameters one has to calibrate from the data. Consequently, the bandwidth h is chosen so as to approximate a deterministic one h∗ , hopefully sharing its asymptotic properties. 4 The effect of considering the data-driven h instead of h∗ can be considered negligible for our purposes if the integrated square errors are asymptotically equivalent, in the sense that ISE(fˆh ) − ISE(fˆh∗ ) p −→ 0 ISE(fˆh∗ ) (5) p where −→ stands for the convergence in probability. Fortunately, Equation (5) has been shown to be true for most choices of data-driven bandwidths, under regularity conditions, as summarized in the following proposition. Proposition 2.2. Assume (HK ), (Hf ) and further that the kernel K has compact support and is twice continuously differentiable. If there exists for all i a deterministic bandwidth h∗i  n−1/5 such that hi − 1 = op (n−1/5 ), (6) h∗i   R then the matrix Σ with generic term Σij = fˆhi (x)−f (x) fˆhj (x)−f (x) dx satisfies Σ = A + γB + op (n−4/5 ), (7) where A and B, given in (4), satisfy A = Op (n−4/5 ) and B = Op (n−4/5 ). Remark 2.3. We point out that the matrices A and B in (7) are no longer deterministic whenever the hi ’s are data-driven. Proof. Following [5], let ∆(h) = ISE(fˆh ) and consider the first-order expansion ∆(hi ) − ∆(h∗i ) = (hi − h∗i )∆0 (h̃i ), for some h̃i between hi and h∗i . From Section 2 and Lemma 3.2 in [5], we know that ∆0 (h̃i ) = Op (n−3/5 ). Combined with the fact that ∆(h∗i ) = Op (n−4/5 ), this shows that (6) implies (5) for all i. From Theorem 2.1 and this last result, we get Σ = A∗ + γB ∗ + op (n−4/5 ), where A∗Rand B ∗ are defined as A and B but with h∗i in place of hi . The map (x, y) 7→ K(u/x)K(u/y)du is continuous away from zero, which implies its uniform continuity on every compact set that does not contain zero. Applying 5 this function to the sequences (x∗n , yn∗ ) = (n1/5 h∗i , n1/5 h∗j ), i 6= j, which are bounded away from zero, and (xn , yn ) = (n1/5 hi , n1/5 hj ), we deduce n4/5 (A − A∗ ) = op (1). Similarly, we verify easily that n4/5 (B − B ∗ ) = op (1), yielding the result. The most common bandwidth selection procedures (see [9]) verify (6) for some deterministic h∗ , making the approximation (7) available. For example, let us recall the default bandwidths proposed in the function density implemented in the freeware R [12]. i) The Silverman’s rule of thumb (see Section 3.4.2 in [16]) is motivated by the optimal choice in case of f being the density of a Gaussian distribution. It uses the standard deviation σ and inter-quartile range iqr. Specifically h∗ = 0.9 min{σ, iqr/1.34} n−1/5 in this case and h is the natural empirical counterpart of h∗ , whereby h/h∗ − 1 = Op (n−1/2 ). ii) The variation with normalizing constant 1.06 instead of 0.9 (see [16]) converges at the same rate. iii) The biased and unbiased least-square cross-validation bandwidths (see [14]) approximate the deterministic bandwidth h∗ = kKk2/5 (ncK γ)−1/5 that minimizes the asymptotic mean integrated square error. The asymptotic properties established in [14] and [5] imply (6). iv) The plug-in approach of Sheater and Jones ([15]) approximates the same h∗ as previously, with a rate h/h∗ − 1 = Op (n−5/14 ). This method may even achieve an optimal rate of convergence of Op (n−1/2 ) when γ is estimated by following [7]. Note finally that, as argued by several authors, a truncation argument allows to extend Proposition 2.2 to non compactly supported kernels K (see [6] or Remark 3.9 in [11]). 3 3.1 The average estimator Method Let h = (h1 , ..., hk )> ∈ Rk+ be a collection of (possibly data-driven) bandwidths and set f̂ = (fˆh1 , ..., fˆhk )> . Following [10], we search for a good 6 estimator of f expressed as a linear combination of the fˆhi ’s, fˆλ = λ> f̂ = k X λj fˆhi , (8) i=1 > where Pk the weight vector λ = (λ1 , ..., λk ) is constrained to sum up to one: i=1 λi = 1. Under this normalizing constraint, the integrated square error of fˆλ has a simple expression in function of Σ defined in (3) as  ISE fˆλ = kλ> f̂ − f k2 = kλ> (f̂ − f 1)k2 = λ> Σλ setting 1 = (1, ..., 1)> . The optimal weight vector λ∗ is derived by minimizing the ISE. If Σ is invertible (which we shall assume throughout), one has  Σ−1 1 λ∗ = arg min ISE fˆλ = > −1 . 1 Σ 1 λ> 1=1 (9) With all bandwidths hi of order n−1/5 , we know from Proposition 2.2 that Σ = A + γB + op (n−4/5 ). Because R both A and B are known, approximating Σ is reduced to estimating γ = f 00 (x)2 dx. This problem has been tackled in the literature, see for instance [4, 7, 15]. Hence, given an estimator γ̂ of γ, one obtains an approximation of Σ by b = A + γ̂B. Σ Remark that A is a Gram matrix, and as such, is positive-definite provided that the functions u 7→ K(u/hi )’s are linearly independent (this is true in general and can easily be checked in practice). On the other hand, B is a b is known to be rank 1 positive semi-definite matrix, which implies that Σ b invertible. Replacing Σ by its approximation Σ yields the average density b subject to λ> 1 = estimator fˆAV = fˆλ̂ = λ̂> f̂ , where λ̂ minimizes λ 7→ λ> Σλ 1. It follows b −1 1> Σ fˆAV = f̂ . (10) b −1 1 1> Σ 3.2 Theoretical results The minimal integrated square error among all average estimators fˆλ defined by (8) is achieved for the oracle fˆ∗ = λ∗> f̂ , where λ∗ is given in (9), precisely  ISE(fˆ∗ ) = min ISE fˆλ = 1> Σ−1 1. (11) λ> 1=1 7 In particular, this quantity is lower than the integrated square errors of the initial estimators fˆhi . The next theorem shows that the average estimator fˆAV in (10) performs as well asymptotically as the oracle fˆ∗ . Precise rates of convergence are discussed further. b are Theorem 3.1. Under the assumptions of Proposition 2.2, if Σ and Σ p invertible and γ̂ → γ, then   ISE fˆAV = ISE(fˆ∗ ) 1 + op (1) . Proof. Write  b λ̂ + λ̂> Σ − Σ b λ̂, ISE(fˆAV ) = λ̂> Σλ̂ = λ̂> Σ b ∗ = b λ̂ ≤ λ∗> Σλ and recall that ISE(fˆ∗ ) = λ∗> Σλ∗ . By construction, λ̂> Σ b − Σ λ∗ . Moreover, denoting by |||.||| the operator norm, λ∗> Σλ∗ + λ∗> Σ that is |||A||| = sup||x||=1 ||Ax||, we have for all λ ∈ Rk  b λ| ≤ ||| I −ΣΣ b −1 ||| λ> Σλ, |λ> Σ − Σ see the proof of Lemma A.1 in [10]. Applying the above inequality to λ̂ and λ∗ , we get   b −1 ||| ISE(fˆAV ) ≤ 1 + ||| I −ΣΣ b −1 ||| ISE(fˆ∗ ). 1 − ||| I −ΣΣ (12) b −1 ||| = op (1). Recall from Proposition 2.2 It remains to show that ||| I −ΣΣ that Σ = A + γB + C with A = Op (n−4/5 ), B = Op (n−4/5 ) and some matrix C = op (n−4/5 ). Therefore b −1 = (A + γ̂B)Σ−1 = I − CΣ−1 + (γ̂ − γ)BΣ−1 ΣΣ and since BΣ−1 = Op (1), b −1 ||| ≤ |||CΣ−1 ||| + |γ̂ − γ|Op (1). ||| I −ΣΣ (13) p The result follows from the fact that CΣ−1 = op (1) and γ̂ → γ. One may be interested in setting additional constraints on the weights λi , restricting λ to a proper subset Λ ⊂ {λ : λ> 1 = 1}. A typical example is to impose the λi ’s to be non-negative, a framework usually referred to 8 as convex averaging. In fact, the same result as in Theorem 3.1 holds for any such subset Λ, using the corresponding oracle and average estimator, the proof being identical. A reason for considering additional constraints on λ is to aim for a more stable solution, which may be desirable in practice especially when working with small samples (see e.g. Table 1 in Section 4). However, since the oracle is necessarily worse (in term of integrated square error) for a proper subset Λ, the result lacks a theoretical justification for using a smaller set. Note that, on the contrary, the constraint λ> 1 = 1 is necessary for the equality ISE(fˆλ ) = λ> Σλ to hold true. The next proposition establishes a rate of convergence in the case where the bandwidths hi used to build the experts fˆhi are deterministic and of the order hi  n−1/5 . The remaining assumption |γ̂ − γ| = op (n−2/5 ) is mild as the best known convergence for an estimator γ̂ is |γ̂ − γ| = Op (n−1/2 ), see for instance [7]. Proposition 3.2. Assume (HK ) and (Hf ). If the bandwidths hi are deterb are invertible and if |γ̂ − γ| = op (n−2/5 ), ministic with hi  n−1/5 , if Σ and Σ then ISE(fˆAV ) = ISE(fˆ∗ ) + Op (n−6/5 ). Proof. Under these assumptions, Theorem 2.1 applies, with the second order asymptotic expansion yielding C = Σ − A − γB = Op (n−6/5 ). In view of (12) and (13), providing a rate of convergence for ISE(fˆAV ) − ISE(fˆ∗ ) boils down to investigating |||CΣ−1 ||| and |γ̂ − γ|. Finally, observe that |||CΣ−1 ||| = Op (n−2/5 ), while |γ̂ − γ| is negligible in comparison by assumption. Remark 3.3. The result of Proposition 3.2 improves on the residual term O(n−1 ) obtained in [13]. The two settings are nonetheless different: • In [13], the initial estimators (so-called experts) are built from a training sample of size ntr , while the aggregation is performed on an independent validation sample of size nva , where n = ntr + nva ; • In our framework, both the initial estimators and the average estimator are built from the whole sample. 9 In fact, the authors in [13] have proven that conditionally to the training sample (making the experts built once and for all), their aggregation procedure −1 reaches the minimax rate O(n−1 va ), which is at best of the order O(n ). In our setting, the rate of the residual term is improved due to the initial kernel estimators contributing a factor Op (n−4/5 ), which is not possible with sample splitting. Remark 3.4. In presence of data-driven bandwidths, we are not aware of any result concerning the convergence rate of the remaining term C = Σ − A − γB in Equation (7). Nevertheless, by strengthening condition (6) and following the same arguments as in Proposition 2.2, we can hope to get the same rate of convergence as for deterministic bandwidths, thus generalizing Proposition 3.2 to data-driven bandwidths. 4 Simulations We consider the estimation of the following density functions, depicted in Figure 1: the standard normal distribution N (0, 1); the Gamma distribution with shape parameter 2 and scale parameter 1; the Cauchy distribution; the equiprobable mixture of N (−1.5, 1) and N (1.5, 1); and the mixture of N (−1.5, 1) with probability 0.7 and N (1.5, 1) with probability 0.3. Figure 1: Densitites functions considered in the numerical examples These densities are estimated by common data-driven density kernel estimators that are then combined by our method. For the sake of comparison with existing techniques, we implement the linear and convex aggregation methods considered in [13], which are the closest to our method in that they also use a quadratic loss function. 10 Specifically, based on a sample of n independent and identically distributed observations, we consider the kernel estimators with Gaussian kernel and data-driven bandwidths nrd0 (the Silverman’s rule of thumb), nrd (its variation with normalizing constant 1.06), and SJ (the plug-in approach of Sheater and Jones), following the default choices in the R software. The least-square cross-validation bandwidths (ucv and bcv in R) are deliberately not included because they approximate the same deterministic bandwidth h∗ as Sheater and Jones’ method, which would result in an asymptotically degenerated (non-invertible) matrix Σ. This has been confirmed by simulations (not displayed here), where the inclusion of these estimators did not improve the performances described below. The three kernel estimators have been then combined by our method, that is the average estimator (10), where γ̂ is estimated as in [7], specifically   n X Xi − Xj 1 L γ̂ = n(n − 1)α5 i,j=1 α with α = 4.29 iqr n−1/11 and L is a polynomial function on [−1, 1] given by L(x) = 135135 (−184756x10 +504900x8 −491400x6 +200200x4 −29700x2 +756). 16384 This choice for γ̂ is motivated by the optimal rate of convergence shown in [7], however further simulations (not displayed) showed that estimating γ by the alternative method of [8] led to the same performances. We also assessed convex averaging where, in addition, the weights λi are restricted to non-negative values. For comparison, we considered the aggregation procedure introduced in [13], whether it is based on their linear or their convex aggregation method. In their setting, the experts fˆhi are computed from a training sample of half size, independent from the remaining validation sample on which the weights λi are estimated. For robustness, it is advised in [13] to average different aggregation estimators obtained over multiple sample splittings. We followed this recommandation and we considered 10 independent splitting into two samples of the same size. Finally, in the same spirit, we have tested this splitting scheme for our average estimator (10), where the fˆhi ’s are obtained from the training sample and γ̂ from the validation sample. The mean integrated square errors of the aforementioned estimators are summarized in Table 1, depending on the sample size n. These errors are 11 n 50 Law Norm Gamma Cauchy Mix05 Mix03 100 Norm Gamma Cauchy Mix05 Mix03 200 Norm Gamma Cauchy Mix05 Mix03 500 Norm Gamma Cauchy Mix05 Mix03 1000 Norm Gamma Cauchy Mix05 Mix03 2000 Norm Gamma Cauchy Mix05 Mix03 nrd 1936 1822 1214 999 1086 1057 1129 748 634 669 628 701 462 391 398 310 388 232 210 223 183 231 145 126 132 111 146 84 79 77 nrd0 1737 1903 1289 1043 1145 957 1239 848 699 751 578 795 540 453 470 286 462 283 253 271 171 285 182 158 165 104 183 108 100 98 SJ 1902 1864 1233 1056 1155 1026 1146 756 677 703 616 705 454 409 406 299 370 220 209 218 177 216 133 120 125 106 132 76 73 72 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AV 1788 1897 1292 1239 1238 962 1153 775 796 728 568 701 452 474 395 276 367 208 223 199 163 211 121 120 108 99 130 66 68 59 AVsplit 1698 2088 1493 1397 1401 947 1305 906 922 852 556 772 531 559 467 274 411 240 258 222 163 240 138 138 117 98 147 73 74 61 RT 2480 2685 1778 1393 1582 1325 1615 1059 888 898 767 944 613 501 486 346 459 294 227 234 196 262 178 120 124 113 160 110 68 66 AVconv 1844 1841 1218 1063 1159 998 1135 750 705 717 597 696 454 452 412 292 369 221 240 222 174 215 134 134 127 105 132 76 79 72 RTconv 2030 2173 1452 1164 1267 1113 1376 938 772 823 660 839 585 492 510 321 459 293 264 282 191 272 181 159 164 114 167 101 95 92 Table 1: Estimated MISE (based on 103 replications) of the kernel estimators with bandwidths nrd, nrd0 or SJ (by default in R) and the combinations of these estimators by our method (AV), our method with sample splitting (AVsplit), the linear method in [13] (RT), our convex method (AVconv) and the convex method in [13] (RTconv). 12 approximated by the average over 103 replications of the integrated square errors, that in turn is deduced from a discretization of the integral in (1) over 200 points regularly spaced on the x-axis intervals shown in Figure 1, depending on the underlying distribution. Table 1 shows that our averaging procedure (10) (AV in the table) outperforms every single initial kernel estimators when the sample size is large (n ≥ 500) and the gain becomes very significant when n ≥ 1000. On the contrary, our averaging procedure is inefficient for small sample sizes (n = 50), which is probably explained by a poor use of the asymptotic expansion of Σ in this case. In fact, the convex averaging procedure (AVconv in the table) seems preferable for small n although it also fails to achieve the same efficiency as the best estimator in the initial collection. A transition seems to occur for moderate sample sizes between n = 100 and n = 200, where the results of the average estimator are comparable to the best kernel estimator. In all cases, our averaging procedure outperforms the alternative aggregation method of [13]. Finally, according to the numerical results, a splitting scheme for our method (AVsplit in the table) is not to be recommended, suggesting that all the available data should be used both for the initial estimators and for γ̂ in (10), which is in line with our theoretical findings. References [1] Cristina Butucea, Jean-François Delmas, Anne Dutfoy, Richard Fischer, et al. Optimal exponential bounds for aggregation of estimators for the kullback-leibler loss. Electronic Journal of Statistics, 11(1):2258–2294, 2017. [2] Olivier Catoni. The mixture approach to universal model selection. Technical report, Ecole normale supérieure, 1997. [3] Peter Hall. Limit theorems for stochastic measures of the accuracy of density estimators. Stochastic Processes and their Applications, 13(1):11–25, 1982. [4] Peter Hall and James Stephen Marron. Estimation of integrated squared density derivatives. Statistics & Probability Letters, 6(2):109–115, 1987. [5] Peter Hall and James Stephen Marron. Extent to which least-squares cross-validation minimises integrated square error in nonparametric den13 sity estimation. Probability Theory and Related Fields, 74(4):567–581, 1987. [6] Peter Hall and JS Marron. On the amount of noise inherent in bandwidth selection for a kernel density estimator. The Annals of Statistics, pages 163–181, 1987. [7] Peter Hall, Simon J Sheather, MC Jones, and James Stephen Marron. On optimal data-based bandwidth selection in kernel density estimation. Biometrika, 78(2):263–269, 1991. [8] M. C. Jones and S. J. Sheather. Using non-stochastic terms to advantage in kernel-based estimation of integrated squared density derivatives. Statistics & Probability Letters, 11(6):511–514, 1991. [9] M Chris Jones, James S Marron, and Simon J Sheather. A brief survey of bandwidth selection for density estimation. Journal of the American Statistical Association, 91(433):401–407, 1996. [10] Frédéric Lavancier and Paul Rochet. A general procedure to combine estimators. Computational Statistics & Data Analysis, 94:175–192, 2016. [11] Byeong U Park and James S Marron. Comparison of data-driven bandwidth selectors. Journal of the American Statistical Association, 85(409):66–72, 1990. [12] R Core Team. R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria, 2017. [13] Ph. Rigollet and A.B. Tsybakov. Linear and convex aggregation of density estimators. Mathematical Methods of Statistics, 16(3):260–280, 2007. [14] David W Scott and George R Terrell. Biased and unbiased crossvalidation in density estimation. Journal of the american Statistical association, 82(400):1131–1146, 1987. [15] Simon J. Sheather and Michael C. Jones. A reliable data-based bandwidth selection method for kernel density estimation. Journal of the Royal Statistical Society. Series B (Methodological), 53(3):683–690, 1991. 14 [16] B. W. Silverman. Density estimation for statistics and data analysis. Monographs on Statistics and Applied Probability. Chapman & Hall, London, 1986. [17] Yuhong Yang. Mixing strategies for density estimation. Ann. Statist., 28(1):75–87, 2000. 15
10math.ST
2018; 00:1–30 Systematic design methodology for development and flight testing of a variable pitch quadrotor biplane VTOL UAV for payload delivery Vishnu S. Chipade∗ , Abhishek † , Mangal Kothari ‡ and Rushikesh R. Chaudhari§ arXiv:1801.02938v1 [cs.SY] 7 Jan 2018 Department of Aerospace Engineering Indian Institute of Technology Kanpur, Kanpur, UP, India - 208016 Abstract This paper discusses the conceptual design and proof-of-concept flight demonstration of a novel variable pitch quadrotor biplane Unmanned Aerial Vehicle concept for payload delivery. The proposed design combines vertical takeoff and landing (VTOL), precise hover capabilities of a quadrotor helicopter and high range, endurance and high forward cruise speed characteristics of a fixed wing aircraft. The proposed UAV is designed for a mission requirement of carrying and delivering 6 kg payload to a destination at 16 km from the point of origin. First, the design of proprotors is carried out using a physics based modified Blade Element Momentum Theory (BEMT) analysis, which is validated using experimental data generated for the purpose. Proprotors have conflicting requirement for optimal hover and forward flight performance. Next, the biplane wings are designed using simple lifting line theory. The airframe design is followed by power plant selection and transmission design. Finally, weight estimation is carried out to complete the design process. The proprotor design with 24◦ preset angle and -24◦ twist is designed based on 70% weightage to forward flight and 30% weightage to hovering flight conditions. The operating RPM of the proprotors is reduced from 3200 during hover to 2000 during forward flight to ensure optimal performance during cruise flight. The estimated power consumption during forward flight mode is 64% less than that required for hover, establishing the benefit of this hybrid concept. A proof-of-concept scaled prototype is fabricated using commercial-off-the-shelf parts. A PID controller is developed and implemented on the PixHawk board to enable stable hovering flight and attitude tracking. Keywords Variable Pitch, Quadrotor Tailsitter UAV, UAV Design, Blade Element Theory, Payload Delivery Nomenclature A A, Aw at , dt bt bw B c, cw Cl , Cd Rotor disk area Aspect ratio of rotor and wing respectively Addendum and dedendum of gear respectively Gear face width Span of the wing Bevel gear Chord of the rotor and wing respectively 2D Coefficient of lift and drag respectively ∗ Graduate Student Assistant Professor, corresponding author ([email protected]) ‡ Assistant Professor § Graduate Student † 1 CD 0 CLcr , CLmax CT , CP CT h D E E, Ed ea , ep F FM Ft g K Kf , Km KF Kap , Kai , Kad Kpp , Kpi , Kpd Ko , Kv l, m, n L M M M 1, M 2 Nb P, Pind Pd PL r r, rd R S1, S2 Sw T T1 , T2 TR ui , w i UT , UP U vi V∞ , Vcr , Vstall W (x, y, z) (xd , yd , zd ) yr Y α β γ ηP θ λ, λi µ ξ, ξi ρ σ σb Φ (φ, θ, ψ) 2 Parasitic drag coefficient of the wing Lift coefficient during cruise and maximum lift coefficient Coefficient of thrust and power respectively Coefficient of thrust during hover Drag Engine gear Vector representing actual Euler angles and desired Euler angles respectively Error vector for Euler angles and position respectively Prandtl’s tip loss factor Figure of merit Load transmitted by gears Acceleration due to gravity Induced drag factor Factor for stress concentration effect and load distribution respectively Rotor force constant PID gains for attitude control PID gains for position control Factor for loading and dynamic loading respectively Total Moments about body fixed x, y, z axes Lift Mass of the vehicle Vector of moments acting on the vehicle Middle gears Number of blades Total power and induced power respectively Pitch circle diameter Power loading Non-dimensional radial position, = y/R Actual position and desired position vector of the vehicle Rotor blade radius Shaft gears Wing area Thrust Gear teeth ratio for gear 1 and 2 Taper ratio Induced swirl and axial velocity respectively Sectional in plane and out of plane velocity respectively Resultant Velocity Resultant induced velocity Free stream velocity, cruise velocity and stall velocity respectively Weight Position of the vehicle Desired position of the vehicle Distance along blade from rotational axis Lewis factor Angle of attack Ratio of span of biplane to that of monoplane tan−1 (Cd /Cl ) Propeller efficiency Blade pitch angle Out of plane velocity ratio and induced velocity ratio respectively Advance ratio In plane plane velocity ratio and induced velocity ratio respectively Air density bc solidity = NπR Maximum bending stress Inflow angle Euler angle representing attitude of the quadrotor 2018; 00:1–30 (φd , θd , ψd ) φ0 Ω AGMA VTOL UAV Desired Euler angle representing desired attitude of the quadrotor Pressure angle for gear Rotor angular velocity (rad/sec) American Gear Manufacturers Association Vertical Take-off Landing Unmanned Aerial Vehicle 1. Introduction With increased popularity of internet shopping, e-commerce sector faces a daunting task of delivering huge volumes of packages on time. The technological revolution in the area of Unmanned Aerial System has provided the sector a plausible solution that can not only deliver the packages on time but also to remote areas with difficult terrains. Amazon, Google, Alibaba and other e-commerce giants are already working on developing their own Unmanned Aerial Vehicle (UAV) solution with small payload capacity to cater to the “last mile”, as it can augment their profit by cutting labor cost. Apart from e-commerce sector, emergency health-care sector is also showing tremendous interest in UAVs with automatic payload delivery system, which can be used to deliver life saving drugs or blood over remote areas. Autonomous payload delivery requires the UAV to do precise hover at low altitude above ground and fly long distances efficiently, both of which have conflicting requirements. The rotary wing UAVs offer the ability to hover and vertical take-off and landing (VTOL), but are known to have less efficiency and speed than the fixed wing UAVs. Fixed wing UAVs have been used widely because of their simple design, high endurance, high range and high speed capability but are incapable of VTOL. Therefore, there is a need for hybrid design of UAVs that combine VTOL capabilities with high speed, range and endurance. The common hybrid VTOL concepts studied in literature include monoplane wing tail-sitter [1, 2], tiltrotor [3, 4], compound helicopter, quad tiltrotor [5], quad-tiltwing [6] concepts. The monoplane tail sitter concept has the simplest design, but suffers from poor control authority during hover due to use of one propeller. The transition from hover to forward flight and back is quite challenging in these vehicles. Mimicking the V-22 Osprey tiltrotor design in small sized UAVs is cumbersome as it requires use of swashplate for controlling the pitch angle of each of the rotors making it mechanically complicated and therefore is only suitable for larger sized UAVs such as that of [3]. The fixed pitch propeller based designs as that of [4] are easy to build but suffer from poor stability and control authority in pitch mode. Lift and thrust compounding results in high empty weight and therefore has not been attempted in 1–2 kg class small UAVs. The quad tiltrotor design has good control authority during hover and transition and its flight control is simpler than that for monoplane tail-sitter. But, the rotor wing interaction in hover and the aerodynamic interaction between fore and aft wings result in loss of efficiency. The interaction losses during hover for quad tiltrotor is addressed in the quad-tiltwing design of [6]. It has four rotors that are mounted on the four wings. The wings, together with the rotors, are tilted between vertical and horizontal configurations to accomplish vertical and horizontal flights. It hovers like a quadrotor and a flies like a tandem wing airplane in forward flight mode. However, the transition from hover to forward flight and back to hover offers significant challenges due to the flow separation on the wing operating at very angle of attack at the beginning of the transition. The convertiplane design of [7] offers a better compromise with part of the wing under the downwash of rotor tilting with it to eliminate hover losses. Also, since significant portion of the wing remains straight, it facilitates transition. Google X, a division of Google, developed and carried out field trials of a tailsitter aircraft with four fixed pitch propellers offset from the wing [8] to enable smooth transition from hover to forward flight and back. The objective was to develop a UAV solution for “last mile” delivery. After extensive testing the design was deemed unsuitable at maintaining its attitude during windy conditions due to lack of control power as the four propellers were quite close to each other and therefore had poor control authority. Amazon’s solution has been brute force and simple. Instead of focusing on efficiency, the focus is on simplicity to ensure that a working solution is achieved in least time. The design of Amazon Prime Air package delivery UAV prototype is a battery driven vehicle with four sets of coaxial contra-rotating propellers for vertical takeoff, hover and landing and tandem wings with pusher propeller for forward flight. The four coaxial propellers operate like that of a quadrotor with X-8 configuration to provide control during hover and transition and are possibly turned off during forward flight increasing the empty weight of the vehicle. A more efficient solution has been developed at University of Maryland, which is a quadrotor biplane MAV [10, 11, 12]. The design tries to overcome the mechanical complexity associated with tilting of rotors and wings in tiltrotor or tiltwing type hybrid concepts by making use of the maneuverability of the vehicle for transition. It consists of counter-rotating propellers arranged in a conventional quadrotor configuration, to which are attached two wings in biplane configuration. This design is expected to offer significantly higher control authority and can successfully transition from hover to forward flight and back to hover. This design offers better overall performance compared to some of the other options discussed above as it uses same set of propellers for hover and forward flight. However, being battery powered compromises its industrial usability. 2018; 00:1–30 3 The novel design of a quadrotor biplane Vertical Takeoff and Landing (VTOL) UAV proposed and designed in this paper aims at providing solution to several of the challenges discussed above. In this design, a variable pitch H-shaped quadrotor design is combined with two fixed wings attached to the parallel limbs of the quadrotor in biplane configuration similar to that of [10]. The key differences between the two designs are: 1) the use of variable pitch rotors instead of fixed pitch ones, which enables use of internal combustion (IC) engine as power plant, 2) significantly higher endurance, in comparison to battery powered solutions, due to use of fuel engine and 3) use of mechanical transmission to transfer power from engine to the rotors. The vehicle can take-off and land vertically and hover in helicopter mode before transitioning to fixed wing mode to fly with good fuel economy like a fixed wing UAV. The present design is based on the IC engine powered quadrotor work carried out by Abhishek et al. [13]. While, the use of variable pitch propeller and mechanical transmission adds complexity to a simple battery powered earlier design. The use of variable pitch rotors instead of fixed pitch ones offer the following advantages: 1. Higher control authority and control bandwidth than fixed pitch propeller due to higher rate of change of thrust and ability to generate negative thrust [14]. This would improve maneuverability and gust rejection capability. 2. The ability to use variable pitch enables the use of fuel engines whereby increasing the endurance dramatically. Gasoline has significantly higher energy density as compared to current Lithium Polymer batteries which are commonly used in UAVs. 3. Different rotor RPMs can be chosen for the rotor during hover and forward flight modes to optimize the rotor power consumption during hover and forward flight. 4. Use of fuel engine reduces turnaround time between flights as refueling is faster than charging batteries. Design of rotary wing UAVs is well established [15]. However, the design methodology followed for hybrid UAV systems is not fully understood. This paper describes the design, development and flight testing of this novel quadrotor biplane VTOL UAV which has not been studied in literature. The objective is to systematically carry out design of a novel UAV concept, followed by fabrication and flight testing of a scaled proof-of-concept prototype. In section 2, detailed description of the vehicle is given followed by a discussion of the design methodology in section 3. For this a physics based modified Blade Element Momentum Theory (BEMT) simulation is developed and validated using experimental data generated for the purpose. To initiate the vehicle design process, first, the proprotor is carefully designed using the above BEMT analysis as discussed in section 4. Section 5 details the wing design. The conceptual design of the UAV proprotor and wing is followed by selection of power plant described in section 6. The transmission mechanism required to transfer power from the engine to the rotors is discussed in section 7. Preliminary structural analysis is presented in section 8 followed by weight and center of gravity (cg) analysis in section 9. The avionics and telemetry system used are described in section 10. In section 11, the proof-of-concept prototype integration and flight testing is discussed and finally the paper is concluded in section 12. 2. Vehicle configuration The proposed design, a quadrotor biplane tailsitter concept, is a novel tailsitter concept comprising of four variable pitch rotors arranged in a quadrotor like arrangement and driven through a mechanical transmission using a single power plant with two fixed wings (in bi-plane configuration) attached to parallel limbs of the quadrotor as shown in Fig. 1. During entire duration of the flight, the wings remain parallel to the propeller axis and hence do not result in any download penalty due to rotor downwash hitting the rotors, commonly experienced by tilrotor type configurations. The payload can be mounted inside the fuselage of the vehicle which has been designed for this purpose. After gaining safe altitude in hover mode, the rotors would then maneuver and change its attitude from hover mode to forward flight (airplane) mode by generating differential thrust resulting in pitching moment about the center of gravity of the vehicle, required to transition the vehicle to fixed wing mode (forward flight mode) as shown in Fig. 1(b). The VTOL vehicle being designed, attempts to selectively incorporate the advantages offered by both the fixed wing and quadrotor type of vehicles, as it can take off, land vertically and hover at a point which is necessary requirement to deliver the payload safely to any destination. During the forward flight mode, it can fly efficiently without any dead weight and attain high speeds to cover large distances required for the last mile delivery. 2.1. Control strategy The primary control of various motions (three translational, roll and pitch motions) in the design is achieved by changing the thrust and torque of different rotors in various combinations during the hover as well as forward flight modes. In the hover mode, the flight control is identical to the control of quadrotor helicopter with fixed pitch, however the mechanisms of thrust variation are different for the two. The change in thrust for the present design is achieved by changing the blade pitch angle. The control of yawing motion and the mechanism involved is significantly different as discussed below. 4 2018; 00:1–30 (a) Hover (b) Forward flight Figure 1. Hover and forward flight modes of the quadrotor tailsitter UAV prototype The up/down motion is easily controlled by collectively increasing or decreasing the blade pitch angle for all the rotors simultaneously. Sideways flight can be achieved as explained in Fig. 2. For example, to move right, the collective inputs of the left rotors are increased and the inputs to right rotors are decreased by same amount, and thereby increasing the thrust of the two left rotors which lifts the left side up and generates a net thrust component to the right. In similar way, the vehicle can be moved to left. By the same principle, increase in collective of the two rear rotors would result in forward flight and increase in collective of the two front rotors would result in backward motion. The yaw control is less intuitive. The method of generating yawing moment is identical to that used for coaxial and tandem helicopters. It is known as “differential collective”. In this, the collective pitch of the two diagonal rotors rotating in the same direction is increased and that of the other two is decreased by same amount. The change of collective pitch results in increase of lift and drag experienced by both these rotors compared to the other two rotors. This increase in lift and drag results an increase in profile and induced torque components of these rotors compared to the other two rotors. This increment in the torque value results in yawing motion of the quadrotor as explained in Fig. 3. It is important, as explained earlier, to note that because of the diagonal arrangement, this operation has no effect on translational motion. 2018; 00:1–30 5 Figure 2. Control strategy for sideways motion Figure 3. Control strategy for yaw motion The roll, pitch and yaw motions in forward flight mode can be controlled by using the same set of controls that are used for flight control during hovering flight. It should be noted that, after the vehicle maneuvers into the forward flight mode, the yaw and roll degree of freedom during hovering flight becomes the roll and yaw degree of freedom respectively. The pitch motion during hover remains the pitch motion during forward flight. And the flight control for various motions can be achieved as explained earlier. In addition, the pitching moment contribution from the wings can be compensated by differential thrust generation by the top and bottom rotors, during forward flight. The rotor RPM in forward flight mode is reduced from that in the hover mode as the thrust requirements are significantly reduced in forward flight. The entire weight of the vehicle is supported using the thrust from the four rotors during hover, hence the rotors need to operate at a higher RPM as the thrust requirement from each rotor is higher. However, during the forward flight, thrust is required only to overcome the drag of the vehicle which is significantly smaller than the weight of the vehicle. Therefore, the rotor RPM is reduced in forward flight mode to save power. This observation would be elucidated later in text. Since, the vehicle doesn’t have a tail and sits on the biplane wings during take-off and landing, four landing gears shaped like small vertical fins are attached at the trailing edge of the wings as shown in Fig. 1. These vertical fins provide rigid support for the vehicle to land on the ground and also act as vertical fin during forward flight to augment the yaw damping of the vehicle. 3. Approach The design methodology for hybrid UAVs is established by carrying out the design of a hybrid tailsitter UAV with the following mission objectives: • Payload: 6 kg • Range: 32 km 6 2018; 00:1–30 • Cruising height: 500 m above sea level • Cruising speed: 20 m/s • Compact vehicle These mission objectives have been decided based on the request for proposal of 32nd American Helicopter Society student design competition [16] for a payload delivery UAV. The complete design and development of the tailsitter vehicle is carried out in various steps. First, the preliminary sizing of the proprotors is carried out. Essentially, proprotors need to perform optimally in both hover as well as forward flight modes. The proprotor sizing and design is carried out by using a modified blade element momentum theory (BEMT) specifically formulated for propellers and proprotors [17]. The analysis developed for this purpose is used to study the effect of varying different design parameters such as blade taper, aspect ratio (solidity), twist, radius and tip speed on the rotor performance during hover as well as forward flight. This modified BEMT differs from the conventional BEMT [18] in the following respects: 1) It doesn’t have the small inflow angle assumption, 2) It includes the in plane or swirl velocity component, 3) Prandtl’s tip loss function is modified according to large inflow angles. The predictions from the above modified BEMT analysis is first validated using measured thrust and torque data for a variable pitch rotor. A hover test stand with variable pitch rotor head is setup for this purpose and is shown in Fig. 4. The experimental setup consists of a six component load cell mounted on hover test stand with a variable pitch rotor system mounted on top of it. Figure 4. Experimental setup used for thrust and torque measurements Next, the airfoil selection is carried out for the proprotor system. Once, the airfoil is chosen, the proprotors are sized for radius, chord, twist, taper, number of blades, tip speed etc. based on the performance requirements for both hover and forward flight. The preliminary calculations are carried out based on a nominal weight of approximately 16 kg, which is later on updated as the actual weight of the final design is arrived through detailed weight estimation using CAD drawing. Next, the aerodynamic design of the biplane wing is carried out to meet the established performance indices. This involves wing loading selection, airfoil selection, planform sizing, material selection. After the rotor and wings have been sized the estimated performance indices allow for the selection of the off-the-shelf power plant. Once, the power plant is selected, the transmission system and the variable pitch mechanisms are designed in detail. After the aerodynamic design is completed, preliminary structural analysis is carried out using off the shelf FEM tools to analyze the factor of safety available with the aircraft. The weight estimation and centre of gravity locations are also found out by using CAD software. The estimated weight is used to iterate over the entire design process till a convergence is achieved. Once the design process is completed, the fabrication of the prototype is carried out for a scaled model using appropriate material described later in text. Finally, a simple proportional-integral-derivative (PID) based attitude controller is developed for the variable pitch quad-rotor system and used to stabilize the vehicle in hovering flight. It is implemented on a PixHawk autopilot board to demonstrate stable hovering flight for the scaled prototype. The control design for transition and forward flight would be carried out in future work. 2018; 00:1–30 7 3.1. Modified Blade Element Theory (BET) The modified blade element momentum theory (BEMT), described in this section, has been specifically formulated for propellers and proprotors by Stahlhut [17]. It is used to analyze the effect of various rotor design parameters such as taper, aspect ratio (solidity for constant radius), twist, radius and tip speed on its performance as a helicopter rotor and propeller. The modified BEMT differs from the conventional BEMT [18] in the following respects: 1) the small inflow angle assumption is not made, 2) in-plane or swirl velocity component is included in the definition of inflow angle, and 3) Prandtl’s tip loss function is modified for large inflow angles. Figure 5. Velocity components that the blade sections are experiencing Figure 5 shows the schematic of a rotor blade and an element therein. The inflow angle Φ, at each blade section, depends on both the wi and ui components of the induced velocity. For a proprotor in high advance ratio forward flight, the inflow angles can be large, often exceeding 45◦ near the blade tips. Therefore, the lift vector on the blade sections may induce flow velocities in the in-plane direction that may be greater than the induced inflow component, therefore, both the thrust and torque component are considered for estimating the induced flow-field. Using the blade element theory, the infinitesimal thrust coefficient generated by a blade element is given by: dCT = Nb (dLcos(Φ) − dDsin(Φ)) dT = ρA(ΩR)2 ρA(ΩR)2 Nb ( 21 ρU 2 c)(Cl cos(Φ) − Cd sin(Φ))dyr ρA(ΩR)2 p Nb ( 12 ρc UT2 + UP2 )(Cl UT − Cd UP )d( yRr ) dCT = ρA(ΩR)2 dCT = 8 (1) (2) (3) 2018; 00:1–30 dCT = where inflow ratio λ = Similarly, (V∞ +wi ) ΩR 1 p 2 σ ξ + λ2 (Cl ξ − Cd λ)dr 2 and azimuthal flow ratio ξ = dCP = (4) (Ωyr −ui ) ΩR Nb (dLsin(Φ) + dDcos(Φ))Ωyr dP = ρA(ΩR)3 ρA(ΩR)3 1 p 2 σ ξ + λ2 )(Cl λ + Cd ξ)rdr 2 The elemental thrust and power coefficients estimated from Momentum theory for a rotor annulus are given by: dCP = (5) (6) dCT = 4|λ|λi rdr (7) dCP = 4|λ|ξi r2 dr (8) 3.1.1. Tip loss effect It is necessary to account for tip-loss effects because only some of the induced flow arises from momentum conservation, the remaining part is because of the tip vortices. Goldstein [19] established a method for tip-loss by using the velocity potential of a series of helical vortex sheets in the rotor wake. A simplified version of the Goldstein result was first developed by Prandtl, who approximated the helical surface as a series of two-dimensional planar sheets that convect at the slipstream velocity, which is a more practical mathematical realization of Goldstein’s approach [20]. Prandtl’s tip loss factor is given by: Nb (r − 1) 2 )] (9) F = cos−1 [exp( 2 π 2rsin(Φ) This tip loss factor is incorporated in the momentum theory using Kutta-Joukowski theorem dCT = 4F |λ|λi rdr (10) dCP = 4F |λ|ξi r2 dr (11) Because of the inviscid flow assumption, equation 10 is only strictly valid when Φ = 00 and equation 11 is only valid when Φ = 900 . At Φ = 900 for dCT and Φ = 00 for dCP , the tip vortices do not contribute to the induced velocities wi and ui . So, in order for these result to match with the expected physical behaviour, the decrease in thrust and power after tip loss i.e dCT = 4(1 − F )|λ|λi rdr and dCP = 4(1 − F )|λ|ξi r2 dr should gradually decrease to zero as the angles decrease between the tip vortex axes and the blade force vectors. For incorporating this, the theory is modified as follows. dCT = 4KT |λ|λi rdr 2 dCP = 4KP |λ|ξi r dr (12) (13) Where KT = 1 − (1 − F )cos(Φ) and KP = 1 − (1 − F )sin(Φ) Now to solve for the unknown inflow and swirl components, the thrust and power expressions from blade element and momentum theory are equated. dCT = 4KT |λ|λi rdr = 1 p 2 σ ξ + λ2 )(Cl ξ − Cd λ)dr 2 (14) 1 p 2 (15) σ ξ + λ2 )(Cl λ + Cd ξ)rdr 2 These two equations can be solved simultaneously for λ and ξ using fixed point iteration or any other method. But a different approach, which combines these two equations into a single equation, as shown in [21], and solves for inflow using bracketed bisection method, is used here because of the guaranteed solution that this method gives. Replacing λ = U sin(Φ) and ξ = U cos(Φ) and defining tan(γ) = Cd /Cl and putting in equation 14, we get, ΩR ΩR dCP = 4KP |λ|ξi r2 dr = 1 σU 2 Cl sec(γ)(cosγcosΦ − sinγsinΦ) = 4KT U sin(|Φ|)wi r 2 We know wi = U sin(Φ − V∞ ) U 2 Cl sec(γ)cos(Φ + γ) = U sin(Φ) − V∞ 8KT U sin(|Φ|)r 2018; 00:1–30 (16) (17) 9 Let us define, B1 (Φ) = σCl sec(γ)cos(Φ + γ) V∞ = sin(Φ) − U 8KT sin(|Φ|)r (18) σCl sec(γ)sin(Φ + γ) Ωy = cos(Φ) + U 8KP sin(|Φ|)r (19) Similarly, using equation 15 we get, B2 (Φ) = These two equations can be combined to get a single equation g(Φ) = [B1 (Φ)Ωy − B2 (Φ)V∞ ]sinΦ = 0 g(Φ) = [ΩysinΦ − V∞ cosΦ]sinΦ − sgn(Φ) (20) σCl secγ V∞ Ωy [ sin(Φ + γ) + cos(Φ + γ)] r KP KT (21) Equation 21 has Φ as the only unknown. It can be solved by using bisection method by having proper range for solution of inflow angle Φ. 3.1.2. Experimental validation of modified BEMT Modified BEMT is validated with experimental results for an untwisted rectangular rotor with variable pitch and a fixed pitch twisted propeller. The validated analysis is then used for performance predictions of various rotor configurations for design study. Aerodynamic performance characteristics of a rectangular blade (radius = 0.3325 m, chord = 0.32 cm, max t/c=12%) with symmetric airfoil (NACA0012) is measured experimentally and also predicted using BEMT. The experimental and predicted values of thrust and power, using BEMT, for different blade pitch angles for two different rotor RPMs are plotted in Fig. 6. The predictions from the current analysis show satisfactory correlation with the experimental results. The modified BEMT analysis is also validated for a fixed pitch propeller tested by Shastry [22]. The pitch and chord variation along the radius for the propeller (with radius of 14 cm) are approximated by equation 22. θ(y) = 0.0009159y 5 − 0.04202y 4 + 0.742y 3 − 6.151y 2 + 21.24y + 0.1216 (22) c(y) = −0.001067 ∗ y 3 − 0.02944 ∗ y 2 + 0.6259 ∗ y + 0.5392 The experimental thrust and power data for the propeller at different rotational speeds is taken from [22]. As shown in Fig. 7, the thrust and power predicted from the current modified BEMT analysis show excellent correlation with the experimental results. Therefore, the modified BEMT analysis developed can be used for the preliminary design of the proprotor with confidence. Thrust vs Pitch 14 12 Experimental (1500 RPM) Prediction (1500 RPM) Experimental (1200 RPM) Prediction (1200 RPM) 80 60 8 Power, W Thrust, N 10 Power vs Pitch 100 Experimental (1500 RPM) Prediction (1500 RPM) Experimental (1200 RPM) Prediction (1200 RPM) 6 4 40 20 2 0 0 -2 2 4 6 8 10 Blade Pitch, θ (deg) (a) Thrust validation 12 14 16 -20 2 4 6 8 10 12 14 16 Blade Pitch, θ (deg) (b) Power validation Figure 6. Experimental validation of present analysis for untwisted helicopter rotor blade with variable collective pitch input 10 2018; 00:1–30 100 8 Prediction Experimental 80 6 Power (in W) Thrust (in N) 7 Prediction Experimental 5 4 60 40 3 20 2 0 1 3000 4000 5000 3000 6000 4000 5000 6000 RPM RPM (a) Thrust validation (b) Power validation Figure 7. Experimental Validation of present analysis for a twisted fixed pitch propeller 4. Rotor design The design of proprotor is carried out with the objective of extracting optimal performance in both hover and forward flight modes. In hover, the proprotors provide thrust to support the weight of the vehicle (plus any airframe download) and for this, generous blade area and higher tip speed is desirable. In cruise / forward flight mode, the thrust generated by the rotors has to overcome the aircraft drag only which is a fraction of the vehicle weight. To ensure good propulsive efficiency, the profile losses need to be reduced, which hints at the use of smaller blade area and lower tip speed in cruise mode. This is in contradiction with the requirements for hover. In this section, the influence of various rotor design parameters on hover efficiency and propulsive efficiency is assessed. In the rest of this paper, hover efficiency is assessed either by power ideal power or by figure of merit F M = actual and propulsive efficiency of the rotor is loading which is given as P L = Thrust Power power compared by using propeller efficiency defined as ηp = CCTPµ . Typically the payload ratio of rotary wing vehicles is around 3-4. For a payload of 6 kg, the assumption of useful load fraction of 0.3 results in approximate gross take-off weight of 20 kg. This requires that each proprotor should produce at least 50 N thrust. 120 100 Thrust (N) 80 60 40 20 0 0 5 10 15 20 Pitch angle, θ (deg) Figure 8. Predicted thrust vs. blade pitch angle for baseline rotor {θtw = 0◦ , θpre = 0◦ , R = .42m, RP M = 3200, A = 10} 2018; 00:1–30 11 4.1. Baseline configuration selection The baseline rotor configuration is chosen to initiate the design process. A disc loading of 90 N/m2 (1.88 lb/ft2 ) is chosen, which has been reported to be reasonable for small UAVs [23]. This results in a radius of approximately 0.42 m for the desired thrust of 50 N. The tip speed is chosen to be 140 m/s which corresponds to Mach number of 0.412 and rotor RPM of 3200. The variation of predicted thrust, using the BEMT analysis validated earlier, for a two bladed rotor with rectangular untwisted blade (selected as baseline) with radius 0.42 m and aspect ratio 10 (chord = 0.042 m) is shown in Fig. 8. The blade airfoil is assumed to be symmetric. It can be observed that the baseline rotor selected is capable of generating 50 N thrust at a pitch angle of 8.5◦ justifying the choices made. The number of blades is kept at two which is known to be reasonable for small rotors with low disc loading. Typical to prop-rotor design, the rotor blades are given a preset angle at the point of its attachment to the hub. This is done to allow for high negative linear twist used in most prop-rotors to prevent the blades from stall under forward flight condition. To begin with the preset angle (θpre ) is set to 0◦ for the untwisted baseline blades. Therefore, for a given collective pitch input of θ0 , the blade pitch angle at any spanwise location (r) is given as: θ = θ0 + θpre + θtw r. It is common practise to use the blade preset angle equal to the magnitude of the negative linear twist angle of the blade. This ensures that the blade pitch angle applied directly defines the pitch angle seen by the blade tip. 4.2. Airfoil selection Airfoil with high Cl /Cd , high Clα , low Cmα , and high stall angle are desirable for the proprotor, as such an airfoil would minimize the power requirement of the proprotor. There are several airfoils designed for propellers such as Onera Series HOR 07, 12, 20; EPPLER series E850 to E858; HS1 family HS1404, 30, HS1606, 20 etc. [24] which give satisfactory propulsive efficiency for the propellers. Similarly, airfoils designed for helicopter blade such as EPPLER 360, 361; NPL 9615, 26, 27, 60; Onera series OA206, 09, 12, 13; NASA RC 08,08(N)1, 10-64C, 10(N)1; Sikorsky SC 1094r8, 1095, 1095r8; Boeing-Vertol series VR12 to VR15 etc. [24] are known to perform well for hovering and edgewise flight of helicopter rotors. For proprotors, airfoils optimized both for hovering as well as high forward speed are needed. Generally, proprotors have multiple airfoils along its span. Because of the inherent high twist that is present in proprotors (reason for which will be discussed later), the root sections operate at very high pitch angles causing the root sections to stall. Therefore, use of thicker airfoil sections with higher stall angles near the proprotor root would maximize hover efficiency. Near the tip, significantly thinner airfoil sections are preferred to reduce the profile power loss, while maximizing figure of merit would require relatively thicker airfoil. The authors in [17] have reported that for medium-lift tiltrotor, optimizing airfoil section for forward flight has adverse effects on the hover performance. However, optimizing airfoil sections for weighted compromise between hover and forward flight results in only marginal gain in comparison to the results obtained for purely hover based optimization. Compromised optimization becomes a concern only at high altitudes where higher Clmax values are needed to prevent stall near the blade tip. The kind of UAV which is being designed here is not meant to fly at very high altitudes. Therefore, airfoil design and optimization for maximum hover efficiency can give better overall performance without really going into weighted compromised optimization. At the preliminary design stage, which is the focus of the current paper, detailed airfoil optimization is not considered. Instead, a popular helicopter airfoil SC1095, the experimental data for which are available in public domain [25, 26], is used for proprotor design and analysis. 4.3. Aspect ratio The effect of changing the aspect ratio of the blade is studied by changing the chord of the blade while keeping the radius constant. Using the modified BEMT analysis, the effect of varying aspect ratio (i.e. rotor solidity for constant radius) during hover is studied as shown in Fig. 9. As expected, an increase in aspect ratio (A) results in increase in power loading (P L = Thrust/Power) for hover condition. However, reduction of chord length reduces blade area, thereby decreasing the maximum thrust generated by the rotor. For the desired thrust requirement of more than 50 N, A of 12 appears to be an acceptable compromise between highest power loading and maximum thrust output. Therefore, aspect ratio of 12 is chosen for the current blade design. 4.4. Blade taper It is known that use of some planform taper for the rotor blade has beneficial effect on hovering rotor performance. This is due to the fact that taper enables the rotor to operate close to maximum Cl /Cd [18]. Therefore, linear taper is incorporated chord in the BEMT analysis to study its effect on performance of the rotor by using taper ratio, which is defined as T R = root . tip chord Effect of varying the blade taper ratio, while keeping radius and other parameters same, is shown in Fig. 10. As observed, the power loading (P L) required for hovering flight increases with increasing taper ratio in the range of 20 to 60 N thrust output. However, the maximum thrust output also decreases with increase in taper, due to decrease in the blade area. During the hovering flight condition, the linear taper of 5:3 seems to be a good compromise for generating high thrust (100 N) and moderately high power loading. Hence, the linear taper of 5:3 is chosen for the current design. 12 2018; 00:1–30 AR=8 AR=10 AR=12 AR=14 AR=16 0.08 0.06 0.04 0.02 0.12 Power loading, PL(N/W) Power loading, PL(N/W) 0.1 TR=1:1 TR=5:4 TR=5:3 TR=5:2 TR=5:1 0.1 0.08 0.06 0.04 0.02 0 50 100 Thrust, T(N) 150 200 0 20 40 60 80 100 120 Thrust, T(N) Figure 9. Effect of aspect ratio (A) on power loading {θtw = Figure 10. Effect of taper ratio (TR) on power loading {θtw = 0◦ , θpre = 0◦ , R = .42m, RP M = 3200, no taper } 0◦ , θpre = 0◦ , R = .42m, RP M = 3200, A = 12} 4.5. Blade twist The rotor blade twist is a critical parameter for improving the proprotor performance during hover as well as forward flight condition. The effect of varying twist on hover and forward fight performance is studied carefully to bracket the range of values suitable for hover and forward flight. The final value of twist is determined by optimizing the performance within the bracketed range. As discussed earlier, the preset angle at the blade root is set to be equal to the absolute value of the negative rate of twist to ensure that the tip of the blade has same pitch angle for all cases. The variation of predicted power loading with thrust for different values of blade twist is shown in Fig. 11(a). The hover performance, as measured by power loading for the desired thrust of more than 50 N, starts to degrade beyond the twist angle of −15◦ . Therefore, twist rate greater than −15◦ is less desirable for achieving good hover efficiency. This is due to the fact that with higher twist the blade has to operate at higher pitch input to generate same value of thrust which causes the inboard region to stall early, which increases the profile power resulting in a decrease in power loading. On the other hand, during forward flight, the proprotor experiences very high inflow angles near the root and the inflow angle decreases along the span. For this reason, a blade with high value of negative blade twist is preferred so that almost every section of the blade operates at optimum lift coefficient. This results in redistribution of the lift and reduces the induced power. The variation of the efficiency of the proprotor is shown in Fig. 11(b). The optimum propeller efficiency and corresponding speed increase with increase in twist implying that the vehicle can fly faster and with higher efficiency with highly twisted blades. This observation is confirmed for two different blade pitch inputs of 5◦ and 10◦ in Figs. 11(b) and 11(c). It is further observed that at a given twist, an increase in blade pitch input also increases the maximum efficiency and the corresponding speed. Having higher twist also allows optimal performance for wider range of speeds around the desired cruise speed and hence higher twist angle is desirable during forward flight. In summary, a twist between −10◦ to −15◦ is desirable for best hover performance while twist between −35◦ to −45◦ is desirable for higher propeller efficiency. Because of the conflicting requirements, the blade twist is chosen as a compromise between hover and forward efficiency by manual optimization (discussed later) in which more weightage is given to efficiency in forward flight because the vehicle would be spending a significant amount of its mission time in forward flight mode. 4.6. Rotational speed (RPM) For a given total power available, the rotor torque is inversely proportional to the rotational speed being used. Hence, high rotor speed is desirable as it reduces the weight penalty associated with a heavier transmission system required for higher torque requirements. However, with increase in rotational speed, profile power increases due to compressibility effect and rotor noise also increase. During forward flight, the thrust required to overcome vehicle drag is less than that required to balance the weight of the vehicle during hovering flight. Therefore, the power required dueing forward flight is significantly less, and it may be advantageous to operate the proprotor at reduced RPM during forward flight. Figure 12 shows the effect of changing RPM on propeller efficiency during forward flight mode. It was established in the previous section that the effect of twist variation for optimal performance lies between −10◦ to −40◦ , therefore a nominal value of −30◦ twist and preset angle of 30◦ is assumed for the comparison. It is observed that, for the forward speeds in the viscinity of cruise speed (Vcr ) of 20 m/s, the proprotor has highest efficiency for 2000 RPM. The propeller efficiency at 3200 RPM is 0.6079 and that at 2000 RPM is 0.7733 which gives approximately 27% increase in efficiency due to reduction in proprotor RPM. 2018; 00:1–30 13 θ tw = -5 0 0.09 θ tw = -15 0 0.6 θ tw = -15 0 θ tw = -20 0 0.08 θ tw = -25 0.07 θ tw = -5 0 0.7 θ tw = -10 0 Propeller efficiency, ηP Power loading, PL(N/W) 0.1 0 0.06 0.05 θ tw = -25 0 θ tw = -35 0.5 0 θ tw = -45 0 0.4 0.3 0.2 0.1 0.04 0 0.03 0 20 40 60 80 100 0 120 5 10 15 20 25 30 35 Forward speed, V∞ (m/s) Thrust, T(N) (a) Power loading vs. thrust {θpre = −θtw , R = .42m, RP M = (b) Propeller efficiency vs. forward speed {θpre = −θtw , R = .42m, RP M = 3200, A = 12, T R = 5 : 3, θ0 = 5◦ } 3200, A = 12, T R = 5 : 3} Propeller efficiency, η P 0.8 0.6 0.4 θ θ tw tw = -5 0 = -15 0 θ tw = -25 0 0.2 θ tw = -35 θ tw 0 = -45 0 0 0 10 20 Forward speed, V 30 ∞ 40 (m/s) Propeller Efficiency vs. forward speed {θpre = −θtw , R = .42m, RP M = 3200, A = 12, T R = 5 : 3, θ0 = 10◦ } (c) Figure 11. Effect of twist on hover and forward flight performance of the prop-rotor Propeller efficiency, ηP 0.8 Ω=3600 Ω=3200 Ω=2800 Ω=2400 Ω=2000 Ω=1600 0.6 0.4 0.2 0 0 10 20 30 40 Forward speed, V∞ (m/s) Figure 12. Effect of RPM on the propeller efficiency {θtw = −30◦ , θpre = 30◦ , R = .42m, T R = 5 : 3, A = 12, θ0 = 16◦ } Therefore, the operating rotor RPM during forward flight mode is set to 2000 to ensure high propeller efficiency. This is possibly due to reduction in profile power with reduced RPM. 14 2018; 00:1–30 0.55 0.8 0.7 0.6 0.45 0.5 0.4 0.4 0.3 0.35 0.2 0.3 0.1 0.25 0 -40 -30 -20 0.5 0.7 Blade Radius (m) 0.5 Blade Radius (m) 0.55 0.8 0.45 0.6 0.5 0.4 0.4 0.35 0.3 0.2 0.3 0.1 0.25 -10 0 -40 -30 -20 -10 Blade twist rate (deg) Blade twist rate (deg) (a) Figure of merit (FM) (b) Propeller efficiency (ηp for cruise velocity) 0.55 0.7 Blade Radius (m) 0.5 0.6 0.45 0.5 0.4 0.4 0.3 0.35 0.2 0.3 0.1 0.25 0 -40 -30 -20 -10 Blade twist rate (deg) (c) Combined performance cost function Figure 13. Manual optimization of UAV performance cost function for radius and twist 4.7. Optimization In the previous sections, the aspect ratio, taper ratio and the RPM for the two operational modes of the UAV being designed have been selected. It was noted that the blade twist requirements for the hover and forward flight modes are contradictory in nature. In the current section, manual optimization is carried out to maximize a simple performance cost function defined as cost = 0.3F M + 0.7ηp , for the aircraft by varying the blade twist and rotor radius. The cost function defined uses nondimensional parameters figure of merit (FM) as an index of hover efficiency and propeller efficiency (ηp ) as an index of forward flight efficiency. Based on the typical mission envisioned for the UAV, 30% weightage is been given to efficient hovering capability and 70% weightage is given to forward flight performance. This is based on the assumption that the objective of door-to-door package delivery would require the vehicle to spend significant amount of flight time (70% to 80%) in forward flight mode and approximately 20% to 30% of time in hovering mode to perform precise delivery of payload. It should be noted that figure of merit has its usual meaning which is defined as the ratio of ideal power for the proprotor in hover obtained from momentum theory and the actual power estimated using the modified BEMT. To optimize the performance, the blade twist angle is varied from −45◦ to −8◦ (with an interval of 1◦ ) and rotor radius is varied from 0.26 m to 0.53 m (with an interval of 0.01 m) and the figure of merit, propeller efficiency and combined performance cost function are plotted as shown in Fig. 13. Figures 13(a) and 13(b) reiterate the contradictory nature of the requirements for optimal hover and forward flight performance. Moderate radius and low twist angle seems to give best hover efficiency, while low rotor radius and high twist are desirable for high propeller efficiency. The combined cost function variation is shown in Fig. 13(c) which is a weighted combination of Figs. 13(a) and 13(b). Based on these calculations, an optimal radius of 0.38 m and blade twist of −24◦ are chosen which maximizes the cost function for the range of speeds considered. Table I shows the finalized design parameters for the proprotor obtained by optimizing the defiend cost function. 2018; 00:1–30 15 Table I. Proprotor design parameters Parameter Value Aspect ratio Blade taper ratio Blade radius Root chord Tip chord Blade twist Blade preset angle Rotor RPM (hover) Rotor RPM (forward flight) 12 5:3 0.38 m 0.0475 m 0.0285 m −24◦ 24◦ 3200 2000 5. Wing design As discussed in section II, the proposed vehicle has two wings in biplane configuration. In this section, the detailed design of the wing is discussed along with the justification for selecting the biplane configuration over conventional monoplane design. 5.1. Wing configuration selection The mission profile of the VTOL UAV being designed requires it to deliver packages in urban canyons with cluttered space. Therefore, the compactness is a desirable feature in the vehicle design. It also ensures easy stowage in warehouses. It is easy to notice that for a given chord, monoplane configuration needs larger span when compared to the biplane design for same wing area. This can be assessed using a simplified analysis based on classical lifting line theory with elliptic lift distribution [28]. Consider a monoplane and a biplane, having rectangular planform, with same total wing area and span of biplane span ratio, β, defined as β = span . For a given β and same total wing area, the span and chord of monoplane of monoplane (bwm , cwm ) and biplane (bwb , cwb ) are related as follows bwb = βbwm cw cwb = m 2β (23) Induced power for monoplane and biplane is calculated using the following equation, Pind = 1 3 ρVcr Sw KCL2 cr 2 (24) . For simplicity, it is assumed that wings operate independent of each other in biplane where K = π(A1w )e and Aw = cbw w configuration. Figure 14 shows normalized induced power variation for different span ratios defined above. Normalized induced power is the ratio of induced power for biplane to that for monoplane. From this simple analysis, it is observed that in biplane configuration the span can be reduced by up to 30% of the span in monoplane design with the added benefit of requiring less induced power compared to monoplane case. It is known that biplane configuration makes the vehicle structurally more robust and agile [29]. In the current design, the biplane wing also serves the purpose of landing gear. Because of all these benefits, biplane configuration is chosen. For the preliminary design, it is assumed that both the wings behave independent of each other and each wing contributes towards supporting the half of the vehicle weight. Although in practice because of interference between the two wings, the reduction in induced power, in case of biplane, is less than predicted theoretically. For the same span and same area, the biplane should require 50% less induced power than monoplane. But, due to mutual interference between the wings the reduction in power is around 30% instead of 50% [29]. As shown in [35], biplane wings with separation greater than 1.5 times the chord generates approximately 90% of the lift produced by the monoplane with the same total wing area. Based on this, in the current design approach, wing parameters are initially chosen corresponding to monoplane configuration and the span ratio of 0.8 (see Fig. 14) is used to obtain the corresponding span for biplane design to match the induced power of the monoplane configuration. Once, the span is decided, other wing parameters for biplane configuration are obtained to meet the requirement for wing lift. 5.2. Wing loading   Wing loading SWw , defined as the ratio of weight of the vehicle divided by the total wing area, affects stall speed, cruise performance and gust tolerance of the vehicle. Since the proposed vehicle can takeoff and land vertically, the constraints 16 2018; 00:1–30 Normalized Induced Power 3.5 Monoplane Biplane 3 2.5 2 1.5 1 0.5 0 0 0.2 0.4 0.6 0.8 1 Span ratio, β Figure 14. Comparison of power for monoplane and biplane with same total wing area on the wing loading enforced by takeoff and landing distances are not relevant. To choose wing loading, power variation with wing loading is plotted for different aspect ratios as shown in Fig. 15. The power is calculated based on the simplified expression shown in Eq. 25. The calculations are performed based on the following typical values for fixed wing UAVs of this category taken from [32]: drag coefficient, CD0 of 0.025; stall speed, Vstall of 12 m/s; oswald efficiency, e of 0.8; maximum lift coefficient, CLmax of 1.5. P = ( SW ) 1 3 W ρVcr CD0 W + 2KW w 2 ρVcr (S ) (25) w   1 2 (26) ρVstall CLmax 2 stall   The critical wing loading corresponding to stall speed, SWw , calculated using Eq. 26, is also shown in Fig. 15. W Sw = stall This value comes out to be around 122 N/m2 . With larger aspect ratios, the optimum wing loading increases and the power requirement reduces. But, this also increases stall speed and the weight because of the extra structural strength required to support the corresponding high aspect ratio wings. Typically the wing loadings of the UAVs of this class, such as ScanEagle, expedition II, Sky Crossbow etc., range from 100 to 170 N/m2 . Considering all these factors, wing loading of 130 N/m2 is chosen. 5.3. Airfoil selection Airfoils with moderate or high camber generate very high lift and typically have high lift to drag ratio. But, high lift comes with high nose down pitching moment [29, 31]. For the preliminary analysis, 2D airfoil data available from [27] is used for comparing different airfoils. Figure 16 (a), (b) and (c) show airfoil data(Cl vs. Cd , Cl vs. α, Cm vs. α) for the following airfoils commonly used in small UAVs: EPPLER 421, 554, 422; NACA 63; GOE422. EPPLER 421 gives higher lift and lift to drag ratio and also has very high nose-down (negative) pitching moment about quarter chord. The present design is without a tail and the pitching moment from the wing would have to be compensated by use of differential thrust between top and bottom rotor pairs. EPPLER 422 airfoil has second highest lift coefficient among all the airfoils compared and has third lowest nose-down pitching moment and hence is chosen as the primary airfoil for the biplane wings. 5.4. Wing planform The variation in airfoil characteristics along the span of the wing is largely influenced by wing planform characteristics and so is the performance of the vehicle. An elliptical wing planform has the best lift distribution along the wing but it is difficult to manufacture. A tapered wing has better aerodynamic and structural loads distribution than a rectangular wing. If properly designed, its performance can approach the lift distribution of elliptical wing. However, the small chord near 2018; 00:1–30 17 Power, P (in W) 500 450 AR=6 AR=8 AR=10 AR=12 400 (W/S)stall 350 300 250 200 150 0 50 100 150 200 250 300 2 Wing loading, W/Sw (N/m ) Figure 15. Power variation with wing loading the tip results in lower Reynolds number and can cause stall [29, 31]. Rectangular planform wings do not suffer from this deficiency but have higher drag and worse loads distribution. In the current design the proprotors are located at the leading edge of the wing, the wing section up to the location of the proprotors is kept rectangular for giving enough space for the transmission system that transfers the power to the rotors. The region of the wing outboard of the rotors is tapered as discussed below. Various aspects of the wing geometry are discussed below. 5.4.1. Aspect ratio A wing with a high aspect ratio has tips farther apart than an equal area wing with a low aspect ratio. Therefore, the amount of the wing affected by the tip vortex is less for a high aspect ratio and hence experience less loss of lift and increase of drag due to tip effects as compare to a low-aspect-ratio wing of equal area [29]. But with large aspect ratio, the span of the wing will also be larger making vehicle bigger in size. Typically aspect ratio of 5-8 is used for small aircrafts of this weight class. Therefore, an aspect ratio of 6 is chosen. 5.4.2. Taper The taper ratio (λw ) has significant effect on spanwise lift distribution. The spanwise location of centre of pressure shifts toward the root with decreased taper ratio thereby decreasing the bending moment about the root. Also the chord at the root increases with decreasing taper ratio for the same wing area providing more structural strength. But highly tapered wing is more prone to tip stall because of the thinner airfoil present at the tip due to decreased chord. Taper ratio of 0.45 is chosen because it gives fairly elliptic lift distribution and good stall characteristics [30]. 5.4.3. Sweep Sweep delays the shock waves and accompanying aerodynamic drag rise because of the compressibility effects near the speed of sound, improving performance [29, 30]. But the vehicle is being designed to fly at low subsonic speeds. Therefore, there is no need for wing sweep. 5.5. Other considerations for wing design Performance of the biplane largely depends on the gap and stagger between the two wings. Because of the quadrotor configuration attached to both the wings, placing wings at different locations along the wing chordwise direction is not possible, suggesting for zero stagger. Increasing the gap between the wings reduces the interference between the two wings, thereby, making them operate independent of each other and improve the overall aerodynamic efficiency [32, 33, 34]. As discussed in [35], typically a gap of greater than 1.5 times the chord can give almost 90% of the lift produced by the monoplane with the same total wing area. As discussed earlier, the radius of the rotor blade is 0.38 m so the rotors has to be kept at least 0.76 m apart. For reducing rotor interference, the rotors are kept 1 m apart, thereby constraining the wing separation to be 1 m. Wing gap of 1 m is well above 2.5 times the root chord of the wing, which is 0.39 m, and therefore it is expected that there would be very less interference effect. 18 2018; 00:1–30 (a) Lift coefficient with angle of attack (b) Lift coefficient with drag coefficient (c) Pitching moment coefficient with angle of attack Figure 16. Comparison of airfoil parameters for different airfoils considered for the wing design Wing dihedral though imparts roll stability but takes away a part of lift and hence has worse aerodynamic performance compared to the wing without dihedral. Winglets significantly reduce drag but only if properly designed. However, their working is still not clearly understood for this scale and a poor design may increase drag instead of reducing it. So neither dihedral nor winglets is considered for the current design. To reduce weight of the wing, it will be made of rohacell foam coated with a thin layer of kevlar composite. Spar made with aluminum alloy will be used to augment the stiffness of the wing. Foam being lighter will help in reducing wing’s weight while coating of kevlar composite layer will add stiffness and strength to the wing. After having decided wing loading, aspect ratio, and taper ratio etc., dimensions of the wing for monoplane configuration are determined. These parameters are scaled, as discussed above, to obtain parameters for a wing in biplane configuration and are shown in Table II 6. Power plant With the design parameters chosen above, the vehicle require power of approximately 1.93 hp in hover and 0.7 hp during forward flight. Thus, the forward flight mode consumes 64% less power than the hover mode highlighing the advantage of the proposed configuration. To account for mechanical losses and aerodynamic losses that the theory might not have 2018; 00:1–30 19 Table II. Wing parameters for single wing of the biplane configuration Parameter Value Wing area Wing Span Aspect ratio Taper Root chord Tip chord Airfoil 0.754 m2 2.29 m 6.9 0.45 0.39 m 0.176 m EPPLER 422 Table III. Specifications of 105HZ helicopter engine Parameter Displacement Bore Stroke Practical rpm Output Engine weight Value 1.048 in3 (17.17 cm3 ) 1.442 in (36.63 mm) 1.024 in (26 mm) 2000-16,500 3.75 hp @ 15000 rpm 596 gm incorporated, extra 10% is added, meaning around 2.13 hp power is needed during hover. To improve endurance, as discussed earlier, Gasoline run 105HZ helicopter engine of OS is selected as the power source of vehicle. Besides, being small in size and weight, 105HZ can provide power required by vehicle to hover and also to execute other heavy maneuvers if needed. The specifications of the engine are given in table III. 7. Transmission and pitch change mechanism Transmission mechanism is shown in Fig. 17 (a). The entire transmission system that transfers power from engine to a propellers consists of three parts. 1) Part 1 (Gearbox): To transmit power from the engine to central shafts, gearbox has been used, shown in Fig. 17 (b). The gearbox contains 5 spur gears denoted by E, M1, M2, S1, S2. E is the gear attached to the engine shaft, M1 and M2 are gears in the middle, S1, S2 are gears attached to central shafts transferring power to the rotors. Two stage gearbox design has been adopted here to have a smooth transfer of power from the engine shaft to the central shafts. Power requirement during hover is more and hence this power is going to dictate the gear design. The engine will be operating at about 12800 RPM during hover and the rotors are to operate at 3200 RPM, which means RPM has to be reduced by a factor of 4. For the two stage gearbox design, the RPM will be reduced to half in first stage and to one forth in second stage. This requires the gears to have gear ratios as - E:M1:M2 = 1 : 2 : 2 and M1:S1:S2 = 1 : 2 : 2. For a preliminary design purpose, based on standard design practices, pressure angle (φ0 ) of 20 degree, addendum (at ) of 1m and dedendum (dt ) of 1.2m is chosen for design calculations, where m is module. Diameter and number of teeth are determined considering the space constraints as well as the interference between the teeth using Eq. (27) (refer [36]). Face widths (bt ) are determined using American Gear Manufacturers Association (AGMA) strength equation, Eq. (28). T1 ≥ q 1+ σb = 2at T12 Pd 1 (1 T2 T2 (27) + 2)sin2 φ0 − 1 Ft Pd Kv Ko Km Kf bt Y (28) here T1 and T2 are number of teeth on gear 1 and 2 under consideration. Pd is pitch circle diameter. σb is maximum bending stress. Ft is the transmitted load. Y is Lewis factor. Kv K0 , Km , Kf factors for dynamic loading, overload, load distribution on the gear, stress concentration effect respectively. Table IV lists out all the specifications for the gears in the gearbox. 20 2018; 00:1–30 Table IV. Specifications of gears in the transmission Parameter Diameter(in cm) No. of teeth Face width(in cm) Module, m (in mm) Adendum (in mm) Dedundum (in mm) E 2 17 3.6 1.2 1.2 1.44 M1,M2 4 34 3.6 1.2 1.2 1.44 S1,S2 8 68 3.6 1.2 1.2 1.44 B 3.6 20 0.8 1.8 1.8 4.1 2) Part 2 (Transfer bevel gears): For transferring power from central shafts to respective rotor shafts, there are two transfer bevel gears systems which consists of 3 bevel gears (B) each, shown in Fig. 17 (c). One of these three gears is connected to one of the central shafts (CS1, CS2) and transfer power to other two bevel gears kept at 90◦ and attached to the corresponding rotor shafts (RS1-RS4). All of these three gears are identical, or in other words have gear ratio of 1:1, as the rotational speed being transferred is same. 3) Part 3 (Rotor bevel gears): For every rotor, there are two identical bevel gears kept at 90◦ to transfer power from rotor shafts to the rotor hub, shown in Fig. 17 (d), (e). The position of the bevel gear attached to rotor hub is such that the adjacent rotors rotate in opposite direction while diagonally opposite rotors rotate in the same direction. Figure 18 shows pitch changing mechanism in detail. The pitch of the blade is changed by moving swashplate, having only heave degree of freedom, up or down by using a servo motor mounted for each rotor on the shaft joining the rotors. For example, as the servo arm is rotated anticlockwise the L-arm rotates clockwise which pushes the swashplate in upward direction which increases the pitch of the anticlockwise rotating blades connected to the swashplate. The rotational speed of the rotors needs to be changed from that during hover for the forward flight. For the current design, this will be achieved by using throttle to change the operating speed of the engine to achieve desired rotational speed and power. 8. Preliminary structural analysis To decide upon the dimensions of basic supporting frame and internal wing structure, preliminary structural analysis is performed using CATIA software. First, the parameters are roughly chosen for given loading condition and then static finite element analysis is performed using CATIA software to assess if the structure has adequate strength. For the main quadrotor frame, the expected rotor thrust during hover condition is applied as point loads at the end of the rotor shaft and the central portion of the frame is fixed to mimic the effect of weight of the vehicle. Figure 19 shows stress variation over the frame. With the chosen dimensions for frame structure, the factor of safety is around 1.9 which is slightly on the higher side. Since, the objective is not to optimize the structural strength, the chosen dimensions are retained. For the wing structure, consisting of spars and ribs, the main load carrying members of the wing, distributed loads are applied. Section-wise constant uniformly distributed load is applied having resultant load equal to weight for a single wing. Similarly, drag is also applied, assuming its value to be 10% of the lift. The load distribution and the stress variation for this loading is shown in Fig. 20. The spar has rectangular cross-section of 18 mm X 6 mm. The tip ribs have 2 mm thickness while all other ribs are 3 mm thick. For the given dimensions of spar, the factor of safety is around 1.85 which gives adequate margin for preliminary design. 9. Weight estimate and center of gravity location The detailed drawing of the vehicle is made in CATIA having the dimensions of rotor and wing as designed above and respective materials are assigned to each and every part. The software gives the total weight and that of the individual parts. The weights are listed in Table V. For initial calculations the gross weight of the vehicle was assumed to be 15 kg but after initial design and detailed drawing it was realized that the weight of the vehicle without payload is more than 11 kg. Therefore, the calculations were repeated for different initial guess until the empty and design weight including payload were in agreement. The table shows weights after final iteration. Center of gravity, because of almost symmetrical design, lies at the center of the quadrotor frame with offset of 15.7 cm towards the trailing edge from leading edge of the wing. The three view drawing of the final design is shown in Fig. 21. 2018; 00:1–30 21 (a) Transmission Mechanism (b) Gears in Gearbox (d) Rotor bevel gears (c) Transfer bevel gears (e) Rotor bevel gears Figure 17. Schematic of transmission mechanism and gearbox Table V. Weights of the individual parts Component Weight (Kg) Quantity Wing assembly 1.985 2 Rotor assembly 0.396 4 Engine assembly + Gearbox 2.477 1 Rest frame structure 3.326 1 Payload 6 1 Fuel 1.15 1 Total weight of the vehicle (Kg) 22 Total weight (Kg) 3.970 1.584 2.477 3.326 6 1.15 18.5 2018; 00:1–30 (a) CAD drawing (b) Actual mechanism Figure 18. Schematic of pitch change mechanism Figure 19. Structural analysis of quadrotor frame 10. Avionics and telemetry The proposed design is inherently unstable and therefore an on-board autopilot is required to stabilize the vehicle continuously in various modes of flight. The open source PixHawk autopilot board with on-board ARM Cortex M4 processor (STM32f407) based micro-controller with a clock speed of 168 MHz is used for stabilization and control for proof-of-concept demonstration of hovering flight discussed in the next section. It has nine degrees-of-freedom IMU (3 axis digital MEMS gyro with range of ±2000 deg/s, 3 axis digital MEMS accelerometer with measuring range of ±16 g and 3 axis digital MEMS Magnetometer with range of ±12 Gauss), pressure sensor and GPS. The autopilot loop on the PixHawk runs at 200 Hz. The autopilot software uses open source Mavlink communication protocol for all RTOS inter-process communications as well as ground link telemetry communications related to vehicle health, flight modes, alerts, current position, autopilot arm / disarm status, way-point transfer / switching and sensor calibration. The Mavlink communication protocol also offers cyclic redundancy check (CRC) checksum to reduce data corruption during communication between the ground station and the vehicle. The Linux version of open-source QGroundControl ground station software is used for real-time monitoring and logging of telemetry data. The telemetry module pair operating at 433 MHz is used for all vehicle to ground station communication. 2018; 00:1–30 23 Figure 20. Structural analysis of wing structure 11. Proof-of-concept prototype flight testing Before, initiating the fabrication of the designed vehicle, a proof-of-concept scaled vehicle is developed based on this design to demonstrate the concept. The baseline quadrotor frame is fabricated using off-the-shelf components to fabricate a variable pitch quadrotor frame in which rotors are powered using a single brushless DC motor and transmission system. The wings fabricated using foam are then attached to the quadrotor frame with the help four aluminum clamps, balsa wood and an adhesive. The PixHawk autopilot board is mounted on the vehicle to enable attitude stablization for hovering flight. The bare variable pitch quadrotor airframe weighs 1000 g, both the wings combined weigh 160 g (are 1 m long each) and the battery is 250 g which amounts to a gross takeoff weight of 1400 g. The vehicle thrust is measured experimentally using a load cell and it is established that the prototype vehicle produced a maximum thrust of around 18 N. The assembled quadrotor biplane prototype in hovering flight is shown in Fig. 22. The proof-of-concept demonstration of hovering flight required the implementation of a PID controller for the variable pitch quadrotor system which is discussed below. 11.1. PID control for the variable pitch quadrotor For attitude stabilization and tracking a simple PID controller is developed and implemented onboard the PixHawk autopilot board. The development of the entire flight envelope autopilot is not the focus of the present paper and would be taken up in future work. Attitude control: To achieve the desired orientation Ed = [φd θd ψd ]0 , moments are generated proportional to the Euler angles’ errors and their rates using the following expression. M = −Kap ea − Kai t Z ea (τ )dτ − Kad ėa (29) 0 where ea = E − Ed and M = [l m n]0 Position control: To track position rd = [xd yd zd ]0 , feedback translational accelerations [14], in all the 3 directions, are produced by using the position error and its rate as given below. r̈f b = −Kpp ep − Kpi Z t ep (τ )dτ − Kpd ėp (30) 0 where ep = r − rd . This gives us total accelerations that are required to be applied to the vehicle as follows, a = M (r̈d + r̈f b − g) where g = [0 0 g]0 ; a = [ax calculated as follows [37]. ay az ]0 . From this accelerations total thrust, desired pitch and roll angles can be  T = M kak  φd = sin−1 (ux sin(ψd ) − uy cos(ψd ))  u cos(ψd )+uy sin(ψd ) ) θd = sin−1 ( x cos(φd ) where 24 ux = −M ax ; Td uy = (31) (32) −M ay Td 2018; 00:1–30 (a) Front view (b) Top view (c) Side view Figure 21. Three view drawing of designed UAV 2018; 00:1–30 25 Figure 22. Variable pitch quadrotor biplane UAV prototype Figure 23. Coordinate frame Control allocation: In case of variable pitch quadrotor, the thrust and torque of each rotor are dependent on the the trust coefficients of the rotors which in turn depend on their blade pitch. The total thrust and moments are related to thrust coefficients, obtained using blade element momentum theory, are given below [37]. T = KF (CT1 + CT2 + CT3 + CT4 ) l = KF la (−CT1 − CT2 + CT3 + CT4 ) m = KF la (CT1 − CT2 − CT3 + CT4 ) 3 3 3 3 n = K√F2R (−|CT1 | 2 + |CT2 | 2 − |CT3 | 2 + |CT4 | 2 )     (33)    Here KF is rotor force constant and subscript 1 to 4 denotes the rotor number. Since the yaw moment is non-linearly related to thrust coefficients, for simplicity it is linearized around the hover condition giving expression for yaw moment as in Eq. 34. r CTh n = KF R (−|CT1 | + |CT2 | − |CT3 | + |CT4 |) (34) 2 Where CTh is thrust coefficient of each rotor during hover. Equation 33 and 34 are used to obtain thrust coefficients of the each rotor to apply thrust and moments as required from Eqs. (29) and (32). The correlation between thrust coefficients and blade pitch for each rotor is obtained through experiments which is used to generate PWM signal for each of the servo motors that is controlling the blade pitch of the rotors. 26 2018; 00:1–30 10 15 2 20 2 0 -20 0 0.1 5 10 15 0 5 10 15 20 0 5 10 15 20 0 5 10 15 20 0 20 0 reference actual 0 20 z (m) θ (deg) 5 x (m) 0 0 ψ (deg) Position with time Reference Aactual y (m) φ (deg) Euler angles with time 20 0 -2 -0.1 0 5 10 15 20 time (s) (a) Attitude with time time (s) (b) Position with time Trajectory in 3D space Reference Actual Initial position 1 z (in m) 0 -1 -2 -3 3 3 2 2 1 y (in m) 1 0 0 -1 x (in m) (c) Position in 3d with time Figure 24. Simulation for way point tracking Simulation results: Before the implementation of the controller on the actual vehicle, simulations are carried out for way points tracking. The quadrotor is commanded to track (xd , yd , zd , ψd ) = {(0, 0, −2, 0), (2, 0, −2, 0), (2, 0, 0, 0), (2, 2, 0, 0), (0, 2, 0, 0)}. As observed from Fig. 24 (b) and (c), quadrotor tracks the given way points. Similarly, Fig 24 (c) shows that the required attitude angles generated for position control are also tracked. Experimental results: The PID algorithm is implemented on PixHawk autopilot board and used to stabilize and control the prototype during hovering flight. Figure 25 shows the attitude tracking performance of the prototype vehicle in manual flight. It is observed that the controller tracks roll, pitch and yaw attitude satisfactorily for the vehicle to enable stable hovering flight shown in Fig. 22. 12. Concluding remarks Conceptual design, of various systems of a novel Quadrotor Biplane VTOL UAV concept and flight test demonstration of proof-of-concept prototype is presented in this paper. Ingenious use of various technologies such as variable pitch quadrotor, biplane, variable tip speed, and engine as power source makes the vehicle unique in itself at the same time a disruptive technology for today’s market. The proposed design is expected to be robust and compact. It is highly maneuverable and capable of performing aggressive maneuvers due to its variable pitch proprotors. It has long range due to addition of the biplane wings configuration in its structure and can fly for significantly longer duration due to use of 2018; 00:1–30 27 40 30 Roll attitude setpoint Roll attitude achieved 30 Pitch attitude setpoint Pitch attitude achieved 20 Pitch attitude (deg) Roll attitude (deg) 20 10 0 −10 −20 0 −10 −20 −30 −40 0 10 2 4 6 Time (sec) 8 10 −30 0 2 (a) Roll attitude 4 6 Time (sec) 8 10 (b) Pitch attitude 90 Yaw attitude (deg) 60 Yaw attitude setpoint Yaw attitude achieved 30 0 −30 −60 −90 0 2 4 6 Time (sec) 8 10 (c) Yaw attitude Figure 25. Experimental validation of controller for attitude tracking of the scaled proof-of-concept prototype fuel engine. Its landing gears also serve as vertical fins, improving the yaw damping for directional stability. It is designed to land in remote unprepared terrain due to its hovering and VTOL capabilities. The design of proprotors, wings, transmission and structural components is systematically undertaken. The aerodynamic design of the proprotors is carried out using modified BEMT. The modified BEMT considers swirl and ignores the small inflow angle assumption. The BEMT predictions are validated against experimental results for helicopter rotor as well as propeller during hover. The proprotor design highlights the conflict between the requirements for hover and forward flight. Final proprotor design with 24◦ preset angle and -24◦ twist is arrived at by giving 70% weightage to forward flight and 30% weightage to hovering flight. The operating RPM of the proprotors is reduced from 3200 during hover to 2000 during forward flight to ensure optimal performance during cruise flight. This is required to decrease profile power loss during forward flight. The estimated power consumption during forward flight mode is 64% less than that required for hover, which justifies the need for hybrid UAVs as that studied in this paper. Aerodynamic design of the wings is obtained using a typical monoplane wing design approach while optimizing the benefits of the biplane wing configuration. The gears used in transmission mechanism are designed using the standard gear design approach with the help of AGMA equation. The engine is selected as per the power requirement and ensuring high power to weight ratio. Preliminary structural analysis is performed on the base quadrotor frame as well as on the wings using CATIA software. A proof-of-concept vehicle prototype is fabricated and a PID controller is developed to demonstrate stable hovering flight and attitude tracking. 28 2018; 00:1–30 Future work As a part of future work, first the designed configuration would be fabricated. The controller for the entire flight envelope of the vehicle would be developed and tested, first on the proof-of-concept vehicle and then on the designed prototype. The vehicle would be tested under various flight conditions and its performance would be systematically evaluated. Acknowledgments Authors would like to thank Mr. Ramdas Gadekar, a Ph.D. research scholar in Aerospace Engineering department at IIT Kanpur for his valuable assistance during the proof-of-concept prototype flight testing. Authors would also like to thank Ms. Kirti Bhatnagar, Senior Project Associate for her help in CATIA drawing. This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. References REFERENCES 1. Stone RH, Anderson P, Hutchison C, Tsai A, Gibbens P, Wong KC. Flight Testing of the T-Wing Tail-Sitter Unmanned Air Vehicle. J Aircraft 2008;45(2):673-685. 2. Frank A, McGrew JS, Valenti M, Levine D, How JP. Hover, Transition, and Level Flight Control Design for a SinglePropeller Indoor Airplane. In: AIAA Guidance, Navigation and Control Conference and Exhibit 2007; 2007-6318. 3. Sanchez, Anand. Autonomous hovering of a noncyclic tiltrotor UAV: Modeling, control and implementation. In: Proceedings of IFAC Congress 2008. 41(2):pp 803-808. 4. Seong-Wook C, Youngshin K, Sungho C, Samok K, Jai MK. Development and Conversion Flight Test of a Small Tiltrotor Unmanned Aerial Vehicle. J Aircraft 2010;47(2):730-732. 5. Flores GR, Escareno J, Lozano R, Salazaret S. Four Tilting Rotor Convertible MAV: Modeling, Control and Real-time Hover Flight Control. J Intell & Robot Syst 2012;65(1):457-471. 6. Cetinsoy E, Dikyar S, Hancer C, Oner KT, Sirimoglu E, Unel M et al. Design and Construction of a Novel Quad Tilt-wing UAV. Mechatronics 2012;22(6):723-745. 7. Abhishek, Krishna R, Sinha S, Bhowmik J, Das D. Design, Development and Flight Testing of a Novel Quadrotor Convertiplane Unmanned Air Vehicle. In: 73rd American Helicopter Society Annual Forum 2017. 8. BBC News. Article on Google Tests Drone Deliveries in Project Wing Trials 2014. http://www.bbc.com/news/ technology-28964260; [accessed 30.01.2017]. 9. Amazon Prime Air, 2016. https://www.amazon.com/Amazon-Prime-Air/b?node=8037720011; [accessed on 30.01.2017] 10. Hrishikeshavan V, Bawek D, Rand O, Chopra I. Development of Transition Control Methodology for a Quad RotorBiplane Micro Air Vehicle From Hover to Forward Flight. In: The AHS International Specialists’ Meeting on Unmanned Rotorcraft 2013. 11. Hrishikeshavan V, Bogdanowicz C, Chopra I. Design, Performance and Testing of a Quad Rotor Biplane Micro Air Vehicle for Multirole Missions. Int J Micro Air Veh 2014;6(3):155-174. 12. Bogdanowicz C, Hrishikeshavan V, Chopra I. Development of a Quad-Rotor Biplane MAV with Enhanced Roll Control Authority in Fixed Wing Mode. In: 71st American Helicopter Society Annual Forum 2015. 13. Abhishek, Gadekar R, Duhoon A, Kothari M, Kadukar S, Rane L, Suryavanshi G. Design, Development, and Closedloop Flight-Testing of a Single Power Plant Variable Pitch Quadrotor Unmanned Air Vehicle. In: 73rd American Helicopter Society Annual Forum 2017. 14. Cutler M, Ure NK, Michini B, How JP. Comparison of Fixed and Variable Pitch Actuators for Agile Quadrotors. In: Proceedings of AIAA Guidance, Navigation, and Control Conference 2011; doi: 10.2514/6.2011-6406 15. Cai G, Feng L, Chen B M, Lee T H. Systematic Design Methodology and Construction of UAV Helicopters. Mechatronics 2012;18(10):545-558. , 2008, Pages 545-558, ISSN 0957-4158, http://dx.doi.org/10.1016/j.mechatronics.2008.05.011. 16. Request for Proposals 2014-2015 of the American Helicopter Society Student Design Competition, 2014. https: //vtol.org/B2B77560-2C9E-11E4-A41F0050568D0042 17. Stahlhut CW., Leishman JG. Aerodynamic Design Optimization of Proprotors for Convertible-Rotor Concepts. In: 68th Annual Forum of the American Helicopter Society, Fort Worth, TX; May 2012. 18. Leishman JG. Blade Element Theory. In: Principles of Helicopter Aerodynamics. 2nd ed. Cambridge: University Press; Chapter 2 and 3; 2006:115–170. 2018; 00:1–30 29 19. Goldstein S. On the Vortex Theory of Screw Propellers. In: Proceedings of the Royal Society 1929;123(792):440-465. 20. Bradley TH, Mavris D, Moffitt BA, Parkh DE. Validation of Vortex Propeller Theory for UAV Design with Uncertainty Analysis. In: 46th AIAA Aerospace Sciences Meeting and Exhibit 2008; 21. Winarto H. BEMT Algorithm for the Prediction of the Performance of Arbitrary Propellers. CR CoE-AL 2004-HW301, Centre of Expertise in Aerodynamic Loads, Royal Melbourne Institute of Technology; 2004. 22. Shastry A. A Study in Dynamics and Adaptive Control Design of Quadrotors. Master Thesis, Department of Aerospace Engineering, Indian Institute of Technology Kanpur; 2016. 23. Hrishikeshavan V, Sirohi J, Tishchenko M, Chopra I. Design and Development of a Shrouded Rotor Micro Air Vehicle with Anti Torque Vanes. J of the American Helicopter Society 2011; 56(1): 12008-12008. 24. On-line Depository for airfoil data. UIUC Airfoil Database. http://m-selig.ae.illinois.edu/ads. html [accessed 22.06.2016] 25. Davis, S J, “Predesign Study for a Modern 4-Bladed Rotor for the RSRA,” NASA CR-166155, March 1981. 26. Bousman, W G, “Aerodynamic Characteristics of SC1095 and SC1094 R8 Airfoils,” NASA TP-2003-212265, December 2003. 27. Online repository for airfoil data. ‘Airfoil tools’ Airfoil Database. http://m-selig.ae.illinois.edu/ads. html [accessed 22.06.2016] 28. Anderson Jr J D. Fundamentals of Aerodynamics. Tata McGraw-Hill Education, 2010. 29. Raymer D P. Aircraft Design: A Conceptual Approach. Washington DC.: AIAA; 1992. 30. Torenbeek E. Synthesis of Subsonic Airplane Design. Rotterdam, Netherland: Delft University press; 1976. 31. Ming CS. Unmanned Air Vehicle (UAV) Wing Design and Manufacture. Bachelor thesis, Department of Mechanical Engineering, National University of Singapore. 32. Landolfo G. Aerodynamic and Structural Design of A Small Nonplanar Wing UAV. Master Thesis, Department of Aerospace Engineering, University of Dayton; 2008. 33. Maqsood A, Go TH. Parametric studies and performance analysis of a biplane micro air vehicle. Int J Aeronaut and Sp Sci 2013;14(3):229-236. 34. Altman A. Unique Stealth Unmanned Aerial Vehicle (UAV) Houck Aircraft Design Program. Volume 1: Program Overview, Air force research laboratory, Wright-Patterson Air Force Base, 2008; 45433-7542; AFRL-RB-WP-TR2008-3170 35. Bogdanowicz CM. Experimental Investigation of A Quad-rotor Biplane Micro Air Vehicle. Master Thesis, Department of Aerospace Engineering, University of Maryland 2015. 36. Online article on Spur Gear Design, http://www.learnengineering.org/2013/02/ spur-gear-design.html [Accessed 22.06.2016] 37. Gupta N, Kothari M, Abhishek. Flight Dynamics and Nonlinear Control Design for Variable pitch Quadrotors. In: Proceedings of American Control Conference 2016. 30 2018; 00:1–30
3cs.SY
Observability of Nonlinear Complex Networks in the Presence of Symmetries: A Graphical Approach arXiv:1308.5261v3 [nlin.PS] 30 Mar 2017 Afroza Shirin1 , Dionicio F. Rios1 , and Francesco Sorrentino1 Abstract— Reconstructing the states of the nodes of a dynamical network is a problem of fundamental importance in the study of neuronal and genetic networks. An underlying related problem is that of observability, i.e., identifying the conditions under which such a reconstruction is possible. In this paper we study observability of complex dynamical networks, where, we consider the effects of network symmetries on observability. We present an efficient algorithm that returns a minimal set of necessary sensor nodes for observability in the presence of symmetries. I. I NTRODUCTION Observability is the ability to deduce the state variables of a system for which only the outputs, often coinciding with a subset of the states, can be measured. There are different methods that can be used to determine observability, ranging from an algebraic test [2] to a graphical approach (GA) [3]. The last allows to determine a set of output states from which one can infer information about the rest of the states by analyzing the properties of an inference graph. In [1], this method was applied to complex networks, for which the ability to directly sense all of the nodes is typically unavailable. Examples of interest are genetic and neural networks, which could be reconstructed by observing a limited number of output states if these provide observability. In biological networks, such as genetic or neuronal networks, an important problem is that of reconstructing the network architecture and the time evolution of the connections from existing data. For these applications, a typical limitation is the cost and the possibility of sensing the states of the individual nodes. The network inference problem and its application to the genome [4], [5], [6], [7], [8] has received significative attention over the last decade. References [9], [10] review and compare the more popular existing approaches. An important question that is relevant to both genetic and neuronal networks, is what is the minimal amount of information needed to be able to reconstruct the state of these networks. In this paper we will be concerned with the conditions for observability of a complex dynamical network, which provides a conditio sine qua non for implementing any type of estimation strategy. II. D EFINITIONS Definition 1: Observability of Non-Linear System. Consider a nonlinear system represented by, ẋ = f(x, u), (1) where x ∈ RN is the system state, u ∈ RP is the system input, f : RN × RP → RN and   h1 (x)  h2 (x)   (2) y = h(x) =   ...  hM (x) is the system output, y ∈ RM , hi : RN → R. If the initialstate vector x(0) can be found from u(t) and y(t) measured over a finite interval of time, the system in Eq. (1) is said to be observable. The Lie derivative of h with respect to f is defined to be ∂h f, ∂x where the function f is of the form:   f1 (x) f =  ...  . fN (x) Lf h = (3) (4) Then the Lie derivative is:   f1 (x)  ∂h ∂h  ...  , ..., ∂x Lf h = ∂x 1 N fN (x)  (5) and the result of this derivative operation is a scalar. Two states x0 and x1 are distinguishable if there exists an input function u∗ such that: y(t, x0 ) 6= y(t, x1 ), (6) where y(t, a) ≡ y(t) for x(0) = a. This implies that the system is locally observable about x0 if there exists a neighborhood of x0 such that every x in that neighborhood other than x0 is distinguishable from x1 . A test for local observability about x0 is that the matrix:        O(x0 , u∗ ) =        ∂L0f h1 ∂x1 ∂L0f h1 ∂x2 ... ... ∂L0f hM ∂L0f hM ∂x1 ∂x2 −1 ∂LN h1 f ∂x1 −1 ∂LN h1 f ∂x2 .. . .. . ... ... −1 ∂LN hM f ∂x1 −1 ∂LN hM f ∂x2 ... ... ... .. . ... ... ... ∂L0f h1 ∂xN  ...              ∂L0f hM ∂xN .. . −1 ∂LN h1 f ∂xN ... −1 ∂LN hM f ∂xN (7) is of rank N . If the system is locally observable about any x0 ∈ RN , the system is said to be observable. Note that testing observability may require that the rank observability test is repeated for potentially infinitely many points x0 . Alternatively, one may recur to using a symbolic method for calculating the rank of (7). Definition 2: Observability of Linear System. When a system is linear time invariant [13], ẋ(t) = Ax + Bu y(t) = Cx(t) (8) the condition for observability in Eq. (7) reduces to the Kalman rank condition, i.e., the matrix  T K = C T , (CA)T , · · · , (CAN −1 )T must have rank N . In the case that Eq. (8) represents the dynamics of a dynamical network, the matrix A = {Aij } is called the adjacency matrix. Definition 3: Network Symmetries. We consider the group of network symmetries (or automorphisms of a graph). Each symmetry is represented by a permutation matrix that permutes with the adjacency matrix A, i.e., P A = AP . Given a matrix A the set of all the network symmetries can be computed by using available efficient discrete algebra routines [23]. III. A G RAPHICAL A PPROACH TO O BSERVABILITY The algebraic methods introduced in Sec. II to determine observability of a nonlinear system can get quite complicated as N , the number of states, increases. In [1] a graphical approach is proposed, which reduces to the analysis of an inference diagram (ID) that describes the interactions between the state variables. This approach presents computational advantages. The inference diagram is a graphical representation of the interactions between state variables: consider two variables xi and xj , if variable xi appears in the dynamical equation for the evolution of variable xj (xi affects xj ), then there will be a directed edge from state xi to state xj in the inference diagram. Note here that the convention in this paper to construct the ID is different from that in Ref. [1], namely if state xi affects state xj we draw a directed edge from xi to xj in the ID (while in [1] we would have a directed edge from xj to xi ). The ID contains information that can be used to identify the sensor nodes required to achieve observability. Consider a directed graph G = (V ; E), where V is the set of nodes and E ⊆ V × V is the set of directed edges. A path from node v0 to node vk in G is an alternating sequence of the type (v0 , (v0 , v1 ), v1 , (v1 , v2 ), ..., vk1 , (vk1 , vk ), vk ) of nodes and edges that belong to V and E, respectively. The entries of the adjacency matrix A are Aij = 1, if (vj , vi ) ∈ E and Aij = 0, if (vj , vi ) ∈ / E. Two nodes v and w in G are path equivalent if there is a path from v to w and a path from w to v. Path equivalence partitions V into maximal disjoint sets of path equivalent nodes. These sets are called the strongly connected components (SCCs) of the graph [20]. This means that, in a SCC, there exists a path from any node to all other nodes in that SCC. The sensor nodes predicted from the GA analysis are chosen from the root SCCs. A root SCC is a SCC which has no outgoing links, meaning that their information Fig. 1. Inference diagram and its partition in strongly connected components. The ID is used to identify strongly connected components (SCCs) and root strongly connected components (root SCCs). In the figure (nonroot) SCCs are delimited by dashed ovals and root SCCs by solid ovals. In order to achieve observability, at least one node needs to be selected from each root SCC. cannot be concluded from any other node in the inference diagram. However, root SCCs do have incoming links from other SCCs. This implies that information of nodes within other SCCs, can be inferred from the root SCCs. In order to achieve observability it is necessary that at least one sensor node (any node) is selected from each root SCC [1]. In the case presented in Fig.1, since there are three root SCCs, three sensor nodes must be selected to achieve observability. Note that if the diagram is undirected and connected, choosing any node in the graph as sensor node would provide observability. When applied to the ID of a network of coupled dynamical systems, GA may be used to identify a set of sensor nodes [1] to be monitored to yield observability. In what follows, we briefly review the main results from [1]: R1) The set of sensor nodes identified by the GA are necessary for observing any linear or nonlinear dynamical system. R2) If the dynamics is linear the maximal matching method introduced in [19] returns the set of nodes that are necessary, but also the minimum set sufficient for observability. R3) For nonlinear systems, under general assumptions, the sensor set predicted by GA is not only necessary but also sufficient (for more details the reader is directed to the supplementary information of Ref. [1]). Result R3) is supported in [1] by using a mix of the structural controllability analysis [14] and an extensive numerical analysis. The sufficiency argument is based on the assumptions that (i) all the nodes are accessible from the sensors which is guaranteed by placing the sensors in the root SCCs and (ii) for each node i ∂fi /∂xi 6= 0, i.e., the dynamics of each node i is affected by the state of the node itself. Assumption. Throughout this paper we assume ∂fi /∂xi 6= 0, i = 1, .., N . Note that for the sake of simplicity, in the figures of this paper we omit to represent self-loops at each node. However, though not graphically shown, those selfconnections are present. We depart from result R3, which applies to general nonlinear networks, and extend it to consider the case where network symmetries are present. Our results are mainly meant to apply to large nonlinear complex networks in the presence of network symmetries. Whether these symmetries are a generic feature or not of complex networks, it is a matter of discussion. While an analysis of model networks seems to indicate that network symmetries may sometimes emerge in small numbers in model networks [21], it has also been reported that they are pervasive in the case of many real networks [22]. For example, in Ref. [22] it was found that the Human B cell genetic interactions network is characterized by approximately 5.9 × 1013 symmetries, the C. elegans genetic interaction network is characterized by approximately 6.9×10161 symmetries, and the network of the Internet at the Autonomous System level by approximately 1.2 × 1011298 symmetries (!) Hence, the presence of network symmetries appears to be a typical feature of several real networks. IV. S YMMETRIES AND O BSERVABILITY In this section we will analyze cases in which symmetries occur and their effect on observability. In what follows, we will present several inference diagrams with symmetries. For each individual diagram, we will use GA to determine SCCs as well as root SCCs and we will methodically examine the conditions that must be met for observability. While we do not attempt to present an exhaustive treatment of the effects of symmetries on the observability of networks, we will present several examples and we will propose and show that: (i) the GA method presented in the previous section fails in the presence of symmetries and (ii) necessary conditions for observability can be restored by selecting appropriate additional sensor nodes. Our main goal in this section is to show that a GA can be conveniently exploited not only to find (root) SCCs, but also to detect symmetries. Given a network, available software is capable to efficiently provide all the network symmetries, e.g. SAGE [23]. Here we propose that SCCs analysis in conjunction with the analysis of symmetries in the ID may allow us to identify the necessary set of sensor nodes to achieve observability. In what follows, we will specify the network nonlinear equations (1) and (2) to be, ẋi (t) = g(xi , Ai1 q(x1 ), Ai2 q(x2 ), ..., AiN q(xN )) y(t) = Cx(t) (9) where q(xi (t)) is the scaler output function of node i, i = 1, · · · , N , and g : R × R × ... × R → R is a symmetric | {z } N function of its variables. Definition 4: A symmetry for the set of equations (9) is a permutation between tuples of nodes for which the dynamics is equivariant. It can be easily shown that a network symmetry (Definition 3) yields an equation symmetry (Definition 4) for Eq. (9). As an example, we consider the following nonlinear dynamic Fig. 2. Inference diagram representation of four networks displaying symmetries. SCCs and root SCCs are delimited by dashed ovals and solid ovals, respectively. For each network, a minimal set of sensor nodes to achieve observability is determined (the sensor nodes are those pointed by small purple arrows). equations for the network in Fig. 2a, ẋ1 = −kx1 x2 x3 ẋ2 = −kx2 x1 ẋ3 = −kx3 x1 The GA method predicts node 1 is the only sensor node. By monitoring y = x1 , we check the observability of the nonlinear system using the algebraic method described in Sec. II. The Lie derivatives of y are: (0) Φ1 = L0f y = x1 (1) Φ1 = L1f y = ẋ1 = −kx1 x2 x3 (2) Φ1 = L2f y = k 2 (2x21 x2 x3 + x1 x22 x23 ) For arbitrary x and the constant k, the observability matrix,  1 O =  O21 O31 0 O22 O32  0 O23  O33 where, O21 = −kx2 x3 , O22 = −kx1 x3 , O23 = −kx1 x2 , O31 = k 2 (x22 x23 + 4x1 x2 x3 ), O32 = 2k 2 (x21 x3 + x2 x1 x23 ), O33 = 2k 2 (x21 x2 + x3 x1 x22 ). A symbolic rank calculation shows that rank(O) = 2 < 3, i.e, the system is not observable by only sensing node 1. Note that because the entries of the matrix O are not independent of each other, the theory of structural controllability and observability [14] does not exactly apply to this case [1]. Now we consider the case that we choose node 1 and 2 as sensor nodes. By monitoring y = [x1 x2 ]T , we check the observability of the system. The Lie derivatives of y are: (0) Φ1 = L0f h1 = x1 or 7. An algorithm to identify the minimal set of necessary sensor nodes for observability in the presence of symmetries will be presented in the Sec. V. (1) Φ1 = L1f h1 = ẋ1 = −kx1 x2 x3 (2) Φ1 = L2f h1 = k 2 (2x21 x2 x3 + x1 x22 x23 ) (0) Φ2 = L0f h2 = x2 (1) Φ2 = L1f h2 = ẋ2 = −kx1 x2 (2) Φ2 = L2f h2 = k 2 (x21 x2 + x3 x1 x22 ) For arbitrary x and the constant k, the observability matrix,   1 0 0  0 1 0     O31 O32 O33    O=   O41 O42 O43   O51 O52 O53  O61 O62 O63 where, O31 = −kx2 x3 , O32 = −kx1 x3 , O33 = −kx1 x2 , O41 = −kx2 , O42 = −kx1 , O43 = −kx1 x2 , O51 = k 2 (x22 x23 + 4x1 x2 x3 ), O52 = 2k 2 (x21 x3 + x2 x1 x23 ), O53 = 2k 2 (x21 x2 + x3 x1 x22 ), O61 = k 2 (x3 x22 + 2x1 x2 ), O62 = k 2 (x21 + 2x2 x3 x1 ), O63 = k 2 x1 x22 . It can be shown using symbolic rank calculation that rank(O) = 3, i.e, the system is observable by sensing nodes 1 and 2. From Fig. 2a we see that swapping nodes 2 and 3 does not affect the dynamics of node 1. In Fig. 2b, any permutation of the ordered pair of nodes (2,3), (4,5), (6,7) and (8,9) leaves the dynamics of node 1 unaltered. In Fig. 2c, a permutation of the ordered triplets of the nodes (2,3,4) and (5,6,7) leaves the dynamics of node 1 unaltered. Fig. 2d, shows four independent symmetries occurring in the same diagram, namely, swapping nodes 4 and 5 would leave the dynamics of the rest of the network unaltered, as well as swapping nodes 2 and 3, and 6 and 7. Moreover, another symmetry is generated by the pairs (2,3) and (6,7). Hereafter, we will discuss how the symmetries of the diagrams in Fig. 2 limit their observability and how additional sensor nodes can be selected to enable it. In Fig. 2a, one can see a network composed of three nodes 1,2, and 3, where node 1 forms a root SCC and nodes 2 and 3 form individual SCCs. Moreover, nodes 2 and 3 are symmetric. This means that monitoring node 1 alone is not sufficient to achieve observability, while monitoring node 1 and either node 2 or 3 will provide observability. In Fig. 2b, the symmetric ordered pairs (2,3), (4,5), (6,7), (8,9) form individual SCCs. To achieve observability we need to monitor node 1 along with at least three other nodes and each of these extra nodes need to be selected from three different symmetric pairs. The third case shown in Fig.2c is that of a network in which the ordered triples (2,3,4) and (5,6,7) are symmetric. Similarly to the case presented in Fig. 2b, for observability, we need to monitor node 1 and at least one other node from either ordered triplet. In the forth case, Fig. 2d, there are symmetries both inside the root SCC, as well as in the other two SCCs. A necessary set of sensor nodes for this case will be: either node 4 or 5, either node 2 or 3 and either node 6 Fig. 3. a) Inference diagram representation of a network with symmetries between two SCCs. b) Inference diagram representation of a network with symmetries between two root SCCs. c) Inference diagram representation of a network with symmetries between the SSCs. d) Inference diagram representation of a network with symmetries between two SCCs. We continue to analyze cases in which symmetries occur. We see from Fig. 3a, that nodes 2 and 3, are symmetric with respect to any node in the root SCC (if they are symmetric with respect to one they are symmetric with respect to all). In this case, for observability, we need to monitor either one of the nodes in the root SCC along with either node 2 or node 3. The case in Fig. 3a is that of a symmetry between two nodes in two different SCCs. By definition of SCC and root SCC, a node in a SCC and a node in a root SCC cannot be symmetric. However, there can be symmetries between nodes that belong to the same root SCC and also between nodes in different root SCCs (as shown in Fig. 3b). In Fig. 3b, the ordered triplets (1,2,3) and (4,5,6) are symmetric and there exist symmetries within each root SCC, nodes 2 and 3 are symmetric as well as nodes 5 and 6. In this case, by monitoring a node from each root SCC, the symmetries inside each root SCC are resolved and observability is achieved. The same symmetries are present in Fig. 3c, but in this case the triplets (1,2,3) and (4,5,6) contain nodes from both SCCs and root SCCs. However, nodes belonging to non-root (root) SCCs can only be swapped with other nodes belonging to non-root (root) SCCs. In Fig. 3d, nodes 2 and 4 are symmetric. Hence, as in the previous cases, monitoring only the root SCC is not sufficient for observability. Because of the symmetry generated by nodes 2 and 4, we need to monitor the root SCC node 1 and either node 2 or 4. V. A LGORITHM TO D ETERMINE THE M INIMAL S ET OF N ECESSARY S ENSOR N ODES FOR O BSERVABILITY In the cases presented in Figs. 2 and 3, in which symmetries are present, monitoring one node from each root SCC is not sufficient to obtain observability. In general, additional nodes need to be monitored. Here we focus on the effect of the network symmetries and present an algorithm that, given a ID with symmetries, returns a minimal set of necessary sensor nodes S for observability. First we present the algorithm for the case that there are no symmetries. Consider a diagram with z root SCCs. Each root SCC can be described by a set as follows, Π1 = [Π11 , Π12 , · · · , Π1n1 ], Π2 = [Π21 , Π22 , · · · , Π2n2 ], ··· (10) Πz = [Πz1 , Πz2 , · · · , Πznz ] where ni is the number of elements in the set i = 1, ..., z. Then as we need to choose a node from each root SCC, and as SCCs are disjoint sets, the minimal set of necessary sensor nodes for observability S = [Π1∗ , Π2∗ , ..., Πz∗ ], where Πi∗ is any element from the set Πi [1]. In the case of a ID with c > 0 symmetries, let a symmetry Si be represented by the following list of mi li -tuples, i Si = ((t1i ), (t2i ), ..., (tm i )), (11) i = 1, ..., c. Here, mi is the total number of tuples in Si (note that any permutation of tuples belonging to the same symmetry is equivariant with respect to the network dynamics (9)) and li is the number of elements of the tuples in Si . We call mi the number of symmetry Si and li the length of symmetry Si . Without loss of generality, we label the symmetries so that l1 ≤ l2 ≤ ... ≤ lc , i.e., in order of nondecreasing length. Now we introduce the definition of internal and external symmetry. A symmetry Si is internal to another symmetry Sj , j 6= i (or, equivalently, Sj is external to Si ) if there exists a tuple of Sj , say tkj , such that all the entries of the tuples t`i are also entries of tkj , ` = 1, ..., mi . In order to achieve observability, we need to include in S: (i) at least one element from each set Πi , i = 1, ..., z and (ii) at least one element from (mi − 1) different tuples of i Si , t1i , t2i , ..., tm i , i = 1, ..., c. Given a set of sensor nodes S, if condition (ii) is verified for a given i, we say that the root SCC Πi is resolved, and if condition (ii) is verified for a given i, we say that symmetry Si is resolved. We now present an efficient algorithm to obtain a minimal set of necessary sensor nodes S for observability, in the presence of symmetries. Our algorithm is based on the observation that if a symmetry does not present internal symmetries, it will be resolved by choosing any (mi − 1) elements from (mi − 1) different tuples. Otherwise, if a symmetry presents internal symmetries, then resolving the internal symmetries ensures that the external symmetry is resolved as well. As the algorithm proceeds by considering symmetries of nondecreasing length, it first resolves internal symmetries, which automatically also resolves the external ones. The algorithm consists of the following steps: 1) Consider symmetries in the order of nondecreasing length. For each symmetry that has not been already resolved, select any (mi − 1) elements from (mi − 1) different tuples and add them to S. Terminate when all symmetries have been resolved. 2) Consider one by one all the root strongly connected components. For each root strongly connected component that has not been already resolved, select any element and add it to S. As an example, we apply our algorithm to the ID representation in Fig. 4. This network is directed and is composed of 6 non-root SCCs and 1 root SCC. We computed the network symmetries by using the SAGE routine AUTOMORPHISM GROUP. The symmetries for this network are given by S1 = ((3), (4)), S2 = ((6), (7)), S3 = ((9), (10)), S4 = ((12), (13)), S5 = ((14, 15), (16, 17)), and S6 = ((2, 3, 4), (5, 6, 7), (8, 9, 10), (11, 12, 13)). In this case, m1 = m2 = m3 = m4 = m5 = 2 and m6 = 4; moreover, l1 = l2 = l3 = l4 = 1, l5 = 2, and l6 = 3. Note that the symmetries S1 , S2 , S3 , and S4 are all internal to S6 . According to our algorithm, we resolve the internal symmetries first. To do that, we choose one node from each one of the symmetries S1 , S2 , S3 , and S4 and add them to S. For example, a possible choice is to set S = [3, 6, 9, 12]. We see that with this S, we have automatically resolved the external symmetry S6 . In fact, S contains (m6 − 1) = 3 different nodes from (m6 − 1) = 3 different tuples of S6 . We then need to resolve S5 by choosing one node from either the tuple (14, 15) or (16, 17). Say we choose 14, then the updated set S is [3, 6, 9, 12, 14]. The network has one root SCC. According to step 2 of the algorithm, we need to choose one node from this root SCC, unless one is already included in S. Here node 1 is the only option and it has not been already selected. Then, the final set is S = [1, 3, 6, 9, 12, 14]. Note that this set is minimal, as eliminating any node from S would correspond to loss of observability. Fig. 4. The algorithm described in the text to obtain S, the minimal set of nodes for observability, has been applied to the network in the figure. We now apply our algorithm to two different real networks. First we consider the Zachary’s Karate club which represents friendship relations among 34 members [24], [25]. Since the network is undirected and connected, the whole network coincides with a root SCC (see Fig. 5 ). The symmetries for this network have been evidenced in Fig. 5, where same shapes (ovals, rectangles and circles) have been used to indicate nodes that are symmetric. By applying the algorithm, we find a minimum set of nodes necessary for observability S = [5, 15, 16, 18, 19, 21]. 17 7 5 13 4 12 8 32 25 6 11 1 3 No. of nodes 1 2 3 4 5 6 7 8 9 10 11 12 13 Name of The Neurons IL2DL IL2DR ASIL ASIR AINL SDQR DB05 AS08 PVDR DVB PLNR PHCR PLML Neuron Label No. 1 6 76 90 120 179 204 220 227 253 260 274 279 TABLE I T HE MINIMAL SET OF NECESSARY SENSOR NODES FOR OBSERVABILITY OF CHEMICAL SYNAPSE NETWORK OF C. ELEGANS ( DIRECTED NETWORK ). 18 14 26 28 2 24 27 29 10 9 22 34 33 30 20 31 23 21 19 15 16 Fig. 5. Undirected network for Zachary’s Karate Club [24], [25]. The ovals, circles and rectangles are presenting symmetries. We now consider the Caenorhabditis Elegans neuronal networks [26] formed of 279 neurons. These can be linked through connections of two different types, either chemical synapses or gap junctions. Here we focus on the network formed of chemical synapses alone, which is directed. This network is not fully connected, it has 42 SCCs, 11 of which are root SCCs. This network also presents some symmetries. A minimal set of necessary sensor nodes S for observability of the chemical synapses network can be found by using our algorithm and the results of our computations are presented in Table I. VI. C ONCLUSIONS In this paper we have presented an efficient algorithm to determine a minimal set of necessary sensor nodes for observability of complex network in the presence of network symmetries. These symmetries have been shown to be a typical property of several real networks [22]. We have shown that observability requires by a proper selection of the sensor nodes, which takes into account the network symmetries. Our method based on a graphical approach could be used to uncover the conditions required for the observation of neural and genetic networks, for which access to all the network states is limited and knowledge about the connectivity pattern is crucial. For example, this is relevant to the estimation of neuronal [11], [12] and genetic networks [4], [5], [6], [7], [8], [9], [10] and to numerous engineering applications [27], [28], [29], [30], [31]. R EFERENCES [1] Y.-Y. Liu, J.-J. Slotine, and A.-L. Barabási, “Observability of complex systems,” Proceedings of the National Academy of Sciences, vol. 110, no. 7, pp. 2460–2465, 2013. [2] B. N. Datta, Numerical methods for linear control systems: design and analysis. Academic Press, 2004, vol. 1. [3] S. Diop and M. Fliess, “Nonlinear observability, identifiability, and persistent trajectories,” in Decision and Control, 1991., Proceedings of the 30th IEEE Conference on. IEEE, 1991, pp. 714–719. [4] A. de la Fuente, P. Brazhnik, and P. Mendes, “Linking the genes: inferring quantitative gene networks from microarray data,” TRENDS in Genetics, vol. 18, no. 8, pp. 395–398, 2002. [5] N. Friedman, “Inferring cellular networks using probabilistic graphical models,” Science Signalling, vol. 303, no. 5659, p. 799, 2004. [6] A. De la Fuente and D. Makhecha, “Unravelling gene networks from noisy under-determined experimental perturbation data,” Systems biology, vol. 153, no. 4, p. 257, 2006. [7] J. Faith, B. Hayete, J. Thaden, I. Mogno, J. Wierzbowski, G. Cottarel, S. Kasif, J. Collins, and T. Gardner, “Large-scale mapping and validation of escherichia coli transcriptional regulation from a compendium of expression profiles,” PLoS biology, vol. 5, no. 1, p. e8, 2007. [8] D. Marbach, C. Mattiussi, and D. Floreano, “Replaying the evolutionary tape: Biomimetic reverse engineering of gene networks,” Annals of the New York Academy of Sciences, vol. 1158, no. 1, pp. 234–245, 2009. [9] R. De Smet and K. Marchal, “Advantages and limitations of current network inference methods,” Nature Reviews Microbiology, vol. 8, no. 10, pp. 717–729, 2010. [10] D. Marbach, R. Prill, T. Schaffter, C. Mattiussi, D. Floreano, and G. Stolovitzky, “Revealing strengths and weaknesses of methods for gene network inference,” Proceedings of the National Academy of Sciences, vol. 107, no. 14, pp. 6286–6291, 2010. [11] J. White, E. Southgate, J. Thomson, S. Brenner, J. White, E. Southgate, J. Thomson, and S. Brenner, “The structure of the nervous system of the nematode caenorhabditis elegans,” Philosophical Transactions of the Royal Society of London. B, Biological Sciences, vol. 314, no. 1165, pp. 1–340, 1986. [12] O. Sporns, G. Tononi, and R. Kötter, “The human connectome: a structural description of the human brain,” PLoS computational biology, vol. 1, no. 4, p. e42, 2005. [13] R. E. Kalman, “Mathematical description of linear dynamical systems,” Journal of the Society for Industrial and Applied Mathematics, Series A: Control, vol. 1, no. 2, pp. 152–192, 1963. [14] C.-T. Lin, “Structural controllability,” IEEE Transactions on Automatic Control, vol. 19, no. 3, pp. 201–208, 1974. [15] K. Murota, Matrices and matroids for systems analysis. Springer Science & Business Media, 2009, vol. 20. [16] R. Shields and J. Pearson, “Structural controllability of multiinput linear systems,” IEEE Transactions on Automatic control, vol. 21, no. 2, pp. 203–212, 1976. [17] K. Glover and L. Silverman, “Characterization of structural controllability,” IEEE Transactions on Automatic control, vol. 21, no. 4, pp. 534–537, 1976. [18] C. Sueur and G. Dauphin-Tanguy, “Structural controllability/observability of linear systems represented by bond graphs,” Journal of the Franklin Institute, vol. 326, no. 6, pp. 869–883, 1989. [19] Y.-Y. Liu, J.-J. Slotine, and A.-L. Barabási, “Controllability of complex networks,” Nature, vol. 473, no. 7346, pp. 167–173, 2011. [20] E. Nuutila and E. Soisalon-soininen, “On finding the strongly connected components in a directed graph,” Information Processing Letters, vol. 49, 1994. [21] L. M. Pecora, F. Sorrentino, A. M. Hagerstrom, T. E. Murphy, and R. Roy, “Cluster synchronization and isolated desynchronization in complex networks with symmetries,” Nature Communications, vol. 5, 2014. [22] B. D. MacArthur, R. J. Sánchez-Garcı́a, and J. W. Anderson, “On automorphism groups of networks,” Discrete Applied Mathematics, vol. 156, p. 3525, 2008. [23] W. Stein et al., Sage Mathematics Software (Version 7.5.1), The Sage Development Team, YYYY, http://www.sagemath.org. [24] W. W. Zachary, “An information flow model for conflict and fission in small groups,” Journal of anthropological research, pp. 452–473, 1977. [25] M. Girvan and M. E. Newman, “Community structure in social and biological networks,” Proceedings of the National Academy of Sciences, vol. 99, no. 12, pp. 7821–7826, 2002. [26] L. R. Varshney, B. L. Chen, E. Paniagua, D. H. Hall, and D. B. Chklovskii, “Structural properties of the caenorhabditis elegans neuronal network,” PLoS computational biology, vol. 7, no. 2, p. e1001066, 2011. [27] R. Autariello, R. Dzakpasu, and F. Sorrentino, “Estimating the structure of small dynamical networks from the state time evolution of one node,” Physical Review E, vol. 87, no. 1, p. 012915, 2013. [28] N. Bezzo, F. Sorrentino, and R. Fierro, “Decentralized estimation of topology changes in wireless robotic networks,” Proceedings of the American Control Conference, 2013. [29] I. I. Hussein, F. Sorrentino, and R. Erwin, “Bayesian hybrid estimation of lti networked systems using finite set statistics,” Proceedings of the American Control Conference, 2013. [30] F. Sorrentino and E. Ott, “Adaptive synchronization of dynamics on evolving complex networks,” Physical review letters, vol. 100, no. 11, p. 114101, 2008. [31] ——, “Using synchronization of chaos for adaptive learning of network topology,” Physics Review E., no. 80, p. 056206, 2009.
8cs.DS
HDLTex: Hierarchical Deep Learning for Text Classification Kamran Kowsari∗ , Donald E. Brown§‡ , Mojtaba Heidarysafa§ , Kiana Jafari Meimandi§ , Matthew S. Gerber§‡ , and Laura E. Barnes§‡ ∗ Department arXiv:1709.08267v2 [cs.LG] 6 Oct 2017 § of Computer Science, University of Virginia, Charlottesville, VA, USA Department of System and Information Engineering, University of Virginia, Charlottesville, VA, USA ‡ Data Science Institute, University of Virginia, Charlottesville, VA, USA {kk7nc, deb, mh4pk, kj6vd, msg8u, lbarnes}@virginia.edu Index Terms—Text Mining; Document Classification; Deep Neural Networks; Hierarchical Learning; Deep Learning within its overall field and the accompanying sub-field. This is hierarchical classification. Although many existing approaches to document classification can quickly identify the overall area of a document, few of them can rapidly organize documents into the correct subfields or areas of specialization. Further, the combination of top-level fields and all sub-fields presents current document classification approaches with a combinatorially increasing number of class labels that they cannot handle. This paper presents a new approach to hierarchical document classification that we call Hierarchical Deep Learning for Text classification (HDLTex).1 HDLTex combines deep learning architectures to allow both overall and specialized learning by level of the document hierarchy. This paper reports our experiments with HDLTex, which exhibits improved accuracy over traditional document classification methods. I. I NTRODUCTION II. R ELATED W ORK Each year scientific researchers produce a massive number of documents. In 2014 the 28,100 active, scholarly, peerreviewed, English-language journals published about 2.5 million articles, and there is evidence that the rate of growth in both new journals and publications is accelerating [1]. The volume of these documents has made automatic organization and classification an essential element for the advancement of basic and applied research. Much of the recent work on automatic document classification has involved supervised learning techniques such as classification trees, naı̈ve Bayes, support vector machines (SVM), neural nets, and ensemble methods. Classification trees and naı̈ve Bayes approaches provide good interpretability but tend to be less accurate than the other methods. However, automatic classification has become increasingly challenging over the last several years due to growth in corpus sizes and the number of fields and sub-fields. Areas of research that were little known only five years ago have now become areas of high growth and interest. This growth in sub-fields has occurred across a range of disciplines including biology (e.g., CRISPR-CA9), material science (e.g., chemical programming), and health sciences (e.g., precision medicine). This growth in sub-fields means that it is important to not just label a document by specialized area but to also organize it Document classification is necessary to organize documents for retrieval, analysis, curation, and annotation. Researchers have studied and developed a variety of methods for document classification. Work in the information retrieval community has focused on search engine fundamentals such as indexing and dictionaries that are considered core technologies in this field [2]. Considerable work has built on these foundational methods to provide improvements through feedback and query reformulation [3], [4]. More recent work has employed methods from data mining and machine learning. Among the most accurate of these techniques is the support vector machine (SVM) [5]–[7]. SVMs use kernel functions to find separating hyperplanes in high-dimensional spaces. Other kernel methods used for information retrieval include string kernels such as the spectrum kernel [8] and the mismatch kernel [9], which are widely used with DNA and RNA sequence data. SVM and related methods are difficult to interpret. For this reason many information retrieval systems use decision trees [3] and naı̈ve Bayes [10], [11] methods. These methods are easier to understand and, as such, can support query Abstract—Increasingly large document collections require improved information processing methods for searching, retrieving, and organizing text. Central to these information processing methods is document classification, which has become an important application for supervised learning. Recently the performance of traditional supervised classifiers has degraded as the number of documents has increased. This is because along with growth in the number of documents has come an increase in the number of categories. This paper approaches this problem differently from current document classification methods that view the problem as multi-class classification. Instead we perform hierarchical classification using an approach we call Hierarchical Deep Learning for Text classification (HDLTex). HDLTex employs stacks of deep learning architectures to provide specialized understanding at each level of the document hierarchy. 1 HDLTex is shared as an open source tool at https://github.com/kk7nc/ HDLTex reformulation, but they lack accuracy. Some recent work has investigated topic modeling to provide similar interpretations as naı̈ve Bayes methods but with improved accuracy [12]. This paper uses newer methods of machine learning for document classification taken from deep learning. Deep learning is an efficient version of neural networks [13] that can perform unsupervised, supervised, and semi-supervised learning [14]. Deep learning has been extensively used for image processing, but many recent studies have applied deep learning in other domains such as text and data mining. The basic architecture in a neural network is a fully connected network of nonlinear processing nodes organized as layers. The first layer is the input layer, the final layer is the output layer, and all other layers are hidden. In this paper, we will refer to these fully connected networks as Deep Neural Networks (DNN). Convolutional Neural Networks (CNNs) are modeled after the architecture of the visual cortex where neurons are not fully connected but are spatially distinct [15]. CNNs provide excellent results in generalizing the classification of objects in images [16]. More recent work has used CNNs for text mining [17]. In research closely related to the work in this paper, Zhang et al. [18] used CNNs for text classification with character-level features provided by a fully connected DNN. Regardless of the application, CNNs require large training sets. Another fundamental deep learning architecture used in this paper is the Recurrent Neural Network (RNN). RNNs connect the output of a layer back to its input. This architecture is particularly important for learning time-dependent structures to include words or characters in text [19]. Deep learning for hierarchical classification is not new with this paper, although the specific architectures, the comparative analyses, and the application to document classification are new. Salakhutdinov [20], [21] used deep learning to hierarchically categorize images. At the top level the images are labeled as animals or vehicles. The next level then classifies the kind of animal or vehicle. This paper describes the use of deep learning approaches to create a hierarchical document classification approach. These deep learning methods have the promise of providing greater accuracy than SVM and related methods. Deep learning methods also provide flexible architectures that we have used to produce hierarchical classifications. The hierarchical classification our methods produce is not only highly accurate but also enables greater understanding of the resulting classification by showing where the document sits within a field or area of study. III. BASELINE T ECHNIQUES This paper compares fifteen methods for performing document classification. Six of these methods are baselines since they are used for traditional, non-hierarchical document classification. Of the six baseline methods three are widely used for document classification: term-weighted support vector machines [22], multi-word support vector machines [23], and naı̈ve Bayes classification (NBC). The other three are newer deep learning methods that form the basis for our implementation of a new approach for hierarchical document classification. These deep learning methods are described in Section V. A. Support Vector Machines (SVMs) Vapnik and Chervonenkis introduced the SVM in 1963 [24], [25], and in 1992 Boser et al. introduced a nonlinear version to address more complex classification problems [26]. The key idea of the nonlinear SVM is the generating kernel shown in Equation 1, followed by Equations 2 and 3: K(x, x0 ) =< φ(x), φ(x0 ) > X f (x) = αi K(x, xi ) + b max α1 ,...,αn xi ∈training n X αi − i=1 n (1) (2) n 1 XX αj αk yj yk K(xj , xk ) 2 j=1 k=1 (3) ∀αi ≥ 0i ∈ 1, .., n. Multi-Class SVM: Text classification using string kernels within SVMs has been successful in many research projects [27]. The original SVM solves a binary classification problem; however, since document classification often involves several classes, the binary SVM requires an extension. In general, the multi-class SVM (MSVM) solves the following optimization: min w1 ,w2 ,..,wk ,ζ 1X T wk wk + C 2 k X ζi (4) (xi ,yi )∈D st. wyTi x − wkT x ≤ i − ζi , ∀(xi , yi ) ∈ D, k ∈ {1, 2, ..., K}, k 6= yi (5) where k indicates number of classes, ζi are slack variables, and w is the learning parameter. To solve the MSVM we construct a decision function of all k classes at once [22], [28]. One approach to MSVM is to use binary SVM to compare each of the k(k − 1) pairwise classification labels, where k is the number of labels or classes. Yet another technique for MSVM is one-versus-all, where the two classes are one of the k labels versus all of the other k − 1 labels. Stacking Support Vector Machines (SVM): We use Stacking SVMs as another baseline method for comparison with HDLTex. The stacking SVM provides an ensemble of individual SVM classifiers and generally produces more accurate results than single-SVM models [29], [30]. B. Naı̈ve Bayes classification Naı̈ve Bayes is a simple supervised learning technique often used for information retrieval due to its speed and interpretability [2], [31]. Suppose the number of documents is n and each document has the label c, c ∈ {c1 , c2 , ..., ck }, where k is the number of labels. Naı̈ve Bayes calculates P (c | d) = P (d | c)P (c) P (d) (6) Input Layer Output High Level Hidden Layer ... ... ... ... 𝑥0 𝑥1 ... 𝑥𝑖 ... ... ... ... .. ... . ... ... ... .. ... . 𝑥𝑓−1 𝑥𝑓 Train Ψ Input Layer Ψ 𝑥Ψ 0 ,0 ... 𝑦0 Computer Ψ1 Science 𝑥Ψ 0 ,𝑖 ... 𝑦1 ... ... 𝑦𝑖 ... ... ... ... 𝑦𝑚 −1 ... 𝑦𝑚 ... ... ... ... .. ... . ... ... ... .. ... . ... ... 𝑥Ψ 0 ,𝑓 ... ... Medical Science ... ... 𝑥Ψ 𝑘 ,0 Ψ𝑘 ... ... 𝑥Ψ 𝑘 ,𝑖 Output Hidden Layer ... ... .. ... . ... ... .. ... . ... ... ... ... 𝑦Ψ 0 ,𝑖 ... Machine Learning 𝑦Ψ 0 ,𝑚 ... ... ... ... 𝑥Ψ 𝑘 ,𝑓 List of area Computer Graphics 𝑦Ψ 0 ,0 𝑦Ψ 𝑘 ,0 ... ... Concer Research 𝑦Ψ 𝑘 ,𝑖 ... 𝑦Ψ 𝑘 ,𝑚 HIV/AIDS Research Fig. 1: HDLTex: Hierarchical Deep Learning for Text Classification. This is our Deep Neural Network (DNN) approach for text classification. The left figure depicts the parent-level of our model, and the right figure depicts child-level models defined by Ψi as input documents in the parent level. where d is the document, resulting in CM AP = arg max P (d | c)P (c) c∈C = arg max P (x1 , x2 , ..., xn | c)P (c). (7) fj,n =[x(j,0) , ..., x(j,k−1) , xj,{0,1} , ..., c∈C The naı̈ve Bayes document classifier used for this study uses word-level classification [11]. Let θ̂j be the parameter for word j, then P (cj | di ; θ̂) = P (cj | θ̂)P (di | cj ; θ̂j ) P (di | θ̂) . Where the counts are indexed by the maximum N -grams. So Feature count (2) includes both 1-grams and 2-grams. The resulting DNN feature space is (8) IV. F EATURE E XTRACTION Documents enter our hierarchical models via features extracted from the text. We employed different feature extraction approaches for the deep learning architectures we built. For CNN and RNN, we used the text vector-space models using 100 dimensions as described in Glove [32]. A vector-space model is a mathematical mapping of the word space, defined as dj = (w1,j , w2,j , ..., wi,j ..., wlj ,j ) (9) where lj is the length of the document j, and wi,j is the Glove word embedding vectorization of word i in document j. For DNN, we used count-based and term frequency–inverse document frequency (tf-idf) for feature extraction. This approach uses counts for N -grams, which are sequences of N words [33], [34]. For example, the text “In this paper we introduced this technique” is composed of the following Ngrams: • Feature count (1): { (In, 1) , (this, 2), (paper, 1), (we, 1), (introduced, 1), (technique, 1) } • Feature count (2): { (In, 1) , (this, 2), (paper, 1), (we, 1), (introduced, 1), (technique, 1), (In this, 1), (This paper, 1), (paper we, 1),...} xj,{k−2,k−1} , ..., xj,{k−n,...,k−1} ] (10) where f is the feature space of document j for n-grams of size n, n ∈ {0, 1, ..., N }, and x is determined by word or ngram counts. Our algorithm is able to use N-grams for features within deep learning models [35]. V. D EEP L EARNING N EURAL N ETWORKS The methods used in this paper extend the concepts of deep learning neural networks to the hierarchical document classification problem. Deep learning neural networks provide efficient computational models using combinations of nonlinear processing elements organized in layers. This organization of simple elements allows the total network to generalize (i.e., predict correctly on new data) [36]. In the research described here, we used several different deep learning techniques and combinations of these techniques to create hierarchical document classifiers. The following subsections provide an overview of the three deep learning architectures we used: Deep Neural Networks (DNN), Recurrent Neural Networks(RNN), and Convolutional Neural Networks (CNN). A. Deep Neural Networks (DNN) In the DNN architecture each layer only receives input from the previous layer and outputs to the next layer. The layers are fully connected. The input layer consists of the text features (see IV) and the output layer has a node for each classification label or only one node if it is a binary classification. This architecture is the baseline DNN. Additional details on this architecture can be found in [37]. 𝑦Ψ 1 ,0 𝑦Ψ 1 ,1 𝑦Ψ 1 ,𝑚 𝑦Ψ 𝑘 ,0 ... LSTM/GRU LSTM/GRU LSTM/GRU ... LSTM/GRU LSTM/GRU LSTM/GRU 𝑥Ψ 1 ,𝑓 𝑥Ψ 𝑘 ,0 𝑥Ψ 𝑘 ,𝑖 ... ... 𝑦1 Ψ1 𝑦1 ... LSTM/GRU ... LSTM/GRU ... 𝑥Ψ 1 ,𝑖 LSTM/GRU ... 𝑥Ψ 1 ,0 LSTM/GRU 𝑦𝑘 ... ... ... LSTM/GRU 𝑦Ψ 𝑘 ,𝑚 ... ... ... ... LSTM/GRU 𝑦Ψ 𝑘 ,1 ... 𝑥Ψ 𝑘 ,𝑓 Ψ𝑘 ... LSTM/GRU LSTM/GRU ... LSTM/GRU ... LSTM/GRU ... ... ... LSTM/GRU LSTM/GRU 𝑥0 𝑥1 ... 𝑥𝑛 Fig. 2: HDLTex: Hierarchical Deep Learning for Text Classification. This is our structure of recurrent neural networks (RNN) for text classification. The left figure is the parent level of our text leaning model. The right figure depicts child-level learning models defined by Ψi as input documents in the parent levels. This paper extends this baseline architecture to allow hierarchical classification. Figure 1 shows this new architecture. The DNN for the first level of classification (on the left side in Figure 1) is the same as the baseline DNN. The second level classification in the hierarchy consists of a DNN trained for the domain output in the first hierarchical level. Each second level in the DNN is connected to the output of the first level. For example, if the output of the first model is labeled computer science then the DNN in the next hierarchical level (e.g., Ψ1 in Figure 1) is trained only with all computer science documents. So while the first hierarchical level DNN is trained with all documents, each DNN in the next level of the document hierarchy is trained only with the documents for the specified domain. The DNNs in this study are trained with the standard backpropagation algorithm using both sigmoid (Equation 11) and ReLU (Equation 12) as activation functions. The output layer uses softmax (Equation 13). 1 ∈ (0, 1), 1 + e−x f (x) = max(0, x), ezj σ(z)j = PK , zk k=1 e ∀ j ∈ {1, . . . , K} f (x) = (11) (12) (13) Given a set of example pairs (x, y), x ∈ X, y ∈ Y the goal is to learn from the input and target spaces using hidden layers. In text classification, the input is generated by vectorization of text (see Section IV). B. Recurrent Neural Networks (RNN) The second deep learning neural network architecture we use is RNN. In RNN the output from a layer of nodes can reenter as input to that layer. This approach has advantages for text processing [38]. The general RNN formulation is given in Equation 14 where xt is the state at time t and ut refers to the input at step t. xt = F (xt−1 , ut , θ) (14) We use weights to reformulate Equation 14 as shown in Equation 15 below: xt = Wrec σ(xt−1 ) + Win ut + b. (15) In Equation 15, Wrec is the recurrent matrix weight, Win are the input weights, b is the bias, and σ is an element-wise function. Again we have modified the basic architecture for use in hierarchical classification. Figure 2 shows this extended RNN architecture. Several problems (e.g., vanishing and exploding gradients) arise in RNNs when the error of the gradient descent algorithm is back-propagated through the network [39]. To deal with these problems, long short-term memory (LSTM) is a special type of RNN that preserves long-term dependencies in a more effective way compared with the basic RNN. This is particularly effective at mitigating the vanishing gradient problem [40]. ℎ𝑡−1 ℎ𝑡 1- in text [41]. A gated recurrent unit (GRU) is a gating mechanism for RNNs that was introduced in 2014 [42]. GRU is a simplified variant of the LSTM architecture, but there are differences as follows: GRUs contain two gates, they do not possess internal memory (the Ct−1 in Figure 3), and a second non-linearity is not applied (tanh in Figure 3). C. Convolutional Neural Networks (CNN) 𝜎 𝜎 tanh ℎ𝑡 𝑥𝑡 𝐶𝑡−1 𝐶𝑡 tanh 𝜎 𝜎 tanh 𝜎 ℎ𝑡−1 ℎ𝑡 𝑥𝑡 Fig. 3: The top sub-figure is a cell of GRU, and the bottom Figure is a cell of LSTM. Figure 3 shows the basic cell of an LSTM model. Although LSTM has a chain-like structure similar to RNN, LSTM uses multiple gates to regulate the amount of information allowed into each node state. A step-by-step explanation the LSTM cell and its gates is provided below: 1) Input Gate: it = σ(Wi [xt , ht−1 ] + bi ), (16) 2) Candid Memory Cell Value: C̃t = tanh(Wc [xt , ht−1 ] + bc ), D. Hierarchical Deep Learning (17) 3) Forget Gate Activation: ft = σ(Wf [xt , ht−1 ] + bf ), (18) 4) New Memory Cell Value: Ct = it ∗ C̃t + ft Ct−1 , (19) 5) Output Gate Values: ot =σ(Wo [xt , ht−1 ] + bo ), ht =ot tanh(Ct ), The final deep learning approach we developed for hierarchical document classification is the convolutional neural network (CNN). Although originally built for image processing, as discussed in Section II, CNNs have also been effectively used for text classification [15]. The basic convolutional layer in a CNN connects to a small subset of the inputs usually of size 3 × 3. Similarly the next convolutional layer connects to only a subset of its preceding layer. In this way these convolution layers, called feature maps, can be stacked to provide multiple filters on the input. To reduce computational complexity, CNNs use pooling to reduce the size of the output from one stack of layers to the next in the network. Different pooling techniques are used to reduce outputs while preserving important features [43]. The most common pooling method is max-pooling where the maximum element is selected in the pooling window. In order to feed the pooled output from stacked featured maps to the next layer, the maps are flattened into one column. The final layers in a CNN are typically fully connected. In general during the back-propagation step of a CNN not only the weights are adjusted but also the feature detector filters. A potential problem of CNNs used for text is the number of channels or size of the feature space. This might be very large (e.g., 50K words) for text, but for images this is less of a problem (e.g., only 3 channels of RGB) [14]. (20) In the above description, b is a bias vector, W is a weight matrix, and xt is the input to the memory cell at time t. The i, c, f and o indices refer to input, cell memory, forget and output gates, respectively. Figure 3 shows the structure of these gates with a graphical representation. An RNN can be biased when later words are more influential than the earlier ones. To overcome this bias convolutional neural network (CNN) models (discussed in Section V-C) include a max-pooling layer to determine discriminative phrases The primary contribution of this research is hierarchical classification of documents. A traditional multi-class classification technique can work well for a limited number classes, but performance drops with increasing number of classes, as is present in hierarchically organized documents. In our hierarchical deep learning model we solve this problem by creating architectures that specialize deep learning approaches for their level of the document hierarchy (e.g., see Figure 1). The structure of our Hierarchical Deep Learning for Text (HDLTex) architecture for each deep learning model is as follows: DNN: 8 hidden layers with 1024 cells in each hidden layer. RNN: GRU and LSTM are used in this implementation, 100 cells with GRU with two hidden layers. CNN: Filter sizes of {3, 4, 5, 6, 7} and max-pool of 5, layer sizes of {128, 128, 128} with max pooling of {5, 5, 35}, the CNN contains 8 hidden layers. All models used the following parameters: Batch Size = 128, learning parameters = 0.001, β1 =0.9, β2 =0.999,  = 1e08 , decay = 0.0, Dropout=0.5 (DNN) and Dropout=0.25 (CNN and RNN). E. Evaluation We used the following cost function for the deep learning models: X  Acc(XΨ% ) Acc(X) = k% − 1 %  (21) X Acc(XΨi ).nΨk Ψ∈{Ψ1 ,..Ψk } where % is the number of levels, k indicates number of classes for each level, and Ψ refers to the number of classes in the child’s level of the hierarchical model. F. Optimization We used two types of stochastic gradient optimization for the deep learning models in this paper: RMSProp and Adam. These are described below. RMSProp Optimizer: The basic stochastic gradient descent (SGD) is shown below: θ ← θ − α∇θ J(θ, xi , yi )  θ ← θ − γθ + α∇θ J(θ, xi , yi ) (22) (23) For these equations, θ is the learning parameter, α is the learning rate, and J(θ, xi , yi ) is the objective or cost function. The history of updates is defined by γ ∈ (0, 1). To update parameters, SGD uses a momentum term on a rescaled gradient, which is shown in Equation (23). This approach to the optimization does not perform bias correction, which is a problem for a sparse gradient. Adam Optimizer: Adam is another stochastic gradient optimizer, which averages over only the first two moments of the gradient, v and m, as shown below: α θ ←θ − √ m̂ (24) v̂ +  where gi,t = ∇θ J(θi , xi , yi ) (25) mt = β1 mt−1 + (1 − β1 )gi,t (26) 2 mt = β2 vt−1 + (1 − β2 )gi,t (27) k% , which contain {17, 16, 19, 9, 11, 53, 9} specific topics belonging to k0 , respectively. To train and test the baseline methods described in Section III and the new hierarchical document classification methods described in Section V, we collected data and meta-data on 46, 985 published papers available from the Web Of Science [45], [46]. To automate collection we used Selenium [47] with ChoromeDriver [48] for the Chrome web browser. To extract the data from the site we used Beautiful Soup [49]. We specifically extracted the abstract, domain, and keywords of this set of published papers. The text in the abstract is the input for classification while the domain name provides the label for the top level of the hierarchy. The keywords provide the descriptors for the next level in the classification hierarchy. Table I shows statistics for this collection. For example, Medical Sciences is one of the top-level domain classifications and there are 53 sub-classifications within this domain. There are also over 14k articles or documents within the domain of health sciences in this data set. TABLE I: Details of the document set used in this paper. Domain Biochemistry Civil Engineering Computer Science Electrical Engineering Medical Sciences Mechanical Engineering Psychology Total Number of Document 5,687 4,237 6,514 5,483 14,625 3,297 7,142 46,985 Number of Area 9 11 17 16 53 9 19 134 We divided the data set into three parts as shown in Table II. Data set W OS − 46985 is the full data set with 46,985 documents, and data sets W OS −11967 and W OS −5736 are subsets of this full data set with the number of training and testing documents shown as well as the number of labels or classes in each of the two levels. For dataset W OS − 11967, each of the seven level-1 classes has five sub-classes. For data set W OS − 5736, two of the three higher-level classes have four sub-classes and the last high-level class has three subclasses. We removed all special characters from all three data sets before training and testing. In these equations, mt and vt are the first and second moments, vt mt ˆt = 1−β respectively. Both are estimated as m̂t = 1−β t and v t. 1 2 This approach can handle the non-stationarity of the objective function as can RMSProp, but Adam can also overcome the sparse gradient issue that is a drawback in RMSProp [44]. TABLE II: Details of three data sets used in this paper. VI. R ESULTS B. Hardware and Implementation The following results were obtained using a combination of central processing units (CPUs) and graphical processing units (GPUs). The processing was done on a Xeon E5 − 2640 (2.6GHz) with 32 cores and 64GB memory, and the GPU cards were N vidia Quadro K620 and N vidia T esla K20c. We implemented our approaches in Python using the Compute Unified Device Architecture (CUDA), which is a parallel computing platform and A. Data Our document collection had 134 labels as shown in Table I.2 The target value has two levels, k0 ∈ {1, .., 7} which are k0 ∈ { Computer Science, Electrical Engineering, Psychology, Mechanical Engineering, Civil Engineering, Medical Science, biochemistry} and children levels of the labels, 2 WOS dataset is shared at http://archive.ics.uci.edu/index.php Data Set WOS-11967 WOS-46985 WOS-5736 Training 8018 31479 4588 Testing 3949 15506 1148 Level 1 7 7 3 Level 2 35 134 11 TABLE III: HDLTex and Baseline Accuracy of three WOS datasets Baseline HDLTex WOS-11967 Methods DNN CNN (Yang el. et. 2016) RNN (Yang el. et. 2016) NBC SVM (Zhang el. et. 2008) SVM (Chen el et. 2016) Stacking SVM DNN DNN 91.43 91.58 DNN CNN 91.43 91.12 DNN RNN 91.43 89.23 CNN DNN 93.52 91.58 CNN CNN 93.52 91.12 CNN RNN 93.52 89.23 RNN DNN 93.98 91.58 RNN CNN 93.98 91.12 RNN RNN 93.98 89.23 Accuracy 80.02 83.29 83.96 68.8 80.65 83.16 79.45 83.73 83.32 81.58 85.65 85.23 83.45 86.07 85.63 83.85 WOS-46985 Methods DNN CNN (Yang el. et. 2016) RNN (Yang el. et. 2016) NBC SVM (Zhang el. et. 2008) SVM (Chen el et. 2016) Stacking SVM DNN DNN 87.31 80.29 DNN CNN 87.31 82.35 DNN RNN 87.31 84.66 CNN DNN 88.67 80.29 CNN CNN 88.67 82.35 CNN RNN 88.67 84.66 RNN DNN 90.45 80.29 RNN CNN 90.45 82.35 RNN RNN 90.45 84.66 Application Programming Interface (API) model created by N vidia. We also used Keras and TensorFlow libraries for creating the neural networks [50], [51]. Accuracy 66.95 70.46 72.12 46.2 67.56 70.22 71.81 70.10 71.90 73.92 71.20 73.02 75.07 72.62 74.46 76.58 WOS-5736 Methods DNN CNN (Yang el. et. 20016) RNN (Yang el. et. 2016) NBC SVM (Zhang el. et. 2008) SVM (Chen el et. 2016) Stacking SVM DNN DNN 97.97 90.21 DNN CNN 97.97 92.34 DNN RNN 97.97 90.25 CNN DNN 98.47 90.21 CNN CNN 98.47 92.34 CNN RNN 98.47 90.25 RNN DNN 97.82 90.21 RNN CNN 97.82 92.34 RNN RNN 97.82 90.25 Accuracy 86.15 88.68 89.46 78.14 85.54 88.24 85.68 88.37 90.47 88.42 88.83 90.93 88.87 88.25 90.33 88.28 Finally the simpler data set W OS − 5736 has a winner in CNN at level 1 and CNN at level 2, but there is little difference between these scores and those obtained by two other HDLTex architectures: DNN with CNN and RNN with CNN. C. Empirical Results Table III shows the results from our experiments. The baseline tests compare three conventional document classification approaches (naı̈ve Bayes and two versions of SVM) and stacking SVM with three deep learning approaches (DNN, RNN, and CNN). In this set of tests the RNN outperforms the others for all three W OS data sets. CNN performs secondbest for three data sets. SVM with term weighting [22] is third for the first two sets while the multi-word approach of [23] is in third place for the third data set. The third data set is the smallest of the three and has the fewest labels so the differences among the three best performers are not large. These results show that overall performance improvement for general document classification is obtainable with deep learning approaches compared to traditional methods. Overall, naı̈ve Bayes does much worse than the other methods throughout these tests. As for the tests of classifying these documents within a hierarchy, the HDLTex approaches with stacked, deep learning architectures clearly provide superior performance. For data set W OS − 11967, the best accuracy is obtained by the combination RNN for the first level of classification and DNN for the second level. This gives accuracies of 94% for the first level, 92% for the second level and 86% overall. This is significantly better than all of the others except for the combination of CNN and DNN. For data set W OS − 46985 the best scores are again achieved by RNN for level one but this time with RNN for level 2. The closest scores to this are obtained by CNN and RNN in levels 1 and 2, respectively. VII. C ONCLUSIONS AND F UTURE W ORK Document classification is an important problem to address, given the growing size of scientific literature and other document sets. When documents are organized hierarchically, multi-class approaches are difficult to apply using traditional supervised learning methods. This paper introduces a new approach to hierarchical document classification, HDLTex, that combines multiple deep learning approaches to produce hierarchical classifications. Testing on a data set of documents obtained from the Web of Science shows that combinations of RNN at the higher level and DNN or CNN at the lower level produced accuracies consistently higher than those obtainable by conventional approaches using naı̈ve Bayes or SVM. These results show that deep learning methods can provide improvements for document classification and that they provide flexibility to classify documents within a hierarchy. Hence, they provide extensions over current methods for document classification that only consider the multi-class problem. The methods described here can improved in multiple ways. Additional training and testing with other hierarchically structured document data sets will continue to identify architectures that work best for these problems. Also, it is possible to extend the hierarchy to more than two levels to capture more of the complexity in the hierarchical classification. For example, if keywords are treated as ordered then the hierarchy continues down multiple levels. HDLTex can also be applied to unlabeled documents, such as those found in news or other media outlets. Scoring here could be performed on small sets using human judges. R EFERENCES [1] M. Ware and M. Mabe, “The stm report: An overview of scientific and scholarly journal publishing,” 2015. [2] C. D. Manning, P. Raghavan, H. Schütze et al., Introduction to information retrieval. Cambridge university press Cambridge, 2008, vol. 1, no. 1. [3] J. C. French, D. E. Brown, and N.-H. Kim, “A classification approach to boolean query reformulation,” JASIS, vol. 48, no. 8, pp. 694–706, 1997. [4] K. Kowsari, M. Yammahi, N. Bari, R. Vichr, F. Alsaby, and S. Y. Berkovich, “Construction of fuzzyfind dictionary using golay coding transformation for searching applications,” International Journal of Advanced Computer Science and Applications(IJACSA), vol. 6, pp. 81– 87, 2015. [5] T. Joachims, “Transductive inference for text classification using support vector machines,” in ICML, vol. 99, 1999, pp. 200–209. [6] S. Tong and D. Koller, “Support vector machine active learning with applications to text classification,” Journal of machine learning research, vol. 2, no. Nov, pp. 45–66, 2001. [7] M. Fernández-Delgado, E. Cernadas, S. Barro, and D. Amorim, “Do we need hundreds of classifiers to solve real world classification problems,” J. Mach. Learn. Res, vol. 15, no. 1, pp. 3133–3181, 2014. [8] C. S. Leslie, E. Eskin, and W. S. Noble, “The spectrum kernel: A string kernel for svm protein classification.” in Pacific symposium on biocomputing, vol. 7, no. 7, 2002, pp. 566–575. [9] E. Eskin, J. Weston, W. S. Noble, and C. S. Leslie, “Mismatch string kernels for svm protein classification,” in Advances in neural information processing systems, 2003, pp. 1441–1448. [10] A. McCallum, K. Nigam et al., “A comparison of event models for naive bayes text classification,” in AAAI-98 workshop on learning for text categorization, vol. 752. Citeseer, 1998, pp. 41–48. [11] S.-B. Kim, K.-S. Han, H.-C. Rim, and S. H. Myaeng, “Some effective techniques for naive bayes text classification,” IEEE transactions on knowledge and data engineering, vol. 18, no. 11, pp. 1457–1466, 2006. [12] N. Van Linh, N. K. Anh, K. Than, and C. N. Dang, “An effective and interpretable method for document classification,” Knowledge and Information Systems, vol. 50, no. 3, pp. 763–793, 2017. [13] G. E. Hinton and R. R. Salakhutdinov, “Reducing the dimensionality of data with neural networks,” science, vol. 313, no. 5786, pp. 504–507, 2006. [14] R. Johnson and T. Zhang, “Effective use of word order for text categorization with convolutional neural networks,” arXiv preprint arXiv:1412.1058, 2014. [15] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. [16] M. Oquab, L. Bottou, I. Laptev, and J. Sivic, “Learning and transferring mid-level image representations using convolutional neural networks,” in Proceedings of the IEEE conference on computer vision and pattern recognition, 2014, pp. 1717–1724. [17] J. Y. Lee and F. Dernoncourt, “Sequential short-text classification with recurrent and convolutional neural networks,” arXiv preprint arXiv:1603.03827, 2016. [18] X. Zhang, J. Zhao, and Y. LeCun, “Character-level convolutional networks for text classification,” in Advances in neural information processing systems, 2015, pp. 649–657. [19] L. Medsker and L. Jain, “Recurrent neural networks,” Design and Applications, vol. 5, 2001. [20] R. Salakhutdinov, J. B. Tenenbaum, and A. Torralba, “Learning with hierarchical-deep models,” IEEE transactions on pattern analysis and machine intelligence, vol. 35, no. 8, pp. 1958–1971, 2013. [21] G. B. Huang, H. Lee, and E. Learned-Miller, “Learning hierarchical representations for face verification with convolutional deep belief networks,” in Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on. IEEE, 2012, pp. 2518–2525. [22] K. Chen, Z. Zhang, J. Long, and H. Zhang, “Turning from tf-idf to tf-igm for term weighting in text classification,” Expert Systems with Applications, vol. 66, pp. 245–260, 2016. [23] W. Zhang, T. Yoshida, and X. Tang, “Text classification based on multiword with support vector machine,” Knowledge-Based Systems, vol. 21, no. 8, pp. 879–886, 2008. [24] V. Vapnik and A. Y. Chervonenkis, “A class of algorithms for pattern recognition learning,” Avtomat. i Telemekh, vol. 25, no. 6, pp. 937–945, 1964. [25] A. Y. Chervonenkis, “Early history of support vector machines,” in Empirical Inference. Springer, 2013, pp. 13–20. [26] B. E. Boser, I. M. Guyon, and V. N. Vapnik, “A training algorithm for optimal margin classifiers,” in Proceedings of the fifth annual workshop on Computational learning theory. ACM, 1992, pp. 144–152. [27] R. Singh, A. Sekhon, K. Kowsari, J. Lanchantin, B. Wang, and Y. Qi, “Gakco: a fast gapped k-mer string kernel using counting,” 2017. [28] J. Weston and C. Watkins, “Multi-class support vector machines,” Technical Report CSD-TR-98-04, Department of Computer Science, Royal Holloway, University of London, May, Tech. Rep., 1998. [29] A. Sun and E.-P. Lim, “Hierarchical text classification and evaluation,” in Data Mining, 2001. ICDM 2001, Proceedings IEEE International Conference on. IEEE, 2001, pp. 521–528. [30] F. Sebastiani, “Machine learning in automated text categorization,” ACM computing surveys (CSUR), vol. 34, no. 1, pp. 1–47, 2002. [31] D. D. Lewis, “Naive (bayes) at forty: The independence assumption in information retrieval,” in European conference on machine learning. Springer, 1998, pp. 4–15. [32] J. Pennington, R. Socher, and C. D. Manning, “Glove: Global vectors for word representation.” in EMNLP, vol. 14, 2014, pp. 1532–1543. [33] W. B. Cavnar, J. M. Trenkle et al., “N-gram-based text categorization,” Ann Arbor MI, vol. 48113, no. 2, pp. 161–175, 1994. [34] D. Glickman, “Comparing input words to a word dictionary for correct spelling,” Feb. 5 1985, uS Patent 4,498,148. [35] V. Kešelj, F. Peng, N. Cercone, and C. Thomas, “N-gram-based author profiles for authorship attribution,” in Proceedings of the conference pacific association for computational linguistics, PACLING, vol. 3, 2003, pp. 255–264. [36] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521, no. 7553, pp. 436–444, 2015. [37] J. Lanchantin, R. Singh, B. Wang, and Y. Qi, “Deep motif dashboard: Visualizing and understanding genomic sequences using deep neural networks,” arXiv preprint arXiv:1608.03644, 2016. [38] A. Karpathy, “The unreasonable effectiveness of recurrent neural networks,” http://karpathy.github.io/2015/05/21/rnn-effectiveness/, May 2015. [39] Y. Bengio, P. Simard, and P. Frasconi, “Learning long-term dependencies with gradient descent is difficult,” IEEE transactions on neural networks, vol. 5, no. 2, pp. 157–166, 1994. [40] R. Pascanu, T. Mikolov, and Y. Bengio, “On the difficulty of training recurrent neural networks.” ICML (3), vol. 28, pp. 1310–1318, 2013. [41] S. Lai, L. Xu, K. Liu, and J. Zhao, “Recurrent convolutional neural networks for text classification.” in AAAI, vol. 333, 2015, pp. 2267– 2273. [42] K. Cho, B. Van Merriënboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using rnn encoder-decoder for statistical machine translation,” arXiv preprint arXiv:1406.1078, 2014. [43] D. Scherer, A. Müller, and S. Behnke, “Evaluation of pooling operations in convolutional architectures for object recognition,” Artificial Neural Networks–ICANN 2010, pp. 92–101, 2010. [44] D. Kingma and J. Ba, “Adam: A method for stochastic optimization,” arXiv preprint arXiv:1412.6980, 2014. [45] O. Poungpair, A. Pootong, P. Tongtawe, T. Songserm, P. Tapchaisri, and W. Chaicumpa, “Web of science R ,” COMMUNICATIONS, 2013. [46] T. Reuters, “Web of science.” 2012. [47] S. Munzert, C. Rubba, P. Meißner, and D. Nyhuis, Automated data collection with R: A practical guide to web scraping and text mining. John Wiley & Sons, 2014. [48] U. Gundecha, Selenium Testing Tools Cookbook. Packt Publishing Ltd, 2015. [49] L. Richardson, “Beautiful soup,” https://www.crummy.com/software/ BeautifulSoup/, May 2017. [50] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin et al., “Tensorflow: Large-scale machine learning on heterogeneous distributed systems,” arXiv preprint arXiv:1603.04467, 2016. [51] F. Chollet et al., “Keras: Deep learning library for theano and tensorflow,” https:// keras.io/ , 2015.
1cs.CV
From (1) the probability of false alarm and detection can be expressed as at low signal-to-noise (SNR) respectively, for γ has little impact on the variance under H1.   N w2 1 Pf  erfc( ) (2) 2 2 N  w2 Performance evaluation of energy detector over generalized non-linear and shadowed composite fading channels using a Mixture Gamma Distribution   N w2 (1   )   N w2 (1   ) 1 1 Pd  erfc( )  erfc( ) 2 2 2 N w (1   ( )) 2 2 N w2 He Huang, et. al Beijing University of Posts and elecommunications, Beijing 100876, China The performance of energy detection (ED) for independent and identically distribution (i.i.d.) signal models is analyzed over generalized composite non-linear line-of-sight (LOS) and non-line-ofsight (NLOS) shadowed fading scenarios. The novel expressions for ακ-μ/Gamma and α-η-μ/Gamma fading channels have been derived to approximate by using the mixture gamma (MG) distribution under low instantaneous signal-to-noise (SNR) condition. On the basis of the deduced fading distributions, novel, exact and close-form detective models are derived to evaluate the sensing performance with different key fading parameters over generalized non-linear and shadowed composite fading channels. Average detection probability over composite shadowed fading channels: The probability density function (PDF) of composite shadowed fading channels can be expressed as [7, 8]  fchannel /Gamma ( )   fchannel ( | y) fYGamma ( y)dy |Y where fYGamma(y)=yk-1e-y/Ω/(Г(k)Ωk), k is the shaping parameter, Ω is the average SNR and Г(.) is the gamma function. With (4), [3, Eq. (8)] and [5, Eq. (1)], the PDF of non-linear shadowed composite fading channels can be expressed as f   /Gamma ( )  Summator 1  2 (1   ) 2e 1  2     (1  ) 4 f ( )   h    (  ) H  k 1   1 2   1 2   2  ) y  2     exp( ) y2 (5) y   ( k ) k 1 (   ) 1 2 1 ( ) 2 2  2 y2  4 y k 1e  0 exp(  4 y y4     / Gamma   1  (1  ) 0  I  1 (2  (1   ) dy 2 h  2 H  2 )I  y2  1 2 (  2  y2 ) (6) y  y e dy  ( k ) k where α is the nonlinear characteristics of the propagation medium, κ is the ratio between the total power of the dominant components and the total power of the scattered waves, μ represents the number of multipath waves. η is the power ratio between the in-phase and quadrature components in format I, h=(1+η)2/(4η), H=(1-η2)/(4η) and 0<η<∞. In format II η is the correlation coefficient between the in-phase and quadrature components, h=1/(1-η2), H=η/(1-η2) and -1<η<1. Io(.) denotes the modified Bessel function of the first kind with the order o. From [6, Eq. (5)], the PDF of MG can be expressed as S fMG ( )  v v 1e v (7) v1 where S is the number of terms,  v , βv and ζv are parameters that represent the potential fading and shadowing effects. The integration in (5) and (6) can be approximated with Gaussian-Laguerre quadrature  N 0 i 1 sum as  e x ( x)dx  i ( xi ) , xi and ωi are the abscissas and weight factors respectively [9, Eq. (25.4.45)]. Simplifying (5) and (6) with functional transformation for the form of (7) [10] like [7, Eq. (3)-Eq. (9)], 2  ( ,  ,  )    1 k  2 2 2 (1   )   ( k ) k   1 2 k 2  1  k   2 2 , i   ( ,  ,  )i xi e I  1 (2  xi ) (8)  S fMG:   /Gamma ( )    i i 1e i (| i ,i , i), x   2 (   )  i 1  i   ( ) l l 1 2 2 k   l 1 2 2 xi 2  k 1 2 2  k 2 1  k    2 I fMG:   /Gamma ( )    m m 1e  m x (|  m ,m , m), x  2 h  (  ) ( k ) H 1  2  k S m1 In Fig.1 the binary hypothesis can be derived as Eq. (1), if s(n) is CSCG random variable, ξ(γ)=2γ+γ2, else if s(n) is complex valued phase shift keying (PSK), ξ(γ)=2γ. H 0 ~ N ( N w2 , N w4 ); H1 ~ N ( N w2 (1   ), N w2 (1   ( ))) (1)  m   ( , ,  ) m S  ( ) l 1 1 l l (9) (    )  ,  m   ( , ,  )m xm Threshold Decision Fig. 1 general model of energy detection , i  k ,  i   l l h y2 2  ( ,  ,  )i S  ( , ,  )  BPF/FFT   ED model: The system block diagram of general model of ED is shown in Fig.1, the primary signal follows a binary hypothesis: H0 (y(n)=w(n), signal absent), H1 (y(n)=hs(n)+w(n), signal present). Where n=1,2,…,N, N is the number of simples, y(n) is the received signal, h is the wireless channel gain, w(n) is assumed i.i.d. circularly symmetric complex Gaussian (CSCG) noise which obeys N(0, σw2), s(n) is the primary signal which obeys N(0, σs2), λ is the threshold of ED, γ is the instantaneous SNR and γ=(|h|σs/σw)2 [6]. Noise Processing (4) 0 Introduction: Energy detection (ED) is a low-complexity valid spectrum sensing (SS) technology which is widely applied in unknown deterministic non-coherent signals processing in cognitive radios (CRs) [1], and it has been extensively used for the performance analysis of complicated and extreme multipath fading channels due to the advantage of detection without a prior knowledge and implementation simplicity [2-5]. Numerous types of detectors have been employed to detect primary signals in multiple communication systems (such as multicarrier system with orthogonal frequency-division multiplexing, multi-antenna communication and covariance-based detection etc) [6]. It is also known that the investigation of the effective performance evaluation of general short-term multipath physical fading models (for example, α-μ, κ-μ and η-μ etc) have been regarded as a critical work for unified small-scale models include classical cases as Rayleigh, Nakagami-m, Hoyt, Weibull and Rice distributions [7]. Furthermore, non-linear propagation medium models have been proposed to solve the problem of limited accuracy and generality for the patterns listed above [3, 4]. On the other hand, the composite fading distribution which combines short term and long term (e.g., gamma distribution) is applied to describe the intertwined effects of short-term and long-term fading in wireless communication [6-8]. To sum up, it is extremely meaningful to derive unified detective models over non-linear and shadowed composite fading channels for various ED models. In this letter, we derive the novel exact expressions for the average detection probability of general ED models over α-κ-μ/Gamma and α-ημ/Gamma fading channels with mixture gamma (MG) distribution. To the best of the present authors` work, these types of channels with MG distribution have not been studied for i.i.d. ED signals samples in the open literature. Besides, exact rational expressions with non-integer fading variables are deduced to solve the problem of sensing optimization for closed-form evaluation of generalized composite fading channels. Squaring Device (3)  l l 1 2 ( Hxi ) h (10)  2  y2 2 , m  k , m   (2 h)  2 xm (11) Novel and exact close-form expressions for α-κ-μ/Gamma, α-ημ/Gamma fading channels and the average detection probability with ED have been derived by using MG distribution to optimize the sensing performance. Numerical results demonstrate that the sensing performance can be effectively evaluated and optimized both for increasing ED simples and improving the corresponding fading parameters. Further the average probability of detection can be expressed as  Pd   PdED fMG ( )d  (12) 0 By using the identity erfc(-x)+erfc(x)=2, with (3), (9) and (11), (12) can be derived as  S 1 Pd   (1  erfc(C1  C2 )) v v 1e v d  2 v 1 0 References   1  1 S v  v 1e v erfc(C1  C2 )d |(C1,C2 )( 2 v1 0 (13) N N  ,  ) 2 2 2 N  w2 1 R. K. Mallik, R. D. Murch and Y. Li: “Channel Magnitude Based Energy Detection With Receive Diversity for Multi-Level Amplitude-Shift Keying in Rayleigh Fading,” IEEE Trans. Commun., 65 (2017) 3079 (DOI: 10.1109/TCOMM.2017.2690289). With the aid of [10, Eq. (2.8.9.1)], (9) and (11), (13) can be deduced as Pd  1  ( v 1) 1 S  1  v (1)v 1  ( v 1) ( (erfc(C2 )  e 2 v1 v v  v2  4 vC1C2 4 C12 erfc(C2  v 2C1 )) (14) 2 Salahat E. and Hakam A.: ‘Performance analysis of α-η-μ and α-κ-μ generalized mobile fading channels’, Proc. European Wireless 2014 20th European Wireless Conference, Barcelona, Spain, May 2014, pp. 1-6 3 Huang H. and Zhao C. L.: ‘Cooperative spectrum sensing over generalized fading channels based on energy detection’, China Commun., 2017, review after revision 4 Badarneh O. S. and Aloqlah M. S.: ‘Performance analysis of digital communication systems over α − η − μ fading channels’, IEEE Trans. Veh. Technol., 2016, 65, (10), pp. 7972-7981 5 Aldalgamouni T., Magableh A., Mater M., S. and Badarneh O. S.: ‘Capacity analysis of α − η − μ channels over different adaptive transmission protocols’, IET Commun., 2017, 11, (7), pp. 1114-1122 6 Atapattu, S., Tellambura, C., Jiang, H. and Rajatheva, N.: ‘Unified analysis of low-SNR energy detection and threshold selection’, IEEE Trans. Veh. Technol., 2015, 64, (11), pp. 50065019 7 Al-Hmood H. and Al-Raweshidy H. S.: ‘Unified modeling of composite κ−μ/gamma, η−μ/gamma, and α−μ/gamma fading channels using a mixture gamma distribution with applications to energy detection’, IEEE Antennas Wireless Propag. Lett., 2017, 16, pp. 104-108 8 Leonardo E. J. and Yacoub M. D.: ‘The product of two α-μ variates and the composite α-μ multipath shadowing model’, IEEE Trans. Veh. Technol., 2015, 64, (6), pp. 2720-2725 9 Abramowitz M. and Stegun I. A.: ‘Handbook of mathematical functions: with formulas, graphs, and mathematical tables’ (Dover, New York, USA 1965) 10 Prudnikov A. P., Brychkov Y. A., and Marichev O. I.: ‘Integrals and series, special function’ (Gordon and Breach, New York, USA 1986) vol. 2 Fig.2 The probability of miss detection versus κ and μ for different values of α and N, k=4, Ω=-5dB, σw2=1, Pf=0.01 Fig.3 The probability of miss detection versus η and μ for different values of α and N in format I , k=4, Ω=-5dB, σw2=1, Pf=0.01 Numerical results: Fig.1 and 2 present the probability of miss detection versus κ, η and μ for different values of α at low SNR condition. It can be observed that the capacity of detection improves as α increases because higher nonlinear fading parameter is corresponding to more power value to capture the nonlinear propagation effects, in addition, the improvement for the power ratio between dominant components and scattered waves and the multipath waves number will also cut down the miss detection probability. Furthermore, higher value of multipath waves has a more important effect for detection performance. However, the increases of η will reduce the detection probability because it represents the power ratio between in-phase and quadrature components of multiple paths. On the other hand, more importantly, as the number of simples for general models of ED increase, the probability of miss detection can be obviously improved and the ED algorithm has remarkable performance on optimizing sensing capacity over generalized non-linear and shadowed composite fading channels. Conclusion: In this letter, the performance of general models of ED under low SNR condition has been analyzed over generalized composite non-linear LOS and NLOS shadowed fading scenarios. 2
7cs.IT
Sum of squares certificates for stability of planar, homogeneous, and switched systems arXiv:1801.00070v1 [math.OC] 30 Dec 2017 Amir Ali Ahmadi and Pablo A. Parrilo ∗ Abstract We show that existence of a global polynomial Lyapunov function for a homogeneous polynomial vector field or a planar polynomial vector field (under a mild condition) implies existence of a polynomial Lyapunov function that is a sum of squares (sos) and that the negative of its derivative is also a sum of squares. This result is extended to show that such sos-based certificates of stability are guaranteed to exist for all stable switched linear systems. For this class of systems, we further show that if the derivative inequality of the Lyapunov function has an sos certificate, then the Lyapunov function itself is automatically a sum of squares. These converse results establish cases where semidefinite programming is guaranteed to succeed in finding proofs of Lyapunov inequalities. Finally, we demonstrate some merits of replacing the sos requirement on a polynomial Lyapunov function with an sos requirement on its top homogeneous component. In particular, we show that this is a weaker algebraic requirement in addition to being cheaper to impose computationally. 1 Introduction Consider a continuous time dynamical system ẋ = f (x), (1) where f : Rn → Rn is a polynomial and has an equilibrium at the origin, i.e., f (0) = 0. When a polynomial function V (x) : Rn → R is used as a candidate Lyapunov function for stability analysis of system (1), conditions of Lyapunov’s theorem reduce to a set of polynomial inequalities. For instance, if establishing global asymptotic stability of the origin is desired (see, e.g., [14, Chap. 4] for a formal definition), one would require a radially unbounded polynomial Lyapunov function candidate to satisfy: V (x) > 0 ∀x 6= 0 (2) V̇ (x) = h∇V (x), f (x)i < 0 ∀x 6= 0. (3) Here, V̇ denotes the time derivative of V along the trajectories of (1), ∇V is the gradient vector of V , and h., .i is the standard inner product in Rn . In some other variants of the analysis problem, e.g. if LaSalle’s invariance principle is to be used, or if the goal is to prove boundedness of trajectories of (1), then the inequality in (3) is replaced with V̇ (x) ≤ 0 ∗ ∀x. (4) Amir Ali Ahmadi is with the Department of Operations Research and Financial Engineering at Princeton University. Pablo A. Parrilo is with the Department of Electrical Engineering and Computer Science at MIT. Email: a a [email protected], [email protected]. 1 In either case, the problem arising from this analysis approach is that even though polynomials of a given degree are finitely parameterized, the computational problem of searching for a polynomial V satisfying inequalities of the type (2),(3),(4) is intractable. In fact, even deciding if a given polynomial V of degree four or larger satisfies (2) is NP-hard [17], [2, Prop. 1]. An approach pioneered in [19] and quite popular by now is to replace the positivity or nonnegativity conditions by the requirement of existence of a sum of squares (sos) decomposition (see Section 2 for a definition): V sos (5) −V̇ = −h∇V, f i sos. (6) Clearly, if a polynomial is a sum of squares of other polynomials, then it must be nonnegative. Moreover, it is well known that an sos decomposition constraint on a polynomial can be cast as a semidefinite programming (SDP) problem [20], which can be solved efficiently. 1 Over the last decade, Lyapunov analysis with sum of squares techniques has become a relatively well-established approach for a variety of problems in controls. Examples include stability analysis of switched and hybrid systems, design of nonlinear controllers, and formal verification of safetycritical systems, just to name a few; see, e.g., [11], [8], [13], [24], [18], and references therein. Despite the wealth of research in this area, the literature by and large focuses on proposing the sum of squares constraints as a sufficient condition for the underlying Lyapunov inequalities, without studying their necessity. For example, even for the basic notion of global asymptotic stability (GAS), the following question is to the best of our knowledge open: Problem 1: Does existence of a polynomial Lyapunov function satisfying (2)-(3) imply existence of a polynomial Lyapunov function (of possibly higher degree) satisfying (5)-(6)? We consider this question for polynomial vector fields, as well as switched systems, and provide a positive answer in some special cases. (We also study other related questions.) Before we outline our contributions, some remarks about the statement of Problem 1 are in order. First, we point out that between the two sos requirements in (5)-(6), the condition in (5) can simply be met by squaring a polynomial Lyapunov function (see Lemma 3.1). By contrast, the condition in (6) is typically more challenging to ensure. Second, we remark that imposing the sos conditions in (5)-(6) is not the only way to use the sos relaxation for proving GAS of (1). For example, even when polynomials are not sos, one can multiply them by a positive polynomial P these (e.g., a power of x2i ) and the result may become sos and then certify the desired inequalities. In this paper, however, we are interested in knowing whether the sos conditions on a Lyapunov function and its derivative can be met just by increasing the degree of the Lyapunov function. This is a very basic question in our opinion and it is in fact how the sos relaxation is most commonly used in practice. Finally, since our interest is mainly in establishing GAS of (1), a natural question that comes before Problem 1 is the following: “Does global asymptotic stability of a polynomial vector field imply existence of a polynomial Lyapunov function satisfying (2)-(3)?” The answer to this question is in general negative. The interested reader can find explicit counterexamples in [6], [3]. 1.1 Contributions Many of the results in this paper can be seen as establishing cases where semidefinite programming is guaranteed to succeed in finding proofs of Lyapunov inequalities. More precisely, in Section 3, we 1 If the SDP resulting from (5) and (6) is strictly feasible, then any interior solution automatically satisfies (2)-(3); see, e.g., [1, p. 41]. 2 give a positive answer to Problem 1 in the case where the vector field is homogeneous (Theorem 3.3) or when it is planar and an additional mild assumption is met (Theorem 3.5). The general case remains open. The proofs of these two theorems are quite simple and rely on powerful and relatively recent Positivstellensätze due to Scheiderer (Theorems 3.2 and 3.4). In Section 3.1, we extend these results for stability analysis of switched linear systems. These are a widely-studied subclass of hybrid systems. Our result combined with a result of Mason et al. [15] shows that if such a system is asymptotically stable under arbitrary switching, then it admits a common polynomial Lyapunov function that is sos and that the negative of its derivative is also sos (Theorem 3.7). We also show that for switched linear systems (both in discrete and continuous time), if the inequality on the decrease condition of a Lyapunov function is satisfied with a sum of squares certificate, then the Lyapunov function itself is automatically a sum of squares (Propositions 3.10 and 3.11). This statement, however, is shown to be false for nonlinear systems (Lemma 3.12). Finally, in Section 4, we demonstrate a related curious fact, that instead of requiring a candidate polynomial Lyapunov function to be sos, it is better to ask its top homogeneous component to be sos. We show that this still implies GAS (Proposition 4.1 and Lemma 4.2), is a weaker algebraic requirement (Lemma 4.2), introduces no conservative in dimension two, and is cheaper to impose. 1.2 Related literature In related work [21], [23], Peet and Papachristodoulou study similar questions for the notion of exponential stability on compact sets. In [21], Peet proves that exponentially stable polynomial systems have polynomial Lyapunov functions on bounded regions. In [22],[23], Peet and Papachristodoulou provide a degree bound for this Lyapunov function (depending on decay rate of trajectories) and show that it can be made sos. The question whether the inequality on the derivative of the Lyapunov function can also have an sos certificate is not studied in these references. 2 Preliminaries Throughout the paper, we will be concerned with Lyapunov functions that are (multivariate) polynomials. We say that a polynomial function V : Rn → R is nonnegative if V (x) ≥ 0 for all x, positive definite if V (x) > 0 for all x 6= 0, negative definite if −V is positive definite, and radially unbounded if V (x) → ∞ as ||x|| → ∞. A polynomial V of degree d is said to be homogeneous if it satisfies V (λx) = λd V (x) for any scalar λ ∈ R. This condition holds if and only if all monomials of V have degree d. A homogeneous polynomial is also called a form. The top homogeneous component of a polynomial p is the homogeneous polynomial formed by the collection of the highest order monomials of p. P 2 We say that a polynomial V is a sum of squares (sos) if V = m i qi for some polynomials qi . We do not present here the SDP that decides if a given polynomial is sos since it has already appeared in several places. The unfamiliar reader is referred to [20]. If V is sos, then V is nonnegative, though the converse is in general not true [12], [25]. 3 Converse SOS Lyapunov theorems We start by observing that existence of a polynomial Lyapunov function immediately implies existence of a Lyapunov function that is a sum of squares. 3 Lemma 3.1. Given a polynomial vector field, suppose there exists a polynomial Lyapunov function V such that V and −V̇ are positive definite. Then, there also exists a polynomial Lyapunov function W such that W and −Ẇ are positive definite and W is sos. Proof. Take W = V 2 . Then W and −Ẇ = −2V V̇ are positive definite and W is sos (though −Ẇ may not be sos). We will next prove a result that guarantees the derivative of the Lyapunov function will also satisfy the sos condition, though this result is restricted to homogeneous systems. A polynomial vector field ẋ = f (x) is homogeneous if all entries of f are homogeneous polynomials of the same degree, i.e., if all the monomials in all the entries of f have the same degree. Homogeneous systems are extensively studied in the control literature; see e.g. [28], [5], [10], [27], [16], [7], and references therein. A basic fact about homogeneous vector fields is that for these systems the notions of local and global stability are equivalent. Indeed, a homogeneous vector field of degree d satisfies f (λx) = λd f (x) for any scalar λ, and therefore the value of f on the unit sphere determines its value everywhere. It is also well-known that an asymptotically stable homogeneous system admits a homogeneous Lyapunov function [27]. We will use the following Positivstellensätze due to Scheiderer to prove our converse sos Lyapunov theorem. Theorem 3.2 (Scheiderer, [30]). Given any two positive definite homogeneous polynomials p and q, there exists an integer k such that pq k is a sum of squares. Theorem 3.3. Given a homogeneous polynomial vector field, suppose there exists a homogeneous polynomial Lyapunov function V such that V and −V̇ are positive definite. Then, there also exists a homogeneous polynomial Lyapunov function W such that W and −Ẇ are both sos (and positive definite). Proof. Observe that V 2 and −2V V̇ are both positive definite and homogeneous polynomials. (Homogeneous polynomials are closed under products and the gradient of a homogeneous polynomial has homogeneous entries.) Applying Theorem 3.2 to these two polynomials, we conclude that there exists an integer k such that (−2V V̇ )(V 2 )k is sos. Let W = V 2k+2 . Then, W is clearly sos since it is a perfect even power. Moreover, −Ẇ = −(2k + 2)V 2k+1 V̇ = −(k + 1)2V 2k V V̇ is also sos by the previous claim. Positive definiteness of W and −Ẇ is clear from the construction. The polynomial W constructed in the proof above has higher degree than the polynomial V , though it seems difficult to construct vector fields for which this degree increase is necessary. In [2], we show that unless P=NP, there cannot be a polynomial time algorithm to test whether a cubic homogeneous vector field is globally asymptotically stable, or even to test whether it admits a quadratic Lyapunov function. Hence, just from complexity considerations, we expect there to exist GAS cubic vector fields (of possibly high dimensions) that admit a degree-2 polynomial Lyapunov function satisfying (2)-(3), but for which the minimum degree of a polynomial satisfying the sos constraints in (5)-(6) is arbitrarily high. One difficulty with explicitly constructing such examples 4 stems from non-uniqueness of Lyapunov functions. This makes it insufficient to simply engineer V or −V̇ to be “positive but not sos”; one needs to show that any polynomial Lyapunov function of a given degree fails to satisfy the sos constraints in (5)-(6). Next, we develop a theorem that removes the homogeneity assumption from the vector field in Theorem 3.3, but instead is restricted to vector fields on the plane. For this, we need another result of Scheiderer. Theorem 3.4 (Scheiderer, [29, Cor. 3.12]). Let p := p(x1 , x2 , x3 ) and q := q(x1 , x2 , x3 ) be two homogeneous polynomials in three variables, with p positive semidefinite and q positive definite. Then, there exists an integer k such that pq k is a sum of squares. Theorem 3.5. Given a (not necessarily homogeneous) polynomial vector field in two variables, suppose there exists a positive definite polynomial Lyapunov function V, with −V̇ positive definite, and such that the top homogeneous component of V has no zeros2 . Then, there also exists a polynomial Lyapunov function W such that W and −Ẇ are both sos (and positive definite). Proof. Let Ṽ = V + 1. So, Ṽ˙ = V̇ . Let us denote the degrees of Ṽ and Ṽ˙ by d1 and d2 respectively. Consider the (non-homogeneous) polynomials Ṽ 2 and −2Ṽ Ṽ˙ in the variables x := (x1 , x2 ). Note that Ṽ 2 is nowhere zero and −2Ṽ Ṽ˙ is only zero at the origin. Our first step is to homogenize these polynomials by introducing a new variable y. Observing that the homogenization of products of polynomials equals the product of their homogenizations, we obtain the following two trivariate forms: y 2d1 Ṽ 2 ( xy ), (7) − 2y d1 y d2 Ṽ ( xy )Ṽ˙ ( xy ). (8) Since by assumption the highest order term of V has no zeros, the form in (7) is positive definite. The form in (8), however, is only positive semidefinite. In particular, since Ṽ˙ = V̇ has to vanish at the origin, the form in (8) has a zero at the point (x1 , x2 , y) = (0, 0, 1). Nevertheless, since Theorem 3.4 allows for positive semidefiniteness of one of the two forms, by applying it to the forms in (7) and (8), we conclude that there exists an integer k such that − 2y d1 (2k+1) y d2 Ṽ ( xy )Ṽ˙ ( xy )Ṽ 2k ( xy ) (9) is sos. Let W = Ṽ 2k+2 . Then, W is clearly sos. Moreover, −Ẇ = −(2k + 2)Ṽ 2k+1 Ṽ˙ = −(k + 1)2Ṽ 2k Ṽ Ṽ˙ is also sos because this polynomial is obtained from (9) by setting y = 1. Positive definiteness of W and −Ẇ is again clear from the construction. Note that while W does not vanish at the origin, it achieves its minimum there, and hence provides a proof of asymptotic stability. The polynomial W constructed in the proof above again has higher degree than the polynomial V . The example below shows that such a degree increase is sometimes necessary. 2 This requirement is only slightly stronger than the requirement of radial unboundedness, which is imposed on V by Lyapunov’s theorem anyway. See Section 4. 5 Theorem 3.6 (see [4]). The vector field x˙1 = −x31 x22 + 2x31 x2 − x31 + 4x21 x22 − 8x21 x2 + 4x21 −x1 x42 + 4x1 x32 − 4x1 + 10x22 x˙2 = −9x21 x2 + 10x21 + 2x1 x32 − 8x1 x22 − 4x1 − x32 +4x22 − 4x2 admits a degree-2 polynomial Lyapunov function that proves its global asymptotic stability. However, the minimum degree of a polynomial Lyapunov function that satisfies the sos constraints in (5)-(6) is equal to 4. 3.1 SOS certificates for stability of switched linear systems The result of Theorem 3.3 extends in a straightforward manner to Lyapunov analysis of switched systems. In particular, we are interested in the highly-studied problem of establishing stability of arbitrary switched linear systems: ẋ = Ai x, i ∈ {1, . . . , m}, (10) Ai ∈ Rn×n . We assume the minimum dwell time of the system (i.e., the minimum time between two consecutive switches) is bounded away from zero. This guarantees that the solutions of (10) are well-defined. The (global) asymptotic stability under arbitrary switching (ASUAS) of system (10) is equivalent to asymptotic stability of the linear differential inclusion ẋ ∈ co{Ai }x, i ∈ {1, . . . , m}, where co here denotes the convex hull. A common approach for analyzing stability of these systems is to use the sos technique to search for a common polynomial Lyapunov function [24],[9]. We will prove the following result. Theorem 3.7. The switched linear system in (10) is asymptotically stable under arbitrary switching if and only if there exists a common homogeneous polynomial Lyapunov function W such that W sos −Ẇi = −h∇W (x), Ai xi sos, for i = 1, . . . , m, where the polynomials W and −Ẇi are all positive definite. To prove this result, we make use of the following theorem of Mason et al. Theorem 3.8 (Mason et al., [15]). If the switched linear system in (10) is asymptotically stable under arbitrary switching, then there exists a common homogeneous polynomial Lyapunov function V such that V > 0 ∀x 6= 0 −V̇i (x) = −h∇V (x), Ai xi > 0 ∀x 6= 0, for i = 1, . . . , m. The next proposition is an extension of Theorem 3.3 to switched systems (not necessarily linear). 6 Proposition 3.9. Consider an arbitrary switched dynamical system ẋ = fi (x), i ∈ {1, . . . , m}, where fi (x) is a homogeneous polynomial vector field of degree di (the degrees of the different vector fields can be different). Suppose there exists a common positive definite homogeneous polynomial Lyapunov function V such that −V̇i (x) = −h∇V (x), fi (x)i is positive definite for all i ∈ {1, . . . , m}. Then there exists a common homogeneous polynomial Lyapunov function W such that W is sos (and positive definite) and the polynomials −Ẇi = −h∇W (x), fi (x)i, for all i ∈ {1, . . . , m}, are also sos (and positive definite). Proof. Observe that for each i, the polynomials V 2 and −2V V̇i are both positive definite and homogeneous. Applying Theorem 3.2 m times to these pairs of polynomials, we conclude that there exist positive integers ki such that (−2V V̇i )(V 2 )ki is sos, (11) for i = 1, . . . , m. Let k = max{k1 , . . . , km }, and let W = V 2k+2 . Then, W is clearly sos. Moreover, for each i, the polynomial −Ẇi = −(2k + 2)V 2k+1 V̇i = −(k + 1)2V V̇i V 2ki V 2(k−ki ) is sos since (−2V V̇i )(V 2ki ) is sos by (11), V 2(k−ki ) is sos as an even power, and products of sos polynomials are sos. The proof of Theorem 3.7 now simply follows from Theorem 3.8 and Proposition 3.9 in the special case where di = 1 for all i. 3.2 The “V sos” requirement for switched linear systems Our next two propositions show that for switched linear systems, both in discrete time and in continuous time, the sos condition on the Lyapunov function itself is never conservative, in the sense that if one of the “decrease inequalities” has an sos certificate, then the Lyapunov function is automatically sos. These propositions are really statements about linear systems, so we will present them as such. However, since stable linear systems always admit (sos) quadratic Lyapunov functions, the propositions are only interesting in the context where a common polynomial Lyapunov function for a switched linear system is seeked. Proposition 3.10. Consider the linear dynamical system xk+1 = Axk in discrete time. Suppose there exists a positive definite polynomial Lyapunov function V such that V (x) − V (Ax) is positive definite and sos. Then, V is sos. 7 Proof. Consider the polynomial V (x) − V (Ax) that is sos by assumption. If we replace x by Ax in this polynomial, we conclude that the polynomial V (Ax) − V (A2 x) is also sos. Hence, by adding these two sos polynomials, we get that V (x) − V (A2 x) is sos. This procedure can be repeated to infer that for any integer k ≥ 1, the polynomial V (x) − V (Ak x) (12) is sos. Since by assumption V and V (x) − V (Ax) are positive definite, the linear system must be GAS, and hence Ak converges to the zero matrix as k → ∞. Observe that for all k, the polynomials in (12) have degree equal to the degree of V , and that the coefficients of V (x) − V (Ak x) converge to the coefficients of V − V (0) as k → ∞. Since for a fixed degree and dimension the cone of sos polynomials is closed [26], it follows that V − V (0) is sos. Hence, V is sos. Similarly, in continuous time, we have the following: Proposition 3.11. Consider the linear dynamical system ẋ = Ax in continuous time. Suppose there exists a positive definite polynomial Lyapunov function V such that −V̇ = −h∇V (x), Axi is positive definite and sos. Then, V is sos. Proof. The value of the polynomial V along the trajectories of the dynamical system satisfies the relation Z t V (x(t)) = V (x(0)) + V̇ (x(τ ))dτ . o Since the assumptions imply that the system is GAS, x(t) → 0 as t goes to infinity. By evaluating the above equation at t = ∞, rearranging terms, and substituting eAτ x for the solution of the linear system at time τ starting at initial condition x, we obtain Z ∞ V (x) = −V̇ (eAτ x)dτ + V (0). 0 By assumption, −V̇ is sos and therefore for any value of τ , the integrand −V̇ (eAτ x) is an sos polynomial. Since converging integrals of sos polynomials are sos, it follows that V is sos. One may wonder if a similar statement holds for nonlinear vector fields? The answer is negative. Lemma 3.12. There exist a polynomial vector field ẋ = f (x) and a polynomial Lyapunov function V, such that V and −V̇ are positive definite, −V̇ is sos, but V is not sos. Proof. Consider any positive form V that is not a sum of squares. (An example is x41 x22 + x21 x42 − 1 3x21 x22 x23 + x63 + 250 (x21 + x22 + x23 )3 .) Define a dynamical system by ẋ = −∇V (x). In this case, both V and −V̇ = ||∇V (x)||2 are positive definite and −V̇ is sos, though V is not sos. To see that −V̇ is positive definite, note that a homogeneous function V of degree d satisfies the Euler identity: V (x) = d1 xT ∇V (x). If we had −V̇ (x) = 0 for some x 6= 0, then we would have ∇V (x) = 0 and hence also V (x) = 0, which is a contradiction. 8 4 Working with the top homogeneous component of V We show in this final section that for global stability analysis with sos techniques, the requirement of the polynomial Lyapunov function being sos can be replaced with the requirement of its top homogeneous component being sos. We also show that doing so has a number of advantages. The point of departure is the following proposition, which states that in presence of radial unboundedness, the positivity requirement of the Lyapunov function is not needed. Proposition 4.1. Consider the vector field (1). If there exists a continuously differentiable, radially unbounded Lyapunov function V that satisfies V̇ (x) < 0, ∀x 6= 0, then the origin is globally asymptotically stable. Proof. We first observe that since V is radially unbounded and continuous, it must be lower bounded. In fact, radial unboundedness implies that the set {x| V (x) ≤ V (1, 0, . . . , 0)} is compact, and continuity of V implies that the minimum of V on this set, which equals the minimum of V everywhere, is achieved. We further claim that this minimum can only be achieved at the origin. Suppose there was a point x̄ 6= 0 that was a global minimum for V . As a necessary condition of global optimality, we must have ∇V (x̄) = 0. But this implies that V̇ (x̄) = 0, which is a contradiction. Now consider a new Lyapunov function W defined as W (x) : = V (x) − V (0). Then W is positive definite, radially unbounded, and has Ẇ = V̇ < 0, for all x 6= 0. Hence, W satisfies all assumptions of Lyapunov’s theorem (see, e.g., [14, Chap. 4]), therefore implying global asymptotic stability.3 A sufficient condition for a polynomial p to be radially unbounded is for its top homogeneous component, denoted by t.h.c.(p), to form a positive definite polynomial. This condition is almost necessary: radial unboundedness of p implies that t.h.c.(p) needs to be positive semidefinite. Since we seek for radially unbounded Lyapunov functions anyway, this suggests that in our SDP search for Lyapunov functions, we can replace the conditions “V sos and −V̇ sos”, with “t.h.c.(V ) sos and −V̇ sos”. The following lemma tells us that this can only help us in terms of conservatism. Lemma 4.2. Consider the vector field (1) and suppose there exists a polynomial function V := V (x1 , . . . , xn ) that makes both t.h.c.(V ) and −V̇ sos (and positive definite), then the origin is GAS. Moreover the condition t.h.c.(V ) sos is never more conservative (and can potentially be less conservative) than the condition t.h.c.(V ) sos. Proof. The claim of global asymptotic stability follows from Proposition 4.1. To prove the claim about conservatism, we show that if V is sos, then t.h.c.(V ) is sos, while the converse is not true (even if V is nonnegative). Let d be the degree of V and consider the standard homogenization Vh of V in n + 1 variables given by Vh (x1 , . . . , x1 , y) = y d V ( xy ). Since V is sos, Vh must be sos [25]. But this implies that t.h.c.(V ) must be sos since it is a restriction of Vh : t.h.c.(V ) = Vh (x1 , . . . , xn , 0). A counterexample to the converse is the Motzkin polynomial x41 x22 + x21 x42 − 3x21 x22 + 1, whose top homogeneous component x41 x22 + x21 x42 is sos, but the polynomial itself is not sos even though it is nonnegative [25]. 3 The conditions of Proposition 4.1 do not imply that V (0) = 0 as is customary for Lyapunov functions. However, what we really need is for V to attain its global minimum at the origin, which is the case here. 9 In the particular case of the plane (n = 2), the constraint “t.h.c.(V ) sos” in fact introduces no conservatism at all. This is because all nonnegative bivariate homogeneous polynomials (of any degree) are sums of squares [25]. By contrast, the alternative condition “V sos” can be conservative as there are (non-homogeneous) nonnegative bivariate polynomials that are not sums of squares. In addition to these features in terms of conservatism, the requirement “t.h.c.(V ) sos” is a cheaper constraint to impose than “V sos”. Indeed, if V is an n-variate polynomial of degree 2d, simple calculation shows that the SDP underlying the former condition has 2d(n+2d−1)! fewer equality 2d!n! d(n+d−1)!((2n+d)(n+d−1)!+d!n!) constraints and fewer decision variables than the latter. Let us end 2(d!n!)2 with a concrete example. Example 4.1. Consider the vector field ẋ1 = 0.36x1 + 2x2 − 0.32x71 − 0.02x1 x62 + 8x72 + 3x21 x52 ẋ2 = −2x1 − 0.44x2 − 16x71 − x1 x62 − 0.16x72 − 0.06x21 x52 . We solve an SDP which searches for a polynomial Lyapunov function V of degree d that satisfies “t.h.c.(V ) sos and −V̇ sos”. This SDP is infeasible for d = 2, 4, 6. Because of Lemma 4.2, we know that the SDP with the more standard conditions “V sos and −V̇ sos” would have been infeasible also. Moreover, since nonnegative bivariate forms are sos, we know that our constraint “t.h.c.(V ) sos” is lossless (while we wouldn’t be able to make such a claim for the constraint “V sos”). For d = 8, our SDP returns the following solution: V (x) = 2.195x21 + 4.237x81 + 2.183x22 + 2.170x82 +1.055x21 x62 + 0.863x1 x2 − 0.286x71 x2 + 0.037x61 x22 +0.042x51 x32 − 0.011x41 x42 − 0.021x31 x52 + 0.039x1 x72 . By checking the eigenvalues of the Gram matrices in our SDP, we can see that the top homogeneous component of this polynomial, as well as −V̇ , are positive definite. Hence, by Lemma 4.2, we know that the system is GAS. For this example it happens that the returned solution V is sos although we asked for a weaker and cheaper condition. Indeed, the semidefinite constraint that we imposed to require t.h.c.(V ) to be sos has 105 fewer decision variables and 36 fewer equality constraints than the semidefinite constraint needed to impose V sos. In general, by leaving out the constant term in the parametrization of the polynomial V , we can make sure that V (0) = 0 and hence (in view of the proof of Proposition 4.1) radial unboundedness would automatically imply positive definiteness of our Lyapunov function. Acknowledgments. The authors are grateful to Claus Scheiderer for insightful discussions. References [1] A. A. Ahmadi. Non-monotonic Lyapunov functions for stability of nonlinear and switched systems: theory and computation. Master’s Thesis, Massachusetts Institute of Technology, June 2008. Available from http://dspace.mit.edu/handle/1721.1/44206. [2] A. A. Ahmadi. On the difficulty of deciding asymptotic stability of cubic homogeneous vector fields. In Proceedings of the 2012 American Control Conference, 2012. [3] A. A. Ahmadi, M. Krstic, and P. A. Parrilo. A globally asymptotically stable polynomial vector field with no polynomial Lyapunov function. In Proceedings of the 50th IEEE Conference on Decision and Control, 2011. 10 [4] A. A. Ahmadi and P. A. Parrilo. Converse results on existence of sum of squares Lyapunov functions. In Proceedings of the 50th IEEE Conference on Decision and Control, 2011. [5] A. Andreini, A. Bacciotti, and G. Stefani. Global stabilizability of homogeneous vector fields of odd degree. Systems and Control Letters, 10(4):251–256, 1988. [6] A. Bacciotti and L. Rosier. Liapunov functions and stability in control theory. Springer, 2005. [7] J. Baillieul. The geometry of homogeneous polynomial dynamical systems. Nonlinear analysis, Theory, Methods and Applications, 4(5):879–900, 1980. [8] G. Chesi and D. Henrion (editors). Special issue on positive polynomials in control. IEEE Trans. Automat. Control, 54(5), 2009. [9] G. Chesi, A. Garulli, A. Tesi, and A. Vicino. Polynomially parameter-dependent Lyapunov functions for robust stability of polytopic systems: an LMI approach. IEEE Trans. Automat. Control, 50(3):365–370, 2005. [10] L. Grüne. Homogeneous state feedback stabilization of homogeneous systems. In Proceedings of the 39th IEEE Conference on Decision and Control, 2000. [11] D. Henrion and A. Garulli, editors. Positive polynomials in control, volume 312 of Lecture Notes in Control and Information Sciences. Springer, 2005. [12] D. Hilbert. Über die Darstellung Definiter Formen als Summe von Formenquadraten. Math. Ann., 32, 1888. [13] Z. Jarvis-Wloszek, R. Feeley, W. Tan, K. Sun, and A. Packard. Some controls applications of sum of squares programming. In Proceedings of the 42th IEEE Conference on Decision and Control, pages 4676–4681, 2003. [14] H. Khalil. Nonlinear systems. Prentice Hall, 2002. Third edition. [15] P. Mason, U. Boscain, and Y. Chitour. Common polynomial Lyapunov functions for linear switched systems. SIAM Journal on Optimization and Control, 45(1), 2006. [16] L. Moreau, D. Aeyels, J. Peuteman, and R. Sepulchre. Homogeneous systems: stability, boundedness and duality. In Proceedings of the 14th Symposium on Mathematical Theory of Networks and Systems, 2000. [17] K. G. Murty and S. N. Kabadi. Some NP-complete problems in quadratic and nonlinear programming. Mathematical Programming, 39:117–129, 1987. [18] A. Papachristodoulou and S. Prajna. On the construction of Lyapunov functions using the sum of squares decomposition. In IEEE Conference on Decision and Control, 2002. [19] P. A. Parrilo. Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization. PhD thesis, California Institute of Technology, May 2000. [20] P. A. Parrilo. Semidefinite programming relaxations for semialgebraic problems. Mathematical Programming, 96(2, Ser. B):293–320, 2003. [21] M. M. Peet. Exponentially stable nonlinear systems have polynomial Lyapunov functions on bounded regions. IEEE Trans. Automat. Control, 54(5):979–987, 2009. 11 [22] M. M. Peet and A. Papachristodoulou. A converse sum of squares Lyapunov result: an existence proof based on the Picard iteration. In Proceedings of the 49th IEEE Conference on Decision and Control, 2010. [23] M. M. Peet and A. Papachristodoulou. A converse sum of squares Lyapunov result with a degree bound. IEEE Trans. Automat. Control, 57(9), 2012. [24] S. Prajna and A. Papachristodoulou. Analysis of switched and hybrid systems – beyond piecewise quadratic methods. In Proceedings of the American Control Conference, 2003. [25] B. Reznick. Some concrete aspects of Hilbert’s 17th problem. In Contemporary Mathematics, volume 253, pages 251–272. American Mathematical Society, 2000. [26] R. M. Robinson. Some definite polynomials which are not sums of squares of real polynomials. In Selected questions of algebra and logic (collection dedicated to the memory of A. I. Mal0 cev) (Russian), pages 264–282. Izdat. “Nauka” Sibirsk. Otdel., Novosibirsk, 1973. [27] L. Rosier. Homogeneous Lyapunov function for homogeneous continuous vector fields. Systems Control Lett., 19(6):467–473, 1992. [28] N. Samardzija. Stability properties of autonomous homogeneous polynomial differential systems. Journal of Differential Equations, 48(1):60–70, 1983. [29] C. Scheiderer. Sums of squares on real algebraic surfaces. 119(4):395–410, 2006. Manuscripta Mathematica, [30] C. Scheiderer. A Positivstellensatz for projective real varieties. Manuscripta Mathematica, 138(1-2):73–88, 2012. 12
3cs.SY
arXiv:1708.07747v2 [cs.LG] 15 Sep 2017 Fashion-MNIST: a Novel Image Dataset for Benchmarking Machine Learning Algorithms Han Xiao Zalando Research Mühlenstraße 25, 10243 Berlin [email protected] Kashif Rasul Zalando Research Mühlenstraße 25, 10243 Berlin [email protected] Roland Vollgraf Zalando Research Mühlenstraße 25, 10243 Berlin [email protected] Abstract We present Fashion-MNIST, a new dataset comprising of 28 × 28 grayscale images of 70, 000 fashion products from 10 categories, with 7, 000 images per category. The training set has 60, 000 images and the test set has 10, 000 images. Fashion-MNIST is intended to serve as a direct dropin replacement for the original MNIST dataset for benchmarking machine learning algorithms, as it shares the same image size, data format and the structure of training and testing splits. The dataset is freely available at https://github.com/zalandoresearch/fashion-mnist. 1 Introduction The MNIST dataset comprising of 10-class handwritten digits, was first introduced by LeCun et al. [1998] in 1998. At that time one could not have foreseen the stellar rise of deep learning techniques and their performance. Despite the fact that today deep learning can do so much the simple MNIST dataset has become the most widely used testbed in deep learning, surpassing CIFAR10 [Krizhevsky and Hinton, 2009] and ImageNet [Deng et al., 2009] in its popularity via Google trends1 . Despite its simplicity its usage does not seem to be decreasing despite calls for it in the deep learning community. The reason MNIST is so popular has to do with its size, allowing deep learning researchers to quickly check and prototype their algorithms. This is also complemented by the fact that all machine learning libraries (e.g. scikit-learn) and deep learning frameworks (e.g. Tensorflow, Pytorch) provide helper functions and convenient examples that use MNIST out of the box. Our aim with this work is to create a good benchmark dataset which has all the accessibility of MNIST, namely its small size, straightforward encoding and permissive license. We took the approach of sticking to the 10 classes 70, 000 grayscale images in the size of 28 × 28 as in the original MNIST. In fact, the only change one needs to use this dataset is to change the URL from where the MNIST dataset is fetched. Moreover, Fashion-MNIST poses a more challenging classification task than the simple MNIST digits data, whereas the latter has been trained to accuracies above 99.7% as reported in Wan et al. [2013], Ciregan et al. [2012]. We also looked at the EMNIST dataset provided by Cohen et al. [2017], an extended version of MNIST that extends the number of classes by introducing uppercase and lowercase characters. How1 https://trends.google.com/trends/explore?date=all&q=mnist,CIFAR,ImageNet ever, to be able to use it seamlessly one needs to not only extend the deep learning framework’s MNIST helpers, but also change the underlying deep neural network to classify these extra classes. 2 Fashion-MNIST Dataset Fashion-MNIST is based on the assortment on Zalando’s website2 . Every fashion product on Zalando has a set of pictures shot by professional photographers, demonstrating different aspects of the product, i.e. front and back looks, details, looks with model and in an outfit. The original picture has a light-gray background (hexadecimal color: #fdfdfd) and stored in 762 × 1000 JPEG format. For efficiently serving different frontend components, the original picture is resampled with multiple resolutions, e.g. large, medium, small, thumbnail and tiny. We use the front look thumbnail images of 70, 000 unique products to build Fashion-MNIST. Those products come from different gender groups: men, women, kids and neutral. In particular, whitecolor products are not included in the dataset as they have low contrast to the background. The thumbnails (51 × 73) are then fed into the following conversion pipeline, which is visualized in Figure 1. 1. Converting the input to a PNG image. 2. Trimming any edges that are close to the color of the corner pixels. The “closeness” is defined by the distance within 5% of the maximum possible intensity in RGB space. 3. Resizing the longest edge of the image to 28 by subsampling the pixels, i.e. some rows and columns are skipped over. 4. Sharpening pixels using a Gaussian operator of the radius and standard deviation of 1.0, with increasing effect near outlines. 5. Extending the shortest edge to 28 and put the image to the center of the canvas. 6. Negating the intensities of the image. 7. Converting the image to 8-bit grayscale pixels. Figure 1: Diagram of the conversion process used to generate Fashion-MNIST dataset. Two examples from dress and sandals categories are depicted, respectively. Each column represents a step described in section 2. Table 1: Files contained in the Fashion-MNIST dataset. Name Description train-images-idx3-ubyte.gz train-labels-idx1-ubyte.gz t10k-images-idx3-ubyte.gz t10k-labels-idx1-ubyte.gz Training set images Training set labels Test set images Test set labels # Examples Size 60, 000 60, 000 10, 000 10, 000 25 MBytes 140 Bytes 4.2 MBytes 92 Bytes For the class labels, we use the silhouette code of the product. The silhouette code is manually labeled by the in-house fashion experts and reviewed by a separate team at Zalando. Each product 2 Zalando is the Europe’s largest online fashion platform. http://www.zalando.com 2 contains only one silhouette code. Table 2 gives a summary of all class labels in Fashion-MNIST with examples for each class. Finally, the dataset is divided into a training and a test set. The training set receives a randomlyselected 6, 000 examples from each class. Images and labels are stored in the same file format as the MNIST data set, which is designed for storing vectors and multidimensional matrices. The result files are listed in Table 1. We sort examples by their labels while storing, resulting in smaller label files after compression comparing to the MNIST. It is also easier to retrieve examples with a certain class label. The data shuffling job is therefore left to the algorithm developer. Table 2: Class names and example images in Fashion-MNIST dataset. Label Description 0 T-Shirt/Top 1 Trouser 2 Pullover 3 Dress 4 Coat 5 Sandals 6 Shirt 7 Sneaker 8 Bag 9 Ankle boots Examples 3 Experiments We provide some classification results in Table 3 to form a benchmark on this data set. All algorithms are repeated 5 times by shuffling the training data and the average accuracy on the test set is reported. The benchmark on the MNIST dataset is also included for a side-by-side comparison. A more comprehensive table with explanations on the algorithms can be found on https://github.com/zalandoresearch/fashion-mnist. Table 3: Benchmark on Fashion-MNIST (Fashion) and MNIST. Test Accuracy Classifier Parameter DecisionTreeClassifier criterion=entropy max_depth=10 splitter=best criterion=entropy max_depth=10 splitter=random criterion=entropy max_depth=50 splitter=best Fashion MNIST 0.798 0.792 0.789 0.873 0.861 0.886 Continued on next page 3 Table 3 – continued from previous page Test Accuracy Classifier Parameter Fashion MNIST 0.789 0.788 0.787 0.787 0.785 0.783 0.783 0.779 0.777 0.886 0.866 0.883 0.881 0.879 0.877 0.853 0.873 0.875 criterion=entropy max_depth=10 splitter=random 0.775 0.775 0.772 0.772 0.769 0.768 0.752 0.752 0.748 0.745 0.739 0.737 0.806 0.847 0.810 0.847 0.843 0.845 0.826 0.828 0.824 0.820 0.737 0.745 priors=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] 0.511 0.524 0.880 0.872 0.862 0.849 0.840 0.795 0.782 0.969 0.964 0.949 0.933 0.926 0.888 0.846 0.854 0.854 0.853 0.852 0.852 0.849 0.849 0.847 0.839 0.839 0.838 0.838 0.959 0.955 0.955 0.957 0.945 0.944 0.944 0.943 0.943 0.943 0.955 0.955 0.836 0.835 0.834 0.833 0.833 0.820 0.779 0.776 0.764 0.758 0.917 0.919 0.919 0.919 0.919 0.912 0.885 0.873 0.879 0.872 criterion=entropy max_depth=100 splitter=best criterion=gini max_depth=10 splitter=best criterion=entropy max_depth=50 splitter=random criterion=entropy max_depth=100 splitter=random criterion=gini max_depth=100 splitter=best criterion=gini max_depth=50 splitter=best criterion=gini max_depth=10 splitter=random criterion=gini max_depth=50 splitter=random criterion=gini max_depth=100 splitter=random ExtraTreeClassifier criterion=gini max_depth=10 splitter=best criterion=entropy max_depth=100 splitter=best criterion=entropy max_depth=10 splitter=best criterion=entropy max_depth=50 splitter=best criterion=gini max_depth=100 splitter=best criterion=gini max_depth=50 splitter=best criterion=entropy max_depth=50 splitter=random criterion=entropy max_depth=100 splitter=random criterion=gini max_depth=50 splitter=random criterion=gini max_depth=100 splitter=random criterion=gini max_depth=10 splitter=random GaussianNB GradientBoostingClassifier n_estimators=100 loss=deviance max_depth=10 n_estimators=50 loss=deviance max_depth=10 n_estimators=100 loss=deviance max_depth=3 n_estimators=10 loss=deviance max_depth=10 n_estimators=50 loss=deviance max_depth=3 n_estimators=10 loss=deviance max_depth=50 n_estimators=10 loss=deviance max_depth=3 KNeighborsClassifier weights=distance n_neighbors=5 p=1 weights=distance n_neighbors=9 p=1 weights=uniform n_neighbors=9 p=1 weights=uniform n_neighbors=5 p=1 weights=distance n_neighbors=5 p=2 weights=distance n_neighbors=9 p=2 weights=uniform n_neighbors=5 p=2 weights=uniform n_neighbors=9 p=2 weights=distance n_neighbors=1 p=2 weights=uniform n_neighbors=1 p=2 weights=uniform n_neighbors=1 p=1 weights=distance n_neighbors=1 p=1 LinearSVC loss=hinge C=1 multi_class=ovr penalty=l2 loss=hinge C=1 multi_class=crammer_singer penalty=l2 loss=squared_hinge C=1 multi_class=crammer_singer penalty=l2 loss=squared_hinge C=1 multi_class=crammer_singer penalty=l1 loss=hinge C=1 multi_class=crammer_singer penalty=l1 loss=squared_hinge C=1 multi_class=ovr penalty=l2 loss=squared_hinge C=10 multi_class=ovr penalty=l2 loss=squared_hinge C=100 multi_class=ovr penalty=l2 loss=hinge C=10 multi_class=ovr penalty=l2 loss=hinge C=100 multi_class=ovr penalty=l2 Continued on next page 4 Table 3 – continued from previous page Test Accuracy Classifier Parameter loss=hinge C=10 multi_class=crammer_singer penalty=l1 loss=hinge C=10 multi_class=crammer_singer penalty=l2 loss=squared_hinge C=10 multi_class=crammer_singer penalty=l2 loss=squared_hinge C=10 multi_class=crammer_singer penalty=l1 loss=hinge C=100 multi_class=crammer_singer penalty=l1 loss=hinge C=100 multi_class=crammer_singer penalty=l2 loss=squared_hinge C=100 multi_class=crammer_singer penalty=l1 loss=squared_hinge C=100 multi_class=crammer_singer penalty=l2 LogisticRegression C=1 multi_class=ovr penalty=l1 C=1 multi_class=ovr penalty=l2 C=10 multi_class=ovr penalty=l2 C=10 multi_class=ovr penalty=l1 C=100 multi_class=ovr penalty=l2 MLPClassifier activation=relu hidden_layer_sizes=[100] activation=relu hidden_layer_sizes=[100, 10] activation=tanh hidden_layer_sizes=[100] activation=tanh hidden_layer_sizes=[100, 10] activation=relu hidden_layer_sizes=[10, 10] activation=relu hidden_layer_sizes=[10] activation=tanh hidden_layer_sizes=[10, 10] activation=tanh hidden_layer_sizes=[10] PassiveAggressiveClassifier C=1 C=100 C=10 Perceptron penalty=l1 penalty=l2 penalty=elasticnet RandomForestClassifier n_estimators=100 criterion=entropy max_depth=100 n_estimators=100 criterion=gini max_depth=100 n_estimators=50 criterion=entropy max_depth=100 n_estimators=100 criterion=entropy max_depth=50 n_estimators=50 criterion=entropy max_depth=50 n_estimators=100 criterion=gini max_depth=50 n_estimators=50 criterion=gini max_depth=50 n_estimators=50 criterion=gini max_depth=100 n_estimators=10 criterion=entropy max_depth=50 n_estimators=10 criterion=entropy max_depth=100 n_estimators=10 criterion=gini max_depth=50 n_estimators=10 criterion=gini max_depth=100 n_estimators=50 criterion=entropy max_depth=10 n_estimators=100 criterion=entropy max_depth=10 n_estimators=100 criterion=gini max_depth=10 n_estimators=50 criterion=gini max_depth=10 n_estimators=10 criterion=entropy max_depth=10 n_estimators=10 criterion=gini max_depth=10 SGDClassifier loss=hinge penalty=l2 loss=perceptron penalty=l1 loss=modified_huber penalty=l1 loss=modified_huber penalty=l2 loss=log penalty=elasticnet loss=hinge penalty=elasticnet Fashion MNIST 0.751 0.749 0.748 0.736 0.516 0.496 0.492 0.484 0.783 0.816 0.829 0.829 0.759 0.753 0.746 0.737 0.842 0.841 0.839 0.839 0.836 0.917 0.917 0.916 0.909 0.916 0.871 0.870 0.868 0.863 0.850 0.848 0.841 0.840 0.972 0.972 0.962 0.957 0.936 0.933 0.921 0.921 0.776 0.775 0.773 0.877 0.875 0.880 0.782 0.754 0.726 0.887 0.845 0.845 0.873 0.872 0.872 0.872 0.871 0.871 0.870 0.869 0.853 0.852 0.848 0.847 0.838 0.838 0.835 0.834 0.828 0.825 0.970 0.970 0.968 0.969 0.967 0.971 0.968 0.967 0.949 0.949 0.948 0.948 0.947 0.950 0.949 0.945 0.933 0.930 0.819 0.818 0.817 0.816 0.816 0.816 0.914 0.912 0.910 0.913 0.912 0.913 Continued on next page 5 Table 3 – continued from previous page Test Accuracy Classifier Parameter loss=squared_hinge penalty=elasticnet loss=hinge penalty=l1 loss=log penalty=l1 loss=perceptron penalty=l2 loss=perceptron penalty=elasticnet loss=squared_hinge penalty=l2 loss=modified_huber penalty=elasticnet loss=log penalty=l2 loss=squared_hinge penalty=l1 SVC C=10 kernel=rbf C=10 kernel=poly C=100 kernel=poly C=100 kernel=rbf C=1 kernel=rbf C=1 kernel=poly C=1 kernel=linear C=10 kernel=linear C=100 kernel=linear C=1 kernel=sigmoid C=10 kernel=sigmoid C=100 kernel=sigmoid Fashion MNIST 0.815 0.815 0.815 0.814 0.814 0.814 0.813 0.813 0.813 0.914 0.911 0.910 0.913 0.912 0.912 0.914 0.913 0.911 0.897 0.891 0.890 0.890 0.879 0.873 0.839 0.829 0.827 0.678 0.671 0.664 0.973 0.976 0.978 0.972 0.966 0.957 0.929 0.927 0.926 0.898 0.873 0.868 4 Conclusions This paper introduced Fashion-MNIST, a fashion product images dataset intended to be a dropin replacement of MNIST and whilst providing a more challenging alternative for benchmarking machine learning algorithm. The images in Fashion-MNIST are converted to a format that matches that of the MNIST dataset, making it immediately compatible with any machine learning package capable of working with the original MNIST dataset. References D. Ciregan, U. Meier, and J. Schmidhuber. Multi-column deep neural networks for image classification. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 3642–3649. IEEE, 2012. G. Cohen, S. Afshar, J. Tapson, and A. van Schaik. Emnist: an extension of mnist to handwritten letters. arXiv preprint arXiv:1702.05373, 2017. J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pages 248–255. IEEE, 2009. A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009. Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. L. Wan, M. Zeiler, S. Zhang, Y. L. Cun, and R. Fergus. Regularization of neural networks using dropconnect. In Proceedings of the 30th international conference on machine learning (ICML13), pages 1058–1066, 2013. 6
1cs.CV
Explosion prediction of oil gas using SVM and Logistic Regression Xiaofei Wanga , Mingming Zhanga,b , Liyong Shena,∗, Suixiang Gaoa arXiv:1211.1526v2 [cs.CE] 8 Nov 2012 a School of Mathematical Sciences, University of CAS, Beijing, China b School of Engineering, University of CAS, Beijing, 100049, China Abstract The prevention of dangerous chemical accidents is a primary problem of industrial manufacturing. In the accidents of dangerous chemicals, the oil gas explosion plays an important role. The essential task of the explosion prevention is to estimate the better explosion limit of a given oil gas. In this paper, Support Vector Machines (SVM) and Logistic Regression (LR) are used to predict the explosion of oil gas. LR can get the explicit probability formula of explosion, and the explosive range of the concentrations of oil gas according to the concentration of oxygen. Meanwhile, SVM gives higher accuracy of prediction. Furthermore, considering the practical requirements, the effects of penalty parameter on the distribution of two types of errors are discussed. Keywords: Explosion prediction, oil gas, SVM, Logistic Regression, penalty parameter 1. Introduction In recent years, there were frequent occurrences of dangerous chemical accidents in industrial processes. They bring huge damages to people’s life and property. How to predict the occurrence of dangerous chemical accidents becomes current hot topic [1, 2]. In 2006, James I. Chang and Cheng-Chung Lin [3] summarized all factory accidents in the 40 years before 2006, and classified them according to the causes of accidents. Among them, about 74% accidents occurred at oil refining plants, oil port and oil tank. The number of accidents increase year by year. Since explosions of oil tanks may cause dominoes effects which will strengthen the damages of accidents [4], it is necessary to predict and prevent the explosion of oil tank effectively. The occurrences of fire and explosion accidents (include explosions of oil tank) need three conditions, that’s, supply of oxygen, existence of combustibles and sources of kindling. If one element is controlled, combustion is impossible. According to the principles above, people naturally used to control the sources of kindling to prevent occurrences of fire/explosion accidents in the past. But since 1969, explosions of three large oil tanks happened in succession. By deep investigation and study, it comes to the conclusion that all above ∗ Corresponding author Email address: [email protected] (Liyong Shen) Preprint submitted to Elsevier November 9, 2012 explosions were caused by static electricity in washing cabin [5]. From then on, people get to know a new kind of kindling-static electricity, which can hardly be removed or controlled. Then people turned to study to prevent explosion by controlling another element- oxygen. As is well known, the explosion occurs only when the concentration ratio of hydrocarbon and oxygen reaches to some certain range. Recently, there have been a lot of methods to obtain the range of explosion. In 1952, Coward and Jones [6] gave a fast and simple method to get the possibility of explosion of mixed gas. Although this method is widely used, there is a restriction that the density of reactants should be known. Jian-Wei Cheng and Sheng-qiang Yang [7] improve the range, but the method needs the concentration of each component in the mixed gas.( see Figure 1). However, in the practical oil storage and production, the compositions and densities are influenced by many factors, such as, oil production purity, temperature and pressure. And in practice, the components in the mixture are unknown, neither the densities. Figure 1: Coward explosive triangle aera A: impossible mixture B: explosive C1: not explosive(explosive if mixed more HC) C2: not explosive(explosive if mixed more air) D: non-explosive With the development of artificial intelligence, nowadays the techniques of data mining are widely used into every field of chemical industry. Especially, the techniques like artificial neural network, genetic algorithm and fuzzy set theory have a lot of applications in equipment failure detection ([8] [9]). Since our goal is to accurately predict whether explosion of oil gas happens or not, and Support Vector Machine (SVM) and Logistic Regression (LR) are efficient to tackle the classification and prediction problems([10, 11]), we decide to use the two to make prediction of oil gas explosion. Artificial intelligence methods can improve accuracy of prediction and reduce man-made interference in which the selections of proper learning algorithms are very important. In recent years, SVM [10] is considered as an efficient learning algorithm about pattern classification [11], and the classification accuracy of SVM is better than other methods [12]. But the explicit expression of SVM is complex, so we can take another classification methodlogistic regression [13] into consideration. LR has a clear explicit expression, thus it can be 2 used to identify explosion intervals under different concentration of oxygen. The structure of the paper is as follows. In Section 2, we introduce the component of oil gas, resource of data. In Section 3, we introduce some basic knowledge about SVM and logistic regression. Some experiment results are performed in Section 4, the effect of penalty factor in SVM and comparison of two methods are also considered. Finally, we summarize the paper in Section 5. 2. Oil gas explosion In this section, we briefly give some preliminary knowledge about oilcan explosion, and introduce the explosion experiments, where the practical data are from a fire company. 2.1. Preliminary knowledge of oilcan explosion The three essential requirement of oil gas explosion are:(1) Oxygen; (2) Combustibles; (3) kindling. As static electricity has become a not easy-controlled factor, we tend to control the concentration of oxygen to prevent explosion of combustion. The limit of explosion is affected by a lot of factors, such as, temperature, oxygen content, inert medium, pressure, container, concentration of reactants. Reactants mainly contain HC compound, oxygen. As the explosion occurs only when the concentration of hydrocarbon (oil gas) and oxygen reaches some mixed ratio [5]. we establish a model to predict explosion with experimental data by data mining technique, based on the relationship between the concentration of hydrocarbon and oxygen. The prediction model is suitable for general oil gas without knowing densities. 2.2. Source of data The data are recorded in specific explosion experiments, including the explosion pressure and explosion situation. The experiments were conducted in special closed pipe at normal atmosphere pressure and room temperature, the device is showed in Figure 2. Figure 2: Experiment Device Oil gas is a mixture and the concentration of each component is unknown, we consider the total concentration of HC, the concentration of O2 and the concentration of premixed gas-mainly CO2 respectively. During each experiment, the concentration of O2 is controlled 3 by injecting CO2 , and the densities of reactants are detected at three different points and the explosion pressure are measured at five different points by sensors, the average concentration is taken as the concentration of reactants in one experiment, so is the maximum pressure. When the data are used to predict whether explosion occurs or not, we transform them into 0 or 1 in LR and −1 or 1 in SVM. In both of them, 1 corresponds to the explosion, others represent no explosion. The statistic data is showed in following tables. Table 1 lists one experiment result in which explosion occur and Table 2 lists another experiment that explosion does not occur. After taking several experiments, we get 58 groups of data. Finally we have 58 items and 5 variables. Since O2 /HC has a huge effect in reaction, so we also take it as a variable. Meas. slowromancapi@ slowromancapii@ slowromancapiii@ Average Table 1: An example of explosion data The data before ignite The data after ignite HC O2 CO CO2 HC O2 CO CO2 1.88 15.6 0.05 18.3 0.69 0.9 10.00 20.0 1.85 15.5 0.05 18.3 0.73 0.8 10.00 20.0 1.78 15.6 0.04 18.5 0.65 0.3 10.00 20.0 1.84 15.6 0.05 18.4 0.69 0.7 10.00 20.0 Pressure(%) P1 0.080 P2 0.080 P3 0.080 P4 0.080 P5 0.080 Meas. slowromancapi@ slowromancapii@ slowromancapiii@ Average Table 2: An example of The data before ignite HC O2 CO CO2 1.81 15.3 0.60 13.2 1.82 15.3 0.62 13.3 1.81 15.4 0.62 13.4 1.81 15.3 0.61 13.3 Pressure(%) P1 0.000 P2 0.000 P3 0.000 P4 0.000 P5 0.000 unexplosion data The data after ignite HC O2 CO CO2 1.81 15.2 0.60 13.2 1.81 15.2 0.62 13.2 1.83 15.2 0.62 13.4 1.82 15.2 0.61 13.3 3. Implemental procedure of SVM and Logistic Regression In this section, we introduce the detailed procedure of explosion prediction using SVM and LR methods. 3.1. Data preprocessing Real world data is generally incomplete, noisy, and inconsistent. After identifying input and output variables, which are introduced in Section 2, data need to be preprocessed. In the data preprocessing, the noisy and incomplete data are removed. And inconsistencies are corrected in the data. For further considerations, different monitoring attributes have different scales. We need to normalize all attributes values into the same scale to avoid the influence of scales. All values of attributes are normalized to the interval [-1, 1] by using the Eq. (1). In this equation, suppose we have n samples, vij is the value of i-th attribute of j-th object and vij′ is the normalized value. max j = max {v1j , v2j , . . . , vnj }, min j = max {v1j , v2j , . . . , vnj }. 4 In summary, data preprocessing techniques can improve the quality of the data, so that improve the accuracy and efficiency of data mining process. vij′ = 2 max j + min j vij − max j − min j max j − min j (1) 3.2. Feature selection In this subsection, we use some methods to select the key features. Some knowledge of chemical industry is used to select the key features. In the logistic regression, we use the generalized linear regression. The correlation between variables in data mining and whether the oil and gas will explode only relaying on the original variable, we expand the original data to quadratic and proportional items. However, there will be much more variables if we expand the original variables, so we need to reduce the dimension of the variables. Typically, there are two kinds of algorithms to reduce the feature space in classification. The first one is feature selection which is to select a subset of most representative feature from the original feature space. The second algorithm is feature extraction which is to transform the original feature space to a smaller one to reduce the dimension. Although feature extraction can reduce the dimension of feature space greatly compared with feature selection, the transformed smaller feature space cannot be explainable. In the test, we use the first method of feature selection; we use the all subset selection and Lasso ([14]) combined to the criterion of AIC, BIC. However, the experimental result is not good, and the difference between the original variable and variable selected by the criterion above is slight. Due to the obvious characteristics of the variable and the fact that the number of the variable is few, general methods of feature selection are not effective. In this paper, we use the knowledge of chemical industry and the role of the reactions to select the variable. In the reactions, CO is nearly 0 and it has no influence to the react. The role of CO2 is to control the concentration of O2 . Thus in the paper, we do not consider the effect of CO and CO2 . Then in the reactions, there are only two variables, HC and O2 . Because the ratio between HC and O2 has serious effect on the reaction pressure in the oil and gas reactions, we take the ratio between HC and O2 as a variable. In the end, we get the variables, HC, O2 and O2 /HC, denoted by x1 , x2 , x5 , respectively. 3.3. Learning algorithms In this subsection, we introduce the procedure of learning algorithms for prediction, SVM and LR. 3.3.1. Support vector machines As well known, SVM has been employed as the learning algorithm due to its superior classification ability. SVM is a supervised learning technique and it can be used for classification and regression. The main advantage of SVM include the use of kernel (no need to acknowledge the non-linear mapping function), the absence of local minima (quadratic problem), the sparseness of solution and the generalization capability obtained by optimizing the margin [15]. 5 Briefly speaking, SVM establishes a decision boundary between two classes by mapping the training data (through the kernel function) into a higher dimensional space, and then finding the maximal margin hyperplane within that space, which can be viewed as a classifier. Further introduction to SVM operations can be found in the following. Given n examples, S = {xi , yi }ni=1 , where xi represents the condition attributes, yi is the class label, and i is the number of examples. The decision hyperplane of SVM can be defined as (ω, b), where ω is a weight vector and b a bias. Let ω0 and b0 denote the optimal values of the weight vector and bias. Correspondingly, the optimal hyperplane can be written as ω0T ω + b0 = 0 (2) To find the optimum values of ω and b, it is required to solve the following optimization problem. n P εi min 12 ω T ω + C ω,b,ε (3) i=1 T s.t. yi ω φ(xi ) ≥ 1 − εi , εi ≥ 0 Where ε is the slack variable, C is the user-specified penalty parameter of the error term(C > 0), and φ is the kernel function. To sum up, SVM can change the original non-linear separation problem into a linear separation case by mapping input vector onto a higher feature space. In addition, several popular kernel functions are listed as Eqs. (4)-(7). Linear kernel K(xi , xj ) = xi xj (4) Polynomial kernel of degree K(xi , xj ) = (γxi xj + r)g , γ > 0 (5) K(xi , xj ) = exp(−γ k xi − xj k2 ), γ > 0 (6) K(xi , xj ) = tanh(γxi xj + r), γ > 0 (7) Radial basis function Sigmoid kernel Here, r, γ and g are kernel parameters and they are user-defined. According the work of Hsu et al. [16], RBF kernel function is selected in this study. Readers can find more details about SVM in [17, 18, 11]. 3.3.2. The penalty parameters of SVM When we use the model to predict the explosion, there are two categories of errors. The first one is the situation that the prediction result is 1 but the actual result is -1; the second one is the situation that the prediction result is -1 but the actual result is 1. SVM can set penalty upon the two types of error. Suppose ω1 and ω2 are the penalty parameters 6 of the two types of error, then the objective function of SVM that have different penalty parameters can be written as 1 T ω ω + ω1 2 X ε j + ω2 {j:yi =1,ωxj +b=−1} X εm (8) {m:ym =−1,ωxm +b=1} In 4.3, we will discuss the selection of penalty parameters in details. 3.3.3. Logistic Regression The method of general least square is not appropriate, we can use nonlinear function. LR is a classic nonlinear classifier algorithm. The advantage of LR is that it can predict the probability of the explosion of oil gas [13]. Given n examples, S = {xi , yi }ni=1 , yi ∈ {0, 1}, where xi represents the condition attributes, yi is the class label, and i is the number of examples. LR model is to get the probability function p(y = 1 | X = x) = 1 exp(x′ β) = ′ 1 + exp(x β) 1 + exp−g(x) (9) Where p is the probability of y = 1 while the example chooses x which is the conditional attribute, and g(x) = x′ β and β is the parameter of LR [13]. If p > 0.5, then y = 1; if p < 0.5, then y = 0. 3.3.4. Interval prediction using LR As the concentration of CO is almost 0, we omit its influence. Since the role of CO2 is to control the concentration of O2 , we consider O2 instead of CO2 . So in accordance with Eq. (9), we get a probability function p = p(HC, O2) for the concentration of HC and O2 . From the function, we can get the probability of explosion, and also the explosive range of the concentrations of oil gas when the concentration of oxygen is fixed relatively. 4. Computational results In this section, we give some experimental results. Table 3 gives a brief explanation of the data background, which includes size of data, number of variables and classification. There are totally 58 groups of data used to analysis. Among them, there are five input variables and one output variable which is binary variables-(explosion, not explosion). In order to establish the model of prediction, we select 80% of the data as training set, 20% of data as test set. Table 4 summarizes the variables in dataset. As stated in the above, we select x1 , x2 , and x5 as investigative variables. 4.1. Explosion intervals of LR According to above, we use logistic regression model to obtain the explosion intervals, which are illustrated in Figure 3 and Figure 4. The y-axis denotes the probability of explosion with the respective x under the given concentration of O2 , and Figure 4 shows the relative 7 Table 3: The characteristics of dataset for thermal for storage tank No. of records 58 explosion:78% not explosion:22% input attributes Target 5 Attributes 1 target attribute with 2 classes Table 4: The summary of attributes Type Measure Measure Ratio description HC CO HC/O2 notation x1 x3 x5 Type Measure Measure Status description notation O2 x2 CO2 x4 explosion or not y probability of explosion with plot of g(x). The limit densities of explosion of HC are summarized in Table 5. Here we care whether the explosion occurs and the explosion intervals. So we just compare the intervals in horizontal axis. The result performs well, it means that the logistic regression can give an intuitive explanation. Figure 3: probability 4.2. Comparisons between SVM and LR We use the popular RBF kernel in SVM, because of its good performance [19]. RBF kernel is a uniform framework which includes other kernels and eliminate troubles caused 8 Table 5: The limit densities of explosion of HC Concentration of O2 15 16 18 20 the lower limit 1.0668 0.89729 0.76653 0.70066 the upper limit 1.5491 1.9645 2.5871 3.1448 Figure 4: relative probability by huge data size. As it is well known, the selection of SVM parameter has much to do with prediction accuracy. In our model, C and λ in SVM can be adjusted. In this study, LIBSVM-3.1 [20] is used, which is one of the most popular SVM software. In order to compare the two methods, we take one time and multi-times experiments of vfold cross-validation (here, we take v=5). In one time experiment, by 5-fold cross-validation, we get 5 accuracies of prediction and the average accuracy. In multi-times experiments, we just consider the average accuracy of prediction in one 5-fold cross-validation. The results of one time 5-fold cross-validation are illustrated in Table 6. The figure of one time cross-validation is showed in Figure 5. (The 6-th point represents the average of the 5 points ahead.) After one-time cross-validation, we take ten cross-validation of SVM and LR and compare the average accuracy, which are showed in Table 7 and Figure 6. From the table 7 and figure 6, it can be seen that the prediction accuracy of SVM is better than logistic regression, and logistic regression is not very stable. The minimum accuracy of SVW and LR are 91% and 86% respectively. And the average accuracy of the two model 9 Table 6: The summary of one time 5-fold cross-validation using SVM and LR Method Performance i-th one cross-validation 1 2 3 4 5 Mean/6 Std SVM Accuracy (%) 85 100 100 92 90 93 6.54 LR Accuracy (%) 80 100 100 70 100 90 13.04 Figure 5: details in one 5-fold cross validation are 91% and 87% respectively. From the point view of variance, the variance of accuracy in SVM model is 0.94, which is 1.77 in LR model, and in one time 5-fold cross-validation, the value are 6.54 and 13.04 respectively. According to both average and variance of accuracy, the prediction performance of SVM is better than that of logistic regression. 4.3. Set penalty parameters of SVM In this section, different penalty parameters setting on the two types of error are considered. 10 Table 7: The summary of 10 times 5-fold cross-validation using SVM and LR Method Performance i-th cross-validation 1 2 3 4 5 6 7 8 9 10 Mean Std SVM LR Accuracy (%) Accuracy (%) 92 91 93 90 91 89 91 88 90 87 90 86 91 87 91 86 91 86 90 86 91 87.6 0.94 1.77 Figure 6: multi-times of 5-fold cross validation 4.3.1. Different errors in oil gas explosion prediction In the procedure of prediction, it will arise two types of error. The first one is that the prediction result is 1 but the actual result is -1; the second one is that the prediction result is -1 but the actual result is 1. In our work, the first type of error means that the prediction result is not explosive but the actual result is explosive; the second type of error means on 11 the contrary. One can find that the first error is more serious and it may lead big dangerous accident. Hence, we prefer to reduce the first error in practical predictions. Although these two types of error are inevitable, we can change the distribution of the types of error by adjusting parameters in SVM. The effect of the two types of error always has a big difference. From our opinion, the first type of error is more disastrous. So we pay more attention to avoid the first type of error. According to SVM model, in Eq. 8, we set ω1 > ω2 , where ω1 is the penalty parameter of the first type of error and ω2 is that the second type of error. From above discussion, our goal is to maximize accuracy of prediction, and meanwhile minimize the first type error, which implies that the selection of the ratio of ω1 and ω2 are quite important. In our experiments, we try to control the distribution of the two types of error by adjusting the ratio of ω1 and ω2 . 4.3.2. Balance experiments of two types of error In this section, we choose the appropriate ω1 and ω2 to control the distribution of the two types of error. In our experiment, we construct the model when ω1 = ω2 and ω1 = γω2 , where γ ∈ [1, 60] denotes the loss ratio coefficient. In this model, we take radial basis function as the kernel function. The result of the distribution of the two types of errors and the whole error rate are illustrated in Figure 7 with the stepsize of γ is 5, i.e., γ = 5k, k = 1, . . . , 12. As the number of data in test set is fixed, the error rate can represent the number of errors. Figure 7: Error Rate v.s. Weight ratio 12 In Figure 7, one can find that the first error rate is larger than the second with ω1 = ω2 , which is not the case what we expect. When γ > 0 increases, we can find that the first-type error rate is less than the second one. We can also find the intervals of γ corresponding the lowest first-type error as [5, 5], [8, 11], [15, 25] and [45, 60]. The we prefer to choose the loss ratio coefficient in these intervals such that the the whole error rate is as low as possible. In fact, we have choices of γ such that the whole error rate is 9% and the first-type error rate is only 3%. This result can control the distribution of the two types of errors and can achieve the goal of protecting people’s life although it may loss some profit for the second errors. 5. Discussion In this paper, we study the explosion prediction of oil gas, in which components are unknown. We mainly concern two problems, one is to predict whether the oil gas will explode, the other is to predict the explosion interval of the given concentration of mixed HC. The different statistic methods are introduced to analysis the real experimental data. Basis the results of statistic analysis, one can predict the explosion of the given certain percentage composition of oil gas and oxygen. Precisely, we mainly introduce the methods of SVM and LR in this paper. LR method can give an explicitly probability expression. The probability expression can be used for the tanks whose data of the components of oil gas are relatively stable and having no real-time updating database. SVM method can keep learning the data with updating. Comparing to LR, SVM can get higher accuracy. And SVM applies to the area of oil tanks with the data being collected real-time. As known that it is hard to detect the percentage composition of each component in oil gas, our models concern the total percentage composition of all oil gas to predict the explosion. Thus the methods are suitable for abroad applications. Before the explosion intervals estimating and the explosion predicting, we normalize the data and select variables for discussion. By using practical experimental data, we select the variables according to the purpose and background of the experiments. Using LR, one can obtain the explosion intervals of concentration. Considering the different levels of concentration of oxygen, we give the explosion intervals of concentration of oil gas respectively. From the computational results, we can find that the intervals of explosion are expanded to the two ends along with the increase of the concentration of oxygen. This situation just coincides with practical experience. With cross-validation in numerical experiments, the average prediction accuracy of LR can reach 87%, while the SVM gets more than 90%. These results show the applicability of SVM and LR for predicting the explosion of oil gas. In practical security protection with some special purposes, higher accuracy of prediction for some situations is needed. Generally, there are two kinds of error in prediction. One is that the no explosion is predicted but the data is in the range of explosion actually. Another is that the explosion is predicted for the new data but it is not true. We cannot tell which is more important of the different errors in theoretical analysis. However, in practical application, the second type of error may induce oil tank fire, which leads to disastrous 13 consequences. According to practical needs, we can restrict its occurrence as less as possible to meet the practical security requirements. Acknowledgement The authors would like to thank the Professor Sanguo Zhang for his useful advice and comments on this paper. We also thank Weitelog Fire Company for the data experiments. This work is supported by National Key Basic Research Program of China under Grant No.2011CB706901. References [1] D. Rasbash, Review of explosion and fire hazard of liquefied petroleum gas, Fire Safety Journal 2 (1980) 223 – 236. [2] S. Hφiset, B. H. Hjertager, T. Solberg, K. A. Malo, Statistical estimation of loads from gas explosions, Journal of Loss Prevention in the Process Industries 10 (1997) 271 – 283. [3] J. I.Chang, C.-C. Lin, A study of storage tank accidents, Journal of Loss Prevention in the Process Industries 19 (2006) 51–59. [4] CCPS, Guidelines for Chemical Process Quantitative Risk Analysis, Wiley-AIChE, second edition, 1999. [5] N. Wang, Oil gas and transport ship, Wuhan University of Technology Lecture, 2009. [6] H. Coward, G. Jones, Limits of flammability of gases and vapors, U.S. Bureau of Mines, Bulletin 503.US Government Printing Office (1952) 153. [7] J. Cheng, S. Yang, Improved coward explosive triangle for determining explosibility of mixture gas, Process Safety and Environmental Protection 89 (2011) 89–94. [8] A. Evsukoff, S. Gentil, Recurrent neuro-fuzzy system for fault detection and isolation in nuclear reactors, Advanced Engineering Informatics 19 (2005) 55–66. [9] M. C. Garcia, M. A. Sanz-Bobi, avier del Pico., Simap: Intelligent system for predictive maintenance application to the health condition monitoring of a windturbine gearbox, Computers in Industry 57 (2006) 552–568. [10] V. N.Vapnik, The Nature of Statistical Learning Theory, Springer, 1999. [11] Y. Liu, Y. Chen, Face recognition using total margin-based adaptive fuzzy support vector machines, IEEE Trans Neural Networks 18 (2007) 178–192. [12] K. Pload, S. Gunes, A. Arslan, A cascade learning system for classification of diabetes disease: generalized discriminant analysis and least square support vector machine, Expert Systems with Applications 34 (2008) 482–487. [13] J. Wang, Z. Guo, Logistic Regression Model–Method and applications, Higher Education Press, 2001. [14] R. Tibshirani, Regression shrinkage and selection via the lasso, J. Royal. Statist. Soc B. 58 (1996) 267–288. [15] A. Cerqueira, D. Ferreria, M. Ribeiro, C. Duque, Power quality events recognition using a svm-based method, Electric Power Systems Research 78 (2008) 1546–1552. [16] C. Hsu, C. Chang, C. Lin, A practical guide to support vector classification (2006). [17] B. Asl, S. Setarehdan, M. Mohebbi, Support vector machine-based arrhythmia classification using reduced features of heart rate variability signal, Artificial intelligence in medicine (2008). [18] Y. Liu, H. Huang, C. Weng, Recognition of electromyographic signals using cascaded kernel learning machine, IEEE/ASME Transactions on Mechatronics 12 (2007) 253–264. [19] K. Coussment, K. Poel, Churn prediction in subscription service: an application of support vector machines while comparing two parameter selection techniques, Expert Systems with Applications 34 (2008) 331–327. [20] C. Chang, C. Lin, Libsvm: a library for support vector machines (2001). 14
5cs.CE
> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 1 A Vector Matroid-Theoretic Approach in the Study of Structural Controllability Over F(z) Yupeng Yuan1, Zhixiong Li, Member, IEEE, Malekian Reza, Senior Member, IEEE, Yongzhi Chen 4*, Ying Chen5  Abstract—In this paper, the structural controllability of the systems over F(z) is studied using a new mathematical method-matroids. Firstly, a vector matroid is defined over F(z). Secondly, the full rank conditions of [ sI  A | B] ( s ) are derived in terms of the concept related to matroid theory, such as rank, base and union. Then the sufficient condition for the linear system and composite system over F(z) to be structurally controllable is obtained. Finally, this paper gives several examples to demonstrate that the married-theoretic approach is simpler than other existing approaches. Index Terms—matroid; structural controllability; rational function matrix; composite system completely controlled; if all state variables within the system of any form of movement can be completely reflected by the output, the system can be completely observed. It is efficient to use the theory of controllability and observability in real number field for analyzing the controllability and observability jointly determined by system structures and the physical parameter values. The theory has also been successfully applied in many aspects of system analysis and design [2-3]. However, in projects, due to the limitation of experimental conditions, manufacturing process, observational error, and approximate processing of data by human beings, the parameters of a real system are not accurate and even unknown. In such cases, by using only a single index of controllability, it is impossible to decide whether the fact that the system does not satisfy completely controllable conditions is caused by structural reasons or incorrect parameter selection. Therefore, using the system in the real number field is not a direct approach to analyze the structural properties of physical systems [5-6]. Take the bridge network shown in Fig. 1 as an example: I. INTRODUCTION K ALMAN systematically introduced the state space method into systems and control theory, which is the landmark of modern control theory. In the state space method, two important concepts characterizing systems’ properties were proposed, namely controllability and observability [1].After Kalman first proposed the concepts of controllability and observability, many authors [2] studied the subject of linear systems over the field R of real numbers. In short, if the internal movement of all state variables in a system can be affected and controlled by the input, the system can be The authors gratefully acknowledge the financial support provided by the National Natural Science Fund grant (51307047 and 51505475) and the self-determined and innovative research funds of Wuhan University of Technology grant 2010-YB-12, Yingcai Project of CUMT, and National Research Foundation, South Africa (RDYR160404161474). Yupeng Yuan is with the Reliability Engineering Institute, School of Energy and Power Engineering; Key Laboratory of Marine Power Engineering & Technology, (Ministry of Transport); National Engineering Research Center for Water Transport Safety, Wuhan University of Technology, Wuhan 430063,China (Email: [email protected]) Zhixiong Li is with the School of Mechatronic Engineering, China University of Mining and Technology, Xuzhou 221116, China; and School of Mechanical and Manufacturing Engineering, University of New South Wales, Sydney 2052, Australia (Email: [email protected]) Reza Malekian is with the Department of Electrical, Electronic & Computer Engineering, University of Pretoria, Pretoria 0002, South Africa (Email: [email protected]) Yongzhi Chen is with the Reliability Engineering Institute, School of Energy and Power Engineering; Key Laboratory of Marine Power Engineering & Technology, (Ministry of Transport); National Engineering Research Center for Water Transport Safety, Wuhan University of Technology, Wuhan 430063,China (Email: [email protected]) [Corresponding author] Ying Chen is with the Communication staff room of communication department, The Second Artillery Command College, Wuhan, 430063, China (Email: [email protected]) Figure 1. A bridge network Set x1  iL , x2  uC as two state variables; then the state equation of the system can be written as: RR  1 RR x1    1 2  3 4  x1  L  R1  R2 R3  R4  R3  1  R1 1    x2  u L  R1  R2 R3  R4  L R4  1  R2 x2     x1  C  R1  R2 R3  R4  1 1 1     x2 C  R1  R2 R3  R4  The controllability matrix of the system is (1) > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 1  L [b, Ab]   0  RR  1  RR  2 1 2  3 4  L  R1  R2 R3  R4    R2   1  R4     LC  R3  R4 R1  R2   2 R4 R2 ,no matter what values  R3  R4 R1  R2 L, R1 , R2 , R3 , R4 and C take, it is always true that rank[b, Ab]  2  n . Thus, system (1) is controllable polynomial matrix, column-structured matrix (CSM) and mixed matrix (MM). K. Murota first studied the structural controllability of systems by the matroid theory [27-29].He used the union of matroids to analyze the structural controllable conditions of descriptor system whose coefficient matrix is MM. The introduction of matroid further enriched the content of control theory. Although many significant conclusions with regard to structural controllability have been obtained, SM CSM and MM only described certain few types of systems, and the inverse matrix of the full rank square SM, CSM, one-degree polynomial matrix or mixed matrix is generally not SM, CSM, one-degree polynomial matrix or mixed matrix. To overcome this problem, papers [30-36] introduced rational function matrix (RFM)in multi-parameters to describe the coefficient matrices of systems and networks and described the systems and networks on RFM to study their structural properties. everywhere in the real number field. However, when the bridge keeps a dynamic balance, in other words, when R1R4  R2 R3 , The definition of RFM please see literature [30-36]. For example, if we consider a linear system: (2) For this system with given structure, only if all physical parameters L, R1 , R2 , R3 , R4 and C are real-valued, A and b are real matrices and the system is a real number system. When R3 R1 R2 R4   and , R1  R2 R3  R4 R1  R2 R3  R4 then the controllability matrix [b, Ab] is equal to X  AX  BU , Y  CX  DU there holds 1 R R  1  RR  2  1 2  3 4   L  R1  R2 R3  R4   . Since L 0  0   rank[b, Ab]  1  n ,system (1) is not controllable in the real number field. The above example demonstrates that the analytical results of real number system (such as the controllability of ( A, B) , the ( AT , C T ) , and the reducibility of eigenpolynomial det(  A) depend on two factors, namely observability of the (physical) structure and values of the physical parameters of a system. However, we cannot determine what the separate role of system structures is. In order to analyze the system structure, Lin [7] first introduced the concepts of structural controllability (SC) and structured matrix (SM) in 1974 and provided some structural controllability criteria by using graph theory. Later many researchers studied properties of structural controllability. Mayeda studied the controllability of multiple-input multiple-output system [8]. In 1976, the general rank of as tructural matrix is defined by Shield and Pearson[9-10] and the algebraic criterion was obtained. In recent decades, many scholars have studied the structural properties of a system by using the method of algebra or graph theory, and some valuable conclusions were drawn [11-20]. In fact, there exist an equivalence relation between the algebraic criterion and the graph criterion. The algebraic criterion and the graph theory criterion of structural controllability have an equivalent corresponding relationship as described in [21-22] with a rigorous proof. The above studies were based on SM proposed by Lin. Moreover, other forms of parameter matrices have also been proposed and used to study the structural properties of systems. For example, paper [23-26] introduced one-degree (3) A , B , C and D are respectively n  n , n  m , p  n , p  m matrices over F ( z ) , the system is called a rational function system (RFS) or a system over F ( z ) . where Since the entries of a rational function matrix are different from those of the SM, which are either fixed zero or independent free parameters, the conception of the RFM is more general. If all the physical parameters of a linear system are viewed as mutually independent parameter variables instead of constant real values, then the system is a linear system in F ( z ) , of which the controllability is irrelevant to system parameter values. If a system is controllable and observable in F ( z ) , i.e., structurally controllable and observable, then it is controllable and observable almost q everywhere in parameter space R , which implies that the system is actually always controllable and observable in the real number field. Currently, most studies on the structural property of systems in F ( z ) are based on methods of algebra and graph theory, and many important conclusions have been obtained. However, the algebra or graph criterion for the structural controllability over F ( z ) is more difficult and complicated than that of the systems which can be described as an SM, especially when the system dimension is very large, since a lot of symbolic operation is required for judging the structural controllability of systems by the criterions in time domain or frequency domain no matter which is obtained based on the state space method or polynomial matrix description method. In this paper, the matroid theory is firstly applied to analyze the system structure over F ( z ) . The equivalent condition that [sI  A | B ] is full rank was explored with the concepts in matroid theory, such as base, rank, and union of matroids, and the structural controllability criteria of a system or a parallel composite system are obtained over F ( z ) . The matroids > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 3 approach is generally easier than the traditional algebraic approach. 1) (M )  II. PRELIMINARIES 2) rM  ( X )  min{ ri (Y )  X  Y : Y  X } ; n This section presents the basic concepts of matroid-theory. See reference [37] for the complete introduction of matroids[38-41].. We begin with the following definitions. Definition 1: A matroid M is a pair 2 E is a finite set and collection that: 1)  such that where is subsets of E such any subset n The matroid and 1) and I1  I 2 then exist e  I 2  I1 I1 e  . emphasize that E ( M ) is the set of elements is the collection of independent sets M . If (M ) I  (M ) and A be an n  m matrix over F and E  E ( A) is a set of labels of the column vectors of A . as a collection: ( E, ) is a matroid if and only if the column vectors marked by X are linearly independent in the vector space where X  . Definition 3: The maximal independent subset of a matroid M is called a base of M . Denote ( M ) the family 4: (M )  Max( ) . The function rM : 2E  Z , rM ( X )  max{ I : I  X , I  ( M )} is called a rank M . Value rM ( E ) is called the rank of the matroid M and denoted as r ( M ) . function of the matroid , M n be n matroids on the set E . Their rank functions are respectively r1 , r2 , , rn .  {I1 I 2 I n : for each 1  i  n , Let Ii  (M i )} , then there exists a matroid M  on E such Definition 5: Let that M1 , M 2 ,  (M ) . satisfies B1 , B2  and for x  B1  B2 , there exists y . M 1 and M 2 be two matroids both on (M1  M 2 )  max{B1 B2 : B1  (M1 ), Lemma 2: Let set E . Then B2  (M 2 )} . M and Definition 2: Let Definition M ( E, ) be a matroid and contains at least one element (which implies that 2) For is denoted by is called an , M n . With the above M has at least one base); 1. Structural controllability of systems over I  k , I is also called a k - independent set of M . of all bases of M , then M1 , M 2 , y  B2  B1 such that ( B1  x) independent set of M . Axioms 1)-3) are called independent  (M ) are used to axioms. Generally, E  E (M ) and  2E i 1 definitions, we have the following lemmas. I   I then I   ; I1 , I 2  M  is usually denoted by  M i and called the union of M The family Thus, ( E, ) is a matroid which M  M ( E, ) . The entry of collection Define X  E. Lemma 1: Let ; 2) If I  3) If E ( E, ) for i 1 then F ( z) Let A   A1 A2 we M [ A]  M [ A1 ]  M [ A2 ]  have An  be matrices over F ( z ) ; T  M [ An ] by the definition of union matroids. To proceed, we need the following concepts. F ( z ) and E  E ( A) be a label set of the column vectors of A .  2E is defined as a collection: ( E, ) is a matroid if and only if the column vectors marked by X are linearly independent in the vector space V (n, F ( z )) , where X  . ( E , ) is also called vector matroid of A and denoted by M F ( z ) [ A] . Definition 6: Let A be a matrix over Definition 7: Let A and B be n  n and n  m matrices, respectively. M [ sI  A | B]  ( E, ) is a vector F ( z ) . If there exist n column vectors of the matrix [ sI  A | B] ( s  ) whose determinant is a unimodular matrix, the label set of n column vectors will be a base of the matroid M . is also called a unimodular matroid over base. Lemma 3: Linear system (3) is structural controllability if and only if rank[sI - A | B]  n , s  . Our main results are as follows: Theorem 1:Consider a linear system (3) over F ( z) . > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) <   [ sI  A | B]    Let   . M[ 2 1 vector matrices respectively, where 1 ] and M [ rank( M [ 1 2 ] be ])  n1 , ])  n2 . The system ( A, B) is structural controllable if there exist two unimodular bases B1 and B2 , rank(M [ 2 B1 B2   and n1  n2  n ( s  ), where B1  (M [ 1 ]), B2  (M [ 2 ]) satisfy lemma 2, Max{B1 ( M1  M 2  then B2 Bi  (M [ i j ( ( M1  M 2  n1  n2  1 i 2 Bj   we  M n )  B1  B2  ]  M[ Bn are , ]) and Bi ),  nn  n  rank(M [  Mn )  Bn } . Since B1 , B2 , unimodular bases, where 4 . Hence, ]  have  Bn  rank[sI  A | B] M[ n ] )   (M1  M 2   M n )  n . So the system ( A, B) is  [ sI  A | B]   1  ,from structural controllable.  2 Consider two linear subsystems over F ( z ) definition 5 we have M [ ]  M [ 1 ]  M [ 2 ] . Additionally, i : X i  Ai X i  Biui , yi  Ci X i  Diui (4) since B and B are two unimodular bases, B  n and Proof : Since 2 1 1 1 B2  n2 can be established by Definition 7. Since B1 B2   n1  n2  n , and Max{B1 where B1  (M [ B2 }  B1  B2  1 B2  ]) and (M [ 1 ]  M [ 2 ])  n from rank[sI  A | B]  rank(M [ ]) lemma 2. Then  rank(M [ 1 ]  M [ 2 ]) (M [ 1 ]  M [ 2 ])  n , so the linear system ( A, B) is structural controllable. Theorem 2:Consider a linear system (3) over F ( z ) . (M [ 2 i, j  1, 2, s  . Bj   , where Bi  (M [ , n , i  j and n1  n2     [ sI  A | B]   Proof: Since    M[ ]  M[ 1]  M[ 2 ]   M [ n ] It is ui  R , yi  R, i  1, 2 . The state space description of the parallel composite system straightforward ( M1  M 2  to  M n )  Max{B1 is: 0   x1   B1       u A2   x2   B2  (5) x  y  C1 C2   1    D1  D2  u  x2  Let Ai , Bi , Ci and Di be matrices over F ( z ) (i  1, 2) . We n p is  i is structural controllable and there exist two unimodular bases B1 and B2 of vector matroids , structural controllable if , M [sI  A1 | 0n1n2 | B1 ] and M [0n2 n1 | sI  A2 | B2 ] , such ]) ,  nn  n , B2   ( s  ). Proof: Since  i is structural controllable, we have B1 that 1  [sI  A1 | 0n1n2 | B1 ] and 2  [0n2 n1 | sI  A2 | B2 ] ;   sI  A1 | 0n1n2 | B1    [ sI  A | B ] ,  2 0n2 n1 | sI  A2 | B2   A1 0   B1  where A    and B    . It is true that  B2   0 A2  M [ ]  M [ 1 ]  M [ 2 ] by Definition 5. So    1 by Definition 5. rank(M [ ])  rank( M [ that Bn } by and rank[sI  A2 | B2 ]  rank(M [sI  A2 | B2 ])  n2 . Let   2 , we have   n 1  n1 rank[ sI  A1 | B1 ]  rank( M [ sI  A1 | B1 ]) then verify B2 i p :  x1   A1 x     2  0 p Theorem 3 : A parallel composite system rank( M [ 1 ])  n1 , rank(M [ 2 ])  n2 , , rank(M [ n ])  nn . The system ( A, B) is structural controllable if there exist n unimodular bases B1 , B2 , , Bn Bi , have the following conclusions. where that X i  R ni m ]) , we have  1    [ sI  A | B]   2  . M [ 1 ] , M [ 2 ] , Let      n M [ n ] be vector matroids of matrices 1 , 2 , , satisfy where dim Ai  ni  ni , dim Bi  ni  m , (M [ 1 ]  M[ 2 ]) 1 ]  M[  Max{B1 2 ])  B2 } , where > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < B1  (M [ 1 ]) and B2  (M [ 2 ]) . It is easy to show       rank(M [sI  A1 | B1 ])  that rank(M [sI  A1 | 0n1n2 | B1 ]) and rank( M [ sI  A2 | B2 ])  rank ( M [0n2 n1 | sI  A2 | B2 ]) by linear algebra theory. So B1  rank(M [sI  A1 | B1 )  n1 and B2  rank(M [sI  A2 | B2 ])  n2 . In addition, since B1 rank(M [ ])  Max{B1  rank [sI  A | B ] . system p B2   ,we have composite system consisting of  x1   A1   p :      xN   N subsystems. Let p be   x1   B1           u AN   x2   BN  p structural N subsystems is structural controllable if  i are controllable and there exist N unimodular bases B1 , B2 , , BN vector  nN ) M [0nN ( n1 n2   nN 1 ) matroids  nN ) | B2 ] | sI  AN | BN ] , , satisfying that B j   , i, j  1, 2, , N , i  j , s  . Proof:Since  i are structural controllable, we have rank[sI  A1 | B1 ]  rank(M [sI  A1 | B1 ])  n1 rank[sI  A2 | B2 ]  rank(M [sI  A2 | B2 ])  n2 , , , rank[sI  AN | BN ]  rank( M [ sI  AN | BN ])  nN . Let 1  [ sI  A1 | 0n1( n2  n3   nN ) | B1 ]  [0n2 n1 | sI  A2 | 0n2 ( n3 n4   [0nN ( n1 n2  (9) 2 ]  ] by Definition 5. So 1  (M [ B1  (M [ BN  (M [ N ]) where 1 ]  M[ 2 B2 1 ]  M[ N ]) BN } ] M[ 2 ] ]) , B2  (M [  M[ 2 N ] ]) , , Since rank( M [ sI  A1 | B1 ])  rank( M [ sI  A1 | 0n1( n2  n3   nN ) | B1 ]) rank( M [ sI  A2 | B2 ])  rank(M [0n2 n1 | sI  A2 | 0n2 ( n3  n4   nN ) | B2 ]) rank( M [ sI  AN | BN ])  rank(M [0nN ( n1  n2   nN 1 ) | sI  AN | BN ]) So B1  rank(M [sI  A1 | B1 )  n1 , B2  rank(M [sI  | B1 ] M [0n2 n1 | sI  A2 | 0n2 ( n3 n4  have  Max{B1 consisting of of N (6) i  1, 2, , N .Let Ai , Bi , Ci and Di are matrices over F ( z ) (i  1, 2, , n) . We have: Theorem 4 : A parallel composite system M[  B1  0    ,B     BN  AN  M[ ]  M[ 1]  M[ rank( M [ ])  rank( M [  x1  y  C1 CN      D1   DN  u (7)  xN  where , , dim Ai  ni  ni dim Bi  ni  m N  A1  A 0  We such a system whose state space description is: 2 where Therefore, the parallel composite We now study the structural controllability of parallel Bi   sI  A | B  is structural controllable. M [sI  A1 | 0n1( n2 n3     sI  A1 | 0n1( n2  n3   nN ) | B1   0 | sI  A | 0 | B   n  n 2 n  ( n  n   n ) 2 2  2 3 4 N  2 1     (8)   0n ( n  n   n ) | sI  AN | BN  N N 1 2 N 1   1  B1  B2  n1  n2 B2 } 5 ,  nN ) | B2 ] ,  nN 1 ) | sI  AN | BN ] ; then , A2 | B2 ])  n2 , and, in addition, Bi B j   , i, , BN  rank(M [sI  AN | BN )  nN j  1, 2, rank( M [ ])  Max{B1  B1  B2   n1  n2  , N ,i  j B2 BN }  BN  nN  rank[ sI  A | B ] Therefore, the parallel composite system p is structural controllable. III. EXAMPLE Example 1:Consider a parallel composite system [42-45] > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < shown in figure 2. 1  [sI  A1 | 0 | B1 ] , 2 6  [0 | sI  A2 | B2 ] (14) M [ 1 ] and M [ 2 ] are two vector matroids over F ( z ) .So rank(M [ 1 ])  n1  2 , rank(M [ 2 ])  n2  3 (15) B1  {a2 , a6 } and B2  {a3 , a5 , a7 } are unimodular bases of vector matroid M [ 1 ] and M [ 2 ] respectively by linear then Figure 2 A parallel composite system where 1 1 0  0   , A2  0 0 1 ,    1 1 0 0  z A1   1 0 1 0 , B1    z2   z3  z1 B2   0  0 0 1  are matrices over F ( z ) . 0  The controllability matrix of subsystem 1 : x1  A1 x1  B1u of parallel composite system is 1  0 0 z3 A1B1    (10)   z3 1 z2 z3 z2  rank[ B1 A1B1 ]=2 Since , the subsystem 1 : x1  A1 x1  B1u is structural controllable. Similarly, the controllability matrix of subsystem 2 : x2  A2 x2  B2u is  B1  B2 A2 B2 Then, rank[ B2 algebra theory and the definition of matroid base. Moreover, since B1 B2  {a2 , a6 } {a3 , a5 , a7 }   and n1  n2  2  3  5 , The parallel composite system is structural controllable by Theorem 3. Example 2:The classical double inverted pendulum system shown in figure 3 is composed of a pair of rigid, homogenous pendulum rods which are interconnected in a joint, and one of them is attached to a stable mechanism (cart) which allows for movement alongside a single axis. To simplify the system, we ignore air resistance and all sorts of friction.  z1 0 z1 1 z1 1  A B2    0 1 0 0 z1 0  (11)  0 0 z1 0 z1 0  A2 B2 A22 B2 ]  3 , so the subsystem 2 2  x   A 0   x1   B1   p ( p  1, 2 ):  1    1       u (12)  x2   0 A2   x2   B2   A1 0   B1  Let A   and B    ; then   0 A2   B2   sI  A1 | 0 | B1  [ sI  A | B]    0 | sI  A2 | B2  a1 a2 a3 a4 a5 a6 a7 (13) 1 0 0 0 0 0  s  z1  0 s  z2 0 0 0 z3 1    0 0 s  1 1 0 z1 0    0 0 s 1 0 1   0  0 0 1 0 s 0 0  where E  {a1 , a2 , a3 , a4 , a5 , a6 , a7 } is the label set of the column vector of the matrix [ sI  A | B] . Let Figure 3 Schematic diagram of double inverted pendulum system Here 1 and  2 respectively represent the angles of first and second pendulums with respect to the vertical axis, x denotes the position of the cart, M is the mass of the cart, m1 is the m2 represents the mass of second link, m3 is the mass of the hinge and encoder, l1 and l2 denote the mass of the first link, length of the first and second pendulums, respectively. State variables are taken as follows: x1  x , x2  1 , x3   2 , x4  x , x5  1 , x6   2 Let Z  ( z1 , z2 , z3 , z4 , z5 )  (m1 , m2 , m3 , l1 , l2 ) be five independent physical parameters. The state space equation of double inverted pendulum system can then be written as: x  Ax  Bu (16) where > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 0 0 0 0  0 0 A 0 0 0 K12  0 K 22 0  0    0  0    0  1 ,B    0  1   K17  0    0   K 27  3g ( z1  2 z2  2 z3 )  K12 z4 (4 z1  3z2  12 z3 ) 9 z2 g   K13 2 z4 (4 z1  3z2  12 z3 ) 9 g ( z1  2 z2  2 z3 )   K 22 2 z5 (4 z1  3z2  12 z3 ) 3g ( z1  3z2  3z3 )   K 23 z5 (4 z1  3z2  12 z3 ) 3(2 z1  z2  4 z3 )  K17 2 z4 (4 z1  3z2  12 z3 ) 3z1   K 27 2 z5 (4 z1  3z2  12 z3 ) 0 0 0 0 K13 K 23 1 0 0 0 0 0 0 1 0 0 0 0 M[ ]  M[ (17) (18) 1 ]  M[ 2 ]  M[ 3 7 ] . B1  {a4 , a5} , B2  {a6 , a7 } and B3  {a2 , a3} are unimodular bases of vector matroid M [ 1 ] , M [ 2 ] and M [ 3 ] respectively by the definition of matroid base. Moreover, since rankM [ 1 ]  B1  2 rankM [ 3 ]  B3  3 , rankM [ 2 ]  B2  2 , B1  B2  B3  6  n , Bi B j   , i, j  1, 2,3 , i  j , s  , the double inverted pendulum and system is structural controllable by Theorem 4. (19) IV. CONCLUSION (20) (21) (22) (23) The structural controllability of linear systems was studied with different mathematical methods and matrix structures, and some structural controllability criteria were derived. In this paper, the structural property has been studied using the concept of matroids over F ( z ) . Then, the structural controllability criteria have been obtained for linear systems and parallel composite systems. A novel approach to study the structural properties has also been provided. We have shown that the approach presented in this paper is substantially simpler than any other existing ones. Let  s 0 0 1  0 s 0 0 0 0 s 0 2   0 0 0 s 0  K12  K13 0 A3   0  K 22  K 23 0 1 0 0 0 1 0 0  0 1 0  0 0 1  V. REFERENCES (24) (25) s 0 K17  0 s K 27  (26) We have  1  [ sI  A | B]   2    3  a1 a2 a3 a4 a5 0 s 0 s  0 0  0 0 0  K12  0  K 22 0 0 s 0  K13  K 23 1 0 0 1 0 s 0 0 0 0 s 0 a6 a7 (26) 0  0  1 0   0 1  0 K17   s K 27  0 0 E  {a1 , a2 , a3 , a4 , a5 , a6 , a7 } is the label set of the column vectors of matrix . Then M [ 1 ] , M [ 2 ] and where M[ 3 ] are all vector matroids over F ( z ) , and [1] Kalman, R.E.: 'On the General Theory of Control Systems', Proc. 1st Internat. Congress on Automatic Control, Butterworth’s, London, pp.481-493, 1960. [2] Gilbert, E.: 'Controllability and Observability in Multivariable Control Systems', SIAM J.Control,1963, 1, pp128-151. [3] Casti, J. L.; 'Linear Dynamical Systems', Orlando, Florida: 'Academic Press', 1987. [4] Chen, C. T.: 'Linear system theory and design'. New York: 'Holt, Rinehart and Winston', 1984. [5] Lu,K. S.: 'Investigation on Structural Properties of Systems in Terms of Rational Function Matrices in Multi-Parameters', Control Theory and Applications, 1997, 4, (5), pp 770-772. (In Chinese) [6] Zadeh, L. A,; Desoer C. A.: 'Linear System Theory: the state space approach'. New York: 'McGraw-Hill', 1963. [7] Lin, C. T.: 'Structural Controllability', IEEE Transactions on Automatic Control, 1974, 19, (3), pp 201-208. [8]Mayeda, H.: 'On Structural Controllability Theorem', IEEE Trans., AC,1981, 26, pp 795-798. [9] Shields, R.W., Pearson, J.B.:'Structual controllability of multiinput linear systems', IEEE Trans AC, 1976, 21, pp 203-212. [10] Glover, K., Silverman, L. M.: 'Characterization of structural controllability', IEEE Transactions on Automatic Control, 1976, 21, (4), pp 534-537. [11] Hou, B., Li, X., Chen, G.: 'Structural Controllability of Temporally Switching Networks', IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS I-REGULAR PAPERS, 2016, 63, (10), pp1771-1781. > REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < [12] Sun, S., Ma, Y., Wu, Y., et al.: 'Towards structural controllability of local-world networks', Physics Letters A, 2016, 380, (22), pp1912-1917. [13] Yin, H., Zhang, S.: 'Minimum structural controllability problems of complex networks', Physica A Statistical Mechanics & Its Applications, 2015, 443, (1), pp 467-476. [14] Liu, P., Tian, Y., Zhang, Y.: 'Strong Structural Controllability and Leader Selection for Multi-agent Systems with Unidirectional Topology'. Proceedings of the 2015 Chinese Intelligent Systems Conference. Springer Berlin Heidelberg, 2016. [15] Cristina, A., Estefanía, E. M., Stephen W.:'Multi-round Attacks on Structural Controllability Properties for Non-complete Random Graphs'.Information Security, 2015, pp 140-151 [16] Qi, A., Ju, X., Zhang, Q., et al.: 'Structural Controllability of Discrete-Time Linear Control Systems with Time-Delay: A Delay Node Inserting Approach', Mathematical Problems in Engineering, 2016, 2016, (4), pp 1-9. [17] Reza, H., Hamid, R. N.: 'Algorithm for Identifying Minimum Driver Nodes Based on Structural Controllability', 2015, http://dx.doi.org/10.1155/2015/192307 [18] Pósfai, M., Hövel, P.: 'Structural controllability of temporal networks', New Journal of Physics, 2014, 16, (12). [19] Reissig, G., Hartung, C., Svaricek, F.: 'Strong Structural Controllability and Observability of Linear Time-Varying Systems',IEEE Transactions on Automatic Control, 2014, 59, (11), pp 3087-3092. [20] Nacher, J. C., Akutsu, T.: 'Structural controllability of unidirectional bipartite networks', Scientific Reports, 2013, 3, (4), pp 1647-1647. [21]Yamada,T.: 'Comments on ―On structural controllability theorem', IEEE Trans. AC, 1984, 29, pp 1130-1131. [22]Linnemann,A.: 'A further simplification in the proof the structural controllability theorem', IEEE Trans. AC, 1986, 31, pp 638-639. [23]Anderson, B.D.O., Hong, H.M.: 'Structural controllability and matrix nets', International J Control, 1982, 35, pp 397-416 [24]Yamada, T., Luenberger, D.G.: 'Generic properties of column-structured matrices', Linear Algebra Appl, 1985, 65, pp 186-206 . [25]Murota, K.: 'System analysis by graphs and matroids--structural solvability and controllability'. New York: 'Springer-Verlag', 1987 [26]Murota, K.: 'On the Smith normal form of structured polynomial matrices', SIAM J. Matrix Anal. Appl, 1989. 12,pp 747-765 [27]Murota,K.: 'Refine study on structural controllability of descriptor systems by means of matroids', SIAM J. Control and Optimization,1987, 25, 4, pp 967-989. [28]Murota,K.: 'A Matroid-Theoretic Approach to Structurally Fixed Modes of Control Systems', SIAM J. Control Optim, 1989, 27, pp 1381-1402 [29]Murota,K.: 'Matrices and matroids for systems analysis'. New York:'Springer Heidelberg Dordrecht', London, 2010. [30]Lu, K.S. and Wei, J.N.:'Rational function matrices and structural controllability and observability'. IEE Proceedings-D. 1991. 138. 388-394. 8 [31]Lu, K.S., Wei, J.N.: 'Reducibility condition of a class of rational function matrices', SIAM J Matrix Anal Appl. 1994,15, pp 151-161 [32]Lu, K.S., Lu, K.: ‘Controllability and observability criteria of RLC networks over F(z)’, International Journal of Circuit Theory and Applications, 2001, 29, pp337-341 [33]Lu,K. S.: 'A sufficient condition of controllability of RLCM active networks over F(z)', International Journal of Circuit Theory and Applications, 2007, 35,pp 205–210 [34]Lu, K. S.: 'Existence condition of state equations of linear active networks over F(z)', International Journal of Circuit Theory and Applications, 2008, 36, pp109–118 [35]Lu K.S.,Liu, G.M.: ‘Class of rational function matrices that satisfy two properties of linear systems and structural controllability’, IET Control Theory Appl. 2007, 1, (1),pp 113-118. [36]Lu,K. S.: 'The controllability of linear systems over F(z)'. Proc 40th IEEE CDC 2001,pp 2676-2681. [37]Lai,J. H.: 'Matroid Theory'. BeiJing: 'Higer eduction press', 2002. (In Chinese) [38] Zhang Xin, Shao Jie, An Wenwei,Yang Tiantian,, "An Improved Time-Frequency Representation based on Nonlinear Mode Decomposition and Adaptive Optimal Kernel", Elektronika ir Elektrotechnika, Vol. 22, No.4, pp.52-57, 2016. [39] Xiangjun Jin, Jie Shao, Xin Zhang, Wenwei An, "Modeling of nonlinear system based on deep learning framework", Nonlinear Dynamics, Springer, Vol.84, No. 3, pp.1327-1340, 2016 [40] Zhongqin Wang, Ning Ye, Ruchuan Wang, Peng Li,"TMicroscope: Behavior Perception Based on the Slightest RFID Tag Motion", Elektronika ir Elektrotechnika, Vol.22, No.2, pp.114-122, 2016. [41] R. Malekian, Dijana Capeska Bogatinoska, Aleksandar Karadimce, Jasna Trengoska, William A. Nyako, "A Novel Smart ECO model for Energy Consumption Optimization", Elektronika ir Elektrotechnika, Vol. 21, No.6, pp.75-80, 2015 [42] K. Prabu, D. Sriram Kumar, "BER Analysis of BPSK-SIM-based SISO and MIMO FSO systems in strong turbulence with pointing errors", Optik - International Journal for Light and Electron Optics, Elsevier, Vol.125, No. 21, pp. 6413-6417, 2014 [43] R Malekian, A.H. Abdullah, "Traffic Engineering based on effective envelope algorithm on novel resource reservation method over mobile Internet protocol version 6", International Journal of Innovative Computing, Information and Control, Vol.8, No.9, pp. 6445-6459, 2012. [44] Zhongqin Wang, Ning Ye, Fu Xiao, Ruchuan Wang, "TrackT: Accurate Tracking of RFID Tags with mm-level Accuracy Using first-order Taylor series approximation", AD Hoc Networks, Elsevier, Vol.53, pp.132-144, 2016. [45] Jie Shao, Li Wang, WeiSong Zhao, YaQin Zhong, "An improved Synchronous Control Strategy based on Fuzzy controller for PMSM", Elektronika ir Elektrotechnika, Vol ,20, No.6, pp17-23, 2014.
3cs.SY
Human-in-the-Loop Synthesis for Partially Observable Markov Decision Processes arXiv:1802.09810v1 [cs.AI] 27 Feb 2018 Steven Carr1 Nils Jansen2 Ralf Wimmer3 Abstract— We study planning problems where autonomous agents operate inside environments that are subject to uncertainties and not fully observable. Partially observable Markov decision processes (POMDPs) are a natural formal model to capture such problems. Because of the potentially huge or even infinite belief space in POMDPs, synthesis with safety guarantees is, in general, computationally intractable. We propose an approach that aims to circumvent this difficulty: in scenarios that can be partially or fully simulated in a virtual environment, we actively integrate a human user to control an agent. While the user repeatedly tries to safely guide the agent in the simulation, we collect data from the human input. Via behavior cloning, we translate the data into a strategy for the POMDP. The strategy resolves all nondeterminism and non-observability of the POMDP, resulting in a discrete-time Markov chain (MC). The efficient verification of this MC gives quantitative insights into the quality of the inferred human strategy by proving or disproving given system specifications. For the case that the quality of the strategy is not sufficient, we propose a refinement method using counterexamples presented to the human. Experiments show that by including humans into the POMDP verification loop we improve the state of the art by orders of magnitude in terms of scalability. I. I NTRODUCTION We aim at providing guarantees for planning scenarios given by dynamical systems with uncertainties and partial observability. In particular, we want to compute a strategy for an agent that ensures certain desired behavior [15]. A popular formal model for planning subject to stochastic behavior are Markov decision processes (MDPs). An MDP is a nondeterministic model in which the agent chooses to perform an action under full knowledge of the environment it is operating in. The outcome of the action is a probability distribution over the system states. Many applications, however, allow only partial observability of the current system state [20], [40], [45]. For such applications, MDPs are extended to partially observable Markov decision processes (POMDPs). While the agent acts within the environment, it encounters certain observations, according to which it can infer the likelihood of the system being in a certain state. This likelihood is called the belief state. Executing an action leads to an update of the belief state according to new observations. The belief state together with the update function form a (possibly infinite) MDP, commonly referred to as the underlying belief MDP [35]. 1 The University of Texas at Austin, USA University, Nijmegen, The Netherlands, [email protected] 3 Albert-Ludwigs-Universität Freiburg, Freiburg im Breisgau, Germany 4 Worcester Polytechnic Institute (WPI), USA 2 Radboud Jie Fu4 Ufuk Topcu1 G X Fig. 1: Example Gridworld Environment. Features are (1) an agent with restricted range of vision (green area), (2) static and randomly moving obstacles (red), and (3) a goal area G. As a motivating example, take a motion planning scenario where we want to devise a strategy for an autonomous agent accounting for both randomly moving and static obstacles. Observation of these obstacles is only possible within a restricted field of vision like in Fig. 1. The strategy shall provably ensure a safe traversal to the goal area with a certain high probability. On top of that, the expected performance of the agent according to the strategy shall encompass taking the quickest possible route. These requirements amount to having quantitative reachability specifications like “The probability to reach the goal area without crashing into obstacles is at least 90 %” and expected cost specifications like “The expected number of steps to reach the goal area is at most 10”. Quantitative verification techniques like probabilistic model checking (PMC) [21] provide strategies inducing guarantees on such specifications. PRISM [25] or Storm [12] employ efficient methods for finite MDPs, while POMDP verification – as implemented in a PRISM prototype [29] – generates a large, potentially infinite, belief MDP, and is intractable even for rather small instances. So-called point-based methods [30], [38] employ sampling of belief states. They usually have slightly better scalability than verification, but there is no guarantee that a strategy provably adheres to specifications. We discuss two typical problems in POMDP verification. 1) For applications following the aforementioned example, verification takes any specific position of obstacles and previous decisions into account. More generally, strategies inducing optimal values are computed by assessment of the full belief MDP [35]. 2) Infinite horizon problems may require a strategy to have infinite memory. However, randomization over possible choices can often trade off memory [9]. The intuition is that deterministic choices at a certain state may need to vary depending on previous decisions and observations. Allowing for a probability distribution over the choices – relaxing determinism – is often sufficient to capture the necessary variability in the decisions. As also finite memory can be encoded into a POMDP by extending the state space, randomization then supersedes infinite memory for many cases [2], [19]. Here, we propose to make active use of humans’ power of cognition to (1) achieve an implicit abstraction of the belief space and (2) capture memory-based decisions by randomization over choices. We translate POMDP planning scenarios into virtual environments where a human can actively operate an agent. In a nutshell, we create a game that the human plays to achieve a goal akin to the specifications for the POMDP scenario. This game captures a family of concrete scenarios, for instance varying in characteristics like the agent’s starting position or obstacle distribution. We collect data about the human actions from a number of different scenarios to build a training set. With Hoeffding’s inequality [46], we statistically infer how many human inputs are needed until further scenarios won’t change the likelihoods of choices. Using behavior cloning techniques from Learning-fromDemonstration (LfD) [3], [34], we cast the training set into a strategy for a POMDP that captures one specific scenario. Such a strategy fully resolves the nondeterminism and partial observability, resulting in a discrete-time Markov chain (MC). PMC for this MC is efficient [25] and proves or disproves the satisfaction of specifications for the computed strategy. A human implicitly bases their decisions on experiences over time, i. e., on memory [11]. We collect likelihoods of decisions and trade off such implicit memory by translating these likelihoods into randomization over decisions. In general, randomization plays a central role for describing human behavior in cognitive science. Take for instance [23] where human behavior is related to quantifying the trade-off between various decisions in Bayesian decision theory. Formally, the method yields a randomized strategy for the POMDP that may be extended with a finite memory structure. Note that computing such a strategy is already NP-hard, SQRT-SUM-hard, and in PSPACE [41], justifying the usage of heuristic and approximative methods. Naturally, such a heuristic procedure comprises no means of optimality. However, employing a refinement technique incorporating stochastic counterexamples [1], [17] enables to pointedly immerse the human into critical situations to gather more specific data. In addition, we employ bounds on the optimal performance of an agent derived from the underlying MDP. This delivers an indication whether no further improvement is possible by the human. Besides simple motion planning, possible applications include self-driving cars [13], autonomous trading agents in the stock market [42], or service robots [22]. We implemented this synthesis cycle with humans in the loop within a prototype employing efficient verification. The results are very promising as both PRISM and pointbased solvers are outperformed by orders of magnitude both regarding running time and the size of tractable models. Our approach is inherently correct, as any computed strategy is verified for the specifications. Related Work: Closest to our work is [10], where deep reinforcement learning employs human feedback. In [32], a robot in a partially observable motion planning scenario can request human input to resolve the belief space. The availability of a human is modeled as a stochastic sensor. Similarly, oracular POMDPs [4] capture scenarios where a human is always available as an oracle. The latter two approaches do not discuss how to actually include a human in the scenarios. The major difference of all approaches listed above in comparison to our method is that by employing verification of inferred strategies, we obtain hard guarantees on the safety or performance. Verification problems for POMDPs and their decidability have been studied in [7]. [44] investigates abstractions for POMDP motion planning scenarios formalizing typical human assessments like “the obstacle is either near or far”, learning MDP strategies from human behavior in a shared control setting was used in [16]. Finally, various learning-based methods and their (restricted) scalability are discussed in [5]. Structure of the paper: After formalisms in Sect. II, Section III gives a full overview of our methodology. In Sect. IV, we formally discuss randomization and memory for POMDP strategies; after that we introduce strategy generation for our setting together with an extensive example. We describe our experiments and results in Sect. VI. II. P RELIMINARIES A probability distribution over a finite or countably infinite set X is a function µ : X → [0, 1] ⊆ R with ∑x∈X µ(x) = µ(X) = 1. The set of all distributions on X is Distr(X). The support of a distribution µ is supp(µ) = {x ∈ X | µ(x) > 0}. A. Probabilistic Models Definition 1 (MDP) A Markov decision process (MDP) M is a tuple M = (S, sI , Act, P) with a finite (or countably infinite) set S of states, an initial state sI ∈ S, a finite set Act of actions, and a probabilistic transition function P : S × Act → Distr(S). The available actions in s ∈ S are Act(s) = {a ∈ Act | (s, a) ∈ dom(P)}. We assume the MDP M contains no deadlock states, i. e., Act(s) 6= 0/ for all s ∈ S. A discrete-time Markov chain (MC) is an MDP with |Act(s)| = 1 for all s ∈ S. A path (or run) of M is a finite or infinite sequence a0 a1 π = s0 −→ s1 −→ · · · , where s0 = sI , si ∈ S, ai ∈ Act(si ) M The set of (in)finite paths is PathsM fin (Paths ). To define a probability measure for MDPs, strategies resolve the nondeterministic choices of actions. Intuitively, at each state a strategy determines a distribution over actions to take. This decision may be based on the history of the current path. Definition 2 (Strategy) A strategy σ for  M is a function  σ : PathsM → Distr(Act) s. t. supp σ (π) ⊆ Act last(π) for fin M all π ∈ PathsM fin . Σ denotes the set of all strategies of M. A strategy σ is memoryless if last(π) = last(π 0 ) implies σ (π) = σ (π 0 ) for all π, π 0 ∈ dom(σ ). It is deterministic if σ (π) is a Dirac distribution for all π ∈ dom(σ ). A strategy that is not deterministic is randomized. Here, we mostly use strategies that are memoryless and randomized, i. e., of the form σ : S → Distr(Act). A strategy σ for an MDP resolves all nondeterministic choices, yielding an induced Markov chain (MC) M σ , for which a probability measure over the set of infinite paths is defined by the standard cylinder set construction. Definition 3 (Induced Markov Chain) Let MDP M = (S, sI , Act, P) and strategy σ ∈ ΣM . The MC induced by M and σ is given by M σ = (S, sI , Act, Pσ ) where: Pσ (s, s0 ) = ∑ σ (s)(a) · P(s, a)(s0 ) Initial POMDP D, Specification ϕ Refinement Refined POMDP UNSAT SAT Training Environment Demonstration Model Checking Strategy Behavior Cloning ∀s, s0 ∈ S . a∈A(s) Fig. 2: Workflow of human-in-the-loop (HiL) methodology. B. Partial Observability Definition 4 (POMDP) A partially observable Markov decision process (POMDP) is a tuple D = (M, Z, O) such that M = (S, sI , Act, P) is the underlying MDP of D, Z is a finite set of observations and O : S → Z is the observation function. the states in the POMDP. This distribution is expected to correspond to the probability to be in a specific state based on the observations made so far. C. Specifications We require that states with the same observations have the same set of enabled actions, i. e., O(s) = O(s0 ) implies Act(s) = Act(s0 ) for all s, s0 ∈ S. More general observation functions take the last action into account and provide a distribution over Z. There is a transformation of the general case to the POMDP definition used here that blows up the state space polynomially [8]. Furthermore, let Pr(s|z) be the probability that given observation z ∈ Z, the state of the POMDP is s ∈ S. We assume a maximum-entropy probability distribution [18] to provide an initial distribution over potential states for an 1 observation z given by Pr(s|z) = |{s0 ∈S | z=O(s 0 )}| . Vice versa, we set Pr(z|s) = 1 iff z = O(s) and Pr(z|s) = 0 otherwise. The notion of paths directly transfers from MDPs to POMDPs. We lift the observation function to paths: For a0 a1 a POMDP D and a path π = s0 −→ s1 −→ · · · sn ∈ PathsM fin , a0 the associated observation sequence is O(π) = O(s0 ) −→ a1 O(s1 ) −→ · · · O(sn ). Note that several paths in the underlying MDP may yield the same observation sequence. Strategies have to take this restricted observability into account. Definition 5 An observation-based strategy of POMDP D is a function σ : PathsM fin → Distr(Act) such that σ is a strategy for the underlying MDP and for all paths π, π 0 ∈ PathsM fin with O(π) = O(π 0 ) we have σ (π) = σ (π 0 ). ΣD z denotes the set of observation-based strategies for D. An observation-based strategy selects actions based on the observations encountered along a path and past actions. Note that applying an observation-based strategy to a POMDP yields an induced MC as in Def. 3 where all nondeterminism and partial observability is resolved. Again, we use memoryless and randomized strategies of the form σz : Z → Distr(Act). The semantics of a POMDP can be described using a belief MDP with an uncountable state space. The idea is that each state of the belief MDP corresponds to a distribution over For a POMDP D = (M, Z, O), a set G ⊆ S of goal states and a set B ⊆ S of bad states, we consider quantitative reach-avoid specifications of the form ϕ = P>λ (¬B U G). A strategy σz ∈ Σz satisfies this specifications if the probability of reaching a goal state without entering a bad state in between is at least λ in the induced MC, written Dσz |= ϕ. We also use similar specifications of the form EC≤κ (¬B U G), measuring the expected cost to safely reach a goal state. For POMDPs, observation-based strategies in their full generality are necessary [33]. Consider a specification ϕ that is not satisfied by an MC or MDP M. One common definition of a counterexample is a (minimal) subset S0 ⊆ S of the state space such that the MC or sub-MDP induced by S0 still violates ϕ [1]. The intuition is, that by the reduced state space critical parts are highlighted. III. M ETHODOLOGY A. Problem Statement We are given a partially observable planning scenario, which is modeled by a POMDP D, and a specification ϕ. The POMDP D is one of a family of similar planning scenarios, where each concrete scenario can modeled by an individual POMDP. The goal is to compute an observation-based randomized σz memoryless strategy σz ∈ ΣD z such that D |= ϕ. The general workflow we employ is shown in Fig. 2. Note that we mostly assume a family of POMDP scenarios to train the human strategy, as will be explained in what follows. We now detail the specific parts of the proposed approach. B. Training Environment Our setting necessitates that a virtual and interactive environment called training environment sufficiently captures the underlying POMDP planning scenarios. The initial training environment can be parameterized for: the size of the environment; the numbers and locations of dynamic obstacles and landmarks; and the location of the goal state. 3 4 up X 8 7 s3 1/2 6 2 1 5 X Fig. 3: Possible observations (left) and two observations triggering similar actions. Similar classes of problems would require similar initial training environments. For example, an environment may incorporate a small grid with one dynamic obstacle and two landmarks, while the actual POMDP we are interested in needs the same number of dynamic obstacles but may induce a larger grid or add additional landmarks. The goal state location also impacts the type of strategy trained by the human. With a randomized goal location, the human will prioritize obstacle avoidance over minimizing expected cost. We directly let the human control the agent towards a conveyable goal, such as avoiding obstacles while moving to the goal area. We store all data regarding the human control inputs in a training set. For a POMDP, this means that at each visited state of the underlying MDP we store the corresponding observation and the human’s action choice. We now collect data from several (randomly-generated) environments until statistically the human input will not significantly change the strategy by collecting further data. In fact, the training set contains likelihoods of actions. C. Strategy Generation from Behavior Cloning We compute an environment-independent strategy for the agent by casting the collected data into probability distributions over actions for each observation at each state of the system. Intuitively, the strategy is independent from a concrete environment but compatible with all concrete scenarios the training environment captures. Generally, linear [14] or softmax regression [46] offers a means to interpret the likelihoods over actions into probabilities. Formally, we get an observation-based strategy of the POMDP. The computed strategy mimics typical human choices in all possible situations. So far, such a strategy requires a large training set that needs a long time to be established, as we need human input for all different observations and actions. If we do not have a sufficiently large training set, that is, we have a lack of data, the strategy is underspecified. We use data augmentation [24] to reduce the observationaction space upon which we train the strategy. Our assumption is that the human acts similarly upon similar observations of the environment. For instance, take two different observations describing that a moving obstacle is to the right border or to the left of the agent’s range of vision. While these are in fact different observations, they may trigger similar actions (moving into opposite directions – see Fig. 3) where on the left we see the possible observations for the agent and on the right two observations triggering similar actions (away from the obstacle). Therefore, we define an equivalence s1 2/3 s0 1/2 a 1/3 s2 down a s4 up s7 a s6 a down up a s5 down Fig. 4: Randomization vs. memory relation on observations and actions. We then weigh the likelihoods of equivalent actions for each state with equivalent observations and again cast these weighted likelihoods into probability distributions. Summarized, as this method reduces the observation-action space, it also reduces the required size of the training set and the required number of human inputs. D. Refinement through Model Checking and Counterexamples We apply the computed strategy to a POMDP for a concrete scenario. As we resolve all nondeterminism and partial observability, the resulting model is an MC. To efficiently verify this MC against the given specification, we employ probabilistic model checking using PRISM. For instance, if for this MC the probability of reaching the goal area without bumping into obstacles is above a certain threshold, the computed strategy provably induces this exact probability. In case PMC reveals that the obtained strategy does not satisfy the requirements, we need to improve the strategy for the specific POMDP we are dealing with. Here, we again take advantage of the human-in-the-loop principle. First, we generate a counterexample using, e. g., the techniques described in [17]. Such a counterexample highlights critical parts of the state space of the induced MC. We then immerse the human into critical parts in the virtual environment corresponding to critical states of the specific POMDP. By gathering more data in these apparently critical situations for this scenario we strive to improve the human performance and the quality of the strategy. IV. R ANDOMIZED S TRATEGIES Deciding if there is an observation-based strategy for a POMDP satisfying a specification as in Sec. II-C typically requires unbounded memory and is undecidable in general [27] If we restrict ourselves to the class of memoryless strategies (which decide only depending on the current observation), we need to distinguish two sub-classes: (1) finding an optimal deterministic memoryless strategy is NP-complete [26], (2) finding an optimal randomized memoryless strategy NP-hard, SQRT-SUM-hard, and in PSPACE [41]. From a practical perspective, randomized strategies are much more powerful as one can – to a certain extent – simulate memory by randomization. The following example illustrates this effect and its limitations. Example 1 In the POMDP in Fig. 4, observations are defined by colors. The goal is to reach s7 with maximal probability. The only states with nondeterminism are s3 , s4 , and s5 (blue). For a memoryless deterministic strategy selecting “up” in all blue states, the optimal value is 2/3. A memoryless randomized strategy can select “up” with probability 0 < p < 1 and “down” with probability 1 − p for blue states. Then both from s3 and s4 , the target states are eventually reached with probability 1 and from s5 with probability p. Therefore the probability to reach s7 from the initial state is 2/3 + 1/3 p < 1. Finally, deterministic strategies with memory can distinguish state s5 from s3 and s4 because their predecessors have different observations. An optimal strategy may select “up” in a blue state if its predecessor is yellow, and otherwise “up” if a blue state has been seen an even number of times and “down” for an odd number, yielding probability 1 to reach s7 . Summarized, computing randomized memoryless strategies for POMDPs is – while still a hard problem – a powerful alternative to the harder or even undecidable problem of computing strategies with potentially infinite memory. V. S TRATEGY G ENERATION We detail the four phases to behavior cloning from human inputs: (1) building a training set, (2) feature-based data augmentation, (3) the initial strategy generation, and (4) refining the initial strategy using counterexamples. A. Training Set We first provide a series of randomly-generated sample environments to build a human-based training set. The environments are randomized in size, location and number of obstacles as well as the location of initial and goal states. The training set ΩE is represented as a function ΩE : Z × Act → N, where ΩE (z, a) = na means that na is the number of times action a is selected by the human for observation z. The size of the training set is given by |ΩE | = ∑z∈Z,a∈Act ΩE (z, a). In each sample environment, the human is given a map of the static environment – the locations of static obstacles and goal states – as well as an observation in the current state. This observation may, for instance, refer to the position of a visible obstacle. Moreover, the human is provided with one or more specifications. Proscribing a threshold on the probability of reaching the goal to a human seems unpractical. Instead, to have the human act according to the specifications outlined in Sect. II, we can for instance ask the human to maximize the probability of reaching the goal whilst minimizing an expected cost. In practice, this just means that the human attempts to maximize the probability of reaching the goal without crashing and as quickly as possible. The human observes the obstacles one-step from the agent (see Fig. 3), but is not aware of the agent’s precise position or if observed obstacles are static or dynamic. For an unknown initial position, there are two phases [36], [37]: 1) Exploration: The human will first try to determine their position while taking advantage of knowledge of the static environment. 2) Exploitation: When the human is confident about their current position they will start moving towards the goal. The human acts on each (randomly generated) concrete scenario until they either reach the goal or crash. We continue collecting data until the human’s inputs no longer significantly change the strategy. The statistically-derived minimum required size |ΩE | of the initial training set is bound by Hoeffding’s inequality [46]. In particular, we derive an upper bound ε ∈ R (with a confidence of 1 − δ for δ ∈ [0, 1]) for the difference between (1) a strategy that is independent from further training with other concrete environments and (2) the strategy derived from the training set of size |ΩE |. The number of samples is bounded by   1 2 |ΩE | ≥ 2 ln . (1) 2ε δ B. Feature Representation Human input – choices of observation-action pairs – for our simulations has limitations. First, it may not cover the entire observation-space so we may have observations without (sufficient) human choices of actions; the resulting strategy will be underspecified. Additionally, many of the observationaction pairs are equivalent in nature since – in our example setting – the tendency for the human’s action input is to move away from neighboring obstacles. Similar equivalences may be specified depending on the case study at hand. We introduce a feature-based representation to take advantage of such similarities to reduce the required size of a training set. Consider therefore the gridworld scenario in Fig. 1. Recall that the agent has restricted range of vision, see Fig. 3. The set of positions in the grid Gridx × Gridy ⊆ N × N is  Pos = (x, y) x ∈ {0, . . . , Gridx }, y ∈ {0, . . . , Gridy } . For one dynamic obstacle, an agent state consists of the position (xa , ya ) ∈ Pos of agent a and the position (xo , yo ) ∈ Pos of the dynamic obstacle o, i. e., s = (xa , ya , xo , yo ) ∈ Pos × Pos. The agent’s actions Act = {(−1, 0), (1, 0), (0, 1), (0, −1)} describe the one-step directions “left”, “right”, “up”, “down”. The set B of obstacle positions is B = {(xo , yo ), (xl1 , yl1 ), . . . , (xlm , ylm ) | (xo , yo ) ∈ Pos, (xli , yli ) ∈ Pos, 1 ≤ i ≤ m} for dynamic obstacle o and landmarks l1 , . . . , lm . The observations describe the relative position of obstacles with respect to the agent’s position, see Fig. 3. We describe these positions by a set of Boolean functions Oi : S × 2Pos → {0, 1} where S = Posx × Posy is the agent’s position and for a visibility distance of 1, Oi is defined for 1 ≤ i ≤ 8 by: O1 (s, B) = 1 O2 (s, B) = 1 O3 (s, B) = 1 O4 (s, B) = 1 O5 (s, B) = 1 O6 (s, B) = 1 O7 (s, B) = 1 O8 (s, B) = 1 iff iff iff iff iff iff iff iff ((xa − 1, ya − 1) ∈ B) ∨ (xa = 0) ∨ (ya = 0), ((xa − 1, ya ) ∈ B) ∨ (xa = 0), ((xa − 1, ya + 1) ∈ B) ∨ (xa = 0) ∨ (ya = n), ((xa , ya + 1) ∈ B) ∨ (ya = n), ((xa + 1, ya + 1) ∈ B) ∨ (xa = n) ∨ (ya = n), ((xa + 1, ya ) ∈ B) ∨ (xa = n), ((xa + 1, ya − 1) ∈ B) ∨ (xa = n) ∨ (ya = 0), ((xa , ya − 1) ∈ B) ∨ (ya = 0) . Note that for a visibility distance of 2, Oi is defined for 1 ≤ i ≤ 24. Consequently, an observation z = O(s) at state s is a vector z = (z(1) , . . . , z(8) ) ∈ {0, 1}8 with z(i) = Oi (s, B). The observation space Z = {z1 , . . . , z256 } is the set of all observation vectors. Providing a human with enough environments to cover the entire observation space is inefficient. [39] To simplify this space, we introduce action-based features [31], which capture the short-term human behavior of prioritizing to avoid obstacles for current observations. Particularly, we define features f : Z × Act → N. In our example setting we have 8 f1 (z, a) = ∑ z(i) , i=1 3 7 i=1 i=5 5 ∑ i∈{1,7,8} ∑ (z j ,a j )∈F̂ For the cases where a sequence has no equivalence, we evenly distribute the strategy between the action choices Act (such occasions are rare and our refinement procedure will improve any negative actions after model checking). σz (z, a) := f2 (z, a) = ax − ∑ z(i) + ∑ z(i) , f3 (z, a) = ay − from the particular environment that we synthesize a strategy for. For all (z, a) ∈ Z × Act we assign the probability of selecting an action σz (z, a) from its corresponding feature’s f (z, a) frequency in the training set compared to the set of all features with observation z:   ΩE (z j , a j ) . σz (z, a) = ∑ai ∈Act ΩE (z j , ai ) z(i) + ∑ z(i) , i=3 where f1 describes the number of obstacles in the observations. f2 and f3 are the respective x and y directional components of the difference between the motion of the agent’s action (ax and ay respectively) and position of the obstacles in its observation. 3 Then, the comprised feature function  is f : Z × Act → N with f (z, a) = f1 (z, a), f2 (z, a), f3 (z, a) . We define a component-wise “equivalence” of observationsaction features: ^  f (z1 , a1 ) = f (z2 , a2 ) ⇐⇒ fi (z1 , a1 ) = fi (z2 , a2 ) . i In Fig. 3, both observations see an obstacle in the corner of the observable space. For the left-hand case, the obstacle is on the bottom-left and action “right” is taken to avoid it. In the right-hand case, the obstacle is on the top-right and action “left” is taken to avoid it. These observation-action cases are considered equivalent in our feature model. In developing a strategy for the POMDP, we iterate through the observation-action space Z × Act and find featureequivalent inputs based on the above criteria. A set of featureequivalent inputs is then F̂ = {(z1 , a1 ), . . . , (zk , ak )} where f (z1 , a1 ) = f (zk , ak ). By using the feature-equivalent inputs we are guaranteed to require less human inputs. The maximum  possible size of the equivalent-feature set is |F̂| ≤ 84 = 70, due to the number of permutations of f1 . So at best our feature method can allow for 70 times fewer inputs. The efficiency gained by the introduction of features is at least |F̂| ≥ 1 + n4 for an empty n sized gridworld, the worst possible case. The majority of observations in sparse gridworlds are zero- or single-obstacle observations  with an  average efficiency of approximately E[|F̂|] ∈ [ 80 = 1, 81 = 8], which gives us a conservative lower bound on the efficiency from a featurebased representation. C. Initial Strategy Generation The human training set ΩE has been generated from a series of similar but randomly-generated environments. Therefore the initial strategy generated from the training set is independent 1 |Act| if ∑ ΩE (z, ai ) = 0 . ai ∈Act(z) For the strategy σz , we perform model checking on the induced MC Dσz to determine if the specification is satisfied. D. Refinement Using Counterexamples When the specification is refuted, we compute a counterexample in form of a set of critical states S0 ⊆ S. Note the probability of satisfying the specification will be comparatively low at these states. The human is then requested to update the strategy for the observations z = O(s) for all s ∈ S0 . For an observation z with an action update selection of ai , the observation-action strategy update parameter ω E (z, a) is: ( 1 if a = ai , E ω (z, a) = ∑s∈S Pr(s|z)Prreach (s) 1 otherwise . We perform a Bayesian update with normalization constant c to calculate the stochastic strategy where c = ∑a∈Act σz 0 (z, a) 1 σz 0 (z, a) = ω E (z, a)σz (z, a) . c Thereby, at each control loop the probability of the human input ai in the strategy is increased. Bounds on Optimality. As discussed in Sect. IV, a randomized memoryless strategy for a POMDP may not induce optimal values in terms of reachability probabilities or expected cost. Moreover, in our setting, there is a limit on the human’s capability – for instance if there are too many features to comprehend. An optimal strategy for the underlying MDP of a POMDP provides bounds on optimal values for the POMDP. These values are a measure on what is achievable, although admittedly this bound may be very coarse. Such a bounding within a reinforcement learning context is discussed in [5]. VI. I MPLEMENTATION AND E XPERIMENTS We implemented the motion planning setting as in Fig. 1 inside an interactive MATLAB environment. Grid size, initial state, number of obstacles, and goal location are variables. We use PRISM [25] to perform probabilistic model checking of the induced MC of the POMDP, see Sect. III-D. We use the PRISM POMDP prototype [29] and a point-based value iteration (PBVI) solver [6], [28] for comparison with other TABLE I: Expected cost improvement – 4×4 gridworld Iteration Pr(¬B U G) 0 1 2 3 4 Optimal 0.225 0.503 0.592 0.610 0.636 – n. a. – TABLE III: Comparison to existing POMDP tools Expected Cost (EC=? [C]) 13.57 9.110 7.154 6.055 5.923 5 HiL Synth states time (s) grid 3×3 4×4 5×5 6×6 10 × 10 11 × 11 277 990 2459 5437 44794 – MO – 43.74 121.74 174.90 313.50 1668.30 – MO – PRISM-POMDP states time (s) 303 987 2523 5743 54783 81663 2.20 4.64 213.53 – MO – – MO – – MO – PBVI states time (s) 81 256 625 1296 – MO – – MO – 3.86 2431.05 – MO – – MO – – MO – – MO – TABLE II: Expected cost of initial strategy from training sets Training Grids Variable Fixed-4 Fixed-10 Optimal Pr(¬B U G) 0.425 0.503 0.311 – n. a. – TABLE IV: Strategy refinement – 4×4 gridworld Expected Cost (EC=? [C]) 10.59 9.27 14.53 3 tools. Note that there exists no available tool to compute optimal randomized memoryless strategies. All experiments were conducted on a 2.5 GHz machine with 4 GB of RAM. A. Efficient Data Collection A human user trains an initial “generic” strategy through a simulation of multiple randomly-generated environments, varying in size, number of obstacles and goal location. In order to more accurately reflect the partially observable nature of the problem, the human is only shown a map of the “known” features (landmarks and goal location) in the environment as well as the observation associated with the current state. The goal is to obtain a strategy from the data that is independent of a change in the environments. We gather inputs according to Sect. V-A and Sect. V-B. For a bound of ε = 0.05 with confidence of 1 − δ = 0.99, we require ΩE = 1060 samples, see Eq. 1. Furthermore, the efficiency factor introduced by the feature equivalence depends on the generated scenarios, i. e., the number of features. For our examples, we conservatively assume an efficiency factor of 4, so we require ΩE = 265 samples. If the specification is refuted, we compute a critical part S0 ⊆ S of the state space S, i. e., a counterexample. By starting the simulation in concrete scenarios at locations induced by S0 , we “ask” the human for specific inputs that refine the strategy at critical parts. B. Experiments a) Strategy Refinement: In Table IV we show 5 iterations of counterexample-based strategy refinement for a 4×4 gridworld. In each iteration, we measure the time to construct the MC and the time to model check. These running times are negligible for this small example, important however is the probability for safely reaching a target, namely Pr(¬B U G). One can see that for the initial, generic strategy this probability is rather low. Having the simulation start in critical parts iteratively improves this probability up to nearly 0.8, at which point we find no measurable improvement. For this example, the upper bound on the maximum probability derived from MDP model checking is 1. Figure 5 shows a heatmap of this improving behavior where darker coloring means higher probability for safely reaching the goal. Iteration 0 1 2 3 4 Construction (s) Model Checking (s) 2.311 2.423 2.346 2.293 2.293 1.533 1.653 1.952 1.727 1.727 Pr(¬B U G) 0.129 0.521 0.721 0.799 0.799 b) Fixed goal location: When we fix the goal-location parameter to the top-right of the grid, we can examine the strategy refinement’s impact on the expected number of steps to the goal (see I). The grid-size space was randomly sampled between n ∈ [4, 11], we also compare the impact of fixing the grid-size for the training set. There is clearly a benefit to restricting the samples from the training set to samples of similar problem styles. In a 4 × 4 gridworld, a fixed training set of similar sized environments outperforms the strategies generated by a varying set of environment sizes (see Table II). c) Comparison to Existing Tools and Solvers: We generated POMDP models for several grid sizes with one landmark and one dynamic obstacle. We list the number of model states and the solution times for our human-in-the-loop synthesis method, PRISM-POMDP and PBVI. From Table III we can see that for the smaller problem sizes, the existing tools perform slightly better than our method. However, as the problem grows larger, both PRISM-POMDP and PBVI run out of memory and are clearly outperformed. The advantage of our memoryless approach is that the strategy itself is independent of the size of the state space and the problem scales with the size of the verification for the induced MC. VII. C ONCLUSION AND F UTURE W ORK We introduced a formal approach to utilize humans’ inputs for strategy synthesis in a specific POMDP motion planning setting, where strategies provably adhere to specifications. Our experiments showed that with a simple prototype we could raise the state-of-the-art, especially in the combination with formal verification. In the future, we will investigate how to infer decisions based on memory and how to employ human-understandable counterexamples [43]. ACKNOWLEDGMENT This work has been partly funded by ONR N00014-15-IP00052, NSF 1550212, and DARPA W911NF-16-1-0001. (a) Iteration 0 (b) Iteration 1 (c) Iteration 2 Fig. 5: Heatmap for the quality of agent strategies with dynamic obstacle location (2, 0) and static landmark at (1, 2). R EFERENCES [1] Erika Ábrahám, Bernd Becker, Christian Dehnert, Nils Jansen, JoostPieter Katoen, and Ralf Wimmer. Counterexample generation for discrete-time Markov models: An introductory survey. In SFM, volume 8483 of LNCS, pages 65–121. Springer, 2014. [2] Christopher Amato, Daniel S. Bernstein, and Shlomo Zilberstein. Optimizing fixed-size stochastic controllers for POMDPs and decentralized POMDPs. Autonomous Agents and Multi-Agent Systems, 21(3):293– 320, 2010. [3] Brenna D. Argall, Sonia Chernova, Manuela Veloso, and Brett Browning. A survey of robot learning from demonstration. Robotics and Autonomous Systems, 57(5):469–483, 2009. [4] Nicholas Armstrong-Crews and Manuela Veloso. Oracular partially observable Markov decision processes: A very special case. In ICRA, pages 2477–2482. IEEE, 2007. [5] Anthony R. Cassandra and Leslie Pack Kaelbling. Learning policies for partially observable environments: Scaling up. In ICML, page 362. Morgan Kaufmann, 2016. [6] Anthony R. Cassandra, Leslie Pack Kaelbling, and Michael L. Littman. Acting optimally in partially observable stochastic domains. In AAAI, volume 94, pages 1023–1028, 1994. [7] Krishnendu Chatterjee, Martin Chmelı́k, Raghav Gupta, and Ayush Kanodia. Qualitative analysis of POMDPs with temporal logic specifications for robotics applications. In ICRA, pages 325–330. IEEE, 2015. [8] Krishnendu Chatterjee, Martin Chmelı́k, Raghav Gupta, and Ayush Kanodia. Optimal cost almost-sure reachability in POMDPs. Artificial Intelligence, 234:26–48, 2016. [9] Krishnendu Chatterjee, Luca de Alfaro, and Thomas A. Henzinger. Trading memory for randomness. In QEST. IEEE, 2004. [10] Paul Christiano, Jan Leike, Tom B. Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. CoRR, abs/1706.03741, 2017. [11] Martin A. Conway. Cognitive models of memory. The MIT Press, 1997. [12] Christian Dehnert, Sebastian Junges, Joost-Pieter Katoen, and Matthias Volk. A Storm is coming: A modern probabilistic model checker. In CAV (2), volume 10427 of LNCS, pages 592–600. Springer, 2017. [13] Kurt Dresner and Peter Stone. A multiagent approach to autonomous intersection management. Artificial Intelligence, 31:591–656, 2008. [14] Krishnamurthy Dvijotham and Emanuel Todorov. Inverse optimal control with linearly-solvable MDPs. In ICML, pages 335–342, 2010. [15] Ronald A. Howard. Dynamic Programming and Markov Processes. The MIT Press, 1960. [16] Nils Jansen, Murat Cubuktepe, and Ufuk Topcu. Synthesis of shared control protocols with provable safety and performance guarantees. In ACC, pages 1866–1873. IEEE, 2017. [17] Nils Jansen, Ralf Wimmer, Erika Ábrahám, Barna Zajzon, Joost-Pieter Katoen, Bernd Becker, and Johann Schuster. Symbolic counterexample generation for large discrete-time markov chains. Sci. Comput. Program., 91:90–114, 2014. [18] Edwin T. Jaynes. On the rationale of maximum-entropy methods. Proceedings of the IEEE, 70(9):939–952, 1982. [19] Sebastian Junges, Nils Jansen, Ralf Wimmer, Tim Quatmann, Leonore Winterer, Joost-Pieter Katoen, and Bernd Becker. Permissive finitestate controllers of pomdps using parameter synthesis. CoRR, abs/1710.10294, 2017. [20] Leslie Pack Kaelbling, Michael L. Littman, and Anthony R. Cassandra. Planning and acting in partially observable stochastic domains. Artificial Intelligence, 101(1):99–134, 1998. [21] Joost-Pieter Katoen. The probabilistic model checking landscape. In LICS, pages 31–45. ACM, 2016. [22] Piyush Khandelwal et al. BWIBots: A platform for bridging the gap between AI and human–robot interaction research. Int’l Journal of Robotics Research, 2017. [23] Konrad P. Körding and Daniel M. Wolpert. Bayesian decision theory in sensorimotor control. Trends in Cognitive Sciences, 10(7):319–326, 2006. [24] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [25] Marta Kwiatkowska, Gethin Norman, and David Parker. P RISM 4.0: Verification of probabilistic real-time systems. In CAV, volume 6806 of LNCS, pages 585–591. Springer, 2011. [26] Michael L. Littman. Memoryless policies: Theoretical limitations and practical results. In SAB, pages 238–245. The MIT Press, 1994. [27] Omid Madani, Steve Hanks, and Anne Condon. On the undecidability of probabilistic planning and infinite-horizon partially observable Markov decision problems. In AAAI, pages 541–548. AAAI Press, 1999. [28] Nicolas Meuleau, Kee-Eung Kim, Leslie Pack Kaelbling, and Anthony R. Cassandra. Solving POMDPs by searching the space of finite policies. In UAI, pages 417–426. Morgan Kaufmann, 1999. [29] Gethin Norman, David Parker, and Xueyi Zou. Verification and control of partially observable probabilistic systems. Real-Time Systems, 53(3):354–402, 2017. [30] Joelle Pineau, Geoff Gordon, and Sebastian Thrun. Point-based value iteration: An anytime algorithm for POMDPs. In IJCAI, volume 3, pages 1025–1032, 2003. [31] David L. Poole and Alan K. Mackworth. Artificial Intelligence: foundations of computational agents. CUP, 2010. [32] Stephanie Rosenthal and Manuela Veloso. Modeling humans as observation providers using POMDPs. In RO-MAN, pages 53–58. IEEE, 2011. [33] Sheldon M. Ross. Introduction to Stochastic Dynamic Programming. Academic Press, Inc., 1983. [34] Stéphane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In AISTATS, pages 627–635, 2011. [35] Guy Shani, Joelle Pineau, and Robert Kaplow. A survey of pointbased POMDP solvers. Autonomous Agents and Multi-Agent Systems, 27(1):1–51, 2013. [36] David R. Shanks, Richard J. Tunney, and John D. McCarthy. A reexamination of probability matching and rational choice. Journal of Behavioral Decision Making, 15(3):233–250, 2002. [37] Robert Sim and Nicholas Roy. Global a-optimal robot exploration in slam. In ICRA, pages 661–666. IEEE, 2005. [38] Trey Smith and Reid Simmons. Heuristic search value iteration for POMDPs. In UAI, pages 520–527. AUAI Press, 2004. [39] Martin A Tanner and Wing Hung Wong. The calculation of posterior distributions by data augmentation. Journal of the American Statistical Association, 82(398):528–540, 1987. [40] Sebastian Thrun, Wolfram Burgard, and Dieter Fox. Probabilistic Robotics. The MIT Press, 2005. [41] Nikos Vlassis, Michael L. Littman, and David Barber. On the computational complexity of stochastic controller optimization in POMDPs. ACM Trans. on Computation Theory, 4(4):12:1–12:8, 2012. [42] Michael P. Wellman et al. Designing the market game for a trading agent competition. IEEE Internet Computing, 5(2):43–51, 2001. [43] Ralf Wimmer, Nils Jansen, Andreas Vorpahl, Erika Ábrahám, JoostPieter Katoen, and Bernd Becker. High-level counterexamples for probabilistic automata. Logical Methods in Computer Science, 11(1), 2015. [44] Leonore Winterer, Sebastian Junges, Ralf Wimmer, Nils Jansen, Ufuk Topcu, Joost-Pieter Katoen, and Bernd Becker. Motion planning under partial observability using game-based abstraction. In CDC. IEEE, 2017. [45] Tichakorn Wongpiromsarn and Emilio Frazzoli. Control of probabilistic systems under dynamic, partially known environments with temporal logic specifications. In CDC, pages 7644–7651. IEEE, 2012. [46] Brian D. Ziebart, Andrew L. Maas, J. Andrew Bagnell, and Anind K. Dey. Maximum entropy inverse reinforcement learning. In AAAI, pages 1433–1438. AAAI Press, 2008.
2cs.AI
D EEP F UNCTION M ACHINES : G ENERALIZED N EURAL N ETWORKS FOR T OPOLOGICAL L AYER E XPRESSION arXiv:1612.04799v2 [stat.ML] 6 Nov 2017 William H. Guss Machine Learning at Berkeley University of California, Berkeley [email protected] A BSTRACT In this paper we propose a generalization of deep neural networks called deep function machines (DFMs). DFMs act on vector spaces of arbitrary (possibly infinite) dimension and we show that a family of DFMs are invariant to the dimension of input data; that is, the parameterization of the model does not directly hinge on the quality of the input (eg. high resolution images). Using this generalization we provide a new theory of universal approximation of bounded non-linear operators between function spaces. We then suggest that DFMs provide an expressive framework for designing new neural network layer types with topological considerations in mind. Finally, we introduce a novel architecture, RippLeNet, for resolution invariant computer vision, which empirically achieves state of the art invariance. 1 I NTRODUCTION In recent years, deep learning has radically transformed a majority of approaches to computer vision, reinforcement learning, and generative models [Schmidhuber (2015)]. Theoretically, we still lack a unified description of what computational mechanisms have made these deeper models more successful than their wider counterparts. Substantial analysis by Shalev-Shwartz et al. (2011), Raghu et al. (2016), Poole et al. (2016) and many others gives insight into how the properties of neural architectures, like depth and weight sharing, determine the expressivity of those architectures. However, less studied is the how the properties of data, such as sample statistics or geometric structure, determine the architectures which are most expressive on that data. Surprisingly, the latter perspective leads to simple questions without answers rooted in theory. For example, what topological properties of images allow convolutional layers such expressivity and generalizeability thereon? Intuitively, spatial locality and translation invariance are sufficient justifications in practice, but is there a more general theory which suggests the optimality of convolutions? Furthermore, do there exist weight sharing schemes beyond convolutions and fully connected layers that give rise to provably more expressive models in practice? In this paper, we will more concretely study the data-architecture relationship and develop a theoretical framework for creating layers and architectures with provable properties subject to topological and geometric constraints imposed on the data. The Problem with Resolution. To motivate a use for such a framework, we consider the problem of learning on high resolution data. Computationally, machine learning deals with discrete signals, but frequently those signals are sampled in time from a continuous function. For example, audio is inherently a continuous function f : [0, tend ] → R, but is sampled as a vector v ∈ R44,100×t . Even in vision, images are generally piecewise smooth functions f : R2 → R3 mapping pixel position to color intensity, but are sampled as tensors v ∈ Rx×y×c . Performing tractible machine learning as the resolution of images or audio increases almost always requires some lossy preprocessing like PCA or Discrete Fourier Analysis [Burch (2001)]. Convolutional neural networks avoid dealing therein by intutively assuming a spacial locality on these vectors. However, one wonders what is lost through the use of various dimensionality reduction and weight sharing schemes1 . 1 Note we do not claim that deep learning on high resolution data is currently intractible or ineffective. The problem of resolution is presented as an example in which topological constaints can be imposed on a type of data to yield new architecutres with desired, provable properties. 1 Figure 1: Left: A discrete vector v ∈ Rl×w representation of an image. Right: The true continuous function f : R2 → R from which it was sampled. A key observation in discussing a large class of smooth functions is their simplicity. Although from a set theoretic perspective, the graph of a function consists of infiniteley many points, relatively complex algebras of functions can be described with symbolic simplicity. A great example are polynomials: the space of all square (x2 ) mononomials occupies a one-dimensional vector space, and one can generalize this phenomena beyond these basic families. Thus we will explore what results in embracing the assumption that a signal is really a sample from a continuous process, and utilize the analytic simplicity of certain smooth functions to derive new layer types. Our Contribution. First, we extend neural networks to the infinite dimensional domain of continuous functions and define deep function machines (DFMs), a general family of function approximators which encapsulates this continuous relaxation and its discrete counterpart. Thereafer, we survey and refocus past analysis of neural networks with infinitely (and potentially uncountably) many nodes2 with respect to the expresiveness the maps that they represent. We show that DFMs not only admit most other infinite dimensional neural network generalizations in the literature but also provide the necessary language to solve two long standing questions of universal approximation raised following Stinchcombe (1999). With the framework firmly established, we then return to our motivating goal of provable deep learning and show that DFMs naturally give rise to neural networks which are provably invariant to the resolution of the input, and indeed that DFMs can be used more generally to construct architectures (e.g. those with convolutions) with provable properties given topological assumptions. Finally we experimentally verify such constructions by introducing a new type of layer, WaveLayers, apart from convolutions. 2 BACKGROUND In order to propose deep function machines we must establish what it means for a neural network act directly on continuous functions. Recall the standardMcCulloch & Pitts (1943) feed-forward neural network. Definition 2.1 (Discrete Neural Networks). We say N : Rn → Rm is a (discrete) feed-forward neural network iff for the following recurrence relation is defined for adjacent layers ` → `0 ,  0 (2.1) N : y ` = g W`T y ` ; y0 := x where W` is a weight tensor and g is a non-polynomial activation function. Suppose that we wish to map one space of functions to another with a neural network. Consider the model of N as the number of neurons for every layer becomes uncountable. The index for each neuron then becomes real-valued, along with the weight and input vectors. The process is roughly depicted in Figure 2. The core idea behind the derivation is that as the number of nodes in the network becomes uncountable we need apply a normalizing term to the contribution of each node in the evaluation of the following layer so as to avoid saturation. Eventually this process resembles Lebesgue integration. More formally, let N be an L layer neural network as given in Definition 2.1. Without loss of generality we will examine the first layer, ` = 1. Let us denote ξ : X ⊂ R → R as some 2 See related work. 2 Figure 2: Left: Resolution refinement of an input signal by simple functions. Right: An illustration of the extension of neural networks to infinite dimensions. Note that x ∈ RN is a sample of f (N ) , a simple function with kf (N ) − ξk → 0 as N → ∞. Furthermore, the process is not actually countable, as depicted here. arbitrary continuous input function for the neural network. Likewise consider a real-valued piecewise integrable weight function, w` : R2 → R, for a layer ` which is composed of two indexing variables3 u, v ∈ E` , E`0 ⊂ R. In this analysis we will restrict the indices to lie in compact sets E` , E`0 . If Pnf is a simple function then for some finite partition of E` , say u0 < · · · < un , then f = m=1 χ[um−1 ,um ] pn where for all u ∈ [um−1 , um ], pn ≤ ξ(u). Visually this is a piecewise constant function underneath the graph of ξ. Suppose that some vector x is sampled from ξ, then we can make x a simple function by taking an arbitray parition of E` so that: when u0 < u < u1 , f (u) = x0 , and when u1 < u < u2 , f (u) = x1 , and so on. This simple function f is essentially piecewise constant on intervals of uniform length so that on each interval it attains the value of the nth component, xn . Finally if wv is some simple function approximating the v-th row of some weight matrix W` in the same fashion, then wv · f is also a simple function. Therefore particular neural layer associated to f (and thereby x) is ! Z  n X 1 T ` ` y = g(W` x) = g Wmv xm µ([um−1 , um ]) = g wv (u)f (u) dµ(u) , (2.2) E` m=1 where µ is the Lebesgue measure on R. Now suppose that there is a refinement of x; that is, returning to our original problem, there is a higher resolution sample of ξ say f 0 (and thereby x0 ), so that it more closely approximates ξ. It then follows that the cooresponding refined partition, u00 < · · · < u0k , (where k > n), occupies the same E` but individually, µ([um−1 , um ]) ≤ µ([u0m−1 , u0m ]). Therefore we weight the contribution of each x0n less than each xn , in a measure theoretic sense. Recalling the theory of simple functions without loss of generality assume ξ, ω(·, ·) ≥ 0. Then we yield that if Fv = {(wv , f ) : E` → R | f, wv simple, 0 ≤ f ≤ ξ, 0 ≤ wv ≤ ω` (·, v)} then it follows immediately that Z Z sup wv (u)f (u) dµ(u) = (f,wv )∈Fv E` ω` (u, v)ξ(u) dµ(u). (2.3) (2.4) E` Therefore we give the following definition for infinite dimensional neural networks. Definition 2.2 (Operator Neural Networks). We call O : L1 (E` ) → L1 (E`0 ) an operator neural network parameterized by ω` if for two adjacent layers ` → `0 Z  0 O : y ` (v) = g y ` (u)ω` (u, v) dµ(u) ; y 0 (v) = ξ(v). (2.5) E` where E` , E`0 are locally compact Hausdorff mesure spaces and u ∈ X, v ∈ Y. 3 It is no loss of generality to extend the results in this work to weight kernels indexed by arbitrary u, v ∈ Rn , but we ommit this treatment for ease of understanding. 3 3 D EEP F UNCTION M ACHINES With operator neural networks defined, we endeavour to define a topologically inspired framework for developing expressive layer types. A powerful language of abstraction for describing feedforward (and potentially recurrent) neural network architectures is that of computational skeletons as introduced in Daniely et al. (2016). Recall the following definition. Definition 3.1. A computational skeleton S is a directed asyclic graph whose non-input nodes are labeled by activations. Daniely et al. (2016) provides an excellent account of how these graph structures abstract the many neural network architectures we see in practice. We will give these skeletons "flesh and skin" so to speak, and in doing so pursure a suitable generalization of neural networks which allows intermediate mappings between possibly infinite dimensional topological vector spaces. DFMs are that generalization. Definition 3.2 (Deep Function Machines). A deep function machine D is a computational skeleton S indexed by I with the following properties: • Every vertex in S is a topological vector space X` where ` ∈ I. • If nodes ` ∈ A ⊂ I feed into `0 then the activation on `0 is denoted y ` ∈ X` and is defined as ! X   0 y` = g T` y ` (3.1) `∈A where T` : X` → X`0 is some affine form called the operation of node `. To see the expressive power of this generalization, we propose several operations T` that not only encapsulate ONNs and other abstractions on infinite dimensional neural networks, but also almost all feed-forward architectures used in practice. 3.1 G ENERALIZED N EURAL L AYERS Generalized neural layers are the basic units of the theory of deep function machines, and they can be used to construct architectures of neural networks with provable properties, such as the resolution invariance we seek. The most basic case is X` = Rn and X`0 = Rm , where we should expect a standard neural network. As either X` or X`0 become infinite dimensional we hope to attain models of functional MLPs from Rossi et al. (2002) or infinite layer neural networks from Globerson & Livni (2016) with universal approximation properties. Definition 3.3 (Generalized Layer Operations). We suggest several natural generalized layer families T` for DFMs as follows. • T` is said to be o-operational if and only if X` and X`0 are spaces of integrable functions over locally compact Hausdorff measure spaces, and Z ` ` T` [y ](v) = o(y )(v) = y ` (u)ω` (u, v) dµ(u). (3.2) E` For example4 , X` , X`0 = C(R), yields operator neural networks. • T` is said to be n-discrete if and only if X` and X`0 are finite dimensional vector spaces, and (3.3) T` [y ` ] = n(y ` ) = W`T y ` . n m For example, X` = R , X`0 = R , yields standard feed-forward neural networks. • T` is said to be f-functional if and only if X` is some space of integrable functions as mentioned previously and X`0 is a finite dimensional vector space, and Z T` [y ` ] = f(y ` ) = ω` (u)y ` (u) dµ(u) (3.4) E` 4 Nothing precludes the definition from allowing multiple functions as input, the operation must just be carried on each coordinate function. 4 D1 N [0, ∞) [0, 1] n R 6 f O o R12 C([0, 1]) R 3 f C(R) C(R) C(R) o d d Rm Rm n C([−1, 1]) n n f C(R) o o C(R) f f Rn n n f C(R) Figure 3: Examples of three different deep function machines with activations ommited and T` replaced with the actual type. Left: A standard feed forward binary classifier (without convolution), Middle: An operator neural network. Right: A complicated DFM with residues. For example 5 X` = C(R), X`0 = Rn , yields functional MLPs. • T` is said to be d-defunctional if and only if X` is a are finite dimensional vector space and X`0 is some space of integrable functions. Tl [y ` ](v) = d(y ` )(v) = ω` (v)T y ` (3.5) For example, X` = Rn , X`0 = C(R). The naturality of the above layer operations come from their universality and generality. 3.2 R ELATED W ORK AND A U NIFIED V IEW OF I NFINITE D IMENSIONAL N EURAL N ETWORKS Operator neural networks are just one of many instantiations of DFMs. Before we show universality results for deep function machines, it should be noted that there has been substantial effort in the literature to explore various embodiments of infinite dimensional neural networks. To the best of the authors’ knowledge, DFMs provide a single unified view of every such proposed framework to date. In particular, Neal (1996) proposed the first analysis of neural networks with countably infinite nodes, showing that as the number of nodes in discrete neural networks tends to infinity, they converge to a Gaussian process prior over functions. Later, Williams (1998) provided a deeper analysis of such a limit on neural networks. A great deal of effort was placed on analyzing covariance maps associated to the Guassian processes resultant from infinite neural networks with both sigmoidal and Gaussian activation functions. These results were based mostly in the framework of Bayesian learning, and led to a great deal of analyses of the relationship between non-parametric kernel methods and infinite networks, including Le Roux & Bengio (2007), Seeger (2004), Cho & Saul (2011), Hazan & Jaakkola (2015), and Globerson & Livni (2016). Out of this initial work, Hazan & Jaakkola (2015) define hidden layer infinite layer neural networks with one or two layers which map a vector x ∈ Rn to a real value by considering infinitely many feature maps φw (x) = g (hw, xi) where w is an index variable in Rn . Then forRsome weight function u : Rn → R, the output of an infinite layer neural network is a real number u(w) φw (x) dµ(w). This approach can be kernelized and therefore has resulted further theory by Globerson & Livni (2016) that aligns neural networks with Gaussian processes and kernel methods. Operatator neural networks differ significantly in that we let each w be freely paramaterized by some function ω and require that x be a continuous function on a locally compact Hausdorf space. Additionally no universal approximation theory is provided for infinite layer networks directly, but is cited as following from the work of Le Roux & Bengio (2007). As we will see, DFMs will not only encapsulate (and benefit from) these results, but also provide a general universal approximation theory therefor. 5 Note that y ` (u) is a scalar function and ω is a vector valuued function of dimension dim(X`0 ). Additionally this definiton can easily be extended to function spaces on finite dimensional vectorspaces by using the Kronecker product. 5 Table 1: Unification of Infinite Dimensional Neural Network Theory Name Form Infinite NNs b+ P∞ Functional MLPs Pp βi g i=1 j=1 vj h(x; uj ) R  wi ξ dµ Continuous NNs Nonparametric Continuous NNs R Infinite Layer NNs same as non-parametric continuous NNs ω1 (u)g(x · ω0 (u)) du R ω1 (u)g(hx, ui) du DFM Authors n n N∞ : Rn − → ⊕∞ → Rm i=1 R − f n F : L1 (R) → → R − Rp − f d C : Rn − − Rm → L1 ([a, b]) → Neal (1996); Williams (1998) Stinchcombe (1999); Rossi et al. (2002) Le Roux & Bengio (2007) C 0 : Rn − → L1 (R) → − Rm Le Roux & Bengio (2007) same as non-parametric continuous NNs Globerson & Livni (2016); Hazan & Jaakkola (2015) d f Another variant of infinite dimensional neural networks, which we hope to generalize, is the functional multilayer perceptron (Functional MLP). This body of work is not referenced in any of the aforementioned work on infinite layer neural networks, but it is clearly related. The fundamental idea is that given some f ∈ V = C(X), where X is a locally compact Hausdorff space, there exists a generalization of neural networks which approximates arbitrary  on R bounded functionals Pcontinuous p V (maps f 7→ a ∈ R). These functional MLPs take the form i=1 βi g ωi (x)f (x) dµ(x) . The authors show the power of such an approximation using the functional analysis results of Stinchcombe (1999) and additionally provide statistical consistency results defining well defined optimal parameter estimation in the infinite dimensional case. Stemming additionally from the initial work of Neal (1996), the final variant called continuous neural networks has two manifestations: the first of which is more closely related to functional perceptrons and the last of which is exactly the formulation of infintie layer NNs. R Initially Le Roux & Bengio (2007) proposes an infinite dimensional neural network of the form ω1 (u)g(x · ω0 (u)) dµ(u) and shows universal approximation in this regime. Overall this formulation mimics multiplication by some weighting vector as in infinite layer NNs, except in the continuous neural formulation ω0 can be parameterized by a set of weights. Thereafter, to prove connections between gaussian processes from R a different vantage, they propose non-parametric continuous neural networks, ω1 (u)g(x · u) dµ(u), which are exactly infinite-layer neural networks. In the view of deep function machines, the foregoing variants of infinite and semi-infinite dimensional neural networks are merely instantiations of different computational skeleton structures. A summary of the unified view is given in Table 1. 3.3 A PPROXIMATION T HEORY OF D EEP F UNCTION M ACHINES In addition to unification, DFMs provide a powerful language for proving universal approximation theorems for neural networks of any depth and dimension6 . The central theme of our approach is that the approximation theories of any DFM can be factored through the standard approximation theories of discrete neural networks. In the forthcoming section, this principle allows us to prove two approximation theories which have been open questions since Stinchcombe (1999). The classic results of Cybenko (1989), yields the theory for n-discrete layers. For f-functional layers, the work of Stinchcombe (1999) proved in great generality that for certain topologies on C(E` ), two layer functional MLPs universally approximate any continuous functional on C(E` ). Following Stinchcombe (1999), Rossi et al. (2002) extended these results to the case wherein multiple 6 By dimension, we mean both infinite and finite dimensional neural networks. 6 o-operational layers prepended f-functional layers. We will show in particular that o-operational and similarly d-defunctional layers alone are dense in the much richer space of uniformly continuous bounded operators on function space. We give three results of increasing power, but decreasing transparency. Theorem 3.4 (Point Approximation). Let [a, b] ⊂ R be a bounded interval and g : R → B ⊂ R be a continuous, bijective activation function. Then if ξ : E` → R and f : E`0 → B are L1 (µ) integrable functions there exists a unique class of o-operational layers such that g ◦ o[ξ] = f. We seek a class of weight kernels ω` so that that o[ξ] = f. Let ω` (u, v) = Proof.  (g −1 )0 ◦ (h(Ξ(u), v)) h0 (Ξ(u), v) where Ξ(u) is the indefinite integral of ξ. Define h so that it satisfies the following two equivalent equations µ-a.e. h(Ξ(b), v) − h(Ξ(a), v) = f (v) ∂h(x, v) =0 ξ(u) ∂x x=Ξ(u),v=v,u∈{a,b} (3.6) The proof is completed in the appendix. The statement of Theorem 3.4 is not itself very powerful; we merely claim that o-operational layers can at least map any one function to any other one function. However, the proof yields insight into what the weight kernels of o-operational layers look like when the single condition ξ 7→ f is imposed. Therefrom, we conjecture but do not prove that a statstically optimal initialization Pm Pm for training o-operational layers is given by satifying (3.6) when ξ = n1 n=1 ξn , f = n1 n=1 fn , where the training set {(ξn , fn )} are drawn i.i.d from some distribution D. Theorem 3.5 (Nonlinear Operator Approximation). Suppose that E1 , E2 are bounded intervals in R. For all κ, λ, if K : Lipλ (E1 ) → Lipκ (E3 ) is a uniformly continuous, nonlinear operator, then for every  > 0 there exists a deep function machine o D : L1 (E1 ) o L1 (E2 ) L1 (E3 ) (3.7) such that D|Lipλ − K < . With two layer operator networks universal, it remains to consider d-deconvolutional layers. Theorem 3.6 (Nonlinear Basis Approximation). Suppose I, E2 , E3 are compact intervals, and let C ω (X) denote the set of analytic functions on X. If B : I n → C ω (E3 ) is a continuous basis map to analytic functions then for every  > 0 there exists a deep function machine D : Rn d L1 (E2 ) o L1 (E3 ) (3.8) such that kD|I n − Bk <  in the topology of uniform convergence. To the best of our knowledge, the above are the first approximation theorems for nonlinear operators and basis maps on function spaces for neural networks. The proofs in the appendix roughly involve a factorization of arbitrary DFMs through approximation theories for n-discrete layers. Essentially, the factorization works as follows. In both of the foregoing theorems we want to roughly approximate some nonlinear map K with a DFM D. We therefore define an operator |K|, called an affine projection, that takes functions, converts them into piecewise constant approximations, applies K, and then again converts the result to piecewise constant approximations. Since there are a finite number, say N and M , of pieces given in the input and the output of |K| respectively, we can define an operator K̃ : RN → RM , called a lattice map, which in some sense reproduces |K|. We then show both Theorem 3.5 and Theorem 3.6 by approximating K̃ with a discrete neural network, N , and chosing D to be such that its discreitzation is N . Surprisingly, this principle holds for any DFM structure and a large class of different K not just those which use piecewise constant approximations! 7 4 N EURAL T OPOLOGY FROM T OPOLOGY As we have now shown, deep function machines can express arbitrarily powerful configurations of ’perceptron layer’ mappings betwen different spaces. However, it is not yet theoretically clear how different configurations of the computaional skeleton and the particular spaces X` do or do not lead to a difference in expressiveness of DFMs. To answer questions of structure, we will return to the motivating example of high-resolution data, but now in the language of deep function machines. 4.1 R ESOLUTION I NVARIANT N EURAL N ETWORKS If an an input (xj ) ∈ RN is sampled from an continuous function ξ ∈ C(E` ), o-operational layers are a natural way of extending neural networks to deal directly with ξ. As before, it is useful to think of each o as a continuous relaxation of a class of n, and from this perspective we can gain insight into the weight tensors of n-discrete layers as the resolution of x increases. Theorem 4.1 (Invariance). If T` is an o-operational layer with an integrable weight kernel ω(u, v) of O(1) parameters, then there is a unique fully connected n-discrete layer, N` , with O(N ) parameters so that T` [ξ](j) = N` (x)j for all ξ, x as above. Theorem 4.1 is a statement of variance in parameterization; when the input is a sample of a smooth signal, fully connected n-discrete layers are naively overparameterized. Resolution Invariance Schema Pn ω` (u, v; w) = k=1 f (u, v; wk ) parameterization DFMs therefore yield a simple resolution invariance scheme for neural networks. Instead of placing arbitrary restrictions o O : C(E` ) C(E`0 ) on W` like convolution or assuming that the gradient descent n-discrete inst. will implicitly find a smooth weight matrix or filter W` for n, we take W` to be the discretization of a smooth ω` (u, v). An n [O]n : RN RM immediate advantage is that the weight surfaces, ω` (u, v), of o-operational layers can be parameterized by dense families f (u, v; w), whose parameters w do not depend on the Figure 4: DFM construction of resoluresolution of the input but on the complexity of the model tion invariant n-discrete layer. being learnt. 4.2 T OPOLOGICALLY I NSPIRED L AYER PARAMETERIZATIONS Furthermore, we can now explore new parameterizations by constructing weight tensors and thereby neural network topologies which approximate the action of the operator neural networks which most expressively fit the topological properties of the data. Generally new restrictions on the weights of discrete neural networks might be achieved as follows: 1. Given that the input data x is sampled from some f ∈ F ⊂ {g : E0 → R}, find a closed algebra of weight kernels so that ω0 ∈ A0 is minimally parameterized and g ◦ o[F] is a sufficiently "rich" class of functions. 2. Repeat this process for each layer of a computational skeleton S and yield a DFM O. 3. Instantiate a deep function machine [O]n called the n-discrete instatiation of O consisting of only n-discrete layers by discretizing each o-operational layer through the resolution invariance schema sample:    i j k t ` W` = w , ,··· , , ,··· (4.1) eu1 eu2 e v1 e v2 ij...kt... where eη denotes the cardinality of the sample along the η-axis of E` = [0, 1]dim(E` ) . This process is depicted in Figure 4. This perspective yields interpretations of existing layer types and the creation of new ones. For example, convolutional n-discrete layers provably approximate o-operational layers with weight kernels that are solutions to the ultrahyperbolic partial differential equation. 8 Figure 5: The WaveLayer architecture of RippLeNet for MNIST. Bracketed numbers denote number of wave coefficients. The images following each WaveLayer are the example activations of neurons after training given by feeding 0 00 into RippLeNet. Theorem 4.2 (Convolutional Neural Networks). Let N` be an n-discrete convolutional layer such that n(x) = h ? x where ? is the convolution operator and h is a filter tensor. Then there is a o-operational layer, O` with ω` (u1 , . . . , un , v1 , . . . , vn ) such that n n X X ∂2ω ∂2ω 2 = c 2 ∂ uk ∂ 2 vk k=1 (4.2) k=1 and its n-discrete instatiation is [O` ]n = N` . Using Theorem 4.2 we therefore propose the following generalization of convolutional layers with weight kernels satisfying (4.2) whose n-discrete instantiation is resolution invariant. Definition 4.3 (WaveLayers). We say that T` is a WaveLayer if it is the n-discrete instantiation (via the resolution invariance schema) of an o-operational layer with weight kernel of the form ω` (u, v) = s0 + b X si cos(wiT (u, v) − pi ); si , pi ∈ R, wi ∈ R2dim(E` ) . (4.3) i=1 WaveLayers7 are named as such, because the kernels ω` are super position standing waves moving in directions encoded by wi , offset in phase by pi . Additionally any n-discrete convolutional layer can be expressed by WaveLayers, setting the direction θi of wi to θi = π/4. In this case, instead of learning the values h at each j, we learn si , wi , pi . 5 E XPERIMENTS With theoretical guarantees given for DFMs, we propose a series of experiments to test the learnability, expressivity, and resolution invariance of WaveLayers. RippLeNet. To find a baseline model, we performed a grid search on MNIST over various DFMs and hyperparameters, arriving at RippLeNet, an architecture similar to the classic LeNet-5 of LeCun et al. (1998) depicted in Figure 5. The model is the n-discrete instatiation of the following DFM (5.1) and consiststs of 5 successive wave layers with tanh activations and no pooling. We found that using ReLu often resulted in a failure of learning to converge. Changes in the activation shapes (eg. 24x24x2 → 10x10x2) are achieved merely by specifying the sample partition of E` at each node of the DFM. The trainable parameters, in particular the magnitude of internal frequencies, were initialized at offsets proportional to the number of waves comprising each o-operational layer. Likewise, orientation of each wave was initialized uniformly on the unit spherical shell. 7 Note: WaveLayers are not not the same as Fourier networks or FC layers with cos activation functions. It suffices to view wave layers as simply another way to reparameterize the weight matrix of n-discrete layers, and therefore the VC dimension of WaveLayers is less than that of normal fully connected layers. See the appendix. 9 Model Expressive Parameter Reduction. In Theorem 4.1, it was shown that DFMs in some sense parameterize the complexity of the model being learned, without constraints imposed by the form of data. RippLeNet benefits in that the sheer number of parameters (and therefore the variance) can be reduced until the model expresses the mapping to satisfactory error without concern for resolution variants. We emprically verify this methodology by fixing the model architecture and increasing the number of waves per layer uniformly. This results in an exponential marginal utility on lowest error achieved after 80 epochs of MNIST with respect Figure 6: A plot of test error versus number of to the number of parameters in the model, shown trainable parameters for RippLeNet in comparison in Figure 6. The slight outperformance of early with early LeNet architectures. LeNet architectures, suggest that future work in optimizing WaveLayers might be fruitful in achieving state of the art parameter reduction. Resolution Invariance. True resolution invariance has the desirable property of consistency. Principly, consistency requires that regardless of the the resolution complexity of data, the training time, paramerization, and testing accuracy of a model do not vary. We test consistency for RippLeNet by fixing all aspects of initialization save for the input resolution of images. For each training run, we rescale MNIST using both bicubic and nearest neighbor scaling to square resolutions of sidelength R = {16, . . . , 36, 38, 46, 64, . . . }. In conjuction we compare the resolution consistency of fully connected (FC) and convolutional architectures. For FC models, the number of free parameters on the first layer is increased out of necessity. Likewise, the size of the input filters for convolutional models is varied. As shown in Figure 7, WaveLayers remain invariant to resolution changes in both multirun variance and norFigure 7: A plot of training time (normalized for malized convergence iterations, whereas both each layer type with respect to the training time FC and convolutional layers exhibit an increase for 28 × 28 baseline) as the resolution of MNIST in both measurements with resolution. scales. 6 C ONCLUSION In this paper we proposed deep function machines, a novel framework for topologically inspired layer parameterization. We showed that given topological assumptions, DFMs provide theoretical tools to yield provable properties in neural neural networks. We then used this framework to derive WaveLayers, a new type of provably resolution invariant layer for processing data sampled from continuous signals such as images and audio. The derivation of WaveLayers was additionally accompanied by the proposal of several layer operations for DFMs between infinite and/or finite dimensional vector spaces. We for the first time proved a theory of non-linear operator and functional basis approximation for neural networks of infinite dimensions closing two long standing questions since Stinchcombe (1999). We then utilized the expressive power of such DFMs to arrive at a novel architecture for resolution invariant image processing, RippLeNet. 10 Future Work. Although we’ve layed the ground work for exploration into the theory of deep function machines, there are still many open questions both theoretically and empirically. The drastic outperformance in resolution variance of RippLeNet in comparision to traditional layer types suggests that new layer types via DFMs with provable properties in mind should be further explored. Furthermore a deeper analysis of existing global network topologies using DFMs may be useful given their expressive power. R EFERENCES Carl Burch. A survey of machine learning. A survey for the Pennsylvania Governor’s School for the Sciences, 2001. Youngmin Cho and Lawrence K Saul. Analysis and extension of arc-cosine kernels for large margin classification. arXiv preprint arXiv:1112.3712, 2011. G. Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals, and Systems, 2:303–3314, 1989. Amit Daniely, Roy Frostig, and Yoram Singer. Toward deeper understanding of neural networks: The power of initialization and a dual view on expressivity. arXiv preprint arXiv:1602.05897, 2016. Amir Globerson and Roi Livni. Learning infinite-layer networks: beyond the kernel trick. arXiv preprint arXiv:1606.05316, 2016. Tamir Hazan and Tommi Jaakkola. Steps toward deep kernel methods from infinite neural networks. arXiv preprint arXiv:1508.05133, 2015. Nicolas Le Roux and Yoshua Bengio. Continuous neural networks. 2007. Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. Warren S McCulloch and Walter Pitts. A logical calculus of the ideas immanent in nervous activity. The bulletin of mathematical biophysics, 5(4):115–133, 1943. Radford M Neal. Bayesian learning for neural networks, volume 118. 1996. Ben Poole, Subhaneil Lahiri, Maithreyi Raghu, Jascha Sohl-Dickstein, and Surya Ganguli. Exponential expressivity in deep neural networks through transient chaos. In Advances In Neural Information Processing Systems, pp. 3360–3368, 2016. Maithra Raghu, Ben Poole, Jon Kleinberg, Surya Ganguli, and Jascha Sohl-Dickstein. On the expressive power of deep neural networks. arXiv preprint arXiv:1606.05336, 2016. Fabrice Rossi, Brieuc Conan-Guez, and François Fleuret. Theoretical properties of functional multi layer perceptrons. 2002. Jurgen Schmidhuber. Deep learning in neural networks: An overview. Neural Networks, 61:85–117, 2015. Matthias Seeger. Gaussian processes for machine learning. International Journal of neural systems, 14(02):69–106, 2004. Shai Shalev-Shwartz, Ohad Shamir, and Karthik Sridharan. Learning kernel-based halfspaces with the 0-1 loss. SIAM Journal on Computing, 40(6):1623–1646, 2011. Maxwell B Stinchcombe. Neural network approximation of continuous functionals and continuous functions on compactifications. Neural Networks, 12(3):467–477, 1999. Christopher KI Williams. Computation with infinite neural networks. Neural Computation, 10(5): 1203–1216, 1998. 11 7 A PPENDIX A: A DDITIONAL T OY D EMONSTRATION To provide a direct comparison between convolutional, fully connected, and WaveLayer operations on data with semicontinuity assumptions, we conducted several toy demonstrations. We construct a dataset of functions (similar to a dataset of audio waveforms) whose input pairs are Gaussian bump functions, Bµ (u) centered at different points in the interval µ ∈ [0, 1]. The cooresponding "labels" or target outputs are squres of gaussian bump functions plus a linear form whose slopes are given by the position of the center, that is Bµ (u)2 + µ(u − µ). The desired map we wish to learn is then T : Bµ (u) 7→ Bµ (u)2 + µ · (u − µ). To construct the actual dataset D, for a random sample of centers µ we sample the input output pairs over 100 evenly spaced sub-intervals. The resultant dataset 100 is a list of N pairs of input/output vectors D = {(xi , yi )}N . i=1 with x, y ∈ R We then train three different two layer DFMs with n-discrete convolutional, fully-connected, and WaveLayers respectively. The following three figures show the outputs of all three layer types as training progresses. In the first three quadrants, the output of each layer type on a particular example datapoint is shown along with that example’s input/target functions, (xi , yi ). The particular example shown is chosen randomly at the beginning of training. In the bottom right, the log training error over the whole dataset of each layer type is shown. A tick is the number of batches seen by the algorithm. In initialization, the three layers exhibit predicted behavior despite artifacts towards the boundaries of the intervals. The convolutional layer, acts as a mullifer smoothing the input signal as its own kernel is Gaussian. The fully connected layer generates as predicted a normally distributed set of different output activations and does not regard the spatial locality (and thereby continuity) of the input. Finally the WaveLayer output exhibits behaviour predicted in Neal (1996), that is it limits towards a smoothed random walk over the input signal. As training continues, both the convolutional and WaveLayer outputs preserve the continuity of the input signal, and approximate the smoothness of the output signal as induced by their own relation to ultrahyperbolic differential equations. Since the FC layer is not restricted to any given topology, although it approximates the desired output signal closely in the L2 norm, it fails to achieve smoothness as this regularization is not explicity coded. It is important to note that in this example the WaveLayer output immediately surpasses the accuracy of the convolutional output because the convolutional output only has P bias units accross entire channels, whereas the bias units n of WaveLayers are themselves functions k=1 sk cos(wk · v + pk ) + bk . Therefore WaveLayers can impose hetrogenously accross their output signals, where as convolutional require much deeper architectures to artifically generate such biases. 12 The results of this toy demonstration illustrate the intermediate flexibility of WaveLayers between purely fully connected and convolutional architectures. Satisfying the same differential equation (4.2), convolutional and WaveLayer architectures are regularized by spatial locality, but WaveLayers can in fact go beyond convolution layers and employ translational hetrogeneity. Although the purpose of this work is not to demonstrate the superiority of either convoluitional or WaveLayer architectures, it does open a new avenue of exploration in neural architecture design using DFMs to design layer types using topological constraints. 13 8 8.1 A PPENDIX B: T HEOREMS AND P ROOFS P OINT A PPROXIMATION Theorem 8.1. Let [a, b] ⊂ R be a bounded interval and g : R → B ⊂ R be a continuous, bijective activation function. Then if ξ : E` → R and f : E`0 → B are L1 (µ) integrable functions there exists a unique class of o-operational layers such that g ◦ o[ξ] = f. Proof. We will give an exact formula for the weight function ω` cooresponding to o so that the formula is true. Recall that Z  0 y ` (v) = g ξ(u)ω` (u, v) dµ(u) . (8.1) E`   Then let ω` (u, v) = (g −1 )0 ◦ (h(Ξ(u), v)) h0 (Ξ(u), v) where Ξ(u) is the indefinite integral of ξ and h : R × E`0 → R is some jointly and seperately integrable function. By the bijectivity of g onto its codomain, ω` exists. Now further specify h so that, h(Ξ(u), v) = f (v). Then by the u∈E` fundamental theorem of (Lebesgue) calculus and chain rule, Z    −1 0 g(o[ξ](v)) = g (g ) ◦ (h(Ξ(u), v)) h0 (Ξ(u), v)ξ(u) dµ(u) E` (8.2)  = g g −1 (h(Ξ(u), v)) u∈E` = f (v) A generalization of this theorem to E` ⊂ Rn is given by Stokes theorem. 8.2 D ENSITY IN L INEAR O PERATORS Theorem 8.2 (Approximation of Linear Operators). Suppose E` , E`0 are σ-compact, locally compact, measurable, Hausdorff spaces. If K : C(E` ) → C(E`0 ) is a bounded linear operator then there exists an o-operational layer such that for all y ` ∈ C(E` ), o[y ` ] = K[y ` ]. Proof. Let ζt : C(E`0 ) → R be a linear form which evaluates its arguments at t ∈ E`0 ; that is, ζt (f ) = f (t). Then because ζt is bounded on its domain, ζt ◦ K = K ? ζt : C(E` ) → R is a bounded linear functional. Then from the Riesz Representation Theorem we have that there is a unique regular Borel measure µt on E` such that Z   Ky ` (t) = K ? ζt y ` = y ` (s) dµt (s), (8.3) E` kµt k = kK ? ζt k We will show that κ : t 7→ K ? ζt is continuous. Take an open neighborhood of K ? ζt , say V ⊂ [C(E` )]∗ , in the weak* topology. Recall that the weak* topology endows [C(E` )]∗ with smallest collection of open sets so that maps in i(C(E` )) ⊂ [C(E` )]∗∗ are continuous where i : C(E` ) → [C(E` )]∗∗ so that i(f ) = fˆ = φ 7→ φ(f ), φ ∈ [C(E` )]∗ . Then without loss of generality V = m \ fˆα−1 (Uαn ) n n=1 where fαn ∈ C(E` ) and Uαn are open in R. Now κ−1 (V ) = W is such that if t ∈ W then Tm K ? ζt ∈ 1 fˆα−1 (Uαn ). Therefore for all fαn then K ∗ ζt (fαn ) = ζt (K[fαn ]) = K[fαn ](t) ∈ Uαn . n We would like to show that there is an open neighborhood of t, say D, so D ⊂ W and κ(Z) ⊂ V . Tthat m First since all the maps K[fαn ] : E`0 → R are continuous let D = 1 (K[fαn ])−1 (Uαn ) ⊂ E`0 . Then if r ∈ D, fˆαn [K ? ζr ] = K[fαn ](r) ∈ Uαn for all 1 ≤ n ≤ m. Therefore κ(r) ∈ V and so κ(D) ⊂ V . 14 As the norm k · k∗ is continuous on [C(E` )]∗ , and κ is continuous on E`0 , the map t 7→ kκ(t)k is continuous. In particular, for any compact subset of E`0 , say F , there is an r ∈ F so that kκ(r)k is maximal on F ; that is, for all t ∈ F , kµt k ≤ kµr k. Thus µt  µr . Now we must construct a borel regular measure ν such that for all t ∈ E`0 , µt  ν. To do so, we will decompose E`0 into a union of infinitely many compacta on which there is a maximal Smeasure. ∞ Since E`0 is a σ-compact locally compact Hausdorff space we can form a union E`0 = 1 Un of precompacts Un with the property that Un ⊂ Un+1 . For each n define νn so that χUn \Un−1 µt(n) where µt(n) is the maximal measure on each compact cl(Un ) as described in the above paragraph. P∞ Finally let ν = n=1 νn . Clearly ν is a measure since every νn is mutually singular with νm when n 6= m. Additionally for all t ∈ E`0 , µt  ν. Next by the Lebesgue-Radon-Nikodym theorem, for every t there is an L1 (ν) function Kt so that dµt (s) = Kt (s) dν(s). Thus it follows that Z   K y ` (t) = y ` (s)Kt (s) dν(s) E Z ` (8.4) = y ` (s)K(t, s) dν(s) = o[y ` ](t). E` By letting ω` = K we then have K = o up to a ν-null set and this completes the proof. 8.3 D ENSITY IN N ON -L INEAR OPERATORS Theorem 8.3. Suppose that E1 , E2 are bounded intervals in R. If K : Lipλ (E1 ) → Lipκ (E3 ) is a uniformly continuous, nonlinear operator. Then for every  > 0 there exists a deep function machine o D : L1 (E1 ) L1 (E2 ) o L1 (E3 ) (8.5) such that D|Lipλ − K < . We will first introduce some defintions which quantize uniformly continuous operators on function space. Definition 8.4. Let P = p1 < · · · < pN be some partition of a compact interval E with N components. We call ρP : Lip∗ (E) → RN and ρ∗P : RM → Lip∗ (E) affine projection maps if N ρP (f ) = (f (pi ))i=1 ρ∗P (v) = v 7→ N −1 X  χPi (x) i=0 (vi+1 − vi ) (t − pi ) + vi µ(Pi )  (8.6) where χPi is the indicator function on Pi = [pi , pi+1 ) when i < N and PN −1 = [pN −1 , pN ]. Definition 8.5. Let P, Q be partitions of E1 , E3 of N, M components respectively. If K : Lipλ (E1 ) → Lipκ (E3 ), its affine projection, |K|, and its lattice map, K̃, are defined so that the following diagram commutes, Lipλ (E1 ) ρP |K| Lipκ (E3 ) RN ρ∗ P K̃ ρ∗ Q RM Lipλ (E1 ) K ρQ Lipκ (E3 ) Lemma 8.6 (Strong Linear Approximation). If K : Lipλ (E1 ) → Lipκ (E3 ) is a uniformly continuous, nonlinear operator, then for every  > 0 there exist partitions P, Q of E1 , E3 so that kK − |K|k < . Proof. To show the lemma, we will chase the commutative diagram above by approximation. For any δ > 0, we claim that there exists a P such that for any f ∈ Lipλ (E1 ), the affine projection approximates f ; that is, kf − ρ∗P ◦ ρP ◦ f kL1 (µ) < δ. To see this, take P to be a uniform partition of 15 E1 with ∆p := µ(Pi ) < Z δ µ(E1 )λ . |f − ρ∗P ◦ ρP ◦ f | dµ ≤ Then N −1 Z X i=1 ≤ ≤ Pi N −1 Z X i=1  (f (pi ) − f (pi )) (t − pi ) + f (pi ) dµ(t) µ(Pi ) |f (t) − f (pi ) − λ(t − pi )| dµ(t) Pi N −1 Z X i=1  f (t) − 2λ|t − pi | dµ(t) ≤ λ∆p2 N < δ. Pi Now by the absolute continuity of K, for every  > 0 there is a δ and therefore a partition P of E1 so that if kf − ρ∗P ◦ ρP ◦ f kL1 (µ) < δ then kK[f ] − K[ρ∗P ◦ ρP ◦ f ]kL1 (µ) < /2. Finally let Q be a uniform partition of E3 so that for every φ ∈ Lipκ (E3 ), kφ − ρ∗Q ◦ ρQ ◦ φkL1 (µ) < /2. It follows that for every f ∈ Lipλ (E1 ) kK[f ] − |K|[f ]kL1 (µ) ≤ kK[f ] − K ◦ ρ∗P ◦ ρP [f ]k + kK[f ] − ρ∗Q ◦ ρQ ◦ K[f ]k   < + = . 2 2 Therefore the affine projection of K approximates K. This completes the proof. With the lemma given we will approximate nonlinear operators through an approximation of the affine approximation using n-discrete DFMs. Proof of Theorem 3.5. Let  > 0 be given. By Lemma 8.6 there exist partitions, P, Q, so that kK − |K|k < /2. The cooresponding lattice map K̃ : RN → RM is therefore continuous. Since E1 is a compact interval, the image ρP [Lipλ (E1 )] is compact and homeomorphic to the unit hypercube [0, 1]N . By the universal approximation theorem of Cybenko (1989), for every δ, there exists a deep function machine N : RN n RJ n RM , so that kK̃ − N k∞ < δ. Then, the continuity of the affine projection maps implies that there exist δ such that kρ∗Q ◦ N ◦ ρP − |K|k < /2. Therefore the induced operator on N represents K; that is, kρ∗Q ◦ N ◦ ρP − Kk < . Let N be parameterized by W 1 ∈ RN ×J and W 2 ∈ RJ×M . Let S be any uniform partition of an I = [0, 1] with J components. Then parameterize a deep function machine D with weight kernels ω1 (u, v) = N X J X 1 χSj ×Pi (u, v)Wi,j δ(u − pi ), i=1 j=1 ω2 (v, x) = M −1 X k=1 " # J 2 2 X Wj,k+1 − Wj,k 2 (x − qk ) + Wj,k δ(v − sj ), χQk (x) µ(Q ) k j=1 where δ is the dirac delta function. We claim that D = ρ∗Q ◦ N ◦ ρP . Performing routine computations, for any f ∈ Lipλ (E1 ), Z  D[f ] = T2 ◦ g ◦ f (u)ω1 (u, v) dµ(u) E1   Z X N X J 1 = T2 ◦ g ◦  χSj ×Pi (u, v)Wi,j f (u)δ(u − pi ) dµ(u) E1 i=1 j=1   J X = T2 ◦ g ◦  ρP (f )T Wj1 χSj (v) := T2 ◦ g ◦ h(v) j=1 16 Thus, h is identical to the jth neuron of the first n-discrete layer in N ◦ ρP when v = sj . Turning to T2 in D, we get that Z D[f ] = ω2 (v, x)g(h(v)) dµ(v) I " # M −1 J 2 2 X X Wj,k+1 − Wj,k 2 = χQk (x) (x − qk ) + Wj,k g(h(sj )) µ(Qk ) j=1 k=1 = = M −1 X χQk (x) · g(ρP (f )T W 1 )T k=1 ρ∗Q (g(ρP (f )T W 1 )T W 2 )  2 Wk+1 − Wk2 (x − qk ) + Wk2 µ(Qk )  = ρ∗Q ◦ N ◦ ρP [f ]. Therefore kD|Lipλ − Kk <  and this completes the proof. We will now prove a similar theorem for d-defunctional layers. Theorem 8.7 (Nonlinear Basis Approximation). Suppose I, E2 , E3 are compact intervals, and let C ω (X) denote the set of analytic functions on X. If B : I n → C ω (E3 ) is a continuous basis map to analytic functions then for every  > 0 there exists a deep function machine D : Rn d o L1 (E2 ) L1 (E3 ) (8.7) such that kD|I n − Bk <  in the topolopgy of uniform convergence. Proof. Recall that the set of polynomials on E3 , P, are a basis for the vector space C ω (E3 ). Therefore the map B has a decomposition through nmaots κ, ∆ so that the following diagram commutes `1 (R) ∆ Rn κ B C ω (E3 ) P and κ : (ai )∞ an gn where gn is the mononomial of degree n. The existence of ∆ can be i=1 7→ verified through a composition of the direct product of basis projections in C ω (E3 ) and B. For each m ∈ N the projection image in the mth coordinate, πm [∆[Rn ]]Q = R and so again the ∞ ∞ maos factor into a countable collection of maps (∆i : Rn → R)i=1 so that i=1 ∆i = ∆. We will approximate B by approximations of κ ◦ ∆ via increasing products of ∆i . Define the aforementioned increasing product map ∆(N ) as ∆(N ) = N Y ∆i × i=1 ∞ Y c0 N +1 where c0 is the constant map. Now with  > 0 given, we wish to show that there exists an N so that kκ ◦ ∆(N ) − Bk <  in the topology of uniform convergence. To see this let PN ⊂ P denote the set of polynomials of degree at most n. Next we define a open ’mullification’ of PN . In particular let OPN () = {f ∈ C ω () | |f − g| < , g ∈ PN } . It is clear that OPN1 () ⊂ OPN2 () when N1 ≤ N2 and furthermore by the density of P in n ω n C ω (E3 ) we have that {OPi ()}∞ i=1 is an open cover of B[I ] ⊂ C (E3 ). Since I is compact n ω 0 B[I index set I = {N1 , . . . Nk } so that S ] is a compactn subset of C (E30 ) and thus there is a finite n n t∈I 0 OPt ⊃ B[I ]. If N = max I then OPN () ⊃ B[I ]. Therefore for every x ∈ I we have (N ) (N ) that kκ ◦ ∆ − Bk <  since κ ◦ ∆ is a polynomial of degree at most N. 17 Now we will filter the maps ψN := π1...N ◦ ∆(N ) where ψN : Rn → RN through the universal approximation theory of standard discrete neural networks. Let N be a two n-discrete layer DFM so that kN − ψN k < . For convienience let N := n2 ◦ gn1 Then we can instantiate N as the DFM in (8.7) using the same method as in the proof of the nonlinear operator approximation theory above. P 1 1 1 For the d-defunctional layer let Wjk be the weight tensor of n1 in N so that n1 (x)j = k Wjk xk . 1 k ∗ 1 Then let the weight kernel for d be ω1 (v) = ρ (W·k ). and then d[x]|v=j = n1 (x)j . We will ommit the design of weight kernels for the o-operational layer, but this is not difficult to establish. All together we now have that via the approximation of N and equivalence of N and its instantiation in the statement of the theorem, kκ ◦ ρ ◦ o ◦ g ◦ d − κ ◦ ιN ◦ ψN k < . Finally we need deal with the basis map κ. On the compact set ∆(N ) [I n ] = ιN ◦ ψN [I n ], κ is a bounded linear operator and its composition, κ ◦ ρ ◦ o is also a bounded linear operator. Therefore by the bounded linear approximation theorem of o-operational layers, there is a ko0 − κ ◦ ρ ◦ ok < . Appending such o0 to d as above we achieve the approximation bound of the theorem. This completes the proof. 8.4 R ESOLUTION I NVAIRANCE Theorem 8.8. If T` is an o-operational layer with an integrable weight kernel ω(u, v) of O(1) parameters, then there is a unique n-discrete layer with with O(N ) parameters so that o[ξ](j) = n[x]j for all indices j and for all ξ, x as above. Proof. Given some o, we will give a direct computation of the corresponding weight matrix of n. It follows that Z o[ξ](v) = ξ(u) ω` (u, v) dµ(u) E` = N −1 Z n+1 X = ((xn+1 − xn )(u − n) + xn ) ω` (u, v) dµ(u) (8.8) n n N −1 X Z n+1 (xn+1 − xn ) Z n n n+1 (u − n)ω` (u, v) dµ(u) + xn ω` (u, v) dµ(u) n R n+1 R n+1 Now, let Vn (v) = n (u − n)ω` (u, v) dµ(u) and Qn (v) = n ω` (u, v) dµ(u); We can now easily simplify (8.8) using the telescoping trick of summation. o(ξ)[v] = xN VN −1 (v) + N −1 X xn (Qn (v) − Vn (v) + Vn−1 (v)) + x1 (Q1 (v) − V1 (v)) (8.9) n=2 Given indices in j ∈ {1, · · · , M }, let W ∈ RN ×M so that Wn,j = (Qn (j) − Vn (j) + Vn−1 (j), WN,j = VN −1 (j), and W1,j = Q1 (j) − V1 (j). It follows that if W parameterizes some n, then n[x]j = o[ξ](j) for every f sampled/approximated by x and ξ. Furthermore, dim(W ) ∈ O(N ), and n is unique up to L1 (µ) equivalence. 8.5 C ONVOLUTIONAL N EURAL N ETWORKS AND THE U LTRAHYPERBOLIC D IFFERENTIAL E QUATION Proof. A general solution to (4.3) is of the form ω(u, v) = F (u − cv) + G(u + cv) where F, G are second-differentiable. Essentially the shape of ω stays constant in u, but the position of ω varies in v. For every h there exists a continuous F so that F (j) = hj , G = 0. Let ω(u, v) = F (u − cv) + G(u + cv). Therefore applying Theorem 4.1, to o parameterized by ω, we yield a weight matrix W so that Z [o[ξ](j) = ξ(u) (F (u − cj) + 0) dµ(u) = (W x)j = (h ? x)j = n[x]j . (8.10) E0 18 This completes the proof. o Lipλ1 o Lipλ0 o Lipλ1 9 o o ··· o o o o ··· Lipλ4 f R10 o Lipλ4 f A PPENDIX C: VC D IMENSION OF D ISCRETIZED O PERATOR N EURAL N ETWORKS . In order to calculate the VC dimension of DFMs contianing only discretized o-operational layers, denoted D, we have D ⊂ N, where N is the family of all DFMs with n-discrete skeletons whose per-node dimensionality is exactly that of the discretization D. Thus the VC dimension of F can be bounded by that of N, however more fine tuned estimate is both possible and essential. Suppose that in designing some deep architecture, one wishes to keep VC dimension low, whilst increasing per-node activation dimensionality. In practice optimization in higher dimensions is easier when a low dimensional parameterization is embedded therein. For example, hyperdimensional computing, sparse coding, and convolutional neural networks naturally neccessitate high dimensional hidden spaces but benefit from regularized capacity. Since the dimensionality of the discretization O does not depend on the original dimensionality of the space, then the capacity of O depends directly on the "complexity" of the family of weight surfaces there endowed. It would therefore be convenient to answer the following question formally. The VC Problem. Let W` ⊂ L1 (R2 , µ) be some family of weight surfaces. Then induce OW , a family of discretized o-operational layers with OW := {[oW ]n }W ∈W where [·]n denotes the discretization. What is V CDim(OW )? Although in this work we do not directly attack this problem, a solution leads to another dimension of layer and architecture design beyond topological constraints. In practice, one would be able to choose which set of W` to give a satisfactory generalizability condition on their learning problem. 10 A PPENDIX D: A NALYTICAL D ERIVATION OF C ONTINUOUS E RROR BACKPROPAGATION FOR S EPERABLE W EIGHT K ERNELS With these theoretical guarantees given for DFMs, the implementation of the feedforward and error backpropagation algorithms in this context is an essential next step. We will consider operator neural networks with polynomial kernels. As aforementioned, in the case where a DFM has nodes with non-seperable kernels, we cannot give the guarntees we do in the following section. Therefore, a standard auto-differentiation set-up will suffice for DFMs with for example wave layers. Feedforward propagation is straight forward, and relies on memoizing operators by using the separability of weight polynomials. Essentially, integration need only occur once to yield coefficients on power functions. See Algorithm 1. 10.0.1 F EED -F ORWARD P ROPAGATION We will say that a function f : R2 → R is numerically integrable if it can be seperated into f (x, y) = g(x)h(y). Theorem 10.1. If O is a operator neural network with L consecutive layers, then given any ` such that 0 ≤ ` < L, y ` is numerically integrable, and if ξ is any continuous and Riemann integrable input function, then O[ξ] is numerically integrable. 19 Algorithm 1 Feedforward Propagation on F Input: input function ξ for l ∈ {0, . . . , L − 1} do ` for t ∈ ZX do R Calculate It` = E` y ` (j` )j`t dj` . end for for s ∈ ZY` do PZ ` Calculate Cs` = a X ka,s Ia` . end for P `  ZY b ` Memoize y ` (j) = g b j Cb . end for The output is given by O[ξ] = y L . Proof. Consider the first layer. We can write the sigmoidal output of the (`)th layer as a function of the previous layer; that is, Z  y` = g w` (j` , j` )y ` (jl ) djl . (10.1) E` Clearly this composition can be expanded using the polynomial definition of the weight surface. Hence   ` ` Z ZY ZX X X y` = g  y ` (j` ) kx2l ,x2` j`x2l j`x2` dj`  E` x2` x2l  ` ` ZY ZX Z X X x2`  =g j kx2l ,x2` x2` E` x2l  (10.2) y ` (j` )j`x2l dj`  , ` and therefore y is numerically integrable. For the purpose of constructing an algorithm, let Ix` 2` be the evaluation of the integral in the above definition for any given x2` It is important to note that the previous proof requires that y ` be Riemann integrable. Hence, with ξ satisfying those conditions it follows that every y ` is integrable inductively. That is, because y 0 is integrable it follows that by the numerical integrability of all l, O[ξ] = y L is numerically integrable. This completes the proof. Using the logic of the previous proof, it follows that the development of some inductive algorithm is possible. 10.0.2 C ONTINUOUS E RROR BACKPROPAGATION As is common with many non-convex problems with discretized neural networks, a stochastic gradient descent method will be developed using a continuous analogue to error backpropagation. We define the loss function as follows. Definition 10.2. For a operator neural network O and a dataset {(γn (j), δn (j))} we say that the error for a given n is defined by Z 1 2 E= (O(γn ) − δn ) djL (10.3) 2 EL This error definition follows from N as the typical error function for N is just the square norm of the difference of the desired and predicted output vectors. In this case we use the L2 norm on C(EL ) in the same fashion. We first propose the following lemma as to aid in our derivation of a computationally suitable error backpropagation algorithm.  Lemma 10.3. Given some layer, l > 0, in O, functions of the form Ψ` = g 0 Σl y ` are numerically integrable. 20 Proof. If ` Ψ =g 0 ! Z y (`−1) w (`−1) dj` (10.4) E(`−1) then  (`−1) (`−1) Ψ` = g 0  X b  ZX ZY jlb X Z (`−1) ka,b y (`−1) j`a djl−2  (10.5) E(`−1) a hence Ψ can be numerically integrated and thereby evaluated. The ability to simplify the derivative of the output of each layer greatly reduces the computational time of the error backpropagation. It becomes a function defined on the interval of integration of the next iterated integral. Theorem 10.4. The gradient, ∇E(γ, δ), for the error function (10.3) on some O can be evaluated numerically. ` ` for x ∈ ZX , y ∈ ZY` , and 0 ≤ l ≤ L. If we Proof. Recall that E over O is composed of kx,y show that ∂k∂E can be numerically evaluated for arbitrary, l, x, y, then every component of ∇E is ` x,y numerically evaluable and hence ∇E can be numerically evaluated. Given some arbitrary l in O, let n = `. We will examine the particular partial derivative for the case that n = 1, and then for arbitrary n, induct over each iterated integral. Consider the following expansion for n = 1, Z ∂E ∂ 1 2 [O(γ) − δ] djL = L−n L−1 2 ∂kx,y ∂kx,y E` Z Z L x = [O(γ) − δ] Ψ jL−1 jLy y L−1 djL−1 djL E` Z = E` E(`−1) [O(γ) − δ] ΨL jLy Z x jL−1 y L−1 djL−1 djL (10.6) E(`−1) Since the second integral in (10.6) is exactly IxL−1 from (??), it follows that ∂E Z = [O(γ) − δ] ΨL jLy djL (n) E` ∂kx,y and clearly for the case of n = 1, the theorem holds. IxL−1 (10.7) Now we will show that this is all the case for larger n. It will become clear why we have chosen to include n = 1 in the proof upon expansion of the pratial derivative in these higher order cases. Let us expand the gradient for n ∈ {2, . . . , L}. Z Z Z Z ∂E L L−1 L−1 = [O(γ) − δ]Ψ w Ψ ··· wL−n+1) ΨL−n+1) L−n ∂kx,y EL EL−1 EL−n+1) | {z } n−1 iterated integrals Z (10.8) a b y L−n jL−n jL−n+1 djL−n . . . djL EL−n As aforementioned, proving the n = 1 case is required because for n = 1, (10.8) has a section of n − 1 = 0 iterated integrals which cannot be possible for the proceeding logic. R R We R Rnow use the order invariance properly of iterated integrals (that is, A B f (x, y) dxdy = f (x, y) dydx) and reverse the order of integration of (10.8). B A In order to reverse the order of integration we must ensure each iterated integral has an integrand which contains variables which are guaranteed integration over some region. To examine this, we propose the following recurrence relation for the gradient. 21 Let {Bs } be defined along L − n ≤ s ≤ L, as follows Z BL = [O(γ) − δ] ΨL BL−1 djL , EL ` Z Bs = Ψ ` E` a Z BL−n = EL−n such that ∂E ` ∂kx,y ` ZX ZY X X j`a j`b B` dj` , (10.9) b y x jL−n jL−n+1 djL−n = BL . If we wish to reverse the order of integration, we must find a reoccurrence ∂E L−n ∂kx,y relation on a sequence, {Bs } such that (10.8). = BL−n = BL . Consider the gradual reversal of Just as important as Clearly, Z Z Z ∂E L−n x L = y j [O(γ) − δ]Ψ wL−1 ΨL−1 L−n ` ∂kx,y EL−n EL EL−1 Z Z y L−n+1) L−n+1) ··· jL−n+1 w Ψ djL−n+1 . . . djL djL−n (10.10) EL−n+1) is the first order reversal of (10.8). We now show the second order case with first weight function expanded. Z Z Z ZY X ZX X ∂E a+y L−n x L−n+1) = y jL−n ka,b jL−n+1 Ψ [O(γ) − δ]ΨL ` ∂kx,y EL−n EL−n+1) b E L a (10.11) Z Z b (L−n+2) (L−n+2) ··· jL−n+2 w Ψ djL−n+1 . . . djL djL−n . EL−n+1) Repeated iteration of the method seen in (10.10) and (10.11), where the inner most integral is moved to the outside of the (L − s)th iterated integral, with s is the iteration, yields the following full reversal of (10.8). For notational simplicity recall that l = L − n, then ` ∂E = ` ∂kx,y Z y ` jlx E` Z ZX X E` j`a+y Ψ` E`+2 a `+2 `+3 ZY ZX Z X X E`+3 d `+2 ` ZY ZX X X Z `+2 d+e `+3 kc,d jl+3 Ψ b+c `+2 ` ka,b jl+2 Ψ c b Z Z ··· EL e L−1 ZY X (10.12) L−1 q kp,q jL [O(γ) − δ]ΨL q djL . . . djL−n . Observing the reversal in (10.12), we yield the following recurrence relation for {Bs }. Bare in mind, l = L − n, x and y still correspond with ∂k∂E , and the following relation uses its definition on s for ` x,y cases not otherwise defined. L−1 Z ZX Y L−1 b BL,t = kt,b jL [O(γ) − δ] ΨL djL . EL b (s−1) ZY Bs,t = E(s) Z B` = E` ∂E = Bl = ` ∂kx,y Z (s) X X Z X Z b (s−1) a+b (s) js Ψ Bs+1,a kt,b a ` ZX X j`a+y Ψ` Bl+2,a dj` . a jlx y ` B` dj` . E` 22 djs . (10.13) Algorithm 2 Error Backpropagation Input: input γ, desired δ, learning rate α, time t. for ` ∈ {0, . . . , L} do  R Calculate Ψ` = g 0 E(`−1) y (`−1) w(`−1) dj` end for For every t, compute BL,t from from (10.13). R L−1 L−1 . Update the output coefficient matrix kx,y − IxL−1 EL [F(γ) − δ] ΨL jLy djL → kx,y for l = L − 2 to 0 do If it is null, compute and memoize Bl+2,t from (10.13). Compute but do not store B` ∈ R. = Bl from from (10.13). Compute ∂k∂E ` x,y ` ` Update the weights on layer l: kx,y (t) → kx,y end for Note that BL−n = BL by this logic. With (10.13), we need only show that BL−n is integrable. Hence we induct on L − n ≤ s ≤ L over {Bs } under the proposition that Bs is not only numerically integrable but also constant. Consider the base case s = L. For every t, because every function in the integrand of BL in (10.13) is composed of jL , functions of the form BL must be numerically integrable and clearly, BL ∈ R. Now suppose that Bs+1,t is numerically integrable and constant. Then, trivially, Bs,u is also numerically integrable by the contents of the integrand in (10.13) and Bs,u ∈ R. Hence, the proposition that s + 1 implies s holds for ` < s < L. Lastly we must show that both B` and Bl are numerically integrable. By induction Bl+2 must be numerically integrable. Hence by the contents of its integrand B` must also be numerically integrable and real. As a result, Bl = ∂k∂E is real and numerically integrable. ` x,y Since we have shown that ∂k∂E is numerically integrable, ∇E must therefore be numerically ` x,y evaluable as aforementioned. This completes the proof. 23
1cs.CV
Gear Fault Diagnosis Based on Gaussian Correlation of Vibrations Signals and Wavelet Coefficients Amir Hosein Zamaniana, Abdolreza Ohadib* a MSc Student of Mechanical Engineering, zamanian.amir @aut.ac.ir Associate Professor of Mechanical Engineering, a_r_ohadi @aut.ac.ir doi:10.1016/j.asoc.2011.06.020 _1 b 1_ Acoustics Research Lab., Mechanical Engineering Department, Amirkabir University of Technology (Tehran Polytechnic), Hafez Ave., 424, Tehran, Iran * Corresponding author: Tel: +98 21 64543484, Fax: +98 21 66419736, email address: a_r_ohadi @aut.ac.ir 1_ Abstract The features of non-stationary multi-component signals are often difficult to be extracted for expert systems. In this paper, a new method for feature extraction that is based on maximization of local Gaussian correlation function of wavelet coefficients and signal is presented. The effect of empirical mode decomposition (EMD) to decompose multi-component signals to intrinsic mode functions (IMFs), before using of local Gaussian correlation are discussed. The experimental vibration signals from two gearbox systems are used to show the efficiency of the presented method. Linear Support Vector Machine (SVM) is utilized to classify feature sets extracted with the presented method. The obtained results show that the features extracted in this method have excellent ability to classify faults without any additional feature selection; it is also shown that EMD can improve or degrade features according to the utilized feature reduction method. Keywords: Gear, Gaussian-Correlation, Wavelet, EMD, SVM, Fault Detection 1. Introduction Nowadays, vibration condition monitoring of industrial machines is used as a suitable tool for early detection of variety faults. Data acquisition, feature extraction, and classification are three general parts of any expert monitoring systems. One the most difficult and important procedure in fault diagnosis is feature extraction which is done by signal processing methods. There are various techniques in signal processing, which are usually categorized to time (e.g. [1, 2]), frequency (e.g. [3]), and time-frequency (e.g. [4, 5]) domain analyses. Among these, time-frequency analyses have attracted more attention because these methods provide an energy distribution of signal in timefrequency plane simultaneously, so frequency intensity of non-stationary signals can be analyzed in time domain. Continuous wavelet transform (CWT), as a time-frequency representation of signal, provides an effective tool for vibration-based signal in fault detection. CWT provides a multi-resolution capability in analyzing the transitory features of non-stationary signals. Behind the advantages of CWT, there are some drawbacks; one of these is that CWT provides redundant data, so it makes feature extraction more complicated. Due to this data redundancy, data mining and feature reduction are extensively used, such as decision trees (DT) (e.g. [6]), principal component analysis (PCA) (e.g. [7]), independent component analysis (ICA) (e.g. [8-10]), genetic algorithm with support vector machines (GA-SVM) (e.g. [1, 2]), genetic algorithm with artificial neural networks (GA-ANN) (e.g. [1, 2]), Self Organizing Maps (SOM) (e.g. [11]), and etc. Selection of wavelet bases is very important in order to indicate the maximal capability of features extraction for desired faults. As an alternative, Tse et al. [4] presented "exact wavelet analysis" for selection of the best wavelet family member and reduction of data redundancy. In this method, for any time frame, by defining cosine function between wavelet coefficients and the inspected signal, GA finds the scale parameter and some parameters related to wavelet family member (i.e. shape of wavelet). However, in the best conditions, GA finds only the most appropriate member of the wavelet family of the desired adaptive wavelets. This wavelet member may not be necessarily the best wavelet shape. Another approach is designing the wavelet based on similarity of wavelet and desired signal, but this method is not complete because it does not consider frequency properties of wave and signal. Lin and Zuo [12] suggested an adaptive wavelet filter based on Morlet wavelet. In their presented method, wavelet parameters are optimized based on the kurtosis maximization principle. Holm-Hansen et al. [13] presented a customized wavelet using the scaling function that has been derived from the actual impulse response of a ball bearing. Customized wavelet has shown better performance in comparison to other wavelets commonly used in detection of bearing faults. Although exact wavelet analysis shows efficiency, but it has some drawbacks such as selection of scale in case of multi-component signals, equal weights of all samples participating in each time frame, treating of objective function with non-zero mean signals in each time frame and using of time consuming evolutionary algorithm which will be discussed in the next sections in more details. Support Vector Machine (SVM) has been used in many applications of machine learning because of high accuracy and good generalization ability. The foundations of support vector machines (SVM) have been developed by Vapnik [14] in 1995 and are gaining popularity due to many attractive features, and promising empirical performance. The formulation embodies the structural risk minimization (SRM) principle, which has been shown to be superior to traditional empirical risk minimization (ERM) principle, employed by conventional neural networks [15]. Many researchers compared SVM with artificial neural networks (ANN) in fault diagnosis (e.g. [1, 2]) and generally showed that SVMs have better classification ability. Some researches (e.g. [6]) implemented different SVM algorithms to compare them in the field of gear fault diagnosis. In the current paper, linear SVM has been utilized to determine linear separability of extracted features. In this paper a modified method for feature extraction based on exact wavelet analysis is presented to improve this analysis. A flowchart is shown in Fig. 1 for summarizing the proposed fault diagnosis procedure that has been used in this research. The next sections of this paper are devoted to introduction of empirical mode decomposition, wavelet transform, exact wavelet analysis, modified exact wavelet analysis, support vector machine, two illustrative examples, experimental results and conclusions, respectively. Fig 1. Flowchart of fault diagnosis system. 2. Empirical Mode Decomposition (EMD) The empirical mode decomposition (EMD) presented by Haung et al. [16] is a decomposition method for nonlinear and non-stationary time-series into a finite set of oscillatory functions called the intrinsic mode functions (IMF). An IMF represents a simple oscillation with the following definition: (1) the number of extrema and the number of zero-crossings must either equal or differ at most by one, and (2) at any point, the mean values of the envelopes defined by the local maxima and the local minima are zero. Therefore, an IMF represents a simple oscillatory mode that has a variable amplitude and frequency as function of time. The readers are referred to [17] to find more details on EMD. The procedure to decompose a signal x  t  into its IMFs is as follows: 1) Identify all the local maxima and connect them by a cubic spline to produce the upper envelope, u t  . 2) Repeat the procedure for the local minima to produce the lower envelope, l t  . 3) Calculate mean of two envelopes as m1 t   u t   l t   2 . 4) Extract h1 t  by subtraction of m1 t  from signal x t  (i.e. h1 t   x t   m1 t  ). Ideally, h1 t  should satisfy the definition of an IMF, however, even if the fitting is perfect, a gentle hump on a slope can be amplified to become a local extremum in changing the local zero from a rectangular to a curvilinear coordinate system [17]. To eliminate riding waves and to make the wave profiles more symmetric, a process called sifting by Huang [17] should be followed. Therefore, the next step is: 5) Repeat the procedures 1 to 4 (sifting process), by replacement of h1k t  instead of x t  (i.e. h1k  h1 k 1  m1k , k  1, 2,... ). h10 t   h1 t  Here envelopes of h1 k 1 in the k   th and m1k donates to mean of upper and lower iteration, and the process will continue until one of the stoppage criterion is met. These criterions are: a) A threshold of normalized squared difference in two successive iterations as defined below. If this value (i.e. SDk) is smaller than a predetermined value, the sifting process will be stopped.   h t   h1k t  t  0 1k 1 T SDk  T t 0 2 h12k 1 b) The agreement of the number of zero-crossings and extrema. If the numbers of zero crossing and extrema are not equal or not differ at most by one, then h1k cannot be considered as an IMF, and EMD is finished. 6) The final h1k is the 1st IMF ( p1  t   h1k  t  ) By subtracting 1st IMF, p1 t  , from signal x  t  , residual r1  t   x  t   p1  t  is obtained. If the residual is taken as the new signal by iterating the above process, 2nd, 3rd… to nth IMFs can be calculated consequently. Thus, a decomposition of the data will result n IMF and also the final residual rn  t  . n x  t    pi  t   rn  t  i 1 3. Wavelet Transform Wavelet transform has provided a power tool for signal analysis of transients. The continuous wavelet transform (CWT) of a signal W (a, b)     x(t )  a ,b (t )dt x  t  is defined as, , (1) where  a,b (t )  a  1 2  t  b  a  (2) , is called daughter wavelet derived from mother wavelet  t  and the bar denotes its complex conjugation and a and b are real-value parameters, called scale and translation, respectively. In this paper, Morlet wavelet [18], as a non-adaptive wavelet has been selected (Eq. (3)), which is considered as a common wavelet used in fault diagnosis.  t   where 1 exp  t 2  cos  2 0t  2 , 2 0 )3 ( equals 5 in this work. 4. Exact Wavelet Analysis [4] Exact wavelet analysis, presented by Tse et al. [4], is aimed to provide a direct measure of the similarity in shapes between the daughter wavelet and the inspected signal. The "normalized dot product" (cosine function) of the CWT and the inspected signal is adopted for measuring their similarity in shape, as shown in Eq. (4).  cos  X, C    2 n 1 i 1 2 n 1 i 1 x i ci x i2  2 n 1 i 1 , n  1, 2,3,... (4) c i2 X and C represent vectors of x i and c i represent the elements In this equation, signal and its wavelet coefficients in a definite scale. The variables of the vectors and 2n  1 is the number of data. The calculated index from the fitness function provides a measure to evaluate the similarity of the two vectors not only in their magnitudes but also in their geometrical shapes. The higher the indexes of the fitness function, the more similar are the derived wavelet and the portion of the inspected signal. The index of the cosine function approaches to 1 indicating a perfect match, whilst the index approaches to zero shows a mismatch. Genetic algorithms are employed to optimize Eq. (4) as a function of scale and parameters related to wavelet shape that are used to generate a series of daughter wavelets. Therefore, the derived exact wavelets are able to match properties of the inspected signal well. In this method, in each time frame, only one scale among possible scales, which has the best fitness function, is selected. The final extracted features are based on distribution of selected scales obtained by GA. 5. Modified Exact Wavelet Analysis As explained in section 4, in exact wavelet analysis, one scale is chosen in each time frame based on maximization of normalized dot product of the wavelet coefficients and the inspected signal. This selection does not guarantee that fault effects are considered in the selected features in case of multicomponent signals. In this paper it has been tried to solve this deficiency. Some drawbacks on exact wavelet analysis that are investigated in this paper are as follows: 1) In the exact wavelet analysis, definition of normalized dot product of the wavelet coefficients and the inspected signal in a time window is based on the equal weight of samples. Indeed, the center sample in window has equal effect with the samples at the boundaries of the window. This is not necessarily the best choice. 2) In practical multi-component signals, exact wavelet selects only one scale corresponding to one component of the signal. This component may not necessarily be due to the faults of the system. 3) In any time frame, the normalized dot product represents a good criterion for finding similarity of zero mean signals and its wavelet coefficients. However, for non-zero mean signals, this measure cannot be as effective as zero mean signals. 4) The use of GA for each time frame is a time-consuming process. In this paper, some solutions are suggested as a new method for feature extraction based on maximization of "local Gaussian correlation" function of wavelet coefficients and signal. These solutions are as follows: 1) To solve the problem of equal weights, Gaussian weights is presented. The effect of samples, from center of time frame to the ends, reduces according to a Gaussian function from one to zero. 2) In practical applications, especially for vibration signals, there is a probability that the selected scale has not been caused by any faults and effects of the faults may be neglected. Indeed, some of the signal components are due to unbalanced mass, misalignment, looseness, bearing and gear faults, resonance, etc. that can affect the analysis. In order to solve this problem, usage of empirical mode decomposition (EMD) of signal is suggested. By using EMD, primarily, each vibration signal is decomposed to intrinsic mode functions (IMFs) that are almost mono-component and orthogonal. Then the procedure of exact wavelet analysis is implemented for each IMF. In this way, the probability of omitting scales which are due to the faults is eliminated or at least is reduced. 3) The "normalized dot product" function can be replaced with "local correlation" or "dot product" functions. In order to use these functions for non-zero mean time frames appropriately, subtraction of mean of samples in the selected time frame, and its corresponding wavelet coefficients can provide a solution. The suggested function is not bounded and the greater value means more similarity. In the modified method, for each selected time frame with length of 2n  1 samples, the similarity of wavelet coefficients W(a,b) and corresponding signal x(t) is calculated by local correlation function, which is defined in Eq. (5). f  X, C    i 1 wi  xi  x  ci  c  2 n 1 X (5) C represent vectors of signal and its wavelet coefficients in a definite scale, in a time frame, respectively. Also, x and c are mean of signal and wavelet coefficient in In this equation, and selected time frame and w i is contributing weight of each sample in time frame. In the case of local correlation or dot product all of contributing weights equals one (i.e. Gaussian weights, w i  1) and in the case of w i can be calculated from Eq. (6).  wi  exp   i   n  1   2 2  (6) Parameter  in Eq. (6) can be determined by considering one percent participation of latest samples in the time window as shown in Eq. (7).  n n  2 ln10 2.146 (7) 4) The GA optimization can be neglected in price of neglecting any adaptive wavelet. This can be done by using an appropriate non-adaptive wavelet and optimization of scale discretely with desirable resolution. So in each time frame, only one parameter (i.e. scale) should be optimized. The advantage of this method is that the optimization algorithm can be omitted with comparing objective function (i.e. local Gaussian correlation or normalized dot product function) in a finite number of discrete scales. Therefore, the computation effort has been significantly decreased. The calculated index in Eq. (5) provides a boundless measure to evaluate the similarity of the two unnecessarily zero mean vectors not only in their magnitudes but also in their geometrical shapes. The higher index of the function, the more correlation is derived. Let's clarify the difference of two functions in Eq. (4) and Eq. (5). It is clear that for constant signal in a time frame for example, Eq. (5) equal zero whereas Eq. (4) is not necessarily zero. In Eq. (4) the greater value of the constant signals leads the greater value of the function whereas in Eq. (5) the magnitude of constant signal doesn't affect the measure of similarity and the value remains zero. So Eq. (5) doesn't consider the effect of constancy and it focuses on similarity of the shape of signal and wavelet coefficients and higher wavelet coefficients, simultaneously. In case of local Gaussian correlation the effects of center of participating signal is more than phenomena that occurred before or will occur in futures. 5. Support Vector Machine The concept of support vector machine is extensive. A brief introduction of SVM is presented here and the readers are referred to references [15] and [19] for more details. Without loss of generality, the classification problem can be restricted to consideration of the two-class problem. SVM can be considered to create a line or hyper-plane between two sets of data for classification. Consider the problem of separating the set of training vectors belonging to two separate classes: D  x , y  ,...,  x , y  , 1 1 l l x  R n , y  1,1 , (7) with a hyper-plane, w.x  b  0. (8) In the case of two-dimensional situation, the action of the SVM can be explained easily. In this situation, SVM find a line which separates two classes of data (feature sets). This line separates data into two parts so that the data on the right hand belong to one class (Class A) and the data on the left hand belong to the other class (Class B). Many lines may have the ability to separate data completely. However, SVM find the line that has the maximum Euclidean distance between the nearest data to this line both in Classes A and B. The data, which has the minimum distance to this line, are called support vectors (SVs) that are shown in Fig. 2. Since training SVM with SVs in case of linear separable data is sufficed, the rest of data can be neglected. The SVs are located in two parallel lines, which are parallel to the separating line. The margin equations for class A and B are: w.x  b  1 (Class A), (9) (Class B). (10) and w.x  b  1 Figure 2. Linear separating plane for classification, the support vectors are circled [19]. Once the SVM has been trained, the decision function in Eq. (11) determines the class of each test sample and indicates its position related to the decision boundary. f  x   sgn  w.x  b  , (11) The SVM training is obtained by optimizing an objective function that is presented in Eq. (12). L l l 1 2 w    i yi  w.x i  b     i , 2 i 1 i 1 (12) where l is the number of training sets, and  i is Lagrange multipliers’ coefficients obtained by the following constraints. yi  w.xi  b   1, (13) The solution can be obtained as follows: l l i 1 i 1 w    i yi xi   vi xi , (14) where vi   i yi (15) Substitution of Eq. (14) into Eq. (11) leads to Eq. (16).  l  f  x   sgn   vi  xi .x   b   i 1  (16) The set of vectors is said to be optimally separated by the hyper plane if it has been separated without error and the distance between the closest vector to the hyper plane is maximal [15]. In the case of non-separable data with linear hyper plane, a hyper plane should be defined so that it allows linear separation in the higher dimension (corresponding to nonlinear separating hyper planes). The intent of this paper is to show that the extracted features are linearly separable by the presented method, so Linear SVMs are expected to have excellent classification performance and nonlinear SVMs can be neglected. 6. Two Illustrative Examples In this section, in order to clarify the presented method, two examples for two synthetic signals are presented. 6.1. Example 1 Two synthetic harmonic signals y1  t  and y2  t  have been superimposed to each other and create y  t  in an interval of 0  t  1 with sampling rate of 1 kHz as shown in Eq. (17). y1  t   sin  40 t  , y2  t   2cos 80 t  , y  t   y1 t   y2 t  . The coefficients of CWT of signal (17) y  t  are shown in time-scale plane (Fig. 3(a)). It is clear that wavelet coefficients near scale 40 are related to y1  t  and near scale 20 are related to y2  t  . In Fig. 3(b) the local Gaussian correlation of signal with wavelet coefficient has been shown in timescale plane and the maximum value of correlation is shown with white points which have been appeared line-wise. The synthetic signal contains two components but the extracted scales, according to Gaussian-correlation window, indicate only one of the components of signal. All features extracted in Fig. 3(b) are related to the signal with the higher frequency (i.e. y2  t  ). It is one of the deficiencies of exact wavelet analysis when the signal is multi-component. In practical applications (i.e. gearbox vibration signals), there is this probability that the signal contains frequencies near to gear mesh frequency (GMF) or higher. In this condition, the best fitness of local Gaussian correlation or any other function may represent the features that are not caused by faults in gear. So, the EMD method has been done for signal y  t  and the first two IMFs have been computed. Then, for these IMFs, CWT and local Gaussian correlation have been calculated (the same as done for y  t  ) as shown in Fig. 4 and 5. In this condition, in a time frame, one scale has been selected for each IMF. Since each IMF contains a component of the signal, this decomposition provides the opportunity for all components to be selected, and the final feature can be extracted by mixing these results. (a) Distribution of CWT coefficients (b) Local Gaussian correlation of signal (n=15) Figure 3. Energy distribution of signal y  t  . (a) Distribution of CWT coefficients (b) Local Gaussian correlation of signal (n=15) Figure 4. Energy distribution of the first IMF. (a) Distribution of CWT coefficients (b) Local Gaussian correlation of signal (n=15) Figure 5. Energy distribution of the second IMF. 6.2. Example2 The second example is devoted to a summation of a harmonic signal ( in an interval of y1  t  ) and a chirp ( y2  t  ) 0  t  1 with sampling rate of 1 kHz (Eq. 18). y 1 t   sin  40 t  , y 2 t   cos  2(10  80t ) t  , y t   y 1 t   y 2 t  . (18) In this example a chirp signal is intentionally chosen because in practical situations with controlled speed, even a small fault in gear can change rotating speed that containing chirp like characteristics due to the impact and inappropriate gear meshing. This is exaggerated in this example. Again, the coefficient of CWT and local Gaussian correlation for synthesized signal and its first two IMFs are shown in Figs. 6-8, respectively. It is obvious in Fig. 6(b) that local Gaussian correlation of signal, at least in the first half of chirp, cannot extract features of chirp component. Fig. 7(a) and Fig. 8(a) show that when frequency of chirp and harmonic signal at the end of the duration come close together, the EMD fails to decompose the signal appropriately. However, even in these conditions, local Gaussian correlation can track scales related to chirp and harmonic signal in a gentle manner. (a) Distribution of CWT coefficients (b) Local Gaussian correlation of signal (n=15) Figure 6. Energy distribution of signal y  t  . (a) Distribution of CWT coefficients (b) Local Gaussian correlation of signal (n=15) Figure 7. Energy distribution of the first IMF. (a) Distribution of CWT coefficients (b) Local Gaussian correlation of signal (n=15) Figure 8. Energy distribution of the second IMF. These two examples show that the greater coefficient of CWT cannot represent the best match of scale with a signal alone. The other fitness functions such as normalized dot product, Gaussian dot product, correlation coefficient have been checked. Among these functions, local Gaussian correlation represented better match than the other functions to follow signal in time-scale plane. 7. Experimental Results To evaluate the efficiency of the presented method in fault diagnosis of practical applications, the vibration signals, which have been acquired from two gearboxes, are used in this paper. 7.1. Amirkabir Experimental Setup Fig. 9 indicates a gearbox test setup designed in Amirkabir University of Technology (Tehran Polytechnic). The vibrating signals were obtained from 2D accelerometer (Analog Devices Inc.ADXL210JQC) mounted on gearbox frame with sampling frequency rate of 10 kHz. The frequency content of measured acceleration is in the range of 0~5 kHz. These signals were fed to A/D converter (Advantech™ PCI-1710, 12-bit, 100kS/s) and were recorded by real-time workshop of MATLAB. The gearbox was driven by a 3-phase electromotor with nominal speed of 1420 RPM. The pinion ( N1  15 ) and wheel ( N 2  110 ) teeth provide speed ratio of 7.33:1 for gearbox. This configuration provides GMF of 15 1420 60  355Hz . A disk brake system has been considered to provide appropriate load on the system. The gearbox was tested for three conditions; normal, chipped, and worn teeth as shown in Fig.10. In the chipped case, 50% area from top land of a pinion tooth profile to pitch surface has been eliminated with linear decreasing slop. In the worn case, material of the face and flank of three consequent teeth has been removed with thickness of 0.5 mm . It should be mentioned that the effect of the chipped and worn teeth gears are similar in signal and the difference is minor and these faults intentionally have been chosen to measure power discrimination of the presented methods. For each test condition, data was stored in duration of 10 sec and each acquired signal was divided to 80 segments with the length of 1250 samples. Each segment was used to extract feature sets, so in total 240 ( 80  3 ) feature sets were obtained, 90 sets were used for training the SVM, and the remaining 150 feature sets were used for testing the performance of trained SVM. (a) Healthy Figure 9. The experimental setup test (Acoustic Research Lab., Amirkabir University of Technology) (b) Wear (c) Chipped Figure 10. Gears conditions For the first feature set, the coefficient of CWT and scales that maximize local Gaussian correlation function are shown in Fig. 11. The differences between gear conditions, obtained by local Gaussian correlation function, are obvious. For investigating the effects of EMD method, selected scales of the first three IMFs for the first segment are considered and plotted in Fig. 12, as a sample. The distributions of scale levels (suggested by Tse et al. [4]) in normal, chipped, and worn teeth gears are calculated, and provide 3  32 initial features for each segment. All of initial features obtained from IMFs are mixed together by summation of equivalent scale levels divided by the number of IMFs. This kind of summation sometimes may degrade features' value in classification because the features derived from each IMF have different dependencies to faults and need to be investigated further. So, finally with and without EMD process, 32 features are extracted as final feature sets. The mean of distribution of scale levels for all signal segments with and without EMD is plotted in Fig. 13. The final training feature sets are used for training Linear SVM. The performance has been evaluated by test feature sets and has been tested with trained feature sets to evaluate the training success. In order to provide multiclass classification by SVM, one-versus-all approach has been used. The results are represented in Tables 1-3. For all gear conditions (healthy, chipped, and worn) in Table 1, local Gaussian correlation has the best match and dot product is on the second. 5.33% improvement has been achieved by local Gaussian correlation in comparison to normalized dot product. The classification performance by using EMD has been increased or decreased depend on the cases. Using EMD has reduced the classification performance in worn teeth condition by about 0.7% with first three IMFs and 1.3% with first four IMFs and 0.7% in chipped tooth with first four IMFs. The results may seem contrary to the expectation of EMD at first, and can be justify by this reason that, all IMFs of signal are not related to fault so summation of features of non-related components (i.e. related IMFs) with related components (i.e. non-related IMFs) in order to reduce features, degrade power of discrimination of the final extracted features. In all of the cases in Table 1, local Gaussian correlation is dominated to the others. Figure 11. Distribution of CWT coefficients and selected scales for the first signal segments. Figure 12. Selected scales by local Gaussian correlation for the first signal segments. (a) First three IMFs (b) Signal Figure 13. Mean of distribution of scale levels of all signal segments. Table 1. Classification performance of Linear-SVM (signal). Objective Function Local correlation Dot product Normalized product Gaussian dot Healthy Train success (%) Test success (%) Chipped tooth Train Test success success (%) (%) Worn teeth Train success (%) Test success (%) 100 100 100 99.33 100 100 100 100 100 98.00 100 97.33 100 100 100 98.00 100 94.66 Table 2. Classification performance of Linear-SVM with first three IMFs. Objective Function Local Correlation Dot product Normalized product Gaussian dot Healthy Train success (%) Test success (%) Chipped tooth Train Test success success (%) (%) Worn teeth Train success (%) Test success (%) 100 100 100 99.33 100 99.33 100 100 100 98.66 100 99.33 100 100 100 92.00 100 93.33 Table 3. Classification performance of Linear-SVM with first four IMFs. Objective Function Local Correlation Dot product Normalized product Gaussian dot Healthy Train success (%) 100 Test success (%) 100 Chipped tooth Train Test success success (%) (%) 100 98.66 Worn teeth Train success (%) 100 Test success (%) 98.66 100 100 100 100 100 100 100 100 98.00 94.00 99.33 95.33 7.2. Lemmer's Data In this case study, the machine under investigation is a pump that is driven by an electromotor. The speed of incoming shaft is reduced by two decelerating gear-combinations. Measurements were repeated for two identical machines; the first pump had severe gear damage (pitting), whereas the second pump was fault free [20]. Seven uni-directional accelerometers were used to measure the vibration near different structural elements of the machine (shaft, gears and bearings) [20]. The pinion teeth number was 13 and the driving shaft speed was 997 RPM, which results in a GMF of 13  997 60  216Hz . The first three channels correspond to three different measurement directions at the position near the incoming axis. Sensors 4 to 7 were mounted on the gearbox casing. Sensors 4 and 5 were mounted near the first set of deceleration gears (sensor 4 on the upper part and sensor 5 on the lower part of the casing). Sensors 6 and 7 were mounted near the second set of gears (sensor 6 on the upper part and sensor 7 on the lower part of the casing, near the outgoing shaft). Simultaneously, an oil pump was running at a speed of 1430 RPM. The pump vane consists of 7 blades. The data was measured for 6.08 second, low-pass filtered (analog) to 5kHz and oversampled at 12.8kHz. This gives a data length of 6.08 12800  77824 [20]. In this paper, the analyses have been done with sensors 1 and 4 under maximal load and no load conditions. The signals have been split to 100 segments to provide 100 feature sets for each gear condition; 40% and 60% of them were used for training and testing, respectively. The remaining details are similar as section 7.1. Distribution of CWT coefficients and selected scales for the first signal segment under maximal load is shown in Fig. 14, and for an example, selected scales for first three IMFs by local Gaussian correlation are shown in Fig. 15. The final level distributions contain 42 scale levels corresponding to scales 1 through 42, shown in Fig.15 for sensor 4. Figure 14. Distribution of CWT coefficients and selected scales for the first signal segments with maximal load (sensor 4). Figure 15. Selected scales by local Gaussian correlation for the first signal segments with maximal load (sensor 4). Figure 16. Mean of distribution of scale levels of all signal segments for sensor 4. The classification performance for full and no load conditions is shown in Tables 4 and 5. As shown in these tables, by using EMD, classification performance has been increased under maximal load and no-load conditions in case of local Gaussian correlation function. The exception is on Table 5 in case of normalized dot product. It is clear from results that normalized dot product has excellent ability in feature extraction and local Gaussian correlation does not have good performance in this case. To justify the result it may be said that local Gaussian correlation and dot product focus more on the magnitude of wavelet coefficients comparing to normalized dot product and in some cases similarity between signal and wavelet coefficients maybe dominate on the magnitude of wavelet coefficients. So in these conditions, normalized dot product has better ability on feature extraction than the two other functions. With this explanation, the results of Table 4 and 5 in case of signal, the similarity of signal, and wavelet coefficient is more important than the magnitude of wavelet coefficients, this condition doesn't appear on case of decomposed signal in EMD, and local Gaussian correlation again is dominant in feature extraction. Table 4. Classification performance of Linear-SVM (full load) Objective Function Local Gaussian Correlation Dot product Normalized dot product Local Gaussian Correlation Dot product Normalized dot product Sensor Channel First three IMF Train Test success success (%) (%) Signal Train success (%) Test success (%) 1 100 100 100 100 1 100 100 100 100 1 100 100 100 100 4 100 100 100 97.50 4 100 99.16 100 99.16 4 100 100 100 100 Table 5. Classification performance of Linear-SVM (no load) Objective Function Local Gaussian Correlation Dot product Normalized dot product Local Gaussian Correlation Dot product Normalized dot product Sensor Channel First three IMF Train Test success success (%) (%) Signal Train success (%) Test success (%) 1 100 100 100 100 1 100 100 100 98.33 1 100 100 100 100 4 100 99.16 100 96.66 4 100 99.16 100 99.16 4 100 98.33 100 100 8. Conclusions In this paper, a new method of feature extraction for fault diagnosis has been presented. The method uses Gaussian correlation function in a time frame to determine appropriate scales. Gaussian correlation function can treat to non-zero mean signal in each time frame by conversion of a signal into zero-mean signal in each time frame. EMD is also presented to tackle multi-component signals in real applications. To evaluate the efficiency of the presented method in fault diagnosis of practical applications, the vibration signals, which have been acquired from two gearboxes, are used in this paper. The obtained results indicate that, the feature extraction based on local Gaussian correlation function of wavelet coefficients and inspected signal has excellent ability to extract features and extracted features are almost linearly separable. In this study, generally local Gaussian correlation has the better performance in feature extraction; also normalized dot product has the best performance in one of the data sets without considering the IMFs. It's been said local Gaussian correlation and dot product are focused more on the magnitude of wavelet coefficients than similarity of wavelet coefficients and inspected signal comparing to normalized dot product and in signal without EMD, normalized dot product may have better performance as seen in one case. Instead of using evolutionary optimization algorithms (such as GA, PSO), non-adaptive Morlet wavelet and discrete scales has been used in this study. It has been shown that Morlet wavelet has excellent ability to be used in exact wavelet analysis as a non-adaptive wavelet, which sped up the algorithm but did not affect extracted features. The effects of EMD generally can improve classification performance in different applications, in some cases because of the mentioned combining features may degrade classification performance and need to be more investigated. In sense of computation time, the authors' suggestion is to prevent EMD with this procedure because the number of IMFs in processing has direct relation to computation time. In case of EMD usage, finding a procedure to consider a contribution factor for each IMF can be the subject of future investigations to enhance extracted features. Acknowledgements The Lemmer's data sets were acquired in the Delft "Machine diagnostics by neural networks"-project with help from TechnoFysica b.v., The Netherlands. The authors thank Dr. Alexander Ypma in Delft University of Technology for making the data set available for us. The authors also thank Mr. Mohammad Sarikhani, educational instructor in Amirkabir University of Technology (Vibration and Dynamics of Machine Lab.) for his valuable consultations. References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] L.B. Jack, A.K. Nandi, Fault detection using support vector machines and artificial neural networks, augmented by genetic algorithms, Mechanical Systems and Signal Processing, 16 (2002) 373–390. B. Samanta, Gear fault detection using artificial neural networks and support vector machines with genetic algorithms, Mechanical Systems and Signal Processing, 18 (2004). 625–644. H. Minamihara, M. Nishimura, Y. Takakuwa, M. Ohta, A method of detection of the correlation function and frequency power spectrum for random noise or vibration with amplitude limitation, Journal of Sound Vibration, 141 (1990) 425–434. P.W. Tse, W. Yang, H.Y. Tam, Machine fault diagnosis through an effective exact wavelet analysis, Journal of Sound and Vibration, 277 (2004) 1005–1024. D. Boulahbal, M.F. Golnaraghi, F. Ismail, Amplitude and phase wavelet maps for the detection of cracks in geared systems, Mechanical Systems and Signal Processing (UK), 13 (1999) 423–436. N. Saravanan, V. Kumar Siddabattuni, K. Ramachandran, A comparative study on classification of features by SVM and PSVM extracted using Morlet wavelet for fault diagnosis of spur bevel gear box, Expert Systems with Applications, 35 (2008) 13511366. Z. Du, X. Jin, L. Wu, Fault detection and diagnosis based on improved PCA with JAA method in VAV systems, Building and Environment, 42 (2007) 3221–3232. A. Widodo, B. Yang, T. Han, Combination of independent component analysis and support vector machines for intelligent faults diagnosis of induction motors, Expert Systems with Applications, 32 (2007) 299-312. M.J. Zuo, J. Lin, X. Fan, Feature separation using ICA for a one-dimensional time series and its application in fault detection, Journal of Sound and Vibration, 287 (2005) 614–624. A. Ypma, P. Pajunen, Rotating machine vibration analysis with second-order independent component analysis, In proceedings of the first international workshop on independent component analysis and signal separation, Ica'99, (1999) 37-42. C. Scheffer, P.S. Heyns, Wear monitoring in turning operations using vibration and strain measurements, Mechanical Systems and Signal Processing, 15 (2001) 1185– 1202. J. Lin and M.J. Zuo, Gearbox fault diagnosis using adaptive wavelet filter, Mechanical Systems and Signal Processing, 17 (2003) 1259–1269. B.T. Holm-Hansen, R.X. Mem, L. Zhang, Customized wavelet for bearing defect detection, Journal of Dynamic Systems, Measurement, and Control, 126 (2004) 740745. V. Vapnik, The Nature of Statistical Learning Theory, Springer, New York, 1995. [15] S.R. Gunn, Support vector machines for classification and regression, ISIS technical report, 14 (1998). [16] N.E. Huang, Z. Shen, S.R. Long, M.C. Wu, H.H. Shih, Q. Zheng, N.C. Yen, C.C. Tung, H.H. Liu, The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis, Proceedings: Mathematical, Physical and Engineering Sciences, 454 (1998). 903–995. [17] N.E. Huang, S.S. Shen, Hilbert-Huang transform and its applications, World Scientific Pub Co Inc, Singapore, 2005. [18] P. Goupillaud, A. Grossmann, J. Morlet, Cycle-octave and related transforms in seismic signal analysis, Geoexploration, 23 (1984) 85–102. [19] C.J. Burges, A tutorial on support vector machines for pattern recognition, Data mining and knowledge discovery, 2 (1998) 121–167. [20] A. Ypma, Learning methods for machine vibration analysis and health monitoring, Doctor Thesis. ISBN:90–9015310, 2001.
5cs.CE
Experiments with a Convex Polyhedral Analysis Tool for Logic Programs arXiv:0712.2737v1 [cs.PL] 17 Dec 2007 Kim S. Henriksen, Gourinath Banda, and John P. Gallagher Computer Science, Building 42.2, P.O. Box 260, Roskilde University, DK-4000 Denmark Email: {kimsh,gnbanda,jpg}@ruc.dk Abstract. Convex polyhedral abstractions of logic programs have been found very useful in deriving numeric relationships between program arguments in order to prove program properties and in other areas such as termination and complexity analysis. We present a tool for constructing polyhedral analyses of (constraint) logic programs. The aim of the tool is to make available, with a convenient interface, state-of-the-art techniques for polyhedral analysis such as delayed widening, narrowing, “widening up-to”, and enhanced automatic selection of widening points. The tool is accessible on the web, permits user programs to be uploaded and analysed, and is integrated with related program transformations such as size abstractions and query-answer transformation. We then report some experiments using the tool, showing how it can be conveniently used to analyse transition systems arising from models of embedded systems, and an emulator for a PIC microcontroller which is used for example in wearable computing systems. We discuss issues including scalability, tradeoffs of precision and computation time, and other program transformations that can enhance the results of analysis. 1 Introduction Convex polyhedron analysis was first described by Cousot and Halbwachs [22]. It is an application of abstract interpretation where the program to be analysed is interpreted over the abstract domain of convex polyhedra. In logic programs, predicates whose variables range over numbers define numeric relations. Each n-ary numeric predicate is approximated by an n-dimensional polyhedron describing linear relationships between its arguments. For programs whose variables do not range over numbers, some abstraction such as a size norm is applied before computing a polyhedron approximation. In (constraint) logic programming (CLP), convex polyhedron analysis has been used as part of termination analysers [26], for time-complexity analysis and argument-size analysis [8, 9]. Our interest lies both in the above application areas and also in analysing programs that model transition systems and operational semantics of various kinds, in order to discover invariant relations among state variables, or to check whether certain numeric relationships ever occur in reachable states. We discuss such applications later in the paper. The use of polyhedra for analysis of hardware and software has of course been investigated by others (e.g. [24, 12, 6]); our approach is to define mappings from such systems to CLP models, hence transforming the problem to a CLP analysis problem and allowing a single tool to analyse many formalisms. In this paper we report on a tool, whose aim is to assist in exploring the effectiveness of convex polyhedron analysis. The convex polyhedron domain is an example of an infiniteheight abstract domain, and such domains require some method of ensuring termination of the analysis. Typically widening is used for this purpose. Widening introduces a trade-off between precision of the approximation and efficiency of the analyser. Different methods for improving the precision of widening for the convex polyhedral domain have been suggested [23, 8, 24, 28]. The tool allows various options to be selected easily, and the results displayed. The tool also incorporates size abstractions and permits both goalindependent and goal-dependent analysis, the latter via query-answer transformation. Since the tool is intended as an aid to experimentation, a verbose option allows a trace of the analysis to be viewed; this is especially useful in understanding where information is lost due to widening and the convex hull operation. Outline of the Paper. Section 2 will describe the convex polyhedron domain and operations required for an analyser for this abstract domain. Section 3 describes the abstract domain of convex polyhedra for CLP programs. Section 4 describes the implementation details of our convex polyhedron analyser and a web interface for the analyser. Section 5 contains experimental results for the analyser. 2 Convex Polyhedra Polyhedra are geometric representations of linear systems of equalities and inequalities. A convex polyhedron is a region of an n-dimensional space that is bounded by a finite set of hyperplanes. For not necessarily closed (NNC) convex polyhedra strict inequalities are allowed in the representation of the polyhedron. Certain constraint systems cannot easily be described using only closed convex polyhedra. Accurate descriptions would require the use of open inequalities. The set P ⊆ Rn is a not necessarily closed polyhedron (NNC polyhedron) if either - it is the intersection of a finite family of open or closed linear halfspaces of the form {x|ax ≥ c} or {x|ax > c} where Rn is the n-dimensional vector space on real numbers, a ∈ Rn is a non-zero row vector and c ∈ R is a scalar constant and x = hx1 , . . . , xn i - n = 0 and P = ∅ The set of all NNC polyhedra on the vector space Rn is denoted Pn . Each polyhedron is the set of solutions to a constraint system. def P = {x ∈ Rn |A1 x = b1 , A2 x ≥ b2 , A3 x > b3 }, where ∀i ∈ {1, 2, 3}, Ai ∈ Rmi × Rn and bi ∈ Rmi and m1 , m2 , m3 ∈ N are the numbers of equalities, inequalities and strict inequalities respectively. We use C to denote the constraint representation of the polyhedron P: P = con(C) 2.1 Operations on polyhedra For a convex polyhedron analysis of a program a few operations on polyhedra are required. Intersection The intersection of two polyhedra P1 , P2 ∈ Pn is denoted P1 ∩ P2 , and it is the largest NNC polyhedron that is included in both P1 and P2 . Convex Hull The convex polyhedral hull of two polyhedra P1 , P2 ∈ Pn is denoted P1 ⊎P2 , and it is the smallest NNC convex polyhedron that contains both P1 and P2 . The convex hull is an upper approximation of union, since convex polyhedra generally are not closed under union. Emptiness Given a set of constraints the polyhedral representation of this set may be empty if the constraints are not satisfiable. Checking satisfiability of a set of linear constraints is decidable. Inclusion The convex polyhedron analysis proceeds as a fix point computation. Some mechanism of establishing when convergence is reached is needed. This can be achieved by checking inclusion between two polyhedra. E.g. for all P1 , P2 ∈ Pn , P1 = con(C1 ) entails P2 = con(C2 ) iff C1 ⊆ C2 . This is also decidable. Projection The projection operation returns the most precise polyhedron which does not depend on a given dimension. Given an n-dimensional polyhedron P, the projection P ′ = proj(P, j), will return the most precise polyhedron, P ′ , of dimensions n − 1 that is entailed by P excluding its constraints on dimension j. 3 Convex Polyhedral Domain for Abstract Interpretation This section describes how convex polyhedra can serve as an abstract domain for abstract interpretation of logic programs. 3.1 Partial Ordering on Polyhedra Polyhedra can be ordered in a partially ordered set where inclusion can d be used as the ordering (hPn , ⊆i). We can add intersection as the greatest lower bound ( ), the convex F polyhedral hull as the least upper bound ( ) and Rn as top element and ∅ as the bottom element; thus we have a lattice hPn , ⊆, ∩, ⊎, ∅, Rn i. This property makes convex polyhedra a suitable domain for program analysis - in particular for abstract interpretation. The lattice is not a complete lattice but completeness is not required for abstract interpretation to be applied. The polyhedron will provide an abstraction of each program point in the program, where the definition of a program point would depend on both the programming language and the program analysis. For a logic program the program points would be the predicates in that program. The abstract domain is the set of mappings (P red 7→ P) where an n-ary predicate p ∈ P red is mapped to an n-dimensional polyhedron P ∈ Pn . Inclusion is used as the ordering over the mappings. For instance, for the mappings m1 and m2 the ordering is m1 ⊑ m2 ≡ ∀p ∈ P red, m1 (p) ⊆ m2 (p) We can also represent such a mapping as a set of constrained atoms p(x1 , . . . , xn ) ← c(x1 , . . . , xn ) where P = con(c(x1 , . . . , xn )) for some n-dimensional polyhedron P For a finite set of predicates {p1 , . . . , pk } we can represent the mappings as a tuple of polyhedra hP1 , . . . , Pk i. The concretisation function of the mapping m would be defined as γ(m) = {p(t1 , . . . , tn )|ht1 , . . . , tn i ∈ m(p)} The abstract domain for a program would typically be a tuple of polyhedra, one element for each program point. The lattice structure is an extension of the one defined above, for example hP1 , P2 , . . . , Pk i ⊑ hQ1 , Q2 , . . . , Qk i iff P1 ⊆ Q1 ∧ P2 ⊆ Q2 ∧ . . . ∧ Pk ⊆ Qk . 3.2 Widening for Convex Polyhedra In the domain of convex polyhedra infinite ascending chains can occur, hence the ascending chain condition is not satisfied. For program analysis purposes some mechanism for accelerating the fix point computations to convergence may be required to ensure termination. The most used mechanism for this is widening [21]. Widening in the convex polyhedra domain was defined by Cousot and Halbwachs [22] and refined in Halbwach’s PhD thesis. This widening operator is generally referred to as the standard widening and few attempts have been made to improve the operator itself. Recently Bagnara et al. [3] suggested a framework for constructing improved widening operators for the convex polyhedral domain. Where the standard widening operator is restricted to only looking at the constraint representation of a polyhedron, the new operators can be based on both the constraint and the parametric representation. In short, the method allows operators that otherwise do not meet the widening operator criteria to be used, while still ensuring termination. The resulting widening operator is not guaranteed to be more precise than the standard widening but it is never less precise. 3.3 Concrete and Abstract Semantics for CLP This section will describe the semantics of the convex polyhedron analyser. A concrete semantics and an abstract semantics will be defined. The concrete semantics is described similar to the TP semantics [29]. The concrete domain will be over the set of all formulas, Atom ← Con, where Con is a constraint system. The immediate consequence operator is defined as: TPC : 2Atom←Con → 2Atom←Con TPC (I) =              A ← B1 , . . . , Bn ∈ P {hB1 ←VC1 i, . . . , hBn ← Cn i} ∈ I ′ A ← C C = i=1,...,nCi M C [[P ]] = lfp(TPC ) C ′ 6≡ f alse, C = project (C ′ , Var (A))              It is assumed that all built-in constraint predicates are in I (e.g. X < Y :- X < Y ∈ I). We also assume some adequate satisfiability and projection algorithm for constraints appearing in the program exists. The set of constrained atoms {hB1 ← C1 i, . . . , hBn ← Cn i} is renamed apart. The domain of the interpretation is the powerset of the set of facts of the form p(X1 , ..., Xn ) ← C, where p is a predicate in P and C is a set of constraints over X1 , ..., Xn . The abstract semantics is defined next. Let TPC be the concrete semantics function, then the abstract semantics of the program P is the fix point defined as TPP : 2Atom←Con → 2Atom←Con TPP (I) = I ⊎ TPC (I) M P [[P ]] = fp(TPP ) where the convex hull operator is extended to operate on constrained atoms. Clause heads are standardised so variables in the heads are renamed consistently and for example constants occurring in heads are replaced with a variable and this variable and and its constraint is added to the clause body. The domain of the abstract semantics is the powerset of the set of facts of the form p(X1 , ..., Xn ) ← P n , where p is a predicate in P and P n is a NNC convex polyhedron. 3.4 Precision Improvements Applying widening in convex polyhedral domain introduces a loss of precision. Different strategies have been suggested for minimising the loss of precision. Narrowing for Convex Polyhedra Narrowing in the convex polyhedra domain has so far been unexplored [3]. It has previously been suggested that narrowing for the convex polyhedral domain could produce more precision [8], but no implementation of narrowing has been proposed or experimented with. Strictly speaking a narrowing operator must ensure eventual stabilisation according to the second requirement of its definition: An operator ∆ : L × L → L is a narrowing operator if and only if - ∀l1 , l2 ∈ L : l1 ⊑ l2 ⇒ l1 ⊑ (l2 ∆l1 ) ⊑ l2 - for all descending chains (ln )n the sequence (ln∆ )n eventually stabilises Quoting Cousot and Cousot in [21]: A simple narrowing is obtained by limiting the length of the decreasing iteration sequence to some k ≥ 1 (experience shows that k > 1 often brings no significant improvement). This would indicate that it might be sufficient to look at the first requirement for a narrowing operator, and settle for a relatively low number of iterations, ignoring the convergence requirement. As also suggested in [8] we propose the use of the greatest lower bound (glb) as a simple narrowing operator. For polyhedra the glb is the intersection operation. The use of the intersection operator is safe, in the sense that it yields a safe approximation of the least fix point but it does not guarantee convergence. The glb operator, in this case intersection, is applied at each program point, p, to the polyhedron derived from the widened fix point computations, Pp∇ , and the polyhedron derived from applying the semantic transfer function f to the program point p. If narrowing results in a more precise approximation for some program point p, then the narrowing procedure must be reiterated to ensure that the most precise approximation is used for narrowing of those program points that depends on p: Pp∆ = Pp∇ ⊓ f (Pp∇ ) if Pp∆ = ∅ Pp∆ = Pp∇ ⊓ f (Pp∆ ) otherwise Delayed Widening This technique is quite simple. The application of the widening operator is delayed for a number of iterations. This will allow the analyser to build a set of more explicit constraints to widen on [23] and produce more precise analysis results as shown in [8]. Widening with thresholds/widening up-to This technique was described for the interval domain in [13] and the convex polyhedral domain in [24]. In the interval domain variables in a program are abstracted by a tuple [a, b] where a ≤ b indicating a lower and upper bound on the values that the abstracted variables can have during execution of the program. The need for this arose from the fact that narrowing for the interval domain would not recover bounds on loop variables if the exit condition for the loop contained disequalities A finite set of threshold values, T , including −∞ and +∞ are used to find better approximations of lower or upper bounds, than simply −∞ and +∞. Widening with thresholds for the interval domain is defined as ( a if a′ ≥ a max{l ∈ T |l ≤ a′ } otherwise ( b if b′ ≤ b and bh = min{h ∈ T |h ≥ b′ } otherwise [a, b] ∇T [a′ , b′ ] = [al , bh ] where al = The set of thresholds may be derived from the analysed program itself [24] or otherwise specified by the user. We will implement this in the convex polyhedron analyser for constraint logic programs described later. We suggest initially to derive the set of widening-up-to constraints, which we will call the bounding convex polyhedron, from the analysed program itself. For constraint logic programs, this set can easily be obtained for each predicate in the program, by taking the convex hull of the polyhedra derived from intersecting the constraints on the built-in arithmetic predicates occurring in each clause body. Definition 1 (Clause constraints). The set of clause constraints for a program P is defined as:   A ← B  1 , . . . , Bn ∈ P  T i ∈ {1, . . . , n} C(P ) = A←C Blin C=   Blin = linearise(Bi ) where linearise(B) returns the linear approximation of an atom B if B is an built-in arithmetic predicate, else the atom B will be unconstrained. Non-linear built-ins, for example the bit wise or-operator can be given a linear approximation; in this case the expression X is Y \/ Z can be approximated by the constraint X ≤ Y + Z. These approximations may not be exact and e.g. the or-operator may not occur frequently in CLP programs but it broadens the set of programs the analyser can handle. Definition 2 (Bounding convex polyhedron). The bounding convex polyhedra for a program P is defined as:   p ∈ ΠUP ˆ PP∇ = p ← P P = p ← C ∈ C(P ) As long as this set of “widen-up-to” constraints remains static each time the widening up-to operator is applied, convergence is assured. Selecting Widening Points Another way of minimising the loss of precision introduced by widening is to find a good set of widening points, W , as small as possible. When W is chosen such that every loop in the dependency graph contains at least one element also in W , then any chaotic iteration strategy [20, 18] over the system of semantic equations will terminate with a safe approximation of lfp(f ) [14]. Bourdoncle [14] and Cousot [19] suggested methods for selecting the set of widening points. Both suggested a method based on detecting feedback edges in the dependency graph [2]. The predicate call graph of typical logic programs would contain many small strongly connected components, typically arising from predicates with direct recusion. For imperative programs and in particular programs allowing goto-statements, the dependency graph would contain few large strongly connected components. Applying the feedback edge detection to such programs may result in a set of widening points much larger than the optimal set. We have implemented a simple cut-loop algorithm that for some dependency graphs will lead to a smaller set of widening points than the feedback edge detection. Input: Dependency graph G = (N, E) Output: Wideningpoints W ⊆ N Begin loops = ∅ for n ∈ N traverse(n, [ ]ancestors ) W =∅ while loops 6= ∅ for n ∈ N loopCount[n] = |{l|l ∈ loops, n ∈ l}| candidates = {n ∈ N |loopCount[n] = maxj∈N (loopCount[j])} select wp ∈ candidates loops = loops \ {l ∈ loops|wp ∈ l} W = W ∪ {wp} End (algorithm continues on the next page) traverse(n, nancestors) { if visited(n,G) then if n ∈ nancestors then loop = path from n ∈ nancestors to head of nancestors loops = loops ∪ loop endif else markVisited(n, G) for ns ∈ Succ(n, G) traverse(ns, [n|nancestors ]) endif } 1 2 6 3 5 7 4 Fig. 1. Directed Graph with multiple entry nodes, e.g. {6, 7}. The algorithm traverses the graph and records the loops found. The first widening point selected is the node that is part of the highest number of loops. The set of loops that includes this widening point is then eliminated. This procedure continues until all loops have been eliminated. Figure 1 shows a graph with a strongly connected component having nodes that are part of more than one loop, these being the nodes 1, 2 and 4. Additionally the graph has more than one entry node e.g. {6, 7}. Applying the feedback edge detection to this graph would result in the set of widening points being either {3, 5} or {4, 5} depending on which entry node is chosen first. The cut-loop algorithm would choose only node 1 as widening point for any node selected as the entry node. 4 Description of the Analysis Tool In this section we describe the analysis tool and the main features of its implementation. The polyhedral analysis algorithm itself, specified as the least fix point of the TPC operator in Section 3.3 is implemented in Ciao Prolog [15]. The initial implementation was based on a method for constructing bottom-up evaluator for logic programs, developed by Codish and Søndergaard [16, 17]. The naive bottom up interpreter is a small Prolog program, closely implementing the TP semantics. In each iteration, clause heads whose body can be proven from existing facts are asserted as new facts themselves. The program is evaluated iteratively until a fix point is reached. A fix point is reached, when no new heads can be asserted on some iteration. For the convex polyhedron analyser the naive bottom up interpreter is modified so each fact is associated with a polyhedron. Thus the predicate “facts” have two arguments, an atom of the form p(X1 , . . . , Xn ) and a set of constraints C over (some of) the variables X1 , . . . , Xn . In addition we modified the naive fixpoint iteration to incorporate the wellknown semi-naive optimisation and decomposition of the single fixpoint computation into a sequence of fixpoints for the strongly connected components of the predicate dependency graph. 4.1 The Parma Polyhedra Library For handling the polyhedra, we use the Parma Polyhedra Library (PPL) (version 0.9), a programming library targeted especially at analysis and verification [7, 5]. The PPL was chosen since it implements the operations needed for a convex polyhedron analyser and it has interfaces for a variety of programming languages including Ciao Prolog [15]. It is also portable, free, well documented and well engineered. In addition it supports operations on not necessarily closed polyhedra [4, 7]. Development began in 2001 and the library is under further development. Other libraries for manipulating polyhedra exist, such as the NewPolka library1 and PolyLib2 . The PPL interface to Ciao Prolog provides “handles” to polyhedra, which are constants within Prolog code. When passed as arguments to PPL functions they become keys giving access to specific polyhedra. The predicate facts described above thus have PPL handles as their second arguments instead of sets of constraints. During the analysis the Prolog code does not manipulate constraints directly at all, apart from those appearing directly in the code of the program to be analysed. Web interface The web interface has the following main functions. – Browsing and uploading of program from the user’s machine. Some prepared examples can also be selected. – Abstraction of the uploaded program using size-norms (currently term-size and listlength norms are available). – Selection of options for widening, delayed widening, narrowing (number of narrowing iterations), and widening up-to (two variants). – Optional provision of widening points. – Selection of output information, including a trace of the successive operations during the fixpoint computation and narrowing phase, timing information and constraint counts (a rough measure of precision). – Query-answer transformation of the uploaded program. This allows for analysis with respect to a supplied goal. The interface is implemented in PHP and calls the analyser using the script facility of Ciao Prolog, allowing a program to be executed from a command line. A screenshot of the web interface is shown in Figure 2. The web interface is available at http://wagner.ruc.dk/CHA/ 1 2 http://pop-art.inrialpes.fr/people/bjeannet/newpolka/index.html http://icps.u-strasbg.fr/PolyLib/ Fig. 2. Screenshot of web interface 5 Experiments We describe some ongoing work in analysing CLP models of embedded systems and of a small microcontroller. 5.1 Experiments with Embedded System Designs We have experimented with the CHA tool in analysing embedded systems that are (i) formally specified as Linear Hybrid Automata (LHA) [1] or (ii) programmed in SIGNAL [11]. LHA is a formal specification language while SIGNAL is a programming language for reactive systems. Both these languages are extensively used in the embedded systems domain, where the systems are reactive and state transition systems. In ongoing work, systematic semantic mappings are defined for each of these languages to transform the systems in these languages into CLP programs, which are analysed by the CHA tool to extract the linear invariants on the system variables. (Note that the CLP programs here are not necessarily intended to be executed, though they could be used to simulate behaviour in some cases.) We sketch in this section a water-level controller specified by an LHA model, taken from [24], and a similar example of a tub-controller specified by a SIGNAL program [12]. We also proved properties of an LHA model of the Fischer mutual exclusion protocol, also taken from [24]. Rather than developing a customized solution algorithm and tool for each formalism, our approach provides one single tool which could be employed for extracting linear invariants from any formal specification of a state transition system. Further, much of mathematics concerned with fixed-point equations is handled in a uniform way within the model semantics of CLP; all the user needs to provide is a CLP equivalent of the system to be analysed. Of course, a correct translation of each formalism to CLP has to be performed, but we believe that this is generally a simpler task than writing a new analyser for each formalism. Fig. 3. A Water-level Monitor LHA. Informally an LHA is a state transition system, with locations and transitions. In locations the variables vary following a linear law respecting an imposed linear invariant on such variables, while transitions are triggered by the linear guards. The LHA model (quoted from [24]) for the water-level-controller is depicted in Figure 3. Boxes represent locations while arrows represent transitions. Each box (location) may contain one or more linear conditions over the variables, and constant varying rates of these variables with respect to time. The linear conditions are the invariants imposed on the corresponding locations. Such a system translates to the following semantically equivalent CLP program. l0(W1,X1) l1(W1,X1) l2(W1,X1) l3(W1,X1) l0(W1,X1) :::::- W1=1. l0(W,_), l1(W,X), l2(W,X), l3(W,X), W=10, W1=W, X1=0. X=2, W1=W, X1=X. W=5, W1=W, X1=0. X=2, W1=W, X1=X. l0(W1,X1) l1(W1,X1) l2(W1,X1) l3(W1,X1) ::::- l0(W,X), l1(W,X), l2(W,X), l3(W,X), W1=W+1, W1=W+1, W1=W-2, W1=W-2, W1<10, X1=X+1. X1=X+1, X1<2. W1>5, X1=X+1. X1=X+1, X1<2. Though the above CLP program specifies the system behaviour faithfully, one can only observe the state variables at discrete time points as we model time growing with a granularity of 1 time unit. Therefore our analysis is based on this discrete state space. The range of the water level is given by the first argument in the predicates l0 to l3. By adding extra clauses we can easily project out the constraints on this argument. w0(W) :- l0(W,_). w1(W) :- l1(W,_). w2(W) :- l2(W,_). w3(W) :- l3(W,_). Computing the model of the above program with these extra projection clauses, we obtain the bounds on the water level in each state. w0(A) :- -1*A> -10,1*A>=1. w2(A) :- -1*A>= -12,1*A>5. w1(A) :- -1*A> -12,1*A>=10. w3(A) :- -1*A>= -5,1*A>1. These are the same results reported in [24], where the reachable locations are characterized by a fixed point equation on the forward collecting semantics of LHA, and the abstract interpretation is applied to automatically compute the upper approximation of the solution to this fixed point equation. We also succeeded in verifying a property of the Fischer mutual exclusion protocol, also taken from [24]. In this case, the task is to show under which conditions a critical section could be entered by more than one process simultaneously. Space does not permit the detailed description of the system and its translation to CLP (please refer to the cited paper). The generated constraints on the illegal state l5 were the following (again, identical to the constraint derived in [24]). l5(A,B,C,D) :- 11*A+ -10*B+10*C+ -11*D>=0,11*A+ -10*B>=0,1*A+ -1*D>=0,10*C+ -9*D>=0,1*D>=0,-9*A+10*B>=0. From this it can be deduced that the state is unreachable if 9*D > 10*C. The unreachability of this state can also be verified in the CHA tool by adding this constraint to the initial state. The empty polyhedron is then obtained as the solution to predicate l5. SIGNAL. SIGNAL [11] is a programming language for reactive systems, which is very popular in implementing mission critical systems. Again the SIGNAL program is systematically translated into a constraint logic program, and is subjected to convex polyhedron analysis by CHA tool. The following is the specification of a tub controller (quoted from [12]) with a tap (faucet) and a pump in SIGNAL. ( level := zlevel + faucet - pump | faucet := zfaucet + ((1 when zlevel <= 4) default (-1 when zfaucet > 0) default 0) | pump := zpump + ((1 when zlevel >= 7) default (-1 when zpump > 0) default 0) | alarm := (0 >= level) or (level >= 9) 5 ) init zlevel = 1; zfaucet = 0; zpump = 0; zalarm = false In the given SIGNAL program, sub-systems level, f aucet, pump and alarm are composed in parallel, where level computes the water-level; f aucet computes the opening position for the faucet; pump computes the pumping rate of water; and alarm raises an alarm when the water-levels exceed the set limits. A CLP translation, modelling the states in the associated transition semantics of SIGNAL, is as follows. tubsystem :tubsystemStates(0,0,1). tubsystemStates(A,B,C) :faucetlogic(C,A,F), pumplogic(C,B,G), levelLogic(C,G,F,H), alarmLogic(H,I), tubsystemStates(F,G,H). tubsystemStates(A,B,C). levelLogic(L,P,T,L1) :- L1 is L+T-P. alarmLogic(L,0) :- L > 0, L < 9. alarmLogic(L,1) :- L =< 0. alarmLogic(L,1) :- L >= 9. faucetlogic(L,T,T1) :- L =< 4, T1 is T+1. faucetlogic(L,T,T1) :- L > 4, T > 0, T1 is T-1. faucetlogic(L,T,0) :- L > 4, T =< 0. pumplogic(L,P,P1) :- L >= 7, P1 is P+1. pumplogic(L,P,P1) :- L < 7, P > 0, P1 is P-1. pumplogic(L,P,0) :- L < 7, P =< 0. Note that in order to analyse the reachable states we need to analyse the calls to the predicate tubsystemStates starting from the initial call tubsystem, which is made possible in the CHA tool by selecting the query answer transformation option. However such an initial attempt to prove the invariants was unsuccessful. The constraints were over general and indicated that the alarm could possibly be activated (which in fact it cannot). Also the attempts to overcome the problem by transforming the above program, creating multiple versions of the predicate tubsystemStates for various cases did not solve the problem. The property that the alarm does not go off can be verified by first specialising the program with respect to the initial goal; the use of specialisation for model checking was described by Leuschel et al. [27]. Though the solution in this case is ad hoc, the fact that standard equivalence preserving CLP transformations can be applied to the program provides, we argue, further grounds for believing that CLP modelling and analysis of systems is a flexible and powerful approach. Further work will aim at a more systematic integration of polyhedral analyses and program transformation. 5.2 Experiments with a model of the PIC microcontroller The convex polyhedron analyser has been used to analyse CLP programs derived from specialisation of a CLP based emulator for the PIC microcontroller [25]. These programs are fairly large as Table 1 shows. Each instruction in the PIC program will generate an equivalent predicate in the specialised CLP program. A typical predicate would look as shown: execute 6(A,B,C,D) :E is A+C, F is E>>8, E\==0, F\==0, G is 24\/1, H is D+1, execute 7(E,B,C,H). Each argument of the execute-predicates contains an element of the live machine state at that program point. These elements are accumulator, clock, data registers and stack. The analysis of the program containing the predicate shown above results in the following constraints on the arguments: 1*D>=5,4*B+1*D=45,2*A+ -5*D= -25,1*C=10. Scalability The three test case programs have from 200 to 600 clauses. The predicates of the largest program have on average 18 arguments. For these test results no improved widening techniques were enabled. The tests shows that even larger CLP programs can be analysed in just one minute. Timing results were collected on a machine running Linux equipped with a 1GHz Pentium III processor and 256MB RAM. Program No. Clauses Size (kb) Avg. arity Compass Accelerometer GPS 199 274 631 16 19 94 3.5 3.2 18 Iterations Analysis to fixpoint Time (sec.) 158 6 127 26 209 70 Table 1. Analysis time for specialised CLP programs Precision Analysing larger programs such as the ones shown in Table 1 produces sets of constraints too large to show here. Generally speaking a set containing a higher number of constraints also represent a more precise approximation, so we use the number of constraints as a crude measure of precision. The results shown below therefore only lists the total number of constraints for the whole program. Different combinations of widening techniques have been applied to the same program. The table shows that for the compass program the most precise result is obtained combining all the improved widening techniques. For the accelerometer program narrowing and delayed widening gives no increased precision in combination with widening up-to. Selection of widening points Precision and efficiency of the analysis can also be affected by the choice of widening points; generally, the fewer widening points the better. The specialised PIC programs have a dependency graph similar to that of imperative programs (few large strongly connected components) rather than that of a more typical logic program (many small strongly connected components). Table 3 shows the compass program analysed using both the feedback edge detection of widening points and the cutloop algorithm outlined in Section 3.4. Analysing using the smaller set of widening points can produce more precise results, though for this example no better approximation can be achieved than using all the improved widening techniques. Delayed Simple Widen Program Widening Narrowing up-to (iterations) (iterations) Compass Compass 200 √ Compass Compass 10 Compass 10 200 √ Compass 10 √ Compass 10 200 Accel. Accel. 300 Accel. 10 √ Accel. √ Accel. 10 300 Resulting Constraints (Number of ) 200 209 302 354 357 362 363 420 420 420 426 426 Table 2. Improved Widening Techniques Delay Widen Narrow Widen up-to 200 10 10 10 10 √ √ 200 200 √ Feedback-edge Cut-Loop 22 ∇-points 12 ∇-points 200 200 209 209 295 302 340 354 355 357 357 362 363 363 Table 3. Feedback-edge results compared to Cut-Loop results 5.3 Comparison with existing convex polyhedron analyser A convex hull analyser for CLP programs was reported in [8, 10]3 . This analyser was compared to previous analysers selecting the tricky test cases for comparison. Applying our analyser to the same set of test case programs we obtain equally precise approximations. Compared to the Benoy and King analyser ours has been extended with a few improved widening techniques and program transformation tools. This allows a wider range of programs to be analysed using our tool. For instance the following program can be analysed with respect to the query exp( , 10, ) and with a single narrowing operation applied it provides both an upper and lower bound on the second argument of exp /4. exp(X,Y,Z) :- exp (X,Y,1,Z). exp ( X,0,Ac,Ac). exp (X,Y,Ac,Z) :Y > 0, NewAc is X*Ac, NewY is Y-1, exp (X,NewY,NewAc,Z). 6 Conclusion We have developed a convex polyhedron analyser for constraint logic programs. The analysis tool has been integrated with program transformation techniques including size abstractions and query-answer transformations. The analyser has been extended with some improved widening and narrowing techniques. The tool has been made available online for convenient experimentation. We have applied the analyser to variety of CLP programs, including CLP programs automatically derived from partial evaluation and embedded systems modelled in CLP. This is ongoing work but the tool has demonstrated its worth in providing the means for experimenting with different ways of gaining precision for each case study, and helping with understanding (via the “verbose” output) the reasons for imprecision when this occurs. 6.1 Future Work A few widening strategies aiming at improving the precision of convex polyhedral analysis exist that are not part of our analyser tool. Widening with landmarks [28] shares some common traits with widening with thresholds. Where upper or lower bounds would be lost using standard widening, they can in some cases be recovered using narrowing. The widening with landmarks is a refinement of widening with thresholds, that will produce results precise enough that narrowing would not be needed to recover lost bounds. The look-ahead widening [23] is a recent method. Two polyhedra are used for abstracting each program point; a main and a pilot polyhedron. Widening and subsequent narrowing are only performed on the pilot polyhedron. The program is evaluated with respect to the main polyhedron, and program points that are not reachable under the main polyhedron are ignored. Once the pilot stabilises it is promoted to a main polyhedron and the program 3 This analyser is also available online through the Ecce specialiser [?] http://www.stups.uni-duesseldorf.de/~ asap/asap-online-demo/mecce.php is reevaluated. This technique tries to solve the situations where during a loop a variable may be either increasing or decreasing. Widening in this situation may cause a loss of both upper and lower bounds. Both widening methods could be included in our tool. Automatic program transformations to improve precision are also of great interest in future work. In particular, multiple specialisations of one kind or another can preserve separate polyhedral approximations which would otherwise be merged by the convex hull operation, losing precision. To illustrate this principle, consider McCarthy’s 91-function. mc91(N,X) :- N > 100, X is N - 10. mc91(N,X) :- N =< 100, Y is N + 11, mc91(Y,Y2), mc91(Y2,X). main(X,N) :- X =< 100, mc91(X,N). Here we provide a main call where the argument is at most 100, and the result in this case is 91 (if the input is an integer). The analyser is not able to deduce this, returning only a result that the answer is greater than 90. If we make two versions of the mc91 predicate, one (mc91h) handling arguments greater than 100 and the other (mc91l) handling arguments at most 100, we obtain the following program. mc91l(N,Out):mc91l(N,Out):mc91l(N,Out):mc91l(N,Out):mc91h(N,X) :- N=<100, mc91h(N+11,X), N=<100, mc91h(N+11,X), N=<100, mc91l(N+11,X), N=<100, mc91l(N+11,X), N > 100, X is N - 10. mc91h(X,Out). mc91l(X,Out). mc91h(X,Out). mc91l(X,Out). main(X,Y):- X=<100, mc91l(X,Y). Analysing this program with the query main(X,Y) we obtain the result main ans(A,B) :A =< 100, B > 90, B =< 91. This is the most precise possible result and indeed there is only one integer, namely 91, in the solution for B. (Note that the predicate main ans is generated by the query-answer transformation). Such transformations need to be studied more thoroughly; in this case a simple enumeration of the possible calls to the two versions suffices, but this is a naive approach in general and would cause the program size to blow up. A semantics-based approach based on Winsborough’s multiple specialisation technique [30] would work in some case, though not in the one above. A “bottom-up” version of the multiple specialisation analysis is a possible future investigation. References 1. R. Alur, T. A. Henzinger, and P.-H. Ho. Automatic symbolic verification of embedded systems. In IEEE Real-Time Systems Symposium, pages 2–11, 1993. 2. S. Baase and A. V. Gelder. Computer Algorithms: Introduction to Design and Analysis. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999. 3. R. Bagnara, P. M. Hill, E. Ricci, and E. Zaffanella. Precise Widening Operators for Convex Polyhedra. Science of Computer Programming, 2005. 4. R. Bagnara, P. M. Hill, and E. Zaffanella. A New Encoding and Implementation of Not Necessarily Closed Convex Polyhedra. In M. Leuschel, S. Gruner, and S. L. Presti, editors, Proceedings of the 3rd Workshop on Automated Verification of Critical Systems, AVoCS 2003, volume DSSE-TR-2003-2 of Technical Report, pages 161 – 176. University of Southampton, 2003. 5. R. Bagnara, P. M. Hill, and E. Zaffanella. The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Quaderno 457, Dipartimento di Matematica, Università di Parma, Italy, 2006. Available at http://www.cs.unipr.it/Publications/. 6. R. Bagnara, P. M. Hill, and E. Zaffanella. Applications of polyhedral computations to the analysis and verification of hardware and software systems. Quaderno 458, Dipartimento di Matematica, Università di Parma, Italy, 2007. Available at http://www.cs.unipr.it/ Publications/. 7. R. Bagnara, E. Ricci, E. Zaffanella, and P. M. Hill. Possibly Not Closed Convex Polyhedra and the Parma Polyhedra Library. In SAS ’02: Proceedings of the 9th International Symposium on Static Analysis, pages 213–229, London, UK, 2002. Springer-Verlag. 8. F. Benoy and A. King. Inferring Argument Size Relationships with CLP(R). In J. P. Gallagher, editor, Logic-Based Program Synthesis and Transformation (LOPSTR’96), volume 1207 of Springer-Verlag Lecture Notes in Computer Science, pages 204–223, August 1996. 9. F. Benoy, A. King, and F. Mesnard. Computing Convex Hulls with a Linear Solver. Theory and Practice of Logic Programming, 5:259–271, unknown 2005. 10. P. M. Benoy. Polyhedral Domains for Abstract Interpretation in Logic Programming. PhD thesis, Computing Laboratory, University of Kent, Canterbury, Kent, UK, January 2002. 11. A. Benveniste, P. L. Guernic, and C. Jacquemot. Synchronous programming with events and relations: the signal language and its semantics. Sci. Comput. Program., 16(2):103–149, 1991. 12. F. Besson, T. P. Jensen, and J.-P. Talpin. Polyhedral analysis for synchronous languages. In A. Cortesi and G. Filé, editors, SAS, volume 1694 of Lecture Notes in Computer Science, pages 51–68. Springer, 1999. 13. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. Design and Implementation of a Special-Purpose Static Program Analyzer for Safety-Critical Real-Time Embedded Software, invited chapter. In T. Mogensen, D. Schmidt, and I. Sudborough, editors, The Essence of Computation: Complexity, Analysis, Transformation. Essays Dedicated to Neil D. Jones, LNCS 2566, pages 85–108. Springer-Verlag, Oct. 2002. 14. F. Bourdoncle. Efficient Chaotic Iteration Strategies with Widenings. In Formal Methods in Programming and their Applications, volume 735 of Springer-Verlag Lecture Notes in Computer Science, pages 123–141, 1993. 15. F. Bueno, D. Cabeza, M. Carro, M. Hermenegildo, P. López-Garcı́a, and G. Puebla. The Ciao Prolog system. Reference manual. Technical Report CLIP3/97.1, School of Computer Science, Technical University of Madrid (UPM), August 1997. Available from http://www.clip.dia.fi.upm.es/. 16. M. Codish. Efficient Goal Directed Bottom-Up Evaluation of Logic Programs. Journal of Logic Programming, 38(3):355–370, 1999. 17. M. Codish and H. Søndergaard. Meta-Circular Abstract Interpretation in Prolog. In T. Mogensen, D. Schmidt, and I. H. Sudburough, editors, The Essence of Computation: Complexity, Analysis, Transformation, volume 2566 of Lecture Notes in Computer Science, pages 109–134. Springer-Verlag, 2002. 18. P. Cousot. Asynchronous Iterative Methods for Solving a Fixed Point System of Monotone Equations in a Complete Lattice. Res. rep. R.R. 88, Laboratoire IMAG, Université scientifique et médicale de Grenoble, Grenoble, France, Sep. 1977. 15 p. 19. P. Cousot. Semantic Foundations of Program Analysis. In S. Muchnick and N. Jones, editors, Program Flow Analysis: Theory and Applications, chapter 10, pages 303–342. Prentice-Hall, Englewood Cliffs, New Jersey, 1981. 20. P. Cousot and R. Cousot. Automatic Synthesis of Optimal Invariant Assertions: Mathematical Foundations. In ACM Symposium on Artificial Intelligence & Programming Languages, Rochester, NY, ACM SIGPLAN Not. 12(8):1–12, Aug. 1977. 21. P. Cousot and R. Cousot. Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation. In Proceedings of the 4th International Symposium on Programming Language Implementation and Logic Programming Leuven,Belgium, volume 631 of Springer-Verlag Lecture Notes in Computer Science, pages 269–295, 1992. 22. P. Cousot and N. Halbwachs. Automatic Discovery of Linear Restraints Among Variables of a Program. In Proceedings of the 5th Annual ACM Symposium on Principles of Programming Languages, pages 84–96, 1978. 23. D. Gopan and T. W. Reps. Lookahead Widening. In T. Ball and R. B. Jones, editors, CAV, volume 4144 of Lecture Notes in Computer Science, pages 452–466. Springer, 2006. 24. N. Halbwachs, Y.-E. Proy, and P. Roumanoff. Verification of Real-Time Systems using Linear Relation Analysis. Formal Methods in System Design: An International Journal, 11(2):157– 185, August 1997. 25. K. S. Henriksen and J. P. Gallagher. Abstract Interpretation of PIC Programs through Logic Programming. In SCAM ’06: Proceedings of the Sixth IEEE International Workshop on Source Code Analysis and Manipulation (SCAM’06), pages 184–196, Washington, DC, USA, 2006. IEEE Computer Society. 26. A. King, K. Shen, and F. Benoy. Lower-Bound Time-Complexity Analysis of Logic Programs. In ILPS ’97: Proceedings of the 1997 international symposium on Logic programming, pages 261–275, Cambridge, MA, USA, 1997. MIT Press. 27. M. Leuschel and S. Gruner. Abstract conjunctive partial deduction using regular types and its application to model checking. In A. Pettorossi, editor, LOPSTR, volume 2372 of Lecture Notes in Computer Science, pages 91–110. Springer, 2001. 28. A. Simon and A. King. Widening Polyhedra with Landmarks. In N. Kobayashi, editor, Fourth Asian Symposium on Programming Languages and Systems, volume 4279 of Lecture Notes in Computer Science, pages 166–182. Springer Verlag, November 2006. 29. M. H. van Emden and R. A. Kowalski. The Semantics of Predicate Logic as a Programming Language. J. ACM, 23(4):733–742, 1976. 30. W. H. Winsborough. Multiple specialization using minimal-function graph semantics. J. Log. Program., 13(2&3):259–290, 1992.
6cs.PL
arXiv:1411.6757v9 [cs.NE] 26 Dec 2016 Echo State Condition at the Critical Point1 Norbert Michael Mayer Department of Electrical Engineering and Advanced Institute of Manufacturing with High-tech Innovations (AIM-HI), National Chung Cheng University, Chia-Yi, Taiwan [email protected] December 28, 2016 Recurrent networks with transfer functions that fulfill the Lipschitz continuity with K = 1 may be echo state networks if certain limitations on the recurrent connectivity are applied. It has been shown that it is sufficient if the largest singular value of the recurrent connectivity is smaller than 1. The main achievement of this paper is a proof under which conditions the network is an echo state network even if the largest singular value is one. It turns out that in this critical case the exact shape of the transfer function plays a decisive role in determining whether the network still fulfills the echo state condition. In addition, several examples with one neuron networks are outlined to illustrate effects of critical connectivity. Moreover, within the manuscript a mathematical definition for a critical echo state network is suggested. Keywords: Reservoir computing, uniformly state contracting networks, power law 1 This manuscript has been posted at arxiv.org [1]; final paper has been published at Entropy 2017, 19(1), 3; doi:10.3390/e19010003 2 The author declares that he has no conflict of interest. 1 Abstract Notations in formulas s(M ) S smax λ(M ) |λ|max θ(.) θ0 , θ̇ win W wout ut ū∞ xt yt ot o˜t d(., .) F(.) Fū∞ Fcrit qū∞ ,t qt φ1 () φk () η, κ, γ Λū∞ R→R Rn×k Rk×k Rk×m Rn Rk Rk ||.||2 ∈F vector of singular values of matrix M diagonal matrix of singular values largest singular value of a matrix vector of eigenvalues the maximum of the eigenvalues in modulus transcendental transfer function its derivative input matrix recurrent transfer matrix output matrix input time series complete infinite input time series hidden layer states alternative hidden layer states to check convergence training set trained network output distance measure that is used to check convergence vector of a set of linearly independent, non-linear functions dynamics of the network with regard to the input all dynamics that show power law forgetting time series related to forgetting in ESNs time series variable cover function to estimate contraction in a 1 neuron net dto. for a k neuron network const parameters of both φ1 and φk Lyapunov exponent of a neural network wrt. an input time series ū∞ 2 1 Introduction Classic approaches of recurrent neural networks (RNNs), such as back-propagation through time [2], have been considered difficult to handle. In particular learning in the recurrent layer is slow and problematic due to potential instabilities. About 15 years ago reservoir computing [3] was suggested as an alternative approach for RNNs. Here, it is not necessary to train connectivity in the recurrent layer. Instead, constant, usually random, connectivity weights are used in the recurrent layer. The supervised learning can be done by training the output layer using linear regression. Two types of reservoir computing are well established in the literature. The first is called a liquid state machines (LSMs, [4]), which usually bases on a network of spiking neurons. The second type is called an echo state nework (ESN, [5]), which uses real valued neurons that initially use a sigmoid as a transfer function. Although a random recurrent connectivity pattern can be used, heuristically it has been found that typically the performance of the network depends strongly on the statistical features of this random connectivity (cf. for example [6] for ESNs). Thus, what is a good reservoir with regard to particular stationary input statistics? This has been a fundamental question for research in this field since the invention of reservoir computing. One fundamental idea is that a reservoir can only infer training output from this window of the input history of which traces still can be found inside the reservoir dynamics. However, if the necessary inference from time series in order to learn the training output is far in the past, it may happen that no traces of this input remain inside the reservoir. So, the answer seems to be that a good reservoir is a reservoir from whose states it is possible to reconstruct an input history with a time span that is as long as possible. More precisely, they should be reconstructed in a way that is sufficiently accurate in order to predict the training output. In other words, a good reservoir is a reservoir that has a good memory of the input history. There have been efforts to quantify the quality of the memory of the reservoir. Most common is the ‘memory capacity’ (MC) according to Jaeger’s definition [5]. However, MC has several drawbacks. For example, it is not directly compatible to a Shannon information based measure. Still, it illustrates that ESNs are relatively tightly restricted in the way that the upper limit of the MC is equal to the number of hidden layer neurons. So the capabilities of the network increase with the number of neurons. One more important limiting factor with regard to the reservoir memory is the strength of the recurrent connectivity. According to the echo state condition, the nature of the reservoir requires that the maximum |λ|max of its eigenvalues in modulus is smaller than 1, which is called the echo state property (ESP). This seems always to result in a exponential forgetting of previous states. Thus, forgetting is independent from the input statistics but instead has to be pre-determined and is due to the design of the reservoir dynamics. In order to proceed, there are several important aspects. First, it is necessary to get rid of the intrinsic time scale of forgetting that is induced by |λ|max < 1. More precisely, the remaining activity of inputs to the reservoir that date back earlier than ∆t is a fraction smaller than |λ|∆t max . Networks where the largest eigenvalue is larger than 1 cannot be used as reservoirs anymore, a point which is detailed below. One can try |λ|max = 1 and see if this improves the network performance and how this impacts the memory of the reservoir on earlier events. Steps toward this direction have been made by going near the ”edge of chaos” [6] or even further where the network may not be an echo state network for all possible input sequences but instead just around some permissible inputs [7]. Presumably, these approaches still all forget exponentially fast. 3 Strictly, networks with |λ|max = 1 are not covered by the initial proof of Jaeger for the echo state condition. One important purpose of this paper is to close this gap and to complete Jaeger’s proof in this sense. The other purpose is to motivate the principles of [8] in as simple as possible examples and thus to increase the resulting insight. The intentions of the following sections of the paper are to motivate the concept of critical neural networks and explain how they are related to memory compression. These intentions comprise a relatively large part of the paper because it seems important to argue for the principle value of critical ESNs. Sect. 2 introduces the concept of reservoir computing and also defines important variables for the following sections. An important feature is that Lyapunov coefficients are reviewed in order to suggest a clear definition for critical reservoirs that can be used analytically on candidate reservoirs. Sect. 3 describes how critical one neuron reservoirs can be designed and also introduces the concept of extending to large networks. Sect. 4 explains why the critical ESNs are not covered by Jaeger’s proof. The actual proof for the echo state condition can be found in sect. 5. Certain aspects of the proof have been transferred to the appendix. 2 Motivation The simplest way to train with data in a supervised learning paradigm is to interpolate data (cf. for example [9]). Thus, for a time series of input data ut ∈ Rn that forms an input sequence ū∞ and a corresponding output data ot ∈ Rm one can choose a vector of non-linear, linearly independent functions F(ut ) : Rn → Rk and a transfer matrix wout : Rk → Rm . Then, one can define xt o˜t = F(ut ) = wout xt . wout can be calculated by linear regression, i.e., wout = (AA0 )−1 (AB), (1) where the rectangular matrices A = [x0 , x1 , . . . , xt ] and B = [o0 , o1 , . . . , ot ] are composed from the data of the training set and A0 is the transpose of A. Further, one can use a single transcendental function θ(.) such that xt = F(ut ) = θ(win ut ), (2) where win : Rn → Rk is a matrix in which each line consists of a unique vector and θ(.) is defined in the Matlab fashion; so the function is applied to each entry of the vector separately. Linear independence of the components of F can then be guaranteed if the column vectors of win are linearly independent. Practically, linear independence can be assumed if the entries of win are chosen randomly from a continuous set and k ≥ n. The disadvantage of the pure interpolation method with regard to time series is that the input history, that is ut−1 , ut−2 , . . . u0 , has no impact on training the current output o˜t . Thus, if a relation between previous inputs and current outputs exists, that relation cannot be learned. Different from eq. 1, a reservoir in the sense of reservoir computing [10, 3, 11] can be defined as 4 xt = F(xt−1 , ut ). (3) The recursive update function adds several new aspects to the interpolation that is outlined in eq. 1: 1. The new function turns the interpolation into a dynamical system: xt = F(xt−1 , ut ) = Fū∞ (xt−1 ), 1 (4) where the notation Fū∞ (xt−1 ) is intended to illustrate the character of the particular discrete time, deterministic dynamical system and the fact that each possible time series ū∞ defines a specific set of dynamics. The superset F over all possible ū∞ , F= [ Fū∞ , ū∞ may be called the reservoir dynamics. Thus, F covers all possible dynamics of a particular reservoir with regard to any time series of input vectors in Rn . Note that this way of looking into the dynamics of reservoirs is non-standard. Rather the standard approach is to interpret the reservoir as a non-autonomous dynamical system and then to formalize the system accordingly [7]. For the present work, the turn towards standard dynamical systems has been chosen because here the relevant methodology is well established and the above mentioned formalization appears sufficient for all purposes of this work. 2. It is now possible to account for information from a time series’ past in order to calculate the appropriate output. One important question is if the regression step in the previous section, and thus the interpolation, works at all for the recursive definition in eq. 3. Jaeger showed ([5] pp. 43, [12]) that the regression is applicable, i.e., the echo state property (ESP) is fulfilled, if and only if the network is uniformly state contracting. Uniformly state contraction is defined in the following. ∞ Assume an infinite stimulus sequence ū∞ = {un }n=0 and two random initial internal states of the system x0 and y0 . To both initial states x0 and y0 the sequences ∞ ∞ x̄∞ = {xn }n=0 and ȳ∞ = {yn }n=0 can be respectively assigned. xt = F(xt−1 , ut ) = Fū∞ (xt−1 ) yt = F(yt−1 , ut ) = Fū∞ (yt−1 ) qū∞ ,t = d(xt , yt ), (5) where qū∞ is another series and d(., .) shall be a distance measure using the square norm2 . Then the system F is uniformly state contracting if it is independent from ū∞ and if for any initial state (x0 ,y0 ) and all real values  > 0 there exists a finite τF () < ∞ for which max qū∞ ,t ≤  (6) F 1 For obvious reasons one may call F an input driven system. metric measures may be applicable, though. 2 Other 5 for all t ≥ τF . Another way to look at the echo state condition is that the network F behaves in a time invariant manner, in the way that some finite subsequence in an input time series will roughly result always in the same outcome. In other words x∆t+t0 ≈ y∆t+t0 independent of t0 , xt0 and yt0 and if ∆t is sufficiently large. Lyapunov analysis is a method to analyze predictability versus instability of a dynamical system (see [13]). More precisely, it measures exponential stability. In the context of non-autonomous systems, one may define the Lyapunov exponent as 1 |qū∞ ,t | , (7) lim log Λū∞ = lim |qū∞ ,0 | |qū∞ ,t=0 |→0 t→∞ t Thus, if qū∞ ,t ∝ ∼ exp(bt), then Λū∞ approximates b and thus measures the exponent of exponential decay. For power law decays, the Lyapunov exponent is always zero. 3 In order to define criticality, we use the following definition. Definition. A reservoir that is uniformly state contracting shall be called critical if for at least one input sequence ū∞ there is at least one Lyapunov exponent Λū∞ that is zero. The echo state network (ESN) is an implementation of reservoir dynamics as outlined in eq. 3. Like other reservoir computing approaches, the system is intended to resemble the dynamics of a biologically inspired recurrent neural network. The dynamics can be described for discrete time-steps t, with the following equations: xlin,t xt o˜t = Wxt−1 + win ut (8) = θ (xlin,t ) = wout xt. With regard to the transfer function θ(.), it shall be assumed that it is continuous, differentiable, transcendental and monotonically increasing with the limit 1 ≥ θ0 (.) ≥ 0, which is compatible with the requirement that θ(.) fulfills the Lipschitz continuity with K = 1. Jaeger’s approach uses random matrices for W and win , learning is restricted to the output layer wout . The learning (i.e., training ot ) can be performed by linear regression (cf. eq. 1). The ESN fulfills the echo state condition (i.e., it is uniformly state contracting) if certain restrictions on the connectivity of the recurrent layer apply, for which one can name a necessary condition and a sufficient condition: • C1 A network has echo states only if 1 > |λ|max = max abs(λ(W)), (9) i.e. the absolute value of the biggest eigenvalue of W is below 1. The condition means that a network is not and ESN if 1 < max abs(λ(W)). 3 For example one may try qū∞ ,t = 1 t+1 . 6 • C2 Jaeger named here initially 1 > smax = max s(W), (10) where s is the vector of singular values of the matrix W. However, a closer sufficient condition has been found in [14]. Thus, it is already sufficient to find a full rank matrix D for which 1 > max s(DWD−1 ). (11) [15] found another formulation of the same constraint: The network with internal weight matrix W satisfies the echo state property for any input if W is diagonally Schur stable, i.e., there exists a diagonal P > 0 such that W T P W − P is negative definite. Apart from the requirement that a reservoir has to be uniformly state contracting, the learning process itself is not of interest in the scope of this paper. 3 Critical reservoirs with regard to the input statistics ū∞ Various ideas on what types of reservoirs work better than others have been brought up. One can try to keep the memories of the input history in the network as long as possible. The principle idea is to tune the network’s recurrent connectivity to a level where the convergence for a subset of Fcrit ∈ F with regard to eq. 6 is ∝ ta qū∞ crit ,t ∼ (12) rather than t qū∞ ,t ∝ (13) ∼b, where a < 0 and 0 < b < 1 are system specific values, i.e., they depend on Fū∞ . A network according to eq. 12 is still an ESN since it fullfils the ESP. Still, forgetting of initial states is not bound to a certain time scale. Remnants of information can –under certain circumstances– remain for virtually infinite long times within the network given that not too much unpredictable new input enters the network. Lyapunov analysis of a time series according to eq. 12 would result in zero, and Lyapunov analysis of eq. 13 yields a nonzero result. In ESNs forgetting according to the power law of eq. 12 for an input time series qū∞ is achievable if the following constraints are fulfilled : crit ,t • The recurrent connectivity W, the input connectivity win of the ESN and the transfer function θ(.) have to be arranged in a way that if the ESN is fed with qū∞ one approximates crit ,t lim θ̇(xlin,t) = 1. t→∞ Thus, the aim of the training is θ̇(xlin,t) = 1. (14) Since the ESN has to fulfill the Lipschitz continuity with K = 1, the points where θ̇ = 1 have to be inflection points of the transfer function. In the following these inflection points shall be called epi-critical points (ECPs). 7 Figure 1: Variant possible transfer functions with interesting features regarding criticality. On the left side tanh has only one epi-critical point. Eq. 16 is graphed on the right side. Here, there is an infinite set of epi-critical points nπ + π/2 that are all positioned along the line y = x/2. In both graphs green dots indicate epi-critical points, green curves are smooth interpolations between those points, and the blue line indicates the particular transfer function itself. • The recurrent connectivity of the network is to be designed in a way that the largest absolute eigenvalue and the largest singular value of W both are equal to one. This can be done by using normal matrices for W (see sect. 3.5). 3.1 Transfer functions The standard transfer function that is widely used in ESNs and other types of neural networks is the sigmoid function, i.e., θ(x) = tanh(x). (15) The sigmoid transfer function has one ECP Π0 = 0. As a second possible transfer function, one may consider θ(x) = 0.5x − 0.25 sin(2x). (16) Here, one has a infinite set of ECPs at Πi = (n + 0.5) × π. It is important to have more than one ECP in the transfer functions because for a network with discrete values it appears necessary that each neuron has at least 2 possible states in order to have any inference from the past to the future. In the case of tanh, the only solution of eq. 14 is xlin,t = 0. That type of trained network cannot infer information from the past to the present for the expected input, which significantly restricts its capabilities. One can see that from xt = tanh(xlin,t ) = 0. The next iteration yields xt+1 = tanh(win ut ), 8 Figure 2: Tailored transfer function where the epi-critical points can be organized in an adaptive way and follow a transcendental function (which has certain advantages to the examples depicted in fig. 1, in blue). Green dots indicate epi-critical points, the green curve is a smooth interpolation between those points, and the blue line indicates the particular transfer function itself. Note that the green curve is a tanh and thus a transcendental function. which again, after training would require 0 = win ut . Thus, the network can only anticipate the same input at all time steps. In the case of eq. 16, the maximal derivative θ0 (x) is 1 at x = π(n + 1/2), where n is an integer number (confer fig. 1). Here the main advantage is that there exists an infinite set of epi-critical points. However, all these points are positioned along the linear function y = x/2. This setting still significantly restricts the training of Fcrit . Here one can consider the polynomial with the lowest possible rank (cf. the green line in fig. 1, left side) that interpolates between the epi-critical points (in the following called an epi-critical transfer function). In the case of eq. 16 the epi-critical transfer function is the linear function xt+1 = 0.5Wxt + 0.5win ut. Thus, the effective dynamics of the trained reservoir on the expected input time series is -if this is possible- the dynamics of a linear network. This results in a very restricted set of trainable time series. As an alternative, one could consider also a transcendental function for the interpolation between the points, such as depicted in fig. 2. The true transfer function (blue line in fig. 2) can be constructed in the following way. Around a set of defined epi-critical points Πi , define θ as either θ(x) = tanh(x − Πi ) + tanh(Πi ) or θ(x) = tanh(x). 9 This is one conceptional suggestion for further investigations. The result is a transfer function with the epi-critical points Πi and 0. The epi-critical transfer in this case is a tanh function. 3.2 Examples using a single neuron as a reservoir In this and the following sections, practical examples are brought up where a single neuron represents a reservoir. Single neuron reservoirs have been studied in other researches [16, 17]. Here the intention is to illustrate the principle benefits and other features of critical ESNs. First one can consider a neuron with tanh as a transfer function along with a single input unit xt+1 = tanh(bxt + ut ), (17) where in order to achieve a critical network |b| has to be equal to 1. I.e., the network exactly fulfills the boundary condition. From previous consideration one knows that Fcrit has the dynamics that results from ut = 0 as an input. In this case the only fixed-point of the dynamics is xt = 0, which is also the epi-critical point if |b| = 1. Power law forgetting: Starting from the two initial values x0 = 0 and say y0 = 0.01, one can see that the two networks converge in a power law manner to zero. On the other hand, for a linear network xt+1 = bxt + ut with the same initial conditions the dynamics of the two networks never converge (independently of ut ). Instead, the difference between x0 = 0 and say y0 = 0.01 stays the same forever. Thus, the network behavior in the the case of |b| = 1 depends on the nature of the transfer function. For all other values of b, both transfer functions result qualitatively in the same behavior in dependence on b: either they diverge or they converge exponentially. Since |b| = 1 is also the border between convergence and divergence and thus the border between uniformly state contracting networks and not uniformly state contracting networks, the case of |b| = 1 is a critical point of the dynamical system, in a similar manner as a critical point at the transition from ordered dynamics to instability. In the following it is intended to extend rules for different transfer functions, where different transfer functions result in the critical point in uniformly state contracting networks and where this is not the case. As a final preliminary remark, it has to be emphasized that a network being uniformly state contracting means that the states are contracting for any kind of input ut . It does not mean that for any kind of input the contraction follows a power law. In fact, for all input settings ut 6= 0 the contraction is exponential for the neuron of eq. 17, even in the critical case (|b| = 1). 3.3 Single neuron network example with alternating input and power law forgetting As outlined above, for practical purposes the sigmoid function, i.e., θ = tanh(), is not useful for critical networks because the only critical state occurs when total activity of such a network is null. In that case it is not possible to transfer information about the input history. The reason is illustrated in the following example, where instead of a sigmoid function other types of transfer functions are used. 10 Figure 3: Depicted is the Lyapunov exponent for the example system of eq. 18 for different values of b. At b = 1 the Lyapunov exponent crosses zero. At this point all types of linear analysis fail. The point marks the border between networks that fulfill the ESP and those that do not. So, this point is the called critical point. Further analysis shows that the point itself belongs to the area with ESP. All results from figures 4 and 5 are drawn from the point where the Lyapunov exponent is zero, that is b = 1. So, the one neuron network xt+1 = θ(−bxt + (2 − b)ut ) (18) with a constant b, the transfer function of eq. 16 and the expected alternating input ut = (−1)t π/4 has an attractor state when also xt is alternating with xt = (−1)t π/4 independently from b. Thus, ut = (−1)t π/4 shall be interpreted as the expected input that directs the activity of the network exactly to where θ0 = 1 and thus induces a critical dynamic Fū∞ = Fcrit . It is now interesting to investigate the convergence behavior for different values of b considering differing starting values for internal states xt and yt . Fig. 3 depicts the resulting different Lyapunov exponents for one neuron networks with different values of b. One can see that –not surprisingly– the Lyapunov exponent for b = 1 is zero. This is the critical point that marks the transition from order to instability in the system and at the same time the transition from ESP to non-ESP. In the following the same network at b = 1 is investigated. Some unexpected input, i.e., ut 6= (−1)t π/4, lets the network jump out of the attractor. If the input afterwards continues as expected, the network slowly returns to the attractor state in a power law fashion. Thus, −a d(xt , yt ) ∝ ∼t , where yt represents the undisturbed time series and a is a constant value. Note that xt contains all information of the network history and that the network was simulated using IEEE 754-2008 double precision variables, which have a memory size of 64 bits on Intel architecture computers. Although floating point variables are organized in a complicated way of three parts, the sign, exponent and mantissa, it is clear that the total reservoir capacity cannot exceed those 64 bits, which means in the limit a reservoir of one neuron cannot remember more than 64 binary i.i.d. random numbers. 11 Figure 4: Results from two dynamics defined in eq. 18, with b = 1 and different types on input ut . One copy of the two initially identical networks has received a variant input at iteration one. Depicted here is the decay of the difference of the state in the recurrent layer if both networks receive the same and expected (alternating) input (in dark blue). The pale curves are data from fig. 5 embedded for comparison. One can see that the difference function (blue) follows a power law and pertains for longer than 64 iterations. Thus, about 64 iterations after an unexpected input the difference between xt and yt should be annihilated. Thus, if both networks xt and yt receive the same unexpected input that is of the same magnitude, the difference between the xt and yt should reach virtually 0 within 64 iterations. The consideration can be tested by setting the input ut = π/4 × rand, where rand is an i.i.d. random list of +1s and -1s, that produces a representative of Fū∞ 6= Fcrit . Fig. 4 and fig. 5 depict results from simulations, where after one iteration when two networks receive different inputs, both networks receive again the same input. Depicted is again the development of the difference between both networks d(xt , yt ) versus the number of iterations. The graphs appear in a double logarithmic fashion, so power law decays appear as straight lines. One can see that the networks that receive alternating, i.e. the expected input, pertains the difference for very long time spans (that exceed 64 iterations). On the other hand, if the network input for both networks is identical but i.i.d random and of the same order of magnitude as the expected input, the difference vanishes within 64 iterations. The network distinguishes regular input from irregular input. Memories of irregular events pertain for a long time in the network provided that the following input is regular again. How a reservoir can be trained to anticipate certain input statistics has been discussed [8]. Additional solutions to this problem are subject to further investigations. 12 Figure 5: Complementary data for fig. 4: Left: Decay if both networks receive the same but irregular (i.i.d random) input (different colors are used for different trials). The difference vanishes much faster than in the left case. Finally the difference becomes and stays null, which is out of a logarithmic scale. Thus, later iterations are not depicted anymore. Right: Depicted here is the same data as at the left, however in a double-logarithmic plot. The data forms a straight line, which indicates an exponential decay. 3.4 Relation to ‘near edge of chaos’ approaches It is a common experience that – in spite of given theoretical limits for the ESPs – the recurrent connectivity can be significantly higher than smax = 1 for many practical input statistics. Those over-tuned ESNs in many cases show a much better performance than those that actually obey Jaeger’s initial limit ESP. So, recently researchers came up with theoretical insights with regard to ESPs that are subject to a network and a particular input statistic [7]. In the scope of this work, instead of defining the ESP for a network the ESP is always defined as related to a network and an input statistic. Also, similar efforts have been undertaken in the field of so-called liquid state machines [18, 19]. One may assume that those approaches show similar properties as the one that has been presented here. However, for a good reason those approaches all are called ‘near edge of chaos’ approaches. In order to illustrate the problems that arise from those approaches, one may consider what happens if those overtuned ESNs are set exactly to the critical point. Here, just for the general understanding one may consider again a one neuron network and a tanh as a transfer function, so xt+1 = tanh(−bxt + ut ). (19) Note that the ESP limit outlined above requires that the recurrent connectivity should be b < 1. An input time series than one can use is from the previous section ut = (−1)t π/4 (20) Slightly tedious but basically simple calculus results in a critical value of b ≈ 2.344 for the input time series, where xt ≈ (−1)t × 0.757. In this situation one can test for the convergence of two slightly different initial conditions and obtain a power law decay of the difference. However, setting up the amplitude of the input just a tiny bit higher is going to result in two diverging time series xt and yt . If the conditions of the ESN are 13 chosen to be exactly at the critical point, it is possible that a untrained input sequence very close to the trained input sequence turns the ESN into a state where the ESP is not fulfilled anymore (for a related and more detailed discussion with a numerical analysis, confer [20]). For this reason all the networks have to be chosen at a significant margin away from the edge of instability. That is very different from the approach in the previous section where although the expected input sequence for the network is exactly at the critical point, all other input sequences result in a stable ESN in most cases with exponential forgetting. 3.5 How the one neuron example can be extended to multi-neuron networks: Normal Matrices A normal matrix W commutes with its own transpose, i.e., WWT = WT W. For a normal matrix W, it can easily be shown that max s(W) = max abs(λ(W)). These matrices apply to the spectral theorem; the largest absolute eigenvalue is the same as the largest singular value, which makes a clear theoretical separation between networks that are uniformly state contracting and those that are not compatible to the echo state condition. Still, for normal matrices all previously known ES conditions do not determine to which of those two groups the critical point4 itself belongs. Summarizing, all previous works result in theorems for an open set of conditions that are defined by the strict inequalities eqs. (9) and (11). In the closest case, the case of normal matrices, when considering the singular condition 1= max s(W) = max abs(λ(W)) (21) there is no statement of the above mentioned theorems if the network is uniformly state contracting. Some simple, preliminary numerical tests reveal that in the case of networks that satisfy eq. 21 the further development of the network strictly depends on the exact shape of transfer function. 4 Echo state condition limit with weak contraction In the previous section, it has been shown how power law forgetting may occur in an ESN type neural network. These networks are all tuned to the point where |λ|max = S = 1. For this tuning it is still undetermined if the ESP is fulfilled or not even if normal matrices or one neuron RNNs are used. The current section is dedicated to determining under which conditions Jaeger’s ESP can be extended to this boundary condition. Jaeger’s sufficient echo state condition (see [5], App. C, p. 41) has strictly been proven only for non-critical systems (largest singular value S < 1) and with tanh(.) 4 Which is a set of Lebesgue measure null. 14 as a transfer function. The original proof is based on the fact that tanh in combination with S < 1 is a contraction. In that case Jaeger shows an exponential convergence. The core of all considerations of a sufficient condition is to give a close upper estimate of the distance between the next iterations of two different states yt and xt . The estimate is of the form max d(yt+1 , xt+1 ) = max d(F(yt ), F(xt )) ≤ φ1 · d(yt , xt ), ∞ ū F where the parameter φ1 basically is quantified by the nature of the transfer function and the strength of the connectivity matrix. The estimate has to be good enough that the iterative application of φ1 should result in a convergence to 0: lim [ φ1 · ]t d(y0 , x0 ) = 0, (22) t→∞ This is equivalent to investigating a series qt with d(yt , xt ) < qt = [ φ1 · ]t d(y0 , x0 ) and lim qt = 0, (23) t→∞ which can prove that the requirement of uniformly state contraction (cf. eq. 6) is fulfilled. For example, consider the case of a reservoir with one neuron as described in eq. 17. Here the challenge is to find an estimator for φ1 such that max d(θ(byt + ut ), θ(bxt + ut )) ≤ φ1 · d(yt , xt ), ut ∈R where the chosen φ1 still holds the limit in eq. 22. For |b| < 1, convergence can be proven easily: max d(θ(byt + ut ), θ(bxt + ut )) ≤ max ||byt + ut − bxt − ut ||2 = ut ∈R ut ∈R |b| · d(yt , xt ). Thus for |b| < 1, one can easily define φ1 = |b|. So qt can be defined as qt = |b|t · d(y0 , x0 ). So eq. 23 is fulfilled. The convergence is exponential. The arguments so far are analogous to the core of Jaeger’s proof for the sufficient echo state condition C2 that is restricted to one dimension. For |b| = 1, this argument does not work anymore. Obviously, Jaeger’s proof is not valid under these circumstances. However, the initial theorem can be extended. As a pre-requisite, one can replace the constant φ1 with a function that depends on qt as an argument. So one can try φ1 (qt ) = 1 − ηqtκ , where η > 0 and κ > 1 have to be defined appropriately. This works for small values of qt . However, it is necessary to name a limit for large qt > γ. Define ( 1 − ηz κ if z < γ φ1 (z) := (24) 1 − ηγ κ if z ≥ γ. Three things have to be done to check this cover function: 15 • First of all, one needs to find out if indeed the cover function φ1 fulfills max d(θ(yt + ut ), θ(xt + ut )) ≤ d(yt , xt )φ1 (d(yt , xt )). ut ∈R In order to keep the proof compatible with the proof for multiple neurons for this work, one has to chose a slightly different application for φ1 , max d2 (θ(yt + ut ), θ(xt + ut )) ≤ d2 (yt , xt )φ1 (d2 (yt , xt )), ut ∈R which serves the same purpose and is much more convenient for multiple neurons. In app. C one can find a recipe for this check. • Second, one has to look for the convergence of qt+1 = qt φ1 (qt ) = qt (1 − ηqtκ ), when qt ≤ γ. The analysis is done in app. A. • Third, one needs to check qt+1 = qt φ1 (qt ) = qt (1 − ηγ κ ), as long as qt > γ. Since the factor (1 − ηγ κ ) is positive, smaller than one and constant, the convergence process is exponential, obviously. Note that the next section’s usage of the cover function differs slightly even through it has the same form as eq. 24. 5 Sufficient condition for a critical ESN The content of this section is a replacement of the condition C2 where the validity of the ESP is inferred for S ≤ 1. Theorem: If hyperbolic tangent or the function of eq. 16 are used as transfer functions, the echo state condition (see eq. 6) is fulfilled even if S = 1. Summary of the proof: As an important precondition, the proof requires that both transfer functions fulfill d(θ(yt ), θ(xt )) ≤ d(yt , xt )φk (d2 (yt , xt )), where φk (z) is defined for a network with k hidden neurons as ( 1 − ηz κ if z < γ φk (z) := . 1 − ηγ κ if z ≥ γ (25) (26) Here, 1 > γ > 0, 1 > η > 0, κ ≥ 1 are constant parameters that are determined by the transfer function and the metric norm d(., .) = ||.||2 In app. C it is shown that indeed both transfer functions fulfill that requirement. It then remains to prove that in the slowest case we have a convergence in a process with 2 stages. In the first stage, if d2 (yt , xt ) > γ there is a convergence that is faster or 16 equal to an exponential decay. The second stage is a convergence process that is faster or equal to a power law decay. Proof: Note with regard to the test function φk : φk ≤ 1, ∀z, ∀Z : 0 ≤ z ≤ Z ↔ φk (z) ≥ φk (Z), and ∀z, ∀Z : 0 ≤ z ≤ Z ↔ Z × φk (Z) ≥ z × φk (z) In analogy to Jaeger, one can check now the contraction between the time step t and t + 1: d2 (yt+1 , xt+1 ) = d2 (θ(ylin,t+1 ), θ(xlin,t+1 )) ≤ d2 (ylin,t+1 , xlin,t+1 ) ×φk (d2 (ylin,t+1 , xlin,t+1 )) (27) One can rewrite d2 (ylin,t+1 , xlin,t+1 ) = ||Wyt + I − Wxt − I||22 ||W(yt − xt )||22 , = (28) where I = win ut . Next one can consider that one can decompose the recurrent matrix by using singular value decomposition (SVD) and obtain W = U · S · VT . Note that both U and V are orthogonal matrices and that S is diagonal with positive values si on the main diagonal. We consider a = VT (yt − xt ). Because V is an orthogonal matrix, the left side of the equation above is a rotation of the right side and the length ||a|| is the same as ||yt − xt ||. One can write X d2 (yt , xt ) = a2i , i where the ai are entries of the vector a. Since ylin,t+1 − xlin,t+1 = USa and U is again a rotation matrix, one can write d2 (ylin,t+1 , xlin,t+1 ) = X s2i a2i , i where si is the i-th component of the diagonal matrix S, i.e., the i-th singular value. In the following we define smax = maxi si and calculate d2 (ylin,t+1 , xlin,t+1 ) × φk (d2 (ylin,t+1 , xlin,t+1 )) X X = ( s2i a2i ) × φk ( s2i a2i ) i ≤ (s2max i X a2i ) × φk (s2max i 2 X a2i ) i ≤ (s2max d (yt , xt )) × φk (s2max d2 (yt , xt )) 17 (29) Merging eq. 27 and eq. 29 results in the inequality d(yt+1 , xt+1 ) ≤ smax d(yt , xt ) × (φk (s2max d2 (yt , xt ))0.5 . First, assuming smax < 1 and since we know φk ≤ 1, we get an exponential decay d(yn , xn ) ≤ stmax d(x0 , y0 ). This case is handled by Jaeger’s initial proof. With regard to an upper limit of the contraction speed (cf. eq. 6), one can find log  − log(d(y0 , x0 )) . log smax τ () = If the largest singular value smax > 1, then for some type of connectivities (i.e. normal matrices) the largest absolute eigenvalue is also larger than 1 due to the spectral theorem. In this case, the echo state condition is not always fulfilled, which has been shown also by Jaeger. What remains is to check the critical case smax = 1. Here again one can discuss two different situations (rather two separate phases of the convergence process) separately: If d2 (ylin,t , xlin,t ) > γ, we can write the update inequality of eq. 30 as: d2 (yt+1 , xt+1 ) ≤ (1 − ηγ κ )d2 (yt , xt ). Thus, for all 2 ≥ γ, the slowest decay process can be covered by τ () = 2 log  − 2 log(d(y0 , x0 )) . log(1 − ηγ κ ) If 2 < γ, then eq. 30 becomes: d2 (yt+1 , xt+1 ) ≤ d2 (yt , xt )(1 − ηd(yt , xt )2κ ). One can replace qt = d2 (yt , xt ) (30) and again consider the sequence qt+1 = qt (1 − ηqtκ ), which is discussed in app. A. The result there is that the sequence converges faster than η (31) q∗ (t) = [ t + q0−κ ]−1/κ . κ Note that, although the Lyapunov exponent (cf. eq. 7) of q∗ (t) is zero, the sequence q∗ (t) converges in a power law fashion. Thus, lim q(t) = d2 (yt , xt ) = 0 t→∞ and thus ESP has been proven, QED. Moreover, one can calculate the upper time limit τ (): τ () = κ −2κ ( − a−κ 0 ). η 18 (32) crit.point C2 C2+ C1 1111111 0000000 0000000 1111111 0000000 1111111 0000000 1111111 0000000 1111111 general matrices recurrent connectivity strength normal matrices & single neuron RNNs C2 C1 new proof Figure 6: The graph illustrates the relation between the different conditions with regard to ESP. C1 and C2 are the necessary and sufficient condition according to Jäger [5]. The large arrows represent the connectivity strength of the recurrent synaptic weight matrix W. For a small connectivity strength the ESP is fullfilled (cyan areas). For a strong connectivity, the ESP is not fulfilled anymore (green). C2+ represents symbolically the improvement of the sufficient condition according to [14, 15]. For general matrices there can be a non-zero gap between C2+ and C1 which is drawn diagonally shaded. The transition from ESP to non-ESP happens somewhere within this gap. All three conditions C1, C2 and C2+ describe an open set. In the case of normal matrices and for one neuron networks the gap is closed except for the separation line itself. The proof of sect. 4 shows that there it depends on the transfer function if the network is an ESN or not. 6 Summary, Discussion and Outlook The background of this paper is to investigate the limit of recurrent connectivity in ESNs. The preliminary hypothesis towards the main work can be summarized in fig. 6. Initially it is hard to quantify the transition point between uniformly state contracting and non-state contracting ESNs exactly. However, for normal matrices and one neuron networks the gap between the sufficient condition and the necessary condition collapses in a way that there are two neighboring open sets. The first open set is known to have the ESP, and the other open set evidently does not have the ESP. What remains is the boundary set. The boundary set is interesting to analyze because it can easily be shown that here power law forgetting can occur. The proof of sect. 4 shows a network is an ESN even if the largest eigenvalue of the recurrent connectivity matrix is equal to 1 and if the transfer function is either eq. 15 or 16. The proof is also extensible to other transfer functions. On the other hand it is obvious that some transfer functions result in networks that are not ESNs. For example a linear transfer function (θ(x) = x) is not state contracting. 19 Even if the network is state contracting, it is not necessarily exponentially uniformly state contracting. Its rate of convergence might follow a power law in the slowest case. Several examples for power law forgetting have been shown in the present work. More examples of preliminary learning have been outlined in [8]. One important target of the present research is to allow for a kind of memory compression in the reservoir by letting only the unpredicted input enter the reservoir. One ultimate target of the present work is to find a way to organize reservoirs as recurrent filters with a memory compression feature. In order to bring concepts of data compression into the field of reservoir computing and in order to project as much as possible of the input history to the limit size reservoir, principles of memory compression have to be transferred into reservoir computing. However, the reservoir computing techniques that are analogous to classic memory compression have not been identified so far. Another topic that needs further investigation is entropy in time series. Power law forgetting is only possible if the time series that relates to the criticality is either of a finite entropy, i.e., from a certain point in time all following entries of the time series can be predicted from the previous entries, or if the network simply ignores certain aspects of the incoming time series. There also potential analogies in biology. Several measurements of memory decay in humans exist that reveal that there the forgetting follows a power law at least for a large fraction of the investigated examples [21, 22]. Compliance with Ethical Standards The author declares that he has no conflict of interest. Ethical approval This article does not contain any studies with human participants or animals performed by the author. Acknowledgements The Nation Science Council and the Ministry of Science and Technology of Taiwan provided the budget for our laboratory. Also thanks go to AIM-HI for various ways of support. References [1] N. Michael Mayer. Echo state condition at the critical point. URL, http:// arxiv.org/abs/1411.6757, 2015. [2] Paul J. Werbos. Backpropagation through time: what it does and how to do it. Proceedings of the IEEE, 78(10):1550–1560, 1990. [3] Mantas Lukoševičius and Herbert Jaeger. Reservoir computing approaches to recurrent neural network training. Computer Science Review, 3(3):127–149, 2009. 20 [4] Wolfgang Maass, Thomas Natschläger, and Henry Markram. Real-time computing without stable states: A new framework for neural computation based on perturbations. In NeuroCOLT Technical Report, 2001. NC-TR-01-113. [5] Herbert Jaeger. The echo state approach to analysing and training recurrent neural networks with an erratum note. In GMD Report 148, GMD German National Research Insitute for Computer Science, 2001, 2010. http://www.gmd.de/People/Herbert.Jaeger/Publications.html. [6] Joschka Boedecker, Oliver Obst, Joseph Lizier, N. Michael Mayer, and Minoru Asada. Information processing in echo state networks at the edge of chaos. Theory in Biosciences, 131:205–213, 2012. [7] Gandhi Manjunath and Herbert Jaeger. Echo state property linked to an input: Exploring a fundamental characteristic of recurrent neural networks. Neural computation, 25(3):671–696, 2013. [8] N. Michael Mayer. Adaptive critical reservoirs with power law forgetting of unexpected input events. Neural Computation, 27, May 2015. [9] Andrew Ng. CS 229 Machine Learning, UC Stanford. URL, http://cs229. stanford.edu/notes/cs229-notes1.pdf, 2014. [10] Herbert Jaeger, Wolfgang Maass, and José Principe. Special issue on echo state networks and liquid state machines. Neural Networks, 20(3):287–289, 2007. [11] Benjamin Schrauwen, David Verstraeten, and Jan Van Campenhout. An overview of reservoir computing: theory, applications and implementations. In Proceedings of the 15th European symposium on artificial neural networks. Citeseer, 2007. [12] Herbert Jaeger. Adaptive nonlinear system identification with echo state networks. In Proc. of NIPS 2002, 2003. AA14. [13] Gilles Wainrib and Mathieu N. Galtier. A local Echo State Property through the largest Lyapunov exponent. Neural Networks, 76:39–45, 2016. [14] Michael R. Buehner and Peter Young. A Tighter Bound for the Echo State Property. IEEE Transaction on Neural Networks, 17(3):820–824, 2006. [15] Izzet B. Yildiz, Herbert Jaeger, and Stefan J. Kiebel. Re-visiting the echo state property. Neural Networks, 35:1–20, 2012. [16] Lennert Appeltant, Miguel Cornelles Soriano, Guy Van der Sande, Jan Danckaert, Serge Massar, Joni Dambre, Benjamin Schrauwen, Claudio R Mirasso, and Ingo Fischer. Information processing using a single dynamical node as complex system. Nature communications, 2:468, 2011. [17] Silvia Ortı́n, Miguel C. Soriano, Luis Pesquera, Daniel Brunner, Daniel L. SanMartı́n, Ingo Fischer, Claudio R. Mirasso, and Jose M. Gutiérrez. A unified framework for reservoir computing and extreme learning machines based on a single time-delayed neuron. Scientific reports, 5, 2015. [18] Thomas Natschläger, Nils Bertschinger, and Robert A. Legenstein. At the edge of chaos: Real-time computations and self-organized criticality in recurrent neural networks. In Advances in Neural Information Processing Systems 17, 2005. 21 [19] Robert A. Legenstein and Wolfgang Maass. Edge of chaos and prediction of computational performance for neural circuit models. Neural Networks, 20(3):323– 334, 2007. [20] N. Michael Mayer. Critical echo state networks that anticipate input using adaptive transfer functions. arXiv preprint arXiv:1411.6757, URL, http:// arxiv.org/pdf/1606.03674.pdf, 2016. [21] David C Rubin and Amy E Wenzel. One hundred years of forgetting: A quantitative description of retention. Psychological review, 103(4):734, 1996. [22] Michael J. Kahana and Mark Adler. Note on the power law of forgetting. University of Pennsylvania, unpublished note, 2002. 22 Appendix A A: Analyze qt+1 = qt (1 − ηqtκ ) We can consider the sequence qt : qt+1 = qt (1 − ηqtκ ). (33) Convergence can be analyzed in the following way: ∆qt = qt+1 − qt = −ηqtκ+1 . (34) Thus, the series qt+1 can be written as qt+1 = X ∆qt0 t0 <t Thus one comes up with the following discrete formula ∆qt0 = −ηqtκ+1 . 0 (35) Since κ ≥ 1 and 1 > η > 0, convergence towards null is obvious here. In addition since the right side of eq. 35 is decreasing continuously it is obvious that it is converging fast than the corresponding solution of the differential equation for a function q∗ : dq∗ = −ηq∗κ+1 , dt which is easily solvable to: 1 −κ − q = t + C, κη ∗ where C is the integration constant. From this solution, by setting q0 = q∗ (0) one can derive η q∗ (t) = [ t + q0−κ ]−1/κ . κ Note that lim q∗ = 0. t→∞ Simple algebraic considerations show that q∗ (t) covers the sequence qt . For a strict proof see app. B. Thus, q∗,t ≥ qt for all t > 0 if q∗,0 = q0 So, the sequences q∗,t and qt converge to zero. 23 B B: Sequence q∗,t covers up sequence qt In the following, identical definitions to sect. 4 are used. One can start from the statement η (36) − ≥ −η. κ Since η ≥ 0 and κ ≥ 1, it can easily be seen that the inequality is fulfilled for any combination of s, η and κ. One can now extend the numerator and denominator of the right side by ( κη t + C) and add also ( κη t + C) to both sides of the inequality. Here and in the following C is defined as C = q0−κ ≥ 1. (37) One obtains η η t+C − ≥ κ κ η η η ( t + C) − ( t + C) η . κ κ t κ +C (38) A rearrangement of the right side results in η η t+C − ≥ κ κ η η ( t + C) × (1 − η ). κ t κ +C One can add η κ (39) to both sides and obtain η t+C ≥ κ η η sη + ( t + C) × (1 − sη ). κ κ κ t+C (40) Now, one can use the fact that 1≥1− and  η η ≥ × 1− κ κ  1− η ≥ η t κ +C η η t κ +C κ  η × 1− κ η η κt + C κ  η η ( t+C + )× 1− κ κ η η κt + C  η η κt + C  ≥ and thus rewrite inequality eq. 40 as η t+C κ ≥ and finally arrive at η κ t+C  ≥ One can multiply both sides by η κ η κt t+C + +C +  η × 1− κ  η −1 κ 24 × η κt η η κt + C +C −1 κ . So, . η −1 t+C + κ κ η η ≥ κ t+C −1  × 1− η η t κ +C κ . Taking the kth root on both sides one gets η −1/κ t+C + κ κ η ≥ η κ t+C −1/κ  × 1− η η κt + C  . One can rearrange the inequality to: η −1/κ t+C + κ κ η −1/κ (t + 1) + C κ η ≥ −1/κ η  η t+C t+C × 1−η κ κ η −1/κ ≥ t+C × κ  −1/κ κ  η t+C 1−η κ −1  (41) Using the definitions of q∗,t and q∗,t+1 , i.e. η q ∗ (t) = [ t + q0−κ ]−1/κ , κ one has finally ≥ q∗,t × (1 − η(q∗,t )κ ) . q∗,t+1 (42) proven as a true statement. Thus, q∗,t ≥ qt ≥ d(yt , xt ) for all t > 0 if q∗,0 = q0 = d(y0 , x0 ). Thus, the positive definite sequence q∗,t covers d(yt , xt ). C C: Weak contraction with the present transfer function In this appendix a test function of the form of eq. 26, is verified for the function of eq. 16 and hyperbolic tangent. Within this section we test the following values η = 1 1 , γ = and κ = 2, 2 48 × n 2 (43) for both transfer functions and square norm (||.||2 ), and n-neurons. In order to derive these values, one can start by considering linear responses ||ylin,t − xlin,t || and the final value ||yt − xt || within one single neuron as yt = θ(ylin,t ) and xt = θ(xlin,t ). 25 (44) We can define ylin,t,i = xlin,t,i ∆ i + ζi , = ζi , and xt,i − yt,i = δi (45) where i is the index of the particular hidden layer neuron. Note that X X ||ylin,t − xlin,t ||2 = ∆2i , ||yt − xt ||2 = δi2 . i C.1 i One neuron transfer In this section considerations are restricted to the case in which one has only one neuron in the hidden layer. For the sake of simplicity, the subscript index i is left out in the following considerations. Setting in the definitions of eq. 45 into the square of eq. 25 and for a single neuron and for any ζ we get 2 ∆2 φ1 (∆2 ) ≥ (θ(∆ + ζ) − θ(ζ)) . Thus, it suffices to consider φ1 (∆2 ) ≥ max ω(∆, ζ), (46) ζ where  ω(∆, ζ) = θ(∆ + ζ) − θ(ζ) ∆ 2 The maxζ can be found by basic analysis. Extremal points can be found as solutions of ∂ ∂ζ " θ(∆ + ζ) − θ(ζ) ∆ ∂ ω ∂ζ 2 # 2(θ(∆ + ζ) − θ(ζ)) × (θ̇(∆ + ζ) − θ̇(ζ)) ∆2 = = = 0. (47) This can only be fulfilled if θ̇(∆ + ζ) − θ̇(ζ) = 0 Since θ0 is an even function for both suggested transfer functions, one gets ζ = −z/2 as the extremal point. Fundamental analysis shows that this point in both cases is a maximum. Thus, requiring φ1 (∆2 ) ≥  2θ(∆/2) ∆ also would satisfy eq. 46. 26 2 (48) Numerically, one can find parameters for φ1 that are η = 1/48 and κ = 2 of as in eq. 43. For ∆2 > γ, it suffices to check if 4tanh2 (∆/2) ≤ 1 − ηγ κ ∆2 First the inequality is fulfilled for ∆2 = γ. Since the left side of the equation above is strictly decreasingfulfilled for all values ∆2 > γ. Analogous considerations lead to the same parameters to cover up the transfer function from eq. 16. C.2 Multi-neuron parameters For several neurons one has to consider the variational problem of all possible combinations of values of ∆i . One can start from the proven relation from the previous section,  δi2 ≤ ∆2i φ1 ∆2i Thus, X δi2 ≤ X i ∆2i φ1 ∆2i  , i implying that X ∆2i φ1 ∆2i  ≤ i X ∆2i − ∆2max + ∆2max φ1 (∆2max ), i where ∆2max = maxi ∆2i . The smallest possible ∆2max is P 2 i ∆i , n Substituting into eq. 49, we get X ∆2i − ∆2max + ∆2max φ1 (∆2max ) ≤ i X ∆2i P − i ∆2i + n i P 2 ∆2i ∆ φ1 ( i i ) = n n P 2 X ∆ ( ∆2i )φ1 ( i 2 i ). n i P i Thus, the inequality (which is equivalent to eq. 25), ! ! X X X 2 2 2 δi ≤ ∆i φ k ∆i , i i i is fulfilled if φk is defined as φk (x) = φ1 x . n2 Thus, the parameters from eq. 43 fulfill the inequality of eq. 25. 27 (49)
9cs.NE
Asynchronous Subgradient-Push Mahmoud Assran and Michael Rabbat∗ arXiv:1803.08950v1 [cs.MA] 23 Mar 2018 March 28, 2018 Abstract We consider a multi-agent framework for distributed optimization where each agent in the network has access to a local convex function and the collective goal is to achieve consensus on the parameters that minimize the sum of the agents’ local functions. We propose an algorithm wherein each agent operates asynchronously and independently of the other agents in the network. When the local functions are strongly-convex with Lipschitz-continuous gradients, we show that a subsequence of the iterates at each agent converges to a neighbourhood of the global minimum, where the size of the neighbourhood depends on the degree of asynchrony in the multi-agent network. When the agents work at the same rate, convergence to the global minimizer is achieved. Numerical experiments demonstrate that Asynchronous Subgradient-Push can minimize the global objective faster than state-of-the-art synchronous first-order methods, is more robust to failing or stalling agents, and scales better with the network size. 1 Introduction We propose and analyze an asynchronous distributed algorithm to solve the optimization problem P minimizex∈Rd F (x) := ni=1 fi (x) (1) where each fi : Rd → R is convex. We focus on the multi-agent setting, in which there are n agents and information about the function fi is only available at the ith agent. Specifically, only the ith agent can evaluate fi and (sub)gradients of fi . Consequently, the agents must cooperate to find a minimizer of F . Many multi-agent optimization algorithms have been proposed, motivated by a variety of applications including distributed sensing systems, the internet of things, the smart grid, multi-robot systems, and large-scale machine learning. In general, there have been significant advances in the development of distributed methods with theoretical convergence guarantees in a variety of challenging scenarios such as time-varying and directed graphs (see [28] for a recent survey). However, the vast majority of this literature has focused on synchronous methods, where all agents perform updates at the same rate. This paper studies asynchronous distributed algorithms for multi-agent optimization. Our interest in this setting comes from applications of multi-agent optimization to the solution of large-scale optimization problems arising in the context of machine learning, where each agent may be running on a different server and the agents communicate over a wired network. Hence, agents may receive multiple messages from their neighbours at any given time instant, and may perform a ∗ The authors are with Facebook AI Research, Montréal, Québec, Canada, and the Department of Electrical and Computer Engineering, McGill University, Montréal, Québec, Canada. Email: {massran, mikerabbat}@fb.com. 1 Algorithm 1 Asynchronous Subgradient-Push (Pseudocode) for agent vi 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: Initialize x ∈ Rd {Push-sum numerator} Initialize y ← 1 {Push-sum weight} Initialize α > 0 {Step-size} out N ← number of out-neighbours repeat begin: Local Computation z ← x/y {De-biased consensus estimate} x ← x − α∇fi (z) Update step-size α end begin: Asynchronous Gossip Copy message (x/N out , y/N out ) to local send-buffer (x, y) ← (x, y) + (x0 , y 0 ) for each message (x0 , y 0 ) in the local receive-buffer end until stopping criterion is satisfied drastically different number of gradient steps over any time interval. In distributed computing systems, communication delays may be unpredictable; communication links may be unreliable; and each processor may be engaged in its own private activities while at the same time cooperating with other processors in the context of some computational task [5]. High performance computing clusters fit this model of distributed computing quite nicely [33], especially since node and link failures may be expected in such systems [10, 18, 34]. When a synchronous algorithm is run in such a setting, the rate of progress of the entire system is hampered by the slowest node or communication link; asynchronous algorithms are largely immune to such issues [2, 3, 5, 8, 16, 19, 21, 31, 39]. 1.1 Asynchronous Subgradient-Push Practical implementations of multi-agent communication using the Message Passing Interface (MPI) [13], or other message passing standards, often have the notion of a send-buffer and a receive-buffer. A send-buffer is a data structure containing the messages sent by an agent, but not yet physically transmitted by the underlying communication system. A receive-buffer is a data structure containing the messages received by an agent, but not yet processed by the application. Using this notion of send- and receive-buffers, the pseudocode running on each individual agent in the network is provided in Algorithm 1 and entails a basic two-step procedure consisting of Local Computation followed by Asynchronous Gossip. During the Local Computation phase, agents update their estimate of the minimizer by performing a local (sub)gradient-descent step. During the Asynchronous Gossip phase, agents copy all outgoing messages into their local sendbuffer and subsequently process (sum) all messaged received (buffered) in their local receive-buffer while the agent was busy performing the preceding Local Computation. The underlying communication system begins transmitting the messages in the local send-buffer once they are copied there; thereby freeing the agent to proceed to the next step of the algorithm without waiting for the messages to reach their destination. Fig. 1a illustrates the agent update procedure in the synchronous case: agents must wait for all network communications to be complete before moving-on to the next iteration, and, as a result, 2 idling Synchronous Subgradient-Push processing delay transmission delay start itr.1 itr.2 start itr.1 itr.2 start itr.1 itr.2 Agent 1 Agent 2 Agent 3 Time k=1 k=2 (a) processing delay Asynchronous Subgradient-Push start itr.1 transmission delay itr.2 itr.3 itr.4 Agent 1 start itr.1 itr.2 itr.3 Agent 2 start itr.1 itr.2 itr.3 itr.4 Agent 3 Time k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9 k=10 k=11 (b) Figure 1: Example of agent updates in synchronous and asynchronous Subgradient-Push implementations. Processing delays correspond to the time required to perform a local iteration. Transmission delays correspond to the time required for all outgoing message to arrive at their destination buffers. Even though a message arrives at a destination agent’s receive-buffer after some real (noninteger valued) delay, that message is only processed when the destination agents performs its next update. some agents may experience idling periods. Fig. 1b illustrates the agent update procedure in the asynchronous case: at the end of each local iteration, agents make use of their message buffers by copying all outgoing messages into their local send-buffers, and by retrieving all messages from their local receive-buffers. The underlying communication systems subsequently transmit the messages in the send-buffers while the agents proceed with their computations. 1.2 Related Work Most multi-agent optimization methods are built on distributed averaging algorithms [24]. For synchronous methods operating over static, undirected networks, it is possible to use doubly stochastic averaging matrices. However, it turns out that averaging protocols which rely on doubly stochastic matrices may be undesirable for a variety of reasons [34]. The Push-Sum approach to distributed averaging, introduced in [18], eliminates the need for doubly stochastic consensus matrices. The 3 seminal work on Push-Sum [18] analyzed convergence for complete network topologies (all pairs of agents communicate directly). The analysis was extended in [4] for general connected graphs. Further work has provided convergence guarantees in the face of the other practical issues, such as communication delays and dropped messages [9, 14]. In general, Push-Sum is attractive for implementations because it can easily handle directed communication topologies, and thus avoids incidents of deadlock that may occur in practice when using undirected communication topologies [34]. Multi-Agent Optimization with Column Stochastic Consensus Matrices The first multi-agent optimization algorithm using Push-Sum for distributed averaging was proposed in [35]. Nedic and Olshevsky continued this line of work by introducing and analyzing the Subgradient-Push method [30]. Yin and Zeng [41], and Khan and Xi [40] simultaneously proposed the Extra-Push and DEXTRA algorithms which use the Push-Sum protocol in conjunction with an extrapolation method to achieve geometric convergence with strongly convex objectives over directed graphs. Nedic, Olshevsky, and Shi build upon this by proposing the Push-DIGing algorithm, which achieves a geometric convergence rate over directed and time-varying communication graphs [29]. The Push-DIGing and DEXTRA/Extra-Push algorithms are considered to be the state-of-the-art, and the Subgradient-Push algorithm is a multi-agent analog of classical gradient descent. It should be noted that all of these algorithms are synchronous in nature. Asynchronous Multi-Agent Optimization The seminal work on asynchronous distributed optimization of Tsitsiklis et al. [36] considers the case where each agent holds one component of the optimization variable (or the entire optimization variable), and can locally evaluate a descent direction with respect to the global objective. Convergence is proved for a distributed gradient algorithm in that setting. However that setting is inherently different from the proposed problem formulation in which each agent does not necessarily have access to the global objective. The work of Li and Basar [20] studies distributed asynchronous algorithms and proves convergence and asymptotic agreement in a stochastic setting, but assumes a similar computation model to that of Tsitsiklis et al. [36] in which each agent updates a portion of the parameter vector using an operator which produces contractions with respect to the global objective. Most recently, there have been several asynchronous multi-agent optimization algorithms proposed in the literature, such as [39], which requires doubly-stochastic consensus over undirected graphs; [12], which requires push-pull based consensus over undirected graphs; and [23], which assumes a strong model of asynchrony in which agents become activated according to a Poisson point process, and an active agent finishes its update before the next agent becomes activated. In general, many of the asynchronous multi-agent optimization algorithms proposed in the literature make restrictive assumptions regarding the nature of the agent updates (e.g., sparse Poisson point process [23], randomized single activation [7, 11], randomized multi-activation [6, 17, 25, 37]). 1.3 Our Contribution and Paper Organization We study an asynchronous implementation of the Subgradient-Push algorithm. This paper draws motivation from our previous work [2] in which we reported results of an empirical study in which Asynchronous Subgradient-Push was observed to converge faster than state-of-the-art synchronous multi-agent algorithms. In this paper we focus on providing theoretical convergence guarantees: when the local objective functions are strongly convex with Lipschitz-continuous gradients, we 4 show that a subsequence of the iterates at each agent converges to a neighbourhood of the global minimum, where the size of the neighbourhood depends on the degree of asynchrony in the multiagent network. When the agents work at the same rate, convergence to the global minimizer is achieved. In general, we relate the asymptotic worst-case error to the degree of asynchrony, as quantified by a bound on the delay. We also develop peripheral results concerning an asynchronous version of the Push-Sum protocol used for consensus averaging that may be of interest in their own right. In particular, we show that agents running the Push-Sum protocol asynchronously converge to the average of the network geometrically fast, even in the presence of exogenous perturbations at each agent that seek to derail the consensus process, where the constant of geometric convergence depends on the consensusmatrices’ degree of ergodicity [15] and the degree of asynchrony in the multi-agent network. In Sec. 2 we put forward a model of asynchrony to facilitate the analysis. In Sec. 3 we expound the Asynchronous Perturbed Push-Sum consensus averaging protocol and describe the associated convergence results. In Sec. 4 we build off of the perturbed push-sum results to formally describe the asynchronous Subgradient-Push optimization algorithm and present the associated convergence results for both the constant and diminishing step-size cases. Sec. 5 is devoted to the proof of the main results, and in Sec. 6 we report numerical experiments on a high performance computing cluster. Finally, in Sec. 7, we provide a conclusion and discuss extensions for future work. 2 System Model 2.1 Communication The multi-agent communication topology is represented by a directed graph G(V, E), where V := {vi | i = 1, . . . , n} , E := {(vj ← vi ) | vi can send messages to vj } , are the set of agents and edges respectively. We refer to G(V, E) as the reference graph for reasons that will become apparent when we augment the graph with virtual agents. Let Njin := card ({vi | (vj ← vi ) ∈ E}) Njout := card ({vi | (vi ← vj ) ∈ E}) denote the cardinality of the in-neighbour set and out-neighbour set of agent vj respectively. 2.2 Discrete event sequence Without any loss of generality we can describe and analyze the algorithm in discrete-time since all events of interest, such as message transmissions/receptions and local variable updates, may be indexed by a discrete-time variable [36]. We adopt notation and terminology for analyzing asynchronous algorithms similar to that developed in [36]. Let t[0] denote the time at which the agents begin optimization, and we assume that there is a set of times T = {t[1], t[2], t[3], . . . , } at which one or more agents perform an update. We let Ti ⊆ T denote the subset of times at which agent vi in particular performs an update. We denote the communication set at time-index k by C[k] := {vi | t[k] ∈ Ti }. For convenience, we also define the functions πi (k) := max {k 0 ∈ N | k 0 < k, vi ∈ C[k 0 ]} for all i, which return the most recent time-index — up to, but not including, time-index k — that agent vi was in the communication set.1 1 To handle the corner-case at k = 1, we let πi (1) equal 0 for all i. 5 2.3 Delays Recall that t[k] denotes a time at which an agent completes a Local Computation (i.e., performs an update) and also the time at which that same agent begins Asynchronous Gossip (i.e., sends a message to its neighbours by copying the outgoing message into its local send-buffer). So t[k] ∈ Ti implies that agent vi performs an update and sends a message to its out-neighbours at time t[k]. For analysis purposes, messages are sent with an effective delay such that they arrive right when the agent is ready to process the messages. That is, a message that is sent at time t[k] and processed by the receiving agent at time t[j 0 ] is, for the purpose of analysis, treated as having experienced a time delay t[j 0 ] − t[k], or equivalently a time-index delay j 0 − k, even if the message actually arrives before t[j 0 ] and waits in the receive-buffer. Let τiproc [k] := k − πi (k) (defined for all t[k] ∈ Ti ) denote the time-index processing delay experienced by agent vi at time t[k]. In words, if agent vi performs an update at some time t[k], then it performed its last update at time t[k − τiproc [k]], where τiproc [k] is bounded above by τ proc . It follows that 1 ≤ τiproc [k] ≤ τ proc . msg Similarly, let τji [k] (defined for all t[k] ∈ Ti ) denote the time-index message delay experienced by a message sent from agent vi to agent vj at time t[k]. In words, if agent vi sends a message to msg agent vj at time t[k], then agent vj will begin processing that message at time t[k + τji [k]], where msg msg msg . We use the convention that τii [k] = 0 for all i and k ∈ N, τji [k] is bounded above by τ meaning that all agents have access to their own local information at all times. It follows that msg 0 ≤ τji [k] ≤ τ msg . Since all agents enter the communication set (i.e., complete an update and initiate a message transmission to all their out-neighbours) at least once every τ proc − 1 time-indices, and because all messages are processed within at most τ msg time-indices from when they are sent, it follows that each agent is guaranteed to process at least one message from each its in-neighbours every τ := τ msg + τ proc − 1 time-indices. 2.4 Augmented Graph To analyze the Asynchronous Subgradient-Push optimization algorithm we augment the reference graph by adding τ msg virtual agents for each non-virtual agent. Similar graph augmentations have been used in [9, 14] for synchronous averaging with transmission delays. To state the procedure (1) (2) (τ msg ) concisely: for each non-virtual agent, vj , we add τ msg virtual agents, vj , vj , . . . , vj , where (r) each vj contains the messages to be received by agent vj in r time-indices. As an aside, we may (0) interchangeably refer to the non-virtual agents, vj , as vj for the purpose of notational consistency. The virtual agents associated with agent vj are daisy-chained together with communication edges (r) (r−1) (r) (vj ← vj ), such that at each time-index k, and for all r = 1, 2, . . . , τ msg , agent vj forwards (r−1) its summed messages to agent vj (0) . In addition, for each edge (vj (r) (where j 6= i), we add the edges (vj (0) (0) ← vi ) in the reference graph ← vi ) in the augmented graph. This augmented model (r) simplifies the subsequent analysis by enabling agent vi to send a message to agent vj with delay zero, rather than send a message to agent vj with delay r.2 See Fig. 2 for an example. To adapt the augmented graph model for optimization we formulate the equivalent optimization 2 It is worth pointing out that we have not changed our definitions for the edge and vertex sets E and V respectively, they are still solely defined in-terms of the non-virtual agents. 6 (2) (2) v1 v2 (1) v1 v1 (1) v2 v4 v2 (1) v4 v3 (1) v3 (2) v4 (2) v3 Figure 2: Sample augmented graph of a 4-agent reference network with a maximum time-index message transmission delay of τ msg = 2 time-indices. Solid lines correspond to non-virtual agents and edges. Dashed lines correspond to virtual agents and edges. problem minimize F (x) := msg n τX X (r) fi (x), (2) r=0 i=1 (r) (r) where fi (x) equals fi (x) if r = 0, and fi (x) equals 0 if r 6= 0. In words, each of the non-virtual (0) agents, vi , maintains its original objective function fi (·), and all the virtual agents are simply given the zero objective. Clearly F (x) defined in (2) is equal to F (x) defined in (1), and we will use these two notations interchangeably. We denote the state of a variable z at time t[k] with an msg augmented state matrix z[k] ∈ Rn(τ +1)×d   (0) z [k]  z (1) [k]    z[k] :=  (3) , ..   . msg z (τ ) [k] where each z (r) [k] ∈ Rn×d is a block matrix that holds the copy of the variable z at all the delay-r (r) agents in the augmented graph at time-index k.3 More specifically, zi [k] ∈ Rd , the ith row of (r) z (r) [k], is a copy of the variable z held locally at agent vi at time-index k; we generalize this notation for other variables as well. For ease of exposition, we assume that the reference-graph is static and strongly-connected. The strongly-connected property of the directed graph is necessary to ensure that all agents are capable 3 In keeping with this notation, the block matrix z (0) [k] corresponds to the non-virtual agents in the network. 7 of influencing each other’s values, and in Sec. 7 we describe how one can extend our analysis to account for time-varying directed communication-topologies. 3 Asynchronous Perturbed Push-Sum Consensus-averaging is a fundamental building block of the proposed Asynchronous SubgradientPush algorithm. In this subsection we consider an asynchronous version of the synchronous Perturbed Push-Sum Protocol [30]. If we omit the gradient update in line 8 of Algorithm 1, then we recover the pseudocode for an asynchronous formulation of the Push-Sum consensus averaging protocol. Alternatively, if we replace the gradient term in line 8 of Algorithm 1 with a general perturbation term, then we recover an asynchronous formulation of the Perturbed Push-Sum consensus averaging protocol. 3.1 Formulation of Asynchronous (Perturbed) Push-Sum We analyze the Asynchronous Perturbed Push-Sum algorithm in matrix form by stacking all of the agents’ parameters at every update time into a parameter matrix using a similar notation to that in (3). The entire Asynchronous Gossip procedure can then be represented by multiplying the parameter-matrix by a so-called consensus-matrix that conforms to the graph structure of the msg msg communication topology. The consensus matrices P [k] ∈ Rn(τ +1)×n(τ +1) for the augmented state model are defined as   Pe0 [k] In×n 0 ··· 0    Pe1 [k] 0 In×n · · · 0      . . . . . .. .. .. .. ..  P [k] :=  (4)  ,    Pe [k] 0 0 · · · In×n   τ −1  e Pτ msg [k] 0 0 ··· 0 where each Per [k] ∈ Rn×n is a block matrix defined as  msg 1    Niout , vi ∈ C[k], (j, i) ∈ E, and τji [k] = r, h i Per [k] := 1, vi ∈ / C[k], r = 0, j = i,  ji  0, otherwise. (5) In words, when a non-virtual agent is in the communication set, it sends a message to each of its out-neighbours in the reference graph with some arbitrary, but bounded, delay r. When a nonvirtual agent is not in the communication set, it keeps its value and does not gossip. Furthermore, since we have chosen a convention in which messages between agents are sent with some effective msg message delay, τji [k], it follows that non-virtual agents do not receive any new messages while outside the communication set. Virtual agents, on the other hand, simply forward all of their messages to the next agent in the delay daisy-chain at all time-indices k, and so there is no notion of virtual agents belonging to (or not belonging to) the communication set. The communication set is exclusively a construct for the non-virtual agents. Observe that, by definition, the matrices P [k] are column stochastic at all time-indices k. To analyze the Asynchronous Perturbed Push-Sum averaging algorithm from a global perspecmsg tive, we use the matrix-based formulation provided in Algorithm 2, where η[k] ∈ Rn(τ +1)×d is 8 Algorithm 2 Asynchronous Perturbed Push-Sum Averaging for k = 0, 1, 2, . . . to termination do x[k + 1] = P [k] (x[k] + η[k]) (6) y[k + 1] = P [k]y[k] (7) z[k + 1] = diag(y[k + 1]) −1 x[k + 1] (8) a perturbation term, and the matrices P [k] are as defined in (4) for the augmented state. At all (r) (r) (r) (r) time-indices k, each agent vi locally maintains the variables xi [k], zi [k], ∈ Rd , and yi [k] ∈ R. (0) (0) The non-virtual agent initializations are xi [0] ∈ Rd , and yi [0] = 1. The virtual agent initializa(r) (r) tions are xi [0] = 0, and yi [0] = 0 (for all r 6= 0).4 This matrix-based formulation describes how the agents’ values evolve at those times t[k + 1] ∈ T = {t[1], t[2], t[3], . . . , } when one or more agents complete an update, which in this case consists of summing received messages. The time-varying consensus-matrices P [·] capture the asynchronous delay-prone communication dynamics. 3.2 Main Results for Asynchronous (Perturbed) Push-Sum In this subsection we present the main convergence results for the Asynchronous (Perturbed) PushSum consensus averaging protocol. We briefly describe some notation in order to state the main out represent the maximum number of out-neighbours associated out := max results. Let Nmax 1≤j≤n Nj to any non-virtual agent. Let x[k] := 1> x[k]/n be the mutual time-wise average of the variable x at time-index k. Let the scalar ψ represent the number of possible types (zero/non-zero structures) that an n(τ msg + 1) × n(τ msg + 1) stochastic, indecomposable, and aperiodic (SIA) matrix can take 2 msg (hence ψ < 2(n(τ +1)) ).5 Let the scalar λ > 0 represent the maximum Hajnal Coefficient of Ergodicity [15] taken over the product of all possible (τ + 1)(ψ + 1) consecutive consensus-matrix products: ! n o X λ := max 1 − min min [A]i,j1 , [A]i,j2 , j1 ,j2 A i such that  A ∈ P [k + (τ + 1)(ψ + 1)] · · · P [k + 2]P [k + 1] k ≥ 0 ; recall τ := τ msg + τ proc − 1. We prove that λ is strictly less than 1 and guaranteed to exist. Let δmin represent a lower bound on the entries in the first n-rows of the product of n(τ + 1) or more consecutive consensus-matrices (rows corresponding to the non-virtual agents):   δmin := min P [k + `] · · · P [k + 2]P [k + 1] i,j , i,j,k,` where the min is taken over all i = 1, 2, . . . , n, j = 1, 2, . . . , n(τ proc + 1), k ≥ 0, and ` ≥ n(τ proc + 1). Assumption 1 (Communicability). All agents influence each other’s values sufficiently often; precisely: (r) 4 Note, given the initializations, the virtual agents could potentially have zi [k + 1] = 0/0 (division by zero) in (r) update equation (11), but this is a non-issue since zi (for all r 6= 0) is never used. 5 Cf. [38] for a definition of SIA matrices. 9 1. The reference graph G(V, E) is static and strongly connected. 2. The communication and computation delays are bounded: τ msg < ∞ and τ proc < ∞. Theorem 1 (Convergence Rate of Asynchronous Perturbed Push-Sum Averaging). Suppose that Assumption 1 is satisfied. Then it holds for all i = 1, 2, . . . , n, and k ≥ 0, that (0) (0) zi [k] − x[k] ≤Cq k xi [0] 1 1 +C k X s=0 q k−s kηi [s]k1 , where q ∈ (0, 1) and C > 0 are given by 1 q = λ (ψ+1)(τ +1) , 2 C< and λ and δmin =  1 n(τ +1) out Nmax ψ+2 ψ+1 δmin ≈ 2 , λδmin . Corollary 1.1 (Convergence to a Neighbourhood for Non-Diminishing Perturbation). Suppose that the perturbation term is bounded for all i = 1, 2, . . . , n; i.e., there exists a positive constant L < ∞ such that kηi [k]k1 ≤ L, for all i = 1, 2, . . . , n. Then (0) zi [k] − x[k] lim k→∞ 1 ≤ for all i = 1, 2, . . . , n. CL , 1−q Remark 1. From [32, Lemma 3.1] we know that if q ∈ (0, 1), and lims→∞ α[s] = 0, then lim k X k→∞ q k−s α[s] = 0. s=0 Corollary 1.2 (Exact Convergence for Vanishing Perturbation). Suppose that the perturbation term vanishes as k (the time-index) tends to infinity, i.e., lim kη[k]k1 = 0, k→∞ then from the result of Theorem 1 and Remark 1, it holds for all i = 1, 2, . . . , n that lim k→∞ (0) zi [k] − x[k] 1 = 0. Corollary 1.3 (Geometric Convergence of Asynchronous (Unperturbed) Push-Sum Averaging). Suppose that for all i = 1, 2, . . . , n, and k ≥ 0, it holds that ηi [k] = 0. Then from the result of Theorem 1, it holds for all i = 1, 2, . . . , n, and k ≥ 0 that (0) zi [k] − x[0] (0) 1 ≤ Cq k xi [0] 10 1 . The proof of Theorem 1 is omitted and can be found in [1]. In brief, the asymptotic product of the asynchronous consensus-matrices, P [k] · · · P [1]P [0] (for sufficiently large k) is SIA and, furthermore, the entries in the first n rows of the asymptotic product (corresponding to the nonvirtual agents) are bounded below by a strictly positive quantity. Applying standard tools from the literature concerning SIA matrices [38] we show that the columns of the asymptotic product of consensus-matrices weakly converge to a stochastic vector sequence at a geometric rate. Substituting this geometric bound into the definition of the asynchronous perturbed Push-Sum updates in Algorithm 2 and, after algebraic manipulation similar to that in [30] (which analyzes synchronous delay-free Perturbed Push-Sum), we obtain the desired result. 4 Asynchronous Subgradient-Push In this section we expound the proposed Asynchronous Subgradient-Push optimization and present our main convergence results. Our definition of asynchrony implies that agents may gossip at different rates, communicate with arbitrary transmission delays, and perform (sub)gradient steps with stale (outdated) information. 4.1 Formulation of Asynchronous Subgradient-Push To analyze the Asynchronous Subgradient-Push optimization algorithm from a global perspective, (r) we use the matrix-based formulation provided in Algorithm 3. At all time-indices k, each agent, vi , (r) (r) (r) locally maintains the variables xi [k], zi [k] ∈ Rd , and yi [k] ∈ R+ . This matrix-based formulation describes how the agents’ values evolve at those times t[k + 1] ∈ T = {t[1], t[2], t[3], . . . , } when one or more agents complete an update. The asynchronous delay-prone communication dynamics are accounted for in the consensus-matrices P [·], and the matrix-valued function ∇F [k + 1] ∈ msg Rn(τ +1)×d is defined as   ∇f (0) (z (0) [k + 1])   0   ∇F [k + 1] :=  , ..   . 0 where ∇f (0) (z (0) [k + 1]) ∈ Rn×d denotes a block matrix with its ith row equal to (0) (0) δi [k + 1]∇fi (zi [k + 1]). The scalar-valued function δi [·] is a 0, 1–indicator that is equal to 1 at some time before agent vi completes an update, and is equal to 0 otherwise. The non-virtual agent initializations are (0) (0) (0) (0) (r) zi [0] = xi [0] ∈ Rd , and yi [0] = 1. The virtual agent initializations are zi [0] = xi [0] = 0, (r) and yi [0] = 0 (for all r 6= 0). If agent vi is in the communication set at some times t[k 0 ] and t[s0 ], and at no other time in between, where t[k 0 ] > t[s0 ] ≥ 0, then the length of the interval (t[s0 ], t[k 0 ]) can be thought of as a processing delay experienced by agent vi at time t[k 0 ], during which agent vi neither sends nor processes any new messages. The only messages that are processed in this time-interval are those that were read from the receive-buffer when the agent was last in the communication set (at time t[s0 ]). By the end of this time interval, agent vi completes a Local Computation, and hence a gradient step. Mathematically, this is equivalent to setting the gradient activator, δi [k], to 1 once, and only once, at some time in the interval (t[s0 ], t[k 0 ]). Since agent vi neither sends nor processes 11 Algorithm 3 Asynchronous Gradient Push Optimization for k = 0, 1, 2, . . . to termination do x[k + 1] = P [k] x[k] − α[k]∇F [k]  (9) y[k + 1] = P [k]y[k] z[k + 1] = diag(y[k + 1]) −1 x[k + 1] itr.1 (11) processing delay Asynchronous Subgradient Push start (10) transmission delay itr.2 itr.3 itr.4 Agent 1 start itr.1 itr.2 itr.3 Agent 2 start itr.1 itr.2 itr.3 itr.4 Agent 3 Time k=1 k=2 k=3 k=4 k=5 k=6 k=7 k=8 k=9 k=10 k=11 Figure 3: (Best viewed in colour). Example of agent updates in an Asynchronous Gradient Push procedure with a maximum time-index processing delay τ proc = 4. The time-index, k, increments by 1 each time an agent performs an update (completes a Local Computation). The diagram depicts the local iteration increments (in red), the time axis with delineated τ proc time-index increments (in blue), and one possible choice for a subsequence of partially overlapping computations (in orange). Note that each time-index in the subsequence of partially overlapping computations could potentially correspond to a different local iteration at each agent. For example, k = 2 corresponds to Agent 1’s first iteration, Agent 2’s second iteration, and Agent 3’s first iteration. any new messages in the interval (t[s0 ], t[k 0 ]), the specific time in the interval at which δi [·] is set to 1 does not matter. At all other times in the interval, δi [·] will be set to 0.6 Remark 2 (Subsequence of Partially Overlapping Computations). By the bounded processing delay assumption it follows that each agent, vj , needs to set its indicator, δj [·], to 1 at least once every τ proc time-indices. Hence, in every τ proc time-index interval there is at least one time-index during which all agents can simultaneously set their gradient activator to 1. We refer to these time-indices as the elements of a subsequence of partially overlapping computations, which we denote by {bk }. Since such a time-index must occur at least once in every τ proc interval, it follows that the timeindex difference between successive subsequence terms is at most τ proc (i.e., bk+1 − bk ≤ τ proc for all k ≥ 0). Fig. 3 shows an example of such a subsequence of partially overlapping computations. 6 For example, if agent vi completes its first update at time t[2], then δi [·] can be set to 1 at time t[0], and set to 0 at times t[1] and t[2]. Alternatively, δi [·] can be set to 1 at time t[1], and set to 0 at times t[0] and t[2]. Another option is to set δi [·] to 1 at time t[2], and set to 0 at times t[0] and t[1]. From an analysis perspective, all permutations produce the same result. 12 4.2 Main results for Asynchronous Subgradient-Push In this subsection we present the main convergence results for the Asynchronous Subgradient-Push optimization algorithm. Assumption 2 (Existence, Convexity, and Smoothness). Assume that: 1. A minimizer of (1) exists; i.e., argminx F (x) 6= ∅. 2. Each function fi (x) : Rd → R is m-strongly convex, and has M -Lipschitz continuous gradients. Let x? := argmin F (x) denote the global minimizer. Assumption 3 (Step-Size Bound). Assume that for all agents vi , the terms in the step-size sequence {αi [k]} satisfy  n(τ +1) 1 m αi [k] ≤ (k ∈ N). out 2M 2 Nmax Theorem 2 (Bounded Iterates and Gradients). Suppose Assumptions 2 and 3 are satisfied, then there exist finite constants L, D > 0 such that, sup k∇fi (zi [k])k ≤ L, k sup kx[k]k < D. k The proof of Theorem 2 appears in [1]. Next we state our three main results, which we then prove in Sec. 5. Theorem 3 (Convergence of Asynchronous Gradient Push for Diminishing Step-Size). If Assumptions 1, 2, and 3 are satisfied, and the (strictly positive) step-size sequence {α[k]} is non-increasing and satisfies ∞ X k=1 α[k] = ∞, ∞ X k=1 α2 [k] < ∞, then for all i = 1, 2, . . . , n, lim inf kzi [k] − x? k < k→∞ L p proc 2(τ − 1)(n − 1). m Remark 3. The result of Theorem 3 states that by using a diminishing step-size sequence, the agents running the Asynchronous Subradient-Push optimization algorithm are guaranteed to agree on a solution that converges to a neighbourhood of the global minimizer, where the size of the neighbourhood depends on the degree of asynchrony in the multi-agent network. Hence, as τ proc decays to 1 (i.e., the algorithm operates semi-synchronously: agents perform updates at the same rate, but do not wait for messages to be sent/received), the zi terms at each agent converge to the global minimizer, even if the communication delays do not go zero. Theorem 4 (Convergence of Asynchronous Gradient Push for Constant Step-Size). Suppose τ proc > 1 and n > 1. If Assumptions 1, 2, and 3 are satisfied, and the step-size, α > 0, is constant and satisfies α≤ ((n − 1)(τ proc − 1))3  √ , proc M C d 2n m(τ proc )2 + 2τ 1−q 13 then for all i = 1, 2, . . . , n, lim inf kzi [k] − x? k < k→∞ CL L p proc 2(τ − 1)(n − 1) + α , m 1−q where C is the constant defined in Theorem 1. Theorem 5 (Convergence of Semi-Synchronous Gradient Push for Constant Step-Size). Suppose τ proc = 1 or n = 1 and Assumptions 1, 2, and 3 are satisfied. For any ρ > 0, if the step-size, α > 0, is constant and satisfies α< mρ2  nL2 (τ proc )2 + √ , 2τ proc M C d m(1−q) then for all i = 1, 2, . . . , n, r ? lim inf kzi [k] − x k < k→∞ 2Lρ CL +α . m 1−q √  Remark 4. The O ρ term is the neighbourhood to which the mutual time-wise average converges, and the αCL 1−q term is due to the worst-case disagreement between agents. The step-size bound depends on the desired size of the neighbourhood of convergence, and the connectivity and asynchrony in the multi-agent network. Interestingly so, the communication delays do not play a role in this asymptotic convergence result. However one would expect communication delays to play an important role in any derived convergence rate, as is the case in Theorem 1, where the delays directly affect the geometric rate at which the asynchronous Perturbed Push-Sum algorithm converges to the mutual time-wise average. Remark 5. Previous work on synchronous subgradient-push [26, 27] has only analyzed the case of diminishing step sizes. Synchronous subgradient-push is clearly a special case of the framework considered here with τ proc = 1 and τ msg = 0. Hence, our theory also provides the first asymptotic convergence guarantees for subgradient-push with constant step-size. 5 Analysis In this section we prove our main convergence results. By regarding the gradient term as a single exogenous perturbation to an asynchronous push-sum averaging procedure, and showing that these perturbations remain bounded, we have that the iterate sequences at all the non-virtual agents (0) (the zi [k] terms) converge to a neighbourhood of the mutual time-wise average in the constant step-size case, and to the exact average in the diminishing step-size case. Then by showing that the mutual time-wise average converges to a point in a neighbourhood of the minimizer, we have our main results. This is the general sketch of the proof. 14 5.1 Preliminaries Lemma 1. Suppose Assumptions 2 and 3 are satisfied, and that the step-size sequence {α[k]} is non-increasing. Define γ[k] := γ̃[bk ] := n X i=1 ∆k X δi [k] (∇fi (x[k]) − ∇fi (zi [k])) j=0 ζ[bk ] := − α[bk + j] γ[bk + j], n ∆X k −1 j=0 n α[bk + j] X δi [bk + j]∇fi (x[bk + j]), n i=1 where {bk } is the subsequence defined in Remark 2, ∆k := bk+1 − bk − 1 is related to the number of time-indices between successive subsequence terms, and d[bk ] := −F (x[bk ]). Then kx[bk+1 ] − x? k2 ≤ kx[bk ] − x? k2 + (τ proc α[bk ]L)2 2α[bk ] + hd[bk ], x[bk ] − x? i n + 2hγ̃[bk ] + ζ[bk ], x[bk ] − x? i. Remark. The terms γ[k], γ̃[bk ], and ζ[bk ] represent the consensus error at time t[k], the consensus error accumulated in the interval (t[bk ], t[bk+1 ]), and the asynchrony error accumulated in the interval (t[bk ], t[bk+1 ]) respectively. Proof. Recall the update equation (9) given by  x[k + 1] = P [k] x[k] − α[k]∇F [k] . Since the matrices P [k] are column stochastic, we can multiply each side of (9) by 1T /n and add Pn and subtract α[k] i=1 δi [k]∇fi (x[k]), to get n ! n X α[k] x[k + 1] = x[k] + γ[k] − δi [k]∇fi (x[k]) . (12) n i=1 Recursing for ∆k ≤ τ proc − 1 time-indices until we find an iteration at which the agents’ computations partially overlap (cf. Remark 2), and, without any loss of generality, letting k + 1 be a time index at which the agents’ computations partially overlap, we have n x[bk+1 ] = x[bk ] − − + ∆k X j=1 α[bk ] X ∇fi (x[bk ]) n i=1 n α[bk + j] X δi [bk + j]∇fi (x[bk + j]) n i=1 ∆k X α[bk + j] j=0 n γ[bk + j] 15 (13) Substituting in the definitions for d[bk ], γ̃[bk ], and ζ[bk ], and subtracting x? from each side of (13) and taking the squared norm 2α[bk ] d[bk ], x[bk ] − x? i n + 2hγ̃[bk ] + ζ[bk ], x[bk ] − x? i kx[bk+1 ] − x? k2 = kx[bk ] − x? k2 + h + α[bk ] d[bk ] + γ̃[bk ] + ζ[bk ] n (14) 2 . Recalling the assumption that the step-size sequence is non-increasing, and noting that ∆k < τ proc and δi [k] ∈ {0, 1}, we can use the triangle inequality and the definitions of d[bk ], γ̃[bk ], and ζ[bk ] to obtain α[bk + 1] d[bk ] + γ̃[bk ] + ζ[bk ] n 2 ≤ (τ proc α[bk ]L)2 . Substituting (15) into (14) gives the desired result. (15)  Lemma 2. If Assumptions 1, 2, and 3 are satisfied, and the step-size sequence {α[k]} is nonincreasing, then by defining C1 := (n − 1)(τ proc − 1) √ τ proc M dCL proc kx0 k q −τ , C2 := m√ τ proc M dCL2 C3 := , m m C4 [bk ] := L kx? − x[bk ]k − kx? − x[bk ]k2 , 2 where γ̃[bk ] and ζ[bk ] are the consensus and asynchrony error terms, respectively, defined in Lemma 1; q and C are the constants defined in Theorem 1; and L is the bound constructed in Theorem 2; we have hγ̃[bk ], x[bk ] − x? i ≤C2 α[bk ]q bk + C3 α[bk ] hζ[bk ], x[bk ] − x? i ≤ bk X q bk −s α[s], s=0 C1 C4 [bk ] α[bk ]. n Proof. To bound the consensus error inner product, apply the definition of γ̃[bk ]. Then use the Cauchy-Schwarz inequality and the gradient Lipschitz-continuity, along with the strong convexity of the objective and the fact that the step-size sequence is non-increasing. To bound the asynchrony error inner product, apply the definition for ζ[bk ] and bound each one of the terms in the summation independently by using the strong convexity of the local objectives and the gradient bound constructed in Theorem 2. Then substitute back into the summation, keeping in mind that ∆k ≤ τ proc − 1.  5.2 Proof of Theorem 3 Define the lim inf sequence {m[k]} given by m[k + 1] := min{F (x[k]), m[k]}. Note that {m[k]} is monotonically decreasing and bounded below by F (x? ), hence the sequence converges to some m? 16 (i.e., m[k] ↓ m? ≥ F (x? )). Let ρ := (n − 1)(τ proc − 1)L/m, and define v[bk ] := x? − ρ d[bk ] . kd[bk ]k Let β := F (x? ) + Lρ, and assume for the sake of a contradiction that m? ≥ β > F (x? ). From the Lipschitz-continuity of the global objective implied by the gradient bound in Theorem 2, we have F (v[bk ]) − F (x? ) ≤ L kv[bk ] − x? k = Lρ, hence F (v[bk ]) ≤ F (x? ) + Lρ = β. That is, v[bk ] is in the β-sublevel set of F (·). Recalling that d[bk ] is the negative gradient of the global objective and using the first-order definition of convexity we have hv[bk ] − x[bk ], −d[bk ]i ≤ F (v[bk ]) − F (x[bk ]) ≤ β − m[bk + 1] ≤ 0. (16) (17) Substituting in the definition of v[bk ] into (16) gives hx[bk ] − x? , d[bk ]i ≤ −ρ kd[bk ]k < 0. (18) Substituting (18) into the result of Lemma 1 and applying the bounds from Lemma 2 directly, we have ? 2 ? 2 kx[bk+1 ] − x k ≤ kx[bk ] − x k + C3 bk X q bk −s α2 [s] s=0 2α[bk ]ρ kd[bk ]k − + (τ proc α[bk ]L)2 n 2C1 C4 [bk ] + α[bk ] + C2 α[bk ]q bk . n (19) Now by invoking the strong convexity of F and noting that ∇F (x? ) = 0 (since, by definition, x? is the global optimum), we have m kx − x? k2 ≤ F (x) − F (x? ) 2 m ≤ k∇F (x)k kx − x? k − kx − x? k2 , 2 which implies (for x 6= x? ) that m kx − x? k ≤ k∇F (x)k . (20) Using (20), which holds in general for all strongly-convex functions, and by the assumption that m? ≥ β > F (x? ), it follows that ρ kd[bk ]k − C1 C4 [bk ] ≥  > 0 (21) for all bk and some  > 0. Since the step-size is decreasing, it follows that there exists an index br such that for all bk ≥ br ρ kd[bk ]k − C1 C4 [bk ] α[bk ] ≤  ≤ . (22) n(τ proc L)2 17 Therefore, by applying (22) to (19), it holds for all bk ≥ br that  α[bk ] ≤ kx[bk ] − x? k2 − kx[bk+1 ] − x? k2 n bk X bk q bk −s α2 [s]. + C2 α[bk ]q + C3 (23) s=0 Since q ∈ (0, 1), and by assumption P∞ s=0 α 2 [s] bk ∞ X X k=0 s=0 < ∞, it follows from [32, Lemma 3.1] that q bk −s α2 [s] < ∞. (24) Summing (23) over the subsequence; noticing that we have a telescoping sum on the right hand side; and making use of (24), it follows that ∞ X α[bk ] < ∞. n (25) k=r This is a contradiction; therefore m? < β and lim inf k→∞ m kx[k] − x? k2 ≤ lim inf F (x[k]) − F (x? ) k→∞ 2 C1 L2 < β − F (x? ) = , m (26) (27) where (26) simply follows from the strong convexity of the global objective, and (27) is a result of the contradiction. Making use of (27) and Corollary 1.3, we have lim inf kzi [k + 1] − x? k < k→∞ L p proc 2(τ − 1)(n − 1), m for all i = 1, 2, . . . , n (the non-virtual agents). 5.3  Proof of Theorem 4 The proof is identical to that of Theorem 3 up to (19), which tell us that 2ρ kd[bk ]k α n C3 α2 2C1 C4 [bk ] + + α, 1−q n kx[bk+1 ] − x? k2 ≤ kx[bk ] − x? k2 + (τ proc αL)2 − + C2 αq bk where, once again for the sake of a contradiction, we have assumed that lim inf F (x[k]) := m? ≥ β := F (x? ) + Lρ. k→∞ We see that this implies ρ ≤ kx[k] − x? k (k ∈ N). (28) Since, by assumption, the step-size satisfies α≤ ((n − 1)(τ proc − 1))3 L2 mC1 = C3 proc proc 2 2nm((τ L) + 1−q ) 2n((τ L)2 + 18 C3 1−q ) ρ2 , it follows from (28) and (20) that the step-size also satisfies   mC1 ? 1 2 α ≤ proc kx − x[bk ]k , C3 2n (τ L)2 + 1−q = ρ kd[bk ]k − C1 L m mC1 ? 2 kx  C3 (τ proc L)2 + 1−q n ≤ kd[bk ]k + 1  n (τ proc L)2 + C3 1−q − x[bk ]k2 ,  (ρ kd[bk ]k − C1 C4 [bk ]) . Therefore, using (21), we have  α ≤ kx[bk ] − x? k2 − kx[bk+1 ] − x? k2 + C2 αq bk . n (29) Summing (29) over the subsequence, noticing that we have a telescoping sum on the right hand side, gives ` X C2 α ≤ kx[b0 ] − x? k2 + α < ∞. n 1−q k=0 This is a contradiction; hence m? < β, and therefore lim inf k→∞ m kx[k] − x? k2 ≤ lim inf F (x[k]) − F (x? ) k→∞ 2 C1 L2 < β − F (x? ) = , m (30) (31) where (30) follows from the strong convexity of the global objective, and (31) is a result of the contradiction. Making use of (31) and Corollary 1.1, it follows that lim inf kzi [k + 1] − x? k < k→∞ αCL L p proc + 2(τ − 1)(n − 1). 1−q m  5.4 Proof of Theorem 5 The proof is also identical to that of Theorem 3 up to (19), which tells us that kx[bk+1 ] − x? k2 ≤ kx[bk ] − x? k2 + (τ proc αL)2 + C2 αq bk − 2ρ kd[bk ]k C3 α 2 α+ , n 1−q where here we have arbitrarily defined ρ > 0, and assumed, for the sake of a contradiction, that lim inf F (x[k]) := m? ≥ β := F (x? ) + Lρ. k→∞ Since, by assumption, the step-size satisfies α≤ mρ2 n((τ proc L)2 + 19 C3 1−q ) , it follows from (28) and (20) that the step-size also satisfies α≤ ρ kd[bk ]k . C3 proc n((τ L)2 + 1−q ) (32) Therefore, using (32), we have mρ2 α ≤ kx[bk ] − x? k2 − kx[bk+1 ] − x? k2 + C2 αq bk . n (33) Summing (33) over the subsequence and noticing that we have a telescoping sum on the right hand side, gives ` mρ2 X C2 α ≤ kx[b0 ] − x? k2 + α < ∞. n 1−q k=0 This is a contradiction; hence m? < β, and therefore lim inf k→∞ m kx[k] − x? k2 ≤ lim inf F (x[k]) − F (x? ) k→∞ 2 < β − F (x? ) = Lρ, (34) (35) where (34) follows from the strong convexity of the global objective, and (35) is a result of the contradiction. Making use of (35) and Corollary 1.1, it follows that r αCL 2Lρ ? lim inf kzi [k + 1] − x k < + . k→∞ 1−q m  6 Experiments Next we report experiments on a high performance computing cluster. The 2 and 4 agent network topologies are fully connected; all other network topologies are randomly generated from the Erdős-Rényi model with an edge probability of 4/(n − 1), where n is the number of agents. Our implementations are made available to the community7 — the Intel-MPI distribution is used with Python bindings (mpi4py) for message passing. A regularized multinomial logistic regression classifier is trained on the Covertype dataset [22] available from the UCI repository. Here the objective is to minimize, over model parameters w, the negative log-likelihood loss function: F (w) := − D X K X l=1 j=1 log exp(wjT xl ) PK T l j 0 =1 exp(wj 0 x ) !yjl + λ kwkF , 2 (36) where D = 581012 is the number of training instances in the dataset, K = 7 is the number of classes, xl ∈ R54 and y l ∈ R7 correspond to the lth training instance feature and label vectors respectively (the label vectors are represented using a 1-hot encoding), w ∈ R7×54 are the model parameters, and λ > 0 is a regularization parameter. We take λ = 10−4 in the experiments. The 54 features 7 https://github.com/MidoAssran/maopy 20 Time to Training Error:0.01 2200 2200 Asynch-SP Synch-SP PD 2000 1800 1800 1600 1600 1400 1400 1200 1000 Asynch-SP Synch-SP PD 2000 Time (s) Time (s) Time to Training Error:0.01 with Artificial Delay 1200 1000 800 800 600 600 400 400 200 200 0 0 0 10 20 30 40 Number of Agents 50 60 0 10 20 30 40 Number of Agents 50 60 Figure 4: Time t[k] (seconds) at which F (x[k]) − F (x? ) < 0.01 is satisfied for the first time. The plot on the left corresponds to normal operating conditions. The plot on the right correspond to experiments with an artificial 500ms delay induced at agent v2 at each of its local iterations. The asynchronous algorithm reaches the threshold residual error faster than the state-of-the-art methods. Extra-Push is not shown because, in several cases, we were not able to find a step-size that enabled the method to achieve the target residual error in under 4000s; this is consistent with the observations in [29] where, in some cases, there were no step-sizes that lead to convergence. consist of a mix of categorical (binary 1 or 0) features and real numbers. We whiten the noncategorical features by subtracting the mean and dividing by the standard deviation. We compare the proposed Asynchronous Subgradient-Push (Asynch-SP) algorithm with three baselines: Push DIGing (PD) [29], Extra Push (EP) [41], and Synchronous Subgradient-Push (Synch-SP) [30]. We tuned the step-sizes separately for each algorithm using a simple grid-search over the range α ∈ [10−3 , 101 ]; for all algorithms, the (constant) step-size α = 1.0 gave the best performance. In each n-agent multi-agent network, the D data samples are evenly partitioned among the n agents. Since the total number of samples D is fixed, the problem is considered to have a fixed computational workload; that is, as we increase the size of the multi-agent network, the computational load per agent decreases. The local objective function fi at agent vi is similar to that in (36) but the sum over l only involves those training instances assigned to agent vi . Fig. 4 shows how the individual algorithms scale with the network size as we keep the average out-degree of each agent fixed (i.e., larger networks correspond to sparser topologies). Increasing the network size appears to exhibit a sub-geometric improvement in the optimization time.8 Fig. 4 also shows that the asynchronous subgradient algorithm actually decreases the residual error for both small and large network sizes faster than the state-of-the art methods and its synchronous counterpart. This behaviour is even more pronounced if one of the agents in the network works at a slower pace than the others. In particular, the asynchronous algorithm appears to be more robust than the synchronous algorithms to failing or stalling nodes. Fig. 5 shows the residual error of the algorithms for different network sizes with an artificial delay induced at agent v2 at each iteration. The synchronous algorithms experience a significant slowdown relative to the asynchronous algorithm, which is much less affected. This observation is also clear from Fig. 4, 8 The question of how to choose the optimal number of agents for a given distributed optimization problem is studied in [33]. 21 Training Error:64nodes with Artificial Delay Asynch-SP Synch-SP PD 10−1 10−1 10−2 0 50 100 150 200 Time (s) 250 300 10−1 10−2 10−2 0 50 100 150 200 Time (s) 250 300 10−2 0 100 200 300 Time (s) 400 500 (a) Training Error:16nodes with Artificial Delay Training Error:8nodes Asynch-SP Synch-SP PD 10−1 10−2 100 200 300 400 Time (s) 500 600 400 500 10−1 10−2 0 100 200 300 400 Time (s) 500 600 Asynch-SP Synch-SP PD 100 10−1 10−2 0 200 300 Time (s) Training Error:8nodes with Artificial Delay Asynch-SP Synch-SP PD 100 F (x(t)) − F (x? ) 100 F (x(t)) − F (x? ) F (x(t)) − F (x? ) 10−1 100 F (x(t)) − F (x? ) Asynch-SP Synch-SP PD 0 (b) Training Error:16nodes 100 Asynch-SP Synch-SP PD 100 F (x(t)) − F (x? ) 10−1 Training Error:32nodes with Artificial Delay Asynch-SP Synch-SP PD 100 F (x(t)) − F (x? ) F (x(t)) − F (x? ) Training Error:32nodes Asynch-SP Synch-SP PD 100 F (x(t)) − F (x? ) Training Error:64nodes 100 10−2 0 200 400 Time (s) (c) 600 800 0 200 400 Time (s) 600 800 (d) Figure 5: Multinomial logistic regression training error on the covertype dataset using large multiagent networks. Left subplots in each figure correspond to normal operating conditions. Right subplots correspond to experiments with an artificial 500ms delay induced at agent v2 at each of its local iterations. The asynchronous algorithm appears to be more robust than the synchronous algorithms to failing or stalling nodes. Table 1: Statistics concerning the time taken by agent v1 to perform an update in the reported experiments. # agents 2 4 8 16 32 64 Mean time (s) 0.831 0.295 0.140 0.103 0.032 0.013 Max. time (s) 1.095 0.321 0.184 0.144 0.079 0.035 Min. time (s) 0.628 0.285 0.136 0.062 0.020 0.010 where the time to reach a threshold error is plotted. From Table 1 we can see that a 500ms delay experienced by at least one agent in the 2 agent network at each iteration is a relatively plausible occurrence. In larger multi-agent networks, such as the 32 or 64 multi-agent networks, a 500ms delay is relatively extreme since there could be more than 3500 events (updates by individual agents) in the time it takes the 500ms artificially delayed agent to perform just a single update (cf. Table 1). The fact that the asynchronous algorithm is still able to converge in this scenario (in one tenth of the time taken by the state-of-the-art methods) is a testament to its robustness. 22 7 Conclusion Even though our analyses are presented for static communication graphs, they actually hold trivially for time-varying communication graphs so long as the graph sequence is B-strongly connected for some finite B. This B-strongly connected property is necessary to ensure that the asymptotic product of the consensus matrices is SIA. While extending synchronous Subgradient-Push to an asynchronous implementation has produced considerable performance improvements, it remains the case that Subgradient-Push is simply a multi-agent analog of gradient descent, and it would be interesting to explore the possibility of extending other algorithms to asynchronous operation using singly-stochastic consensus matrices; e.g., exploring methods that use an extrapolation between iterates to accelerate convergence; or quasi-newton methods that approximate the Hessian using only first-order information; or Lagrangian-dual methods that formulate the consensus constrained optimization problems using the Lagrangian, or Augmented Lagrangian, and simultaneously solve for both primal and dual variables. Furthermore, it would be interesting to establish convergence rates for asynchronous versions of these algorithms. References [1] M. Assran. Asynchronous subgradient push: Fast, robust, and scalable multi-agent optimization. Master’s thesis, McGill University, 2018. [2] M. Assran and M. Rabbat. An empirical comparison of multi-agent optimization algorithms. In Proceedings of the IEEE Global Conference on Signal and Information Processing, pages 573–577. IEEE, 2017. [3] A. Aytekin. Asynchronous Algorithms for Large-Scale Optimization: Analysis and Implementation. PhD thesis, KTH Royal Institute of Technology, 2017. [4] F. Bénézit, V. Blondel, P. Thiran, J. Tsitsiklis, and M. Vetterli. Weighted gossip: Distributed averaging using non-doubly stochastic matrices. In Proceedings of the IEEE International Symposium on Information Theory, pages 1753–1757. IEEE, 2010. [5] D. P. Bertsekas and J. N. Tsitsiklis. Parallel and distributed computation: numerical methods, volume 23. Prentice hall Englewood Cliffs, NJ, 1989. [6] P. Bianchi, W. Hachem, and F. Iutzeler. A coordinate descent primal-dual algorithm and application to distributed asynchronous optimization. IEEE Transactions on Automatic Control, 61(10):2947–2957, 2016. [7] S. Boyd, A. Ghosh, B. Prabhakar, and D. Shah. Randomized gossip algorithms. IEEE/ACM Transactions on Networking (TON), 14(SI):2508–2530, 2006. [8] L. Cannelli, F. Facchinei, V. Kungurtsev, and G. Scutari. Asynchronous parallel algorithms for nonconvex big-data optimization. part ii: Complexity and numerical results. arXiv preprint arXiv:1701.04900, 2017. [9] T. Charalambous, Y. Yuan, T. Yang, W. Pan, C. N. Hadjicostis, and M. Johansson. Distributed finite-time average consensus in digraphs in the presence of time delays. IEEE Transactions on Control of Network Systems, 2(4):370–381, 2015. 23 [10] J. Dean and L. A. Barroso. The tail at scale. Communications of the ACM, 56(2):74–80, 2013. [11] A. G. Dimakis, S. Kar, J. M. Moura, M. G. Rabbat, and A. Scaglione. Gossip algorithms for distributed signal processing. Proceedings of the IEEE, 98(11):1847–1864, 2010. [12] M. Eisen, A. Mokhtari, and A. Ribeiro. Decentralized quasi-newton methods. IEEE Transactions on Signal Processing, 65(10):2613–2628, 2017. [13] W. Gropp, E. Lusk, N. Doss, and A. Skjellum. A high-performance, portable implementation of the mpi message passing interface standard. Parallel computing, 22(6):789–828, 1996. [14] C. N. Hadjicostis and T. Charalambous. Average consensus in the presence of delays in directed graph topologies. IEEE Transactions on Automatic Control, 59(3):763–768, 2014. [15] J. Hajnal and M. Bartlett. Weak ergodicity in non-homogeneous markov chains. Mathematical Proceedings of the Cambridge Philosophical Society, 54(2):233–246, 1958. [16] M. T. Hale, A. Nedich, and M. Egerstedt. Asynchronous multi-agent primal-dual optimization. IEEE Transactions on Automatic Control, 2017. [17] F. Iutzeler, P. Bianchi, P. Ciblat, and W. Hachem. Asynchronous distributed optimization using a randomized alternating direction method of multipliers. In Proceedings of the 52nd IEEE Annual Conference on Decision and Control, pages 3671–3676. IEEE, 2013. [18] D. Kempe, A. Dobra, and J. Gehrke. Gossip-based computation of aggregate information. In Proceedings of the 44th Annual IEEE Symposium on Foundations of Computer Science., pages 482–491. IEEE, 2003. [19] S. Kumar, R. Jain, and K. Rajawat. Asynchronous optimization over heterogeneous networks via consensus admm. IEEE Transactions on Signal and Information Processing over Networks, 3(1):114–129, 2017. [20] S. Li and T. Basar. Asymptotic agreement and convergence of asynchronous stochastic algorithms. IEEE Transactions on Automatic Control, 32(7):612–618, 1987. [21] X. Lian, Y. Huang, Y. Li, and J. Liu. Asynchronous parallel stochastic gradient for nonconvex optimization. In Advances in Neural Information Processing Systems, pages 2737–2745, 2015. [22] M. Lichman. UCI machine learning repository, 2013. [23] F. Mansoori and E. Wei. Superlinearly convergent asynchronous distributed network newton method. arXiv preprint arXiv:1705.03952, 2017. [24] A. Nedic. On the rate of convergence of distributed subgradient methods for multi-agent optimization. In Proceedings of the 46th IEEE Conference on Decision and Control, pages 4711–4716. IEEE, 2007. [25] A. Nedic. Asynchronous broadcast-based convex optimization over a network. IEEE Transactions on Automatic Control, 56(6):1337–1351, 2011. [26] A. Nedić. Distributed optimization. Encyclopedia of Systems and Control, pages 308–317, 2015. 24 [27] A. Nedić and A. Olshevsky. Stochastic gradient-push for strongly convex functions on timevarying directed graphs. IEEE Transactions on Automatic Control, 61(12):3936–3947, 2016. [28] A. Nedić, A. Olshevsky, and M. G. Rabbat. Network topology and communicationcomputation tradeoffs in decentralized optimization. arXiv preprint arXiv:1709.08765, 2017. [29] A. Nedić, A. Olshevsky, and W. Shi. Achieving geometric convergence for distributed optimization over time-varying graphs. SIAM Journal on Optimization, 27(4):2597–2633, 2017. [30] A. Nedich and A. Olshevsky. Distributed optimization over time-varying directed graphs. IEEE Transactions on Automatic Control, 60(3):601–615, 2015. [31] M. G. Rabbat and K. I. Tsianos. Asynchronous decentralized optimization in heterogeneous systems. In Proceedings of the 53rd IEEE Annual Conference on Decision and Control, pages 1125–1130. IEEE, 2014. [32] S. S. Ram, A. Nedić, and V. V. Veeravalli. Distributed stochastic subgradient projection algorithms for convex optimization. Journal of optimization theory and applications, 147(3):516– 545, 2010. [33] K. Tsianos, S. Lawlor, and M. G. Rabbat. Communication/computation tradeoffs in consensusbased distributed optimization. In Advances in neural information processing systems, pages 1943–1951, 2012. [34] K. I. Tsianos, S. Lawlor, and M. G. Rabbat. Consensus-based distributed optimization: Practical issues and applications in large-scale machine learning. In Proceedings of the 50th Annual Allerton Conference on Communication, Control, and Computing, pages 1543–1550. IEEE, 2012. [35] K. I. Tsianos, S. Lawlor, and M. G. Rabbat. Push-sum distributed dual averaging for convex optimization. In Proceedings of the 51st IEEE Conference on Decision and Control, pages 5453–5458, 2012. [36] J. Tsitsiklis, D. Bertsekas, and M. Athans. Distributed asynchronous deterministic and stochastic gradient optimization algorithms. IEEE Transactions on Automatic Control, 31(9):803–812, 1986. [37] E. Wei and A. Ozdaglar. On the o (1= k) convergence of asynchronous distributed alternating direction method of multipliers. In Proceedings of the IEEE Global Conference on Signal and Information Processing, pages 551–554. IEEE, 2013. [38] J. Wolfowitz. Products of indecomposable, aperiodic, stochastic matrices. Proceedings of the American Mathematical Society, 14(5):733–737, 1963. [39] T. Wu, K. Yuan, Q. Ling, W. Yin, and A. H. Sayed. Decentralized consensus optimization with asynchrony and delays. In Proceedings of the 50th Asilomar Conference on Signals, Systems and Computers, pages 992–996. IEEE, 2016. [40] C. Xi and U. A. Khan. Dextra: A fast algorithm for optimization over directed graphs. IEEE Transactions on Automatic Control, 2017. [41] J. Zeng and W. Yin. Extrapush for convex smooth decentralized optimization over directed networks. arXiv preprint arXiv:1511.02942, 2015. 25
3cs.SY
On Hilbert Transform, Analytic Signal, and Modulation Analysis for Signals over Graphs Arun Venkitaraman, Saikat Chatterjee, Peter Händel arXiv:1611.05269v3 [cs.IT] 29 Jan 2018 Department of Information Science and Engineering, School of Electrical Engineering and ACCESS Linnaeus Center KTH Royal Institute of Technology, SE-100 44 Stockholm, Sweden . Abstract We propose Hilbert transform and analytic signal construction for signals over graphs. This is motivated by the popularity of Hilbert transform, analytic signal, and modulation analysis in conventional signal processing, and the observation that complementary insight is often obtained by viewing conventional signals in the graph setting. Our definitions of Hilbert transform and analytic signal use a conjugate-symmetry-like property exhibited by the graph Fourier transform (GFT), resulting in a ’one-sided’ spectrum for the graph analytic signal. The resulting graph Hilbert transform is shown to possess many interesting mathematical properties and also exhibit the ability to highlight anomalies/discontinuities in the graph signal and the nodes across which signal discontinuities occur. Using the graph analytic signal, we further define amplitude, phase, and frequency modulations for a graph signal. We illustrate the proposed concepts by showing applications to synthesized and real-world signals. For example, we show that the graph Hilbert transform can indicate presence of anomalies and that graph analytic signal, and associated amplitude and frequency modulations reveal complementary information in speech signals. Keywords: Graph signal, analytic signal, Hilbert transform, demodulation, anomaly detection. Email addresses: [email protected] (Arun Venkitaraman), [email protected] (Saikat Chatterjee), [email protected] (Peter Händel) Preprint submitted to Signal Processing 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0 0 (a) (b) Figure 1: Anomaly highlighting behavior of the graph Hilbert transform for 2D image signal graph. (a) image, and (b) graph Hilbert transform. We observe that the graph Hilbert transform highlights edges or sudden jumps across connected pixels. 1. Introduction The analysis of data over networks or graphs poses unique challenges to the signal processing community, since data must be seen with due regard to the connections between various data points or nodes of a graph [1–3]. Given the wealth of techniques and models in conventional signal analysis, it is desirable to extend existing concepts to signals over graphs[4–6]. The collective efforts along this line of thought have led to the emergence of the notion of signal processing over graphs [2, 3, 7, 8]. In this paper, we generalize the concepts of Hilbert transform, analytic signal, and modulation analysis to signals over graphs. This is motivated by two observations. Firstly, Hilbert transform, analytic signal, and associated modulation analysis have been used extensively for one-dimensional (1D) and two-dimensional (2D) signals in various applications[9– 17]. By extending modulation analysis to graphs, we endeavour to provide similar tools for signals over graphs. Secondly, viewing of 1D /2D signals in a graph setting has been shown to give additional insight into the signals, leading to improved performance in tasks such as compression and denoising[3, 18]. 2 1.1. Review of literature Some of the early works in graph signal processing include windowed Fourier transforms [19], filterbanks[20, 22], wavelet transforms and multiresolution representations for graphs[23–27]. A number of strategies for efficient sampling of signals over graphs have been proposed [28–34]. The notions of stationarity and power spectral density have also been considered extensively for signals over graphs [35–37]. A parametric dictionary learning approach for graph signals was proposed by Thanou et al.[38]. In [39], Shuman et al. generalized the notion of time-frequency analysis to the graph setting using windowed graph Fourier transforms. Shahid et al. proposed variants of principal component analysis for graph signals and developed scalable and efficient algorithms for recovery of low-rank matrices[40, 41]. Tremblay et al. proposed an efficient spectral clustering algorithm based on graph signal filtering[42]. In [43], Benzi et al. developed a song recommendation system based non-negative matrix factorization and graph total variation. Shuman et al. proposed a multi-scale pyramid transform on graphs that generates a multiresolution of both the graph and the signal[44]. Segarra et al. proposed convex optimization based approaches for blind identification of graph filters [45, 46]. Chen et al. considered signal recovery on graphs based on total-variation minimization formulated as a convex optimization problem[47]. Sakiyama et al. proposed spectral graph wavelets and filterbanks constructed as sum of sinusoids in spectral domain with low approximation error[48]. Deutsch et al. showed the application of spectral graph wavelets to manifold denoising[49]. A trilateral filter based denoising scheme was proposed by Onuki et al. [50]. Multirate signal processing concepts including M -channel filter banks were extended to the graph setting by Teke and Vaidyanathan[4]. Kernel regression approaches for reconstruction of graph signals have also been recently proposed in the framework of reproducing kernel Hilbert spaces [51]. Mendes et al. proposed a general framework for transforms for graph signals where they considered extension of tomograms to the 3 graph signal setting [52]. A fast algorithm for implementation of vertex-frequency representations for graphs was developed by Jestrovic et al in [53]. They also developed an optimized vertex-frequency representation for investigating brain characteristics during consecutive swallows[54]. Kotzagiannidis and Dragotti extended the notion of finiterate-of-innovations to circulant graphs [55] and also considered splines and wavelets for circulant graphs [56]. 1.2. Our contributions 1 In this paper, we propose definitions for the Hilbert transform and analytic sig- nal for real signals over graphs2 . We show that a real graph signal with a real-valued adjacency matrix may be represented using fewer number of GFT coefficients than the signal length, akin to the ‘one-sided’ spectrum for 1D signals. We generalize the Hilbert transform and analytic signal construction [58] to graph signals by using the conjugate-symmetry-like property of the GFT basis. We also show that graph Hilbert transform and graph analytic signal inherit properties such as isometry, phase-shifting, and orthogonality from their 1D counterparts. We discuss how the graph Hilbert transform does not possess a Bedrosian-type property in general unlike its conventional counterpart. As a natural consequence of the graph Hilbert transform construction, we propose amplitude, phase, and frequency modulations for graph signals. We illustrate the concepts with applications to synthesized and real-world signals. Our experiments show that graph Hilbert transform can reveal edge connections and presence of anomalies in many graphs of interest. As an applicaton of the graph amplitude and frequency modulations, we also demonstrate that viewing the speech signal as a graph signal brings improves speaker classification performance. We summarize the key similarities and differences between the conventional Hilbert transform/analytic signal and our 1 The codes related to our article may be found at https://www.kth.se/ise/research/reproducibleresearch1.433797. 2 Part of this work has appeared in the Proceedings of the Sampling Theory and Applications Conference, 2015 [57]. 4 Hilbert transform/analytic signal Linear and shift invariant Highlights signal edges Quadrature phase-shifting Changes with permutation of samples Bedrosian property One-sided spectrum Special case of graph Hilbert transform/graph analytic signal Graph Hilbert transform/analytic signal Linear and graph-shift-invariant Highlights graph anomalies Generalized quadrature phase-shifting Invariant to node permutations Lacks Bedrosian property Near one-sided spectrum Added insight into 1D signals Table 1: Key similarities and differences between conventional Hilbert transform/ analytic signal and proposed graph Hilbert transform/analytic signal. graph Hilbert transform/graph analytic signal in Table 1. 2. Preliminaries 2.1. Graph signal processing Let x ∈ RN be a real signal on the graph G = (V, A), where V and A ∈ RN ×N denote the node set and the adjacency matrix, respectively. Then, the GFT of x is defined as[7, 8]: x̂ , [x̂(1), x̂(2), . . . , x̂(i), . . . , x̂(N )]> = V−1 x, where V denotes the matrix of generalized eigenvectors as columns (hereafter refered to simply as the eigenvectors) such that the Jordan decomposition of A is given by A = VJV−1 , and J is the matrix of Jordan blocks of the eigenvalues of A. In the case when A is diagonalizable, J becomes the diagonal eigenvalue matrix J = diag(λ1 , λ2 , · · · , λN ). A periodic 1D signal may be viewed as a graph signal x with adjacency matrix  A=C      ,       0 1 0 ··· 0 0 .. . 0 .. . 1 .. . ··· .. . 0 1 0 0 ··· 0 5        ,      and the GFT coincides with the discrete Fourier transform (DFT)[2, 59]. The smoothness of a graph signal is often measured in terms of the following meankx − Axk22 squared cost: MSg (x) = . A graph signal with low MSg is smooth over kxk22 the graph: connected nodes have signal values close to each other, stronger the edge, closer the values. A unit shift of x over the graph is defined as Ax, generalizing unit delay for the 1D graphs. A linear shift-invariant filter H on graph is defined as a polynomial h(·) of the PL adjacency matrix, such that H = l=0 hl Al = h(A), where hl ∈ R and L ≤ N . Such a filter also follows the convolution property: the GFT coefficients of filtered graph signal y = Hx are obtained by scaling the GFT coefficients of input x: ŷ = h(J)x̂. Graph filters are used in spectral analysis and processing of graph signals and have been applied in various applications [4, 7, 8, 45, 60]. 2.2. The conventional analytic signal Let x̂(ω) denote the DFT of the real 1D signal x evaluated at frequency ω. Then, the discrete analytic signal of x, denoted by xa,c , has the following frequency-domain definition [58, 61, 62]: x̂a,c (ω) =      2x̂(ω), ω ∈ 2π ,··· ,π −  N    x̂(ω), ω ∈ {0, π}     n   0, ω ∈ π + 2π , · · · , N 2π N 2π(N −1) N (1) o . Taking the inverse DFT on both sides of (1), we get that xa,c = x + jxh,c , where √ j = −1 and xh,c is known as the discrete Hilbert transform of x [61]. The graph Hilbert transform has the following frequency-domain specification: x̂h,c (ω) =      −jx̂(ω), ω ∈ 2π ,··· ,π −  N    x̂(ω), ω ∈ {0, π}     n   +jx̂(ω), ω ∈ π + 6 2π ,··· N , 2π N (2) 2π(N −1) N o . 3. Graph Analytic Signal We next define an analytic signal for signals over graphs. In our analysis, we make the following assumptions: (1) A is real and asymmetric with atleast one conjugate-pair of eigenvalues. (2) The Jordan (or eigen) decomposition of A is such that J has Jordan blocks arranged in the ascending order of phase angle of the eigenvalues from 0 to 2π. If multiple eigenvalues with same phase angle occur, we order them in the descending order of their magnitude. We recall that the eigenvalues of a real-valued matrix, and the corresponding eigenvectors or generalized eigenvectors are either real-valued or occur in complex-conjugate pairs[63]. Let K1 and K2 denote the number of real-valued positive and negative eigenvalues including repeated eigenvalues of A, respectively, and K = K1 + K2 . Let us define the sets: Γ1 = {1, · · · , K1 } (positive real eigenvalues), Γ2 = {K1 + 1, · · · , K1 + Γ3 = {K1 + N −K 2 N −K 2 } (eigenvalues with phase angle in (0, π)), + 1, · · · , N +K } (negative real eigenvalues), 2 Γ4 = { N +K + 1, · · · , N } (eigenvalues with phase angle in (π, 2π)), 2 and denote the vector spaces spanned by the corresponding eigenvectors by V1 , V2 , V3 , and V4 , respectively. For example, V1 is the space spanned by the eigenvectors related to Γ1 . On ordering as per Assumption 2, we have that for every ith eigenvector A such that i ∈ Γ2 , there exists an eigenvector indexed by i ∈ Γ4 that share a complexconjugate relationship, that is, vi = vi∗0 , i ∈ Γ2 , i0 ∈ Γ4 . 7 In particular, for the case of all distinct eigenvalues, we have that ∗ vi = v(N −i+K1 +1) , i ∈ Γ2 . Then, as a consequence of the complex-conjugate relationship, we have: x̂(i) = x̂∗ (i0 ), i ∈ Γ2 , i0 ∈ Γ4 . (3) For real-valued A, N and K are always of the same parity (odd or even). In the case of 1D signals, (3) reduces to the conjugate-symmetry property of the DFT[61]. Equation (3) indicates that a real graph signal can be represented using θ GFT coefficients, where θ = |Γ1 | + |Γ2 | + |Γ3 | = (N + K)/2, and |Γ| denotes the cardinality of the set Γ. For K  N , θ ≈ N/2. We note that (3) holds only if x is real, which means that a graph signal which does not satisfy (3) is necessarily complex-valued. Motivated by (3) and conventional analytic signal construction, we next define the graph analytic signal and graph Hilbert transform. Definition. We define the graph analytic signal of x as xa = Vx̂a , where     2x̂(i), i ∈ Γ2    x̂a (i) = x̂(i), i ∈ Γ1 ∪ Γ3 .      0, i ∈ Γ4 As a consequence of the ’one-sidedness’ of the GFT spectrum, we have that xa is complex and hence, is expressible as xa = x + j xh . We define xh as the graph Hilbert transform of x such that    +x̂(i), i ∈ Γ2     jx̂h (i) = 0, i ∈ Γ1 ∪ Γ3 .       −x̂(i), i ∈ Γ4 (4) On setting A = C, we observe that (4) reduces to the conventional Hilbert trans8 λ4 λ3 λ2 λ5 λ1 λ7 |λ|max λ6 1 x̂ 0 -|λ|max λ8 0 1 2 3 4 5 6 7 Graph frequencies (a) 8 (b) 1 0 1 2 3 4 5 6 7 8 x̂a jx̂h 2 1 0 -1 1 Graph frequencies (c) 2 3 4 5 6 7 Graph frequencies 8 (d) Figure 2: Illustration of graph analytic signal and graph Hilbert transform. (a) Eigenvalues of A, (b) GFT of signal x, (c) GFT of jxh , and (d) GFT of xa . In this case, Γ1 = {1}, Γ2 = {2, 3, 4}, Γ3 = {5}, and Γ4 = {6, 7, 8}. form/analytic signal definitions given by (1) and (2), that is, xa = xa,c and xh = xh,c  since the ith graph frequency is equal to ejωi where ωi ∈ 0, 2π N , · · · , π . This corresponds to Γ1 = {1}, Γ2 = {2, · · · , N/2 − 1}, Γ3 = {N/2}, and Γ3 = {N/2 + 1, · · · , N −1} for even N . For odd N , this corresponds to Γ1 = {1}, Γ2 = {2, · · · , (N + 1)/2}, Γ3 = {}, and Γ4 = {(N + 1)/2 + 1, · · · , N − 1}. As an illustration of the graph analytic signal construction, consider a graph with an adjacency matrix with eigenvalues distributed according to Figure 2(a). Let us consider a signal x having unit GFT magnitude for all the graph frequencies. Then, graph Hilbert transform of x has the GFT spectrum shown in Figure 2(c) since Γ1 = {1}, Γ2 = {2, 3, 4}, Γ3 = {5}, and Γ4 = {6, 7, 8}. The corresponding graph analytic signal has the GFT spectrum shown in Figure 2(d). 9 Graph 1D graph, odd N 1D graph, even N Entries drawn N (0, 1) or U[−1, 1]or Bernoulli {−1, 1} Number of real eigenvalues 1 2 q 2N π (asymptotic expected value) θ N 2 N +1 2 N +2 2q + N 2π Table 2: θ value for some graphs of interest. 3.1. One-sided spectrum of the graph analytic signal The exact number of nonzero values in the graph analytic signal depends on the adjacency matrix A. In the case when all the eigenvalues of A are complex (K = 0), the number of non-zero coefficients in x̂a is exactly one half of the total resulting in a one-sided spectrum, that is, θ = N/2. We list the θ values for the 1D graph and random graphs Table 2. For asymmetric matrices with entries drawn from independently and identical distributed (IID) mean zero unit variance Gaussian distribution N (0, 1), the fraction of real eigenvalues asymptotically tends to zero [64]. This was also shown to hold experimentally for matrices with independent and identically districuted entries from the uniform distribution over [−1, 1]: U[−1, 1], and Bernoulli {−1, 1} entries[64, 65]. We note here that adjacency matrix with Bernoulli entries represents the Erdős Rényi model for small-world graphs3 . This implies that the corresponding graphs with adjacency matrices drawn from these distributions asymptotically have one-sided graph analytic signal spectrum. Since the Gaussian random matrix is a good approximation to general random matrices in terms of spectral properties, one can conclude that, on an average, asymmetric matrices have mostly complex-valued eigenvalues . This in turn indicates that most directed graphs have graph analytic signal with approximately ’one-sided’ spectrum. 3 The Erdős Rényi model is a popular model for small-world random graphs [66]. 10 3.2. Discussions on graph analytic signal and graph Hilbert transform We next show that the graph Hilbert transform xh of a real graph signal x is real. Since xh = Vx̂h , we have that P P P x̂(i)vi −  P P = i∈Γ2 (x̂(i)vi − x̂∗ (i)vi∗ ) = 2 j= i∈Γ2 x̂(i)vi , jxh = i∈Γ2 jx̂h (i)vi + i∈Γ4 jx̂h (i)vi = i∈Γ2 P i∈Γ4 x̂(i)vi (5) where vi denotes the ith column of V, and =(a) denotes the imaginary part a. The third equality in (5) follows because the eigenvectors indexed by Γ2 and Γ4 form complex conjugates. Thus, jxh is purely imaginary which in turn means that x = <(xa ), where <(a) denotes the real part of a. We express (4) as x̂h = Jh x̂, or xh , H{x} = VJh V−1 x, (6) where Jh is the diagonal matrix with ith diagonal element: Jh (i) =    −j,     i ∈ Γ2 0, i ∈ Γ1 ∪ Γ3 .       +j, i ∈ Γ4 (7) Proposition 1. The graph Hilbert transform is a linear shift-invariant graph filtering operation for diagonalizable graphs. Proof. From (6), we have that xh = VJh V−1 x = Hx, where H = VJh V−1 . By definition, graph filter H is linear and shift-invariant if for any graph filter of the form PM M = i=0 mi Ai = m(A), M ≤ N we have HMx = MHx, which in turn means that H should be a polynomial of M, or equivalently, of A. Since A = VJV−1 , we have that M = Vm(J)V−1 . Let y denote the output of filter M for the input x: y = Mx. Then, we have that ŷ , V−1 y = V−1 Mx = m(J)x̂. Since x̂h = Jh x̂, 11 we get that ŷh = Jh ŷ = Jh m(J) x̂ = m(J) Jh x̂ = m(J) x̂h , (8) where we use the commutativity of the diagonal matrices m(J) and Jh (J is a diagonal because A is diagonalizable.) Taking inverse GFT on both sides of (8), we get that yh , Hm(A)x = m(A)xh = m(A)Hx. The graph Hilbert transform being a shift-invariant filter means that there exists a PL polynomial h(x) = i=0 hi xi such that H = h(A). The coefficients are evaluated by noting that H modifies the spectrum of the graph signal with constant spectrum of unit amplitude as specified in (4). In other words, we solve for  hi s such that the ith    0, i ∈ Γ1 ∪ Γ3    . component c(i) of the vector c = h(J)1N is given by c(i) = −j, i ∈ Γ2      +j i ∈ Γ4 . Since ci = h(λi ) in the case of a diagonal J, hi s are obtained by solving: h0 + h1 λi + · · · + hL λL i = h0 + h1 λi + · · · + hL λL i = −j, i ∈ Γ2 h0 + h1 λi + · · · + hL λL i = i ∈ Γ4 . 0, +j, i ∈ Γ1 ∪ Γ3 (9) The solution of (9) obtained by setting A = C and L = N is the impulse response of the discrete Hilbert transform. In order to avoid ill-conditioning of (9), L is usually restricted to be much less than N . In Figure 3, we show the graph Hilbert transform computed using (9) for various values of L for the 1D signal graph. We observe from Figure 3(d) that as L is decreased, the spectrum of the graph Hilbert transform differs from the ideal case. This is because the corresponding columns of each graph shift (Ai ) are linearly independent and restricting the number of taps restricts the dimension of the signal space. 12 1 0.8 50 0.5 Imag Node 0.6 100 0.4 150 200 −0.5 0.2 50 100 150 Node 0 −1 −1 200 −0.5 (a) 0 Real 0.5 1 (b) 2 2 1 1.5 Amplitude Amplitude L=100 taps L=200 taps 0 Signal -1 L=100 taps 1 0.5 L=200 taps -2 0 0 50 100 150 200 50 100 150 200 Eigenvalue index Node (c) (d) Figure 3: 1D signal graph (a) A, (b) Eigenvalues of A, (c) Signal and its graph Hilbert transform computed using L = N and L = N/2, (d) GFT spectrum of graph Hilbert transform. 3.3. Some properties of graph analytic signal/graph Hilbert transform Let A, I, and H denote the graph analytic signal, identity, and graph Hilbert transform operators, respectively, such that xa = A{x}, xh = H{x} and A = I +jH. For x = ηf + η ∗ f ∗ such that f ∈ V2 ∪ V4 and η ∈ C, we have the following properties: 1. Graph-shift invariance: H{αAx} = αAH{x}, α ∈ C. 2. Superposition: For x1 , x2 ∈ V2 ∪V4 and α, β ∈ C, we have that H{αx1 +βx2 } = αH{x1 } + βH{x2 }. Proof: From (6), we have that for x = αx1 + βx2 H{x} = VJh V−1 {x} = VJh {αV−1 x1 + βV−1 x2 } = VJh {αx̂1 + β x̂2 } = V{αx̂1,h + β x̂2,h } = αH{x1 } + βH{x2 }, where x̂1,h and x̂2,h denote the GFT of H{x1 } and H{x2 }, respectively. 13 3. Phase-shifting action4 : For i ∈ Γ2 ∪ Γ4 : H{< (vi )} = = (vi ) , and H{= (vi )} = −< (vi ) . (10) Proof: Consider i ∈ Γ2 . Using the property 2, we have H{2< (vi )} = H{vi + vi∗ } = (jvi − jvi∗ ) = 2= (vi ) H{2j= (vi )} = H{vi − vi∗ } = (jvi + jvi∗ ) = 2j< (vi ) . The proof for i ∈ Γ4 follows similarly. Equation (10) generalizes the quadrature phase-shifting action of the discrete Hilbert transform Hc on sinusoids: Hc {cos(ωi n)} = Hc {<{vi }}(n) = sin(ωi n) = ={vi }(n), Hc {sin(ωi n)} = Hc {={vi }}(n) = − cos(ωi n) = −<{vi }(n), noting when A = C, vi = ej(ωi n) , where ωi = 2π(i−1) . N 4. Inverse: H2 = −I or, H−1 = −H. 2 2 Proof : From (6), we have x̂h = Jh x̂. Hence, the GFT  of H {x} is given by Jh x̂.  j2 = −1, i ∈ Γ2 ∪ Γ4 , which We have from (7) that Jh2 (i) = Jh (i)Jh (i) =  0, i ∈ Γ1 ∪ Γ3 shows that J2h x̂ = −x̂ for x ∈ V2 ∪ V4 . In other words, H2 {x} = −x which completes the proof. 5. Repeated operation: A2 {x} = (I + jH)2 {x} = 2A{x} and H4 {x} = x. (Follows from Property 4). 4 For simplicity, we use the same operator notation to denote the corresponding operation for both the signal seen as a vector and as a function of the node. For example, H{cos(ωn)} denotes the operator action directly on the function cos(ωn) evaluated at the nth node, whereas H{x} denotes the vector that comes out of applying the graph Hilbert transform operation on the signal x. In the case when x(n) = cos(ωn), we have H{x}(n) = H{cos(ωn)}. 14 6. Isometry: Since ∀i, |x̂h (i)| = |x̂(i)|, we have that kx̂h kp = kx̂kp , where kx̂kp = 1 P ( i |x̂(i)|p ) p is the `p norm of x̂, p ≥ 1, assuming kx̂kp < ∞, that is, x̂ ∈ `N p (C). In particular, kx̂h k22 = kx̂k22 = 21 kx̂a k22 . If V is unitary, kxh k22 = kxk22 = 21 kxa k22 . 7. Preservation of orthogonality: If V is unitary and x1 , x2 are orthogonal, hx1 , x2 i = 0, then hHx1 , Hx2 i = 0. Proof: Since V−1 is unitary, hx̂1 , x̂2 i = hx1 , x2 i. Then we have that hHx1 , Hx2 i = hV−1 Hx1 , V−1 Hx2 i = hJh x̂1 , Jh x̂2 i = hx̂1 , x̂2 i = hx1 , x2 i = 0. Since A = I + jH, properties 1 and 2 are also satisfied by A. Properties 1 to 7 do not hold if x has contribution from the subspaces V1 or V3 as H{x} = 0 for x ∈ V1 ∪ V3 . We note here that the ’one-sidedness’ and other properties of the graph analytic signal/graph Hilbert transform of a real signal x are decided entirely by the adjacency matrix A of the underlying graph. A real signal x may have a graph analytic signal xa with a larger number of nonzero GFT coefficients in one graph than in another graph. 3.4. On the graph Hilbert transform and the Bedrosian property We show a limitation of the graph Hilbert transform in this section. One of the important properties possessed by the conventional Hilbert transform (and its fractional versions [67]) is that it obeys the Bedrosian property, that is, if f and g are two signals with disjoint Fourier spectra (DFT or discrete-time FT, such that f is low-pass and g is high-pass, then we have that the Hilbert transform Hc satisfies Hc {f (n)g(n)} = f (n)Hc {g(n)}. ∀n As we show through experiments next, the graph Hilbert transform of a general graph does not possess the Bedrosian property. In our opinion, there are two important fac- 15 tors for this limitation. First, the point-wise product in the node domain does not correspond to a graph-frequency domain convolution (no definition for frequency domain convolution for graphs exists currently). Second, unlike the 1D case where the DFT basis is functionally related to the frequency (as the entries of the ith DFT column are given by complex exponentiation of the ith frequency to different powers), the GFT of a general graph usually is not related to its eigenvalues through analytical expressions. We demonstrate this by considering the jittered 1D signal modeled as a graph signal  with A      =       0 w1 0 ··· 0 0 .. . 0 .. . w2 .. . ··· .. . 0 wN 0 0 ··· 0        ,      where wi denotes the spacing between the ith and (i + 1)th samples. For uniformly sampled 1D signal, wi = 1 for all i. From the Bedrosian property we have that Hc {cos(ωi n) cos(ωj n)} = cos(ωi n) sin(ωj n), for ωj > ωi which when expressed in terms of the corresponding DFT (GFT) vectors vi (n) = ejωi n becomes H{< (vi ) · < (vj )} = < (vi ) · = (vj ) , (11) where f · g denotes the vector obtained by component-wise products of f and g. We test the validity of the Bedrosian property by computing the graph Hilbert transform of the signal < (vi ) · < (vj ) where i and j correspond to the low and high frequency GFT basis vectors, respectively (Here we use the frequency-ordering proposed in [7] based on M Sg kx − Axk2 ). We compare the graph Hilbert transform of < (vi ) · < (vj ) with < (vi ) · = (vj ). We consider the low-jitter case wi = 1 + di , di s drawn independently from the Gaussian distribution N (0, 0.01). Repeating the experiment multiple times, we observe that the left and right hand sides of (11) almost never coincide. In Figure 4, we consider a particular realization for x = < (v3 ) · < (v57 ), where N = 100. We 16 1 Amplitude 0.5 0 -0.5 -1 0 20 40 60 80 100 Node (a) 1 1 Graph Hilbert transform real(f1).*imag(f2) Graph Hilbert transform real(f2).*imag(f1) 0.5 Amplitude Amplitude 0.5 0 -0.5 -1 0 -0.5 0 20 40 60 80 -1 100 0 20 Node 40 60 80 100 Node (b) (c) Figure 4: Graph Hilbert transform of a signal for the jittered 1D signal graph x = < (f1 ) · < (f2 ), where f1 = v3 (MSg = 0.092) and f2 = v57 (MSg = 0.521). (a) Signal, (b) H{x} and < (f1 ) · < (f2 ), and (c) H{x} and < (f2 ) · < (f1 ). observe that the graph Hilbert transform does not coincide with either < (v3 ) · = (v57 ) or = (v3 ) · < (v57 ). This shows that the graph Hilbert transform does not possess a Bedrosian property even for graphs approximately similar to the 1D graph. 4. The Graph analytic signal and Modulation Analysis The concept of analytic signal is used extensively in the demodulation of amplitudemodulated frequency-modulated signals[68–72]. Modulation analysis decomposes a signal into two components: one varying smoothly, capturing the average information in the signal (referred to as the AM), and the second, capturing the finer variations (referred to as the phase or frequency modulation (PM or FM)). Most demodulation techniques involve the construction of the analytic signal, implicitly or explicitly. Motivated by 1D modulation definitions [68, 69], we next propose AM and PM for graph signals: 17 Definition. The AM Ax,V and PM φx,V of a graph signal x are defined as the magnitude and phase angle of the graph analytic signal, respectively: Ax,V (i) = |xa (i)| , φx,V (i) = ∀ i ∈ {1, 2, · · · , N } arg(xa (i)), (12) where arg(·) denotes the 4-quadrant arctangent function which takes values in the range (−π, π]. For A = C, (12) reduces to 1D AM and PM definitions. This is because setting A = C results in the graph analytic signal to coincide with the conventional analytic signal as we have discussed in Section 3. This in turn implies that the amplitude and phase of the graph analytic signal also coincide with the conventional definitions. We hereafter refer to Ax,V as the graph AM and φx,V as the graph PM. We next discuss computing frequency-modulation for the graph signal. Definition (Frequency modulation). The frequency modulation (FM) of a graph signal x is defined as ωx,V = φux,V − Aφux,V , where φux,V denotes the unwrapped phase of the graph analytic signal. The unwrapped phase φux,V is obtained by performing one-dimensional conventional phase-unwrapping on φx,V [61, 73, 74]. The frequency modulation definition generalizes the backward-difference operator used to compute conventional FM for 1D signals [61] defined as the derivative of the phase angle of the analytic signal. The phase-unwrapping operation is performed since arg(·) function returns phase values wrapped in the range (−π, π] [61, 74, 75]. We assume that A is normalized such that |λ|max = 1. In order to visualize the proposed graph AM and graph FM, we consider speech signal viewed as a graph signal using the linear prediction coefficients as proposed in [18]. For each speech frame, we construct A by connecting every sample to its preceding P samples with edge-weights equal to the corresponding P th-order linear 18 2 2 Signal Graph Hilbert transform Graph AM 1-D AM Amplitude 1 AM 1 0 -1 0 -1 0 50 100 150 200 250 300 350 Sample number -2 1-D FM Graph FM 0 50 100 150 200 250 300 350 Sample number (a) (b) Figure 5: Speech signal, female utterance of the word ’Head’, sampled at 16 kHz, taken from the NTVD database [78]. (a) AM, and (b) FM for P = 8. prediction coefficients. We plot the obtained graph AM and graph FM in Figure 5. We also include the 1D AM and FM for comparison. We observe that the graph FM is smoother than 1D FM, and the graph AM and 1D AM nearly coincide. 5. Experiments We next illustrate the applications of the proposed concepts on few synthesized and real-world signal examples. 5.1. Graph Hilbert transform and highlighting of singularities/anomalies We consider first experiments that demonstrate the edge-highligting behaviour of the graph Hilbert transform in simulated small-world graphs and 2D-image graphs. The conventional Hilbert transform has been shown to be useful for highlighting singularities in 1D/2D signals [67, 76]. This is a consequence of the functional form of impulse response of the Hilbert transform. Since the graph Hilbert transform generalizes the discrete Hilbert transform, our hypothesis is that the graph Hilbert transform also highlights singularities. We have already seen how the conventional 1D-Hilbert transform, as a special case of the graph Hilbert transform when A = C, highlights edges or anomalies (cf. Figure 3). We next consider a 40 × 40 2D signal or image signal. The image is a section of the coins image taken from the MATLAB library. Since there is no unique directed graph for an image signal, we define the graph as an 19 0 Node 200 400 600 1 1 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 800 0 200 400 600 800 Node (a) 0 (b) 0 (c) Figure 6: Anomaly highlighting behavior of the graph Hilbert transform for 2D signal graph. (a) A, (b) signal, and (c) graph Hilbert transform. extension from the 1D-setting, that is, we consider that jth pixel in ith row to be connected to the (j + 1)th pixel in the same row and to the jth pixel in the (i + 1)th row. The corresponding graph then has the adjacency matrix A = C ⊗ C as shown in Figure 6(a). The image signal and its graph Hilbert transform (reshaped as an image) are shown in Figures 6(b) and 6(c), respectively. We observe that the graph Hilbert transform specialized to the 2D signal case exhibits edge highlighting behavior. We note here that connecting the pixels differently leads to alternative directed graphs, and we find in our experiments that the corresponding graph Hilbert transforms also highlight edges. However, all these cases are not reported here to avoid repetition. We next consider a synthesized social network graph consisting of 10 communities with 6 member nodes each. The nodes within each community are strongly connected in addition to having inter-community edges. The intra-community edgeweights are drawn from the uniform distribution over [0, 1], and the inter-community edge-weights are drawn from uniform distribution over [0, 0.5], and randomly placed across nodes from different communities (Note that the resulting graph is highly assymmetric). Graphs with real edge weights have been extensively employed in analyzing data occuring in many practical applications such as road traffic analysis, brain connectivity [3]. We consider the case of weighted random graphs to demonstrate the 20 potential of our concepts to such application areas. We normalize A have |λ|max = 1. The nodes are labelled to correspond to the row index of the adjacency matrix. We consider two different cases, one with few inter-community edges (1% of the total number of possible edges in the graph) and the other with denser edges (10% percent of the total edges possible in the graph). For each case, we compute the graph Hilbert transform using (4) for the graph signal which is zero everywhere except at nodes 18 to 23 (which lie in communities 3 and 4) being active. By intuition, we expect all the nodes connected to these nodes which have value zero (thus making a singularity or anomaly) to be highlighted by the graph Hilbert transform. We observe from Figure 7(b) that this is indeed the case. The graph Hilbert transform takes large values at nodes 15 and 16 since they are strongly connected to node 18 (cf. Figures 7(a)-(b)). Similarly, presence of strong edge between nodes 18 to 50 results in node 50 being highlighted by the graph Hilbert transform. Similar arguments can be made for nodes 2, 3, and 55, all of which are highlighted by the graph Hilbert transform. We also note that the extent to which a node is highlighted also varies with the strength of the connecting edge. In the case of dense inter-community edges, we observe that the graph Hilbert transform highlights a large number of nodes since the nodes from 18 to 23 are connected to many nodes (cf. Figures 7(c)-(d)). In Figure 8, we consider an unweighted community graph with very few inter community edges. The graph consists of 5 communities of 10 nodes each. Each 10-node community subgraph is randomly generated from the Erdős Rényi model with an edge probability p = 0.5. The communities are then connected with very few links also generated randomly. The resulting adjacency matrix is shown in Figure 8(a). We consider the signal to be all ones corresponding to nodes of community 3. In the present example, community 3 has only one outgoing edge from community 3 (from node 26 to node 38), highlighted by the circle in Figure 8(a). We observe that the graph Hilbert transform highlights both nodes 38 and 26, as expected, in addition to highlighting the subset of nodes of community 3. 21 0 0.6 0.6 10 10 0.5 0.5 20 20 0.4 Node Node 0.4 30 0.3 40 0.3 40 0.2 50 30 0.2 50 0.1 60 0.1 60 10 20 30 40 50 60 0 10 20 Node 30 Node 1 Signal GHT 0.5 0 10 20 30 40 50 60 (b) Amplitude Amplitude (a) 40 50 60 1 Signal GHT 0.5 0 10 20 30 40 50 60 Node Node (c) (d) Figure 7: Anomaly highlighting behavior of the graph Hilbert transform for a community graph. (a) A and (c) Graph Hilbert transform for sparse inter-community connections. (b) A and (d) graph Hilbert transform for dense inter-community connections. Our experiments suggest that the graph Hilbert transform could be potentially used in anomaly/edge detection in graphs, particularly because not only the presence but also the location of the anomaly is highlighted. 5.2. Male-female voice classification using graph AM and FM We consider the speech signal as a signal over a graph. Our hypothesis is that viewing the speech signal as a graph signal provides additional information that could help improve the speaker recognition performance. In order to test our hypothesis, we construct a speech graph from learning set data consisting of speech samples from two speakers. We then compute the conventional AM and FM, and the graph AM and FM and use them features for classification. We use two-layer neural network classifiers trained from data distinct from test and learning data. Let X1 = [x1,1 , · · · , x1,n ] and X2 = [x2,1 , · · · , x2,n ] denote the speech sample matrices from two speakers S1 and 22 0 Node 10 20 30 1.5 50 0 20 Node Amplitude 40 40 Signal Graph Hilbert transform 1 0.5 0 5 10 (a) 15 20 25 Node 30 35 40 45 50 (b) Figure 8: Anomaly highlighting behavior of the graph Hilbert transform for unweighted community graph. (a) A and (b) graph Hilbert transform. S2 such that xi,j ∈ RN denotes the jth frame of speech samples from ith speaker. The speech frames are taken from different sentences uttered by the speakers (one male and other female) from the CMU Arctic Database [77]. We choose a frame-length of N = 50 and total number of frames 4000 (where n = 2000) such that Xl = [X1 X2 ]. We compute the adjacency matrix by solving the following optimization problem: A∗ = arg min kXl − AXl k22 A subject to diag(A) = 0, A1 = 1, AT 1 = 1. We use the constraints A1 = 1, (13) AT 1 = 1 to avoid ill-conditioning in case of insuf- ficient learning data. In Figure 9, we plot the adjacency matrix obtained from (13). We consider three different classifiers: Classifier 1: The classifier uses magnitudes of the DFT coefficients of 1D AM and FM as feature vectors. The feature vector has length 100. Classifier 2: The classifier uses the magnitudes of the GFT of the graph AM and FM as feature vectors, where the GFT is obtained from the eigen-decomposition of A∗ . The feature vector has length 100. Classifier 3: The classifier uses the magnitudes of the DFT coefficients of 1D AM and 23 Sample 0.1 20 0 30 -0.1 40 20 30 40 Sample (a) 50 0.01 In-Phase 0.06 A(1,:) A(2,:) A(3,:) A(4,:) 0 A(:,1) A(:,2) A(:,3) A(:,4) 0.04 Amplitude 0.1 0.05 (b) 0.2 Amplitude 0 -0.02 0.003 50 10 Quadrature 0.02 10 -0.1 0.02 0 -0.02 -0.2 -0.04 10 20 30 40 50 10 Sample (c) 20 30 40 50 Sample (d) Figure 9: Graph learnt from speech samples. (a) A, (b) eigenvalues of A, (c) first four rows of A, and (d) first four columns of A. FM, concatenated with magnitudes of the GFT of the graph AM and FM as feature vectors. The length of the feature vector is equal to 200. The classifiers are trained using the features from training data Xtr and tested on Xtest , both data sets being different from Xl used in computing the adjacency matrix. The composite dataset [Xtr Xtest ] consists of 5 × 104 samples of which 60% is Xtr and the rest in Xtest . The classifier performance is computed for different number of sigmoidal neurons in the hidden layer. The performance is averaged over 50 runs where the training and test data are randomly partitioned. We observe from Table 3 that Classifier 3 outperforms the other classifiers with a classification improvement of up to 2% in comparison with the DFT-based classifier. We also observe that the performance of the neural classifier saturates after 5 hidden neurons. This shows that the proposed graph amplitude and frequency modulations improve speaker classification performance, and 24 Number of hidden neurons 1 5 10 Classifier 1 (DFT) 69.4 70.8 71.0 Classifier 2 (GFT) 59.6 59.7 59.3 Classifier 3 (DFT+GFT) 69.6 72.6 72.2 Table 3: Classification accuracy (in percentage) obtained over 50 runs of the neural network. that viewing speech as a graph signal indeed provides complementary information. 6. Discussions and Conclusions We proposed definitions for the analytic signal and Hilbert transform of real graph signals over directed graphs. We showed that graph Hilbert transform and graph analytic signal are linear and shift-invariant over graphs, and that they inherit many properties, and in particular anomaly/singularity highlighting property for some graphs of interest. We also demonstrated through a numerical example that the graph Hilbert transform does not inherit the Bedrosian property in general. Using the graph analytic signal, we defined amplitude, phase, and frequency modulations for graph signals. In order to illustrate the proposed notions, we considered their application to synthesized and real-world signal examples. We observed in the context of speaker recognition that viewing the speech signal as a graph signal resulted in improved classification performance. This is because the graph signal model captures signal correlation across all samples in a speech frame, unlike the 1D graph which considers only the preceding sample. The ability of the graph Hilbert transform to highlight edge/singularities/anomalies could be potentially employed in analyzing scenarios such as malfunctioning in power grids, spread of disease or epidemics, identifying activity sources in the brain, and traffic bottlenecks over transportation networks, and study of outliers in social network trends. We note that applications chosen in this article serve the purpose of illustrating the proposed concepts and are by no means exhaustive. As with 1D modulation analysis, the utility varies across applications and can only be revealed by detailed analysis on various datasets. 25 References [1] M. E. J. Newman, Networks: An Introduction, Oxford University Press, 2010. [2] A. Sandryhaila, J. M. F. Moura, Discrete signal processing on graphs: Frequency analysis, IEEE Trans. Signal Process. 62 (2014) 3042–3054. [3] D. I. Shuman, S. Narang, P. Frossard, A. Ortega, P. Vandergheynst, The emerging field of signal processing on graphs: Extending high-dimensional data analysis to networks and other irregular domains, IEEE Signal Process. Mag. 30 (2013) 83–98. [4] O. Teke, P. P. Vaidyanathan, Extending classical multirate signal processing theory to graphs-part ii: M-channel filter banks, IEEE Trans. Signal Process. 65 (2017) 423–437. [5] R. Raif, L. Guibas, Wavelets on graphs via deep learning, Proc. Adv. Neural Inform. Proces. Syst. (2013) 998–1006. [6] M. Jansen, G. P. Nason, B. W. Silverman, Multiscale methods for data on graphs and irregular multidimensional situations, J. Roy. Statist. Soc.: Series B 71 (2009) 97–125. [7] A. Sandryhaila, J. M. F. Moura, Discrete signal processing on graphs, IEEE Trans. Signal Process. 61 (2013) 1644–1656. [8] A. Sandryhaila, J. M. F. Moura, Big data analysis with signal processing on graphs: Representation and processing of massive data sets with irregular structure, IEEE Signal Process. Mag. 31 (2014) 80–90. [9] L. Cohen, Time-Frequency Analysis: Theory and Applications, Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1 edition, 1995. [10] A. Cusmariu, Fractional analytic signals, Signal Process. 82 (2002) 267– 272. 26 [11] A. I. Zayed, Hilbert transform associated with the fractional Fourier transform, IEEE Signal Process. Lett. 5 (1998) 206–208. [12] X. Guanlei, W. Xiaotong, X. Xiaogang, Generalized Hilbert transform and its properties in 2D LCT domain, Signal Process. 89 (2009) 1395–1402. [13] S. Sarkar, K. Mukherjee, A. Ray, Generalization of Hilbert transform for symbolic analysis of noisy signals, Signal Process. 89 (2009) 1245–1251. [14] Y.-N. Zhang, B.-Z. Li, φ-linear canonical analytic signals, Signal Process. 143 (2018) 181 – 190. [15] M. Felsberg, G. Sommer, The monogenic signal, IEEE Trans. Signal Proc. 49 (2001) 3136–3144. [16] T. Bülow, G. Sommer, A novel approach to the 2D analytic signal, in: F. Solina, A. Leonardis (Eds.), Computer Analysis of Images and Patterns, volume 1689 of Lecture Notes in Computer Science, Springer Berlin Heidelberg, 1999, pp. 25–32. [17] S. Bernstein, The Fractional Monogenic Signal, Springer International Publishing, pp. 75–88. [18] A. Venkitaraman, S. Chatterjee, P. Handel, Graph linear prediction results in smaller error than standard linear prediction, Proc. Eur. Signal Process. Conf. (EUSIPCO) (2015). [19] D. I. Shuman, B. Ricaud, P. Vandergheynst, A windowed graph Fourier transform, IEEE Statist. Signal Process. Workshop (SSP) (2012) 133–136. [20] S. K. Narang, A. Ortega, Compact support biorthogonal wavelet filterbanks for arbitrary undirected graphs, IEEE Trans. Signal Process. 61 (2013) 4673–4685. [21] S. K. Narang, A. Ortega, Perfect reconstruction two-channel wavelet filter banks for graph structured data, IEEE Trans. Signal Process. 60 (2012) 2786–2799. 27 [22] D. B. Tay, Y. Tanaka, A. Sakiyama, Critically sampled graph filter banks with polynomial filters from regular domain filter banks, Signal Process. 131 (2017) 66 – 72. [23] R. R. Coifman, M. Maggioni, Diffusion wavelets, Appl. Comput. Harmonic Anal. 21 (2006) 53–94. [24] D. Ganesan, B. Greenstein, D. Estrin, J. Heidemann, R. Govindan, Multiresolution storage and search in sensor networks, ACM Trans. Storage 1 (2005) 277–315. [25] D. K. Hammond, P. Vandergheynst, R. Gribonval, Wavelets on graphs via spectral graph theory, Appl. Comput. Harmonic Anal. 30 (2011) 129–150. [26] R. Wagner, V. Delouille, R. Baraniuk, Distributed wavelet de-noising for sensor networks, Proc. 45th IEEE Conf. Decision Control (2006) 373–379. [27] K. Nakahira, A. Miyamoto, Parseval wavelets on hierarchical graphs, Appl. Comput. Harmonic Anal. (2016). [28] F. Gama, A. G. Marques, G. Mateos, A. Ribeiro, Rethinking sketching as sampling: Linear transforms of graph signals, Proc. Asilomar Conf. Signals, Systems Comput. (2016) 522–526. [29] S. Chen, R. Varma, A. Singh, J. Kovačević, Signal recovery on graphs: Fundamental limits of sampling strategies, IEEE Trans. Signal Inform. Process. over Networks 2 (2016) 539–554. [30] M. Tsitsvero, S. Barbarossa, P. D. Lorenzo, Signals on graphs: Uncertainty principle and sampling, IEEE Trans. Signal Process. 64 (2016) 4845–4860. [31] A. Anis, A. Gadde, A. Ortega, Efficient sampling set selection for bandlimited graph signals using graph spectral proxies, IEEE Trans. Signal Process. 64 (2016) 3775–3789. 28 [32] S. Chen, R. Varma, A. Sandryhaila, J. Kovacevic, Discrete signal processing on graphs: Sampling theory, IEEE Trans. Signal Process. 63 (2015) 6510–6523. [33] X. Wang, J. Chen, Y. Gu, Local measurement and reconstruction for noisy bandlimited graph signals, Signal Process. 129 (2016) 119 – 129. [34] G. Puy, N. Tremblay, R. Gribonval, P. Vandergheynst, Random sampling of bandlimited signals on graphs, Appl. Computat. Harmonic Anal. (2016). [35] B. Girault, Stationary graph signals using an isometric graph translation, Proc. Eur. Signal Process. Conf. (EUSIPCO) (2015) 1516–1520. [36] S. Segarra, A. G. Marques, G. Leus, A. Ribeiro, Stationary graph processes: Nonparametric spectral estimation, Proc. IEEE Sensor Array Multichannel Signal Process. Workshop (SAM) (2016) 1–5. [37] B. Girault, E. Fleury, Translation on graphs: An isometric shift operator, Signal Process. Lett. 22 (2015) 2416–2420. [38] D. Thanou, D. I Shuman, P. Frossard, Learning parametric dictionaries for signals on graphs, IEEE Trans. Signal Process. 62 (2014) 3849–3862. [39] D. I. Shuman, B. Ricaud, P. Vandergheynst, Vertex-frequency analysis on graphs, Appl. Comput. Harmonic Anal. 40 (2016) 260 – 291. [40] N. Shahid, V. Kalofolias, X. Bresson, M. Bronstein, P. Vandergheynst, Robust principal component analysis on graphs, IEEE Int. Conf. Comput. Vision (ICCV) (2015) 2812 – 2820. [41] N. Shahid, N. Perraudin, V. Kalofolias, G. Puy, P. Vandergheynst, Fast robust PCA on graphs, IEEE J. Select. Topics Signal Process. 10 (2016) 740–756. [42] N. Tremblay, G. Puy, P. Borgnat, R. Gribonval, P. Vandergheynst, Accelerated 29 spectral clustering using graph filtering of random signals, IEEE Int. Conf. Acoust. Speech Signal Process. (2016). [43] K. Benzi, V. Kalofolias, X. Bresson, P. Vandergheynst, Song recommendation with non-negative matrix factorization and graph total variation, Proc. IEEE Int. Conf. Acoust. Speech Signal Process. (2016) 2439–2443. [44] D. I. Shuman, M. J. Faraji, P. Vandergheynst, A multiscale pyramid transform for graph signals, IEEE Trans. Signal Process. 64 (2016) 2119–2134. [45] S. Segarra, A. G. Marques, G. Mateos, A. Ribeiro, Blind identification of graph filters with multiple sparse inputs, IEEE Int. Conf. Acoust. Speech Signal Process. (ICASSP) (2016) 4099–4103. [46] S. Segarra, G. Mateos, A. G. Marques, A. Ribeiro, Blind identification of graph filters, IEEE Trans. Signal Process. 65 (2017) 1146–1159. [47] S. Chen, A. Sandryhaila, J. M. F. Moura, J. Kovacevic, Signal recovery on graphs: Variation minimization, IEEE Trans. Signal Process. 63 (2015) 4609–4624. [48] A. Sakiyama, K. Watanabe, Y. Tanaka, Spectral graph wavelets and filter banks with low approximation error, IEEE Trans. Signal Inform. Process. over Networks 2 (2016) 230–245. [49] S. Deutsch, A. Ortega, G. Medioni, Manifold denoising based on spectral graph wavelets, IEEE Int. Conf. Acoust. Speech Signal Process. (ICASSP) (2016) 4673– 4677. [50] M. Onuki, S. Ono, M. Yamagishi, Y. Tanaka, Graph signal denoising via trilateral filter on graph spectral domain, IEEE Trans. Signal Inform. Process. Netw. 2 (2016) 137–148. [51] D. Romero, M. Ma, G. B. Giannakis, Kernel-based reconstruction of graph signals, IEEE Trans. Signal Process. 65 (2017) 764–778. 30 [52] R. V. Mendes, H. C. Mendes, T. Araújo, Signals on graphs: Transforms and tomograms, Physica A: Stat. Mechanics Appl. 450 (2016) 1 – 17. [53] I. Jestrović, J. L. Coyle, E. Sejdić, A fast algorithm for vertex-frequency representations of signals on graphs, Signal Process. 131 (2017) 483 – 491. [54] I. Jestrović, J. L. Coyle, E. Sejdić, Differences in brain networks during consecutive swallows detected using an optimized vertex–frequency algorithm, Neuroscience 344 (2017) 113 – 123. [55] M. Kotzagiannidis, P. Dragotti, Sampling and reconstruction of sparse signals on circulant graphs – an introduction to graph-fri, Appl. Computat. Harmonic Anal., In Press (2017). [56] M. Kotzagiannidis, P. Dragotti, Splines and wavelets on circulant graphs, Appl. Computat. Harmonic Anal., In press (2017). [57] A. Venkitaraman, S. Chatterjee, P. Handel, On Hilbert transform of signals on graphs, Proc. Sampling Theory Appl. (2015). [58] D. Gabor, Theory of communication, J. Inst. Elec. Eng. 93 (1946). [59] R. M. Gray, Toeplitz and circulant matrices: A review 2 (2006) 155–239. [60] E. Isufi, A. Loukas, A. Simonetto, G. Leus, Autoregressive moving average graph filtering, IEEE Trans. Signal Process. 65 (2017) 274–288. [61] A. V. Oppenheim, R. W. Schafer, Discrete-Time Signal Processing, Prentice Hall Press, Upper Saddle River, NJ, USA, 3rd edition, 2009. [62] B. Gold, A. V. Oppenheim, C. M. Rader, Theory and implementation of the Discrete Hilbert transform, Technical Report, Symp. Comput. Process. Commun., Polytechnic Institute of Brooklyn, 1969. 31 [63] R. A. Horn, C. R. Johnson, Matrix Analysis, Cambridge University Press, New York, NY, USA, 2nd edition, 2012. [64] A. Edelman, E. Kostlan, M. Shub, How many eigenvalues of a random matrix are real?, J. Amer. Math. Soc. 7 (1994). [65] T. Tao, V. Vu, M. Krishnapur, Random matrices: Universality of esds and the circular law, Ann. Probab. 38 (2010) 2023–2065. [66] R. Cohen, S. Havlin, Complex Networks: Structure, Robustness and Function., Cambridge University Press, 2010. [67] A. Venkitaraman, C. S. Seelamantula, Fractional Hilbert transform extensions and associated analytic signal construction, Signal Process. 94 (2014) 359 – 372. [68] B. Boashash, Estimating and interpreting the instantaneous frequency of a signal. I. Fundamentals, Proc. IEEE 80 (1992) 520–538. [69] D. Vakman, Signals, Oscillations, and Waves: A Modern Approach, Artech House Boston, 1998. [70] P. Maragos, J. Kaiser, T. Quatieri, On amplitude and frequency demodulation using energy operators, IEEE Trans. Signal Process. 41 (1993) 1532–1550. [71] V. P. Stokes, P. Handel, Comments on ”On amplitude and frequency demodulation using energy operators”, IEEE Trans. Signal Process. 46 (1998) 506–507. [72] A. Venkitaraman, C. Seelamantula, Binaural signal processing motivated generalized analytic signal construction and AM-FM demodulation, IEEE/ACM Trans. Audio Speech Language Process. 22 (2014) 1023–1036. [73] W. Schwartzkopf, T. Milner, J. Ghosh, B. Evans, A. Bovik, Two-dimensional phase unwrapping using neural networks, Proc. 4th IEEE Southwest Symp. Image Anal. Interpretation (2000) 274–277. 32 [74] J. Tribolet, A new phase unwrapping algorithm, IEEE Trans. Acoust. Speech Signal Process. 25 (1977) 170–177. [75] A. Venkitaraman, C. Seelamantula, A technique to compute smooth amplitude, phase, and frequency modulations from the analytic signal, IEEE Signal Process. Lett. 19 (2012) 623–626. [76] A. W. Lohmann, D. Mendlovic, Z. Zalevsky, Fractional Hilbert transform, Opt. Lett. 21 (1996) 281–283. [77] J. Kominek, A. W. Black, V. Ver, CMU Arctic Databases for Speech Synthesis, Technical Report, 2003. [78] North Texas Vowel Database-http://www.utdallas.edu/∼ mann/kidvow1/north texas vowel database.html 33 ass-
7cs.IT
Boundary-sensitive Network for Portrait Segmentation Xianzhi Du, Larry Davis Computer Vision Laboratory, UMIACS, University of Maryland College Park, MD 20742, USA arXiv:1712.08675v1 [cs.CV] 22 Dec 2017 {xianzhi, lsd}@umiacs.umd.edu Abstract in the portrait segmentation problem. In portrait segmentation, precise segmentation around object boundaries is crucial but challenging. For applications like background replacement, accurate and smooth boundary segmentation (such as hair and clothes) is the key for better visual effects. However, this has long been one of the most challenging part of portrait segmentation, especially when using convolutional neural networks (CNN). Since the neighborhood of boundary pixels contains a mixture of both foreground and background labels, convolutional filters fuse information of different classes, which may confuse the network when segmenting boundary pixels. Previous CNN based semantic segmentation methods, which use either the conventional hard-label method or ignore the boundary pixels during training [6] [1] [10], fail to solve this problem. These methods aim to train a better model to separate foreground and background while sacrificing the accuracy when predicting the boundary pixels. Compared to the general semantic segmentation problem, portrait segmentation has higher precision requirement on boundary area. However, this problem has not been well studied in previous works. In this paper, we propose a boundary-sensitive deep neural network (BSN) for portrait segmentation. BSN introduces three novel techniques. First, an individual boundary-sensitive kernel is proposed by dilating the contour line and assigning the boundary pixels with multi-class labels. Second, a global boundarysensitive kernel is employed as a position sensitive prior to further constrain the overall shape of the segmentation map. Third, we train a boundary-sensitive attribute classifier jointly with the segmentation network to reinforce the network with semantic boundary shape information. We have evaluated BSN on the current largest public portrait segmentation dataset, i.e., the PFCN dataset, as well as the portrait images collected from other three popular image segmentation datasets: COCO, COCO-Stuff, and PASCAL VOC. Our method achieves the superior quantitative and qualitative performance over state-of-the-arts on all the datasets, especially on the boundary area. In this paper, we propose a new boundary-sensitive network (BSN) for more accurate portrait segmentation. In contrast to conventional semantic image segmentation systems, we dilate the contour line of the portrait foreground and label the boundary pixels as the third class with the proposed soft-label method. Two boundary-sensitive kernels are introduced into the loss function to help the network learn better representations for the boundary class as well as govern an overall shape of the portrait. The first boundarysensitive kernel is designed for each training image such that a floating point vector is assigned as a soft label for each pixel in the boundary class. The second boundary-sensitive kernel is a global kernel where each location in the kernel indicates the probability of the current location belonging to the boundary class. Furthermore, a boundary-sensitive attribute classifier is trained jointly with the segmentation network to reinforce the training process. We evaluate our method on PFCN [21], the largest available portrait segmentation dataset. Our method achieves the best quantitative performance in mean IoU at 96.7%. In order to show the effectiveness and generalization capability of our method, we further test on the portrait images collected from COCO 1. Introduction Semantic segmentation is a fundamental problem in computer vision community which aims to classify pixels into semantic categories. In this paper, we target a special binary class semantic segmentation problem, namely portrait segmentation, which generates pixel-wise predictions as foreground (i.e., people) or background. Recently, it is becoming a hot topic and has been widely used in many real-world applications, such as augmented reality (AR), background replacement, portrait stylization, depth of field, advanced driver assistance systems [5], etc. Although numerous deep learning based approaches (e.g., [6] [1] [19] [24] [16] [15] [14]) were proposed to solve the general semantic segmentation problem, direct adaptation of these methods cannot satisfy the high precision requirement 1 Figure 1: The whole architecture of our framework. [17], COCO-Stuff [3], PASCAL VOC [11] and the experiment results demonstrate that our method significantly outperforms all other state-of-the-art methods. The rest of this paper is organized as follows: Section 2 reviews the previous work on related problems. Section 3 describes the general framework and the three boundarysensitive techniques in detail. Section 4 discusses and analyzes the experimental results. Section 5 draws conclusions and discusses further work. the full image size. This paradigm popularized the CNN based method and was quickly adopted by subsequent approaches. In traditional CNN architectures, pooling layer was introduced to increase the receptive field as the network goes deeper. However, it also decreases the resolution of feature map. Yu et al. [23] proposed the dilated convolutional layer to replace the pooling layer, which allows for increasing the size of the receptive field without losing resolution in feature maps. Chen et al. [7] proposed the DeepLab system which passes multiple rescaled input images to different network branches in parallel and combines the features maps with max operation at the end. 2. Related work Semantic segmentation systems can be categorized as unsupervised methods and supervised methods. Unsupervised methods solve the semantic segmentation problem with classic machine learning techniques include thresholding, hashing, K-means clustering, topic model, graph-cut [22] [8] [9], etc. On the other hand, conventional supervised methods treat the semantic segmentation problem as a pixel-wise classification problem which first build handcrafted features and then train classifiers such as Support Vector Machines [12], Random Forest [2], etc. In recent years, convolutional neural network (CNN) based methods have been successfully applied to semantic segmentation. In 2014, Long et al. [18] introduced the endto-end Fully Convolutional Networks (FCN) which takes a natural image as input and performs dense pixel-wise predictions to generate a segmentation map of the same size as the input image. Fully connected layers are removed from this network to preserve the spatial information and deconvolutional layers are proposed for up-sampling to recover Portrait segmentation is generally regarded as a subproblem of semantic segmentation, and it is different from traditional segmentation in two aspects. First, the foreground object is limited to only people which provides additional prior information. Meanwhile, portrait segmentation has higher precision requirement on boundary area. Shen et al. [21] fine-tuned a portrait segmentation system from a pre-trained FCN network with portrait images. To provide more portrait-specific information to the network, two normalized x and y position channels and one mean mask shape channel are added to the input image. Shen et al. [20] proposed a joint correspondence and segmentation estimation method by using extra information provided by dual-lens camera. While most methods can easily generate a rough segmentation, they generally fail to provide precise segmentation near the object boundaries. For refining the predictions near the boundaries, the most commonly used solution is 2 Figure 2: The kernel generating process in our method: (a) represents the original image; (b) represents the detected contour line; (c) shows the three class labels: foreground, background, and dilated boundary; (d) shows the individual boundarysensitive kernel; (e) shows the global boundary-sensitive kernel. tation map with the Canny edge detector [4]. The contour is then dilated to be P-pixels in width and that map is overlayed onto the ground truth segmentation map. We call the new label map the individual boundary-sensitive kernel. For each pixel in the kernel, a 1 × 3 floating-point vector K indv = [lf g , lbdry , lbg ] is assigned as the soft-label to represent how likely the current pixel belongs to each class. The K indv is computed as Equations (1) (2) (3). employing Conditional Random Fields (CRF) along with CNN. Deeplab[7] employs dense CRF after CNN as a post processing method to smooth out the predictions. However, CRF is generally used as a post-precessing step and may be quite time-consuming. 3. Boundary-sensitive portrait segmentation The architecture of our framework is shown in Figure 1. We use DeepLabv2 ResNet101 model as the base segmentation network. DeepLabv2 ResNet101 consists of three ResNet101 branches at the base which process different scales of the input image. Then the three branches are followed by the atrous spatial pyramid pooling (ASPP) at different dilation rates and fused together at the end. For more details please refer to [7]. To make the model more sensitive to a portrait’s boundary, during training, we label the training samples with three non-overlapping classes: foreground, boundary, and background, using the softlabel method described below. One individual boundarysensitive kernel and one global boundary-sensitive kernel are introduced when updating the loss function, which affect both the forward pass and the back-propagation. The generation process of the two kernels are shown in Figure 2. Furthermore, an attribute classifier which shares the base layers with BSN is trained jointly with the segmentation task to reinforce the training process. libdry =  min ||Ii − Cj ||   ∀Cj ∈C   P  , if i ∈ boundary  min ||I − C || k ∀Cj ∈C    0    0 lif g libg 3.1. The individual boundary-sensitive kernel and the soft-label method k j (1) , if i ∈ foreground , if i ∈ background  bdry  1(Mi ∈ f g)(1 − li ) , if i ∈ boundary = 1 , if i ∈ foreground   0 , if i ∈ background (2)  bdry  1(Mi ∈ bg)(1 − li ) , if i ∈ boundary = 0 , if i ∈ foreground (3)   1 , if i ∈ background where min ||Ii − Cj || represents the distance from the ∀Cj ∈C current pixel Ii to the nearest point on the contour line C. Mi represents the binary label of the current pixel in the original label map M . We can see that pixels in the foreground/background class are labeled as [1, 0, 0]/[0, 0, 1] and pixels in the boundary class are labeled with a floating-point vector. The soft-label method computes lbdry as the normalized distance from the current pixel to the nearest point on To better address the boundary prediction problem, we introduce the individual boundary-sensitive kernel. We label the boundary class as a third class to separate from foreground and background classes and assign soft-labels to pixels in the boundary class as follows. First, the portrait’s contour line is identified in the ground truth segmen3 the contour and sets lf g and lbg to either (1 − lbdry ) or 0 based on the class label of the current pixel in the ground truth segmentation map. During the forward pass for each pixel in one sample, the new formula for updating the loss function can be expressed as Equation (4): =− value close to b in the global kernel indicates that the current location has a higher probability to be boundary. In other words, this location should be more difficult for the network to classify. To force the network to focus more on the possible boundary locations, we weight the locations with their corresponding kernel values when updating the loss function. When performing the forward pass for one pixel location in one sample, we update the loss function as equations (7) c X ezj Kjindv × log(yj ) Kjindv × log( P z ) = − k e j=1 j=1 c X k (4) where l denotes the soft-label for class j and y = j j P ezj / ezk denotes the softmax probability for this class. c |M − 0.5| ) × (b − a) 0.5 X  −= Ksglobal × 1(j = c) × log(yj ) K global = b − (1 − k represents all the three classes. The new back-propagation for this sample can be derived as in Equation (5): (6) (7) j where Ksglobal denotes the global kernel value at the pixel location s. g denotes the ground truth class label for the current pixel location. During back-propagation, the new gradient is computed as Equation (8): c X ∂ ∂log(yj ) =− Kjindv × ∂zi ∂zi j=1 c = −( ∂yi X Kjindv ∂yj Kiindv × + × ) yi ∂zi yj ∂zi j6=i c = −( X Kjindv Kiindv × yi × (1 − yi ) − × (yj × yi )) yi yj j6=i = −(Kiindv − yi × c X lj ) = −(Kiindv − yi ) j=1 (5) The last step holds since the soft-label vector sums to one. By using the soft-label method, we can see that boundary pixels contribute not only to the boundary class but also to the foreground/background class in a weighted manner based on how close it is to the contour line. X ∂ ∂log(yj ) = −Ksglobal × 1(j = g) × ∂zi ∂zi j ∂yi 1 × ) yi ∂zi 1 = −Ksglobal × ( × yi × (1(i = g) − yi )) yi = −Ksglobal × (1(i = g) − yi ) = −Ksglobal × ( (8) From the new forward pass and back-propagation functions we can see that the pixels that are more likely to be located in the boundary (e.g., the pixels lying within the brighter region in Figure 2 (e)) are weighted higher so that they contribute more to the loss. This guides the network to be more sensitive to the difficult locations. 3.2. The global boundary-sensitive kernel 3.3. The boundary-sensitive attribute classifier By the nature of aligned portrait images, it is likely that some locations in the image, such as the upper corner pixels, should belong to the background with very high probabilities while some other locations, such as the middle bottom pixels, should belong to the foreground with high probabilities. These pixels should be more easily classified, while pixels in between should be harder to classify. We estimate a position sensitive prior from the training data. We design a global boundary-sensitive kernel to guide the network to learn a better shape prediction specifically for portrait images. The global kernel is designed as follows. First, a mean mask M is computed using the average of all ground truth segmentation maps from the training samples. This generates a probability map where the value at each location indicates how likely the current location belongs to foreground/background. Second, Equation (6) is employed to generate the global boundary-sensitive kernel. All the values are normalized to range [a, b]. A larger Portrait attributes such as long/short hair play an important role in determining a portrait’s shape. Training a network which is capable of classifying boundary-sensitive attributes will give more prior information to the system, which further makes the system more accurate and efficient on boundary prediction. Motivated by this idea, we train an attribute classifier jointly with the portrait segmentation network for multi-task learning. An example of how the hair style attribute changes the boundary shape is shown in Figure 3. To design the attribute classifier, the base layers from “conv1 1” to “pool5” are shared between the segmentation network and the classifier. Above this, for each channel, we add three more fully connected layers. The first two fully connected layers have 1024 neurons and are followed by a dropout layer and a ReLU layer. The last fully connected layer has two neurons for binary classification. 4 N IoU = X Aseg ∩ Agt 1 i i × seg gt N A ∪ A i i i (9) where Aseg and Agt i i represent the area of the segmentation results and the ground-truth label mask for the ith testing sample, respectively. 4.2. Results on the PFCN dataset We evaluate the proposed method on the largest publicly available portrait segmentation dataset [21]. This dataset is collected from Flickr and manually labeled with variations in age, pose, appearance, background, lighting condition, hair style, accessory, etc. Most of the portrait images are captured by the frontal cameras of mobile phones. This dataset consists of 1800 portrait images which are split into 1500 training images and 300 testing images. All the images are scaled and cropped into size 800 × 600. In one portrait image, the pixels are labeled as either “foreground” or “background”. We will refer to this dataset as PFCN dataset. Some sample images from the PFCN dataset are given in Figure 4. Figure 3: An example of how boundary-sensitive attributes affect the portrait’s shape: long hair vs. short hair. 4. Experiments and results analysis 4.1. Training settings and evaluation settings Model details: To train our portrait segmentation system, we fine-tune the DeepLabv2 ResNet101 model using the training set of the PFCN dataset. We will introduce this dataset in the next subsection. There are three ResNet branches in DeepLabv2. In each branch, 4 atrous convolution layers are added in parallel with dilation factors [6, 12, 18, 24] and then summed together to produce the final feature map. Element-wise max operation is performed at the end over the three branches to produce the final prediction. To generate the individual kernel, we dilate the contour line to 10-pixels in width and label the dilated boundary using the soft-label method. We select the weight range in the global kernel as [0.9, 1]. Following PortraitFCN+, in addition to the three RGB channels, we add two normalized x and y position channels and one mean mask shape channel into the input. For more details please refer to [21]. At each iteration, a random patch of size 400 × 400 is cropped out from the original image and randomly flipped with probability 0.5 for data augmentation. Then the input image is rescaled by factors of [0.5, 0.75, 1.0] as the new input images to the three branches of the DeepLabv2 network. To train the attribute classifier, we label the training images into long/short hair classes. We use Stochastic Gradient Descent (SGD) with a learning rate of 2.5e−4 to train the model for 20K iterations without the attribute classifier. Then we decrease the learning rate by a factor of 10 and add the attribute classifier to train the model for another 20K iterations. The whole network is built with the Caffe deep learning framework [13]. During testing, we ignore the boundary class and the attribute classifier. Only probabilities from foreground and background classes are used for segmentation. Mean IoU: The standard mean Intersection-over-Union (IoU) metric is used to evaluate the segmentation performance. The mean IoU is computed as following. Figure 4: Sample images from the PFCN dataset. We compare with the state-of-the-art method reported on this dataset: PortraitFCN+ [21] and the DeepLabv2 ResNet101 fine-tuned model , which we will refer to as PortraitDeepLabv2. The PortraitDeepLabv2 model is fine-tuned using the same 6-channel training data as PortraitFCN+ and the same training settings as BSN. For ablation study, we report results of four models from our work: train with the attribute classifier only (BSN AC), train with the global boundary-sensitive kernel only (BSN GK), train with the individual boundarysensitive kernel only (BSN IK), and the all-in-one model 5 Dataset COCO portrait COCO-Stuff portrait PASCAL VOC portrait Num. of Portrait 626 92 62 Table 2: Statistics of the three portrait datasets. Method COCO PortraitFCN+ BSN (ours) 68.6% 77.7% COCOStuff 60.8% 72.0% PASCAL VOC 59.5% 75.6% Table 3: Quantitative performance comparisons on COCO portrait, COCO-Stuff portrait and Pascal VOC portrait datasets. trait and portrait-like images from the COCO dataset. We run a face detector over the dataset and keep the images only containing one person where the face area covers at least 10% of the whole image. There are 626 images in total with ground truth segmentation maps. We will refer to this dataset as COCO portrait. COCO portrait is more challenging than the PFCN data in various ways such as large pose variations, large occlusions, unlabeled individuals appear on the background, large portion of background, different kinds of accessories, etc. COCO-Stuff portrait: The COCO-Stuff dataset augments the COCO dataset with refined pixel-level stuff annotations on 10K images. We collect 92 portrait and portraitlike images from this dataset. The quality of images in this dataset are same as COCO portrait. We will refer to this dataset as COCO-Stuff portrait. Pascal VOC portrait: We use the same method to collect portrait and portrait-like images from the Pascal VOC 2007, 2008, and 2012 datasets. Due to the lack of ground truth segmentation maps on this dataset, 62 images are collected. The images in this dataset are also challenging and unconstrained. We will refer to this dataset as PASCAL VOC portrait. Some sample images from the three datasets are illustrated in Figure 5 and the statistics are given in Table 2. To test the generalization capability of our model, we directly test on these three datasets without fine-tuning. We achieve 77.7% mean IoU, 72.0% mean IoU, and 75.6% mean IoU on COCO portrait, COCO-stuff portrait, and PASCAL VOC portrait, respectively. We significantly outperform PortraitFCN+ on all the three datasets. The result comparisons are illustrated in Table 3. Since the DeepLabv2 model is trained on these dataset, we can not compare with it directly. Figure 5: Sample images from COCO, COCO-Stuff, and Pascal VOC portrait datasets. Method Graph-cut PortraitFCN+ PortraitDeepLabv2 BSN AC (ours) BSN GK (ours) BSN IK (ours) BSN (ours) Mean IoU 80.0% 95.9% 96.1% 96.2% 96.2% 96.5% 96.7% Table 1: Quantitative performance comparisons on the PFCN dataset. (BSN). Our final model achieves the state-of-the-art mean IoU at 96.7%. The quantitative result comparison is given in Table 1. Result from graph-cut [22] is shown as the baseline. 4.3. Evaluation on other datasets: Since the performance on the PFCN dataset is pretty high and data for the boundary class is unbalanced compare to foreground/background, a good performance on boundary segmentation may only lead to marginal improvement in mean IoU on this dataset. Thus we further test our method on the portrait images collected from three more popular semantic segmentation datasets to evaluate the effectiveness of our boundary-sensitive techniques. COCO portrait: We automatically collect all the por6 Figure 6: Result visualizations of three challenging examples. The first row shows contains confusing objects in the background; the second row includes multiple people in the background; in the third row the background color is close to the foreground. 4.4. Result analysis 4.4.1 techniques. Figure 7 shows the comparison of our method with DeepLabv2 and PortraitFCN+ in three challenging scenarios: hair segmentation, accessory segmentation and ear segmentation. Results reveal that while other methods have difficulty in segmenting accessories and small body parts, our method can provide a smooth and accurate segmentation. Results visualization on challenging scenarios We visualize the overall performance of our BSN model compared to DeepLabv2 and PortraitFCN+ using three challenging scenarios: confusing objects in the background, multiple people appear in the image, and the background color theme is close to the foreground. Figure 6 shows that our model is more accurate and robust than other methods even under challenging conditions. 4.4.2 4.4.3 Generating trimap for image matting Since our method can deliver an accurate boundary prediction, it is a natural extension to generate trimaps for image matting models. After performing segmentation, we use the same technique during training to dilate the boundary pixels to 10-pixels in width. Several examples are shown in Figure Accurate boundary segmentation Our method also delivers more precise boundary predictions thanks to its novel boundary-sensitive segmentation 7 ment, depth of field, augmented reality, image cartoonization, etc. We show some applications in Figure 9. Figure 7: Boundary segmentation comparisons. The first column are the original images. The three subsequent columns represent the results from the PortraitFCN+ method, the fine-tuned DeepLabv2 model with the attribute classifier, and our final model (magnified for best viewing). Figure 9: Some applications of portrait segmentation. 5. Conclusion and discussion We present a boundary-sensitive portrait segmentation system. Two boundary-sensitive kernels are introduced into the loss function. One gives more boundary information for each individual image and one governs the overall shape of portrait prediction. An attribute classifier is trained jointly with the segmentation network to reinforce the training process. Experiments are conducted on the largest publicly available portrait segmentation dataset as well as portrait images collected from other three popular semantic segmentation datasets. We outperform the previous state-ofthe-arts in both quantitative performance and visual performance. For future work, we would like to extend our boundarysensitive methods to general semantic segmentation problem and explore more semantic attributes to reinforce the training process. Figure 8: Trimaps generated from our segmentation maps. 8. 4.4.4 Applications of portrait segmentation Portrait segmentation has been widely used in various image processing applications such as background replace8 References [16] G. Lin, A. Milan, C. Shen, and I. D. Reid. Refinenet: Multipath refinement networks for high-resolution semantic segmentation. CoRR, abs/1611.06612, 2016. [17] T. Lin, M. Maire, S. J. Belongie, L. D. Bourdev, R. B. Girshick, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft COCO: common objects in context. CoRR, abs/1405.0312, 2014. [18] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2015. [19] C. Peng, X. Zhang, G. Yu, G. Luo, and J. Sun. Large kernel matters - improve semantic segmentation by global convolutional network. CoRR, abs/1703.02719, 2017. [20] X. Shen, H. Gao, X. Tao, C. Zhou, and J. Jia. High-quality correspondence and segmentation estimation for dual-lens smart-phone portraits. arXiv preprint arXiv:1704.02205, 2017. [21] X. Shen, A. Hertzmann, J. Jia, , S. Paris, B. Price, E. Shechtman, and I. Sachs. Automatic portrait segmentation for image stylization. Computer Graphics Forum, 35(3):93–102, 2016. [22] J. Shi and J. Malik. Normalized cuts and image segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905, Aug 2000. [23] F. Yu and V. Koltun. Multi-scale context aggregation by dilated convolutions. In ICLR, 2016. [24] H. Zhao, J. Shi, X. Qi, X. Wang, and J. Jia. Pyramid scene parsing network. CoRR, abs/1612.01105, 2016. [1] V. Badrinarayanan, A. Kendall, and R. Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. CoRR, abs/1511.00561, 2015. [2] L. Breiman. Random forests. Machine Learning, 45(1):5– 32, Oct 2001. [3] H. Caesar, J. R. R. Uijlings, and V. Ferrari. Coco-stuff: Thing and stuff classes in context. CoRR, abs/1612.03716, 2016. [4] J. Canny. A computational approach to edge detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, PAMI-8(6):679–698, Nov 1986. [5] B. Chen, Z. Yang, S. Huang, X. Du, Z. Cui, J. Bhimani, and N. Mi. Cyber-physical system enabled nearby traffic flow modelling for autonomous vehicles. 36th IEEE International Performance Computing and Communications Conference, Special Session on Cyber Physical Systems: Security, Computing, and Performance (IPCCC-CPS). IEEE, 2017. [6] L. Chen, G. Papandreou, F. Schroff, and H. Adam. Rethinking atrous convolution for semantic image segmentation. CoRR, abs/1706.05587, 2017. [7] L.-C. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. arXiv:1606.00915, 2016. [8] X. Du, W. Abdalmageed, and D. Doermann. Large-scale signature matching using multi-stage hashing. In 2013 12th International Conference on Document Analysis and Recognition, pages 976–980, Aug 2013. [9] X. Du, D. Doermann, and W. AbdAlmageed. A graphical model approach for matching partial signatures. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1465–1472, June 2015. [10] X. Du, M. El-Khamy, J. Lee, and L. Davis. Fused dnn: A deep neural network fusion approach to fast and robust pedestrian detection. In 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), pages 953–961, March 2017. [11] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International Journal of Computer Vision, 88(2):303– 338, June 2010. [12] M. A. Hearst, S. T. Dumais, E. Osuna, J. Platt, and B. Scholkopf. Support vector machines. IEEE Intelligent Systems and their Applications, 13(4):18–28, July 1998. [13] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [14] D. Li, T. Salonidis, N. V. Desai, and M. C. Chuah. Deepcham: Collaborative edge-mediated adaptive deep learning for mobile object recognition. In 2016 IEEE/ACM Symposium on Edge Computing (SEC), pages 64–76, Oct 2016. [15] D. Li, X. Wang, and D. Kong. Deeprebirth: Accelerating deep neural network execution on mobile devices. CoRR, abs/1708.04728, 2017. 9
1cs.CV
TOPOLOGICAL NOETHERIANITY FOR ALGEBRAIC REPRESENTATIONS OF INFINITE RANK CLASSICAL GROUPS arXiv:1708.06420v1 [math.AC] 21 Aug 2017 ROB H. EGGERMONT AND ANDREW SNOWDEN Abstract. Draisma recently proved that polynomial representations of GL∞ are topologically noetherian. We generalize this result to algebraic representations of infinite rank classical groups. 1. Introduction 1.1. Background. In recent years, a number of novel noetherianity results have been discovered and exploited; for but a few examples, see [AH, Co, Co2, CEF, DE, DES, DK, Eg, HS, NSS, PSa, Sn, SS2]. It is not yet clear where the ultimate line between noetherianity and non-noetherianity lies: of the reasonable structures to consider, some are known to be noetherian and some not, and in between is a vast unknown territory. Recently, Draisma [Dr] proved a breakthrough result claiming a large tract of the unknown for the noetherian side. To state it, we must recall some terminology. Fix an algebraically S closed field k and let GL = n≥1 GLn (k). A representation of GL is called polynomial if it is a S subquotient of a finite1 direct sum of tensor products of the standard representation V = n≥1 kn . If E is a polynomial representation then the dual space Ê is canonically identified with the k-points of the spectrum of the ring Sym(E), and in this way inherits a Zariski topology. Recall that if a group G acts on a space X (such as GL on Ê) then we say that X is topologically G-noetherian if every descending chain of G-stable closed subsets of X stabilizes. We can now state Draisma’s theorem: Theorem 1.1 (Draisma). Let E be a polynomial representation of GL. Then Ê is topologically GL-noetherian. This result has already found application: Erman–Sam–Snowden [ESS] have combined it with the resolution of Stillman’s conjecture by Ananyan–Hochster [AH2] to establish a vast generalization of Stillman’s conjecture. 1.2. The main theorem. Draisma’s theorem elicits a few natural follow-up questions. Does noetherianity hold for any non-polynomial representations of GL? And what about representations of similar groups, such as the infinite orthogonal group? The purpose of this paper is to S provide some answers to these questions. S Let O = n≥1 On (k) be the infinite orthogonal group, and let Sp = n≥1 Sp2n (k) be the infinite symplectic group. We say that a representation of O or Sp is algebraic if it appears as a subquotient of a finite direct sum of tensor powers of the standard representation V. S Let V∗ = n≥1 (kn )∗ , the so-called restricted dual of V. The group GL acts on V∗ . A Date: March 20, 2018. AS was supported by NSF grants DMS-1303082 and DMS-1453893 and a Sloan Fellowship. 1In other settings, one allows infinite sums of tensor powers, but in this paper we restrict to finite sums. 1 2 ROB H. EGGERMONT AND ANDREW SNOWDEN representation of GL is called algebraic if it appears as a subquotient of a finite direct sum of representations of the form V⊗n ⊗V∗⊗m . We note that V ∼ = V∗ as representations of O and Sp, so one does not get a larger category of representations by using V∗ . In characteristic 0, algebraic representations of GL, O, and Sp have been studied in [DPS, PSe, PSt, SS]. The main theorem of this paper is: Theorem 1.2. Let G ∈ {O, Sp, GL} and let E be an algebraic representation of G. Then Ê is topologically G-noetherian. In §5, we show that certain very similar looking statements are false. It would be interesting to see if this theorem has any applications in commutative algebra along the lines of [ESS]. We note, however, that [ESS] makes use of the kind of statements found in §5 that are true in the case of polynomial representations, but false for algebraic representations. 1.3. Possible generalizations. There are two directions in which Theorem 1.2 might be generalized. First, one might hope for a statement at the level of ideals. That is, suppose that E is an algebraic representation of G (for G as in the theorem), and let A = Sym(E). The theorem is equivalent to the statement that any ascending chain of G-stable radical ideals in A stabilizes. A plausible stronger statement is that every ascending chain of Gstable ideals stabilizes. More generally, if E′ is a second algebraic representation, one might hope that every ascending chain of G-stable submodules of A ⊗ E′ stabilizes. Second, one might hope to extend topological noetherianity to certain analogs of algebraic representations. Let A = Sym(Sym2 (C∞ )), equipped with its natural action of GL. One can then consider the category ModA of A-modules equipped with a compatible polynomial be the Serre subcategory of torsion modules. It is known [NSS] action of GL. Let Modtors A that the quotient category ModA / Modtors A is equivalent to the category of algebraic representations of O (as a tensor category). Thus Theorem 1.2 in the case G = O can be stated as: every finitely generated algebra in the category ModA / Modtors is topologically noetherian. A It seems plausible that this statement might hold true for any A of the form Sym(E), with E a polynomial representation of GL. 1.4. Outline. In §2, we show that it suffices to prove Theorem 1.2 for any one of the three groups. In §3, we go over some preliminary material. The main theorem (in the general linear case) is proved in §4. In §5, we discuss counterexamples to certain variants of the main theorem. Acknowledgments. We thank Steven Sam for helpful discussions. 2. Reduction to the general linear case We now show that it suffices to prove Theorem 1.2 in any one of the three cases. Later, we will prove the theorem in the general linear case. Lemma 2.1. Suppose that G, H ∈ {GL, Sp, O} and that H → G is a homomorphism such that the standard representation of G pulls back to an algebraic representation of H. Suppose also that Theorem 1.2 holds for H. Then Theorem 1.2 holds for G. Proof. The hypothesis implies that any algebraic representation of G pulls back to an algebraic representation of H. Let E be an algebraic representation of G. Suppose that Z• ⊂ Ê is a descending chain of G-stable closed subset. Then it is also a descending chain of H-stable closed subsets, and thus stabilizes. Thus Ê is topologically G-noetherian.  TOPOLOGICAL NOETHERIANITY FOR ALGEBRAIC REPRESENTATIONS 3 Proposition 2.2. If Theorem 1.2 holds for any one of the three groups then it holds for the other two. Proof. Suppose the theorem holds for GL and char(k) 6= 2. Consider the representation V ⊕ V∗ of GL. This representation carries both a symmetric form and a symplectic form, defined by the formulas (v+λ, v ′ +λ′ ) = λ(v ′ )±λ′ (v). These forms give group homomorphisms GL → O and GL → Sp. These homomorphisms have the property that the standard representation pulls back to the representation V ⊕ V∗ . Thus Theorem 1.2 holds for O and Sp by Lemma 2.1. If char(k) = 2 then a similar argument works. The bilinear form defined in the previous paragraph is alternating in characteristic 2 (i.e., it satisfies (v + λ, v + λ) = 0) and thus yields a map GL → Sp that again allows us to apply Lemma 2.1. The representation V ⊕ V∗ also admits a quadratic form defined by (v, λ) 7→ λ(v), which affords a homomorphim GL → O to which we can apply Lemma 2.1. Now suppose that Theorem 1.2 holds for O. Applying Lemma 2.1 to the inclusion O → GL, we see that Theorem 1.2 holds for GL. Appealing to the previous two paragraphs, we thus see that Theorem 1.2 holds for Sp as well. Similarly, if Theorem 1.2 holds for Sp then we get it for GL and then O.  A similar argument is used in the following proposition, which we also require. A representation of GL × GL is polynomial if it appears as a subquotient of a finite sum of representations of the form V⊗n ⊗ V⊗m . Proposition 2.3. Let E be a polynomial representation of GL×GL. Then Ê is topologically GL × GL noetherian. Proof. Consider the diagonal copy of GL in GL × GL. The restriction E|GL is then polyL nomial: indeed, if E is a subquotient of ki=1 V⊗ni ⊗ V⊗mi then E|GL is a subquotient of Lk ⊗(ni +mi ) . Since Ê|GL is topologically noetherian by Draisma’s theorem, the result i=1 V follows.  3. Preliminaries 3.1. Spaces of matrices. Let M̂ be the set of matrices (ai,j )i,j∈N with ai,j ∈ k. Let M ⊂ M̂ be the subset consisting of matrices with only finitely many non-zero entries. We have a trace pairing h, i : M̂ × M → k, hA, Bi = tr(At B) that identifies M̂ with the linear dual of the space M. We let Mn ⊂ M be the set of matrices (ai,j ) with ai,j = 0 for i > n or j > n. We define M̂n similarly, but regard it as a quotient of M̂. Thus M is the union of the Mn and M̂ is the inverse limit of the M̂n . Let U, L ⊂ M and Û, L̂ ⊂ M̂ be the spaces of upper-triangular and lower-triangular matrices. The trace pairing identifies L̂ with the linear dual of L and Û with the dual of U. One cannot multiply arbitrary elements of M̂, as this would typically involve infinite sums. However, the product AB is defined for A ∈ L̂ and B ∈ M̂, or for A ∈ M̂ and B ∈ Û. We define Ln , Un , L̂n , and Ûn inSthe obvious ways. We let Vn = kn and V = n≥1 Vn . We let V̂ and V̂n be the dual spaces to V and Vn , so that V̂ is the inverse limit of the spaces V̂n . 4 ROB H. EGGERMONT AND ANDREW SNOWDEN 3.2. Polynomial representations. Let E be a polynomial representation of GL. Then the action of GLn ⊂ GL extends uniquely to an action of the monoid Mn , and these assemble to an action of M. Furthermore, the action of U on the dual Ê extends uniquely to a continuous action of Û, where continuous means that for fixed v ∈ Ê the quantity uv depends only on the projection of u to Ûn , for some n depending only on v. This is easy to see when E = V: the point is that, if ei denotes the ith basis vector of V, then ue∗i only depends on the top left i × i block of u. The action of L on Ê does not similarly extend to an action of L̂. We can then equivalently think of the representation E as a polynomial functor E on the category of k-vector spaces. We let En be the value of the functor E on kn , so that E itself is identified with the union of the En . We let Ê and Ên be the linear duals of E and En , so that Ê is the inverse limit of the Ên . We note that En ⊂ E is stable under the action of U and Û. It follows that the projection map Ê → Ên is compatible with the action of Û. For the purposes of this paper, we really only need to consider E’s that are finite sums of tensor powers of V. In this case, one does not need to think about polynomial functors: the space En is then the corresponding sum of tensor powers of Vn . We identify Ê with the spectrum of the ring Sym(E) (or more accurately, the k-points of the spectrum), and equip it with the Zariski topology. By definition, a regular function f on Ê is an element of Sym(E). Since E is the union of the En , it follows that f belongs to Sym(En ) for some n; we say that f has level n. This implies that f factors through the projection Ê → Ên . 4. The general linear case Let G = GL×GL, and let H be the subgroup of elements of the form (g, t g −1). Of course, H is isomorphic to GL. By definition, every algebraic representation of H is a subquotient of E|H for some polynomial representation E of G, so it suffices to prove noetherianity of Ê|H for all such E. We therefore fix E for the rest of this section, and prove that Ê|H is noetherian. Let G act on M by the formula (g, h) · A = gAt h. The dual action of G on M̂ is given by the formula (g, h) · A = t g −1 Ah−1 . Let I ∈ M̂ be the identity matrix. Note that the stabilizer of I in G is exactly H. Given an H-stable closed subset Z of Ê, let Z + be the closure of the G-orbit of the set {I} × Z in M̂ × Ê. (The topology on the product is the Zariski topology on the product of schemes, which is not the product topology.) We will prove: Proposition 4.1. Let Z be an H-stable closed subset of Ê. Then {I} × Z = ({I} × Ê) ∩ Z + . Before proving the proposition, we note an important consequence. Corollary 4.2. The function Z 7→ Z + defines an order-preserving injection (4.3) {H-stable closed subsets of Ê} → {G-stable closed subsets of M̂ × Ê} In particular, Ê is topologically H-noetherian. Proof. It is clear that Z 7→ Z + is order preserving. By the proposition, we can recover Z from Z + , and so the map is injective. Since M̂ × Ê is the dual of the polynomial representation M ⊕ E of G, Proposition 2.3 shows that it is topologically G-noetherian. In particular, the right side of (4.3) satisfies the descending chain condition. It follows that the left side does as well, and so Ê is topologically H-noetherian.  TOPOLOGICAL NOETHERIANITY FOR ALGEBRAIC REPRESENTATIONS 5 Let Û′ be the subset of Û consisting of matrices where all diagonal entries are 1, and let Ŵ = Û × Û′ . Let ϕ : Ŵ → M̂ be the function defined by ϕ(u, v) = t uIv. Note that since t u ∈ L̂ and v ∈ Û, this matrix product is defined. Let ϕn : Ŵn → M̂n be defined by the same formula. We note that the diagram Ŵ  Ŵn ϕ / M̂  ϕn M̂n / commutes. That is, if i, j ≤ n then the (i, j) entry of ϕ(u, v) only depends on the top left n × n blocks of u and v. Lemma 4.4. Let X be an affine variety over k, and let h : Ŵn × X → k be a regular function. Then there is a monomial m in the diagonal entries of Ûn and a regular function H : M̂n × X → k such that H(ϕ(w), x) = m(u)h(w, x) holds for all w = (u, v) ∈ Ŵn and x ∈ X. Proof. Consider the polynomial ring R = Sym(Wn ) = k[uij , vkl ]1≤i≤j≤n,1≤k<l≤n ⊗ OX . The morphism ϕn induces an injective ring homomorphism Sym(Mn ) ⊗OX → R, so we may view the former as a subring of the latter. Note that this subring is generated (as an OX -algebra) P Pj−1 by terms of the form ik=1 uki vkj for i < j and terms of the form uji + k=1 uki vkj for i ≥ j. We denote these terms by aij . It thus suffices to show that all uij and vkl can be expressed as a quotient of a polynomial in the aij by a monomial in the uii . We do so by induction. a We have u1i = ai1 for any i ≥ 1 and v1j = u1j for any j > 1. Both of these are expressions 11 of the desired form. Now suppose that uki and vkj can be expressed in the desired form for all k ≤ i < j with k < K, for some K. For i ≥ K we see that aiK is equal to uKi plus terms of the form uki vkK with k < K; since we have an expression of the desired form for each of these other terms, we find one for uKi . For j > K, we find that aKj is equal to uKK vKj plus terms of the form ukK vkj with k < K; once again, this yields an expression of the desired form for vKj . This concludes the proof of the lemma.  Let f be a regular function on Ê of level n that vanishes on Z. We define a function hf on Ŵ × Ê by hf (w, x) = f (w · x). Note that the above formula makes use of the action map Û × Û × Ê → Ê, which exists since Ê is a polynomial representation of G. We claim that hf is a regular function of level n. Consider the diagram Ŵ × Ê  / Ŵn × Ên Ê  / Ên f f k / / k The left horizontal maps are the action maps. Both squares commute, so the whole diagram does, and thus hf factors through the left map and so has level n. It follows from the Lemma 4.4 that there is a monomial mf in the diagonal entries of Ûn such that mf hf induces a regular function on M̂ × Ê of level n; call this function Hf . 6 ROB H. EGGERMONT AND ANDREW SNOWDEN Lemma 4.5. The function Hf vanishes on Z + . Proof. Let Gm = GLm ×GLm , and let Hm ⊂ Gm be the set of matrices of the form (g, tg −1 ). It suffices to show that Hf vanishes on a dense subset of the Gm -orbit of {I} × Z for all m ≫ 0. Now, the set Wm Hm ⊂ Gm is dense, since a generic element of GLm can be written as a product of an upper triangular and lower triangular matrix. Suppose that g = wh, with m ≥ n. Writing w = (u, v), we have g = (uh, v th−1 ). Note that g · I = t (uh)−1 I(v t h−1 )−1 = t u−1 Iv −1 = ϕ(w −1 ). Let z ∈ Z. We then have Hf (g(I, z)) = Hf (ϕ(w −1), gz) = mf (u−1)hf (w −1 , gz). Now, by definition, we have hf (w −1 , gz) = f (w −1whz) = f (hz) Since Z is H-stable, we have hz ∈ Z. Since f vanishes on Z, we thus see that this expression vanishes.  Lemma 4.6. Suppose z ∈ Ê does not belong to Z. Then there exists f vanishing on Z such that Hf (I, z) 6= 0. Proof. Let n be such that the projection z of z to Ên does not belong to Zn . We can thus find a regular function f on Ên that vanishes on Zn but does not vanish at z. We have Hf (I, z) = Hf (ϕ(I, I), z) = mf (I)hf ((I, I), z). Since mf (u) is monomial in the diagonal entries of u, it follows that mf (I) 6= 0. Furthermore, we have hf (I, I, z) = f (z) 6= 0. We thus see that Hf (I, z) 6= 0.  Proof of Proposition 4.1. It is clear that {I} × Z is contained in the intersection of {I} × Ê and Z + . Suppose that z ∈ Ê does not belong to Z. Let f be as in Lemma 4.6. By Lemma 4.5, we see that Hf belongs to the ideal of Z + . Since Hf (I, z) 6= 0, it follows that (I, z) 6∈ Z + , which proves the result.  5. Some counterexamples Draisma’s theorem states that if E is a polynomial representation of G then Ê is topologically G-noetherian. One can identify En with the spectrum of Sym(Ên ), and in this way regard E = lim En as an ind-scheme. (The elements of Sym(Ê) define functions on E, −→ and their zero loci define the closed sets.) It is therefore sensible to ask if E is topologically noetherian. In [ESS] it is proved that this is the case: in fact, the G-stable closed sets of E and Ê are shown to be in bijection, and so noetherianity of E follows from Draisma’s theorem. We now explain that ind- version of Theorem 1.2 fails. In fact, noetherianity fails due to an obvious obstruction in each case. First consider the GL case. If m is an element of M then one can make sense of the determinant χ(m) = det(1 − tm), a polynomial in t. The action of GL on M by conjugation defines an algebraic representation, and leaves χ invariant. Let ci (m) be the coefficient of ti in χ(m). Then ci : M → A1 is a GL-invariant function. Taken together, the ci define an GL-invariant function c : M → A∞ , where the target is the ind-scheme lim An . It is easy to −→ see that c is surjective, from which it follows that M is not topologically H-noetherian. (If TOPOLOGICAL NOETHERIANITY FOR ALGEBRAIC REPRESENTATIONS 7 Z• is an infinite strictly descending chain of closed subsets of A∞ then c−1 (Z• ) is an infinite strictly descending chain of H-stable closed subsets of S.) The other cases are similar. In the symplectic case, one considers the characteristic polynomial of anti-symmetric matrices, while in the orthogonal case one uses symmetric matrices. We remark that V̂ (and more generally V̂d for any d ≥ 1) is known to be topologically S-noetherian [Co, Co2, AH, HS], where S is the infinite symmetric group, and for similar reasons V is not topologically S-noetherian (one makes an invariant polynomial by using the coordinates as roots, so that the ci ’s are elementary symmetric functions). It is interesting to observe that these counterexamples do not apply in the pro- setting since the invariants they use no longer make sense: one cannot take the characteristic polynomial of an element of M̂, as this would involve infinite sums. Similarly, the proof of noetherianity in the pro- setting does not apply in the ind-setting since the element I ∈ M̂ does not belong to M. References [AH] [AH2] [Co] [Co2] [CEF] [Dr] [DE] [DES] [DK] [DPS] [Eg] [ESS] [HS] [NSS] [PSa] [PSe] [PSt] [Sn] Matthias Aschenbrenner, Christopher Hillar. Finite generation of symmetric ideals. Trans. Amer. Math. Soc. 359 (2007), 5171–5192. arXiv:math/0411514. Tigran Ananyan, Melvin Hochster. Small Subalgebras of Polynomial Rings and Stillman’s Conjecture. arXiv:1610.09268 D. E. Cohen. On the laws of a metabelian variety. J. Algebra 5 (1967), 267–273. D. E. Cohen. Closure relations, Buchberger’s algorithm, and polynomials in infinitely many variables. Computation theory and logic, (1987), 78–87. Thomas Church, Jordan S. Ellenberg, Benson Farb. FI-modules and stability for representations of symmetric groups. Duke Math. J. 164 (2015), no. 9, 1833–1910. arXiv:1204.4533v4 Jan Draisma. Topological Noetherianity of polynomial functors. arXiv:1705.01419 Jan Draisma, Rob H. Eggermont. Plücker varieties and higher secants of Sato’s Grassmannian. J. Reine Angew. Math., to appear. arXiv:1402.1667 Harm Derksen, Rob Eggermont, Andrew Snowden. Topological noetherianity for cubic polynomials. Algebra & Number Theory, to appear. arXiv:1701.01849 J. Draisma, J. Kuttler. Bounded-rank tensors are defined in bounded degree. Duke Math. J.163 (2014), no. 1, 35–63. arXiv:1103.5336 Elizabeth Dan-Cohen, Ivan Penkov, Vera Serganova. A Koszul category of representations of finitary Lie algebras. Adv. Math. 289 (2016), 250-278. arXiv:1105.3407v2 Rob H. Eggermont. Finiteness properties of congruence classes of infinite matrices. Linear Algebra Appl. 484 (2015), 290–303. arXiv:1411.0526 Daniel Erman, Steven Sam, Andrew Snowden. Generalizations of Stillman’s conjecture via twisted commutative algebras. In preparation. Christopher Hillar, Seth Sullivant. Finite Gröbner bases in infinite dimensional polynomial rings and applications. Adv. in Math. 221 (2012), 1–25. arXiv:0908.1777 Rohit Nagpal, Steven V Sam, Andrew Snowden. Noetherianity of some degree two twisted commutative algebras. Selecta Math. (N.S.) 22 (2016), no. 2, 913–937. arXiv:1501.06925v2 Andrew Putman, Steven V Sam. Representation stability and finite linear groups. Duke Math. J., to appear. arXiv:1408.3694v2 Ivan Penkov, Vera Serganova. Categories of integrable sl(∞)-, o(∞)-, sp(∞)-modules. Representation Theory and Mathematical Physics, Contemp. Math. 557, AMS 2011, pp. 335–357. arXiv:1006.2749v1 Ivan Penkov, Konstantin Styrkas. Tensor representations of classical locally finite Lie algebras. Developments and trends in infinite-dimensional Lie theory, Progr. Math. 288, Birkhäuser Boston, Inc., Boston, MA, 2011, pp. 127–150. arXiv:0709.1525v1 Andrew Snowden. Syzygies of Segre embeddings and ∆-modules. Duke Math. J. 162 (2013), no. 2, 225–277. arXiv:1006.5248v4 8 ROB H. EGGERMONT AND ANDREW SNOWDEN [SS] [SS2] Steven V Sam, Andrew Snowden. Stability patterns in representation theory. Forum Math. Sigma 3 (2015), e11, 108 pp. arXiv:1302.5859v2. Steven V Sam, Andrew Snowden. Gröbner methods for representations of combinatorial categories. J. Amer. Math. Soc., to appear. arXiv:1409.1670v3 Department of Mathematics, University of Michigan, Ann Arbor, MI E-mail address: [email protected] URL: http://www-personal.umich.edu/~robegger/ Department of Mathematics, University of Michigan, Ann Arbor, MI E-mail address: [email protected] URL: http://www-personal.umich.edu/~asnowden/
0math.AC
1 Learned Primal-dual Reconstruction Jonas Adler∗† Ozan Öktem∗ of Mathematics, KTH - Royal Institute of Technology † Elekta AB, Box 7593, SE-103 93 Stockholm, Sweden Email: {jonasadl, ozan}@kth.se arXiv:1707.06474v2 [math.OC] 24 Nov 2017 ∗ Department Abstract—We propose the Learned Primal-Dual algorithm for tomographic reconstruction. The algorithm accounts for a (possibly non-linear) forward operator in a deep neural network by unrolling a proximal primal-dual optimization method, but where the proximal operators have been replaced with convolutional neural networks. The algorithm is trained end-to-end, working directly from raw measured data and it does not depend on any initial reconstruction such as filtered back-projection (FBP). We compare performance of the proposed method on low dose computed tomography reconstruction against FBP, total variation (TV), and deep learning based post-processing of FBP. For the Shepp-Logan phantom we obtain > 6 dB PSNR improvement against all compared methods. For human phantoms the corresponding improvement is 6.6 dB over TV and 2.2 dB over learned post-processing along with a substantial improvement in the structural similarity index. Finally, our algorithm involves only ten forward-back-projection computations, making the method feasible for time critical clinical applications. Index Terms—Inverse problems, Tomography, Deep learning, Primal-Dual, Optimization A central question is whether one can combine elements of model and data driven approaches for solving ill-posed inverse problems. In particular, is there a framework for incorporating the knowledge of a forward model when designing a neural network for reconstruction? The Learned Primal-Dual reconstruction method developed in this paper is such a framework. It applies to general inverse problems and it is best described in an abstract setting, so our starting point is to formalize the notion of an inverse problem. Mathematically, an inverse problem can be formulated as reconstructing (estimating) a signal ftrue ∈ X from data g ∈ Y where g = T (ftrue ) + δg. (1) Here, the reconstruction space X and the data space Y are typically Hilbert Spaces, T : X → Y is the forward operator that models how a signal gives rise to data in absence of noise, and δg ∈ Y is a single sample of a Y -valued random variable that represents the noise component of data. I. I NTRODUCTION In an inverse problem, the goal is to reconstruct parameters characterizing the system under investigation from indirect observations. Such problems arise in several areas of science and engineering, like tomographic imaging where one seeks to visualize the interior structure of an object (2D/3D image) from indirect observations. Imaging technologies of this type, such as computed tomography (CT) and magnetic resonance imaging (MRI) imaging, are indispensable for contemporary medical diagnostics, intervention and monitoring. There is by now a rich theory for model driven tomographic image reconstruction. A key component is knowledge about the forward model, which describes the data formation process in absence of noise. In many applications, an explicit forward model can be derived starting out from the underlying physical principles that are utilized by the imaging modality. Another component accounts for the knowledge about the statistical properties of data and a priori information about the image to be recovered. A parallel line of development in signal processing has been the usage of deep learning for solving a wide range of tasks that can be cast as supervised learning. The success of these data driven approaches are this far confined to tasks where knowledge about the forward model is not needed, or has little significance. As an example, an entirely data driven approach for tomographic image reconstruction applicable to clinical sized problems has yet to be demonstrated. A. Variational regularization A common model driven approach for solving (1) is to maximize the likelihood of the signal, or equivalently minimizing the negative data log-likelihood [1]:  min L T (f ), g . (2) f ∈X This minimization is for typical choices of T ill-posed, that is, a solution (if it exists) is unstable with respect to the data g in the sense that small changes to data results in large changes to a reconstruction. Hence, a maximum likelihood solution typically leads to over-fitting against data. Variational regularization, also referred to as model based iterative reconstruction in medical image processing, avoids over-fitting by introducing a functional S : X → R (regularization functional) that encodes a priori information about the true (unknown) ftrue and penalizes unlikely solutions [2], [3]. Hence, instead of minimizing only the negative data loglikelihood as in (2), one now seeks to minimize a regularized objective functional by solving    min L T (f ), g + λ S(f ) for a fixed λ ≥ 0. (3) f ∈X In the above, λ (regularization parameter) governs the influence of the a priori knowledge encoded by the regularization functional against the need to fit data. 2 B. Machine learning in inverse problems We here review results on learned iterative schemes, see [4] for a wider review on machine learning for medical imaging and [5] for usage of machine learning for solving inverse problems in general. Machine learning is widely used for non-linear function approximation under weak assumptions and has recently emerged as the state of the art for several image processing tasks such as classification and segmentation. Applied to the inverse problem in (1), it can be phrased as the problem of finding a (non-linear) mapping T θ† : Y → X satisfying the following pseudo-inverse property: T θ† (g) ≈ ftrue whenever data g is related to ftrue as in (1). A key element in machine learning approaches is to parametrize the set of such pseudo-inverse operators by a parameter θ ∈ Θ where Θ is some parameter space and the main algorithmic complication is to select an appropriate structure of T θ† such that, given appropriate training, the pseudo-inverse property is satisfied as well as possible. In the context of tomographic reconstruction, three main research directions have been proposed. The first is so called learned post-processing or learned denoisers. Here, the learned reconstruction operator is of the form T θ† = Λθ ◦ T † where Λθ : X → X is a learned post-processing operator and T † : Y → X is some approximate pseudo-inverse, e.g. given by filtered back-projection (FBP) in CT reconstruction. This type of method is relatively easy to implement, given that the pseudo-inverse can be applied off-line, before the learning is performed, which reduces the learning to inferring an X → X transformation. This has been investigated by several authors [6], [7], [8]. Another method is to learn a regularizer and use this regularizer in a classical variational reconstruction scheme according to (3). Examples of this include dictionary learning [9], but several alternative methods have been investigated, such as learning a variational auto-encoder [10] or using a cascade of wavelet transforms (scattering transform) [11]. Finally, some authors investigate learning the full reconstruction operator, going all the way from data to reconstruction. Doing this in one step is typically very computationally expensive and does not scale to the data sizes encountered in tomographic reconstruction. Instead, learned iterative schemes have been studied. These schemes resemble classical optimization methods used for tomographic reconstruction but use machine learning to find the best update in each iteration given the last iterate and results of applying the forward operator and its adjoint as input. One of the first works on learned iterative schemes is [12], which learns an ADMM-like scheme for MRI reconstruction. A further development along this lines is given in [13], which learns over a broader class of schemes instead of ADMMtype of schemes. The application is to finite dimensional inverse problems typically arising in image restoration. This approach was in [5] further extended to non-linear forward operators in to the infinite dimensional setting, which also applies learned iterative schemes to (non-linear, pre-log) CT. Similar approaches for MRI reconstruction has also been considered [14], [15]. Here, the situation is simpler than CT reconstruction since the forward operator is approximated by a Fourier transform, i.e. MRI reconstruction amounts to inverting the Fourier transform. Given a structure of T θ† , the ”learning” part refers to choosing a ”optimal” set of parameters θ given some training data, where the concept of optimality is typically quantified through a loss functional that measures the quality of a learned pseudo-inverse T θ† . To define this loss functional, consider a (X × Y )–valued random variable (f, g) with joint probability distribution µ. This could be e.g. the probability distribution of human bodies and corresponding noisy tomographic data. We define the optimal reconstruction operator as the one whose reconstructions have the lowest average mean squared distance to the true reconstructions, where the average is taken w.r.t. µ. Finding this reconstruction operator is then given by selecting the parameters θ ∈ Θ so that the loss functional L(θ) is minimized: h i 2 L(θ) := E(f,g)∼µ T θ† (g) − f X . (4) However, in practice we often do not have access to the probability distribution µ of the random variable (f, g). Instead, we know a finite set of samples (g1 , f1 ), . . . , (gN , fN ). In this setting, we replace µ in (4) with its empirical counterpart, so the loss function is replaced with the empirical loss N 1 Xh † b T θ (gi ) − fi L(θ) := N i=1 2 X i . (5) Since our main goal is to minimize the loss functional, our practical goal is thus two-fold: we want to find a learned reconstruction scheme that minimizes the empirical loss, and we also want it to generalize to new, unseen data. II. C ONTRIBUTION AND OVERVIEW OF PAPER This paper proposes the Learned Primal-Dual algorithm, a general framework for solving inverse problems that combines deep learning with model based reconstruction. The proposed learned iterative reconstruction scheme involves convolutional neural networks (CNNs) in both the reconstruction and data space, and these are connected by the forward operator and its adjoint. We train the networks to minimize the mean squared error of the reconstruction and demonstrate that this achieves very high performance in CT reconstruction, surpassing recent learning based methods on both analytical and human data. We emphasize that we learn the whole reconstruction operator, mapping data to reconstruction, and not just a postprocessing nor only the prior in isolation. In addition, we make all of our code and learned parameters open source so that the community can reproduce the results and apply the methods to other inverse problems [16]. 3 Algorithm 1 Non-linear primal dual hybrid gradient III. T HE L EARNED P RIMAL -D UAL ALGORITHM We here introduce how primal-dual algorithms can be learned from data and how this can be used to solve inverse problems. A. Primal-Dual optimization schemes In imaging, the minimization in (3) is a large scale optimization problem, which traditionally has been addressed using gradient based methods such as gradient descent or its extensions to higher order derivatives, e.g. quasi-Newton or Newton methods. However, many regularizers of interest result in a non-differentiable objective functional, so gradient based methods are not applicable. A common approach to handle this difficulty is to consider a smooth approximation, which however introduces additional parameters and gives non-exact solutions. An alternative approach is to use methods from non-smooth convex optimization. Proximal methods have been developed in order to directly work with non-smooth objective functionals. Here, a proximal step replaces the gradient step. The simplest example of such an algorithm is the proximal point algorithm for minimizing an objective functional G : X → R. It can be seen as the proximal equivalent of the gradient descent scheme and is given by fi+1 = proxτ G (fi ) (6) where τ ∈ R+ is a step size and the proximal operator is defined by i h 1 2 f0 − f X (7) proxτ G (f ) = arg min G(f 0 ) + 2τ f 0 ∈X While this algorithm could, in theory, be applied to solve (3) it is rarely used directly since (7) does not have a closed form solution. Proximal primal-dual schemes offer a work around. In these schemes, an auxiliary dual variable in the range of the operator is introduced and the primal (f ∈ X) and dual variables are updated in an alternating manner. One well known primal-dual scheme is the primal dual hybrid gradient (PDHG) algorithm [17], also known as the Chambolle-Pock algorithm, with a recent extension to nonlinear operators [18]. The scheme (algorithm 1) is adapted for minimization problems with the following structure: h i  min F K(f ) + G(f ) (8) f ∈X where K : X → U is a (possibly non-linear) operator, U is a Hilbert space and F : U → R and G : X → R are functionals on the dual/primal spaces. Note that (3) is a special case of (8) if we set F := L( · , g), K := T and G := S. In algorithm 1, F ∗ denotes the Fenchel conjugate of F, h ∈ U is the dual variable and [∂ K(fi )]∗ : U → X is the adjoint of the (Fréchet) derivative of K in point fi . Example: Total variation (TV) regularized CT: The PDHG method has been widely applied to CT [19]. In CT, the forward operator is given by the ray-transform P : X → Y , which integrates the signal over a set of lines M given by the 1: 2: 3: 4: 5: Given: σ, τ > 0 s.t. στ kKk2 < 1, γ ∈ [0, 1] and f0 ∈ X, h0 ∈ U . for i = 1, . . . do  hi+1 ← proxσF ∗ hi + σ K(f¯i )  fi+1 ← proxτ G fi − τ [∂ K(fi )]∗ (hi+1 ) f¯i+1 ← fi+1 + γ(fi+1 − fi ) acquisition geometry. Hence, elements in Y are functions on lines Z P(f )(`) := f (x)dx for ` ∈ M. ` and the adjoint of the derivative is the back-projection [20]. A typical example of variational regularization in imaging is TV regularization, which applies to signals that are represented by scalar functions of bounded variation. The corresponding regularization functional is then given as the 1-norm of the gradient magnitude, i.e. S(f ) := k ∇f k1 , ∇ : X → X d , d is the dimension of the space. The PDHG method can be used to solve the TV regularized CT optimization problem minkP(f ) − gk22 + λk∇f k1 . f ∈X Since the proximal of f 7→ k∇f k1 is hard to compute, the following identification is better suited for recasting the above into (8):   K : X → Y × X d as K(f ) := P(f ), ∇f ,  F [h(1) , h(2) ] := kh(1) − gk22 + kh(2) k1 and G(f ) := 0. B. Learned PDHG The aim is to derive a learned reconstruction scheme inspired by PDHG, algorithm 1. We follow the observation in [21], [22], that proximal operators can be replaced by other operators that are not necessarily proximal operators. The aforementioned publications replace a proximal operator with a denoising operator such as Block Matching 3D (BM3D). Our idea is to replace the proximal operators by parametrized operators where the parameters are learned from training data, resulting in a learned reconstruction operator. In order to make the learned reconstruction operator well defined and implementable on a computer we also need to select a stopping criterion. Choosing a proper stopping criterion is an active researcharea, but for simplicity and usability we use a fixed number of iterates. By selecting a fixed number of iterations, the computation budget is also fixed prior to training, which is a highly desirable property in time critical applications. Algorithm 2 below outlines the resulting variant of the PDHG algorithm with I iterations in which the primal proximal has been replaced by a learned proximal, Γθd and the dual proximal by a learned proximal Λθp . Note that in this article we consider only a single forward model and no regularizing operator, so we have K = T , U = Y , but we give the algorithm in full generality for completeness. 4 Algorithm 2 Learned PDHG where 0 is the zero element in the primal or dual space. In cases where a good starting guess is available, it would make sense to use it. One such option is to assume that there exists a pseudo-inverse T † , e.g. FBP for CT. For the dual variable, the data g enters into each iterate so there is no need for a good initial guess. This gives the starting point Initialize f0 ∈ X, h0 ∈ U for i = 1, . . . , I do  hi+1 ← Γθd hi + σ K(f¯i ), g  fi+1 ← Λθp fi − τ [∂ K(fi )]∗ (hi+1 ) 5: f¯i+1 ← fi+1 + θ(fi+1 − fi ) (1) 6: return fI 1: 2: 3: 4: f0 = [T † (g), T † (g), . . . , T † (g)] In algorithm 2, there are several parameters that need to be selected. These are the parameters of the dual proximal, θd , the primal proximal, θp , the step lengths, σ, τ and the overrelaxation parameter, θ. In a learned PDHG algorithm these would all be infered, learned, from training data. We implemented this algorithm and show its performance in the results section. While the performance was comparable to traditional methods, it did not improve upon the state of the art in deep learning based image reconstruction. h0 = [0, 0, . . . , 0] (10) In our tests we found that providing the Learned PrimalDual algorithm with such an initial guess marginally decreased training time, but did not give better final results. Given that using the pseudo-inverse T † adds more complexity by making the learned reconstruction operator depend on an earlier reconstruction, we report values only from zero-initialization. D. Connection to variational regularization C. Learned Primal-Dual To gain significant improvements, guided by recent advances in machine learning, the following modifications to the learned PDHG algorithm were done. • Following [13], [5], extend the primal space to allow the algorithm some ”memory” between the iterations. f = [f (1) , f (2) , . . . , f (Nprimal ) ] ∈ X Nprimal Similarly extend the dual space U to U Ndual . • Instead of explicitly enforcing updates of the form hi +  σ K f¯i , allow the network to learn how to combine the previous update with the result of the operator evaluation. • Instead of hard-coding the over-relaxation f¯i+1 ← fi+1 + θ(fi+1 − fi ), let the network freely learn in what point the forward operator should be evaluated. • Instead of using the same learned proximal operators in each iteration allow them to differ. This increases the size of the parameter space but it also significantly improves reconstruction quality. The above modifications result in a new algorithm, henceforth called the Learned Primal-Dual algorithm, that is outlined in algorithm 3. Initialize f0 ∈ X Nprimal , h0 ∈ U Ndual for i = 1, . . . , I do  (2) 3: hi ← Γθid hi−1 , K(fi−1 ), g 1: 2: 5:   Γθid h, K(f (2) ), g = proxσFg∗ h + σ K(f (2) )  (1)   f (1) ∗ p Λ θi , [∂K(f )] (h) = f (2)    proxτ G f (1) − τ [∂K(f (1) )]∗ (h) . (1 + θ) proxτ G f (1) − τ [∂K(f (1) )]∗ (h) − θf (1) Even if the learned proximal operators do not have explicit access to the proximals, the universal approximation property of neural networks [23] guarantees that given sufficient training data these equalities can be approximated arbitrarily well. A wide range of other optimization schemes can also be seen as special cases of the Learned Primal-Dual algorithm. For example, the gradient descent algorithm with step-length α for solving (8) is given by    fi+1 = fi − α [∂K(fi )]∗ [∇F](K(fi )) + [∇G](fi ) and can be obtained by selecting  Γθid h, K(f (2) ), g = [∇Fg ](K(f (2) ))  (1)   f (1) ∗ Λθip , [∂K(f )] (h) = f (2)   (1) f − α [∇G](f (1) ) + [∂K(f (1) )]∗ (h) . f (1) − α [∇G](f (1) ) + [∂K(f (1) )]∗ (h) Algorithm 3 Learned Primal-Dual 4: We note that by selecting Nprimal = 2 and Ndual = 1 the Learned Primal-Dual algorithm naturally reduces to the classical PDHG algorithm by making the following choices: (1) (1)  fi ← Λθip fi−1 , [∂K(fi−1 )]∗ (hi ) (1) return fI 1) Choice of starting point: In theory, the Learned PrimalDual algorithm can be used with any choice of starting points f0 and h0 . The most simple starting point, both from a conceptual and computational perspective, is zero-initialization f0 = [0, 0, . . . , 0] h0 = [0, 0, . . . , 0] (9) More advanced gradient based methods such as Limited memory BFGS are likewise sub-cases obtained by appropriate choices of learned proximal operators. In summary, the Learned Primal-Dual algorithm contains a wide range of optimization schemes as special cases. If the parameters are appropriately selected, then the proposed algorithm should always perform at least as well as current variational regularization schemes given the same stopping criteria, which here is a fixed number of iterates. 5 IV. I MPLEMENTATION AND EVALUATION We evaluate the algorithm on two low dose CT problems. One simplified using analytical phantoms based on ellipses and one with a more realistic forward model and human phantoms. We briefly describe these test cases and how we implemented the Learned Primal-Dual algorithm. We also describe the methods we compare against. A. Test cases (a) Ellipse training phantom (b) Ellipse training sinogram (c) Shepp-Logan phantom (d) Shepp-Logan sinogram (e) Human phantom (f) Human pre-log sinogram a) Ellipse phantoms: This problem is identical to [5] and we restate it briefly. Training data is randomly generated ellipses on a 128 × 128 pixel domain. The forward operator is the ray transform and hence T = P. The projection geometry was a sparse 30 view parallel beam geometry with 182 detector pixels. 5% additive Gaussian noise was added to the projections. Since the forward operator is linear, the adjoint of the derivative is simply the adjoint, which for the ray transform is the back-projection [∂ T (f )]∗ = P ∗ . b) Human phantoms: In order to evaluate the algorithm on a clinically realistic use-case we consider reconstruction of simulated data from human abdomen CT scans as provided by Mayo Clinic for the AAPM Low Dose CT Grand Challenge [24]. The data includes full dose CT scans from 10 patients, of which we used 9 for training and 1 for evaluation. We used the 3 mm slice thickness reconstructions, resulting in 2168 training images, each 512 × 512 pixel in size. We used a two-dimensional fan-beam geometry with 1000 angles, 1000 pixels, source to axis distance 500 mm and axis to detector distance 500 mm. In this setting, we consider the more physically correct non-linear forward model given by Beer-Lamberts law Fig. 1: Example of data which are used for training and validation. Top: Randomly generated ellipses. Middle: Validation data, here given by the modified Shepp-Logan phantom. Bottom: Validation data generated from the human phantoms. T (f )(`) = e−µ P(f )(`) where the unit of f is g/cm3 and µ is the mass attenuation coefficient, in this work selected to 0.2 cm2 /g which is approximately the value in water at x-ray energies. We used Poisson noise corresponding to 104 incident photons per pixel before attenuation, which would correspond to a low dose CT scan. We find the action of the adjoint of the derivative by straightforward computation  [∂ T (f )]∗ (g) = −µ P ∗ e−µ P(f )( · ) g( · ) for g ∈ Y . The forward model can also be linearised by applying − log( · )/µ to both the data and forward operator, which then simply becomes the ray-transform as for the ellipse data. We implemented both the pre-log (non-linear) and post-log (linear) forward models and compare their results. For validation of the ellipse data case, we simply use the (modified) Shepp-Logan phantom and for the human phantom data we use one held out set of patient data. See fig. 1 for examples. B. Implementation The methods described above were implemented in Python using Operator Discretization Library (ODL) [25] and TensorFlow [26]. All operator-related components, such as the forward operator T , were implemented in ODL, and these were then converted into TensorFlow layers using the as_tensorflow_layer functionality of ODL. The neural network layers and training were implemented using TensorFlow. The implementation utilizes abstract ODL structures for representing functional analytic notions and is therefore generic and easily adaptable to other inverse problems. In particular, the code can be easily adapted to other imaging modalities. We used the ODL operator RayTransform in order to evaluate the ray transform and its adjoint using the GPU accelerated ’astra_gpu’ backend [27]. 1) Deep neural network and training details: Given the general Learned Primal-Dual scheme in algorithm 3, a parametrization of the learned proximal operators is needed in 6 order to proceed. In many inverse problems, and particularly in CT and MRI reconstruction, most of the useful properties for both the forward operator and prior are approximately translation invariant. For this reason the resulting reconstruction operator should be approximately translation invariant, which indicates that CNNs are suitable for parametrizing the aforementioned reconstruction operator. We used learned proximal operators of the form Id + W w3 ,b3 ◦ Ac2 ◦ W w2 ,b2 ◦ Ac1 ◦ W w1 ,b1 where Id is the identity operator that makes the network a residual network. There are two main reasons for choosing such a structure. First, proximal operators (as the name implies) are typically close to the identity and second, there is rich evidence in the machine learning literature [28] that networks of this type are easier to train. Heuristically this is because each update does not need to learn the whole update, but only a small offset from the identity. Additionally, we used affine operators W wj ,bj parametrized by weights wj and biases bj . The affine operators are defined in terms of so called convolution operators (here given on the primal space, but equivalently on the dual space). These are given as affine combinations of regular convolutions, more specifically: W wj ,bj : X n → X m where the k:th component is given by  n X (k) (l,k) (k) wj ∗ f (l) W wj ,bj ([f (1) , . . . , f (n) ]) = bj + l=1 m n×m where bj ∈ R and wj ∈ X . The non-linearities were chosen to be Parametric Rectified Linear Units (PReLU) functions ( x if x ≥ 0 Acj (x) = −cj x else. This type of non-linearity has proven successful in other applications such as classification [29]. We let the number of data that persists between the iterates be Nprimal = Ndual = 5. The convolutions were all 3 × 3 pixel size, and the number of channels was, for each primal learned proximal, 6 → 32 → 32 → 5, and for the duals 7 → 32 → 32 → 5 where the higher number of inputs is due to the data g being supplied to the dual proximals. We let the number of unrolled iterations be I = 10, that is (1) the operator T and the adjoint of its derivative [∂ T (fi )]∗ are both evaluated 10 times by the network. Since each iterate involves two 3-layer networks, one for each proximal, the total depth of the network is 60 convolutional layers and the total number of parameters approximately 2.4 · 105 . In the context of deep learning, this is a deep network but with a small number of parameters. The network is visualized in fig. 2. We used the Xavier initialization scheme [30] for the convolution parameters, and initialized all biases to zero. We trained the network by minimizing the empirical loss (5) using training data as explained above using the ADAM optimizer in TensorFlow [31]. We used 105 batches on each problem and used a learning rate schedule according to cosine annealing [32], i.e. the learning rate in step t was  t  η0  1 + cos π ηt = 2 tmax where the initial learning rate η0 was set to 10−3 . We also let the parameter β2 of the ADAM optimizer to 0.99 and let all other parameters use the default choices. We performed global gradient norm clipping [33], limiting the gradient norms to 1 in order to improve training stability and used a batch size of 5 for the ellipse data and 1 for the human phantoms. We did not use any regularization of the learned parameters, nor did we utilize any tricks such as dropout or batch normalization. Neither did we perform any data augmentation. The training was done using a single GTX 1080 TI GPU and took about 11 hours for the ellipse data and 40 hours for the human phantoms. 2) Incorporating the forward operator in neural networks: In order to minimize the loss function (4), stochastic gradient descent (SGD) type methods are typically used and these require (an estimate of) the gradient of the loss function h i [∇L](θ) = E(f,g)∼µ 2[∂θ T θ† (g)]∗ T θ† (g) − f , where [∂θ T θ† (g)]∗ is the adjoint of the derivative (with respect to θ) of the learned reconstruction operator applied in g, often called gradient in the machine learning literature. This introduces a challenge since it will depends on each component of the neural network, including the learned proximal operators but also the forward operator T and the backward operator [∂T (f )]∗ , propagated through all I iterations. To solve this, we used the built in automatic differentiation functionality of TensorFlow which uses the chain rule (backpropagation). This in turn requires the adjoints of the derivatives of each individual component which for the proximals were computed by TensorFlow and for the operators by ODL. C. Comparison We compare the algorithm to several widely used algorithms, including standard FBP and (isotropic) TV regularized reconstruction. We also compare against several learned schemes. These are briefly summarize here, see the references for full descriptions. The FBP reconstructions were done with a Hann filter and used the method fbp_op in ODL. The TV reconstruction was performed using 1000 iterations of the classical PDHG algorithm, implemented in ODL as pdhg. The filter bandwith in the FBP reconstruction and the regularization parameter in the TV reconstruction were selected in order to maximize the peak signal to noise ratio (PSNR). The partially Learned Gradient method in [5] is similar to the algorithm proposed in this article, but differs in that instead of learning proximal operators it learns a gradient operator and the forward operator enters into the neural network through the gradient of the data likelihood. Publicly available code and parameters [34] were used. The next comparison is against a deep learning based approach for post-processing based on a so called U-Net [35]. 7 7 32 32 5 6 32 32 5 apply apply copy 3x3 conv + PReLU 3x3 conv Fig. 2: Network architecture used to solve the tomography problem. The dual iterates are given in blue boxes, while the primal iterates are in the red boxes. Several arrows pointing to one box indicates concatenation. The initial guesses enter from the left, while the data is supplied to the dual iterates. In the classical PDHG algorithm, the primal iterates would instead of a CNN be given by proxτ G with over-relaxation, and the dual iterates would be given by proxσF ∗ . The U-Net was first proposed for image segmentation, but by changing the number of output channels to one, it can also be used for post-processing as was done in [7]. Here an initial reconstruction is first performed using FBP and a neural network is trained on pairs of noisy FBP images and noiseless/low noise ground truth images, learning a mapping between them. We re-implemented the algorithm from [7] but found that using the training procedure as stated in the paper gave sub-optimal results. We hence report values from using the same training scheme as for our other algorithms in order to give a more fair comparison. Additionally, our comparison includes learned PDHG, algorithm 2, as well as the following two simplified versions of the Learned Primal-Dual algorithm. The first is a Learned Primal algorithm, which does not learn any parameters for the dual proximal, instead it returns the residual  (2) (2) Γθid hi−1 , T (fi−1 ), g = T (fi−1 ) − g The second, FBP + residual denoising algorithm, further simplifies the problem by discarding the forward operator completely, and can be seen as selecting  (1) (1)  Λθip fi−1 , [∂ T (fi−1 )]∗ (hi ) = Λθip fi−1 Since this method does not have access to the data g, we select the initial guess according to a FBP, see (10). This makes the algorithm a learned denoiser. For the human phantoms we compare both non-linear and linearized versions of the forward operator, but given that training times are noticeably longer, we only compare to the previously established methods of FBP, TV and U-Net denoising. All learned algorithms were trained using the same training scheme as outlined in section IV-B1, and measure the runtime, PSNR and the structural similarity index (SSIM) [36]. All methods that we compare against are available in the accompanying source code. V. R ESULTS The quantitative results for the ellipse data is given in table I, where we can see that the proposed Learned PrimalDual algorithm out-performs the classical schemes (FBP and TV) significantly w.r.t. the reconstruction error as measured by both PSNR and SSIM. We also note that the Learned Primal-Dual algorithm gives a significant improvement over the previous deep learning based methods such as the learned gradient scheme and U-Net based post-processing, giving an improvement exceeding 6 dB. The Learned Primal-Dual algorithm also outperforms the Learned PDHG and the FBP + residual denoising algorithms by wide margins. The only method that achieves results close to the Learned Primal-Dual algorithm is the Learned Primal method, but the Learned Primal-Dual algorithm gives a noticeable improvement of 1.3 dB. The results are visualized in fig. 3. We note that small structures, such as the small inserts, are much more clearly visible in the Learned Primal and Learned Primal-Dual reconstructions than in the other reconstructions. We also note that both the Learned PDHG and Learned Primal reconstruction seem to have a halo artefact close to the outer bone which is absent in the Learned Primal-Dual reconstruction. With respect to run-time the learned methods that involve calls to the forward operator (Learned Gradient, PDHG, Primal, Primal-Dual) are slower than the methods that do not (FBP + U-Net denoising, Residual) by a factor ≈ 6. When compared to TV regularized reconstruction all learned methods are at least 2 orders of magnitude faster. Quantitative results for the human phantoms data are presented in table II. We note that the FBP reconstruction has a much more competitive image quality than it had for the ellipse data, both quantitatively and visually. It is likely for this reason that the FBP + U-Net denoising performs better than it did on the ellipses, outperforming TV by 4.4 dB. However, if we look at the SSIM we note that this improvement does not 8 Method PSNR SSIM Runtime Parameters FBP TV FBP + U-Net denoising FBP + residual denoising Learned Gradient Learned PDHG Learned Primal Learned Primal-Dual 19.75 28.06 29.20 32.38 32.29 28.32 36.97 38.28 0.597 0.929 0.944 0.972 0.981 0.909 0.986 0.989 4 5 166 9 9 56 48 43 49 1 1 107 1.2 · 105 1.2 · 104 2.4 · 104 1.2 · 105 2.4 · 105 TABLE I: Comparison of the reconstruction methods for the ellipse data. PSNR is measured in decibels (dB) and runtime in milliseconds (ms). (a) FBP (b) TV (c) FBP + U-Net denoising (d) FBP + residual denoising (e) Learned gradient (f) Learned PDHG Method PSNR SSIM Runtime Parameters FBP TV FBP + U-Net denoising Learned Primal-Dual, linear Learned Primal-Dual, non-linear 33.65 37.48 41.92 44.11 43.91 0.830 0.946 0.941 0.969 0.969 423 64 371 463 620 670 1 1 107 2.4 · 105 2.4 · 105 TABLE II: Comparison of the Learned Primal-Dual algorithm with other methods for the Human phantom data. Units for entries are the same as in table I. translate as well to the structural similarity, where the method is comparable to TV regularization. Both quantitatively and visually, the linear and non-linear versions of the Learned Primal-Dual algorithm give very similar results. We will focus on the linear version which gave slightly better results. The Learned Primal-Dual algorithm gives a 10.5 dB improvement over the FBP reconstruction, a 6.6 dB improvement over TV and 2.2 dB over the U-Net denoiser. This is less than for the ellipse data, but still represents a significant improvement. On the other hand, while the U-Net denoiser did not improve the SSIM as compared to TV regularization, the Learned Primal-Dual algorithm gives a large improvement. This improvement is also present in the images when inspected visually in fig. 4. In particular, we see that some artifacts visible in the FBP reconstruction are still discernible in the U-Net denoiser and TV reconstructions. Examples include streak artifacts, especially around the edges of the phantom and structures spuriously created from noise, such as a line in the muscle above the right bone. These are mostly absent in the Learned Primal-Dual reconstruction. However, we do note that the images do look slightly over-smoothed. Both of these observations become especially apparent if we look at the zoomed in regions, where we note that the Learned Primal-Dual algorithm is able to reconstruct finer detail than the other algorithms, but gives a very smooth texture. With respect to the run time, the Learned Primal-Dual is more competitive with the FBP and U-Net denoiser algorithms for full size data than for the ellipse data. This is because the size of the data is much larger, which increases the runtime of the FBP reconstruction, which is also needed to compute the initial guess for the U-Net denoiser. As for the ellipse data, both learned methods outperform TV regularized reconstruction by two orders of magnitude with respect to runtime. VI. D ISCUSSION (g) Learned Primal (h) Learned Primal-Dual Fig. 3: Reconstructions for the ellipse data using the compared methods. The window is set to [0.1, 0.4]. The results show that the Learned Primal-Dual algorithm outperforms classical reconstruction algorithm by large margins as measured in both PSNR and SSIM and also improves upon learned post-processing methods for both simplified ellipse data and for human phantoms. In addition, especially for the 512 × 512 human phantoms, the reconstruction time is comparable with even filtered back-projection and learned post-processing. One interesting, and to the best of our knowledge, unique feature of the Learned Primal-Dual algorithm in the field 9 (a) 512 × 512 pixel human phantom (d) FBP + U-Net denoising PSNR 41.92 dB, SSIM 0.941, 463 ms (b) Filtered back-projection (FBP) PSNR 33.65 dB, SSIM 0.830, 423 ms (c) Total variation (TV) PSNR 37.48 dB, SSIM 0.946, 64 371 ms (e) Primal-Dual, linear PSNR 44.10 dB, SSIM 0.969, 620 ms (f) Primal-Dual, non-linear PSNR 43.91 dB, SSIM 0.969, 670 ms Fig. 4: Reconstructions of a human phantom, results shown using a [−200, 200] HU window. Left zoom-in has a true feature whereas texture in right zoom-in is uniform. Among the methods tested, only the Learned Primal-Dual algorithm correctly recovers these regions. In the others, the true feature in the left zoom-in is indistinguishable from other false features of same size/contrast and right-zoom in has a streak artifact. Note also the clinically feasible runtime of the Learned Primal-Dual algorithm. To summarise, the Learned Primal-Dual algorithm offers performance advantages over other methods that translate into true clinical usefulness. of deep learning based CT reconstruction, is that it gives reconstructions working directly from data, without any initial reconstruction as input. Since the algorithm is iterative, we can visualize the iterates to gain insight into how it works. In fig. 5 we show some iterates with the non-linear forward operator. We note that the reconstruction stays very bad until the 8:th iterate when most structures seem to come in place, but the image is still noisy. Between the 8:th and 10:th iterate, we see that the algorithm seems to perform an edge-enhancing step. It thus seems like the learned iterative scheme works in two steps, first finding the large scale structures and then fine-tuning the details. Similarly to the edge-enhancement that seems to be performed in the primal space, we note that in the dual space the sinogram that is back-projected seems to be band-pass filtered to exclude both very low and very high frequencies. We note that in the very noisy and under-sampled data used for the ellipse phantoms, the learned algorithms that make use of the forward operator, such as the Learned Gradient, Primal and Primal-Dual algorithms outperform even state of the art post-processing methods by large margins and that in this regimen, TV regularization performs relatively well when compared to post-processing methods. This improvement in reconstruction quality when incorporating the forward operator, while still significant, is not as large for the human phantom in which the data was less noisy. To explain this, we conjecture that in the limit of highly noisy data where the initial reconstruction as given by e.g. FBP becomes very bad, learned schemes that incorporate the forward model and work directly from data, such as the Learned Primal-Dual algorithm, has a significant advantage over post-processing methods and that this advantage increases with decreasing data quality. Further along these lines, note that for the human data the 10 post-processing gives a large improvement in PSNR when compared to TV regularization, which is not necessarily reflected in the SSIM. On the other hand, the Learned PrimalDual algorithm improves upon both PSNR and SSIM. This can be by explained by the learned post-processing being limited by the information content of the FBP while the Learned Primal-Dual algorithm works directly with data and is thus limited by the information content of the data, which is greater or equal to that of the FBP. In theory, the Learned Primal-Dual algorithm can thus find structures that are not present in the FBP, something post-processing methods cannot. In these experiments we found that while the algorithm seems to handle non-linear forward models well, we did not observe any significant performance improvement by doing so. This may indicate that performing reconstructions on post-log data is preferable. The structure of the neural network was not extensively finetuned and we suspect that better results could be obtained by a better choice of network for the learned proximal operators. We also observed that the choice of optimizer and learning rate decay had a large impact on the results, and we suspect that further research into how to correctly train learned reconstruction operators will prove fruitful. Finally, we observe that the reconstructions, while outperforming all of the compared methods with respect to PSNR andSSIM, suffers from a perceived over-smoothing when inspected visually. We suspect that the particular choice of objective function used in this article, the squared norm (4), is a main cause of this and invite future researchers to implement learned reconstruction operators that use more advanced loss functions such as perceptual losses [37]. VII. C ONCLUSIONS We have proposed a new algorithm in the family of deep learning based iterative reconstruction schemes. The algorithm is inspired by the PDHG algorithm, where we replace the proximal operators by learned operators. In contrast to several recently proposed algorithms, the new algorithm works directly from tomographic data and does not depend on any initial reconstruction. We showed that the algorithm gives state of the art results on a computed tomography problem for both analytical and human phantoms. For analytical phantoms, it improves upon both classical algorithms such as FBP and TV, and post-processing based algorithms by at least 6 dB while also improving the SSIM. The improvements for the human phantom were more modest, but the algorithm still improves upon a TV regularized reconstruction by 6.6 dB and gives an improvement of 2.2 dB when compared to a learned post-processing. We hope that this algorithm will inspire further research in Learned Primal-Dual schemes and that the method will be applied to other imaging modalities. VIII. ACKNOWLEDGEMENTS The work was supported by the Swedish Foundation of Strategic Research grant AM13-0049 and Industrial PhD grant ID14-0055. The work was also supported by Elekta. Fig. 5: Iterates 2, 4, 6, 8 and 10 in the Learned Primal-Dual algorithm when reconstructing the human phantoms using a (1) non-linear forward model. Left: Reconstruction (fi ). Middle: (2) Point of evaluation for the forward operator (fi ). Right: (1) Point of evaluation for the adjoint of the derivative (hi ). Windows selected to cover most of the range of the values. The authors also thank Dr. Cynthia McCollough, the Mayo Clinic, and the American Association of Physicists in Medicine, and acknowledge funding from grants EB017095 and EB017185 from the National Institute of Biomedical Imaging and Bioengineering, for providing the data necessary for performing comparison using a human phantom. R EFERENCES [1] M. Bertero, H. Lantéri, and L. Zanni, “Iterative image reconstruction: a point of view,” in Proceedings of the Interdisciplinary Workshop on Mathematical Methods in Biomedical Imaging and Intensity-Modulated Radiation (IMRT), Pisa, Italy, Y. Censor, M. Jiang, and A. K. Louis, Eds., 2008, pp. 37–63. [2] H. W. Engl, M. Hanke, and A. Neubauer, Regularization of inverse problems, ser. Mathematics and its Applications. Kluwer Academic Publishers, 2000, no. 375. [3] O. Scherzer, M. Grasmair, H. Grossauer, M. Haltmeier, and F. Lenzen, Variational Methods in Imaging, ser. Applied Mathematical Sciences. New York: Springer-Verlag, 2009, vol. 167. 11 [4] G. Wang, “A perspective on deep imaging,” IEEE Access, vol. 4, pp. 8914–8924, 2016. [5] J. Adler and O. Öktem, “Solving ill-posed inverse problems using iterative deep neural networks,” Inverse Problems, vol. 33, no. 12, p. 124007, 2017. [6] H. Chen, Y. Zhang, M. K. Kalra, F. Lin, Y. Chen, P. Liao, J. Zhou, and G. Wang, “Low-Dose CT with a Residual Encoder-Decoder Convolutional Neural Network (RED-CNN),” IEEE Transactions on Image Processing, 2017. [7] K. H. Jin, M. T. McCann, E. Froustey, and M. Unser, “Deep Convolutional Neural Network for Inverse Problems in Imaging,” IEEE Transactions on Image Processing, vol. 26, no. 9, pp. 4509–4522, 2016. [8] E. Kang, J. Min, and J. C. Ye, “WaveNet: a deep convolutional neural network using directional wavelets for low-dose X-ray CT reconstruction,” Medical physics, vol. 44 10, pp. e360–e375, 2017. [9] Q. Xu, H. Yu, X. Mou, L. Zhang, J. Hsieh, and G. Wang, “Low-dose x-ray ct reconstruction via dictionary learning,” IEEE Transactions on Medical Imaging, vol. 31, no. 9, pp. 1682–1697, Sept 2012. [10] T. Meinhardt, M. Möller, C. Hazirbas, and D. Cremers, “Learning Proximal Operators: Using Denoising Networks for Regularizing Inverse Imaging Problems,” in ICCV, October 2017. [11] I. Dokmanic, J. Bruna, S. Mallat, and M. de Hoop, “Inverse problems with invariant multiscale statistics,” ArXiv, vol. abs/1609.05502, 2016. [12] Y. Yang, J. Sun, H. Li, and Z. Xu, “Deep ADMM-Net for compressive sensing MRI,” in Advances in Neural Information Processing Systems, 2016, vol. 29, pp. 10–18. [13] P. Putzky and M. Welling, “Recurrent inference machines for solving inverse problems,” ArXiv, vol. abs/1706.04008, 2017. [14] K. Hammernik, T. Klatzer, E. Kobler, M. P. Recht, D. K. Sodickson, T. Pock, and F. Knoll, “Learning a variational network for reconstruction of accelerated mri data,” Magnetic Resonance in Medicine, 2017. [15] M. Mardani, E. Gong, J. Y. Cheng, S. Vasanawala, G. Zaharchuk, M. Alley, N. Thakur, S. Han, W. Dally, J. M. Pauly, and L. Xing, “Deep Generative Adversarial Networks for Compressed Sensing Automates MRI,” ArXiv, May 2017. [16] J. Adler, “Learned primal-dual reconstruction,” Software available from https://github.com/adler-j/learned primal dual, 2017. [17] A. Chambolle and T. Pock, “A First-Order Primal-Dual Algorithm for Convex Problems with Applications to Imaging,” Journal of Mathematical Imaging and Vision, vol. 40, no. 1, pp. 120–145, 2010. [18] T. Valkonen, “A primal-dual hybrid gradient method for nonlinear operators with applications to MRI,” Inverse Problems, vol. 30, no. 5, p. 055012, 2014. [19] E. Y. Sidky, J. H. Jørgensen, and X. Pan, “Convex optimization problem prototyping for image reconstruction in computed tomography with the Chambolle-Pock algorithm,” Physics in Medicine and Biology, vol. 57, pp. 3065–3091, May 2012. [20] A. Markoe, Analytic Tomography, ser. Encyclopedia of mathematics and its applications. Cambridge University Press, 2006. [21] F. Heide, M. Steinberger, Y.-T. Tsai, M. Rouf, D. Pajak, D. Reddy, O. Gallo, J. Liu, W. Heidrich, K. Egiazarian, J. Kautz, and K. Pulli, “Flexisp: A flexible camera image processing framework,” ACM Trans. Graph., vol. 33, no. 6, pp. 231:1–231:13, 2014. [22] Y. Romano, M. Elad, and P. Milanfar, “The little Engine that Could: Regularization by Denoising (RED),” ArXiv, 2016. [23] K. Hornik, “Approximation capabilities of multilayer feedforward networks,” Neural Networks, vol. 4, no. 2, pp. 251 – 257, 1991. [24] C. McCollough, “Tfg-207a-04: Overview of the low dose ct grand challenge,” Medical Physics, vol. 43, no. 6, pp. 3759–3760, 2016. [25] J. Adler, H. Kohr, and O. Öktem, “Operator discretization library (ODL),” Software available from https://github.com/odlgroup/odl, 2017. [26] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, J. Yangqing, R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng, “TensorFlow: Large-scale machine learning on heterogeneous systems,” ArXiv, no. 1603.04467, 2015. [27] W. van Aarle, W. J. Palenstijn, J. Cant, E. Janssens, F. Bleichrodt, A. Dabravolski, J. Beenhouwer, K. J. Batenburg, and J. Sijbers, “Fast and flexible X-ray tomography using the ASTRA toolbox,” Optics Express, vol. 24, no. 22, pp. 25 129–25 147, 2016. [28] K. He, X. Zhang, S. Ren, and J. Sun, “Deep residual learning for image recognition,” in 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 770–778. [29] K. He, X. Zhang, S. Ren and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” in Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), 2015, pp. 1026–1034. [30] X. Glorot and Y. Bengio, “Understanding the difficulty of training deep feedforward neural networks,” in In Proceedings of the International Conference on Artificial Intelligence and Statistics (AISTATS’10), 2010. [31] D. P. Kingma and J. Ba, “Adam: A method for stochastic optimization,” ArXiv, vol. abs/1412.6980, 2014. [32] I. Loshchilov and F. Hutter, “SGDR: stochastic gradient descent with restarts,” ArXiv, vol. abs/1608.03983, 2016. [33] R. Pascanu, T. Mikolov, and Y. Bengio, “Understanding the exploding gradient problem,” ArXiv, vol. abs/1211.5063, 2012. [34] J. Adler, “Solving ill-posed inverse problems using iterative deep neural networks,” Software available from https://github.com/adler-j/learned gradient tomography, 2017. [35] O. Ronneberger, P. Fischer, and T. Brox, U-Net: Convolutional Networks for Biomedical Image Segmentation. Springer International Publishing, 2015, pp. 234–241. [36] Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, “Image quality assessment: from error visibility to structural similarity,” IEEE Transactions on Image Processing, vol. 13, no. 4, pp. 600–612, April 2004. [37] J. Johnson, A. Alahi, and L. Fei-Fei, “Perceptual losses for real-time style transfer and super-resolution,” in Computer Vision – ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 1114, 2016, Proceedings, Part II, 2016, pp. 694–711.
9cs.NE
From dissipativity theory to compositional synthesis of symbolic models arXiv:1710.05585v1 [cs.SY] 16 Oct 2017 Abdalla Swikir, Antoine Girard, and Majid Zamani Abstract— In this work, we introduce a compositional framework for the construction of finite abstractions (a.k.a. symbolic models) of interconnected discrete-time control systems. The compositional scheme is based on the joint dissipativity-type properties of discrete-time control subsystems and their finite abstractions. In the first part of the paper, we use a notion of so-called storage function as a relation between each subsystem and its finite abstraction to construct compositionally a notion of so-called simulation function as a relation between interconnected finite abstractions and that of control systems. The derived simulation function is used to quantify the error between the output behavior of the overall interconnected concrete system and that of its finite abstraction. In the second part of the paper, we propose a technique to construct finite abstractions together with their corresponding storage functions for a class of discrete-time control systems under some incremental passivity property. We show that if a discrete-time control system is so-called incrementally passivable, then one can construct its finite abstraction by a suitable quantization of the input and state sets together with the corresponding storage function. Finally, the proposed results are illustrated by constructing a finite abstraction of a network of linear discretetime control systems and its corresponding simulation function in a compositional way. The compositional conditions in this example do not impose any restriction on the gains or the number of the subsystems which, in particular, elucidates the effectiveness of dissipativity-type compositional reasoning for networks of systems. I. I NTRODUCTION In the recent years, symbolic models were introduced as a method to reduce the complexity of controller synthesis in particular for enforcing complex logical properties. Symbolic models (a.k.a. finite abstractions) are abstract descriptions of the continuous-space control systems in which each discrete state corresponds to a collection of continuous states of the original system. Since symbolic models are finite, algorithmic approaches from computer science are applicable to synthesize controllers enforcing some complex properties including those expressed as linear temporal logic formulae. Large-scale interconnected control systems, e.g., biological networks, power networks, and manufacturing systems, are intrinsically difficult to analyze and control and it is very challenging to design a controller to achieve some complex logical specifications over those interconnected systems. An appropriate technique to overcome this challenge is to first treat every subsystem individually and build an abstraction that approximates the behaviors of the corresponding concrete subsystem. Thereafter, one can establish a compositional framework to construct abstractions of the network of This work was supported in part by the TUM International Graduate School of Science and Engineering (IGSSE). A. Swikir and M. Zamani are with the Department of Electrical and Computer Engineering, Technical University of Munich, D80290 Munich, Germany. A. Girard is with the Laboratoire des Signaux et Systémes (L2S) - CNRS, 91192 Gif sur Yvette, France. Email: {abdalla.swikir,zamani}@tum.de, [email protected]. control subsystems and use them as a replacement in the controller design process. Recently, there have been several results on the compositional construction of finite abstractions of networks of linear and nonlinear control systems in [1], [2]. Recent work on the compositional construction of infinite abstractions of interconnected nonlinear control systems can be found in [3], [4]. The results in [1]–[4] use the small-gain type conditions to facilitate the compositional construction of (in)finite abstractions. However, those small-gain type conditions depend essentially on the size of the network graph and can be violated as the number of subsystems increases [5]. The recent results in [6] propose a compositional framework for the construction of infinite abstractions of networks of contiunous-time control systems using dissipativity theory [7]. The proposed compositionality conditions in [6] can enjoy specific interconnection topologies and provide scale-free compositional abstractions for large-scale control systems. In this work, we introduce a compositional approach for the construction of finite abstractions of interconnected discrete-time control systems using techniques from dissipativity theory [7]. First, we introduce a notion of so-called storage function inspired by the one introduced in [6] and use it to quantify the joint dissipativity-type properties of discrete-time control subsystems and their finite abstractions. Given storage functions between subsystems and their finite abstractions, we drive compositional conditions under which one can construct a so-called simulation function, similar to the one introduced in [8], as a relation between the interconnected abstractions and the concrete network of control subsystems. The existence of such a simulation function ensures that the output behavior of the concrete system is quantitatively approximated by the corresponding one of its finite abstraction. In addition, we provide a procedure for the construction of finite abstractions together with their corresponding storage functions for a class of discrete-time control systems satisfying some incremental passivity property. Finally, we demonstrate the effectiveness of our results on an interconnected discrete-time linear control system in which the compositionality condition is always satisfied independently of the number of subsystems. II. N OTATION AND P RELIMINARIES A. Notation We denote by R, Z, and N the set of real numbers, integers, and non-negative integers, respectively. These symbols are annotated with subscripts to restrict them in the obvious way, e.g., R>0 denotes the positive real numbers. We denote the closed, open and half-open intervals in R by [a, b], (a, b), [a, b), and (a, b], respectively. For a, b ∈ N and a ≤ b, we use [a; b], (a; b), [a; b), and (a; b] to denote the corresponding intervals in N. Given N ∈ N≥1 , vectors νi ∈ Rni , ni ∈ N≥1 , and i ∈ [1; N ], we use ν = [ν1 ; . . . ; νN ] to denote the vector P in RN with N = i ni consisting of the concatenation of vectors νi . Note that given any ν ∈ Rn , ν ≥ 0 iff νi ≥ 0 for any i ∈ [1; n]. We denote by diag(M1 , . . . , MN ) the block diagonal matrix with diagonal matrix entries M1 , . . . , MN . We denote the identity and zero matrices in Rn×n by In and 0n , respectively. Given a function f : N → Rn , the supremum of f is denoted by kf k∞ ; we recall that kf k∞ := sup{kf (k)k, k ≥ 0}, where k·k denote the infinity norm. Given a function f : Rn → Rm and x ∈ Rm , we use f ≡ x to denote that f (x) = x for all x ∈ Rn . If x is the zero vector, we simply write f ≡ 0. Given a set A and matrix P of appropriate dimension, P A := {P a|a ∈ A}. The identity map on a set A in denoted by 1A . The closed ball centered at x ∈ Rn with radius ε is defined by Bε (x) = {y ∈ Rn | kx − yk ≤ ε}. For anySset A ⊆ Rn of the form of finite union of boxes, e.g., A = M j=1 Aj for some Qn M ∈ N, where Aj = i=1 [cji , dji ] ⊆ Rn with cji < dji , and positive constant η ≤ span(A), where span(A) = minj=1,...,M ηAj and ηAj = min{|dj1 − cj1 |, . . . , |djn − cjn |}, define [A]η = {a ∈ A | ai = ki η, ki ∈ Z, i = 1, . . . , n}. The set [A]η will be used as a finite approximation of the set A with precision η. Note that [A]η 6= ∅ for any η ≤ span(A). We denote by | · | the cardinality of a given set and by ∅ the empty set. We use notations K, K∞ , and KL to denote the different classes of comparison functions, as follows: K = {α : R≥0 → R≥0 | α is continuous, strictly increasing, and α(0) = 0}; K∞ = {α ∈ K| lim α(r) = ∞}; a function r→∞ β : R≥0 ×N → R≥0 is a KL function if, for each fixed k ≥ 0, the function β(·, k) is a K function, and for each fixed r 6= 0 the function β(r, ·) is decreasing and β(r, k) → 0 as k → ∞. B. Discrete-time control systems In this paper we study discrete-time control systems of the following form. Definition 1: A discrete-time control system Σ is defined by the tuple Σ = (X, U, W, U, W, f, Y1 , Y2 , h1 , h2 ), (1) where X, U, W, Y1 , and Y2 are the state set, external input set, internal input set, external output set, and internal output set, respectively, and are assumed to be subsets of normed vector spaces with appropriate finite dimensions. Sets U and W denote the set of all bounded input functions ν : N → U and ω : N → W, respectively. The set-valued map f : X × U×W ⇒ X is called the transition function [9], h1 : X → Y1 is the external output map, and h2 : X → Y2 is the internal output map. The discrete-time conrol system Σ is described by difference inclusions of the form  x(k + 1) ∈ f (x(k), ν(k), ω(k)) Σ: y1 (k) = h1 (x(k)) (2)  y2 (k) = h2 (x(k)), where x : N → X, y1 : N → Y1 , y2 : N → Y2 , ν ∈ U, and ω ∈ W are the state signal, external output signal, internal output signal, external input signal, and internal input signal, respectively. System Σ = (X, U, W, U, W, f, Y1 , Y2 , h1 , h2 ) is called deterministic if |f (x, u, w)| ≤ 1 ∀x ∈ X, ∀u ∈ U, ∀w ∈ W, and non-deterministic otherwise. System Σ is called blocking if ∃x ∈ X, ∀u ∈ U, ∀w ∈ W such that |f (x, u, w)| = 0 and non-blocking if |f (x, u, w)| 6= 0 ∀x ∈ X, ∃u ∈ U, ∃w ∈ W. In this paper, we only deal with non-blocking systems. System Σ is called finite if X, U, W are finite sets and infinite otherwise. Remark 1: If Σ does not have internal inputs and outputs, Definition 1 reduces to the tuple Σ = (X, U, U, f, Y, h) and the set-valued map f becomes f : X × U ⇒ X. Correspondingly, (2) reduces to:  x(k + 1) ∈ f (x(k), ν(k)) Σ: (3) y(k) = h(x(k)). C. Storage and Simulation functions First, we define a notion of so-called storage function, inspired by Definition 3.1 in [6], which quantifies the error between systems Σ and Σ̂ both with internal and external inputs and outputs. Definition 2: Consider systems Σ = (X, U, W, U, W, f, Y1 , Y2 , h1 , h2 ), and Σ̂ = (X̂, Û, Ŵ, Û , Ŵ, fˆ, Ŷ1 , Ŷ2 , ĥ1 , ĥ2 ), where Ŷ1 ⊆ Y1 . A continuous function S : X × X̂ → R≥0 is called a storage function from Σ̂ to Σ if ∀x ∈ X and ∀x̂ ∈ X̂ one has α(kh1 (x) − ĥ1 (x̂)k) ≤ S(x, x̂), (4) and ∀x ∈ X, ∀x̂ ∈ X̂, ∀û ∈ Û, ∃u ∈ U, ∀w ∈ W, ∀ŵ ∈ Ŵ, ∀xd ∈ f (x, u, w), ∃x̂d ∈ fˆ(x̂, û, ŵ) such that one gets S(xd , x̂d ) − S(x, x̂) ≤ −σ(S(x, x̂)) + ρext (kûk)+ X:=  T z W w − Ŵ ŵ h2 (x) − H ĥ2 (x̂) X 11 X 21 }| X 12 X 22 {   (5) W w − Ŵ ŵ + ǫ, h2 (x) − H ĥ2 (x̂) for some α, σ ∈ K∞ , ρext ∈ K∞ ∪ {0}, some matrices W, Ŵ , H of appropriate dimensions, some symmetric matrix X of appropriate dimension with conformal block partitions X ij , i, j ∈ [1; 2], and some ǫ ∈ R≥0 . Here, system Σ̂ is called an abstraction of Σ. Note that Σ̂ may be finite or infinite depending on cardinalities of sets X̂, Û, Ŵ. Now, we define a notion of so-called simulation function, inspired by Definition 1 in [8], which quantifies the error between systems Σ and Σ̂ both without internal inputs and outputs. Definition 3: Consider systems Σ = (X, U, U, f, Y, h) and Σ̂ = (X̂, Û, Û, fˆ, Ŷ, ĥ). A continuous function V : X × X̂ → R≥0 is called a simulation function from Σ̂ to Σ if ∀x ∈ X and ∀x̂ ∈ X̂ one has α(kh(x) − ĥ(x̂)k) ≤ V (x, x̂), (6) and ∀x ∈ X, ∀x̂ ∈ X̂, ∀û ∈ Û, ∃u ∈ U, ∀xd ∈ f (x, u), ∃x̂d ∈ fˆ(x̂, û) such that one gets V (xd , x̂d ) − V (x, x̂) ≤ −σ(V (x, x̂)) + ρext (kûk) + ε, (7) for some α, σ ∈ K∞ , ρext ∈ K∞ ∪ {0}, and some ε ∈ R≥0 . We say that a system Σ̂ is approximately alternatingly simulated by a system Σ or a system Σ approximately alternatingly simulates a system Σ̂, denoted by Σ̂ AS Σ, if there exists a simulation function from Σ̂ to Σ as in Definition 3. In general the notions of storage functions in Definition 2 and simulation functions in Definition 3 are not comparable. The former is established for systems with internal inputs and outputs while the latter is established only for systems without internal inputs and outputs. One can simply verify that both notions coincide for systems without internal inputs and outputs. Before we provide our first main result, we recall Lemma B.1 in [10] which is used later to show some of the results. Lemma 1: For any function σ ∈ K∞ , there exists a function σ̂ ∈ K∞ satisfying σ̂(s) ≤ σ(s) for all s ∈ R≥0 , and1 Id − σ̂ ∈ K. The next theorem shows the importance of the existence of a simulation function. Theorem 1: Consider systems Σ = (X, U, U, f, Y, h) and Σ̂ = (X̂, Û, Û, fˆ, Ŷ, ĥ). Suppose V is a simulation function from Σ̂ to Σ. Then there exist a constant ϕ ∈ R≥0 , functions γext ∈ K∞ ∪ {0} and λ ∈ K∞ , where λ(s) < s ∀s ∈ R≥0 , such that for any x ∈ X, x̂ ∈ X̂, û ∈ Û, there exits u ∈ U so that for any xd ∈ f (x, u) in Σ there exists x̂d ∈ fˆ(x̂, û) in Σ̂ such that α(kh(xd ) − ĥ(x̂d )k) ≤V (xd , x̂d ) (8) ≤ max{λ(V (x, x̂)), γext (kûk) + ϕ}. Proof: Let ψ be a K∞ function such that Id − ψ ∈ K∞ and define c = σ̂ −1 (ψ −1 )(ρext (kûk) + ε), where σ̂ is given as in Lemma 1 for function σ appearing in Definition 3. Let D = {(x, x̂) ∈ X × X̂|V (x, x̂) ≤ c}. First, assume (x, x̂) ∈ D. Then V (x, x̂) ≤ c, that is, ψ(σ̂(V (x, x̂) ≤ ρext (kûk) + ε. Since (Id − σ̂) ∈ K, and ψ(σ̂(c)) = ρext (kûk) + ε, and by using (7), one obtains V (xd , x̂d ) ≤ V (x, x̂) − σ̂(V (x, x̂)) + ρext (kûk) + ε ≤ (Id − σ̂)(V (x, x̂))) + ρext (kûk) + ε ≤ (Id − σ̂)(c) + ψ(σ̂(c)) ≤ c − σ̂(c) + ψ(σ̂(c)) ≤ −(Id − ψ)(σ̂(c)) + c ≤ c, for all xd ∈ f (x, u) and some x̂d ∈ fˆ(x̂, û). Using the definition of c, we have the following inequality V (xd , x̂d ) ≤ σ̂ −1 (ψ −1 (ρext (kûk) + ε) ≤ γext (kûk) + ϕ, (9) where γext (s) = σ̂ −1 (ψ −1 (2ρext (s))) ∀s ∈ R≥0 , and ϕ = σ̂ −1 (ψ −1 (2ε)). Now assume (x, x̂) ∈ / D. Then ψ(σ̂(V (x, x̂))) ≥ ρext (kûk) + ε, and one has V (xd , x̂d ) ≤ V (x, x̂) − σ̂(V (x, x̂)) + ψ(σ̂(V (x, x̂)) ≤ V (x, x̂) − (Id − ψ)(σ̂(V (x, x̂))) ≤ −ψ̃(V (x, x̂)) + V (x, x̂) ≤ (Id − ψ̃)(V (x, x̂)), (10) for all xd ∈ f (x, u) and some x̂d ∈ fˆ(x̂, û), where ψ̃(s) := (Id − ψ)(σ̂(s)) ∀s ∈ R≥0 . Observe that (Id − ψ̃) is a K∞ function since Id − ψ and σ̂ are K∞ functions and (Id − 1 Here, Id ∈ K∞ denotes the identity function. ψ̃)(s) < s ∀s ∈ R≥0 . From (10) and by defining λ(s) = (Id − ψ̃)(s) ∀s ∈ R≥0 , one gets V (xd , x̂d ) ≤ λ(V (x, x̂)). (11) Combining (9) and (11), and by using (6), one gets α(kh(xd ) − ĥ(x̂d )k) ≤ V (xd , x̂d ) ≤ max{λ(V (x, x̂)), γext (kûk) + ϕ}, which completes the proof. Remark 2: Assume that ∃v ∈ R>0 such that kûk ≤ v ∀û ∈ Û. Then Theorem 1 implies that the relation R ⊆ X× X̂ defined by R = {(x, x̂) ∈ X × X̂|V (x, x̂) ≤ γext (v) + ϕ} is an ε̂-approximate alternating simulation relation, defined in [11], from Σ̂ to Σ with ε̂ = α−1 (γext (v) + ϕ). III. C OMPOSITIONALITY R ESULT In this section, we analyze networks of discrete-time control systems and show how to construct a simulation function from a network of their abstractions to the concrete network by using storage functions of the subsystems. The definition of the network of discrete-time control systems is based on the notion of interconnected systems described in [7]. A. Interconnected systems Here, we define the interconnected discrete-time control system as the following. Definition 4: Consider N ∈ N≥1 discrete-time control subsystems Σi = (Xi , Ui , Wi , Ui , Wi , fi , Y1i , Y2i , h1i , h2i ), i ∈ [1; N ], and a static matrix M of an appropriate di2 mension QNcoupling of these subsystems, where QN defining the M i=1 Y2i ⊆ i=1 Wi . The interconnected discretetime control system Σ = (X, U,QU, f, Y, h), denoted QN by N I(Σ1 , . . . , ΣN ), follows by X = i=1 Xi , U = i=1 Ui , QN Y = i=1 Y1i , and maps f (x, u):= {[x′1 ; . . . ; x′N ] | x′i ∈ fi (xi , ui , wi ) ∀i ∈ [1; N ]}, h(x):= [h11 (x1 ); . . . ; h1N (xN )], where u = [u1 ; . . . ; uN ], x = [x1 ; . . . ; xN ] and with the internal variables constrained by [w1 ; . . . ; wN ] = M [h21 (x1 ); . . . ; h2N (xN )]. B. Composing simulation functions from storage functions We assume that we are given N control subsystems Σi = (Xi , Ui , Wi , Ui , Wi , fi , Y1i , Y2i , h1i , h2i ) together with their abstractions Σ̂i = (X̂i , Ûi , Ŵi , Ûi , Ŵi , fˆi , Ŷ1i , Ŷ2i , ĥ1i , ĥ2i ), and storage functions Si from Σ̂i to Σi . We use αi , σi , ρiext , Hi , Wi , Ŵi , Xi , Xi11 , Xi12 , Xi21 , Xi22 , and ǫi to denote the corresponding functions, matrices, and their corresponding conformal block partitions, and constants appearing in Definition 2. The next theorem provides a compositional approach on the construction of abstractions of networks of control subsystems and that of the corresponding simulation function. Theorem 2: Consider the interconnected control system Σ = I(Σ1 , . . . , ΣN ) induced by N ∈ N≥1 control subsystems Σi and coupling matrix M . Suppose each control 2 This condition is required to have a well-defined interconnection. subsystem Σi admits an abstraction Σ̂i with the corresponding storage function Si . If there exist µi ≥ 0, i ∈ [1; N ], and matrix M̂ of appropriate dimension such that the matrix (in)equality and inclusion  T   WM WM  0, (12) X(µ1 X1 , . . . , µN XN ) Iq Iq M̂ Ŷ2i ⊆ i=1 ≤ Ŵi , (14) .. ..    . . 12  µN X N  , 22 µN X N and q is the number of rows in H, then V (x, x̂) := N X (16)     µi Si (xi , x̂i ) is a simulation function from Σ̂ = I(Σ̂1 , . . . , Σ̂N ), with the coupling matrix M̂ , to Σ. Proof: First we show that inequality (6) holds for some K∞ function α. For any x = [x1 ; . . . ; xN ] ∈ X and x̂ = [x̂1 ; . . . ; x̂N ] ∈ X̂, one gets: =k[h11 (x1 ); . . . ; h1N (xN )] − [ĥ11 (x̂1 ); . . . ; ĥ1N (x̂N )]k N N X X α−1 kh1i (xi ) − ĥ1i (x̂i )k ≤ ≤ i (Si (xi , x̂i )) i=1 (17) Xi := V (xd , x̂d ) − V (x, x̂) N N N X X  X µi ǫ i µi ρiext (kûi k) + µi − σi (Si (xi , x̂i )) + ≤ i=1 i=1   i=1 where ŝ = [s1 ; . . . ; sN ] ∈ RN and µ = [µ1 ; . . . ; µN ]. By defining the K∞ function α(s) = α−1 (s), ∀s ∈ R≥0 , one obtains α(kh(x) − ĥ(x̂)k) ≤ V (x, x̂), satisfying inequality (6). Now we show that inequality (7) holds as well. Consider any x = [x1 ; . . . ; xN ] ∈ X, x̂ = [x̂1 ; . . . ; x̂N ] ∈ X̂, and û = [û1 ; . . . ; ûN ] ∈ Û. For any i ∈ [1; N ], there exists ui ∈ Ui , consequently, a vector u = [u1 ; . . . ; uN ] ∈ U such that for any xd ∈ f (x, u) there exists x̂d ∈ fˆ(x̂, û) satisfying (5) for each   i=1  T w1 ŵ1  W  ..  − Ŵ  ..   .   .     wN ŵN +  h21 (x1 ) − H1 ĥ21 (x̂1 )   ..  .      X(µ1 X1 , . . . , µN XN )     h2N (xN ) − HN ĥ2N (x̂N )      ŵ1 w1  W  ..  − Ŵ  ..    .    .      ŵN  wN    h21 (x1 ) − H1 ĥ21 (x̂1 )      ..   .  h2N (xN ) − HN ĥ2N (x̂N ) N N N X X  X µi ǫ i µi ρiext (kûi k) + µi − σi (Si (xi , x̂i )) + ≤ i=1 where α is a K∞ function defined as ) ( N X −1 T αi (si )|µ ŝ = s , α(s) = max ŝ≥0 − σi (Si (xi , x̂i )) + ρiext (kûi k)+ T z 11 }| 12 { Wi wi − Ŵi ŵi Xi Xi Xi21 Xi22 h2i (xi ) − Hi ĥ2i (x̂i )    Wi wi − Ŵi ŵi + ǫi . h2i (xi ) − Hi ĥ2i (x̂i ) kh(x)−ĥ(x̂)k  ≤α V (x, x̂) ,  Using conditions (12), (13), and the definition of matrices W , Ŵ , H, and X in (15) and (16), the inequality (17) can be rewritten as i=1 i=1 µi  W := diag(W1 , . . . , WN ), Ŵ := diag(Ŵ1 , . . . , ŴN ) (15) H := diag(H1 , . . . , HN ), X(µ1 X1 , . . . , µN XN ) :=  µ1 X111 µ1 X112 ..  .   11 µN X N   21 µ1 X122  µ1 X 1  ..  . 21 µN X N N X i=1 i=1 i=1 are satisfied, where N Y V (xd , x̂d )−V (x, x̂) N X  µi Si (xdi , x̂di ) − Si (xi , x̂i ) = (13) W M H = Ŵ M̂ , N Y pair of subsystems Σi and Σ̂i with the internal inputs given by [w1 ; . . . ; wN ] = M [h21 (x1 ); . . . ; h2N (xN )] and [ŵ1 ; . . . ; ŵN ] = M̂ [ĥ21 (x̂1 ); . . . ; ĥ2N (x̂N )]. We derive the following inequality   + i=1 T i=1 h21 (x1 ) − H1 ĥ21 (x̂1 )  ..  . h2N (xN ) − HN ĥ2N (x̂N ) T   WM WM X(µ1 X1 , . . . , µN XN ) Iq Iq   h21 (x1 ) − H1 ĥ21 (x̂1 )   ..   .  h2N (xN ) − HN ĥ2N (x̂N ) N X ≤ i=1 µi N N X  X µi ǫ i . µi ρiext (kûi k) + − σi (Si (xi , x̂i )) + i=1 i=1 Remark that condition (14) ensures that the interconnection Σ̂ = I(Σ̂1 , . . . , Σ̂N ) is well-defined. By defining ( N ) N X X T σ(s):= min µi σi (si )|µ ŝ = s , ε := µi ǫ i , ŝ≥0 ρext (s):= max ŝ≥0 ( i=1 N X i=1 ) µi ρiext (ksi k) | kŝk = s , i=1 where σ ∈ K∞ and ρext ∈ K∞ ∪ {0}, we readily have V (xd , x̂d ) − V (x, x̂) ≤ −σ (V (x, x̂)) + ρext (kûk) + ε, which satisfies inequality (7). Hence, V is a simulation function from Σ̂ to Σ. IV. C ONSTRUCTION OF Σ = (X, U, W, U, W, f, X, Y2 , 1X, , h2 ), is called incrementally passivable if there exist functions H : X → U and G : X×X → R≥0 such that ∀x, x′ ∈ X, ∀u ∈ U, ∀w, w′ ∈ W, the inequalities: ′ α(kx − x k) ≤ G(x, x ), (18) and G(f (x, H(x) + u, w), f (x′ , H(x′ ) + u, w′ )) − G(x, x′ ) ≤−κ̂(G(x, x′ ))+ X:= (19) z }|    {  T w − w′ w − w′ X 11 X 12 , h2 (x) − h2 (x′ ) X 21 X 22 h2 (x) − h2 (x′ ) hold for some α, κ̂ ∈ K∞ , and matrix X of appropriate dimension. Remark 3: Note that any stabilizable linear control system is incrementally passivable as in Definition 5. Moreover, any incrementally input-to-state stabilizable control system as in Definition 6 with ρint (r) = cr2 , for some c ∈ R>0 and any r ∈ R≥0 , is also incrementally passivable. Definition 6: Control system Σ = (X, U, W, U, W, f, X, Y2 , 1X, , h2 ) is called incrementally input-to-state stabilizable with respect to the internal input if there exist functions H : X → U and V̂ : X × X → R≥0 such that ∀x, x′ ∈ X, ∀u ∈ U, ∀w, w′ ∈ W, the inequalities: α(kx − x′ k) ≤ V̂ (x, x′ ) ≤ α(kx − x′ k), V̂ (f (x, H(x) + u, w), f (x′ , H(x′ ) + u, w′ )) −V̂ (x, x′ ) ≤ −κ̂(V̂ (x, x′ )) + ρint (kw − w′ k), (20) (21) hold for some α, α, κ̂ ∈ K∞ , and ρint ∈ K∞ . We refer interested readers to [12] for detailed information on incremental stability of discrete-time control systems. Now, we construct a finite abstraction Σ̂ of an incrementally passivable control system Σ. Definition 7: Given an incrementally passivable control system Σ = (X, U, W, U, W, f, X, Y2 , 1X, , h2 ), where X, U, W are assumed to be finite unions of boxes, one can construct a finite system Σ̂ = (X̂, Û, Ŵ, Û , Ŵ, fˆ, Ŷ1 , Ŷ2 , ĥ1 , ĥ2 ), S YMBOLIC M ODELS In the previous sections, Σ and Σ̂ were considered as general discrete-time control systems, deterministic or nondeterministic, finite or infinite, that can be related to each other through a storage function or a simulation function when Σ and Σ̂ are networks of control subsystems. In this section, we consider Σ as an infinite, deterministic, control system and Σ̂ as its finite abstraction. In addition, the storage function from Σ̂ to Σ is established under the assumption that the original discrete-time control system Σ is so-called incrementally passivable. In order to show our next main result we introduce the following definition. Definition 5: Control system ′ and (22) where: • X̂ = [X]η , where 0 < η ≤ span(X) is a state set quantization parameter; • Û = [U]µ1 , where 0 < µ1 ≤ span(U) is the external input set quantization parameter; • x̂d ∈ fˆ(x̂, û, ŵ) iff kx̂d − f (x̂, H(x̂) + û, ŵ)k ≤ η/2; • Ŷ1 = X̂, Ŷ2 = {h2 (x̂)|x̂ ∈ X̂}, ĥ1 = 1X̂ and ĥ2 = h2 ; • Ŵ is an appropriate finite internal input set satisfying condition (14) in the compositional setting (cf. the example section). Now, we present one of the main results of the paper establishing the relation between Σ and Σ̂, introduced above, via the notion of storage function. Theorem 3: Let Σ be an incrementally passivable control system as in Definition 5 and Σ̂ be a finite system as in Definition 7. Assume that there exists a function γ ∈ K∞ such that for any x, x′ , x′′ ∈ X one has G(x, x′ ) − G(x, x′′ ) ≤ γ(kx′ − x′′ k), (23) for G as in Definition 5. Then G is a storage function from Σ̂ to Σ. Proof: Since system Σ is incrementally passivable, from (18), ∀x ∈ X and ∀x̂ ∈ X̂, we have α(kx − x̂k) = α(kh1 (x) − ĥ1 (x̂)k) ≤ G(x, x̂), satisfying (4) with α(s) := α(s) ∀s ∈ R≥0 . Now from (23), ∀x ∈ X, ∀x̂ ∈ X̂, ∀û ∈ Û, ∀w ∈ W, ∀ŵ ∈ Ŵ, we have G(f (x, H(x) + û, w), x̂d )− G(f (x, H(x) + û, w), f (x̂, H(x̂) + û, ŵ)) ≤ γ(kx̂d − f (x̂, H(x̂) + û, ŵ)k), for any x̂d ∈ fˆ(x̂, û, ŵ). Now, from Definition 7, the above inequality reduces to G(f (x, H(x) + û, w), x̂d ) ≤G(f (x, H(x) + û, w), f (x̂, H(x̂) + û, ŵ)) + γ(η/2). Note that by (19) and since h2 = ĥ2 , we get G(f (x, H(x) + û, w), f (x̂, H(x̂) + û, ŵ)) − G(x, x̂) ≤−κ̂(G(x, x̂))+   T  11  w − ŵ w − ŵ X X 12 . X 21 X 22 h2 (x) − ĥ2 (x̂) h2 (x) − ĥ2 (x̂) It follows that ∀x ∈ X, ∀x̂ ∈ X̂, ∀û ∈ Û, and ∀w ∈ W, ∀ŵ ∈ Ŵ, one obtains G(f (x, H(x) + û, w), x̂d ) − G(x, x̂) ≤ −κ̂(G(x, x̂))+    T  11 w − ŵ w − ŵ X X 12 + γ(η/2), X 21 X 22 h2 (x) − ĥ2 (x̂) h2 (x) − ĥ2 (x̂) for any x̂d ∈ fˆ(x̂, û, ŵ), satisfying (5) with ǫ = γ(η/2), u = H(x) + û, σ = κ̂, ρext ≡ 0, W, Ŵ , H are identity matrices of appropriate dimensions. Hence, G is a storage function from Σ̂ to Σ. V. E XAMPLE Consider a linear control system Σ described by  x(k + 1) = Ax(k) + ν(k), Σ: y(k) = x(k), where A = e−Lτ for some matrix L ∈ Rn×n and constant τ ∈ R>0 . Assume L is the Laplacian matrix [13] of an undirected graph. We partition x(k) as x(k) = [x1 (k); . . . ; xN (k)] and ν(k) as ν(k) = [ν1 (k); . . . ; νN (k)] where xi (k) and νi (k) are both taking values in Rni , ∀i ∈ [1; N ]. Now, by introducing Σi described by  xi (k + 1) = xi (k) + ωi (k) + νi (k), Σi : y1i (k) = xi (k),  y2i (k) = xi (k), one can readily verify that Σ = I(Σ1 , . . . , ΣN ) where the coupling matrix M is given by M = A − In . Consider systems Σ̂i constructed as in Definition 7. One can readily verify that, for any i ∈ [1; N ], conditions (18) and (19) are satisfied with Gi (xi , x̂i ) = (xi − x̂i )T (xi − x̂i ), αi (r) = r2 , κ̂i (r) = λr, ρiext (r) ≡ 0, ∀r ∈ R≥0 , Hi (xi ) = −λxi , ∀λ ∈ (0, 0.5], and   (1 − λ)Ini Ini Xi = . (24) 0ni (1 − λ)Ini Hence, Gi (xi , x̂i ) = (xi − x̂i )T (xi − x̂i ) is a storage function from Σ̂i to Σi . Now, we look at Σ̂ = I(Σ̂1 , . . . , Σ̂N ) with a coupling matrix M̂ satisfying condition (13) as follows: A − In = M̂ . (25) Choosing µ1 = · · · = µN = 1 and using Xi in (24), matrix X in (16) reduces to   In (1 − λ)In , X= (1 − λ)In 0n and condition (12) reduces to  T     A − In A − In = (A−In ) A−In +2(1−λ)In  0, X In In which always holds without any restrictions on the number of the subsystems. In order to show the above inequality, we used AT = A  0, A−In  0, and 2(1−λ)In +A−In  0. Note that by choosing sets Ŵi of Σ̂i in Q finite internal input QN such a way that N i=1 Ŵi = (A − In ) i=1 X̂i , condition (14) is satisfied. PN Now, one can verify that V (x, x̂) = i=1 (xi − x̂i )T (xi − x̂i ) is a simulation function from Σ̂ to Σ satisfying conditions (6) and (7) with P α(r) = r2 , σ(r) = λr, ρext (r) ≡ 0 N ∀r ∈ R≥0 , ε = i=1 γi (ηi /2), where ηi is the state set quantization parameter of abstraction Σ̂i and γi is the K∞ function satisfying (23) for Gi . VI. C ONCLUSION In this paper, we proposed a compositional framework for the construction of finite abstractions (a.k.a. symbolic models) of interconnected discrete-time control systems. First, we used a notion of so-called storage functions in order to construct compositionally a notion of so-called simulation functions that is used to quantify the error between the output behavior of the overall interconnected concrete system and the one of its finite abstraction. Furthermore, we provided an approach to construct finite abstractions together with their corresponding storage functions for a class of discrete-time control systems under some incremental passivity property. Finally, we demonstrated the effectiveness of the proposed results by constructing a finite abstraction of a network of linear discrete-time control systems and its corresponding simulation function in a compositional fashion and independently of the number of subsystems. R EFERENCES [1] Y. Tazaki and J. I. Imura, “Bisimilar finite abstractions of interconnected systems,” in 11th International Conference on Hybrid Systems: Computation and Control, pp. 514–527, Berlin, Heidelberg: Springer Berlin Heidelberg, 2008. [2] G. Pola, P. Pepe, and M. D. D. Benedetto, “Symbolic models for networks of control systems,” IEEE Transactions on Automatic Control, vol. 61, pp. 3663–3668, Nov 2016. [3] M. Rungger and M. Zamani, “Compositional construction of approximate abstractions,” in Proceedings of the 18th International Conference on Hybrid Systems: Computation and Control, HSCC ’15, (New York, NY, USA), pp. 68–77, ACM, 2015. [4] M. Rungger and M. Zamani, “Compositional construction of approximate abstractions of interconnected control systems,” IEEE Transactions on Control of Network Systems, vol. PP, no. 99, pp. 1–1, 2016. [5] K. C. Das and P. Kumar, “Some new bounds on the spectral radius of graphs,” Discrete Mathematics, vol. 281, no. 1–3, pp. 149 – 161, 2004. [6] M. Zamani and M. Arcak, “Compositional abstraction for networks of control systems: A dissipativity approach,” IEEE Transactions on Control of Network Systems, vol. PP, no. 99, pp. 1–1, 2017. [7] M. Arcak, C. Meissen, and A. Packard, Networks of dissipative systems. SpringerBriefs in Electrical and Computer Engineering, Springer International Publishing, 2016. [8] A. Girard and G. J. Pappas, “Hierarchical control system design using approximate simulation,” Automatica, vol. 45, no. 2, pp. 566 – 571, 2009. [9] R. T. Rockafellar and R. Wets, Variational analysis. Vol. 317. Springer, 2009. [10] Z.-P. Jiang and Y. Wang, “Input-to-state stability for discrete-time nonlinear systems,” Automatica, vol. 37, no. 6, pp. 857 – 869, 2001. [11] P. Tabuada, Verification and Control of Hybrid Systems. New York, NY,USA: Springer, 2009. [12] D. N. Tran, B. S. Rüffer, and C. M. Kellett, “Incremental stability properties for discrete-time systems,” in 2016 IEEE 55th Conference on Decision and Control (CDC), pp. 477–482, Dec 2016. [13] C. Godsil and G. Royle, Algebraic Graph Theory. New York: Springer, 2001.
3cs.SY
A Distributed Algorithm for Least Square Solutions of Linear Equations arXiv:1709.10157v1 [cs.SY] 28 Sep 2017 Xuan Wang, Jingqiu Zhou, Shaoshuai Mou and Martin J. Corless ∗ October 2, 2017 Abstract A distributed discrete-time algorithm is proposed for multi-agent networks to achieve a common least squares solution of a group of linear equations, in which each agent only knows some of the equations and is only able to receive information from its nearby neighbors. For fixed, connected, and undirected networks, the proposed discrete-time algorithm results in each agents solution estimate to converging exponentially fast to the same least squares solution. Moreover, the convergence does not require careful choices of time-varying small step sizes. 1 Introduction A significant amount of effort in the control community has recently been given to distributed algorithms for solving a set of linear equations over multi-agent networks, in which each agent only knows some of the equations and controls a state vector that can be looked upon as an estimate to the solution of the overall linear equations [1–4]. The key idea of these distributed algorithms is a so-called “agreement principle” [5], in which each agent limits the update of its state to satisfy its own equation while trying to reach a consensus with its nearby neighbors’ states. Different from the well-studied consensus problem [6–17], which aims to drive all agents’ states to be the same, the agreement principle allows agents to cooperatively reach the same solution to the overall set of linear equation as long solutions exist. Numerous extensions along this direction include achieving solutions with the minimum Euclidean norm [18, 19], elimination of the initialization step [20], and reduction of state vector dimension by utilizing the sparsity of the linear equations [21]. Linear equations arising from many engineering problems are, however, overdetermined, for which all the above distributed algorithms based on the agreement principle are not directly applicable. For example, in distributed parameter estimation [22], observations are subject to measurement noise that leads to no solution of the resulting equations; in power networks, the mode estimation of voltage oscillations asks for the least squares solution of linear equations resulted from the output of phasor measurement units [23, 24]; a distributed least squares solver can also be applied to the position determination of multi-agent formation control [25–27], state estimation in signal processing [28–30] and real-time data fitting of financial models [31]. One idea for dealing with the case of overdetermined linear equations is briefly discussed in [1], which however does not scale well with the network size. A common approach to achieve least squares solution is to reformulate it as a distributed optimization problem. In order to find the optimal solution in the sense of the total network, classical methods employ a centralized agent (coordinator) to collect the information in ∗ This work was supported by a funding from Northrop Grumman Corporation. X. Wang, J. Zhou, S. Mou and M. J. Corless are with the School of Aeronautics and Astronautics, Purdue University, West Lafayette, IN 47906 USA (e-mail: [email protected], [email protected], [email protected], [email protected]). Corresponding Author: Shaoshuai Mou. the network or assign computation tasks to other agents [28,32]. Such a structure, however, puts too much load on the central agent and has a strict requirement on the network topology. Compared with this, consensus based algorithms can solve distributed optimization problem with no requirement on a central agent [33–38]. For example, the methods based on the projection-consensus flow proposed in [29, 30, 39], are able to drive agents’ states to a neighborhood of the least square solution by introducing a sufficiently large gain. As an improvement of these methods, the exact least squares solution can be obtained by introducing a decaying weight to the local gradient [37, 38], but at the cost of losing fixed exponential convergence rate. Many other algorithms, like [34–37], have good results on both exact solution and convergence rate but require all agents to share a common, timevarying small step size that has to be carefully chosen for convergence. A similar requirement of sufficiently small step sizes has to be made when adapting classical continuous algorithms in [40–42] to achieve the least squares solution. The major contribution of this paper comes from devising a discrete-time algorithm, which is distributed; achieves exact least square solutions; converges exponentially fast for fixed undirected connected networks; and does not involve any small or time-varying step sizes for convergence. These attributes differentiate the proposed algorithm from those in existence for achieving a least squares solution. The remainder of this paper is organized as follows. In Section II, we formulate the problem of obtaining aleast squares solution in a distributed manner. Then, a discrete-time distributed algorithm is proposed in Section III and Section IV contains the main theorem which claims exponential convergence of the proposed algorithm to a least squares solution. A proof of the main theorem is contained in Section V, which is followed by numerical simulations in Section VI and conclusions in Section VII. Proofs of a lemma and a corollary are given in the Appendix. Notation: The vector 1r is the vector in Rr with all its components equal to 1 and I denotes an identity matrix. The transpose and kernel of any matrix M is denoted by M 0 , respectively. By M > 0 and M ≥ 0 it is meant that the symmetric matrix M is positive definite and positive semi-definite, respectively. Finally,  0 col {A1 , A2 , · · · , Ar } = A01 A02 · · · A0r and diag {A1 , A2 , · · · , Ar } is a block diagonal matrix with the ith diagonal block equal to Ai , i = 1, 2, · · · , r. 2 Problem Formulation Consider a network of m agents, i = 1, 2, ..., m, in which each agent can communicate with certain other agents called its neighbors. Suppose that each agent wishes to solve the following least squares optimization problem m 1X |Ai x − bi |22 (1) minn x∈R 2 i=1 for the least squares solution x∗ , where |·|2 denotes the 2-norm, but each agent i only knows matrices Ai ∈ Rni ×n and bi ∈ Rni . Suppose that at each time t = 0, 1, . . . , each agent i controls a state vector xi (t) ∈ Rn , which can be viewed as agent i’s estimate of x∗ . The problem of interest in this paper is to develop a local rule for each agent i to iteratively update its state vector xi (t) by only using its neighbors’ states such that all xi (t) converge exponentially fast to a least squares solution x∗ . Note that, if x∗ is a least squares solution then, all least squares solutions are given by x∗ + r (2) Ar = 0 (3) with Ai r = 0 for i = 1, . . . , m, that is, where A = col {A1 , A2 , · · ·, Am } (4) Thus the problem (1) has a unique solution if and only if ker(A) = 0. To proceed, we let Ni denote the set of agent i’s neighbors. We assume that each agent is a neighbor of itself, that is, i ∈ Ni . Neighbor relations can be described by an undirected graph G with self-arcs such that there is an undirected edge connecting two different nodes i and j if and only if i and j are neighbors. In this paper we only consider the case in which G is connected and fixed. 3 A Distributed Discrete-Time Update In this section we present a distributed and discrete update algorithm for each agent to asymptotically achieve the same least squares solution x∗ . We note that the problem (1) is equivalent to the following constrained optimization problem: m 1X |Ai xi − bi |22 2 i=1 x1 = x2 · · · = xm minimize subject to (5) To obtain an update algorithm, let W be a symmetric weighting matrix associated with the undirected graph G such that its ij-th and ji-th entries, wij and wji , are positive if and only if there is an undirected edge between i and j in G, and are zero, otherwise. Since each agent is a neighbor of itself one has wii > 0. Let D denote the diagonal matrix whose ith diagonal entry, denoted by di , is the i-th row sum of W , that is, di = m X wij = j=1 X wij . (6) j∈Ni Now introduce the Laplacian L matrix associated with the weighted graph: L=D−W (7) let L̄ = L ⊗ In where ⊗ denotes the Kronecker product and let x = col {x1 , x2 , · · · , xm } (8) be the column consisting of all the state vectors. Since G is connected, a vector is the kernel of L if and only if it is a scalar multiple of 1m [43]. Using this property, one obtains that the constraint in (5) is equivalent to L̄x = 0. Thus problem (5) and, hence, the original problem, is equivalent to the following problem: minimize subject to 1 2 |Āx − b|2 2 L̄x = 0 (9) where Ā = diag {A1 , A2 , · · · , Am } b = col {b1 , b2 , · · ·, bm } (10) (11) Note that x∗ solves (9) if and only if x ∗ = 1 m ⊗ x∗ (12) where x∗ is a least squares solution to the original problem. The linear constraint quadratic optimization problem (9) is analytically solvable by Lagrange Method [42, 44]. That is, define G(x, z) = 0  c̄ Āx − b Āx − b + z 0 L̄x 2 (13) where z = col {z1 , z2 , · · · , zm } ∈ Rnm is the so-called Lagrange multiplier and c̄ > 0 is an arbitrary positive constant introduced for the purpose of adjusting the weights between the two terms summed in G(x, z). Note that the Hessian matrix of the objective function is Ā0 Ā ≥ 0. Then, x∗ solves problem (9) if and only if there exists z ∗ such that ∇x,z G (x∗ , z ∗ ) = 0. Then the problem of achieving a least square solution x∗ to (1) is equivalent to finding x∗ and z ∗ such that c̄(Ā0 Āx∗ − Ā0 b) + L̄0 z ∗ = 0 (14) L̄x∗ = 0 (15) Since W is symmetric, L = L0 ; hence (14)-(15) are equivalent to X  c̄(A0i Ai x∗i − A0i bi ) + wij zi∗ − zj∗ = 0 (16) = 0 (17) j∈Ni X wij x∗i − x∗j  j∈Ni for i = 1, 2, · · · , m. By introducing an additional state vector zi (t) ∈ Rn for each agent i, one could achieve a distributed solution to (16) and (17) by the saddle-point dynamics proposed in [42,45]. Discretization of such a continuous update usually requires a careful choice of sufficiently small step size to guarantee convergence. To eliminate such a requirement, we propose a new discrete-time update as follows: xi (t + 1) = xi (t) − c̄κi [A0i Ai xi (t + 1) − A0i bi ] X − κi wij [zi (t + 1) − zj (t)] j∈Ni − cκi X wij [xi (t + 1) − xj (t)] (18) j∈Ni zi (t + 1) = zi (t) + κi X wij [xi (t + 1) − xj (t)] (19) j∈Ni Here c ≥ 0 is arbitrary non-negative constant and κi > 0, i = 1, · · · , m, are parameters to be chosen. As will be shown later, a simple and distributed way of choosing c, c̄, κi for each agent is c ≥ 0, c̄ > 0, κi = 1 di Under this choice the updates (18)-(19) will be totally distributed without any designed parameters and the effectiveness for driving all xi (t) to a least square solution will be shown later in next section. The updates (18)-(19) result from a mixed use of each agent’s upcoming states xi (t + 1), zi (t + 1) and its neighbors current states xj (t), zj (t), j ∈ Ni . This enables us to derive from (18) and (19) the following update without introducing any step size: P     wij [cxj (t) + zj (t)] + c̄κi A0i bi xi (t) + κi xi (t + 1) j∈Ni  P = Ei  zi (t + 1) −κi wij xj (t) + zi (t) j∈Ni (20) where Ei =  In + c̄κi A0i Ai + cκi di In −κi di In κi di In In −1 Note right away that the update (20) is distributed since each agent i only uses Ai , bi and states of its neighbors and itself; it requires each agent to control a state vector in R2n whose size is independent of the underlying network, and does not involve any step size. Exponential convergence under the proposed update will expounded on in next section. 4 Main Result To present the main result of the paper, Theorem 1, let W̄ = W ⊗ In , D̄ = D ⊗ In , K̄ = K ⊗ In where K ∈ Rm×m is the diagonal matrix whose ii entry is κi . Theorem 1 Suppose G is undirected and connected, W is symmetric, c̄, κ1 , . . . , κm > 0, c ≥ 0 DKD − W KW ≥ 0 (21) and c > 0 if there exists a non-zero vector u such that Āu =0 (22) (D̄K̄D̄ − W̄ K̄W̄ )u =0 (23) L̄u 6=0. (24) Then the proposed update (20) results in all xi (t) converging exponentially fast to the same least squares solution to Ax = b. By Theorem 1, convergence of the proposed update depends on choosing parameters κi to satisfy (21). This can be achieved in a simple and distributed way as illustrated by the following corollary. Corollary 1 If c ≥ 0, c̄ > 0 and κi = 1/di for i = 1, 2, ..., m then the proposed update (20) results in all xi (t) convergerging exponentially fast to the same least squares solution to Ax = b. A proof of Corollary 1 is given in the Appendix. 5 Proof of Theorem 1 In order to prove our main result, we first re-write the update equations (18)-(19) in vector form:   x (t + 1) = x(t) − c̄K̄ Ā0 Āx (t + 1) − Ā0 b   − K̄ D̄z (t + 1) − W̄ z (t)   − cK̄ D̄x (t + 1) − W̄ x (t) (25)   z (t + 1) = z (t) + K̄ D̄x (t + 1) − W̄ x (t) (26) where x = col {x1 , · · · , xm } (27) z = col {z1 , · · · , zm } (28) Since K̄ is invertible and c̄ > 0, all equilibrium states col {xe , z e } of (25)-(26) are given by c̄[Ā0 Āxe − Ā0 b] + L̄z e + cL̄xe = 0 and L̄xe = 0 where L̄ = D̄ − W̄ = L ⊗ I (29) Thus, the equilibrium states are given by c̄(Ā0 Āxe − Ā0 b) + L̄z e = 0 e L̄x = 0 (30) (31) Clearly the set an equilibrium states to (25)-(26) is the same as the set of solutions to (14)-(15). So, to prove Theorem 1 we just need to show that every solution to (25)-(26) converges to an equilibrium state. To achieve this we re-write (25)-(26) compactly as y(t + 1) = Qy(t) + b (32) where y = col {x, z} and −1    Imn+cK̄W̄ K̄W̄ Imn + c̄K̄Ā0 Ā+cK̄D̄ K̄D̄ −K̄D̄ Imn −K̄W̄ Imn −1    0 0 c̄K̄Ā b I + c̄K̄Ā Ā + cK̄D̄ K̄D̄ b = mn −K̄D̄ Imn 0 Q= (33) (34) The equilibrium states y e of (32) are given by (I − Q)y e = b. Let y ∗ be any equilibrium state of (32). Then all equilibrium states y e of (32) are given by y e = y ∗ + v where v = 0 or v an eigenvector of Q corresponding to eigenvalue one. The evolution of e = y − y ∗ is governed by e(t + 1) = Qe(t) (35) So, to prove Theorem 1 we now just have to show that every solution of (35) exponentially converges to zero or to an eigenvector of Q corresponding to eigenvalue one. To achieve this we need the following lemma whose proof is in the Appendix Lemma 1 Suppose (21) holds. Then Q has the following properties. (a) Every eigenvalue of Q has magnitude less than or equal to one and −1 is not an eigenvalue of Q. (b) If Q has a complex eigenvalue of magnitude one then c = 0 and there is a non-zero vector u which satisfies (22) - (24) in Theorem 1. (c) One is an eigenvalue of Q and its algebraic multiplicity is equal to its geometric multiplicity. A non-zero vector col {u, ū} is a eigenvector corresponding to one if and only if Āu = 0, L̄u = 0, L̄ū = 0 (36) As a consequence of the hypotheses of Theorem 1, Lemma 1 tells us that every eigenvalue of Q has magnitude less than or equal to one. Also, one is the only eigenvalue of magnitude one and its algebraic and geometric multiplicities are equal. Hence, there exists a non-singular matrix T such that   I 0 Q=T T −1 (37) 0 R and all the eigenvalues of R have magnitude strictly less than one. Every solution of (35) satisfies e(t) = Qt e(0). Since   I 0 t Q =T T −1 0 Rt and all the eigenvalues of R have magnitude strictly less than one, it follows that e(t) exponentially converges to   I 0 −1 v=T T e(0) 0 0 Note that  I Qv = T 0  I =T 0    0 I 0 −1 −1 T T T e(0) R 0 0  0 −1 T e(0) = v 0 that is, v = 0 or v is an eigenvector of Q corresponding to eigenvalue one. Hence every solution of (35) exponentially converges to zero or to an eigenvector of Q corresponding to eigenvalue one. 6 Example Numerical simulations will be performed with the 5-node network in Fig. 1 to illustrate Theorem 1. 0.9 1.5 0.7 1 0.6 2 4 1.4 0.8 1.8 5 0.6 2.2 3 1 Figure 1: Five-node connected network G From Fig. 1 we obtain that  0.9 1.5  W = 0 0.6 0 1.5 0.7 1.8 0 0  0 0.6 0 1.8 0 0  1 2.2 0   2.2 0.8 1.4 0 1.4 0.6 Hence D = diag  3, 4, 5, 5, 2 and based on the distributed way of choosing weights in Corollary 1,   1 1 1 1 1 K = diag , , , , 3 4 5 5 2 We consider solving a set of linear equations that has G, in which agents 1, 2, 3, 4, 5 know   A1 = 1 2 3 4 ,   A2 = 4 5 6 7 ,   A3 = 1 2 3 4 ,   A4 = 5 6 3 4 ,   A5 = 4 3 2 1 , multiple least square solutions on network b1 = 10 b2 = 20 b3 = 15 b4 = 17 b5 = 6 respectively. Since the least squares solution is not unique, to show the effectiveness of our method, we introduce W (t) as W (t) = m m m 1X 0 1 XX |A Axi (t)−A0 b|22 + |xi (t)−xj (t)|22 2mi=1 2m2 i=1 j=1 where the first term is a cost associated with the xi (t) not being a least squares solution of Ax = b; the second term is a cost associated with the xi (t) not achieving consensus to the same value. Numerical simulation results in Fig. 2 validates the exponential convergence of W (t) for c̄ = 1 and c = 0, 2, 4, respectively. As a comparison, Fig. 3 validates the exponential convergence of W (t) Figure 2: Example: multiple least squares solution, c̄ = 1, different c for c = 0 and c̄ = 0.1, 0.3, 1, 3, respectively. It is worth mentioning that W (t) goes to 0 doesn’t mean xi converge to a constant value, to show this, we let c = 0, c̄ = 1 and use Fig. 4 to demonstrate the history of x1 . This, along with the consensus result in Fig. 2 and 3 validates that all xi converge to constant values. The simulation results show that different parameters c and c̄ lead to different convergence rates, this because the eigenvalues of matrix Q are different. However, finding the best parameter set c and c̄ is not straightforward because the eigenvalues of matrix Q are also determined by the equation Ax = b and the network G, both information are global information that cannot be obtained by agents. Figure 3: Example: Multiple least squares solution, c = 0, different c̄ 5 4 3 x1 2 1 0 -1 -2 0 50 100 150 200 250 300 350 400 450 500 t Figure 4: History of x1 when c = 0 and c̄ = 1 7 Conclusion We have proposed a discrete-time update for multi-agent networks, which enable each agent to achieve the same least square solutions exponentially fast when the network is undirected and connected. The exponential convergence does not rely on any time-varying and small step-size, which differs form the proposed updates in existence. Future work includes proper design of parameters c, c̄ and the generalization of the proposed update to networks that are directed and time-varying. Appendix Proof of Lemma 1 First note that due to the mixed-product property of Kronecker product, D̄K̄D̄ = (DKD) ⊗ In ; W̄ K̄W̄ = (W KW ) ⊗ In . Assumption (21) in Theorem 1 is equivalent to D̄K̄D̄ − W̄ K̄W̄ ≥ 0 If suppose λ is an eigenvalue of Q. Then there is a nonzero vector col {u, ū} such that     u u Q =λ ū ū which, recalling (33), is equivalent to       Imn +cK̄W̄ K̄W̄ u Imn +c̄K̄Ā0 Ā+cK̄D̄ K̄D̄ u =λ −K̄W̄ Imn ū −K̄D̄ Imn ū that is,    Imn +cK̄W̄ −λ(Imn + c̄K̄Ā0 Ā+cK̄D̄) u = K̄ λD̄ − W̄ ū  K̄ λD̄ − W̄ u = (λ − 1) ū and, since K̄ is nonsingular, these can be written as  −1   K̄ +cW̄ −λ K̄−1 +c̄Ā0 Ā+cD̄ u = λD̄ − W̄ ū  λD̄ − W̄ u = (λ − 1) K̄−1 ū (38) (39) In the case of λ 6= 1, (39) is equivalent to ū =  1 K̄ λL̄ u λ−1 (40) Hence u 6= 0 and (38) is equivalent to M (λ)u = 0 (41)   M (λ) = λD̄ − W̄ K̄ λD̄ − W̄ + λ (λ −1) c̄Ā0 Ā  + (λ − 1)2 K̄−1 + (λ − 1)c(λD̄ − W̄ (42) where Note that M (λ) = λ2 M2 + λM1 + M0 where M2 = D̄K̄D̄ + K̄−1 + cD̄ + c̄Ā0 Ā > 0 M1 = − W̄ K̄D̄ − D̄K̄W̄ − 2K̄−1 − cD̄ − cW̄ − c̄Ā0 Ā M0 = W̄ K̄W̄ + K̄−1 + cW̄ > 0 Thus, we have shown that λ 6= 1 is an eigenvalue of Q if and only if there is a nonzero vector u such that (41) holds. In the case of λ = 1, equations (38) and (39) reduce to    − c̄Ā0 Ā + c(D̄ − W̄ ) u = D̄ − W̄ ū  D̄ − W̄ u = 0 Recall that D̄ − W̄ = L̄, thus λ = 1 is an eigenvalue of Q and col {u, ū} is an eigenvector corresponding to 1 if and only if col {u, ū} is nonzero and L̄u = 0 (43) 0 L̄ū = −c̄Ā Āu (44) Proof of (a) If |λ| > 1, then we have shown in the previous section that that λ is an eigenvalue of Q if and only if there is a nonzero vector u such that (41) holds. Suppose λ is real with |λ| > 1 and recall expression (42) for M (λ). Observe that both λ(λ − 1)  and (λ − 1)2 are positive; Ā0 Ā and λD̄ − W̄ K̄ λD̄ − W̄ are positive semi-definite; and K̄−1 is positive definite. Furthermore, if λ > 1 then, λ−1 is positive and c(λD̄− W̄ ) is positive semi-definite; if λ < −1 then, λ − 1 is negative and c(λD̄ − W̄ ) is negative semi-definite. Thus, we conclude that when λ is real with |λ| > 1, the matrix M (λ) in (42) is positive definite. Hence there is not a non-zero vector u for which M (λ)u = 0 and so λ is not an eigenvalue of Q. Suppose that λ is complex. Left-multiplying equation (41) by u0 yields λ2 c2 + λc1 + c0 = 0 where c0 = u0 M0 u, c1 = u0 M1 u, c2 = u0 M2 u (45) √ Since M0 , M1 , M2 are symmetric, c0 , c1 and c2 are real. Let λ = p + qi, where i = −1 and p and q are real with q 6= 0. Then equating the real and imaginary parts of (45) to zero results in (p2 − q 2 )c2 + pc1 + c0 = 0 (46) q(2pc2 + c1 ) = 0 (47) Since q 6= 0, equation (47) implies that 2pc2 + c1 = 0 (48) |λ|2 c2 − c0 = 0 (49) which upon substitution into (46) yields Since M2 is positive definite and u 6= 0, we must have c2 > 0. Note that c2 − c0 = u0 (M2 − M0 )u and M2 − M0 = D̄K̄D̄ − W̄ K̄W̄ + c(D̄ − W̄ ) + c̄Ā0 Ā (50) Since D̄− W̄ = L̄ ≥ 0, Ā0 Ā ≥ 0, c, c̄ ≥ 0 and, by assumption D̄K̄D̄− W̄ K̄W̄ ≥ 0, one has M2 −M0 ≥ 0 and c2 ≥ c0 . Since c2 > 0, it now follows from (49) that |λ|2 = c0 /c2 ≤ 1. Hence |λ| ≤ 1. Recall that λ = −1 is an eigenvalue of Q if and only if there is a nonzero vector u such that M (−1)u = 0. From (42) we have   M (−1) = D̄ + W̄ K̄ D̄ + W̄ + 2c̄Ā0 Ā + 4K̄−1 + 2c(D̄ + W̄ ) >0 Since M (−1) is positive definite, M (−1)u 6= 0 for all non-zero u = 0. Thus −1 is not an eigenvalue of Q. Proof of (b) Suppose that λ is a complex eigenvalue of Q with |λ| = 1. Recalling the proof of (a), there must exist a nonzero vector u such that (48) and (49) hold, that is, u0 (2pM2 + M1 )u = 0 0 u (M2 − M0 )u = 0 (51) (52)  where λ = p + qi. Recall (50). Since c D̄ − W̄ and c̄Ā0 Ā are positive semi-definite, c̄ > 0 and, by assumption, D̄K̄D̄ − W̄ K̄W̄ is positive semi-definite, (52) implies that (D̄K̄D̄ − W̄ K̄W̄ )u = 0 (53) Āu = 0  c D̄ − W̄ u = 0 (54) (55) Equation (51), along with (54), results in u0 [2p(D̄K̄D̄ + K̄−1 + cD̄) − (W̄ K̄D̄ + D̄K̄W̄ + 2K̄−1 + cD̄ + cW̄ )]u = 0 (56) If c 6= 0 then (55) implies that D̄u = W̄ u and we obtain that 2(p − 1)u0 [D̄K̄D̄+ K̄−1 +cD̄]u = 0 (57) Since 1 = |λ|2 = p2 + q 2 = 1 and q 6= 0, we must have p < 1 and (57) implies that u0 [D̄K̄D̄+ K̄−1 +cD̄]u = 0 (58) The matrix D̄K̄D̄+ K̄−1 +cD̄ is positive definite, so, (58) yields the contradiction that u = 0; hence c = 0. If L̄u = 0 then D̄u = W̄ u and (57) holds. Again we get the contradiction that u = 0. Hence L̄u 6= 0. This along with (53), (54), lead to the equations (22)-(24) in Theorem 1. Proof of (c) We have seen that one is an eigenvalue for Q and col {u, ū} is a corresponding eigenvector if and only if col {u, ū} is nonzero and satisfies (43) and (44). Since L̄ is symmetric, (43) implies that that u0 L̄ = 0. Multiplying both sides of (44) by u0 , it now follows that −c̄u0 Ā0 Āu = 0; since c̄ > 0, this is equivalent to Āu = 0. Equation (43) now implies that L̄ū = 0. Thus (36) holds. In addition, since L̄ is singular, a nonzero solution col {u, ū} to (36) exists; hence one is an eigenvalue for Q. Now, we prove the multiplicity property of eigenvalue one by contradiction. Suppose the algebraic multiplicity of the eigenvalue one is not equal to its geometric multiplicity. Then there exists a nonzero vector col {v, v̄} [46] such that     v u (Q − I) = (59) v̄ ū where col {u, ū} is an eigenvector corresponding to one. It follows from (59) and the definition of Q in (33) that  (cK̄W̄ − cK̄D̄ − c̄K̄Ā0 Ā)v − K̄W̄ − K̄D̄ v̄  = I + c̄K̄Ā0 Ā + cK̄D̄ u + K̄D̄ū (K̄D̄ − K̄W̄ )v = −K̄D̄u + ū Left multiplying both equations by K̄−1 and recalling that L̄ = D̄ − W̄ yields  −c(L̄ + Ā0 Ā)v + L̄v̄ = K̄−1 + c̄Ā0 Ā + cD̄ u + D̄ū L̄v = −D̄u + K̄ −1 ū (60) (61) Since col {u, ū} is an eigenvector corresponding to one, it is nonzero and satisfies (36); hence left multiplying (60) and (61) by u0 and ū0 , respectively, results in  0 = u0 K̄−1 + cD̄ u + u0 D̄ū 0 = −ū0 D̄u + ū0 K̄−1 ū Thus  u0 K̄−1 + cD̄ u + ū0 K̄−1 ū = 0 (62)  Since both K̄−1 + cD̄ and K̄−1 are positive definite, we obtain the contradiction that u = ū = 0. Hence the algebraic multiplicity of eigenvalue one must equal its geometric multiplicity. Proof of Corollary 1 We prove this corollary by showing that the hypotheses of Theorem 1 hold. Since κi = 1/di we have K̄ = D̄−1 and D̄K̄D̄ − W̄ K̄W̄ = D̄ − W̄ D̄−1 W̄ 1 1 1 1 = D̄ 2 [I − (D̄− 2 W̄ D̄− 2 )2 ]D̄ 2 1 1 By the Gershgorin Disk Theorem, L̄ = D̄ − W̄ ≥ 0 [43] and thus I ≥ D̄− 2 W̄ D̄− 2 . Hence I ≥ 1 1 (D̄− 2 W̄ D̄− 2 )2 that is, 1 1 I − (D̄− 2 W̄ D̄− 2 )2 ≥ 0 Thus, D̄K̄D̄ − W̄ K̄W̄ ≥ 0, that is, (21) holds. We now show that equations (22)-(24) do not have a solution. If (23) holds then,  D̄ − W̄ D̄−1 W̄ u = 0 that is    1 1 1 1 1 1 D̄ 2 I + D̄− 2 W̄ D̄− 2 I − D̄− 2 W̄ D̄− 2 D̄ 2 u = 0 1 (63) 1 Recall that G has self-arcs, that is, D̄ + W̄ > 0 [43]; hence Imn + D̄− 2 W̄ D̄− 2 > 0 is nonsingular. Thus, equation (63) leads to   1 1 1 Imn − D̄− 2 W̄ D̄− 2 D̄ 2 u = 0 (64) 1 which, upon left-multiplying by D̄ 2 yields  D̄ − W̄ u = 0 (65) that is (24) is not satisfied. Hence there does not exist a vector u satisfying (22) - (24). Application of Theorem 1 now yields exponential convergence for any c ≥ 0 and c̄ > 0. References [1] S. Mou, J. Liu, and A. S. Morse, “A distributed algorithm for solving a linear algebraic equation,” IEEE Transactions on Automatic Control, no. 11, pp. 2863–2878, 2015. [2] B. D. O. Anderson, S. Mou, U. R. Helmke, and A. S. Morse, “Decentralized gradient algorithm for solution of a linear equation,” Numerical Algebra, Control and Optimization, no. 3, pp. 319–328, 2016. [3] J. Lu and C. Y. Tang, “A distributed algorithm for solving positive definite linear equations over networks with membership dynamics,” IEEE Transactions on Control of Network Systems, 2016. [4] J. Wang and N. Elia, “Distributed solution of linear equations over unreliable networks,” Proceedings of American Control Conference, pp. 6471–6476, Jul. 2016. [5] S. Mou and A. S. Morse, “A fixed-neighbor, distributed algorithm for solving a linear algebraic equation,” European Control Conference, pp. 2269–2273, 2013. [6] A. Jadbabaie, J. Lin, and A. S. Morse, “Coordination of groups of mobile autonomous agents using nearest neighbor rules,” IEEE Trans. Autom. Control, pp. 988–1001, June 2003, also in Proc. 41st IEEE CDC, pages 2953 - 2958, 2002. [7] Z. Lin, B. Francis, and M. Maggiore, “State agreement for continuous-time coupled nonlinear systems,” SIAM Journal on Control and Optimization, vol. 46, no. 1, pp. 288–307, 2007. [8] M. Cao, A. S. Morse, and B. D. O. Anderson, “Agree asychronously,” IEEE Transactions on Automatic Control, vol. 53, no. 8, pp. 1826–1838, 2008. [9] Z. Sun, S. Mou, B. D. O. Anderson, and A. S. Morse, “Formation movements in minimally rigid formation control with mismatched mutual distances,” in Decision and Control (CDC), 2014 IEEE 53rd Annual Conference on. IEEE, 2014, pp. 6161–6166. [10] M. Fruhnert and M. Corless, “Consensus control of linear second-order discrete-time systems with guaranteed rate of convergence,” in Control Conference (ECC), 2015 European. IEEE, 2015, pp. 1492–1497. [11] M. Cao, A. S. Morse, and B. D. O. Anderson, “Reaching a consensus in a dynamically changing enviornment: a graphical approach,” SIAM Jounal on Control and Optimization, vol. 47, pp. 575–600, Feb. 2008. [12] X. Wang and Y. Hong, “Finite-time consensus for multi-agent networks with second-order agent dynamics,” IFAC Proceedings Volumes, vol. 41, no. 2, pp. 15 185–15 190, 2008. [13] K. Cai and H. Ishii, “Quantized consensus and averaging on gossip digraphs,” IEEE Transactions on Automatic Control, vol. 56, no. 9, pp. 2087–2100, Sept 2011. [14] ——, “Average consensus on general strongly connected digraphs,” Automatica, vol. 48, no. 11, pp. 2750–2761, 2012. [15] M. Liu, F. Wirth, M. Corless, and R. Shorten, “On the stability and convergence of a class of consensus systems with a nonlinear input,” Automatica, Accepted 2017. [16] X. Chen, J. Liu, M. A. Belabbas, Z. Xu, and T. Baar, “Distributed evaluation and convergence of self-appraisals in social networks,” IEEE Transactions on Automatic Control, vol. 62, no. 1, pp. 291–304, Jan 2017. [17] Y. Hong, J. Hu, and L. Gao, “Tracking control for multi-agent consensus with an active leader and variable topology,” Automatica, vol. 42, no. 7, pp. 1177–1182, 2006. [18] X. Wang, S. Mou, and D. Sun, “Improvement of a distributed algorithm for solving linear equations,” IEEE Transactions on Industrial Electronics, 2016, doi:10.1109/TIE.2016.2636119. [19] P. Wang, W. Ren, and Z. Duan, “Distributed minimum weighted norm solution to linear equations associated with weighted inner product,” Proceedings of the 55th Conference on Decision and Control, pp. 5220–5225, 2016. [20] L. Wang, D. Fullmer, and A. S. Morse, “A distributed algorithm with an arbitary initialization for solving a linear algebraic equation,” Proceedings of American Control Conference, pp. 1078– 1081, 2016. [21] S. Mou, Z. Lin, L. Wang, D. Fullmer, and A. S. Morse, “A distributed algorithm for efficiently solving linear equations and its applications (special issue jcw),” Systems & Control Letters, pp. 21–27, 2016. [22] S. Kar, J. M. F. Moura, and K. Ramanan, “Distributed parameter estimation in sensor networks: Nonlinear observations models and imperfect communication,” IEEE Transactions on Information Theory, no. 6, pp. 1–52, 2012. [23] S. Nabavi, J. Zhang, and A. Chakrabortty, “Distributed optimization algorithms for widearea oscillation monitoring in power systems using interregional pmu-pdc architectures,” IEEE Transactions on Smart Grid, vol. 6, no. 5, pp. 2529–2538, Sept 2015. [24] B. Zhao, F. Lin, C. Wang, X. Zhang, M. Polis, and L. Wang, “Supervisory control of networked timed discrete event systems and its applications to power distribution networks,” IEEE Transactions on Control of Network Systems, vol. PP, no. 99, pp. 1–1, 2015. [25] J. Qin, C. Yu, and B. Anderson, “On leaderless and leader-following consensus for interacting clusters of second-order multi-agent systems,” Automatica, vol. 74, pp. 214 – 221, 2016. [26] Z. Lin, M. Broucke, and B. Francis, “Local control strategies for groups of mobile autonomous agents,” IEEE Trans. Autom. Control, vol. 49, no. 4, pp. 622–629, April 2004. [27] Z. Sun, U. Helmke, and B. D. O. Anderson, “Rigid formation shape control in general dimensions: an invariance principle and open problems,” in 2015 54th IEEE Conference on Decision and Control (CDC), Dec 2015, pp. 6095–6100. [28] T. C. Aysal and K. E. Barner, “Constrained decentralized estimation over noisy channels for sensor networks,” IEEE Transactions on Signal Processing, vol. 56, no. 4, pp. 1398–1410, April 2008. [29] C. G. Lopes and A. H. Sayed, “Diffusion least-mean squares over adaptive networks: Formulation and performance analysis,” IEEE Transactions on Signal Processing, vol. 56, no. 7, pp. 3122–3136, July 2008. [30] G. Mateos, I. D. Schizas, and G. B. Giannakis, “Distributed recursive least-squares for consensus-based in-network adaptive estimation,” IEEE Transactions on Signal Processing, vol. 57, no. 11, pp. 4583–4588, Nov 2009. [31] F. Longstaff and E. Schwartz, “Valuing american options by simulation: a simple least-squares approach,” Review of Financial studies, vol. 14, no. 1, pp. 113–147, 2001. [32] Z. Luo, “Universal decentralized estimation in a bandwidth constrained sensor network,” IEEE Transactions on Information Theory, vol. 51, no. 6, pp. 2210–2219, June 2005. [33] A. Nedic and A. Ozdaglar, “Distributed sub-gradient methods for multi-agent optimization,” IEEE Transactions on Automatic Control, no. 1, pp. 48–61, 2009. [34] J. C. Duchi, A. Agarwal, and M. J. Wainwright, “Dual averaging for distributed optimization: Convergence analysis and network scaling,” IEEE Transactions on Automatic Control, no. 3, pp. 592–606, 2012. [35] D. Jakovetic, J. M. F. Moura, and J. Xavier, “Fast distributed gradient methods,” IEEE Transactions on Automatic Control, no. 5, pp. 1131–1146, 2014. [36] T. Chang, A. Nedic, and A. Scaglione, “Distributed constrained optimization by consensusbased primal-dual perturbation method,” IEEE Transactions on Automatic Control, no. 6, pp. 1524–1538, 2014. [37] A. Nedic, A. Ozdaglar, and P. A. Parrilo, “Constrained consensus and optimization in multiagent networks,” IEEE Transactions on Automatic Control, no. 4, pp. 922–938, 2010. [38] A. K. Sahu, S. Kar, J. M. F. Moura, and H. V. Poor, “Distributed constrained recursive nonlinear least-squares estimation: Algorithms and asymptotics,” ArXiv e-prints, Jan. 2016. [39] G. Shi, B. D. O. Anderson, and U. Helmke, “Network flows that solve linear equations,” IEEE Transactions on Automatic Control, vol. 62, no. 6, pp. 2659–2674, June 2017. [40] J. Wang and N. Elia, “Distributed least square with intermittent communications,” in 2012 American Control Conference (ACC), June 2012, pp. 6479–6484. [41] ——, “A control perspective for centralized and distributed convex optimization,” in 2011 50th IEEE Conference on Decision and Control and European Control Conference, Dec 2011, pp. 3800–3805. [42] B. Gharesifard and J. Cortés, “Distributed continuous-time convex optimization on weightbalanced digraphs,” IEEE Trans. Autom. Control, vol. 59, no. 3, pp. 781–786, Mar. 2014. [43] F. Chung, Spectral graph theory. American Mathematical Soc., 1997, vol. 92. [44] D. Bertsekas, Nonlinear programming. Athena scientific Belmont, 1999. [45] J. Wang and N. Elia, “Control approach to distributed optimization,” in 2010 48th Annual Allerton Conference on Communication, Control, and Computing (Allerton), Sept 2010, pp. 557–561. [46] R. Bronson, Matrix methods: an introduction. Gulf Professional Publishing, 1991.
3cs.SY
Functional Package Management with Guix arXiv:1305.4584v1 [cs.PL] 20 May 2013 Ludovic Courtès Bordeaux, France [email protected] ABSTRACT 1. We describe the design and implementation of GNU Guix, a purely functional package manager designed to support a complete GNU/Linux distribution. Guix supports transactional upgrades and roll-backs, unprivileged package management, per-user profiles, and garbage collection. It builds upon the low-level build and deployment layer of the Nix package manager. Guix uses Scheme as its programming interface. In particular, we devise an embedded domain-specific language (EDSL) to describe and compose packages. We demonstrate how it allows us to benefit from the host general-purpose programming language while not compromising on expressiveness. Second, we show the use of Scheme to write build programs, leading to a “two-tier” programming system. GNU Guix1 is a purely functional package manager for the GNU system [20], and in particular GNU/Linux. Package management consists in all the activities that relate to building packages from source, honoring the build-time and run-time dependencies on packages, installing, removing, and upgrading packages in user environments. In addition to these standard features, Guix supports transactional upgrades and roll-backs, unprivileged package management, per-user profiles, and garbage collection. Guix comes with a distribution of user-land free software packages. Categories and Subject Descriptors D.4.5 [Operating Systems]: Reliability; D.4.5 [Operating Systems]: System Programs and Utilities; D.1.1 [Software]: Applicative (Functional) Programming General Terms Languages, Management, Reliability Keywords Functional package management, Scheme, Embedded domainspecific language Copyright c 2013 Ludovic Courtès Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/licenses/gfdl.html. The source of this document is available from http://git.sv.gnu. org/cgit/guix/maintenance.git. European Lisp Symposium 2013, Madrid, Spain INTRODUCTION Guix seeks to empower users in several ways: by offering the uncommon features listed above, by providing the tools that allow users to formally correlate a binary package and the “recipes” and source code that led to it—furthering the spirit of the GNU General Public License—, by allowing them to customize the distribution, and by lowering the barrier to entry in distribution development. The keys toward these goals are the implementation of a purely functional package management paradigm, and the use of both declarative and lower-level programming interfaces (APIs) embedded in Scheme. To that end, Guix reuses the package storage and deployment model implemented by the Nix functional package manager [8]. On top of that, it provides Scheme APIs, and in particular embedded domainspecific languages (EDSLs) to describe software packages and their build system. Guix also uses Scheme for programs and libraries that implement the actual package build processes, leading to a “two-tier” system. This paper focuses on the programming techniques implemented by Guix. Our contribution is twofold: we demonstrate that use of Scheme and EDSLs achieves expressiveness comparable to that of Nix’s DSL while providing a richer and extensible programming environment; we further show that Scheme is a profitable alternative to shell tools when it comes to package build programs. Section 2 first gives some background on functional package management and its implementation in Nix. Section 3 describes the design and implementation of Guix’s programming and packaging interfaces. Section 4 provides an evaluation and discussion of the current status of Guix. Section 5 presents related work, and Section 6 concludes. 1 http://www.gnu.org/software/guix/ 2. BACKGROUND This section describes the functional package management paradigm and its implementation in Nix. It then shows how Guix differs, and what the rationale is. 2.1 Functional Package Management Functional package management is a paradigm whereby the build and installation process of a package is considered as a pure function, without any side effects. This is in contrast with widespread approaches to package build and installation where the build process usually has access to all the software installed on the machine, regardless of what its declared inputs are, and where installation modifies files in place. Functional package management was pioneered by the Nix package manager [8], which has since matured to the point of managing a complete GNU/Linux distribution [9]. To allow build processes to be faithfully regarded as pure functions, Nix can run them in a chroot environment that only contains the inputs it explicitly declared; thus, it becomes impossible for a build process to use, say, Perl, if that package was not explicitly declared as an input of the build process. In addition, Nix maps the list of inputs of a build process to a statistically unique file system name; that file name is used to identify the output of the build process. For instance, a particular build of GNU Emacs may be installed in /nix/store/v9zic07iar8w90zcy398r745w78a7lqs-emacs-24.2, based on a cryptographic hash of all the inputs to that build process; changing the compiler, configuration options, build scripts, or any other inputs to the build process of Emacs yields a different name. This is a form of on-disk memoization, with the /nix/store directory acting as a cache of “function results”—i.e., a cache of installed packages. Directories under /nix/store are immutable. This direct mapping from build inputs to the result’s directory name is basis of the most important properties of a functional package manager. It means that build processes are regarded as referentially transparent. To put it differently, instead of merely providing pre-built binaries and/or build recipes, functional package managers provide binaries, build recipes, and in effect a guarantee that a given binary matches a given build recipe. 2.2 not transactional; interrupting them may leave the system in an undefined, or even unusable state, where some of the files have been altered. Third, rolling back to a previous system configuration is practically impossible, due to the absence of a mechanism to formally describe the system’s configuration. Nix attempts to address these shortcomings through the functional software deployment paradigm: installed packages are immutable, and build processes are regarded as pure functions, as explained before. Thanks to this property, it implements transparent source/binary deployment: the directory name of a build result encodes all the inputs of its build process, so if a trusted server provides that directory, then it can be directly downloaded from there, avoiding the need for a local build. Each user has their own profile, which contains symbolic links to the /nix/store directories of installed packages. Thus, users can install packages independently, and the actual storage is shared when several users install the very same package in their profile. Nix comes with a garbage collector, which has two main functions: with conservative scanning, it can determine what packages a build output refers to; and upon user request, it can delete any packages not referenced via any user profile. To describe and compose build processes, Nix implements its own domain-specific language (DSL), which provides a convenient interface to the build and storage mechanisms described above. The Nix language is purely functional, lazy, and dynamically typed; it is similar to that of the Vesta software configuration system [11]. It comes with a handful of built-in data types, and around 50 primitives. The primitive to describe a build process is derivation. 1: 2: 3: 4: 5: 6: derivation { name = "example-1.0"; builder = "${./static-bash}"; args = [ "-c" "echo hello > $out" ]; system = "x86_64-linux"; } Figure 1: Call to the derivation primitive in the Nix language. Nix The idea of purely functional package started by making an analogy between programming language paradigms and software deployment techniques [8]. The authors observed that, in essence, package management tools typically used on free operating systems, such as RPM and Debian’s APT, implement an imperative software deployment paradigm. Package installation, removal, and upgrade are all done in-place, by mutating the operating system’s state. Likewise, changes to the operating system’s configuration are done in-place by changing configuration files. This imperative approach has several drawbacks. First, it makes it hard to reproduce or otherwise describe the OS state. Knowing the list of installed packages and their version is not enough, because the installation procedure of packages may trigger hooks to change global system configuration files [4, 7], and of course users may have done additional modifications. Second, installation, removal, and upgrade are Figure 1 shows code that calls the derivation function with one argument, which is a dictionary. It expects at least the four key/value pairs shown above; together, they define the build process and its inputs. The result is a derivation, which is essentially the promise of a build. The derivation has a low-level on-disk representation independent of the Nix language—in other words, derivations are to the Nix language what assembly is to higher-level programming languages. When this derivation is instantiated—i.e., built—, it runs the command static-bash -c "echo hello > $out" in a chroot that contains nothing but the static-bash file; in addition, each key/value pair of the derivation argument is reified in the build process as an environment variable, and the out environment variable is defined to point to the output /nix/store file name. Before the build starts, the file static-bash is imported under /nix/store/...-static-bash, and the value associated with builder is substituted with that file name. This ${...} form on line 3 for string interpolation makes it easy to insert Nix-language values, and in particular computed file names, in the contents of build scripts. The Nix-based GNU/Linux distribution, NixOS, has most of its build scripts written in Bash, and makes heavy use of string interpolation on the Nix-language side. All the files referenced by derivations live under /nix/store, called the store. In a multi-user setup, users have readonly access to the store, and all other accesses to the store are mediated by a daemon running as root. Operations such as importing files in the store, computing a derivation, building a derivation, or running the garbage collector are all implemented as remote procedure calls (RPCs) to the daemon. This guarantees that the store is kept in a consistent state—e.g., that referenced files and directories are not garbage-collected, and that the contents of files and directories are genuine build results of the inputs hashed in their name. The implementation of the Nix language is an interpreter written in C++. In terms of performance, it does not compete with typical general-purpose language implementations; that is often not a problem given its specific use case, but sometimes requires rewriting functions, such as list-processing tools, as language primitives in C++. The language itself is not extensible: it has no macros, a fixed set of data types, and no foreign function interface. 2.3 From Nix to Guix Our main contribution with GNU Guix is the use of Scheme for both the composition and description of build processes, and the implementation of build scripts. In other words, Guix builds upon the build and deployment primitives of Nix, but replaces the Nix language by Scheme with embedded domain-specific languages (EDSLs), and promotes Scheme as a replacement for Bash in build scripts. Guix is implemented using GNU Guile 2.02 , a rich implementation of Scheme based on a compiler and bytecode interpreter that supports the R5RS and R6RS standards. It reuses the build primitives of Nix by making remote procedure calls (RPCs) to the Nix build daemon. We claim that using an embedded DSL has numerous practical benefits over an independent DSL: tooling (use of Guile’s compiler, debugger, and REPL, Unicode support, etc.), libraries (SRFIs, internationalization support, etc.), and seamless integration in larger programs. To illustrate this last point, consider an application that traverses the list of available packages and processes it—for instance to filter packages whose name matches a pattern, or to render it as HTML. A Scheme program can readily and efficiently do it with Guix, where packages are first-class Scheme objects; conversely, writing such an implementation with an external DSL such as Nix requires either extending the language implementation with the necessary functionality, or interfacing with it via an external representation such as XML, which is often inefficient and lossy. can achieve conciseness comparable to that of shell scripts, but with improved expressivity and clearer semantics. The next section describes the main programming interfaces of Guix, with a focus on its high-level package description language and “shell programming” substitutes provided to builder-side code. 3. BUILD EXPRESSIONS AND PACKAGE DESCRIPTIONS Our goal when designing Guix was to provide interfaces ranging from Nix’s low-level primitives such as derivation to high-level package declarations. The declarative interface is a requirement to help grow and maintain a large software distribution. This section describes the three level of abstractions implemented in Guix, and illustrates how Scheme’s homoiconicity and extensibility were instrumental. 3.1 Low-Level Store Operations As seen above, derivations are the central concept in Nix. A derivation bundles together a builder and its execution environment: command-line arguments, environment variable definitions, as well as a list of input derivations whose result should be accessible to the builder. Builders are typically executed in a chroot environment where only those inputs explicitly listed are visible. Guix transposes Nix’s derivation primitive literally to its Scheme interface. 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: (let* ((store (open-connection)) (bash (add-to-store store "static-bash" #t "sha256" "./static-bash"))) (derivation store "example-1.0" "x86_64-linux" bash ’("-c" "echo hello > $out") ’() ’())) ⇒ "/nix/store/nsswy...-example-1.0.drv" #<derivation "example-1.0" ...> Figure 2: Using the derivation primitive in Scheme with Guix. Figure 2 shows the example of Figure 1 rewritten to use Guix’s low-level Scheme API. Notice how the former makes explicit several operations not visible in the latter. First, line 1 establishes a connection to the build daemon; line 2 explicitly asks the daemon to “intern” file static-bash into the store; finally, the derivation call instructs the daemon to compute the given derivation. The two arguments on line 9 are a set of environment variable definitions to be set in the build environment (here, it’s just the empty list), and a set of inputs—other derivations depended on, and whose result must be available to the build process. Two values are returned (line 11): the file name of the on-disk representation of the derivation, and its in-memory representation as a Scheme record. We show that use of Scheme in build scripts is natural, and 2 http://www.gnu.org/software/guile/ The build actions represented by this derivation can then be performed by passing it to the build-derivations RPC. Again, its build result is a single file reading hello, and its build is performed in an environment where the only visible file is a copy of static-bash under /nix/store. 3.2 Build Expressions The Nix language heavily relies on string interpolation to allow users to insert references to build results, while hiding the underlying add-to-store or build-derivations operations that appear explicitly in Figure 2. Scheme has no support for string interpolation; adding it to the underlying Scheme implementation is certainly feasible, but it’s also unnatural. The obvious strategy here is to instead leverage Scheme’s homoiconicity. This leads us to the definition of buildexpression->derivation, which works similarly to derivation, except that it expects a build expression as an Sexpression instead of a builder. Figure 3 shows the same derivation as before but rewritten to use this new interface. 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: (let ((store (open-connection)) (builder ’(call-with-output-file %output (lambda () (display "hello"))))) (build-expression->derivation store "example-1.0" "x86_64-linux" builder ’())) ⇒ "/nix/store/zv3b3...-example-1.0.drv" #<derivation "example-1.0" ...> Figure 3: Build expression written in Scheme. This time the builder on line 2 is purely a Scheme expression. That expression will be evaluated when the derivation is built, in the specified build environment with no inputs. The environment implicitly includes a copy of Guile, which is used to evaluate the builder expression. By default this is a stand-alone, statically-linked Guile, but users can also specify a derivation denoting a different Guile variant. Remember that this expression is run by a separate Guile process than the one that calls build-expression->derivation: it is run by a Guile process launched by the build daemon, in a chroot. So, while there is a single language for both the “host” and the “build” side, there are really two strata of code, or tiers: the host-side, and the build-side code3 . Notice how the output file name is reified via the %output variable automatically added to builder’s scope. Input file names are similarly reified through the %build-inputs variable (not shown here). Both variables are non-hygienically introduced in the build expression by build-expression>derivation. Sometimes the build expression needs to use functionality from other modules. For modules that come with Guile, the 3 The term “stratum” is this context was coined by Manuel Serrano et al. for their work on Hop where a similar situation arises [17]. expression just needs to be augmented with the needed (usemodules ...) clause. Conversely, external modules first need to be imported into the derivation’s build environment so the build expression can use them. To that end, the build-expression->derivation procedure has an optional #:modules keyword parameter, allowing additional modules to be imported into the expression’s environment. When #:modules specifies a non-empty module list, an auxiliary derivation is created and added as an input to the initial derivation. That auxiliary derivation copies the module source and compiled files in the store. This mechanism allows build expressions to easily use helper modules, as described in Section 3.4. 3.3 Package Declarations The interfaces described above remain fairly low-level. In particular, they explicitly manipulate the store, pass around the system type, and are very distant from the abstract notion of a software package that we want to focus on. To address this, Guix provides a high-level package definition interface. It is designed to be purely declarative in common cases, while allowing users to customize the underlying build process. That way, it should be intelligible and directly usable by packagers will little or no experience with Scheme. As an additional constraint, this extra layer should be efficient in space and time: package management tools need to be able to load and traverse a distribution consisting of thousands of packages. Figure 4 shows the definition of the GNU Hello package, a typical GNU package written in C and using the GNU build system—i.e., a configure script that generates a makefile supporting standardized targets such as check and install. It is a direct mapping of the abstract notion of a software package and should be rather self-descriptive. The inputs field specifies additional dependencies of the package. Here line 16 means that Hello has a dependency labeled "gawk" on GNU Awk, whose value is that of the gawk global variable; gawk is bound to a similar package declaration, omitted for conciseness. The arguments field specifies arguments to be passed to the build system. Here #:configure-flags, unsurprisingly, specifies flags for the configure script. Its value is quoted because it will be evaluated in the build stratum—i.e., in the build process, when the derivation is built. It refers to the %build-inputs global variable introduced in the build stratum by build-expression->derivation, as seen before. That variable is bound to an association list that maps input names, like "gawk", to their actual directory name on disk, like /nix/store/...-gawk-4.0.2. The code in Figure 4 demonstrates Guix’s use of embedded domain-specific languages (EDSLs). The package form, the origin form (line 5), and the base32 form (line 9) are expanded at macro-expansion time. The package and origin forms expand to a call to Guile’s make-struct primitive, which instantiates a record of the given type and with the given field values4 ; these macros look up the mapping of 4 The make-struct instantiates SRFI-9-style flat records, 1: (define hello 2: (package 3: (name "hello") 4: (version "2.8") 5: (source (origin 6: (method url-fetch) 7: (uri (string-append "mirror://gnu/hello/hello-" 8: version ".tar.gz")) 9: (sha256 (base32 "0wqd8...")))) 10: (build-system gnu-build-system) 11: (arguments 12: ’(#:configure-flags 13: ‘("-disable-color" 14: ,(string-append "-with-gawk=" 15: (assoc-ref %build-inputs "gawk"))))) 16: (inputs ‘(("gawk" ,gawk))) 17: (synopsis "GNU Hello") 18: (description "An illustration of GNU’s engineering practices.") 19: (home-page "http://www.gnu.org/software/hello/") 20: (license gpl3+))) Figure 4: A package definition using the high-level interface. field names to field indexes, such that that mapping incurs no run-time overhead, in a way similar to SRFI-35 records [14]. They also bind fields as per letrec*, allowing them to refer to one another, as on line 8 of Figure 4. The base32 macro simply converts a literal string containing a base-32 representation into a bytevector literal, again allowing the conversion and error-checking to be done at expansion time rather than at run-time. 1: (define-record-type* <package> 2: package make-package 3: package? 4: 5: (name package-name) 6: (version package-version) 7: (source package-source) 8: (build-system package-build-system) 9: (arguments package-arguments 10: (default ’()) (thunked)) 11: 12: (inputs package-inputs 13: (default ’()) (thunked)) 14: (propagated-inputs package-propagated-inputs 15: (default ’())) 16: 17: (synopsis package-synopsis) 18: (description package-description) 19: (license package-license) 20: (home-page package-home-page) 21: 22: (location package-location 23: (default (current-source-location)))) Figure 5: Definition of the package record type. which are essentially vectors of a disjoint type. In Guile they are lightweight compared to CLOS-style objects, both in terms of run time and memory footprint. Furthermore, make-struct is subject to inlining. The package and origin macros are generated by a syntaxcase hygienic macro [19], define-record-type*, which is layered above SRFI-9’s syntactic record layer [13]. Figure 5 shows the definition of the <package> record type (the <origin> record type, not shown here, is defined similarly.) In addition to the name of a procedural constructor, make-package, as with SRFI-9, the name of a syntactic constructor, package, is given (likewise, origin is the syntactic constructor of <origin>.) Fields may have a default value, introduced with the default keyword. An interesting use of default values is the location field: its default value is the result of current-source-location, which is itself a built-in macro that expands to the source file location of the package form. Thus, records defined with the package macro automatically have a location field denoting their source file location. This allows the user interface to report source file location in error messages and in package search results, thereby making it easier for users to “jump into” the distribution’s source, which is one of our goals. 1: (package (inherit hello) 2: (version "2.7") 3: (source 4: (origin 5: (method url-fetch) 6: (uri 7: "mirror://gnu/hello/hello-2.7.tar.gz") 8: (sha256 9: (base32 "7dqw3..."))))) Figure 6: Creating a variant of the hello package. The syntactic constructors generated by define-recordtype* additionally support a form of functional setters (sometimes referred to as “lenses” [15]), via the inherit keyword. It allows programmers to create new instances that differ from an existing instance by one or more field values. A typical use case is shown in Figure 6: the expression shown evaluates to a new <package> instance whose fields all have the same value as the hello variable of Figure 4, except for the version and source fields. Under the hood, again, this expands to a single make-struct call with struct-ref calls for fields whose value is reused. The inherit feature supports a very useful idiom. It allows new package variants to be created programmatically, concisely, and in a purely functional way. It is notably used to bootstrap the software distribution, where bootstrap variants of packages such as GCC or the GNU libc are built with different inputs and configuration flags than the final versions. Users can similarly define customized variants of the packages found in the distribution. This feature also allows high-level transformations to be implemented as pure functions. For instance, the static-package procedure takes a <package> instance, and returns a variant of that package that is statically linked. It operates by just adding the relevant configure flags, and recursively applying itself to the package’s inputs. Another application is the on-line auto-updater: when installing a GNU package defined in the distribution, the guix package command automatically checks whether a newer version is available upstream from ftp.gnu.org, and offers the option to substitute the package’s source with a fresh download of the new upstream version—all at run time.This kind of feature is hardly accessible to an external DSL implementation. Among other things, this feature requires networking primitives (for the FTP client), which are typically unavailable in an external DSL such as the Nix language. The feature could be implemented in a language other than the DSL—for instance, Nix can export its abstract syntax tree as XML to external programs. However, this approach is often inefficient, due to the format conversion, and lossy: the exported representation may be either be too distant from the source code, or too distant from the preferred abstraction level. The author’s own experience writing an off-line autoupdater for Nix revealed other specific issues; for instance, the Nix language is lazily evaluated, but to make use of its XML output, one has to force strict evaluation, which in turn may generate more data than needed. In Guix, <package> instances have the expected level of abstraction, and they are readily accessible as first-class Scheme objects. Sometimes it is desirable for the value of a field to depend on the system type targeted. For instance, for bootstrapping purposes, MIT/GNU Scheme’s build system depends on pre-compiled binaries, which are architecture-dependent; its input field must be able to select the right binaries depending on the architecture. To allow field values to refer to the target system type, we resort to thunked fields, as shown on line 13 of Figure 5. These fields have their value automatically wrapped in a thunk (a zero-argument procedure); when accessing them with the associated accessor, the thunk is transparently invoked. Thus, the values of thunked fields are computed lazily; more to the point, they can refer to dynamic state in place at their invocation point. In particular, the package-derivation procedure (shortly introduced) sets up a current-system dynamically-scoped parameter, which allows field values to know what the target system is. Finally, both <package> and <origin> records have an associated “compiler” that turns them into a derivation. origin-derivation takes an <origin> instance and returns a derivation that downloads it, according to its method field. Likewise, package-derivation takes a package and returns a derivation that builds it, according to its build-system and associated arguments (more on that in Section 3.4). As we have seen on Figure 4, the inputs field lists dependencies of a package, which are themselves <package> objects; the package-derivation procedure recursively applies to those inputs, such that their derivation is computed and passed as the inputs argument of the lower-level build-expression>derivation. Guix essentially implements deep embedding of DSLs, where the semantics of the packaging DSL is interpreted by a dedicated compiler [12]. Of course the DSLs defined here are simple, but they illustrate how Scheme’s primitive mechanisms, in particular macros, make it easy to implement such DSLs without requiring any special support from the Scheme implementation. 3.4 Build Programs The value of the build-system field, as shown on Figure 4, must be a build-system object, which is essentially a wrapper around two procedure: one procedure to do a native build, and one to do a cross-build. When the aforementioned package-derivation (or package-cross-derivation, when cross-building) is called, it invokes the build system’s build procedure, passing it a connection to the build daemon, the system type, derivation name, and inputs. It is the build system’s responsibility to return a derivation that actually builds the software. (define* (gnu-build #:key (phases %standard-phases) #:allow-other-keys #:rest args) ;; Run all the PHASES in order, passing them ARGS. ;; Return true on success. (every (match-lambda ((name . proc) (format #t "starting phase ‘~ a’~ %" name) (let ((result (apply proc args))) (format #t "phase ‘~ a’ done~ %" name) result))) phases)) Figure 7: Entry point of the builder side code of gnu-build-system. The gnu-build-system object (line 10 of Figure 4) provides procedures to build and cross-build software that uses the GNU build system or similar. In a nutshell, it runs the following phases by default: 1. unpack the source tarball, and change the current directory to the resulting directory; 2. patch shebangs on installed files—e.g., replace #!/bin/sh by #!/nix/store/...-bash-4.2/bin/sh; this is required to allow scripts to work with our unusual file system layout; 3. run ./configure --prefix=/nix/store/..., followed by make and make check 4. run make install and patch shebangs in installed files. Of course, that is all implemented in Scheme, via buildexpression->derivation. Supporting code is available as a build-side module that gnu-build-system automatically adds as an input to its build scripts. The default build programs just call the procedure of that module that runs the above phases. The (guix build gnu-build-system) module contains the implementation of the above phases; it is imported on the builder side. The phases are modeled as follows: each phase is a procedure accepting several keyword arguments, and ignoring any keyword arguments it does not recognize5 . For instance the configure procedure is in charge of running the package’s ./configure script; that procedure honors the #:configure-flags keyword parameter seen on Figure 4. Similarly, the build, check, and install procedures run the make command, and all honor the #:make-flags keyword parameter. All the procedures implementing the standard phases of the GNU build system are listed in the %standard-phases builder-side variable, in the form of a list of phase name/procedure pairs. The entry point of the builder-side code of gnu-build-system is shown on Figure 7. It calls all the phase procedures in order, by default those listed in the %standardphases association list, passing them all the arguments it got; its return value is true when every procedure’s return value is true. (define howdy (package (inherit hello) (arguments ’(#:phases (alist-cons-after ’configure ’change-hello (lambda* (#:key system #:allow-other-keys) (substitute* "src/hello.c" (("Hello, world!") (string-append "Howdy! Running on " system ".")))) %standard-phases))))) Figure 8: Package specification with custom build phases. The arguments field, shown on Figure 4, allows users to pass keyword arguments to the builder-side code. In addition to the #:configure-flags argument shown on the figure, users may use the #:phases argument to specify a different set of phases. The value of the #:phases must be a list of phase name/procedure pairs, as discussed above. This allows users to arbitrarily extend or modify the behavior of the build system. Figure 8 shows a variant of the definition in Figure 4 that adds a custom build phase. The alist-cons-after procedure is used to add a pair with change-hello as its 5 Like many Scheme implementations, Guile supports named or keyword arguments as an extension to the R5 and R6RS. In addition, procedure definitions whose formal argument list contains the #:allow-other-keys keyword ignore any unrecognized keyword arguments that they are passed. first item and the lambda* as its second item right after the pair in %standard-phases whose first item is configure; in other words, it reuses the standard build phases, but with an additional change-hello phase right after the configure phase. The whole alist-cons-after expression is evaluated on the builder side. This approach was inspired by that of NixOS, which uses Bash for its build scripts. Even with “advanced” Bash features such as functions, arrays, and associative arrays, the phases mechanism in NixOS remains limited and fragile, often leading to string escaping issues and obscure error reports due to the use of eval. Again, using Scheme instead of Bash unsurprisingly allows for better code structuring, and improves flexibility. Other build systems are provided. For instance, the standard build procedure for Perl packages is slightly different: mainly, the configuration phase consists in running perl Makefile.PL, and test suites are run with make test instead of make check. To accommodate that, Guix provides perl-buildsystem. Its companion build-side module essentially calls out to that of gnu-build-system, only with appropriate configure and check phases. This mechanism is similarly used for other build systems such as CMake and Python’s build system. (substitute* (find-files "gcc/config" "^gnu-user(64)?\\.h$") (("#define LIB_SPEC (.*)$" _ suffix) (string-append "#define LIB_SPEC \"-L" libc "/lib \" " suffix "\n")) (("#define STARTFILE_SPEC.*$" line) (string-append "#define STARTFILE_PREFIX_1 \"" libc "/lib\"\n" line))) Figure 9: The substitute* macro for sed-like substitutions. Build programs often need to traverse file trees, modify files according to a given pattern, etc. One example is the “patch shebang” phase mentioned above: all the source files must be traversed, and those starting with #! are candidate to patching. This kind of task is usually associated with “shell programming”—as is the case with the build scripts found in NixOS, which are written in Bash, and resort to sed, find, etc. In Guix, a build-side Scheme module provides the necessary tools, built on top of Guile’s operating system interface. For instance, find-files returns a list of files whose names matches a given pattern; patch-shebang performs the #! adjustment described above; copy-recursively and delete-recursively are the equivalent, respectively, of the shell cp -r and rm -rf commands; etc. An interesting example is the substitute* macro, which does sed-style substitution on files. Figure 9 illustrates its use to patch a series of files returned by find-files. There are two clauses, each with a pattern in the form of a POSIX regular expression; each clause’s body returns a string, which is the substitution for any matching line in the given files. In the first clause’s body, suffix is bound to the submatch corresponding to (.*) in the regexp; in the second clause, line is bound to the whole match for that regexp. This snippet is nearly as concise than equivalent shell code using find and sed, and it is much easier to work with. Build-side modules also include support for fetching files over HTTP (using Guile’s web client module) and FTP, as needed to realize the derivation of origins (line 5 of Figure 4). TLS support is available when needed through the Guile bindings of the GnuTLS library. 4. EVALUATION AND DISCUSSION This section discusses the current status of Guix and its associated GNU/Linux distribution, and outlines key aspects of their development. 4.1 Status Guix is still a young project. Its main features as a package manager are already available. This includes the APIs discussed in Section 3, as well as command-line interfaces. The development of Guix’s interfaces was facilitated by the reuse of Nix’s build daemon as the storage and deployment layer. The guix package command is the main user interface: it allows packages to be browsed, installed, removed, and upgraded. The command takes care of maintaining meta-data about installed packages, as well as a per-user tree of symlinks pointing to the actual package files in /nix/store, called the user profile. It has a simple interface. For instance, the following command installs Guile and removes Bigloo from the user’s profile, as a single transaction: $ guix package --install guile --remove bigloo The transaction can be rolled back with the following command: $ guix package --roll-back The following command upgrades all the installed packages whose name starts with a ‘g’: $ guix package --upgrade ’^g.*’ The --list-installed and --list-available options can be used to list the installed or available packages. As of this writing, Guix comes with a user-land distribution of GNU/Linux. That is, it allows users to install packages on top of a running GNU/Linux system. The distribution is self-contained, as explained in Section 4.3, and available on x86_64 and i686. It provides more than 400 packages, including core GNU packages such as the GNU C Library, GCC, Binutils, and Coreutils, as well as the Xorg software stack and applications such as Emacs, TeX Live, and several Scheme implementations. This is roughly a tenth of the number of packages found in mature free software distributions such as Debian. Experience with NixOS suggests that the functional model, coupled with continuous integration, allows the distribution to grow relatively quickly, because it is always possible to precisely monitor the status of the whole distribution and the effect of a change—unlike with imperative distributions, where the upgrade of a single package can affect many applications in many unpredictable ways [7]. From a programming point of view, packages are exposed as first-class global variables. For instance, the (gnu packages guile) module exports two variables, guile-1.8 and guile2.0, each bound to a <package> variable corresponding to the legacy and current stable series of Guile. In turn, this module imports (gnu packages multiprecision), which exports a gmp global variable, among other things; that gmp variable is listed in the inputs field of guile and guile-2.0. The package manager and the distribution are just a set of “normal” modules that any program or library can use. Packages carry meta-data, as shown in Figure 4. Synopses and descriptions are internationalized using GNU Gettext— that is, they can be translated in the user’s native language, a feature that comes for free when embedding the DSL in a mature environment like Guile. We are in the process of implementing mechanisms to synchronize part of that metadata, such as synopses, with other databases of the GNU Project. While the distribution is not bootable yet, it already includes a set of tools to build bootable GNU/Linux images for the QEMU emulator. This includes a package for the kernel itself, as well as procedures to build QEMU images, and Linux “initrd”—the “initial RAM disk” used by Linux when booting, and which is responsible for loading essential kernel modules and mounting the root file system, among other things. For example, we provide the expression->derivation-inlinux-vm: it works in a way similar to build-expression>derivation, except that the given expression is evaluated in a virtual machine that mounts the host’s store over CIFS. As a demonstration, we implemented a derivation that builds a “boot-to-Guile” QEMU image, where the initrd contains a statically-linked Guile that directly runs a boot program written in Scheme [5]. The performance-critical parts are the derivation primitives discussed in Section 3. For instance, the computation of Emacs’s derivation involves that of 292 other derivations— that is, 292 invocations of the derivation primitive—corresponding to 582 RPCs6 . The wall time of evaluating that derivation is 1.1 second on average on a 2.6 GHz x86_64 machine. This is acceptable as a user, but 5 times slower than Nix’s clients for a similar derivation written in the Nix language. Profiling shows that Guix spends most of its time in its derivation serialization code and RPCs. We interpret this as a consequence of Guix’s unoptimized code, as well as the difference between native C++ code and our interpreted bytecode. 4.2 Purity Providing pure build environments that do not honor the “standard” file system layout turned out not to be a problem, as already evidenced in NixOS [8]. This is largely thanks to the ubiquity of the GNU build system, which strives to provide users with ways to customize the layout of installed packages and to adjust to the user’s file locations. The only directories visible in the build chroot environment are /dev, /proc, and the subset of /nix/store that is ex6 The number of derivation calls and add-to-store RPCs is reduced thanks to the use of client-side memoization. plicitly declared in the derivation being built. NixOS makes one exception: it relies on the availability of /bin/sh in the chroot [9]. We remove that exception, and instead automatically patch script “shebangs” in the package’s source, as noted in Section 3.4. This turned out to be more than just a theoretical quest for “purity”. First, some GNU/Linux distributions use Dash as the implementation of /bin/sh, while others use Bash; these are two variants of the Bourne shell, with different extensions, and in general different behavior. Second, /bin/sh is typically a dynamically-linked executable. So adding /bin to the chroot is not enough; one typically needs to also add /lib* and /lib/*-linux-gnu to the chroot. At that point, there are many impurities, and a great potential for non-reproducibility—which defeats the purpose of the chroot. Several packages had to be adjusted for proper function in the absence of /bin/sh [6]. In particular, libc’s system and popen functions had to be changed to refer to “our” Bash instance. Likewise, GNU Make, GNU Awk, GNU Guile, and Python needed adjustment. Occasionally, occurrences of /bin/sh are not be handled automatically, for instance in test suites; these have to be patched manually in the package’s recipe. 4.3 Bootstrapping Bootstrapping in our context refers to how the distribution gets built “from nothing”. Remember that the build environment of a derivation contains nothing but its declared inputs. So there’s an obvious chicken-and-egg problem: how does the first package get built? How does the first compiler get compiled? The GNU system we are building is primarily made of C code, with libc at its core. The GNU build system itself assumes the availability of a Bourne shell, traditional Unix tools provided by GNU Coreutils, Awk, Findutils, sed, and grep. Furthermore, our build programs are written in Guile Scheme. Consequently, we rely on pre-built statically-linked binaries of GCC, Binutils, libc, and the other packages mentioned above to get started. Figure 10 shows the very beginning of the dependency graph of our distribution. At this level of detail, things are slightly more complex. First, Guile itself consists of an ELF executable, along with many source and compiled Scheme files that are dynamically loaded when it runs. This gets stored in the guile-2.0.7.tar.xz tarball shown in this graph. This tarball is part of Guix’s “source” distribution, and gets inserted into the store with add-to-store. But how do we write a derivation that unpacks this tarball and adds it to the store? To solve this problem, the guilebootstrap-2.0.drv derivation—the first one that gets built— uses bash as its builder, which runs build-bootstrap-guile.sh, which in turn calls tar to unpack the tarball. Thus, bash, tar, xz, and mkdir are statically-linked binaries, also part of the Guix source distribution, whose sole purpose is to allow the Guile tarball to be unpacked. Once guile-bootstrap-2.0.drv is built, we have a functioning Guile that can be used to run subsequent build programs. Its first task is to download tarballs containing the other pre-built binaries—this is what the .tar.xz.drv derivations do. Guix modules such as ftp-client.scm are used for this purpose. The module-import.drv derivations import those modules in a directory in the store, using the original layout7 . The module-import-compiled.drv derivations compile those modules, and write them in an output directory with the right layout. This corresponds to the #:module argument of build-expression->derivation mentioned in Section 3.2. Finally, the various tarballs are unpacked by the derivations gcc-bootstrap-0.drv, glibc-bootstrap-0.drv, etc., at which point we have a working C GNU tool chain. The first tool that gets built with these tools (not shown here) is GNU Make, which is a prerequisite for all the following packages. Bootstrapping is complete when we have a full tool chain that does not depend on the pre-built bootstrap tools shown in Figure 10. Ways to achieve this are known, and notably documented by the Linux From Scratch project [1]. We can formally verify this no-dependency requirement by checking whether the files of the final tool chain contain references to the /nix/store directories of the bootstrap inputs. Obviously, Guix contains package declarations to build the bootstrap binaries shown in Figure 10. Because the final tool chain does not depend on those tools, they rarely need to be updated. Having a way to do that automatically proves to be useful, though. Coupled with Guix’s nascent support for cross-compilation, porting to a new architecture will boil down to cross-building all these bootstrap tools. 5. RELATED WORK Numerous package managers for Scheme programs and libraries have been developed, including Racket’s PLaneT, Dorodango for R6RS implementations, Chicken Scheme’s “Eggs”, Guildhall for Guile, and ScmPkg [16]. Unlike GNU Guix, they are typically limited to Scheme-only code, and take the core operating system software for granted. To our knowledge, they implement the imperative package management paradigm, and do not attempt to support features such as transactional upgrades and rollbacks. Unsurprisingly, these tools rely on package descriptions that more or less resemble those described in Section 3.3; however, in the case of at least ScmPkg, Dorodango, and Guildhall, package descriptions are written in an external DSL, which happens to use s-expression syntax. In [21], the authors illustrate how the units mechanism of MzScheme modules could be leveraged to improve operating system packaging systems. The examples therein focus on OS services, and multiple instantiation thereof, rather than on package builds and composition. The Nix package manager is the primary source of inspiration for Guix [8, 9]. As noted in Section 2.3, Guix reuses the lowlevel build and deployment mechanisms of Nix, but differs in its programming interface and preferred implementation language for build scripts. While the Nix language relies on 7 In Guile, module names are a list of symbols, such as (guix ftp-client), which map directly to file names, such as guix/ftp-client.scm. tar mkdir glibc-bootstrap-0-guile-builder utils.scm module-import-guile-builder module-import.drv ftp-client.scm download.scm module-import-guile-builder module-import-compiled-guile-builder module-import-compiled.drv guile-2.0.7.tar.xz build-bootstrap-guile.sh bash guile-bootstrap-2.0.drv module-import.drv xz gcc-bootstrap-0-guile-builder module-import-compiled-guile-builder glibc-2.17.tar.xz-guile-builder module-import-compiled.drv glibc-2.17.tar.xz.drv gcc-4.7.2.tar.xz-guile-builder gcc-4.7.2.tar.xz.drv glibc-bootstrap-0.drv gcc-bootstrap-0.drv Figure 10: Dependency graph of the software distribution bootstrap. laziness to ensure that only packages needed are built [9], we instead support ad hoc laziness with the package form. Nix and Guix have the same application: packaging of a complete GNU/Linux distribution. port to Guile had been unmaintained for some time, and Guile has since grown a rich operating system interface on top of which it was easy to build the few additional tools we needed. Before Nix, the idea of installing each package in a directory of its own and then managing symlinks pointing to those was already present in a number of systems. In particular, the Depot [3], Store [2], and then GNU Stow [10] have long supported this approach. GNU’s now defunct package management project called ‘stut’, ca. 2005, used that approach, with Stow as a back-end. A “Stow file system”, or stowfs, has been available in the GNU Hurd operating system core to offer a dynamic and more elegant approach to user profiles, compared to symlink trees. The storage model of Nix/Guix can be thought of as a formalization of Stow’s idea. 6. Like Guix and Nix, Vesta is a purely functional build system [11]. It uses an external DSL close to the Nix language. However, the primary application of Vesta is fine-grain software build operations, such as compiling a single C file. It is a developer tool, and does not address deployment to end-user machines. Unlike Guix and Nix, Vesta tries hard to support the standard Unix file system layout, relying on a virtual file system to “map” files to their right location in the build environment. Hop defines a multi-tier extension of Scheme to program client/server web applications [17]. It allows client code to be introduced (“quoted”) in server code, and server code to be invoked from client code. There’s a parallel between the former and Guix’s use of Scheme in two different strata, depicted in Section 3.2. Scsh provides a complete interface to substitute Scheme in “shell programming” tasks [18]. Since it spans a wide range of applications, it goes beyond the tools discussed in Section 3.4 some ways, notably by providing a concise process notation similar to that of typical Unix shells, and S-expression regular expressions (SREs). However, we chose not to use it as its CONCLUSION GNU Guix is a contribution to package management of free operating systems. It builds on the functional paradigm pioneered by the Nix package manager [8], and benefits from its unprecedented feature set—transactional upgrades and roll-back, per-user unprivileged package management, garbage collection, and referentially-transparent build processes, among others. We presented Guix’s two main contributions from a programming point of view. First, Guix embeds a declarative domain-specific language in Scheme, allowing it to benefit from its associated tool set. Embedding in a general-purpose language has allowed us to easily support internationalization of package descriptions, and to write a fast keyword search mechanism; it has also permitted novel features, such as an on-line auto-updater. Second, its build programs and libraries are also written in Scheme, leading to a unified programming environment made of two strata of code. We hope to make Guix a good vehicle for an innovative free software distribution. The GNU system distribution we envision will give Scheme an important role just above the operating system interface. Acknowledgments The author would like to thank the Guix contributors for their work growing the system: Andreas Enge, Nikita Karetnikov, Cyril Roelandt, and Mark H. Weaver. We are also grateful to the Nix community, and in particular to Eelco Dolstra for his inspiring PhD work that led to Nix. Lastly, thanks to the anonymous reviewer whose insight has helped improve this document. 7. REFERENCES [1] G. Beekmans, M. Burgess, B. Dubbs. Linux From Scratch. 2013. http://www.linuxfromscratch.org/lfs/ . [2] A. Christensen, T. Egge. Store—a system for handling third-party applications in a heterogeneous computer environment. Springer Berlin Heidelberg, 1995, pp. 263–276. [3] S. N. Clark, W. R. Nist. The Depot: A Framework for Sharing Software Installation Across Organizational and UNIX Platform Boundaries. In In Proceedings of the Fourth Large Installation Systems Administrator’s Conference (LISA ’90), pp. 37–46, 1990. [4] R. D. Cosmo, D. D. Ruscio, P. Pelliccione, A. Pierantonio, S. Zacchiroli. Supporting software evolution in component-based FOSS systems. In Sci. Comput. Program., 76(12) , Amsterdam, The Netherlands, December 2011, pp. 1144–1160. [5] L. Courtès. Boot-to-Guile!. February 2013. http://lists.gnu.org/archive/html/bug-guix/201302/msg00173.html . [6] L. Courtès. Down with /bin/sh!. January 2013. https://lists.gnu.org/archive/html/bug-guix/201301/msg00041.html . [7] O. Crameri, R. Bianchini, W. Zwaenepoel, D. Kostić. Staged Deployment in Mirage, an Integrated Software Upgrade Testing and Distribution System. In In Proceedings of the Symposium on Operating Systems Principles, 2007. [8] E. Dolstra, M. d. Jonge, E. Visser. Nix: A Safe and Policy-Free System for Software Deployment. In Proceedings of the 18th Large Installation System Administration Conference (LISA ’04), pp. 79–92, USENIX, November 2004. [9] E. Dolstra, A. Löh, N. Pierron. NixOS: A Purely Functional Linux Distribution. In Journal of Functional Programming, (5-6) , New York, NY, USA, November 2010, pp. 577–615. [10] B. Glickstein, K. Hodgson. Stow—Managing the Installation of Software Packages. 2012. http://www.gnu.org/software/stow/ . [11] A. Heydon, R. Levin, Y. Yu. Caching Function Calls Using Precise Dependencies. In Proceedings of the ACM SIGPLAN 2000 conference on Programming Language Design and Implementation, PLDI ’00, pp. 311–320, ACM, 2000. [12] P. Hudak. Building domain-specific embedded languages. In ACM Computing Surveys, 28(4es) , New York, NY, USA, December 1996, . [13] R. Kelsey. Defining Record Types. 1999. http://srfi.schemers.org/srfi-9/srfi-9.html . [14] R. Kelsey, M. Sperber. Conditions. 2002. http://srfi.schemers.org/srfi-35/srfi-35.html . [15] T. Morris. Asymmetric Lenses in Scala. 2012. http://days2012.scala-lang.org/ . [16] M. Serrano, É. Gallesio. An Adaptive Package Management System for Scheme. In Proceedings of the 2007 Symposium on Dynamic languages, DLS ’07, pp. 65–76, ACM, 2007. [17] M. Serrano, G. Berry. Multitier Programming in Hop. In Queue, 10(7) , New York, NY, USA, July 2012, pp. 10:10–10:22. [18] O. Shivers, B. D. Carlstrom, M. Gasbichler, M. Sperber. Scsh Reference Manual. 2006. http://www.scsh.net/ . [19] M. Sperber, R. K. Dybvig, M. Flatt, A. V. Straaten, R. B. Findler, J. Matthews. Revised6 Report on the Algorithmic Language Scheme. In Journal of Functional Programming, 19, 7 2009, pp. 1–301. [20] R. M. Stallman. The GNU Manifesto. 1983. http://www.gnu.org/gnu/manifesto.html . [21] D. B. Tucker, S. Krishnamurthi. Applying Module System Research to Package Management. In Proceedings of the Tenth International Workshop on Software Configuration Management, 2001.
6cs.PL
arXiv:cs/0311023v1 [cs.PL] 17 Nov 2003 AADEBUG2003 247 The Chameleon Type Debugger (Tool Demonstration) Peter J. Stuckey∗,1 , Martin Sulzmann†,2 , Jeremy Wazny∗,3 ∗ Department of Computer Science and Software Engineering, University of Melbourne, 3100, Australia School of Computing, National University of Singapore S16 Level 5, 3 Science Drive 2, Singapore 117543 † ABSTRACT In this tool demonstration, we give an overview of the Chameleon type debugger. The type debugger’s primary use is to identify locations within a source program which are involved in a type error. By further examining these (potentially) problematic program locations, users gain a better understanding of their program and are able to work towards the actual mistake which was the cause of the type error. The debugger is interactive, allowing the user to provide additional information to narrow down the search space. One of the novel aspects of the debugger is the ability to explain erroneous-looking types. In the event that an unexpected type is inferred, the debugger can highlight program locations which contributed to that result. Furthermore, due to the flexible constraint-based foundation that the debugger is built upon, it can naturally handle advanced type system features such as Haskell’s type classes and functional dependencies. KEYWORDS : 1 debugging; types Introduction Reporting meaningful type error messages is a notoriously difficult problem for strongly typed languages. Messages are often obscure and don’t always indicate the actual source of the problem. Beginners in particular, often have difficulty locating type errors. In the case of languages with a powerful type system such as Haskell [Has], even experienced programmers can not always easily identify the source of the error. Chameleon is a Haskell-style language. The Chameleon system [SW] provides an interactive type debugging environment. In the event of a type error or unexpected result, the system automatically highlights the (possibly) erroneous program locations involved. The type debugger is also able to deal with Haskell-style overloading [WB89] and its various extensions [Jon00, JJM97]. We refer to [SSW03], for a detailed account of the methods and techniques employed and a broader comparison to related work. For the purpose of this paper, we restrict our attention to a few examples to highlight the main aspects of the Chameleon type debugger. In M. Ronsse, K. De Bosschere (eds), proceedings of the Fifth International Workshop on Automated Debugging (AADEBUG 2003), September 2003, Ghent. COmputer Research Repository (http://www.acm.org/corr/), cs.SE/yymmnnn; whole proceedings: cs.SE/0309027. 1 E-mail: [email protected] 2 E-mail: [email protected] 3 E-mail: [email protected] Fifth Int. Workshop on Automated and Algorithmic Debugging 248 PETER J. STUCKEY, ET AL. 2 The Type Debugger 2.1 Overview We present an example of a simple debugging session, which illustrates the Chameleon type debugger in action. Example 1 This program is supposed to print a graph of a mathematical function on the terminal. The plot function takes as arguments: a) the function to plot, b) the width of each terminal character, c) the height of each character, and d) the vertical distance (in characters) of the origin from the top of the screen. plot f dx dy oy = let fxs = getYs f dx ys = map (\y-> fromIntegral (y-oy)*dy) [maxY,maxY-1..minY] rows = map (doRow fxs) ys in unlines rows where doRow [] r = "" doRow (y:ys) r = (if y < r && y > (r-dy) then ’*’ else ’ ’) : doRow r ys getYs f dx = [ f ((centre x * dx)) | x <- [minX..maxX] ] where centre = (+) .5 minX maxX minY maxY = = = = 0 79 0 19 Curious to see some functions plotted, we load this program in Hugs and are met with the following: ERROR "plot.hs":13 - Type error in function binding ** ** ** ** Term : Type : Does not match : Because : doRow [[a]] -> [a] -> [Char] [a] -> [[a]] -> String unification would give infinite type We launch the Chameleon type debugger, and ask for the type of doRow. Note we use the syntax ; to refer to local definitions of plot. Note also that in Haskell systems typically it is impossible to examine the types of local variables. plot.hs> :type plot;doRow type error - contributing locations doRow (y:ys) r = (if y < r && y > r - dy then ’*’ else ’ ’) : doRow r ys We see that doRow’s first argument is the pattern (y:ys) whereas in the body of the definition, it is first applied to r. This is a problem since the function < equates the types of r and y, and yet by reversing the order of doRow’s arguments we are also equating the types of r and ys. This is the source of the "infinite type" error message we saw earlier. To resolve this problem we simply reorder the arguments in the recursive call. The new clause is: doRow (y:ys) r = (if y < r && y > (r-dy) then ’*’ else ’ ’) : doRow ys r Having fixed this bug, we return to Hugs, and attempt to load the corrected program. Hugs reports the following: Fifth Int. Workshop on Automated and Algorithmic Debugging THE CHAMELEON TYPE DEBUGGER (TOOL DEMONSTRATION) 249 ERROR "plot.hs":19 - Illegal Haskell 98 class constraint in inferred type ** Expression: getYs ** Type : (Num (a -> a), Num a, Num (Integer -> a)) => ((a->a)->b) -> (a->a) -> [b] We need to find out where these strange constraints are coming from in the defintion of getYs. The explain command allows us to ask why a variable or expression has a type of a particular form. Note that we can write _ to stand for types we are not interested in. plot.hs> :explain (plot;getYs) ((Num (Integer -> _)) => _) getYs f dx = [ f ((centre x * dx)) | x <- [minX..maxX] ] The problem appears to be the interaction between the centre function and the elements from the list being generated. The list must be responsible for the presence of the Integer type. We continue by scrutinising centre, first examining its type and then asking why it is functional. plot.hs> :type plot;getYs;centre (Num(b),Num(a -> b)) => a -> b -> b plot.hs> :explain (plot;getYs;centre) _ -> _ -> _ centre = (+) . 5 The source of the error suddenly becomes clear. It was our intention that the expression .5 be a floating point number. In fact, the . is parsed as a separate identifier - the function composition operator. The fix is to rewrite this as a floating point value that Haskell will understand as such. The corrected definition of centre is: centre = (+) 0.5 Relieved that these two bugs are fixed, we return to Hugs to plot some curves, and are faced with the following. ERROR "plot.hs":8 - Instance of Fractional Integer required for definition of plot We will begin with rows, since we know that unlines, a standard Haskell function, can’t have caused this problem. The explain command will be useful in finding out which part of the program is responsible for this constraint. We work our way towards the problem from the top down. plot.hs> :explain (plot;rows) ((Fractional Integer) => _) rows = map (doRow fxs) ys plot.hs> :explain (plot;fxs) ((Fractional Integer) => _) fxs = getYs f dx plot.hs> :explain (plot;getYs) ((Fractional Integer) => _) getYs f dx = [ f ((centre x * dx)) | x <- [minX..maxX] ] The problem seems to be the interaction between centre and x. plot.hs> :type plot;getYs;centre Fractional a => a plot.hs> :type plot;getYs;x Integer Indeed this is the source of the mistake. The centre function expects Floating values, whereas the elements generated from the list are Integers. We will convert these Integers to the appropriate numeric type with the standard Haskell function fromIntegral. The corrected definition of getYs follows. Fifth Int. Workshop on Automated and Algorithmic Debugging 250 PETER J. STUCKEY, ET AL. getYs f dx = [ f ((centre (fromIntegral x) * dx)) | x <- [minX..maxX] ] where centre = (+) 0.5 With this last correction made, we reload Hugs, and are relieved to find that our program is now accepted. The following subsections broadly outline the type debugger’s key features. See Appendix A for a brief summary of all the debugger’s commands. 2.2 Type Error Explanation The Chameleon type debugger primarily serves to direct users toward the source of type errors within their programs. Thus, it would mostly be invoked when a type error is already known to be present within a program. Most traditional type checking/inference algorithms work by traversing a program’s abstract syntax tree, gathering type information as they proceed. As soon as some contradictory type information is encountered, they terminate with an error message. This message usually indicates that the location of the error is the site in the program that was last visited. In fact, typically we are more interested in uncovering all of the sites which contribute to the type error - since any of those could be the actual source of the error. The Chameleon type debugger reports errors by highlighting all source locations which contribute to an error. The system underlines a minimal set of program locations which lead to a type error. There may be multiple such sets - for reasons of efficiency, only one set is found. In Section 2.5 we show that despite this, the debugger can also underline the program locations that are common to all possible error reports. Example 2 Consider the following simple program. f g x y = (g (if x then x else y), g "abc") Hugs reports: ERROR "realprog.ch":1 - Type error in application ** Expression : g (if x then x else y) ** Term : if x then x else y ** Type : Bool ** Does not match : [Char] This indicates that the type Bool was inferred for the if-then-else expression, whereas a [Char ] was expected, and required. Why that is the case is left unknown to the programmer. In Chameleon we can ask the system for the inferred type of some function f using the command :type f . If the function has no type (contains a type error), then an explanation in terms of locations that contribute to the error. Using the Chameleon debugger, on the example above: realprog.ch> :type f f g x y = (g (if x then x else y), g "abc") The underlined locations are those which are implicated in the error. There is no attempt to identify any specific location as the "true" source of the error. No claim is made that the if-then-else expression must have type [Char ]. The source of all the conflicting types is highlighted and it is up to the user to decide where the actual error is. It may be that for this particular program, the mistake was in applying g to a [Char ]—a possibility that the Hugs message ignores. The obvious drawback of this approach to error reporting is its dependence on the user to properly interpret the effect of each location involved. Indeed, it may not always be clear why some location contributes to the type error. Fifth Int. Workshop on Automated and Algorithmic Debugging THE CHAMELEON TYPE DEBUGGER (TOOL DEMONSTRATION) 251 Of course, the user is free to follow up his initial query with additional commands to further uncover the types within the program - but this may be tedious to do repeatedly since it’s the user’s responsibility to make sense of all those individual queries. Future work will be directed toward improving the style of type error reports. 2.3 Local/Global Explanation Put simply, the Chameleon type debugger works by generating constraints on the types of variables in a program. Type inference is then a matter of solving those constraints. The more constraints that are involved, the slower this process may be. In general, the number of constraints present is proportional to the size of the call graph in a definition. To reduce the amount of overhead, we provide two distinct reporting modes: local and global. In the local mode, we restrict error/type explanations to locations within a single definition. The consequence of this is that we are then free to simplify the constraints which arises from outside of this definition. Example 3 Consider the following simple program which is supposed to model a stack data structure using a list. idStack stk = pop (push undefined stk) push top stk = (top:stk) pop (top,stk) = stk empty = [] There’s obviously a problem here. Upon launching the debugger in local mode (the default), the following is reported: type error - contributing locations: idStack stk = pop (push undefined stk) We then examine both of the culpable functions. stack.hs> :type push a -> [a] -> [a] stack.hs> :type pop (a,b) -> b The error is revealed. In the definition of idStack, push returns a list, where pop expects a pair. In the global explanation mode, we place no restrictions on the locations which can be highlighted. Since we no longer restrict ourselves to any particular locations, we can no longer simplify away any of the constraints involved. Example 4 We return to the previous example, but this time we use the global explanation mode. stack.hs> :set global stack.hs> :type idStack type error - contributing locations: idStack stk = pop (push undefined stk) push top stk = (top:stk) pop (top,stk) = stk In this mode, all program locations contributing to the error are revealed immediately. In this case, the conflict between the list and pair is immediately revealed. Fifth Int. Workshop on Automated and Algorithmic Debugging 252 PETER J. STUCKEY, ET AL. 2.4 Type Explanation It’s possible to write a function which, though well-typed, does not have the type that was intended. A novel feature of our debugger is its ability to explain such unexpected types. The command :explain (e) (D ⇒ t) asks the system to underline a set of locations which force expression e to have type of the form D ⇒ t. As is the case for type errors, explanations consist of references to the responsible source locations. Type explanations are particularly useful for explaining errors involving malformed type class constraints. A typical type error message would merely complain about the existence of such a constraint, without providing any information to further investigate the problem. Example 5 The following program scales all elements of a list, such that the biggest element becomes 1. It contains a type class error. normalize xs = scale biggest xs scale x ns = map (/x) ns biggest (x:xs) = max x xs where max x [] = x max x (y:ys) | y > x = max y ys | otherwise = max x ys Hugs reports the following: ERROR "normalize.hs":1 - Illegal Haskell 98 class constraint in inferred type ** Expression : normalize ** Type : (Fractional ([a] -> a), Ord a) => [[a] -> a] -> [[a] -> a] The problem is that, in Haskell, type class constraints must be of form C a, where a is a type variable. The inferred constraint, Fractional ([a] → a), obviously violates this condition. To solve this problem, we’ll need to know why Fractional ’s argument is a function. Since this is a fairly compact program, we will use the debugger in global mode. We proceed as follows. normalize.hs> :set global normalize.hs> :explain (normalize) ((Fractional ([_] -> _)) => _) normalize xs = scale biggest xs scale x ns = map (/x) ns biggest (x:xs) = max x xs where max x [] = x max x (y:ys) | y > x = max y ys | otherwise = max x ys It should be clear that the F ractional constraint arises from the use of / in the definition of scale. We also see from the above exactly where that the list type comes from the pattern in biggest. This indicates that the use of biggest hasn’t been fully applied in normalize. The following corrected version of normalize will work as intended. normalize xs = scale (biggest xs) xs 2.5 Most-Likely Explanations Since it is technically infeasible to present all explanations for a particular type error or :explain query, the debugger will, by default, only display one. However, in the case where the intersection of all explanations is non-empty, it is also possible to cheaply identify the common program locations. This information is useful since in most cases it would be reasonable to assume that locations which are involved in more errors are more likely to be the real cause of the problem. Indeed fixing a location involved in all errors will immediately resolve them all. If the debugger finds that there is a common subset of all errors, it will automatically report it, along with a specific error. Fifth Int. Workshop on Automated and Algorithmic Debugging THE CHAMELEON TYPE DEBUGGER (TOOL DEMONSTRATION) 253 Example 6 Consider the following program. merge takes two sorted lists as arguments and combining all elements, returns a single sorted list. merge [] ys = ys merge xs [] = [xs] merge (x:xs) (y:ys) | x < y = [x] ++ merge xs (y:ys) | otherwise = [y] ++ merge (x:xs) ys This program contains a type error. Loading it into the debugger, we get the following error report. type error - conflicting locations: merge [] ys = ys merge xs [] = [xs] merge (x:xs) (y:ys) | x < y = [x] ++ merge xs (y:ys) | otherwise = [y] ++ merge (x:xs) ys locations which appear in all conflicts: merge [] ys = ys merge xs [] = [xs] merge (x:xs) (y:ys) | x < y = [x] ++ merge xs (y:ys) | otherwise = [y] ++ merge (x:xs) ys The first display of the program above is a typical debugger error report. A single error is reported and all responsible program locations are highlighted. The second program printout indicates those locations which appear in all errors. Note that these locations do not themselves constitute a type error. An actual error occurs when these locations are considered alongside (either of) the recursive calls to merge in the third clause. Nevertheless, this provides us a view of the mostly likely source of error, and makes clearer the mistake in this program. 2.6 Type Inference for Arbitrary Locations Most existing interpreters/programming environments for Haskell, for example Hugs[HUG] and GHCi[GHC], allow users to ask for the type of variables in their program. These systems, however, restrict queries to variables bound at the top level of their program. It is not possible for users to inquire about the types of variables bound within a let or where clause. This can be frustrating since, in order to allows inference for those definitions, programs need to be modified, lifting subdefinitions to the top level. Furthermore, these systems restrict type queries to programs which are well-typed. Obviously this is of little help when debugging a program, since it must somehow be made typeable while maintaining the essence of the error - for example by replacing expressions with calls to undefined. By contrast, the Chameleon type debugger allows users to infer types of arbitrary variables and expressions within a program, regardless of whether it is typeable. Example 7 Consider the following program, where most of the work is being done in a nesteddefinition. reverse = rev [] where rev rs [] = rs rev rs (x:xs) = rev (x ++ rs) xs We run the debugger as follows: reverse.hs> :type reverse [[a]] -> [a] Fifth Int. Workshop on Automated and Algorithmic Debugging 254 PETER J. STUCKEY, ET AL. Since the problem is mostly due to the definition of rev, we continue by examining the type of rev. We can refer to nested bindings, like rev, via their enclosing binding by separating their names with ;s. We can refer to a specific clause of a definition by following it with a ; and the number of the clause. Otherwise, by default, the reference is to the entire declaration, including all clauses. reverse.hs> :type reverse;rev [a] -> [[a]] -> [a] reverse.hs> :type reverse;rev;1 a -> [b] -> a reverse.hs> :type reverse;rev;2 [a] -> [[a]] -> b We see above that the second clause of rev introduces the erroneous [[a]] type. Having narrowed our search to an easily digestible fraction of the original code, we proceed as follows: reverse.ch> :explain (reverse;rev;2) (_ -> [[_]] -> _) rev rs (x:xs) = rev (x ++ rs) xs Certainly, a text-based interface places restrictions on how easily one may refer to arbitrary program fragments, however this merely a limitation of the current debugger implementation. In principle, we feel that the ability to infer types anywhere within any program is of invaluable benefit when debugging type errors. 2.7 Source-Based Debugger Interface Being interactive, the debugger’s text-based interface provides users with immediate feedback which they can use to iteratively work their way toward the source of a type error. Although flexible, such an interface can at times be slightly stifling and a distraction from the source code being edited separately by the programmer. As an alternative, we allow programmers to pose debugger queries directly in their program’s source. The command ‘:type e’, where e is an expression, can be written directly in the program as e::?. Also, :explain (e) (D ⇒ t), where e is an expression and D ⇒ t is a type scheme, can be expressed as e::?t within the program itself. As well as individual expressions, entire declarations can be queried by writing such a command at the same scope (with a declaration name in place of an expression.) The debugger responds to these embedded commands by collecting and processing them in textual order. They do not otherwise affect the working of the compiler, and do not change the meaning of programs they are attached to. Example 8 Returning to Example 3, we modify it by adding a type query to the expression in the body of idStack, and attempt a re-compile. idStack stk = (pop (push undefined stk)) ::? push top stk = (top:stk) pop (top,stk) = stk empty = [] Compilation would still fail, but the Chameleon system would print the following before stopping: type error - contributing locations: idStack stk = pop (push undefined stk) We continue by further modifying the program, adding additional queries, and re-running the compiler. In the following version we have attached type queries to the definitions of push and pop. Fifth Int. Workshop on Automated and Algorithmic Debugging THE CHAMELEON TYPE DEBUGGER (TOOL DEMONSTRATION) 255 idStack stk = pop (push undefined stk) push ::? push top stk = (top:stk) pop ::? pop (top,stk) = stk empty = [] This time, the system would respond to our commands as follows. push :: a -> [a] -> [a] pop :: (a, b) -> b 3 Type Class Extensions A strength of our system is that it supports almost arbitrary type class extensions. This is made possible through Chameleon’s extensible type system [SS02]. In Chameleon, one can specify type extensions by providing additional constraint rules. Such rules take effect during constraint solving (type inference.) These rules introduce new constraints, which can be used to enforce additional restrictions on types. One use is to encode Haskell-style functional dependencies. Example 9 Consider the following type class definition. class Collect a b where empty :: b insert :: a -> b -> b member :: a -> b -> Bool As defined this class is flawed. The type of empty :: Collect a b => b is ambiguous, since type variable a appears only in the constraint component. This poses a problem when running a particular use of empty, since it is not clear which instance it represents. Functional dependencies allow us to overcome this problem, by relating the type class variables in a specific way. We are able to state that b functionally determines a. Though not part of Haskell 98, Hugs [HUG] and GHC [GHC] both support functional dependencies. In either of these systems, the functional dependency can be stated as so: class Collect a b | b -> a where ... The same functional dependency can be expressed in Chameleon via the rule: rule Collect a b, Collect a’ b =⇒ a = a’ This states that if we have to Collect constraints with the same second argument, then their first argument must also be the same. Consider the following program which tries to check if a Float is a member of a collection of Ints. f g x y = if member (x::Float) (insert (1::Int) y) then g x else y The constraints for f imply Collect Int t and Collect Float t. This allows firing of the rule representing the functional dependency adding the information that Int = F loat, causing a type error. Note that our standard error reporting mechanism will still work in the presence of arbitrary rules, and will report the following: collect.ch> :type f type error - contributing locations f g x y = if member (x::Float) (insert (1::Int) y) then g x else y rule(s) involved: Collect a b, Collect a’ b ==> a = a’ Fifth Int. Workshop on Automated and Algorithmic Debugging 256 PETER J. STUCKEY, ET AL. Rules can be written to enforce other arbitrary conditions. Example 10 Consider f x y = x / y + x ‘div‘ y The inferred type is f :: (Integral a, Fractional a) => a -> a -> a. This is obviously not satisfiable, though it will not immediately cause an error. To address this issue, we can impose the following rule. rule Integral a, Fractional a ==> False This rule essentially states that we do not allow the same type, a, to both an instance of Integral and Fractional. In terms of the constraints we generate during type inference, it means we would add the always-false constraint whenever this condition arises - causing the process to fail with a type error. In the case of the above example, adding this rule will case the Chameleon debugger to report the following. div.ch> :t f type error - contributing locations: f x y = x / y + x ‘div‘ y rule(s) involved: Integral a, Fractional a ==> False 4 Related and Future Work In recent years, there has been an increasing awareness of the limitations of traditional inference algorithms when it comes to type error reporting. Various strategies have been proposed to improve the usefulness of type error messages and aid the programmer in debugging type errors. These include things like: alternative inference algorithms, error explanation systems, and interactive type explanation tools. Error explanation systems allow the user to examine the process by which specific types are inferred for program variables [DB96, BS93]. Most work by recording the effect of the inference procedure at each step. In this way a complete history of the process can be built up. One unfortunate shortcoming of such systems is the typically large size of of explanations. This occurs since, although all steps are recorded, not all are of interest to the user when investigating a specific type. Also, since such systems are layered on top of an existing inference algorithm, they suffer from the same left-to-right bias when discovering errors. The Chameleon approach is to map the typing problem to a constraint solving problem, and determine minimal systems of constraints (and corresponding program locations) which cause errors or types. Independently Haack and Wells [HW03] use a similar approach to explain type errors, though their system does not apply to Haskell style overloading which makes its usefulness limited for Haskell debugging. Interactive tools exist which assist the user to find type errors manually [HCS00, Chi01]. These essentially allow one to uncover the type of any program location. Through examination of the types of subexpressions, the user gradually works towards the source of the error. Identifiers with suspicious looking types are followed to their definition and further examined. This approach to debugging is similar to that currently supported by the Chameleon type debugger, but is generally much more limited. None of these allow for quick and efficient identification of conflicting program locations; the process is manually directed at every step. Furthermore, none of them allow the user to immediately locate precisely those sites which contribute to some suspicious looking type. Our type debugging tool is flexible enough to allow both a user-directed examination of the program’s types as well as provide useful, succinct advice to direct the user’s search. In principal, a declarative debugging-style interface to our debugger could be designed to emulate the aforementioned systems. Fifth Int. Workshop on Automated and Algorithmic Debugging THE CHAMELEON TYPE DEBUGGER (TOOL DEMONSTRATION) 257 Helium[Hel] is a language and compiler designed to be similar to Haskell, with the aim of providing superior error messages for beginners. Based on a database of common mistakes, the system can provide additional hints to users, suggesting improvements that are likely to correct the program. By contrast, the Chameleon type debugger makes little effort in presenting its diagnostic information, beyond highlighting the sites that are involved. To remedy this, we hope to apply similar strategies to those found in Helium. Our belief is that the two forms of error reporting strongly reinforce each other. A well-focused error message provides a good starting point, while highlighted program locations lead the user towards sites worth exploring . Work remains to make the debugger easier to use, both in terms of its interface and functionality. We intend to expand the debugger’s error reporting capability to provide better type and error explanations, as well as improved error messages in general. Currently our approach to inferring types in the presence of errors is fairly limited. In future work we plan to extend the debugger so that it reports a strongest possible type, given all errors it is involved in. This would further support our efforts to provide improved diagnostic information to users, since we might be able to suggest minimal program fixes which resolve all type errors. The current system is limited to finding a single type error in a definition. This limitation is unfortunately necessary, since the task of finding all errors is computationally expensive (although see [GSW03]). In the case of multiple errors, one is chosen arbitrarily. The choice is a consequence of the implementation of the underlying algorithms. It may be possible in future, to arrange things so that more likely errors are discovered preferentially. For example, we may be possible to discover errors amongst closely situated locations, before those involving quite distant program sites. 5 Conclusion The problem of diagnosing type errors can be quite difficult, particularly for beginning programmers. Traditional inference algorithms give rise to error messages which can be difficult to interpret at times, and occasionally even misleading. The Chameleon type debugger is an interactive system which allows users to examine their programs’ types in detail. The debugger supports: inference of types for arbitrary locations, error explanations outlining all locations involved, explanation of suspicious-looking types, and more. It is unique in that it supports all Haskell type system features. The debugger’s error reporting mechanism is still fairly basic, though future work will focus on making the most of improving the system in this regard. References [BS93] M. Beaven and R. Stansifer. Explaining type errors in polymorphic languages. In ACM Letters on Programming Languages, volume 2, pages 17–30, December 1993. [Chi01] O. Chitil. Compositional explanation of types and algorithmic debugging of type errors. In Proc. of ICFP’01, pages 193–204. ACM Press, 2001. [DB96] D. Duggan and F. Bent. Explaining type inference. Science of Computer Programming, 27(1):37–83, 1996. [GHC] Glasgow haskell compiler home page. http://www.haskell.org/ghc/. [GSW03] M. García de la Banda, P.J. Stuckey, and J. Wazny. Finding all minimal unsatisfiable subsets. In D. Miller, editor, Proceedings of the Fifth ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, page to appear. ACM Press, 2003. [Has] Haskell 98 language report. http://research.microsoft.com/Users/simonpj/haskell98revised/haskell98-report-html/. Fifth Int. Workshop on Automated and Algorithmic Debugging 258 PETER J. STUCKEY, ET AL. [HCS00] F. Huch, O. Chitil, and A. Simon. Typeview: a tool for understanding type errors. In M. Mohnen and P. Koopman, editors, Proceedings of 12th International Workshop on Implementation of Functional Languages, pages 63–69. Aachner Informatik-Berichte„ 2000. [Hel] Helium home page. http://www.cs.uu.nl/~afie/helium/. [HUG] Hugs home page. haskell.cs.yale.edu/hugs/. [HW03] C. Haack and J. B. Wells. Type error slicing in implicitly typed, higher-order languages. In Proc. of ESOP’03, volume 2618 of LNCS, pages 284–301. Springer-Verlag, 2003. [JJM97] S. Peyton Jones, M. P. Jones, and E. Meijer. Type classes: an exploration of the design space. In Haskell Workshop, June 1997. [Jon00] M. P. Jones. Type classes with functional dependencies. In Proc. of the 9th European Symposium on Programming Languages and Systems, ESOP 2000, volume 1782 of LNCS. Springer, March 2000. [SS02] P. J. Stuckey and M. Sulzmann. A theory of overloading. In Proc. of ICFP’02, pages 167–178. ACM Press, 2002. [SSW03] P.J. Stuckey, M. Sulzmann, and J. Wazny. Interactive type debugging in Haskell. In Proceedings of the Haskell Workshop, page to appear, 2003. [SW] M. Sulzmann and J. Wazny. Chameleon. http://www.comp.nus.edu.sg/~sulzmann/chameleon. [WB89] P. Wadler and S. Blott. How to make ad-hoc polymorphism less ad-hoc. In Proc. of POPL’89, pages 60–76. ACM Press, 1989. A Summary of Debugger Commands The debugger supports the following commands. :type <expression> Infers and displays the type of the given expression. In the event of an error, highlights contributing locations. :explain (<expression>) (<type>|<typescheme>) Explains why the given expression has a type that is an instance of the given type. Contributing locations are highlighted. :declare (<reference>) (<type>|<typescheme>) Declares that the referred-to definition has the nominated type. This declaration is internal to the debugger, and does not affect the program source. :print Displays the loaded source program. :set <flag> Configures the debugger by setting internal options. Available flags include: global Selects global type/error explanations. local Selects local type/error explanations. solver ? Selects the version of the internal constraint solver to use. The available values are 0, 1 and 2. Higher numbers lead to more thorough explanations, but involve slower solvers. :help Prints command help. :quit Quits the debugger. Fifth Int. Workshop on Automated and Algorithmic Debugging
6cs.PL
arXiv:1803.09362v1 [cs.SY] 25 Mar 2018 PI Consensus Error Transformation for Adaptive Cooperative Control of Nonlinear Multi-Agent Systems Haris E. Psillakis National Technical University of Athens H. Polytechniou 9, 15780 Athens, Greece [email protected] Abstract A solution is provided in this note for the adaptive consensus problem of nonlinear multi-agent systems with unknown and non-identical control directions assuming a strongly connected underlying graph topology. This is achieved with the introduction of a novel variable transformation called PI consensus error transformation. The new variables include the position error of each agent from some arbitrary fixed point along with an integral term of the weighted total displacement of the agent’s position from all neighbor positions. It is proven that if these new variables are bounded and regulated to zero, then asymptotic consensus among all agents is ensured. The important feature of this transformation is that it provides input decoupling in the dynamics of the new error variables making the consensus control design a simple and direct task. Using classical Nussbaum gain based techniques, distributed controllers are designed to regulate the PI consensus error variables to zero and ultimately solve the agreement problem. The proposed approach also allows for a specific calculation of the final consensus point based on the controller parameter selection and the associated graph topology. Simulation results verify our theoretical derivations. 1 1 Introduction Cooperative control has received growing interest among researchers over the last decades with applications in several areas including spacecraft formation flying, sensor networks, and cooperative surveillance [1], [2]. Consensus is an important and fundamental problem within the field of cooperative control aiming to design distributed control algorithms using only local information to ensure that the agents reach an agreement on certain variables of interest [3], [4]. Detailed literature reviews on the subject can be found in the works [5, 6, 7, 8, 9]. In some applications [10], [11] the control directions might not be known a priori. R. Nussbaum in the seminal paper [12] proposed a class of nonlinear control gains to resolve this issue. Since then, the so called Nussbaum gain technique has been successfully applied and generalized to different system classes [13, 14, 15, 16, 17, 18, 19]. The last few years the cooperative control of multi-agent systems with unknown control directions has been under research. Chen et al. [20] considered the adaptive consensus of first-order and second-order agents with unknown identical control directions using a novel Nussbaum function. The consensus control problem with unknown identical control directions was also addressed later in [21] using delayed inputs and switching functions, in [22] for higher-order integrators and in [23] for nonlinear systems. The unknown identical control directions assumption was relaxed in [24] and [25] for agent networks having a leader. Nussbaum functions were also employed for unknown identical and non-identical control directions in [26, 27, 28, 29] in the framework of cooperative output regulation with the exosystem having the leader role. For leaderless networks, Peng and Ye [30] removed this assumption but only for single-integrator systems without nonlinearities. Also, in [31], the same problem was investigated under switching topologies using the nonlinear PI method [32, 33]. Recently in [34], Chen et al. generalized the results of [20] to nonlinear systems with partially unknown control directions using a novel Nussbaum function. However, as stated in the conclusion of [34] the adaptive consensus problem with completely unknown non-identical control directions by using the Nussbaum function based approach is still an interesting open issue for further research. In this paper we provide a solution to the above problem using a different line of attack. We introduce a state transformation into the so called PI 2 consensus error variables that include the position error of each agent from some arbitrary fixed point along with an integral term of the weighted total displacement between the agent’s position and all neighbor positions (consensus error). It is proven that if the new variables are bounded and converge towards zero then asymptotic consensus among all agents is ensured. The important feature of this transformation is that it provides input decoupling in the dynamics of the new error variables making the consensus control design a simple and direct task. Applying the proposed transformation and using standard Nussbaum gain techniques we obtain a straightforward solution for the unsolved problem of adaptive consensus for nonlinear systems with unknown and non-identical control directions. The rest of this paper is organized as follows. In Section 2, some preliminaries on graph theory and Nussbaum functions are recalled. Also, the adaptive consensus design problem of this work is formulated. In Section 3, we propose the new PI consensus error transformation and prove the key lemma motivating its use. Adaptive consensus designs are given for first and second-order nonlinear agent models with unknown and non-identical control directions in Section 4. In Section 5, the obtained results are verified by a simulation example. Finally, some concluding remarks are given in Section 6. 2 2.1 Preliminaries Graph Theory In what follows, we revisit basic definitions from graph theory [5, 6, 7, 8]. A directed graph is denoted by G = (V, E, A) where V = {v1 , v2 , . . . , vN } represents the nonempty set of nodes and E ⊆ V × V is the set of edges. Matrix A = [aij ] ∈ RN ×N is called the adjacency matrix and the element aij represents the coupling strength of edge (j, i) with aij > 0 if (j, i) ∈ E and aij = 0 otherwise. The set of neighbors of i-th agent is then defined P by Ni = {j ∈ V : (j, i) ∈ E}. Let di = N j=1 aij be the in-degree of vertex i, and denote D = diag {d1 , . . . , dN } the in-degree matrix. Then the Laplacian matrix is defined as L = D − A. The directed path with length l is defined with a sequence of edges in the form ((i1 , i2 ) , (i2 , i3 ) , . . . , (il , il+1 )) where (ij , ij+1) ∈ E for j = 1, . . . , l and ij 6= ik for j, k = 1, . . . , l and j 6= k. If there exists a directed path between any two distinct nodes in directed graph G, 3 the graph is said to be strongly connected. A strongly connected graph has a simple zero eigenvalue associated with right eigenvector 1 := [1, 1, · · · , 1]T and left eigenvector ω := [ω1 ,P ω2 , · · · , ωN ]T where ωi are positive real numbers (Corollary 3.2 of [35]) with N i=1 ωi = 1. All other eigenvalues of L have positive real parts for a strongly connected graph. Thus, L admits the following Jordan decomposition   T    D 0 V = UDV T (1) L= U 1 ωT 0 0 where D is a (N − 1) × (N − 1) upper triangular matrix that includes all Jordan blocks related to the N − 1 eigenvalues of L with positive real part. U, V ∈ CN ×(N −1) are matrices with columns the right and left eigenvectors related to these eigenvalues respectively. Then, for the exponential matrix eLt it holds true that eLt = UeDt V T + 1ω T . (2) 2.2 Nussbaum functions Definition 1. [12] The function N (·) is called a Nussbaum-type function if it has the following properties:   R   limk→∞ sup 1 k N (τ ) dτ = +∞   kR 0 (3)  limk→∞ inf 1 k N (τ ) dτ = −∞ k 0 2 Commonly used Nussbaum-type functions include ek cos(πk/2), k 2 sin(k) and k 2 cos(k) among others. In this paper, we choose an even smooth Nussbaum function N(k) = k 2 cos(k). The following lemma is central in the analysis of Nussbaum control schemes. Lemma 1. [13] Let V (·) and k(·) be smooth functions defined on [0, tf ) with V (t) ≥ 0 ∀t ∈ [0, tf ), N(·) be an even smooth Nussbaum-type function, and θ0 be a nonzero constant. If the following inequality holds: Z t V (t) ≤ (θ0 N(k(τ )) + 1)k̇(τ )dτ + c, ∀t ∈ [0, tf ) (4) 0 where c ∈ R is a constant, then V (t), k(t) and must be bounded on [0, tf ). 4 Rt 0 (θ0 N(k(τ )) + 1)k̇(τ )dτ 2.3 Problem formulation The nonlinear agent models of [20] are considered in this work. We assume either N first-order agents with state xi ∈ R and dynamics ẋi = bi ui + θiT φi (xi ), i = 1, 2, . . . , N, (5) or N second-order agents with position xi ∈ R, velocity vi ∈ R and dynamics  ẋi = vi , i = 1, 2, . . . , N, (6) · vi = bi ui + θiT φi (xi , vi ) where ui ∈ R is the control input and bi ∈ R is the high frequency gain. Function φi : R → Rℓi for first-order agent model (φi : R × R → Rℓi for second-order agent model) is a known regressor vector of agent smooth nonlinearities and θi ∈ Rℓi is an unknown parameter vector. Assumption 1. The control gains bi , i = 1, 2, . . . , N are unknown and nonzero constants. Remark 1. The assumption bi 6= 0 for all i = 1, 2, . . . , N is necessary for the controllability of each agent dynamics. The signs of the gains bi may be different and their prior knowledge is not needed. Assumption 2. The underlying graph topology is strongly connected. The control objective is to design a new class of algorithms for agents (5) or (6) under Assumptions 1 and 2 to achieve consensus such that lim (xi (t) − xk (t)) = 0. t→∞ for first-order agents with i, k ∈ {1, 2, · · · , N} or  limt→∞ (xi (t) − xk (t)) = 0 limt→∞ (vi (t) − vk (t)) = 0 for second-order agents with i, k ∈ {1, 2, . . . , N}. 5 (7) (8) 3 PI Consensus Error Transformation Let x := [x1 , x2 , · · · , xN ]T ∈ RN the agents position vector and assume that L is the Laplacian matrix associated with the underlying graph topology. We define the new variables Z tX zi (t) := xi (t) − x̄i + ρ aij (xi (s) − xj (s))ds (9) 0 j∈N i for i = 1, 2, · · · , N with ρ > 0 and x̄i ∈ R some arbitrary fixed point. Define also the vectors x̄ := [x̄1 , x̄2 , · · · , x̄N ]T ∈ RN and z := [z1 , z2 , · · · , zN ]T ∈ RN . The above transformation is called PI consensus error transformation since it includes the position error xi − x̄i of each agent from some arbitrary fixed point along with an integral term of the weighted P total displacement of the agent’s position from all neighbor positions j∈Ni aij (xi − xj ) (consensus error). The following lemma holds true which motivates the use of the new variables zi in the design procedure. Lemma 2. Consider a set of N agents with positions xi : [0, ∞) → R. If i) the underlying graph is strongly connected ii) xi (t) is continuous for all i = 1, 2, · · · , N iii) zi is bounded with limt→∞ zi (t) = 0 for all i = 1, 2, · · · , N P then limt→∞ (xi (t) − xj (t)) = 0 and limt→∞ xi (t) = N j=1 ωj x̄j where ω := T N [ω1 , · · · , ωN ] ∈ R is the left eigenvector of L associated with the zero eigenvalue. Proof. Define wi (t) := Z t X aij (xi (τ ) − xj (τ ))dτ 0 j∈N i and the vector variable w(t) := [w1 (t), · · · , wN (t)]T . Variable w(t) can also be written as Z t w(t) := Lx(s)ds. (10) 0 Then, it holds true that ẇ(t) = Lx(t) = −ρLw(t) + L(z(t) + x̄). 6 (11) The solution vector of (11) is w(t) = f (t) + g(t) with Z t f (t) := e−ρL(t−s) Lz(s)ds Z0 t g(t) := e−ρL(t−s) Lx̄ds. (12) (13) 0 Using the Jordan decomposition of the Laplacian matrix L described in (1) and the exponential matrix (2) we result in e−ρLt L = Ue−ρDt DV T . Thus, it holds true that Z t  1 g(t) = Ue−ρD(t−s) DV T x̄ds = U I − e−ρDt V T x̄ (14) ρ 0 and therefore limt→∞ g(t) = (1/ρ)UV T x̄. For the other term f (t) of w(t) convergence to zero is also ensured if z is bounded and limt→∞ z(t) = 0. Since all diagonal elements of D have positive real parts there exist some constants ρ1 , λ1 > 0 such that kUe−ρDt DV T k ≤ λ1 e−ρ1 t for all t ≥ 0. Also, since limt→∞ z(t) = 0 for every ǫ > 0 there exists time T (ǫ) > 0 such that kz(t)k ≤ ρ1 ǫ/2λ1 for all t ≥ T (ǫ). Moreover, the boundedness of z implies that there exist some c > 0 such that kz(t)k ≤ c for all t ≥ 0. Thus, for time t ≥ max{2T (ǫ), (2/ρ1 ) ln(2cλ1 /ρ1 ǫ)} it holds true that Z t/2 Z t −ρL(t−s) kf (t)k ≤ ke Lkkz(s)kds + ke−ρL(t−s) Lkkz(s)kds 0 ≤c t/2 Z t/2 −ρD(t−s) kUe 0 ρ1 ǫ DV kds + 2λ1 T cλ1 −ρ1 t/2 ǫ ≤ e + ≤ ǫ. ρ1 2 Z t kUe−ρD(t−s) DV T kds t/2 (15) Hence, limt→∞ f (t) = 0. From the above analysis, limt→∞ w(t) = limt→∞ [f (t)+ g(t)] = (1/ρ)UV T x̄ and since x(t) = z(t) − ρw(t) + x̄ the variable vector x also converges to lim x(t) = lim z(t) − ρ lim w(t) + x̄ t→∞ t→∞ T t→∞ T =x̄ − UV x̄ = 1ω x̄. The above limit yields the desired consensus property since for the difference xi − xj we have lim (xi (t) − xj (t)) = (ei − ej )T lim x(t) = 0 t→∞ t→∞ 7 (16) and limt→∞ xi (t) = eTi limt→∞ x(t) = ω T x̄ where ei is the i-th column of the identity matrix. Remark 2. If each agent selects the fixed point x̄i = xi (0) in (9) and the conditions of Lemma 2 are true then Pall agents converge towards the weighted average of their initial conditions N j=1 ωj xj (0). Remark P 3. It is to be noted that there are other error variables such as ξi := j∈Ni aij (xi − xj ) which, if regulated to zero, also ensure asymptotic consensus among the agents. However, transformation (9) has an input decoupling property which is very important in distributed control design. Only the input ui is present in the dynamics of zi while all neighbour inputs uj (j ∈ Ni ) are left out. This decoupling property does not occur in the dynamics of ξi and is the main source of difficulty in earlier designs [20], [34]. From this point of view, the use of transformation (9) could possibly find applications in several other leaderless consensus problems involving different or more general systems classes than (5) or (6). 4 Distributed Control Design The proposed transformation reduces the consensus problem to a simple distributed regulation problem. If each agent’s input is selected such that the corresponding PI consensus error variable is bounded and regulated to zero then consensus among all agents will occur. This is shown in Subsection 4.1 and 4.2 for agents of the form (5) and (6) respectively. 4.1 First-Order Agents Consider N agents of the form (5) satisfying Assumptions 1-2. The dynamics of the new error variables zi defined in (9) are given by X żi = bi ui + θiT φi (xi ) + ρ aij (xi − xj ). (17) j∈Ni Let now the nonnegative function Vi = (1/2)zi2 . From (17) the Vi time derivative has the following form " # X aij (xi − xj ) . (18) V̇i = zi bi ui + θiT φi (xi ) + ρ j∈Ni 8 Consider also a parameter vector estimators θ̂i of θi with estimation error θ̃i := θ̂i − θi . If we select the parameter adaptation law ˙ θ̂i = γi φi (xi )zi (19) with γi > 0 then the time derivative of the nonnegative function V̄i := Vi + (1/2γi )kθ̃i k2 takes the form " # X V̄˙ i = zi bi ui + θ̂iT φi (xi ) + ρ aij (xi − xj ) . (20) j∈Ni Selecting now the distributed control law " # X T ui = N(ζi ) θ̂i φi (xi ) + ρ aij (xi − xj ) + νzi (21) j∈Ni with ν > 0 and Nussbaum parameter update law " # X ζ̇i = νzi2 + zi θ̂iT φi (xi ) + ρ aij (xi − xj ) (22) j∈Ni we obtain V̄˙ i = −νzi2 + ζ̇i + bi N(ζi )ζ̇i . Integrating (23) over [0, t] we result in Z t V̄i (t) = V̄i (0) − ν zi2 (s)ds Z t0 + (bi N(ζi (τ )) + 1)ζ̇i (τ )dτ . (23) (24) 0 The dynamical system ẋag = fag (xag ) with augmented state vector xag := [x1 , w1 , θ̂1 , ζ1 , · · · , xN , wN , θ̂N , ζN ]T defined by (5), (19), (21), (22) has a smooth locally Lipschitz map fag and therefore a maximal solution exists over some Rt interval [0, tf ) [36]. From (24) and Lemma 1 we have that zi , θ̂i , ζi , 0 zi2 (τ )dτ are bounded in [0, tf ). The boundedness of z implies the boundedness of w(t) Rt since w(t) = 0 Ue−ρD(t−τ ) DV T [z(τ ) + x̄]dτ and therefore x = x̄ + z − ρw is 9 also bounded. Thus, the whole solution xag is bounded and the final time can be extended to infinity (tf = ∞) [36]. Due to (21) we also have ui ∈ L∞ and therefore (17) yields żi ∈ L∞ . Combining this fact with zi ∈ L∞ ∩ L2 we result from Barbalát’s Lemma in limt→∞ zi (t) = 0 ∀i = 1, 2, · · · , N. Since all conditions of Lemma 2 hold true asymptotic consensus is achieved. Thus, the following theorem has been proved. Theorem 1. Consider a set of N agents with dynamics described by (5) satisfying Assumptions 1-2. If we select the control input (21) with parameter estimation law (19) and Nussbaum parameter update law (22) then all signals are bounded in the closed loop and limt→∞ (xi (t) − xj (t)) = 0 with P limt→∞ xi (t) = N j=1 ωj x̄j . 4.2 Second-Order Agents For second-order agents (6) satisfying Assumptions 1-2 we define the new filtered error variables si :=żi + λzi   Z t =vi + ρξi + λ xi − x̄i + ρ ξi (s)ds (25) 0 with λ > 0 (1 ≤ i ≤ N). Equivalently, we have Z t −λt zi (t) = e zi (0) + e−λ(t−τ ) si (τ )dτ . (26) 0 Following a similar analysis to the proof of limt→∞ f (t) = 0 in Lemma 2 we can prove from (26) that if si is bounded with limt→∞ si (t) = 0 then limt→∞ zi (t) = limt→∞ żi (t) = 0. Also, if si is bounded in [0, tf ) then, |zi (t)| ≤ |zi (0)| + (1/λ) supτ ∈[0,tf ) |si (τ )| for all t ∈ [0, tf ). The dynamics of si are given by X X ṡi = bi ui + θiT φi (xi , vi ) + λvi + ρ aij (vi − vj ) + λρ aij (xi − xj ). j∈Ni j∈Ni (27) 10 Define now the nonnegative function Pi = (1/2)s2i . From (27) the Pi time derivative has the following form   X X T Ṗi = si bi ui + θi φi (xi , vi ) + λvi + ρ aij (vi − vj ) + λρ aij (xi − xj ) . j∈Ni j∈Ni (28) We consider also parameter vector estimators θ̂i of θi with estimation error θ̃i := θ̂i − θi . If we select the parameter adaptation law ˙ θ̂i = γi φi (xi , vi )si (29) with γi > 0 then the time derivative of the nonnegative function P̄i := Pi + (1/2γi )kθ̃i k2 takes the form   X X T ˙ P̄i = si bi ui + θ̂i φi (xi , vi ) + λvi + ρ aij (vi − vj ) + λρ aij (xi − xj ) . j∈Ni j∈Ni (30) Selecting now the distributed control law  X ui = N(ζi ) θ̂iT φi (xi , vi ) + λvi + ρ aij (vi − vj ) j∈Ni + νsi + λρ X aij (xi − xj ) j∈Ni  (31) with ν > 0 and Nussbaum parameter update law   X X 2 T ζ̇i = νsi + si θ̂i φi (xi , vi ) + λvi + ρ aij (vi − vj ) + ρλ aij (xi − xj ) j∈Ni j∈Ni (32) we obtain P̄˙ i = −νs2i + ζ̇i + bi N(ζi )ζ̇i . Integrating (33) over [0, t] we result in Z t Z t 2 P̄i (t) = P̄i (0) − ν si (s)ds + (bi N(ζi (τ )) + 1)ζ̇i (τ )dτ . 0 0 11 (33) (34) The dynamical system ẏag = gag (yag ) with augmented state vector yag := [x1 , v1 , w1 , θ̂1 , ζ1, · · · , xN , vN , wN , θ̂N , ζN ]T defined by (6), (29), (31), (32) has a smooth locally Lipschitz map gag and therefore a maximal solution exists over some interval [0, tf ) [36]. From (34) and Lemma 1 we have that Rt si , θ̂i , ζi , 0 s2i (τ )dτ are bounded in [0, tf ). The boundedness of s implies the boundedness of z. This, in turn yields the boundedness of w(t) since Rt w(t) = 0 Ue−ρD(t−τ ) DV T [z(τ ) + x̄]dτ and therefore x = x̄ + z − ρw and v = s − ρLx − λz are also bounded. Thus, the whole solution yag is bounded and the final time can be extended to infinity (tf = ∞) [36]. Due to (31) we also have ui ∈ L∞ and therefore (27) yields ṡi ∈ L∞ . Combining this fact with si ∈ L∞ ∩ L2 we result from Barbalát’s Lemma in limt→∞ si (t) = 0 for all i = 1, · · · , N. This, in turn yields limt→∞ zi (t) = 0 for all i = 1, · · · , N. Since all conditions of Lemma 2 hold true asymptotic consensus among all agent positions is achieved. Finally, we have that limt→∞ vi (t) = limt→∞ (si (t) − ρξi (t) − λzi (t)) = 0. Thus, the following theorem has been proved. Theorem 2. Consider a set of N agents with dynamics described by (6) satisfying Assumptions 1-2. If we select the control input (31) with parameter estimation law (29) and Nussbaum parameter update law (32) then all signals in the closed loop are bounded and limt→∞ (xi (t) − xj (t)) = limt→∞ (vi (t) − P vj (t)) = 0 with limt→∞ xi (t) = N j=1 ωj x̄j , limt→∞ vi (t) = 0. Remark 4. The proposed distributed control approach can also be generalized to other agent models such as those considered in[34] using some of the tools described therein. The purpose of this note is not to solve the adaptive consensus problem in its more general form but to propose an alternative approach that significantly simplifies the design and allows for several generalizations. 5 Simulation Example In this Section, we consider a group of four agents with first-order (Case 1) or second-order dynamics (Case 2) described by (5), (6) respectively and a strongly connected topology G depicted in Fig. 1. The left-eigenvector associated with the zero eigenvalue of the Laplacian matrix is ω = (1/9)[2, 2, 2, 3]T . In both cases completely unknown control directions are considered with b1 = 1, b2 = −2, b3 = 2, b4 = −3/2, parameters θ1 = θ2 = 1, θ3 = −1, 12 1 1 2 1 1 0.5 0.5 4 3 Figure 1: Strongly connected unbalanced graph G. 6 4 2 0 x1 −2 x2 x3 x4 −4 −6 0 10 20 30 40 t [sec] 50 60 70 80 Figure 2: The positions xi for first-order agents (i = 1, . . . , 4). θ4 = 2 and initial conditions x(0) = [1, 2, 3, −1]T . For both cases the control and adaptation parameters ρ = ν = γi = 0.1 (i = 1, 2, 3, 4) and x̄ = [1, 2, 3, 4]T are selected. For Case 1 the nonlinearities φ1 (x1 ) = sin(x1 ), φ2 (x2 ) = cos(x22 ), φ3 (x3 ) = 0.5x23 + 1, φ4 (x4 ) = x4 sin(x4 ) are assumed. For Case 2 we consider φ1 (x1 , v1 ) = sin(x1 ) cos(v1 ), φ2 (x2 , v2 ) = v2 cos(x22 ), φ3 (x3 , v3 ) = 1 + 0.5x3 v3 , φ4 (x4 , v4 ) = sin(x4 + v4 ) and the additional parameter λ = 1.5 and initial condition v(0) = 0. Simulation results are shown in Fig. 2-8. As expected consensus is achieved in both cases with final consensus point limt→∞ xi (t) = ω T x̄ = 8/3 (1 ≤ i ≤ 4) while all signals in the closed-loop remain bounded. 13 θ̂1 0.5 θ̂2 θ̂3 θ̂4 0 −0.5 −1 0 10 20 30 40 t [sec] 50 60 70 80 Figure 3: The estimation variables θ̂i for first-order agents (i = 1, . . . , 4). 6 4 2 ζ1 0 0 10 20 30 40 t [sec] ζ2 50 ζ3 60 ζ4 70 80 Figure 4: The Nussbaum parameters ζi for first-order agents (i = 1, . . . , 4). 6 Conclusion A novel change of variables is introduced in this work that transforms the consensus design problem into a simple regulation problem. Making use of this new transformation, an adaptive cooperative control law is proposed for nonlinear agents with unknown and non-identical control directions. Future work may explore applications to more general system classes. References [1] R. Olfati-Saber, J. Fax and R. Murray, ”Consensus and cooperation in networked multi-agent systems,” Proceedings of the IEEE, vol. 95, no. 1, pp. 215-233, 2007. 14 4 3 2 x1 1 x2 x3 x4 0 −1 −2 0 20 40 60 80 100 t [sec] 120 140 160 180 200 Figure 5: The positions xi for second-order agents (i = 1, . . . , 4). 2 1 0 −1 v1 v2 v3 v4 −2 −3 −4 0 20 40 60 80 100 t [sec] 120 140 160 180 200 Figure 6: The velocities vi for second-order agents (i = 1, . . . , 4). [2] W. Ren, R. Beard and E. Atkins, ”Information consensus in multivehicle cooperative control,” IEEE Control Syst. Mag., vol. 27, no. 2, pp. 71-82, 2007. [3] A. Jadbabaie, J. Lin and A. Morse, ”Coordination of groups of mobile autonomous agents using nearest neighbor rules,” IEEE Trans. on Autom. Control, vol. 48, no. 6, pp. 988-1001, 2003. [4] R. Olfati-Saber and R. Murray, ”Consensus problems in networks of agents with switching topology and time-delays,” IEEE Trans. on Autom. Control, vol. 49, no. 9, pp. 1520-1533, 2004. [5] W. Ren and R. Beard, Distributed Consensus in Multi-Vehicle Cooperative Control: Theory and Applications. Springer, 2008. [6] J. Shamma, Cooperative Control of Distributed Multi-Agent Systems. Wiley, 2008. 15 1 θ̂1 θ̂2 θ̂3 θ̂4 0.5 0 −0.5 −1 −1.5 0 20 40 60 80 100 t [sec] 120 140 160 180 200 Figure 7: The estimation variables θ̂i for second-order agents (i = 1, . . . , 4). 8 6 ζ1 4 ζ2 ζ3 ζ4 2 0 0 20 40 60 80 100 t [sec] 120 140 160 180 200 Figure 8: The Nussbaum parameters ζi for second-order agents (i = 1, . . . , 4). [7] M. Mehran and M. Egerstedt, Graph theoretic methods in multiagent networks. Princeton University Press, 2010. [8] W. Ren and Y. Cao, Distributed Coordination of Multi-agent Networks: Emergent Problems, Model and Issues. Springer, 2011. [9] F.L. Lewis, H. Zhang, K. Hengster-Movric and A. Das, Cooperative Control of Multi-Agent Systems: Optimal and Adaptive Design Approaches. Springer, 2014. [10] J. Du, C. Guo, S. Yu, and Y. Zhao, “Adaptive autopilot design of timevarying uncertain ships with completely unknown control coefficient,” IEEE J. Ocean. Eng., vol. 32, no. 2, pp. 346-352, 2007. [11] A. Astolfi, L. Hsu, M.S. Netto and R. Ortega, ”Two solutions to the adaptive visual servoing problem,” IEEE Trans. on Robotics and Autom., vol. 18, no. 3, pp.387-392, 2002. 16 [12] R. Nussbaum, ”Some remarks on a conjecture in parameter adaptive control,” Systems & Control Letters, vol. 3, no. 5, pp. 243 - 246, 1983. [13] X. Ye and J. Jiang, ”Adaptive nonlinear design without a priori knowledge of control directions,” IEEE Trans. Autom. Control, vol. 43, no. 11, pp. 1617 – 1621, 1998. [14] Z. Ding, ”Global adaptive output feedback stabilization of nonlinear systems of any relative degree with unknown high-frequency gains,” IEEE Trans. Autom. Control, vol. 43, no. 10, pp. 1442 - 1446, 1998. [15] Y. Zhang, C. Wen, and Y. Soh, ”Adaptive backstepping control design for systems with unknown high-frequency gain,” IEEE Trans. Autom. Control, vol. 45, no. 12, pp. 2350 – 2354, 2000. [16] Z.P. Jiang, I. Mareels, D.J. Hill, J. Huang, ”A unifying framework for global regulation via nonlinear output feedback: from ISS to iISS,” IEEE Trans. Autom. Control, vol. 49, pp. 549-562, 2004. [17] L. Liu and J. Huang, “Global robust output regulation of output feedback systems with unknown high-frequency gain sign,” IEEE Trans. Autom. Control, vol. 51, no. 4, pp. 625 – 631, 2006. [18] H.E. Psillakis, ”Further results on the use of Nussbaum gains in adaptive neural network control,” IEEE Trans. on Autom. Control, vol. 55, no. 12, pp. 2841-2846, 2010. [19] X. Yan and Y. Liu, ”Global practical tracking for high-order uncertain nonlinear systems with unknown control directions,” SIAM J. Control Optim., vol. 48, no. 7, pp. 4453 – 4473, 2010. [20] W. Chen, X. Li, W. Ren, and C. Wen, ”Adaptive consensus of multiagent systems with unknown identical control directions based on a novel Nussbaum-type function,” IEEE Trans. Autom. Control, vol. 59, no. 7, pp. 1887 – 1892, 2014. [21] M. Radenkovic and M. Tadi, ”Multi-agent adaptive consensus of networked systems on directed graphs,” International Journal of Adaptive Control and Signal Processing, vol. 30, no. 1, pp. 46 – 59, 2016. 17 [22] Q. Ma, ”Cooperative control of multi-agent systems with unknown control directions,” Applied Mathematics and Computation, vol. 292, pp. 240 – 252, 2017. [23] G. Wang, C. Wang, L. Li, and Z. Zhang, ”Designing distributed consensus protocols for second-order nonlinear multi-agents with unknown control directions under directed graphs,” Journal of the Franklin Inst., vol. 354, no. 1, pp. 571-592, 2017. [24] P. Shi and Q. Shen, ”Cooperative control of multi-agent systems with unknown state-dependent controlling effects,” IEEE Trans. Autom. Science and Engineering, vol. 12, no. 3, pp. 827 – 834, 2015. [25] W. Wang, D. Wang, Z. Peng, and T. Li, ”Prescribed performance consensus of uncertain nonlinear strict-feedback systems with unknown control directions,” IEEE Trans. Systems, Man and Cybernetics: Systems, vol. 46, no. 9, pp. 1279 – 1286, 2016. [26] Z. Ding, ”Adaptive consensus output regulation of a class of nonlinear systems with unknown high-frequency gain,” Automatica, vol. 51, pp. 348 – 355, 2015. [27] L. Liu, ”Adaptive cooperative output regulation for a class of nonlinear multi-agent systems,” IEEE Trans. Autom. Control, vol. 60, no. 6, pp. 1677 – 1682, 2015. [28] Y. Su, ”Cooperative global output regulation of second-order nonlinear multi-agent systems with unknown control direction,” IEEE Trans. Autom. Control,” vol. 60, no. 12, pp. 3275 – 3280, 2015. [29] M. Guo, D. Xu, and L. Liu, ”Cooperative output regulation of heterogeneous nonlinear multi-agent systems with unknown control directions,” IEEE Trans. Autom. Control, vol. 62, no. 6, pp. 3039 – 3045, 2017. [30] J. Peng and X. Ye, ”Cooperative control of multiple heterogeneous agents with unknown high-frequency-gain signs,” Systems & Control Letters, vol. 68, pp. 51 – 56, 2014. [31] H. Psillakis, ”Consensus in networks of agents with unknown highfrequency gain signs and switching topology,” IEEE Trans. Autom. Control, vol. 62, no. 8, pp. 3993 – 3998, 2017. 18 [32] R. Ortega, A. Astolfi, and N. Barabanov, ”Nonlinear PI control of uncertain systems: An alternative to parameter adaptation,” Systems & Control Letters, vol. 47, no. 3, pp. 259 – 278, 2002. [33] H. Psillakis, ”Integrator backstepping with the nonlinear PI method: An integral equation approach,” Eur. J. of Control, vol. 28, pp. 49 – 55, 2016. [34] C. Chen, C. Wen, Z. Liu, K. Xie, Y. Zhang, and C. Chen, “Adaptive consensus of nonlinear multi-agent systems with non-identical partially unknown control directions and bounded modelling errors,” IEEE Trans. Autom. Control, vol. 62, no. 9, pp. 4654 – 4659, 2017. [35] Z. Li and Y. Jia, ”Algebraic criteria for consensus problems of continuous-time networked systems,” Int. J. Control, vol. 82, no. 4, pp. 643-658, 2009. [36] M. Hirsch and S. Smale, Differential equations, dynamical systems and linear algebra. Academic Press, 1973. 19
3cs.SY
SEGAN: Speech Enhancement Generative Adversarial Network Santiago Pascual1 , Antonio Bonafonte1 , Joan Serrà2 1 Universitat Politècnica de Catalunya, Barcelona, Spain 2 Telefónica Research, Barcelona, Spain [email protected], [email protected] [email protected] arXiv:1703.09452v3 [cs.LG] 9 Jun 2017 Abstract Current speech enhancement techniques operate on the spectral domain and/or exploit some higher-level feature. The majority of them tackle a limited number of noise conditions and rely on first-order statistics. To circumvent these issues, deep networks are being increasingly used, thanks to their ability to learn complex functions from large example sets. In this work, we propose the use of generative adversarial networks for speech enhancement. In contrast to current techniques, we operate at the waveform level, training the model end-to-end, and incorporate 28 speakers and 40 different noise conditions into the same model, such that model parameters are shared across them. We evaluate the proposed model using an independent, unseen test set with two speakers and 20 alternative noise conditions. The enhanced samples confirm the viability of the proposed model, and both objective and subjective evaluations confirm the effectiveness of it. With that, we open the exploration of generative architectures for speech enhancement, which may progressively incorporate further speech-centric design choices to improve their performance. Index Terms: speech enhancement, deep learning, generative adversarial networks, convolutional neural networks. 1. Introduction Speech enhancement tries to improve the intelligibility and quality of speech contaminated by additive noise [1]. Its main applications are related to improving the quality of mobile communications in noisy environments. However, we also find important applications related to hearing aids and cochlear implants, where enhancing the signal before amplification can significantly reduce discomfort and increase intelligibility [2]. Speech enhancement has also been successfully applied as a preprocessing stage in speech recognition and speaker identification systems [3, 4, 5]. Classic speech enhancement methods are spectral subtraction [6], Wiener filtering [7], statistical model-based methods [8], and subspace algorithms [9, 10]. Neural networks have been also applied to speech enhancement since the 80s [11, 12]. Recently, the denoising auto-encoder architecture [13] has been widely adopted. However, recurrent neural networks (RNNs) are also used. For instance, the recurrent denoising autoencoder has shown significant performance exploiting the temporal context information in embedded signals. Most recent approaches apply long short-term memory networks to the denoising task [4, 14]. In [15] and [16], noise features are estimated and included in the input features of deep neural networks. The use of dropout, post-filtering, and perceptually motivated metrics are shown to be effective. Most of the current systems are based on the short-time Fourier analysis/synthesis framework [1]. They only modify the spectrum magnitude, as it is often claimed that short-time phase is not important for speech enhancement [17]. However, further studies [18] show that significant improvements of speech quality are possible, especially when a clean phase spectrum is known. In 1988, Tamura et al. [11] proposed a deep network that worked directly on the raw audio waveform, but they used feed-forward layers that worked frame-by-frame (60 samples) on a speaker-dependent and isolated-word database. A recent breakthrough in the deep learning generative modeling field are generative adversarial networks (GANs) [19]. GANs have achieved a good level of success in the computer vision field to generate realistic images and generalize well to pixel-wise, complex (high-dimensional) distributions [20, 21, 22]. As far as we are concerned, GANs have not yet been applied to any speech generation nor enhancement task, so this is the first approach to use the adversarial framework to generate speech signals. The main advantages of the proposed speech enhancement GAN (SEGAN) are: • It provides a quick enhancement process. No causality is required and, hence, there is no recursive operation like in RNNs. • It works end-to-end, with the raw audio. Therefore, no hand-crafted features are extracted and, with that, no explicit assumptions about the raw data are done. • It learns from different speakers and noise types, and incorporates them together into the same shared parametrization. This makes the system simple and generalizable in those dimensions. In the following, we give an overview of GANs (Sec. 2). Next, we describe the proposed model (Sec. 3) and its experimental setup (Sec. 4). We finally report the results (Sec. 5) and discuss some conclusions (Sec. 6). 2. Generative Adversarial Networks GANs [19] are generative models that learn to map samples z from some prior distribution Z to samples x from another distribution X , which is the one of the training examples (e.g., images, audio, etc.). The component within the GAN structure that performs the mapping is called the generator (G), and its main task is to learn an effective mapping that can imitate the real data distribution to generate novel samples related to those of the training set. Importantly, G does so not by memorizing input-output pairs, but by mapping the data distribution characteristics to the manifold defined in our prior Z. The way in which G learns to do the mapping is by means of an adversarial training, where we have another component, called the discriminator (D). D is typically a binary classifier, and its inputs are either real samples, coming from the dataset that G is imitating, or fake samples, made up by G. The adversarial characteristic comes from the fact that D has to classify the samples coming from X as real, whereas the samples Figure 1: GAN training process. First, D back-props a batch of real examples. Then, D back-props a batch of fake examples that come from G, and classifies them as fake. Finally, D’s parameters are frozen and G back-props to make D misclassify. coming from G, X̂ , have to be classified as fake. This leads to G trying to fool D, and the way to do so is that G adapts its parameters such that D classifies G’s output as real. During back-propagation, D gets better at finding realistic features in its input and, in turn, G corrects its parameters to move towards the real data manifold described by the training data (Fig. 1). This adversarial learning process is formulated as a minimax game between G and D, with the objective min max V (D, G) = Ex∼pdata (x) [log D(x)] + G D (1) + Ez∼pz (z) [log (1 − D (G (z)))] . We can also work with a conditioned version of GANs, where we have some extra information in G and D to perform mapping and classification (see [20] and references therein). In that case, we may add some extra input xc , with which we change the objective function to min max V (D, G) = Ex,xc ∼pdata (x,xc ) [log D(x, xc )] + G D + Ez∼pz (z),xc ∼pdata (xc ) [log (1 − D (G (z, xc ) , xc ))] . (2) There have been recent improvements in the GAN methodology to stabilize training and increase the quality of the generated samples in G. For instance, the classic approach suffered from vanishing gradients due to the sigmoid cross-entropy loss used for training. To solve this, the least-squares GAN (LSGAN) approach [21] substitutes the cross-entropy loss by the least-squares function with binary coding (1 for real, 0 for fake). With this, the formulation in Eq. 2 changes to 1 Ex,xc ∼pdata (x,xc ) [(D(x, xc ) − 1)2 ]+ 2 1 + Ez∼pz (z),xc ∼pdata (xc ) [D(G(z, xc ), xc )2 ] 2 (3) 1 min VLSGAN (G) = Ez∼pz (z),xc ∼pdata (xc ) [(D(G(z, xc ), xc )−1)2 ]. G 2 (4) min VLSGAN (D) = D 3. Speech Enhancement GAN The enhancement problem is defined so that we have an input noisy signal x̃ and we want to clean it to obtain the enhanced signal x̂. We propose to do so with a speech enhancement GAN Figure 2: Encoder-decoder architecture for speech enhancement (G network). The arrows between encoder and decoder blocks denote skip connections. (SEGAN). In our case, the G network performs the enhancement. Its inputs are the noisy speech signal x̃ together with the latent representation z, and its output is the enhanced version x̂ = G(x̃). We design G to be fully convolutional, so that there are no dense layers at all. This enforces the network to focus on temporally-close correlations in the input signal and throughout the whole layering process. Furthermore, it reduces the number of training parameters and hence training time. The G network is structured similarly to an auto-encoder (Fig. 2). In the encoding stage, the input signal is projected and compressed through a number of strided convolutional layers followed by parametric rectified linear units (PReLUs) [23], getting a convolution result out of every N steps of the filter. We choose strided convolutions as they were shown to be more stable for GAN training than other pooling approaches [22]. Decimation is done until we get a condensed representation, called the thought vector c, which gets concatenated with the latent vector z. The encoding process is reversed in the decoding stage by means of fractional-strided transposed convolutions (sometimes called deconvolutions), followed again by PReLUs. The G network also features skip connections, connecting each encoding layer to its homologous decoding layer, and bypassing the compression performed in the middle of the model (Fig. 2). This is done because the input and output of the model share the same underlying structure, which is that of natural speech. Therefore, many low level details could be lost to reconstruct the speech waveform properly if we force all information to flow through the compression bottleneck. Skip connections directly pass the fine-grained information of the waveform to the decoding stage (e.g., phase, alignment). In addition, they offer a better training behavior, as the gradients can flow deeper through the whole structure [24]. An important feature of G is its end-to-end structure, so that it processes raw speech sampled at 16 kHz, getting rid of any intermediate transformations to extract acoustic features (contrasting to many common pipelines). In this type of model, we have to be careful with typical regression losses like mean absolute error or mean squared error, as noted in the raw speech generative model WaveNet [25]. These losses work under strong assumptions on how our output distribution is shaped and, therefore, impose important modeling limitations (like not allowing multi-modal distributions and biasing the predictions towards an average of all the possible predictions). Our solution to overcome these limitations is to use the generative adversarial setting. This way, D is in charge of transmitting information to G of what is real and what is fake, such that G can slightly correct its output waveform towards the realistic distribution, getting rid of the noisy signals as those are signaled to be fake. In this sense, D can be understood as learning some sort of loss for G’s output to look real. In preliminary experiments, we found it convenient to add a secondary component to the loss of G in order to minimize the distance between its generations and the clean examples. To measure such distance, we chose the L1 norm, as it has been proven to be effective in the image manipulation domain [20, 26]. This way, we let the adversarial component to add more fine-grained and realistic results. The magnitude of the L1 norm is controlled by a new hyper-parameter λ. Therefore, the G loss, which we choose to be the one of LSGAN (Eq. 4), becomes 1 Ez∼pz (z),x̃∼pdata (x̃) [(D(G(z, x̃), x̃) − 1)2 ]+ 2 + λ kG(z, x̃) − xk1 . (5) min VLSGAN (G) = G 4. Experimental Setup 4.1. Data Set To evaluate the effectiveness of the SEGAN, we resort to the data set by Valentini et al. [27]. We choose it because it is open and available1 , and because the amount and type of data fits our purposes for this work: generalizing on many types of noise for many different speakers. The data set is a selection of 30 speakers from the Voice Bank corpus [28]: 28 are included in the train set and 2 in the test set. To make the noisy training set, a total of 40 different conditions are considered [27]: 10 types of noise (2 artificial and 8 from the Demand database [29]) with 4 signal-to-noise ratio (SNR) each (15, 10, 5, and 0 dB). There are around 10 different sentences in each condition per training speaker. To make the test set, a total of 20 different conditions are considered [27]: 5 types of noise (all from the Demand database) with 4 SNR each (17.5, 12.5, 7.5, and 2.5 dB). There are around 20 different sentences in each condition per test speaker. Importantly, the test set is totally unseen by (and different from) the training set, using different speakers and conditions. 4.2. SEGAN Setup The model is trained for 86 epochs with RMSprop [30] and a learning rate of 0.0002, using an effective batch size of 400. We structure the training examples in two pairs (Fig. 3): the real pair, composed of a noisy signal and a clean signal (x̃ and x), and the fake pair, composed of a noisy signal and an enhanced signal (x̃ and x̂). To adequate the data set files to our waveform generation purposes, we down-sample the original utterances 1 http://dx.doi.org/10.7488/ds/1356 Figure 3: Adversarial training for speech enhancement. Dashed lines represent gradient backprop. from 48 kHz to 16 kHz. During train, we extract chunks of waveforms with a sliding window of approximately one second of speech (16384 samples) every 500 ms (50% overlap). During test, we basically slide the window with no overlap through the whole duration of our test utterance and concatenate the results at the end of the stream. In both train and test, we apply a high-frequecy preemphasis filter of coefficient 0.95 to all input samples (during test, output is correspondingly deemphasized). Regarding the λ weight of our L1 regularization, after some experimentation, we set it to 100 for the whole training. We initially set it to 1, but we observed that the G loss was two orders of magnitude under the adversarial one, so the L1 had no practical effect on the learning. Once we set it to 100, we saw a minimization behavior in the L1 and an equilibrium behavior in the adversarial one. As the L1 got lower, the quality of the output samples increased, which we hypothesize helped G being more effective in terms of realistic generation. Regarding the architecture, G is composed of 22 onedimensional strided convolutional layers of filter width 31 and strides of N = 2. The amount of filters per layer increases so that the depth gets larger as the width (duration of signal in time) gets narrower. The resulting dimensions per layer, being it samples × feature maps, is 16384×1, 8192×16, 4096×32, 2048×32, 1024×64, 512×64, 256×128, 128×128, 64×256, 32×256, 16×512, and 8×1024. There, we sample the noise samples z from our prior 8×1024-dimensional normal distribution N (0, I). As mentioned, the decoder stage of G is a mirroring of the encoder with the same filter widths and the same amount of filters per layer. However, skip connections and the addition of the latent vector make the number of feature maps in every layer to be doubled. The network D follows the same one-dimensional convolutional structure as G’s encoder stage, and it fits to the conventional topology of a convolutional classification network. The differences are that (1) it gets two input channels of 16384 samples, (2) it uses virtual batch-norm [31] before LeakyReLU nonlinearities with α = 0.3, and (3) in the last activation layer there is a one-dimensional convolution layer with one filter of width one that does not downsample the hidden activations (1×1 convolution). The latter (3) reduces the amount of parameters required for the final classification neuron, which is fully connected to all hidden activations with a linear behavior. This means that we reduce the amount of required parameters in that fully-connected component from 8 × 1024 = 8192 to 8, and Table 1: Objective evaluation results comparing the noisy signal and the Wiener- and SEGAN-enhanced signals. Table 2: Subjective evaluation results comparing the noisy signal and the Wiener- and SEGAN-enhanced signals. Metric Noisy Wiener SEGAN Metric Noisy Wiener SEGAN PESQ CSIG CBAK COVL SSNR 1.97 3.35 2.44 2.63 1.68 2.22 3.23 2.68 2.67 5.07 2.16 3.48 2.94 2.80 7.73 MOS 2.09 2.70 3.18 the way in which the 1024 channels are merged is learnable in the parameters of the convolution. All the project is developed with TensorFlow [32], and the code is available at https://github.com/santi-pdp/ segan. We refer to this resource for further details of our implementation. A sample of the enhanced speech audios is provided at http://veu.talp.cat/segan. 5. Results 5.1. Objective Evaluation To evaluate the quality of the enhanced speech, we compute the following objective measures (the higher the better). All metrics compare the enhanced signal with the clean reference of the 824 test set files. They have been computed using the implementation included in [1], and available at the publisher website2 . • PESQ: Perceptual evaluation of speech quality, using the wide-band version recommended in ITU-T P.862.2 [33] (from –0.5 to 4.5). • CSIG: Mean opinion score (MOS) prediction of the signal distortion attending only to the speech signal [34] (from 1 to 5). • CBAK: MOS prediction of the intrusiveness of background noise [34] (from 1 to 5). • COVL: MOS prediction of the overall effect [34] (from 1 to 5). • SSNR: Segmental SNR [35, p. 41] (from 0 to ∞). Table 1 shows the results of these metrics. To have a comparative reference, it also shows the results of these metrics when applied directly to the noisy signals and to signals filtered using the Wiener method based on a priori SNR estimation [36], as provided in [1]. It can be observed how SEGAN gets slightly worse PESQ. However, in all the other metrics, which better correlate with speech/noise distortion, SEGAN outperforms the Wiener method. It produces less speech distortion (CSIG) and removes noise more effectively (CBAK and SSNR). Therefore, it achieves a better tradeoff between the two factors (COVL). 5.2. Subjective Evaluation A perceptual test has also been carried out to compare SEGAN with the noisy signal and the Wiener baseline. For that, 20 sentences were selected from the test set. As the database does not indicate the amount and type of noise for each file, the selection was done by listening to some of the provided noisy files, trying to balance different noise types. Most of the files have low SNR, but a few with high SNR were also included. A total of 16 listeners were presented with the 20 sentences 2 https://www.crcpress.com/downloads/K14513/ K14513_CD_Files.zip Figure 4: CMOS box plot (the median line in the SEGAN– Wiener comparison is located at 1). Positive values mean that SEGAN is preferred. SEGAN–Wiener SEGAN–Noisy −2 0 2 4 in a randomized order. For each sentence, the following three versions were presented, also in random order: noisy signal, Wiener-enhanced signal, and SEGAN-enhanced signal. For each signal, the listener rated the overall quality, using a scale from 1 to 5. In the description of the 5 categories, they were instructed to pay attention to both the signal distortion and the noise intrusiveness (e.g., 5=excellent: very natural speech with no degradation and not noticeable noise). Listeners could listen to each signal as many times as they wanted, and were asked to pay attention to the comparative rate of the three signals. In Table 2, it can be observed how SEGAN is preferred over both the noisy signal and the Wiener baseline. However, as there is a large variation in the SNR of the noisy signal, the MOS range is very large, and the difference between Wiener and SEGAN is not significant. However, as the listeners compared all the systems at same time, it is possible to compute the comparative MOS (CMOS) by subtracting the MOS of the two systems being compared. Fig. 4 depicts this relative comparison. We can see how the signals generated by SEGAN are preferred. More specifically, SEGAN is preferred over the original (noisy) signal in 67% of the cases, while the noisy signal is preferred in 8% of the cases (no preference in 25% of the cases). With respect to the Wiener system, SEGAN is preferred in 53% of cases and Wiener is preferred in 23% of the cases (no preference in 24% of the cases). 6. Conclusions In this work, an end-to-end speech enhancement method has been implemented within the generative adversarial framework. The model works as an encoder-decoder fully-convolutional structure, which makes it fast to operate for denoising waveform chunks. The results show that, not only the method is viable, but it can also represent an effective alternative to current approaches. Possible future work involves the exploration of better convolutional structures and the inclusion of perceptual weightings in the adversarial training, so that we reduce possible high frequency artifacts that might be introduced by the current model. Further experiments need to be done to compare SEGAN with other competitive approaches. 7. Acknowledgements This work was supported by the project TEC2015-69266-P (MINECO/FEDER, UE). 8. References [1] P. C. Loizou, Speech Enhancement: Theory and Practice, 2nd ed. Boca Raton, FL, USA: CRC Press, Inc., 2013. [2] L.-P. Yang and Q.-J. Fu, “Spectral subtraction-based speech enhancement for cochlear implant patients in background noise,” The Journal of the Acoustical Society of America, vol. 117, no. 3, pp. 1001–1004, 2005. [3] D. Yu, L. Deng, J. Droppo, J. Wu, Y. Gong, and A. Acero, “A minimum-mean-square-error noise reduction algorithm on melfrequency cepstra for robust speech recognition,” in Proc. of the IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP). IEEE, 2008, pp. 4041–4044. [19] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. WardeFarley, S. Ozair, A. Courville, and Y. Bengio, “Generative adversarial nets,” in Advances in Neural Information Processing Systems (NIPS), 2014, pp. 2672–2680. [20] P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros, “Image-toimage translation with conditional adversarial networks,” ArXiv: 1611.07004, 2016. [21] X. Mao, Q. Li, H. Xie, R. Y. K. Lau, and Z. Wang, “Least squares generative adversarial networks,” ArXiv: 1611.04076, 2016. [22] A. Radford, L. Metz, and S. Chintala, “Unsupervised representation learning with deep convolutional generative adversarial networks,” arXiv preprint arXiv:1511.06434, 2015. [4] A. L. Maas, Q. V. Le, T. M. O’Neil, O. Vinyals, P. Nguyen, and A. Y. Ng, “Recurrent neural networks for noise reduction in robust asr.” in Proc. of INTERSPEECH, 2012, pp. 22–25. [23] K. He, X. Zhang, S. Ren, and J. Sun, “Delving deep into rectifiers: Surpassing human-level performance on imagenet classification,” in Proc. of the IEEE Int. Conf. on Computer Vision (ICCV), 2015, pp. 1026–1034. [5] J. Ortega-Garcia and J. Gonzalez-Rodriguez, “Overview of speech enhancement techniques for automatic speaker recognition,” in Spoken Language, 1996. ICSLP 96. Proceedings., Fourth International Conference on, vol. 2, Oct 1996, pp. 929–932 vol.2. [24] ——, “Deep residual learning for image recognition,” in Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 770–778. [6] M. Berouti, R. Schwartz, and J. Makhoul, “Enhancement of speech corrupted by acoustic noise,” in Proc. of the Int. Conf. on Acoustics, Speech, and Signal Processing (ICASS), vol. 4, Apr 1979, pp. 208–211. [25] A. van den Oord, S. Dieleman, H. Zen, K. Simonyan, O. Vinyals, A. Graves, N. Kalchbrenner, A. Senior, and K. Kavukcuoglu, “Wavenet: A generative model for raw audio,” CoRR abs/1609.03499, 2016. [7] J. Lim and A. Oppenheim, “All-pole modeling of degraded speech,” IEEE Trans. on Acoustics, Speech, and Signal Processing, vol. 26, no. 3, pp. 197–210, Jun 1978. [26] D. Pathak, P. Krahenbuhl, J. Donahue, T. Darrell, and A. A. Efros, “Context encoders: Feature learning by inpainting,” in Proc. of the IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 2536–2544. [8] Y. Ephraim, “Statistical-model-based speech enhancement systems,” Proceedings of the IEEE, vol. 80, no. 10, pp. 1526–1555, Oct 1992. [9] M. Dendrinos, S. Bakamidis, and G. Carayannis, “Speech enhancement from noise: A regenerative approach,” Speech Communication, vol. 10, no. 1, pp. 45–57, 1991. [10] Y. Ephraim and H. L. Van Trees, “A signal subspace approach for speech enhancement,” IEEE Trans. on speech and audio processing, vol. 3, no. 4, pp. 251–266, 1995. [11] S. Tamura and A. Waibel, “Noise reduction using connectionist models,” in Proc. of the IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), 1988, pp. 553–556. [12] S. Parveen and P. Green, “Speech enhancement with missing data techniques using recurrent neural networks,” in Proc. of the IEEE Int. Conf. on Acoustics, Speech and Signal Processing (ICASSP), 2004, pp. 733–736. [13] X. Lu, Y. Tsao, S. Matsuda, and C. Hori, “Speech enhancement based on deep denoising autoencoder.” in Proc. of INTERSPEECH, 2013, pp. 436–440. [14] F. Weninger, H. Erdogan, S. Watanabe, E. Vincent, J. Le Roux, J. R. Hershey, and B. Schuller, “Speech enhancement with LSTM recurrent neural networks and its application to noise-robust ASR,” in Proc. of the Int. Conf. on Latent Variable Analysis and Signal Separation, 2015, pp. 91–99. [15] Y. Xu, J. Du, L.-R. Dai, and C.-H. Lee, “A regression approach to speech enhancement based on deep neural networks,” IEEE/ACM Trans. on Audio, Speech and Language Processing, vol. 23, no. 1, pp. 7–19, 2015. [16] A. Kumar and D. Florencio, “Speech enhancement in multiplenoise conditions using deep neural networks,” in Proc. of the Int. Speech Communication Association Conf. (INTERSPEECH), 2016, pp. 3738–3742. [17] D. Wang and J. Lim, “The unimportance of phase in speech enhancement,” IEEE Trans. on Acoustics, Speech, and Signal Processing, vol. 30, no. 4, pp. 679–681, Aug 1982. [18] K. Paliwal, K. Wójcicki, and B. Shannon, “The importance of phase in speech enhancement,” Speech Communication, vol. 53, no. 4, pp. 465 – 494, 2011. [Online]. Available: http://www. sciencedirect.com/science/article/pii/S0167639310002086 [27] C. Valentini-Botinhao, X. Wang, S. Takaki, and J. Yamagishi, “Investigating rnn-based speech enhancement methods for noiserobust text-to-speech,” in 9th ISCA Speech Synthesis Workshop, pp. 146–152. [28] C. Veaux, J. Yamagishi, and S. King, “The voice bank corpus: Design, collection and data analysis of a large regional accent speech database,” in Int. Conf. Oriental COCOSDA, held jointly with 2013 Conference on Asian Spoken Language Research and Evaluation (O-COCOSDA/CASLRE). IEEE, 2013, pp. 1–4. [29] J. Thiemann, N. Ito, and E. Vincent, “The diverse environments multi-channel acoustic noise database: A database of multichannel environmental noise recordings,” The Journal of the Acoustical Society of America, vol. 133, no. 5, pp. 3591–3591, 2013. [30] T. Tieleman and G. Hinton, “Lecture 6.5-RMSprop: divide the gradient by a running average of its recent magnitude,” COURSERA: Neural Networks for Machine Learning 4, 2, 2012. [31] T. Salimans, I. Goodfellow, W. Zaremba, V. Cheung, A. Radford, and X. Chen, “Improved techniques for training gans,” in Advances in Neural Information Processing Systems (NIPS), 2016, pp. 2226–2234. [32] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin et al., “Tensorflow: Large-scale machine learning on heterogeneous distributed systems,” arXiv preprint arXiv:1603.04467, 2016. [33] P.862.2: Wideband extension to Recommendation P.862 for the assessment of wideband telephone networks and speech codecs, ITU-T Std. P.862.2, 2007. [34] Y. Hu and P. C. Loizou, “Evaluation of objective quality measures for speech enhancement,” IEEE Trans. on Audio, Speech, and Language Processing, vol. 16, no. 1, pp. 229–238, Jan 2008. [35] S. R. Quackenbush, T. P. Barnwell, and M. A. Clements, Objective Measures of Speech Quality. Englewood Cliffs, NJ: PrenticeHall, 1988. [36] P. Scalart and J. V. Filho, “Speech enhancement based on a priori signal to noise estimation,” in Proc. of the IEEE Int. Conf. on Acoustics, Speech, and Signal Processing (ICASSP), vol. 2, May 1996, pp. 629–632 vol. 2.
9cs.NE
A Supervised Approach to Extractive Summarisation of Scientific Papers Ed Collins and Isabelle Augenstein and Sebastian Riedel Department of Computer Science, University College London (UCL), UK {edward.collins.13|i.augenstein|s.riedel}@ucl.ac.uk arXiv:1706.03946v1 [cs.CL] 13 Jun 2017 Abstract Automatic summarisation is a popular approach to reduce a document to its main arguments. Recent research in the area has focused on neural approaches to summarisation, which can be very data-hungry. However, few large datasets exist and none for the traditionally popular domain of scientific publications, which opens up challenging research avenues centered on encoding large, complex documents. In this paper, we introduce a new dataset for summarisation of computer science publications by exploiting a large resource of author provided summaries and show straightforward ways of extending it further. We develop models on the dataset making use of both neural sentence encoding and traditionally used summarisation features and show that models which encode sentences as well as their local and global context perform best, significantly outperforming well-established baseline methods. 1 Introduction Automatic summarisation is the task of reducing a document to its main points. There are two streams of summarisation approaches: extractive summarisation, which copies parts of a document (often whole sentences) to form a summary, and abstractive summarisation, which reads a document and then generates a summary from it, which can contain phrases not appearing in the document. Abstractive summarisation is the more difficult task, but useful for domains where sentences taken out of context are not a good basis for forming a grammatical and coherent summary, like novels. Here, we are concerned with summarising scientific publications. Since scientific publications are a technical domain with fairly regular and explicit language, we opt for the task of extractive summarisation. Although there has been work on summarisation of scientific publications before, existing datasets are very small, consisting of tens of documents (Kupiec et al., 1995; Visser and Wieling, 2009). Such small datasets are not sufficient to learn supervised summarisation models relying on neural methods for sentence and document encoding, usually trained on many thousands of documents (Rush et al., 2015; Cheng and Lapata, 2016; Chopra et al., 2016; See et al., 2017). In this paper, we introduce a dataset for automatic summarisation of computer science publications which can be used for both abstractive and extractive summarisation. It consists of more than 10k documents and can easily be extended automatically to an additional 26 domains. The dataset is created by exploiting an existing resource, ScienceDirect,1 where many journals require authors to submit highlight statements along with their manuscripts. Using such highlight statements as gold statements has been proven a good gold standard for news documents (Nallapati et al., 2016a). This new dataset offers many exciting research challenges, such how best to encode very large technical documents, which are largely ignored by current research. In more detail, our contributions are as follows: • We introduce a new dataset for summarisation of scientific publications consisting of over 10k documents • Following the approach of (Hermann et al., 2015) in the news domain, we introduce a method, HighlightROUGE, which can be used to automatically extend this dataset and 1 http://www.sciencedirect.com/ Paper Title Statistical estimation of the names of HTTPS servers with domain name graphs Highlights we present the domain name graph (DNG), which is a formal expression that can keep track of cname chains and characterize the dynamic and diverse nature of DNS mechanisms and deployments. We develop a framework called service-flow map (sfmap) that works on top of the DNG.sfmap estimates the hostname of an HTTPS server when given a pair of client and server IP addresses. It can statistically estimate the hostname even when associating DNS queries are unobserved due to caching mechanisms, etc through extensive analysis using real packet traces, we demonstrate that the sfmap framework establishes good estimation accuracies and can outperform the state-of-the art technique called dnhunter. We also identify the optimized setting of the sfmap framework. The experiment results suggest that the success of the sfmap lies in the fact that it can complement incomplete DNS information by leveraging the graph structure. To cope with large-scale measurement data, we introduce techniques to make the sfmap framework scalable. We validate the effectiveness of the approach using large-scale traffic data collected at a gateway point of internet access links . Summary Statements Highlighted in Context from Section of Main Text Contributions: in this work, we present a novel methodology that aims to infer the hostnames of HTTPS flows, given the three research challenges shown above. The key contributions of this work are summarized as follows. We present the domain name graph (DNG), which is a formal expression that can keep track of cname chains (challenge 1) and characterize the dynamic and diverse nature of DNS mechanisms and deployments (challenge 3). We develop a framework called service-flow map (sfmap) that works on top of the DNG. sfmap estimates the hostname of an https server when given a pair of client and server IP addresses. It can statistically estimate the hostname even when associating DNS queries are unobserved due to caching mechanisms, etc (challenge 2). Through extensive analysis using real packet traces , we demonstrate that the sfmap framework establishes good estimation accuracies and can outperform the state-of-the art technique called dn-hunter, [2]. We also identify the optimized setting of the sfmap framework. The experiment results suggest that the success of the sfmap lies in the fact that it can complement incomplete DNS information by leveraging the graph structure. To cope with large-scale measurement data, we introduce techniques to make the sfmap framework scalable. We validate the effectiveness of the approach using large-scale traffic data collected at a gateway point of internet access links. The remainder of this paper is organized as follows: section2 summarizes the related work. [...] Table 1: An example of a document with summary statements highlighted in context. show empirically that this improves summarisation performance • Taking inspiration from previous work in summarising scientific literature (Kupiec et al., 1995; Saggion et al., 2016), we introduce a metric we use as a feature, AbstractROUGE, which can be used to extract summaries by exploiting the abstract of a paper • We benchmark several neural as well traditional summarisation methods on the dataset and use simple features to model the global context of a summary statement, which contribute most to the overall score • We compare our best performing system to several well-established baseline methods, some of which use more elaborate methods to model the global context than we do, and show that our best performing model outperforms them on this extractive summarisation #documents #instances CSPubSum Train CSPubSumExt Train CSPubSum Test CSPubSumExt Test 10148 10148 150 10148 85490 263440 N/A 131720 Table 2: The CSPubSum and CSPubSumExt datasets as described in Section 2.2. Instances are items of training data. task by a considerable margin • We analyse to what degree different sections in scientific papers contribute to a summary We expect the research documented in this paper to be relevant beyond the document summarisation community, for other tasks in the space of automatically understand scientific publications, such as keyphrase extraction (Kim et al., 2010; Sterckx et al., 2016; Augenstein et al., 2017; Augenstein and Søgaard, 2017), semantic relation extraction (Gupta and Manning, 2011; Marsi and Öztürk, 2015) or topic classification of scientific articles (Ó Séaghdha and Teufel, 2014). 2 Dataset and Problem Formulation We release a novel dataset for extractive summarisation comprised of 10148 Computer Science publications.2 Publications were obtained from ScienceDirect, where publications are grouped into 27 domains, Computer Science being one of them. As such, the dataset could easily be extended to more domains. An example document is shown in Table 1. Each paper in this dataset is guaranteed to have a title, abstract, author written highlight statements and author defined keywords. The highlight statements are sentences that should effectively convey the main takeaway of each paper and are a good gold summary, while the keyphrases are the key topics of the paper. Both abstract and highlights can be thought of as a summary of a paper. Since highlight statements, unlike sentences in the abstract, generally do not have dependencies between them, we opt to use those as gold summary statements for developing our summarisation models, following Hermann et al. (2015); Nallapati et al. (2016b) in their approaches to news summarisation. 2 The dataset along with the code is available here: https://github.com/EdCo95/ scientific-paper-summarisation 2.1 Problem Formulation As shown by Cao et al. (2015), sentences can be good summaries even when taken out of the context of the surrounding sentences. Most of the highlights have this characteristic, not relying on any previous or subsequent sentences to make sense. Consequently, we frame the extractive summarisation task here as a binary sentence classification task, where we assign each sentence in a document a label y ∈ 0, 1. Our training data is therefore a list of sentences, sentence features to encode context and a label all stored in a randomly ordered list. 2.2 Creation of the Training and Testing Data We used the 10k papers to create two different datasets: CSPubSum and CSPubSumExt where CSPubSumExt is CSPubSum extended with HighlightROUGE. The number of training items for each is given in Table 2. CSPubSum This dataset’s positive examples are the highlight statements of each paper. There are an equal number of negative examples which are sampled randomly from the bottom 10% of sentences which are the worst summaries for their paper, measured with ROUGE-L (see below), resulting in 85490 training instances. CSPubSum Test is formed of 150 full papers rather than a randomly ordered list of training sentences. These are used to measure the summary quality of each summariser, not the accuracy of the trained models. CSPubSumExt The CSPubSum dataset has two drawbacks: 1) it is an order of magnitude behind comparable large summarisation datasets (Hermann et al., 2015; Nallapati et al., 2016b); 2) it does not have labels for sentences in the context of the main body of the paper. We generate additional training examples for each paper with HighlightROUGE (see next section), which finds sentences that are similar to the highlights. This results in 263k instances for CSPubSumExt Train and 132k instances for CSPubSumExt Test. CSPubSumExt Test is used to test the accuracy of trained models. The trained models are then used in summarisers whose quality is tested on CSPubSum Test with the ROUGE-L metric (see below). 3 ROUGE Metrics ROUGE metrics are evaluation metrics for summarisation which correspond well to human judgements of good summaries (Lin, 2004). We elect to use ROUGE-L, inline with other research into summarisation of scientific articles (Cohan and Goharian, 2015; Jaidka et al., 2016). 3.1 HighlightROUGE HighlightROUGE is a method used to generate additional training data for this dataset, using a similar approach to (Hermann et al., 2015). As input it takes a gold summary and body of text and finds the sentences within that text which give the best ROUGE-L score in relation to the highlights, like an oracle summariser would do. These sentences represent the ideal sentences to extract from each paper for an extractive summary. We select the top 20 sentences which give the highest ROUGE-L score with the highlights for each paper as positive instances and combine these with the highlights to give the positive examples for each paper. An equal number of negative instances are sampled from the lowest scored sentences to match. When generating data using HighlightROUGE, no sentences from the abstracts of any papers were included as training examples. This is because the abstract is already a summary; our goal is to extract salient sentences from the main paper to supplement the abstract, not from the preexisting summary. 3.2 AbstractROUGE AbstractROUGE is used as a feature for summarisation. It is a metric presented by this work which exploits the known structure of a paper by making use of the abstract, a preexisting summary. The idea of AbstractROUGE is that sentences which are good summaries of the abstract are also likely to be good summaries of the highlights. The AbstractROUGE score of a sentence is simply the ROUGE-L score of that sentence and the abstract. The intuition of comparing sentences to the abstract is one often used in summarising scientific literature, e.g. (Saggion et al., 2016; Kupiec et al., 1995), however these authors generally encode sentences and abstract as TF-IDF vectors, then compare them, rather than directly comparing them with an evaluation metric. While this may seem somewhat like cheating, all scientific papers are guaranteed to have an abstract so it makes sense to exploit it as much as possible. 4 Method We encode each sentence in two different ways: as their mean averaged word embeddings and as their Recurrent Neural Network (RNN) encoding. 4.1 Summariser Features As the sentences in our dataset are randomly ordered, there is no readily available context for each sentence from surrounding sentences (taking this into account is a potential future development). To provide local and global context, a set of 8 features are used for each sentence which are described below. These contextual features contribute to achieving the best performances. Some recent work in summarisation uses as many as 30 features (Dlikman and Last, 2016; Litvak et al., 2016). We choose only a minimal set of features to focus more on learning from raw data than on feature engineering, although this could potentially further improve results. AbstractROUGE A new metric presented by this work, described in Section 3.2. Location Authors such as Kavila and Radhika (2015) only chose summary sentences from the Abstract, Introduction or Conclusion, thinking these more salient to summaries; and we show that certain sections within a paper are more relevant to summaries than others (see Section 5.1). Therefore we assign sentences an integer location for 7 different sections: Highlight, Abstract, Introduction, Results / Discussion / Analysis, Method, Conclusion, all else.3 Location features have been used in other ways in previous work on summarising scientific literature; Visser and Wieling (2009) extract sentence location features based on the headings they occurred beneath while Teufel and Moens (2002) divide the paper into 20 equal parts and assign each sentence a location based on which segment it occurred in - an attempt to capture distinct zones of the paper. Numeric Count is the number of numbers in a sentence, based on the intuition that sentences containing heavy maths are unlikely to be good summaries when taken out of context. Title Score In Visser and Wieling (2009) and Teufel and Moens (2002)’s work on summarising 3 based on a small manually created gazetteer of alternative names scientific papers, one of the features used is Title Score. Our feature differs slightly from Visser and Wieling (2009) in that we only use the main paper title whereas Visser and Wieling (2009) use all section headings. To calculate this feature, the non-stopwords that each sentence contains which overlap with the title of the paper are counted. Keyphrase Score Authors such as Spärck Jones (2007) refer to the keyphrase score as a useful summarisation feature. The feature uses author defined keywords and counts how many of these keywords a sentence contains, the idea being that important sentences will contain more keywords. TF-IDF Term Frequency, Inverse Document Frequency (TF-IDF) is a measure of how relevant a word is to a document (Ramos et al., 2003). It takes into account the frequency of a word in the current document and the frequency of that word in a background corpus of documents; if a word is frequent in a document but infrequent in a corpus it is likely to be important to that document. TFIDF was calculated for each word in the sentence, and averaged over the sentence to give a TF-IDF score for the sentence. Stopwords were ignored. Document TF-IDF Document TF-IDF calculates the same metric as TF-IDF, but uses the count of words in a sentence as the term frequency and count of words in the rest of the paper as the background corpus. This gives a representation of how important a word is in a sentence in relation to the rest of the document. Sentence Length Teufel et al. (2002) created a binary feature for if a sentence was longer than a threshold. We simply include the length of the sentence as a feature; an attempt to capture the intuition that short sentences are very unlikely to be good summaries because they cannot possibly convey as much information as longer sentences. 4.2 Summariser Architectures Models detailed in this section could take any combination of four possible inputs, and are named accordingly: • S: The sentence encoded with an RNN. • A: a vector representation of the abstract of a paper, created by averaging the word vectors of every non-stopword word in the abstract. Since an abstract is already a summary, this gives a good sense of relevance. It is another way of taking the abstract into consideration by using neural methods as opposed to a feature. A future development is to encode this with an RNN. • F: the 8 features listed in Section 4.1. • Word2Vec: the sentence represented by taking the average of every non-stopword word vector in the sentence. Models containing “Net” use a neural network with one or multiple hidden layers. Models ending with “Ens” use an ensemble. All non-linearity functions are Rectified Linear Units (ReLUs), chosen for their faster training time and recent popularity (Krizhevsky et al., 2012). Single Feature Models The simplest class of summarisers use a single feature from Section 4.1 (Sentence Length, Numeric Count and Section are excluded due to lack of granularity when sorting by these). Features Only: FNet A single layer neural net to classify each sentence based on all of the 8 features given in Section 4.1. A future development is to try this with other classification algorithms. Word Vector Models: Word2Vec and Word2VecAF Both single layer networks. Word2Vec takes as input the sentence represented as an averaged word vector of 100 numbers.4 Word2VecAF takes the sentence average vector, abstract average vector and handcrafted features, giving a 208-dimensional vector for classification. LSTM-RNN Method: SNet Takes as input the ordered words of the sentence represented as 100dimensional vectors and feeds them through a bi-directional RNN with Long-Short Term Memory (LSTM, Hochreiter and Schmidhuber (1997)) cells, with 128 hidden units and dropout to prevent overfitting. Dropout probability was set to 0.5 which is thought to be near optimal for many tasks (Srivastava et al., 2014). Output from the forwards and backwards LSTMs is concatenated and projected into two classes.5 4 Word embeddings are obtained by training a Word2Vec skip-gram model on the 10000 papers with dimensionality 100, minimum word count 5, a context window of 20 words and downsample setting of 0.001 5 The model is trained until loss convergence on a small dev set Figure 1: SAFNet Architecture LSTM and Features: SFNet SFNet processes the sentence with an LSTM as in the previous paragraph and passes the output through a fully connected layer with dropout. The handcrafted features are treated as separate inputs to the network and are passed through a fully connected layer. The outputs of the LSTM and features hidden layer are then concatenated and projected into two classes. SAFNet SAFNet, shown in Figure 1 is the most involved architecture presented in this paper, which further to SFNet also encodes the abstract. Ensemble Methods: SAF+F and S+F Ensemblers The two ensemble methods use a weighted average of the output of two different models: psummary = S1 (1 − C) + S2 (1 + C) 2 Where S1 is the output of the first summariser, S2 is the output of the second and C is a hyperparameter. SAF+F Ensembler uses SAFNet as as S1 and FNet as S2 . S+F Ensembler uses SNet as S1 and FNet as S2 . 5 5.1 Results and Analysis Most Relevant Sections to a Summary A straight-forward heuristic way of obtaining a summary automatically would be to identify which sections of a paper generally represent good summaries and take those sections as a summary of the paper. This is precisely what Kavila and Radhika (2015) do, constructing summaries only from the Abstract, Introduction and Conclusion. This approach works from the intuition that certain sections are more relevant to summaries. To understand how much each section contributes to a gold summary, we compute the ROUGE-L score of each sentence compared to the gold summary and average sentence-level ROUGE-L scores by section. ROUGE-type metrics are not the only metrics which we can use to determine how relevant a sentence is to a summary. Throughout the data, there are approximately 2000 occurrences of authors directly copying sentences from within the main text to use as highlight statements. By recording from which sections of the paper these sentences came, we can determine from which sections authors most frequently copy sentences to the highlights, so may be the most relevant to a summary. This is referred to as the Copy/Paste Score in this paper. Figure 2 shows the average ROUGE score for each section over all papers, and the normalised Copy/Paste score. The title has the highest ROUGE score in relation to the gold summary, which is intuitive as the aim of a title is to convey information about the research in a single line. A surprising result is that the introduction has the third-lowest ROUGE score in relation to the highlights. Our hypothesis was that the introduction would be ranked highest after the abstract and title because it is designed to give the reader a basic background of the problem. Indeed, the introduction has the second highest Copy/Paste score of all sections. The reason the introduction has a low ROUGE score but high Copy/Paste score is likely due to its length. The introduction tends to be longer (average length of 72.1 sentences) than other sections, but still of a relatively simple level compared to the method (average length of 41.6 sentences), thus has more potential sentences for an author to use in highlights, giving the high Copy/Paste score. However it would also have more sentences which are not good summaries and thus reduce the overall average ROUGE score of the introduction. Hence, although some sections are slightly more likely to contain good summary sentences, and assuming that we do not take summary sen- Figure 2: Comparison of the average ROUGE scores for each section and the Normalised Copy/Paste score for each section, as detailed in Section 5.1. The wider bars in ascending order are the ROUGE scores for each section, and the thinner overlaid bars are the Copy/Paste count. tences from the abstract which is already a summary, then Figure 2 suggests that there is no definitive section from which summary sentences should be extracted. 5.2 Comparison of Model Performance and Error Analysis Figure 3 shows comparisons of the best model we developed to well-established external baseline methods. Our model can be seen to significantly outperform these methods, including graph-based methods which take account of global context: LexRank (Radev, 2004) and TextRank (Mihalcea and Tarau, 2004); probabilistic methods in KLSum (KL divergence summariser, Haghighi and Vanderwende (2009)); methods based on singular value decomposition with LSA (latent semantic analysis, Steinberger and Ježek (2004)); and simple methods based on counting in SumBasic (Vanderwende et al., 2007). This is an encouraging result showing that our methods that combine neural sentence encoding and simple features for representing the global context and positional information are very effective for modelling an extractive summarisation problem. Figure 4 shows the performance of all models developed in this work measured in terms of accuracy and ROUGE-L on CSPubSumExt Test and CSPubSum Test, respectively. Architectures which use a combination of sentence encoding and additional features performed best by both mea- Figure 3: Comparison of the best performing model and several baselines by ROUGE-L score on CSPubSum Test. sures. The LSTM encoding on its own outperforms models based on averaged word embeddings by 6.7% accuracy and 2.1 ROUGE points. This shows that the ordering of words in a sentence clearly makes a difference in deciding if that sentence is a summary sentence. This is a particularly interesting result as it shows that encoding a sentence with an RNN is superior to simple arithmetic, and provides an alternative to the recursive autoencoder proposed by (Socher et al., 2011) which performed worse than vector addition. Another interesting result is that the highest accuracy on CSPubSumExt Test did not translate into the best ROUGE score on CSPubSum Test, although they are strongly correlated (Pearson correlation, R=0.8738). SAFNet achieved the highest accuracy on CSPubSumExt Test, however was worse than the AbstractROUGE Summariser on CSPubSum Test. This is most likely due to imperfections in the training data. A small fraction of sentences in the training data are mislabelled due to bad examples in the highlights which are exacerbated by the HighlightROUGE method. This leads to confusion for the summarisers capable of learning complex enough representations to classify the mislabelled data correctly. We manually examined 100 sentences from CSPubSumExt which were incorrectly classified by SAFNet. Out of those, 37 are mislabelled examples. The primary cause of false positives was lack of context (16 / 50 sentences) and long range dependency (10 / 50 sentences). Other important causes of false positives were mislabelled data (12 / 50 sentences) and a failure to recog- Figure 4: Comparison of the accuracy of each model on CSPubSumExt Test and ROUGE-L score on CSPubSum Test. ROUGE Scores are given as a percentage of the Oracle Summariser score which is the highest score achievable for an extractive summariser on each of the papers. The wider bars in ascending order are the ROUGE scores. There is a statistically significant difference between the performance of the top four summarisers and the 5th highest scoring one (unpaired t-test, p=0.0139). nise that mathematically intense sentences are not good summaries (7 / 50 sentences). Lack of context is when sentences require information from the sentences immediately before them to make sense. For example, the sentence “The performance of such systems is commonly evaluated using the data in the matrix” is classified as positive but does not make sense out of context as it is not clear what systems the sentence is referring to. A long-range dependency is when sentences refer to an entity that is described elsewhere in the paper, e.g. sentences referring to figures. These are more likely to be classified as summary statements when using models trained on automatically generated training data with HighlightROUGE, because they have a large overlap with the summary. The primary cause of false negatives was mislabelled data (25 / 50 sentences) and failure to recognise an entailment, observation or conclusion (20 / 50 sentences). Mislabelled data is usually caused by the presence of some sentences in the highlights which are of the form “we set m=10 in this approach”, which are not clear without context. Such sentences should only be labelled as positive if they are part of multi-line summaries, which is difficult to determine automatically. Failure to recognise an entailment, observation or conclusion is where a sentence has the form ”entity X seems to have a very small effect on Y” for example, but the summariser has not learnt that this information is useful for a summary, possibly because it was occluded by mislabelled data. SAFNet and SFNet achieve high accuracy on the automatically generated CSPubSumExt Test dataset, though a lower ROUGE score than other simpler methods such as FNet on CSPubSum Test. This is likely due to overfitting, which our simpler summarisation models are less prone to. One option to solve this would be to manually improve the CSPubSumExt labels, the other to change the form of the training data. Rather than using a randomised list of sentences and trying to learn objectively good summaries (Cao et al., 2015), each training example could be all the sentences in order from a paper, classified as either summary or not summary. The best summary sentences from within the paper would then be chosen using HighlightROUGE and used as training data, and an approach similar to Nallapati et al. (2016a) could be used to read the whole paper sequentially and solve the issue of long-range dependencies and context. The issue faced by SAFNet does not affect the ensemble methods so much as their predictions are weighted by a hyperparameter tuned with CSPubSum Test rather than CSPubSumExt. Ensemblers ensure good performance on both test sets as the two models are adapted to perform better on different examples. In summary, our model performances show that: reading a sentence sequentially is superior to averaging its word vectors, simple features that model global context and positional information are very effective and a high accuracy on an automatically generated test set does not guarantee a high ROUGE-L score on a gold test set, although they are correlated. This is most likely caused by models overfitting data that has a small but significant proportion of mislabelled examples as a byproduct of being generated automatically. 5.3 Effect of Using ROUGE-L to Generate More Data This work used a method similar to Hermann et al. (2015) to generate extra training data (Section 3.1). Figure 5 compares three models trained on CSPubSumExt Train and the same models trained Figure 5: Comparison of the ROUGE scores of FNet, SAFNet and SFNet when trained on CSPubSumExt Train (bars on the left) and CSPubSum Train (bars on the right) and . on CSPubSum Train (the feature of which section the example appeared in was removed to do this). The FNet summariser and SFNet suffer statistically significant (p = 0.0147 and p < 0.0001) drops in performance from using the unexpanded dataset, although interestingly SAFNet does not, suggesting it is a more stable model than the other two. These drops in performance however show that using the method we have described to increase the amount of available training data does improves model performance for summarisation. 5.4 Effect of the AbstractROUGE Metric on Summariser Performance This work suggested use of the AbstractROUGE metric as a feature (Section 3.2). Figure 6 compares the performance of 3 models trained with and without it. This shows two things: the AbstractROUGE metric does improve performance for summarisation techniques based only on feature engineering; and learning a representation of the sentence directly from the raw text as is done in SAFNet and SFNet as well as learning from features results in a far more stable model. This model is still able to make good predictions even if AbstractROUGE is not available for training, meaning the models need not rely on the presence of an abstract. 6 Related Work Datasets Datasets for extractive summarisation often emerged as part of evaluation campaigns for summarisation of news, organised by the challenges centered around how to encode very large documents. Figure 6: Comparison of ROUGE scores of the Features Only, SAFNet and SFNet models when trained with (bars on the left) and without (bars on the right) AbstractROUGE, evaluated on CSPubSum Test. The FNet classifier suffers a statistically significant (p=0.0279) decrease in performance without the AbstractROUGE metric. Document Understanding Conference (DUC), and the Text Analysis Conference (TAC). DUC proposed single-document summarisation (Harman and Over, 2002), whereas TAC datasets are for multi-document summarisation (Dang and Owczarzak, 2008, 2009). All of the datasets contain roughly 500 documents. The largest summarisation dataset (1 million documents) to date is the DailyMail/CNN dataset (Hermann et al., 2015), first used for single-document abstractive summarisation by (Nallapati et al., 2016b), enabling research on data-intensive sequence encoding methods. Existing datasets for summarisation of scientific documents of which we are aware are small. Kupiec et al. (1995) used only 21 publications and CL-SciSumm 20176 contains 30 publications. Ronzano and Saggion (2016) used a set of 40 papers, Kupiec et al. (1995) used 21 and Visser and Wieling (2009) used only 9 papers. The largest known scientific paper dataset was used by Teufel and Moens (2002) who used a subset of 80 papers from a larger corpus of 260 articles. The dataset we introduce in this paper is, to our knowledge, the only large dataset for extractive summarisation of scientific publications. The size of the dataset enables training of data-intensive neural methods and also offers exciting research 6 http://wing.comp.nus.edu.sg/ cl-scisumm2017/ Extractive Summarisation Methods Early work on extractive summarisation focuses exclusively on easy to compute statistics, e.g. word frequency (Luhn, 1958), location in the document (Baxendale, 1958), and TF-IDF (Salton et al., 1996). Supervised learning methods which classify sentences in a document binarily as summary sentences or not soon became popular (Kupiec et al., 1995). Exploration of more cues such as sentence position (Yang et al., 2017), sentence length (Radev et al., 2004), words in the title, presence of proper nouns, word frequency (Nenkova et al., 2006) and event cues (Filatova and Hatzivassiloglou, 2004) followed. Recent approaches to extractive summarisation have mostly focused on neural approaches, based on bag of word embeddings approaches (Kobayashi et al., 2015; Yogatama et al., 2015) or encoding whole documents with CNNs and/or RNNs (Cheng and Lapata, 2016). In our setting, since the documents are very large, it is computationally challenging to read a whole publication with a (possibly hierarchical) neural sequence encoder. In this work, we therefore opt to only encode the target sequence with an RNN and the global context with simpler features. We leave fully neural approaches to encoding publications to future work. 7 Conclusion In this paper, we have introduced a new dataset for summarisation of computer science publications, which is substantially larger than comparable existing datasets, by exploiting an existing resource. We showed the performance of several extractive summarisation models on the dataset that encode sentences, global context and position, which significantly outperform well-established summarisation methods. We introduced a new metric, AbstractROUGE, which we show increases summarisation performance. Finally, we show how the dataset can be extended automatically, which further increases performance. Remaining challenges are to better model the global context of a summary statement and to better capture crosssentence dependencies. Acknowledgments This work was partly supported by Elsevier. References Isabelle Augenstein, Mrinal Kanti Das, Sebastian Riedel, Lakshmi Nair Vikraman, and Andrew McCallum. 2017. SemEval 2017 Task 10: ScienceIE Extracting Keyphrases and Relations from Scientific Publications. In Proceedings of SemEval. Isabelle Augenstein and Anders Søgaard. 2017. MultiTask Learning of Keyphrase Boundary Classification. In Proceedings of ACL. Phyllis B Baxendale. 1958. Machine-Made Index for Technical LiteratureAn Experiment. IBM Journal of Research and Development 2(4):354–361. Ziqiang Cao, Furu Wei, Sujian Li, Wenjie Li, Ming Zhou, and Houfeng Wang. 2015. Learning Summary Prior Representation for Extractive Summarization. Proceedings of ACL . Jianpeng Cheng and Mirella Lapata. 2016. Neural Summarization by Extracting Sentences and Words. In Proceedings of ACL. Sumit Chopra, Michael Auli, and Alexander M. Rush. 2016. Abstractive Sentence Summarization with Attentive Recurrent Neural Networks. In Proceedings NAACL-HLT. Arman Cohan and Nazli Goharian. 2015. Scientific Article Summarization Using Citation-Context and Article’s Discourse Structure. In Proceedings of EMNLP. September, pages 390–400. Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching Machines to Read and Comprehend. In Proceedings of NIPS. Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural Computation 9(8):1735–1780. Kokil Jaidka, Muthu Kumar Chandrasekaran, Sajal Rustagi, and Min Yen Kan. 2016. Overview of the CL-SciSumm 2016 Shared Task. CEUR Workshop Proceedings 1610:93–102. Selvani Deepthi Kavila and Y Radhika. 2015. Extractive Text Summarization Using Modified Weighing and Sentence Symmetric Feature Methods. International Journal of Modern Education and Computer Science 7(10):33. Su Nam Kim, Olena Medelyan, Min-Yen Kan, and Timothy Baldwin. 2010. SemEval-2010 Task 5 : Automatic Keyphrase Extraction from Scientific Articles. In Proceedings of the 5th International Workshop on Semantic Evaluation. Association for Computational Linguistics, Uppsala, Sweden, pages 21– 26. Hayato Kobayashi, Masaki Noguchi, and Taichi Yatsuka. 2015. Summarization Based on Embedding Distributions. In Proceedings of EMNLP. Hoa Trang Dang and Karolina Owczarzak. 2008. Overview of the TAC 2008 Update Summarization Task. In Proceedings of TAC. Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. 2012. ImageNet Classification with Deep Convolutional Neural Networks. In Proceedings of NIPS. pages 1–9. HT Dang and K Owczarzak. 2009. Overview of the TAC 2009 Summarization Track. In Proceedings of TAC. Julian Kupiec, Jan Pedersen, and Francine Chen. 1995. A Trainable Document Summarizer. In Proceedings of SIGIR. Alexander Dlikman and Mark Last. 2016. Using Machine Learning Methods and Linguistic Features in Single-Document Extractive Summarization. CEUR Workshop Proceedings 1646:1–8. C Y Lin. 2004. ROUGE: A Package for Automatic Evaluation of Summaries. In Proceedings of the ACL Workshop on Text Summarization Branches Out (WAS). 1, pages 25–26. Elena Filatova and Vasileios Hatzivassiloglou. 2004. Event-Based Extractive Summarization. In Proceedings of ACL Workshop on Summarization. Marina Litvak, Natalia Vanetik, Mark Last, and Elena Churkin. 2016. MUSEEC: A Multilingual Text Summarization Tool. Proceedings of ACL System Demonstrations pages 73–78. Sonal Gupta and Christopher Manning. 2011. Analyzing the Dynamics of Research by Extracting Key Aspects of Scientific Papers. In Proceedings of IJCNLP. Hans Peter Luhn. 1958. The Automatic Creation of Literature Abstracts. IBM Journal of research and development 2(2):159–165. Aria Haghighi and Lucy Vanderwende. 2009. Exploring Content Models for Multi-Document Summarization. In Proceedings of ACL-HLT. June, pages 362–370. Donna Harman and Paul Over. 2002. The duc summarization evaluations. In Proceedings HLT. Erwin Marsi and Pinar Öztürk. 2015. Extraction and generalisation of variables from scientific publications. In Proceedings of EMNLP. Rada Mihalcea and Paul Tarau. 2004. TextRank: Bringing order into texts. Proceedings of EMNLP 85:404–411. Ramesh Nallapati, Feifei Zhai, and Bowen Zhou. 2016a. SummaRuNNer: A Recurrent Neural Network based Sequence Model for Extractive Summarization of Documents. Association for the Advancement of Artificial Intelligence . Ramesh Nallapati, Bowen Zhou, Caglar Gulcehre, Bing Xiang, et al. 2016b. Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyond. In Proceedings of CoNLL. Ani Nenkova, Lucy Vanderwende, and Kathleen McKeown. 2006. A Compositional Context Sensitive Multi-document Summarizer: Exploring the Factors That Influence Summarization. In Proceedings of SIGIR. Diarmuid Ó Séaghdha and Simone Teufel. 2014. Unsupervised learning of rhetorical structure with untopic models. In Proceedings of Coling. Dragomir R Radev. 2004. LexRank : Graph-based Centrality as Salience in Text Summarization. Journal of Artificial Intelligence Research 22(22):457– 479. Dragomir R Radev, Timothy Allison, Sasha BlairGoldensohn, John Blitzer, Arda Celebi, Stanko Dimitrov, Elliott Drabek, Ali Hakim, Wai Lam, Danyu Liu, et al. 2004. MEAD-A Platform for Multidocument Multilingual Text Summarization. In Proceedings of LREC. Juan Ramos, Juramos Eden, and Rutgers Edu. 2003. Using TF-IDF to Determine Word Relevance in Document Queries. Processing . Francesco Ronzano and Horacio Saggion. 2016. Knowledge Extraction and Modeling from Scientific Publications. In Proceedings of WWW Workshop on Enhancing Scholarly Data. Alexander M. Rush, Sumit Chopra, and Jason Weston. 2015. A Neural Attention Model for Abstractive Sentence Summarization. In Proceedings of EMNLP. Horacio Saggion, Ahmed Abura’ed, and Francesco Ronzano. 2016. Trainable citation-enhanced summarization of scientific articles. CEUR Workshop Proceedings 1610:175–186. Gerard Salton, James Allan, Chris Buckley, and Amit Singhal. 1996. Automatic Analysis, Theme Generation, and Summarization of Machine-Readable Texts. In Information retrieval and hypertext, Springer, pages 51–73. Abigail See, Peter J Liu, and Christopher D Manning. 2017. Get To The Point: Summarization with Pointer-Generator Networks. In Proceedings of ACL. Richard Socher, Jeffrey Pennington, Eric H Huang, Andrew Y Ng, and Christopher D Manning. 2011. Semi-Supervised Recursive Autoencoders for Predicting Sentiment Distributions. In Proceedings of EMNLP. pages 151–161. Karen Spärck Jones. 2007. Automatic summarising: The state of the art. Information Processing and Management 43(6):1449–1481. Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. 2014. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research 15:1929–1958. Josef Steinberger and Karel Ježek. 2004. Using Latent Semantic Analysis in Text Summarization. In Proceedings of ISIM. pages 93–100. Lucas Sterckx, Cornelia Caragea, Thomas Demeester, and Chris Develder. 2016. Supervised Keyphrase Extraction as Positive Unlabeled Learning. In Proceedings of EMNLP. Simone Teufel and Marc Moens. 2002. Summarizing Scientific Articles: Experiments with Relevance and Rhetorical Status. Computational linguistics 28(4):409–445. Lucy Vanderwende, Hisami Suzuki, Chris Brockett, and Ani Nenkova. 2007. Beyond SumBasic: Taskfocused summarization with sentence simplification and lexical expansion. Information Processing and Management 43(6):1606–1618. W. T. Visser and M .B. Wieling. 2009. Sentence-based Summarization of Scientific Documents . Yinfei Yang, Forrest Bao, and Ani Nenkova. 2017. Detecting (Un)Important Content for Single-Document News Summarization. In Proceedings of EACL (Short Papers). Dani Yogatama, Fei Liu, and Noah A Smith. 2015. Extractive Summarization by Maximizing Semantic Volume. In Proceedings of EMNLP. pages 1961– 1966.
2cs.AI
arXiv:1801.08374v1 [math.GR] 25 Jan 2018 MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS ROBERT A. WILSON Abstract. We give a new computer-assisted proof of the classification of maximal subgroups of the simple group 2 E6 (2) and its extensions by any subgroup of the outer automorphism group S3 . This is not a new result, but no earlier proof exists in the literature. A large part of the proof consists of a computational analysis of subgroups generated by an element of order 2 and an element of order 3. This method can be effectively automated, and via statistical analysis also provides a sanity check on results that may have been obtained by delicate theoretical arguments. Contents 1. Introduction 2. Existence of the known maximal subgroups 3. Centralizers of outer automorphisms 4. p-local analysis for p 6= 3 5. The 3-local subgroups 6. List of known conjugacy classes of simple subgroups 7. Simple subgroups centralizing an element of order 7 8. Simple subgroups centralizing an element of order 5 9. Simple subgroups centralizing an element of order 3 10. Simple subgroups centralizing an involution 11. Simple subgroups of F i22 12. Eliminating other isomorphism types of simple subgroups 13. Subgroups isomorphic to A5 14. Hurwitz groups 15. Classifying (2, 3, 11) triples 16. Classifying (2, 3, 13) triples 17. Classifying (2, 3, 17) triples 18. Classifying (2, 3, 19) triples 19. Status report 20. Using the Monster 21. Using the Baby Monster 22. Further remarks References Appendix: (2C, 3C, 11) generators for 2 E6 (2) Date: Started on 13th March 2016. This version 25th January 2018. 1 2 2 3 4 5 8 8 11 12 15 15 16 17 19 21 23 27 33 33 34 37 39 40 42 2 ROBERT A. WILSON 1. Introduction The maximal subgroups of 2 E6 (2) and its automorphism groups are part of the folklore, but, as far as I am aware, no proof has ever been published. I believe the original result was obtained by some subset of Peter Kleidman, Simon Norton and myself, some time around 1989, but I cannot be entirely certain of that. In any case, it seems to be worthwhile to provide a new proof, in the interests of increasing confidence in the result. Throughout, let G be the simple group 2 E6 (2) of order 236 .39 .52 .72 .11.13.17.19. Its automorphism group has shape G.S3 , in which the diagonal automorphism group has order 3, and the field automorphism has order 2. We aim to prove that the maximal subgroups of G, G.2, G.3 and G.S3 are as listed in the Atlas [2], apart from one or two minor errors in the structure of certain subgroups. In Section 2 we prove the existence of the subgroups listed in the Atlas, with the required corrections, and deduce the existence of 39 isomorphism types of proper non-abelian simple subgroups of G. In Sections 3, 4 and 5 we classify the p-local subgroups in G.S3 for all relevant primes p. In Section 6 we list as many conjugacy classes of simple subgroups as we can, with justification given in Sections 7, 8, 9, 10 and 11. This includes a complete classification of simple subgroups centralized by elements of order 5 or 7, and hence yields complete classification of non-abelian characteristically simple subgroups that are not simple. We begin the non-local analysis in Section 12 by determining the proper nonabelian simple subgroups up to isomorphism. We then embark on the main part of the classification, first using structure constant analysis. Subgroups generated by (2, 3, n) triples for n = 5, 7, 11, 13, 17, 19 are classified in Sections 13, 14, 15, 16, 17, 18 respectively. These results, summarized in Section 19, give sufficient information in 23 of the 39 cases. We then move on in Section 20 to methods using the embedding of 22 . 2 E6 (2):S3 in the Monster. Essentially we use Norton’s extensive work on subgroups of the Monster to restrict the possibilities for maximal subgroups of G. This deals with a further 12 cases. The final four cases are dealt with in Section 21, and use detailed knowledge of subgroups of the Baby Monster, much of it obtained by computational means. The final Section 22 includes alternative, computer-free, proofs for some of the results. Our notation throughout follows the Atlas [2]. In particular, O is used for the generically simple groups of orthogonal type, for example O5 (3) denotes the simple group of order 25920. 2. Existence of the known maximal subgroups There are four conjugacy classes of maximal parabolic subgroups of G, all of which extend to G.S3 , as follows: • the centralizer 21+20 :U6 (2) of a 2A-involution (a {3, 4}-transposition), extending to 21+20 :U6 (2):S3 in G.S3 ; • a four-group normalizer 22+9+18 :(L3 (4)×S3 ), extending to a group of shape 22+9+18 :(L3 (4):S3 × S3 ) in G.S3 ; • a 23 -normalizer 23+4+12+12 :(A5 × L3 (2)): note that the structure of this group is given incorrectly in the Atlas; it extends to a group of shape 23+4+12+12 :(A5 × L3 (2) × S3 ) in G.S3 ; • a group of shape 28+16 :O8− (2), extending to 28+16 :(O8− (2) × 3):2 in G.S3 . MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 3 The following are maximal rank subgroups of G which can be read off from the Dynkin diagram, and also extend to G.S3 . • S3 × U6 (2), of type A1 + 2 A5 , extending to S3 × U6 (2):S3 in G.S3 ; − − • O10 (2), of type 2 D5 , extending to (O10 (2) × 3):2 in G.S3 ; • L3 (2) × L3 (4), of type A1 + A1 (q 2 ): this acquires an extra automorphism, giving (L3 (2) × L3 (4)):21 in G, and extending to (L3 (2) × L3 (4):S3 ):2 in G.S3 ; by looking at centralizers of outer element of order 14 in G.2, we can see that the L3 (4):S3 that centralizes L3 (2) contains automorphisms of type 22 , in Atlas notation. There are also the following subgroups of G with their Lie type names: • F4 (2), in three conjugacy classes in G, extending to F4 (2) × 2 in G.S3 ; • (3 × O8+ (2):3):2, of type T1 + D4 , extending to (32 :2 × O8+ (2)):S3 in G.S3 ; • 3 D4 (2):3, extending to 3 D4 (2):3 × S3 in G.S3 ; • U3 (8):3, of type 2 A1 (q 3 ), extending to (3 × U3 (8):3):2 in G.S3 ; • 32 :Q8 × U3 (3):2, of type 2 A1 + G2 , extending to 32 :2S4 × U3 (3):2 in G.S3 ; • 31+6 :23+6 :32 :2, of type 3(2 A1 ), extending to 31+6 :23+6 :31+2 :22 in G.S3 . • 35 :O5 (3):2, the normalizer of a maximal torus, extending to 36 :(2×O5 (3):2) in G.S3 ; The normalizers of the groups 3 D4 (2):3 and 35 :O5 (3):2 are not maximal in G or G.2, as they are contained in F4 (2) and O7 (3) respectively. As we shall see later on, their normalizers are however maximal when the diagonal automorphism of order 3 is adjoined. Finally, as shown by Fischer, G contains • F i22 , in three conjugacy classes in G, extending to F i22 :2 in G.S3 ; • O7 (3), in three conjugacy classes in G, extending to O7 (3):2 in G.S3 . It turns out that the normalizer of O7 (3) is maximal only in G.2. − In particular, G contains subgroups isomorphic to U6 (2), O10 (2), F4 (2), U3 (8), and F i22 . Using knowledge of the maximal subgroups of these subgroups [1, 7, 5], we obtain the following list of 39 isomorphism types of known simple subgroups of G: • A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , • L2 (7), L2 (8), L2 (11), L2 (13), L2 (16), L2 (17), L2 (25), L3 (3), L3 (4), L4 (3), • U3 (3), U3 (8), U4 (2), U4 (3), U5 (2), U6 (2), − • O7 (3), O8+ (2), O8− (2), O10 (2), S4 (4), S6 (2), S8 (2), • 2 F4 (2)′ , 3 D4 (2), G2 (3), F4 (2), M11 , M12 , M22 , F i22 . We shall show in Section 12 below that every nonabelian simple proper subgroup of G is isomorphic to one of these 39 groups. 3. Centralizers of outer automorphisms The outer automorphism group of G is S3 , and a number of maximal subgroups may be obtained as centralizers of outer automorphisms of G, of order 2 or 3. The outer automorphisms of order 2 are given in the Atlas [2], namely the elements in classes 2D and 2E. Those of order 3 are not listed there, but are available in the GAP [3] character table of G:3. In Atlas notation these are elements in classes 3D, 3E, 3F , 3G and their inverses. Piecing together information from these various sources, we find the structures of the centralizers in G as follows; • CG (2D) ∼ = F4 (2); 4 ROBERT A. WILSON • • • • • CG (2E) ∼ = [215 ]:S6 (2) < F4 (2); − CG (3D) ∼ (2); = O10 3 ∼ CG (3E) = D4 (2):3; CG (3F ) ∼ = U5 (2) × S3 < S3 × U6 (2); CG (3G) ∼ = U3 (8):3. 4. p-local analysis for p 6= 3 In the simple group G, and in the group G:3 containing the diagonal automorphisms, the maximal 2-local subgroups are, by the Borel–Tits theorem, just the maximal parabolic subgroups, which are well-known. Since all outer automorphisms of 2 E6 (2) are of diagonal or field type, all the parabolic subgroups are normalized by the full outer automorphism group, and no more maximal subgroups arise in any extension of G as normalizers of 2-subgroups of G. In G:2 the 2-local subgroups include the centralizers of outer automorphisms of G of order 2, which were considered in Section 3 above. For the cyclic Sylow p-subgroups, that is, for p = 19, 17, 13, or 11, we have the following normalizers in G: • N (19) ∼ = 19:9 < U3 (8):3; − • N (17) ∼ (2); = 17:8 < O10 3 ∼ • N (13) = 13:12 < D4 (2):3 < F4 (2); • N (11) ∼ = S3 × 11:5 < S3 × U6 (2). Extending to G.S3 we obtain the following. ∼ (19:9 × 3):2 < (3 × U3 (8):3):2; • N (19) = − • N (17) ∼ (2)):2; = 17:8 × S3 < (3 × O10 3 • N (13) ∼ = 13:12 × S3 < S3 × D4 (2):3; • N (11) ∼ = S3 × (3 × 11:5):2 < S3 × U6 (2):S3 . We turn next to the Sylow subgroups of order p2 , that is, p = 7 or 5. The relevant normalizers in G as follows. • N (7A) ∼ = (7:3 × L3 (4)):2 < (L3 (2) × L3 (4)):2. • N (7B) ∼ = (7:3 × L3 (2)):2 < (L3 (2) × L3 (4)):2. • the subgroup 3 D4 (2):3 contains 72 :(3×2A4 ), which is the full 72 -normalizer, since the 72 is self-centralizing, and the stabilizer of any one of the cyclic 7-subgroups is (7:3 × 7:3):2, and there are two classes, each of four such cyclic subgroups. − • N (5) ∼ (2). = (D10 × A8 ). 2 < O10 • the centralizer of the Sylow 5-subgroup is 52 × 3, so the normalizer lies in (3 × O8+ (2):3):2, and therefore has shape (3 × 52 :4A4 ):2. These normalizers extend to G.S3 as follows. • N (7A) ∼ = (7:3 × L3 (4):S3 ):2; • N (7B) ∼ = (7:3 × S3 × L3 (2)):2; • N (72 ) ∼ = S3 × 72 :(3 × 2A4 ); • N (5) ∼ = (D10 × (3 × A8 ):2). 2; 2 ∼ • N (5 ) = (32 :2 × 52 :4A4 ):2. In particular, in this section we have proved the following. Theorem 1. If p ≥ 5, then no p-local subgroup is maximal in G or any extension of G by outer automorphisms. MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 5 This leaves just the 3-local subgroups to determine. 5. The 3-local subgroups Since we have already dealt with the centralizers of outer automorphisms of G of order 3, we may restrict attention to the normalizers of elementary abelian 3groups inside G. The three classes of subgroups of order 3 in G have the following normalizers: • N (3A) ∼ = S3 × U6 (2); • N (3B) ∼ = (3 × O8+ (2):3):2; • N (3C) ∼ = 31+6 .23+6 .32 .2 = 3. (32 :Q8 × 32 :Q8 × 32 :Q8 ):32 :2. Note that in this last case, the Atlas [2, p. 191] claims the quotient 32 :2 is isomorphic to 3 × S3 . That this is not the case is easily seen by comparing with the subgroup 31+6 :(2A4 × A4 ):2 of O7 (3). Next we classify the elementary abelian subgroups of order 9 in G. Note first that there is a maximal torus with normalizer 35 :O5 (3):2, in which the isotropic points are of type 3C and the + points of type 3B, and the − points of type 3A. Hence we get the fusion of classes of elements of order 3 in 3 × O8+ (2) and 3 × U6(2). Alternatively, observe that the restriction of the 2-modular Brauer character of degree 78 to the former has constituents of degrees 2 + 28 + 48, from which the fusion of outer elements of order 3 can also be read off. The full fusion of elements of order 3 is given in the following tables. 3ABC O8+ (2) : G: 3B diagonal: 3AA 3D 3C 3BB U6 (2) : 3A G: 3A diagonal: 3BB 3E 3A 3CC 3F 3B 3BB 3G 3C 3CC 3B 3C 3C 3B 3AA 3CC Thus there are 6 classes of 32 that contain 3A or 3B elements, and they have one of the types 3AABB, 3AAAC, 3ABCC, 3BBBC, 3BBBB, or 3BCCC. Note also that the centralizer in O8+ (2) of an element of class 3F is U3 (3):2, while the centralizer of an element of class 3G is 32 :2A4 , in which the normal 32 consists of 3D-elements, and all other 3-elements are in 3E. In order to determine the class fusion from N (3C) we need to describe the structure of this group in some detail. There is a normal subgroup of index 18 formed from the central product of three copies of 31+2 :Q8 . Acting on this is (a) an element of order 3 extending each copy to 31+2 :2A4 , (b) and element of order 3 permuting the three copies, and (c) an involution which swaps two copies and extends the third to 31+2 :2S4 . Now the outer automorphism of order 3 of G conjugates the elements of type (b) to the products of (b) with (a). Hence we do not need to consider these other two cosets separately. As we know the 32 groups of type 3AAAC and 3BBBC, we can identify these with elements in one copy of 31+2 , and elements diagonal between two copies, respectively. Hence the elements diagonal between all three copies are in 3C. Now in 31+2 :2A4 , there are two types of outer elements: one is of order 3, and centralizes 3 × 32 :2, while the other is of order 9, and is self-centralizing. It follows that in the coset of type (a) we see four types of groups of order 32 , according to how many of the factors 31+2 contribute something of order 9. If none, we obtain a 6 ROBERT A. WILSON 32 with centralizer 32 × 33 :23 :3. If one, we obtain an element of order 9 with centralizer of order 34 .22 , and if two, an element of order 9 and centralizer of order 34 .2. If all three, then we again obtain an elementary abelian 32 , whose centralizer is elementary abelian of order 34 . In the coset of type (b) we see two types of elementary abelian groups of order 32 , one with centralizer 32 × 32 :2A4 , the other with centralizer elementary abelian of order 34 . The first 32 of type (a) must be of type 3ABCC, and the 35 normal in its centralizer is exactly the 35 with normalizer 35 :O5 (3):2. The other 32 of type (a) is necessarily pure 3C. The first 32 of type (b) is then forced to be of type 3BCCC, and the second is again pure 3C. In particular, there are just two classes of 32 of pure 3C type in G.S3 . However, the second class splits into three classes in G. We are now ready to classify the maximal 3-local subgroups. The strategy is to deal first with the elementary abelian groups of pure 3C type, then those that contain 3A elements, and finally those that contain 3B elements but not 3A elements. Lemma 1. Every 3C pure elementary abelian group has normalizer in G contained in one of the following groups: • 31+6 :23+6 :32 :2; • 35 :O5 (3):2; • 33+3 :L3 (3) (three classes). Proof. Suppose we have an elementary abelian 3-group of pure 3C type containing the normal 3 in N (3C). If it does not lie in 31+6 , then its centralizer is elementary abelian of order 34 , and the centralizer contains 3B elements. Moreover, the subgroup generated by these 3B-elements has order 33 , and contains a unique 3C-pure 32 , which lies inside 31+6 . Now some straightforward calculations shows that the latter group contains three classes of 3C-pure 33 under the action of the group (Q8 × Q8 × Q8 ):32 :2, each with centralizer of order 36 . Such a centralizer consists of 32 × 31+2 inside 31+6 , together with an outer element which is of type (b) in one case, and a product of type (a) and type (b) in the other two cases. Thus these three classes are fused in G.3. Hence each such group has normalizer 33+3 :L3 (3), which is already visible inside O7 (3). Moreover, any 32 subgroup of this 33 has centralizer of shape (3 × 31+4 ).32 which is the centralizer of an isotropic 2-space in 35 :O5 (3):2. Hence the normalizer of this 32 is contained in the latter group, and has shape 35 :31+2 :2S4 . ⊓ ⊔ We turn next to the 3A elements. Lemma 2. The normalizer of every elementary abelian subgroup of G generated by 3A elements lies in one of the following: • the normalizer of a pure 3C type elementary abelian group; − • (S3 × S3 × U4 (2)):2, contained in O10 (2); 5 • the group 3 :O5 (3):2. Proof. From the above class fusion, we see that any elementary abelian 3-group generated by 3A elements either contains 3B elements, or has a unique subgroup of index 3 that is pure 3C. The latter case corresponds to subgroups of U6 (2) of pure 3B type, and is covered by Lemma 1. In U6 (2) the centralizer of a 3A element is 3 × U4 (2), and the centralizer of a 3C element is a soluble group of order 23 .35 , and shape 34 :(2 × A4 ). MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 7 There is a unique 32 of type 3AABB, and it has normalizer (S3 × S3 × U4 (2)):2, − contained in O10 (2). Any 33 generated by 3A elements lies inside 32 × U4 (2), corresponding to one of the three classes of subgroups of order 3 in U4 (2). Hence there are three types of 33 generated by 3A elements and containing 3B elements. One has a unique subgroup of order 3 containing 3C elements, so we can ignore this case. The other two have either 3 cyclic subgroups of type 3A, and 6 of type 3B, or vice versa, and in both cases the centralizer contains a unique Sylow 3 subgroup, which is the torus of order 35 described above. ⊓ ⊔ Hence we reduce to considering elementary abelian 3-groups which contain 3B elements but no 3A elements. Lemma 3. The normalizer in G of every elementary abelian group that contains 3B elements but no 3A elements lies in one of the following: • • • • N (3B); 32 :Q8 × U3 (3):2; N (3A); N (3C). Proof. If the elementary abelian group lies in 3 × O8+ (2), then essentially the same argument as in Lemma 2, with 3A and 3B interchanged, proves that we are in one of the cases already considered. This is because in O8+ (2) we have C(3A/B/C) ∼ = 3 × U4 (2), while C(3E) contains a unique elementary abelian 34 . If it contains an outer element of O8+ (2):3, then either this is in class 3F or class 3G of O8+ (2):3, in Atlas notation. In the 3F case, we obtain a pure 3B type 32 , with normalizer 32 :Q8 × U3 (3):2. Now the class fusion from U3 (3) to O8+ (2) goes via S6 (2) classes 3B and 3C respectively, so O8+ (3) classes 3D and 3E. Thus any larger elementary abelian 3-group containing the 32 of type 3BBBB either contains a unique cyclic subgroup containing 3A elements, or contains a unique cyclic subgroup containing 3C elements. In the 3G case, the 32 has type 3BCCC, so its normalizer lies in N (3B). Its centralizer in O8+ (2) is a group of shape 32 :2A4 , in which the normal 32 consists of 3D elements, and all other 3-elements are in class 3E. Again, 3E elements fuse to 3A in G, so can be excluded. We can also assume that our elementary abelian 3-group contains no elements of class 3F in O8+ (2):3. But this implies that any remaining elementary abelian 3-group contains 3B elements but is not generated by them. Hence its normalizer is contained in a case already considered. ⊓ ⊔ This concludes the proof of the following theorem. Theorem 2. Every 3-local subgroup of G is contained in one of the following subgroups: • • • • • • • N (3A) = S3 × U6 (2); N (3B) = (3 × O8+ (2):3):2; N (3C) = 31+6 :Q38 :32 :2; − N (3AABB) = (S3 × S3 × U4 (2)):2, contained in O10 (2); 2 2 N (3B ) = 3 :Q8 × U3 (3):2; 35 :O5 (3):2, contained in O7 (3); 33+3 :L3 (3), contained in O7 (3) (three conjugacy classes). 8 ROBERT A. WILSON 6. List of known conjugacy classes of simple subgroups The main part of the proof below is a classification of simple subgroups up to conjugacy. In order to facilitate this proof, we first list as many conjugacy classes of simple subgroups as we can. Tables 1, 2 and 3 contain one row for each conjugacy class in G.S3 , of known simple subgroups S. We give the normalizer N in G.S3 , and the number n of conjugacy classes in G (which may be 1, 2, 3 or 6), as well as a maximal overgroup M of N in many cases. The next several sections are devoted to proving the results contained in these tables. In fact, most of the known simple subgroups lie in the centralizer of some (inner or outer) automorphism, so we deal with these first. We start by centralizing elements of order 7, followed by 5, 3 and 2. We conclude with some subgroups of F i22 . Structures of normalizers are given in G.S3 unless otherwise stated. 7. Simple subgroups centralizing an element of order 7 The centralizers of elements of order 7 in G are C(7A) ∼ = 7 × L3 (4) and C(7B) ∼ = 7 × L3 (2). Power maps show that a 7A element commutes with elements in classes 2B, 3B, 4D, 4E, 4F, 5A and that a 7B element commutes with elements of classes 2A and 3A, and 4A. It is clear from the 7-local analysis that in L3 (2) × L3 (4) the L3 (2) factor contains 7A elements and the L3 (4) contains 7B elements. It follows immediately that every L3 (2) × L3 (2) contains one factor with 7A-elements and the other with 7B-elements, so there is no automorphism swapping the two factors. We have N (7B) = (7:3 × S3 × L3 (2)):2) in G.S3 , so the only simple group centralizing a 7B element is an L3 (2) with normalizer (L3 (2) × L3 (4):2):S3 . Also N (7A) = (7:3 × L3 (4):3:2):2, and the normalizers of the simple subgroups of L3 (4):D12 are • One class of A . 22 . 6 • One class of L3 (2):2 × 2. • One class of S3 × S5 . • One class of S5 . All these simple groups centralize L3 (2) in G, but may centralize more. First, the L3 (2) contains a 7B element, so the centralizer does not grow, and the normalizer in G.S3 is L3 (2):2 × L3 (2):2. The other groups all contain elements of order 5, so the centralizer lies in (3 × A8 ):2. The A5 in S3 × S5 must be the one with normalizer (A5 × 3 × A8 ):22 . The other two normalizers do not contain the full A8 , but in the case of A6 the normalizer contains L3 (2) and an involution that normalizes the A6 and centralizes the element of order 5, and hence the normalizer is (L3 (2) × A6 .2):2. In the case of the last S5 , the normalizer is in fact 23 :L3 (2) × S5 . Remark 1. From the class fusion to the factors of L3 (2) × L3 (4) we can compute the restriction of the character of degree 1938 to these factors. There is then only one way to fit them together into characters of the direct product, thus: 1 ⊗ 1 + 3a ⊗ 45a + 3b ⊗ 45b + 6 ⊗ (12 + 202 ) + 7 ⊗ 35abc + 8 ⊗ (1 + 20 + 64). Hence we can compute the character value on the diagonal involutions to be 18, and on the diagonal elements of order 3 to be −6. It follows that these diagonal elements are in classes 2C and 3C. In particular, the diagonal copies of L3 (2) in L3 (2) × L3 (4) are of type (2C, 3C, 7A) and (2C, 3C, 7B). It is not immediately MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS Table 1. Some simple subgroups, I (a) with elements of order 19 S N M U3 (8) (3 × U3 (8):3):2 n 1 (b) with elements of order 17 but not 19 S − O10 (2) F4 (2) S8 (2) S8 (2) O8− (2) O8− (2) S4 (4) L2 (17) L2 (17) L2 (16) L2 (16) N − (3 × O10 (2)):2 F4 (2) × 2 S8 (2) × S3 S8 (2) × 2 O8− (2):2 × S3 O8− (2):2 × 2 S4 (4):2 × S3 L2 (17) × S3 L2 (17) × 2 L2 (16):2 × S3 L2 (16):2 × S3 M − (3 × O10 (2)):2 2 × F4 (2) − (3 × O10 (2)):2 2 × F4 (2) − (3 × O10 (2)):2 − (3 × O10 (2)):2 2 × F4 (2) − (3 × O10 (2)):2 − (3 × O10 (2)):2 n 1 3 1 3 1 3 1 1 3 1 1 Notes 7A 7A 7B 7A 7B (c) with elements of order 13 but not 17 or 19 S 3 D4 (2) 3 D4 (2) 2 F4 (2)′ L2 (25) L4 (3) L3 (3) F i22 O7 (3) G2 (3) L2 (13) N D4 (2):3 × S3 3 D4 (2):3 × 2 2 × 2 F4 (2) 2 × L2 (25). 2 2 × L4 (3):2 2 × L3 (3):2 F i22 :2 O7 (3):2 G2 (3):2 L2 (13):2 M 3 2 × F4 (2) 2 × F4 (2) 2 × F4 (2) 2 × F4 (2) 2 × F4 (2) F i22 :2 F i22 :2 n 1 3 3 3 3 3 3 3 3 3 Notes 3A, 3C, 7B, 7A 3B, 3C, 7A, 7B 7B 7B 7B 7B (d) with elements of order 11 but not 13, 17 or 19 S A12 A11 M12 M11 M11 L2 (11) L2 (11) M22 U6 (2) U5 (2) N (3 × A12 ):2 (3 × A11 ):2 M12 × 3 M11 × 3 M11 × 3 S3 × (3 × L2 (11)):2 (L2 (11) × 3):2 S3 × M22 :2 S3 × U6 (2):S3 S3 × (3 × U5 (2)):2 M − (3 × O10 (2)):2 − (3 × O10 (2)):2 − (3 × O10 (2)):2 − (3 × O10 (2)):2 − (3 × O10 (2)):2 U6 (2):3 × S3 − (3 × O10 (2)):2 S3 × U6 (2):S3 S3 × U6 (2):S3 n 1 1 2 2 2 1 1 3 1 1 Notes 7A 7A 2B, 3B 2C, 3C 7B 7B Note: in fact this is a complete list of conjugacy classes of the given simple groups. This fact is proved in this paper. 9 10 ROBERT A. WILSON Table 2. Some simple subgroups, II (e) with elements of order 7 but not 11, 13, 17, 19 S O8+ (2) O8+ (2) A10 A10 A9 A9 A8 A8 A7 A7 A7 S6 (2) S6 (2) S6 (2) L2 (8) L2 (8) L2 (8) L2 (8) L2 (8) L2 (8) L2 (8) L2 (8) L2 (8) U4 (3) L3 (4) L3 (2) L3 (2) L3 (2) L3 (2) L3 (2) U3 (3) U3 (3) N O8+ (2):31+2 :22 2 × O8+ (2):S3 S3 × S10 2 × S10 (A9 × 32 :2):2 S9 × 2 (A8 × A5 × 3):22 (A8 × A4 × 3):22 (A7 × A5 × 3):22 S7 × S3 S7 × S3 S3 × S3 × S6 (2) 2 × S3 × S6 (2) 2 × S6 (2) S3 × S3 × L2 (8):3 2 × L2 (8):3 S3 × S3 × L2 (8):3 2 × L2 (8):3 2 × L2 (8):3 22 × L2 (8) 22 × L2 (8) 2 × L2 (8) 2 × L2 (8) S3 × U4 (3).22 (L3 (2) × L3 (4):2):S3 L3 (2):2 × L3 (2):2 (L3 (2) × L3 (4):2):S3 L3 (2) × 24 :(3 × A5 ):2 L3 (2):2 × S3 L3 (2):2 U3 (3):2 × 32 :2S4 U3 (3):2 × 2 × S3 M 2 × F4 (2) − (3 × O10 (2)):2 2 × F4 (2) O8+ (2):31+2 :22 2 × F4 (2) − (3 × O10 (2)):2 − (3 × O10 (2)):2 − (3 × O10 (2)):2 N (3A) N (3A) − (3 × O10 (2)):2 2 × F4 (2) 21+20 :U6 (2):S3 S3 × 3 D4 (2):3 2 × F4 (2) S3 × U6 (2):S3 N (2A) N (2A) N (2A) N (2A) N (2A) N (2A) S3 × U6 (2):S3 (L3 (2) × L3 (4):S3 ):2 N (2A3 ) − (3 × O10 (2)):2 (L3 (2) × L3 (4):S3 ):2 2 × F4 (2) n 1 3 1 3 1 3 1 1 1 3 3 1 3 6 1 3 1 3 2 3 3 6 6 3 1 3 1 1 1 3 1 3 Notes 7A 7B 7A 7B 7A 7B 7A 7A 7A 3A, 3C, 7B 3C, 3C, 7B 7A 7B 7B 7A 7A 7B 7B 7B 7B 7B 7B 7B 7B 2B, 3B, 7B 2B, 3B, 7B 2A, 3A, 7A 2B, 3A, 7A 2C, 3C, 7A 2C, 3C, 7B 7A 7B Note: This list is claimed to be complete in the cases O8+ (2), A10 , A9 , A8 , A7 , S6 (2), L2 (8), but not necessarily in the cases L2 (7), L3 (4), U3 (3), and U4 (3). obvious what the centralizers of these copies of L3 (2) are, and we shall come back to this problem later. We conclude this section by summarizing the consequences for the classification of maximal subgroups with non-simple minimal normal subgroups. Theorem 3. There is exactly one class of characteristically simple subgroup of G.S3 that has order divisible by 7 and is not simple. Such groups are isomorphic to L3 (2) × L3 (2) and have normalizers L3 (2):2 × L3 (2):2, all of which are contained in (L3 (2) × L3 (4):S3 ):2. The class splits into three classes in G. MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 11 Table 3. Some simple subgroups, III (f) without elements of order 7, 11, 13, 17, 19 S U4 (2) U4 (2) A6 A6 A5 A5 A5 A5 A5 A5 A5 A5 A5 A5 N 32 :D8 × (3 × U4 (2)):2 2 × S3 × U4 (2):2 S6 × S6 × S3 (A6 .2 × L3 (2)):2 S5 × S6 × S3 (A5 × 3 × A8 ):22 S5 × 23 :L3 (2) S5 × S3 (A5 × 23 :S4 ):2 (A5 × 24 :32 :2):2 (A5 × [27 .3]).2 (A5 × [25 .32 ]).2 A5 × [26 .3] (A5 × [24 ]).2 M − (3 × O10 (2)):2 S3 × U6 (2):S3 − (3 × O10 (2)):2 (L3 (4):S3 × L3 (2)):2 − (3 × O10 (2)):2 − (3 × O10 (2)):2 N (2A3 ) − (3 × O10 (2)):2 n 1 3 1 3 1 1 3 1 3 1 3 1 3 3 Notes U4 (2) < U6 (2) O6− (2) < U6 (2) 2B, 3B 2B, 3A 2B, 3B 2B, 3B 2C, 3C 2C, 3B 2C, 3A 2B, 3B 2B, 3B 2C, 3B 2C, 3B Note: This list is claimed to be complete in the cases A5 and U4 (2), but not necessarily in the case A6 . 8. Simple subgroups centralizing an element of order 5 In G.S3 we have N (5A) = (D10 × 3 × A8 ):22 , and the normalizers of the simple subgroups of S8 are • One class of S7 . • One class of S6 × 2. • One class of S5 × 3. • One class of S5 × 2. • One class of L3 (2):2. • One class of L3 (2). All these simple groups centralize 3 × A5 , but may centralize more. The ones with order divisible by 7 have centralizers inside L3 (4):S3 . Clearly the L3 (2) in L3 (2):2 is the one which centralizes L3 (4). The other L3 (2) centralizes 24 :A5 , and has normalizer L3 (2) × 24 :(3 × A5 ):2, lying inside the maximal parabolic subgroup of shape 23 .24 .212 .212 .(S5 × L3 (2) × S3 ) in G.S3 , and remaining a single class in G. Since there is no parabolic subgroup containing A7 × A5 , the A7 has normalizer just (3 × A5 × A7 ):22 . The A5 in S5 × S3 centralizes a 3B element and is therefore − conjugate in O8+ (2):S3 to the one that centralizes A8 . The S6 lies in O10 (2) acting as S4 (2), so centralizes S6 . Hence the normalizer of the A6 is S6 × S6 × S3 in G.S3 . The remaining A5 also centralizes the same S6 , so has normalizer S5 × S6 × S3 . Power maps give the class fusion from A8 to G. The elements of A8 -classes 2A, 2B, 3A, 3B fuse to G-classes 2A, 2B, 3B, 3A respectively. In particular, the 5point A5 in A8 is of type (2B, 3B), while the 6-point A5 is of type (2B, 3A). − Since S6 is maximal in A8 , it follows that the centralizer in both O10 (2) and G of this A5 of type (2B, 3A) is exactly S6 . It follows that there are just two classes of A5 × A5 in which the two factors are conjugate in G. One of these has factors of type (2B, 3B) and centralizer of order 3, so its normalizer in G is contained in 12 ROBERT A. WILSON (3 × O8+ (2):3):2. The other has factors of type (2B, 3A), and has trivial centralizer, − and its normalizer in G is contained in (S6 × S6 ):2 in O10 (2). Similarly, there is a unique conjugacy class of A6 × A6 , with normalizer (S6 × S6 ):2 in G, contained in − O10 (2). We summarize the consequences for maximal subgroups with non-simple minimal normal subgroups. Theorem 4. There are four classes of characteristically simple subgroups of G.S3 that have order divisible by 5 and are not simple, as follows. − (2)):2. • One class of A6 ×A6 , with normalizer S6 ≀2×S3 , contained in (3×O10 • One class of A5 × A5 with normalizer contained in N (3B). • Two classes of A5 × A5 with normalizer contained in S6 ≀ 2 × S3 . 9. Simple subgroups centralizing an element of order 3 9.1. Groups centralizing a 3G element. We have N (3G) = (3 × U3 (8):3):2, and the only proper non-abelian simple subgroup of U3 (8) is a single class of L2 (8). Now a 7A element commutes with L3 (4):S3 , which has two classes outer 3-elements, fusing to 3D and 3E respectively. Similarly, a 7B element commutes with (L2 (7) × 3):2 which also has two classes of outer 3-elements, fusing to 3E and 3G respectively. In particular, the 7-elements in U3 (8) lie in 7B, so the L2 (8) is of type (2C, 3C, 7B). Hence the L2 (8) centralizes in G.S3 a proper subgroup of (L2 (7) × 3):2, containing 32 :2. The normalizer therefore contains L2 (8):3 × 32 :2, in which the centralizing 32 contains one cyclic subgroup of type 3A, one of type 3E, and two of type 3G. Hence there is also an element of the normalizer interchanging the two subgroups of type 3G, so the normalizer in G.S3 contains S3 × S3 × L2 (8):3. But S3 × S3 is maximal in (L2 (7) × 3):2, so this is the full normalizer. 9.2. Groups centralizing a 3E element. Next consider the case 3E, where we have N (3E) = 3 D4 (2):3×S3 . Now 3 D4 (2) contains just three classes of proper nonabelian simple subgroups, with normalizers S3 × L2 (8), U3 (3):2, and (7 × L2 (7)):2. The 7-elements in L2 (7) and U3 (3) are in 3 D4 (2) class 7D, so G-class 7A, while those in L2 (8) are in 7B. (Warning: there are two classes of 3 D4 (2), with opposite fusion of 7-elements. The one under consideration here contains 3A-elements, so 7ABC fuses to 7B while 7D fuses to 7A. The other one contains 3B-elements. These facts are verified below using structure costants.) The above group L2 (8) therefore has type (2C, 3C, 7B) and its normalizer in G.S3 is S3 × S3 × L2 (8):3. This is the same as the one in U3 (8). The above group L2 (7) has type (2A, 3A, 7A) and centralizes L3 (4). Its full normalizer in G.S3 is (L3 (2) × L3 (4):S3 ):2. The centralizer of the U3 (3) is a proper subgroup of L3 (4):S3 , and is therefore 32 :2S4 , since we know that there is a subgroup 32 :2S4 × U3 (3):2 in G.S3 . 9.3. Groups centralizing a 3F element. Next consider the case 3F , where we have N (3F ) = S3 ×(3×U5(2)):2. Now U5 (2) contains one class each of U4 (2), L2 (11) and A6 , and three classes of A5 . This L2 (11) has normalizer S3 × (3 × L2 (11)):2 in G.S3 . The other groups could have larger normalizers in G.S3 than they do in N (3F ). In any case, the centralizer in G of any of these groups is a subgroup of A8 , containing the given S3 . Note that the normal 32 in N (3F ) contains one cyclic subgroup of type 3A, one of type 3F , and two of type 3D. In the case of U4 (2), we already see inside the group S3 × U6 (2):S3 a subgroup S3 ×S3 ×(3×U4(2)):2, which contains a subgroup S3 ×S3 of A8 . This S3 ×S3 contains MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 13 two cyclic subgroups of type 3A and two of type 3B, and an extra automorphism of order 2 is realised inside N (3D). The only proper subgroup of A8 containing 32 :D8 is S6 , but U4 (2) does not centralize an element of order 5. Hence the full U4 (2) normalizer in G.S3 is 32 :D8 × (3 × U4(2)):2. The normal 32 is of type 3AABB, and normal 3 is of type 3D. The diagonal elements are of type 3D and 3F , corresponding to the 3B and 3A elements repectively. The 13 subgroups of order 32 are one of type 3AABB, two each of types 3ADF F and 3BDDD, and four each of types 3ADDF and 3BDF F . The same argument applied to A6 allows the possibility that the centralizer of − the A6 grows to S6 . Indeed, we can see this centralizer inside O10 (2), so we have S6 × S6 × S3 as the normalizer of the A6 in G.S3 . Moreover, there is also an − automorphism swapping the two factors of S6 , also realised inside (3 × O10 (2)):2. Of the two types of A5 in A6 , one centralizes the full A8 , while the other centralizes only S6 . Hence we obtain normalizers (3×A5 ×A8 ):22 and S5 ×S6 ×S3 respectively. − 9.4. Groups centralizing a 3D or 3B element. The 3D-normalizer (3×O10 (2)):2 contains a subgroup of index 3 of the 3B-normalizer, so in particular contains all non-abelian simple subgroups of N (3B). − The group O10 (2) contains a large number of classes of simple subgroups. Consider first those with order divisible by 17, that is S8 (2), O8− (2), S4 (4), L2 (16) and − L2 (17). There are two classes of L2 (16) in O10 (2), and one class of each of the other groups. Since the Sylow 17-normalizer lies inside N (3D), the normalizers are all easy to write down, and they are S8 (2) × S3 , O8− (2):2 × S3 , S4 (4):2 × S3 , L2 (17) × S3 , and two classes of L2 (16):2 × S3 . Next consider the simple subgroups with order divisible by 11, that is A12 , A11 , M12 , M11 , U5 (2) and L2 (11). There is a single class each of A12 , A11 and U5 (2), with normalizers in N (3D) of shape (3 × A12 ):2, (3 × A11 ):2 and (32 × U5 (2)):2. The last of these has a larger normalizer in G.S3 , as already discussed in Subsection 9.3. Since A11 does not lie in U6 (2), it does not centralize an involution, so the above groups are the full normalizers of A11 and A12 in G.S3 . − Now O10 (2) contains two classes of M12 , fused by the outer automorphism. Hence there is one such class of M12 in G.S3 , each with normalizer 3 × M12 , and splitting into two classes in G. In the case of M11 , there are two classes fixing one of the 12 points on which A12 acts, and two acting transitively, each pair fused by the outer automorphism. Hence there are two classes of M11 in G.S3 , each with normalizer 3 × M11 , and splitting into four classes in G. The subgroups L2 (11) are again of two types: transitive and intransitive on 12 points. The former also lies in U5 (2), so has normalizer S3 × (3 × L2 (11)):2 as discussed in Subsection 9.3 above. The latter has normalizer (3 × L2 (11)):2 contained in N (3D). (We need to prove that it does not also centralize a 2A-element: a somewhat subtle question. In fact, there is a unique class of L2 (11) in U6 (2), and such an L2 (11) acts on the 220 factor of 21+20 as two copies of an absolutely irreducible 10-dimensional module. The 1-cohomology of this module is trivial, so there is only one conjugacy class of L2 (11) in 21+20 :L2 (11).) Next consider subgroups with order divisible by 7 but not by 11 or 17. This includes A10 , A9 , A8 , A7 , L2 (7), L2 (8), O8+ (2), S6 (2), U3 (3). The 7-elements here are in class 7A, since they centralize elements of order 5. There is a unique class − of O8+ (2) in O10 (2), and such a group centralizes a unique 3B element in G. The normalizer is therefore equal to N (3B). Since this normalizer includes a triality 14 ROBERT A. WILSON automorphism of O8+ (2), we can use this automorphism to prove conjugacy in G.S3 of various groups. In particular there is a unique class of S6 (2) that centralizes a 3D element. Since the 7A element centralizes L3 (4):S3 , in which the 3D element we are centralizing lies in class 3B, it makes sense to classify the subgroups of L3 (4):S3 that contain a 3B-element. Now in L3 (4):3, the maximal subgroups containing an outer element of order 3, are 24 :(3 × A5 ) (two classes), 7:3 × 3 and 32 :2A4 . There are two classes of outer 3-elements in 32 :2A4 (up to inversion), of which those that centralize involutions are in L3 (4)-class 3B. All outer elements of order 3 in − 7:3 × 3 lie in L3 (4) class 3C. Notice also that the 7-centralizer in (3 × O10 (2)):2 is 7 × (3 × A5 ):2. There is a unique class of A10 in N (3D), with normalizer S3 × A10 . Since the centralizer of a 5-cycle therein is 52 ×S3 , this centralizer cannot grow in G.S3 . There are two classes of A9 in N (3D), but these are conjugate by a triality automorphism of O8+ (2). The normalizer is (32 :2 × A9 ):2 contained in (32 :2 × O8+ (2):3):2. The precise structure of this normalizer can be seen from the subgroup (A5 × A12 ):2 of the Monster, and is the unique subgroup of index 2 in S3 × S3 × S9 that is not a direct product. Similarly for the case of S6 (2), there are two classes in N (3D), fused by triality. Since S6 (2) contains elements of order 15, the centralizer in G lies somewhere between S3 and A5 . But it is not A5 , and S3 is maximal in A5 , so it is S3 . Hence the normalizer in G.S3 is S3 × S3 × S6 (2). This leaves A7 , A8 , L2 (7), L2 (8), U3 (3), which are significantly harder. We shall not attempt a complete classification at this stage. Note however that there is a maximal subgroup L2 (7):2 of O8− (2):2. This L2 (7) is of type (2C, 3C, 7A) in G and does not centralize any involution in G. Hence its normalizer in G.S3 is exactly L2 (7):2 × S3 . Finally, we consider the simple groups divisible by no prime greater than 5, that is A5 , A6 , and U4 (2). There are two classes of U4 (2): those that act on the 10space as O6− (2), and those that act as U4 (2). But by triality of O8+ (2), these are conjugate in G.S3 . Moreover, they are conjugate to the subgroup U4 (2) of U5 (2) already considered above. We leave A5 and A6 for the time being. 9.5. Groups centralizing a 3A element. The maximal subgroup N (3A) = S3 × U6 (2):S3 contains many interesting subgroups. As it contains 7B-elements, many of these are not visible elsewhere. In particular U6 (2) contains U4 (3). The normalizer in G.S3 is S3 × U4 (3).22 , and the class splits into three classes in G. It also contains M22 , with normalizer S3 × M22 :2, and splitting into three classes in G. It also contains S6 (2), with normalizer S3 × 2 × S6(2), splitting into three classes in G, and similarly U3 (3), with normalizer S3 × 2 × U3 (3):2, also splitting into three classes in G. In addition to these four groups, there are unique classes in U6 (2):S3 of each of A8 , L2 (11), U5 (2) and L2 (8), all of which we have already seen. There are two classes of U4 (2), one acting as U4 (2), the other as O6− (2). The former we have already seen; the latter group centralizes only S3 × 2 in G.S3 , and the class splits into three classes in G. There are two classes of A7 in U6 (2):S3 , one inside S6 (2), the other inside U4 (3). In both cases the normalizer is S3 × S7 . The first contains MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 15 both 3A and 3C elements, the other only 3C elements. There are also subgroups A5 , A6 , L3 (2), L3 (4), which we shall not completely classify here. 10. Simple subgroups centralizing an involution 10.1. Groups centralizing a 2D element. The centralizer of a 2D-element in G.S3 is 2 × F4 (2). Now F4 (2) has an outer automorphism of order 2 that is not realised in G.S3 . Hence there are pairs of automorphic subgroups of F4 (2) that behave completely differently in G. This applies in particular to the subgroups S8 (2), O8+ (2), and 3 D4 (2), but also to their subgroups O8− (2), A10 , A9 , L2 (17), and perhaps others. In each case, one of the subgroups is centralized by a 3D or 3E element and the other is not. Hence we obtain another class of each of these six groups in G.S3 , and in each case the class splits into three classes in G. Note however that this does not apply to the subgroups S4 (4) and L2 (16), which are normalized by the outer automorphism of F4 (2). There are four further isomorphism types of simple subgroups of F4 (2) with order divisible by 13, namely 2 F4 (2)′ , L2 (25), L4 (3) and L3 (3). It is easy to see that there is a unique class in each case, except possibly L3 (3), which is a subgroup of both 2 F4 (2) and L4 (3). But both these copies of L3 (3) lie in the centralizer of an outer automorphism of F4 (2), so they are indeed conjugate. Since the 13-element is self-centralizing in G, it is easy to write down the normalizers in each case. They are 2 × 2 F4 (2), 2 × L2 (25). 2, 2 × L4 (3):2, and 2 × L3 (3):2. The remaining simple subgroups with order divisible by 7 are A8 , A7 , L2 (8), L2 (7), S6 (2), U3 (3). Finally there are the simple groups with order divisible by no prime bigger than 5, namely A5 , A6 , U4 (2). We make no attempt at a complete classification in these cases. 10.2. Groups centralizing an inner involution. The centralizer in G.S3 of a 2C involution is soluble. The centralizer of a 2B involution in G.S3 has shape 28 .216 :(S6 (2)×S3 ), and contains 7A elements. As subgroups containing 7A elements turn out to be relatively easy to classify, we shall not need to consider this case much further here. The centralizer of a 2A involution is 21+20 :U6 (2):S3 , and contains 7B elements. Now in 21+20 :U6 (2) we see a subgroup 21+20 :L2 (8):3, and the representation of L2 (8) on 220 is the direct sum of the Steinberg module and two copies of the natural module. Since the latter has 1-dimensional 1-cohomology over the field of order 8, there are in total 64 conjugacy classes of L2 (8) in 21+20 :L2 (8). One of these has normalizer S3 × L2 (8):3, and three more have normalizer 2 × L2 (8):3. The remainder are fused into 20 classes of groups all with normalizer 2 × L2 (8). Together these 24 classes of L2 (8) account for the full structure constant of 1/6 + 3(1/2) + 20(3/2) = 95/3. Under the action of the outer automorphism group S3 , the three with normalizer 2 × L2 (8):3 are fused into one class, while the last 20 appear to be fused into orbits of sizes 3 + 3 + 2 + 6 + 6, with normalizers either 22 × L2 (8) or 2 × L2 (8):3 or 2 × L2 (8). 11. Simple subgroups of F i22 In G.S3 there is a class of subgroups F i22 , each with normalizer F i22 :2, and splitting into three classes in G. In F i22 :2 there is a unique class of subgroups O7 (3). Since O7 (3) is not a subgroup of F4 (2) or of any of the 3-element centralizers, 16 ROBERT A. WILSON it follows that the normalizer in G.S3 is O7 (3):2, and that there are three classes of O7 (3) in G. In O7 (3):2 there is a unique class of G2 (3), and the normalizer in G.S3 of any such G2 (3) is therefore G2 (3):2, contained in F i22 :2. In G2 (3) there is a unique class of L2 (13), and again the normalizer in G.S3 of such an L2 (13) is L2 (13):2, contained in F i22 :2. 12. Eliminating other isomorphism types of simple subgroups First note that the largest order of an element of G is 35. Since L2 (q) has an element of order (q + 1)/2 we can disregard L2 (q) whenever q > 70. Similarly, L3 (q) has an element of (q 2 + q + 1)/3 and U3 (q) has an element of order (q 2 − q + 1)/3 so we can disregard L3 (q) and U3 (q), and also G2 (q), when q > 10. Also, L4 (q), U4 (q) and S4 (q) contains elements of order (q 2 + 1)/2, so can be disregarded when q > 8. All remaining simple groups of small enough order are explicitly given in the Atlas list [2, pp. 239–242], and, using Lagrange’s Theorem and CFSG, we obtain in addition to the known subgroups above, just 16 more possibilities, as follows: • A13 , A14 , L2 (19), L2 (27), L2 (49), L2 (64), L3 (9), L4 (4), • S4 (8), S6 (3), G2 (4), Sz(8), J1 , J2 , J3 , Suz. We eliminate these as follows: • L2 (49) has elements of order 25. • L2 (64) has elements of order 65, and is contained in S4 (8). • L3 (9) has elements of order 91. • L4 (4) has elements of order 85. • S6 (3) has elements of order 36. • J1 contains 19:6, whereas the Sylow 19-normalizer in G is 19:9. • J2 contains a triple cover 3. A6 , but the centralizers of elements of order 3 in G are either soluble, in the case 3C, or direct products 3 × U6 (2) or 3 × O8+ (2):3 in the cases 3A and 3B. This argument also eliminates G2 (4) and Suz, which contain J2 . • A13 can be generated by taking a subgroup A5 × A8 , restricting to A5 × A5 × 3, and extending to another A5 × A8 normalizing the other A5 factor. − But the 5-centralizer is 5 × A8 , and is contained in O10 (2), so the entire − construction takes place inside O10 (2), and therefore cannot generate A13 . This argument eliminates also A14 . • The elements of order 7 and 13 in G are rational. The elements of order 5 have fixed space of dimension 7 in the action of the triple cover 3. G on the 27-dimensional module over F4 . Using the Brauer character table for Sz(8) in characteristic 2, in [4], it is easy to check that these properties cannot be achieved in any restriction of the Brauer character to Sz(8). • L2 (19) contains elements of order 10, so the involutions are in class 2A or 2B; and elements of order 9, so the elements of order 3 are in 3C. But the structure constants of type (2A, 3C, 5A) and (2B, 3C, 5A) are zero, so there is no A5 of this type in G. Since L2 (19) is a subgroup of J3 , this argument eliminates also J3 . • L2 (27) contains elements of order 14, so either 2A- and 7B-elements, or 2B- and 7A-elements. All such (2, 3, 7) structure constants are zero except for (2B, 3A, 7A), where the value is 1/480. This implies every L2 (27) has non-trivial centralizer, which is impossible. MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 17 13. Subgroups isomorphic to A5 There is a well-known character formula for the number of ways a given element in a specified conjugacy class C3 is the product of an element x from class C1 and an element y from class C2 . Dividing this by the order of the centralizer of an element of class C3 gives the symmetrized structure constant |C1 |.|C2 |.|C3 | X χ(x)χ(y)χ(y −1 x−1 ) , ξ(C1 , C2 , C3 ) = |G|2 χ(1) χ∈Irr(G) which can also be interpreted as the sum over conjugacy classes of such triples (x, y, xy) of the inverse of the order of the centralizer of (x, y). Putting this together with the fact that hx, y, z | x2 = y 3 = z 5 = 1, xy = zi is a presentation for A5 , leads to the well-known method of determining A5 subgroups using structure constants for triples of type (2, 3, 5). We calculate the structure constants using GAP [3]. It turns out that just 5 of the 9 structure constants of type (2, 3, 5) in G are non-zero, as follows: • ξ(2B, 3A, 5A) = 1/720. • ξ(2B, 3B, 5A) = 59/1440 = 1/20160 + 1/224 + 1/64 + 1/48. • ξ(2C, 3A, 5A) = 1/48. • ξ(2C, 3B, 5A) = 9/32 = 1/32 + 1/16 + 3/16. • ξ(2C, 3C, 5A) = 1 In particular, every A5 centralizes an inner or outer automorphism, and hence its normalizer lies in one of the known maximal subgroups. A classification of the subgroups isomorphic to A5 up to conjugacy is more difficult. We use knowledge of the subgroups isomorphic to A5 in the Monster [6]. Now the elements of classes 3A, 3B, 3C, 5A lift to Monster classes 3A, 3A, 3B, 5A respectively, so the Monster A5 s that live in 22 .G.S3 are as follows: • Monster type 2A, 3A, 5A, normalizer (A5 × A12 ):2. • Monster type 2B, 3A, 5A, normalizer (A5 × 2M22 :2).2. • Monster type 2B, 3B, 5A, normalizer S6 .2 × M11 . Since there is a unique class of 22 in M11 , and the normalizer is S4 , we obtain a single class of A5 in G of the third type, and the normalizer in G.S3 is S3 × S5 . The outer automorphism of order 3 centralizing this A5 cannot be in 3E, 3F, 3G, so must lie in 3D. Turning now to A12 , the involutions of Monster class 2A are the ones of cycle types 26 and 22 , 18 . Hence the 2A2 subgroups are of the following types: • Moving 4 points: (12)(34), (13)(24). • Moving 6 points: (12)(34), (12)(56). • (12)(34)(56)(78)(9X)(ET ), (13)(24). • (12)(34)(56)(78)(9X)(ET ), (13)(24)(57)(68)(9E)(XT ). In the third case, there is only an S2 of automorphisms, not S3 . The 22 centralizer in S12 is 22 × 24 :S4 , so there is a unique type of such A5 in G.S3 , with normalizer (A5 × 23 :S4 .2):2, and splitting into three classes in G. The attributable structure constant is 6/27 .3 = 1/64. In the first case, the A5 centralizes A8 , and this is a case we know about, contributing 1/20160 to the structure constant, and having type (2B, 3B). In the second case, the A5 centralizes S6 , and this is another case 18 ROBERT A. WILSON we know about, contributing 1/720 to the structure constant, and having type (2B, 3A). In the last case, the normalizer of the 22 in S12 is 26 :(S3 × S3 ), so giving an A5 in G.S3 with normalizer (A5 × 24 :32 :2):2, contributing 6/25 .32 = 1/48 to the structure constant. Finally we need to consider the case 2.M22 .2, which is rather more intricate. This group has 6 classes of involutions, which in Atlas notation are −1A, +2A, −2A, +2B, −2B and 2C. These fuse into 2.HS.2 classes −1A, −2A, +2A, 2C, 2C, and 2D respectively. Hence they fuse in HN , and also in the Monster, to 2A, 2B, 2A, 2A, 2A, 2B respectively. We therefore need to classify 22 subgroups consisting of elements of classes −1A, −2A, and ±2B only. We obtain the following cases: • −1A, +2B, −2B, with centralizer 22 × 23 :L3 (2), and normalized only by an involution that also normalizes the A5 . • two of type −2A, −2A, −2A with normalizers in M22 of shape 24 .32 .2 and 24 .S3 respectively. • one each of types −2A, ±2B, ±2B. The first case gives an A5 with normalizer (23 :L3 (2) × A5 ):2, contributing 6/1344 = 1/224 to the structure constant, and being of type 2B, 3B. The remaining contributions to the structure constants are as follows. The case given above as 24 .32 .2 in M22 becomes 2.24 .S3 .S3 in 2.M22 .2, and factoring out the normal 22 as well as taking the S3 off the top appears to leave us with a structure constant of 1/48. The other case of this type differs by a factor of 3, so gives 1/16. In the remaining cases we have types (−2A, +2B, +2B) and (−2A, −2B, −2B) which are swapped by an element normalizing the A5 : hence these cases do not extend to S5 in G.S3 . There is also the type (−2A, +2B, −2B) which does extend to S5 in G.S3 . The centralizer of the 22 in the first two cases would seem to be 22 × 23 S4 in 2.M22 .2, but there is also an element swapping the two elements of type 2B in the 4-group, hence giving a total contribution to the structure constant of 1/32. In the other case the centralizer in 2. M22 .2 is smaller by a factor of 6, leaving us with 3/16. This accounts exactly for the structure constants, and also gives all the class fusions, except that there is an ambiguity as to which of the two contributions of 1/48 to attribute to ξ(2B, 3B, 5A) and which to ξ(2C, 3A, 5A). To summarize: Theorem 5. There are ten classes of A5 in G.S3 , becoming 18 classes in G. The normalizers in G.S3 are as follows. • • • • • • • • • • S3 × S5 , type (2C, 3C), contributing 1 to the structure constant; (A5 × (A8 × 3):2):2, type (2B, 3B), contributing 1/20160; S5 × S6 × S3 , type (2B, 3A), contributing 1/720; (A5 × 24 :32 :2):2, type 2C, 3A), contributing 1/48; (A5 × [27 .3]).2, type (2B, 3B), splitting into 3 classes in G, contributing 1/64; S5 × 23 :L3 (2), type (2B, 3B), splitting into 3 classes in G, contributing 1/224; (A5 × [25 .32 ]).2, type (2B, 3B), contributing 1/48; (A5 × 23 S4 ).2, type (2C, 3B), contributing 1/32; A5 × [26 .3], type (2C, 3B), splitting into 3 classes in G, contributing 1/16; (A5 × [24 ]).2, type (2C, 3B), splitting into 3 classes in G, contributing 3/16. MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 19 14. Hurwitz groups A Hurwitz group is a group generated by an element x of order 2 and an element y of order 3 such that xy has order 7. Among the simple groups we are interested in here, L2 (7), L2 (8), L2 (13), 3 D4 (2) and F i22 are Hurwitz groups. Another group which turns up is the non-split extension 23 . L3 (2). To aid in identification of the group generated by x and y, we compute a fingerprint, consisting of the orders of the elements s, st, sst, ssts, sstst, ssstst, ssststt where s = xy and t = xyy. The last of these words is the only one that does not necessarily have the same order as its reverse, so we shall often augment the fingerprint with the order of sssttst in order to distinguish a pair (x, y) from its reciprocal (x−1 , y −1 ) = (x, yy). Note that this fingerprint is significantly redundant when s has order 7, but is more discriminating for larger orders. We pre-compute the fingerprints for the (2, 3, 7) generators of all the above groups. In the list below we adopt an obvious shorthand for the four reciprocal pairs of Hurwitz generators for F i22 . All generating pairs not so marked are either self-reciprocal, or automorphic to their reciprocals. The generating pairs in F i22 are of type (2C, 3D) while those in 3 D4 (2) are of type (2B, 3B, 7D). L2 (7) : L2 (8) : 3 D4 (2) : L2 (13) : F i22 : 7 7 7 7 7 7 7 7 7 7 7 4 9 14 6 7 13 13 18 20 21 24 4 9 14 6 7 13 13 18 20 21 24 7 7 7 7 7 7 7 7 7 7 7 4 7 21 7 6 3 21 12 15 12 30 3 3 9 7 13 18 7 13 6 13 7 7 30 8/12 24 12/12 8 9/13 21 30 15 13/20 In order to classify the Hurwitz subgroups of G, we relate them to Hurwitz subgroups of the Monster, as follows. First, note that all involutions in G lift to involutions in 22 .G, which is a subgroup of the Monster, and all elements of order 7 in G fuse to class 7A in the Monster. Moreover, the classes 3A, 3B, 3C in G fuse to 3A, 3A, 3B respectively in the Monster. It is therefore possible to use Norton’s analysis [6] of the corresponding structure constants in the Monster, to write down a complete list of Hurwitz subgroups of G. Of help also is the corresponding analysis in the Baby Monster [14]. First we compute the structure constants of type (2, 3, 7) in G. Exactly 7 of the 18 structure constants are non-zero, as follows: ξ(2A, 3A, 7A) = 1/20160 ξ(2B, 3A, 7A) = 1/480 ξ(2C, 3A, 7A) = 3/64 ξ(2C, 3C, 7A) = 11/3 ξ(2B, 3B, 7B) = 15/56 ξ(2C, 3B, 7B) = 43/8 ξ(2C, 3C, 7B) = 329/3 20 ROBERT A. WILSON 14.1. The 2A, 3A, 7A case. We have already discussed the L3 (2) of type (2A, 3A, 7A), which has centralizer L3 (4), and embeds in A5 × A8 permuting the 8 points transitively. In particular, since the noralizer is (L3 (2) × L3 (4)):2, this accounts for the full structure constant. 14.2. The 2B, 3A, 7A case. The group A8 also contains two classes of L3 (2) acting on 7 points, and therefore of type (2B, 3A, 7A). The visible normalizer is just A5 × L3 (2), but the structure constant is ξ(2B, 3A, 7A) = 1/480, so this cannot be the whole normalizer. Since the centralizer lies inside L3 (4), the only possibility is 24 A5 × L3 (2), which exactly accounts for the structure constant. In particular, this L3 (2) does not extend to L3 (2):2 inside G. 14.3. The 2C, 3C, 7A case. To account for ξ(2C, 3C, 7A) = 11/3, note that 1 is attributable to 3 D4 (2), and 1 to L3 (2), and 3/2 to an L2 (8) with normalizer 2 × L2 (8), and 1/6 to an L2 (8) with normalizer S3 × L2 (8):3. 14.4. The 2C, 3C, 7B case. To account for ξ(2C, 3C, 7B) = 329/3, note that 54 is attributable to F i22 , since there are three classes of F i22 in G, each with two (automorphic) classes of generating triples of each of 9 types. A further 3 is attributable to three more classes of 3 D4 (2), and 18 to three classes of L2 (13), and 3 to three classes of L3 (2); the remainder 95/3 = 1/6 + 21(3/2) is attributable to the seven classes of L2 (8) in G.S3 identified in Sections 9.5 and 10.2. 14.5. The 2B, 3B, 7B case. There are three classes of L3 (2) with normalizer (L3 (2)×L3 (2)):2, accounting for an amount 3/168 = 1/56 of the structure constant, leaving an amount 14/56 = 1/4. 14.6. The 2C, 3A, 7A case. Since the structure constant is 3/64, every such group is centralized by an involution, necessarily of class 2B. 14.7. The 2C, 3B, 7B case. In this case an explicit computer search found 36 such triples of elements in G, of which 6 generate L3 (2) and 30 generate 23 . L3 (2). Now the latter group has four classes of (2, 3, 7) generating triples. It would seem likely therefore that the structure constant of 5 83 should be attributed as 4 for 23 . L3 (2) and 1 83 for at least two classes of L3 (2) in G.S3 . In any case, since the total structure constant is less than 6, it follows that any L3 (2) of this type has non-trivial centralizer in G.S3 , and hence its normalizer cannot be maximal. 14.8. Conclusion. In this section we have proved the following theorem. Apart from the calculation of structure constants, the proof is mostly computer-free. However, we used computational methods to check the results, by collecting large numbers of (2, 3, 7) triples and using statistical analysis of frequencies to show that the above allocation of structure constants to isomorphism types of groups is the only plausible one. Theorem 6. • In G.S3 there is a unique class of each of L2 (13) and F i22 , two classes of 3 D4 (2), and nine classes of L2 (8), as listed in Tables 1 and 2. The ones whose normalizers are maximal are just F i22 (in G and G.2) and one class of 3 D4 (2) (in G.3 and G.S3 ). • Every L3 (2) in G has non-trivial centralizer in G.S3 . Only one class of L3 (2) has maximal normalizer (in all of G, G.2, G.3 and G.S3 ). MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 21 Table 4. Some fingerprints of type (2, 3, 11) L2 (11) 2A, 3A A11 2B, 3C − O10 (2) 2D, 3F M12 A12 2A, 3A 2B, 3B 2C, 3C U6 (2) 2C, 3C 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 5 8 12 14 20 21 9 12 17 20 21 24 6 6 14 21 9 12 5 11 9 10 12 8 15 30 12 17 21 12 10 6 9 35 18 11 6 8 14 11 11 11 8 18 6 24 24 30 6 11 20 35 12 8 3 12 9 11 5 12 12 17 18 21 5 15 10 6 11 10 7 12 11 11 9 14 8 11 35 12 18 9 18 21 6 11 35 8 12 8 11 11/21 8 8 12/12 6/12 30 12/17 17 11/18 30 12/17 8 8 4/9 11 18 18 15. Classifying (2, 3, 11) triples We next analyse the structure constants of type (2, 3, 11) in a similar manner. First we pre-compute the fingerprints for simple groups we know to be generated − by such a triple, including L2 (11), M12 , A11 , A12 , U6 (2), O10 (2), F i22 . Note that 10 . the groups 2 :L2 (11) and 2 U6 (2) are also generated by (2, 3, 11) triples. The fingerprints for the smaller groups are listed in Table 4. The fingerprints of the 89 triples which generate F i22 are listed in Table 5. (For practical purposes, especially for distinguishing between a triple and its reciprocal, these fingerprints were then extended by the orders of sssststt and sssststtt to give extra discriminating power.) We calculate the following structure constants of type (2, 3, 11) in G (all others are zero): • ξ(2B, 3B, 11A/B) = 1/6 each. This is accounted for by L2 (11). • ξ(2B, 3C, 11A/B) = 1 each. Such a subgroup must be centralized by a nontrivial automorphism, and one of the two types of (2, 3, 11) generating tripes − for the subgroup M12 of O10 (2) accounts for the full structure constant. • ξ(2C, 3B, 11A/B) = 37/2 each. • ξ(2C, 3C, 11A/B) = 1650 each. 15.1. The (2C, 3B, 11) case. The known simple subgroups make the following contributions to each structure constant of 18 21 : • 1 from the other type of (2, 3, 11) generators for the subgroup M12 , with normalizer M12 × 3 in G.S3 ; • 3 from A12 , with normalizer (A12 × 3):2 in G.S3 ; • 1 from U6 (2), with normalizer S3 × U6 (2):S3 in G.S3 . 22 ROBERT A. WILSON Table 5. The 89 fingerprints of type (2, 3, 11) for F i22 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 6 6 7 8 9 9 9 9 9 9 10 10 10 10 12 12 12 12 12 13 13 13 13 11 14 15 12 10 11 11 21 21 24 12 13 14 20 20 21 21 22 22 9 11 13 13 18 8 12 10 11 13 13 11 30 22 22 11 18 16 14 11 30 13 14 20 20 11 11 22 13 13 22 12 24 24 10 12 16 13 22 20 13 6 21 11 30 12 8 22 12 18 18 8 12 20 13 8 11 8 22 22 13 11 22 22 20 12 13 13 11 20 9 14 8 13/21 9/15 11/16 13/21 15/24 11/12 12/16 22 12/14 16/21 18/18 20/24 13/15 12/18 12/22 20 9/9 14/24 13/21 8/22 13/14 8/21 13/21 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 13 13 13 13 13 13 14 18 18 18 18 18 18 20 20 21 24 24 24 24 30 30 30 13 13 13 21 24 24 8 9 12 12 14 15 22 12 22 7 8 9 11 13 16 21 24 13 18 22 20 15 30 11 13 9 22 18 15 20 18 8 24 16 22 12 11 18 8 11 24 10 13 16 8 12 9 15 13 16 9 14 11 9 13 18 15 13 16 14 13 14 11 12 12 20 18 13 21 12 14 13 9 8 10 22 16 14 21 30 22 11 22 20 30 30 12/15 9/24 12/18 18/21 12/13 11/12 13/13 12/16 14/22 14/15 13/15 10/13 18/24 16/22 13/30 12 14/22 10/10 8/9 5/7 11/24 10/18 13/14 Now the 1-cohomology of U6 (2) on the 20-dimensional module is 2-dimensional, so there are four classes of U6 (2) in 220 :U6 (2), which fuse in 220 :U6 (2):S3 into one class of U6 (2) with normalizer U6 (2):S3 , and one class with normalizer U6 (2):2. The former lifts to 2 × U6 (2):S3 , and the corresponding normalizer in G.S3 is S3 × U6 (2):S3 . On the other hand, there is a subgroup 2. U6 (2) inside F i22 , and therefore the other case must lift to 2. U6 (2).2. This group does not centralize any element of order 3 in G.S3 , so this is the full normalizer. Hence the three classes of 2. U6 (2) in G account for a contribution of 9 to each of the two (2, 3, 11) structure constants. Also within 21+20 :U6 (2) there is a subgroup 21+20 :L2 (11), which contains three conjugacy classes of 2 × 210 :L2 (11), permuted by the S3 of outer automorphisms. Each (2, 3, 11) generating triple for L2 (11) lifts to 4 triples of type (2, 3, 11) in 210 :L2 (11), since the elements of orders 2 and 3 each centralize a 6-space in the 210 . One of these triples generates the complementary L2 (11), which is of type (2B, 3B) in G, while the other three must generate the whole of 210 :L2 (11). Extending to 21+20 :U6 (2):S3 we have a subgroup 21+20 :(U5 (2) × 3):2 and hence a subgroup 21+20 :(L2 (11)× 3):2. Altogether, therefore, the contribution to each (2, 3, 11) structure constant is 9/2. Altogether we have accounted for an amount 1 + 3 + 1 + 9 + 4 21 = 18 21 , that is the whole structure constant. MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 23 15.2. The (2C, 3C, 11) case. In this case, it turns out that most of the triples generate the whole of G, and a computer search to collect and identify these. The total number of (2C, 3C, 11A/B) fingerprints collected was 562. Of these, 1 gen− erates L2 (11), and 8 generate A11 , while 9 generate O10 (2). These subgroups all centralize an outer automorphism of order 3, so each fingerprint contributes 1 to each structure constant. The remaining 544 fingerprints correspond to generators of either F i22 or G, and in either case contribute 3 to each structure constant. Thus we have accounted for the full structure constant of 18 + 3 × 544 = 1650. As noted above, there are 89 fingerprints for generators of F i22 , listed in Table 5. The 455 fingerprints for (2, 3, 11) triples that generate G are listed in the Appendix. 15.3. Conclusion. In this section we have proved the following result. The proof depends crucially on the computational analysis of the (2, 3, 11) triples of type (2C, 3C). − Theorem 7. There is a unique class of each of the groups O10 (2), A12 , A11 , M12 and U6 (2), and two classes of L2 (11) in G.S3 . In every case the centralizer in G.S3 − is non-trivial, and the only cases in which the normalizer is maximal are O10 (2) and U6 (2) (in all of G, G.2, G.3 and G.S3 ). 16. Classifying (2, 3, 13) triples Groups generated by (2, 3, 13) triples include L2 (13), L2 (25), L3 (3), L4 (3), G2 (3), F4 (2)′ , 3 D4 (2), F4 (2) and F i22 . Of these, we have already classified L2 (13), 3 D4 (2) and F i22 using Hurwitz generators. The group 33 :L3 (3) is also generated by (8 classes of) (2, 3, 13) triples, and so is the maximal subgroup 33+3 :L3 (3) of O7 (3), a fact which initially caused me a significant amount of difficulty in accounting for the structure constants of type (2C, 3C, 13). We pre-compute the fingerprints of the smaller simple groups above, and list them in Table 6. There are also 109 fingerprints for generators of type (2, 3, 13) for F i22 , which are of F i22 -type (2C, 3D, 13) and are listed in Table 7; as well as 261 fingerprints for (2, 3, 13) generators of F4 (2) that are of F4 (2)-type (2D, 3C, 13) and are listed in Table 8. In fact the non-zero (2, 3, 13) structure constants in F4 (2) are 2 • ξ(2C, 3C, 13A) = 5, of which 1 is from 2 F4 (2)′ and 4 is from L4 (3); • ξ(2D, 3A, 13A) = ξ(2D, 3B, 13A) = 3, from generators of 3 D4 (2); • ξ(2D, 3C, 13A) = 552, of which 14 is from 3 D4 (2), and 2 is from L3 (3), and 8 is from 33 :L3 (3), and 6 is from L2 (25), leaving 522 for 261 automorphic pairs of generators for F4 (2). There are only four non-zero structure constants of type (2, 3, 13) in G, that is • • • • ξ(2B, 3C, 13A) = 15; ξ(2C, 3A, 13A) = 3; ξ(2C, 3B, 13A) = 63; ξ(2C, 3C, 13A) = 9658. The first three of these can be easily accounted for by known subgroups. To increase the reliability of the results, however, we also computed explicitly triples of group elements of these types. 24 ROBERT A. WILSON Table 6. Some fingerprints of type (2, 3, 13) L2 (13) L2 (25) L3 (3) 2 F4 (2)′ L4 (3) 2A, 3A 2A, 3D G2 (3) 2A, 3C 2A, 3E 3 2B, 3A D4 (2) 2B, 3B F i22 2C, 3C 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 7 4 12 13 4 6 5 5 5 13 9 12 21 28 7 9 18 21 12 18 21 6 13 6 12 8 13 12 12 20 8 13 12 12 18 18 12 28 28 12 14 18 7 13 13 5 13 13 8 20 6 7 12 7 13 21 18 13 13 18 22 22 11 7 13 3 13 8 8 8 20 6 6 7 8 6 6 21 21 14 28 16 9 9 2 3 13 13 3 13 13 13 13 12 9 8 21 13 8 13 18 21 13 20 15 7 6 13 13 13 13 10 13 6 8 8 7/8 13 12/18 12/14 12/14 12/21 12 11/30 13/20 16/16 16.1. The (2B, 3C, 13) case. An explicit search of the 2B, 3C case yields three fingerprints with xy of order 13, namely those for 2 F4 (2)′ and L4 (3). There are three known conjugacy classes of 2 F4 (2)′ in G, one in each of the three copies of F4 (2), and each with normalizer 2 F4 (2). Each is centralized by an outer automorphism of order 2, so in total this accounts for an amount 3 of the structure constant. There are also three known conjugacy classes of subgroups L4 (3) in G, again one in each of the three copies of F4 (2). In this case, the outer automorphism group of L4 (3) is 22 , of which only 2 is realised in G. It follows that the amount of structure constant accounted for here is 2 × 2 × 3 = 12. Hence we have accounted for the full structure constant of 3 + 12 = 15. 16.2. The (2C, 3A, 13) case. An explicit search of the (2C, 3A) case yields three fingerprints with xy of order 13, equal to the three fingerprints for 3 D4 (2) generators of type (2B, 3A, 13). Since there is a subgroup 3 D4 (2) of this type, it accounts for the full structure constant. 16.3. The (2C, 3B, 13) case. A explicit search of the (2C, 3B) case yields 12 fingerprints where xy has order 13, equal to the pre-computed fingerprints for F i22 (six fingerprints of type (2C, 3C, 13)), G2 (3) (three of type (2A, 3E, 13)), and 3 D4 (2) (three of type (2B, 3A, 13)). There are three conjugacy classes in G of self-normalizing subgroups F i22 , which account for an amount 6 × 6 = 36 of the structure constant. Also there are three classes of self-normalizing subgroups G2 (3), accounting for an amount 3 × 6 = 18 MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 25 Table 7. Fingerprints of type (2, 3, 13) for F i22 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 6 6 6 6 7 7 7 7 8 8 8 8 8 8 9 9 12 12 12 12 12 12 12 12 12 12 12 12 12 9 16 18 30 12 12 13 13 7 9 9 16 21 22 11 15 7 9 9 10 11 11 11 13 14 14 14 14 16 8 18 30 13 12 22 11 12 13 8 8 8 13 13 10 12 13 13 16 13 9 11 18 12 13 13 16 21 13 21 13 13 30 21 22 10 24 24 11 11 8 12 9 15 22 24 16 16 14 11 13 13 12 11 16 10 21 11 8 18 30 13 4 8 8 4 13 20 21 13 13 22 9 21 11 13 30 13 13 22 18 21 12 22 10 13 20 14/22 11/18 16 16 13 13/22 9/14 13/13 18/18 11/14 8/9 7/8 13/21 13/20 11/12 13/13 11/24 11/16 8/12 9/24 11/21 8/24 10/24 9/11 13/30 11/24 9/22 18/18 12/12 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 12 12 12 13 13 14 14 14 14 14 14 14 14 14 14 15 18 18 21 21 21 21 21 21 21 21 30 30 16 16 21 11 13 8 8 11 12 13 14 16 16 22 22 13 12 14 12 12 12 14 14 18 20 20 10 13 13 22 13 9 11 9 15 16 18 21 11 12 22 9 9 7 13 22 9 9 18 12 16 15 10 22 8 21 16 9 8 24 24 11 13 6 30 12 8 24 21 8 8 16 9 8 12 18 13 18 13 21 12 13 21 16 22 13 13 22 13 11 11 18 18 13 7 14 7 11 14 9 21 30 12 11 12 22 11 24 18 13 10 21 12/12 8/22 13/22 21/21 9/9 10/10 9/22 12/13 21/22 11/13 16/22 21/22 9/12 12/30 11/30 14/22 8/12 12/18 30 13/18 6/10 14/18 9/30 11 13/20 10/11 13/22 14/18 of the structure constant. There is also a generating triple of G2 (3)-type (2A, 3C), which turns out to be of type (2C, 3C) in G (see below). Recall that there are two classes of 3 D4 (2) inside F4 (2), differing in the fusion of 7-elements to F4 (2), and hence to G. One class has been already found above, in Subsection 16.2, generated by (2C, 3A, 13)-triples. These groups lie in centralizers of outer automorphisms of order 3. The three triples in the present case therefore generate a 3 D4 (2) with normalizer 3 D4 (2):3 × 2 in G.S3 , so account for an amount 3 × 3 = 9 of the structure constant. This accounts for the full amount 36 + 18 + 9 = 63 of structure constant. 16.4. The (2C, 3C, 13) case. The case (2C, 3C) is analyzed as follows. We collected 1599 distinct fingerprints, of which 1213 generated G, hence accounting for an amount 7278 of the structure constant. There were 261 generating F4 (2), and 109 generating F i22 , accounting for a further 2220, making a running total of 9498. Two copies of 3 D4 (2) account for 7 + 21 of the structure constant, while single 26 ROBERT A. WILSON Table 8. (2D, 3C, 13) generators for F4 (2) 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 6 6 6 6 6 6 8 8 8 8 8 8 8 8 8 10 10 10 10 10 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 10 13 16 16 17 24 12 13 13 17 17 20 21 24 30 10 12 13 14 24 9 12 12 13 13 14 16 16 16 17 17 17 17 18 18 18 18 20 21 21 21 24 28 30 30 13 12 28 30 18 18 10 9 30 17 21 17 28 28 28 12 8 10 16 24 18 17 24 12 12 16 13 16 18 12 16 20 21 12 13 17 28 18 9 17 18 28 17 17 21 16 21 12 30 28 24 13 28 18 28 9 13 24 30 21 12 8 13 12 16 17 21 17 16 28 21 30 12 13 12 16 20 30 21 21 30 24 12 20 12 20 12 18 30 28 13 12 28 30 18 18 20 30 21 28 17 8 24 28 24 15 15 13 8 30 24 13 21 21 12 17 9 21 17 12 13 18 18 17 12 20 13 30 30 13 21 30 15 18 24 28 17/18 17 16/17 24 28 6 17/24 12/24 17/21 21/30 6/18 28/30 13/21 18/21 16 12 21/30 16 14 21/30 20/28 17/20 18/24 13/30 24/24 12/28 12/21 17/21 12/20 9/18 9/24 16/17 12/16 21/28 13/18 10/12 17/24 12/18 21/30 16/21 18/28 13/18 12/24 12/16 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 14 14 14 15 15 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 13 13 17 21 24 12 17 18 16 18 9 10 12 12 13 13 13 15 17 18 18 20 21 21 21 24 24 30 8 9 9 12 13 13 15 17 17 18 20 21 21 21 24 24 24 13 18 21 14 12 28 28 14 10 21 24 9 13 17 8 9 13 9 16 12 13 13 8 20 30 21 30 12 8 20 28 16 10 13 21 17 28 15 13 17 28 30 17 17 20 13 18 12 10 12 18 21 14 30 24 15 12 21 28 8 12 28 17 21 30 17 16 10 21 18 14 21 12 15 21 28 6 28 24 24 12 24 18 15 20 12 12 17 30 30 10 13 18 17 17 12 17 21 15 14 17 20 16 28 13 21 12 10 28 16 21 12 12 28 17 24 30 21 17 12 12 21 18 16 8 13 12 30 18 20 20 16 28 21 13 24 20/28 16/21 16 24/24 8/28 17/20 12/21 21/21 13/18 24/28 17/20 12/28 24/28 10 12/13 21/24 17/30 12/24 18/30 10/28 28 12/28 18/28 16/18 12/28 18/30 16/28 12/18 10/28 21/24 17/28 24/24 13/21 12/24 12/18 17/21 20/21 8/9 24/30 17/17 12/13 17/24 9/13 17/21 MAXIMAL SUBGROUPS OF 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 17 17 17 17 17 18 18 18 18 18 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 24 24 28 28 30 8 12 16 18 28 9 13 13 16 20 21 28 8 12 12 12 15 16 17 21 24 24 21 28 18 10 12 12 12 28 17 10 13 8 18 24 30 16 14 15 24 24 17 17 12 24 30 30 12 18 10 18 21 14 18 16 21 13 10 24 24 18 21 20 10 28 12 17 18 24 12 8 21 21 21 18 21 21 20 24 10 13 12 13 28 17 10 12 15 12 17 12 24 12 8 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 13/14 21/24 12/21 17/21 8/16 24/28 12/18 13/30 20/21 9/9 12/24 12/24 17 28 17/18 24/30 20/21 24 9/15 13 15/24 18 10/13 24/24 21/30 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 21 21 24 24 24 24 24 24 24 24 24 24 28 28 28 28 28 28 28 28 30 30 30 30 30 24 24 12 12 14 16 17 18 18 20 24 30 12 12 13 18 21 21 24 28 12 13 21 21 21 17 30 15 16 20 21 17 13 17 20 13 30 12 20 24 20 24 24 9 12 17 24 13 17 30 30 20 12 20 30 14 30 18 24 16 28 21 13 12 8 18 21 24 18 13 21 16 21 28 24 17 10 24 15 13 17 14 12 12 18 21 21 14 12 20 16 18 20 20 20 24 17 12 18 21 27 21/21 24 16/30 15/28 14/18 28/30 12/13 16/17 18/24 12/24 17/30 21/28 18/20 8/16 24/30 13/17 13/16 12/30 17/20 8/21 13/18 17/18 24/24 24/30 18/18 copies of G2 (3), L2 (13) and L3 (3) account for a further 18, for a running total of 9544. The subgroup L2 (25) also accounts for 18, making a total of 9562. Out of the total of 9658, therefore, there is still 96 to account for. Now there are three classes of 33 .33 .L3 (3) in G. The total (2, 3, 13) structure constant in these groups is 3.4.3.3 = 108. Of this, 12 comes from triples generating (three classes of) L3 (3), while 24 is attributable to (three classes of) 33 :L3 (3) and the remaining 72 comes from generators for the whole group. Hence we exactly account for the remaining structure constant of 24 + 72 = 96. 16.5. Conclusion. In this section we have completely classified subgroups isomorphic to L3 (3), L4 (3), G2 (3), L2 (25), F4 (2) and 2 F4 (2)′ , as well as verifying the earlier results for L2 (13), 3 D4 (2) and F i22 . Theorem 8. In G.S3 there is a unique class of each of G2 (3), L4 (3), F4 (2), 2 F4 (2)′ , L2 (25) and L3 (3). In the case of F4 (2), the normalizer in G and G.2 is maximal, and there are three conjugacy classes. In all other cases the normalizer is not maximal in any of G, G.2, G.3 or G.S3 . 17. Classifying (2, 3, 17) triples − Known subgroups with (2, 3, 17) generators include L2 (16), O8− (2), O10 (2), S8 (2), − − 8 8+16 L2 (17), F4 (2), and 2 :O8 (2) and 2 :O8 (2). We precompute the fingerprints in Table 9. 28 ROBERT A. WILSON Table 9. Some fingerprints of type (2, 3, 17) − O10 (2) 2D, 3E O8− (2) 2C, 3B 2C, 3C L2 (16) L2 (17) S8 (2) 2D, 3D 2E, 3D 2F, 3D F4 (2) 2C, 3C 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 30 12 17 21 15 21 8 10 15 17 17 21 17 15 9 6 6 7 8 9 12 12 15 6 7 9 12 12 17 20 30 6 6 33 33 20 9 17 7 30 21 10 17 30 12 17 17 9 30 30 12 17 20 12 12 20 21 30 14 12 18 15 30 24 30 30 15 11 30 9 12 17 12 17 17 8 8 17 5 17 8 12 24 24 15 15 18 24 30 24 14 17 9 14 18 17 12 12 12 35 18 6 7 5 10 8 21 21 15 7 10 17 17 9 21 21 15 18 6 20 20 15 12 21 17 12 30 21 14 12 24 28 33 30 8 6 9 10 21 12 17 30 6 17 15 17 9 12 24 4 12 12 30 10 15 24 12 15 30 14 30 17 15 12 12 18 11/21 9 8/21 17 30 10/17 10/17 6/10 7 9 17/30 17 5 9 21 30 17 8/21 12 10/17 17/20 10/12 20 12/17 5/17 12 10/12 12/17 17/17 4/21 13/16 12 The structure constants we need to account for are the following: • • • • ξ(2B, 3C, 17A + B) = 13 + 13 = 26; ξ(2C, 3A, 17A + B) = 3 + 3 = 6; ξ(2C, 3B, 17A + B) = 35 + 35 = 70; ξ(2C, 3C, 17A + B) = 7614 + 7614 = 15228. 17.1. Triples inside F4 (2). We shall also need information about (2, 3, 17) generating triples for F4 (2). To determine these, we compute the structure constants in F4 (2) as follows. MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 29 • ξ(2C, 3C, 17A + B) = 5 + 5, of which 2 + 2 are (2D, 3D) generators for two classes of S8 (2) and 3 + 3 are generators for F4 (2) whose fingerprints are given above; • ξ(2D, 3A, 17A + B) = 3 + 3, of which 2 + 2 are (2C, 3B) generators for one class of O8− (2) and 1 + 1 are generators for one class of L2 (16); • ξ(2D, 3B, 17A + B) = 3 + 3, similarly accounted for by the other class of O8− (2) and of L2 (16); • ξ(2D, 3C, 17A + B) = 420 + 420, of which 10 + 10 are the other generators for both classes of O8− (2), and 24 + 24 are the other generators for both classes of S8 (2), and 2 + 2 are generators for L2 (17). This leaves 3 + 3 of type (2C, 3C) and 384 + 384 of type (2D, 3C) all of which must generate the whole of F4 (2). The fingerprints for the former are given in Table 9 and for the latter in Table 10. 17.2. The (2B, 3C, 17) case. In the case (2B, 3C) we found five fingerprints with xy of order 17. The first three are for generators of F4 (2). The three classes of (self-normalizing) F4 (2) therefore account for an amount 9 + 9 of the structure constant. The other two cases are generators of type (2D, 3D, 17) for S8 (2). Now F4 (2) contains two conjugacy classes of S8 (2), which can be distinguished by the class of − 7-elements they contain. In one case, the S8 (2) lies in O10 (2), so is centralized by a non-inner automorphism. In the other case there are three conjugacy classes in G, fused in G.3. Hence these four classes of S8 (2) account for an amount 2 + 6 = 8 of the structure constant. Together these subgroups account for the full structure constant 26. 17.3. The (2C, 3A, 17) case. In the case (2C, 3A), there are four fingerprints with xy of order 17 that generate O8− (2). One of the known classes of O8− (2) is centralized by an S3 of outer automorphisms, so each fingerprint for this group accounts for 1 of the structure constant, making 4 altogether. There are two fingerprints that generate L2 (16). One of the known classes of L2 (16):4 therefore accounts for the remaining 2 of the structure constant. 17.4. The (2C, 3B, 17) case. In the case (2C, 3B) we found 18 fingerprints when − the order of xy is 17. Four are generators of type (2D, 3E) for O10 (2), four are − generators of type (2C, 3B) for O8 (2), and two are generators for L2 (16), while the remaining 8 generate G. The fingerprints for the generators for G are as follows: 17 17 17 17 12 18 28 28 33 22 16 20 22 33 22 17/18 12 13 19 13/18 17 16 12 14/24 20 8 18 15/30 The generators for G account for an amount 48 of the structure constant. The − (2) account for an amount 8. Now there are two classes of O8− (2) generators for O10 in F4 (2), one of which has already been counted in the enumeration of the (2C, 3A) case. The other gives rise to three classes of O8− (2) in G, each extending to O8− (2):2, and each centralized by an outer automorphism of order 2. Together these account for an amount 12 of the structure constant. 30 ROBERT A. WILSON Table 10. (2D, 3C, 17) generators for F4 (2) 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 4 6 6 6 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 10 10 10 10 10 10 10 12 12 12 12 12 12 12 28 9 17 24 18 28 9 10 13 13 13 13 14 16 16 17 17 21 21 21 21 24 28 30 30 12 14 17 17 24 28 10 12 17 20 21 24 30 8 9 9 12 12 12 12 17 21 20 21 21 12 21 16 9 13 18 21 12 17 18 18 24 14 16 21 21 18 17 9 18 9 20 12 28 28 16 13 21 24 28 14 21 12 24 17 18 10 13 13 17 28 12 21 20 28 15 30 28 13 16 13 13 17 17 28 21 30 13 30 13 14 13 12 6 12 20 12 24 20 20 9 24 17 16 14 28 18 24 21 12 17 20 15 21 16 3 21 20 21 8 4 12 13 17 14 28 21 18 20 20 28 12 21 12 24 21 21 21 24 21 24 15 17 18 9 18 30 8 18 30 16 18 18 12 12 17 13 17 21 21 10/21 16/21 9/20 14/17 17/28 12 8/18 12/17 16/21 13/16 8/17 10/30 8/18 13/21 17/24 17/24 12/16 18/24 9/12 12/18 13/13 13/16 21/30 17 28/30 16 18 12/24 17 28 30 21/24 9/18 17/28 18/21 21/30 12/21 14/24 10 13/17 12/13 12/16 16/18 17/24 8/28 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 14 14 14 14 14 14 14 15 15 15 15 15 15 16 16 16 12 13 13 13 16 16 16 17 18 18 18 18 18 18 21 21 21 21 24 28 28 28 28 28 30 18 20 21 21 12 12 13 20 28 30 30 18 18 18 21 21 30 8 12 14 30 9 13 28 12 16 20 24 13 13 16 18 21 28 13 17 17 18 30 17 18 21 24 28 17 9 24 12 13 13 24 9 24 24 16 28 17 17 28 20 20 13 14 9 16 21 8 21 12 28 9 18 28 20 30 16 9 12 21 13 13 24 9 17 17 12 12 28 9 21 14 18 14 30 16 12 12 14 28 12 21 9 17 12 18 20 18 21 12 24 13 20 16 18 12 9 18 21 30 17 17 17 17 28 30 17 16 24 12 13 17 24 17 21 12 21 8 28 10 12 12 14 18 10 14 24 28 18 21 24 24 13 12 18 21 9/20 12/24 16/18 21/24 13 21/24 13/16 12/21 12 13/14 12/15 16/17 16 18/18 15/16 12/18 28/30 18/18 13/30 24/24 20/24 12/24 13 9/13 12/18 8/13 17/21 12/15 18/30 30 13 21/28 12 18/24 24 9/30 17/24 9/15 12/30 16/24 21/28 21/30 30/30 9/13 18/24 MAXIMAL SUBGROUPS OF 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 16 16 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17 17 18 18 18 18 18 18 18 18 18 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 21 21 14 17 17 20 20 21 21 21 28 6 8 12 21 21 21 24 28 28 9 9 12 13 15 17 18 21 24 13 14 15 16 17 18 24 24 28 30 8 9 13 16 17 18 20 20 20 21 21 14 17 9 30 12 13 16 20 14 16 14 16 28 28 16 12 12 12 20 18 17 17 9 20 12 16 24 18 30 15 16 18 12 17 30 12 30 12 12 24 13 18 17 18 28 8 21 14 21 24 21 17 21 28 17 24 17 13 28 18 24 16 9 18 13 20 12 18 12 13 12 18 8 18 24 21 17 18 12 28 13 16 18 12 20 12 28 30 16 20 24 21 14 24 24 21 9 14 18 16 24 13 24 20 12 14 8 21 18 18 16 14 21 17 28 12 14 16 13 8 18 21 9 30 12 13 12 12 28 24 14 17 16 13 28 28 13 24 13 16 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 12/24 9/10 15/18 9/12 12/28 18/21 30/30 9/17 6/21 8 14 12 14 10/28 17/18 24 24/24 20/3 17/21 12/15 10/28 13/17 14/20 13/14 20/24 12/24 18/18 24/30 17/30 16/24 21/24 30/30 15/21 17/18 13/20 13/24 16/20 17/21 16/17 18/24 17/21 18/30 16/28 10/13 15/28 17/30 12/30 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 17 21 21 21 21 21 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 28 28 28 28 28 28 28 28 28 21 24 28 30 30 8 8 8 9 10 12 12 12 13 13 13 15 16 16 17 17 17 17 17 17 18 18 18 20 20 20 20 21 21 21 24 28 30 9 12 12 13 13 15 17 20 20 13 13 24 12 17 20 24 24 30 16 12 16 21 16 24 24 21 12 17 12 13 18 18 28 30 13 13 16 17 21 24 30 13 18 30 21 12 13 28 17 18 13 9 21 13 15 17 14 24 28 28 13 24 18 18 15 13 12 14 18 16 13 21 13 12 17 24 24 9 12 12 28 21 24 13 17 20 8 24 24 24 21 24 28 12 21 24 30 24 24 30 12 13 24 12 24 21 18 14 18 20 21 13 9 18 24 8 21 24 16 17 17 18 30 20 18 24 8 12 30 24 20 20 15 24 12 13 17 17 18 24 20 18 20 12 18 21 12 20 24 21 31 18/28 18/30 20/24 15/18 12/16 18/21 18/30 10/18 17/28 18/21 16/17 12/13 13/20 12/20 12/21 21/24 12/12 21/21 18/28 18/21 13/15 16/18 13/18 13/30 13/24 13/16 13/21 12/12 7/12 12/24 17/17 24/30 24/30 13/17 18/20 12/16 18/30 13/20 17/18 13/21 18/24 12/21 13/17 17/24 18/20 14/24 14/24 32 ROBERT A. WILSON 17 17 17 17 17 17 17 17 17 28 28 30 30 30 30 30 30 30 21 30 12 12 12 13 13 13 14 16 12 12 21 24 16 20 30 16 30 30 24 21 18 18 21 24 14 18 12 12 24 17 18 20 12 17 20/24 14/24 14/18 17/30 18/28 17/21 17/21 18/21 21/24 17 17 17 17 17 17 17 17 17 30 30 30 30 30 30 30 30 30 17 18 18 18 21 21 24 28 28 18 16 18 24 17 18 12 24 28 18 8 12 17 17 17 18 13 16 13 12 13 16 9 16 16 16 17 16/21 12/13 14/18 15/24 17/17 9/21 10/24 16/30 12/17 Finally, the second known class of L2 (16):4 centralizes an outer S2 (but not S3 ) and accounts for an amount 2 of the structure constant. This accounts for the full amount 48 + 8 + 12 + 2 = 70 of the structure constant. 17.5. The (2C, 3C, 17) case. The (2C, 3C) case is considerably harder to analyse. The subgroups which turn out to be generated in this way are L2 (17), O8− (2), S8 (2), F4 (2), as well as 28 :O8− (2) and 28+16 :O8− (2). The latter two 2-local subgroups have many classes of (2, 3, 17) generating triples, and it is hard to distinguish many of them using fingerprints of the type we have been using. We found only 86 distinct fingerprints, but it would appear that the number of distinct (i.e. non-automorphic) such triples (using an element of O8− (2) class 3C) is 200 in the case of 28+16 :O8− (2), and 30 in the case of 28 :O8− (2). To prove this, observe that the 2C elements in O8− (2) centralize 24 of the 28 , while the 3C elements centralize just 22 . Hence each (2C, 3C, 17) triple in O8− (2) lifts to four (2, 3, 17) triples in 28 :O8− (2), of which three generate the whole group. Similarly, lifting to 28+16 :O8− (2) we acquire a factor of 26 , so each triple for O8− (2) lifts to 64 triples, of which 60 generate the whole group. However, there is an outer automorphism of order 3 which effectively reduces this number to 20. We have therefore 1200 generating triples, falling into 200 types under the action of the outer automorphism group S3 . Therefore this contributes 600 to each of the two structure constants. Similarly for 28 :O8− (2) we have 60 generating triples, each centralized by an outer automorphism of order 3, and swapped in pairs by the outer automorphism of order 2, so this group contributes 30 to each structure constant of 7614. (Running total so far 630.) Now the fingerprint collection found in total 1919 distinct fingerprints of type (2C, 2C, 17A/B) for generators of 2 E6 (2). However, it is not possible to have an odd number of such fingerprints, as there are equal numbers with xy in 17A and in 17B. (This argument depends crucially on the fact that 17A and 17B are not fused by the outer automorphism group.) Therefore there must be at least 1920 such generating triples, up to automorphisms. These account for an amount 3 × 1920 = 5760 of each structure constant. (Running total 6390.) Next, we have shown that F4 (2) has 384 generating triples of this type, for each of the two classes of 17-elements. Hence the three classes of F4 (2) together contribute 3 × 384 = 1152 to each structure constant. (Running total 7542.) For each of the groups L2 (17), O8− (2) and S8 (2), there are two known classes in 2 E6 (2):S3 , one centralized by an outer S3 , the other centralized by only an outer 2. The counting is slightly different in each case. In the case of L2 (17), the outer automorphism of L2 (17) is not realised, and therefore the unique fingerprint MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 33 contributes a total of 1 + 3 = 4 to each structure constant. (Running total 7546.) In the case of S8 (2), there is no outer automorphism, and therefore each fingerprint (of which there are 24) contributes just 2 to each structure constant. (Running total 7594.) Finally, in the case of O8− (2) the outer automorphism is realised inside 2 E6 (2), so each of the 10 fingerprints again contributes 2. (Total so far 7614, of an expected 7614.) The analysis of (2, 3, 17) triples in this section proves that there is no subgroup − isomorphic to one of L2 (16), L2 (17), O8− (2), O10 (2) or S8 (2) other than those contained in known maximal subgroups. 18. Classifying (2, 3, 19) triples Analysis of these triples proves only one thing: that there is a unique conjugacy class of U3 (8). However, there does not seem to be any easier way to prove this result. The structure constants that we need to account for are as follows: • ξ(2B, 3C, 19A + B) = 9 + 9 = 18; • ξ(2C, 3B, 19A + B) = 15 + 15 = 30; • ξ(2C, 3C, 19A + B) = 6126 + 6126 = 12252. The expected numbers of fingerprints therefore are respectively 3, 5 and 2042. In the case (2B, 3C) we find three fingerprints, all for triples that generate G, as follows: 19 5 16 28 28 19 24 19 5 30 12 12 19 19 19 5 33 30 15 19 10 In the case (2C, 3B), similarly, we find five fingerprints, all for triples that generate G, as follows: 19 9 30 13 13 19 8/16 19 18 12 13 10 30 24/30 19 21 24 21 16 19 30 In the (2C, 3C) case when xy has order 19, we found 2041 distinct fingerprints. Since we expecting 2042, we looked morely closely, and found that one fingerprint which appeared to be from a self-reciprocal generating set was in fact from a pair of mutually reciprocal generating sets, but the fingerprint was not sufficiently discriminating to pick this up. Of these 2042 distinct types of triples, 2041 generate G, so contribute 3 to each structure constant, making a total contribution of 6123 to the structure constant of 6126. The remaining fingerprint corresponds to subgroups U3 (8). Now the known subgroup U3 (8) has normalizer (U3 (8):3 × 3)):2 in G.S3 , so contributes 3 to each structure constant. This fully accounts for the structure constant, and proves that there is a unique class of U3 (8) in 2 E6 (2). 19. Status report Using computational analysis of (2, 3, n) triples for n = 7, 11, 13, 17, 19 we have robust classifications for simple subgroups of the following isomorphism types • L2 (8), L2 (13), 3 D4 (2), F i22 ; − • L2 (11), M12 , A11 , A12 , O10 (2), U6 (2); • L2 (25), L3 (3), L4 (3), G2 (3), 2 F4 (2)′ ; • L2 (16), L2 (17), O8− (2), S8 (2), F4 (2); • U3 (8); 34 ROBERT A. WILSON as well as incomplete classifications of A5 and L3 (2) which are nevertheless sufficient for the purposes of determining maximal subgroups. We can therefore say that we have dealt with 23 of the 39 cases. The remaining 16 cases require other methods, more group theoretic than character theoretic. The groups we need to deal with are • A6 , A7 , A8 , A9 , A10 ; • L3 (4), U3 (3), U4 (2), U4 (3), U5 (2); • O7 (3), O8+ (2), S4 (4), S6 (2); • M11 , M22 . Most of these contain A5 , and therefore can be analyzed using Norton’s classification [6] of subgroups of the Monster containing 5A-type A5 . To ensure that Norton’s methods carry through, we need to be sure that in every case where the simple group H he is interested in has a double cover 2. H, he is using a copy of A5 that is doubly covered in 2. H. This is the case for all the alternating groups, and U4 (2), and therefore S6 (2), O8+ (2) and O7 (3); but not for L3 (4), U4 (3) or M22 . Hence the cases that require other methods are U3 (3), which does not contain A5 , and L3 (4), M22 and U4 (3), all of which have proper double covers in which all involutions lift to involutions. For all except L3 (4), it is sufficient to use known results on subgroups of the Baby Monster. The case L3 (4) is problematic, since there is a subgroup 22 . L3 (4) in 22 . 2 E6 (2), and there may potentially be more than one conjugacy class, and such groups will not be detected by existing work on the Monster and Baby Monster. In this last case we need to extend Norton’s methods to include classifications of 22 . L3 (4) and 2 × 2. L3 (4) in the Monster, as well as the simple group L3 (4). 20. Using the Monster The fact that the Monster contains a subgroup 22 . G:S3 means that what is known about subgroups of the Monster implies facts about subgroups of G. Of particular interest is Norton’s list [6] of simple subgroups of the Monster containing A5 with 5A-elements. Now all elements of order 5 in G fuse to 5A in the Monster, and all involutions in G lift to involutions in 22 . G, so this effectively deals with almost all simple subgroups of G which contain A5 . The ones which require extra care are those which have a double cover in which all involutions lift to involutions. There is no such group on Norton’s list, but in principle we need to consider the following possibilities: • L3 (4), M22 , U4 (3), U6 (2), F i22 , F4 (2). We shall not consider the cases U6 (2), F i22 and F4 (2), however, as these have been adequately dealt with by other methods. In this section we go through the whole of Norton’s list, including the groups we have already dealt with. This is partly in order to provide alternative, computerfree, proofs in many cases, but also to demonstrate the reliability of Norton’s work, which is published essentially without proof. 20.1. Six very easy cases. From Norton’s list we pick out first the following, which are the simple groups that centralize a unique class of 22 in the Monster. In each case we write down the subgroup of the Monster that is the direct product of the simple group under consideration with its centralizer (which Norton calls its Monstralizer). MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 35 − • O10 (2) × A4 • O7 (3) × S3 × S3 • A12 × A5 • A11 × A5 • 2 F4 (2)′ × 2. S4 • L2 (25) × 2. S4 It follows that there is a unique class of the corresponding simple group in G.S3 . In − the cases H ∼ (2), A12 and A11 the centralizer contains A4 , and the normalizers = O10 in G.S3 are of the shape (H × 3):2. In particular, there is a single conjugacy class of H in G. In the case O7 (3), the normalizer in G.S3 is O7 (3):2, and there are three conjugacy classes of O7 (3) in G. These are not maximal in G, since they are contained in F i22 . However, in G.2 the normalizer is O7 (3):2, which is not contained in F i22 :2, so both groups are maximal. In the cases H ∼ = L2 (25) and 2 F4 (2)′ , the centralizer is 2. S4 , containing a unique 2 class of 2 . On factoring out by this 22 , an extra centralizing involution appears, and in each case we have normalizer in G.S3 of shape 2 × H.2. Again we obtain three conjugacy classes of H in G. For our proof we only require the case O7 (3) and summarize as follows. Theorem 9. There is a unique class of O7 (3) in G.S3 . The normalizer is O7 (3):2, and the class splits into three classes in G. 20.2. Six more easy cases. Next we pick from Norton’s list the following five groups, whose centralizers in the Monster contain two distinct classes of 22 : • S8 (2) × S4 • O8− (2) × S4 • O8+ (2) × (3 × A4 ).2 • A10 × S5 • A9 × (3 × A5 ).2 In all these cases, one of the two classes of 22 in the centralizer is normalized to S4 , the other only to D8 . Thus we obtain two classes of H in G.S3 , one of which splits into three classes in G. It is easy to see that the normalizers are as given in Table 1, 2 or 3. The case S6 (2), with centralizer S4 × S3 , is similar. Note that all involutions in S4 × S3 are in the Monster class 2A, except for those of shape (12)(34)(ab), which are in 2B. There are therefore three types of 2A-pure 22 , and hence three conjugacy classes of S6 (2) in G.S3 . In G, the normalizers are as follows: • one class of S3 × S6 (2), of type 7A; • three classes of S3 × S6 (2), of type 7B; • six classes of 2 × S6 (2), of type 7B. The normalizers in G.S3 are therefore − • S3 × S3 × S6 (2), contained in (3 × O10 (2)):2; • 2 × S3 × S6 (2), contained in 2 × F4 (2); • 2 × S6 (2), contained in N (2A). We remark that the remaining lifts of S6 (2) in 21+10 :U6 (2) must therefore be 2. S6 (2), in three conjugacy classes. For our proof we need the cases O8+ (2), S6 (2), A10 and A9 . 36 ROBERT A. WILSON 20.3. Three quite easy cases. Now consider the following cases, where again there are two types of 22 in the centralizer in the Monster. • M12 × L2 (11) • S4 (4) × L3 (2) • L2 (16) × L3 (2) Here both classes of 22 in the centralizer extend to A4 . In the case of M12 , there is an element of the Monster extending the group to (M12 × L2 (11)):2. This swaps the two classes of 22 , while also effecting the outer automorphism of M12 . It follows that there is a single class of M12 in G.S3 , with normalizer 3 × M12 , and this class splits into two classes in G. Similarly in the second case we have (S4 (4).2 × L3 (2)).2. Hence there is a unique − class of S4 (4) in G, with normalizer S4 (4).2×S3 in G.S3 , contained in (3×O10 (2)):2. In the third case we have L2 (16):4 × L3 (2) instead, so there are two conjugacy classes of L2 (16) in G.S3 , with normalizer L2 (16):4 × S3 in each case. For our proof, we need only the case S4 (4), and summarize as follows. Theorem 10. There is a unique class of S4 (4) in G.S3 , and the normalizer is − S3 × S4 (4):2, contained in (3 × O10 (2)):2. The class remains a single class in G. 20.4. Five tougher groups. • A7 × (A5 × A5 ).2.2 • A8 × (A5 × A4 ).2 • U5 (2) × S3 × A4 • L4 (3) × 32 :D8 • M11 × S6 .2 • M11 × L2 (11) We do not need the case L4 (3), where we see two classes of 22 in the centralizer. These are swapped by an outer automorphism of L4 (3) realised in the Monster. Hence there is a unique class of L4 (3) in G.S3 . The U5 (2) centralizer is S3 × A4 . Embedding the latter in 11 × M12, we see that the only Monster 2A-elements are in the A4 . Hence there is a unique class of U5 (2) in G.S3 , and any U5 (2) centralizes an element of order 3 in G. It follows that it lies in S3 × U6 (2), as does its normalizer in G. In the second M11 case, the centralizer in the Monster is L2 (11), whose centralizer is M12 . The same argument as for M12 , therefore, shows that there are just two classes of M11 of this type in G.S3 , each with normalizer 3 × M11 , contained in 3 × M12 . In the other M11 case, the Monstralizer is S6 .2, contained in 11 × M12 . But the involutions in the A6 lie in M12 -class 2B, and therefore class 2B in the Monster. Hence there is no pure 2A2 subgroup in S6 .2, so this case does not arise in G. We next take the group A8 with centralizer (A5 × A4 ):2 in the Monster. From the embedding of the latter in A12 we see that the only 2A-elements are in one of the factors A4 or A5 . Hence there are exactly two classes of A8 in G, and the normalizers in G are respectively (A8 × A5 ):2 and (A8 × A4 ):2. Both groups lie − inside 28 :O8− (2) in O10 (2). Finally we take the A7 with centralizer (A5 × A5 ).2.2. In the latter group, the elements of Monster class 2A either lie in one of the two A5 factors, or swap the two factors. Hence there is a unique class of pure 2A-type 22 . Therefore there is a unique class of A7 in G, and the normalizer is (A7 × A5 ):2. MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 37 From this list we need the cases A7 , A8 , M11 , and U5 (2), and summarize as follows: Theorem 11. • In G.S3 there is a unique class of A7 ; each A7 has normalizer (A7 × (A5 × 3):2):2; • in G.S3 there is a unique class of U5 (2), with normalizer S3 × (3 × U5 (2)):2; • in G.S3 there are two classes of M11 , each with normalizer 3 × M11 ; • in G.S3 there are two classes of A8 ; in one case each A8 has normalizer (A8 × (A5 × 3):2):2, and in the other (A8 × (A4 × 3):2):2. 20.5. The last two. The remaining items on Norton’s list are: • • • • A6 × (A6 × A6 ).2.2 A6 × 2.L3 (4).2 A6 × M11 U4 (2) × (A4 × S3 × S3 ).2 In the cases A6 and U4 (2), we have some difficulty in getting the complete list of conjugacy classes. However, it is quite straightforward to show that there is no maximal subgroup which is the normalizer of an A6 or U4 (2). For example, every 22 in (A4 × S3 × S3 ).2 centralizes a further involution, and therefore every U4 (2) in G centralizes an involution. Similarly, it is easy to see that in the first two A6 cases in the list, the centralizer of any 22 in the A6 -centralizer is larger than the 22 itself. In the third A6 case, the centralizer is M11 , which contains a unique conjugacy class of 22 , whose normalizer is S4 . It follows that there is a unique class of such A6 in G.S3 , centralizing an S3 of outer automorphisms. Its normalizer therefore − lies in the normalizer of O10 (2). 20.6. Conclusion. In this section we have dealt with the twelve cases O7 (3), O8+ (2), A10 , A9 , S4 (4), S6 (2), U5 (2), U4 (2), M11 , A6 , A7 , A8 . This leaves just the four cases U3 (3), M22 , U4 (3) and L3 (4), where we use properties of the Baby Monster as well. 21. Using the Baby Monster 21.1. The case M22 . It is shown in [13] that there is a unique class of M22 containing 5A-elements in the Baby Monster. The normalizer is S5 × M22 :2. Only the transpositions in S5 fuse to class 2A in the Monster. Hence every M22 in G centralizes S3 in G.2, so centralizes a 3A element. It follows that there are three conjugacy classes of S3 × M22 in G, lying inside S3 × U6 (2), and extending to a single class of S3 × M22 :2 in G.S3 . 21.2. The case U3 (3). It is shown in [15] that every U3 (3) in the Baby Monster is conjugate in the Monster to the one with centralizer (22 ×32 :Q8 ):S3 in the Monster. This centralizer contains four classes of involutions, with centralizers (22 ×32 :Q8 ):2, (22 × Q8 ):S3 , 2 × SD16, and 22 × S3 respectively. The first must be of Monster type 2A, since it gives rise to the subgroup 32 :Q8 × U3 (3):2 of G. In any case, no 22 is self-centralizing in (22 × 32 :Q8 ):S3 , and indeed every such 2 2 centralizes at least a group 23 , so every U3 (3) in G centralizes an involution. 38 ROBERT A. WILSON 21.3. The case U4 (3). Every U4 (3) in G must lift to 2 × 2. U4 (3) in 22 . G, and therefore lifts to 2×U4 (3) in one of the three copies of the Baby Monster, containing one of the three copies of 2. G. Now it is shown in [13, Theorem 11.3] that any U4 (3) in the Baby Monster has non-trivial centralizer. Looking at the proof in more detail, we see that any 2. U4 (3) in the Monster has centralizer which is the intersection of two copies of 2 × S6 in 2. L3 (4):22 . But the action has rank 3 and it is easy to see that the intersections are 2 × 32 :D8 and 22 × D8 . In particular, every 22 in either of these possibilities centralizes a further involution. Hence every U4 (3) in G centralizes an involution. 21.4. The case L3 (4). This last case is problematical because there is an embedding of 22 . L3 (4) in 22 . G, and hence the enumeration of subgroups L3 (4) in the Baby Monster and the Monster is not in itself sufficient to deal with the problem. However, we can modify the argument used in [13, Theorem 11.2]. Note however that although each of the groups L3 (4) and 2. L3 (4) can be generated by two copies of A6 intersecting in 32 :4, such that 32 :Q8 interchanges these two copies of A6 , this is no longer true in 22 . L3 (4), where the intersection is only 32 :2. Now there are three different types of A6 that need to be considered. The first has centralizer (A6 ×A6 ).2.2 in the Monster, and contains elements of Monster class 2A. These necessarily map to 2A elements in G. Now the only non-zero structure constants of type (2A, 4, 7) in G are • ξ(2A, 4A, 7A) = 1/20160, fully accounted for by the L3 (2) with normalizer (L3 (2) × L3 (4)):2. • ξ(2A, 4H, 7A) = 1/480. Consider the subgroup 23 :L3 (2) of A8 in A5 × A8 . The centralizer lies between A5 and L3 (4), and has order at least 480, so is 24 :A5 . Hence the normalizer is 23 :L3 (2) × 24 :A5 , fully accounting for the structure constant. • ξ(2A, 4L, 7A) = 1/192. There must be such a group inside the 3B-centralizer, hence in O8+ (2). Moreover, its centralizer is in L3 (4) but contains no elements of order 5, so has order at most 192, and therefore exactly 192. But it cannot be L3 (4), since L3 (4) is not a subgroup of O8+ (2). Next consider the second type of A6 . In this case, the centralizer of the A6 in the Monster is 2. L3 (4):2, and the A6 contains elements of Monster class 2B. Hence the centralizer of 32 :2 is 2. U4 (3):22 , that is an involution centralizer in O8+ (3), and the argument of [13, Theorem 11.2] then shows that any group we obtain in this way lies in S3 × 2. F i22 . Hence, if it has shape 22 . L3 (4) then it centralizes an element of order 3. In other words, any L3 (4) of this type in G lies in S3 × U6 (2). To put more detail into the argument, the intersection of two copies of L3 (4) in U4 (3) is either S6 or 24 S4 (in the case when the two copies are conjugate), or L2 (7):2 or 24 :A5 (when they are not). Lifting to the double covers we may lose a 2 from the top of the group. Now the centralizer of 22 . L3 (4) in the Monster cannot contain elements of order 5, so this eliminates two of the cases. The L2 (7):2 case gives the well-known group L3 (2) × 22 . L3 (4) which we have already seen. The final case may or may not be L3 (4), but whatever it is has normalizer contained in a 2-local subgroup of G. Finally we consider the case of the third type of A6 . This case was omitted in the proof of Theorem 11.2 in [13], perhaps because it was considered obvious, but more likely due to oversight. The centralizer of this A6 in the Monster is M11 . Then MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 39 from Norton’s Monstralizer list [6] we read off that the centralizer of the relevant 32 :2 is 35 :M11 . Now the intersection of two copies of M11 in this 35 :M11 is either 32 :Q8 or A5 . In the former case, the Monstralizer of 32 :Q8 is again 35 :M11 , which does not involve L3 (4). In the latter case, the Monstralizer of A5 is either A12 or M11 (neither of which involves L3 (4)), or 2.M22 .2, in which the subgroup 2. L3 (4) does not centralize a 2A-pure 22 , so does not lie in 22 . 2 E6 (2). 21.5. Conclusion. In this section we have shown that there is a unique class of M22 in G.S3 , and that the only case in which the normalizer of a group L3 (4), U4 (3) or U3 (3) is maximal is the case of the L3 (4) with normalizer (L3 (2) × L3 (4)):2 in G. This concludes the proof of our main results. Of the 39 simple groups we had to classify, in the following 33 cases a complete list up to conjugacy has been obtained: • • • • • • A12 , A11 , A10 , A9 , A8 , A7 , A5 , L2 (8), L2 (11), L2 (16), L2 (17), L2 (25), L2 (13), L3 (3), L4 (3), U3 (8), U5 (2), U6 (2), − O7 (3), O8+ (2), O8− (2), S4 (4), O10 (2), S8 (2), S6 (2), 3 2 ′ G2 (3), F4 (2), D4 (2), F4 (2) , M11 , M12 , M22 , F i22 . The remaining 6 have been dealt with to the extent that their normalizers are shown to be non-maximal, although a complete list of conjugacy classes and normalizers has not (yet) been obtained: • A6 , L2 (7), U3 (3), U4 (2), U4 (3), L3 (4). 22. Further remarks In this section we provide an alternative proof of the following theorem, using neither computation nor Norton’s results: − Theorem 12. (1) There is a single conjugacy class of each of the groups O10 (2), A12 and A11 in G, and the normalizers in G.S3 are − (3 × A11 ):2 < (3 × A12 ):2 < (3 × O10 (2)):2. (2) There is a single class of F4 (2) in G.S3 , splitting into three classes in G. The normalizer in G.S3 is 2 × F4 (2). (3) There are two classes of each of the groups S8 (2) and 3 D4 (2) in G.S3 , splitting into four each classes in G. The normalizers in G.S3 are − • S8 (2) × S3 < (O10 (2) × 3):2; • S8 (2) × 2 < F4 (2) × 2; • 3 D4 (2):3 × S3 ; • 3 D4 (2):3 × 2 < F4 (2) × 2. 22.1. F4 (2). Any subgroup isomorphic to F4 (2) may be constructed by taking a group L3 (2) × L3 (2) and extending the Sylow 7-normalizer to 72 :(3 × 2A4 ). Now L3 (4) contains exactly three conjugacy classes of L3 (2), so there are just three possibilities for the L3 (2) × L3 (2). The extension is to the full Sylow 7-normalizer in G, so is unique. Hence there are exactly 3 conjugacy classes of F4 (2) in G, fused in G.3. The full normalizer in G.S3 is F4 (2) × 2. 40 ROBERT A. WILSON − − 22.2. O10 (2). Any subgroup O10 (2) can be constructed from two copies of A5 × A8 intersecting in A5 × A5 × 3. Since the 5-centralizer is 5 × A8 , it is obvious that the choices, of the first subgroup A5 × A8 , and the subgroup A5 × A5 × 3, and finally the second A8 × A5 are unique up to relevant conjugacy at each stage. Hence there − is exactly one conjugacy class of O10 (2) in G, whose full normalizer in G.S3 is − (O10 (2) × 3):2. 22.3. A12 . Any subgroup isomorphic to A12 may be constructed from two groups (A5 × A7 ):2 intersecting in S5 × S5 . Since the 5-centralizer 5 × A8 lies in the group (A5 × A8 ):2, there is a unique class of (A5 × A7 ):2, and a unique class of S5 × S5 in it. Now in the normalizer of the second A5 , we need to extend S5 × 2 to S7 inside S8 , and there is obviously a unique way to do this. Hence there is exactly one conjugacy class of A12 in G, whose full normalizer in G.S3 is (A12 × 3):2. This group is never maximal in any extension of G by outer automorphisms. 22.4. A11 . A similar argument applies with (A5 × A6 ):2. We restrict to a subgroup (A5 × A5 ):2, in which the two factors are conjugate in G. At the final stage, we have to extend S5 to S6 in A8 , and again it is clear that there is only one way to do this. Hence there is exactly one conjugacy class of A11 in G, whose full normalizer in G.3 is (3 × A11 ):2. This group is never maximal in any extension of G. 22.5. 3 D4 (2). Every such group can be made from 7 × L3 (2) by extending the Sylow 7-normalizer to 72 :2A4 . As shown above, there are exactly four classes of 7 × L3 (2) in G, one containing a central 7B and three containing a central 7A. In each case the extension from 72 :3 to 72 :2A4 is unique within the full Sylow 7normalizer 72 :(3 × 2A4 ). Hence there are exactly four conjugacy classes of 3 D4 (2) in G, each with normalizer 3 D4 (2):3 in G. In G.3, three classes are fused and the other is centralized. Thus the normalizers in G.S3 are respectively 3 D4 (2):3 × 2 and 3 D4 (2) × S3 . The latter is maximal in G.S3 (and its intersection with G.3 is maximal therein). 22.6. S8 (2). Any group S8 (2) can be constructed by taking a group S3 × S6 (2), restricting to S3 × S3 × S6 , and then extending to S6 × S6 . Now there are exactly four classes of S3 × S6 (2) in G, in one of which the S3 contains 3B-elements, while in the other three the S3 contains 3A-elements. Then the restriction from S6 (2) to S3 × S6 is unique up to conjugacy, and the centralizer in G of the S6 is exactly S6 . Hence there is at most one copy of S8 (2) containing any given S3 × S6 (2). But we already know there are at least four conjugacy classes of S8 (2) in G, one centralized by an outer S3 , and three more in F4 (2) centralized by an outer involution, so there are exactly four. Three are fused in G.3, while the other is centralized by an element of class 3D. The normalizers in G.S3 are respectively S8 (2) × 2, contained − in F4 (2) × 2, and S8 (2) × S3 , contained in (O10 (2) × 3):2. References [1] J. N. Bray, D. F. Holt and C. Roney-Dougal, The maximal subgroups of the low-dimensional finite classical groups, LMS Lecture Notes Ser. 407, Cambridge UP, 2013. [2] J. H. Conway, R. T. Curtis, S. P. Norton, R. A. Parker and R. A. Wilson, An Atlas of Finite Groups, Oxford University Press, 1985. [3] The GAP group, GAP – Groups, Algorithms, and Programming, Version 4.8.10; 2018. (https://www.gap-system.org) MAXIMAL SUBGROUPS OF 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 41 [4] C. Jansen, K. Lux, R. A. Parker and R. A. Wilson, An Atlas of Brauer Characters, Oxford UP, 1995. [5] P. B. Kleidman and R. A. Wilson, The maximal subgroups of F i22 , Math. Proc.Cambridge Philos. Soc. 102 (1987), 17–23. Corrigendum, ibid. 103 (1988), 383. [6] S. Norton, Anatomy of the Monster: I, in Proceedings of the Atlas Ten Years On conference (Birmingham 1995), pp. 198–214, Cambridge Univ. Press, 1998. [7] S. P. Norton and R. A. Wilson, The maximal subgroups of F4 (2) and its automorphism group, Comm. Algebra 17 (1989), 2809–2824. [8] S. P. Norton and R. A. Wilson, Anatomy of the Monster: II, Proc. London Math. Soc. 84 (2002), 581–598. [9] R. A. Wilson, On maximal subgroups of the Fischer groups F i22 , Math. Proc. Cambridge Philos. Soc. 95 (1984), 197–222. [10] R. A. Wilson, Maximal subgroups of automorphism groups of simple groups, J. London Math. Soc. 32 (1985), 460–466. [11] R. A. Wilson, The local subgroups of the Fischer groups, J. London Math. Soc. 36 (1987), 77–94. [12] R. A. Wilson, Some subgroups of the Baby Monster, Invent. Math. 89 (1987), 197–218. [13] R. A. Wilson, More on maximal subgroups of the Baby Monster, Arch. Math. (Basel) 61 (1993), 497–507. [14] R. A. Wilson, The symmetric genus of the Baby Monster, Quart. J. Math. (Oxford) 44 (1993), 513–516. [15] R. A. Wilson, The maximal subgroups of the Baby Monster, I, J. Algebra 211 (1999), 1–14. [16] R. A. Wilson, The finite simple groups, Springer GTM 251, 2009. [17] R. A. Wilson et al., An Atlas of Group Representations, http://brauer.maths.qmul.ac.uk/Atlas/. 42 ROBERT A. WILSON Appendix: (2C, 3C, 11) generators for 2 E6 (2) 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 6 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 10 10 10 10 10 12 12 12 12 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 13 13 13 13 13 24 11 11 18 22 24 28 35 35 13 19 19 21 22 24 24 33 19 22 22 28 35 11 13 17 18 18 21 22 30 33 33 35 12 16 16 17 17 19 20 21 21 22 24 28 30 30 20 17 22 28 16 20 17 8 24 17 11 35 17 35 12 35 13 19 18 20 17 11 24 24 17 10 19 12 21 20 13 17 24 21 28 30 30 30 17 21 21 24 22 12 21 17 22 19 20 35 17 13 19 14 17 33 17 33 13 17 33 13 12 19 19 10 28 13 28 22 18 14 30 13 10 22 11 19 22 11 33 28 35 17 33 17 20 30 22 22 17 22 22 19 20 12 12 17 22 12 17 14 28 20 17 19 19 21 16 17 30 33 10 16 19 17 24 21 19 28 19 16 35 9 11 17 17 22 17 16 35 18 19 17 18 12 22 13 19 16 24 22 12/19 15 11/30 19/28 18/35 19/24 19/35 10/20 19/28 9/22 20/22 20/20 12/33 35 11 17/28 11/19 24 13/35 13/16 13/20 17/24 22/33 15/16 17/24 22/30 19 13/19 33 16/35 22/35 17 19/35 16/19 21/35 13/20 16/19 19/28 17/24 13/17 19/22 20/22 18/22 17/21 18/33 17/35 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 13 13 14 14 14 14 15 15 15 15 15 15 15 15 15 15 15 16 16 16 16 16 16 16 17 17 17 17 17 17 17 17 17 17 17 18 18 18 18 18 18 18 18 18 18 18 18 33 33 17 17 19 35 9 16 18 19 19 19 20 22 24 28 30 13 19 22 22 22 30 33 12 12 13 16 16 16 19 24 28 33 33 9 11 16 16 16 17 17 17 17 17 18 19 17 22 19 28 20 17 17 30 35 19 30 33 18 18 22 30 22 17 11 14 17 17 28 11 17 17 33 6 12 13 35 19 24 21 24 14 13 20 35 35 8 17 21 33 35 13 11 17 13 28 22 24 19 20 18 13 11 19 11 8 33 35 33 30 24 17 22 17 22 35 17 22 24 21 13 35 20 14 28 30 16 28 20 28 30 13 24 16 18 16 8 18 17 30 17 11 19 17 17 14 19 16 18 19 18 35 16 12 11 16 22 17 18 15 17 17 19 22 19 18 33 16 18 30 19 18 19 33 12 30 18 35 22 17 33 22 12 18 28 21 11 12/21 19/22 21/33 12/22 17/19 21/22 9/21 13/17 13/13 17/22 17/17 19/22 28 13 20/22 18/22 13/16 12/30 13/20 21/35 21/35 20/21 22/30 22/33 17/21 12/17 14/22 13 12 16/22 17/30 12/35 20 16/21 22/22 33 13/21 16/18 18/30 21/35 17 18/19 19/21 22/28 11/17 18/35 21/30 MAXIMAL SUBGROUPS OF 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 18 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 21 21 21 21 21 21 21 19 19 20 20 21 21 22 24 24 28 28 30 30 30 33 35 35 10 11 11 12 13 13 13 16 16 17 17 17 17 17 17 19 19 22 22 22 22 28 30 33 9 12 13 16 16 18 18 18 15 18 19 28 16 28 19 22 30 18 28 12 19 35 18 11 22 11 4 16 13 17 22 35 13 17 19 19 22 24 30 35 11 33 17 19 19 30 19 24 16 16 17 22 16 20 17 33 35 11 19 17 15 33 16 19 21 19 12 33 17 17 17 20 19 17 21 14 17 33 18 22 33 17 30 13 22 15 28 24 19 16 30 13 15 33 10 14 13 30 16 12 19 10 24 30 17 18 19 17 22 17 12 14 20 13 28 24 22 17 19 19 24 18 22 19 33 13 16 20 11 21 13 18 22 17 18 33 28 22 9 24 22 17 15 30 20 19 22 17 13 30 33 17 20 28 13 2 E6 (2) AND ITS AUTOMORPHISM GROUPS 13/30 19/30 20/22 17/18 13/24 21/22 17/33 17/30 18 33/35 16/18 12/17 19/28 12/33 17/18 14/17 30/33 16/19 12/17 13/13 9/19 10/19 14/17 17/18 18/24 17/22 17/21 8/17 13/19 22/24 8/24 35/35 12/33 19/24 22/33 21 11/18 20/33 13/17 9/18 22/28 35 18/28 11/17 22/24 20/30 14/35 20/30 18/19 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 19 19 19 20 20 21 21 21 22 22 22 24 30 33 33 35 35 35 12 13 13 16 17 17 17 18 19 19 19 19 19 20 20 21 21 21 21 21 21 22 22 24 24 28 28 28 30 30 33 11 21 33 20 33 12 17 28 15 17 17 17 13 19 22 13 35 35 28 16 33 16 13 14 22 30 11 16 19 22 35 13 18 9 12 17 18 19 21 13 19 16 24 13 17 28 16 16 11 16 30 16 24 11 12 19 12 13 13 24 21 16 28 30 30 11 30 35 24 18 18 13 18 13 13 18 16 16 28 13 18 35 24 12 30 33 21 18 33 21 17 17 19 35 28 18 22 28 19 33 35 13 22 15 13 22 33 11 20 24 12 17 30 19 16 30 18 19 20 22 19 13 24 28 17 20 18 24 30 13 33 22 19 14 35 24 35 30 28 16 12 19 19 13 13 17 16 17/30 21/21 16/19 19/35 17/19 19/30 16/24 21/28 12 15/17 17/28 20/33 19/35 17/18 13/30 17/22 30/35 13/33 16/20 16/19 19/33 24/28 19/21 22/28 17/28 16/17 19/19 14/18 19/33 16/21 11/17 22/33 16/28 11/33 20/33 13/19 18/24 19/20 22/33 15/30 13/17 14/21 18/28 17/18 18/20 20/22 11/24 19/20 19/21 43 44 ROBERT A. WILSON 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 24 24 24 24 24 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 28 35 35 35 35 35 13 13 16 16 17 17 17 18 18 18 19 20 20 20 21 21 22 22 8 11 11 13 22 19 19 12 19 14 22 22 19 20 21 35 20 28 28 19 28 13 19 16 18 35 18 13 16 24 30 21 17 13 20 17 17 12 35 35 24 35 18 24 17 28 35 13 30 21 24 21 18 17 19 18 28 14 12 16 33 30 33 17 15 18 35 28 14 17/33 19/35 19/21 21/28 12/17 16/21 19/20 30 33/33 16/24 21/22 22/28 16/22 16/21 19/22 11/17 16/33 19/21 15/18 19/19 16/24 13/17 12/18 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 28 28 28 28 28 28 28 28 28 30 30 30 30 30 30 30 30 30 30 30 30 30 30 22 22 24 24 24 24 30 33 35 9 9 13 16 17 17 18 18 22 30 30 35 35 35 19 21 12 13 19 30 28 24 22 19 21 22 13 14 30 13 35 13 8 19 8 11 28 33 30 13 35 22 22 12 22 21 24 30 22 16 22 11 9 35 18 13 14 16 18 18 22 14 16 35 17 28 24 13 17 22 28 19 19 21 22 28 22 14 24 20 16 17 21 17/22 18/30 8/16 21/35 33/33 11/13 12/18 13/17 17/19 17/24 9/18 17/28 16/21 21/21 13/24 19/22 18/20 22/24 19/21 16/17 28 17/35 19/22 School of Mathematical Sciences, Queen Mary University of London, London E1 4NS, U.K. E-mail address: [email protected]
4math.GR
Deep Convolutional Neural Networks as Generic Feature Extractors Lars Hertel∗† , Erhardt Barth† , Thomas Käster†‡ and Thomas Martinetz† arXiv:1710.02286v1 [cs.CV] 6 Oct 2017 ∗ Institute for Signal Processing, University of Luebeck, Germany Email: [email protected] † Institute for Neuro- and Bioinformatics, University of Luebeck, Germany Email: {barth, kaester, martinetz}@inb.uni-luebeck.de ‡ Pattern Recognition Company GmbH, Luebeck, Germany Abstract—Recognizing objects in natural images is an intricate problem involving multiple conflicting objectives. Deep convolutional neural networks, trained on large datasets, achieve convincing results and are currently the state-of-theart approach for this task. However, the long time needed to train such deep networks is a major drawback. We tackled this problem by reusing a previously trained network. For this purpose, we first trained a deep convolutional network on the ILSVRC -12 dataset. We then maintained the learned convolution kernels and only retrained the classification part on different datasets. Using this approach, we achieved an accuracy of 67.68 % on CIFAR -100, compared to the previous state-of-the-art result of 65.43 %. Furthermore, our findings indicate that convolutional networks are able to learn generic feature extractors that can be used for different tasks. I. I NTRODUCTION Recognizing objects in natural images is an intricate task for a machine, involving multiple conflicting objectives. The effortlessness of the human brain deceives the complex underlying process. Inspired by the mammalian visual system, convolutional neural networks were proposed [1]–[4]. They are the state-of-the-art approach for various pattern recognition tasks. Unlike many other learning algorithms, convolutional networks combine both feature extraction and classification. The advantage of this approach was impressively demonstrated by LeCun et al. [4] on MNIST and Krizhevsky et al. [5] on ILSVRC -12, achieving better results than previous learning methods. A schematic representation of a convolutional network is shown in Figure 1. The given network comprises five different layers, i.e. input, convolution, pooling, fully-connected and output layer. The input layer specifies a fixed size for the input images, i.e. images may have to be resized accordingly. The image is then convolved with multiple learned kernels using shared weights. Next, the pooling layer reduces the size of the image while trying to maintain the contained information. These two layers compose the feature extraction part. Afterwards, the extracted features are weighted and combined in the fully-connected layer. This represents the classification part of the convolutional network. Finally, there exists one output neuron for each object category in the output layer. Recent results indicate that very deep networks achieve even better results on various benchmarks [6], [7]. Moreover, Input (RGB) Convolution Pooling Feature Extraction Fully Output Connected Classification Fig. 1. Schematic diagram of a convolutional neural network. The network comprises five different layers. Both feature extraction and classification are learned during training. an ensemble of multiple networks and additional training data are often used to further increase the performance [8], [9]. Thus, the general formula for a convincing performance are seemingly multiple deep convolutional networks with many layers and a huge amount of training data. One drawback of this trend, however, is the long time needed to train such deep networks. To tackle this problem, we reused a previously trained network. For this purpose, we first trained a convolutional network on a large dataset, maintained the learned feature extraction part, and only retrained the classification part on multiple different datasets. We then compared the results to a full training, i.e. both feature extraction and classification, of the same network on the same dataset. II. DATASETS In this work, we used four different datasets, namely ILSVRC - 12, MNIST , CIFAR - 10 and CIFAR - 100. We used ILSVRC - 12 to pretrain our network and MNIST , CIFAR - 10 and CIFAR -100 to retrain our network afterwards. In the following section, we will briefly introduce each dataset. An overview of some statistics of all four datasets is given in Table I. The IMAGENET [10] dataset contains more than 14 million labeled high-resolution color images of natural objects and scenes belonging to over 21,000 different categories. The images were collected from the web and labeled by humans using Amazon Mechanical Turk1 . A subset of these images is taken as an annual competition called the ImageNet 1 http://www.mturk.com TABLE I. S TATISTICS OF THE USED DATASETS . Dimension Dataset MNIST CIFAR - 10 CIFAR - 100 ILSVRC - 12 No. Images Classes Width Height Depth Training Validation Test 10 10 100 1,000 28 32 32 - 28 32 32 - 1 3 3 3 60,000 50,000 50,000 1,281,167 50,000 10,000 10,000 10,000 150,000 Fig. 3. 96 randomly selected images from CIFAR -100. The dataset represents 100 different natural objects. It contains 60.000 color images with dimensions of 32 × 32. CIFAR -10 possesses the same statistics, except that it has ten classes with 6,000 images each. Fig. 2. 100 randomly selected images from MNIST. The dataset represents handwritten digits. It has ten different classes, one for each digit from zero to nine. The digits are centered and normalized in size. MNIST comprises 70,000 grayscale images with dimensions of 28 × 28. Large-Scale Visual Recognition Challenge (ILSVRC). We used the dataset from the competition in 2012 (ILSVRC -12). It consists of nearly 1.5 million color images, which are varying in size, and 1,000 different categories. The MNIST [11] dataset contains grayscale images of handwritten digits. 100 randomly selected images from MNIST are shown in Figure 2. It possesses ten different categories, namely one for each digit from zero to nine. Each grayscale image has a fixed size of 28 × 28 pixels. The digits are centered inside the image and normalized in size. In total, MNIST contains 70,000 images, split into 60,000 training and 10,000 test images. The CIFAR -10 and CIFAR -100 [12] datasets contain small color images of natural objects. An excerpt of 96 randomly chosen images is shown in Figure 3. They are labeled subsets of the 80 Million Tiny Images2 database. CIFAR -10 possesses ten and CIFAR -100 possesses 100 different categories, respectively. Each color image has a fixed size of 32×32 pixels. In total, they both consist of 60,000 images, split into 50,000 training and 10,000 test images. III. M ETHODS The architecture of our trained convolutional network is shown in Table II. It is based on the architecture proposed by Krizhevsky et al. [5]. The network comprises 24 layers. In particular, five convolution and three maximum pooling layers with different square kernel sizes and kernel strides. Moreover, we added zero padding in some cases to obtain convenient sizes of the feature maps. As a nonlinear activation function, we settled for the rectified linear unit [13]. Moreover, layers of dropout [14] were applied after each fully-connected layer. The probability to randomly drop a unit in the network is 50 %. Finally, to obtain a probability distribution, we employed a softmax layer. Just like Krizhevsky et al. [5], we trained the network on ILSVRC -12 and reached comparable results, i.e. a top-1 accuracy of 59.23 % and a top-5 accuracy of 83.58 %. For this purpose, we resized all images of the dataset to a fixed 2 http://groups.csail.mit.edu/vision/tinyimages/ size of 256 × 256 pixels and randomly cropped a subimage of 227 × 227 pixels. This increased the number of training images by a factor of 900. We used the deep learning framework Caffe [15] to train our convolutional networks. It allowed us to employ the GPU3 of our computer for faster training. This resulted in a speedup of approximately ten, compared to training with the CPU4 . 96 learned kernels of the first convolution layer are shown in Figure 4. Each kernel is a color image of 11 × 11 pixels. Though the colors are difficult to interpret, Gaborlike filters of different frequencies and orientations can be recognized. They are used to extract edges of the input image. Further learned kernels of deeper convolution layers with a size of 5 × 5 and 3 × 3 are too small to provide any noticeable information and are therefore not shown. We then maintained the feature extraction part – i.e. the learned convolution kernels – of the previously trained network and only retrained the classification part – i.e. the fully-connected layers – on different datasets, namely MNIST, CIFAR - 10 and CIFAR - 100. To adjust the three datasets to our network architecture, we had to alter two things. First, to resize the images to 256×256 pixels. Note that we had to convert the grayscale images of MNIST to color images by simply copying the grayscale channel three times. Secondly, to change the number of output neurons to the number of different object categories, depending on the dataset. To evaluate the performance of the trained network on an independent test set, we averaged ten different predictions of a single image as proposed by Krizhevsky et al. [5]. For this purpose, we averaged the output of the four corner crops and the center crop of the input image and – except for MNIST – additionally mirrored each image along the vertical axis. We then trained the same network a second time for each dataset. This time, however, we trained the full network, i.e. both feature extraction and classification, and compared both obtained results. The networks were trained for 30 epochs. An epoch means a complete training cycle over all images of the training set. We started with a fixed base learning rate η = 0.001 and decreased it by a factor of ten to η = 0.0001 after 20 epochs. Furthermore, we selected a momentum value of µ = 0.9, a weight decay value of λ = 0.0005, and 3 NVIDIA 4 Intel GeForce GTX 770 with 2 GB of memory Core i7-4770 No. Layer 0 Input 1 2 3 4 Convolution Relu Pooling Normalization 5 6 7 8 A RCHITECTURE OF OUR IMPLEMENTED CONVOLUTIONAL NETWORK . Dimension Kernel Stride 1 Padding Width Height Depth 227 227 3 - - - 55 55 27 27 55 55 27 27 96 96 96 96 11 3 - 4 2 - - Convolution Relu Pooling Normalization 27 27 13 13 27 27 13 13 256 256 256 256 5 3 - 1 2 - 2 - 9 10 Convolution Relu 13 13 13 13 384 384 3 - 1 - 1 - 11 12 Convolution Relu 13 13 13 13 384 384 3 - 1 - 1 - 13 14 15 Convolution Relu Pooling 13 13 6 13 13 6 256 256 256 3 3 1 2 1 - 16 17 18 Fully Connected Relu Dropout 1 1 1 1 1 1 4096 4096 4096 - - - 19 20 21 Fully Connected Relu Dropout 1 1 1 1 1 1 4096 4096 4096 - - - 22 23 Fully Connected Softmax 1 1 1 1 1000 1000 - - - Fig. 4. 96 learned kernels of the first convolution layer. Each kernel has dimensions of 11 × 11 × 3. They were maintained when retraining a network. a batch size of β = 80. These parameters were determined based on a validation set. IV. R ESULTS Our results are shown in Figure 5. The horizontal axis represents the number of epochs. The vertical axis shows the accuracy of the independent test set. Note that, for simplicity, the results in Figure 5 were computed only for the center crop of the input images. The solid lines represent full training, i.e. the learning of both feature extraction and classification. The dashed lines represent the retraining of the classification part only. The red lines correspond to MNIST, the blue lines correspond to CIFAR -10 and the green lines correspond to CIFAR -100, respectively. The results show that, regarding full training and retraining, comparable accuracy rates are achieved after 30 epochs for all three datasets. More precisely, while both rates for MNIST are nearly identical, the rate for retraining is slightly MNIST (Full) 0.8 Accuracy TABLE II. MNIST 0.6 0.4 0.2 0 0 5 10 15 20 25 Epochs 30 (Retrain) CIFAR - 10 (Full) CIFAR - 10 (Retrain) CIFAR - 100 (Full) CIFAR - 100 (Retrain) Fig. 5. Comparison between full training and retraining on three different datasets. We trained the network for 30 epochs. The solid lines represent full training, i.e. both feature extraction and classification. The dashed lines represent retraining, i.e. classification only. worse in case of CIFAR -10 and slightly better in case of CIFAR - 100 compared to full training. Note that training the full network is considerably slower than retraining: it takes about ten epochs to achieve the accuracy that the retrained network has after a single epoch in case of CIFAR -100 and about eight epochs in case of CIFAR - 10, respectively. Further note the slight increase in accuracy for CIFAR -10 and CIFAR -100 after 20 epochs due to the decrease of the learning rate. Further results are given in Table III. It shows the accuracy of the independent test set after 30 epochs both for full training and retraining. Moreover, the state-of-the-art results from the literature are given as reference values. Note that this time the accuracy rates were calculated by averaging the predictions of multiple crops of the input image. For CIFAR - 10 and CIFAR - 100 we averaged the outputs of ten crops. Since we did not mirror the images for MNIST, for obvious reasons, we only averaged the outputs of five crops. The results additionally underline the comparable accuracy rates between full training and retraining for the respective dataset. As for the CIFAR -100 dataset, retraining the network achieves an accuracy rate of 67.68 %, which is 2.25 % better than the state-of-the-art accuracy. V. D ISCUSSION Deep convolutional neural networks are the state-of-theart approach for object recognition. One drawback, however, is the long time needed to train such deep networks, especially on large datasets. We tackled this problem by reusing the feature extraction part of a previously trained network and only retrained the classification part on multiple different datasets. As expected, our findings show that this approach considerably reduces the necessary amount of training time. Our results indicate a speedup by a factor of up to ten, depending on the dataset. Besides the three presented datasets, we applied the proposed method to a self-made dataset with nearly 500, 000 images from Flickr belonging to 110 different object categories and obtained very good results in a short time. We did not present the results, however, since the accuracy rates of the fully trained network are not available for comparison. TABLE III. R ESULTS OF THE TEST SET FOR FULL TRAINING AND RETRAINING AFTER 30 EPOCHS . Accuracy (%) Dataset MNIST CIFAR - 10 CIFAR - 100 Full Training Retraining State of the Art 99.68 89.99 63.65 99.54 89.14 67.68 99.79 [22] 91.78 [23] 65.43 [23] More interestingly, both fully trained and retrained networks achieve comparable accuracy rates on all three datasets. The learned feature extractor from our pretrained network is therefore applicable to multiple situations. Even though the feature extractor was trained on ILSVRC -12, containing natural images and scenes, it still achieves excellent results even on digits from the MNIST dataset. This finding indicates that further datasets can be classified with the same feature extractor. Our experiments confirm and extend the results reported by Razavian et al. [16], Donahue et al. [17] and Girshick et al. [18], who have also trained linear and nonlinear classifiers on features obtained from deep learning with convolutional networks. Note that we trained all networks – including the one from pretraining – in a supervised manner using backpropagation [19]. The obtained feature extractor was therefore trained for a specific purpose. Its generic characteristics are somewhat surprising. Previously, mostly unsupervised algorithms, like sparse coding and related representation learning algorithms, have been used for pretraining. This approach achieves state-of-the-art results on the STL -10 [20] dataset, as shown by Miclut et al. [21]. However, our results show that it is also possible to perform supervised pretraining and obtain excellent results. This approach even improved the accuracy on CIFAR -100, compared to a fully trained deep convolutional network. This suggests that more appropriate kernels were learned from ILSVRC - 12 than from CIFAR - 100 itself. VI. C ONCLUSIONS Reusing a previously trained convolutional network not only vastly reduces the necessary time for training, but also achieves comparable results regarding the full training of the network. For particular datasets, the accuracy is even increased. This finding is especially relevant for practical applications, e.g. when only limited computing power or time is available. Our results indicate the existence of a generic feature extractor concerning the three used datasets. To either support or reject this hypothesis, further research for multiple datasets in different situations should be considered. R EFERENCES [1] D. H. Hubel and T. N. Wiesel, “Receptive fields of single neurones in the cat’s striate cortex,” J. Physiol., vol. 148, no. 1, pp. 574–591, 1959. [2] ——, “Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex,” J. Physiol., vol. 160, no. 1, pp. 106–154, 1962. [3] K. Fukushima, “Neocognitron: A self-organizing neural network model for a mechanism of pattern recognition unaffected by shift in position,” Biol. Cybern., vol. 36, no. 4, pp. 193–202, Apr. 1980. [4] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-based learning applied to document recognition,” Proc. IEEE, vol. 86, no. 11, pp. 2278–2324, Nov. 1998. [5] A. Krizhevsky, I. Sutskever, and G. E. Hinton, “ImageNet classification with deep convolutional neural networks,” in Advances in Neural Information Processing Systems (NIPS) 25, 2012, pp. 1097–1105. [6] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich, “Going deeper with convolutions,” presented at the Workshop ImageNet Large Scale Visual Recognition Challenge (ILSVRC), 2014. [7] K. Simonyan and A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, 2014. [8] D. C. Ciresan, U. Meier, J. Masci, and L. M. Gambardella, “Flexible, high performance convolutional neural networks for image classification,” in Proc. Int. Joint Conf. Artif. Intell. (IJCAI), vol. 22, no. 1, 2011. [9] D. Ciresan, U. Meier, and J. Schmidhuber, “Multi-column deep neural networks for image classification,” in IEEE Conf. Comput. Vision and Pattern Recognition (CVPR), 2012, pp. 3642–3649. [10] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei, “ImageNet: A large-scale hierarchical image database,” in IEEE Conf. Comput. Vision and Pattern Recognition (CVPR), 2009, pp. 248–255. [11] Y. LeCun and C. Cortes. (1998) The MNIST database of handwritten digits. [Online]. Available: http://yann.lecun.com/exdb/mnist/ [12] A. Krizhevsky, “Learning multiple layers of features from tiny images,” Univ. Toronto, Canada, Tech. Rep., 2009. [13] X. Glorot, A. Bordes, and Y. Bengio, “Deep sparse rectifier neural networks,” in Proc. 14th Int. Conf. Artif. Intell. and Stat. (AISTATS), vol. 15, 2011, pp. 315–323. [14] N. Srivastava, “Improving neural networks with dropout,” Master’s thesis, Univ. Toronto, Canada, 2013. [15] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell, “Caffe: Convolutional architecture for fast feature embedding,” in Proc. ACM Int. Conf. Multimedia, 2014, pp. 675–678. [16] A. S. Razavian, H. Azizpour, J. Sullivan, and S. Carlsson, “CNN features off-the-shelf: an astounding baseline for recognition,” in IEEE Conf. Comput. Vision and Pattern Recognition (CVPR), 2014, pp. 512–519. [17] J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell, “DeCAF: A deep convolutional activation feature for generic visual recognition,” in Proc. 31st Int. Conf. Mach. Learning (ICML), vol. 32, 2014, pp. 647–655. [18] R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Rich feature hierarchies for accurate object detection and semantic segmentation,” in IEEE Conf. Comput. Vision and Pattern Recognition (CVPR), 2014, pp. 580–587. [19] D. E. Rumelhart, G. E. Hinton, and R. J. Williams, “Learning representations by back-propagating errors,” Nature, vol. 323, pp. 533–536, October 1988. [20] A. Coates, A. Y. Ng, and H. Lee, “An analysis of single-layer networks in unsupervised feature learning,” in Proc. 14th Int. Conf. Artificial Intelligence and Statistics (AISTATS), 2011. [21] B. Miclut, T. Käster, T. Martinetz, and E. Barth, “Committees of deep feedforward networks trained with few data,” arXiv preprint arXiv:1406.5947, 2014. [22] L. Wan, M. Zeiler, S. Zhang, Y. L. Cun, and R. Fergus, “Regularization of neural networks using DropConnect,” in Proc. 30th Int. Conf. Mach. Learning (ICML), vol. 28, 2013, pp. 1058–1066. [23] C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu, “Deeplysupervised nets,” in Int. Conf. Artif. Intell. and Stat. (AISTATS), 2015, to be published.
1cs.CV
arXiv:0904.2136v1 [cs.PL] 14 Apr 2009 Under consideration for publication in Theory and Practice of Logic Programming 1 On the Cooperation of the Constraint Domains H, R and FD in CF LP S. ESTÉVEZ-MARTÍN, T. HORTALÁ-GONZÁLEZ, M. RODRÍGUEZ-ARTALEJO and R. DEL VADO-VÍRSEDA∗ Dpto. de Sistemas Informáticos y Computación Universidad Complutense de Madrid, Spain E-mails: {s.estevez,teresa,mario,rdelvado}@sip.ucm.es F. SÁENZ-PÉREZ ∗ Dpto. de Ingenierı́a del Software e Inteligencia Artificial Universidad Complutense de Madrid, Spain E-mail: [email protected] A. J. FERNÁNDEZ † Dpto. de Lenguajes y Ciencias de la Computación, Universidad de Málaga, Spain E-mail: [email protected] submitted 26 September 2008; revised 6 February 2009; accepted 6 April 2009 Abstract This paper presents a computational model for the cooperation of constraint domains and an implementation for a particular case of practical importance. The computational model supports declarative programming with lazy and possibly higher-order functions, predicates, and the cooperation of different constraint domains equipped with their respective solvers, relying on a so-called Constraint Functional Logic Programming (CF LP ) scheme. The implementation has been developed on top of the CF LP system T OY, supporting the cooperation of the three domains H, R and FD, which supply equality and disequality constraints over symbolic terms, arithmetic constraints over the real numbers, and finite domain constraints over the integers, respectively. The computational model has been proved sound and complete w.r.t. the declarative semantics provided by the CF LP scheme, while the implemented system has been tested with a set of benchmarks and shown to behave quite efficiently in comparison to the closest related approach we are aware of. To appear in Theory and Practice of Logic Programming (TPLP) KEYWORDS: Cooperating Constraint Domains, Constraint Functional Logic Programming, Constrained Lazy Narrowing, Implementation. ∗ The work of these authors has been partially supported by projects MERIT-FORMS (TIN200509207-C03-03), PROMESAS-CAM (S-0505/TIC0407) and STAMP (TIN2008-06622-C03-01). † The work of this author has been partially supported by projects TIN2008-05941 (from Spanish Ministry of Innovation and Science) and P06-TIC2250 (from Andalusia Regional Government). 2 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 1 Introduction Constraint Programming relies on constraint solving as a powerful mechanism for tackling practical applications. The well-known CLP Scheme (Jaffar and Lassez 1987; Jaffar and Maher 1994; Jaffar et al. 1998) provides a powerful and practical framework for constraint programming which inherits the clean semantics and declarative style of logic programming. Moreover, the combination of CLP with functional programming has given rise to various so-called CF LP (Constraint Functional Logic Programming) schemes, developed since 1991 and aiming at a very expressive combination of the constraint, logical and functional programming paradigms. This paper tackles foundational and practical issues concerning the efficient use of constraints in CF LP languages and systems. Both the CLP and the CF LP schemes must be instantiated by a parametrically given constraint domain D which provides specific data values, constraints based on specific primitive operations, and a dedicated constraint solver. Therefore, there are different instances CLP (D) of the CLP scheme for various choices of D, and analogously for CF LP , whose instances CF LP (D) provide a declarative framework for any chosen domain D. Useful ‘pure’ constraint domains include the Herbrand domain H which supplies equality and disequality constraints over symbolic terms; the domain R which supplies arithmetic constraints over real numbers; and the domain F D which supplies arithmetic and finite domain constraints over integers. Practical applications, however, often involve more than one ‘pure’ domain, and sometimes problem solutions have to be artificially adapted to fit a particular choice of domain and solver. Combining decision procedures for theories is a well-known problem, thoroughly investigated since the seminal paper of Nelson and Oppen (Nelson and Oppen 1979). In constraint programming, however, the emphasis is placed in computing answers by the interaction of constraint solvers with user given programs, rather than in deciding satisfiability of formulas. The cooperative combination of constraint domains and solvers has evolved during the last decade as a relevant research issue that is raising an increasing interest in the CLP community. Here we mention (Baader and Schulz 1995; Benhamou 1996; Monfroy 1996; Monfroy 1998; Granvilliers et al. 2001; Marin et al. 2001; Hofstedt 2001; Monfroy and Castro 2004; Hofstedt and Pepper 2007) as a limited selection of references illustrating various approaches to the problem. An important idea emerging from the research in this area is that of ‘hybrid’ constraint domain, built as a combination of simpler ‘pure’ domains and designed to support the cooperation of its components, so that more declarative and efficient solutions for practical problems can be promoted. 1.1 Aims of this paper The first aim of this paper is to present a computational model for the cooperation of constraint domains in the CF LP context, where sophisticated functional programming features such as higher-order functions and lazy evaluation must collaborate with constraint solving. Our computational model is based on the CF LP scheme and goal solving calculus recently proposed in (López-Fraguas et al. 2004; On the Cooperation of the Constraint Domains H, R and F D in CF LP 3 López-Fraguas et al. 2007), which will be enriched with new mechanisms for modeling the intended cooperation. Moreover, we rely on the domain cooperation techniques proposed in our previous papers (Estévez-Martı́n et al. 2007; Estévez-Martı́n et al. 2007; Estévez-Martı́n et al. 2008), where we have introduced so-called bridges as a key tool for communicating constraints between different domains. Bridges are constraints of the form X #==di ,dj Y which relate the values of two variables X :: di , Y :: dj of different base types, requiring them to be equivalent. For instance, X #==int,real Y (abbreviated as X #== Y in the rest of the paper) constrains the real variable Y :: real to take an integral real value equivalent to that of the integer variable X :: int. Note that the two types int and real are kept distinct and their respective values are not confused. Our cooperative computation model keeps different stores for constraints corresponding to various domains and solvers. In addition, there is a special store where the bridge constraints which arise during the computation are placed. A bridge constraint X #== Y available in the bridge store can be used to project constraints involving the variable X into constraints involving the variable Y, or vice versa. For instance, the R constraint RX <= 3.4 (based on the inequality primitive <= – ‘less or equal’ – for the type real) can be projected into the F D constraint X #<= 3 (based on the inequality primitive #<= – ‘less or equal’ – for the type int) in case that the bridge X #== RX is available. Projected constraints are submitted to their corresponding store, with the aim of improving the performance of the corresponding solver. In this way, projections behave as an important cooperation mechanism, enabling certain solvers to profit from (the projected forms) of constraints originally intended for other solvers. We have borrowed the idea of constraint projection from the work of P. Hofstedt et al. (Hofstedt 2000a; Hofstedt 2000b; Hofstedt 2001; Hofstedt and Pepper 2007), adapting it to our CF LP scheme and adding bridge constraints as a novel technique which makes projections more flexible and compatible with type discipline. In order to formalize our computation model, we present a construction of coordination domains C as a special kind of ‘hybrid’ domains built as a combination of various ‘pure’ domains intended to cooperate. In addition to the specific constraints supplied by its various components, coordination constraints also supply bridge constraints. As particular case of practical interest, we present a coordination domain C tailored to the cooperation of the three pure domains H, R and F D. Building upon the notion of coordination domain, we also present a formal goal solving calculus called CCLN C(C) (standing for Cooperative Constraint Lazy Narrowing Calculus over C) which is sound and complete with respect to the instance CF LP (C) of the generic CF LP scheme. CCLN C(C) embodies computation rules for creating bridges, invoking constraint solvers, and performing constraint projections as well as other more ad hoc operations for communication among different constraint stores. Moreover, CCLN C(C) uses lazy narrowing (a combination of lazy evaluation and unification) for processing calls to program defined functions, ensuring that function calls are evaluated only as far as demanded by the resolution of the constraints involved in the current goal. A second objective of the paper is to describe the implementation of a CF LP 4 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado system which supports the cooperation of solvers via bridges and projections for the Herbrand domain H and the two numeric domains R and F D, following the computational model provided by the CCLN C(C) goal solving calculus. The implementation follows the techniques summarized in our previous papers (Estévez-Martı́n et al. 2007; Estévez-Martı́n et al. 2008). It has been developed on top of the T OY system (Arenas et al. 2007), which is in turn implemented on top of SICStus Prolog (SICStus Prolog 2007). The T OY system already supported non-cooperative CF LP programming using the F D and R solvers provided by SICStus along with Prolog code for the H solver. This former system has been extended, including a store for bridges and implementing mechanisms for computing bridges and projections according to the CCLN C(C) computation model. Last but not least, another important aim of the paper is to provide some evidence on the practical use and performance of our implementation. To this purpose, we present some illustrative examples and a set of benchmarks tailored to test the performance of CCLN C(C) as implemented in T OY in comparison with the closest related system we are aware of, namely the META-S tool (Frank et al. 2003a; Frank et al. 2003b; Frank et al. 2005) which implements Hofstedt’s framework for solver cooperation (Hofstedt and Pepper 2007). The experimental results we have obtained are quite encouraging. The present paper thoroughly revises, expands and elaborates our previous related publications in many respects. In fact, (Estévez-Martı́n et al. 2007) was a very preliminary work which focused on presenting bridges and providing evidence for their usefulness. Building upon these ideas, (Estévez-Martı́n et al. 2007) introduced coordination domains and a cooperative goal solving calculus over an arbitrary coordination domain, proving local soundness and completeness results, while (Estévez-Martı́n et al. 2008) further elaborated the cooperative goal solving calculus, providing stronger soundness and completeness results and experimental data on an implementation tailored to the cooperation of the domains H, F D and R. Significant novelties in this article include: technical improvements in the formalization of domains; a new notion of solver taking care of critical variables and well-typed solutions; a new notion of domain-specific constraint to clarify the behaviour of coordination domains; various elaborations in the cooperative goal solving transformations needed to deal with critical variables and domain-specific constraints; a more detailed presentation of the implementation results previously reported in (Estévez-Martı́n et al. 2007; Estévez-Martı́n et al. 2008; Estévez-Martı́n et al. 2008); and quite extensive comparisons to other related approaches. 1.2 Motivating Examples As a motivation for the rest of the paper, we present in this subsection a few simple examples, intended to illustrate the different cooperation mechanisms that are supported by the computation model CCLN C(C), as well as the benefits resulting from the cooperation. To start with, we present a small program written in T OY syntax, which solves the problem of searching for a 2D point lying in the intersection of a discrete On the Cooperation of the Constraint Domains H, R and F D in CF LP 5 grid and a continuous region. The program includes type declarations, equations for defining functions and clauses for defining predicates. Type declarations are similar to those used in functional languages such as Haskell (Peyton-Jones 2002). Function applications use curried notation, also typical of Haskell and other higherorder functional languages. The equations used to define functions must be understood as conditional rewrite rules of the form f tn → r ⇐ ∆, whose condition ∆ is a conjunction of constraints. Predicates are viewed as Boolean functions, and clauses are understood as an abbreviation of conditional rewrite rules of the form f tn → true ⇐ ∆, whose righthand side is the Boolean constant true. Moreover, conditions consisting of a Boolean expression exp are understood as an abbreviation of the strict equality constraint exp == true, using the strict equality operator == which is a primitive operation supplied by the Herbrand domain H. The program’s text is as follows: % Discrete versus continuous points: type dPoint = (int, int) type cPoint = (real, real) % Sets and membership: type setOf A = A -> bool isIn :: setOf A -> A -> bool isIn Set Element = Set Element % Grids and regions as sets of points: type grid = setOf dPoint type region = setOf cPoint % Predicate for computing intersections of regions and grids: bothIn :: region -> grid -> dPoint -> bool bothIn Region Grid (X, Y) :- X #== RX, Y #== RY, isIn Region (RX, RY), isIn Grid (X,Y), labeling [ ] [X,Y] % Square grid (discrete): square :: int -> grid square N (X,Y) :- domain [X,Y] 0 N % Triangular region (continuous): triangle :: cPoint -> real -> real -> region triangle (RX0,RY0) B H (RX,RY) :RY >= RY0 - H, B * RY - 2 * H * RX <= B * RY0 - 2 * H * RX0, B * RY + 2 * H * RX <= B * RY0 + 2 * H * RX0 % Diagonal segment (discrete): 6 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado diagonal :: int -> grid diagonal N (X,Y) :- domain [X,Y] 0 N, X == Y % Parabolic line (continuous): parabola :: cPoint -> region parabola (RX0,RY0) (RX,RY) :- RY - RY0 == (RX - RX0) * (RX - RX0) Because of all the conventions explained above, the clause for the bothIn predicate included in the program must be understood as an abbreviation of the rewrite rule bothIn Region Grid (X,Y) -> true <== X #== RX, Y #== RY, isIn Region (RX,RY) == true, isIn Grid (X,Y) == true, labeling [ ] [X,Y] whose condition includes two bridge constraints, two strict equality constraints provided by the domain H, and a last constraint using the labeling primitive supplied by the domain F D. The other clauses and equations in the program can be analogously understood as conditional rewrite rules whose conditions are constraints supported by some of the three domains H, R or F D. Let us now discuss the intended meaning of the program. The bothIn predicate is intended to check if a given discrete point (X,Y) belongs to the intersection of the continuous region Region and the discrete grid Grid given as parameters, and the constraints occurring as conditions are designed to this purpose. More precisely, the two bridge constraints X #== RX, Y #== RY ensure that the discrete point (X,Y) and the continuous point (RX,RY) are equivalent; the two strict equality constraints isIn Region (RX, RY) == true, isIn Grid (X,Y) == true ensure membership to Region and Grid, respectively; and finally the F D constraint labeling [ ] [X,Y] ensures that the variables X and Y are bound to integer values. Fig. 1. Triangular region Note that both grids and regions are represented as sets, represented themselves as Boolean functions. They can be passed as parameters because our programming framework supports higher-order programming features. The program also defines two functions square and triangle, intended to compute representations of square grids and triangular regions, respectively. Let us discuss them in On the Cooperation of the Constraint Domains H, R and F D in CF LP 7 turn. We first note that the type declaration for triangle can be written in the equivalent form triangle :: cPoint -> real -> real -> (cPoint -> bool). A function call of the form triangle (RX0,RY0) B H is intended to return a Boolean function representing the region of all continuous 2D points lying within the isosceles triangle with upper vertex (RX0,RY0), base B and height H. Applying this Boolean function to the argument (RX,RY) yields a function call written as triangle (RX0,RY0) B H (RX,RY) and expected to return true in case that (RX,RY) lies within the intended isosceles triangle, whose three vertices are (RX0,RY0), (RX0-B/2,RY0-H) and (RX0+B/2,RY0-H). The three sides of the triangle are mathematically characterized by the equations RY = RY0-H, B*RY-2*H*RX = B*RY0-2*H*RX0 and B*RY+2*H*RX = B*RY0+2*H*RX0 (corresponding to the lines r1 , r2 and r3 in Fig. 1, respectively). Therefore, the conjunction of three linear inequality R constraints occurring as conditions in the clause for triangle succeeds for those points (RX,RY) lying within the intended triangle. Similarly, the type declaration for square can be written in the equivalent form square :: int -> (dPoint -> bool), and a function call of the form square N is intended to return a Boolean function representing the grid of all discrete 2D points with coordinates belonging to the interval of integers between 0 and N. Therefore, a function call of the form square N (X,Y) must return true in case that (X,Y) lies within the intended grid, and for this reason the single F D constraint placed as condition in the clause for square has been chosen to impose the interval of integers between 0 and N as the domain of possible values for the variables X and Y. Finally, the last two functions diagonal and parabola are defined in such a way that diagonal N returns a Boolean function representing the diagonal of the grid represented by square N, while parabola (RX0,RY0) returns a Boolean function representing the parabola whose equation is RY-RY0 = (RX-RX0)*(RX-RX0). The type declarations and clauses for these functions can be understood similarly to the case of square and triangle. Different goals can be posed and solved using the small program just described and the cooperative goal solving calculus CCLN C(C) as implemented in the T OY system. For the sake of discussing some of them, assume two fixed positive integer values d and n such that n = 2*d. Then (d,d) is the middle point of the grid (square n), which includes (n+1)2 discrete points. The three following goals ask for points in the intersection of this fixed square grid with three different triangular regions: • Goal 1: bothIn (triangle (d, d+0.75) n 0.5) (square n) (X,Y). This goal fails. • Goal 2: bothIn (triangle (d, d+0.5) 2 1) (square n) (X,Y). This goal computes one solution for (X,Y), corresponding to the point (d,d). • Goal 3: bothIn (triangle (d, d+0.5) (2*n) 1) (square n) (X,Y). This goal computes n+1 solutions for (X,Y), corresponding to the points (0,d), (1,d), ..., (n,d). These three goals are illustrated in Fig. 2 for the particular case n = 4 and d = 2, although the shapes and positions of the three triangles with respect to the 8 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado middle point of the grid would be the same for any even positive integer n = 2*d. The expected solutions for each of the three goals are clear from the figures. Fig. 2. Intersection of a fixed square grid with three different triangular regions In the three cases, cooperation between the R solver and the F D solver is crucial for the efficiency of the computation. In the case of Goal 2, cooperative goal solving implemented in T OY according to the CCLN C(C) computation model uses the clauses in the program and eventually reduces the problem of solving the goal to the problem of solving a constraint system that, suitably simplified, becomes: X #== RX, Y #== RY, RY >= d-0.5, RY-RX <= 0.5, RY+RX <= n+0.5, domain [X,Y] 0 n, labeling [ ] [X,Y]. The T OY system has the option to enable or disable the computation of projections. When projections are disabled, the two bridges do still work as constraints, and the last F D constraint labeling [ ] [X,Y] forces the enumeration of all possible values for X and Y within their domains, eventually finding the unique solution X = Y = d after O(n2 ) steps. When projections are enabled, the available bridges are used to project the R constraints RY >= d-0.5, RY-RX <= 0.5, RY+RX <= n+0.5 into the F D constraints Y #>= d, Y#-X #<= 0, Y#+X #<= n. Since n = 2*d, the only possible solution of these inequalities is X = Y = d. Therefore, the F D solver drastically prunes the domains of X and Y to the singleton set {d}, and solving the last labeling constraint leads to the unique solution with no effort. For a big value of n = 2*d the performance of the computation is greatly enhanced in comparison to the case where projections are disabled, as confirmed by the experimental results given in Subsection 5.2. The expected speed-up in execution time corresponds to the improvement from the O(n2 ) steps needed to execute the labeling constraint On the Cooperation of the Constraint Domains H, R and F D in CF LP 9 labeling [ ] [X,Y] when the domains of both X and Y have size O(n), to the O(1) steps needed to execute the same constraint when the domains of both X and Y have been pruned to size O(1). Similar speedups are observed when solving Goal 1 (which finitely fails, and where the expected execution time also improves from O(n2 ) to O(1)) and Goal 3 (which has just n+1 solutions, and where the expected execution time reduces from O(n2 ) to O(n)). The three goals just discussed mainly illustrate the benefits obtained by the F D solver from the projection of R constraints. In fact, when T OY solves these three goals according to the cooperative computation model CCLN C(C), the available bridge constraints also allow to project the F D constraint domain [X,Y] 0 n into the conjunction of the R constraints 0 <= RX, RX <= n, 0 <= RY, RY <= n. These constraints, however, are not helpful for optimizing the resolution of the previously computed R constraints RY >= d-0.5, RY-RX <= 0.5, RY+RX <= n+0.5. In general, it seems easier for the F D solver to profit from the projection of R constraints than the other way round. This is because the solution of many practical problems is arranged to finish with solving F D labeling constraints, which means enumerating values for integer variables, and this process can greatly benefit from a reduction of the variables’ domains due to previous projections of R constraints. However, the projection of F D constraints into R constraints can help to define the intended solutions even if the performance of the R solver does not improve. For instance, assume that the value chosen for n = 2*d is big, and consider the goal • Goal 4: bothIn (triangle (d,d) n d) (square 4) (X,Y). whose resolution eventually reduces to the problem of solving a constraint system that, suitably simplified, becomes: X #== RX, Y #== RY, RY >= 0, RY-RX <= 0, RY+RX <= n, domain [X,Y] 0 4, labeling [ ] [X,Y]. The solutions correspond to the points lying in the intersection of a big isosceles triangle and a tiny square grid. Projecting RY >= 0, RY-RX <= 0, RY+RX <= n into F D constraints via the two bridges X #== RX, Y #== RY brings no significant gains to the R solver whose task is anyhow trivial. The R constraints projected from domain [X,Y] 0 4 (i.e., 0 <= RX, RX <= 4, 0 <= RY, RY <= 4) do not improve the performance of the R solver either, but they help to define the intended solutions. In this example, the last labeling constraint eventually enumerates the right solutions even if the projection of the domain constraint to R does not take place, but this projection would allow the R solver to compute suitable constraints as solutions in case that the labeling constraint were removed. There are also some cases where the performance of the R solver can benefit from the cooperation with the F D domain. Consider for instance the goal • Goal 5: bothIn (parabola (2,0)) (diagonal 4) (X,Y). asking for points in the intersection of the discrete diagonal segment of size 4 and 10 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado a parabola with vertix (2,0) (see Fig. 3). Solving this goal eventually reduces to solving a constraint system that, suitably simplified, becomes: X #== RX, Y #== RY, RY == (RX-2)*(RX-2), domain [X,Y] 0 4, X == Y, labeling [ ] [X,Y]. Fig. 3. Intersection of a parabolic line and a diagonal segment Cooperative goal solving as implemented in T OY processes the constraints within the current goal in left-to right order, performing projections whenever possible, and sometimes delaying a constraint that cannot be managed by the available solvers. In this case, the quadratic R constraint RY == (RX-2)*(RX-2) is delayed because the R solver used by T OY (inherited form SICStus Prolog) cannot solve non-linear constraints. However, since this strict equality relates expressions of type real, it is accepted as a R constraint and projected via the available bridges, producing the F D constraint Y == (X-2)*(X-2), which is submitted to the F D solver. Next, projecting the F D constraint domain [X,Y] 0 4 and solving X == Y causes the R constraints 0 <= RX, RX <= 4, 0 <= RY, RY <= 4 to be submitted to the R solver, and the variable X to be substituted in place of Y all over the goal. The bridges X #== RX, Y #== RY become then X #== RX, X #== RY, and the labeling constraint becomes labeling [ ] [X,X]. An especial mechanism called bridge unification infers from the two bridges X #== RX, X #== RY the strict equality constraint RX == RY, which is solved by substituting RX for RY all over the current goal. At this point, the delayed R constraint becomes RX == (RX-2)*(RX-2). Finally, the F D constraint labeling [ ] [X,X] is solved by enumerating all the possible values for X allowed by its domain, and continuing a different alternative computation with each of them. Due to the bridge X #== RX, each integer value v assigned to X by the labeling process causes the variable RX to be bound to the integral real number rv equivalent to v (in our computation model, this is part of the behaviour of a solver in charge of solving bridge constraints). The binding of RX to rv awakens the delayed constraint RX == (RX-2)*(RX-2), which becomes the linear (and even ground) constraint rv == (rv-2)*(rv-2) and succeeds if rv is an On the Cooperation of the Constraint Domains H, R and F D in CF LP 11 integral solution of the delayed quadratic equation. In this way, the two solutions of Goal 5 are eventually computed, corresponding to the two points (X,Y) lying in the intersection of the parabolic line and the diagonal segment: (1,1) and (4,4), as seen in Fig. 3. All the computations described in this subsection can be actually executed in the T OY system and also formally represented in the cooperative goal solving calculus CCLN C(C). The formal representation of goal solving computations in CCLN C(C) performs quite many detailed intermediate steps. In particular, constraints are transformed into a flattened form (without nested calls to primitive functions) before performing projections, and especial mechanisms for creating new bridges in some intermediate steps are provided. Detailed explanations and examples are given in Section 3. 1.3 Structure of the Paper To finish the introduction, we summarize the organization of the rest of the paper. Section 2 starts by presenting the main features of the CF LP scheme, including a mathematical formalization of constraint domains and solvers. The presentation follows (López-Fraguas et al. 2007), adding an explicit consideration of type discipline and an improved presentation of constraint domains, solvers and their formal properties. The rest of the section is new with respect to previous presentations of CF LP schemes: it discusses bridge constraints and the construction of coordination domains, concluding with a presentation of a particular coordination domain C tailored to the cooperation of the domains H, R and F D. In the subsequent sections, C always refers to this particular coordination domain. Section 3 presents our proposal of a computational model for cooperative programming and goal solving in CF LP (C). Programs and goals are introduced, the cooperative goal solving calculus CCLN C(C) is discussed in detail, and its main formal properties (namely soundness and limited completeness w.r.t. the declarative semantics of CF LP (C) provided by the CF LP scheme) are presented. Section 4 sketches the implementation of the CCLN C(C) computational model on top of the T OY system (Arenas et al. 2007), which is itself implemented on top of SICStus Prolog (SICStus Prolog 2007). The architectural components of the current T OY system are described and the extensions of T OY responsible for the treatment of bridges and projections according to the formal model provided by the previous section are briefly discussed. Section 5 discusses the practical use of the T OY system for solving problems involving the cooperation of the domains H, R and F D. A significant set of benchmarks is analyzed in order to study how the cooperation mechanisms affect to the performance of the system, and a detailed comparison to the performance of the META-S tool is also presented. Section 6 is devoted to a discussion of related work, trying to give an overview of different approaches in the area of cooperative constraint solving. Section 7 summarizes the main results of the paper, points out to some limitations of the current T OY implementation, and presents a brief outline of planned future work. 12 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado The results reported in this paper are supported by the experimental results presented in Section 5 and a number of mathematical proofs, most of which have been collected in the Appendices A.1 and A.2. In the case of reasonings concerning type discipline, we have refrained from providing full details, that would be technically tedious and distract from the main emphasis of the paper. More detailed proofs could be worked out, if desired, by adapting the techniques from (González-Moreno et al. 2001). 2 Coordination of Constraint Domains in the CF LP Scheme The scheme presented in (López-Fraguas et al. 2007) serves as a logical and semantic framework for lazy Constraint Functional Logic Programming (briefly CF LP ) over a parametrically given constraint domain. The aim of this section is to model the coordination of several constraint domains with their respective solvers using instances CF LP (C) of the CF LP scheme, where C is a so-called coordination domain built as a suitable combination of the various domains intended to cooperate. We use an enhanced version of the CF LP scheme, extending (López-Fraguas et al. 2007) with an explicit treatment of a polymorphic type discipline in the style of HindleyMilner-Damas and an improved presentation of constraint domains, solvers and their formal properties. In this setting, we discuss the three ‘pure’ constraint domains H, R and F D along with their solvers. Next, we present bridge constraints and the construction of coordination domains, concluding with the construction of a particular coordination domain C tailored to the cooperation of the domains H, R and F D, which is the topic of the rest of the paper. 2.1 Signatures and Types We assume a universal signature Ω = hT C, BT, DC, DF, P F i consisting of five pairwise disjoint sets of symbols, where S • T C = n∈N T C n is a family of countable and mutually disjoint sets of type constructors, indexed by arities. • BT is a set of base types. S • DC = n∈N DC n is a family of countable and mutually disjoint sets of data constructors, indexed by arities. S • DF = n∈N DF n is a family of countable and mutually disjoint sets of defined function symbols, indexed by arities. S • P F = n∈N P F n is a family of countable and mutually disjoint sets of primitive function symbols, indexed by arities. The idea is that base types and primitive function symbols are related to specific constraint domains, while type constructors, data constructors and defined function symbols are related to user given programs. For each choice of a specific family of base types SBT ⊆ BT and a specific family of primitive function symbols SP F ⊆ P F , we will say that Σ = hT C, SBT, DC, DF, SP F i is a domain specific signature. Note that any domain specific signature Σ inherits all the type constructors, data constructors and defined function symbols from the universal signature On the Cooperation of the Constraint Domains H, R and F D in CF LP 13 Ω, since different programs over a given constraint domain of signature Σ might use them. All symbols belonging to the family DC ∪ DF ∪ SP F are collectively called function symbols. All along the paper we will work with a static type discipline based on the Hindley-Milner-Damas type system (Hindley 1969; Milner 1978; Damas and Milner 1982). A detailed study of polymorphic type discipline in the context of Functional Logic Programming (without constraints) can be found in (González-Moreno et al. 2001). In the sequel we assume a countably infinite set TVar of type variables. Types τ ∈ T ypeΣ have the syntax τ ::= A | d | (ct τ1 . . . τn ) | (τ1 , . . . , τn ) | (τ1 → τ0 ), where A ∈ TVar, d ∈ SBT and ct ∈ T C n . By convention, parenthesis are omitted when there is no ambiguity, ct τ n abbreviates ct τ1 . . . τn , and “→” associates to the right, τ n → τ abbreviates τ1 → · · · → τn → τ . Types ct τ n , (τ1 , . . . , τn ) and τ1 → τ0 are used to represent constructed values, tuples and functions, respectively. A type without any occurrence of “→” is called a datatype. Type substitutions σt , θt ∈ T SubΣ are mappings from TVar into T ypeΣ, extended to mappings from T ypeΣ into T ypeΣ in the natural way. By convention, we write τ σt instead of σt (τ ) for any type τ . Whenever τ ′ = τ σt for some σt , we say that τ ′ is an instance of τ (or also that τ is more general than τ ′ ) and we write τ  τ ′ . The set of type variables occurring in τ is written tvar(τ ). A type τ is called monomorphic iff tvar(τ ) = ∅, and polymorphic otherwise. A polymorphic type τ must be understood as representing all its possible monomorphic instances τ ′ . Function symbols in any signature Σ are required to come along with a so-called principal type declaration, which indicates its most general type. More precisely, • Each n-ary c ∈ DC n must have attached a principal type declaration of the form c :: τ n → ct Ak , where n, k ≥ 0, A1 , . . . , Ak are pairwise differSn ent type variables, ct ∈ T C k , τ1 , . . . , τn are datatypes, and i=1 tvar(τi ) ⊆ {A1 , . . . , Ak } (so-called transparency property). • Each n-ary f ∈ DF n must have attached a principal type declaration of the form f :: τ n → τ , where τi (1 ≤ i ≤ n) and τ are arbitrary types. • Each n-ary p ∈ SP F n must have attached a principal type declaration of the form p :: τ n → τ , where τ1 , . . ., τn , τ are datatypes and τ is not a type variable. For the sake of semantic considerations, we assume a special data constructor (⊥ :: A) ∈ DC 0 , intended to represent an undefined value that belongs to any type. The type and data constructors needed to work with Boolean values and lists are also assumed to be present in the universal signature Ω. We also assume that SP F 2 includes the polymorphic primitive function symbol == :: A -> A -> bool, that will be written in infix notation and used to express strict equality constraints in those domains where it is available. In concrete programming languages such as T OY (Arenas et al. 2007) and Curry (Hanus 2006), data constructors and their principal types are introduced by datatype declarations, the principal types of defined functions can be either declared or inferred by the compiler, the principal types of primitive functions are predefined and known to the users, and ⊥ does not textually occur in programs. 14 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado Example 1 (Signatures and Types) In order to illustrate the main notions concerning signatures and types, let us consider the signature Σ underlying the program presented in Subsection 1.2. There we find: • Two base types int and real for the integer and real numeric values, respectively. • A nullary type constructor bool for the type of Boolean values, and a unary type constructor list for the type of polymorphic lists. The concrete syntax for list A is [A]. • [A] is a datatype, since it has no occurrences of the type constructor ->. Moreover, it is polymorphic, since it includes a type variable. Among the instances of [A] we can find [int] (for lists of integers) and [int -> int] (for lists of functions of type int -> int). Note that an instance of a datatype must not be a datatype. • Two nullary data constructors false, true :: bool (for Boolean values); a nullary data constructor nil :: [A] (for the empty list); and a binary data constructor cons :: A -> [A] -> [A] (for nonempty lists). The concrete syntax for nil (resp. cons) is [ ] (resp. :), where : is intended to be used as an infix operator. • The principal types of the constructors in the previous item can be derived from the datatype declarations data bool = false | true data [A] = [ ] | (A : [A]) which are predefined and do not need to be included within programs. • In the program presented in Subsection 1.2 there are also type alias declarations, such as type dPoint = (int,int) type setOf A = A -> bool type region = setOf dPoint Such declarations are just a practical convenience for naming certain types. They cannot involve recursion, and the names of type alias so introduced are not considered to belong to the signature. • Defined function symbols of various arities, as e.g. isIn, square ∈ DF 2 . These two function symbols are binary because the rewrite rules given for them within the program expect two formal parameters at their left hand sides. In general, rewrite rules included in programs for defining the behaviour of symbols f ∈ DF n are expected to have n formal parameters at their left hand sides. In some cases, this n may not identically correspond to the number of arrows observed in the principal type of f . For instance, although square ∈ DF 2 , the principal type is square :: int -> grid. The apparent contradiction disappears by noting that grid is declared as a type alias for (int,int) -> bool. Since the type constructor -> associates to the right, we have in fact square :: int -> (int,int) -> bool. • Primitive function symbols of various arities, as e.g. the binary primitives On the Cooperation of the Constraint Domains H, R and F D in CF LP 15 #==, labeling, + and <=, and the ternary primitive domain. The concrete syntax requires #==, + and <= to be used in infix notation. Each primitive has a predefined principal type. For instance, #== :: int -> real -> bool, + :: real -> real -> real and domain :: [int] -> int -> int -> bool. These declarations do not need to be included within programs. 2.2 Expressions and Substitutions For any domain of specific signature Σ, constraint programming will use expressions which may have occurrences of certain values of base type. Therefore, in order to define the syntax of expressions we assume a SBT -indexed family B = {Bd}d∈SBT , where each Bd is a non-empty set whose elements are understood as base values of type d. In the sequel, we will use letters u, v, . . . to indicate base values. By an S abuse of notation, we will also write u ∈ B instead of u ∈ d∈SBT Bd . Moreover, we also assume a countable infinite set Var of data variables (disjoint from TVar and Σ), and we define applicative Σ-expressions e ∈ ExpΣ (B) over B with the syntax e ::= X | u | h | (e1 , . . . , en ) | (e e1 ), where X ∈ Var, u ∈ B and h ∈ DC ∪ DF ∪ SP F . Expressions (e1 , . . . , en ) represent ordered n-tuples, while expressions (e e1 ) – not to be confused with ordered pairs (e, e1 ) – stand for the application of the function represented by e to the argument represented by e1 . Following a usual convention, we assume that application associates to the left, and we use the notation (e en ) to abbreviate (e e1 . . . en ). More generally, parenthesis can be omitted when there is no ambiguity. Applicative syntax is common in higher-order functional languages. The usual first-order syntax for expressions can be translated to applicative syntax by means of so-called curried notation. For instance, f (X, g(Y )) becomes (f X (g Y )). Expressions without repeated variable occurrences are called linear, variable-free expressions are called ground and expressions without any occurrence of ⊥ are called total. Some particular expressions are intended to represent data values that do not need to be evaluated. Such expressions are called Σ-patterns t ∈ P atΣ (B) over B and have the syntax t ::= X | u | (t1 , . . . , tn ) | c tm | f tm | p tm , where X ∈ Var, u ∈ B, c ∈ DC n for some m ≤ n, f ∈ DF n for some n > m, and p ∈ SP F n for some n > m. The restrictions concerning arities in the last three cases are motivated by the idea that an expression of the form h tn (where h ∈ DF n ∪SP F n ) is potentially evaluable and therefore not to be viewed as representing data. The set of all ground patterns over B is noted GP atΣ (B). Sometimes we will write UΣ (B) in place of GP atΣ (B), viewing this set as the universe of values over B. The following classification of expressions is also useful: (X em ) (with X ∈ Var and m ≥ 0) is called a flexible expression; while u ∈ B and all expressions of the form (h em ) (with h ∈ DC ∪ DF ∪ SP F ) are called rigid. Moreover, a rigid expression (h em ) is called passive iff h ∈ DF n ∪ SP F n and m < n, and active otherwise. Tuples (e1 , . . . , en ) are also considered as passive expressions. The idea is that any passive expression has the outermost appearance of a pattern, although it might not be a pattern in case that any of its inner subexpressions is active. As illustrated by the program presented in Subsection 1.2, tuples are useful for 16 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado programming and therefore the tuple syntax is supported by many programming languages, including T OY. On the other hand, tuples can be treated as a particular case of constructed values, just by assuming data constructors tupn ∈ DC n in the universal signature and viewing any tuple (e1 , . . . , en ) as syntactic sugar for tupn e1 . . . en . For this reason, in the rest of the paper we will omit the explicit mention to tuples, although we will continue to use them in examples. As usual in programming languages that adopt a static type discipline, all expressions occurring in programs are expected to be well-typed. Deriving or checking the types of expressions relies on two kinds of information: Firstly, the principal types of symbols belonging to the signature, that we assume to be attached to the signature itself; and secondly, the types of variables occurring in the expression. In order to represent this second kind of information, we will use type environments Γ = {X1 :: τ1 , . . . , Xn :: τn }, representing the assumption that variable Xi has type τi for all 1 ≤ i ≤ n. Following well-known ideas stemming from the work of Hindley, Milner and Damas (Hindley 1969; Milner 1978; Damas and Milner 1982), it is possible to define type inference rules for deriving type judgements of the form Σ, Γ ⊢W T e :: τ meaning that the assertion e :: τ (in words, “e has type τ ”) can be deduced from the type assumptions for symbols resp. variables given in Σ resp. Γ. The reader is referred to (González-Moreno et al. 2001) for a presentation of type inference rules well suited to Functional Logic Languages without constraints. Adding the treatment of constraints would be a relatively straightforward task. An expression e is called well-typed iff there is some type environment Γ such that Σ, Γ ⊢W T e :: τ can be derived for at least one type τ . Although this τ is not unique in general, it can be proved that a most general type τ (called the principal type of e and unique up to renaming of type variables) can be derived for any well-typed expression e. In practice, principal types of well-typed expressions can be automatically inferred by compilers. We will write Σ, Γ ⊢W T en :: τ n to indicate that Σ, Γ ⊢W T ei :: τi can be derived for all 1 ≤ i ≤ n, and Σ, Γ ⊢W T a :: τ :: b to indicate that both Σ, Γ ⊢W T a :: τ and Σ, Γ ⊢W T b :: τ hold. An expression e is called well-typed iff Σ, Γ ⊢W T e :: τ can be derived for some type τ using the underlying signature Σ and some suitable type environment Γ. Sometimes we will write simply e :: τ , meaning that Σ, Γ ⊢W T e :: τ can be derived using the underlying Σ and some proper choice of Γ (which can be just ∅ if e is ground). For the sake of semantic considerations, it is useful to define an information ordering ⊑ over ExpΣ (B), such that e ⊑ e′ is intended to mean that the information provided by e′ is greater or equal than the information provided by e. Mathematically, ⊑ is defined as the least partial ordering over ExpΣ (B) such that ⊥ ⊑ e′ for all e′ ∈ ExpΣ (B) and (e e1 ) ⊑ (e′ e′1 ) whenever e ⊑ e′ and e1 ⊑ e′1 . For later use, we accept without proof the following lemma. It is similar to the Typing Monotonicity Lemma in (González-Moreno et al. 2001) and it says that the type of any expression is also valid for its semantic approximations. It can be proved thanks to the fact that the undefined value ⊥ belongs to all the types. On the Cooperation of the Constraint Domains H, R and F D in CF LP 17 Lemma 1 (Type Preservation Lemma) Assume that Σ, Γ ⊢W T e′ :: τ and e ⊑ e′ hold. Then Σ, Γ ⊢W T e :: τ is also true. As part of the definition of signatures Σ we have required a transparency property for the principal types of data constructors. Due to transparency, the types of the variables occurring in a data term t can be deduced from the type of t. It is useful to isolate those patterns that have a similar property. To this purpose, we adapt some definitions from (González-Moreno et al. 2001). A type which can be written as τ m → τ is called m-transparent iff tvar(τ m ) ⊆ tvar(τ ) and m-opaque otherwise. Also, defined function symbols f and primitive function symbols p are called mtransparent iff their principal types are m-transparent and m-opaque otherwise. Note that a data constructor c is always m-transparent for all m ≤ ar(c). Then, transparent patterns can be defined as those having the syntax t ::= X | u | c tm | f tm | p tm , with X ∈ Var, u ∈ B, c ∈ DC n for some m ≤ n, f ∈ DF n for some n > m, and p ∈ SP F n for some n > m, where the subpatterns ti in (c tm ), (f tm ) and (p tm ) must be recursively transparent, and the principal types of both the defined function symbol f in (f tm ) and the primitive function symbol p in (p tm ) must be m-transparent. For instance, assume a defined function symbol with principal type declaration snd :: A -> B -> B. Then snd is 1-opaque and the pattern (snd X) is also opaque. In fact, the principal type B -> B of (snd X) reveals no information on the type of X, and different instances of (snd X) keep the principal type B -> B, independently of the type of the expression substituted for X. Such a behaviour is not possible for transparent patterns, due to the Transparency Lemma stated without proof below. Similar results were proved in (González-Moreno et al. 2001) in a slightly different context. Lemma 2 (Transparency Lemma) 1. Assume a transparent pattern t and two type environments Γ1 , Γ2 such that Σ, Γ1 ⊢W T t :: τ and Σ, Γ2 ⊢W T t :: τ , for a common type τ . Then Γ1 (X) = Γ2 (X) holds for every X ∈ var(t). 2. Assume that Σ, Γ ⊢W T h am :: τ :: h bm holds for some m-transparent h ∈ DC ∪ DF ∪ P F and some common type τ . Then, there exist types τi such that Σ, Γ ⊢W T ai :: τi :: bi holds for all 1 ≤ i ≤ m. Substitutions σ, θ ∈ SubΣ (B) over B are mappings from Var to P atΣ (B), extended to mappings from ExpΣ (B) to ExpΣ (B) in the natural way. For given e ∈ ExpΣ (B) and σ ∈ SubΣ (B), we will usually write eσ instead of σ(e). Whenever e′ = eσ for some substitution σ, we say that e′ is an instance of e (or also that e is more general than e′ ) and we write e  e′ . We write ε for the identity substitution and σθ for the composition of σ and θ, such that e(σθ) = (eσ)θ for any expression e. A substitution σ such that σσ = σ is called idempotent. The domain vdom(σ) and the variable range vran(σ) of a substitution are defined as usual: vdom(σ) = {X ∈ Var | Xσ 6= X} and vran(σ) = S X∈vdom(σ) var(Xσ). 18 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado A substitution σ is called finite iff vdom(σ) is a finite set, and ground iff Xσ is a ground pattern for all X ∈ vdom(σ). In the sequel, we will assume that the substitutions we work with are finite, unless otherwise said. We adopt the usual notation σ = {X1 7→ t1 , . . . , Xn 7→ tn }, whenever vdom(σ) = {X1 , . . . , Xn } and Xi σ = ti for all 1 ≤ i ≤ n. In particular, ε = { } = ∅. We also write σ[X 7→ t] for the substitution σ ′ such that Xσ ′ = t and Y σ ′ = Y σ for any variable Y ∈ Var \ {X}. For any set of variables X ⊆ Var we define the restriction σ ↾X as the substitution σ ′ such that vdom(σ ′ ) = X and σ ′ (X) = σ(X) for all X ∈ X . We use the notation σ =X θ to indicate that σ ↾X = θ ↾X , and we abbreviate σ =Var\X θ as σ =\X θ. Given two substitutions σ and θ, we define the application of θ to σ as the substitution σ ⋆ θ =def σθ ↾ vdom(σ). In other words, for any X ∈ Var, X(σ ⋆ θ) = Xσθ if X ∈ vdom(σ) and X(σ ⋆ θ) = X otherwise. We consider two different ways of comparing given substitutions σ, σ ′ ∈ SubΣ (B): • σ is said to be more general than σ ′ over X ⊆ Var (in symbols, σ X σ ′ ) iff σθ =X σ ′ for some θ ∈ SubΣ (B). We abbreviate σ Var σ ′ as σ  σ ′ and σ Var\X σ ′ as σ \X σ ′ . • σ is said to bear less information than σ ′ over X ⊆ Var (in symbols, σ ⊑X σ ′ ) iff σ(X) ⊑ σ ′ (X) for all X ∈ X . We abbreviate σ ⊑Var σ ′ as σ ⊑ σ ′ and σ ⊑Var\X σ ′ as σ ⊑\X σ ′ . Example 2 (Well-typed Expressions) Let us consider the specific signature Σ and the family of base values B underlying the program presented in Subsection 1.2. There we find: • The sets of base values Bint = Z and Breal = R. • Well-typed expressions such as square 4 (2,3) :: bool, RX-RY :: real, (RY-RX <= RY0-RX0) :: bool. • Well-typed patterns such as 3 :: int, 3.01 :: real, [X,Y] :: [int], square 4 :: dPoint -> bool. Note that [X,Y] abbreviates (X:(Y:[ ])), as usual in functional languages that use an infix list constructor. • Finally, note that ⊥ ⊑ (0 : ⊥) ⊑ (0 : (1 : ⊥)) ⊑ ... illustrates the behaviour of the information ordering ⊑ when restricted to the comparison of patterns belonging to the universe UΣ (B). The list patterns of type [int] used in this example are not allowed to occur textually in programs because of the occurrences of the undefined value ⊥, but they are meaningful as semantic representations of partially computed lists of integers. 2.3 Domains, Constraints and Solutions Intuitively, a constraint domain provides data values and constraints oriented to some particular application domain. Different approaches have been proposed for formalizing the notion of constraint domain, using mathematical notions borrowed from algebra, logic and category theory; see e.g. (Jaffar and Lassez 1987; Saraswat 1992; Jaffar and Maher 1994; Jaffar et al. 1998). The following definition is an elaboration of the domain notion given in (López-Fraguas et al. 2007): On the Cooperation of the Constraint Domains H, R and F D in CF LP 19 Definition 1 (Constraint Domain) A constraint domain of specific signature Σ (shortly, Σ-domain) is a structure D = hB D , {pD }p∈SP F i, where B D = {BdD }d∈SBT is a SBT -indexed family of sets of base values and the interpretation pD of each primitive function symbol p :: τ n → τ in SP F n is required to be a set of (n + 1)-tuples pD ⊆ UΣ (B D )n+1 . In the sequel, we abbreviate UΣ (B D ) as UD (called the universe of values of D), and we write pD tn → t to indicate (tn , t) ∈ pD . The intended meaning of “pD tn → t” is that the primitive function pD with given arguments tn can return a result t. Moreover, the interpretations of primitive symbols are required to satisfy four conditions: 1. Polarity: For all p ∈ SP F , “pD tn → t” behaves monotonically w.r.t. the arguments tn and antimonotonically w.r.t. the result t. Formally: For all tn , t′ n , t, t′ ∈ UD such that pD tn → t, tn ⊑ t′ n and t ⊒ t′ , pD t′ n → t′ also holds. 2. Radicality: For all p ∈ SP F , as soon as the arguments given to pD have enough information to return a result other than ⊥, the same arguments suffice already for returning a total result. Formally: For all tn , t ∈ UD , if pD tn → t then t = ⊥ or else there is some total t′ ∈ UD such that pD tn → t′ and t′ ⊒ t. 3. Well-typedness: For all p ∈ SP F , the behaviour of pD is well-typed w.r.t. any monomorphic instance of p’s principal type. Formally: For any monomorphic type instance (τ ′ n → τ ′ )  (τ n → τ ) and for all tn , t ∈ UD such that Σ ⊢W T tn :: τ ′ n and pD tn → t, the type judgement Σ ⊢W T t :: τ ′ also holds. 4. Strict Equality: The primitive == (in case that it belongs to SP F ) is interpreted as strict equality over UD , so that for all t1 , t2 , t ∈ UD , one has t1 ==D t2 → t iff some of the three following cases holds: (a) t1 and t2 are one and the same total pattern, and true ⊒ t. (b) t1 and t2 have no common upper bound in UD w.r.t. the information ordering ⊑, and f alse ⊒ t. (c) t = ⊥. With this definition, it is easy to check that ==D satisfies the polarity, radicality and well-typedness conditions. In Subsection 2.4 we will introduce the notion of solver, and we will see that the three domains H, R and F D mentioned in the introduction can be formalized according to the previous definition. In the rest of this subsection we discuss how to work with constraints over a given domain. For any given domain D of signature Σ, the set UD = UΣ (B D ) = GP atΣ (B D ) is called the universe of values of the domain D. We will also write ExpD , P atD and SubD in place of ExpΣ (B D ), P atΣ (B D ) and SubΣ (B D ), respectively. Note that requirement 4. in Definition 1 imposes a fixed interpretation of == as the strict equality operation ==D over UD , for every domain D whose specific signature includes this primitive. It is easy to check that the polarity, radicality and well-typedness requirements are satisfied by strict equality. The following definition will be useful: 20 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado Definition 2 (Conservative Extension of a given Domain) Given two domains D, D′ with respective signatures Σ and Σ′ , D′ is called a conservative extension of D iff the following conditions hold: 1. Σ ⊆ Σ′ , i.e. SBT ⊆ SBT ′ and SP F ⊆ SP F ′ . ′ 2. For all d ∈ SBT , one has BdD = BdD . ′ 3. For all p ∈ SP F n other than == and for every tn , t ∈ UD , one has pD tn → t iff pD tn → t. As usual in constraint programming, we define constraints over a given domain D as logical formulas built from atomic constraints by means of conjunction ∧ and existential quantification ∃. More precisely, constraints δ ∈ ConD over the constraint domain D have the syntax δ ::= α | (δ1 ∧ δ2 ) | ∃Xδ, where α is any atomic constraint over D and X ∈ Var is any variable. We allow two kinds of atomic constraints α over D: a) ♦ and , standing for truth (success) and falsity (failure), respectively; and b) atomic constraints of the form p en →! t with p ∈ SP F n , where en ∈ ExpD , t ∈ P atD , and t is required to be total (i.e., without any occurrences of ⊥). The intended meaning of p en →! t constrains the value returned by the call p en to be a total pattern matching the form of t. By convention, constraints of the form p en →! true are abbreviated as p en . Sometimes constraints of the form p en →! f alse are abbreviated as p′ en , using some symbol p′ to suggest the ‘negation’ of p. In particular, strict equality constraints e1 == e2 and strict disequality constraints e1 /= e2 are understood as abbreviations of e1 == e2 →! true and e1 == e2 →! f alse, respectively. The next definition introduces some useful notations for different kinds of constraints. Definition 3 (Notations for various kinds of constraints) Given two domains D, D′ with respective signatures Σ and Σ′ , such that D′ is a conservative extension of D. Let SP F ⊆ SP F ′ be the sets of specific primitive function symbols of D and D′ , respectively. We define: 1. AConD ⊆ ConD is the set of all atomic constraints over D. 2. AP ConD ⊆ AConD is the set of all atomic primitive constraints over D. By definition, α ∈ AP ConD iff α has the form ♦,  or p tn →! t, where tn ∈ P atD are patterns. 3. P ConD ⊆ ConD is the set of all primitive constraints π over D. By definition, a constraint π ∈ ConD is called primitive iff all the atomic parts of π are primitive. Note that AP ConD = AConD ∩ P ConD . 4. ConD′ ↾ SP F is the set of all SP F -restricted constraints over D′ . By definition, a constraint δ ∈ ConD′ is called SP F -restricted iff all the atomic parts of δ have the form ♦,  or p en →! t, where p ∈ SP F n . The subsets AP ConD′ ↾ SP F ⊆ AConD′ ↾ SP F ⊆ ConD′ ↾ SP F are defined in the natural way. In particular, AP ConD′ ↾ SP F is the set of all the SP F -restricted atomic primitive constraints over D′ , which have the form ♦ or  or p tn →! t, with p ∈ SP F n , tn , t ∈ P atD′ and t total. A particular occurrence of a variable X within a constraint δ is called free iff it is not affected by any quantification, and bound otherwise. In the sequel, we will write On the Cooperation of the Constraint Domains H, R and F D in CF LP 21 var(δ) (resp. f var(δ)) for the set of all variables having some occurrence (resp. free occurrence) in the constraint δ. The notations var(∆) and f var(∆) for a set of constraints ∆ ⊆ ConD have a similar meaning. The type inference rules mentioned in Subsection 2.2 can be naturally extended to derive also type judgments of the form Σ, Γ ⊢W T δ, meaning that the constraint δ is well-typed w.r.t. the type assumptions for symbols resp. variables given in Σ resp. Γ. Sometimes we will simply claim that δ is well-typed to indicate that Σ, Γ ⊢W T δ can be derived using the underlying signature Σ and some suitable type environment Γ (which can be just ∅ if δ has no free variables). The set of valuations V alD over the domain D consists of all ground substitutions η such that vran(η) ⊆ UD . Those valuations which satisfy a given constraint are called solutions. For those constraints δ that include subexpressions of the form f en for some f ∈ DF n , the solutions of δ depend on the behaviour of f , which is not included in the domain D, but must be deduced from some user given program, as we will see in Section 3. However, the solutions of primitive constraints depend only on the domain D. More precisely: Definition 4 (Solutions of Primitive Constraints) 1. The set of solutions of a primitive constraint π ∈ P ConD is a subset SolD (π) ⊆ V alD defined by recursion on the syntactic structure of π as follows: • • • • SolD (♦) = V alD ; SolD () = ∅. SolD (p tn →! t) = {η ∈ V alD | (p tn →!t)η ground, pD tn η → tη, tη total}. SolD (π1 ∧ π2 ) = SolD (π1 ) ∩ SolD (π2 ). SolD (∃Xπ) = {η ∈ V alD | exists η ′ ∈ SolD (π) s.t. η ′ =\{X} η}. 2. Any set Π ⊆ P ConD is interpreted as a conjunction, and therefore SolD (Π) = T π∈Π SolD (π). 3. The set of well-typed solutions of a primitive constraint π ∈ P ConD is a subset W T SolD (π) ⊆ SolD (π) consisting of all η ∈ SolD (π) such that πη is well-typed. T 4. Finally, for any Π ⊆ P ConD we define W T SolD (Π) = π∈Π W T SolD (π). Note that any solution η ∈ SolD (π) must verify vdom(η) ⊇ f var(π). For later use, we accept the two following technical lemmata. The first one can be easily proved by induction on the syntactic structure of Π and the second one is a simple consequence of the polarity properties of primitive functions. The notation (W T )Sol used in both lemmata is intended to indicate that they are valid both for plain solutions and for well-typed solutions. Lemma 3 (Substitution Lemma) For any given Π ⊆ P ConD , σ ∈ SubD and η ∈ V alD , the equivalence η ∈ (W T )SolD (Πσ) ⇔ ση ∈ (W T )SolD (Π) is valid. Lemma 4 (Monotonicity Lemma) For any given Π ⊆ P ConD and η, η ′ ∈ V alD such that η ⊑ η ′ and η ∈ (W T )SolD (Π), one also has η ′ ∈ (W T )SolD (Π). 22 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado A given solution η ∈ SolD (Π) can bind some variables X to the undefined value ⊥. Intuitively, this will happen whenever the value of X is not needed for checking the satisfaction of the constraints in Π. Formally, a variable X is demanded by a set of constraints Π ⊆ P ConD iff η(X) 6= ⊥ for all η ∈ SolD (Π). We write dvarD (Π) to denote the set of all X ∈ f var(Π) such that X is demanded by Π. In practice, CF LP programming requires effective procedures for recognizing ‘obvious’ occurrences of demanded variables in the case that Π is a set of atomic primitive constraints. We assume that for any practical constraint domain D and any primitive atomic constraint π ∈ AP ConD there is an effective way of computing a subset odvarD (π) ⊆ dvarD (π). Variables X ∈ odvarD (π) will be said to be obviously demanded by π. We extend the notion to finite constraint sets Π ⊆ AP ConD by defining the set odvarD (Π) of all variables obviously demanded S by Π as π∈Π odvarD (π). In this way, it is clear that odvarD (Π) ⊆ dvarD (Π) holds for any Π ⊆ AP ConD ; i.e., obviously demanded variables are always demanded. The inclusion is strict in general. In particular, for any constraint domain D whose specific signature includes the strict equality primitive == and any primitive atomic constraint of the form π = (t1 ==t2 →! t), odvarD (π) is defined by a case distinction, as follows: • • • • • • • odvarD (t1 ==t2 →! R) = {R}, if R ∈ Var. odvarD (X==Y ) = {X, Y }, if X, Y ∈ Var. odvarD (X==t) = odvarD (t==X) = {X}, if X ∈ Var and t ∈ / Var. odvarD (t1 ==t2 ) = ∅, otherwise. odvarD (X/=Y ) = {X, Y }, if X, Y ∈ Var, X and Y not identical. odvarD (X/=t) = odvarD (t/=X) = {X}, if X ∈ Var and t ∈ / Var. odvarD (t1 /=t2 ) = ∅, otherwise. The inclusion odvarD (π) ⊆ dvarD (π) is easy to check, by considering the behaviour of the interpreted strict equality operation ==D . The method for computing odvarD (π) for atomic primitive constraints based on primitive functions other than equality must be given as part of a practical presentation of the corresponding domain D. In the sequel, we will call critical to those variables occurring in Π which are not obviously demanded, and we will write cvarD (Π) = var(Π) \ odvarD (Π) for the set of all critical variables. As we will see in Section 3, goal solving methods for CF LP programming rely on the effective recognition of critical variables. Therefore, the proper behaviour of goal solving depends on well-defined methods for the computation of obviously demanded variables. In the rest of the paper we will often use constraint stores of the form S = Π ✷ σ, where Π ⊆ AP ConD and σ is an idempotent substitution such that vdom(σ) ∩ var(Π) = ∅. We will need to work with solutions of constraint stores, possibly affected by an existential prefix. This notion is defined as follows: Definition 5 (Solutions of Constraint Stores) 1. SolD (∃Y (Π ✷ σ)) = {η ∈ V alD | exists η ′ ∈ SolD (Π ✷ σ), s.t. η ′ =\Y η}. 2. SolD (Π ✷ σ) = SolD (Π) ∩ Sol(σ). 3. Sol(σ) = {η ∈ V alD | η = ση} (Note that η = ση holds iff Xη = Xση for all X ∈ vdom(σ)). On the Cooperation of the Constraint Domains H, R and F D in CF LP 23 4. W T SolD (∃Y (Π ✷ σ)) = {η ∈ V alD | ex. η ′ ∈ W T SolD (Π ✷ σ), s.t. η ′ =\Y η}. 5. W T SolD (Π ✷ σ) = {η ∈ SolD (Π ✷ σ) | (Π ✷ σ) ⋆ η is well-typed}, where (Π ✷ σ) ⋆ η =def Πη ✷ (σ ⋆ η). Example 3 (Constraints and Their Solutions) Let us now illustrate different notions concerning constraints by referring again to the motivating example from Subsection 1.2. The domain C underlying this example is a ‘hybrid’ domain supporting the cooperation of three ‘pure’ domains named H, R and F D, as we will see in Subsections 2.4 and 2.5. For the moment, note that C allows to work with four different kinds of constraints, namely bridge constraints and the specific constraints supplied by H, R and F D, as explained in Section 1. 1. Concerning well-typed constraints, we note that the small program in this example is well-typed. Therefore, all the constraints occurring there are also well-typed. For instance: • domain [X,Y] 0 N is well-typed (w.r.t. any type environment which includes the type assumptions X :: int, Y :: int, N :: int). • RY+RX <= RY0+RX0 is also well-typed (w.r.t. any type environment which includes the type assumptions RY :: real, RX :: real, RY0 :: real, RX0 :: real). Of course, the signature underlying the example allows to write constraints such as domain [X,Y] true 3.2, which cannot be well-typed in any type environment. Due to static type discipline, the compiler will reject programs including ill-typed constraints. 2. Concerning constraint solutions, note that computing by means of the cooperative goal solving calculus presented in Section 3 eventually triggers the computation of solutions for primitive constraints. As already discussed in Subsection 1.2, solving Goal 2 eventually leads to the following set Π of primitive constraints (understood as logical conjunction): X #== RX, Y #== RY, RY >= d-0.5, RY-RX <= 0.5, RY+RX <= n+0.5, domain [X,Y] 0 n, labeling [ ] [X,Y]. Π happens to be the union of three sets of primitive constraints corresponding to the three lines above: A set of two bridge constraints ΠM , a set of three real arithmetical constraints ΠR , and a set of two finite domain constraints ΠF . Therefore, SolC (Π) = SolC (ΠM ) ∩ SolC (ΠR ) ∩ SolC (ΠF ). As we have seen in Subsection 1.2, the only possibility for η ∈ SolC (Π) is η(X) = η(Y) = d, and the computation proceeds with the help of constraint solvers and projections, among other mechanisms. 3. Concerning obviously demanded variables, let us remark that all the variables occurring in the constraint set Π shown in the previous item are obviously demanded. This will become clear from the discussion of the domains H, R and F D in Subsection 2.4. 24 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 4. Concerning critical variables, note that a variable may be critical either because it is demanded but not obviously demanded, or else because it is not demanded at all. For instance, variables A and B are demanded but not obviously demanded by the strict equality constraint (A,2) == (1,B). Therefore, they are critical variables. To illustrate the case of critical but not demanded variables, consider the primitive constraint π = L /= X:Xs. Due to the definition of ‘obvious demand’ for strict disequality constraints, variable L is obviously demanded by π, while X and Xs are not obviously demanded, and therefore critical. Moreover, it can be argued that neither X nor Xs is demanded by π. Variable X is not demanded because there exist solutions η ∈ SolD (π) such that η(X) = ⊥ (either with η(L) = [ ] or else with η(L) = t : ts such that η(Xs) is different from ts). Variable Xs is not demanded because of similar reasons. 2.4 Pure Domains and their Solvers In order to be helpful for programming purposes, constraint domains must provide so-called constraint solvers, which process the constraints arising in the course of a computation. For some theoretical purposes, it suffices to model a solver as a function which maps any given constraint to one of the three different values true, f alse or unknown; see e.g. (Jaffar et al. 1998). In practice, however, solvers are expected to have the ability of reducing primitive constraints to so-called solved forms, which are simpler and can be shown as computed answers to the users. As discussed in the introduction (see in particular Subsection 1.2), the constraint domain underlying many practical problems may involve heterogeneous primitives related to different base types. In such cases, it may be not realistic to expect that a single solver for the whole domain is directly available. In the sequel, we will make a pragmatic distinction between pure constraint domains which are given ‘in one piece’ and come equipped with a solver, and hybrid constraint domains which are built as a combination of simpler domains and must rely on the solvers of their components. In the rest of this subsection we give a mathematical formalization of the notion of solver tailored to the needs of the CF LP scheme, followed by a presentation of H, R and F D as pure domains equipped with solvers. In the case of R and F D, we limit ourselves to describe their most basic primitives, although other useful facilities are available in the T OY implementation. A proposal for the construction of so-called coordination domains as a particular kind of hybrid domains will be presented in Subsection 2.5. 2.4.1 Constraint Solvers For any pure constraint domain D we postulate a constraint solver which can reduce any given finite set Π of atomic primitive constraints to an equivalent simpler form, while taking proper care of critical variables occurring in Π. Since the value of a critical variable X may be needed by some solutions of Π and irrelevant for some other solutions, we require that solvers have the ability to compute a distinction of cases discriminating such situations. On the Cooperation of the Constraint Domains H, R and F D in CF LP 25 Definition 6 (Formal Requirements for Solvers) A constraint solver for the domain D is modeled as a function solveD which can be applied to pairs of the form (Π, X ), where Π ⊆ AP ConD is a finite set of atomic primitive constraints and X ⊆ cvarD (Π) is a finite set including some of the critical variables in Π, where the two extreme cases X = ∅ and X = cvarD (Π) are allowed. By convention, we may abbreviate solveD (Π, ∅) as solveD (Π). We require that any W solver invocation solveD (Π, X ) returns a finite disjunction kj=1 ∃Y j (Πj ✷ σj ) of existentially quantified constraint stores, fulfilling the following conditions: 1. Fresh Local Variables: For all 1 ≤ j ≤ k: (Πj ✷ σj ) is a store, Y j = var(Πj ✷ σj ) \ var(Π) are fresh local variables and vdom(σj ) ∪ vran(σj ) ⊆ var(Π) ∪ Y j . 2. Solved Forms: For all 1 ≤ j ≤ k: Πj ✷ σj is in solved form w.r.t. X . By definition, this means that solveD (Πj , X ) = Πj ✷ ε. 3. Safe Bindings: For all 1 ≤ j ≤ k and for all X ∈ X ∩ vdom(σj ): σj (X) is a constant. 4. Discrimination: Each computed X -solved form Πj ✷ σj (1 ≤ j ≤ k) must satisfy: Either X ∩ odvarD (Πj ) 6= ∅ or else X ∩ var(Πj ) = ∅ (i.e., either some critical variable in X becomes obviously demanded, or else all critical variables in X disappear). Sk 5. Soundness: SolD (Π) ⊇ j=1 SolD (∃Y j (Πj ✷ σj )). Sk 6. Completeness: W T SolD (Π) ⊆ j=1 W T SolD (∃Y j (Πj ✷ σj )). Moreover, solveD is called an extensible solver iff the solver invocation solveD (Π, X ) is defined and satisfies the conditions listed in this definition not just for Π ⊆ AP ConD and X ⊆ cvarD (Π), but more generally for Π ⊆ AP ConD′ ↾ SP F and X ⊆ cvarD′ (Π), where D′ is any conservative extension of D. The idea is that an extensible solver can deal with constraints involving the primitives in D and values described by patterns over arbitrary conservative extensions of D. The presentation of goal solving in Section 3 will discuss the proper way of choosing a set X of critical variables for each particular solver invocation. The idea is that X should include all critical variables which are waiting to be bound to the result of evaluating some expression at some other place within the goal. This idea also motivates the safe bindings condition. Operationally, the alternatives within the disjunctions returned by solver invocations are usually explored in some sequential order with the help of a backtracking W mechanism. Assuming that solveD (Π, X ) = kj=1 ∃Y j (Πj ✷ σj ), we will sometimes use the following notations: • Π ⊢⊢solveD ∃Y ′ (Π′ ✷ σ ′ ) to indicate that ∃Y ′ (Π′ ✷ σ ′ ) is ∃Y j (Πj ✷ σj ) for some X 1 ≤ j ≤ k. In this case we will speak of a successful solver invocation. • Π ⊢⊢solveD  to indicate that k = 0. In this case we will speak of a failed X solver invocation, yielding the obviously unsatisfiable store  =  ✷ ε. As defined above, a constraint store Π ✷ σ is said to be in solved form w.r.t. a set of critical variables X (or simply in solved form if X = ∅) iff solveD (Π, X ) = Π ✷ ε. 26 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado In practice, solved forms can be recognized by syntactical criteria, and a solver invocation solveD (Π, X ) is performed only in the case that Π ✷ σ is not yet solved w.r.t. X . Whenever a solver is invoked, the soundness condition requires that no new spurious solution (whether well-typed or not) is introduced, while the completeness condition requires that no well-typed solution is lost. In practice, any solver can be expected to be sound, but completeness may hold only for some choices of the constraint set Π to be solved. Demanding completeness for arbitrary (rather than well-typed) solutions would be still less realistic. The solvers of interest for this paper suffer some limitations regarding completeness, as explained in Subsections 2.4.2, 2.4.3 and 2.4.4 below. From a user’s viewpoint, a solver can behave as a black-box or as a glass-box. Black-box solvers can just be invoked to compute disjunctions of solved forms, but users cannot observe their inner workings, in contrast to the case of glassbox solvers. Users can define glass-box solvers by means of appropriate tools, such as Constraint Handling Rules (Frühwirth 1998). In this paper we propose to use store transformation systems as a convenient abstract technique for specifying the behaviour of glass-box solvers. A store transformation system (briefly sts) over the constraint domain D is specified as a set of store transformation rules (briefly strs) RL that describe different ways to transform a given store Π ✷ σ w.r.t. a given set X of critical variables. The notions and notations defined below are useful for working with stss. Some of them refer to a selected set of strs noted as RS. • Π ✷ σ ⊢⊢D, X Π′ ✷ σ ′ indicates that the store Π ✷ σ can be transformed into Π′ ✷ σ ′ in one step, using one of the available strs. This notation can be also used to indicate a failing transformation step, writing the inconsistent store  =  ✷ ε in place of Π′ ✷ σ ′ . • Π ✷ σ ⊢⊢∗D, X Π′ ✷ σ ′ indicates that Π ✷ σ can be transformed into Π′ ✷ σ ′ in finitely many steps. • The store Π ✷ σ is called RS-irreducible iff there is no str RL ∈ RS that can be applied to transform Π ✷ σ. Note that this is trivially true if RS is the empty set. If RS is the set of all the available strs, the store Π ✷ σ is called simply irreducible (or also a X -solved form). • Π ✷ σ ⊢⊢∗D, X ! Π′ ✷ σ ′ indicates that Π ✷ σ ⊢⊢∗D, X Π′ ✷ σ ′ holds, and moreover, the final store Π′ ✷ σ ′ is irreducible. Assume a given sts over D such that for any finite Π ⊆ AP ConD and any X ⊆ cvarD (Π), the set SF D (Π, X ) = {Π′ ✷ σ ′ | Π ✷ ε ⊢⊢∗D, X ! Π′ ✷ σ ′ } is finite. Then the solver defined by the sts can be specified to behave as follows: _ solveD (Π, X ) = {∃Y ′ (Π′ ✷σ ′ ) | Π′ ✷σ ′ ∈ SF D (Π, X ), Y ′ = var(Π′ ✷σ ′ ) \ var(Π)} Once solveD has been so defined, the notation Π ⊢⊢solveD ∃Y ′ (Π′ ✷ σ ′ ) actually X happens to mean that Π ✷ ε ⊢⊢∗D, X ! Π′ ✷ σ ′ and Y ′ = var(Π′ ✷ σ ′ ) \ var(Π). Therefore, the symbols ⊢⊢solveD and ⊢⊢∗D, X ! should not be confused, but have related X meanings. The following definition specifies different properties of store transformation systems that are useful to check that the corresponding solvers satisfy the conditions stated in Definition 6. On the Cooperation of the Constraint Domains H, R and F D in CF LP 27 Definition 7 (Properties of Store Transformation Systems) Assume a store transformation system over D whose transition relation is ⊢⊢D, X , and a selected set RS of strs. Then the sts is said to satisfy: 1. The Fresh Local Variables Property iff Π ✷ σ ⊢⊢D, X Π′ ✷ σ ′ implies that Π′ ✷ σ ′ is a store, Y ′ = var(Π′ ✷ σ ′ ) \ var(Π ✷ σ) are fresh local variables, and σ ′ = σσ1 for some substitution σ1 (responsible for the variable bindings created at this step) such that vdom(σ1 ) ∪ vran(σ1 ) ⊆ var(Π) ∪ Y ′ . 2. The Safe Bindings Property iff Π ✷ σ ⊢⊢D, X Π′ ✷ σ ′ implies that σ1 (X) is a constant for all X ∈ X ∩ vdom(σ1 ), where σ ′ = σσ1 as in the previous item. 3. The Finitely Branching Property iff for any fixed Π ✷ σ there are finitely many Π′ ✷ σ ′ such that Π ✷ σ ⊢⊢D, X Π′ ✷ σ ′ . 4. The Termination Property iff there is no infinite sequence {Πi ✷ σi | i ∈ N} such that Πi ✷ σi ⊢⊢D, X Πi+1 ✷ σi+1 for all i ∈ N. 5. The Local Soundness Property iff for any D-store Π ✷ σ, the union [ {SolD (∃Y ′ (Π′ ✷ σ ′ )) | Π ✷ σ ⊢⊢D, X Π′ ✷ σ ′ , Y ′ = var(Π′ ✷ σ ′ )\var(Π ✷ σ)} is a subset of SolD (Π ✷ σ). 6. The Local Completeness Property for RS-free steps iff for any D-store Π ✷ σ which is RS-irreducible but not in X -solved form, W T SolD (Π ✷ σ) is a subset of the union [ {W T SolD (∃Y ′ (Π′ ✷ σ ′ )) | Π✷σ ⊢⊢D, X Π′ ✷σ ′ , Y ′ = var(Π′ ✷σ ′ )\var(Π✷σ)} If RS is the empty set (in which case all the stores are trivially RS-irreducible) this property is called simply local completeness. In the case of an extensible solver, the six conditions listed in this definition must be checked for any conservative extension D′ of D and any set Π of SP F -restricted atomic primitive constraints over D′ . Assume a solver solveD defined by means of a given sts with transition relation ⊢⊢D, X and a selected set RS of strs. If the sts is terminating, the following recursive definition makes sense: A given store Π ✷ σ is hereditarily RS-irreducible iff Π ✷ σ is RS-irreducible and all the stores Π′ ✷ σ ′ such that Π ✷ σ ⊢⊢D, X Π′ ✷ σ ′ (if any) are also hereditarily RS-irreducible. A solver invocation solveD (Π, X ) is called RS-free iff the store Π ✷ ε is hereditarily RS-irreducible. This notion occurs in the following technical lemma (proved in Appendix A.1), which can be applied to ensure that solveD satisfies the requirements for solvers listed in Definition 6. Lemma 5 (Solvers defined by means of Store Transformation Systems) Any finitely branching and terminating D-store transformation system verifies: 1. SF D (Π, X ) is always finite, and hence solveD is well defined and trivially satisfies the solved forms property. 2. solveD has the fresh local variables resp. safe bindings property if the store transformation system has the corresponding property. 3. solveD is sound if the store transformation system is locally sound. 28 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 4. solveD is complete for RS-free invocations if the store transformation system is locally complete for RS-free steps. In the case that RS is empty, this amounts to say that solveD is complete if the store transformation system is locally complete. Note that this lemma can be used for proving global properties of extensible solvers, provided that the sts can work with constraint stores Π ✷ σ, where Π is a finite set of SP F -restricted atomic primitive constraints over some arbitrary conservative extension D′ of D, and the local properties required by the lemma hold for any such D′ . In the rest of this paper, we will work with the three pure domains H, F D and R introduced in the following sections. We will rely on black-box solvers for R and F D provided by SICStus Prolog and we will define an extensible glass-box solver for H using the store transformation technique just explained. 2.4.2 The Pure Constraint Domain H The Herbrand domain H supports computations with symbolic equality and disequality constraints over values of any type. Formally, it is defined as follows: • Specific signature Σ = hT C, SBT, DC, DF, SP F i, where SBT is empty and SP F includes just the strict equality operator == :: A -> A -> bool. • Interpretation ==H , defined as for any domain whose specific signature includes ==. Recall Definition 2 and note that a conservative extension of H is any domain D whose specific signature includes the primitive ==. Such a D will be called a domain with equality in the sequel. The {==}-restricted constraints over a given domain with equality are also called extended Herbrand constraints. As already explained in Subsection 2.3, atomic Herbrand constraints have the form e1 == e2 →! t, strict equality constraints e1 == e2 abbreviate e1 == e2 →! true, and strict disequality constraints abbreviate e1 == e2 →! false. Obviously demanded variables (and thus critical variables) for primitive extended Herbrand constraints are computed as explained in Subsection 2.3. An extensible Herbrand solver must be able to solve any finite set Π ⊆ AP ConD ↾ {==} of atomic primitive extended Herbrand constraints, w.r.t. any X ⊆ cvarD (Π) of critical variables. Roughly speaking, the solver proceeds by symbolic decomposition and binding propagation transformations. More precisely, we define an extensible glass-box solver for H by means of the store transformation technique explained in Subsection 2.4.1, using the transformation rules for H stores shown in Table 1. Each of these rules has the form π, Π ✷ σ ⊢⊢H, X Π′ ✷ σ ′ and indicates the transformation of any store π, Π ✷ σ, which includes the atomic constraint π plus other constraints Π; no sequential ordering is intended. We say that π is the selected atomic constraint for this transformation step. The notation tm ==sm in transformation H3 abbreviates t1 == s1 , . . . , tm == sm and will be used at some other places. All the stss make sense for arbitrary extended Herbrand constraints, which ensures extensibility of the H-solver. Note that transformations H3 and H7 involve decompositions. An On the Cooperation of the Constraint Domains H, R and F D in CF LP 29 application of H3 or H7 is called opaque iff h is m-opaque in the sense explained in Subsection 2.2, in which case the new constraints resulting from the decomposition may become ill-typed. Note also that an application of transformation H13 may obviously lose solutions. An invocation solveH (Π, X ) of the H-solver is called safe iff it has been computed without any opaque application of the store transformation rules H3 and H7 and without any application of the store transformation rule H13. More formally, solveH (Π, X ) is a safe invocation of the H-solver iff it is URS-free, where URS is the set {OH3, OH7, H13} consisting of H13 and the unsafe instances OH3 and OH7 corresponding to opaque applications of H3 and H7, respectively. H1 (t == s) →! R, Π ✷ σ ⊢⊢H,X (t == s, Π)σ1 ✷ σσ1 where σ1 = {R 7→ true}. H2 (t == s) →! R, Π ✷ σ ⊢⊢H,X (t /= s, Π)σ1 ✷ σσ1 where σ1 = {R 7→ f alse}. H3 h tm == h sm , Π ✷ σ ⊢⊢H,X tm ==sm , Π ✷ σ H4 t == X, Π ✷ σ ⊢⊢H,X X == t, Π ✷ σ if t is not a variable. H5 X == t, Π ✷ σ ⊢⊢H,X tot(t), Πσ1 ✷ σσ1 V if X ∈ / X, X ∈ / var(t), X 6= t, where σ1 = {X 7→ t}, tot(t) abbreviates Y ∈var(t) (Y ==Y ). H6 X == t, Π ✷ σ ⊢⊢H,X  if X ∈ var(t), X 6= t. H7 h tm /= h sm , Π ✷ σ ⊢⊢H,X (ti /= si , Π ✷ σ) ′ H8 h tn /= h sm , Π ✷ σ ⊢⊢H,X Π ✷ σ H9 t /= t, Π ✷ σ ⊢⊢H,X  for each 1 ≤ i ≤ m. ′ if h 6= h or n 6= m. if t ∈ Var ∪ DC ∪ DF ∪ SP F . H10 t /= X, Π ✷ σ ⊢⊢H,X X /= t, Π ✷ σ if t is not a variable. / , c∈DC n and X ∩ var(c tn )6=∅ H11 X/= c tn , Π✷σ ⊢⊢H,X (Zi /=ti , Π)σ1 ✷σσ1 if X ∈X where 1≤i≤n (non-deterministic choice), σ1 ={X7→ c Z n }, Z n fresh variables. / X , c ∈ DC n and X ∩ var(c tn ) 6= ∅ H12 X /= c tn , Π ✷ σ ⊢⊢H,X Πσ1 ✷ σσ1 if X ∈ where σ1 = {X 7→ d Z m }, c ∈ DC n , d ∈ DC m , d 6= c, d belongs to the same datatype as c, Z m fresh variables. H13 X /= h tm , Π ✷ σ ⊢⊢H,X  if X ∈ / X , X ∩ var(h tm ) 6= ∅ and h ∈ / DC m . Table 1. Store Transformations for solveH The idea of using equality and disequality constraints in Logic Programming stems from Colmerauer (Colmerauer 1984; Colmerauer 1990). The problem of solving these constraints, as well as related decision problems for theories involving equations and disequations, has been widely investigated in works such as (Lassez et al. 1988; Maher 1988; Comon and Lescanne 1989; Comon 1991; Fernandez 1992; Buntine and Bürckert 1994), among others. These papers assume the classical algebraic semantics for the equality relation, and propose methods for solving so-called unification and disunification problems bearing some analogies to the transformation rules shown in Table 1. However, there are also some differences, because strict equality in CF LP is designed to work with lazy and possibly non-deterministic functions, whose behaviour does not correspond to the semantics of equality in classical algebra and equational logic, as argued in (Rodrı́guez-Artalejo 2001). Note 30 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado in particular transformation H5, which introduces constraints of the form Y == Y in H-solved forms. These are called totality constraints, because a valuation η is a solution of Y == Y iff η(Y ) is a total pattern. An approach to disequality constraints close to our semantic framework can be found in (Arenas et al. 1994), but no formalization of a Herbrand solver is provided. The following theorem ensures that the sts for H-stores can be accepted as a correct specification of an extensible glass-box solver for the domain H, which is complete for safe solver invocations. Theorem 1 (Formal Properties of solveH ) The sts with transition relation ⊢⊢H, X is finitely branching and terminating, and therefore _ solveH (Π, X ) = {∃Y ′ (Π′ ✷ σ ′ ) | Π′ ✷ σ ′ ∈ SF H (Π, X ), Y ′ = var(Π′ ✷ σ ′ )\var(Π)} is well defined for any domain with equality D, any finite Π ⊆ AP Con(D) ↾ {==} and any X ⊆ cvarD (Π). Moreover, for any arbitrary choice of a domain D with equality, solveH satisfies all the requirements for solvers enumerated in Definition 6, except that the completeness property may fail for some choices of the constraint set Π ⊆ AP Con(D) ↾ {==} to be solved, and is guaranteed to hold only if the solver invocation solveH (Π, X ) is safe (i.e., {OH3, OH7, H13}-free). The proof of the previous theorem is rather technical and can be found in Appendix A.1. At this point, we just make a few remarks related to the discrimination and completeness properties, that may help to understand some differences between our H-solver and more classical methods for solving unification and disunification problems. On the one hand, transformations H11 and H12 are designed to ensure the discrimination property while preserving completeness w.r.t. well-typed solutions. On the other hand, transformation H13 trivially ensures discrimination, but it sacrifices completeness because it fails without making sure that no welltyped solutions exist. This corresponds to situations unlikely to occur in practice and such that no practical way of preserving completeness is at hand. The other two failing transformations given in Table 1 (namely H6 and H9) respect completeness, because they are applied to unsatisfiable stores. Finally, the other cases where completeness may be lost correspond to unsafe decomposition steps performed with the opaque instances OH3 and OH7 of the strs H3 and H7. Due to the termination property of the H-sts, it is decidable wether a given H-store Π ✷ σ is hereditarily URS-irreducible, in which case no opaque decompositions will occur when solving the store. However, computations in the cooperative goal solving calculus presented in Section 3 can sometimes give rise to H-stores whose resolution involves opaque decomposition steps. Due to theoretical results proved in (González-Moreno et al. 2001), the eventual occurrence of opaque decomposition steps during goal solving is an undecidable problem. In case that opaque decompositions occur, they should be signaled as warnings to the user. Example 4 (Behaviour of solveH ) In order to illustrate the behaviour of solveH , consider the disequality constraint L /= X:Xs discussed in item 4. of Example 3. Remember that variable L is obviously On the Cooperation of the Constraint Domains H, R and F D in CF LP 31 demanded, while variables X and Xs are both critical. Therefore, there are four possible choices for the set X of critical variables to be used within the solver invocation, namely: ∅, {X}, {Xs} and {X, Xs}. Let us discuss these cases one by one. • Choosing X = ∅ means that the solver is not asked to discriminate w.r.t. any critical variable. In this case, solveH (L/=X:Xs,∅) returns L/=X:Xs ✷ ε, showing that L/=X:Xs is seen as a solved form w.r.t. the empty set of critical variables. • Choosing X = {X} asks the solver to discriminate w.r.t. the critical variable X. solveH (L/=X:Xs,{X}) returns a disjunction of alternatives (♦ ✷{L 7→ [ ]}) ∨ (X’/= X ✷{L 7→ X′ : Xs′ }) ∨ (Xs’/= Xs ✷{L 7→ X′ : Xs′ }) whose members correspond to the three different stores Π′ ✷ σ ′ such that the step L/=X:Xs ✷ ε ⊢⊢H, {X} Π′ ✷ σ ′ can be performed with transformation H12. Since these stores are solved w.r.t. {X}, no further transformations are required. Note that X does not occur in the first and third alternatives, while it has become obviously demanded in the second one. In this way, the discrimination property required for solvers is fulfilled. • For each of the two choices X = {Xs} and X = {X, Xs}, it is easy to check that the solver invocation solveH (L/=X:Xs, X ) returns the same disjunction of three alternatives as in the previous item, and the discrimination property is also fulfilled w.r.t. the chosen set X in both cases. 2.4.3 The Pure Constraint Domain R The R domain supporting computation with arithmetic constraints over real numbers is a familiar idea, used in the well-known instance CLP (R) of the CLP scheme (Jaffar et al. 1992). In the context of our CF LP framework, a convenient formal definition of the domain R is as follows: • Specific signature Σ = hT C, SBT, DC, DF, SP F i, where SBT = {real} includes just one base type whose values represent real numbers, and SP F includes the following binary primitive symbols, all of them intended to be used in infix notation: — The strict equality operator == :: A -> A -> bool. — The arithmetical operators +, -, *, / :: real -> real -> real. — The inequality operator <= :: real -> real -> bool. R • Set of base values Breal = R. R • Interpretation == , defined as for any domain whose specific signature includes ==. • Interpretation +R , defined so that for all t1 , t2 , t ∈ UR : t1 +R t2 → t is defined to hold iff some of the following cases holds: Either t1 , t2 and t are real numbers, t being equal to the addition of t1 and t2 , or else t = ⊥. The interpretations of -, * and / are defined analogously. 32 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado • Interpretation <=R , defined so that for all t1 , t2 , t ∈ UR : t1 <=R t2 → t is defined to hold iff some of the following cases holds: Either t1 , t2 are real numbers such that t1 is less than or equal to t2 , and t = true; or else t1 , t2 are real numbers such that t1 is greater than t2 , and t = false; or else t = ⊥. Atomic R-constraints have the form e1 ⊙ e2 →! t, where ⊙ is the strict equality operator or the inequality operator or an arithmetical operator. An atomic R-constraint is called proper iff ⊙ is not the strict equality operator, and an extended Herbrand constraint otherwise. As already explained in previous sections, strict equality constraints e1 == e2 and strict disequality constraints e1 /= e2 can be understood as abbreviations of extended Herbrand constraints. Moreover, various kinds of inequality constraints can also be defined as abbreviations, as follows: • e1 < e2 =def e2 <= e1 →! false • e1 > e2 =def e1 <= e2 →! false e1 <= e2 =def e1 <= e2 →! true e1 >= e2 =def e2 <= e1 →! true Concerning the solver solveR , we expect that it is able to deal with R-specific constraint sets Π ⊆ AP ConR consisting of atomic primitive constraints π of the two following kinds: • Proper R-constraints t1 ⊙ t2 →! t, where ⊙ is either the inequality operator or an arithmetical operator. • R-specific Herbrand constraints having the form t1 == t2 or t1 /= t2 , where each of the two patterns t1 and t2 is either a real constant value or a variable whose type is known to be real prior to the solver invocation. For any finite R-specific Π ⊆ AP ConR , it is clear that dvarR (Π) = var(Π). Therefore, it is safe to define odvarR (Π) = var(Π) and thus cvarR (Π) = ∅. Consequently, invocations to solveR can be assumed to be always of the form solveR (Π, ∅) (abbreviated as solveR (Π)), and the discrimination requirements for critical variables become trivial. Assuming that solveR is used under the restrictions described above and implemented as a black-box solver on top of SICStus Prolog, we are confident that the postulate stated below is a reasonable one. In particular, we assume that SICStus Prolog solves R-specific Herbrand constraints in a way compatible with the behaviour of the extensible H-solver described in the previous subsection. Postulate 1 (Assumptions on the R Solver ) solveR satisfies five of the six properties required for solvers in Definition 6 (namely Fresh Local Variables, Solved Forms, Safe Bindings, Discrimination and Soundness), although the Completeness property may fail for some choices of the R-specific Π ⊆ AP ConR to be solved. Moreover, whenever Π ⊆ AP ConR is R-specific and Π ⊢⊢solveR ∃Y ′ (Π′ ✷ σ ′ ), the constraint set Π′ is also R-specific, and for all X ∈ vdom(σ ′ ): Either σ ′ (X) is a real value, or else X and σ ′ (X) belong to var(Π). On the Cooperation of the Constraint Domains H, R and F D in CF LP 33 Example 5 (Behaviour of the R Solver ) Let us now illustrate the behaviour of solveR by considering the set of primitive atomic constraints RY >= d-0.5, RY-RX <= 0.5, RY+RX <= n+0.5 occurring in item 2. of Example 3. The solver invocation solveR (ΠR ) returns one single alternative Π′R ✷ ε with Π′R = ΠR ∪ {RY <= d+0.5}. In this case, the new constraint RY <= d+0.5 has been inferred by adding the two former constraints RY-RX <= 0.5 and RY+RX <= n+0.5 and taking into account that n = 2*d. In other cases, the R solver can perform other inferences by means of arithmetical reasoning valid in the mathematical theory of the real number field. In general, solved forms computed by solvers help to make more explicit the requirements on variable values already ‘hidden’ in the constraints prior to solving (as the upper bound RY <= d+0.5 in this example). 2.4.4 The Pure Constraint Domain F D The idea of a F D domain supporting computation with arithmetic and finite domain constraints over the integers is a familiar one within the CLP community, see e.g. (van Hentenryck et al. 1994; van Hentenryck et al. 1998). In the context of our CF LP framework, a convenient formal definition of the domain F D is as follows: • Specific signature Σ = hT C, SBT, DC, DF, SP F i, where SBT = {int} includes just one base type whose values represent integer numbers, and SP F includes the following primitive symbols: — The strict equality operator == :: A -> A -> bool. — The arithmetical operators #+, #-, #*, #/ :: int -> int -> int. — The following primitive symbols related to computation with finite domains: – domain:: [int] -> int -> int -> bool – belongs:: int -> [int] -> bool – labeling:: [labelType] -> [int] ->bool, where labelType is an enumerated datatype used to represent labeling strategies. — The inequality operator #<= :: int -> int -> bool. FD • Set of base values Bint = Z. • Interpretation ==F D , defined as for any domain whose specific signature includes ==. • Interpretation #+F D , defined so that for all t1 , t2 , t ∈ UF D : t1 #+F D t2 → t is defined to hold iff some of the following cases holds: Either t1 , t2 and t are integer numbers, t being equal to the addition of t1 and t2 , or else t = ⊥. The interpretations of #-, #* and #/ are defined analogously. • Interpretation domainF D, defined so that for all t1 , t2 , t3 , t ∈ UF D : domainF D t1 t2 t3 → t is defined to hold iff some of the following cases holds: Either t2 and t3 are integer numbers a and b such that a ≤ b, t1 is a non empty finite list of integers belonging to the interval a..b and t = true; or else 34 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado t2 and t3 are integer numbers a and b such that a ≤ b, t1 is a non empty list of integers some of which does not belong to the interval a..b and t = false; or else t2 and t3 are integer numbers a and b such that a > b and t = false; or else t = ⊥. • Interpretation belongsF D, defined so that for all t1 , t2 , t ∈ UF D : belongsF D t1 t2 → t is defined to hold iff some of the following cases holds: Either t1 is an integer, t2 is a finite list of integers including t1 as element, and t = true; or else t1 is an integer, t2 is a finite list of integers not including t1 as element, and t = false; or else t = ⊥. • Interpretation labelingF D, defined so that for all t1 , t2 , t ∈ UF D : labelingF D t1 t2 → t is defined to hold iff some of the following cases holds: Either t1 is a defined value of type labelType, t2 is a finite list of integers, and t = true; or else t = ⊥. • Interpretation #<=F D , defined so that for all t1 , t2 , t ∈ UF D : t1 #<=F D t2 → t is defined to hold iff some of the following cases holds: Either t1 , t2 are integer numbers such that t1 is less than or equal to t2 , and t = true; or else t1 , t2 are integer numbers such that t1 is greater than t2 , and t = false; or else t = ⊥. Atomic F D-constraints include those of the form e1 ⊙ e2 →! t, where ⊙ is either the strict equality operator or the inequality operator or an arithmetical operator, as well as domain constraints domain e1 e2 e3 →! t, membership constraints belongs e1 e2 →! t and labeling constraints labeling e1 e2 →! t. Atomic F D-constraints are called extended Herbrand if they have the form e1 == e2 →! t, and proper F Dconstraints otherwise. As already explained in previous sections, strict equality constraints e1 == e2 and strict disequality constraints e1 /= e2 can be understood as abbreviations of extended Herbrand constraints. Moreover, various kinds of inequality constraints can also be defined as abbreviations, as follows: • e1 #< e2 =def e2 #<= e1 →! false • e1 #> e2 =def e1 #<= e2 →! false e1 #<= e2 =def e1 #<= e2 →! true e1 #>= e2 =def e2 #<= e1 →! true Concerning the solver solveF D , we expect that it is able to deal with F D-specific constraint sets Π ⊆ AP ConF D consisting of atomic primitive constraints π of the two following kinds: • Proper F D atomic primitive constraints (which may be t1 ⊙ t2 →! t, where ⊙ is either an integer arithmetical primitive or an inequality primitive, or primitive domain, membership and labeling constraints). • F D-specific Herbrand constraints having the form t1 == t2 or t1 /= t2 , where each of the two patterns t1 and t2 is either an integer constant value or a variable whose type is known to be int prior to the solver invocation. For any finite F D-specific Π ⊆ AP ConF D , it is clear that dvarF D (Π) = var(Π). Therefore, it is safe to define odvarF D (Π) = var(Π) and thus cvarF D (Π) = ∅. Consequently, invocations to solveF D can be assumed to be always of the form solveF D (Π, ∅) (abbreviated as solveF D (Π)), and the discrimination requirements On the Cooperation of the Constraint Domains H, R and F D in CF LP 35 for critical variables become trivial. Assuming that solveF D is used under the restrictions described above and implemented as a black-box solver on top of SICStus Prolog, we are confident that the postulate stated below is a reasonable one. In particular, we assume that SICStus Prolog solves F D-specific Herbrand constraints in a way compatible with the behaviour of the extensible H-solver described in the previous subsection. Postulate 2 (Assumptions on the F D Solver ) solveF D satisfies five of the six properties required for solvers in Definition 6 (namely Fresh Local Variables, Solved Forms, Safe Bindings, Discrimination and Soundness), although the Completeness property may fail for some choices of the F D-specific Π ⊆ AP ConF D to be solved. Moreover, whenever Π ⊆ AP ConF D is F D-specific and Π ⊢⊢solveFD ∃Y ′ (Π′ ✷ σ ′ ), the constraint set Π′ is also F D-specific, and for all X ∈ vdom(σ ′ ): Either σ ′ (X) is an integer value, or else X and σ ′ (X) belong to var(Π). In particular, labeling constraints are solved by a systematic enumeration of possible values for certain integer variables. Therefore, solveF D is unable to solve a labeling constraint π unless the current constraint store includes domain or membership constraints for all the variables occurring in π. The next example shows a typical situation. Example 6 (Behaviour of the F D Solver ) In order to illustrate the behaviour of solveF D , let us consider the set of primitive atomic constraints ΠF = {domain [X,Y] 0 n, labeling [ ] [X,Y]} occurring also in item 2. of Example 3. The solver invocation solveF D (ΠF ) must solve the conjunction of a domain constraint and a labeling constraint, both involving the integer variables X and Y. The solver proceeds by enumerating all the possible values of both variables X and Y within their respective domains (determined in this case by the domain constraint domain [X,Y] 0 n) and returns a disjunction of (n+1)2 alternatives, each of which describes one single solution: (♦ ✷{X 7→ 0, Y 7→ 0}) ∨ · · · ∨ (♦ ✷{X 7→ n, Y 7→ n}) In general, solving labeling constraints can give rise to very expensive enumerations of solutions, unless the finite domains of the integer variables involved have been pruned by some precedent computation. As already discussed in Subsection 1.2, the efficiency of solving the constraint system occurring in item 2. of Example 3 can be greatly improved by cooperation among the the domains H, R and F D. We propose to use the coordination domains defined in the next subsection as a vehicle for domain cooperation in CF LP programming. 2.5 Coordination Domains Coordination domains C are a kind of ‘hybrid’ domains built from various component domains Di , intended to cooperate. The construction of coordination domains also involves a so-called mediatorial domain M, whose purpose is to supply bridge constraints for communication among the component domains. In practice, the 36 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado component domains will be chosen as pure domains equipped with solvers, and the communication provided by the mediatorial domain will also benefit the solvers. Mathematically, the construction of coordination domains relies on a joinability condition. Two given constraint domains D1 and D2 with specific signatures Σ1 = hT C, SBT1 , DC, DF, SP F1 i and Σ2 = hT C, SBT2 , DC, DF, SP F2 i, respectively, are called joinable iff the two following conditions hold: • SP F1 ∩ SP F2 ⊆ {==}; i.e., the only primitive function symbol p allowed to belong both to SP F1 and SP F2 is the strict equality operator ==. • For every common base type d ∈ SBT1 ∩ SBT2 , one has BdD1 = BdD2 . The amalgamated sum S = D1 ⊕D2 of two joinable domains D1 and D2 is defined as a new domain with signature Σ = hT C, SBT1 ∪SBT2 , DC, DF, SP F1 ∪SP F2 i, constructed as follows: • For i = 1, 2 and for all d ∈ SBTi : BdS = BdDi . (no conflict will arise for those d ∈ SBT1 ∩ SBT2 , because of joinability) • For i = 1, 2, for all p ∈ SP Fi , p other than ==, and for all tn , t ∈ US : pS tn → t is defined to hold iff one of the two following cases holds: Either t = ⊥ or else there exist t′ n , t′ ∈ UDi such that t′ n ⊑ tn , t′ ⊒ t and p D i t′ n → t′ . Note that the value universe US underlying an amalgamated sum S = D1 ⊕ D2 is a superset of UDi for i = 1, 2. The interpretation of == in S will behave as defined for any constraint domain, see Subsection 2.3. For primitive functions p ∈ SP Fi other than ==, the definition of pS is designed to obtain an extension of pDi which satisfies the technical conditions required by Definition 1. The amalgamated sum D1 ⊕ · · · ⊕ Dn of n pairwise joinable domains Di (1 ≤ i ≤ n) can be defined analogously. The following definition and theorem guarantee the expected behaviour of amalgamated sums as conservative extensions of their components. The proof of the theorem is given in Appendix A.1. Definition 8 (Domain specific constraints and truncation operator ) Assume S = D1 ⊕ · · · ⊕ Dn of signature Σ, constructed as the amalgamated sum of n pairwise joinable domains Di of signatures Σi . Let any 1 ≤ i ≤ n be arbitrarily fixed. 1. A set Π ⊆ AP ConDi is called Di -specific iff every valuation η ∈ V alS such that η ∈ SolS (Π) satisfies η(X) ∈ UDi for all X ∈ var(Π). Note that the R-specific and F D-specific sets of constraints previously introduced in subsections 2.4.3 and 2.4.4 are also specific in the sense just defined. 2. Consider the information ordering ⊑ over US . The Di -truncation of a given S value t ∈ US is defined as the ⊑-greatest Di value | t |Di ∈ UDi which satisfies | t |Di ⊑ t, so that any other Di value t̂ ∈ UDi such that t̂ ⊑ t must satisfy t̂ ⊑ | t |Di . An effective construction of | t |Di from t can be obtained by substituting ⊥ in place of any subpattern of t which has any of the two following forms: a basic value u which does not belong to UDi , or a partial application of a primitive function which does not belong to Di specific signature. Note that | t |Di = t if and only if t ∈ UDi . On the Cooperation of the Constraint Domains H, R and F D in CF LP 37 3. The Di -truncation of a given S-valuation η ∈ V alS is the Di valuation | η |Di defined by the condition | η |Di (X) = | η(X) |Di , for all X ∈ Var. Note that | η |Di = η if and only if η ∈ V alDi . Theorem 2 (Properties of Amalgamated Sums) For any S = D1 ⊕ · · · ⊕ Dn of signature Σ constructed as the amalgamated sum of n pairwise joinable domains Di of signatures Σi (1 ≤ i ≤ n): 1. S is well-defined as a constraint domain; i.e., the interpretations of primitive function symbols in S satisfy the four conditions listed in Definition 1 from Subsection 2.3. 2. S is a conservative extension of Di for all (1 ≤ i ≤ n); i.e., for all 1 ≤ i ≤ n, for any p ∈ SP Fim other than ==, and for every tm , t ∈ UDi , one has pDi tm → t iff pS tm → t. 3. For all 1 ≤ i ≤ n, for any set of primitive constraints Π ⊆ AP ConDi and for every valuation η ∈ V alDi , one has η ∈ (W T )SolDi (Π) iff η ∈ (W T )SolS (Π). 4. For all 1 ≤ i ≤ n, for any set of Di -specific primitive constraints Π ⊆ AP ConDi and for every valuation η ∈ V alS , one has η ∈ (W T )SolS (Π) iff | η |Di ∈ (W T )SolDi (Π). Note that amalgamated sums of the form H⊕ D are always possible, and give rise to compound domains that can profit from the extensible Herbrand solver. However, in order to construct more interesting sums tailored to the communication among several pure domains, so-called mediatorial domains are needed. Given n pairwise joinable domains Di with specific signatures Σi = hT C, SBTi , DC, DF, SP Fi i (1 ≤ i ≤ n), a mediatorial domain for the communication among D1 , . . . , Dn is defined as any domain M with specific signature Σ0 = hT C, SBT0 , DC, DF, SP F0 i constructed in such a way that the following conditions are satisfied: S • SBT0 ⊆ ni=1 SBTi , and SP F0 ∩ SP Fi = ∅ for all 1 ≤ i ≤ n. • For each d ∈ SBT0 and for any 1 ≤ i ≤ n such that d ∈ SBTi , BdM = BdDi . (no confusion can arise, since the domains Di are pairwise joinable). • Each p ∈ SP F0 is a so-called equivalence primitive #==di,dj with declared principal type di → dj → bool, for some 1 ≤ i, j ≤ n and some di ∈ SBTi , dj ∈ SBTj . • Moreover, each equivalence primitive #==di ,dj is used in infix notation and D there is an injective partial mapping injdi ,dj : BdDii → Bdjj used to define the interpretation of #==di,dj in M as follows: For all s, t, r ∈ UM , s #==M di ,dj t → r iff some of the three cases listed bellow holds: D 1. s ∈ dom(injdi ,dj ), t ∈ Bdjj , t = injdi ,dj (s) and true ⊒ r. D 2. s ∈ dom(injdi ,dj ), t ∈ Bdjj , t 6= injdi ,dj (s) and f alse ⊒ r. 3. r = ⊥. Equivalence primitives #==di,dj allow to write well-typed atomic mediatorial constraints of the form a #==di,dj b →! c, using expressions a :: di , b :: dj and c :: bool. Constraints of the form a #==di ,dj b →! true resp. a #==di ,dj b →! false are abbreviated as a #==di ,dj b resp. a #/==di,dj b and called bridges and antibridges, respectively. The usefulness of bridges for cooperative goal solving in CF LP has been 38 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado motivated in the introduction and will elaborated when presenting the cooperative goal solving calculus CCLN C(C) in Section 3. Antibridges and mediatorial constraints a #==di ,dj b →! R, where R is a variable, can also occur in CCLN C(C) computations, but they are not so directly related to domain cooperation as bridges. Each particular choice of injective partial mappings injdi ,dj and their corresponding equivalence primitives #==di,dj gives rise to the construction of a particular mediatorial domain M, suitable for communication among the Di . Moreover, it is clear by construction that the n + 1 domains M, D1 , . . . , Dn are pairwise joinable, and it is possible to build the amalgamated sum C = M ⊕ D1 ⊕ · · · ⊕ Dn . This ‘hybrid’ domain supports the communication among the domains Di via bridge constraints provided by M. Therefore, M is called a coordination domain for D1 , . . . , Dn . In practice, it is advisable to include the Herbrand domain H as one of the component domains Di when building a coordination domain C. In application programs over such a coordination domain, the H solver is typically helpful for solving symbolic equality and disequality constraints over user defined datatypes, while the solvers of other component domains Di whose specific signatures include the primitive == may be helpful for computing with equalities and disequalities related to Di ’s specific base types. 2.6 The Coordination Domain C = M ⊕ H ⊕ F D ⊕ R In this subsection, we explain the construction of a coordination domain for cooperation among the three pure domains H, F D and R. First, we define a mediatorial domain M suitable to this purpose. It is built with specific signature Σ0 = hT C, SBT0 , DC, DF, SP F0 i, where SBT0 = {int, real} and SP F0 = {#==int,real }. The equivalence primitive #==int,real is interpreted with respect to the total injective mapping injint,real :: Z → R, which maps each integer value into the equivalent real value. In the sequel, we will write #== in place of #==int,real when referring to this equivalence primitive. We will use the same abbreviation for writing mediatorial constraints. Next, we use this mediatorial domain for building C = M ⊕ H ⊕ F D ⊕ R. In the rest of the paper, C will always stand for this particular coordination domain, whose usefulness has been motivated in Section 1 and will become more evident in Section 3. Note that bridges X #== RX and antibridges X #/== RX can be useful just as constraints; in particular, X #== RX acts as an integrality constraint over the value of the real variable RX. More importantly, in Section 3 the mediatorial domain C will serve as a basis for useful cooperation facilities, including the projection of R constraints to the F D solver (and vice versa) using bridges, the specialization of H constraints to become R-specific or F D-specific in some computational contexts, and some other special mechanisms designed for processing the mediatorial constraints occurring in computations. In particular, computation rules for simplifying mediatorial constraints will be needed. Although M is not a ’pure’ domain, simplifying M-constraints is most conveniently thought of as the task of a M-solver. This solver is expected to deal with M-specific constraint sets Π ⊆ AP ConM consisting of atomic primitive con- On the Cooperation of the Constraint Domains H, R and F D in CF LP 39 straints π of the form t #==s →! b, where b is either a variable or a boolean constant and each of the two patterns t and s is either a variable or a numeric value of the proper type (int for t and real for s). For any finite set Π ⊆ AP ConM of such M-specific constraints, it is clear that dvarM (Π) = var(Π). Therefore, it is safe to define odvarM (Π) = var(Π) and thus cvarM (Π) = ∅. We define a glass-box solver solveM by means of the store transformation technique explained in Subsection 2.4.1, using the strs for M-stores shown in Table 2. Due to the absence of critical variables, one-step transformations of M-stores do not depend on a parametrically given set X of critical variables and have the form π, Π ✷ σ ⊢⊢M Π′ ✷ σ ′ , indicating the transformation of any store π, Π ✷ σ, which includes the atomic constraint π plus other constraints Π; no sequential ordering is intended. We say that π is the selected atomic constraint for this transformation step. M1 (t #== s) →! B, Π ✷ σ ⊢⊢M (t #== s, Π)σ1 ✷ σσ1 if t ∈ Var ∪ Z, s ∈ Var ∪ R, B ∈ Var, where σ1 = {B 7→ true}. M2 (t #== s) →! B, Π ✷ σ ⊢⊢M (t #/== s, Π)σ1 ✷ σσ1 if t ∈ Var ∪ Z, s ∈ Var ∪ R, B ∈ Var, where σ1 = {B 7→ f alse}. M3 X #==u′ , Π ✷ σ ⊢⊢M Πσ1 ✷ σσ1 if u′ ∈ R, and there is u ∈ Z such that u #==M u′ → true, where σ1 = {X 7→ u}. M4 X #== u′ , Π ✷ σ ⊢⊢M  if u′ ∈ R, and there is no u ∈ Z such that u #==M u′ → true. M5 u #== RX, Π ✷ σ ⊢⊢M Πσ1 ✷ σσ1 if u ∈ Z and u′ ∈R is so chosen that u #==M u′ → true, where σ1 = {RX 7→ u′ }. M6 u #== u′ , Π ✷ σ ⊢⊢M Π ✷ σ if u ∈ Z, u′ ∈ R, and u #==M u′ → true. M7 u #== u′ , Π ✷ σ ⊢⊢M  if u ∈ Z, u′ ∈ R, and u #==M u′ → f alse. M8 u #/== u′ , Π ✷ σ ⊢⊢M Π ✷ σ if u ∈ Z, u′ ∈ R, and u #==M u′ → f alse M9 u #/== u′ , M ✷ σ ⊢⊢M  if u ∈ Z, u′ ∈ R, and u #==M u′ → true. Table 2. Store Transformations for solveM The following theorem ensures that the sts for M-stores can be accepted as a correct specification of a glass-box solver for the domain M. Theorem 3 (Formal Properties of the M Solver ) The sts with transition relation ⊢⊢M is finitely branching and terminating, and therefore _ solveM (Π) = {∃Y ′ (Π′ ✷ σ ′ ) | Π′ ✷ σ ′ ∈ SF M (Π), Y ′ = var(Π′ ✷ σ ′ ) \ var(Π)} is well defined for any finite Π ⊆ AP ConM of M-specific constraints. The solver solveM satisfies all the requirements for solvers enumerated in Definition 6. Moreover, whenever Π ⊆ AP ConM is M-specific and Π ⊢⊢solveM ∃Y ′ (Π′ ✷ σ ′ ), the 40 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado constraint set Π′ is also M-specific and σ ′ (X) is either a boolean value, an integer value or a real value for all X ∈ vdom(σ ′ ). The proof is omitted, because it is completely similar to that of Theorem 1 but much easier. In fact, the sts for M-stores involves no decompositions. Actually, this sts is finitely branching, terminating, locally sound and locally complete. Therefore, Lemma 5 can be applied. The framework for cooperative programming and the cooperative goal solving calculus CCLN C(C) presented in Section 3 essentially rely on the coordination domain C just discussed, and the instance CF LP (C) of the CF LP scheme (López-Fraguas et al. 2007) provides a declarative semantics for proving the soundness and completeness of CCLN C(C). As we will see, some cooperative goal solving rules in CCLN C(C) rely on the identification of certain atomic primitive Herbrand constraints π as F D-specific or R-specific, respectively, on the basis of the mediatorial constraints available in a given M-store M . The notations M ⊢ π in F D and M ⊢ π in R defined below serve to this purpose. Definition 9 (Inference of domain-specific extended Herbrand constraints) Assume a mediatorial store M and a well-typed atomic extended Herbrand constraint π having the form t1 == t2 or t1 /= t2 , where each of the two patterns t1 and t2 is either a numeric constant v or a variable V . Then we define: 1. M ⊢ π in F D (read as ‘M allows to infer that π is F D-specific’) iff some of the three following conditions holds: (a) t1 or t2 is an integer constant. (b) t1 or t2 is a variable that occurs as the left argument of the operator #== within some mediatorial constraint belonging to M . (c) t1 or t2 is a variable that has been recognized to have type int by some implementation dependent device. 2. M ⊢ π in R (read as ‘M allows to infer that π is R-specific’) iff some of the three following conditions holds: (a) t1 or t2 is a real constant. (b) t1 or t2 is a variable that occurs as the right argument of the operator #== within some mediatorial constraint belonging to M . (c) t1 or t2 is a variable that has been recognized to have type real by some implementation dependent device. 3 Cooperative Programming and Goal Solving in CF LP (C) This section presents our cooperative computation model for goal solving. After introducing programs and goals in the first subsection, the subsequent subsections deal with goal solving rules, illustrative computation examples, and results concerning the formal properties of the computation model. Our goal solving rules work by transforming initial goals into final goals in solved form which serve as computed answers, as in the previously published Constrained On the Cooperation of the Constraint Domains H, R and F D in CF LP 41 Lazy Narrowing Calculus CLN C(D) (López-Fraguas et al. 2004), which works over any parametrically given domain D equipped with a solver. We have substantially extended CLN C(D) with various mechanisms for domain cooperation via bridges, projections and some more ad hoc operations. The result is a Cooperative Constrained Lazy Narrowing Calculus CCLN C(C) which is sound and complete (with some limitations) w.r.t. the instance CF LP (C) of the generic CF LP scheme (López-Fraguas et al. 2007). For the sake of typographic simplicity, we have restricted our presentation of CCLN C(C) to the case C = M ⊕ H ⊕ F D ⊕ R, although it could be easily extended to other coordination domains, as sketched in our previous paper (Estévez-Martı́n et al. 2007). 3.1 Programs and Goals CF LP (C)-programs are sets of constrained rewrite rules that define the behavior of possibly higher-order and/or non-deterministic lazy functions over C, called program rules. More precisely, a program rule Rl for a defined function symbol f ∈ DFΣn with principal type f :: τ n → τ has the form f tn → r ⇐ ∆, where tn is a linear sequence of patterns, r is an expression, and ∆ is a finite conjunction δ1 , . . . , δm of atomic constraints δi ∈ AConC . Each program rule Rl is required to be well-typed, i.e., there must exist some type environment Γ for the variables occurring in Rl such that Σ, Γ ⊢W T ti :: τi for all 1 ≤ i ≤ n, Σ, Γ ⊢W T r :: τ and Σ, Γ ⊢W T δi for all 1 ≤ i ≤ m. The left-linearity requirement is quite common in functional and functional logic programming. As in constraint logic programming, the conditional part of a program rule needs no explicit occurrences of existential quantifiers. A program rule Rl is said to include free occurrences of higher-order logic variables iff there is some variable X which does not occur in the left-hand side of Rl but has some occurrence in a context of the form X em (with m > 0) somewhere else in Rl. A program P includes free occurrences of higher-order logic variables iff some of the program rules in P does. As in functional languages such as Haskell (Peyton-Jones 2002), our programs rules can deal with higher-order functions and are not expected to be always terminating. Moreover, in contrast to Haskell and most other functional languages, we do not require program rules to be confluent. Therefore, some program defined functions can be non-deterministic and return several values for a fixed choice of arguments in some cases. As a concrete example of typed CF LP (C)-program written in the concrete syntax of the T OY system, we refer to the program rules presented in Subsection 1.2. Programs are used to solve goals using a cooperative goal solving calculus which will be described in subsections 3.2, 3.3 and 3.4 below. Goals over the coordination domain C have the general form G ≡ ∃U . P ✷ C ✷ M ✷ H ✷ F ✷ R, where the symbol ✷ is interpreted as conjunction and: • U is a finite set of so-called existential variables, intended to represent local variables in the computation. • P is a set of so-called productions of the form e1 → t1 , . . . , em → tm , where ei ∈ ExpC and ti ∈ P atC for all 1 ≤ i ≤ m. The set of produced variables of G 42 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado • • • • • is defined as the set pvar(P ) of variables occurring in t1 . . . tm . During goal solving, productions are used to compute values for the produced variables insofar as demanded, using the goal solving rules for constrained lazy narrowing presented in Subsection 3.2. We consider a production relation between variables, such that X ≫P Y holds iff X, Y ∈ pvar(P ) and there is some 1 ≤ i ≤ m such that X ∈ var(ei ) and Y ∈ var(ti ). C is the so-called constraint pool, a finite set of constraints to be solved, possibly including active occurrences of defined functions symbols. M = ΠM ✷ σM is the mediatorial store, including a finite set of atomic primitive constraints ΠM ⊆ AP ConM and a substitution σM . We will write BM ⊆ ΠM for the set of all π ∈ ΠM which are bridges t #== s, where each of the two patterns t and s may be either a variable or a numeric constant. H = ΠH ✷ σH is the Herbrand store, including a finite set of atomic primitive constraints ΠH ⊆ AP ConH and a substitution σH . F = ΠF ✷ σF is the finite domain store, including a finite set of atomic primitive constraints ΠF ⊆ AP ConF D and a substitution σF . R = ΠR ✷ σR is the real arithmetic store, including a finite set of atomic primitive constraints ΠR ⊆ AP ConR and a substitution σR . A goal G is said to have free occurrences of higher-order logic variables iff there is some variable X occurring in G in some context of the form X em , with m > 0. Two special kinds of goals are particularly interesting. Initial goals just consist of a well-typed constraint pool C. More precisely, the existential prefix U , productions in P , and stores M , H, F and R are empty. Solved goals (also called solved forms) have empty P and C parts and cannot be transformed by any goal solving rule. Therefore, they are used to represent computed answers. We will also write  to denote an inconsistent goal. Example 7 (Initial and Solved Goals) Consider the initial goals Goal 1, Goal 2 and Goal 3 presented in T OY syntax in Subsection 1.2, for the choice d = 2, n = 4. When written with the abstract syntax for general CF LP (C)-goals they become 1) ✷ bothIn (triangle (2, 2.75) 4 0.5) (square 4) (X,Y) ✷✷✷✷ 2) ✷ bothIn (triangle (2, 2.5) 2 1) (square 4) (X,Y) ✷✷✷✷ 3) ✷ bothIn (triangle (2, 2.5) 8 1) (square 4) (X,Y) ✷✷✷✷ The expected solutions for these goals have been explained in Subsection 1.2. A general notion of solution for goals will be defined in Subsection 3.6. The resolution of these example goals in our cooperative goal solving calculus CCLN C(C) will be discussed in detail in Subsection 3.5. The respective solved forms obtained as computed answers (restricted to the variables in the initial goal) will be: 1)  2) ✷✷✷✷ (♦ ✷ {X 7→ 2, Y 3) ✷✷✷✷ (♦ ✷ {X 7→ 0, Y ✷✷✷✷ (♦ ✷ {X 7→ 1, Y ✷✷✷✷ (♦ ✷ {X 7→ 2, Y 7→ 2}) ✷ 7→ 2}) ✷ 7→ 2}) ✷ 7→ 2}) ✷ On the Cooperation of the Constraint Domains H, R and F D in CF LP 43 ✷✷✷✷ (♦ ✷ {X 7→ 3, Y → 7 2}) ✷ ✷✷✷✷ (♦ ✷ {X → 7 4, Y → 7 2}) ✷ The goal solving rules of the CCLN C(C) calculus presented in the rest of this section has been designed as an extension of an existing goal solving calculus for the CF LP scheme (López-Fraguas et al. 2004), adding the new features needed to support solver coordination via bridge constraints. In contrast to previous related works such as (Loogen et al. 1993; Antoy et al. 1994; Antoy et al. 2000; del Vado-Vı́rseda 2003; del Vado-Vı́rseda 2005; del Vado-Vı́rseda 2007), we have omitted the use of socalled definitional trees to ensure an optimal selection of needed narrowing steps. This feature could be easily added to CCLN C(C) following the ideas from (del Vado-Vı́rseda 2005), but we have decided not do so in order to avoid technical complications which do not contribute to a better understanding of domain cooperation. Moreover, the design of CCLN C(C) is tailored to programs and goals having no free occurrences of higher-order logic variables. As shown in (González-Moreno et al. 2001), goal solving rules for dealing with free higher-order logic variables give rise to ill-typed solutions very often. If desired, they could be easily added to our present setting. Let us finish this subsection with a brief discussion of some technical issues needed in the sequel. The set odvar(G) of obviously demanded variables in a given goal G is defined as the least subset of var(G) which satisfies the two following conditions: 1. odvar(G) includes odvarM (ΠM ), odvarH (ΠH ), odvarF D (ΠF ) and odvarR (ΠR ) which are defined as explained in Subsections 2.3 and 2.4. 2. X ∈ odvar(G) for any production (Xak → t) ∈ P such that k > 0 and either t∈ / Var or else t ∈ odvar(G). Note that odvar(G) boils down to odvarM (ΠM ) ∪ odvarH (ΠH ) ∪ odvarF D (ΠF ) ∪ odvarR (ΠR ) in the case that G has no free occurrences of higher-order variables. Productions e → X such that e is an active expression and X ∈ / odvar(G) is a not obviously demanded variable are called suspensions, and play an important role during goal solving. Certain properties are trivially satisfied by initial goals and kept invariant through the application of goal transformations. Such goal invariant properties include those formalized in previous works as e.g. (López-Fraguas et al. 2004): Each produced variable is produced only once, all the produced variables must be existential, the transitive closure ≫+ P of the relation between produced variables must be irreflexive, and no produced variable occurs in the answer substitutions. Other goal invariants are more specific of our current cooperative setting based on the coordination domain C: • The domains of the substitutions σM , σH , σF and σR are pairwise disjoint. • For any store S in G, the application of σS causes no modification to the goal. • For any X ∈ vdom(σM ), σM (X) is either a boolean value, an integer value or a real value. • For any X ∈ vdom(σF ), σF (X) is either an integer value or a variable occurring in ΠF . 44 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado • For any X ∈ vdom(σR ), σR (X) is either a real value or a variable occurring in ΠR . These properties remain invariant through goal transformations because of Theorem 3 and Postulates 2 and 1, and also because the bindings computed by each particular solver are properly propagated to the rest of the goal. In particular, whenever a variable binding {X 7→ t} arises in one of the stores during goal solving, the propagation of this binding to the goal applies the binding everywhere, but places it only within the substitution of this particular store, so that the first item above is ensured. At this point we must introduce some auxiliary notations in order to make this idea more precise. Let D stand for any of the four domains M, H, F D or R and consider the store S = ΠS ✷ σS corresponding to D. We will note as (P ✷ C ✷ M ✷ H ✷ F ✷ R)@D σ ′ the result of applying σ ′ to P ✷ C ✷ M ✷ H ✷ F ✷ R and composing σS with σ ′ . More formally, in the particular case that D is chosen as F D, we define (P ✷ C ✷ M ✷ H ✷ F ✷ R)@F D σ ′ as P σ ′ ✷ Cσ ′ ✷ M ⋆ σ ′ ✷ H ⋆ σ ′ ✷ F @σ ′ ✷ R ⋆ σ ′ , where F @σ ′ is defined as ΠF σ ′ ✷ σF σ ′ and S ⋆ σ ′ is defined as ΠS σ ′ ✷ σS ⋆ σ ′ for S being M , H or R. Recall that the application of σ ′ to σS has been defined as σS ⋆ σ ′ = σS σ ′ ↾ vdom(σS ) in Subsection 2.2, and note that σS ⋆ σ ′ retains the same domain as σS . The notations explained in the previous paragraph will be used for presenting several goal transformation rules in the next subsections. The formal definition for the other three possible choices of D is completely analogous. In the rest of the paper, we will restrict our attention to so-called admissible goals G that arise from initial goals through the iterated application of goal transformation rules and enjoy the goal invariant properties just described. 3.2 Constrained Lazy Narrowing Rules The core of our cooperative goal solving calculus CLN C(C) consists of the goal solving rules displayed in Table 3. Roughly speaking, these rules model the behaviour of constrained lazy narrowing ignoring domain cooperation and solver invocation. They have been adapted from (López-Fraguas et al. 2004) and can be classified as follows: The first four rules encode unification transformations similar to those found in the H sts (see Subsection 2.4.2) and other related formalisms; rule EL discharges unneeded suspensions, rule DF (presented in two cases in order to optimize the k = 0 case) applies program rules to deal with calls to program defined functions; rule PC transforms demanded calls to primitive functions into atomic constraints that are placed in the pool; and rule FC, working in interplay with PC, transforms the atomic constraints in the pool into a flattened form consisting of a conjunction of atomic primitive constraints with new existential variables. The behaviour of the main rules in Table 3 will be illustrated in Subsection 3.5. Example 8 below focuses on the transformation rules PC and FC. Their iterated application flattens the atomic R-constraint (RX + 2*RY)*RZ <= 3.5 into a conjunction of four atomic primitive R-constraints involving three new existential variables, that are placed in the constraint pool. Note that (López-Fraguas et al. 2004) On the Cooperation of the Constraint Domains H, R and F D in CF LP 45 DC DeComposition ∃U. h em → h tm , P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢DC ∃U. em → tm , P ✷ C ✷ M ✷ H ✷ F ✷ R CF Conflict Failure ∃U. e → t, P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢CF  If e is rigid and passive, t ∈ / Var, e and t have conflicting roots. SP Simple Production ′ ∃U. s → t, P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢SP ∃U . (P ✷ C ✷ M ✷ H ✷ F ✷ R)@H σ′ If s = X ∈ Var, t ∈ / Var, σ = {X 7→ t} and U ′ = U or else s ∈ P atC , t = X ∈ Var, σ′ = {X 7→ s} and ′ ′ U = U \{X}. IM IMitation ∃X, U. h em →X, P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢IM ∃Xm , U . (em →Xm , P ✷ C ✷ M ✷ H ✷ F ✷ R)σ′ If h em ∈ / P atC is passive, X ∈ odvar(G) and σ′ = {X 7→ h Xm }. EL ELimination ∃X, U. e → X, P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢EL ∃U. P ✷ C ✷ M ✷ H ✷ F ✷ R If X does not occur in the rest of the goal. DF Defined Function ∃U. f en → t, P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢DFf ∃Y , U. en → tn , r → t, P ✷ C ′ , C ✷ M ✷ H ✷ F ✷ R n If f ∈ DF , t ∈ / Var or t ∈ odvar(G) and Rl : f tn → r ⇐ C ′ is a fresh variant of a rule in P, with Y = var(Rl) new variables. ∃U. f en ak → t, P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢DFf ∃X, Y , U. en → tn , r → X, X ak → t, P ✷ C ′ , C ✷ M ✷ H ✷ F ✷ R If f ∈ DF n (k > 0), t ∈ / Var or t ∈ odvar(G) and Rl : f tn → r ⇐ C ′ is a fresh variant of a rule in P, with Y = var(Rl) and X new variables. PC Place Constraint ∃U. p en → t, P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢PC ∃U. P ✷ p en →! t, C ✷ M ✷ H ✷ F ✷ R If p ∈ P F n and t ∈ / Var or t ∈ odvar(G). FC Flatten Constraint ∃U. P ✷ p en →! t, C ✷ M ✷ H ✷ F ✷ R ⊢⊢FC ∃V m , U. am → Vm , P ✷ p tn →! t, C ✷ M ✷ H ✷ F ✷ R If p ∈ P F n , some ei ∈ / P atC , am (m ≤ n) are those ei which are not patterns, Vm are new variables, and p tn is obtained from p en by replacing each ei which is not a pattern by Vi . Table 3. Rules for Constrained Lazy Narrowing 46 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado and other previous related calculi also include rules that can be used to achieve constraint flattening, but the resulting atomic primitive constraints are placed in a constraint store. In our present setting, they are kept in the pool in order that the domain cooperation rules described in the next subsection can process them. Example 8 (Constraint Flattening) ✷ (RX + 2 ∗ RY ) ∗ RZ <= 3.5 ✷✷✷✷ ⊢⊢FC ∃RA. (RX + 2 ∗ RY ) ∗ RZ → RA ✷ RA <= 3.5 ✷✷✷✷ ⊢⊢PC ∃RA. ✷ (RX + 2 ∗ RY ) ∗ RZ →! RA, RA <= 3.5 ✷✷✷✷ ⊢⊢FC ∃RB, RA.RX + 2 ∗ RY → RB ✷ RB ∗ RZ→!RA, RA <= 3.5 ✷✷✷✷ ⊢⊢PC ∃RB, RA. ✷ RX + 2 ∗ RY →! RB, RB ∗ RZ →! RA, RA <= 3.5 ✷✷✷✷ ⊢⊢FC ∃RC, RB, RA. 2 ∗ RY → RC ✷ RX + RC→!RB, RB ∗ RZ→!RA, RA <= 3.5 ✷✷✷✷ ⊢⊢PC ∃RC, RB, RA. ✷ 2 ∗ RY →!RC, RX + RC→!RB, RB ∗ RZ→!RA, RA <= 3.5 ✷✷✷✷ Note that suspensions e → X can be discharged by rule EL in case that X does not occur in the rest of the goal. Otherwise, they must wait until X gets bound to a non-variable pattern or becomes obviously demanded, and then they can be processed by using either rule DF or rule PC, according to the syntactic form of e. Moreover, all the substitutions produced by the transformations bind variables X to patterns t, standing for computed values that are shared by all the occurrences of t in the current goal. In this way, the goal transformation rules encode a lazy narrowing strategy. 3.3 Domain Cooperation Rules This subsection presents the goal transformation rules in CCLN C(C) which take care of domain cooperation. The core of the subsection deals with bridges and projections. A few more ad hoc cooperation rules are presented at the end of the subsection. Given a goal G whose pool C includes an atomic primitive constraint π ∈ AP ConF D and whose mediatorial store M includes a set of bridges BM , we will consider three possible goal transformations intended to convey useful information from π to the R-solver: • To compute new bridges bridgesF D→R (π, BM ) to add to M , by means of a bridge generation operation bridgesF D→R defined to this purpose. • To compute projected R-constraints proj F D→R (π, BM ) to be added to R, by means of a projection operation proj F D→R defined to this purpose. • To place π into the F D store F . Similar goal transformations based on two operations bridgesR→F D and proj R→F D can be used to convey useful information from a primitive atomic constraint π ∈ P ConR to the F D-solver. Rules SB, PP and SC in Table 4 formalize these transformations, while tables 5 and 6 give an effective specification of the bridge generation and projection operations. On the Cooperation of the Constraint Domains H, R and F D in CF LP 47 SB Set Bridges ′ ∃U. P ✷ π, C ✷ M ✷ H ✷ F ✷ R ⊢⊢SB ∃V , U. P ✷ π, C ✷ M ′ ✷ H ✷ F ✷ R If π is a primitive atomic constraint and either (i) or (ii) holds, where (i) π is a proper F D-constraint or else an extended H-constraint such that M ⊢ π in F D, and M ′ = B ′ , M, where ∃V ′ B ′ = bridgesFD→R (π, BM ) 6= ∅. (ii) π is a proper R-constraint or else an extended H-constraint such that M ⊢ π in R, and M ′ = B ′ , M, where ∃V ′ B ′ = bridgesR→FD (π, BM ) 6= ∅. PP Propagate Projections ∃U. P ✷ π, C ✷ M ✷ H ✷ F ✷ R ⊢⊢PP ∃V ′ , U. P ✷ π, C ✷ M ✷ H ✷ F ′ ✷ R′ If π is a primitive atomic constraint and either (i) or (ii) holds, where (i) π is a proper F D-constraint or else an extended H-constraint such that M ⊢ π in F D, ∃V ′ Π′ = proj FD→R (π, BM ) 6= ∅, F ′ = F , and R′ = Π′ , R, or else, (ii) π is a proper R-constraint or else an extended H-constraint such that M ⊢ π in R, ∃V ′ Π′ = proj R→FD (π, BM ) 6= ∅, F ′ = Π′ , F , and R′ = R. SC Submit Constraints ∃U. P ✷ π, C ✷ M ✷ H ✷ F ✷ R ⊢⊢SC ∃U. P ✷ C ✷ M ′ ✷ H ′ ✷ F ′ ✷ R′ If π is a primitive atomic constraint and one of the following cases applies: (i) π is a M-constraint, M ′ = π, M, H ′ = H, F ′ = F , and R′ = R. (ii) π is an extended H-constraint such that neither M ⊢ π in F D nor M ⊢ π in R, M ′ = M, H ′ = π, H, F ′ = F , and R′ = R. (iii) π is a proper F D-constraint or else an extended H-constraint such that M ⊢ π in F D, M ′ = M, H ′ = H, F ′ = π, F , and R′ = R. (iv) π is a proper R-constraint or else an extended H-constraint such that M ⊢ π in R, M ′ = M, H ′ = H, F ′ = F , and R′ = π, R. Table 4. Rules for Bridges and Projections The formulation of SB, PP and SC in Table 4 relies on the identification of certain atomic primitive Herbrand constraints π as F D-specific or R-specific, as indicated by the notations M ⊢ π in F D and M ⊢ π in R, previously explained in Subsection 2.6. The notation Π, S is used at several places to indicate the new store obtained by adding the set of constraints Π to the constraints within store S. The notation π, S (where π is a single constraint) must be understood similarly. In practice, SB, PP and SC are best applied in this order. Note that PP places the projected constraints in their corresponding stores, while constraints in the pool that are not useful anymore for computing additional bridges or projections will be eventually placed into their stores by means of transformation SC. ′ ′ The functions bridgesD→D and proj D→D are specified in Table 5 for the case D = F D, D′ = R and in Table 6 for the case D = R, D′ = F D. Note that the primitive #/ is not considered in Table 5 because integer division constraints cannot be projected into real division constraints. The notations ⌈a⌉ (resp. ⌊a⌋) used in Table 6 stand for the least integer upper bound (resp. the greatest integer lower bound) of a ∈ R. Constraints t1 > t2 , t1 >= t2 are not explicitly considered 48 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado in Table 6; they are treated as t2 < t1 , t2 <= t1 , respectively. In tables 5 and 6, the existential quantification of the new variables V ′ is left implicit, and results displayed as an empty set of constraints must be read as an empty (and thus trivially true) conjunction. bridgesF D→R (π, B) π domain [X1 , . . . , Xn ] a b belongs X [a1 , . . . , an ] proj F D→R (π, B) {Xi #== RXi | 1 ≤ i ≤ n, Xi has {a <= RXi , RXi <= b | 1 ≤ i ≤ n no bridge in B and RXi new} and (Xi #== RXi ) ∈ B} {X #== RX | X has no bridge in {min(a1 , . . . , an ) <= RX, RX <= max(a1 , . . . , an ) | 1 ≤ i ≤ n and B and RX new} (X #== RX) ∈ B} t1 #< t2 (resp. #<=, #>, #=>) {Xi #== RXi | 1 ≤ i ≤ 2, ti is a R {tR 1 < t2 | For 1 ≤ i ≤ 2: Either variable Xi with no bridge in B, ti is an integer constant n and tR i and RXi new} is the integral real n, or else ti is a variable Xi with (Xi #== RXi ) ∈ B, and tR i is RXi } t1 == t2 {X #== RX | either t1 is an inte- R R {tR 1 == t2 | For 1 ≤ i ≤ 2: ti is ger constant and t2 is a variable determined as in the #< case} X with no bridges in B (or vice versa) and RX is new} t1 /= t2 {X #== RX | either t1 is an inte- R R {tR 1 /= t2 | For 1 ≤ i ≤ 2: ti is ger constant and t2 is a variable determined as in the #< case} X with no bridges in B (or vice versa) and RX is new} t1 #+ t2 →! t3 (resp. #-, #*) {Xi #== RXi | 1 ≤ i ≤ 3, ti is a R R {tR 1 + t2 →! t3 | For 1 ≤ i ≤ 3: variable Xi with no bridge in B tR i is determined as in the #< case} and RXi new} Table 5. Computing Bridges and Projections from F D to R ′ ′ The next result states some basic properties of bridgesD→D and proj D→D . The easy proof is omitted. Proposition 1 (Properties of Bridges and Projections between F D and R) Let D and D′ be chosen as F D and R, or vice versa. Then: ′ ′ 1. bridgesD→D (π, B) and proj D→D (π, B) make sense for any atomic primitive constraint π which is either D-proper or extended Herbrand and D-specific, and for any finite set B of bridges. ′ 2. bridgesD→D (π, B) returns a possibly empty finite set B ′ of new bridges in′ volving new variables V ′ . In particular, bridgesD→D (π, B) = ∅ is assumed On the Cooperation of the Constraint Domains H, R and F D in CF LP 49 whenever Tables 5 and 6 do not include any row covering π. The completeness condition W T SolC (π ∧ B) ⊆ W T SolC (∃V ′ (π ∧ B ∧ B ′ )) holds, where B and B ′ are interpreted as conjunctions. Note that the correctness condition SolC (π ∧ B) ⊇ SolC (∃V ′ (π ∧ B ∧ B ′ )) also holds trivially. ′ 3. proj D→D (π, B) returns a finite set Π′ ⊆ AP ConD′ of atomic primitive D′ ′ constraints involving new variables V ′ . In particular, proj D→D (π, B) = ∅ is assumed whenever Tables 5 and 6 do not include any row covering π. The completeness condition W T SolC (π ∧ B) ⊆ W T SolC (∃V ′ (π ∧ B ∧ Π′ )) holds, where B and Π′ are interpreted as conjunctions. Note that the correctness condition SolC (π ∧ B) ⊇ SolC (∃V ′ (π ∧ B ∧ Π′ )) also holds trivially. π bridgesR→FD (π, B) proj R→FD (π, B) RX < RY ∅ (no bridges are created) {X #< Y | (X #== RX),(Y #== RY ) ∈ B} RX < a ∅ (no bridges are created) {X #< ⌈a⌉ | a ∈ R, (X #== RX) ∈ B} a < RY ∅ (no bridges are created) {⌊a⌋ #< Y | a ∈ R, (Y #== RY ) ∈ B} RX <= RY ∅ (no bridges are created) {X #<= Y |(X #== RX),(Y #== RY ) ∈ B} RX <= a ∅ (no bridges are created) {X #<= ⌊a⌋ | a ∈ R, (X #== RX) ∈ B} a <= RY ∅ (no bridges are created) {⌈a⌉ #<= Y | a ∈ R, (Y #== RY ) ∈ B} t1 == t2 {X #== RX | either t1 is an in- t1 /= t2 {tFD == tFD | For 1 ≤ i ≤ 2: Either ti 1 2 tegral real constant and t2 is a is an integral real constant n and tFD is i variable RX with no bridges in the integer n, or else ti is a variable RXi B (or vice versa) and X is new} is Xi } with (Xi #== RXi ) ∈ B, and tFD i ∅ (no bridges are created) {tFD /= tFD | For 1 ≤ i ≤ 2: Either ti 1 2 is an integral real constant n and tFD is i the integer n, or else ti is a variable RXi with (Xi #== RXi ) ∈ B, and tFD is Xi } i t1 + t2 →! t3 (resp. -, *) {X #== RX | t3 is a variable RX {tFD #+ tFD →! tFD | For 1 ≤ i ≤ 3: tFD 1 2 3 i with no bridge in B, X new, for is determined as in the previous case} 1 ≤ i ≤ 2, ti is either an integral real constant or a variable RXi with bridge (Xi #== RXi ) ∈ B} t1 / t2 →! t3 ∅ (no bridges are created) {tFD #* tFD →! tFD | For 1 ≤ i ≤ 3 is 2 3 1 determined as in the previous case} Table 6. Computing Bridges and Projections from R to F D Example 9 below illustrates the operation of the goal transformation rules from 50 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado Table 4 for computing bridges and projections with the help of the functions specified in Tables 5 and 6. Example 9 (Computation of Bridges and Projections) ✷ (RX + 2 ∗ RY ) ∗ RZ <= 3.5 ✷ X #== RX, Y #== RY, Z #== RZ ✷✷✷ ⊢⊢FC3 ,PC3 ∃RC, RB, RA. ✷ 2 ∗ RY →! RC, RX + RC →! RB, RB ∗ RZ →! RA, RA <= 3.5 ✷ X #== RX, Y #== RY, Z #== RZ ✷✷✷ ⊢⊢SB3 ∃C, B, A, RC, RB, RA. ✷ 2 ∗ RY →! RC, RX + RC →! RB, RB ∗ RZ →! RA, RA <= 3.5 ✷ C #== RC, B #== RB, A #== RA, X #== RX, Y #== RY, Z #== RZ ✷✷✷ ⊢⊢PP4 ∃C, B, A, RC, RB, RA. ✷ 2 ∗ RY →! RC, RX + RC →! RB, RB ∗ RZ →! RA, RA <= 3.5 ✷ C #== RC, B #== RB, A #== RA, X #== RX, Y #== RY, Z #== RZ ✷✷ 2 #* Y →! C, X #+ C →! B, B #* Z →! A, A #<= 3 ✷ ⊢⊢SC4 ∃C, B, A, RC, RB, RA. ✷✷ C #== RC, B #== RB, A #== RA, X #== RX, Y #== RY, Z #== RZ ✷✷ 2 #* Y →! C, X #+ C →! B, B #* Z →! A, A #<= 3 ✷ 2 * RY →! RC, RX + RC →! RB, RB * RZ →! RA, RA <= 3.5 Note that the initial goal in this current example is an extension of the initial goal in Example 8. The first six steps of the current computation are similar to those in Example 8, taking care of flattening the R-constraint (RX+2*RY)*RZ <= 3.5. The subsequent steps use the transformation rules from Table 4 until no further bridges and projections can be computed and no constraints remain in the constraint pool. We have borrowed the projection idea from Hofstedt’s work, see e.g. (Hofstedt 2001; Hofstedt and Pepper 2007), but our proposal of using bridges to compute projections is a novelty. In Hofstedt’s approach, projecting constraints from one domain into another depends on common variables present in both stores. In our approach, well-typing requirements generally prevent one and the same variable to occur in constraints from different domains. In order to improve the opportunities for computing projections, our cooperative goal solving calculus CCLN C(C) provides the goal transformation rule SB for creating new bridges during the computations. Some other differences between CCLN C(C) and the cooperative computation model proposed by Hofstedt et al. are as follows: • All the projections presented in this paper return just one ∃V ′ Π′ . In Hofstedt’s terminology, such projections are called weak, while projections reWl turning disjunctions k=1 ∃V ′ k Π′k with l > 1 are called strong. The use of strong projections is illustrated in (Hofstedt and Pepper 2007) by means of a problem dealing with the computation of resistors that have a certain capacity. The strong projection used in this example is a finite disjunction of conjunctions of the form X == x ∧ Y == y for various numeric values x and y. Solving this disjunction gives rise to an enumeration of solutions. In (Estévez-Martı́n et al. 2007) we have presented a solution of the resistors problem where an equivalent enumeration of solutions can be computed by the F D-solver via backtracking, without building any strong projection. This is possible in our framework due to the presence of labeling constraints, that are not used in the resistor example as presented in On the Cooperation of the Constraint Domains H, R and F D in CF LP 51 (Hofstedt and Pepper 2007). Therefore, strong projections are not necessary for this particular example of cooperation between F D and R. Theoretically, strong projections could be useful in other problems, and rule PP in our CCLN C(C) calculus could be very straightforwardly adapted to work with strong projections. However, we decided not to do so because we are not aware of any useful extension to extend tables 5 and 6 for computing strong projections. We could find no formulation of practical procedures for computing projections in (Hofstedt and Pepper 2007) and related works, where all projections used in examples are presented in an ad hoc manner. • Currently, our CCLN C(C) calculus projects F D (resp. R) constraints from the pool C into the R store R (resp. F D store F ). Hofstedt’s proposal also allows to compute projections from constraints placed into the stores. In our previous paper (Estévez-Martı́n et al. 2007), we have sketched a cooperative goal solving calculus where an arbitrary coordination domain was assumed and projections could act over the constraints within constraint stores. In fact, the resistor problem mentioned in the previous item was solved in (Estévez-Martı́n et al. 2007) by making essential use of projections that acted over constraints within the F D and R stores. In the current paper, goal solving is restricted to the coordination domain C = M ⊕ H ⊕ F D ⊕ R and projections can be applied only to the constraints placed in the constraint pool. These two limitations correspond to the state of the current T OY implementation. In particular, projections acting over stored constraints are not yet handled because the current T OY system has no convenient mechanisms for processing the constraint stores handled by the underlying SICStus Prolog. • Goal solving in CCLN C(C) enjoys the soundness and completeness properties presented in Subsection 3.6. In our opinion, these are more elaborate than the soundness and completeness results provided in Hofstedt’s work. IE Infer Equalities ∃U. P ✷C ✷ X #== RX, X ′ #== RX, M ✷ H ✷ F ✷R ⊢⊢UB ∃U . P ✷ C ✷ X #== RX, M ✷ H ✷ X == X ′ , F ✷R. ∃U. P ✷C ✷ X #== RX, X #== RX ′ , M ✷ H ✷ F ✷R ⊢⊢UB ∃U . P ✷ C ✷ X #== RX, M ✷ H ✷ F ✷RX==RX ′ , R. ID Infer Disequalities ∃U. P ✷C ✷ X#/==u′ , M ✷ H ✷ F ✷R ⊢⊢ID ∃U. P ✷ C ✷ M ✷ H ✷ X/=u, F ✷R if u ∈ Z, u′ ∈ R and u #==M u′ → true. ∃U. P ✷C ✷ u#/==RX, M ✷ H ✷ F ✷R ⊢⊢ID ∃U. P ✷ C ✷ M ✷ H ✷ F ✷ RX/=u′ , R if u ∈ Z, u′ ∈ R and u #==M u′ → true. Table 7. Rules for Inferring H-constraints from M-constraints To finish this subsection, we present the goal transformation rules in Table 7, which can be used to infer H-constraints from the M-constraints placed in the store 52 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado M . The inferred H-constraints happen to be F D-specific or R-specific, according to the case, and can be placed in the corresponding store. Therefore, the rules in this group model domain cooperation mechanisms other than bridges and projections. 3.4 Constraint Solving Rules The presentation of CCLN C(C) finishes with the constraint solving rules displayed in Table 8. Rule SF models the detection of failure by a solver, and the other rules describe the possible transformation of a goal by a solver’s invocation. Each time a new constraint from the pool is placed into its store by means of transformation SC, it is pragmatically convenient to invoke the corresponding solver by means of the rules in this table. The solvers for the four domains M, H, F D and R involved in the coordination domain C are considered. The availability of the M-solver means that solving mediatorial constraints contributes to the cooperative goal solving process, in addition to the role of bridges for guiding projections. MS M-Constraint Solver (glass-box) ∃U. P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢MS ∃Y ′ , U . (P ✷ C ✷ (Π′ ✷ σM ) ✷ H ✷ F ✷ R)@M σ′ If pvar(P ) ∩ var(ΠM ) = ∅, (ΠM ✷ σM ) is not solved, ΠM ⊢⊢solveM ∃Y ′ (Π′ ✷ σ′ ). HS H-Constraint Solver (glass-box) ∃U. P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢HS ∃Y ′ , U . (P ✷ C ✷ M ✷ (Π′ ✷ σH ) ✷ F ✷ R)@H σ′ If pvar(P ) ∩ odvarH (ΠH ) = ∅, X =def pvar(P ) ∩ var(ΠH ), (ΠH ✷ σH ) is not χ-solved, ΠH ⊢⊢solveH ∃Y ′ (Π′ ✷ σ′ ). X FS F D-Constraint Solver (black-box) ∃U. P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢FS ∃Y ′ , U . (P ✷ C ✷ M ✷ H ✷ (Π′ ✷ σF ) ✷ R)@FD σ′ If pvar(P ) ∩ var(ΠF ) = ∅, (ΠF ✷ σF ) is not solved, ΠF ⊢⊢solveFD ∃Y ′ (Π′ ✷ σ′ ). RS R-Constraint Solver (black-box) ∃U. P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢RS ∃Y ′ , U. (P ✷ C ✷ M ✷ H ✷ F ✷ (Π′ ✷ σR ))@R σ′ If pvar(P ) ∩ var(ΠR ) = ∅, (ΠR ✷ σR ) is not solved, ΠR ⊢⊢solveR ∃Y ′ (Π′ ✷ σ′ ). SF Solving Failure ∃U. P ✷ C ✷ M ✷ H ✷ F ✷ R ⊢⊢SF  If S is the D-store (D being M, H, F D or R), pvar(P )∩odvarD (ΠS ) = ∅, X =def pvar(P )∩var(ΠS ), (ΠS ✷ σS ) is not χ-solved and ΠS ⊢⊢solveD . Note that X 6= ∅ is possible only in the case D = H. X Table 8. Rules for M, H, F D and R Constraint Solving Let D be any of the four domains, and let Π be the set of constraints included in On the Cooperation of the Constraint Domains H, R and F D in CF LP 53 the D store in a given goal G with productions P . As explained in Subsection 2.4.1, each invocation solveD (Π, X ) depends on a set of critical variables X ⊆ cvarD (Π) which must be properly chosen. On the other hand, the goal invariants explained in Subsection 3.1 require that no produced variable is bound to a non-linear pattern, and the safe binding condition satisfied by any solver ensures that a solver invocation never binds any variable X ∈ X , except to a constant. Because of these reasons, the rules in Table 8 allow a solver invocation solveD (Π, X ) only if the following two conditions are satisfied: (a) pvar(P ) ∩ odvarD (Π) = ∅. Motivation: If this condition does not hold, for any choice of X ⊆ cvarD (Π) there is some variable X ∈ pvar(P ) \ X , and the solver invocation could bind X to a non-linear pattern. (b) X = pvar(P ) ∩ var(Π). Motivation: Because of condition (a), this X is a subset of cvarD (Π), and the safe binding condition of solvers ensures that the invocation solveD (Π, X ) will bind no produced variable, except to a constant. When D is not H, we know from Section 2 that all the variables in Π can be assumed to be obviously demanded. Then odvarD (Π) = var(Π), condition (a) becomes pvar(P ) ∩ var(Π) = ∅, (b) becomes X = ∅, and solveD (Π, ∅) can be abbreviated as solveD (Π). The rules related to M, F D and R in Table 8 assume the simplified form of condition (a), (b). The notations Π ⊢⊢solveD ∃Y ′ (Π′ ✷ σ ′ ) X and Π ⊢⊢solveD  introduced in Subsection 2.4.1 are used to indicate the nonX deterministic choice of an alternative returned by a successful D-solver invocation and a failed D-solver invocation, respectively. Note also the use of the notation (. . .)@D σ ′ explained near the end of Subsection 3.1. At this point, we can precise the notion of solved goal as follows: a goal G is solved iff it has the form ∃U . ✷ ✷ M ✷ H ✷ F ✷ R (with empty P and C) and the CLN C(C)-transformations in Tables 7 and 8 cannot be applied to G. The CLN C(C)-transformations in Tables 3 and 4 are obviously not applicable to solved goals, since they refer to P and C. 3.5 One Example of Cooperative Goal Solving In order to illustrate the overall behavior of our cooperative goal solving calculus, we present a CCLN C(C) computation solving the goal Goal 2 discussed in Subsection 1.2. The reader is referred to Figure 2 for a graphical representation of the problem and to Subsection 3.1 for a formulation of the goal and the expected solution in the particular case d = 2, n = 4. However, the solution is the same for any choice of positive integer values d and n such that n = 2*d, and here we will discuss the general case. The CCLN C(C) calculus leaves ample room for choosing a particular goal transformation at each step, so that many different computations are possible in principle. However, the T OY implementation follows a particular strategy. The part P ✷ C of the current goal is treated as a sequence and processed from left to right, 54 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado with the only exception of suspensions e → X that are delayed until they can be safely eliminated by means of rule EL or the goal is so transformed that they cease to be suspensions. As long as the current goal is not in solved form, a subgoal is selected and processing according to a strategy which can be roughly described as follows: 1. If P includes some production which can be handled by the constrained lazy narrowing rules in Table 3, the leftmost such production is selected and processed. Note that the selected production must be either a suspension e → X that can be discharged by rule EL, or else a production that is not a suspension. The applications of rule DF are performed in an optimized way by using definitional trees (del Vado-Vı́rseda 2005; del Vado-Vı́rseda 2007). 2. If P is empty or consists only of productions e → X that cannot be processed by means of the constrained lazy narrowing rules in Table 3, and moreover some of the stores M , H, F or R is not in solved form and its constraints include no produced variables, then the solvers for such stores are invoked, choosing the set X of critical variables as explained in Table 8. 3. If neither of the two previous items applies and C is not empty, the leftmost atomic constraint δ in C is selected. In case it is not primitive, the flattening rule FC from Table 3 is applied. Otherwise, δ is a primitive atomic constraint π, and exactly one of the following cases applies: (a) If π is a proper F D-constraint or else an extended H-constraint such that M ⊢ π in F D, then π is processed by means of the rules SB, PP and SC from Table 4. This generates bridges and projected constraints π ′ , if possible, and submits π to the store F . Then, the rules from Table 8 are used for invoking the F D-solver (in case that the constraints in F include no produced variables) and the R-solver (in case that the constraints in R include no produced variables). (b) If π is a proper R-constraint or else an extended H-constraint such that M ⊢ π in R, then π is processed by means of the rules SB, PP and SC from Table 4. This generates bridges and projected constraints π ′ , if possible, and submits π to the store R. Then, the rules from Table 8 are used for invoking the R-solver (in case that the constraints in R include no produced variables) and the F D-solver (in case that the constraints in F include no produced variables). (c) If π is an extended H-constraint such that neither M ⊢ π in F D nor M ⊢ π in R, then π is submitted to the store H by means of rule SC, and the H-solver is invoked in case that the constraints in H include no obviously demanded produced variables. (d) If π is a M-constraint, then π is submitted to the store M by means of rule SC, the rules of Table 7 are applied if possible, and the M-solver is invoked in case that the constraints in M include no produced variables. The series of goals G0 up to G12 displayed below correspond to the initial goal, the final solved goal and a selection of intermediate goals in a computation which On the Cooperation of the Constraint Domains H, R and F D in CF LP 55 roughly models the strategy of the T OY implementation, working with the projection functionality activated. In the initial goal, d and n are arbitrary positive integers such that n = 2*d and d’ = d+0.5. G0 : ✷ bothIn (triangle (d, d′ ) 2 1) (square n) (X, Y ) == true ✷✷✷✷ ⊢⊢FC G1 : ∃U1 . bothIn (triangle (d, d′ ) 2 1) (square n) (X, Y ) → A ✷ A== true ✷✷✷✷ ⊢⊢SC(ii) G2 : ∃U2 . bothIn (triangle (d, d′ ) 2 1) (square n) (X, Y ) → A ✷ ✷✷ A == true✷✷ ⊢⊢DFbothIn G3 : ∃U3 .triangle (d, d′ ) 2 1 → R, square n → G, (X, Y ) → (X ′ , Y ′ ), true → A ✷ X ′ #== RX, Y ′ #== RY , isIn R (RX, RY ) == true, isIn G (X ′ , Y ′ ) == true, labeling [ ] [X ′ , Y ′ ] ✷✷ A == true ✷✷ ⊢⊢∗ SP2 ,DC,SP3 ,HS G4 : ∃U4 . ✷X #== RX, Y #== RY , isIn (triangle (d, d′ ) 2 1) (RX, RY ) == true, isIn (square n) (X, Y ) == true, labeling [ ] [X, Y ] ✷✷ σH ✷✷ ⊢⊢∗ SC(i)2 ,MS G5 : ∃U5 . ✷ isIn (triangle (d, d′ ) 2 1) (RX, RY )== true, isIn (square n) (X, Y )== true, labeling [ ] [X, Y ] ✷X #== RX, Y #== RY ✷ σH ✷✷ ⊢⊢∗ CLN G6 : ∃U6 . ✷ RY >= d′ − 1, 2 ∗ RY − 2 ∗ 1 ∗ RX <= 2 ∗ d′ − 2 ∗ 1 ∗ d, 2 ∗ RY + 2 ∗ 1 ∗ RX <= 2 ∗ d′ + 2 ∗ 1 ∗ d, domain [X, Y ] 0 n, ′ labeling [ ] [X, Y ] ✷ X #== RX, Y #== RY ✷ σH ✷✷ ⊢⊢∗ FC,PC G7 : ∃U7 . ✷ d′ − 1 →!RA, RY >= RA, 2 ∗ RY − 2 ∗ 1 ∗ RX <= 2 ∗ d′ − 2 ∗ 1 ∗ d, 2 ∗ RY + 2 ∗ 1 ∗ RX <= 2 ∗ d′ + 2 ∗ 1 ∗ d, domain [X, Y ] 0 n, ′ labeling [ ] [X, Y ] ✷ X #== RX, Y #== RY ✷ σH ✷✷ ⊢⊢∗ SC(iv),RS G8 : ∃U8 . ✷ RY >= d′′ , 2 ∗ RY − 2 ∗ 1 ∗ RX <= 2 ∗ d′ − 2 ∗ 1 ∗ d, 2 ∗ RY + 2 ∗ 1 ∗ RX <= 2 ∗ d′ + 2 ∗ 1 ∗ d, domain [X, Y ] 0 n, ′ labeling [ ] [X, Y ] ✷ X #== RX, Y #== RY ✷ σH ✷✷ SR ⊢⊢∗ BP,CS G9 : ∃U9 . ✷ 2 ∗ RY − 2 ∗ 1 ∗ RX <= 2 ∗ d′ − 2 ∗ 1 ∗ d, 2 ∗ RY + 2 ∗ 1 ∗ RX <= 2 ∗ d′ + 2 ∗ 1 ∗ d, domain [X, Y ] 0 n, labeling [ ] [X, Y ] ✷ ′ X #== RX, Y #== RY ✷ σH ✷ Y # >= d ✷ RY >= d′′ , SR ⊢⊢∗ FR,BP G10 : ∃U10 . ✷ domain [X, Y ] 0 n, labeling [ ] [X, Y ] ✷ ′ ′ X #== RX, Y #== RY B #== RB, C #== RC, SM ✷ σH ✷ ′ Y # >= d, 2# ∗ Y # − 2# ∗ X →!B, B# <= 1, 2# ∗ Y # + 2# ∗ X →!C, C# <= n′ , SF ✷ ′′ ′ ′ RY >= d , 2 ∗ RY − 2 ∗ RX →!RB, RB <= 1, 2 ∗ RY + 2 ∗ RX →!RC, RC <= n , SR ⊢⊢∗ CS ′′ ′ ′′ ′′ ✷ σH ✷ SF ✷ SR ⊢⊢∗ G11 : ∃U11 . ✷ domain [d, d] 0 n, labeling [ ] [d, d] ✷ SM SC(iii),FS,SC(iii),FS ′′ ′ ′′ ′′ ✷ σH ✷ SF ✷ SR G12 : ∃U12 . ✷ ✷ SM The local existential variables ∃Ui of each goal Gi are not explicitly displayed, and the notation Gi−1 ⊢⊢∗RS Gi is used to indicate the transformation of Gi−1 into Gi using the goal solving rules indicated by RS. At some steps, RS indicates a particular sequence of individual rules, named as explained in the previous subsections. In other cases, namely for i = 6 and 9 ≤ i ≤ 11, RS indicates sets of goal transformation rules, named according to the following conventions: • CLN names the set of constrained lazy narrowing rules presented in Table 3. • FR names the set consisting of the two rules FC and PC displayed at the end of Table 3, used for constraint flattening. • BP names the set of rules for bridges and projections presented in Table 4. • CS names the set of constraint solving rules presented in Table 8. We finish with some comments on the computation steps: • Transition from G0 to G1 : The only constraint in C is flattened, giving rise 56 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado • • • • • • • • to one suspension and one flat constraint in the new goal. The produced variable A is not obviously demanded because the constraint A == true is not yet placed in the H-store. Transition from G1 to G2 : The only suspension is delayed, and the only constraint in the pool is processed by submitting it to the H-store. However, the H-solver cannot be invoked at this point, because A has become an obviously demanded variable that is also produced. Transition from G2 to G3 : The former suspension has become a production which is processed by applying the program rule defining the function bothIn, which introduces new productions in P and new constraints in C. Transition from G3 to G4 : The four productions in P are processed by binding propagations and decompositions (rules SP and DC), until P becomes empty. Then the H-solver can be invoked. At this point, the H-store just contains a substitution σH resulting from the previous binding steps. Transition from G4 to G5 : P is empty, and the two first constraints in C are bridges. They are submitted to the M-store and the M-solver is invoked, which has no effect in this case. Transition from G5 to G6 : There are no productions, and the two first constraints in the pool are processed by steps similar to those used in the transition going from G0 to G4 . Upon completing this process, the new pool includes a number of new constraints coming from the conditions in the program rules defining the functions isIn, triangle and square, and the substitution stored in H has changed. At this point, P is empty again and the constraints in C plus the bridges in M amount to a system equivalent to the one used in Subsection 1.2 for an informal discussion of the resolution of Goal 2. Transition from G6 to G7 and from G7 to G8 : There are no productions, and flattening the first constraint in C gives rise to the primitive constraint d’-1 →! RA. This is submitted to the R-store and the R-solver is invoked, which computes d’’ as the numeric value of d’-1 and propagates the variable binding RA 7→ d’’ to the whole goal, possibly causing some other internal changes in the R-store. Transition from G8 to G9 : There are no productions, and the first constraint in C is now RY >= d’’. Since d’’ = d’-1 = d+0.5-1 = d-0.5, we have ⌈d’’⌉ = d. Therefore, projecting RY >= d’’ with the help of the available bridges (including Y #== RY) allows to compute Y #>= d as a projected F Dconstraint. Both RY >= d’’ and Y #>= d are submitted to their respective stores and the two solvers are invoked, having no effect in this case. Transition from G9 to G10 : There are no productions, and the two first atomic constraints in the pool of G9 (two R-constraints δ1 and δ2 ) are processed by steps similar to those used in the transition going from G6 to G9 , except that the solver invocations are delayed to the transition from G10 to G11 and commented in the next item. (Actually, the T OY implementation would invoke the solvers two times: The first time when processing δ1 and the second time when processing δ2 . Here we explain the overall effect of the two invocations for the sake of simplicity.) Upon completing this process, G10 stays as fol- On the Cooperation of the Constraint Domains H, R and F D in CF LP 57 lows: P is empty, C includes the two other constraints which were there in G9 , and the stores M , F and R have changed because of new bridges and projections. In fact, the constraints within the stores F and R in G10 would be equivalent but not identical to the ones shown in this presentation, due to intermediate flattening steps that we have not shown explicitly. In particular, the R-constraint 2*RY-2*RX →! RB and its F D-projection 2#*Y#-2#*X →! B would really not occur in this form, but a conjunctions of primitive constraints obtained by flattening them would occur at their place. • Transition from G10 to G11 : At this point, the F D-solver is able to infer that the constraints in the F D store imply one single solution for the variables X and Y, namely {X 7→ d, Y 7→ d}. Therefore, the F D-solver propagates these bindings to the whole goal, affecting in particular to the bridges in M . Then, the M-solver propagates the corresponding bindings {RX 7→ rd, RY 7→ rd}. (rd being the representation of d as an integral real number), and the R-solver succeeds. • Transition from G11 to G12 : The two constraints in C have now become trivial. Submitting them to their stores and invoking the respective solvers leads to a solved goal, whose restriction to the variables in the initial goal is the computed answer ✷✷✷✷ (♦ ✷ {X 7→ d, Y 7→ d}) ✷. Note that no labeling whatsoever has been performed, independently of the size of n. 3.6 Properties of the Cooperative Goal Solving Calculus CCLN C(C) This final subsection presents the main semantic results of the paper, namely soundness and limited completeness of the cooperative goal solving calculus CCLN C(C) w.r.t. the declarative semantics of CF LP (C) given in (López-Fraguas et al. 2007). To start with, we define the notion of solution for a given goal. Definition 10 (Solutions of Goals and their Witnesses) 1. Let G ≡ ∃U . P ✷ C ✷ M ✷ H ✷ F ✷ R be an admissible goal for a given CF LP (C)-program P. The set of solutions SolP (G) of G w.r.t. P includes all those µ ∈ V alC such that there is some µ′ ∈ V alC verifying µ′ =\U µ and µ′ ∈ SolP (P ✷ C ✷ M ✷ H ✷ F ✷ R), which holds iff the following two conditions are satisfied: (a) µ′ ∈ SolP (P ✷ C). By definition, this means P ⊢CRW L(C) (P ✷ C)µ′ , which is equivalent to P ⊢CRW L(C) P µ′ and P ⊢CRW L(C) Cµ′ . This notation refers to the existence of proofs in the instance CRW L(C) of the Constrained Rewriting Logic CRW L, whose inference rules can be found in (López-Fraguas et al. 2007). (b) µ′ ∈ SolC (M ✷ H ✷ F ✷ R), which is equivalent to µ′ ∈ SolC (M ) ∩ SolC (H) ∩ SolC (F ) ∩ SolC (R). 2. If M is a multiset having as its members the CRW L(C)-proofs mentioned in item 1.(a) above, we will say that M is a witness for the fact that µ ∈ SolP (G), and we will write M : µ ∈ SolP (G). 58 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 3. A solution µ ∈ SolP (G) is called well-typed iff the valuation µ′ =\U µ mentioned in item 1. can be so chosen that (P ✷ C ✷ M ✷ H ✷ F ✷ R)µ′ is welltyped, which is noted as µ′ ∈ W T SolP (P ✷ C ✷ M ✷ H ✷ F ✷ R). The set of all well-typed solutions of G w.r.t. P is written as W T SolP (G). In case that M is a witness for µ ∈ SolP (G), we also say that M is a witness for µ ∈ W T SolP (G) and we write M : µ ∈ W T SolP (G). In case that G is a solved goal S, we write SolC (S) (resp. W T SolC (S)) in place of SolP (S) (resp. W T SolP (S)). Concerning item 1.(b) in the previous definition, note that the equivalence η ∈ SolC (M ) ∩ SolC (H) ∩ SolC (F ) ∩ SolC (R) ⇔ η ∈ SolM (M ) ∩ SolH (H) ∩ SolF (F ) ∩ SolR (R) does not make sense in general, because a given valuation η ∈ V alC is not always a D valuation when D is chosen as one of the four components of C. However, Theorem 2 from Subsection 2.5 allows to reason with solutions known for C in terms of solutions known for the four components, as we will see in the mathematical proofs of Appendix A.2. Before presenting our soundness and completeness results for CCLN C(C) let us comment on some limitations concerning completeness: • As already said in Subsection 3.1, the design of CCLN C(C) is tailored to programs and goals having no free occurrences of higher-order logic variables. Therefore, the completeness results of this subsection are limited to this kind of programs and goals. • The completeness of CCLN C(C) is obviously conditioned by the completeness of the solvers invoked by the goal transformation rules in Table 8. On the other hand, the completeness requirement for solvers in Definition 6 is limited to well-typed solutions. Therefore, the completeness results of this subsection refer only to well-typed solutions of the initial goal. • As discussed in Subsections 2.4.2, 2.4.3 and 2.4.4, certain invocations of constraint solvers can be incomplete even w.r.t. well-typed solutions. Therefore, the completeness results of this subsection are also limited by the assumption that no incomplete solver invocations occur during goal solving. • Finally, the goal transformation rule DC from Table 3 can give rise to opaque decompositions. Similarly to the opaque decompositions caused by the transformation rules H3 and H7 for H-stores (see Subsection 2.4.2), the opaque decompositions caused by DC can lose well-typed solutions. In what follows, we will say that an application of the goal transformation rule DC is transparent iff the expression h em involved in the rule application is such that h is m-transparent (or equivalently, h is not m-opaque). Only transparent applications of the rule DC can be trusted to preserve well-typed solutions. For this reason, the completeness results of this subsection are limited by the assumption that no opaque applications of rule DC occur during goal solving. Unfortunately, the eventual occurrence of opaque decomposition steps during goal solving (be they due to rule DC from Table 3 or to the stss H3 and On the Cooperation of the Constraint Domains H, R and F D in CF LP 59 H7 of the H-solver) is an undecidable problem, because of theoretical results proved in (González-Moreno et al. 2001). In the sequel we will use the notation G ⊢⊢RL,γ,P G′ to indicate that the admissible goal G for the CF LP (C)-program P is transformed into the new goal G′ by an application of the selected rule RL applied to the selected part γ of G. It is important to note that the selected part γ of G must have the form expected by the selected rule RL. More precisely, γ must be selected as one of the stores in case that RL is some the transformations in Table 8, as a pair of bridges in case that RL is the transformation IE from Table 7, and as an atom in any other case. We will ′ use also the notation G ⊢⊢+ RL,γ,P G to indicate the existence of some computation ∗ ′ of the form G ⊢⊢RL,γ,P G1 ⊢⊢P G transforming G in G′ in n steps for some n ≥ 1. We are now in a position to present the main results of this subsection. First, we state a theorem which guarantees local soundness and completeness for the one-step transformation of a given goal. A proof is given in Appendix A.2. Theorem 4 (Local Soundness and Limited Local Completeness) Assume a given program P and an admissible goal G for P which is not in solved form. Choose any rule RL applicable to G and select a part γ of G suitable for applying RL. Then there are finitely many possible transformations G ⊢⊢RL,γ,P G′j (1 ≤ j ≤ k), and moreover: Sk 1. Local Soundness: SolP (G) ⊇ j=1 SolP (G′j ). S 2. Limited Local Completeness: W T SolP (G) ⊆ kj=1 W T SolP (G′j ), provided that the application of RL to the selected part γ of G is safe in the following sense: it is neither an opaque application of DC nor an application of a rule from Table 8 involving an incomplete solver invocation. A global soundness result for CCLN C(C) follows easily from the first item of Theorem 4. In particular, it ensures that the solved forms obtained as computed answers for an initial goal using the rules of the cooperative goal solving calculus are indeed semantically valid answers of G. Theorem 5 (Soundness Theorem) Assume a CF LP (C)-program P, an admissible goal G for P, and a solved goal S such that G ⊢⊢∗P S. Then, SolC (S) ⊆ SolP (G). Proof As an obvious consequence of Theorem 4 (item 1.), one gets SolP (G′ ) ⊆ SolP (G) for any G′ such that G ⊢⊢P G′ . From this, an easy induction shows that SolP (S) ⊆ SolP (G) holds for each solved form S such that G ⊢⊢∗P S. Since SolP (S) = SolC (S), the soundness result is proved. Note that the local completeness part (item 2.) of Theorem 4 also implies that failing goals have no solution; i.e., from a failing transformation step G ⊢⊢RL,P  we can conclude W T SolP (G) = ∅, provided that the application of RL is safe. However, a global completeness result for CCLN C(C) does not immediately follow from item 2. of Theorem 4. For an arbitrarily given µ ∈ W T SolP (G), completeness needs to ensure a terminating CCLN C(C) computation ending up with a solved 60 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado form S such that µ ∈ W T SolC (S). According to Definition 10, µ ∈ W T SolP (G) implies the existence of a witness M : µ ∈ W T SolP (G). In Appendix A.2 we have defined a well-founded progress ordering ⊲ between pairs (G, M) formed by a goal G and a witness, and we have proved the following result: Lemma 6 (Progress Lemma) Consider an admissible goal G for a CF LP (C)-program P and a witness M : µ ∈ W T SolP (G). Assume that neither P nor G have free occurrences of higher-order variables, and that G is not in solved form. Then: 1. There is some RL applicable to G which is not a failing rule. 2. Assume any choice of a rule RL (not a failure rule) and a part γ of G, such that RL can be applied to γ in a safe manner. Then there is some finite ′ computation G ⊢⊢+ RL,γ,P G such that: • µ ∈ W T SolP (G′ ). • There is a witness M′ : µ ∈ W T SolP (G′ ) verifying (G, M) ⊲ (G′ , M′ ). Using the former lemma, we can prove the following completeness result: Theorem 6 (Limited Completeness Theorem) Let an admissible goal G for a program P and a well-typed solution µ ∈ W T SolP (G) be given. Assume that neither P nor G have free occurrences of higher-order variables. Then, unless prevented by some unsafe rule application, one can find a CCLN C(C)-computation G ⊢⊢∗P S ending with a goal in solved form S such that µ ∈ W T SolC (S). Proof The thesis of the theorem can be rephrased by writing µ ∈ W T SolP (S) in place of the equivalent condition µ ∈ W T SolC (S). The hypothesis allow us to choose a witness M : µ ∈ W T SolP (G). In order to prove the rephrased thesis we reason by induction on the well-founded ordering ⊲ (see e.g. (Baader and Nipkow 1998) for an explanation of this proof technique). In case that G is a solved goal, the rephrased thesis holds trivially with S taken as G itself. In case that G is not solved, we apply the Progress Lemma 6 to P and M : µ ∈ W T SolP (G) and we obtain a rule RL and a part γ of G such that RL can be applied to γ. Assuming that this rule application ′ is a safe one, Lemma 6 also provides a finite computation G ⊢⊢+ RL,γ,P G such that ′ ′ ′ ′ there is a witness M : µ ∈ W T SolP (G ) fulfilling (G, M) ⊲ (G , M ). Since neither P nor G have free occurrences of higher-order variables, the same must be true for G′ . By well-founded induction hypothesis we can then conclude that, unless prevented by some unsafe goal transformation step, one can find a computation G′ ⊢⊢∗P S ending with a goal in solved form S such that µ ∈ W T SolP (S). The ′ ∗ desired computation is then G ⊢⊢+ RL,γ,P G ⊢⊢P S. 4 Implementation This section sketches the implementation of the CCLN C(C) computational model on top of the T OY system. The current implementation has evolved from older On the Cooperation of the Constraint Domains H, R and F D in CF LP 61 versions that supported the domains H and R, but not yet F D and its cooperation with H and R. We describe the architectural components of the current T OY system and we briefly discuss the implementation of the main cooperation mechanisms provided by CCLN C(C), namely bridges and projections. The reader is referred to (Arenas et al. 2007; Estévez-Martı́n et al. 2006; Estévez-Martı́n et al. 2007; Estévez-Martı́n et al. 2008) for more details. Instead of using an abstract machine for running byte-code or intermediate code, T OY programs are compiled to and executed in Prolog, as in other related systems (Antoy and Hanus 2000). The compilation generates Prolog code that implements goal solving by constrained lazy narrowing guided by definitional trees, a well known device for ensuring an optimal behaviour of lazy narrowing (Loogen et al. 1993; Antoy et al. 1994; Antoy et al. 2000; del Vado-Vı́rseda 2003; del Vado-Vı́rseda 2005; del Vado-Vı́rseda 2007). T OY relies on an efficient Prolog system, SICStus Prolog (SICStus Prolog 2007), which provides many libraries, including constraint solvers for the domains F D and R. T OY is distributed (http://toy.sourceforge.net) as a free open-source Sourceforge project and runs on several platforms. Installation is quite simple. Console and windows executables are provided, no further software is required. In addition, T OY can be used inside ACIDE (Sáenz-Pérez 2007), an emerging multiplatform and configurable integrated development environment (alpha development status). 4.1 Architectural Components of the Cooperation Schema Fig. 4 shows the architectural components of the cooperation schema in T OY. As explained in Subsection 2.6, the three pure constraint domains H, R and F D are combined with a mediatorial domain M to yield the coordination domain C = M ⊕ H ⊕ F D ⊕ R which supports our cooperation model. Therefore, these four domains are supported by the implementation. Moreover, the set of primitives supported by the domains R and F D in the T OY implementation is wider than the simplified description given in subsections 2.4.3 and 2.4.4. TOY FD R H H Store SolverH SolverFD SolverR FD Store CLP(FD) R Store CLP(R) SICStus Prolog M M Store SolverM Fig. 4. Architectural Components of the Cooperation Schema in T OY The solvers and constraint stores for the domains F D and R are provided by the SICStus Prolog constraint libraries. The impedance mismatch problem among the 62 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado host language constraint primitives and these solvers is tackled by glue code (see Subsection 4.2). Proper F D− and R−constraints, as well as Herbrand constraints specific to F D and R (see Subsections 2.4.4 and 2.4.3) are posted to the respective stores and handled by the respective SICStus Prolog solvers. On the other hand, the stores and solvers for the domains H and M are built into the code of the T OY implementation, rather than being provided by the underlying SICStus Prolog system. 4.2 Implementing Domain Cooperation This subsection explains the implementation of the fundamental mechanisms for domain cooperation: Bridges and projections. The constraints provided by the mediatorial domain M and their semantics have been explained in Subsections 2.5 and 2.6. Mediatorial constraints have the general form a #== b →! c, with a ::int, b :: real and c :: bool, while bridges a #== b and antibridges a #/== b abbreviate a #== b →! true and a #== b →! false, respectively. In order to deal with H and M constraints, the T OY system uses a so-called mixed store which keeps a representation of the H and M stores as one single Prolog structure. It includes encodings of H-constraints in solved form (i.e., totality constraints X == X and disequality constraints X /= t), as well as encodings of bridges and antibridges. The implementation of the H and M solvers in T OY is plugged into the Prolog code of various predicates which control the transformation of the mixed store (passed as argument) by means of two auxiliary arguments Cin and Cout. In the next three subsections we discuss the implementation of mediatorial constraints and projections. We will show and comment selected fragments of Prolog code, involving various predicates with auxiliary arguments Cin and Cout, as explained above. Regarding projections, the T OY implementation has been designed to support two modes of use: A ‘disabled projections’ mode which allows to solve mediatorial constraints, but computes no projections; and a ‘enabled projections’ mode which also computes projections. For each particular problem, the user can analyze the trade-off between communication flow and performance gain and decide the best option to execute a goal in the context of a given program. 4.2.1 The Equivalence Primitive #== The equivalence primitive #== :: int → real → bool used for building mediatorial constraints is implemented as a Prolog predicate (also named #==) with five arguments, whose explanation follows. Arguments L and R stand for the left (integer) and right (real) parameters of the primitive #==. Argument Out stands for its result. Finally, arguments Cin and Cout stand for the state of the mixed store before and after performing a call to the primitive #==, respectively. Fig. 5 shows the Prolog code for the predicate #==, and the comments below explain why this code implements the M solver described in Table 2 of Subsection 2.6 and the special cooperation rules IE and ID of the CCLN C(C) calculus specified in Table 7 from Subsection 3.3. On the Cooperation of the Constraint Domains H, R and F D in CF LP 63 Lines (2) and (3) compute the head normal forms (hnfs) of L and R into HL and HR, respectively. This process may generate new Herbrand constraints that will be added to the mixed store. The value of HL resp. HR will be either a variable or a number, ensuring that no suspensions will occur in the Prolog code from line (4) on. This code is intended to process the constraint HL #== HR →! Out according to the behaviour of the M-solver specified in in Table 2, Subsection 2.6. Due to rules M1 and M2 in Table 2, the constraint is handled as a bridge HL #== HR when Out equals true, and as an antibridge HL #/== HR when Out equals false. For this reason, one can say that the #== primitive accepts reification. Indeed, in Fig. 5 we find that a bridge HL #== HR is posted to the mixed store if the value for Out can be unified with true (line (6)), whereas an antibridge HL #/== HR is posted if the value for Out can be unified with false (line (10)). (1) #==(L, R, Out, Cin, Cout):(2) hnf(L, HL, Cin, Cout1), (3) hnf(R, HR, Cout1, Cout2), (4) tolerance(Epsilon), (5) ( (Out=true, (6) Cout3 = [’#==’(HL,HR)|Cout2], (7) freeze(HL, {HL - Epsilon =< HR, HR =< HL + Epsilon} ), (8) freeze(HR, (HL is integer(round(HR))))); (9) (Out=false, (10) Cout3 = [’#/==’(HL,HR)|Cout2], (11) freeze(HL, (F is float(HL), {HR =\= F})), (12) freeze(HR, (0.0 is float_fractional_part(HR) -> (13) (I is integer(HR), HL #\= I); true)))), (14) cleanBridgeStore(Cout3,Cout). Fig. 5. Implementation of Mediatorial Constraints (#== / 2) Solving both bridges and antibridges is accomplished by using the concurrent predicate freeze, which suspends the evaluation of its second argument until the first one becomes ground. Solving a bridge HL #== HR amounts to impose the equivalence of its two arguments (variables or constants), which are of different type (integer and real), so that type casting is needed. Variable HL is assigned to the integer version of HR (line (8)) via the Prolog functions round and integer, implementing rule M3 in Table 2. Similarly, line (7) is roughly intended to assign the float version of HL to HR in order to implement rule M5 in Table 2. However, due to the imprecise nature of real solvers, occasionally HR’s value will be an approximation to an integer value. Therefore, line (7) actually constrains the real variable HR to take a value between HL - Epsilon and HL + Epsilon, where Epsilon (line (4)) is a user-defined parameter (zero by default) which introduces a tolerance and avoids undesirable failures due to inexact computations of integer values. Lines (7) and (8) also cover the implementation of rule M6 in Table 2. On the other hand, solving an antibridge HL #/== HR amounts to impose that both arguments are not equivalent. Therefore, as soon as HL or HR becomes bound to one numeric value, a disequality constraint between the (suitably type-casted) value of the bound variable and its mate argument is posted to the proper SICStus Prolog solver (lines 64 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 11-13). The code in these lines implements rule M8 in Table 2 and rule ID in Table 7. Moreover, the failure rules in Table 2 (namely M4, M7 and M9) are also implemented by the frozen goals in lines (7)-(8) and (11)-(13) of Fig. 5. Indeed, whenever HL and HR become bound, the corresponding frozen goal is triggered and the equivalence (resp. non-equivalence) is checked, which may yield to success or failure, thus implementing rules M7 and M9; and wherever HR becomes bound to a non integral real value, the frozen goal in line (8) yields failure, thus implementing rule M4. Finally, line (14)) invokes a predicate that simplifies the mixed store by implementing the effect of rule IE in Table 7 applied as much as possible to all the available (encodings of) bridges between variables. 4.2.2 Projection: F D to R If the user has enabled projections with the command /proj, the T OY system can process a given atomic primitive F D-constraint by computing bridges and projected R-constraints as explained in Subsection 3.3. The Prolog implementation has a different piece of code (Prolog clause) for each F D primitive which can be used to build projectable constraints. The information included in Table 5 for computing bridges and projections from different kinds of F D-constraints, as well as the effect of the goal transformation rules in Table 4, is plugged into these pieces of Prolog code. The code excerpt below shows the basic behaviour of the implementation for the case of F D-constraints built with the inequality primitive #<, without considering optimizations: (1) #<(L, R, Out, Cin, Cout):(2) hnf(L, HL, Cin, Cout1), hnf(R, HR, Cout1, Cout2), (3) ((Out=true, HL #< HR); (Out=false, HL #>= HR)), (4) (proj_active -> (5) (searchVarsR(HL, Cout2, Cout3, RHL), (6) searchVarsR(HR, Cout3, Cout, RHR), (7) ((Out==true, { RHL < RHR }); (8) (Out==false, { RHL >= RHR }))); (9) Cout=Cout2). Following a technique similar to that explained for #== above, the primitive #< is implemented by a Prolog predicate with five arguments (line (1)). Its two input arguments (L and R) are reduced to hnf (line (2)), and a primitive constraint is posted to the SICStus F D-solver, depending on the Boolean result (Out) returned by #< (line (3)). Moreover, if projection is active (indicated by the dynamic predicate proj active in line (4)), then, the predicate searchVarsR (lines (5-6)) inspects the mixed store looking for bridges relating the F D variable HL and HR to the R variables RHL and RHR, respectively. In case that some of these variables is bound to a numeric variable, the relation to the mate variable just means that their numeric values are equivalent. Predicate searchVarsR also creates new bridges if necessary, according to the specifications in Table 5, and returns the modified state of the mixed store in its third argument. Finally, the projected constraints computed as specified in Table 5 (in this case, a single constraint, which is either RHL < RHR or RHL >= RHR depending on the value of Out) are sent to the SICStus R-solver. On the Cooperation of the Constraint Domains H, R and F D in CF LP 65 4.2.3 Projection: R to F D If the user has enabled projections, the T OY system can also process a given atomic primitive R-constraint by computing bridges and projected F D-constraints as explained in Subsection 3.3. The Prolog implementation is similar to that discussed in the previous subsection, with a different piece of code (Prolog clause) for each R primitive which can be used to build projectable constraints, and encoding the information from Table 6. A comparison between Tables 5 and 6 shows that there are less opportunities for building bridges from R to F D than the other way round, but more opportunities for building projections. The code excerpt below shows the basic behaviour of the implementation for the case of R-constraints built with the inequality primitive >, ignoring optimizations: (1) >(L, R, Out, Cin, Cout):(2) hnf(L, HL, Cin, Cout1), hnf(R, HR, Cout1, Cout), (3) (Out = true, {HR > HL} ; Out = false, {HL =< HR}), (4) (proj_active -> (5) (searchVarsFD(HL, Cout, BL, FDHL), (6) searchVarsFD(HR, Cout, BR, FDHR), (7) ((BL == true, BR == true, Out == true, FDHL #> FDHR); (8) (BL == true, BR == true, Out == false, FDHL #=< FDHR); (9) (BL == true, BR == false, Out == true, FDHL #> FDHR); (10) (BL == true, BR == false, Out == false, FDHL #=< FDHR); (11) (BL == false, BR == true, Out == true, FDHL #> FDHR); (12) (BL == false, BR == true, Out == false, FDHL #=< FDHR); (13) true); true). As in the previous subsection, the primitive > is implemented by a Prolog predicate with five arguments (line (1)). Its two input arguments (L and R) are reduced to hnf (line (2)), and a primitive constraint is posted to the SICStus R-solver, depending on the Boolean result (Out) returned by > (line (3)). Moreover, if projection is active (line (4)), then predicate searchVarsFD (lines (5-6)) inspects the mixed store looking for bridges relating the R-variables HL and HR to F D-variables. As shown in Table 6, no new bridges can be created during this process. Therefore, in contrast to the predicate searchVarsR presented in the previous subsection, the third argument of predicate searchVarsFD does not represent a modified state of the mixed store. Instead, it is a Boolean value that indicates whether a bridge has been found or not. More precisely, in line (5) there are two possibilities: Either BL is true and HL is a non-bound R-variable related to the F D-variable FDHL by means of some bridge in the mixed store Cout; or else BL is false, HL is bound to a real value u, and FDHL is computed as ⌈u⌉. Analogously, in line (6) there are two possibilities: Either BR is true and HR is a non-bound R-variable related to the F D-variable FDHR by means of some bridge in the mixed store Cout; or else BR is false, HR is bound to a real value u, and FDHR is computed as ⌊u⌋. Finally, lines (7-12) perform a distinction of cases corresponding to all the possiblities for projecting the constraint HL > HR →! Out according to Table 6 and the various values of BL, BR and Out. In each case, the projected F D-constraint is posted to the SICStus F D-solver. 66 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado As a concrete example, when solving the conjunctive goal X #== RX, RX > 4.3, line (11) in the Prolog code for > just explained will eventually work for solving the right subgoal. In this case, viewing RX as HL and 4.3 as HR, the value computed for BL will be true because the bridge X #== RX will be available in the mixed store, and FDHL will be X. On the other hand, the value computed for BR will be false, and the value of FDHR will be computed as ⌊4.3⌋, i.e. 4. Applying the proper case in Table 6, the projected constraint X #> 4 will be posted to the SICStus F D-solver. 5 Performance Results In this section we study the performance of the systems T OY (Arenas et al. 2007; Estévez-Martı́n et al. 2008) and META-S (Frank et al. 2003a; Frank et al. 2003b; Frank et al. 2005), i.e., the closest related approach we are aware of, when solving various problems requiring domain cooperation. After presenting a set of benchmarks in the first subsections, the three following subsections deal with an analysis of the benchmarks in each of the two systems and an a comparison between both. 5.1 The Benchmarks We have selected a reasonably wide set of benchmarks which allows to analyze what happens when the set of constraints involved in the formulation of a programming problem is solved differently depending on the combination of domains that are involved in their solving. A concise description of the benchmarks is presented below. • Donald (donald): A cryptoarithmethic problem with 10 F D variables, one linear equation, and one alldifferent constraint. It consists of solving the equation DONALD + GERALD = ROBERT. • Send More Money (smm): Another cryptoarithmethic problem with 8 F D variables ranging over [0,9], one linear equation, 2 disequations and one alldifferent constraint. It consists of solving the equation SEND + MORE = MONEY. • Non-Linear Crypto-Arithmetic (nl-csp): A problem with 9 F D variables and non-linear equations. • Wrong-Wright (wwr): Another cryptoarithmethic problem with 8 F D variables ranging over [1,9], one linear equation, and one alldifferent constraint. It consists of solving the equation WRONG + WRONG = RIGHT. • 3 × 3 Magic Square (mag.sq.): A problem that involves 9 F D variables and 7 linear equations. • Equation 10 (eq.10): A system of 10 linear equations with 7 F D variables ranging over [0,10]. • Equation 20 (eq.20): A system of 20 linear equations with 7 F D variables ranging over [0,10]. • Knapsack (knapsack): A classical knapsack problem taken from (Hooker 2000). We considered two versions: One as a constraint satisfaction problem (labeled as csp) and another one as an optimization one (labeled as opt). On the Cooperation of the Constraint Domains H, R and F D in CF LP 67 • Electrical Circuit (circuit): A problem taken from (Hofstedt 2000a), in which one has an electric circuit with some connected resistors (i.e., R variables) and a set of capacitors (i.e., F D variables). The goal consists of knowing which capacitor has to be used so that the voltage reaches the 99% of the final voltage between a given time range. • bothIn (goal2): The problem of solving the goal presented as Goal 2 in Subsection 1.2 for several values of n. Instances goal2(n) of this benchmark correspond to solving an instance of Goal 2 for the corresponding n. • bothIn (goal3): The problem of solving the goal presented as Goal 3 in Subsection 1.2 for several values of n. Instances goal3(n) of this benchmark correspond to solving an instance of Goal 3 for the corresponding n. • Distribution (distrib). An optimized distribution problem involving the cooperation of the domains R and F D. The problem deals with a communication network where NR continuous and ND discrete suppliers of raw material have an attached cost to be minimized (see Appendix 8 in (Arenas et al. 2007)). The global optimum is computed. The various instances distrib(ND,NR) of this benchmark correspond to different choices of values for ND and NR. All the benchmarks were coded using F D variables and most of them demand the solving of (non-)linear equations. Only the last four of them strictly require cooperation between F D and R and cannot be solved by using just one of these domains. However, the rest of the benchmarks are also useful to evaluate the overhead introduced when the different solvers are enabled. The formulation of benchmarks nl-csp, mag.sq, circuit and smm was taken from the distribution of META-S. Full details and code of the benchmarks (written in both T OY and META-S) are available at http://www.lcc.uma.es/∼afdez/cflpfdr/. All the benchmarking process was done using the same Linux machine (under the professional version of Suse Linux 9.3) with an Intel Pentium M processor running at 1.70GHz and with a RAM memory of 1 GB. In the rest of this section, performance numbers, in milliseconds, have been computed as the average result of ten runs for each benchmark. In all tables, the best result obtained for each benchmark among those computed under the various configurations has been highlighted in boldface. 5.2 Benchmark Analysis in T OY In this section we briefly present empirical support for two claims: a) that the activation of the cooperation mechanism between F D and R does not penalize the execution time in problems which can be solved by using the domain F D; and b) that the cooperation mechanism using projections helps to speed-up the execution time in problems where both the domain F D and the domain R are needed. Tables 9-12 show the performance of each benchmark for several configurations of the T OY system, as explained below. The first column in each table displays the name of the benchmark to be solved, and the next columns corresponds to different activation modes of the T OY system, namely: • T OY(F D), an activation mode where the F D solver (but not the R solver) 68 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado is enabled. Actually, this corresponds to an older version of the T OY system which did not provide simultaneous support for R-constraints. • T OY(F D + R), an activation mode where both the F D solver and the R solver are enabled, but the projection mechanism is disabled. • T OY(F D + R)p , an activation mode where the F D solver, the R solver and the projection mechanism are all enabled. FD Constraint Solving T OY(FD) T OY(FD + R) T OY(FD + R)p BENCHMARK naı̈ve ff naı̈ve ff naı̈ve ff donald smm nl-csp wwr maq.sq. eq.10 eq.20 knapsack (csp) knapsack (opt) 1078 16 15 18 92 74 138 5 40 195 15 20 19 91 90 134 5 15 1040 14 15 18 89 74 139 5 35 188 16 18 19 89 81 131 5 15 7476 47 39 58 87 284 431 5 70 678 49 86 52 91 261 421 5 40 Table 9. Solving F D Benchmarks in T OY (First Solution Search). Overload evaluation. The heading ‘F D Constraint Solving’ in Table 9 indicates that all the benchmarks have been formulated in such a way that all the constraints needed to solve them are submitted to the F D solver and the R solver is not invoked. Note that although the activation mode T OY(F D) is sufficient to execute all the benchmarks presented in this table, the benchmarks have been also executed in the modes T OY(F D + R) and T OY(F D + R)p with the aim of analyzing the overhead caused by the activation of these more complex modes when solving problems that do not need them. The heading ‘F D ∼ R Constraint Solving’ in Tables 10-12 indicates that the formulations of the benchmarks require both the F D solver and the R solver to be enabled; more precisely, although the benchmarks shown in Table 10 admit a natural formulation that can be totally solved by the F D solver, we have used an alternative formulation in which the (non-)linear constraints were submitted to the R solver, whereas the rest of the constraints were sent to the F D solver; also solving the benchmarks shown in Tables 11 and 12 strictly requires cooperation between F D and R. These tables only consider the two activation modes of the T OY system which make sense for such benchmarks, namely T OY(F D + R) and T OY(F D + R)p . Tables 9-12 also include two columns corresponding to two different labeling On the Cooperation of the Constraint Domains H, R and F D in CF LP 69 strategies: naı̈ve, in which F D variables are labeled in a prefix order (i.e., the leftmost variable is selected); and first fail (ff ), in which the F D variable with the smallest domain is chosen first for enumerating. Combined with the distinct activation modes, this yields a number of configurations (i.e., six in Table 9 and four in the rest). FD ∼ R Constraint Solving T OY(FD + R) T OY(FD + R)p BENCHMARK naı̈ve ff naı̈ve ff donald smm nl-csp wwr maq.sq. eq.10 eq.20 knapsack (csp) knapsack (opt) 304970 22528 411 411 166 266 402 5 16 288700 22627 383 420 168 271 408 5 15 8305 41 44 54 158 290 433 5 11 727 40 87 58 163 269 397 5 14 Table 10. Solving F D ∼ R Benchmarks in T OY (First Solution Search). Evaluation of the constraint projection mechanism. Inspection of Table 9 reveals that the performance of all the benchmarks does not get worse when moving from T OY(F D) to T OY(F D + R) and T OY(F D + R)p , and it even improves in some cases. For those benchmarks that are most naturally coded in the domain F D (as, for instance, smm, wwr and mag.sq) the best results are not those obtained in T OY(F D + R)p , but even in such cases the appreciable overload is not a great one. Inspection of Tables 10 and 11 reveals that the projection mechanism causes a significant speed-up of the solving process in most cases. Note that this mechanism behaves specially well in solving the goal2(n) and goal3(n) benchmarks, where the running time is stabilized in the range between 11 ms and 17 ms when projections are enabled. Significant speed-ups (i.e., at least two or more magnitude orders) are also detected in donald and smm benchmarks as well as in the different distrib benchmark instances. Finally, Table 12 presents the results corresponding to computing all the results for the last five benchmarks in Table 11. The execution times are naturally higher than those shown in Table 11, where only first solutions were computed. However, the significant speed-up caused by the activation of projections remains clearly observable. 70 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado FD ∼ R Constraint Solving T OY(FD + R) BENCHMARK circuit distrib (2,5.0) distrib (3,3.0) distrib (3,4.0) distrib (4,5.0) distrib (5,2.0) distrib (5,5.0) distrib (5,10.0) goal2 (100) goal2 (200) goal2 (400) goal2 (800) goal2 (10000) goal2 (20000) goal2 (40000) goal2 (80000) goal2 (200000) goal3 (100) goal3 (200) goal3 (400) goal3 (800) goal3 (5000) T OY(FD + R)p naı̈ve ff naı̈ve ff 14 662 1486 2098 20444 29108 141734 568665 25 40 70 131 704 1271 2325 4452 10725 18 26 41 75 354 13 506 810 1290 12670 5162 85856 464230 28 44 72 135 713 1270 2333 4472 10781 20 28 44 77 360 14 144 132 156 240 198 272 474 14 13 12 12 14 12 11 13 13 15 13 15 16 14 20 504 814 1178 12744 7340 86497 462980 14 15 13 15 16 16 16 16 15 16 13 16 17 16 Table 11. Solving F D ∼ R Benchmarks in T OY (First Solution Search). Evaluation of the constraint projection mechanism on benchmarks necessarily demanding solver cooperation. 5.3 Benchmark Analysis in META-S In this subsection, we present the results of executing benchmarks in META-S, a flexible meta-solver framework that implements the ideas proposed in (Hofstedt 2001; Hofstedt and Pepper 2007) for the dynamic integration of external stand-alone solvers to enable the collaborative processing of constraints. As already mentioned in Sections 1 and 3, the cooperative framework underlying META-S bears some analogies with the approach described in this paper. Both META-S and T OY provide means for different numeric constraints domains to cooperate. T OY supports cooperation between the domains H, F D and R, while META-S connects several kind of solvers, such as: • A F D solver (for floats, strings, and rationals) that was implemented in Common Lisp using as reference a library of routines for solving binary con- On the Cooperation of the Constraint Domains H, R and F D in CF LP 71 FD ∼ R Constraint Solving T OY(FD + R) BENCHMARK goal3 goal3 goal3 goal3 goal3 (100) (200) (400) (800) (5000) T OY(FD + R)p naı̈ve ff naı̈ve ff 673 1867 6527 24460 911880 625 1844 6573 24727 920670 265 329 583 976 5365 242 352 579 994 6135 Table 12. Solving goal3(n) Benchmarks in T OY (All Solutions Search). straint satisfaction problems provided by Peter van Beek and available from http://www.ai.uwaterloo.ca/∼vanbeek/software/csplib.tar.gz. • A solver for linear arithmetic, i.e., the constraint solver LINAR described in (Krzikalla 1997). This solver is based on the Simplex algorithm and was implemented in the language C. It handles linear equations, inequalities, and disequations over rational numbers. • An interval arithmetic solver, that uses the sound math library (available at http://interval.sourceforge.net/interval/index.html), an ANSI C library implemented on the basis of the solver for interval arithmetic of Timothy J. Hickey from Brandeis University (available from http://www.cs.brandeis.edu/∼tim/). The interested reader is referred to (Frank and Mai 2002) for more details on the META-S solvers. There are also some other significant differences between both systems. META-S is implemented in Common Lisp whereas T OY is implemented in Prolog. In contrast to T OY, META-S does not support different activation modes (corresponding to T OY(F D), T OY(F D + R) and T OY(F D + R)p in T OY), neither explicit labeling strategies, nor facilities for optimization. On the other hand, META-S supports the choice of different constraint solving strategies (Frank et al. 2007), which is not the case in T OY. More details regarding the comparison between T OY and META-S can be found in Subsection 5.4. We have investigated the performance of META-S in solving the benchmarks already considered for T OY in the previous section and the performance results are shown in Tables 13-14. The organization of rows and columns is also similar to the T OY tables (but considering the two different strategies explained below). The occurrences of the symbol ‘−’ indicate that the corresponding benchmark (namely, the knapsack optimization and the distribution problem) could not be executed because the META-S system provides no optimization facilities; the term ‘error’ corresponds with a failure returned by the system, that was not able to solve the goal. We have used the version 1.0 of META-S (kindly provided by its implementors 72 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado on our request) compiled using SuSE Linux version 9.3 (professional version), based on CMU Common Lisp 18d. META-S eager heuristic BENCHMARK standard ordered standard ordered donald smm nl-csp wwr maq.sq. eq.10 eq.20 knapsack (csp) knapsack (opt) distrib (2,5.0) distrib (3,3.0) distrib (3,4.0) distrib (4,5.0) distrib (5,2.0) distrib (5,5.0) distrib (5,10.0) circuit goal2 (100) goal2 (200) goal2 (400) goal2 (800) goal3 (100) goal3 (200) goal3 (400) goal3 (800) 268510 950 344800 10930 1160 60 60 60 70 330 730 2340 8550 410 900 2870 10630 469370 620 1230 650 1220 60 60 60 70 330 740 2340 8540 410 900 2880 10720 5290 590 302314 620 520 70 70 70 70 330 740 2340 8560 460 1080 3520 13140 6140 580 970 620 540 70 70 70 70 330 740 2350 8560 460 1080 3540 13370 Table 13. Solving the Benchmarks in META-S (First Solution Search). For the META-S benchmarks we have utilized the combination of the F D solver (usually for rationals) and an arithmetic solver which was found analogous to the F D plus R combination used in the corresponding T OY benchmark. In fact, for META-S, we have selected the linear arithmetic solver since the interval arithmetic solver yielded poorer results in all cases. In addition, we have considered the best problem formulation (in terms of the target solver for each constraint) that yielded the best running time. Moreover, we have executed each META-S benchmark under four different constraint solving strategies: • Standard eager, in which all constraint information is propagated as early as possible. On the Cooperation of the Constraint Domains H, R and F D in CF LP 73 • Ordered eager, working as the previous one complemented with user-given information for determining the order of projection operations. • Standard heuristic, working as the standard eager strategy complemented with an heuristic for giving priority to those variable bindings more likely to lead to failure. • Ordered heuristic, working as the previous one complemented with user-given information for determining the order of projection operations. In certain form, naı̈ve and ff labeling in T OY are similar, respectively, to eager and heuristic strategies in META-S. For the sake of a fair comparison, whenever possible we have encoded the META-S benchmarks using exactly the same problem formulations as well as the same constraints that were used in the corresponding T OY benchmarks. Benchmarks were coded using the functional logic language FCLL of META-S. Also, we took care that the variable orders were identical for the different resolution/labeling strategies in both systems. META-S eager BENCHMARK goal3 goal3 goal3 goal3 (100) (200) (400) (800) heuristic standard ordered standard ordered 8930 60700 453330 error 8880 60870 459980 error 6940 47190 346930 error 6940 46880 348900 error Table 14. Solving goal3(n) Benchmarks in META-S (All Solutions Search). Note that the META-S benchmarks shown in Table 13 (resp. Table 14) correspond to the T OY benchmarks in Tables 9-11 (resp. Table 12), all of which refer to first solution search (resp. all solutions search). 5.4 T OY versus META-S The tables displayed in this subsection are intended to compare the performance of T OY and META-S. Table 15 compares the behaviour of both systems when computing the first solution of various benchmarks, while the results in Table 16 correspond to the computation of all the solutions for a few instances of the benchmark goal3(n). More precisely, the execution times and META-S/T OY rates displayed in Table 15 correspond to the best results for each benchmark under those obtained for the various configurations in Tables 10-11 and 13, respectively; while Table 16 has been built from the information displayed in Tables 12 and 14 in a similar way. 74 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado SYSTEM donald smm nl-csp wwr maq.sq. eq.10 eq.20 knapsack (csp) knapsack (opt) circuit goal2 (100) goal2 (200) goal2 (400) goal2 (800) goal3 (100) goal3 (200) goal3 (400) goal3 (800) T OY META-S META-S/T OY 188 14 15 18 87 74 131 5 11 13 14 13 12 12 15 13 15 16 5290 580 970 620 520 60 60 60 70 330 730 2340 8540 410 900 2870 10630 28.13 41.42 64.66 34.44 5.97 0.81 0.45 12 5.38 23.57 56.15 195.00 711.66 27.33 69.23 191.33 664.375 Table 15. Solving Benchmarks in T OY vs. META-S (First Solution Search) The analogies and differences between the domain cooperation mechanisms supported by T OY and META-S have been discussed at the end of Subsection 3.3. In both cases, projections play a key role, and the information displayed on Tables 15 and 16 allows mainly to draw conclusions on the computational performance of both systems. META-S seems to behave particularly well in the solving of linear equations, especially when the problem requires no global constraints (such as an alldifferent constraint used in benchmarks eq10 and eq20). The reason maybe two-fold: First, that the linear arithmetic solver of META-S performs better than its F D solver, and, second, that flattening a nested constraint in T OY generates as many flat constraints as the number of operators it includes. However, in general, T OY shows an improvement of about one order of magnitude with respect to the META-S system, for the benchmarks used in our comparison. As an extreme case, the computation time for obtaining the first solution of the benchmark goal3(800) increases more than three orders of magnitude with respect to T OY, and computing all the solutions for this benchmark in META-S does not succeed. In certain form, the experimental results suggest that our proposal is not only promising but also interesting in its current state. In any case, the ‘superior’ performance of T OY with respect to META-S has to be interpreted carefully. One reason for T OY’s advantage may be that the numerical solvers connected in the current version of META-S have been implemented just to experiment with the concepts of the underlying theoretical framework described in (Hofstedt 2001; Hofstedt and Pepper 2007), without much concern for optimization, while T OY relies on the optimized solvers provided by SICStus Pro- On the Cooperation of the Constraint Domains H, R and F D in CF LP SYSTEM goal3 goal3 goal3 goal3 (100) (200) (400) (800) T OY META-S META-S/T OY 242 329 579 976 6940 46880 346930 error 28.67 142.49 599.18 - 75 Table 16. Solving goal3(n) in T OY vs. META-S (All Solutions Search) log. Another advantage of T OY is the availability of global constraints such as alldifferent, that are lacking in META-S. Admittedly, a better comparison of the performance results in both systems would be obtained by comparing independently the integrated solvers in each of the systems, and then normalizing the global results for the systems; or alternatively, by connecting the same solvers to both systems. This would be possible if all the integrated solvers were effectively black-boxes that can be unplugged from the systems. Unfortunately, this is not the case, as the solvers attached to T OY are used as provided by SICStus Prolog and they were not internally adjusted to work in a cooperation system, whereas the solvers used in META-S were implemented with regard to their integration into the implementation of META-S as a system with cooperating components. In favor of META-S, we mention that the cooperation model proposed in METAS seems to be more flexible than the cooperation model currently implemented in T OY, and provides facilities not yet available in T OY. For instance, META-S allows to integrate and/or redefine evaluation strategies (Frank et al. 2003b) whereas T OY relies on a fixed strategy for goal solving and constraint evaluation. Also, the projection mechanism currently implemented in T OY is less powerful than in META-S, because projections cannot be applied to the constraints inside the constraint stores. Finally, META-S enables the integration of different host languages (Frank et al. 2005), whereas the CCLN C(C) goal solving calculus implemented in T OY is intended for declarative languages fitting the CF LP scheme. 6 Related Work In this section, in addition to already mentioned related works, we extend the discussion to other proposals developed in the area of cooperative constraint solving. Of course, the issues of communication and cooperation are relevant to many aspects of computation. Here, we discuss a selection of the literature concerning proposals for communication and cooperation in constraint and declarative programming. Existing cooperative systems are very diverse and range from domain combinations to a mix of distinct techniques for solving constraints over the same domain. Moreover, the cooperating systems may be very different in nature: Some of them perform complete constraint solving whereas others just execute basic forms of propagation. In general, depending on the nature of the cooperation, we catalogue cooperative constraint solving in four non-disjoint categories: 76 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 1. Cooperation of (built-in) domains coexisting in the same system. 2. Interchange of information between different solvers/domains via special constructs. 3. Interoperability or communication between independent solvers. 4. Combination or integration of entities with distinct nature (i.e., methods and/or solvers based on different algorithms, or languages with different resolution mechanisms). In the following four subsections we discuss some of the relevant work done in each of these categories, as well as their relation to our own approach. 6.1 Cooperation of (Built-In) Domains Coexisting in the Same System There are a number of constraint systems that provide support for the interaction between built-in and predefined domains. In these systems, a solver is viewed as a device that transforms the original set of constraints to an equivalent reduced set. As examples, we can cite the following systems: • CLP(BNR) (Benhamou and Older 1997), Prolog III (Colmerauer 1990) and Prolog IV (N’Dong 1997) allow solver cooperation, mainly limited to booleans, reals and naturals (as well as term structures such as lists and trees). • The language NCL (Zhou 2000) provides an integrated constraint framework that strongly combines boolean logic, integer constraints and set reasoning. Currently, NCL also integrates efficient CP domain cutting techniques and OR algorithms. Most existing systems of this kind have two main problems: firstly, the cooperation is restricted to a limited set of computation domains supported by the system; and secondly, the cooperation mechanism is very dependant on the involved computation domains and thus presents difficulties to be generalized to other computation domains. Our computational model for the cooperation of the domains H, F D and R and its current T OY implementation can be catalogued in this category, and insofar it shares the two limitations just mentioned. However, our approach is more general because it is based on a generic scheme for CF LP programming over a parametrically given coordination domain C. The cooperative goal solving calculus CLN C(C) presented in Section 3 refers to the particular coordination domain C = M ⊕ H ⊕ F D ⊕ R, but it can be easily extended to other coordination domains, as sketched in our previous paper (Estévez-Martı́n et al. 2007). 6.2 Interchange of Information between Computation Domains and/or Solvers via Special Constructs Another cooperation technique consists of providing special built-in constructs designed to propagate information among different computation domains that coexist in the same system. For example, this is the case with the reified constraints that enable a communication between arithmetic computations and a Boolean domain. On the Cooperation of the Constraint Domains H, R and F D in CF LP 77 Within this type of cooperation we can cite Conjunto (Gervet 1997), a constraint language for propagating interval constraints defined over finite sets of integers. This language provides so-called graduated constraints which map sets onto arithmetic terms, thus allowing a one-way cooperative channel from the set domain to the integer domain. Graduated constraints can be used in a number of applications as, for instance, to handle optimization problems by applying a cost function to quantifiable terms (i.e., arithmetic terms which are associated to set terms). Also, a generic framework for defining and solving interval constraints on any set of domains (finite or infinite) with a lattice structure is formulated in (Fernández and Hill 2004; Fernández and Hill 2006). This approach also belongs to the cooperation category described in Subsection 6.1. It enables the construction of new (compound) constraint solvers from existing solvers using lattice combinators, so that different solvers (possibly on distinct domains) can communicate and cooperate in solving a problem. The clp(L) language presented in (Fernández and Hill 2004) is a prototype implementation of this framework and allows information to be transmitted among different (possibly user-defined) computation domains. Our proposal in this paper can be also considered to fit into the special constructs category, by viewing bridge constraints as channels that enable the propagation of information between different computation domains. 6.3 Interoperability A number of recent publications deal with approaches to solver cooperation requiring interoperability, understood as the behaviour of some coordinating system that supports communication between several autonomous systems. In such settings, cooperation relies on suitable interfaces, which have to be specified and implemented according to the specific formats required by the various domains and solvers. For instance, (Goualard 2001) proposes a C++ constraint solving library called aLiX for communicating between different solvers, possibly written in different languages. Two of the main aims of aLiX are to permit the transparent communication of solvers and ensure type safety, that is to say, the capacity to prevent a priori the connection of a solver that does not conform to the input format of the interface with another solver. The current version of aLiX is not mature yet, although its interoperability approach offers interesting possibilities. One of the main shortcomings of the current aLiX version is that a component for solving continuous constraints is not yet integrated into the system, and thus real constraints cannot be processed. In the same spirit, many constraint systems provide both a linear and a non-linear solver for the real domain. As the linear solver is more efficient of the two, it should be used whenever the constraints are linear, and there is a need for communication between the two real solvers. As an example, (Monfroy et al. 1995) describes a client/server architecture to enable communication between the component solvers. This consists of managers for the system and the solvers that must be defined on the same computational domain (the real numbers, for example) but with different classes of admissible constraints (i.e., linear and non-linear constraints). The 78 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado constraint logic programming (CLP) system CoSAc is an implementation of this architecture. A built-in platform permits the integration and connection of the components. The exchange of information is managed by means of pipes and the exchanged data are character strings. One of the main drawbacks of this system is the lack of type safety. Moreover, the cooperation happens at a fixed level that prevents the communication of solvers in a transparent way, since the solvers cannot obtain additional information from the structure of the internal constraint store. As already discussed at the end of Subsection 3.3, the current T OY implementation of our cooperative computation model suffers from a similar limitation, preventing the constraints already placed into the F D and R stores to be projected. This issue should be addressed in future improvements of our system. As CoSAc does not permit solver combination, Monfroy designed a domain independent environment for solver collaboration, and he used this concept in order to unify solver cooperation and combination. Basically, solver cooperation means the use of several solvers with data exchange between them, whereas solver combination is understood as the construction of new solvers from other previously defined solvers. In his PhD thesis (Monfroy 1996), Monfroy developed the system BALI (Binding Architecture for Solver Integration) that facilitates the integration of heterogeneous solvers as well as the specification of solver cooperation via a number of cooperation primitives. Monfroy’s approach assumes that all the solvers work over a common store, while our own proposal requires communication among different stores. Monfroy also designed SoleX (Monfroy and Ringeissen 1999), a domainindependent scheme for constraint solver extension. This schema consists of a set of rules for transforming constraints that cannot be managed by a solver into constraints that can be treated by that solver, thus extending the range of solvable constraints. Unfortunately, as commented in (Monfroy 1996) (page 195), SoleX and BALI were not integrated. Such an integration could lead to a framework including both solver collaboration and solver extension. The interoperability category also includes a line of research dealing with the development of coordination languages, aiming at the specification of cooperation between solvers. There exist several proposals whose main goal is to study the use of control languages to specify elementary constraint solvers as well as the collaboration of solvers in a uniform and flexible way. For instance, (Arbab and Monfroy 1998) proposes to use the coordination language MANIFOLD for improving the constraint solver collaboration language of BALI. More recent works such as (Monfroy and Castro 2004; Castro and Monfroy 2004) aim at providing means of designing strategies that are more complex than simple master-slave approaches. Basically, Castro and Monfroy propose an asynchronous language composed of interaction components that control external agents (in particular solvers) by managing the data flow. A software framework for constructing distributed constraint solvers, implemented in the coordination language MANIFOLD, has been described in (Zoeteweij 2003). A different point of view regarding solver cooperation is analyzed in (Pajot and Monfroy 2003), where a paradigm to enable the user to separate computation strategies from the search phases is presented. On the Cooperation of the Constraint Domains H, R and F D in CF LP 79 Also it is worth mentioning the project COCONUT 1 whose goal was to integrate techniques from mathematical programming, constraint programming and interval analysis (and thus it can also be catalogued in the category of cooperation via techniques combination as described in Section 6.4). A modular solver environment, that can be extended with open-source and commercial solvers, was provided for nonlinear continuous global optimization. This framework was also designed for distributed computing and has a strategy engine that can be programmed using a specific interpreted language based on Python. Mircea Marin has developed in his PhD thesis (Marin 2000) a CF LP scheme that combines Monfroy’s approach to solver cooperation (Monfroy 1996) with a higherorder lazy narrowing calculus somewhat similar to (López-Fraguas et al. 2004) and the goal solving calculus presented in Section 3 of this paper. In this setting, Monfroy’s ideas are used to provide various primitives for solver combination, and the CF LP scheme allows to embed the resulting solvers into a Functional and Logic Programming language. In contrast to our proposal, Marin’s approach allows for higher-order unification, which leads both to greater expressivity and to less efficient implementations. Another difference w.r.t. our approach is the intended application domain. The instance of CF LP implemented by Marin and others (Marin et al. 2001) combines four solvers over a constraint domain for algebraic symbolic computation. This line of research has been continued in works such as (Kobayashi et al. 2001; Kobayashi et al. 2002; Kobayashi et al. 2003; Kobayashi 2003). These papers describe a collaborative CF LP system, called Open CF LP , which solves symbolic constraints by collaboration between distributed constraint solvers in an open environment such as Internet. The solvers act as providers of constraint solving services, and Open CF LP is able to use them without knowing their location and implementation details. The common communication infrastructure (i.e., the protocol) and the specification language were implemented using CORBA and MathML respectively. Another recent proposal for the combination of solvers in a declarative programming language can be found in (de la Banda et al. 2001). This paper deals with the construction of solvers in the HAL system, which supports the extension of existing solvers and the construction of hybrid ones. HAL provides semi-optional type, mode and determinism declarations for predicates and functions as well as a system of type classes over which constraint solvers’ capabilities are specified. In particular, HAL type classes can require that the types belonging to them must have a suitable associated constraint solver. A quite general scheme for solver cooperation fitting the interoperability category has been proposed by Hofstedt et al. in (Hofstedt 2000a; Hofstedt 2000b; Hofstedt 2001; Hofstedt and Pepper 2007). Here, constraint domains are formalized by using Σ-structures in a sorted language, constraints are modeled as n-ary relations, and cooperation of solvers is achieved by two mechanisms: Constraint propagation, that submits a constraint belonging to its corresponding store; and projec- 1 See http://www.mat.univie.ac.at/ neum/glopt/coconut/ 80 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado tion of constraint stores, that consults the contents of a given store SD and deduces constraints for another domain. Relying on these mechanisms, different constraint solvers (possibly working over different domains, and implemented in various languages) can be used as components of an overall system, whose architecture provides a uniform interface for constraint solvers which allows a fine-grain formal specification of information exchange between them. This approach has been implemented in the system META-S (Frank et al. 2003a; Frank et al. 2003b; Frank et al. 2005), that supports the dynamic integration of arbitrary external (stand-alone) solvers to enable the collaborative processing of constraints. Some analogies and differences between this approach and our own have been discussed already at several places of this paper; see the Introduction, and sections 3.3 and 5. As a more theoretical line of work related to the interoperability category, there are a number of formal approaches to the combination of constraint solvers on domains modeled as algebraic structures. This kind of research stems from a seminal paper by Nelson and Oppen (Nelson and Oppen 1979). More recent relevant work includes several papers by Baader and Schulz. For instance, (Baader and Schulz 1995) provides an abstract framework to combine constraint languages and constraint solvers and focuses on ways in which different and independently defined solvers may be combined. This paper does not really deal with the constraint cooperation mechanism, but it focuses in defining algebraic properties needed for the combination of constraint languages and solvers. Later on, (Baader and Schulz 1998) generalized a proposal from a previous paper (Baader and Schulz 1996) and presented a general method for the combination of constraint systems, which is is applicable to so-called quasi-structures. This general notion comprises various instances, such as (quotient) term algebras, rational trees, lists, sets, etc. The methods proposed in (Baader and Schulz 1996; Baader and Schulz 1998) can be seen as extensions of previous approaches to the combination of unification algorithms for equational theories, viewing them as instances of constraint solvers (Kirchner and Ringeissen 1992; Kirchner and Ringeissen 1994). As pointed out in (Kepser and Richts 1999), a weak point of these approaches is the lack of practical use. Our proposal can clearly be catalogued in the interoperability category, because it aims at the cooperation of several constraint domains equipped with their respective solvers. Our main communication mechanism, namely bridges, has the advantage of syntactic simplicity, while being compatible with the static type systems used by many declarative languages. Moreover, our notion of coordination domain allows us to use a generic scheme for CF LP programming as a formal foundation. 6.4 Combining Methods and/or Solvers based on Different Algorithms One popular approach to cooperation consists of combining solvers or methods based on different algorithms. In this category we include the integration of different paradigms in one language. In the following, we provide a (non-exhaustive) list of proposals of this kind. For instance, one of the initial forms of cooperating constraint solving consisted of using different problem solvers (viewed as algorithms) to work individ- On the Cooperation of the Constraint Domains H, R and F D in CF LP 81 ually over different sub-parts of an overall problem. This was the approach used in (Durfee et al. 1989) in order to integrate within a network a number of individual solvers intended to work over different parts of a problem. In a similar way, (Khedro and Genesereth 1994) proposed a multi-agent model where each agent acts independently to solve a distributed set of constraints that constitutes a distributed constraint satisfaction problem. The paper (Hong 1994) also studied the confluence of solvers to solve a common problem, suggesting to manage a set of algorithms each of which should be repeatedly applied on the problem until reaching a stable form. Within the area of Constraint Programming, (Benhamou 1996) described a unified framework for heterogeneous constraint solving. Here, the cooperation comes from the combination of different algorithms, possibly defined over distinct structures. The main idea is to represent the solvers as constraint narrowing operators (CNO) that are closure operators, and to use a generalized notion of arc-consistency. Conditions on the CNOs needed to ensure the main properties of the principal algorithm are identified. Solver communication involving shared common variables and sending and receiving information to each other is described. The paper also gives a fixed point semantics to describe the cooperation process. One of the main drawbacks of this proposal is that termination of the central algorithm relies on the finiteness of an approximate domain A built as a subset of the powerdomain ℘(D) of the domain D under consideration, including D among its members and closed under intersection. For instance, termination cannot be guaranteed in case that D is the domain of sets of real numbers, which is useful for dealing with real interval constraints. In relation to the problem of solving real constraints, (Benhamou et al. 1999) has proposed the combination of hull consistency and box consistency with the objective of reducing the computation time achieved by using box consistency alone. This idea was reflected in DecLic (Benhamou et al. 1997; Goualard et al. 1999), a CLP language that mixes boolean, integer and real constraints in the framework of intervals. This system was shown to be fairly efficient on classical benchmarks but at the expense of decreasing the declarativity of the language as a consequence of allowing the programmer to choose the best kind of consistency to use for each constraint. The combination of interval techniques for solving non-linear systems is also tackled in (Granvilliers 2001), Granvilliers describes a cooperative strategy to combine the interval-based local consistencies methods (i.e., box and hull consistency) with the multi-dimensional interval Newton method and shows the efficiency of the main algorithm. Another proposal for developing a cooperation technique for solving large scale combinatorial optimization problems was described in (Castro et al. 2004). This paper introduces a framework for designing cooperative strategies, describing a scheme for the sequential cooperation between Forward Checking and Hill-Climbing. A set of benchmarks for the Capacity Vehicle Routing Problem shows the advantages of using this framework, that always outperforms a single solver. The combination of linear programming solvers and interval solvers has also 82 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado been specially fertile in the last decades (Marti and Rueher 1995). Many of the cooperating systems resulting from this combination have been implemented as (prototype) declarative systems, as e.g., ICE (Beringer and Backer 1995), Prolog IV (N’Dong 1997), CIAL (Chiu and Lee 2002) and CCC (Rueher and Solnon 1997), among others. The integration of mathematical programming techniques in the CLP scheme (van Hoeve 2000) may be considered another form of cooperation that has been treated extensively in the literature; see e.g. the integration of Mixed Integer programming and CLP (Rodosěk et al. 1997; Harjunkoski et al. 2000; Thorsteinsson 2001), the combination of CLP and Integer Programming (Bockmayr and Kasper 2000) and the combination of CLP and Linear Programming (Vandecasteele and Rodosěk 1998), among others. The domain cooperation framework presented in this paper is quite generic, and its current implementation in T OY relies on the availability of black box solvers provided by SICStus Prolog (SICStus Prolog 2007). Therefore, it cannot be catalogued into the cooperation category considered in this subsection, which is very specific and relies on a detailed control of the techniques and solvers involved. Nevertheless, the work described in this subsection points to combination techniques which lead to improved performance and may be useful for future implementations of our approach. 7 Conclusions and Future Work The work presented in this paper is aimed as a contribution to the efficient use of constraint domains and solvers in declarative languages and systems. We have investigated foundational and practical issues concerning a computational framework for the cooperation of constraint domains in Constraint Functional Logic Programming, using constraint projection guided by bridge constraints as the main cooperation tool. Taking a generic scheme as a formal basis, we have focused on a particular case of practical importance, namely the cooperation among the symbolic Herbrand domain H and the two numeric domains R and F D. The relation to our previous related work and some pointers to related work by other researchers have been presented in Section 1, and a more detailed discussion of the state-of-the-art concerning cooperation of constraint domains can be found in Section 6. In the rest of this section we give a summary of the main results presented in the other sections of the paper, followed by some considerations concerning current limitations and possible lines of future work. 7.1 Summary of Main Results Our results include a formal computation model for cooperative goal solving in Constraint Functional Logic Programming, the development of an implemented system, and experimental evidence on the implementation’s performance and its comparison with the closest related system we are aware of. More precisely: • In Section 2 we have presented a formal framework for the cooperation of constraint domains in an improved version of an already existing CF LP scheme On the Cooperation of the Constraint Domains H, R and F D in CF LP 83 for Constraint Functional Logic Programming. We have formalized a notion of constraint solver suitable for CF LP programming, as well as a mathematical construction of coordination domains, a special kind of hybrid domains built as a combination of several pure domains intended to cooperate. In addition to the facilities provided by their components, coordination domains supply special primitives for building bridge constraints to allow communication between different component domains. As particular case of practical interest, we have formalized a coordination domain C = M ⊕ H ⊕ F D ⊕ R tailored to the cooperation of three useful pure domains: the Herbrand domain H which supplies equality and disequality constraints over symbolic terms, the domain R which supplies arithmetic constraints over real numbers, and the domain F D which supplies finite domain constraints over integer numbers. Practical applications involving more that one of these pure domains can be naturally treated within the CF LP (C) instance of the CF LP scheme. From a programmer’s viewpoint, the domain H supports generic equality and disequality constraints over arbitrary user defined datatypes, while R and F D provide more specific numeric constraints. • Section 3 presents a formal calculus for cooperative goal solving in CF LP (C). The main programming features available to CF LP (C) programmers include a Milner’s like polymorphic type system, lazy and possibly higher-order functions, predicates, and the cooperation of the three domains witihin C. The goal solving calculus is presented as a set of goal transformation rules for reducing initial goals into solved forms. There are rules that use lazy narrowing to process program defined function calls in a demand-driven way, domain cooperation rules dealing among other things with bridges and projections, and constraint solving rules to invoke the solvers of the various pure domains involved in the cooperation. The section concludes with theoretical results ensuring soundness and completeness of the goal solving calculus, where completeness is guaranteed for well-typed solutions as far as permitted by the completeness of the underlying solvers and some other more technical requirements. • Section 4 presents the implementation of the cooperative goal solving calculus for CF LP (C) in a state-of-the-art declarative programming system. In addition to describing general aspects such as the software architecture, we have focused on the implementation of domain cooperation mechanisms, illustrating the correspondence between code generation in the implemented system and the goal transformation rules for cooperation formalized in the previous section. • Section 5 is devoted to performance analysis by means of a set of benchmarks. The experimental results obtained lead us to several conclusions. Firstly, we conclude that the activation of the domain cooperation mechanisms between F D and R does not penalize the execution time in problems which can be solved by using the domain F D alone. Secondly, we also conclude that the cooperation mechanism using projections helps to speed-up the execution time in problems where a real cooperation between F D and R is needed. 84 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado Thirdly, our experiments show a good performance of our implementation with respect to the closest related system we are aware of. In summary, we conclude that our approach to the cooperation of constraint domains has been effectively implemented in a practical system, that is distributed as a free open-source Sourceforge project (http://toy.sourceforge.net) and runs on several platforms. 7.2 Some Current Limitations and Planned Future Work In the future we would like to improve some of the limitations of our current approach to domain cooperation, concerning both the formal foundations and the implemented system. More precisely: • The cooperative goal solving calculus CCLN C(C) presented in Section 3 should be generalized to allow for an arbitrary coordination domain C in place of the concrete choice M ⊕ H ⊕ F D ⊕ R. This is a straightforward task. However, for the purposes of the present paper we found more appropriate to deal just with the coordination domain supported by the current implementation. • The implemented system should be expanded to support some of these more general coordination domains, which could include specific domains for boolean values, sets, or different types of numeric values. More efficient and powerful constraint solvers for such domains should be also integrated within the implementation. • CCLN C(C) should be also expanded to allow the computation of projections from the primitive constraints placed within the constraint stores. These more powerful projections were allowed in the preliminary version of CCLN C(C) presented in (Estévez-Martı́n et al. 2007), but they were not implemented and no completeness result was given. Currently, projections are computed only from the constraints placed in the constraint pool (see rule PP in Table 4 in Subsection 3.3) and the T OY implementation only supports this kind of projections. Allowing projections to act over stored constraints will require to solve new problems both on the formal level (where some substantial difficulties are expected for proving a completeness result) and on the implementation level (where the current system will have to be modified to enable a transparent access to the constraint stores). • As a consequence of the previous improvement, the cooperative goal solving process will show more complicated patterns of interaction among solvers. Therefore, some means to describe goal solving strategies should be provided to enable users to specify some desired sequences of goal transformation rules, especially with regard to the activation of solvers and projections. In addition to being implemented as part of the practical system, goal solving strategies are expected to be helpful for proving the completeness of a cooperative goal solving calculus improved as described in the previous item. • The experimentation with benchmarks and application cases should be further developed. On the Cooperation of the Constraint Domains H, R and F D in CF LP 85 • Last but not least, the implemented system should be properly maintained and improved in various ways. In particular, library management should be standardized, both with respect to loading already existing libraries and with respect to developing new ones. References Antoy, S., Echahed, R., and M.Hanus. 1994. A needed narrowing strategy. In Proc. POPL’94. ACM Press. 268–279. Antoy, S., Echahed, R., and M.Hanus. 2000. A needed narrowing strategy. Journal of the ACM 74(4), 776–822. Antoy, S. and Hanus, M. 2000. Compiling Multi-Paradigm Declarative Programs into Prolog. In FroCoS. LNCS, vol. 1794. Springer, 171–185. Arbab, F. and Monfroy, E. 1998. Using coordination for cooperative constraint solving. In SAC. 139–148. Arenas, P., Estévez, S., Fernández, A., Gil, A., López-Fraguas, F., Rodrı́guezT OY. a multiparadigm declaraArtalejo, M., and Sáenz-Pérez, F. 2007. tive language. version 2.3.1. R. Caballero and J. Sánchez (Eds.), Available at http://toy.sourceforge.net. Arenas, P., Gil, A., and López-Fraguas, F. 1994. Combining Lazy Narrowing with Disequality Constraints. In PLILP’94. LNCS, vol. 844. Springer, 385–399. Baader, F. and Nipkow, T. 1998. Term rewriting and all that. Cambridge University Press. Baader, F. and Schulz, K. 1995. On the combination of symbolic constraints, solution domains and constraints solvers. In CP’95. LNCS, vol. 976. Springer, 380–397. Baader, F. and Schulz, K. 1996. Unification in the union of disjoint equational theories: combining decision procedures. Journal of Symbolic Computation 21, 2, 211–243. Baader, F. and Schulz, K. 1998. Combination of constraint solvers for free and quasifree structures. TCS 192, 1, 107–161. Benhamou, F. 1996. Heterogeneous constraint solving. In ALP’96. LNCS, vol. 1139. Springer, 62–76. Benhamou, F., Goualard, F., and Granvilliers, L. 1997. Programming with the declic language. In 2nd International Workshop on Interval Constraints. Port-Jefferson, NY, 1–13. Benhamou, F., Goualard, F., Granvilliers, L., and Puget, J.-F. 1999. Revising hull and box consistency. In ICLP’99. The MIT Press, 230–244. Benhamou, F. and Older, W. 1997. Applying interval arithmetic to real, integer and Boolean constraints. The Journal of Logic Programming 32, 1, 1–24. Beringer, H. and Backer, B. D. 1995. Combinatorial problem solving in constraint logic programming with cooperating solvers. In Logic Programming: Formal Methods and Practical Applications. Elsevier Science B.V./North-Holland, 245–272. Bockmayr, A. and Kasper, T. 2000. Branch and infer: a unifying framework for integer and finite domain constraint programming. INFORMS Journal of Computing 10, 3, 287. Buntine, W. L. and Bürckert, H. J. 1994. On solving equations and disequations. Journal of the ACM 41(4), 591–629. Castro, C. and Monfroy, E. 2004. Designing hybrid cooperations with a component language for solving optimisation problems. In AIMSA 2004. LNCS, vol. 3192. Springer, 447–458. 86 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado Castro, C., Moossen, M., and Riff, M.-C. 2004. A cooperative framework based on local search and constraint programming for solving discrete global optimisation. In SBIA’04. LNCS, vol. 3171. Springer, 93–102. Chiu, C.-K. and Lee, J. H.-M. 2002. Efficient interval linear equality solving in constraint logic programming. Reliable Computing 8, 2, 139–174. Colmerauer, A. 1984. Equations and inequations on finite and infinite trees. Communications of the ACM (CACM), 85–89. Colmerauer, A. 1990. An introduction to PROLOG III. Communications of the ACM (CACM) 33, 7, 69–90. Comon, H. 1991. Disunification: A survey. In Computational Logic - Essays in Honor of Alan Robinson. MIT Press, 322–359. Comon, H. and Lescanne, P. 1989. Equational problems and disunification. Journal of Symbolic Computation 7, 371–425. Damas, L. and Milner, R. 1982. Principal type-schemes for functional programs. In POPL’82. ACM Press, 207–212. de la Banda, M., Jeffery, D., Marriott, K., Nethercote, N., Stuckey, P., and Holzbaur, C. 2001. Building constraint solvers with HAL. In ICLP’01. LNCS, vol. 2237. Springer, 90–104. del Vado-Vı́rseda, R. 2003. A Demand-driven Narrowing Calculus with Overlapping Definitional Trees. In PPDP’03. ACM Press, 213–227. del Vado-Vı́rseda, R. 2005. Declarative Constraint Programming with Definitional Trees. In Proc. FroCoS’05. LNAI, vol. 3717. Springer, 184–199. del Vado-Vı́rseda, R. 2007. A Higher-Order Demand-driven Narrowing Calculus with Definitional Trees. In ICTAC’07. LNCS, vol. 4711. Springer, 165–179. Durfee, E., Lesser, V., and Corkill, D. 1989. Cooperative distributed problem solving. In The handbook of artificial intelligence, E. Feigenbaum, A. Barr, and P. Cohen, Eds. Vol. IV. Addison-Wesley, 83–147. Estévez-Martı́n, S., Fernández, A., Hortalá-González, T., Rodrı́guez-Artalejo, M., Sáenz-Pérez, F., and del Vado-Vı́rseda, R. 2007. A proposal for the cooperation of solvers in constraint functional logic programming. ENTCS 188, 37–51. Estévez-Martı́n, S., Fernández, A., and Sáenz-Pérez, F. 2006. Implementing TOY, a constraint functional logic programming with solver cooperation. Research Report LCC ITI 06-8, Universidad de Málaga. November. Estévez-Martı́n, S., Fernández, A. J., Hortalá-González, M. T., Rodrı́guezArtalejo, M., and del Vado Vı́rseda, R. 2007. A fully sound goal solving calculus for the cooperation of solvers in the CFLP scheme. ENTCS 177, 235–252. Estévez-Martı́n, S., Fernández, A. J., Hortalá-González, M. T., Rodrı́guezArtalejo, M., and del Vado Vı́rseda, R. 2008. Cooperation of constraint domains in the toy system. In PPDP’08. ACM Press, 258–268. Estévez-Martı́n, S., Fernández, A. J., and Sáenz-Pérez, F. 2007. About implementing a constraint functional logic programming system with solver cooperation. In proc. of CICLOPS’07. 57–71. Estévez-Martı́n, S., Fernández, A. J., and Sáenz-Pérez, F. 2008. Playing with T OY : Constraints and Domain Cooperation. In Proc. ESOP’08. LNCS, vol. 4960. Springer, 112–115. Fernández, A. J. and Hill, P. M. 2004. An interval constraint system for lattice domains. ACM Transactions on Programming Languages and Systems 26, 1, 1–46. Fernández, A. J. and Hill, P. M. 2006. An interval constraint branching scheme for lattice domains. J. UCS 12, 11, 1466–1499. On the Cooperation of the Constraint Domains H, R and F D in CF LP 87 Fernandez, M. 1992. Narrowing based procedures for equational disunification. Applicable Algebra in Engineering, Communication and Computing 3, 1, 1–26. Frank, S., Hofstedt, P., and Mai, P. R. 2003a. A flexible meta-solver framework for constraint solver collaboration. In Proc. KI 2003. LNCS, vol. 2821. Springer, 520–534. Frank, S., Hofstedt, P., and Mai, P. R. 2003b. Meta-s: A strategy-oriented metasolver framework. In Proc. FLAIRS. AAAI Press, 177–181. Frank, S., Hofstedt, P., Pepper, P., and Reckmann, D. 2007. Solution strategies for multi-domain constraint logic programs. In 6th International Andrei Ershov Memorial Conference on Perspectives of Systems Informatics (PSI 2006), I. Virbitskaite and A. Voronkov, Eds. LNCS, vol. 4378. Springer, Novosibirsk, Russia, 209–222. Revised Papers. Frank, S., Hofstedt, P., and Reckman, D. 2005. Meta-s - combining solver cooperation and programming languages. In Proc. W(C)LP 2005. Ulmer Informatik-Berichte 2005-01, 159–162. Frank, S. and Mai, P. R. 2002. Strategies for cooperating constraint solvers. Diplomathesis. University of Technology, Berlin. Frühwirth, T. 1998. Theory and practice of constraint handling rules. Journal of Logic Programming, Special Issue on Constraint Logic Programming 37, 1-3, 95–138. Gervet, C. 1997. Interval propagation to reason about sets: definition and implementation of a practical language. Constraints 1, 3, 191–244. González-Moreno, J., Hortalá-González, M., López-Fraguas, F., and Rodrı́guez-Artalejo, M. 1996. A rewriting logic for declarative programming. In Proc. ESOP’96. LNCS, vol. 1058. Springer, 156–172. González-Moreno, J., Hortalá-González, M., López-Fraguas, F., and Rodrı́guez-Artalejo, M. 1999. An approach to declarative programming based on a rewriting logic. Journal of Logic Programming 40, 47–87. González-Moreno, J. C., Hortalá-González, M. T., and Rodrı́guez-Artalejo, M. 2001. Polymorphic types in functional logic programming. Journal of Functional and Logic Programming 2001, 1, 1–71. Goualard, F. 2001. Component programming and interoperatibility in constraint solver design. In ERCIM Workshop on Constraints. The Computing Research Repository (CoRR). Goualard, F., Benhamou, F., and Granvilliers, L. 1999. An extension of the WAM for hybrid interval solvers. The Journal of Functional and Logic Programming 1999, 1, 1–36. Granvilliers, L. 2001. On the combination of interval constraint solvers. Reliable Computing 7, 6, 467–483. Granvilliers, L., Monfroy, E., and Benhamou, F. 2001. Cooperative solvers in constraint programming: a short introduction. ALP Newsletter 14, 2. Hanus, M. 2006. Curry: An Integrated Functional Logic Language (version 0.8.2 of march 28, 2006). Available at:http://www.informatik.uni-kiel.de/~mh/curry/. Harjunkoski, Jain, V., and Grossmann, I. 2000. Hybrid mixed-integer/constraint logic programming strategies for solving scheduling and combinatorial optimization problems. Comp. Chem. Eng. 24, 337–343. Hindley, R. 1969. The principal type-scheme of an object in combinatory logic. Trans. Amer. Math. Soc 146, 29–60. Hofstedt, P. 2000a. Better communication for tighter cooperation. In 1st International Conference on Computational Logic (CL’2000). LNCS, vol. 1861. Springer, 342–357. Hofstedt, P. 2000b. Cooperating constraint solvers. In CP’2000. LNCS, vol. 1894. Springer, 520–524. 88 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado Hofstedt, P. 2001. Cooperation and coordination of constraint solvers. Ph.D. thesis, Technischen Universität Dresden, Fakultät Informatik. Hofstedt, P. and Pepper, P. 2007. Integration of declarative and constraint programming. Theory Pract. Log. Program. 7, 1-2, 93–121. Hong, H. 1994. Confluency of Cooperative Constraint Solving. Tech. Rep. 94-08, Johannes Kepler University, Austria. Hooker, J. 2000. Logic-based methods for optimization, combining optimization and constraint satisfaction. Discrete Mathematics and Optimization. Wiley&Sons. Jaffar, J. and Lassez, J. 1987. Constraint logic programming. In Proc. POPL’87. ACM Press, 111–119. Jaffar, J. and Maher, M. 1994. Constraint Logic Programming: a Survey. Journal of Logic Programming 19&20, 503–581. Jaffar, J., Maher, M., Marriott, K., and Stuckey, P. 1998. Semantics of constraints logic programs. Journal of Logic Programming 37, 1-3, 1–46. Jaffar, J., Michaylov, S., Stuckey, P., and Yap, R. 1992. The CLP(R) language and system. ACM Transactions on Programming Languages and Systems 14, 3, 339–395. Kepser, S. and Richts, J. 1999. Optimisation techniques for combining constraint solvers. In FroCoS’98. 193–210. Khedro, T. and Genesereth, M. 1994. Modeling multiagent cooperation as distributed constraint satisfaction problem solving. In ECAI’94, A. Cohn, Ed. John Wiley & Sons, 249–253. Kirchner, H. and Ringeissen, C. 1992. A constraint solver in finite algebras and its combination with unification algorithms. In Proceedings of the Joint International Conference and Symposium on Logic Programming(JICSLP’92), K. R. Apt, Ed. MIT Press, 225–239. Kirchner, H. and Ringeissen, C. 1994. Combining symbolic constraint solvers on algebraic domains. J. Symb. Comput. 18, 2, 113–155. Kobayashi, N. 2003. Study of an open equational solving system. Ph.D. thesis, Institute of Information Sciences and Electronics, University of Tsukuba, Japan. Kobayashi, N., Marin, M., and Ida, T. 2001. Collaborative constraint functional logic programming in an open environment. In The Second Asian Workshop on Programming Languages and Systems (APLAS’01). Korea, 49–59. Kobayashi, N., Marin, M., and Ida, T. 2003. Collaborative constraint functional logic programming system in an open environment. IEICE Transactions on Information and Systems E86-D, 1, 63–70. Kobayashi, N., Marin, M., Ida, T., and Che, Z. 2002. Open CFLP: An open system for collaborative constraint functional logic programming. In 11th International Workshop on Functional and (Constraint) Logic Programming (WFLP2002). Grado, Italy, 229– 232. Krzikalla, O. 1997. Constraint solver für lineare constraints über reellen zahlen. Großer Beleg. Technische Universität Dresden. Lassez, J., Maher, M., and Marriot, K. 1988. Unification revisited. In Foundations of logic and functional programming. LNCS, vol. 306. Springer, 67–113. Loogen, R., López-Fraguas, F., and Rodrı́guez-Artalejo, M. 1993. A demand driven computation strategy for lazy narrowing. In Proc. PLILP’93. LNCS, vol. 714. Springer, 184–200. López-Fraguas, F., Rodrı́guez-Artalejo, M., and del Vado-Virseda, R. 2004. A Lazy Narrowing Calculus for Declarative Constraint Programming. In PPDP’04. ACM Press, 43–54. On the Cooperation of the Constraint Domains H, R and F D in CF LP 89 López-Fraguas, F., Rodrı́guez-Artalejo, M., and del Vado Vı́rseda, R. 2007. A new generic scheme for functional logic programming with constraints. Higher-Order and Symbolic Computation 20, 1/2, 73–122. Maher, M. J. 1988. Complete axiomatizations of the algebras of finite, rational and infinite trees. In LICS’88. IEEE Computer Society, 348–357. Marin, M. 2000. Functional logic programming with distributed constraint solving. Ph.D. thesis, Johannes Kepler Universität Linz. Marin, M., Ida, T., and Schreiner, W. 2001. CFLP: a Mathematica Implementation of a Distributed Constraint Solving System. In IMS’99. Vol. 8. WIT Press, 287–300. Marti, P. and Rueher, M. 1995. A distributed cooperating constraints solving system. International Journal of Artificial Intelligence Tools 4, 1–2, 93–113. Milner, R. 1978. A theory of type polymorphism in programming. Journal of Computer and Systems Sciences 17, 348–375. Monfroy, E. 1996. Solver collaboration for constraint logic programming. Ph.D. thesis, Centre de Recherche en Informatique de Nancy. Monfroy, E. 1998. A Solver Collaboration in BALI. In Proc. of JCSLP’98. MIT Press, 349–350. Monfroy, E. and Castro, C. 2004. A component language for hybrid solver cooperations. In ADVIS’04. LNCS, vol. 3261. Springer, 192–202. Monfroy, E. and Ringeissen, C. 1999. An open automated framework for constraint solver extension: the solex approach. Fundam. Inform. 39, 1-2, 167–187. Monfroy, E., Rusinowitch, M., and Schott, R. 1995. Implementing non-linear constraints with cooperative solvers. Research Report 2747, CRI Nancy. N’Dong, S. 1997. Prolog IV ou la programmation par contraintes selon PrologIA. In JFPLC’97. Edition HERMES, 235–238. Nelson, G. and Oppen, D. 1979. Simplification by cooperating decision procedures. ACM Transactions on Programming Languages and Systems 1, 2, 245–257. Pajot, B. and Monfroy, E. 2003. Separating search and strategy in solver cooperations. In Proc. PSI’03. LNCS, vol. 2890. Springer, 401–414. Peyton-Jones, S. 2002. Haskell 98 language and libraries: the revised report. Tech. rep. http://www.haskell.org/onlinereport/. Rodosěk, R., Wallace, M., and Hajian, M. 1997. A new approach to integrating mixed integer programming and constraint logic programming. In Annals of Oper. Res. Vol. 86. 63–87. Rodrı́guez-Artalejo, M. 2001. Functional and constraint logic programming. In Constraints in Computational Logics: Theory and Applications. LNCS, vol. 2002. Springer, 202–270. Rueher, M. and Solnon, C. 1997. Concurrent cooperating solvers over reals. Reliable Computing 3, 3, 325–333. Sáenz-Pérez, F. 2007. ACIDE: An Integrated Development Environment Configurable for LaTeX. The PracTeX Journal 2007, 3 (August). Saraswat, V. 1992. The category of constraint systems is cartesian closed. In Proc. of the 7th Annual IEEE Symposium on Logic in Computer Science. IEEE Press, 341–345. SICStus Prolog. 2007. http://www.sics.se/isl/sicstus. Thorsteinsson, E. 2001. Branch-and-check: A hybrid framework integrating mixed integer programming and constraint logic programming. In CP 2001, T. Walsh, Ed. LNCS, vol. 2239. Springer, 16–30. van Hentenryck, P., Saraswat, V., and Deville, Y. 1998. Design, implementation and evaluation of the constraint language cc(FD). Journal of Logic Programming 37, 139–164. 90 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado van Hentenryck, P., Simonis, H., and Dincbas, M. 1994. Constraint satisfaction using constraint logic programming. Artificial Intelligence 58, 113–159. van Hoeve, W. 2000. Towards the integration of constraint logic programming and mathematical programming. Master’s Thesis, University of Twente, the Netherlands. Vandecasteele, H. and Rodosěk. 1998. Modelling combinatorial problems for CLP(FD+R). In Proc. of the Benelux Workshop on Logic Programming. 1–9. Zhou, J. 2000. Introduction to the constraint language NCL. The Journal of Logic Programming 45, 1-3, 71–103. Zoeteweij, P. 2003. Coordination-based distributed constraint solving in DICE. In ACM Symposium on Applied Computing (SAC’03). ACM, Melbourne, FL, USA, 360–366. Appendix A [Auxiliary Results and Proofs] This Appendix collects proofs of the results stated in Section 2 and Section 3 omitted from the main text. Some of them rely on previously stated auxiliary results, especially Lemmata 1 and 2 from Subsection 2.2 and Lemma 3 from Subsection 2.3. In addition, some other auxiliary results will be included at the proper places. A.1 Properties of Constraint Solvers and Coordination Domains The first part of the Appendix includes the proofs of the main results stated in Section 2. First we present the proof of Lemma 5, about general properties of proof transformation systems. Proof of Lemma 5 1. The transition relation ⊢⊢D, X of the sts generates a tree with root Π ✷ ε, whose leaves correspond to the stores belonging to SF D (Π, X ). Since ⊢⊢D, X is finitely branching and terminating, this tree is locally finite and has no infinite branches. By so-called König’s Lemma (see (Baader and Nipkow 1998), Section 2.2) the tree must be finite. Therefore, it must have finitely many leaves, and SF D (Π, X ) is finite. For later use, we remark that solveD (Π, X ) can be characterized as _ {∃Y ′ (Π′ ✷ σ ′ ) | Π ✷ ε ⊢⊢D, X ! Π′ ✷ σ ′ , Y ′ = var(Π′ ✷ σ ′ ) \ var(Π)} 2. Assume that the sts has the fresh local variables property and the safe bindings property. Due to the remark at the end of item 1., for each X -solved form ∃Y ′ (Π′ ✷ σ ′ ) computed by the call solveD (Π, X ) there is some sequence of ⊢⊢D, X steps Π ✷ ε = Π′0 ✷ µ′0 ⊢⊢D, X Π′1 ✷ µ′1 ⊢⊢D, X . . . ⊢⊢D, X Π′n ✷ µ′n such that Π′n ✷ µ′n = Π′ ✷ σ ′ is irreducible, and the following conditions hold for all 1 ≤ i ≤ n: Π′i ✷ µ′i is a store with fresh local variables Yi′ = var(Π′i ✷ µ′i ) \ var(Π′i−1 ✷ µ′i−1 ); µ′i = µ′i−1 µi for some substitution µi verifying vdom(µi )∪vran(µi ) ⊆ var(Π′i−1 ) ∪ Yi′ ; and µi (X) is a constant for all X ∈ X ∩ vdom(µi ). Then, Y ′ = Y1′ , . . . , Yn′ , and an easy induction on n allows to prove that vdom(σ ′ ) ∪ vran(σ ′ ) ⊆ var(Π) ∪ Y ′ and that σ ′ (X) is a constant for all X ∈ X ∩ vdom(σ ′ ). Therefore, the solver solveD also satisfies the fresh local variables property and the safe bindings property. On the Cooperation of the Constraint Domains H, R and F D in CF LP 91 3. Assume that the sts is locally sound. Because of the remark in item 1., to prove soundness of solveD it is sufficient to show that the union [ {SolD (∃Y ′ (Π′ ✷ σ ′ )) | Π ✷ σ ⊢⊢D, X ! Π′ ✷ σ ′ , Y ′ = var(Π′ ✷ σ ′ ) \ var(Π ✷ σ)} is a subset of SolD (Π ✷ σ). In order to show this, we assume Π ✷ σ ⊢⊢nD, X ! Π′ ✷ σ ′ , Y ′ = var(Π′ ✷ σ ′ ) \ var(Π ✷ σ) and prove SolD (∃Y ′ (Π′ ✷ σ ′ )) ⊆ SolD (Π ✷ σ) by induction on n: n = 0: In this case Y ′ = ∅, Π′ ✷ σ ′ = Π ✷ σ. The inclusion to be proved is trivial. n−1 ′ ′ ′ ′ n > 0: In this case Π ✷ σ ⊢⊢D, X Π′1 ✷ σ1′ ⊢⊢D, X ! Π ✷ σ for some store Π1 ✷ σ1 . ′ ′ ′ ′ ′ ′ ′ Let Y1 = var(Π1 ✷σ1 ) \ var(Π ✷ σ) and Y ′′ = var(Π ✷ σ ) \ var(Π1 ✷σ1 ). Then Y ′ = Y1′ , Y ′′ = var(Π′ ✷ σ ′ ) \ var(Π ✷ σ). By induction hypothesis, we can assume SolD (∃Y ′′ (Π′ ✷ σ ′ )) ⊆ SolD (Π′1 ✷ σ1′ ). Then, for any given η ∈ SolD (∃Y ′ (Π′ ✷ σ ′ )) we can prove η ∈ SolD (Π ✷ σ) by the following reasoning: by definition of SolD , there is η ′ ∈ SolD (Π′ ✷ σ ′ ) such that η ′ =\Y ′ η and hence η ′ =var(Π ✷ σ) η. Trivially, it follows that η ′ ∈ SolD (∃Y ′′ (Π′ ✷ σ ′ )), which implies η ′ ∈ SolD (Π′1 ✷ σ1′ ) by induction hypothesis. Trivially again, it follows that η ′ ∈ SolD (∃Y1′ (Π′1 ✷ σ1′ )) which implies η ′ ∈ SolD (Π ✷ σ) due to local soundness. Since η ′ =var(Π ✷ σ) η, we can conclude that η ∈ SolD (Π ✷ σ). 4. Assume now a selected set RS of strs such that the sts is locally complete for RS-free steps. Because of the remark in item 1., to prove completeness of solveD for RS-free invocations it is sufficient to show that W T SolD (Π ✷ σ) is a subset of the union [ {W T SolD (∃Y ′ (Π′ ✷ σ ′ )) | Π ✷ σ ⊢⊢D, X ! Π′ ✷ σ ′ , Y ′ = var(Π′ ✷ σ ′ ) \ var(Π ✷ σ)} under the additional assumption that Π ✷ σ is hereditarily RS-irreducible. This can be viewed as a property of the store Π ✷ σ that can be proved by well-founded induction (see again (Baader and Nipkow 1998), Section 2.2) on the terminating store transformation relation ⊢⊢D, X : Base Case: Π ✷ σ is irreducible w.r.t. ⊢⊢D, X . In this case, the union reduces to the set W T SolD (Π ✷ σ) and the inclusion to be proved is trivial. Inductive Case: Π ✷ σ is reducible w.r.t. ⊢⊢D, X . In this case, since Π ✷ σ is hereditarily RS-irreducible and the sts is locally complete for RS-free steps, for any η ∈ W T SolD (Π ✷ σ) there is some hereditarily RS-irreducible (Π′1 ✷ σ1′ ) such that Π ✷ σ ⊢⊢D, X Π′1 ✷ σ1′ and η ∈ W T SolD (∃Y1′ (Π′1 ✷ σ1′ )) where Y1′ = var(Π′1 ✷σ1′ ) \ var(Π ✷ σ). Then, by definition of SolD , there is η1′ ∈ W T SolD (Π′1 ✷ σ1′ ) such that η1′ =\Y ′ η. The induction hypothesis can be assumed for Π′1 ✷ σ1′ , and there must be 1 some Π′ ✷ σ ′ such that Π′1 ✷ σ1′ ⊢⊢D, X ! Π′ ✷ σ ′ , Y ′′ = var(Π′ ✷ σ ′ )\ var(Π′1 ✷σ1′ ) and η1′ ∈ W T SolD (∃Y ′′ (Π′ ✷ σ ′ )). By definition of SolD , there is η ′ ∈ W T SolD (Π′ ✷ σ ′ ) such that η ′ =\Y ′′ η1′ . Moreover, we get Π ✷ σ ⊢⊢D, X ! Π′ ✷ σ ′ and Y ′ = Y1′ , Y ′′ = var(Π′ ✷ σ ′ )\var(Π ✷ σ) such that η ′ =\Y ′ η, and thus η ∈ W T SolD (∃Y ′ (Π′ ✷ σ ′ )). This completes the proof of the Lemma. Table A 1 displayed in the next page and the two auxiliary Lemmata stated and proved immediately afterwards will be used in the subsequent proof of Theorem 92 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 1, the main result in this subsection. It ensures that solveH satisfies the requirements for solvers listed in Definition 6 (except for a technical limitation concerning completeness). The proof of this theorem also relies on Lemma 5. Lemma 7 (Auxiliary Soundness Lemma) Assume Π ⊆ P ConD and σ, σ1 ∈ SubD such that σ is idempotent and Πσ = Π. Then SolD (Πσ1 ) ∩ SolD (σσ1 ) ⊆ SolD (Π) ∩ SolD (σ). Proof of Lemma 7 The hypothesis of the Lemma say that σ = σσ and Πσ = Π. On the other hand, because of the Substitution Lemma 3 and the definition of SolD , any η ∈ V alD verifies η ∈ SolD (Πσ1 ) ∩ SolD (σσ1 ) iff σ1 η ∈ SolD (Π) and σσ1 η = η. Therefore, to prove the lemma it suffices to assume (a) σ = σσ (b) Πσ = Π (c) σ1 η ∈ SolD (Π) (d) σσ1 η = η and to deduce from these assumptions that η ∈ SolD (Π) ∩ SolD (σ). First we prove that η ∈ SolD (Π) as follows: by (c) and (b), we obtain σ1 η ∈ SolD (Πσ), which amounts to σσ1 η ∈ SolD (Π) by the Substitution Lemma. By (d), this is the same as η ∈ SolD (Π). Next, we note that η ∈ SolD (σ) is equivalent to ση = η, which can be proved by the following chain of equalities: ση =(d) σσσ1 η =(a) σσ1 η =(d) η. Lemma 8 (Auxiliary Completeness Lemma) Assume Π ⊆ P ConD , σ, σ1 ∈ SubD and η, η ′ ∈ V alD such that η ∈ SolD (Π) ∩ SolD (σ), σ1 η ′ = η ′ and η ′ =\Y ′ η, where Y ′ are fresh variables away from var(Π) ∪ vdom(σ) ∪ vran(σ). Then ση ′ = η ′ and η ′ ∈ SolD (Πσ1 ) ∩ SolD (σσ1 ). Proof of Lemma 8 In what follows we can assume ση = η due to the hypothesis η ∈ SolD (σ). We prove ση ′ = η ′ by showing that Xση ′ = Xη ′ holds for any variable X ∈ Var. This is trivial for X ∈ / vdom(σ). For X ∈ vdom(σ), we can assume that Y ′ is away from X and var(Xσ); therefore η ′ =X,var(Xσ) η and hence Xση ′ = Xση = Xη = Xη ′ (where the assumption ση = η has been used at the 2nd step). Now we prove η ′ ∈ SolD (Πσ1 ). Because of the Substitution Lemma 3, this is equivalent to σ1 η ′ ∈ SolD (Π), which amounts to η ∈ SolD (Π) due to the hypothesis σ1 η ′ = η ′ , η ′ =\Y ′ η and Y ′ away from var(Π). But η ∈ SolD (Π) is also ensured by the hypothesis. Finally, η ′ ∈ SolD (σσ1 ) is equivalent to σσ1 η ′ = η ′ , which can be proved as follows: σσ1 η ′ = ση ′ = η ′ (where the 1st step relies on the assumption σ1 η ′ = η ′ and the 2nd step relies on a previously proved equality). Proof of Theorem 1 Consider the sts for H stores with transition relation ⊢⊢H, X as specified in Table 1 in Subsection 2.4.2, implicitly assuming that the notation used for the various strs is exactly the same as there. We prove that this sts satisfies the six properties enumerated in Definition 7. The last one (namely Local Completeness) holds for URS-free steps, where URS = {OH3, OH7, H13} is the set of unsafe H-strs, as explained in Subsection 2.4.2. On the Cooperation of the Constraint Domains H, R and F D in CF LP 93 1. Fresh Local Variables Property: The specification of the strs in Table 1 clearly guarantees this property. 2. Safe Bindings Property: An inspection of Table 1 shows that the strs H1 and H2 bind a variable to a constant, and the other strs never bind a variable X ∈ X . Therefore, this property is also satisfied. 3. Finitely Branching Property: This property holds because those strs that allow a non-deterministic choice of the next store provide only finitely many possibilities. 4. Termination Property: Given a H store Π ✷ σ and a set X ⊆ cvar(Π), we define a 5-tuple of natural numbers ||Π ✷ σ||X =def (P1 , P2 , P3 , P4 , P5 ) ∈ N5 where P1 is the number of occurrences of atomic constraints in Π which are unsolved w.r.t. X . In this context, an atomic constraint π occurring in Π is said to be unsolved w.r.t. X iff some of the strs can be applied taking π as the selected atomic constraint. P2 is the sum of the depths of all the occurrences of variables X ∈ X within patterns in Π. P3 is the sum of the syntactical sizes of all the patterns occurring in Π. P4 is the number of unsolved occurrences of obviously demanded variables in Π. In this context, an occurrence of an obviously demanded variable X in Π is called solved iff X occurs in a constraint of the form X == X, and unsolved otherwise. P5 is the number of occurrences of misplaced variables in Π. In this context, misplaced occurrences of X in Π are those occurrences of the form t == X or t /= X, with t ∈ Var and X 6= t. Let >lex be the lexicographic ordering induced by >N over N5 . We claim that: (⋆) Π ✷ σ ⊢⊢H, X Π′ ✷ σ ′ ⇒ ||Π ✷ σ||X >lex ||Π′ ✷ σ ′ ||X This is justified by Table A 1, which shows the behaviour of the different strs w.r.t. >lex . In order to understand the table, note that two different cases have been distinguished for the application of the str H11 , namely: • H11a Application of H11 choosing a value of i such that X ∩ var(ti ) 6= ∅. • H11b Application of H11 choosing a value of i such that X ∩ var(ti ) = ∅. Since >lex is a well-founded ordering, termination of ⊢⊢H, X can be concluded from (⋆). The reader is referred to Section 2.3 in (Baader and Nipkow 1998) for more information on this proof technique. 5. Local Soundness Property: Given a H store Π ✷ σ and a set X ⊆ odvarH (Π), we must prove that the union [ {SolH (∃Y ′ (Π′ ✷ σ ′ )) | Π ✷ σ ⊢⊢H, X Π′ ✷ σ ′ , Y ′ = var(Π′ ✷ σ ′ ) \ var(Π ✷ σ)} is a subset of SolD (Π ✷ σ). Obviously, it suffices to prove the inclusion (†) SolH (∃Y ′ (Π′ ✷ σ ′ )) ⊆ SolH (Π ✷ σ) for each Π′ ✷ σ ′ such that Π ✷ σ ⊢⊢H, X ! Π′ ✷ σ ′ with Y ′ = var(Π′ ✷ σ ′ )\var(Π ✷ σ). However (†) is an easy consequence of (††) SolH (Π′ ✷ σ ′ ) ⊆ SolH (Π ✷ σ) 94 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado RULES P1 P2 P3 P4 H1 ≥ ≥ ≥ > H2 ≥ ≥ ≥ > H3 ≥ ≥ > H4 ≥ ≥ ≥ H5 > H6 > H7 ≥ ≥ > H8 > H9 > H10 ≥ ≥ ≥ H11a ≥ > H11b > H12 > H13 > P5 ≥ > ≥ > Table A 1. Well-founded progress ordering for >lex In fact, assuming (††) and an arbitrary η ∈ SolH (∃Y ′ (Π′ ✷ σ ′ )), there must be some η ′ ∈ SolH (Π′ ✷ σ ′ ) such that η =\Y ′ η ′ . Then, η ′ ∈ SolH (Π ✷ σ) because of (††), and thus η ∈ SolH (Π ✷ σ) because η =\Y ′ η ′ and Y ′ ∩ var(Π ✷ σ) = ∅. Having proved that (††) entails (†), we proceed to prove (††) by a case distinction according to the str used in the step Π ✷ σ ⊢⊢H, X Π′ ✷ σ ′ . In each case, we assume that the stores Π ✷ σ and Π′ ✷ σ ′ occurring in (††) have exactly the form displayed for the corresponding transformation in the Table 1 displayed in Subsection 2.4.2. For instance, in the case of transformation H1 we write (t == s) →! R, Π ✷ σ in place of Π ✷ σ. Moreover, in all the cases we silently use the fact that the constraints and variables within any store are not affected by the substitution kept in that store. H1 Assume η ∈ SolH ((t == s, Π)σ1 ✷ σσ1 ). Then η ∈ SolH ((t == s, Π)σ1 ) ∩ SolH (σσ1 ). We must prove η ∈ SolH ((t == s) →! R, Π ✷ σ). Since (t == s, Π) = (t == s, Π)σ, we can infer η ∈ SolH (t == s, Π) ∩ SolH (σ) from our assumptions and Lemma 7. It remains to prove that η ∈ SolH ((t == s) →! R). Since we already know that η ∈ SolH (t == s), it suffices to prove that Rη = true. But η ∈ SolH (σσ1 ) means σσ1 η = η, and therefore Rη = Rσσ1 η = Rσ1 η = true η = true. On the Cooperation of the Constraint Domains H, R and F D in CF LP H2 H3 H4 H5 H6 H7 H8 H9 H10 H11 95 Very similar to H1. Trivial. Clearly, SolH (tm ==sm ) = SolH (h tm == h sm ). Trivial. Clearly, SolH (X == t) = SolH (t == X). Assume η ∈ SolH (tot(t), Πσ1 ✷σσ1 ). Then tη is a total pattern and η ∈ SolH (Πσ1 ) ∩ SolH (σσ1 ). We must prove η ∈ SolH (X == t, Π ✷σ). Since Π = Πσ, we can infer η ∈ SolH (Π) ∩ SolH (σ) from our assumptions and Lemma 7. It remains to prove that η ∈ SolH (X == t). But η ∈ SolH (σσ1 ) means σσ1 η = η. Thus, Xη = Xσσ1 η = Xσ1 η = tη, which implies η ∈ SolH (X == t), because tη is total. Trivial, because η ∈ SolH () is false for any η. Trivial. Clearly, SolH (ti / = si ) ⊆ SolH (h tm /= h sm ). Trivial, because η ∈ SolH (h tn /= h′ sm ) holds for any η. Trivial, for the same reason as H6. Trivial. Clearly, SolH (X /= t) = SolH (t /= X). Assume η ∈ SolH ((Zi /= ti , Π)σ1 ✷ σσ1 ). Then η ∈ SolH ((Zi /= ti )σ1 ) and η ∈ SolH (Πσ1 ) ∩ SolH (σσ1 ). We must prove η ∈ SolH (X /= c tn , Π ✷ σ). Since Π = Πσ, we can infer η ∈ SolH (Π) ∩ SolH (σ) from our assumptions and Lemma 7. It remains to prove that η ∈ SolH (X /= c tn ). Because of η ∈ SolH (σσ1 ), we know that σσ1 η = η. Therefore, it suffices to prove σσ1 η ∈ SolH (X /= c tn ), which can be reasoned as follows: σσ1 η ∈ SolH (X /= c tn ) ⇔(1) η ∈ SolH (X /= c tn )σσ1 ⇔ η ∈ SolH (X /= c tn )σ1 ⇐(2) η ∈ SolH (Zi /= ti σ1 ) ⇐(3) η ∈ SolH (Zi /= ti )σ1 where (1) holds because of the Substitution Lemma 3, (2) and (3) hold by construction of σ1 , and η ∈ SolH (Zi /= ti )σ1 holds because of the assumptions of this case. H12 Assume η ∈ SolH (Πσ1 ✷σσ1 ). Then η ∈ SolH (Πσ1 ) ∩ SolH (σσ1 ). We must prove η ∈ SolH (X /= c tn , Π ✷ σ). Since Π = Πσ, we can infer η ∈ SolH (Π) ∩ SolH (σ) from our assumptions and Lemma 7. It remains to prove that η ∈ SolH (X /= c tn ). This is the case because Xη = Xσσ1 η = Xσ1 η = (d Z m )η, where the first equality holds because of the assumption η ∈ SolH (σσ1 ) and the third equality holds by construction of σ1 . H13 Trivial, for the same reason as H6. 6. Local Completeness Property for URS-free steps: Recall the set of unsafe strs URS = {OH3, OH7, H13} defined in Subsection 2.4.2. Assume a H store Π ✷ σ and a set X ⊆ odvarH (Π), such that Π ✷ σ is URS-irreducible but not in X -solved form. We must prove that W T SolD (Π ✷ σ) is a subset of the union [ {W T SolD (∃Y ′ (Π′ ✷σ ′ )) | Π✷σ ⊢⊢H,X Π′ ✷σ ′ , Y ′ = var(Π′ ✷σ ′ ) \ var(Π✷σ)} Given any well-typed solution η ∈ W T SolH (Π ✷ σ) (which satisfies in particular ση = η), we must find Π′ ✷ σ ′ and η ′ such that (‡) Π ✷ σ ⊢⊢H,X Π′ ✷ σ ′ , η ′ ∈ W T SolH (Π′ ✷ σ ′ ), η =\Y ′ η ′ 96 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado so that η ∈ W T SolH (∃Y ′ (Π′ ✷ σ ′ )) will be ensured. Because of the assumptions on Π ✷ σ, there must be some str Hi ∈ / URS that can be used to transform Π ✷ σ. Below we analyze all the possibilities for Hi , considering all the strs shown in Table 1 in Subsection 2.4.2 except OH3, OH7 and H13. In all the cases we conclude that the conditions (‡) displayed above can be ensured. When considering different strs that can be alternatively applied to one and the same store (as e.g. H1 and H2) we group all the possibilities within the same case, arguing that some rule in the group can be chosen to transform Π ✷ σ ensuring (‡). In all the cases, we assume that the stores Π ✷ σ and Π′ ✷ σ ′ occurring in (‡) have exactly the form displayed for the corresponding transformation in Table 1, we note the selected atomic constraint as π, and we silently use the fact that the constraints and variables within any store are not affected by the substitution kept in that store. H1, H2 In this case π is (t == s) →! R, η ∈ W T SolH (t == s →! R, Π ✷ σ) and Y ′ = ∅. Because of η ∈ W T SolH (π), one of the two following subcases must hold: (a) η(R) = true and η ∈ W T SolH(t == s) or else (b) η(R) = false and η ∈ W T SolH (t /= s) H3 H4 H5 H7 Assume that subcase (a) holds. Then, (‡) can be ensured by transforming the given store with H1 and proving η ′ = η ∈ W T SolH(Πσ1 ✷ σσ1 ). Note that Lemma 8 can be applied with Y ′ = ∅, η ′ = η and σ1 = {R 7→ true}, because the condition σ1 η = η follows trivially from η(R) = true. Then, η ∈ SolH (Πσ1 ) ∩ SolH (σσ1 ) is ensured by Lemma 8, and η obviously remains a well-typed solution. Assume now that subcase (b) holds. Then a similar argument can be used, but choosing H2 instead of H1. In this case π is h tm == h sm and (‡) can be ensured by choosing to transform the given store with H3 and taking Y ′ = ∅ and σ ′ = σ. Note that h must be mtransparent because of the URS-freeness assumption, and the Transparency Lemma 2 can be applied to ensure that η remains a well-typed solution of the new store. In this case π is t == X, where t is not a variable, and (‡) can be trivially ensured by choosing to transform the given store with H4 and taking Y ′ = ∅ and σ ′ = σ. In this case π is t == X, with X ∈ / X,X ∈ / var(t), X 6= t. Moreover, η ∈ ′ W T SolH (X == t, Π ✷ σ) and Y = ∅. Then (‡) can be ensured by transforming the given store with H5 and proving η ′ = η ∈ W T SolH(tot(t), Πσ1 ✷ σσ1 ). The assumption η ∈ W T SolH(π) means that η(X) = tη is a total pattern, so that η(Y ) is also a total pattern for each variable Y ∈ var(t). In these conditions, η ∈ SolH (tot(t)) and σ1 η = η holds for σ1 = {X 7→ t}. This allows to apply Lemma 8 with Y ′ = ∅, η ′ = η and σ1 , ensuring that η ∈ SolH (Πσ1 ) ∩ SolH (σσ1 ). Obviously, η remains a well-typed solution. In this case, π is h tm /= h sm . Because of η ∈ W T SolH (π), there must be some index i such that 1 ≤ i ≤ m and η ∈ W T SolH(ti /= si ). Then (‡) can be ensured by choosing to transform the given store with H7 and this particular value of i, and taking Y ′ = ∅, σ ′ = σ. Note that h must be m-transparent On the Cooperation of the Constraint Domains H, R and F D in CF LP 97 because of the URS-freeness assumption, and the Transparency Lemma 2 can be applied to ensure that η remains a well-typed solution of the new store. H8 In this case π is h tn /= h′ sm with h 6= h′ or n 6= m, and (‡) can be trivially ensured by choosing to transform the given store with H8, taking Y ′ = ∅ and σ ′ = σ. H10 This is a trivial case, similar to H4. H11, H12 In this case π is X /= c tn , with X ∈ / X , c ∈ DC n and X ∩ var(c tn ) 6= ∅, η ∈ W T SolH(X /= c tn Π ✷ σ). Because of η ∈ W T SolH (π), one of the two following subcases must hold for η(X): (a) η(X) = c sn , where si /= ti η holds for some 1 ≤ i ≤ n. (b) η(X) = d sm , where d ∈ DC m belongs to the same datatype as c, but d 6= c. Assume that subcase (a) holds. Then (‡) can be ensured by choosing to transform the given store with H11 and a particular value of i such that si /= ti η holds, taking Y ′ = Z n , defining η ′ as the valuation that satisfies η ′ (Zj ) = sj for all 1 ≤ j ≤ n and η ′ (Y ) = η(Y ) for any other variable Y and proving η ′ ∈ W T SolH ((Zi /= ti , Π)σ1 ✷ σσ1 ). Obviously, η =\Y ′ η ′ . Moreover, σ1 η ′ = η ′ , since Xσ1 η ′ = (c sn )η ′ = c sn = Xη = Xη ′ and Y σ1 η ′ = Y η ′ for any variable Y 6= X. Therefore, Lemma 8 can be applied to ensure that η ′ ∈ SolH (Πσ1 ) ∩ SolH (σσ1 ). Since η was a well-typed solution and data constructors have the transparency property (see Subsection 2.1), η ′ can be also well-typed under appropriated type assumptions for the new variables Y ′ = Z n introduced by the transformation step. It only remains to prove that η ′ ∈ SolH ((Zi /=ti )σ1 ). This can be reasoned by a chain of equivalences, ending with the condition known to hold in subcase (a): η ′ ∈ SolH ((Zi /=ti )σ1 ) ⇔(1) σ1 η ′ ∈ SolH (Zi /=ti ) ⇔(2) η ′ ∈ SolH (Zi /=ti ) ⇔ η ′ (Zi )/=ti η ′ ⇔(3) si /=ti η ′ Note that (1) holds because of Lemma 3, (2) holds because σ1 η ′ = η ′ , and (3) holds by construction of η ′ . This finishes the proof for this subcase. Finally, assume now that subcase (b) holds. Then (‡) can be ensured by choosing to transform the given store with H12 and the particular data constructor d ∈ DC m for which we know that η(X) = d sm , taking Y ′ = Z m , defining η ′ as the valuation that satisfies η ′ (Zj ) = sj for all 1 ≤ j ≤ m and η ′ (Y ) = η(Y ) for any other variable Y and proving η ′ ∈ W T SolH (Πσ1 ✷ σσ1 ). Obviously, η =\Z m η ′ . Moreover, σ1 η ′ = η ′ can be easily checked, as in subcase (a). Therefore, Lemma 8 can be applied to ensure that η ′ ∈ SolH (Πσ1 ) ∩ SolH (σσ1 ). Finally, since η was a well-typed solution, η ′ is clearly also welltyped under appropriated type assumptions for the new variables Y ′ = Z n introduced by the transformation step. Using items 1. to 6. above and Lemma 5, we can now claim that solveH satisfies the requirements for solvers enumerated in Definition 6, except that the Com- 98 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado pleteness Property is guaranteed to hold only for safe (i.e., URS-free) solver invocations and the Discrimination Property has not been proved yet. The remark in item 1. of the proof of Lemma 5 allows to rephrase the Discrimination Property as follows: if a given H store Π ✷ σ satisfies neither (a) X ∩ odvar(Π) 6= ∅ nor (b) X ∩ var(Π) = ∅ then Π ✷ σ can be reduced by some ⊢⊢H, X transformation. Assume that Π ✷ σ satisfies neither (a) nor (b). Because of ¬ (b), there must be some π ∈ Π such that (c) X ∩ var(π) 6= ∅. Because of ¬ (a), this π must satisfy (d) X ∩ odvar(π) = ∅, which together with (c) entails (e) X ∩ cvar(π) 6= ∅. Using (d), (e) and reasoning by case distinction on the syntactic form of π, we find in all the cases some ⊢⊢H, X transformation which can be used to transform the store Π ✷ σ taking π as the selected atomic constraint. The cases are as follows: • π is (t == s) →! R. In this case the store can be transformed by means of H1 or H2. • π is h tm == h sm . In this case the store can be transformed by means of H3. • π is t == X with t ∈ / Var. In this case the store can be transformed by means of H4. • π is X == t with X ∈ / var(t), X 6= t. Because of (d) above we know that X ∈ / X, and the store can be transformed by means of H5. • π is X == t with X ∈ var(t), X 6= t. In this case the store can be transformed by means of H6. • π is h tm /= h sm . In this case the store can be transformed by means of H7. • π is h tn /= h′ sm with h 6= h′ or n 6= m. In this case the store can be transformed by means of H8. • π is t /= t with t ∈ Var ∪ DC ∪ DF ∪ SP F . In this case the store can be transformed by means of H9. • π is t /= X with t ∈ / Var. In this case the store can be transformed by means of H10. / X and • π is X /= c tn , with c ∈ DC n . Because of (d), (e) above we know that X ∈ X ∩ var(c tn ) 6= ∅. Therefore, the store can be transformed by means of H11 or H12. / DC m . Because of (d), (e) above we know that X ∈ / X and • π is X /= h tm with h ∈ X ∩ var(h tm ) 6= ∅. Therefore, the store can be transformed by means of H13. This completes the proof of the Discrimination Property and the Theorem. We refrain to include in this Appendix a proof of Theorem 3, stated in Subsection 2.6 and ensuring the properties required for the solver solveM . The proof would follow exactly the same pattern as the previous one, but with much simpler arguments, since the sts for M-stores involves no decompositions. Actually, this sts is finitely branching, terminating, locally sound and locally complete. Therefore, Lemma 5 can be applied to ensure all the properties required for solvers, including unrestricted completeness. We end this subsection with the proof of Theorem 2, ensuring that the amalgamated sums presented in Subsection 2.5 are well defined domains behaving as a conservative extension of their components. On the Cooperation of the Constraint Domains H, R and F D in CF LP 99 Proof of Theorem 2 Assume S = D1 ⊕ · · ·⊕ Dn of signature Σ constructed as the amalgamated sum of n pairwise joinable domains Di of signatures Σi , 1 ≤ i ≤ n. Note that the information ordering ⊑ introduced in Subsection 2.2 has the same syntactic definition for any specific domain signature. Note also that any arguments concerning well typing needed for this proof can refer to the principal type declarations within signature Σ, which includes those within signature Σi for all 1 ≤ i ≤ n. Let us now prove the four claims of the theorem in order. 1. S is well-defined as a constraint domain; i.e., the interpretations of primitive function symbols p ∈ SP F in S satisfy the four conditions listed in Definition 1 from Subsection 2.3. We consider them one by one, assuming that p is not the primitive == except in the fourth condition. (a) Polarity: Assume p ∈ SP F m and tm , t′ m , t, t′ ∈ US such that pS tm → t, tm ⊑ t′ m and t ⊒ t′ . In case that t is ⊥, we trivially conclude pS t′ n → t′ because t′ must be also ⊥. Otherwise, by the first assumption and the definition of pS , there must be some 1 ≤ i ≤ n and some t′′ m , t′′ ∈ UDi such that t′′ m ⊑ tm , t′′ ⊒ t and pDi t′′ m → t′′ . Since t′′ m ⊑ tm ⊑ t′ m and t′′ ⊒ t ⊒ t′ , pDi t′′ m → t′′ implies pS t′ m → t′ by definition of pS . (b) Radicality: Assume p ∈ SP F m and tm , t ∈ US such that pS tm → t and t is not ⊥. By the definition of pS there must be some 1 ≤ i ≤ n and some t′′ m , t′′ ∈ UDi such that t′′ m ⊑ tm , t′′ ⊒ t and pDi t′′ m → t′′ . By the radicality condition for Di , there must be some total t′ ∈ UDi such that pDi t′′ m → t′ ⊒ t′′ . Note that t′ ⊒ t′′ ⊒ t, and because of t′′ m ⊑ tm and t′ ⊒ t′ , pDi t′′ m → t′ implies pS tm → t′ by definition of pS . (c) Well-typedness: Assume p ∈ SP F m , a monomorphic instance τ ′ m → τ ′ of p’s principal type and tm , t ∈ US such that Σ ⊢W T tm :: τ ′ m and pS tm → t. In case that t is ⊥, the type judgement Σ ⊢W T ⊥ :: τ ′ holds trivially. Otherwise, by the assumption pS tm → t and the definition of pS there exist 1 ≤ i ≤ n and t′ m , t′ ∈ UDi such that t′ m ⊑ tm , t′ ⊒ t and pDi t′ m → t′ . Moreover, since t′ m ⊑ tm the assumption Σ ⊢W T tm :: τ ′ m and the Type Preservation Lemma 1 imply Σ ⊢W T t′ m :: τ ′ m Then, the well-typedness assumption for Di guarantees Σ ⊢W T t′ :: τ ′ , which implies Σ ⊢W T t :: τ ′ because of t ⊑ t′ and Lemma 1. (d) Strict Equality: The primitive == (in case that it belongs to SP F ) is interpreted as strict equality over US . This is automatically guaranteed by the amalgamated sum construction. 2. Given an index 1 ≤ i ≤ n, a primitive function symbol p ∈ SP Fim and values tm , t ∈ UDi , we must prove: pDi tm → t iff pS tm → t. By definition of pS , we know that pS tm → t holds iff there are some t′ m , t′ ∈ UDi such that t′ m ⊑ tm , t′ ⊒ t and pDi t′ m → t′ . But this condition is equivalent to pDi tm → t because pDi satisfies the polarity property. 3. Given an index 1 ≤ i ≤ n, a set of primitive constraints Π ⊆ AP ConDi and a valuation η ∈ V alDi , we will prove: η ∈ SolDi (Π) ⇔ η ∈ SolS (Π). The corresponding 100 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado equivalence for the case of well-typed solutions follows then easily. Since η ∈ SolDi (Π) ⇔ ∀π ∈ Π : η ∈ SolDi (π) ⇔ ∀π ∈ Π : η ∈ SolS (π) ⇔ η ∈ SolS (Π) it suffices to prove the equivalence (⋆) η ∈ SolDi (π) ⇔ η ∈ SolS (π) for a fixed π ∈ Π. Note that π must have the form p tm →! t for some p ∈ SP Fim , tm ∈ P atDi and total t ∈ P atDi . In case that p is ==, (⋆) is trivially true because t1 η==Di t2 η →!tη and t1 η==S t2 η →!tη hold under the same conditions, as specified in Definition 1 from Subsection 2.3. In case that p is not ==, let t′ m = tm η and t′ = tη. If t′ is not a total pattern, then neither η ∈ SolDi (π) nor η ∈ SolS (π) hold. Otherwise, η ∈ SolDi (π) ⇔ pDi t′ m → t′ ⇔(⋆⋆) pS t′ m → t′ ⇔ η ∈ SolS (π) where the (⋆⋆) step holds by the second item of this theorem, because t′ m , t′ ∈ UDi . 4. Given an index 1 ≤ i ≤ n, a set of Di -specific primitive constraints Π ⊆ AP ConDi and a valuation η ∈ V alS , we will prove: η ∈ SolS (Π) ⇔ | η |Di ∈ SolDi (Π). The corresponding equivalence for the case of well-typed solutions follows then easily. First we prove η ∈ SolS (Π) ⇐ | η |Di ∈ SolDi (Π). Assume | η |Di ∈ SolDi (Π). Applying the previous item of this theorem, we obtain | η |Di ∈ SolS (Π). Since | η |Di ⊑ η, we can apply the Monotonicity Lemma 4 and get η ∈ SolS (Π), as desired. Now we prove η ∈ SolS (Π) ⇒ | η |Di ∈ SolDi (Π). Assume η ∈ SolS (Π). Since Π is Di -specific, we can also assume that η(X) ∈ UDi for all X ∈ var(Π). Then η(X) = | η |Di (X) holds for all X ∈ var(Π), and therefore | η |Di ∈ SolS (Π), which implies | η |Di ∈ SolDi (Π), again because of the previous item of this theorem. A.2 Properties of the CCLN C(D) Calculus The second part of the Appendix includes the proofs of the main results stated in Subection 3.6. First we present an auxiliary result which is not stated in the main text of the article. The (W T )Sol notation is intended to indicate that the lemma holds both for plain solutions and for well-typed solutions. Lemma 9 (Auxiliary Result for Checking Goal Solutions) Let G ≡ ∃U . P ✷ C ✷ M ✷ H ✷ F ✷ R be an admissible goal for a given CF LP (C)-program P. Assume new variables Y ′ away from U and the other variables in G, and two valuations µ, µ̂ ∈ V alC such that µ̂ =\U,Y ′ µ and µ̂ ∈ (W T )SolP (P ✷ C ✷ M ✷ H ✷ F ✷ R). Then µ ∈ (W T )SolP (G). Proof ˆ ∈ V alC univocally defined by the two conditions µ̂ ˆ = ′ µ̂ and µ̂ ˆ = ′ µ. Consider µ̂ \Y Y By hypothesis, µ̂ ∈ (W T )SolP (P ✷ C ✷ M ✷ H ✷ F ✷ R) and the variables Y ′ do ˆ ∈ (W T )SolP (P ✷ C ✷ M ✷ H ✷ F ✷ R) is ensured by not occur in G. Therefore, µ̂ ˆ the construction of µ̂. Recalling Definition 10 (see Subsection 3.6), we only need to On the Cooperation of the Constraint Domains H, R and F D in CF LP 101 ˆ = µ in order to conclude µ ∈ (W T )SolP (G). In fact, given any variable prove µ̂ \U ˆ / Y ′ . In the first case, µ̂(X) = µ(X) by construction X∈ / U , either X ∈ Y ′ or X ∈ ˆ ˆ ˆ and µ̂(X) = µ(X) of µ̂. In the second case, µ̂(X) = µ̂(X) by construction of µ̂ because of one of the hypothesis. Next we present the proof of Theorem 4 which guarantees local soundness and completeness for the one-step transformation of a given goal. Proof of Theorem 4 Assume a given program P, an admissible goal G for P which is not in solved form, and a rule RL applicable to a selected part γ of G. The claim that there are finitely many possible transformations G ⊢⊢RL,γ,P G′j (1 ≤ j ≤ k) can be trivially checked by inspecting all the rules in Tables 3, 4, 7 and 8 one by one. We must prove two additional claims: Sk 1. Local Soundness: SolP (G) ⊇ j=1 SolP (G′j ). Sk 2. Limited Local Completeness: W T SolP (G) ⊆ j=1 W T SolP (G′j ), provided that the application of RL to the selected part γ of G is safe, i.e. it is neither an opaque application of DC nor an application of a rule from Table 8 involving an incomplete solver invocation. Claims 1. and 2. must be proved for each RL separately. In case that RL is some of the rules displayed in Table 3, proving 1. and 2. involves building suitable witnesses as multisets of CRW L(C) proof trees, using techniques originally stemming from (González-Moreno et al. 1996; González-Moreno et al. 1999) and later extended to CF LP programs without domain cooperation in (López-Fraguas et al. 2004). In case that RL is some of the rules shown in Tables 4, 7 and 8, proving 1. and 2. requires almost no work with building witnesses. We will consider rules DF and FC as representatives for Table 3, and most of the rules from Tables 4, 7 and 8, which are the main novelty in this paper. When dealing with each rule RL, we will assume that G resp. G′j are exactly as the original resp. transformed goal as displayed in the presentation of RL in Subsection 3.2, 3.3 or 3.4. In our reasonings we will use the notation M : P ⊢CRW L(C) (P ✷ C)µ′ to indicate that the witness M is a multiset of CRW L(C) proof trees that prove (P ✷ C)µ′ from program P, using the inference rules of the CRW L(C) logic presented in (López-Fraguas et al. 2007). A.2.1 Selected rules from Table 3 Rule DF, Defined Function. In this case, γ is a production f en → t. 1. Local Soundness: Assume µ ∈ SolP (G′j ) for some 1 ≤ j ≤ k. Then there exists µ′ =\Y ,U µ such that µ′ ∈ SolP (en → tn , r → t, P ✷ C ′ , C ✷ M ✷ H ✷ F ✷ R). From this we deduce that µ′ ∈ SolC (M ✷ H ✷ F ✷ R) and M′ : P ⊢CRW L(C) (en → tn , r → t, P ✷ C ′ , C)µ′ for a suitable witness M′ . A part of M′ proves (en → tn , r → t, C ′ )µ′ , which allows to deduce (f en → t)µ′ using the CRW L(C) inference rule which deals with defined functions. Therefore, M′ can be used to build another witness M : P ⊢CRW L(C) (f en → t, P ✷ C)µ′ . Since µ′ =\U µ, we can conclude that µ ∈ SolP (G). 102 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 2. Limited Local Completeness: Assume µ ∈ W T SolP (G). Then there is some µ′ =\U µ such that µ′ ∈ W T SolP (f en → t, P ✷ C ✷ M ✷ H ✷ F ✷ R). Then, µ′ ∈ W T SolC (M ✷ H ✷ F ✷ R) and M : P ⊢CRW L(C) (f en → t, P ✷ C)µ′ for a suitable witness M. Note that M must include a CRW L(C) proof tree T proving the production (f en → t)µ′ using some instance of Rl : f tn → r ⇐ C ′ , suitably chosen as a variant of some P rule with new variables Y = var(Rl). Let us choose j so that G′j is the result of applying DF with f en → t as the selected part of G and Rl as the selected P rule for f . Consider a well typed µ′′ ∈ V alC that instantiates the variables in Y as required by the proof tree T , and instantiates any other variable V to µ′ (V ). By suitably reusing parts of M, it is possible to build a witness M′ : P ⊢CRW L(C) (en → tn , r → t, P ✷ C ′ , C)µ′′ . Since µ′′ =\Y ,U µ, we can conclude that µ ∈ W T SolP (G′j ). Rule FC, Flatten Constraint. In this case, γ is an atomic constraint p en →! t such that some ei is not a pattern and k = 1. We write G′ instead of G′1 . For the sake of simplicity, we consider p e1 t2 →! t, where e1 is not a pattern. The presentation of the rule is then as in Table 3 with n = 2, m = 1. 1. Local Soundness: Assume µ ∈ SolP (G′ ). Then there exists µ′ =\V1 ,U µ such that µ′ ∈ SolP (e1 → V1 , P ✷ p V1 t2 →! t, C ✷ M ✷ H ✷ F ✷ R). Then, we get µ′ ∈ SolC (M ✷ H ✷ F ✷ R) and M′ : P ⊢CRW L(C) (e1 → V1 , P ✷ p V1 t2 →! t, C)µ′ for a suitable witness M′ . A part of M′ proves (e1 → V1 , p V1 t2 →! t)µ′ , which allows to deduce (p e1 t2 →! t)µ′ using the CRW L(C) inference rule which deals with primitive functions. Therefore, M′ can be used to build another witness M : P ⊢CRW L(C) (P ✷ p e1 t2 →! t, C)µ′ . Since µ′ =\U µ, we can conclude that µ ∈ SolP (G). 2. Limited Local Completeness: Assume µ ∈ W T SolP (G). Then there is some µ′ =\U µ such that µ′ ∈ W T SolP (P ✷ p e1 t2 →! t, C ✷ M ✷ H ✷ F ✷ R). Then, µ′ ∈ W T SolC (M ✷ H ✷ F ✷ R) and M : P ⊢CRW L(C) (P ✷ p e1 t2 →! t, C)µ′ for a suitable witness M. Note that M must include a CRW L(C) proof tree T proving the atomic constraint (p e1 t2 →! t)µ′ . A part of T must prove a production of the form e1 µ′ → t1 for some suitable pattern t1 . Consider a well typed µ′′ ∈ V alC such that µ′′ (V1 ) = t1 and µ′′ =\V1 µ′ . By suitably reusing parts of M, it is possible to build a witness M′ : P ⊢CRW L(C) (e1 → V1 , P ✷ p V1 t2 →! t, C)µ′′ . Since µ′′ =\V1 ,U µ, we can conclude that µ ∈ W T SolP (G′ ). A.2.2 Rules from Table 4 Rule SB, Set Bridges. In this case, γ is a primitive atomic constraint π which can be used to compute bridges, and k = 1. We write G′ instead of G′1 . The application ′ of the rule computes ∃V ′ B ′ = bridgesD→D (π, BM ) 6= ∅, where D = F D and D′ = R or vice versa, according to the two cases (i) and (ii) explained in Table 4. 1. Local Soundness: Assume µ ∈ SolP (G′ ). Then there exists µ′ =\V ′ ,U µ such that µ′ ∈ SolP (P ✷ π, C ✷ M ′ ✷ H ✷ F ✷ R). Therefore, µ′ ∈ SolC (M ′ ✷ H ✷ F ✷ R) and M′ : P ⊢CRW L(C) (P ✷ π, C)µ′ for a suitable witness M′ . Since M ′ is B ′ , M , we get µ′ ∈ SolC (M ✷ H ✷ F ✷ R) and M′ : P ⊢CRW L(C) (P ✷ π, C)µ′ , which implies µ ∈ SolP (G) because of Lemma 9. On the Cooperation of the Constraint Domains H, R and F D in CF LP 103 2. Limited Local Completeness: Assume µ ∈ W T SolP (G). Then there is some µ′ =\U µ such that µ′ ∈ W T SolP (P ✷ π, C ✷ M ✷ H ✷ F ✷ R). Therefore, µ′ ∈ W T SolC (M ✷ H ✷ F ✷ R) and M : P ⊢CRW L(C) (P ✷ π, C)µ′ for a suitable witness M. Since π is primitive, these conditions imply µ′ ∈ W T SolC (π ∧ BM ). By item 2. of Proposition 1 from Subsection 3.3, we know that V ′ are new fresh variables and W T SolC (π ∧ BM ) ⊆ W T SolC (∃V ′ (π ∧ BM ∧ B ′ )). From this we can conclude that µ′ ∈ W T SolC (∃V ′ (π ∧ BM ∧ B ′ )) and therefore there is some µ′′ =\V ′ µ′ such that µ′′′ ∈ W T SolC (π∧BM ∧B ′ ). Since V ′ are new variables not occurring in G, it is easy to check that µ′′ ∈ W T SolC (M ′ ✷ H ✷ F ✷ R) and M : P ⊢CRW L(C) (P ✷ π, C)µ′′ , which ensures µ ∈ W T SolP (G′ ). Rule PP, Propagate Projections. In this case, γ is a primitive atomic constraint π which can be used to compute projections, and k = 1. We write G′ instead of G′1 . The application of the rule obtains G′ from G by computing ∃V ′ Π′ = ′ proj D→D (π, BM ) 6= ∅, where D = F D and D′ = R or vice versa, according to the two cases (i) and (ii) explained in Table 4. The reasonings for local soundness and limited local completeness are quite similar to those used in the case of rule SB, except that item 3. of Proposition 1 must be used in place of item 2. Rule SC, Submit Constraints. In this case, γ is a primitive atomic constraint π and k = 1. We write G′ instead of G′1 . 1. Local Soundness: Assume µ ∈ SolP (G′ ). Then there exists µ′ =\U µ such that µ′ ∈ SolP (P ✷ C ✷ M ′ ✷ H ′ ✷ F ′ ✷ R′ ). Therefore, µ′ ∈ SolC (M ′ ✷ H ′ ✷ F ′ ✷ R′ ) and M′ : P ⊢CRW L(C) (P ✷ C)µ′ for a suitable witness M′ . Due to the syntactic relationship between G and G′ (see Table 4), µ′ ∈ SolC (M ′ ✷ H ′ ✷ F ′ ✷ R′ ) amounts to µ′ ∈ SolC (M ✷ H ✷ F ✷ R) and µ′ ∈ SolC (π). Due to µ′ ∈ SolC (π), the witness M′ can be expanded to another witness M : P ⊢CRW L(C) (P ✷ π, C)µ′ . Thanks to this new witness we obtain µ′ ∈ SolP (P ✷ π, C ✷ M ✷ H ✷ F ✷ R) and thus µ ∈ SolP (G). 2. Limited Local Completeness: Assume µ ∈ W T SolP (G). Then there is some µ′ =\U µ such that µ′ ∈ W T SolP (P ✷ π, C ✷ M ✷ H ✷ F ✷ R). Therefore, µ′ ∈ W T SolC (M ✷ H ✷ F ✷ R) and M : P ⊢CRW L(C) (P ✷ π, C)µ′ for a suitable witness M. Because of the syntactic relationship between G and G′ and the fact that π is primitive, we can conclude that µ′ ∈ W T SolC (M ′ ✷ H ′ ✷ F ′ ✷ R′ ). Let M′ be the witness constructed from M by omitting the CRW L(C) proof tree for πµ′ which is part of M. Then M′ : P ⊢CRW L(C) (P ✷ C)µ′ . This allows to conclude µ′ ∈ W T SolP (P ✷ C ✷ M ′ ✷ H ′ ✷ F ′ ✷ R′ ) and thus µ ∈ W T SolP (G′ ). A.2.3 Rules from Table 7 Rule IE, Infer Equalities. This rule includes two similar cases. Here we will treat only the first one, the second one being completely analogous. The selected part γ is a pair of bridges of the form X #== RX, X ′ #== RX and k = 1. We write G′ instead of G′1 . 104 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado 1. Local Soundness: Assume µ ∈ SolP (G′ ). Then there exists µ′ =\U µ such that µ′ ∈ SolP (P ✷ C ✷ X #== RX, M ✷ H ✷ X == X ′ , F ✷ R). This implies two facts: firstly, M′ : P ⊢CRW L(C) (P ✷ C)µ′ for a suitable witness M′ ; and secondly, µ′ ∈ SolC (X #== RX, M ✷ H ✷ X == X ′ , F ✷ R). The second fact clearly implies µ′ ∈ SolC (X #== RX, X ′ #== RX, M ✷ H ✷ F ✷ R). Along with the witness M′ , this condition guarantees µ′ ∈ SolP (P ✷ C ✷ X #== RX, X ′ #== RX, M ✷ H ✷ F ✷ R) and hence µ ∈ SolP (G). 2. Limited Local Completeness: Assume µ ∈ W T SolP (G). Then there is some µ′ =\U µ such that µ′ ∈ W T SolP (P ✷ C ✷ X #== RX, X ′ #== RX, M ✷ H ✷ F ✷ R). This implies two facts: firstly, M : P ⊢CRW L(C) (P ✷ C)µ′ for a suitable witness M; and secondly, µ′ ∈ W T SolC (X #== RX, X ′ #== RX, M ✷ H ✷ F ✷ R). The second fact clearly implies µ′ ∈ W T SolC (X #== RX, M ✷ H ✷ X == X ′ , F ✷ R). Then, µ′ ∈ W T SolP (P ✷ C ✷ X #== RX, M ✷ H ✷ X == X ′ , F ✷ R) holds thanks to the same witness M, and therefore µ ∈ SolP (G′ ). Rule ID, Infer Disequalities. This rule includes two similar cases. Here we consider only the first one, the second one being completely analogous. The selected part γ is an antibridge of the form X #/== u′ placed within the M store, and k = 1. We write G′ instead of G′1 . The application of the rule obtains G′ from G by dropping X #/== u′ from M and adding a semantically equivalent disequality constraint X /= u to the F store. The reasonings for local soundness and limited local completeness are very similar to those used in the case of rule IE. A.2.4 Rules from Table 8 Here we present only the proofs concerning the two rules FS and SF. Note that the soundness and completeness properties of the F D solver refer to valuations over the universe UF D , that must be related to valuations over the universe UC by means of Theorem 2 from Subsection 2.5, as we will see below. The same technique can be applied to the rules MS and RS. Rule HS can be also handled similarly to FS, but in this case Theorem 2 is not needed because the soundness and completeness properties of the extensible H-solver refer directly to valuations over the universe UC . Rule FS F D-Constraint Solver (black-box). The selected part γ is the F D-store F. 1. Local Soundness: Let us choose G′ as one of the finitely many goals G′j such that G ⊢⊢FS,γ,P G′j . Then G′ = ∃Y ′ , U .(P ✷ C ✷ M ✷ H ✷ (Π′ ✷ σF ) ✷ R)@F D σ ′ for some ∃Y ′ (Π′ ✷ σ ′ ) chosen as one of the alternatives computed by the F D-solver, i.e. such that ΠF ⊢⊢solveFD ∃Y ′ (Π′ ✷ σ ′ ). Assume now µ ∈ SolP (G′ ). Then there exists µ′ =\Y ′ ,U µ such that µ′ ∈ SolP ((P ✷ C ✷ M ✷ H ✷ (Π′ ✷ σF ) ✷ R)@F D σ ′ ) for some ∃Y ′ (Π′ ✷ σ ′ ) such that ΠF ⊢⊢solveFD ∃Y ′ (Π′ ✷ σ ′ ). Since Π′ ✷ σ ′ is a store, we can assume Π′ σ ′ = Π′ and deduce the following conditions: (0) M′ : P ⊢CRW L(C) (P ✷ C)σ ′ µ′ for a suitable witness M′ On the Cooperation of the Constraint Domains H, R and F D in CF LP 105 (1) µ′ ∈ SolC (ΠM σ ′ ✷ σM ⋆ σ ′ ) (2) µ′ ∈ SolC (ΠH σ ′ ✷ σH ⋆ σ ′ ) (3) µ′ ∈ SolC (Π′ σ ′ ✷ σF σ ′ ), where Π′ σ ′ = Π′ (4) µ′ ∈ SolC (ΠR σ ′ ✷ σR ⋆ σ ′ ) In particular, (3) implies µ′ ∈ Sol(σF σ ′ ), i.e. (5) σF σ ′ µ′ = µ′ In order to conclude that µ ∈ SolP (G), we show that the hypothesis of the auxiliary Lemma 9 hold for µ̂ = µ′ . Clearly, µ̂ =\U ,Y ′ µ and the new variables Y ′ are away from U and the other variables in G. We still have to prove that µ′ ∈ SolP (P ✷ C ✷ M ✷ H ✷ F ✷ R). • Proof of µ′ ∈ SolP (P ✷ C): Due to the invariant properties of admissible goals, (P ✷ C) = (P ✷ C)σF . Using this equality and (5) we get (P ✷ C)σ ′ µ′ = (P ✷ C)σF σ ′ µ′ = (P ✷ C)µ′ . Therefore, M′ : P ⊢CRW L(C) (P ✷ C)µ′ follows from (0). • Proof of µ′ ∈ SolC (S), S being any of the stores M , H, R: According to the choice of S we can use (1), (2) or (4) to conclude (6) µ′ ∈ SolC (ΠS σ ′ ) and (7) µ′ ∈ Sol(σS ⋆ σ ′ ) i.e. (σS ⋆ σ ′ )µ′ = µ′ — Proof of µ′ ∈ SolC (ΠS ): Due to the invariant properties of admissible goals, ΠS = ΠS σF . Then (6) is equivalent to µ′ ∈ SolC (ΠS σF σ ′ ). By applying the Substitution Lemma 3 we deduce σF σ ′ µ′ ∈ SolC (ΠS ), which amounts to µ′ ∈ SolC (ΠS ) because of (5). — Proof of µ′ ∈ Sol(σS ): Assume any variable X ∈ vdom(σS ). Then Xµ′ = XσS σ ′ µ′ = XσS σF σ ′ µ′ = XσS µ′ where the first equality holds because of (7), the second equality holds because the admissibility properties of G guarantee σS ⋆ σF = σS , and the third equality holds because of (5). • Proof of µ′ ∈ SolC (F ): First, we claim that (8) | σ ′ µ′ |F D ∈ Sol(σ ′ ) i.e. σ ′ | σ ′ µ′ |F D = | σ ′ µ′ |F D To prove the claim, assume any X ∈ vdom(σ ′ ). Because of Postulate 2 there are two possible cases: (a) σ ′ (X) is an integer value n. Then: Xσ ′ | σ ′ µ′ |F D = n = | Xσ ′ µ′ |F D = X | σ ′ µ′ |F D (b) X ∈ var(ΠF ) and σ ′ (X) is a variable X ′ ∈ var(ΠF ). Then σ ′ (X ′ ) = X ′ because σ ′ is idempotent, and: Xσ ′ | σ ′ µ′ |F D = X ′ | σ ′ µ′ |F D = | X ′ σ ′ µ′ |F D = | X ′ µ′ |F D = | Xσ ′ µ′ |F D = X | σ ′ µ′ |F D We continue our reasoning using (8). — Proof of µ′ ∈ SolC (ΠF ): From (3) and the Substitution Lemma 3 we get 106 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado σ ′ µ′ ∈ SolC (Π′ ). Because of Postulate 2 we can assume that all the constraints belonging to Π′ are F D-specific. Then, item 4. of Theorem 2 can be applied to conclude | σ ′ µ′ |F D ∈ SolF D (Π′ ). Using (8) we get | σ ′ µ′ |F D ∈ SolF D (Π′ ✷ σ ′ ), which trivially implies | σ ′ µ′ |F D ∈ SolF D (∃Y ′ (Π′ ✷ σ ′ )). Because of the soundness property of the F D-solver (see Definition 6 and Postulate 2) we obtain | σ ′ µ′ |F D ∈ SolF D (ΠF ). Applying again item 4. of Theorem 2, we get σ ′ µ′ ∈ SolC (ΠF ). Since ΠF ✷ σF is a store, ΠF = ΠF σF and therefore σ ′ µ′ ∈ SolC (ΠF σF ). Then, the Substitution Lemma 3 yields σF σ ′ µ′ ∈ SolC (ΠF ), which is the same as µ′ ∈ SolC (ΠF ) because of (5). — Proof of µ′ ∈ Sol(σF ): µ′ = σF µ′ follows from the following chain of equalities, which relies on (5) and the idempotency of σF : µ′ = σF σ ′ µ′ = σF σF σ ′ µ′ = σF µ′ 2. Limited Local Completeness: At this point we assume that rule FS can be applied to G in a safe way, i.e. that the solver invocation solveF D (ΠF ) satisfies the completeness property for solvers stated in Definition 6 (see Subsection 2.4.1). Assume µ ∈ W T SolP (G). Then there is some µ′ =\U µ such that µ′ ∈ W T SolP (P ✷ C ✷ M ✷ H ✷ F ✷ R). Consequently, we can assume: (9) (P ✷ C)µ′ is well-typed and M : P ⊢CRW L(C) (P ✷ C)µ′ for some witness M (10) µ′ ∈ W T SolC (M ) (11) µ′ ∈ W T SolC (H) (12) µ′ ∈ W T SolC (F ) (13) µ′ ∈ W T SolC (R) In particular, (12) implies µ′ ∈ W T SolC (ΠF ). Thanks to Postulate 2 we can assume that ΠF is F D-specific and apply item 4 of Theorem 2 to conclude | µ′ |F D ∈ W T SolF D (ΠF ). By completeness of the solver invocation solveF D (ΠF ) there is some alternative ∃Y ′ (Π′ ✷ σ ′ ) computed by the solver (i.e. such that ΠF ⊢⊢solveFD ∃Y ′ (Π′ ✷ σ ′ )) verifying (14) | µ′ |F D ∈ W T SolF D (∃Y ′ (Π′ ✷ σ ′ )) Then G′ = ∃Y ′ , U .(P ✷ C ✷ M ✷ H ✷ (Π′ ✷ σF ) ✷ R)@F D σ ′ is one of the the finitely many goals G′j such that G ⊢⊢FS,γ,P G′j . In the rest of the proof we will show that µ ∈ W T SolP (G′ ) by finding µ′′ =\Y ′ ,U µ such that (†) µ′′ ∈ SolP ((P ✷ C ✷ M ✷ H ✷ (Π′ ✷ σF ) ✷ R)@F D σ ′ ) ˆ ∈ V alF D such that Because of (14) there is µ̂ ˆ ∈ W T SolF D (Π′ ✷ σ ′ ) (15) | µ′ |F D =\Y ′ µ̂ ˆ and µ′′ = ′ µ′ . Let µ′′ ∈ V alC be univocally defined by the conditions µ′′ =Y ′ µ̂ \Y ˆ because µ′ , it follows that µ′′ = ′ µ. Moreover, | µ′′ |F D = µ̂, Since µ = \U \Y ,U for any variable X ∈ Var there are two possible cases: either X ∈ Y ′ and then ˆ |F D (X) = µ̂(X), ˆ ˆ ∈ V alF D ; or else X ∈ | µ′′ |F D (X) = | µ̂ since µ̂ / Y ′ and ′′ ′ ′ ˆ ˆ then | µ |F D (X) = | µ |F D (X) = µ̂(X), since | µ |F D =\Y ′ µ̂. From (15) and ˆ we obtain µ′′ ∈ W T SolF D (Π′ ) by applying item 4 of Theorem 2. We | µ′′ |F D = µ̂ On the Cooperation of the Constraint Domains H, R and F D in CF LP 107 now claim: (16) µ′′ ∈ W T SolF D (Π′ ✷ σ ′ ) To justify this claim it is sufficient to prove µ′′ ∈ Sol(σ ′ ), i.e. σ ′ µ′′ = µ′′ . In order to prove this let us assume any X ∈ vdom(σ ′ ). Because of Postulate 2, there are two possible cases: ˆ ∈ Sol(σ ′ ) and therefore (a) σ ′ (X) is an integer value n. From (15) we know µ̂ ′′ ′′ ˆ it follows that µ (X) = n, and then Xσ ′ µ′′ = ˆ µ̂(X) = n. Since | µ |F D = µ̂, n = Xµ′′ . (b) X ∈ var(ΠF ) and σ ′ (X) is a variable X ′ ∈ var(ΠF ). Then: Xσ ′ µ′′ = X ′ µ′′ = X ′ µ′ (using µ′′ =\Y ′ µ′ and X ′ ∈ / Y ′) ′ ′ = | X µ |F D (using the fact that ΠF is F D-specific and (12)) = X ′ | µ ′ |F D ˆ (using (15) and X ′ ∈ / Y ′) = X ′ µ̂ ′ˆ ˆ (using (15)) = Xσ µ̂ = X µ̂ = X | µ ′ |F D (using (15) and X ∈ / Y ′) ′ ′ = | Xµ |F D = Xµ (using the fact that ΠF is F D-specific and (12)) = Xµ′′ (using µ′′ =\Y ′ µ′ and X ∈ / Y ′) We are now in a position to prove (†), thereby finishing the proof: • Proof of µ′′ ∈ W T SolP (P ✷ C)σ ′ : Because of the Substitution Lemma 3, this is equivalent to σ ′ µ′′ ∈ W T SolP (P ✷ C). Because of (16), σ ′ µ′′ = µ′′ . Since µ′ =\Y ′ µ′′ and the variables Y ′ do not occur in P ✷ C, µ′′ ∈ W T SolP (P ✷ C) is equivalent to µ′ ∈ W T SolP (P ✷ C), which is ensured by the same witness M given by (9). • Proof of µ′′ ∈ W T SolC (S ⋆ σ ′ ), S being any of the stores M , H, R: According to the choice of S we can use (10), (11) or (13) to conclude (17) µ′ ∈ W T SolC (ΠS ) and (18) µ′ ∈ Sol(σS ) i.e. σS µ′ = µ′ — Proof of µ′′ ∈ W T SolC (ΠS σ ′ ): Since µ′′ =\Y ′ µ′ and the variables Y ′ do not occur in ΠS , (17) implies µ′′ ∈ W T SolC (ΠS ), which is equivalent to σ ′ µ′′ ∈ W T SolC (ΠS ) because of (16). Then, µ′′ ∈ W T SolC (ΠS σ ′ ) follows from the Substitution Lemma 3. — Proof of µ′′ ∈ W T Sol(σS ⋆ σ ′ ): Assume any variable X ∈ vdom(σS ). Then XσS σ ′ µ′′ = XσS µ′′ = XσS µ′ = Xµ′ = Xµ′′ where the first equality holds because of (16), the second equality holds because µ′′ =\Y ′ µ′ and the variables Y ′ do not occur in XσS , the third equality holds because of (18), and the fourth equality holds because µ′′ =\Y ′ µ′ and the variables Y ′ do not include X. • Proof of µ′′ ∈ W T SolC (Π′ σ ′ ✷ σF σ ′ ): — Proof of µ′′ ∈ W T SolC (Π′ σ ′ ): This is a trivial consequence of (16), since Π′ σ ′ = Π′ (because Π′ ✷ σ ′ is a store). 108 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado — Proof of µ′′ ∈ Sol(σF σ ′ ): Because of (16) we can assume that µ′′ ∈ Sol(σ ′ ), i.e. σ ′ µ′′ = µ′′ . We must prove σF σ ′ µ′′ = µ′′ . Assume any variable X ∈ vdom(σF σ ′ ). Because of the invariant properties of admissible goals, there are three possible cases: (a) X ∈ vdom(σF ) and σF (X) is an integer value n. Because of (12), we know that µ′ ∈ Sol(σF ) and hence XσF µ′ = n = Xµ′ . Moreover, Xµ′′ = Xµ′ = n because µ′′ =\Y ′ µ′ and the variables Y ′ do not include X. Then we can conclude that XσF σ ′ µ′′ = n = Xµ′′ . (b) X ∈ vdom(σF ) and σF (X) = X ′ ∈ var(ΠF ). Then: XσF σ ′ µ′′ = X ′ σ ′ µ′′ = X ′ µ′′ (using (16)) / Y ′) = X ′ µ′ (using µ′′ =\Y ′ µ′ and X ′ ∈ ′ ′ = XσF µ = Xµ (using (12)) / Y ′) = Xµ′′ (using µ′′ =\Y ′ µ′ and X ∈ (c) X ∈ / vdom(σF ). Then XσF = X, and we can use µ′′ ∈ Sol(σ ′ ) to deduce that XσF σ ′ µ′′ = Xσ ′ µ′′ = Xµ′′ . Rule SF, Solving Failure. The selected part γ is one of the four stores of the goal, the number k of possible transformations G ⊢⊢RL,γ,P G′j of G into a non-failed goal Sk G′j is 0, and therefore j=1 W T SolP (G′j ) = ∅. 1. Local Soundness: The inclusion SolP (G) ⊇ ∅ holds trivially. 2. Limited Local Completeness: The inclusion W T SolP (G) ⊆ ∅ is equivalent to W T SolP (G) = ∅. In order to prove this, we assume that the application of SF to G has relied on a complete invocation of the D solver. Since the invocation of the solver has failed (i.e., ΠS ⊢⊢solveD ) but it is assumed to be complete, we X know that W T SolD (ΠS ) = ∅. From this we can conclude W T SolC (ΠS ) = ∅, using item 4 of Theorem 2 in case that D is not H. Finally, W T SolP (G) = ∅ is a trivial consequence of W T SolC (ΠS ) = ∅. A.2.5 Proof of the Progress Lemma In this Subsection we prove the Progress Lemma 6 used in Subsection 3.6 to obtain the Global Completeness Theorem 6. First, we define a well-founded progress ordering ⊲ between pairs (G, M) formed by an admissible goal G without free occurrences of higher-order variables and a witness M = {T1 , . . . , Tn } for the fact that µ ∈ SolP (G). Given such a pair, we define a 7-tuple ||(G, M)|| =def (O1 , O2 , O3 , O4 , O5 , O6 , O7 ) (where O1 is a finite multiset of natural numbers and O2 , . . . , O7 are natural numbers) as follows: O1 is the restricted size of the witness M, defined as the multiset of natural numbers {| T1 |, . . . , | Tn |}, where | Ti | (1 ≤ i ≤ n) denotes the restricted size of the CRW L(C) proof tree Ti as defined in (López-Fraguas et al. 2007), namely as the number of nodes in Ti corresponding to CRW L(C) inference steps that depend on the meaning of primitive functions p (as interpreted in On the Cooperation of the Constraint Domains H, R and F D in CF LP 109 O2 O3 O4 O5 O6 O7 the coordination domain C) plus the number of nodes in Ti corresponding to CRW L(C) inference steps that depend on the meaning of user-defined functions f (according to the current program P). is the sum of ||p en || for all the total applications p en of primitive functions p ∈ P F n occurring in the parts P and C of G, where ||p en || is defined as the number of argument expressions ei (1 ≤ i ≤ n) that are not patterns. is the number of occurrences of rigid and passive expressions h en that are not patterns in the productions P of G. is the sum of the syntactic sizes of the right hand sides of all the productions occurring in P . is the sum sf M + sf H + sf F + sf R of the solvability flags of the four constraint stores occurring in G. The solvability flag sf M takes the value 1 if rule MS from Table 8 can be applied to G, and 0 otherwise. The other three flags are defined analogously. is the number of bridges occurring in the mediatorial store M of G. is the number of antibridges occurring in the mediatorial store M of G. Let >lex be the lexicographic product of the 7 orderings >i (1 ≤ i ≤ 7), where >1 is the multiset ordering >mul over multisets of natural numbers, and >i is the ordinary ordering > over natural numbers for 2 ≤ i ≤ 7. Finally, let us define the progress ordering ⊲ by the condition (G, M) ⊲ (G′ , M′ ) iff ||(G, M)|| >lex ||(G′ , M′ )||. As proved in (Baader and Nipkow 1998), >mul is a well-founded ordering and the lexicographic product of well-founded orderings is again a well-founded ordering. Therefore, ⊲ is well-founded. Now we can prove the Progress Lemma 6. Proof of Lemma 6 Consider an admissible goal G ≡ ∃U . P ✷ C ✷ M ✷ H ✷ F ✷ R for a program P, a well-typed solution µ ∈ W T SolP (G) and a witness M for the fact that µ ∈ SolP (G). Assume that neither P nor G have free occurrences of higher-order variables, and that G is not in solved form. 1. Let us prove that there must be some rule RL applicable to G which is not a failure rule. Since G is not in solved form, we know that either P 6= ∅ , or else C 6= ∅, or else some of the transformations displayed in Tables 7 and 8 can be applied to G. Note that CF cannot be applied to G because G has got solutions. Moreover, if the failing rule SF would be applicable to G, then some of the other rules in Table 8 would be applicable also. Let PR be the set of those transformation rules displayed in Table 3 which are different of CF, EL and FC. In the following items we analyze different cases according to the from of G. In each case we either find some rule RL that can be applied to G or we make some assumption that can be used to reason in the subsequent cases. In the last item we conclude that rule EL can be applied, if no previous item has allowed to prove the applicability of another rule. (a) If some of the transformation rules in Tables 7 and 8 can be applied to G, then we are ready. In the following items we assume that this is not the case. 110 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado (b) If P 6= ∅ and some rule RL ∈ PR can be applied to G, then we are ready. In the following items we assume that this is not the case. (c) Due to the hypothesis that G has no free occurrences of higher-order variables, from this point on we can assume that each production occurring in P must have one of the three following forms: i h em → X, with h em passive but not a pattern. ii f en ak → X, with f ∈ DF n and k ≥ 0. iii p en → X, with p ∈ P F n . (d) (e) (f) (g) If this were not the case, then P would include some production e → t of some other form, and a simple case analysis of the syntactic form of e → t would lead to the conclusion that some rule RL ∈ PR could be applied to it. If C 6= ∅ and includes some atomic constraint α that is not primitive, then the rule FC from Table 3 can be applied to α, and we are ready. In the following items we assume that this is not the case. If C 6= ∅ and only includes primitive atomic constraints π, then at least rule rule SC from Table 4 (and maybe also rules SB and PP) can be applied to G taking π as the selected part, and we are ready. In the following items we assume that C = ∅. At this point, if there would be some variable X ∈ pvar(P ) ∩ odvar(G), this X would be the right-hand side of some production in P with one of the three forms i, or ii or iii displayed in item (c) above, and one of the three rules IM or DF or PC could be applied, which contradicts the assumptions made at item (b). From this point on, we can assume that pvar(P ) ∩ odvar(G) = ∅. Let S = ΠS ✷ σS be any of the four stores, let D be the corresponding domain, and let χ = pvar(P ) ∩ var(ΠS ). Because of the assumptions made at item (a), S must be in χ-solved form and the discrimination property of the solver solveD ensures that one of the two following conditions must hold: i χ ∩ odvarD (ΠS ) 6= ∅, i.e. pvar(P ) ∩ var(ΠS ) ∩ odvarD (ΠS ) 6= ∅. ii χ ∩ varD (ΠS ) = ∅, i.e. pvar(P ) ∩ var(ΠS ) = ∅. Since i contradicts the assumption pvar(P ) ∩ odvar(G) = ∅ made at item (f), ii must hold for the four stores. On the other hand, the invariant properties of admissible goals guarantee that produced variables cannot occur in the answer substitutions σS . (h) At this point, because of the assumptions made at the previous items, we can assume that C = ∅, the four stores are in solved form and include no produced variables, and all the productions occurring in P have the form e → X, where X is a variable. Since G is not solved, it must be the case that P 6= ∅. Note that pvar(P ) is finite and not empty. Moreover, the transitive closure ≫+ P of the production relation ≫P between produced variables must be irreflexive, due to the invariant properties of admissible goals. Therefore, there is some production (e → X) ∈ P such that X is minimal w.r.t. ≫P . The variable X cannot occur in e because this would imply X ≫P X, con′ ′ tradicting the irreflexivity of ≫+ P . For any other production (e → X ) ∈ P , ′ X must be different of X because of the invariant properties of admissible On the Cooperation of the Constraint Domains H, R and F D in CF LP 111 goals, and X cannot occur in e′ because this would imply X ≫P X ′ , contradicting the minimality of X w.r.t. ≫P . Moreover, X cannot occur in the stores because they include no produced variables. Therefore, X does not occur in the rest of the goal, and the rule EL can be applied to eliminate e → X. 2. Assume now any choice of a rule RL (not a failure rule) and a part γ of G, such that RL can be applied to γ in a safe manner, i.e. involving neither an opaque application of DC nor an incomplete solver invocation. We must prove the existence of a ′ ′ ′ finite computation G ⊢⊢+ RL,γ,P G and a witness M : µ ∈ W T SolP (G ) such that ′ ′ (G, M) ⊲ (G , M ). Due to the Limited Local Completeness of CCLN C(C) (Theorem 4, item 2.), there is one step G ⊢⊢RL,γ,P G′1 such that M′ : µ ∈ W T SolP (G′ ) with a witness M′ constructed as we have sketched in the proof of Theorem 4. We define the desired finite computation by distinction of cases, as follows: (a) If RL is different from the two rules SB and PP, then the finite computation is chosen as G ⊢⊢RL,γ,P G′1 and G′ is G′1 . (b) If RL is SB and PP is applicable to γ, then the finite computation is chosen as G ⊢⊢SB,γ,P G′1 ⊢⊢PP,γ,P G′2 ⊢⊢SC,γ,P G′3 and G′ is G3 . (c) If RL is SB and PP is not applicable to γ, then the finite computation is chosen as G ⊢⊢SB,γ,P G′1 ⊢⊢SC,γ,P G′2 and G′ is G2 . (d) If RL is PP and SB is applicable to γ, then the finite computation is chosen as G ⊢⊢PP,γ,P G′1 ⊢⊢SB,γ,P G′2 ⊢⊢SC,γ,P G′3 and G′ is G3 . (e) If RL is PP and SB is not applicable to γ, then the finite computation is chosen as G ⊢⊢PP,γ,P G′1 ⊢⊢SC,γ,P G′2 and G′ is G2 . Note that cases (b), (c), (d), and (e) above refer to the rules in Table 4. In all these cases, the Limited Local Completeness of CCLN C(C) allows to find all the computation steps and a witness M′ : µ ∈ W T SolP (G′ ). In all the cases, we claim that (G, M) ⊲ (G′ , M′ ), i.e. ||(G, M)|| >lex ||(G′ , M′ )||. This can be justified by Table A 2. Each file of this table corresponds to a possibility for the rule RL used ′ in a one-step finite computation G ⊢⊢+ RL,γ,P G of type (a), except for one file which + corresponds to a finite computation G ⊢⊢RL,γ,P G′ of type (b), (c), (d) or (e). Each column 1 ≤ i ≤ 7 shows the variation in Oi according to >i when going from ||(G, M)|| to ||(G′ , M′ )|| by means of the corresponding finite computation. For instance, the file for IE shows that the application of this rule does not increase Oi for 1 ≤ i ≤ 5 and decreases O6 . It only remains to show that the information displayed in Table A 2 is correct. Here we limit ourselves to explain the key ideas. A more precise proof could be presented on the basis of a more detailed construction of the witnesses M′ : µ ∈ W T SolP (G′ ). • For every rule RL, the application of RL does not increase O1 , as shown by the first column of the table. This happens because the witness M′ can be constructed from M in such a way that all the inference steps within M′ dealing with primitive and defined functions are borrowed from M. • The application of any of the rule DF strictly decreases O1 , as seen in the table. The reason is that the witness M includes a CRW L(C) proof tree T 112 Estévez, Fernández, Hortalá, Rodrı́guez, Sáenz and del Vado RULES O1 O2 O3 O4 O5 O6 DC ≥mul ≥ ≥ > SP ≥mul ≥ ≥ > IM ≥mul ≥ > EL ≥mul ≥ ≥ > DF >mul PC ≥mul ≥ ≥ > FC ≥mul > (b),(c),(d),(e) >mul IE ≥mul ≥ ≥ ≥ ≥ > ID ≥mul ≥ ≥ ≥ ≥ ≥ MS ≥mul ≥ ≥ ≥ > HS ≥mul ≥ ≥ ≥ > FS ≥mul ≥ ≥ ≥ > RS ≥mul ≥ ≥ ≥ > O7 > Table A 2. Well-founded progress ordering ⊲ for CCLN C(C) for an appropriate instance of a production of the form f en → t. The root inference of this proof tree contributes to the restricted size of M and disappears in the witness M′ constructed from M as sketched in Subsection A.2.1. Therefore, the restricted size of M′ decreases by one w.r.t. the restricted size of M. • The table also shows that finite computations of type (b), (c), (d) or (e) strictly decrease O1 . The reason is that such finite computations always work with a fixed primitive atomic constraint π which is ultimately moved from the constraint pool C of G to one of the stores in G′ when performing the last SC computation step. The witness M : µ ∈ W T SolP (G) includes a CRW L(C) proof tree for an appropriate instance of π, while no corresponding proof tree is needed in the witness M′ . Therefore, the restricted size of M′ decreases by some positive amount. • The application of rule FC decrements O2 , because G includes a production p en → t with ||p en || > 0, which is replaced in G′ by a primitive atomic constraint p tn →! t with ||p tn || = 0 and some new productions ei → Vi whose contribution to the O2 measure of G′ must be smaller than ||p en ||. On the Cooperation of the Constraint Domains H, R and F D in CF LP 113 • The application of rule IE decreases O6 and does not increment Oi for 1 ≤ i ≤ 5. This is because in this case the witness M′ can be chosen as M itself, the measures O2 , O3 , O4 and O5 are obviously not affected by IE, and the measure O6 obviously decreases by 1 when IE is applied. • Because of similar reasons, the application of rule ID decreases O7 and does not increment Oi for 1 ≤ i ≤ 6. • Let RL be any of the four constraint solving transformations MS, HS, FS and RS. The witness M′ : µ ∈ W T SolP (G′ ) can be guaranteed to exist only if the solver invocation has been a complete one. In this case, M′ can be chosen as the same witness M, and therefore the O1 measure does not increase when going from G to G′ . Measures O2 , O3 and O4 are not affected by the bindings created by the solver invocations (since they substitute patterns for variables). Measure O5 obviously decreases, since the solvability flag sf S for the store that has been solved descends from 1 to 0.
6cs.PL
Revisiting Temporal Markov Processes for Transport in Porous Media: Random Lattice Networks Amir H. Delgoshaiea,∗, Patrick Jennyb , Hamdi A. Tchelepia a Department of Energy Resources Engineering, Stanford University, Stanford, CA, USA of Fluid Dynamics, ETH Zürich, Zürich, Switzerland arXiv:1708.04173v1 [physics.comp-ph] 10 Aug 2017 b Institute Abstract Monte Carlo (MC) simulations of transport in random porous networks indicate that for high variances of the lognormal permeability distribution, the transport of a passive tracer is non-Fickian. Here we model this non-Fickian dispersion in random porous networks using discrete temporal Markov models. We show that such temporal models capture the spreading behavior accurately. This is true despite the fact that the slow velocities are strongly correlated in time, and some studies have suggested that the persistence of low velocities would render the temporal Markovian model inapplicable. Compared to previously proposed temporal stochastic differential equations with case specific drift and diffusion terms, the models presented here require fewer modeling assumptions. Moreover, we show that discrete temporal Markov models can be used to represent dispersion in unstructured networks, which are widely used to model porous media. A new method is proposed to extend the state space of temporal Markov models to improve the model predictions in the presence of extremely low velocities in particle trajectories and extend the applicability of the model to higher temporal resolutions. Finally, it is shown that by combining multiple transitions, temporal models are more efficient for computing particle evolution compared to correlated CTRW with spatial increments that are equal to the lengths of the links in the network. Keywords: anomalous transport, Markov models, stochastic transport modeling, stencil method 1. Introduction Modeling transport in porous media is highly important in various applications including water resources management and extraction of fossil fuels. Predicting flow and transport in aquifers and reservoirs plays an important role in managing these resources. A significant factor influencing transport is the heterogeneity of the flow field, which results from the underlying heterogeneity of the conductivity field. Transport in such heterogeneous domains displays non-Fickian characteristics such as long tails for the first arrival time probability density function (PDF) and non-Gaussian spatial distributions (Berkowitz et al., 2006; Bouchaud and Georges, 1990; Edery et al., 2014). Capturing this non-Fickian behavior is particularly important for predictions of contaminant transport in water resources. For example, in water resources management long tails of the arrival time PDF can have a major impact on the contamination of drinking water, and therefore efficient predictions of the spatial extents of contaminant plumes is key (Nowak et al., 2012; Moslehi and de Barros, 2017; Ghorbanidehno et al., 2015). ∗ Corresponding author Email addresses: [email protected] (Amir H. Delgoshaie ), [email protected] (Patrick Jenny), [email protected] (Hamdi A. Tchelepi) Past studies have provided a range of models for predicting this non-Fickian transport. The continuous time random walk (CTRW) formalism offers a framework to study anomalous transport through disordered media and networks (Berkowitz et al., 2006; Fiori et al., 2015). However, in most studies where this approach is used, velocity correlation between successive tracer particle jumps are neglected. The time domain random walk method (TDRW), which is conceptually similar to the CTRW method, directly calculates the arrival time of a particle cloud at a given location (Banton et al., 1997; Bodin et al., 2003). Similar to CTRW, consecutive velocities resulting from the TDRW method are independent of each other. Detailed studies of transport have shown conclusively that particle velocities in mass conservative flow fields are correlated (Graham and McLaughlin, 1989; Le Borgne et al., 2007). To account for this correlation, Markov velocity models have been developed. These models can be divided into two main groups of temporal and spatial models based on the variable chosen to index the stochastic velocity process. Le Borgne et al. (2008a) proposed discrete Markov chains for modeling the velocity process and tested the Markov assumption for the longitudinal component of the velocity of tracer particles in heterogeneous porous media. They studied transition probabilities for the velocity process in time and space and concluded that spatial Markov models can characterize the velocity field, but in their study temporal models were found to be unfit for this task. A spatial Markov model was then used in (Le Borgne et al., 2008b) to successfully model transport in one-dimensional heterogeneous domains. Kang et al. (2011, 2015a,b) extended the spatial Markov model framework to two dimensions and performed several studies on random lattice networks. The spatial Markov model was also applied to the velocity field resulting from simulation of flow in the pore space of real rock and to disordered fracture networks (Kang et al., 2014, 2017). Meyer et al. used a temporal Markov model and successfully modeled particle dispersion in two-dimensional cases using stochastic differential equations (Meyer and Tchelepi, 2010; Meyer et al., 2013). This framework was then used to model the joint velocity-concentration PDF (Meyer et al., 2010). In another study, Meyer and Saggini (2016) provided a framework for testing the Markov hypothesis for the velocity of tracer particles. 2009). In the context of TDRW, consecutive particle velocities are independent of each other and unlike a temporal Markov model, TDRW does not directly yield the particle plume location at a given time. Here we study the performance of discrete temporal Markov models on random lattice networks. These networks are chosen to compare the performance of temporal Markov models with existing correlated spatial models (Kang et al., 2011). Temporal Markov models are used to model transport in both structured and unstructured networks and we show that these models can yield accurate results in both cases. In contrast to spatial Markov models, the temporal models proposed here do not require any modification for simulating transport in unstructured networks. Moreover, it is shown that by combining multiple velocity transitions, temporal Markov models can be more efficient compared with correlated CTRW with a jump extent equal to the network link length (Kang et al., 2011). Compared to temporal SDEs with specific drift and diffusion functions (Meyer and Tchelepi, 2010; Meyer et al., 2013), the models presented here contain significantly fewer modeling assumptions, which makes them easier to apply to new problems (e.g. with a different permeability correlation structure). Finally, a novel way of enriching the state space for temporal Markov models is discussed to reduce errors by accounting for velocity persistence when modeling very slow transitions. The range of applicability of discrete temporal Markov models (here referred to as stencil methods) is studied by quantifying the model prediction error for the spatial distribution of the particle plume and first passage time distributions. Although temporal Markov models have been shown to perform well in several studies (Meyer and Tchelepi, 2010; Meyer et al., 2010, 2013), there is no consensus on the validity and potential of discrete temporal Markov chains for modeling passive transport (Le Borgne et al., 2008a,b). Moreover, one main argument against temporal Markov models is their inability to capture the very slow portions of the particle trajectories, and this criticism is yet to be addressed. On the other hand, the temporal Markov models that have been successfully applied for modeling transport in porous media are stochastic differential equations (SDEs) with very specific drift and diffusion terms that are constructed for specific problems (Meyer and Tchelepi, 2010; Meyer et al., 2013). Here, we relax some of these assumptions by using discrete Markov chains. So far, there are no examples of applying discrete temporal Markov models in modeling transport in porous media and specifically in porous networks. The networks used to describe realistic porous media are in many cases unstructured (Blunt et al., 2002; Dong and Blunt, 2009; Khayrat and Jenny, 2016; ?) and having simple efficient transport models for these networks is of great value. In addition to network models, recent developments in non-local models for flow in porous media also call for simple transport models that are general enough for cases with distributions of link lengths and transmissibilities (Delgoshaie et al., 2015; Jenny and Meyer, 2016). 2. The single-phase transport problem With pore-scale dispersion (PSD) neglected, the transport of a conservative pollutant in a porous medium is determined by advection. In both pore- and Darcy-scale problems, networks can be used for transport modeling. A network is defined by a set of nodes, a set of links connecting these nodes and an adjacency list. The transmissibility of the links, determines the strength of the connection between two nodes. One can assume a linear relationship similar to Darcy’s law for the fluid flux uij between the nodes i and j, uij = −kij (Φj − Φi )/lij , where Φi and Φj are the flow potentials, kij is the connectivity of the link between the two nodes and lij is the length of the link. By defining γij = kij /lij as the transmissibility of the link, the flux is the product of the link transmissibility and the potential difference between the two nodes. A significant advantage of temporal Markovian models is that by choosing averaging windows that are much larger than the mean time required for particle transitions, predictions can be made orders of magnitude faster compared with following every particle transition. This idea is also at the core of TDRW models, and it has also been used for stochastic modeling of other physical phenomena such as light scattering (Sormaz et al., 2008, PSD effects were not included in this work, but as previously reported by Meyer and Tchelepi (2010), they are expected to reduce the complexity of the problem for a Markov model for the following reasons: PSD is usually modeled by Markovian processes; therefore, as PSD becomes more important, the Markovian model becomes 2 more accurate. Moreover, PSD reduces the alignment of tracer particle trajectories with the preferential flow paths, which is expected to reduce the long-term correlation effects in the Lagrangian velocity statistics. δtn = δs/|vn |, tn = tn−1 + δtn (4) and xn = xn−1 + vn δtn . Once the fluxes in the links are known, one can simulate the transport of a passive tracer by particle tracking. At each node the particle randomly chooses a link carrying flux out of that node with a probability proportional to the flux in that link and travels along the selected link until it arrives at a new node. In continuum scale, a similar procedure is used to find the location where a particle leaves each cell and track the tracer particles (e.g. Pollock, 1988). Particle tracking in continua is equivalent to solving a discrete advection equation for the tracer concentration: Knowing all the previous velocity vectors, the location of a particle can be found by using Equations (4). In published studies on applications of spatial Markovian models on structured networks, spatial velocity processes are usually defined by consecutive displacements of a particle to new nodes. One can also consider the average velocity of a particle in consecutive time steps of size ∆t. This is referred to as a temporal velocity process. The Langevin equations for a temporal velocity process are ∂ ∂C + (ui C) = 0, ∂t ∂xi and xn = xn−1 + vn ∆t. tn = tn−1 + ∆t (1) In the next section, we discuss the Markov processes that have been introduced to efficiently integrate the Langevin eqautions (4) and (5). where C(x, t) is the tracer concentration at position x and time t, and ui is the ith component of the velocity vector u. To illustrate this point (Meyer and Tchelepi, 2010), we notice that a tracer particle which represents the tracer concentration in a small volume ∆V of the porous medium, travels along a pathline X(t, X0 ) = X0 + Z 3. The Markov hypothesis In order to efficiently integrate the Langevin equations (4) and (5), Markovianity is assumed for the velocity of the particles. The Markov hypothesis for the stochastic velocity process, {vn , n = 1, 2, . . . }, assumes that the next state of the particle velocity depends on the current state and is statistically independent of the rest of the history of the process. That is, t u[X(t0 , X0 ), t0 ]dt0 , (2) t0 where X = (X1 , X2 , X3 ) denotes the particle position vector, and X0 is the point where the particle was released at time t0 . With PSD neglected, the concentration on a particle pathline C[x = X(t, X0 ), t] is constant, and one can write ∂C dXi ∂C + = 0. ∂t ∂xi dt (5) p(vn |vn−1 , vn−2 , . . . , v0 ) = p(vn |vn−1 ). (6) To model transport using the Markov hypothesis, the transition probabilities between different velocity states, p(vn |vn−1 ), needs to be estimated. In two dimensions, the particle velocity is a vector in R2 , and the state space for a Markov model would be infinite. One solution to model this process would be to use discrete bins for the velocity vector and find a discrete transition matrix between these states. This is the approach taken by Kang et al. (2011) for spatial Markov models and Le Borgne et al. (2008a,b) for both temporal and spatial Markov models. The conclusion from (Le Borgne et al., 2008a,b) was that Markovianity cannot be confirmed for the temporal model. Other attempts by Meyer et al. on using temporal Markov models illustrated that a Markovian assumption for a temporal velocity process captures macro-dispersion accurately (Meyer and Tchelepi, 2010; Meyer et al., 2013). One important difference between the studies by Le Borgne et al. and Meyer et al. is the fact that in the later works the transition between different velocity classes was characterized using analytic functions. The advantage of this approach is that explicit binning is not required for the velocity classes. Moreover, since the transitions are represented by fewer parameters, faster convergence can be obtained for the transition (3) With ui [X(t, X0 ), t] = dXi (t, X0 )/dt, this equation is equivalent to Eq. 1; therefore, the Lagrangian representation based on tracer particles is equivalent to the Eulerian description. In other words, tracking the tracer particles can be viewed as an alternative way of solving the Eulerian transport equation. Lagrangian particle tracking is performed using a set of Langevin equations describing the particle movement in space and time. This set of Langevin equations has been stated in two different ways, and these different prospects have led to Markov models in time and in space for the particle velocity. In general, one can consider the velocity of a particle after the particle has moved a distance ∆s, which may or may not be equal to the network link length or the grid spacing. On a structured network, this would correspond to saving the velocity after each transition to a new link. We refer to the resulting velocity process as a spatial velocity process. The resulting Langevin equations are 3 is obtained by drawing the transmissibility of each link independently from a log-normal distribution with variance σ 2 = 5. The flow problem is first solved for each realization and the velocity field is obtained. We then simulate the transport of a passive tracer using particle tracking. Here, diffusion inside the links is neglected and perfect mixing is assumed inside the nodes. At each node, the particle randomly chooses a link carrying flux out of that node with a probability proportional to the flux in that link. The outputs of this particle tracking procedure are (i) (i) (i) (i) and yn and tn , where xn and yn are the position (i) coordinates of particle i after n transitions and tn is the elapsed time to get to that position. Given these trajectories for all particles, we can obtain the ensemble concentration of the contaminant at a given time less than (i) mini maxn tn , which is the largest time where none of the particles has left the domain. Alternatively, one can obtain the distribution of the first passage time (FPT) for a certain xt plane. (i) xn Figure 1: Schematic of a porous medium. Adapted from Kang et al. (2011). To describe the average movement of particle plume we analyze the Lagrangian statistics of the particles along each trajectory. As described in the previous section, we assume the velocity process is stationary and model the ve(i) locity of the particles, vn , by a Markov process. One can use the velocities obtained directly from the MC transport (i) (i) (i) simulations (xn , yn , tn ). That is, probabilities. On the other hand, more insight is needed to choose functions that can properly characterize these transitions. Functional representations have also been used in the context of spatial Markov models (Kang et al., 2016; Painter and Cvetkovic, 2005) to reduce the number of model parameters. Although temporal Markov models have been used to accurately model transport in porous media, there is still a valid argument against the applicability of these models in the presence of very low velocities and the verification of the Markov property for discrete temporal Markov models. Here we address these limitations and study their influence in modeling transport in random networks. vn(i) = [vx(i) , vy(i) ]Tn , (i) vx(i) = (i) tn+1 (i) (i) xn+1 − xn − (i) tn and vy(i) = (i) yn+1 − yn (i) tn+1 − (i) tn . (7) A Markov model based on these velocities would allow us to efficiently march particles with length steps equal to l. This would correspond to a spatial Markov model. One can imagine that l is typically much smaller than the length scales of practical interest, and we might not be interested in the details of the particle path after each transition. In the next section the proposed temporal Markov model is discussed. 4. Particle tracking problem setup In this section, a particle tracking setup is described to illustrate the concepts discussed so far. We study the evolution of particle plumes in structured random networks of the form shown in Fig. 1. In order to compare the performance of the temporal Markov model with spatial Markov models, the problem setup is chosen identical to the study performed by Kang et al. (2011). The considered network has 500 × 500 nodes and the link length, l, is equal for all links. All links are oriented at ±π/4 radians with respect to the horizontal direction. In each realization of this structured network 1000 tracer particles are injected in the center of the left boundary and tracked in the domain and 1000 such realization are considered. No-flow boundary conditions are set on the top and bottom of the domain, and a mean pressure gradient is imposed by setting the pressure at the left and right boundaries. Each realization of the medium 5. Stencil method: the temporal Markov model A temporal Markov model for the velocity process described in the previous section would require computing the average particle velocity in a sequence of given time intervals. If the averaging time step is larger than the mean time required for one transition, by combining multiple transitions together, averaging will increase the numerical efficiency of the temporal Markov model. Moreover, there is no distinction between structured and unstructured networks when obtaining the average velocity process; therefore, averaging would also generalize 4 the model to unstructured networks. We refer to the averaging time step, ∆ts , as the stencil time. v (log(v)j , log(v)j+1 ) v ∈ ∪nj=1 and θ ∈ θ (θj , θj+1 ), ∪nj=1 pethe the are 200 150 x (i) We represent the average velocity v n over a time riod of ∆ts in polar coordinates by its magnitude and (i) angle θn between its direction and the unit vector in x direction. The average velocity and average angle divided into discrete classes as follows: 250 100 50 original time averaged (8) 0 0.0 where nv and nθ are the number of velocity magnitude and angle classes. As previously suggested in (Meyer and Tchelepi, 2010; Kang et al., 2011), in order to better represent slow transitions we use the logarithm of velocity magnitude for the definition of classes. The state of a particle velocity is defined by a (v, θ)-pair. We refer to this temporal model as the velocity-angle stencil method, or the stencil method. 0.2 0.4 0.6 0.8 t 1.0 1.2 1.4 1.6 ×103 Figure 2: Sample trajectory of two particles. Solid blue: original particle path, markers: trajectory resulting from average velocities. The circled area illustrates an example of a particle experiencing a relatively low velocity. Similar to the polar Markovian velocity process (PMVP) (Meyer et al., 2013; Dünser and Meyer, 2016), the velocity-angle stencil is based on polar coordinates. Unlike the PMVP, the velocity and angle processes are not considered separately, i.e., they are jointly modeled by one stochastic process in time. Here, instead of using an SDE, we use a discrete Markov chain. The advantage of using a discrete Markov chains is that no assumptions are needed for the functional form of the transition probabilities. This would make the model easier to calibrate for new scenarios (e.g., random networks, Gaussian permeability fields, or permeability fields with different correlation structures), where an appropriate functional form for the drift and diffusion coefficients used in PVMP are not known. the low velocities and make the model less accurate. Figure 2 shows the trajectory of two sample particles and the averaged trajectories for the same particles for the same number of jumps. The circled section illustrates an example of a particle experiencing a relatively low velocity. Next, we discuss a method for overcoming the limitation due to very slow transition by enriching the state space of the stencil model. When averaging the particle trajectories with a stencil time step ∆ts , the number of repetitions, denoted by f , during a time step is known. This information can be added to the definition of the particle state. By having the collision frequency in the state definition, it becomes possible to accurately model particles that stay in a low-velocity state for long time intervals. With this new state definition, the attributes of the particle state are (v, θ, f ). We refer to this model as the extended velocityangle stencil method or the extended stencil method. Compared to the correlated spatial models that follow every particle transition on the network (e.g., the one by Kang et al. (2011)), the velocity-angle stencil method has two limitations. First, since we are using average trajectories, collisions (velocity transitions) do not coincide with the nodes of the underlying physical network. In order to inform the model about the exact location of the collision, a new variable, τ , can be added to track the time between the end of every averaging instant and the next collision event. This idea has been discussed in Jenny and Meyer (2016) and it is not discussed further here. Another limitation of the velocity-angle stencil is its inaccuracy in case of very slow transitions, i.e., (i) (i) (i) if ∆tn = tn+1 − tn  ∆ts . This has been noted previously in (Le Borgne et al., 2008a; Meyer and Saggini, 2016). Averaging such time steps would result in many consecutive steps where the velocity state would remain unchanged. However, using the velocity-angle stencil, the particle is allowed to change its velocity after every ∆ts , and this could limit the persistence of 6. Model calibration and validation of the Markov property Similar to Kang et al. (2011), we use equal probability bins for the log-velocity classes. Due to averaging, the angle process takes continuous values in [−π, π] and will include values that do not coincide with the initial network link directions. We use equal-width bins for the velocity angle classes. In the extended stencil method, for each observed frequency in the input data, a separate class was allocated for the corresponding (v, θ) pair. We refer to the discrete transition matrix for the stencil method as pm (v, θ|v 0 , θ0 ). This is the probability of encountering the state (v, θ) after m transitions, assuming that we started from the state (v 0 , θ0 ). Similarly pm (v, θ, f |v 0 , θ0 , f 0 ) is the discrete transition matrix for the extended stencil method. 5 Both transition matrices were obtained by counting the observed transitions in the particle tracking simulation results, which corresponds to the maximum likelihood estimation of the transition probabilities. We also define v the aggregate velocity transition matrix Tm (i, j), which defines the probability of encountering velocity class i after m transitions starting from velocity class j, and the agθ gregate angle transition matrix Tm (i, j), which is defined in a similar way. The mean transition time observed in the particle tracking data, δt, is considered as a time scale. times, ∆ts > 10dt, for both the stencil method and the extended stencil method. For these larger stencil times both models lead to smaller errors in predicting the fivestep transition probabilities. This is expected, since with larger stencil times we are combining more transitions and consecutive transitions become less correlated and hence less challenging to predict for the Markov models. In the limit of ∆ts → ∞ we expect the average velocity distribution to converge to an equilibrium distribution (πv ) and every column of the transition matrices would be equal to the corresponding equilibrium distribution. Hence, for very large ∆ts the one-point distribution of v would be sufficient for modeling dispersion. The choice of ∆ts would also depend on the temporal resolution of interest. The range of stencil times where a correlated stencil is required for accurate predictions of contaminant transport is further discussed in section 7. The aggregate velocity and angle transition matrices for one transition with ∆ts = 10δt for the stencil method and the extended stencil method are shown in Figs. 3 and 4. The transition matrices for these two models will be different, since repeating (v, θ) pairs are counted as a transition to the same state in the stencil method, which is not the case for the extended velocity-angle stencil. The resulting aggregate transition matrices are almost identical except for the lower left corner of the velocity transition matrices. Provided that a Markov process can closely model transitions between different states, we expect that the Chapman-Kolmogorov relation (Resnick, 2013) holds for these transitions. We perform a test to compare the m-step aggregate transition matrices for v and θ with the m-fold product of the corresponding one-step transition matrices. The aggregate five-step velocity transition matrix T5v (i, j) and the aggregate five-step angle transition matrix T5θ (i, j) are compared 5 5 to T1v (i, j) and T1θ (i, j) from the stencil method in Figs. 5 and 6 for ∆ts = 10δt. The same comparison is performed for the extended-stencil method and presented in Figs. 7 and 8. As can be seen from these four figures, the Chapman-Kolmogorov relation approximately holds for all angles and for velocity classes with j > 5. For ∆ts < 10dt, both the velocity-angle stencil and the extended velocity-angle stencil lead to errors in predicting the transition probabilities for a larger set of velocity classes. However, from a computational point of view we are not interested in these stencil times, since by combining very few transitions, only small speed-ups can be expected compared to correlated spatial models. In case we are interested in these smaller time steps, the right tool has already been developed (correlated CTRW). The resulting plumes and first passage time curves predicted by these smaller stencil times are included in section 7. The results presented in this section indicate that the transition probabilities of the MC data are not strictly Markovian for any ∆ts , which is consistent with the findings of Le Borgne et al. (2008a). However, we do not expect an exact Markovian structure in the MC results to begin with. For example, the MC results indicate that in every realization there are fast paths between the two ends of the domain, and knowing the full history of the velocity of a particle would improve our prediction of whether that particle is in a preferential path or not. This clearly indicates that the velocity process is not strictly Markovian. Therefore, although verifying the Chapman-Kolmogorov relation gives us useful intuition about the value of a Markov assumption for this problem, the usefulness of this assumption needs to be judged by the predictive power of the model and the error induced due to this assumption. In the next section, numerical results from both stencil models are presented and compared to the particle ensemble from the particle tracking simulations. A column-wise comparison of the aggregate angle transition matrices for an angle in the second quarter (j = 78) is shown in Fig. 9. Since the mean-flow directions is from left to right (θ = 0), there are not that many sample paths with velocity angles close to π or −π. This explains the noise observed in the aggregate angle transition matrices of Figs. 3 and 4. The column-wise comparison of the aggregate velocity transition matrices for a low velocity class (j = 2) and a high velocity class (j = 98) are shown in Figs. 10 and 11. Although there is a clear deviation from Markovianity for both the stencil method and the extended stencil method, these results suggest that enriching the state space of the Markov model would result in significantly better predictions of transitions from extremely low velocity values. This is best illustrated in Fig. 10. The extended velocity-angle stencil also improves the predicted lag five transitions from a fast velocity class to slow velocity classes as seen in Fig. 11. 7. Numerical results Different velocity-angle stencils and extended velocityangle stencils were obtained for different averaging times and the average transport in the network was compared with the predictions of the stencil methods. The performance of the stencil models were compared Similar comparisons were performed larger stencil 6 100 100 1.0 0.7 60 40 20 0 0.5 80 next class (θn+1 ) next class (vn+1 ) 80 0.3 60 0.2 40 0.1 20 0 20 40 60 previous class (vn ) 80 100 0 0 20 40 60 previous class (θn ) 80 100 0.0 Figure 3: Left: aggregate velocity transition matrix for m = 1, T1v (i, j); right: aggregate angle transition matrix for m = 1, T1θ (i, j) for the velocity-angle stencil for ∆ts = 10dt. The square root of the values are plotted in logarithmic scale. 100 100 1.0 0.7 60 40 20 0 0.5 80 next class (θn+1 ) next class (vn+1 ) 80 0.3 60 0.2 40 0.1 20 0 20 40 60 previous class (vn ) 80 100 0 0 20 40 60 previous class (θn ) 80 100 0.0 Figure 4: Left: aggregate velocity transition matrix for m = 1, T1v (i, j); right: aggregate angle transition matrix for m = 1, T1θ (i, j) for the extended velocity-angle stencil for ∆ts = 10dt. The square root of the values are plotted in logarithmic scale. 7 100 100 1.0 0.7 60 40 20 0 0.5 80 next class (θn+1 ) next class (θn+1 ) 80 0.3 60 0.2 40 0.1 20 0 20 40 60 previous class (θn ) 80 100 0 0 20 40 60 previous class (θn ) 80 100 0.0 Figure 5: Verification of the Chapman-Kolmogorov relation for velocity-magnitude classes for the stencil method for ∆ts = 10dt; left: T5v (i, j); right: T1v (i, j)5 . The square root of the values are plotted in logarithmic scale. 100 100 1.0 0.7 60 40 20 0 0.5 80 next class (θn+1 ) next class (θn+1 ) 80 0.3 60 0.2 40 0.1 20 0 20 40 60 previous class (θn ) 80 100 0 0 20 40 60 previous class (θn ) 80 100 0.0 Figure 6: Verification of the Chapman-Kolmogorov relation for the velocity-angle classes for the stencil method for ∆ts = 10dt; left: T5θ (i, j); 5 right: T1θ (i, j) . The square root of the values are plotted in logarithmic scale. 8 100 100 1.0 0.7 60 40 20 0 0.5 80 next class (θn+1 ) next class (θn+1 ) 80 0.3 60 0.2 40 0.1 20 0 20 40 60 previous class (θn ) 80 100 0 0 20 40 60 previous class (θn ) 80 100 0.0 Figure 7: Verification of the Chapman-Kolmogorov relation for velocity-magnitude classes for the extended stencil method for ∆ts = 10dt; left: T5v (i, j); right: T1v (i, j)5 . The square root of the values are plotted in logarithmic scale. 100 100 1.0 0.7 60 40 20 0 0.5 80 next class (θn+1 ) next class (θn+1 ) 80 0.3 60 0.2 40 0.1 20 0 20 40 60 previous class (θn ) 80 100 0 0 20 40 60 previous class (θn ) 80 100 0.0 Figure 8: Verification of the Chapman-Kolmogorov relation for the velocity-angle classes for the extended stencil method for ∆ts = 10dt; left: 5 T5θ (i, j); right: T1θ (i, j) . The square root of the values are plotted in logarithmic scale. 9 probability ×10−2 ×10−2 7 7 T5θ (i, j) 6 6 T1θ (i, j) 5 5 4 4 3 3 2 2 1 1 0 −3 −2 −1 0 1 2 3 next angle class (radians) 0 −3 −2 −1 0 1 2 5 3 next angle class (radians) 5 probability Figure 9: Column-wise comparison of T5θ (i, j) and T1θ (i, j) for an initial angle in the second quarter with j = 78 for ∆ts = 10dt; left: stencil method; right: extended stencil method. 0.20 0.20 0.15 0.15 0.10 0.10 0.05 0.05 0.00 0 20 40 60 80 100 0.00 T5v (i, j) T1v (i, j) 0 20 next velocity class 40 60 5 80 100 next velocity class Figure 10: Column-wise comparison of T5v (i, j) and T1v (i, j)5 for a slow initial velocity class with j = 2 for ∆ts = 10dt; left: stencil method; right: extended stencil method. probability ×10−2 ×10−2 1.5 1.5 1.0 1.0 0.5 0.5 0.0 0 20 40 60 80 100 next velocity class 0.0 T5v (i, j) T1v (i, j) 0 20 40 60 80 5 100 next velocity class Figure 11: Column-wise comparison of T5v (i, j) and T1v (i, j)5 for a fast initial velocity class with j = 98 for ∆ts = 10dt; left: stencil method; right: extended stencil method. 10 Figure 12: Contaminant concentration at non-dimensional time t/δt = 90. Comparison of the velocity-angle stencil (dashed lines) with the reference particle tracking data (filled contour map) for the same contour levels. Figure 13: Contaminant concentration at non-dimensional time t/δt = 320. Comparison of the velocity-angle stencil (dashed lines) with the reference particle tracking data (filled contour map) for the same contour levels. to an implementation of the correlated CTRW method. The code for generating the MC data and performing these comparisons will be made available at https: //github.com/amirdel/dispersion-random-network. First, we present results for ∆ts = 20δt. The results for smaller and larger time steps are discussed afterwards. in Fig. 17. The results show that the extended class definition does not improve the predictions of the second moment in the transverse direction. Another important feature of anomalous transport is the long tail in first passage time (FPT) distributions. Figure 18 shows the comparison of the FPT for nondimensional length xt /L = 0.75, where xt is the target x plain and L is the domain length. The long tail of the first passage time CDF is well captured by both stencil models. This comparison was performed for xt /L = 0.25, 0.5 and 0.75, and the predictions from both models are accurate for all three planes. A closer inspection of the FPT curve (Fig. 18) illustrates that the extended class definition improves the prediction of the FPT distribution. First, we consider the velocity-angle stencil. Figs. 12 and 13 show the particle plume and the predicted plume by the velocity-angle stencil at dimensionless times t/δt = 90 and 320, respectively. As these figures suggest, the stencil model captures the distribution of the tracer with great accuracy and the non-Gaussian characteristics of the plume are well captured using this simpler model. The same contaminant plume was also simulated with the extended stencil model. In Fig. 14 the results from both models are compared to the reference concentration distributions from the particle tracking simulations. Both models capture the spreading of the plume accurately for different times in both longitudinal and transverse directions. When magnifying the slow tail of the plume in Fig. 15, it is observed that the extended stencil captures this slow tail better than the velocity-angle stencil. Although the extended stencil results in more accurate predictions for ∆ts = 20δt, the improvements can be better observed for smaller stencil times. Figure 19 indicates that there is a significant difference between the predictions of the stencil model and the extended stencil model for a wide range of first passages times. Most notably, the slow tail of the FPT curve is captured well with the extended stencil method even for very small stencil times. Hence, by using the extended stencil we were able to expand the range of accuracy of temporal Markov models to smaller time steps. In Fig. 20 the plumes predicted by the two stencil models are compared for small stencil times. Although the predictions are not as accurate as in the case with ∆ts = 20δt, for ∆ts = 10δt there still is a good agreement between the model predictions and the MC simulation results. For smaller stencil times, the extended velocity-angle stencil leads to smaller errors, especially for the slow tail of the The second central moment of the particle plume or the mean square displacement (MSD) with respect to the plume center of mass in the longitudinal directions obtained from the temporal Markovian models is compared to the MSD obtained from the ensemble plume in Fig. 16. It can be observed that the predictions from both models are very similar. A closer inspection (inset of Fig. 16) illustrates that the extended stencil method improves the predictions of the longitudinal MSD. A similar comparison is shown for the transverse direction 11 1.8 ×10 −2 6 ×10 particle density 1.6 −2 1.4 1.2 4 1.0 0.6 t/δt = 240 (v, θ, f ) t/δt = 320 3 0.8 t/δt = 170 data (v, θ) t/δt = 90 5 2 0.4 1 0.2 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 x/l 3.5 ×102 0 −1.0 −0.5 0.0 0.5 1.0 ×102 y/l Figure 14: Comparison of plume concentration at different times: particle tracking data (solid lines), velocity-angle stencil (dashed lines), extended velocity-angle stencil (dash dots). Stencil time is 20δt for both models. −3 102 t/δt = 320 data (v, θ) particle density 8 7 6 transverse MSD 9 ×10 (v, θ, f ) 5 4 3 2 101 100 data (v, θ) 1 0 0.0 (v, θ, f ) 0.5 1.0 1.5 2.0 2.5 x/l 3.0 10−1 1 10 3.5 ×102 nondimensional time Figure 15: Comparison of plume concentration at t/δt = 320: particle tracking data (solid lines), velocity-angle stencil (dashed lines), extended velocity-angle stencil (dash dots). Inset: zooming on the slow tail of the plume. Figure 17: Comparison of traverse mean square difference of the plume for different times: particle tracking data (solid lines), velocity-angle stencil (dashed lines), extended velocity-angle stencil (dash dots). Stencil time is 20δt for both models. data (v, θ) cumulative distribution logitudinal MSD 102 (v, θ, f ) 101 100 1 10 102 102 1.0 0.8 0.6 0.4 data (v, θ) 0.2 (v, θ, f ) 0.0 0.0 nondimensional time xt = 0.75L 0.2 0.4 0.6 0.8 1.0 1.2 nondimensional FPT Figure 16: Comparison of longitudinal mean square difference of the plume at different times: particle tracking data (solid lines), velocity-angle stencil (dashed lines), extended velocity-angle stencil (dash dots). Stencil time is 20δt for both models. 1.4 1.6 ×103 Figure 18: First passage time CDF for x/L = 0.75: particle tracking data (solid lines), velocity-angle stencil (dashed lines), extended velocity-angle stencil (dash dots) for ∆ts = 20δt. 12 plume. are used for each spatial dimension, and in (Kang et al., 2017) the analysis of unstructured fracture networks is limited to the projection of the particle velocities on the longitudinal direction. Here we illustrate that the proposed temporal models are readily applicable to unstructured cases. To this end, unstructured networks were generated by randomly perturbing the nodes in the structured network used in the previous section. Normal random perturbations were added independently in the horizontal and vertical directions. A schematic of such a resulting unstructured network is shown in Fig. 25. This procedure would result in unstructured networks with a truncated Gaussian link length distribution. The link length distribution for four such networks are depicted in Fig. 26. Given the same MC simulation data, with larger averaging windows there would be fewer velocity transitions along every streamline and converging to the correct discrete transition matrix would become harder. Figures 21 and 22 show the predicted plume and the FPT curve for ∆ts equal to 20, 40, 80, 160 times δt for both stencil methods. As can be seen in these figures, both models make similar predictions and capture the dispersion process well for stencil times up to ∆ts = 80δt. For the largest stencil time (∆ts = 160δt) the extended stencil clearly leads to more accurate predictions. One should note that for very large stencil times, the MC data is not sufficient to obtain statistical convergence of the transition matrices. This is due to having only a few velocity transitions per particle trajectory. However, the extended stencil by construction can capture the extremely slow tail of the plume more accurately; this advantage is reflected in the predicted probability densities and FPT curves. The same particle tracking problem described in section 4 was performed on 1000 realizations of these unstructured networks and the problem was also modeled using both the velocity-angle and the extended velocity-angle stencils. Figures 27 and 28 show the plume spreading for two different times. These results show that the stencil model can also be used to accurately predict contaminant plume spreading in unstructured networks. Figure 29 shows that the early and late particle arrival times are also captured accurately for this test case. On the other hand, with larger stencil times the average velocities would become less correlated. One can argue that with very large stencil times, using a correlated random walk model would no longer be necessary and independent spatial increments would be sufficient for modeling the dispersion process at very low temporal resolutions. Figures 23 and 24 compare the results of using an uncorrelated temporal random walk for predicting the FPT and the particle concentration PDF with the results of the extended stencil model. These results suggest that for a wide range of stencil times (20 < ∆ts /δt < 160) considering the velocity correlation is indeed necessary for making accurate predictions. 9. Conclusions In this work, we showed that temporal Markov models can be used to model transport in random networks with good accuracy for a wide range of stencil times. Although it is known that using temporal Markov models can lead to wrong transition rates both from and to low-velocity states, it was shown that the error induced due to this fact is in many cases small, and can be further reduced by using the extended velocity-angle stencil. We were able to improve the results obtained by temporal Markov models by enriching the state space of the model to include information on the number of repetitions of a given velocity class and extend the range of applicability of these models to smaller time steps. The extended stencil enhanced the accuracy of predicting the slow tail of the contaminant plume, the CDF of first passage time, and the evolution of the second central moment of the plume in the longitudinal direction. We also showed that discrete temporal Markov models can be used to model transport in unstructured networks without any further modification. Moreover, since many node transitions can be treated collectively in one stencil step, the proposed stencil method is more efficient than simulating particle evolution based on following every transition to a new node. Compared to previously proposed temporal Markov models based on SDEs, the models proposed here make significantly fewer modeling assumptions. The code used for generating the input data and the Markov The computational cost of the stencil method was compared to correlated CTRW with spatial transitions that are equal to the link lengths in the network (Kang et al., 2011). The cost is computed by counting the average number of velocity transitions along a particle trajectory before exiting the domain. A stencil model with ∆ts = αδt, with α > 10, leads to α times less collisions compared with following every transition to a new node; therefore, it is α times computationally more efficient. For temporal models with ∆ts < 10δt, the stencil method is less accurate than correlated CTRW and does not offer significant computational gains. 8. Application to unstructured networks The proposed stencil methods require no further generalizations to model transport in unstructured networks. In contrast, published correlated spatial models used for simulating transport in structured networks are different from the models applied to unstructured networks. In (Kang et al., 2014), independent spatial Markov processes 13 cumulative distribution 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 0.2 0.4 0.6 0.8 1.0 ×103 nondimensional FPT data ∆ts = 10δt ∆ts = 5δt ∆ts = 2δt 0.0 0.0 0.2 0.4 0.6 0.8 1.0 ×103 nondimensional FPT Figure 19: First passage time CDF for x/L = 0.75 for different stencil times; left: stencil method; right: extended stencil method. Particle density 9 ×10 −3 9 ×10 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 x/l 4.0 ×102 −3 data ∆ts = 10δt ∆ts = 5δt ∆ts = 2δt 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 x/l 4.0 ×102 Figure 20: Particle density at t/δt = 320 for different stencil times; left: stencil method; right: extended stencil method. Particle density 9 ×10 −3 9 ×10 8 8 7 7 6 6 5 5 4 4 3 3 2 2 1 1 0 0.0 0.5 1.0 1.5 2.0 x/l 2.5 3.0 3.5 4.0 ×102 0 0.0 −3 data ∆ts = 20δt ∆ts = 40δt ∆ts = 80δt ∆ts = 160δt 0.5 1.0 1.5 2.0 x/l 2.5 3.0 3.5 4.0 ×102 Figure 21: Predicted plume concentration for different values of ∆ts /δt; left: stencil method; right: extended stencil method. 14 cumulative distribution 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 0.0 0.0 data ∆ts = 20δt ∆ts = 40δt ∆ts = 80δt ∆ts = 160δt 0.2 0.4 0.6 0.8 1.0 nondimensional FPT 1.2 ×103 0.2 0.4 0.6 0.8 1.0 nondimensional FPT 1.2 ×103 Figure 22: FPT curve for different values of ∆ts /δt; left: stencil method; right: extended stencil method. Particle density 1.2 ×10 −2 1.2 ×10 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 x/l 4.0 ×102 0.0 0.0 −2 data ∆ts = 20δt ∆ts = 40δt ∆ts = 80δt ∆ts = 160δt 0.5 1.0 1.5 2.0 2.5 3.0 3.5 x/l 4.0 ×102 cumulative distribution Figure 23: Predicted plume concentration for different values of ∆ts /δt, left: using uncorrelated average velocities; right: extended stencil method. 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 0.0 0.0 data ∆ts = 20δt ∆ts = 40δt ∆ts = 80δt ∆ts = 160δt 0.2 0.4 0.6 0.8 nondimensional FPT 1.0 1.2 ×103 0.2 0.4 0.6 0.8 nondimensional FPT 1.0 1.2 ×103 Figure 24: FPT curve for different values of ∆ts /δt, left: using uncorrelated average velocities; right: extended stencil method. 15 Figure 25: Schematic of an unstructured network generated by adding normal random perturbations to a zig zag structured network. probability density 2.5 ×10 −2 network network network network 2.0 1.5 1 2 3 4 1.0 0.5 0.0 0.0 0.5 1.0 1.5 2.0 link length Figure 26: Link length distribution from four realizations of the studied random unstructured network. 1.8 ×10 −2 6 ×10 particle density 1.6 5 1.4 1.2 4 e = 80 t/δt data (v, θ) (v, θ, f ) 1.0 3 0.8 0.6 2 0.4 1 0.2 0.0 0.0 −2 0.5 1.0 1.5 2.0 x/l 2.5 3.0 3.5 ×102 0 3.0 3.2 3.4 3.6 y/l 3.8 4.0 ×102 Figure 27: Longitudinal (left) and transverse (right) distributions of the plume at t/δt = 80 for the unstructured random network test case with ∆ts = 20δt. 16 9 ×10 −3 2.5 ×10 2.0 7 6 e = 290 t/δt data (v, θ) 1.5 5 4 (v, θ, f ) 1.0 3 2 0.5 1 0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 x/l 3.5 ×102 0.0 3.0 3.2 3.4 3.6 y/l Figure 28: Same as Fig. 27, at a later time. cumulative distribution particle density 8 −2 1.0 0.8 0.6 0.4 xt = 0.75L data (v, θ) 0.2 (v, θ, f ) 0.0 0.0 0.2 0.4 0.6 0.8 1.0 1.2 nondimensional FPT 1.4 1.6 ×103 Figure 29: First passage time CDF for xt = 0.75L for the unstructured random network example. 17 3.8 4.0 ×102 models will be made available at https://github.com/ amirdel/dispersion-random-network. Applying the stencil method to correlated heterogeneous fields will be the subject of further studies. Kang, P.K., De Anna, P., Nunes, J.P., Bijeljic, B., Blunt, M.J., Juanes, R., 2014. Pore-Scale intermittent velocity structure underpinning anomalous transport through 3-D porousmedia. Geophysical Research Letters 41, 6184–6190. doi:10.1002/2014GL061475. Kang, P.K., Dentz, M., Le Borgne, T., Juanes, R., 2011. Spatial markov model of anomalous transport through random lattice networks. Physical review letters 107, 180602. Kang, P.K., Dentz, M., Le Borgne, T., Juanes, R., 2015a. Anomalous transport on regular fracture networks: Impact of conductivity heterogeneity and mixing at fracture intersections. Physical Review E 92, 022148. Kang, P.K., Dentz, M., Le Borgne, T., Lee, S., Juanes, R., 2017. Anomalous transport in disordered fracture networks: spatial markov model for dispersion with variable injection modes. Advances in Water Resources . Kang, P.K., Le Borgne, T., Dentz, M., Bour, O., Juanes, R., 2015b. Impact of velocity correlation and distribution on transport in fractured media: Field evidence and theoretical model. Water Resources Research 51, 940–959. Khayrat, K., Jenny, P., 2016. Subphase approach to model hysteretic two-phase flow in porous media. Transport in Porous Media 111, 1–25. Le Borgne, T., Dentz, M., Carrera, J., 2008a. Lagrangian statistical model for transport in highly heterogeneous velocity fields. Physical review letters 101, 090601. Le Borgne, T., Dentz, M., Carrera, J., 2008b. Spatial markov processes for modeling lagrangian particle dynamics in heterogeneous porous media. Physical Review E 78, 026308. Le Borgne, T., de Dreuzy, J.R., Davy, P., Bour, O., 2007. Characterization of the velocity field organization in heterogeneous media by conditional correlation. Water resources research 43. Meyer, D.W., Jenny, P., Tchelepi, H.A., 2010. A joint velocityconcentration pdf method for tracer flow in heterogeneous porous media. Water Resources Research 46. Meyer, D.W., Saggini, F., 2016. Testing the markov hypothesis in fluid flows. Physical Review E 93, 053103. Meyer, D.W., Tchelepi, H.A., 2010. Particle-based transport model with markovian velocity processes for tracer dispersion in highly heterogeneous porous media. Water Resources Research 46. Meyer, D.W., Tchelepi, H.A., Jenny, P., 2013. A fast simulation method for uncertainty quantification of subsurface flow and transport. Water Resources Research 49, 2359–2379. Moslehi, M., de Barros, F.P., 2017. Uncertainty quantification of environmental performance metrics in heterogeneous aquifers with long-range correlations. Journal of Contaminant Hydrology 196, 21–29. Nowak, W., Rubin, Y., Barros, F.P., 2012. A hypothesis-driven approach to optimize field campaigns. Water Resources Research 48. Painter, S., Cvetkovic, V., 2005. Upscaling discrete fracture network simulations: An alternative to continuum transport models. Water Resources Research 41. Pollock, D.W., 1988. Semianalytical Computation of Path Lines for Finite-Difference Models. Ground Water 26, 743–750. URL: http://dx.doi.org/10.1111/j.1745-6584.1988.tb00425.x. Resnick, S.I., 2013. Adventures in stochastic processes. Springer Science & Business Media. Sormaz, M., Mourad, S., Stamm, T., Jenny, P., 2008. Predicting spectral halftone measurements for different instruments using a new multi-scale approach, in: Conference on Colour in Graphics, Imaging, and Vision, Society for Imaging Science and Technology. pp. 25–30. Sormaz, M., Stamm, T., Mourad, S., Jenny, P., 2009. Stochastic modeling of light scattering with fluorescence using a monte carlobased multiscale approach. JOSA A 26, 1403–1413. Acknowledgements Amir H. Delgoshaie is grateful to Daniel Meyer and Oliver Brenner from the Institute of Fluid Dynamics at ETH Zurich for several helpful discussions and Peter Glynn from the MS&E department at Stanford University for very helpful comments on stochastic modeling. Funding for this project was provided by the Stanford University Reservoir Simulation Industrial Affiliates (SUPRI–B) program. References References Banton, O., Delay, F., Porel, G., 1997. A new time domain random walk method for solute transport in 1–d heterogeneous media. Ground Water 35, 1008–1013. Berkowitz, B., Cortis, A., Dentz, M., Scher, H., 2006. Modeling nonfickian transport in geological formations as a continuous time random walk. Reviews of Geophysics 44. Blunt, M.J., Jackson, M.D., Piri, M., Valvatne, P.H., 2002. Detailed physics, predictive capabilities and macroscopic consequences for pore-network models of multiphase flow. Advances in Water Resources 25, 1069–1089. Bodin, J., Porel, G., Delay, F., 2003. Simulation of solute transport in discrete fracture networks using the time domain random walk method. Earth and Planetary Science Letters 208, 297–304. Bouchaud, J.P., Georges, A., 1990. Anomalous diffusion in disordered media: statistical mechanisms, models and physical applications. Physics reports 195, 127–293. Delgoshaie, A.H., Meyer, D.W., Jenny, P., Tchelepi, H.A., 2015. Non-local formulation for multiscale flow in porous media. Journal of Hydrology 531, 649–654. Dong, H., Blunt, M.J., 2009. Pore-network extraction from microcomputerized-tomography images. Physical review E 80, 036307. Dünser, S., Meyer, D.W., 2016. Predicting field-scale dispersion under realistic conditions with the polar markovian velocity process model. Advances in Water Resources 92, 271–283. Edery, Y., Guadagnini, A., Scher, H., Berkowitz, B., 2014. Origins of anomalous transport in heterogeneous media: Structural and dynamic controls. Water Resources Research 50, 1490–1505. Fiori, A., Zarlenga, A., Gotovac, H., Jankovic, I., Volpi, E., Cvetkovic, V., Dagan, G., 2015. Advective transport in heterogeneous aquifers: Are proxy models predictive? Water resources research 51, 9577–9594. Ghorbanidehno, H., Kokkinaki, A., Li, J.Y., Darve, E., Kitanidis, P.K., 2015. Real-time data assimilation for large-scale systems: The spectral kalman filter. Advances in Water Resources 86, 260– 272. Graham, W., McLaughlin, D., 1989. Stochastic analysis of nonstationary subsurface solute transport: 1. unconditional moments. Water Resources Research 25, 215–232. URL: http://dx.doi. org/10.1029/WR025i002p00215, doi:10.1029/WR025i002p00215. Jenny, P., Meyer, D., 2016. Non-local generalization of darcys law based on empirically extracted conductivity kernels, in: ECMOR XV-15th European Conference on the Mathematics of Oil Recovery. Kang, P.K., Brown, S., Juanes, R., 2016. Emergence of anomalous transport in stressed rough fractures. Earth and Planetary Science Letters 454, 46–54. 18
5cs.CE
arXiv:1612.08487v1 [math.GR] 27 Dec 2016 INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP DANIEL DUGGER Abstract. We classify conjugacy classes of involutions in the isometry groups of nondegenerate, symmetric bilinear forms over the field F2 . The new component of this work focuses on the case of an orthogonal form on an evendimensional space. In this context we show that the involutions satisfy a remarkable duality, and we investigate several numerical invariants. Contents 1. Introduction 2. Background 3. Invariants 4. Analysis of conjugacy classes 5. The DD-invariant and direct sums References 1 6 10 15 20 25 1. Introduction Let V be a finite-dimensional vector space over F2 equipped with a nondegenerate, symmetric bilinear form b. Write Iso(V ) for the group of isometries of V , meaning the group of automorphisms f : V → V such that b(f (x), f (y)) = b(x, y) for all x, y ∈ V . The goal of this paper is to classify the conjugacy classes of involutions in Iso(V ). This involves three parts: (P1) Counting the number of conjugacy classes; (P2) Giving a convenient set of representatives for the conjugacy classes; (P3) Giving a collection of computable invariants having the property that two involutions are in the same conjugacy class if and only if they have the same invariants (for brevity we will say that the invariants completely separate the conjugacy classes). The motivation for solving this problem comes from an application in topology. Given a compact manifold M of even dimension 2d, an involution σ on M induces an involution σ ∗ on H d (M ; F2 ). The cup product endows this cohomology group with a nondegenerate, symmetric bilinear form, and σ ∗ is an isometry. The conjugacy class of σ ∗ in Iso(H d (M ; F2 )) is an invariant of the topological conjugacy class of σ. That is, two involutions σ and θ on M give isomorphic Z/2-spaces only if σ ∗ and θ∗ are conjugate inside of Iso(H d (M ; F2 )). Thus, a solution to (P3) yields topological invariants of the involution on M . These invariants play a role in the classification of Z/2-actions on surfaces [D]. 1 2 DANIEL DUGGER Beyond this initial motivation, however, this paper exists because (P1)–(P3) have surprisingly nice answers. The main work in the present paper occurs when b is the standard dot product on Fn2 , with n even. In this case the group Iso(V ) turns out to have some remarkable structures which aid in the classification. In particular, the involutions exhibit a surprising duality. To explain the results further, we first introduce two evident invariants. If σ is in End(V ) then we define D(σ) = rank(σ + Id) and call this the D-invariant of σ. It is an integral lift of the classical Dickson invariant (see [T, Theorem 11.43]). If σ is an involution then the Jordan form of σ consists of 1 × 1 blocks together with 2 × 2 blocks of the form [ 10 11 ]. Then D(σ) is simply the number of 2 × 2 blocks appearing, and of course this determines the Jordan form. So the D-invariant completely separates the conjugacy classes for involutions in End(V ). Note that 0 ≤ D(σ) ≤ dim2 V always (see Proposition 3.1 below). For an involution σ in Iso(V ), we can consider the map V 7→ F2 given by v 7→ b(v, σv). It is non-obvious, but easy to check, that this map is actually linear. Let α(σ) denote its rank, which is either 0 or 1. This is clearly an invariant of the conjugacy class of σ. The pair (V, b) is called symplectic if b(x, x) = 0 for all x ∈ V . In this case V has a symplectic basis, meaning a basis u1 , v1 , . . . , un , vn with b(ui , vi ) = 1 for all i, and all other pairings of basis elements being zero. It follows that Iso(V ) is isomorphic to the standard symplectic group Sp(2n) (all matrix groups in this paper have matrix entries in F2 , so we will leave the field out of the notation). In the symplectic case, the D and α invariants completely solve the conjugacy problem. This is a classical result of Ashbacher-Seitz [AS], summarized in the following theorem. See also [Dy1, Section 6] for similar work. Theorem 1.1. Suppose that (V, b) is symplectic of dimension 2n, and let σ ∈ Iso(V ) be an involution. (a) If σ and σ ′ are two involutions in Iso(V ), then σ and σ ′ are conjugate if and only if D(σ) = D(σ ′ ) and α(σ) = α(σ ′ ). (b) If D(σ) is odd, then α(σ) = 1. (c) The conjugacy classes of involutions in Iso(V ) are in bijective correspondence with the set of pairs (D, α) satisfying 0 ≤ D ≤ n, α ∈ {0, 1}, and α = 1 when D is odd. The number of these conjugacy classes is equal to ( 3n+2 if n is even, 2 3n+1 if n is odd. 2 1 0 1 1 0 1 1 0 (d) Let J = [ 1 0 ] and let I = [ 0 1 ]. Let M = 01 11 11 10 . Then the conjugacy classes 11 0 1 of involutions in Sp(2n) are represented by      J J J      J I           I I ,..., ,       . . .. ..      I I  J J .. . J    ,   INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP together with  M   I2n ,   I .. . I   M     ,   M .. . I   M     ,    M .. 3 . M   .  The matrices in the first line have α = 1 and D equal to 1, 2, 3, . . . , n. The matrices in the second line have α = 0 and D equal to 0, 2, 4, 6, . . . (terminating in either n or n − 1 depending on whether n is even or odd). If V is an n-dimensional vector space over F2 and b is a nondegenerate symmetric bilinear form, then (V, b) is either symplectic or else it is isomorphic to (Fn2 , ·) where · is the standard dot product (see Proposition 2.1). So it remains to discuss the latter setting, which we call orthogonal. It is tempting in this case to call Iso(Fn2 , ·) an orthogonal group and to denote it On , but this leads to some trouble. In characteristic 2 situations, the theory of symmetric bilinear forms and the theory of quadratic forms diverge. Group theorists, perhaps beginning with [Di], use “orthogonal group” to refer to the automorphisms of a quadratic form—this is different from the group we need to study here. So while the papers of Dye [Dy1, Dy2], for example, classify conjugacy classes of involutions in orthogonal groups over fields of characteristic 2, these are not the orthogonal groups that are relevant to the problem we are trying to solve. Let us write TO(n) for Iso(Fn2 , ·) and call it the topologists’ orthogonal group (for want of a better name). It is precisely the group of n × n matrices A over F2 satisfying AT A = In . Our goal is to describe conjugacy classes of involutions in TO(n), for all n. When n is odd, there is an isomorphism TO(n) ∼ = Sp(n−1) (see Proposition 2.3). So this case is again handled by Theorem 1.1. When n is even, there is an isomorphism TO(n) ∼ = M ⋊ Sp(n − 2) where M is a certain modular representation of Sp(n − 2) sitting in a non-split short exact sequence 0 → Z/2 → M → (Z/2)n−2 → 0 with the trivial representation on the left and the standard representation on the right (see Corollary 2.15). It is this decomposition of TO(n) that allows us to analyze the involutions, using the case of the symplectic group as a starting point. When n is even, the group TO(n) has a strange symmetry. For A ∈ Mn×n (F2 ), let m(A) be the matrix obtained from A by changing all the entries: 0 changes to 1, and 1 changes to 0. We call m(A) the mirror of A. Surprisingly, the mirror of a matrix in TO(n) is again in TO(n). This map m : TO(n) → TO(n) is of course not a group homomorphism (it does not preserve the identity), but it does have the property that m(A)m(B) = AB for all A, B ∈ TO(n). In particular, if A is an involution in TO(n) then m(A) is also an involution in TO(n). One can also check that if A and B are conjugate inside of TO(n) then so are m(A) and m(B). 4 DANIEL DUGGER Let us write D̃(A) = D(mA) and α̃(A) = α(mA). The invariants D, α, D̃, and α̃ turn out to completely separate the conjugacy classes of involutions. For this reason, let us define the double-Dickson invariant of A by DD(A) = [D(A), α(A), D̃(A), α̃(A)] ∈ Z4 . We will usually call this the DD-invariant, for short. It turns out to always be the case that |D(A) − D̃(A)| ≤ 1 (see Proposition 3.3). There are numerous other invariants one can write down, and we give a thorough discussion of these in Section 3. But the four invariants in DD(A) seem to be the most efficient way of capturing a complete set. We next identify three families of involutions in TO(2n). To this end, if A is an n × n matrix and B is a k × k matrix let us write A ⊕ B for the (n + k) × (n + k) block diagonal matrix   A O . O B Let I = [ 10 01 ] and J = [ 01 10 ]. The first family consists of the matrices I ⊕(n−k) ⊕ J ⊕(k) , 1 ≤ k ≤ n − 1, as well as their mirrors. The DD-invariants are given by  DD I ⊕(n−k) ⊕ J ⊕(k) = [k, 1, k + 1, 1], and for the mirrors one simply switches the first two coordinates with the last two. Note that there are 2(n − 1) matrices in this family. The second family consists of the matrices  m I ⊕(n−k) ⊕ J ⊕(k) , 0 ≤ k ≤ n − 1 together with their mirrors. Here the DD-invariants are given by (  [k + 1, 0, k + 1, 1] if k is odd, ⊕(n−k) ⊕(k) DD m(I )⊕J = [k + 1, 0, k, 1] if k is even. Note that there are 2n matrices in this family. Finally, our third family consists of the matrices  1 ≤ k ≤ n − 2. m I ⊕(n−k−1) ⊕ J ⊕(k) ⊕ J, These matrices turn out to be conjugate to their own mirrors, so we do not include the mirrors this time. The DD-invariants are    DD m I ⊕(n−k−1) ⊕ J ⊕(k) ⊕ J = [k + 2, 1, k + 2, 1], and note that there are n − 2 matrices in this family. Taking the three families together, we have produced 5n − 4 involutions. One readily checks that all of their DD-invariants are different, so this is a lower bound for the number of conjugacy classes of involutions. It turns out that there are no others: Theorem 1.2. Assume n is even. (a) The involutions A and B in TO(n) are in the same conjugacy class if and only if DD(A) = DD(B). INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 5 (b) There are precisely 5n − 4 conjugacy classes of involutions in TO(2n), and they are represented by the three families of matrices I ⊕(n−k) ⊕ J ⊕(k) , m(I ⊕(n−k) )⊕J 1 ≤ k ≤ n − 1, (together with their mirrors) ⊕(k) m I ⊕(n−k−1) ⊕ J ,  ⊕(k) 0 ≤ k ≤ n − 1 (together with their mirrors) ⊕ J, 1 ≤ k ≤ n − 2. Example 1.3. The group TO(6) has 23,040 elements and 752 involutions, falling into 11 conjugacy classes. The possible DD-invariants are [1, 1, 2, 1] [2, 1, 1, 1] [2, 1, 3, 1] [3, 1, 2, 1] [1, 0, 0, 1] [0, 1, 1, 0] [2, 0, 2, 1] [2, 1, 2, 0] [3, 0, 2, 1] [2, 1, 3, 0] [3, 1, 3, 1] where the three rows correspond to the three families of involutions. Here is a randomly chosen involution, written side-by-side with its mirror:     0 0 1 1 1 0 1 1 0 0 0 1 0 0 0 0 0 1  1 1 1 1 1 0     1 0 1 1 0 0  0 1 0 0 1 1    A= m(A) = 1 0 1 0 1 0  0 1 0 1 0 1 .     1 0 0 1 1 0  0 1 1 0 0 1 0 1 0 0 0 0 1 0 1 1 1 1 The α and α̃ invariants are easiest to read off: one just looks along the diagonal. The presence of 1s along the diagonal of A implies α(A) = 1, and the presence of 0s along the diagonal of A implies α̃(A) = 1 (since these 0s lead to 1s along the diagonal of m(A)). Notice that this immediately puts A in the first or third family. Next, one readily computes D(A) = rank(A + Id) = 3 and D̃(A) = D(mA) = rank(mA + Id) = 3. So DD(A) = [3, 1, 3, 1], which identifies the appropriate conjugacy class. Remark 1.4. One can naturally ask if the results of this paper extend to isometry groups over other fields of characteristic two. According to [AS], this works fine in the symplectic case—Theorem 1.1 does not require that the ground field be F2 . The same can therefore be said for the odd-dimensional orthogonal case, as this case was secretly symplectic. But for the even-dimensional orthogonal case, the main methods in this paper only work when the field is F2 . In several places we use constructions that make sense only because certain maps that satisfy F (λv) = λ2 F (v) actually turn out to be linear; this cannot possibly happen over other fields. 1.5. Organization of the paper. In Section 2 we develop the basics of nondegenerate symmetric bilinear forms over F2 and their isometries. We define the mirror operation, and we explore the connections between the groups TO(k) and Sp(n). Section 3 introduces a slew of invariants for involutions, and establishes their basic properties. In Section 4 we prove Theorem 1.2. Finally, Section 5 provides formulas for how the DD-invariant behaves under direct sums; these are very useful in applications. Unfortunately this is the most tedious part of the paper, as the formulas involve many cases and are not very enlightening. 1.6. Acknowledgments. The author is grateful to Bill Kantor for some extremely helpful correspondence. 6 DANIEL DUGGER 2. Background Let F be a field. By a bilinear space over F we mean a finite-dimensional vector space V together with a nondegenerate symmetric bilinear form b on V . Recall that nondegenerate means no nonzero vector is orthogonal to every vector in V . Bilinear spaces are more commonly called quadratic spaces in the literature, but since the theories of quadratic forms and bilinear forms diverge in characteristic two the terminology chosen here leads to less confusion. If a ∈ F we write hai for the one-dimensional vector space F equipped with the bilinear form b(x, y) = axy. We write H for F 2 , with standard basis {e1 , e2 }, equipped with the bilinear form where b(e1 , e1 ) = b(e2 , e2 ) = 0 and b(e1 , e2 ) = 1. Write nh1i for h1i ⊕ h1i ⊕ · · · ⊕ h1i and nH for H ⊕ H · · · ⊕ H (n summands in each case). A bilinear space (V, b) is called symplectic if b(v, v) = 0 for all v in V . Any symplectic space is isomorphic to nH for some n, by [HM, Corollary 3.5]. The proof is simple: choose any nonzero x ∈ V , and then choose a y ∈ V such that b(x, y) = 1. Take the orthogonal complement of F2 ha, bi in V and continue by induction. Proposition 2.1. Every nondegenerate bilinear space over F2 is isomorphic to either nH or nh1i, for some n ≥ 1. Proof. Let (V, b) be a nondegenerate bilinear space over F2 . If V is symplectic then we are done, so we may assume that V contains a vector x1 such that b(x1 , x1 ) = 1. Take the orthogonal complement of x1 and continue inductively, until one obtains a space that is symplectic. This shows that V is isomorphic to kh1i ⊕ rH, for some k and r. We will be done if we can show that h1i ⊕ H ∼ = 3h1i, since then if k 6= 0 any copy of H in the decomposition of V can be replaced with 2h1i. Suppose that x, y, z is a basis for a space such that b(x, x) = 1 = b(y, z), b(x, y) = b(x, z) = b(y, y) = b(z, z) = 0. It is easy to check that x + y, x + z, and x + y + z is an orthonormal basis for the same space.  Remark 2.2. Note that nh1i is simply Fn2 with the standard dot product form. We will usually denote this (Fn2 , ·), and will write e1 , . . . , en for the standard orthonormal basis. From now on we only work over the field F2 . If a bilinear space (V, b) is isomorphic to nH we will write Sp(V ) = Iso(V, b). If (V, b) is isomorphic to (Fn2 , ·) we say that V is orthogonal and write TO(V ) = Iso(V, b). We will also use the notation Sp(2n) for the group of isometries of nH, and TO(n) for the group of isometries of nh1i. Note that we may identify Sp(2n) with the usual group of 2n × 2n symplectic matrices over F2 , and we may identity TO(n) with the group of n × n matrices A over F2 such that AAT = In . If (V, b) is a bilinear space over F2 , then v 7→ b(v, v) gives a linear map f : V → F2 . Note that this depends on the fact that λ2 = λ for all λ ∈ F2 . Since b is nondegenerate, the adjoint of b : V ⊗ V → F2 is an isomorphism V → V ∗ . Taking the preimage of f under this isomorphism, we find that there is a unique vector Ω ∈ V with the property that b(Ω, v) = b(v, v) for all v ∈ V . INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 7 We call Ω the distinguished vector in V . Note that when (V, b) = (Fn2 , ·), the distinguished vector is [1, 1, . . . , 1]. The bilinear space (V, b) is symplectic if and only if Ω = 0. Observe that every isometry of (V, b) must necessarily fix Ω, and therefore maps hΩi⊥ into itself. Proposition 2.3. When n is odd one has TO(n) ∼ = Sp(n − 1). Proof. Let U = hΩi⊥ . When n is odd we have a decomposition Fn2 = U ⊕hΩi. Every element of TO(n) fixes Ω and therefore maps U to U , so we have TO(n) ∼ = Iso(U ). But the space U is symplectic, so Iso(U ) ∼  = Sp(n − 1). It is easy to count the number of elements in TO(n). The following result is classical, but a nice reference is [M]: Proposition 2.4. For n ≥ 1 one has | TO(2n)| = 2n · (4n − 41 )(4n − 42 ) · · · (4n − 4n−1 ), | Sp(2n)| = | TO(2n + 1)| = 2n · (4n − 40 )(4n − 41 )(4n − 42 ) · · · (4n − 4n−1 ). 2.5. Mirrors. Let (V, b) be an orthogonal space and assume that dim V is even. This condition forces b(Ω, Ω) = 0. If L : V → V is an isometry, define mL : V → V by mL(v) = L(v) + b(v, Ω)Ω. We call mL the mirror of L. Clearly mL is still linear, and it is also still an isometry: b(mL(v), mL(w)) = b(Lv + b(v, Ω)Ω, Lw + b(w, Ω)Ω) = b(Lv, Lw) + b(Lv, Ω)b(w, Ω) + b(v, Ω)b(Lw, Ω) = b(v, w) + b(v, Ω)b(w, Ω) + b(v, Ω)b(w, Ω) = b(v, w). In the third equality we used that L(Ω) = Ω and so b(Lv, Ω) = b(Lv, LΩ) = b(v, Ω). Of course m : Iso(V ) → Iso(V ) is not a group homomorphism; for example, it does not preserve the identity. But it satisfies the following curious property: Proposition 2.6. If F, L ∈ Iso(V, b) then (mF )(mL) = F L. In particular, if F is an involution then mF is also an involution. Proof. For v ∈ V we compute that   mF (mL(v)) = mF Lv + b(v, Ω)Ω = F Lv + b(v, Ω)Ω + b(Lv, Ω)Ω = F L(v) + b(v, Ω)F (Ω) + b(Lv, Ω)Ω. Now use the facts that F (Ω) = Ω and b(Lv, Ω) = b(Lv, LΩ) = b(v, Ω).  (F2n 2 , ·), Remark 2.7. For recall that Ω = [1, 1, . . . , 1]. So m : TO(2n) → TO(2n) is the function that adds Ω to each column of a matrix A ∈ TO(2n). Clearly this amounts to changing every entry in A, from a 0 to a 1 or from a 1 to a 0. The following result shows that if two isometries are conjugate, then their mirrors are also conjugate: Proposition 2.8. Suppose A, P ∈ Iso(V, b). Then m(P AP −1 ) = P ◦ m(A) ◦ P −1 . 8 DANIEL DUGGER Proof. The isometry m(P AP −1 ) is given by v 7→ P AP −1 (v) + b(v, Ω)Ω. The isometry P ◦ m(A) ◦ P −1 is given by  v 7→ P AP −1 v + b(P −1 v, Ω)Ω = P AP −1 v + b(P −1 v, Ω)P (Ω). Now use that P (Ω) = Ω and b(P −1 v, Ω) = b(v, P Ω) = b(v, Ω).  2.9. More on the symplectic group. We first state a simple result that will be needed later: Proposition 2.10. Let (V, b) be a symplectic bilinear space over F2 . Then Iso(V, b) acts transitively on V − {0}. Proof. This is surely standard. See [D, Lemma 4.14] as one source for a proof.  If F is a field and V is a vector space, recall that a quadratic form on V is a function q : V → F such that q(λv) = λ2 q(v) and q(v + w) − q(v) − q(w) is bilinear. When F = F2 one has λ2 = λ for all scalars, so the first condition simplifies. If (V, b) is a symplectic bilinear space then a semi-norm is a quadratic form q : V → F such that q(v + w) = q(v) + q(w) + b(v, w) for all v, w ∈ V . Such a q cannot be unique: adding any linear form to q gives another semi-norm. In fact the set of all semi-norms for b is a torsor for the group V ∗ of linear forms on V . The only nontrivial statement in all of this is the assertion that a semi-norm exists atP all. To see this, consider nH with the standard symplectic basis {fi , gi }. Define P q( xi fi + yi gi ) = i xi yi . One readily checks that this is a semi-norm. Fix a semi-norm q for (V, b), and let A ∈ Sp(V ). The function V → F2 given by v 7→ q(v) + q(Av) is readily checked to be linear. Write Sq A for this linear functional. Note that Sq (Id) is zero. If q ′ is another semi-norm for (V, b) then Sq′ A = Sq A + (q + q ′ ). Proposition 2.11. For any A, B ∈ Sp(V ) one has Sq (AB) = Sq (B) + Sq (A) ◦ B. Proof. One simply computes that Sq (AB)(v) = q(v) + q(ABv) = q(v) + q(Bv) + q(Bv) + q(ABv) = (Sq B)(v) + (Sq A)(Bv).  Let MV = V ⊕ F2 . Define an action of Sp(V ) on MV by  (2.12) A · (v, λ) = A(v), (Sq A)(v) + λ . We leave the reader to check that this is indeed a group action, using Proposition 2.11. Clearly MV sits in a short exact sequence 0 → F2 → MV → V → 0 where F2 has the trivial action of Sp(V ) and V has the standard action. If q ′ is another semi-norm for (V, b) then we get two actions on MV ; let us call them MV (q) and MV (q ′ ). These are isomorphic Sp(V )-spaces, via the isomorphism MV (q) → MV (q ′ ) given by (v, λ) 7→ (v, q(v) + q ′ (v) + λ). Recall that q + q ′ is linear. Example 2.13. It is useful to understand how these constructions look in the concrete world of matrices. If V = nH then one possible semi-norm is q([x1 , y1 , . . . , xn , yn ] = x1 y1 + · · · + xn yn . The representation MV is a group homomorphism Sp(2n) → GL(2n + 1). For n = 2 this is INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 9    a b c d 0 d  e f g h 0 h   i j k l 0 7→   l  m n p q 0 q ae + im bf + jn cg + kp dh + lq 1 and the pattern for larger n is the evident one. An industrious reader can check by hand that this is indeed a group homomorphism, but it is not obvious from the above formula! a e i m  b f j n c g k p Continue to assume that (V, b) is symplectic, and now consider the bilinear space V̂ = V ⊕ h1i ⊕ h1i. We will still write b for the bilinear form on this larger space. Let e and f be the two basis elements corresponding to the two h1i summands, so that b(e, e) = b(f, f ) = 1, e, f ∈ V ⊥ , and b(e, f ) = 0. Note that V̂ is an orthogonal space by Proposition 2.1 (as it is certainly not symplectic), and one readily checks that e + f is the distinguished vector Ω. For this reason it will be a little more convenient for us to use the basis {Ω, f } instead of {e, f }. Note that b(Ω, Ω) = 0 and b(Ω, f ) = b(f, f ) = 1. There is an evident homomorphism j : Sp(V ) → Iso(V̂ ). If A ∈ Sp(V ) then j(A) : V̂ → V̂ fixes Ω and f , and acts as A on the V summand. For (v, λ) ∈ MV define φ(v,λ) : V̂ → V̂ by φ(v,λ) (w) = w + b(w, v)Ω for w in V , φ(v,λ) (Ω) = Ω φ(v,λ) (f ) = v + (λ + q(v))Ω + f. It is easy to check that φ(v,λ) is an isometry, and that φ gives a group homomorphism φ : MV → Iso(V̂ ). Moreover, if A ∈ Sp(V ) and x ∈ MV then φ(A · x) = j(A)φ(x)j(A)−1 . This verifies that we get a group map θ : MV ⋊Sp(V ) → Iso(V̂ ) by defining θ(x, A) = φ(x)j(A). Proposition 2.14. The map θ : MV ⋊ Sp(V ) → Iso(V̂ ) is an isomorphism. Proof. Let dim V = 2n. Using Proposition 2.1, the bilinear space V̂ is isomorphic to (F2n+2 , ·). So Iso(V̂ ) is isomorphic to TO(2n + 2). One then readily checks using 2 Proposition 2.4 that the domain and target of θ have the same order. So it suffices to show that θ is injective. Let (v, λ) ∈ MV and A ∈ Sp(V ), and assume that φ(v, λ)j(A) = Id. The transformation j(A) fixes f , and φ(v, λ) sends f to v + (λ + q(v))Ω + f . It follows that v = 0 and λ + q(v) = 0, which in turn implies λ = 0. Therefore φ(v, λ) = Id and so j(A) = Id, which means A = Id.  Corollary 2.15. There is a group isomorphism TO(2n) ∼ = M ⋊ Sp(2n − 2), where M is the representation of Sp(2n − 2) on F2n−1 described in Example 2.13. 2 Recall the mirror operation m : Iso(V̂ ) → Iso(V̂ ). In view of the isomorphism θ, there should be a corresponding operation on MV ⋊ Sp(V ). To construct this, define a set map m̃ : MV → MV by m̃(v, λ) = (v, λ + 1). Extend this to a set map m : MV ⋊ Sp(V ) → MV ⋊ Sp(V ) by m(x, A) = (m̃(x), A). 10 DANIEL DUGGER Proposition 2.16. The diagram MV ⋊ Sp(V ) θ / Iso(V̂ ) m m  MV ⋊ Sp(V ) θ  / Iso(V̂ ) is commutative. Proof. Pick (v, λ) ∈ MV and A ∈ Sp(V ). Then mθ((v, λ), A) has the following behavior:   w 7→ Aw + b(Aw, v)Ω if w ∈ V , Ω 7→ Ω   f 7→ v + (λ + q(v) + 1)Ω + f + Ω. By inspection this is the same behavior as θ((v, λ + 1), A).  3. Invariants Let (V, b) be a bilinear space over F2 . In this section we study various numerical invariants that can be assigned to involutions in Iso(V, b), having the property that they are constant on conjugacy classes. Our focus is mainly on the case where (V, b) is orthogonal, but it is convenient to discuss the symplectic case at the same time. Let σ ∈ Iso(V, b). Define the Dickson invariant D(σ) to be the rank of σ + Id. Note that this is clearly invariant under conjugacy in GL(V ), and therefore also under conjugacy in the smaller group Iso(V, b). Proposition 3.1. For any involution in Iso(V, b) one has 0 ≤ D(σ) ≤ dim V 2 . Proof. Observe that (Id +σ)2 = 0, or equivalently Im(Id +σ) ⊆ ker(Id +σ). So D(σ) = dim Im(Id +σ) ≤ dim ker(Id +σ) = dim V − D(σ).  The map Fσ : V → F2 given by v 7→ b(v, σv) is linear, since Fσ (v + w) = b(v + w, σv + σw) = b(v, σv) + b(w, σw) + b(w, σv) + b(v, σw) and b(w, σv) = b(σw, σ 2 v) = b(σw, v). Note that here we have used both that σ is an involution and an isometry. Define the α-invariant α(σ) to be the rank of Fσ . Deconstructing this, we have ( 1 if there exists a v ∈ V such that b(v, σv) = 1, α(σ) = 0 otherwise. It is easy to check that the α-invariant is constant on conjugacy classes in Iso(V, b). As we saw in Theorem 1.1, it is a classical result that the pair (D(σ), α(σ)) completely separates conjugacy classes when (V, b) is symplectic. So let us now focus on the case where (V, b) is orthogonal. Here we may use the mirror operation m : Iso(V, b) → Iso(V, b), which we know sends involutions to involutions (Proposition 2.6) and preserves the conjugacy relation (Proposition 2.8). If σ ∈ Iso(V, b) is an involution define D̃(σ) = D(mσ), α̃(σ) = α(mσ). INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 11 Moreover, define the double Dickson invariant (or DD-invariant, for short) to be the 4-tuple DD(σ) = [D(σ), α(σ), D̃(σ), α̃(σ)] ∈ N × Z/2 × N × Z/2. This 4-tuple is constant on conjugacy classes. Recall that (mσ)(v) = σ(v) + b(v, v)Ω. Then b(v, (mσ)(v)) = b(v, σ(v)) + b(v, v). Therefore ( 1 if there exists v ∈ V such that b(v, σ(v)) = b(v, v) + 1, α̃(σ) = 0 otherwise. Remark 3.2. Suppose that e1 , . . . , en is an orthonormal basis for V , and that A is the matrix of σ with respect to this basis. Then one readily checks that ( 1 if A has at least one 1 on its diagonal, α(σ) = 0 otherwise, and α̃(σ) = ( 1 if A has at least one 0 on its diagonal, 0 otherwise. Proposition 3.3. Let σ be an involution in Iso(V, b), where (V, b) is orthogonal. Then |D(σ) − D̃(σ)| ≤ 1, and one cannot have α(σ) = α̃(σ) = 0. Proof. The second statement follows immediately from P Remark 3.2. For the first, let e1 , . . . , en be an orthonormal basis for V , so that Ω = i ei . Let A be the matrix for σ with respect to this basis, and let u1 , . . . , un denote the columns of A + Id. Then the columns of m(A)+ Id are the vectors ui + Ω. Let U = F2 hu1 , . . . , un i ⊆ V , and W = F2 hu1 + Ω, . . . , un + Ωi ⊆ V . Then D(σ) = dim U and D̃(σ) = dim W . But U = F2 hu1 , u1 −u2 , u1 −u3 , . . . , u1 −un i and W = F2 hu1 +Ω, u1 −u2 , . . . , u1 − un i. It is now clear that | dim U − dim W | ≤ 1.  3.4. Other invariants. The DD-invariant is the main construct that will be used in the rest of the paper. However, one can easily write down a multitude of other invariants for conjugacy classed of involutions. Our next goal will be to give a thorough exploration of these. We should say upfront, though, that the results of this section are not needed for the main classification result. Nevertheless, they merit inclusion here because they shed some light on the broader story surrounding the DD-invariant. In addition, they are useful for calculating how the DD-invariant behaves under direct sums (see Theorem 5.4 below). We begin with a naive example. Given an involution σ in Iso(V, b), consider the set Sσ = {v ∈ V | b(v, σv) = 0} ⊆ V. Since V is finite-dimensional over F2 , Sσ is finite. The order |Sσ | is clearly an invariant of σ: if f : (V, b) → (W, b′ ) is an isomorphism of bilinear spaces and σ ′ is an involution in Iso(W, b′ ) such that f σ = σ ′ f , then clearly f maps Sσ bijectively onto Sσ′ . In particular, applying this when (W, b′ ) = (V, b) shows that |Sσ | is an invariant of the conjugacy class of σ in Iso(V, b). At this point it is clear how to generalize. Any property P of vectors v ∈ V that can be expressed entirely in terms of b and σ leads to a set Sσ (P ) and a conjugacy 12 DANIEL DUGGER invariant |Sσ (P )|. One can easily write down three basic instances of such a P , and in the case that (V, b) is orthogonal there is one more that is slightly less-evident: b(v, v) = 0, b(v, σv) = 0, v = σ(v), v = σ(v) + Ω. By taking combinations of these four properties and their negations, one can make 24 = 16 different invariants—but only eight of these turn out to be interesting, as some of the combinations are either mutually inconsistent or duplicate other combinations. Restricting now only to the orthogonal case, the following table introduces eight invariants and shows their values on the 16 conjugacy classes of involutions in TO(8) (these numbers were generated by computer). For typographical reasons we write b(x, y) as x · y in this table. DD I1 v·v=0 v=σv 0110 1001 1121 2111 2021 2120 2130 3021 2131 3121 3131 3141 4131 4041 4140 4141 128 128 64 64 64 64 32 32 32 32 32 16 16 16 16 16 I2 v·v=0 v·σv=0 v6=σv 0 0 0 0 64 64 96 96 32 32 32 48 48 112 112 48 I3 I4 I5 v·v=0 v·v=1 v·v=1 v·σv=1 v·σv=0 v=σv 0 0 64 64 0 0 0 0 64 64 64 64 64 0 0 64 0 128 64 64 128 0 0 128 64 64 64 64 64 128 0 64 128 0 64 0 0 0 32 0 32 0 0 16 0 0 0 0 I6 v·v=1 v·σv=1 v6=σv 0 0 0 64 0 128 96 0 32 64 64 48 64 0 128 64 I7 I8 v=σv+Ω v=σv+Ω v·v=0 v·v=1 0 0 0 0 64 64 0 0 0 0 32 0 0 16 16 16 0 128 0 64 0 0 0 32 0 32 0 0 16 0 0 0 Certain properties of these invariants are immediately evident—for example, the numbers are always even and most of them are powers of 2. To explain these, note that the functions L1 (v) = v · v, L2 (v) = v · σ(v), and L3 (v) = v + σ(v) are all linear. So the solution spaces to Li (v) = 0 are linear subspaces of V , and the solution spaces to Li (v) 6= 0 are affine subspaces of V when i = 1, 2 and the complement of a subspace when i = 3. Likewise, the solution space to L3 (v) = Ω is an affine space. This clearly implies that all the invariants are even. Even more, it shows that except for I2 and I6 the invariants always yield powers of 2. (As we shall see shortly, I2 and I6 should really be left out of the story altogether as they can be obtained as linear combinations of the other invariants). We can push the above idea a little further. Let S1 = {v ∈ V | v · v = 0, v · σ(v) = 0}. This is a linear subspace of V , and I1 = |S1 |. Analogously, let Sj ⊆ V be the subset that defines the invariant Ij . One readily checks that vector addition gives an action of the group (S1 , +) on Sj : that is, if v ∈ S1 and w ∈ Sj then v + w ∈ Sj . Moreover, it is clearly a free action. This shows that Ij is always a multiple of I1 . INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 13 The following proposition summarizes various relations amongst the Ij invariants and the DD-invariant: Proposition 3.5. Let (V, b) be an orthogonal bilinear space of even dimension, and let σ be an involution in Iso(V, b). Write I1 = I1 (σ), etc. Then (a) I1 + I2 + I3 = 2dim V −1 = I4 + I5 + I6 . (b) I5 , I7 , I8 ∈ {0, I1 }. (c) At most one of I5 , I7 , and I8 is nonzero. (d) D(σ) = dim V − log2 (I1 + I5 ). (e) D̃(σ) = dim V − log2 (I1 + I8 ). (f ) α(σ) = 0 ⇐⇒ (I4 = 2dim V −1 and I3 = 0) ⇐⇒ I4 = 2dim V −1 . (g) α̃(σ) = 0 ⇐⇒ I3 = I4 = 0 ⇐⇒ I4 = 0. (h) log2 (I1 ) = dim V − max{D(σ), D̃(σ)}.  ( 0 if α(σ) > α̃(σ),  0 if α(σ) 6= α̃(σ), dim V −1 (i) I3 = and I = 2 if α(σ) < α̃(σ), 4  2dim V −2 if α(σ) = α̃(σ)  dim V −2 2 if α(σ) = α̃(σ). ( 0 if D(σ) ≥ D̃(σ), (j) I5 = 2dim V −1−D(σ) if D(σ) < D̃(σ). ( 0 if D(σ) 6= D̃(σ), (k) I7 = 2dim V −D(σ) if D(σ) = D̃(σ). ( 0 if D(σ) ≤ D̃(σ), (l) I8 = dim V −1−D̃(σ) 2 if D(σ) > D̃(σ). Remark 3.6. Parts (d)–(g) of the above proposition show that the DD-invariant is recoverable from the collection of Ij -invariants. Parts (h)–(l), together with (a), show that the Ij -invariants are all recoverable from the DD-invariant. We have chosen to build the paper around the DD-invariant—as opposed to some other collection from the list—only because the DD-invariant seemed to be the most accessible. As it simply amounts to computing the ranks of four matrices, it is somewhat easier to handle than the other invariants in the list (though to be frank, all of the invariants can be computed by linear algebra and so none are particular difficult). The relationship between the Ij invariants and the DD-invariant can be summarized as follows, where the arrows indicate that one set of invariants can be derived from another: (I5 , I7 , I8 ) o (j)-(l) I4 o / (D, D̃) I1 o (h) (i) / (α, α̃) (i) / I3 / max{D, D̃}. The labels on the arrows refer to the relevant parts of Proposition 3.5. Perhaps the only thing that requires further explanation is the arrow (I5 , I7 , I8 ) → (D, D̃). If we know I5 , I7 , and I8 then we know how D and D̃ compare in size, and we know the smaller value. If D = D̃ then we therefore know both, and if one is larger than the other then Proposition 3.3 says it is larger by exactly 1—so again we know both. Observe that knowing (I4 , I5 , I7 , I8 ) is equivalent to knowing the DD-invariant. 14 DANIEL DUGGER Proof of Proposition 3.5. For convenience we will write v·w for b(v, w) in this proof. Part (a) is trivial: the disjoint union of S1 , S2 and S3 is the hyperplane defined by v · v = 0, and S4 ∪ S5 ∪ S6 is the affine hyperplane v · v = 1. For (b), note that the subspaces defined by v = σ(v) and v = σ(v)+Ω are parallel, and likewise for the subspaces defined by v · v = 0 and v · v = 1. Linear algebra implies that if S5 is nonempty then it is a translate of S1 , and so in particular has the same number of elements. Likewise for S7 and S8 . For (c) suppose that I5 > 0 and I7 > 0. Then there exist vectors v and w such that v · v = 1, v = σv, σw = w + Ω, and w · w = 0. Now compute that v · w = σv · w = v · σw = v · w + v · Ω = v · w + v · v = v · w + 1, which is a contradiction. The proofs for the pairs (I5 , I8 ) and (I7 , I8 ) are entirely similar. Parts (d) and (e) are trivial, just using the definitions of D and D̃. For (f) and (g) we prove the first biconditionals, and return to the second biconditionals after (i). For (f) it is easy to prove that α(σ) = 0 if and only if I1 + I2 + I4 = 2dim V just using the definition of α. Then use (a) to rewrite the latter condition as I4 − I3 = 2dim V −1 . But S4 is contained in the hyperplane v · v = 1, and so certainly I4 ≤ 2dim V −1 . Equality then follows, together with I3 = 0. Similarly, for (g) one easily proves I1 + I2 + I5 + I6 = 2dim V , but (a) simplifies this to I3 + I4 = 0. For (h), note that by (d) and (e) we have max{D(σ), D̃(σ)} = dim V − log2 (I1 + min{I5 , I8 }). But (c) implies that min{I5 , I8 } = 0. Now consider (i). If α(σ) 6= α̃(σ) then at least one is zero, so by (f) and (g) I3 = 0. If α > α̃ then α̃ = 0 and α = 1, so I4 = 0 by (g). If α < α̃ then α = 0 and α̃ = 1, so I4 = 2dim V −1 by (f). It remains to analyze what happens when α = α̃. By Proposition 3.3 this can only happen when they both equal 1. Let M0 and M1 be the affine subspaces of V defined by x · x = 0 and x · x = 1, respectively. Likewise, let N0 and N1 be the affine subspaces defined by x · σx = 0 and x · σx = 1, respectively. Linear algebra immediately implies that if M0 ∩ N1 is nonempty then it is a translate of M0 ∩ N0 , and likewise for M1 ∩ N0 . Note that by definition |M0 ∩ N0 | = I1 + I2 , |M0 ∩ N1 | = I3 , and |M1 ∩ N0 | = I4 . This proves that I3 , I4 ∈ {0, I1 + I2 }. We will use the fact that V = N0 ∪ N1 = M0 ∪ M1 , and that N0 and N1 are hyperplanes. The assumption that α(σ) = 1 says that M0 (and therefore M1 ) are also hyperplanes in V . If M1 ∩ N0 6= ∅ then M0 6= N0 , and so M0 ∩ N1 6= ∅. Similarly, if M0 ∩ N1 6= ∅ then M1 ∩ N0 6= ∅. So I3 6= 0 if and only if I4 6= 0. But we know by (g) that either I3 6= 0 or I4 6= 0, so they are both nonzero. Therefore both are equal to I1 +I2 . Finally, since I3 = I1 +I2 it follows from (a) that I3 = 2dim V −2 . Observe that (i) immediately yields the second biconditionals in (f) and (g). For (j)–(l) we argue as follows. If D(σ) > D̃(σ) then by (d) and (e) I5 < I8 . So I8 6= 0, which implies I5 = I7 = 0 by (c). Also, (b) implies I8 = I1 and so (e) gives I8 in terms of D̃(σ). The argument is similar when D(σ) < D̃(σ). Finally, in the case D(σ) = D̃(σ) we know from (d) and (e) that I5 = I8 . Comparing (d) and (e) to (h), we find I5 = I8 = 0. Since D(σ) = D̃(σ), it follows that the subspace T = {v | v+σ(v) = Ω} has the same dimension as {v | v + σv = 0}. But the latter space is always nonzero, INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 15 since any involution has an eigenvector with eigenvalue 1. So |T | > 0. But T is the disjoint union of S7 and S8 , and we know S8 = ∅. So I7 = |S7 | = |T | > 0. By (b) we then have I7 = I1 , and (h) then shows I7 = 2dim V −D(σ) .  4. Analysis of conjugacy classes In this section we will prove the main theorem of the paper, giving a complete description of the conjugacy classes of involutions in TO(2n). The proof proceeds by analyzing involutions in the semi-direct product (Z/2)2n−1 ⋊ Sp(2n − 2), and obtaining a count of conjugacy classes here. Then we produce enough matrices in TO(2n) having different DD-invariants to know that these represent all conjugacy classes. 4.1. Involutions in the semi-direct product. Throughout this section we let V = nH and GV = MV ⋊ Sp(V ). We will denote elements of this group by (x, A) where x ∈ MV and A ∈ Sp(V ). We will write the map Sp(V ) → End(MV ) as A 7→ Ã; see (2.12) for the definition of this action. Proposition 4.2. (a) The element (x, A) is an involution in MV ⋊ Sp(V ) if and only if A is an involution in Sp(V ) and (à + Id)(x) = 0. (b) If (x, A) is conjugate to (y, B) then A is conjugate to B in Sp(V ). (c) Suppose (x, A) is an involution and A is conjugate to B in Sp(V ). Then there is a y ∈ MV such that (y, B) is an involution and (x, A) is conjugate to (y, B). (d) (x, A) is conjugate to (y, A) if and only if there exists P ∈ Sp(V ) such that P A = AP and x + P̃ y belongs to the image of à + Id. Proof. Part (a) is just the calculation (x, A) · (x, A) = (x + Ã.x, A2 ). Parts (b) through (d) are similarly straightforward, and left to the reader.  The above proposition has the following significance for us. For each involution A ∈ Sp(V ), let SA be the set of conjugacy classes in GV that are represented by involutions of the form (x, A). If A and B are conjugate involutions in Sp(V ), then SA = SB by Proposition 4.2(c). Moreover, if S ⊆ Sp(V ) is a set of representatives for the conjugacy classes in Sp(V ) (one element for each class) then the other parts of Proposition 4.2 imply that we have bijections a (conjugacy classes in GV ) ←→ SA A∈S and (4.3) h i SA ←→ ker(à + Id)/ Im(à + Id) C(A) where C(A) is the centralizer of A in Sp(V ) and we are writing XC(A) for the set of orbits of X under C(A). Let us unravel the complicated-looking object on the right. For x = (v, λ) in MV we have (à + Id)(v, λ) = (Av, (SA)(v) + λ) + (v, λ) = (v + Av, (SA)(v)) = (v + Av, q(v) + q(Av)). 16 DANIEL DUGGER This expression equals (0, 0) if and only if v + Av = 0. So let us write Eig(A) = {v ∈ V | Av + v = 0}, and let Z(A) = Eig(A) ⊕ F2 . The group C(A) acts on Z(A): if P ∈ C(A) and (v, λ) ∈ Z(A) then P.(v, λ) = (P v, (SP )(v) + λ). Next, let B(A) = {(v + Av, (SA)(v)) | v ∈ V } and note that B(A) ⊆ Z(A). The action of C(A) on Z(A) preserves B(A): this comes down to the computation that if P ∈ C(A) then SP + (SA) ◦ P = S(AP ) = S(P A) = SA + (SP ) ◦ A by using Proposition 2.11 twice. Let H(A) = Z(A)/B(A), and note that the action of C(A) on Z(A) descends to an action on H(A). We can restate (4.3) as a bijection SA ←→ H(A)C(A) . To proceed further in our analysis, we will make some assumptions on the involution A. These assumptions at first might seem very restrictive, but in fact they turn out to cover all cases. In particular, the assumptions in part (d) below are awkward—and almost certainly unnecesssary. But since they are readily seen to hold in the cases of interest, it is easier just to make these awkward assumptions than to somehow try to avoid them. Lemma 4.4. Suppose that V decomposes as V = U ⊕ W where W ⊥ = U , and that A ∈ Sp(V ) is of the form K ⊕ IdW where K : U → U is an involution such that Im(K + IdU ) = ker(K + IdU ). Let πU : V → U and πW : V → W be the evident projections. Then: (a) There is a bijection SA ←→ (W ⊕ F2 )C(A) where the action of P ∈ C(A) on (w, λ) is given by P.(w, λ) = (πW (P w), λ + (SP )(w) + (SA)(u)) where u is any element of U such that Au + u = πU (P w). (b) If W = 0 there are exactly two elements in SA . (c) If W 6= 0 and α(A) = 0, there are exactly four elements in SA . (d) Suppose W 6= 0 and α(A) = 1. Assume further that there exist u1 , u2 ∈ U such that Ku1 = u2 and b(u1 , u2 ) = 1. Then there are exactly three elements in SA . Proof. For (a), the assumptions force Z(A) = Im(K + IdU ) ⊕ W ⊕ F2 and B(A) =  { (Au + u) ⊕ 0, (SA)(u) | u ∈ U }. So the quotient Z(A)/B(A) is clearly isomorphic to W ⊕ F2 . To transplant the action of C(A) from Z(A)/B(A) to W ⊕ F2 , let (w, λ) ∈ W ⊕ F2 and consider the formula  P.(0 ⊕ w, λ) = (P w, (SP )(w) + λ) = πU (P w) ⊕ πW (P w), (SP )(w) + λ . Since P ∈ C(A) it is easy to see that (A+I)(πU (P w)) = (A+I)(P w) = 0, therefore we can write πU (P w) = Au + u for some u ∈ U . Then (Au + u ⊕ 0, (SA)(u)) is in B(A), and we get P.(0 ⊕ w, λ) = (πW (P w), (SA)(u) + (SP )(w) + λ) in Z(A)/B(A). This finishes the proof of (a). Note that (0, 0) and (0, 1) in W ⊕ F2 are fixed points for the action of C(A). So |SA | ≥ 2, and one has equality if and only if W = 0. This proves (b). INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 17 Let E0 = {(w, q(w)) | w ∈ W − {0}} and E1 = {(w, q(w) + 1) | w ∈ W − {0}}. Note that W ⊕ F2 = {(0, 0)} ∐ {(0, 1)} ∐ E0 ∐ E1 . Assume that W 6= 0 and let w1 , w2 ∈ W be any two nonzero elements. By Proposition 2.10 there exists a P ∈ Sp(W ) such that P (w1 ) = w2 . Then Q = IdU ⊕P is an element of C(A), and  Q.(w1 , q(w1 )) = Qw1 , (SQ)(w1 ) + q(w1 ) + 0 = (Qw1 , q(w1 ) + q(Qw1 ) + q(w1 )) = (w2 , q(w2 )). The “0” in the first line appears because πU (Qw1 ) = 0, and so we may take u = 0 in the formula for the action given in (a). Since Q is linear and preserves (0, 1) we therefore also get Q.(w1 , q(w1 ) + 1) = (w2 , q(w2 ) + 1). These computations show that the elements of E0 are all in the same orbit under C(A), and the elements of E1 also lie in a common orbit. Therefore, (W ⊕ F2 )C(A) has at most four elements. Since (0, 0) and (0, 1) are fixed points, the only remaining question is whether points from E0 and E1 can ever be in the same orbit. For (c), the important point is that if α(A) = 0 then for all v ∈ V one has (4.5) q(Av + v) = q(Av) + q(v) + b(Av, v) = q(Av) + q(v) = (SA)(v). Consider the set map h : W ⊕ F2 → F2 given by h(w, λ) = q(w) + λ. Then h is constant on orbits of C(A): for if P ∈ C(A) then choose u ∈ U such that πU (P w) = Au + u and calculate   h P.(w, λ) = h πW (P w), λ + (SP )(w) + (SA)(u) = q(πW (P w)) + λ + q(w) + q(P w) + q(Au + u) (using (4.5))   = q πW (P w) + λ + q(w) + q(P w) + q πU (P w) = q(P w) + λ + q(w) + q(P w) = λ + q(w). In the second-to-last equality we have used that q(x + y) = q(x) + q(y) when b(x, y) = 0. Notice that h maps E0 to 0 and E1 to 1. So points in E0 and E1 cannot belong to the same orbit, which implies that |SA | = 4. Finally, assume the hypotheses for (d). Extend {u1 , u2 } to a symplectic basis {u1 , u2 , . . . , u2r−1 , u2r } of U , and choose a symplectic basis {w1 , . . . , w2s } of W . Note that Kui ∈ hu1 , u2 i⊥ for all i ≥ 3; this is a consequence of b(Kui , u1 ) = b(Kui , Ku2 ) = b(ui , u2 ) = 0 and the parallel equation with the indices 1 and 2 switched. So when i ≥ 3 we have Kui ∈ hu3 , u4 , . . . , u2r i. Define P : V → V as follows: u1 7→ u1 + w2 u2 7→ u2 + w2 w1 7→ u1 + u2 + w1 wi 7→ wi (i ≥ 2). ui 7→ ui (i ≥ 3) It is routine to check that P is an isometry and that it commutes with A (for the latter, use that Kui ∈ hu3 , u4 , . . . , u2r i when i ≥ 3). Note that πU (P w1 ) = 18 DANIEL DUGGER u1 + u2 = A(u1 ) + u1 , and (SP )(w1 ) = q(w1 ) + q(P w1 ) = q(w1 ) + q(w1 + (u1 + u2 )) = q(w1 ) + q(w1 ) + q(u1 ) + q(u2 ) + b(u1 , u2 ) = q(u1 ) + q(u2 ) + 1. Now we use the action formula from (a) to compute:   P.(w1 , q(w1 )) = w1 , q(w1 ) + (SP )(w1 ) + (SA)(u1 )   = w1 , q(w1 ) + q(u1 ) + q(u2 ) + 1 + q(u1 ) + q(u2 ) = (w1 , q(w1 ) + 1). This exhibits that points from E0 and E1 are in the same orbit in (W ⊕ F2 )C(A) , therefore we have exactly three orbits.  Proposition 4.6. Let A ∈ Sp(V ) be an involution. (a) When A = Id, |SA | = 4. ) , |SA | = 2. (b) When D(A) = dim(V 2 ) (c) When α(A) = 1 and 0 < D(A) < dim(V , |SA | = 3. 2 dim(V ) (d) When α(A) = 0 and 0 < D(A) < 2 , |SA | = 4. Proof. We have already proven that |SA | depends only on the conjugacy class of A in Sp(V ). So it suffices to prove the theorem when V = nH and A ranges over the particular representatives listed in Theorem 1.1(d). For each of these matrices it is transparent that there is a (U, W, K) decomposition satisfying the hypotheses of Lemma 4.4. Moreover, for the matrices with α(A) = 1 it is transparent that the hypotheses of Lemma 4.4(d) hold. So the results follow immediately from Lemma 4.4.  Corollary 4.7. If dim V = 2n then GV has 5n+1 conjugacy classes of involutions. Proof. The proof is best explained by first looking at examples. For n = 5 and n = 6 the conjugacy classes of involutions in Sp(2n) are indicated by the dots in the following two tables: α=1 α=0 0 1 • • 2 3 • • • 4 5 • • • α=1 α=0 0 1 • • 2 3 • • • 4 5 • • • 6 • • (one dot for each conjugacy class). For each involution A ∈ Sp(V ), mark the dot for the conjugacy class represented by A with |SA |; this leads to the tables 0 α=1 α=0 •4 1 •3 2 •3 •4 3 •3 4 •3 •4 5 •2 0 α=1 α=0 •4 1 •3 2 •3 •4 3 •3 4 •3 •4 5 •3 6 •2 •2 Adding up the numbers, there are 26 conjugacy classes of involutions in GV when n = 5, and 31 conjugacy classes of involutions when n = 6. The general situation is that the dots in the first row all get labelled with 3, except for column n. Likewise, the dots in the second row all get labelled with 4, INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 19 except for column n. The dots in column n all get labelled with 2. The total of all the labels is therefore ( when n is odd, 3(n − 1) + 2 + 4( n+1 2 ) n 3(n − 1) + 2 + 4( 2 ) + 2 when n is even. In both cases the given sum simplifies to 5n + 1.  4.8. Involutions in TO(2n). Proposition 4.9. TO(2n) has 5n − 4 conjugacy classes of involutions. Proof. Recall that TO(2n) ∼ = (Z/2)2n−1 ⋊Sp(2n−2). By Corollary 4.7, the number of involutions in the semi-direct product is 5(n − 1) + 1.  Our next goal is to produce a collection of specific involutions in TO(2n) and show that they must represent the 5n − 4 conjugacy classes. For the following proposition recall that I = [ 10 01 ] and J = [ 01 10 ]. Proposition 4.10. In TO(2n) we have the following calculations:  (a) DD I ⊕(n−k) ⊕ J ⊕k = [k, 1,(k + 1, 1] for 1 ≤ k ≤ n − 1.  [k + 1, 0, k, 1] if k is even, (b) DD m(I ⊕(n−k) ) ⊕ J ⊕k = [k + 1, 0, k + 1, 1] if k is odd for 0 ≤ k ≤ n − 1.  (c) DD m(I ⊕(n−k−1) ⊕ J ⊕k ) ⊕ J = [k + 2, 1, k + 2, 1] for 1 ≤ k ≤ n − 2. Proof. These are all simple computations. We only do (b), since the others are similar (and easier). Let A = m(I ⊕(n−k) ) ⊕ J ⊕k . Since A only has zeros along its diagonal, α(A) = 0. Since m(A) has a 1 (and in fact, all ones) along its diagonal, α̃(A) = 1. The matrices A + Id and m(A) + Id have the form 1 1 · · · 1   1 1 ··· 1 1 1 .. .. .. .. ..  ..  ... ...   . . . . . .    1 1 · · · 1   1 1 ··· 1 1 1     1 · · · 1   1 1 · · · 1 0 0 1 1 1    1 · · · 1 1 1   1 1 · · · 1 0 0 1     1 1 ··· 1 1 1 0 0 · · · 1 ..   1 1 · · · 1 1 1 0 . 0 · · · 1       . .  . . .. .. ..    .. ..  .. . .     1 1 1 1 ··· 1 1 1 1 ··· 0 0 1 1 1 1 ··· 1 1 1 1 ··· 0 0 The former clearly has rank k + 1. For the latter, row reduce the matrix by adding row 1 to the bottom 2k rows. This gives a new matrix where the lower 2k rows clearly have rank k. The question then becomes whether row one of the matrix is a linear combination of these new lower 2k rows. It is clear that this is the case precisely when k is even. As an alternative to just doing the rank computations, one can use Theorem 5.4 from the next section (but this is not really easier).  Corollary 4.11. The matrices listed in Proposition 4.10, together with the mirrors of the matrices in (a) and (b), represent all the conjugacy classes of involutions in TO(2n). 20 DANIEL DUGGER Proof. By Proposition 2.8, the DD-invariants are constant on conjugacy classes. Moreover, if DD(A) = [a, b, c, d] then DD(mA) = [c, d, a, b], simply by the definition. A look at the DD-invariants that appear in Proposition 4.10 reveals that there are no overlaps between parts (a), (b), and (c), even if one includes the mirrors of the matrices in (a) and (b). Now we count. There are n − 1 matrices covered by (a), which becomes 2n − 2 when one includes their mirrors. There are n matrices covered by (b), becoming 2n when one includes mirrors. Finally, there are n − 2 matrices covered by (c). So the total number of matrices is 2n − 2 + 2n + n − 2 = 5n − 4, and these represent distinct conjugacy classes.  Corollary 4.12. Two involutions in TO(2n) are conjugate if and only if they have the same DD-invariant. Proof. Immediate from Proposition 4.10 and Corollary 4.11.  The results in this section together constitute a proof of Theorem 1.2 from the introduction. 5. The DD-invariant and direct sums Suppose that (U, bU ) and (W, bW ) are two bilinear spaces over F2 , and σ ∈ Iso(U ) and θ ∈ Iso(W ) are two involutions. It is natural to ask how the conjugacy class of the involution σ ⊕ θ : U ⊕ W → U ⊕ W depends on the conjugacy classes of σ and θ. Answering this is important for concrete computations, and it is needed for the applications in [D]. Unfortunately, stating the answer to the question is a little awkward due to the variety of cases that can occur. From the point of view of classifying involutions there are three types of bilinear spaces: symplectic, even-dimensional orthogonal, and odd-dimensional orthogonal. This leads to six different cases that must be analyzed for the pair (U, W ). And as the classification of conjugacy classes of involutions looks slightly different for the three types, the bookkeeping to handle the direct sum is somewhat clunky. In this section we try, to the extent possible, to unify the three cases into a common classification system. The end result is still a bit clunky, but it is manageable. 5.1. Unification. For brevity let us write SYMP, EVO, and ODDO for the three types of bilinear spaces over F2 . Note that in this nomenclature direct sums behave as in the chart below: ⊕ SYMP ODDO EVO SYMP ODDO EVO SYMP ODDO EVO ODDO EVO ODDO EVO ODDO EVO For all three types we have a distinguished vector Ω in the bilinear space, uniquely characterized by the property that Ω · v = v · v, for all vectors v. When the bilinear space is symplectic one has Ω = 0. If U and W are bilinear spaces and V = U ⊕ W , one readily checks that ΩV = ΩU + ΩW . INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 21 We extend the DD-invariant to the SYMP and ODDO cases in a trivial way that we will now explain. Let (V, bV ) be a bilnear space and σ ∈ Iso(V ) be an involution. If V is symplectic then define D̃(σ) = D(σ), α̃(σ) = α(σ), and DD(σ) = [D(σ), α(σ), D(σ), α(σ)]. If V is ODDO then σ always preserves Ω and b(σ(Ω), Ω) = b(Ω, Ω) = 1. So the usual definition of the α-invariant is not useful here. To get a more useful invariant, note that hΩi⊥ ⊆ V is symplectic and σ restricts to a map σ ′ : hΩi⊥ → hΩi⊥ . Define α(σ) = α(σ ′ ). Since σ(Ω) = Ω it follows at once that D(σ) = D(σ ′ ), so the change to σ ′ is really just for the purposes of the α-invariant. Define D̃(σ) = D(σ), α̃(σ) = α(σ), and DD(σ) = [D(σ), α(σ), D(σ), α(σ)] = [D(σ ′ ), α(σ ′ ), D(σ ′ ), α(σ ′ )]. We can now say by Theorem 1.1, Theorem 1.2, and Proposition 2.3 that the DD-invariant completely separates the conjugacy classes of orbits in each of the SYMP, ODDO, and EVO cases. Of course, in the first two cases the DD-invariant contains very redundant information. The following lemma will be needed in the next section: Lemma 5.2. Assume (W, b) is ODDO, and that σ is an involution in Iso(W ). Then the following three statements are equivalent: (1) α(σ) = 1. (2) There exists w ∈ W such that b(w, w) = 0 and b(w, σw) = 1. (3) There exists v ∈ W such that b(v, v) = 1 and b(v, σv) = 0. Proof. The equivalence of (1) and (2) is just the definition of α(σ). If b(w, w) = 0 and b(w, σw) = 1 then let v = w + Ω. Then σv = σw + Ω. One readily checks that b(v, v) = b(Ω, Ω) = 1 and b(v, σv) = b(w, σw) + b(Ω, Ω) = 0. So (2) implies (3), and the converse is similar.  5.3. Direct sums. It is trivial to check that in all cases D(σ⊕θ) = D(σ)+D(θ). It is also trivial to see that when U and W are both even-dimensional, then α(σ ⊕θ) = max{α(σ), α(θ)}. Our “baseline” for how DD(σ ⊕ θ) relates to DD(σ) and DD(θ) is that DD(σ ⊕ θ) = DD(σ)#DD(θ) where for tuples X, Y ∈ Z × Z/2 × Z × Z/2 we define X#Y = [X1 + Y1 , max{X2 , Y2 }, X3 + Y3 , max{X4 , Y4 }]. By “baseline” we simply mean that this is the result that holds in the majority of cases, and the exceptional cases can be seen as small deviations from this baseline. Theorem 5.4. Let (U, bU ) and (W, bW ) be two bilinear spaces over F2 . Let σ ∈ Iso(U ) and θ ∈ Iso(W ) be two involutions. Then (a) DD(σ ⊕ θ) = DD(σ)#DD(θ) if either U or W is SYMP. (b) If U and W are both ODDO then DD(σ ⊕ θ) = [D(σ) + D(θ), 1, D(σ) + D(θ) + 1, max{α(σ), α(θ)}]   = DD(σ)#DD(θ) #[0, 1, 1, 0]. (c) If U is ODDO and W is EVO then DD(σ ⊕ θ) = [D(σ) + D(θ), max{α(σ), α̃(θ)}, D(σ) + D(θ), max{α(σ), α̃(θ)}]. 22 DANIEL DUGGER (d) If U and W are both EVO then D(σ ⊕ θ) = [DD(σ)#DD(θ)] + E where + means componentwise-addition and   [0, 0, 0, 0] if D̃(σ) = D(σ)      [0, 0, −1, 0] if D̃(σ) > D(σ) E = [0, 0, 1, 0] if D̃(σ) > D(σ)   [0, 0, 1, 0] if D̃(σ) < D(σ)    [0, 0, 2, 0] if D̃(σ) < D(σ) or D̃(θ) = D(θ), and D̃(θ) > D(θ), and D̃(θ) < D(θ), and D̃(θ) > D(θ), and D̃(θ) < D(θ). Remark 5.5. In part (d), the main point is the behavior of the D̃ invariant. Here is a bookkeeping system that contains the same information as the five cases listed in (d). Let C be the monoid {−1, 0, 1} with integer multiplication. Every involution σ ∈ TO(2k) may be given a “charge” c(σ) in C as follows. If D̃(σ) > D(σ) then c(σ) = 0. If D̃(σ) = D(σ) then c(σ) = 1. If D̃(σ) < D(σ) then c(σ) = −1. Under this system one has c(σ ⊕ θ) = c(σ)c(θ), where the multiplication of charges takes place in C. This formula suggests that the 4-tuple [D(σ), c(σ), α(σ), α̃(σ)] might be a more convenient fundamental system of invariants for involutions, as opposed to the DD-invariant. We have not gone this route mainly because the definition of c(σ) is not particularly intuitive, and in practice it would usually be computed via D̃(σ) anyway. Proof of Theorem 5.4. This proof is somewhat long and clunky, due to the number of cases. As we remarked before, the D-invariant is always additive—so we will ignore it for the remainder of the proof, and concentrate on the other three invariants. Set V = U ⊕ W , and note that ΩV = ΩU + ΩW . For part (a) we assume that U is symplectic. There are then three cases, depending on the type of W . If W is also symplectic then the result is easy. Assume that W is EVO, so that V is also EVO. Observe that D̃(σ ⊕ θ) is the dimension of the space  (u + σu + (b(u, u) + b(w, w))ΩU , w + θw + (b(u, u) + b(w, w))ΩW ) | u ∈ U, w ∈ W . But ΩU = 0 and b(u, u) = 0 for all u ∈ U , so this simplifies to  (u + σu, w + θw + b(w, w)ΩW ) | u ∈ U, w ∈ W which splits as {u + σu | u ∈ U } ⊕ {w + θw + b(w, w)ΩW | w ∈ W }. The dimensions of the two summands are D(σ) = D̃(σ) and D̃(θ), respectively. So D̃(σ ⊕ θ) = D̃(σ) + D̃(θ). One has α(σ ⊕ θ) = 1 if and only if there exist u ∈ U , w ∈ W such that 1 = b(u + w, σu + θw) = b(u, σu) + b(w, θw) and clearly this has a solution if and only if either α(σ) = 1 or α(θ) = 1. So α(σ + θ) = max{α(σ), α(θ)}. INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 23 Likewise, α̃(σ ⊕ θ) = 1 if and only if there exist u ∈ U , w ∈ W such that 1 = b(u + w, σu + θw + (b(u, u) + b(w, w))ΩV ) = b(u, σu) + b(w, θw) + b(u, u) + b(w, w) = b(u, σu) + b(w, θw) + b(w, w) since U is symplectic = b(u, σu) + b(w, θw + b(w, w)ΩW ). Clearly such u and w exist if and only if either α(σ) = 1 or α̃(θ) = 1. Since α(σ) = α̃(σ), we can write α̃(σ ⊕ θ) = max{α̃(σ), α̃(θ)}. This finishes the proof when W is EVO. To complete the proof for (a), assume that U is SYMP and W is ODDO. Here V is ODDO, so D̃ and α̃ are redundant—it only remains for us to compute α for σ ⊕ θ. We have α(σ ⊕ θ) = 1 if and only if there exists u ∈ U , w ∈ W such that 0 = b(u + w, ΩV ) = b(w, ΩW ) and 1 = b(u + w, σu + θw) = b(u, σu) + b(w, θw). Having a u such that b(u, σu) = 1 is equivalent to α(σ) = 1. Having a w such that b(w, ΩW ) = 0 and b(w, θw) = 1 is equivalent to α(θ) = 1. So α(σ ⊕ θ) = max{α(σ), α(θ)}. For (b), assume that U and W are ODDO. Here ΩV = ΩU + ΩW . We readily compute that   b (σ ⊕ θ)(ΩU ), ΩU = b σ(ΩU ), ΩU = b(ΩU , ΩU ) = 1, so α(σ ⊕ θ) = 1. Let F = m(σ ⊕ θ). Recall that F : V → V is the map given by (σ ⊕ θ)(v) + b(v, v)ΩV . But we can decompose V as V = hΩU i⊥ ⊕ hΩW i⊥ ⊕ hΩU i ⊕ hΩW i. The first two summands are symplectic, so on these F agrees with σ and θ, respectively. On the last two summands F is readily checked to satisfy F (ΩU ) = ΩW and F (ΩW ) = ΩU . It follows at once that α̃(σ ⊕ θ) = α(F ) = max{α(σ), α(θ)}. Moreover, D̃(σ ⊕ θ) is the dimension of Im(F + Id), which clearly decomposes as Im(σ + Id) ⊕ Im(θ ⊕ Id) ⊕ hΩV i. So D̃(σ ⊕ θ) = D(σ) + D(θ) + 1 = D̃(σ) + D̃(θ) + 1. Now we turn to (c), so assume U is ODDO and V is EVO. Then U ⊕V is ODDO, so D̃(σ ⊕ θ) = D(σ ⊕ θ) and α̃(σ ⊕ θ) = α(σ ⊕ θ). We only need to compute α(σ ⊕ θ). This invariant is equal to 1 if and only if there exist u ∈ U , w ∈ W such that (5.6) 0 = b(u + w, u + w) = b(u, u) + b(w, w), and 1 = b(u + w, σu + θw) = b(u, σu) + b(w, θw). These equations break down into four possibilities: b(u, u), b(w, w) b(u, σu), b(w, θw) I 0, 0 1, 0 II 0, 0 0,1 III 1, 1 1,0 IV 1, 1 0,1 In case I we have α(σ) = 1, by definition of α. In case II we have I3 (θ) > 0, and so α̃(θ) = α(θ) = 1 by Proposition 3.5(f,g). In case III we have I4 (θ) > 0, so α̃(θ) = 1 by Proposition 3.5(g). And in case IV we have α(σ) = 1, by Lemma 5.2. In all cases we have either α(σ) = 1 or α̃(θ) = 1. Conversely, if α(σ) = 1 then we have a u ∈ U such that b(u, u) = 0 and b(u, σu) = 1. Then the pair (u, 0) is a solution to (5.6). Likewise, if α̃(θ) = 1 then by 24 DANIEL DUGGER Proposition 3.5(g) I4 (θ) > 0; so there exists w ∈ W such that b(w, w) = 1 and b(w, σw) = 0. Then (ΩU , w) is a solution to (5.6). So we have now proven that α(σ ⊕ θ) = 1 ⇐⇒ (α(σ) = 1 or α̃(θ) = 1). This is equivalent to α(σ ⊕ θ) = max{α(σ), α̃(θ)}. This completes (c). Finally, we turn to (d). The computations of α and α̃ for σ⊕θ are straightforward and left to the reader. It remains to deal with D̃. Let F = m(σ ⊕ θ) + Id. Recall that F : V → V is the map given by v 7→ (σ ⊕ θ)(v) + v + b(v, v)ΩV . Let M be the image of F , so that D̃(σ ⊕ θ) = dim M . Note that ΩV = ΩU ⊕ ΩW . Define P = F (U ) = {σu + u + bU (u, u)ΩU + bU (u, u)ΩW | u ∈ U } and Q = F (V ) = {θw + w + bW (w, w)ΩW + bW (w, w)ΩU | w ∈ W }. Then M = P + Q, and clearly P ∩ Q ⊆ hΩU , ΩW i. We claim that (5.7) ΩU ∈ P ⇐⇒ I7 (σ) 6= 0, ΩW ∈ Q ⇐⇒ I7 (θ) 6= 0 ΩW ∈ P ⇐⇒ I8 (σ) 6= 0, ΩU ∈ Q ⇐⇒ I8 (θ) 6= 0, ΩU + ΩW ∈ P ⇐⇒ I5 (σ) 6= 0, ΩU + ΩW ∈ Q ⇐⇒ I5 (θ) 6= 0. These are all easy statements. For example, clearly ΩU ∈ P if and only if there exists a u ∈ U such that bU (u, u) = 0 and σ(u) + u = ΩU . This is precisely the condition that I7 (σ) 6= 0. The other statements are similar. Suppose that I7 (σ) = I7 (θ) = 0. By Proposition 3.5(k) this is the assumption that D(σ) 6= D̃(σ) and D(θ) 6= D̃(θ). Also by Proposition 3.5, either I5 (σ) or I8 (σ) is nonzero, and similarly for θ. So we have (ΩW ∈ P or ΩU +ΩW ∈ P ) and (ΩU ∈ Q or ΩU +ΩW ∈ Q). Note that all four combinations lead to ΩU +ΩW ∈ P +Q. If I8 is nonzero for either σ or θ then one readily checks using (5.7) that ΩU , ΩW ∈ P + Q. Therefore M = hΩU , ΩW i + {σ(u) + u | u ∈ U } + {σ(w) + w | w ∈ W }. Note that the second space has dimension D(σ), and the third space has dimension D(θ). Moreover, I8 (σ) 6= 0 if and only if ΩU is in the second space, and I8 (θ) 6= 0 if and only if ΩW is in the third space. We will use these observations to analyze dim M in the various cases. If D̃(σ) > D(σ) and D̃(θ) < D(θ) then by Proposition 3.5 we know I8 (σ) = 0, I8 (θ) 6= 0, and I7 (σ) = I7 (θ) = 0. So dim M = 1 + D(σ) + D(θ) = 1 + (D̃(σ) − 1) + (D̃(θ) + 1) = D̃(σ) + D̃(θ) + 1. The analysis is identical in the opposite case D̃(σ) < D(σ) and D̃(θ) > D(θ). If D̃(σ) < D(σ) and D̃(θ) < D(θ) then I7 (σ) = I7 (θ) = 0 and both I8 (σ) and I8 (θ) are nonzero, therefore dim M = D(σ) + D(θ) = D̃(σ) + D̃(θ) + 2. Next assume D̃(σ) > D(σ) and D̃(θ) > D(θ). Then by Proposition 3.5 we know both I5 (σ) and I5 (θ) are nonzero. So ΩU + ΩW ∈ P ∩ Q and we can write M = hΩU + ΩW i + {σ(u) + u | u ∈ U } + {σ(w) + w | w ∈ W }. Since I7 (σ) = I8 (σ) = 0, ΩU is not contained in the middle subspace. Similarly, ΩW is not contained in the right subspace. It follows that the above is a direct sum decomposition of M , and so dim M = 1 + D(σ) + D(θ) = D̃(σ) + D̃(θ) − 1. INVOLUTIONS IN THE TOPOLOGISTS’ ORTHOGONAL GROUP 25 We only have left to analyze the case where D̃(σ) = D(σ) (or the parallel case where σ and θ are interchanged). Here I7 (σ) 6= 0 and I5 (σ) = I8 (σ) = 0. So ΩU ∈ P and we can therefore write M = hΩU i + {σ(u) + u + bU (u, u)ΩW | u ∈ U } + {θ(w) + w + bW (w, w)ΩW | w ∈ W }. The dimension of the third summand is D̃(θ). Because I7 (σ) 6= 0, ΩU lies in the second summand and so the hΩU i piece can be ignored. The second summand is contained in {σ(u) + u | u ∈ U } ⊕ hΩW i, but since I5 (σ) = 0 it does not contain ΩW . So its dimension is clearly the same as {σ(u) + u | u ∈ U }, which is D(σ). We also get M = {σ(u) + u + bU (u, u)ΩW | u ∈ U } ⊕ {θ(w) + w + bW (w, w)ΩW | w ∈ W }, since the only vector that could possibly lie in the intersection is ΩW and we have just observed it is not in the left summand. So dim M = D(σ) + D̃(θ) = D̃(σ) + D̃(θ).  References [AS] [Di] [D] [Dy1] [Dy2] [HM] [M] [T] M. Aschbacher and G. Seitz, Involutions in Chevalley groups over fields of even order , Nagoya Math. J. 63 (1976), 1–91. J. A. Dieudonné, La géometrié des groupes classiques, Third edition. Ergebnisse der Mathematik und ihre Grenzgebiete, Band 5. Springer-Verlag, Berlin-New York, 1971. D. Dugger, Involutions on surfaces, preprint, 2016. R. H. Dye, On the conjugacy classes of involutions of the simple orthogonal groups over perfect fields of characteristic two, J. of Algebra 18 (1971), 414–425. R. H. Dye, On the conjugacy classes of involutions of the orthogonal groups over perfect fields of characteristic 2 , Bull. London Math. Soc. 3 (1971), 61–66. D. Husemoller and J. Milnor, Symmetric bilinear forms, Ergebnisse der Mathematik und ihrer Grenzgebiete, Band 73. Springer-Verlag, New York-Heidelberg, 1973. J. MacWilliams, Orthogonal matrices over finite fields, Amer. Math. Monthly 76 (1969), no. 2, 152–164. D. E. Taylor, The Geometry of the Classical Groups, Sigma Series in Pure Mathematics 9, Heldermann Verlag, Berlin, 1992. Department of Mathematics, University of Oregon, Eugene, OR 97403 E-mail address: [email protected]
4math.GR
arXiv:1801.09392v1 [cs.CV] 29 Jan 2018 Shift-Net: Image Inpainting via Deep Feature Rearrangement Zhaoyi Yan1 , Xiaoming Li1 , Mu Li2 , Wangmeng Zuo1∗, Shiguang Shan3,4 1 School of Computer Science and Technology, Harbin Institute of Technology, Harbin, China 2 Department of Computing, The Hong Kong Polytechnic University, Hong Kong, China 3 Key Lab of Intelligent Information Processing of Chinese Academy of Sciences (CAS), Institute of Computing Technology, CAS, Beijing 100190, China 4 CAS Center for Excellence in Brain Science and Intelligence Technology [email protected], [email protected], [email protected], [email protected], [email protected] Abstract Deep convolutional networks (CNNs) have exhibited their potential in image inpainting for producing plausible results. However, in most existing methods, e.g., context encoder, the missing parts are predicted by propagating the surrounding convolutional features through a fully connected layer, which intends to produce semantically plausible but blurry result. In this paper, we introduce a special shift-connection layer to the U-Net architecture, namely Shift-Net, for filling in missing regions of any shape with sharp structures and fine-detailed textures. To this end, the encoder feature of the known region is shifted to serve as an estimation of the missing parts. A guidance loss is introduced on decoder feature to minimize the distance between the decoder feature after fully connected layer and the ground truth encoder feature of the missing parts. With such constraint, the decoder feature in missing region can be used to guide the shift of encoder feature in known region. An end-to-end learning algorithm is further developed to train the Shift-Net. Experiments on the Paris StreetView and Places datasets demonstrate the efficiency and effectiveness of our Shift-Net in producing sharper, finedetailed, and visually plausible results. (a) Input (b) Content-Aware Fill [1] (c) Context Encoder [31] (d) Shift-Net Figure 1: Qualitative comparison of inpainting methods. Given (a) an image with a missing region, we present the inpainting results by (b) Content-Aware Fill [1], (c) context encoder [31], and (d) our Shift-Net. 1. Introduction Image inpainting is the process of filling in missing regions with plausible hypothesis, and can be used in many real world applications such as removing distracting objects, repairing corrupted or damaged parts, and completing occluded regions. For example, when taking a photo, rare is the case that you are satisfied with what you get directly. Distracting scene elements, such as irrelevant people ∗ Corresponding or disturbing objects, generally are inevitable but unwanted by the users. Fortunately, image inpainting can serve as a remedy to remove these elements and fill in with desirable content. Despite decades of studies, image inpainting remains a very challenging problem in computer vision and graphics. In general, there are two requirements for the image inpainting result: (i) global semantic structure and (ii) fine de- author. 1 tailed textures. Classical exemplar-based inpainting methods, e.g., PatchMatch [2], gradually synthesize the content of missing parts by searching similar patches from known region. Even such methods are promising in filling highfrequency texture details, they fail in capturing the global structure of the image (See Fig. 1b). In contrast, deep convolutional networks (CNNs) have also been suggested to predict the missing parts conditioned on its surroundings [31, 47]. Benefited from large scale training data, they can produce semantically plausible inpainting result. However, the existing CNN-based methods usually complete the missing parts by propagating the surrounding convolutional features through a fully connected layer (i.e., bottleneck), making the inpainting results sometimes lack of fine texture details and blurry. The introduction of adversarial loss is helpful in improving the sharpness of the result, but cannot address this issue essentially (see Fig. 1c). In this paper, we present a novel CNN, namely ShiftNet, to take into account the advantages of both exemplarbased and CNN-based methods for image inpainting. Our Shift-Net adopts the U-Net architecture by adding a special shift-connection layer. In exemplar-based inpainting [5], the patch-based replication and filling process are iteratively performed to grow the texture and structure from the known region to the missing parts. And the patch processing order plays a key role in yielding plausible inpainting result [25, 46]. We note that CNN is effective in predicting the image structure and semantics of the missing parts. Guided by the salient structure produced by CNN, the filling process in our Shift-Net can be finished concurrently by introducing a shift-connection layer to connect the encoder feature of known region and the decoder feature of missing parts. Thus, our Shift-Net inherits the advantages of exemplar-based and CNN-based methods, and can produce inpainting result with both plausible semantics and fine detailed textures. Several losses are suggested to guide the shift operation and to learn the network parameters. To ensure that the decoder feature can serve as a good guidance, a guidance loss is introduced to enforce the decoder feature be close to the ground truth encoder feature. Moreover, `1 and adversarial losses are also considered to reconstruct the missing parts and restore more detailed textures. By minimizing the target objective, our Shift-Net can be end-to-end learned with a training set. Extensive experiments are conducted on the Paris StreetView dataset, the Places dataset, and real images. The results show that our Shift-Net can handle missing regions with any shape, and is effective in producing sharper, fine-detailed, and visually plausible results (See Fig. 1d). Besides, Yang et al. [47] also suggest a neural patch synthesis (NPS) approach to incorporating CNN-based with exemplar-based methods. Their method includes two stages, where an encoder-decoder network is used to generate an initial estimation in the first stage. By considering both global content and texture losses, a joint optimization model on VGG-19 [38] is minimized to generate the fine-detailed result in the second stage. Even Yang et al. [47] yields encouraging result, it is very time-consuming and takes about 40, 000 millisecond (ms) to process an image with size of 256 × 256. In contrast, our Shift-Net can achieve comparable or better result (See Fig. 5 for several examples) and only takes 82 ms. Taking both effectiveness and efficiency into account, our Shift-Net can provide a better solution to combine exemplar-based and CNN-based inpainting for improving performance. To sum up, the main contribution of this work is threefold: 1. By introducing the shift-connection layer to U-Net, a novel Shift-Net architecture is developed to efficiently combine CNN-based and exemplar-based inpainting. 2. The guidance, reconstruction, and adversarial losses are introduced to train our Shift-Net. Even with the deployment of shift operation, all the network parameters can be learned in an end-to-end manner. 3. Our Shift-Net achieves state-of-the-art results in comparison with [2, 31, 47] and performs favorably in generating fine-detailed textures and visually plausible results. 2. Related Work In this section, we briefly review the work on each of the three sub-fields, i.e., exemplar-based inpainting, CNNbased inpainting, and style transfer, and specially focus on those relevant to this work. 2.1. Exemplar-based inpainting In exemplar-based inpainting [2, 3, 5, 7, 9, 17, 18, 22, 23, 25, 32, 37, 39, 43, 44, 46], the completion is conducted from the exterior to the interior of the missing part by searching and copying best matching patches from the known region. For fast patch search, Barnes et al. suggest a PatchMatch algorithm [2] to exploit the image coherency, and generalize it for finding k-nearest neighbors [3]. Exemplar-based inpainting is superior in synthesizing textures, but is not well suited for preserving edges and structures. For better recovery of image structure, several patch priority measures have been proposed to fill in structural patches first [5, 25, 46]. Global image coherence has also been introduced to the Markov random field (MRF) framework for improving visual quality [22, 32, 43]. However, these methods only work well on images with simple structures, and may fail in handling images with complex objects and scenes. Besides, in most exemplar-based inpainting methods [22, 23, 32], the 2 256 64 32 64 32 16 8 4 512 512 2 512 1 512 4 2 512 16 8 512 512 512 512 256 256 128 64 256 128 128 ΦL−l (I) Φl (I) Shift 128 t Φshif L−l (I) 64 3 3 Figure 2: The architecture of our model. We add the shift-connection layer at the resolution of 32 × 32. missing part is recovered as the shift representation of the known region in pixel/region level, which also motivates our shift operation on convolution feature representation. verse network is then deployed to generate the image from feature representation. 2.2. CNN-based inpainting 3. Method Recently, deep CNNs have achieved great success in image inpainting. Originally, CNN-based inpainting is confined to small and thin masks [21, 34, 45]. Phatak et al. [31] present an encoder-decoder (i.e., context encoder) network to predict the missing parts, where an adversarial loss is adopted in training to improve the visual quality of the inpainted image. Context encoder completes the input image with only one forward-pass. Even it is effective in capturing image semantics and global structure, it still performs poor in generating fine-detailed textures. Other network architecture, e.g., U-Net [35], has been employed to image translation [50] and can also be adopted in image inpainting [16]. Semantic image inpainting is introduced to fill in the missing part conditioned on the known region for images from a specific semantic class [48]. In order to obtain globally consistent result with locally realistic details, global and local discriminators have been proposed in image inpainting [15] and face completion [28]. For better recovery of fine details, multi-scale neural patch synthesis is presented to combine exemplar-based and CNN-based inpainting [47]. Given an input image I, image inpainting aims to restore the ground truth image I gt by filling in the missing part. To this end, we adopt U-Net as the baseline network. By incorporating with guidance loss and shift operation, we develop a novel Shift-Net for better recovery of semantic structure and fine-detailed textures. In the following, we first introduce the guidance loss and Shift-Net, and then describe the model objective and learning algorithm. 3.1. Guidance loss on decoder feature The U-Net consists of an encoder and a symmetric decoder, where skip connection is introduced to concatenate the features from each layer of encoder and those of the corresponding layer of decoder. Such skip connection makes it convenient to utilize the information before and after bottleneck, which is valuable for image inpainting and other low level vision tasks in capturing localized visual details [16, 50]. The architecture of the U-Net adopted in this work is shown in Fig. 2. Please refer to the supplementary material for more details on network parameters. For image inpainting, the U-Net possesses more characteristics which are useful in improving completion result. Let Ω be the missing region and Ω be the known region. Given a U-Net of L layers, Φl (I) is used to denote the encoder feature of the l-th layer, and ΦL−l (I) the decoder feature of the (L − l)-th layer. For the end of recovering I gt , we expect that Φl (I) and ΦL−l (I) convey almost all the information in Φl (I gt ). For any location y ∈ Ω, we have (Φl (I))y ≈ 0. Thus, (ΦL−l (I))y should convey equivalent information of (Φl (I gt ))y . In this work, we suggest to explicitly model the relationship between (ΦL−l (I))y and (Φl (I gt ))y by introducing 2.3. Style transfer Image inpainting can be treated as an extension of style transfer, where both the content and style (texture) of missing part are estimated and transferred from the known region. In the recent few years, style transfer [4, 8, 10, 11, 13, 19, 27, 29, 40] has been an active research topic. Gatys et al. [10] show that we can transfer style and texture of the style image to the content image by solving an optimization objective defined on an existing CNN. Instead of the Gram matrix, Li et al. [27] apply the MRF regularizer to style transfer to suppress distortions and smears. In [4], local matching is performed on the convolution layer of the pre-trained network to combine content and style, and an in3 the following guidance loss, Lg = X  (ΦL−l (I))y − Φl (I gt ) y y∈Ω 2 . (1) 2 We note that (Φl (I))x ≈ (Φl (I gt ))x for any x ∈ Ω. Thus the guidance loss is only defined on y ∈ Ω to make (ΦL−l (I))y ≈ (Φl (I gt ))y . By concatenating Φl (I) and ΦL−l (I), all information in Φl (I gt ) can be approximately obtained. Experiment on deep feature visualization is further conducted to illustrate the relation between (ΦL−l (I))y and (Φl (I gt ))y . For visualizing {(Φl (I gt ))y |y ∈ Ω}, we adopt the method [30] by solving an optimization problem H gt = arg min H X (Φl (H))y − Φl (I gt ) y∈Ω  (a) (b) (c) (d) 2 y 2 . (2) . (3) Analogously, {(ΦL−l (I))y |y ∈ Ω} is visualized by H de = arg min H X (Φl (H))y − (ΦL−l (I))y y∈Ω gt 2 2 Figure 3: Visualization of features learned by our model. Given (a) an input image, (b) is the visualization of (Φl (I gt ))y (i.e., H gt ), (c) shows the result of (ΦL−l (I))y   t (i.e., H de ) and (d) demonstrates the effect of Φshif . L−l (I) de Fig. 3(b)(c) show the visualization results of H and H . With the introduction of guidance loss, obviously H de can serve as a reasonable estimation of H gt , and U-Net works well in recovering image semantics and structures. However, in compared with H gt and I gt , the result H de is blurry, which is consistent with the poor performance of CNNbased inpainting in recovering fine textures [47]. Finally, we note that the guidance loss is helpful in constructing an explicit relation between (ΦL−l (I))y and (Φl (I gt ))y . In the next section, we will explain how to utilize such property for better estimation to (Φl (I gt ))y and enhancing inpainting result. y (Φl (I))x (x ∈ Ω) can be independently obtained by, E D (ΦL−l (I))y , (Φl (I))x x∗ (y) = arg max , x∈Ω k(ΦL−l (I))y k2 |(Φl (I))x k2 (4) and the shift vector is defined as uy = x∗ (y) − y. Similar to [27], the nearest neighbor searching can be computed as a convolutional layer. Then, we update the estimation of (Φl (I gt ))y as the spatial rearrangement of the encoder feature (Φl (I))x ,   t Φshif = (Φl (I))y+uy . (5) L−l (I) 3.2. Shift operation and Shift-Net In exemplar-based inpainting, it is generally assumed that the missing part is the spatial rearrangement of the pixels/patches in the known region. For each pixel/patch localized at y in missing part, exemplar-based inpainting explicitly or implicitly find a shift vector uy , and recover (I)y with (I)y+uy , where y + uy ∈ Ω is in the known region. The pixel value (I)y is unknown before inpainting. Thus, the shift vectors usually are obtained progressively from the exterior to the interior of the missing part, or by solving a MRF model by considering global image coherence. However, these methods may fail in recovering complex image semantics and structures. As illustrated in Fig. 4, we introduce a special shiftconnection layer in U-Net, which takes Φl (I) and ΦL−l (I) to obtain an updated estimation on Φl (I gt ). For each (ΦL−l (I))y with y ∈ Ω, its nearest neighbor searching in y See Fig. 3(d) for visualization. Finally, as shown in Fig. 2, t the convolution features ΦL−l (I), Φl (I) and Φshif L−l (I) are concatenated and taken as inputs to the (L − l + 1)-th layer, resulting in our Shift-Net. The shift operation is different with exemplar-based inpainting from several aspects. (i) While exemplar-based inpainting is operated on pixels/patches, shift operation is performed on deep encoder feature which is end-to-end learned from training data. (ii) In exemplar-based inpainting, the shift vectors are obtained either by solving an optimization problem or in particular order. As for shift operation, with the guidance of ΦL−l (I), all the shift vectors can be computed in parallel. (iii) For exemplar-based inpainting, both 4 Nearest Neighbor Search Feature Vector Shift Taking guidance, `1 , and adversarial losses into account, the overall objective of our Shift-Net is defined as, L = L`1 + λg Lg + λadv Ladv , (9) where λg and λadv are the tradeoff parameters for the guidance and adversarial losses, respectively. z . 3.3.2 Given a training set {(I, I gt )}, the Shift-Net is trained by minimizing the objective in Eqn. (9) via back-propagation. We note that the Shift-Net and the discriminator are trained in an adversarial manner. The Shift-Net Φ(I; W) is updated by minimizing the adversarial loss Ladv , while the discriminator D is updated by maximizing Ladv . Due to the introduction of shift-connection layer, we should modify the computation of the gradient with respect to the l-th layer of feature Fl = Φl (I). To avoid confusion, we use Flskip to denote the feature Fl after skip connection, and of course we have Flskip = Fl . According to Eqn. (5), t the relation between Φshif L−l (I) and Φl (I) can be written as, Figure 4: Illustration of the shift operation. patch processing orders and global image coherence are not sufficient for preserving complex structures and semantics. In contrast, in shift operation ΦL−l (I) is learned from large scale data and is more powerful in capturing global semantics. (iv) In exemplar-based inpainting, after obtaining the shift vectors, the completion result can be directly obtained as the shift representation of the known region. As for t shift operation, we take the shift representation Φshif L−l (I) together with ΦL−l (I) and Φl (I) as inputs to (L − l + 1)-th layer of U-Net, and adopt a data-driven manner to learn an optimal model for image inpainting. To sum up, even with the introduction of shift-connection layer, all the model parameters in our Shift-Net can be end-to-end learned from training data. Thus, our Shift-Net naturally inherits the advantages of exemplar-based and CNN-based inpainting. t Φshif L−l (I) = PΦl (I), ∂L ∂Fl+1 ∂L ∂L ∂L + , = +PT shif t ∂Fl ∂Flskip ∂Fl+1 ∂Fl ∂ΦL−l (I) Objective 3.4. Implementation (6) In the previous subsections, we assume that the missing region Ω is invariant in all the encoder layers. Actually, Ω changes along with the convolution and pooling operations. Denote by Ω0 the missing part of the input image, and we should determine Ωl for the l-th convolutional layer. In our implementation, we introduce a mask image M with (M )y = 1 (y ∈ Ω) and 0 otherwise. Then, we define a CNN Ψ(M ) that has the same architecture with the encoder but with the network width of 1. All the elements of the filters are 1/16, and we remove all the nonlinearity. Taking M as input, we obtain the feature of the l-th layer as Ψl (M ). Then, Ωl is defined as Ωl = {y|(Ψl (M ))y ≥ T }, where T is the threshold with 0 ≤ T ≤ 1. Here we empirically set T = 5/16. Our Shift-Net is optimized using the Adam algorithm [20] with a learning rate of 2 × 10−4 and β1 = 0.5. which is suggested to constrain that the inpainting result should be close to the ground truth image. Recently, adversarial loss has been adopted in many low level vision [26] and image generation tasks[16, 33], and exhibits its superiority in restoring high-frequency details and photo-realistic textures. As for image inpainting, we use pdata (I gt ) to denote the distribution of the ground truth images, and pmiss (I) to denote the distribution of the input image. The adversarial loss is then defined as, Ladv= max EI gt ∼pdata (I gt ) [log D(I gt )] D + EI∼pmiss (I) [log(1 − D(Φ(I; W)))], (11) where the computation of the first two terms are the same t with U-Net, and the gradient with respect to Φshif L−l (I) can also be directly computed. Thus, our Shift-Net can also be end-to-end trained to learn the model parameters W. Denote by Φ(I; W) the output of our Shift-Net, where W is the model parameters to be learned. Besides the guidance loss, the `1 loss and the adversarial loss are also considered to train our Shift-Net. The `1 loss is defined as, L`1 = kΦ(I; W) − I gt k1 , (10) where P denotes the shift matrix of {0, 1}, and there is only one element of 1 in each row of P. Thus, the gradient with respect to Φl (I) consists of three terms, 3.3. Model objective and learning 3.3.1 Learning (7) (8) where D(·) denotes the discriminator to predict the probability that an image is from the distribution pdata (I gt ). 5 The batch size is 1 and the training is stopped after 20 epochs. Data augmentation such as flipping is also adopted during training. The tradeoff parameters are set as λg = 0.1 and λadv = 0.01. Places dataset. Please see Fig. 6 for the results. Again our Shift-Net performs favorably in generating fine-detailed, semantically plausible, and realistic images. Quantitative evaluation We also compare our model quantitatively with the competing methods on the Paris StreetView dataset. Table 1 lists the PSNR, SSIM and mean `2 loss of different methods. Our Shift-Net gets better or comparable SSIM with the competing methods. In terms of SSIM and mean `2 loss, our Shift-Net is a little inferior to MNPS [47] but are better than the others. Actually, both PSNR and SSIM are correlated poorly with human assessment of visual quality [12, 14, 24, 36, 42]. Moreover, inpainting aims at generating visual-pleasing results, rather than faithfully recovering the same content of missing parts. 4. Experiments We evaluate our method on two datasets: Paris StreetView [6] and six scenes from Places365-Standard dataset [49]. The Paris StreetView contains 14,900 training images and 100 test images. There are 1.6 million training images from 365 scene categories in the Places365Standard. The scene categories selected from Places365Standard are butte, canyon, field, synagogue, tundra and valley. Each category has 5,000 training images, 900 test images and 100 validation images. Our model is learned using the training set and tested on the validation set. For both Paris StreetView and Places, we resize each training image to let its minimal length/width be 350, and randomly crop a subimage of size 256 × 256 as input to our model. Moreover, our method is also tested on real images for removing objects and distractors. It takes about one day to train our Shift-Net on an Nvidia Titan X Pascal GPU. All the source codes will be released after the publication of this work. Table 1: Comparison of PSNR, SSIM and mean `2 loss on Paris StreetView dataset. Method Content-Aware Fill [1] Context Encoder [31] (`2 + adversarial loss) MNPS [47] Ours PSNR 24.48 26.06 27.32 27.17 SSIM 0.88 0.88 0.91 0.91 Mean `2 Loss 0.0500 0.0350 0.0261 0.0283 Random mask completion Our model can also be trained for arbitrary region completion. Fig. 7 shows the results by Content-Aware Fill [1] and our Shift-Net. For texture and smooth regions, both Content-Aware Fill [1] and our Shift-Net perform favorably. While for structural region, our Shift-Net is more effective in filling the cropped regions with context coherent with global content and structures. 4.1. Comparisons with other algorithms We compare our results with Photoshop Content-Aware Fill [1] based on [2], Context-Encoders [31], and Multiscale Neural Patch Synthesis (MNPS) [47]. As Context Encoder only accepts 128 × 128 images, we upsample the results to 256×256. For MNPS [47], we set the pyramid level be 2 to get the resolution of 256 × 256. Evaluation on Paris StreetView and Places Fig. 5 shows the comparisons of our method with other state-of-the-art approaches on Paris StreetView. Content-Aware Fill [1] is effective in recovering low level textures, but performs slightly worse in handling occlusions with complex structures. Context-Encoders [31] is effective in semantic inpainting, but the results seem blurry and detail-missing due to the effect of bottleneck. MNPS [47] adopts a multistage scheme to combine CNN and examplar-based inpainting, and generally works better than Content-Aware Fill [1] and Context-Encoders [31]. However, the multi-scales in MNPS [47] are not jointly trained, where some adverse effects produced in the first stage may not be eliminated by the subsequent stages. In comparison to the competing methods, our Shift-Net combines CNN and examplar-based inpainting in an end-to-end manner, and generally is able to generate visual-pleasing results. Moreover, we also note that our Shift-Net is much more efficient than MNPS [47]. Our method consumes only about 80 ms for a 256×256 image, which is about 500× faster than MNPS [47] (about 40 seconds). In addition, we also evaluate our method on the Figure 7: Random region completion. From top to bottom are: Input, Content-Aware Fill [1], and Ours. 4.2. Image inpainting in real world We also evaluate our Shift-Net trained on Paris StreetView for the inpainting of real images by consider6 Input Content-Aware Fill [1] Context Encoder [31] MNPS [47] Ours Figure 5: Qualitative comparisons on the Paris StreetView dataset. All images are scaled to 256 × 256. ing two types of missing regions: (i) central region, (ii) object removal. From the first row of Fig. 8, one can see that our Shift-Net trained with central mask can be generalized to handle real images. From the second row of Fig. 8, we show the feasibility of using our Shift-Net trained with random mask to remove unwanted objects from the images. the benefit of shift-connection does not owe to the increase of feature map size or the addition of extra skip connection. To illustrate this, we also compare Shift-Net with a baseline model by substituting the nearest neighbor searching with random shift-connection. 5.1. Effect of guidance loss 5. Internal Analysis of Shift-Net Two groups of experiments are conducted to evaluate the effect of guidance loss. In the first group of experiments, we add and remove the guidance loss Lg for U-Net and our Shift-Net to train the inpainting models. Fig. 10 shows the inpainting results by these four methods. It can be observed that, for both U-Net and Shift-Net the guidance loss is helpful in suppressing artifacts and preserving salient structure. In the second group of experiments, we evaluate the ef- The main differences between our Shift-Net and the other methods are the introduction of guidance loss and shift-connection layer. Thus, experiments are first conducted to analyze the effect of guidance loss and shift operation. As explained in Sec. 3.4, the missing region Ωl is determined by the threshold T . So we also evaluate the sensitiveness of our Shift-Net to the threshold. Moreover, 7 Input Content-Aware Fill [1] Context Encoder [31] MNPS [47] Ours Figure 6: Qualitative comparisons on the Places. All images are scaled to 256 × 256. (a) λg = 1 (b) λg = 0.1 (c) λg = 0.01 (d) λg = 0.001 Figure 9: The effect of the tradeoff parameter λg of guidance loss. ing the semantic structure of the missing region and guiding the shift of the encoder feature. To this end, proper tradeoff parameter λg should be chosen, where too large or too small λg values may be harmful to the inpainting results. Fig. 9 shows the results by setting different λg values. When λg is small (e.g., ≤ 0.01), the decoder feature may not serve as Figure 8: Results on real images. From the top to bottom are: central region inpainting, and object removal. fect of the tradeoff parameter λg for guidance loss. For our Shift-Net, the guidance loss is introduced for both recover8 a suitable guidance to guarantee the correct shift of the encoder feature. From Fig. 9(c)(d), some artifacts and confusing structures can still be observed. When λg becomes too large (e.g., = 1), the constraint will be too excessive, and artifacts may also be introduced in the result (see Fig. 9(a)). Thus, we empirically set λg = 0.1 in all our experiments. (a) U-Net (w/o Lg ) (b) U-Net (w/ Lg ) (c) Ours (w/o Lg ) (a) ground truth (b) L − 4 (c) L − 3 (d) L − 2 Figure 11: The effect of performing shift operation on different layers L − l. T = 4/16, 5/16, 6/16, respectively. It can be seen that Shift-Net is robust to T , which may be attributed to that we take the shift and encoder, decoder features as the inputs to the L − l + 1 layer. Generally it is more safe to use slightly higher T values (e.g., 5/16, 6/16) in the experiments. (d) Ours (w/ Lg ) Figure 10: The effect of guidance loss Lg in U-Net and our Shift-Net. 5.2. Effect of shift operation at different layers (a) ground truth (b) T = 4/16 The superiority of Shift-Net against ContextEncoder [31] has demonstrated the effectiveness of shift operation. By comparing the results by U-Net (w/Lg ) and Shift-Net (w/Lg ) in Fig. 10(b)(d), one can see that shift operation does benefit the preserving of semantics and the recovery of detailed textures. Note that the shift operation can be deployed to different layer, e.g., L − l, of the decoder. When l is smaller, the feature map size goes larger, and more computation time is required to perform the shift operation. When l is larger, the feature map size becomes smaller, but more more detailed information may lost in the corresponding encoder layer, which may be harmful to recover image details and semantics. Thus, proper l should be chosen for better tradeoff between computation time and inpainting performance. Fig. 11 shows the results of Shift-Net by adding the shift-connection layer to each of the L − 4, L − 3, and L − 2 layers, respectively. When the shift-connection layer is added to the L − 2 layer, Shift-Net generally works well in producing visually pleasing results, but it takes more time (i.e., ∼ 400 ms per image) to process an image (See Fig. 11(d)). When the shift-connection layer is added to the L − 4 layer, Shift-Net becomes very efficient (i.e., ∼ 40 ms per image) but tends to generate the result with less textures and coarse details (See Fig. 11(b)). By performing the shift operation in L − 3 layer, better tradeoff between efficiency (i.e., ∼ 80 ms per image) and performance can be obtained by Shift-Net (See Fig. 11(c)). (c) T = 5/16 (d) T = 6/16 Figure 12: The effect of different thresholds in shiftconnection. Figure 13: From top to bottom are: Shift-Net with random shift-connection and nearest neighbor searching. 5.4. Comparison with random shift-connection Finally, we implement a baseline Shift-Net model by substituting the nearest neighbor searching with random shift-connection. Fig. 13 shows four examples of inpainting results by Shift-Net and baseline model. Compared to the nearest neighbor searching, the results by random shiftconnection exhibit more artifacts, distortions, and structure disconnections. Thus, the favorable performance of ShiftNet should owe to the correct shift-operation. 5.3. Effect of threshold T Along with the convolution and pooling operations, the mask M introduced in Sec. 3.4 will not be binary. Thus we introduce a threshold T (0 ≤ T ≤ 1) to define the missing region Ωl . Fig. 12 shows the results of Shift-Net by setting 6. Conclusion This paper has proposed a novel architecture, i.e., ShiftNet, for image completion that exhibits fast speed with 9 promising fine details via deep feature rearrangement. The guidance loss is introduced to enhance the explicit relation between the encoded feature in known region and decoded feature in missing region. By exploiting such relation, the shift operation can be efficiently performed and is effective in improving inpainting performance. Experiments show that our Shift-Net performs favorably in comparison to the state-of-the-art methods, and is effective in generating sharp, fine-detailed and realistic images. In future, more studies will be given to improve the speed of nearest search in the shift operation, introduce multiple shift-connection layers, and investigate other effective solutions to combine CNN and examplar-based inpainting. [15] [16] [17] [18] References [19] [1] Content-aware fill. https://research.adobe.com/ project/content-aware-fill. [2] C. Barnes, E. Shechtman, A. Finkelstein, and D. B. Goldman. Patchmatch: a randomized correspondence algorithm for structural image editing. In ACM Transactions on Graphics (TOG), volume 28, page 24. ACM, 2009. [3] C. Barnes, E. Shechtman, D. B. Goldman, and A. Finkelstein. The generalized patchmatch correspondence algorithm. In European Conference on Computer Vision, pages 29–43. Springer, 2010. [4] T. Q. Chen and M. Schmidt. Fast patch-based style transfer of arbitrary style. arXiv preprint arXiv:1612.04337, 2016. [5] A. Criminisi, P. Perez, and K. Toyama. Object removal by exemplar-based inpainting. In Computer Vision and Pattern Recognition, 2003. Proceedings. 2003 IEEE Computer Society Conference on, volume 2, pages II–II. IEEE, 2003. [6] C. Doersch, S. Singh, A. Gupta, J. Sivic, and A. Efros. What makes paris look like paris? ACM Transactions on Graphics, 31(4), 2012. [7] I. Drori, D. Cohen-Or, and H. Yeshurun. Fragment-based image completion. In ACM Transactions on graphics (TOG), volume 22, pages 303–312. ACM, 2003. [8] V. Dumoulin, J. Shlens, and M. Kudlur. A learned representation for artistic style. arXiv preprint arXiv:1610.07629, 2016. [9] A. A. Efros and T. K. Leung. Texture synthesis by nonparametric sampling. In Computer Vision, 1999. The Proceedings of the Seventh IEEE International Conference on, volume 2, pages 1033–1038. IEEE, 1999. [10] L. A. Gatys, A. S. Ecker, and M. Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [11] L. A. Gatys, A. S. Ecker, M. Bethge, A. Hertzmann, and E. Shechtman. Controlling perceptual factors in neural style transfer. arXiv preprint arXiv:1611.07865, 2016. [12] P. Hanhart, P. Korshunov, and T. Ebrahimi. Benchmarking of quality metrics on ultra-high definition video sequences. In Digital Signal Processing (DSP), 2013 18th International Conference on, pages 1–8. IEEE, 2013. [13] X. Huang and S. Belongie. Arbitrary style transfer in realtime with adaptive instance normalization. arXiv preprint arXiv:1703.06868, 2017. [14] Q. Huynh-Thu and M. Ghanbari. Scope of validity of [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] 10 psnr in image/video quality assessment. Electronics letters, 44(13):800–801, 2008. S. Iizuka, E. Simo-Serra, and H. Ishikawa. Globally and Locally Consistent Image Completion. ACM Transactions on Graphics (Proc. of SIGGRAPH 2017), 36(4):107:1–107:14, 2017. P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Imageto-image translation with conditional adversarial networks. arXiv preprint arXiv:1611.07004, 2016. J. Jia and C.-K. Tang. Image repairing: Robust image synthesis by adaptive nd tensor voting. In Computer Vision and Pattern Recognition, 2003. Proceedings. 2003 IEEE Computer Society Conference on, volume 1, pages I–I. IEEE, 2003. J. Jia and C.-K. Tang. Inference of segmented color and texture description by tensor voting. IEEE Transactions on Pattern Analysis and Machine Intelligence, 26(6):771–786, 2004. J. Johnson, A. Alahi, and L. Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European Conference on Computer Vision, pages 694–711. Springer, 2016. D. P. Kingma and J. L. Ba. Adam: A method for stochastic optimization. international conference on learning representations, 2015. R. Köhler, C. Schuler, B. Schölkopf, and S. Harmeling. Mask-specific inpainting with deep neural networks. In German Conference on Pattern Recognition, pages 523–534. Springer, 2014. N. Komodakis. Image completion using global optimization. In Computer Vision and Pattern Recognition, 2006 IEEE Computer Society Conference on, volume 1, pages 442–452. IEEE, 2006. N. Komodakis and G. Tziritas. Image completion using efficient belief propagation via priority scheduling and dynamic pruning. IEEE Transactions on Image Processing, 16(11):2649–2661, 2007. D. Kundu and B. L. Evans. Full-reference visual quality assessment for synthetic images: A subjective study. In Image Processing (ICIP), 2015 IEEE International Conference on, pages 2374–2378. IEEE, 2015. O. Le Meur, J. Gautier, and C. Guillemot. Examplar-based inpainting based on local geometry. In Image Processing (ICIP), 2011 18th IEEE International Conference on, pages 3401–3404. IEEE, 2011. C. Ledig, L. Theis, F. Huszár, J. Caballero, A. Cunningham, A. Acosta, A. Aitken, A. Tejani, J. Totz, Z. Wang, et al. Photo-realistic single image super-resolution using a generative adversarial network. arXiv preprint arXiv:1609.04802, 2016. C. Li and M. Wand. Combining markov random fields and convolutional neural networks for image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2479–2486, 2016. Y. Li, S. Liu, J. Yang, and M.-H. Yang. Generative face completion. arXiv preprint arXiv:1704.05838, 2017. F. Luan, S. Paris, E. Shechtman, and K. Bala. Deep photo style transfer. arXiv preprint arXiv:1703.07511, 2017. A. Mahendran and A. Vedaldi. Understanding deep image representations by inverting them. In Proceedings of the [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] Johnson, and M. N. Do. Semantic image inpainting with deep generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5485–5493, 2017. [49] B. Zhou, A. Lapedriza, A. Khosla, A. Oliva, and A. Torralba. Places: A 10 million image database for scene recognition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. [50] J.-Y. Zhu, T. Park, P. Isola, and A. A. Efros. Unpaired imageto-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017. IEEE conference on computer vision and pattern recognition, pages 5188–5196, 2015. D. Pathak, P. Krahenbuhl, J. Donahue, T. Darrell, and A. A. Efros. Context encoders: Feature learning by inpainting. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2536–2544, 2016. Y. Pritch, E. Kav-Venaki, and S. Peleg. Shift-map image editing. In Computer Vision, 2009 IEEE 12th International Conference on, pages 151–158. IEEE, 2009. A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. J. S. Ren, L. Xu, Q. Yan, and W. Sun. Shepard convolutional neural networks. In Advances in Neural Information Processing Systems, pages 901–909, 2015. O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), 2015. H. R. Sheikh, M. F. Sabir, and A. C. Bovik. A statistical evaluation of recent full reference image quality assessment algorithms. IEEE Transactions on image processing, 15(11):3440–3451, 2006. D. Simakov, Y. Caspi, E. Shechtman, and M. Irani. Summarizing visual data using bidirectional similarity. In Computer Vision and Pattern Recognition, 2008. CVPR 2008. IEEE Conference on, pages 1–8. IEEE, 2008. K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. J. Sun, L. Yuan, J. Jia, and H.-Y. Shum. Image completion with structure propagation. ACM Transactions on Graphics (ToG), 24(3):861–868, 2005. D. Ulyanov, V. Lebedev, A. Vedaldi, and V. S. Lempitsky. Texture networks: Feed-forward synthesis of textures and stylized images. In ICML, pages 1349–1357, 2016. D. Ulyanov, A. Vedaldi, and V. Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016. Z. Wang and A. C. Bovik. Mean squared error: Love it or leave it? a new look at signal fidelity measures. IEEE signal processing magazine, 26(1):98–117, 2009. Y. Wexler, E. Shechtman, and M. Irani. Space-time video completion. In Computer Vision and Pattern Recognition, 2004. CVPR 2004. Proceedings of the 2004 IEEE Computer Society Conference on, volume 1, pages I–I. IEEE, 2004. Y. Wexler, E. Shechtman, and M. Irani. Space-time completion of video. IEEE Transactions on pattern analysis and machine intelligence, 29(3), 2007. J. Xie, L. Xu, and E. Chen. Image denoising and inpainting with deep neural networks. In Advances in Neural Information Processing Systems, pages 341–349, 2012. Z. Xu and J. Sun. Image inpainting by patch propagation using patch sparsity. IEEE transactions on image processing, 19(5):1153–1165, 2010. C. Yang, X. Lu, Z. Lin, E. Shechtman, O. Wang, and H. Li. High-resolution image inpainting using multi-scale neural patch synthesis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. R. A. Yeh, C. Chen, T. Y. Lim, A. G. Schwing, M. Hasegawa- 11 Table 2: The architecture of the G network. “IN” represents InstanceNorm and “LReLU” donates leaky ReLU with the slope of 0.2. Guidance loss and shift-connection layer are added in the layer of L − 3. A. Details on Shift-Net Architecture of generative model G For the generative model of our Shift-Net, we adopt the architecture of UNet proposed in [16, 33]. Each convolution/deconvolution layer is followed by instance normalization [41]. The encoder part of G is a stack of Convolution-InstanceNormLeakyReLU layers, while the decoder part consists of a series of Deconvolution-InstanceNorm-ReLU layers. In training, we zero out the biases of all convolution and deconvolution layers in the generative model. L denotes the total number of convolution/deconvolution layers in our model. We add guidance loss constraint and shift operation in the layer L − 3, which results in the concatenated features of t ΦL−3 (I), Φ3 (I) and Φshif L−3 (I) as inputs of the adjacent deconvolution. Details about the architecture of our generative model G is shown in Table 2. It is remarkable that we do not apply InstanceNorm on the bottleneck layer. The activation map of the bottleneck layer is 1 × 1, which means we only get one activation per convolutional filter. As we train our network with batchsize 1, activations will be zeroed out once InstanceNorm is applied on the bottleneck layer. You may refer to pix2pix1 for more explanation. The architecture of generative model G Input: Image (256 × 256 × 3) [Layer 1] Conv. (4, 4, 64), stride=2; [Layer 2] LReLU; Conv. (4, 4, 128), stride=2; IN; [Layer 3] LReLU; Conv. (4, 4, 256), stride=2; IN; [Layer 4] LReLU; Conv. (4, 4, 512), stride=2; IN; [Layer 5] LReLU; Conv. (4, 4, 512), stride=2; IN; [Layer 6] LReLU; Conv. (4, 4, 512), stride=2; IN; [Layer 7] LReLU; Conv. (4, 4, 512), stride=2; IN; [Layer 8] LReLU; Conv. (4, 4, 512), stride=2; [Layer 9] ReLU; DeConv. (4, 4, 512), stride=2; IN; Concatenate(Layer 9, Layer 7); [Layer 10] DeConv. (4, 4, 512), stride=2; IN; Concatenate(Layer 10, Layer 6); ReLU; [Layer 11] DeConv. (4, 4, 512), stride=2; IN; Concatenate(Layer 11, Layer 5); ReLU; [Layer 12] DeConv. (4, 4, 512), stride=2; IN; Concatenate(Layer 12, Layer 4); ReLU; [Layer 13] DeConv. (4, 4, 256), stride=2; IN; Concatenate(Layer 13, Layer 3); ReLU; [Layer 14] Guidance loss layer; [Layer 15] Shift-connection layer; [Layer 16] DeConv. (4, 4, 128), stride=2; IN; Concatenate(Layer 16, Layer 2); ReLU; [Layer 17] DeConv. (4, 4, 64), stride=2; IN; Concatenate(Layer 17, Layer 1); ReLU; [Layer 18] ReLU; DeConv. (4, 4, 3), stride=2; Tanh; Output: Final result (256 × 256 × 3) Architecture of discriminative network D D shares the similar design pattern with the encoder part of G, however, is only 5-convolutional-layer network. We exclusively use convolutional layers with filters of size 4 × 4 pixels with varying stride lengths to reduce the spatial dimension of the input down to a size of 30 × 30 where we append sigmoid activation at the final output. InstanceNorm is not applied to the first convolutional layer, and we use leaky ReLU with slope of 0.2 for activations except for the sigmoid in the last layer. See Table 3 for more details. B. More comparisons and object removals B.1. Comparisons on Paris StreetView dataset Table 3: The architecture of the discriminative network. “IN” represents InstanceNorm and “LReLU” donates leaky ReLU with the slope of 0.2. More comparisons with Context-Encoders [31], Content-Aware-Fill [1] and MNPS [47] on Paris StreetView dataset [6] are also conducted. Please refer to Fig. 14, Fig. 15 and Fig. 16 for more results. Our Shift-Net outperforms other state-of-the-art approaches in both structural consistency and image clarity. Both global structure and fine details can be preserved in our model, however, other methods either do badly in generating clear, realistic details or lack global structure consistency. The architecture of discriminative model D Input: Image (256 × 256 × 3) 1 https://github.com/phillipi/pix2pix/commit/b50f5dc [layer 1] Conv. (4, 4, 64), stride=2; LReLU; [layer 2] Conv. (4, 4, 128), stride=2; IN; LReLU; [layer 3] Conv. (4, 4, 256), stride=2; IN; LReLU; [layer 4] Conv. (4, 4, 512), stride=1; IN; LReLU; [layer 5] Conv. (4, 4, 1), stride=1; Sigmoid; Output: Real or Fake (30 × 30 × 1) 12 B.2. More object removal on real images by our Shift-Net We apply our model trained on Paris StreetView [6] or Places [49] to process object removal on real images. Please refer to Fig. 17 for results. These real world images are complex for large area of distractors and complicated background. However, our model can handle them well, which indicates the effectiveness, applicability and generality of our model. Figure 17: Object removal on real images. 13 Input Content-Aware Fill [1] Context Encoder [31] MNPS [47] Figure 14: More comparisons on the Paris StreetView dataset. All images are scaled to 256 × 256. 14 Ours Input Content-Aware Fill [1] Context Encoder [31] MNPS [47] Figure 15: Comparisons on the Paris StreetView dataset. All images are scaled to 256 × 256. 15 Ours Input Content-Aware Fill [1] Context Encoder [31] MNPS [47] Figure 16: Comparisons on the Paris StreetView dataset. All images are scaled to 256 × 256. 16 Ours
1cs.CV
1 More results on the number of zeros of multiplicity at least r Olav Geil and Casper Thomsen Department of Mathematical Sciences Aalborg University Fr. Bajersvej 7G 9220 Aalborg Ø Denmark arXiv:1410.7084v2 [math.AC] 22 Dec 2015 Email: [email protected] and [email protected] Abstract: We consider multivariate polynomials and investigate how many zeros of multiplicity at least r they can have over a Cartesian product of finite subsets of a field. Here r is any prescribed positive integer and the definition of multiplicity that we use is the one related to Hasse derivatives. As a generalization of material in [2, 5] a general version of the Schwartz-Zippel was presented in [8] which from the leading monomial – with respect to a lexicographic ordering – estimates the sum of zeros when counted with multiplicity. The corresponding corollary on the number of zeros of multiplicity at least r is in general not sharp and therefore in [8] a recursively defined function D was introduced using which one can derive improved information. The recursive function being rather complicated, the only known closed formula consequences of it are for the case of two variables [8]. In the present paper we derive closed formula consequences for arbitrary many variables, but for the powers in the leading monomial being not too large. Our bound can be viewed as a generalization of the footprint bound [10, 6] – the classical footprint bound taking not multiplicity into account. Keywords: Footprint bound, multiplicity, multivariate polynomial, Schwartz-Zippel bound, zeros of polynomial MSC classifications: Primary: 12Y05. Secondary: 11T06, 12E05, 13P05, 26C99 1 Introduction Given a univariate polynomial over an arbitrary field it is an easy task to estimate the number of zeros of multiplicity at least r, for any fixed positive integer r. As is well-known the number of such zeros is less than or equal to the degree of the polynomial divided by r. For multivariate polynomials the situation is much more complicated as these polynomials on the one hand typically have an infinite number of zeros when the field is infinite and on the other hand have only a finite number of zeros when not. A meaningful reformulation of the problem which works independently of the field – and which will be taken in the present paper – is to restrict to point sets that are Cartesian products of finite sets. This of course includes the important case where the point set is Fq × · · · × Fq , Fq being the finite field with q elements. Another concern is which definition of multiplicity to use as for multivariate polynomials there are more competing definitions. In the present paper we use the one related to Hasse derivatives (see Definition 2 below). The interest in studying the outlined problem originally came from applications to Guruswami-Sudan style [9] list decoding algorithms for q-ary Reed-Muller codes, weighted Reed-Muller codes and their likes [11, 12, 1, 2, 8]. The first bound on the number of zeros of prescribed multiplicity was developed by Pellikaan and Wu in [11, 2 12]. Later Augot and Stepanov improved upon Pellikaan and Wu’s bound (see [8, Prop. 13]) by generalizing the Schwartz-Zippel bound to also deal with multiplicity [2]. The proof of this bound was later given by Dvir et al. in [5] where it was used to estimate the size of Kakeya sets over finite fields. The mentioned Schwartz-Zippel bound estimates the sum of zeros when counted with multiplicity. From this, one obtains an easy corollary on the number of zeros of multiplicity r or more. All of the above mentioned bounds are stated in terms of the total degree of the involved polynomials and the point set under consideration is always Fq × · · · × Fq . In [8, Th. 5] the generalization of the Schwartz-Zippel bound was taken a step further to now work for arbitrary finite point sets S1 × · · · × Sm , Si ⊆ F, i = 1, . . . , m (where F is any field) and to take into account the leading monomial with respect to a lexicographic ordering. Again one obtains an easy corollary on the number of zeros of multiplicity at least r [8, Cor. 3]. Whereas the generalized Schwartz-Zippel bound [8, Th. 5] is tight in the sense that we can always find polynomials attaining it (see Proposition 7 below) a similar result does not hold for its corollary [8, Cor. 3]. To address this problem we introduced in [8] a recursively defined function D to estimate the number of zeros of multiplicity at least r. Unfortunately, the function D is quite complicated and only for the case of two variables some simple closed formula upper bounds were derived [8, Prop. 16]. The purpose of the present paper is to establish for the general case of arbitrarily many variables a class of cases in which from D we can derive a simple closed formula expression which is still an improvement to the Schwartz-Zippel bound for zeros of multiplicity at least r ([8, Cor. 3]). The bound that we derive turns out to be a natural generalization of the footprint bound [10, 6] which estimates the number of zeros without taking multiplicity into consideration. The paper is organized as follows. In Section 2 we start by defining multiplicity and by recalling the general Schwartz-Zippel bound and as a corollary the SchwartzZippel bound for zeros of multiplicity at least r. The rest of Section 2 is devoted to a discussion of the method from [8]. In Section 3 we give the new results regarding a simple closed formula upper bound for the case of the coefficients in the leading monomial being small. The concept of being small in general is rather involved and we therefore establish simple sufficient conditions for this to happen. 2 Background We first recall the concept of Hasse derivatives. Definition 1 Given F (X1 , . . . Xm ) ∈ F[X1 , . . . , Xm ] and k = (k1 , . . . , km ) ∈ Nm 0 the k’th Hasse derivative of F , denoted by F (k) (X1 , . . . , Xm ) is the coefficient of km Z1k1 · · · Zm in F (X1 + Z1 , . . . , Xm + Zm ) ∈ F(X1 , . . . , Xm )[Z1 , . . . , Zm ]. In other words X km F (X1 + Z1 , . . . , Xm + Zm ) = F (k) (X1 , . . . , Xm )Z1k1 · · · Zm . k Observe that the next definition includes the usual concept of multiplicity for univariate polynomials as a special case. Definition 2 For F (X1 , . . . , Xm ) ∈ F[X1 , . . . , Xm ]\{0} and a = (a1 , . . . , am ) ∈ Fm we define the multiplicity of F at a denoted by mult(F, a) as follows. Let r be an integer such that for every k = (k1 , . . . , km ) ∈ Nm 0 with k1 + · · · + km < r, F (k) (a1 , . . . , am ) = 0 holds, but for some k = (k1 , . . . , km ) ∈ Nm 0 with k1 + · · · + km = r, F (k) (a1 , . . . , am ) 6= 0 holds, then mult(F, a) = r. If F = 0 then we define mult(F, a) = ∞. 3 The above definition is the one that is usually given in the literature. For our purpose the below equivalent description shall also prove useful. Definition 3 Let F (X1 , . . . , Xm ) ∈ F[X1 , . . . , Xm ]\{0} and a = (a1 , . . . , am ) ∈ Fm . Consider the ideal Jt = h(X1 − a1 )p1 · · · (Xm − am )pm | p1 + · · · + pm = ti ⊆ F[X1 , . . . , Xm ]. We have mult(F, a) = r if F ∈ Jr \Jr+1 . If F = 0 we have mult(F, a) = ∞. We next state the most general form of the Schwartz-Zippel bound for fields [8, Th. 5]. Here, and in the rest of the paper S1 , . . . , Sm ⊂ F are finite subsets of the field F and we write s1 = |S1 |, . . . , sm = |Sm |. We note that the below theorem was generalized to arbitrary commutative rings in [3, Th. 7.10] where it was called the generalized Schwartz Theorem. Theorem 4 Let F (X1 , . . . , Xm ) ∈ F[X1 , . . . , Xm ] be a non-zero polynomial and let im X1i1 · · · Xm be its leading monomial with respect to a lexicographic ordering ≺lex . Then for any finite sets S1 , . . . , Sm ⊆ F X mult(F, a) ≤ i1 s2 · · · sm + s1 i2 s3 · · · sm + · · · + s1 · · · sm−1 im . a∈S1 ×···×Sm Turning to the problem of estimating the number of zeros of multiplicity at least r – which is the topic of the present paper – we have the following corollary corresponding to [8, Cor. 3]. We may think of it as the Schwartz-Zippel bound for zeros of multiplicity at least r. Corollary 5 Let F (X1 , . . . , Xm ) ∈ F[X1 , . . . , Xm ] be a non-zero polynomial and im let X1i1 · · · Xm be its leading monomial with respect to the lexicographic ordering. Assume S1 , . . . , Sm ⊆ F are finite sets. Then over S1 × · · · × Sm the number of zeros of multiplicity at least r is less than or equal to the minimum of  i1 s2 · · · sm + s1 i2 s3 · · · sm + · · · + s1 · · · sm−1 im /r and s1 · · · sm . As mentioned in the introduction one obtains better estimates than Corollary 5 by using the recursively defined function D. In particular Corollary 5 is not tight. Before giving the details we pause for a moment to show that on the other hand Theorem 4 is tight (a fact that has not been reported before). For this purpose we shall need the notation (j) } Sj = {α1 , . . . , αs(j) j for j = 1, . . . , m, and the below proposition: Proposition 6 Consider F (X1 , . . . , Xm ) = su m Y Y (u) (Xu − αv(u) )rv . (1) u=1 v=1 (1) (m) The multiplicity of (αj1 , . . . , αjm ) in F (X1 , . . . , Xm ) equals (1) (m) rj1 + · · · + rjm . (2) 4 (1) (m) Proof: Clearly, the multiplicity is greater than or equal to r = rj1 +· · ·+rjm . Using (i) Gröbner basis theory we now show that it is not larger. We substitute Xi = Xi −αji for i = 1, . . . , m and observe that by Buchberger’s S-pair criteria rm B = {X1r1 · · · Xm | r1 + · · · + rm = r + 1} is a Gröbner basis (with respect to any fixed monomial ordering). The support of im with i1 + · · · + im = r. F (X1 , . . . , Xm ) contains a monomial of the form X1i1 · · · Xm Therefore the remainder of F (X1 , . . . , Xm ) modulo B is non-zero. It is well known that if a polynomial is reduced modulo a Gröbner basis then the remainder is zero if and only if it belongs to the ideal generated by the elements in the basis. t u We are now ready to show that Theorem 4 is tight. Proposition 7 Let S1 , . . . , Sm ⊆ F be finite sets. If F (X1 , . . . , Xm ) ∈ F[X1 , . . . , Xm ] is a product of univariate linear factors – meaning that it is of the form (1) – then the number of zeros of F counted with multiplicity reaches the generalized SchwartzZippel bound (Theorem 4). Proof: Consider the polynomial F (X1 , . . . , Xm ) = su m Y Y Xu − αv(u) rv(u) . u=1 v=1 Write iu = X (u) v=1 rv , Psu u = 1, . . . , m. Applying carefully Proposition 6 we obtain mult(F, a) = Ps1 t=1 (s2 (1) · · · sm )rt + ··· + Psm t=1 (s1 (m) · · · sm−1 )rt a∈S1 ×···×Sm = i1 s2 · · · sm + · · · + s1 · · · sm−1 im and we are through. t u We next return to the problem of improving Corollary 5 for which we introduced in [8, Def. 5] the function D. Definition 8 Let r ∈ N, i1 , . . . , im ∈ N0 . Define D(i1 , r, s1 ) = min  i1  , s1 r and for m ≥ 2 D(i1 , . . . , im , r, s1 , . . . , sm ) =  max (sm − u1 − · · · − ur )D(i1 , . . . , im−1 , r, s1 , . . . , sm−1 ) (u1 ,...,ur )∈A(im ,r,sm ) + u1 D(i1 , . . . , im−1 , r − 1, s1 , . . . , sm−1 ) + · · ·  + ur−1 D(i1 , . . . , im−1 , 1, s1 , . . . , sm−1 ) + ur s1 · · · sm−1 where A(im , r, sm ) = {(u1 , . . . , ur ) ∈ Nr0 | u1 + · · · + ur ≤ sm and u1 + 2u2 + · · · + rur ≤ im }. (3) Throughout the rest of the paper we shall always assume that r ∈ N and that i1 , . . . , im ∈ N0 . The improvement of Corollary 5 was given in [8, Th. 6] as follows: 5 Table 1 D(i1 , i2 , 3, 5, 5) i2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6 i1 7 8 9 10 11 12 13 14 0 0 0 5 5 5 10 10 10 15 15 15 20 20 20 0 0 1 5 5 6 10 10 11 15 15 16 20 20 21 0 1 2 5 6 7 10 11 12 15 16 17 20 21 22 5 5 7 9 9 11 13 13 15 17 17 19 21 21 23 5 6 8 9 11 12 14 15 17 18 20 21 22 23 24 5 6 9 10 13 14 17 18 21 22 10 11 13 14 16 17 19 20 22 23 10 11 13 14 16 17 19 20 22 23 10 12 14 16 18 20 21 22 23 24 15 16 17 18 19 20 21 22 23 24 15 17 19 21 23 15 17 19 21 23 20 21 22 23 24 20 21 22 23 24 20 21 22 23 24 Table 2 The Schwartz-Zippel bound (sz) for zeros of multiplicity at least 3 i1 + i 2 sz 0 0 1 1 2 3 3 5 4 6 5 8 6 10 i1 + i 2 sz 12 20 13 21 14 23 15 25 16 25 17 25 18 25 7 11 8 13 9 15 10 16 11 18 im Theorem 9 For a polynomial F (X1 , . . . , Xm ) ∈ F[X1 , . . . , Xm ] let X1i1 · · · Xm be its leading monomial with respect to the lexicographic ordering ≺lex with Xm ≺lex · · · ≺lex X1 . Then F has at most D(i1 , . . . , im , r, s1 , . . . , sm ) zeros of multiplicity at least r in S1 × · · · × Sm . The corresponding recursive algorithm produces a number that is at most equal to the number found in Corollary 5 and is at most equal to s1 · · · sm . When bi1 /s1 c + · · · + bim /sm c ≥ r Proposition 6 guarantees the existence of im having all elements polynomials F (X1 , . . . , Xm ) with leading monomial X1i1 · · · Xm of S1 × · · · × Sm as zeros of multiplicity at least r. Hence, we only need to apply Theorem 9 to the case bi1 /s1 c + · · · + bim /sm c < r, and in particular we can assume it < rst . Example 10 In this example we estimate the number of zeros of multiplicity 3 or more for polynomials in two variables. Both S1 and S2 are assumed to be of size 5. From the above discussion, for (i1 , i2 ) ∈ {(α, β) | α ≥ 15} ∪ {(α, β) | α ≥ 10 and β ≥ 5} ∪{(α, β) | α ≥ 5 and β ≥ 10} ∪ {(α, β) | β ≥ 15} we have D(i1 , i2 , 3, 5, 5) = 25. Table 1 shows information obtained from our algorithm for the remaining possible choices of exponents (i1 , i2 ). Observe, that the table is not symmetric meaning that D(i1 , i2 , 3, 5, 5) does not always equal D(i2 , i1 , 3, 5, 5). The corresponding values of the Schwartz-Zippel bound (Corollary 5) is displayed in Table 2, from which it is clear that indeed the function D can sometimes give a dramatic improvement. For instance D(3, 11, 3, 5, 5) equals 19, but the Schwartz-Zippel bound only gives the estimate 23. Similarly, D(2, 12) equals 20 and the SchwartzZippel bound gives 23. It is easy to establish a lower bound on the maximal number of possible zeros of multiplicity at least r = 3 for polynomials with any leading monomial X1i1 X2i2 . Q4 This is done by inspecting polynomials of the form (1). As an example u=1 (X1 − 6 Table 3 Difference between upper and lower bound in Example 10 i2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6 i1 7 8 9 10 11 12 13 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 2 0 0 2 0 0 1 0 0 0 0 1 2 0 2 2 1 2 1 1 0 0 0 0 0 0 0 2 1 3 3 2 3 1 2 0 1 3 1 3 2 3 3 2 2 0 1 2 1 3 2 2 3 1 1 0 1 2 3 2 0 1 1 2 1 0 1 2 1 2 0 0 0 0 0 0 2 3 4 3 0 1 2 3 2 0 1 2 2 2 0 1 1 2 1 0 0 0 0 0 Q5 (1) (2) αu )2 v=1 (X2 −αv ) has 20 zeros of multiplicity (at least) 3. But D(8, 5, 3, 5, 5) = 20 and therefore the true value of the maximal number of zeros of multiplicity at least 3 is 20 in this case. In Table 3 we list the difference between D(i1 , i2 , 3, 5, 5) and the lower bound found by using the above method. The large amount of zero’s in the table proves that D(i1 , i2 , 3, 5, 5) often equals the true maximal number of zeros of multiplicity at least 3. In [8, Pro. 16] we derived the following closed formula expression upper bounds for the case of two variables. Proposition 11 For k = 1, . . . , r − 1, D(i1 , i2 , r, s1 , s2 ) is upper bounded by i2 i1 i1 (C.1) s2 + r r r−k r if (r − k) r+1 s1 ≤ i1 < (r − k)s1 and 0 ≤ i2 < ks2 i1 i1 i1 i1 − ) + (i2 − ks2 )(s1 − ) (C.2) s2 + ((k + 1)s2 − i2 )( r r−k r r r if (r − k) r+1 s1 ≤ i1 < (r − k)s1 and ks2 ≤ i2 < (k + 1)s2 i2 i1 i1 (s1 − ) (C.3) s2 + r k+1 r r s1 and 0 ≤ i2 < (k + 1)s2 . if (r − k − 1)s1 ≤ i1 < (r − k) r+1 Finally, i1 i1 (C.4) D(i1 , i2 , r, s1 , s2 ) = s2 b c + i2 (s1 − b c) r r if s1 (r − 1) ≤ i1 < s1 r and 0 ≤ i2 < s2 . The above numbers are at most equal to min{(i1 s2 + s1 i2 )/r, s1 s2 }. If in (C.3) of the above proposition we substitute k = r − 1 then we derive D(i1 , i2 , r, s1 , s2 ) ≤ s1 s2 − (s1 − for 0 ≤ i1 < tion r r+1 s1 i1 i2 )(s2 − ) r r (4) and 0 ≤ i2 < rs2 . Actually, (4) holds under the weaker assump0 ≤ i1 ≤ r s1 , 0 ≤ i2 < rs2 r+1 (5) r which is seen by plugging in the values k = r −1 and i1 = r+1 s1 into the expressions in (C.1), (C.2) and (4). This is the result that we will generalize to more variables in the next section. 7 Table 4 b25 − (5 − i1 /3)(5 − i2 /3)c i2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6 i1 7 8 9 10 11 12 13 14 0 1 3 5 6 8 10 11 13 15 16 18 20 21 23 1 3 4 6 7 9 11 12 14 15 17 18 20 21 23 3 4 6 7 9 10 12 13 14 16 17 19 20 22 23 5 6 7 9 10 11 13 14 15 17 18 19 21 22 23 6 7 9 10 11 12 14 15 16 17 18 20 21 22 23 8 9 10 11 12 13 15 16 17 18 10 11 12 13 14 15 16 17 18 19 11 12 13 14 15 16 17 17 18 19 13 14 14 15 16 17 18 18 19 20 15 15 16 17 17 18 19 19 20 21 16 17 17 18 18 18 18 19 19 20 20 20 20 21 21 21 21 22 22 22 23 23 23 23 23 Example 12 This is a continuation of Example 10 where we investigated D(i1 , i2 , 3, 5, 5). Although condition (5) reads i1 ≤ 3 and i2 ≤ 14 we print in Table 4 the value of (4) for all possible (i1 , i2 ). The single, as well as double, underlined numbers correspond to entries where the number is strictly smaller than D(i1 , i2 , 3, 5, 5). For such entries (4) certainly doesn’t hold true. By inspection, condition (5) seems rather sharp. The double underlined numbers correspond to cases where even, the value is smaller than the lower bounds on the maximal number of zeros, that we established at the end of Example 10. Hence, not only cannot (4) serve as a general upper bound on D, but neither can it serve as a general upper bound on the maximal number of zeros of multiplicity at least r. 3 A closed formula expression when (i1 , . . . , im ) is small Having already four different cases of closed formula expressions when m = 2 (Proposition 11), the situation gets very complicated for more variables. Assuming, however, that the exponent (i1 , . . . , im ) in the leading monomial is “small” – a concept that will be formally defined in Definition 15 below – we can give a simple formula which is a generalization of (4) and which is also strongly related to the footprint bound from Gröbner basis theory. Given a zero dimensional ideal of a multivariate polynomial ring, and a fixed monomial ordering, the well-known footprint bound states that the size of the corresponding variety is at most equal to the number of monomials that can not be found as leading monomial of any polynomial in the ideal (if moreover the ideal is radical, then equality holds). More details on the footprint bound can be found in [4, 10, 6] – in particular see [4, Pro. 4, Sec. 5.3]. We have the following easy corollary. Corollary 13 Given a polynomial F (X1 , . . . , Xm ) ∈ F[X1 , . . . , Xm ], and a monoim mial ordering, let X1i1 · · · Xm be the leading monomial of F , and assume i1 < s1 , . . . , im < sm . The number of elements in S1 × · · · × Sm that are zeros of F is at most equal to s1 · · · sm − (s1 − i1 )(s2 − i2 ) · · · (sm − im ). (6) Proof: The set of zeros of F from S1 × · · · × Sm equals the variety of the ideal Qsi (i) hF, G1 , . . . , Gm i where Gi = u=1 (Xi −αu ). Here, we used the notation introduced 8 prior to Proposition 6. The above ideal clearly is zero-dimensional. In fact, the monomials that are not leading monomial of any polynomial in the ideal must belong to the set jm jm im {X1j1 · · · Xm | j1 < s1 , . . . , jm < sm , X1j1 · · · Xm is not divisible by X1i1 · · · Xm }, the size of which equals (6). The result now follows from the footprint bound. t u The above corollary and (4) are clearly related as (6) equals the right side of (4) for m = 2. Similarly, (5) equals the assumption in the corollary. Observe, however, that in (4), and in this paper in general, we always assume that the monomial ordering is the lexicographic ordering described in Theorem 9. The master theorem of the present paper is the following result where (7) is the generalization of (4) to more variables and where the mentioned Condition A is the generalization of (5). Recall that D(i1 , . . . , im , r, s1 , . . . , sm ) serves as an upper bound on the number of zeros of multiplicity at least r for polynomials with leading monomial being im X1i1 · · · Xm with respect to the lexicographic ordering. As a consequence the master theorem also can be viewed as a generalization of Corollary 13, when restricted to a lexicographic ordering. Theorem 14 Assume that (i1 , . . . , im , r, s1 , . . . , sm ) with m ≥ 2 satisfies Condition A in Definition 15 below. We have D(i1 , . . . , im , r, s1 , . . . , sm ) ≤ s1 · · · sm − (s1 − im i1 ) · · · (sm − ) r r (7) which is at most equal to min{(i1 s2 · · · sm + · · · + s1 · · · sm−1 im )/r, s1 · · · sm }. We postpone the proof of Theorem 14 till the end of the section. Definition 15 Let m ≥ 2. We say that (i1 , . . . , im , r, s1 , . . . , sm ) satisfies Condition A if the following hold (A.1) 0 ≤ i1 ≤ s1 , . . . , 0 ≤ im−1 ≤ sm−1 , 0 ≤ im < rsm im−2 i1 (A.2) s(s1 − i`1 ) · · · (sm−2 − im−2 ` ) ≤ `(s1 − s ) · · · (sm−2 − s ) for all ` = 2, . . . , r, s = 1, . . . ` − 1. im−1 i1 (A.3) s(s1 − ir1 ) · · · (sm−1 − im−1 r ) ≤ r(s1 − s ) · · · (sm−1 − s ) for all s = 1, . . . , r − 1. We note that one could actually replace ` = 2, . . . , r in (A.2) with the weaker ` = 2, . . . , r − 1 as the case ` = r follows from (A.3). Admittedly, the definition of the exponent being small (Condition A) is rather technical. However: – If (i1 , . . . , im ) is small then all (i01 , . . . , i0m ) with i01 ≤ i1 , . . . , i0m ≤ im are also small (Proposition 16). Hence, it is enough to check if (i1 , . . . , im ) satisfies Condition A. o n m−1√ √ m−2 r−1 √ 2−1 – Condition A is satisfied when it ≤ st min m−1√r− , t = 1, . . . , m−1, 1 , m−2 1 2− r 2 im < rsm (Theorem 17). – As already mentioned, Condition A and the master theorem reduces to wellknown results when r = 1 or when m = 2 (see Remark 18 for the details). – For arbitrary m but r = 2 and s1 = · · · = sm , Condition A reduces to a simple expression (Proposition 19 and Example 20). Proposition 16 If (i1 , . . . , im , r, s1 , . . . , sm ) satisfies Condition A then for all i01 , . . . , i0m with 0 ≤ i01 ≤ i1 , . . . , 0 ≤ i0m ≤ im also (i01 , . . . , i0m , r, s1 , . . . , sm ) satisfies Condition A. 9 Proof: It is enough to show that st − st − it s it ` ≤ st − st − ait s ait ` (8) holds for all rational numbers a and integers t with 0 < a < 1 and 1 ≤ t ≤ m − 1. But (8) is equivalent to (1 − a)(` − s) ≥ 0 which is a valid inequality when ` > s. t u We now give the most important theorem of the paper. Theorem 17 If im < rsm and if for t = 1, . . . , m − 1 ( √ ) √ m−1 r − 1 m−2 2 − 1 √ it ≤ st min m−1 , √ r − 1r m−2 2 − 12 then D(i1 , . . . im , r, s1 , . . . sm ) ≤ s1 · · · sm − (s1 − i1 r ) · · · (sm − im r ). Proof: The idea behind Theorem 17 is to choose it , t = 1, . . . , m − 1 such that √ m−1 s(st − it )≤ r √ m−1 r(st − it ), s for s = 1, . . . , r − 1, (9) and such that √ m−2 s(st − it )≤ ` √ m−2 `(st − it ), s for ` = 2, . . . , r, / s = 1, . . . , ` − 1. (10) The first set of inequalities guarantees (A.3) and the second set guarantees (A.2). Now (9) and (10), respectively, translates to √ √ m−1 it r − m−1 s √ , ≤ m−1√r (11) m−1 st − r s s √ √ m−2 ` − m−2 s it √ , (12) ≤ m−2√ m−2 s ` st − s ` respectively, and then also (A.1) is clearly satisfied. We shall show that the √ right side of√(11) is smallest possible when s = 1, in which case it equals ( m−1 r − 1)/( m−1 r − 1/r). And we shall show that the √ right side of √ (12) is smallest possible when ` = 2, s = 1, in which case it equals ( m−2 2 −√1)/( m−2 2 − 1/2). √ We first consider (11) where we substitute S = m−1 s and R = m−1 r to obtain it Rm S m−1 − Rm−1 S m ≤ . st Rm − S m We want to demonstrate that the right side is minimal on [1, R[ when S = 1. The derivative is (m − 1)R2m S m−2 + Rm S 2m−2 − mR2m−1 S m−1 . (Rm − S m )2 Hence, it suffices to show that the numerator is always positive on ]0, R[. Writing S = Ra with a ∈]0, 1[ the condition that the numerator should be positive becomes m − 1 + am − ma > 0. Plugging in a = 1, equality holds. Therefore the result follows from the fact that the derivative of m − 1 + am − ma is negative on ]0, 1[. The above proof not only shows that the minimum of the right side of (11) is obtained for s = 1. It also applies to demonstrate that the minimum of the right side of (12) is attained in one of the following cases (` = 2, s = 1), (` = 3, s = 1), . . . , (` = r, s = 1). We next substitute m − 2 with m on the right side of (12) 10 to obtain (`1/m − 1)/(`1/m − 1/`). We want to show that the minimal value for ` ∈ [2, ∞[ is attained when ` = 2. The derivative is  − `1/m m − `(m+1)/m + `1/m − m 2 m `(m+1)/m − 1 where the denominator is always positive and the numerator is positive for ` = 0. The result follows from the fact that  (m + 1)(`−(m−1)/m − `1/m ) d  1/m ` m − `(m+1)/m + `1/m − m) = d` m is negative on ]0, ∞[. t u Remark 18 If r = 1 then (A.2) and (A.3) do not apply and therefore Condition A reduces to i1 ≤ s1 , . . . , im ≤ sm . Hence, in this case Theorem 14 in combination with Theorem 9 reduce to Theorem 13. For m = 2 and r arbitrary condition (A.2) does not apply and condition (A.3) simplifies to rs s1 i1 ≤ r+s for all integers s with 1 ≤ s < r. The minimal upper bound on i1 is attained for r s = 1. Hence, in case of two variables Condition A reads i1 ≤ r+1 s1 , i2 < rs2 . For m = 2 and r being arbitrary Theorem 14 therefore equals (4) and (5). Proposition 19 Assume r = 2 and s1 = · · · = sm = q. Then Condition A simplifies to m−1 X 2t+1 − 1 2t (−1)t+1 t=1 X (Ij1 · · · Ijt ) ≤ 1 and Im < 2 1≤j1 <···<jt ≤m−1 where I1 = i1 /q, . . . , Im = im /q. Proof: For r = 2, the conditions (A.2), (A.3) become s1 −   i1  im−1  · · · sm−1 − ≤ 2 s1 − i1 · · · sm−1 − im−1 2 2 which is equivalent to     I1 Im−1 1− ··· 1 − ≤ 2(1 − I1 ) · · · (1 − Im−1 ) 2 2 m 1+ m−1 X 1 (−1)t ( )t 2 t=1 2+2 X (Ij1 · · · Ijt ) ≤ 1≤j1 <···<jt ≤m−1 m−1 X X t=1 1≤j1 <···<jt ≤m−1 (−1)t (Ij1 · · · Ijt ) m m−1 X (−1)t+1 t=1 and we are through. t u 2t+1 − 1 2t X (Ij1 · · · Ijt ) ≤ 1 1≤j1 <···<jt ≤m−1 11 2/3 2/3 O 2/3 Fig. 1 The surface 3 (I 2 1 + I2 + I3 ) − 74 (I1 I2 + I1 I3 + I2 I3 ) + 15 I I I 8 1 2 3 =1 Example 20 Let the notation be as in Proposition 19. For r = 2, m = 3 and s1 = s2 = s3 = q Condition A reads 7 3 (I1 + I2 ) − I1 I2 ≤ 1, 2 4 I3 < 2. For r = 2, m = 4 and s1 = s2 = s3 = s4 = q Condition A reads 3 7 15 (I1 + I2 + I3 ) − (I1 I2 + I1 I3 + I2 I3 ) + I1 I2 I3 ≤ 1, 2 4 8 I4 < 2. This is illustrated in Figure 1. From Proposition 19 it is clear that in the case of r = 2, for Condition A to hold we must have it ≤ 32 st , t = 1, . . . , m − 1. The general picture for r arbitrary is described in the following proposition. Proposition 21 Assume that (i1 , . . . , im , r, s1 , . . . , sm ) with m ≥ 2 satisfies Condition A. If r ≥ 2 then i1 ≤ r r s1 , . . . , im−1 ≤ sm−1 . r+1 r+1 Proof: Follows from (A.3), the last part of Remark 18, and the fact that st − holds for t = 1, . . . , m − 1. t u it it ≥ st − ` s (13) 12 Proof of Theorem 14: Let (i1 , . . . , im , r, s1 , . . . , sm ) with m ≥ 2 be such that Condition A holds. We give an induction proof that D(i1 , . . . , it , l, s1 , . . . , st ) ≤ s1 · · · st − (s1 − i`1 ) · · · (st − i`t ) for all 1 ≤ t < m, 1 ≤ ` ≤ r. (14) For t = 1 the result is clear. Let 1 < t < m and assume the result holds when t is substituted with t − 1. According to Definition 8 we have D(i1 , . . . , it , l, s1 , . . . , st ) =  max (st − u1 − · · · − u` )D(i1 , . . . , it−1 , `, s1 , . . . , st−1 ) (u1 ,...,ul )∈A(it ,`,st ) + u1 D(i1 , . . . , it−1 , ` − 1, s1 , . . . , st−1 ) + · · ·  + u`−1 D(i1 , . . . , it−1 , 1, s1 , . . . , st−1 ) + u` s1 · · · st−1 where A(it , `, st ) = {(u1 , . . . , u` ) ∈ N`0 | u1 + · · · + u` ≤ st , u1 + 2u2 + · · · + `u` ≤ it } follows from Definition 8. By the above assumptions this implies that D(i1 , . . . , it , `, s1 , . . . , st ) ≤  it−1  i1 ) max st s1 · · · st−1 − (s1 − ) · · · (st−1 − ` ` (u1 ,...,u` )∈B(it ,`,st ) i1 it−1 i1 it−1  + u1 (s1 − ) · · · (st−1 − ) − (s1 − ) · · · (st−1 − ) ` ` `−1 `−1 + ··· it−1 i1 it−1  i1 ) − (s1 − ) · · · (st−1 − ) + u`−1 (s1 − ) · · · (st−1 − ` `  1 1 i1 it−1  + u` (s1 − ) · · · (st−1 − ) ` ` (15) where B(it , `, st ) = {(u1 , . . . , u` ) ∈ Q` | 0 ≤ u1 , . . . , u` , u1 + · · · + u` ≤ st , and u1 + 2u2 + · · · + `u` ≤ it }. We have t < m and therefore condition (A.2) applies. We note that s(s1 − i1 it−1 i1 it−1 ) · · · (st−1 − ) ≤ `(s1 − ) · · · (st−1 − ) ` ` s s for s = 1, . . . , ` − 1 is equivalent to (` − s)(s1 − i1 it−1 i1 it−1 ) · · · (st−1 − ) ≤ `(s1 − ) · · · (st−1 − ) ` ` `−s `−s for s = 1, . . . , ` − 1 which again is equivalent to ` (s1 − i1 it−1 i1 it−1  i1 it−1 ) · · · (st−1 − )−(s1 − ) · · · (st−1 − ) ≤ s(s1 − ) · · · (st−1 − ) ` ` `−s `−s ` ` for s = 1, . . . , ` − 1. Therefore the maximal value of (15) is attained for u1 = · · · = u`−1 = 0 and u` = i`t . This concludes the induction proof of (14). To show (7) we apply similar arguments to the case t = m but use condition (A.3) rather than condition (A.2). 13 Finally we address the last part of Theorem 14. It is clear that the right side of (7) is smaller than or equal to s1 · · · sm . To see that it is also smaller than or equal to m X Y ( t=1 sj ) j = 1, . . . , m j 6= t it  r (16) we start by observing that Y j = 1, . . . , m j 6= t sj  it r equals the volume of N (t, it it ) = {(a1 , . . . , am ) ∈ Rm , 0 ≤ aj ≤ sj 0 | 0 ≤ at < r r for j ∈ {1, . . . , m}\{t}}. The sum of volumes of N (t, irt ), t = 1, . . . m is larger than or equal to the volume of ∪m t=1 N (t, it ) = {(a1 , . . . , am ) ∈ Rm 0 | 0 ≤ at ≤ st for t = 1, . . . , m r ij and not all j satisfy ≤ aj } r which equals the right side of (7). t u 4 Concluding remarks The results in this paper use the lexicographic ordering. We pose it as a research problem to investigate if some of them hold for arbitrary monomial orderings. Acknowledgments This work was supported by the Danish Council for Independent Research (grant no. DFF-4002-00367) and by the Danish National Research Foundation and the National Natural Science Foundation of China (Grant No. 11061130539 – the DanishChinese Center for Applications of Algebraic Geometry in Coding Theory and Cryptography). References 1. D. Augot, M. El-Khamy, R. J. McEliece, F. Parvaresh, M. Stepanov, and A. Vardy, “List decoding of Reed-Solomon product codes,” in Proceedings of the Tenth International Workshop on Algebraic and Combinatorial Coding Theory, Zvenigorod, Russia,, Sept. 2006, pp. 210-213. 2. D. Augot and M. Stepanov, “Interpolation based decoding of Reed-Muller Codes,” slides from talk at Special Semester on Gröbner Bases and Related Methods, RICAM, 2006, http: //www.ricam.oeaw.ac.at/specsem/srs/groeb/download/Augot.pdf. 3. A. Bishnoi, P. L. Clark, A. Potukuchi, Aditya and J. R. Schmitt, “On Zeros of a Polynomial in a Finite Grid,” arxiv.org/pdf/1508.06020.pdf, August 25th, 2015, 22 pages. 4. D. Cox, J. Little and D. O’Shea, Ideals, Varieties, and Algorithms, Sec. Ed., Springer, 1997. 5. Z. Dvir, S. Kopparty, S. Saraf, M. Sudan, “Extensions to the method of multiplicities, with applications to Kakeya sets and mergers,” in Foundations of Computer Science, 2009. FOCS’09. 50th Annual IEEE Symposium on, 2009, pp. 181-190. IEEE. 6. O. Geil and T. Høholdt, “Footprints or Generalized Bezout’s Theorem,” IEEE Trans. Inform. Theory, 46, no. 3, Mar. 2000, pp. 635-641. 14 7. O. Geil and C. Thomsen, “Tables for numbers of zeros with multiplicity at least r,” webpage: http://zeros.spag.dk, October 26th, 2014. 8. O. Geil and C. Thomsen, “Weighted Reed–Muller codes revisited,” Designs, codes and cryptography, 66, 2013, pp. 195–220. 9. V. Guruswami and M. Sudan, “Improved decoding of Reed-Solomon and algebraic-geometry codes,” IEEE Trans. Inform. Theory, 45, 1999, pp. 1757-1767. 10. T. Høholdt, “On (or in) Dick Blahut’s footprint,” in “Codes, Curves and Signals,” (Urbana, IL, 1997), pp. 3–7, Kluwer Internat. Ser. Engrg. Comput. Sci., 485, Kluwer Acad. Publ., Boston, MA, 1998. 11. R. Pellikaan and X.-W. Wu, “List Decoding of q-ary Reed-Muller Codes,” IEEE Trans. Inform. Theory, 50, 2004, pp. 679-682. 12. R. Pellikaan and X.-W. Wu, “List Decoding of q-ary Reed-Muller Codes,” (Expanded version of the paper [11]), available from http://win.tue.nl/~ruudp/paper/43-exp.pdf, 2004, 37 pages.
0math.AC
Self-Similarity Based Time Warping Christopher J. Tralie Duke University Department of Mathematics arXiv:1711.07513v1 [cs.CV] 20 Nov 2017 [email protected] Abstract 1 In this work, we explore the problem of aligning two time-ordered point clouds which are spatially transformed and re-parameterized versions of each other. This has a diverse array of applications such as cross modal time series synchronization (e.g. MOCAP to video) and alignment of discretized curves in images. Most other works that address this problem attempt to jointly uncover a spatial alignment and correspondences between the two point clouds, or to derive local invariants to spatial transformations such as curvature before computing correspondences. By contrast, we sidestep spatial alignment completely by using self-similarity matrices (SSMs) as a proxy to the time-ordered point clouds, since self-similarity matrices are blind to isometries and respect global geometry. Our algorithm, dubbed “Isometry Blind Dynamic Time Warping” (IBDTW), is simple and general, and we show that its associated dissimilarity measure lower bounds the L1 Gromov-Hausdorff distance between the two point sets when restricted to warping paths. We also present a local, partial alignment extension of IBDTW based on the Smith Waterman algorithm. This eliminates the need for tedious manual cropping of time series, which is ordinarily necessary for global alignment algorithms to function properly. 2 Figure 1. A concept figure for our technique of aligning timeordered point clouds which are rotated/translated/flipped and reparameterized versions of each other. Rows of self-similarity matrices (SSMs) of points which are in correspondence are reparameterized versions of each other, which reduces the global alignment problem to a series of 1D time warping problems. This observation forms the basis of our algorithm, which returns “warping path,” drawn in cyan in the lower left plot of this figure, that informs how to synchronize the point clouds. the thousands of works that use it. The problem becomes substantially more difficult, however, when the point clouds undergo spatial transformations or dimensionality shifts in addition to re-parameterizations, which is more common across modalities. For instance, one may want to synchronize a motion capture sequence expressed with quaternions of joints with a video of a similar motion in some feature space (see Section 5.4). There is no apparent correspondence between these spaces a priori. This problem even arises within modalities, such as aligning gestures from different people who reside in different spatial locations. Thus, when synchronizing sampled curves, it is important to address not only re-parameterizations, but also spatial transformations such as maps between spaces or rotations/translations/flips within the same space. In our work, we avoid explicitly solving for spatial maps by using self-similarity matrices (SSMs). Figure 1 shows 1. Introduction / Background In this work, we address the problem of synchronizing sampled curves, which we refer to as “time-ordered point clouds” (TOPCs). The problem of synchronizing TOPCs which trace similar trajectories but which may be parameterized differently is usually approached with the Dynamic Time Warping (DTW) algorithm [31, 32]. Since sequential data can often be translated into a sequence of vectors in some feature space, this algorithm has found widespread use in applications such as spoken word synchronization [31, 32], gesture recognition [37], touch screen authentication [12], video contour shape sequence alignment [26], and general time series alignment [5], to name a few of 1 a sketch of the technique. Even if the curves have been rotated/translated/flipped and re-parameterized, rows of the SSMs which are in correspondence are re-parameterized versions of each other. Our technique is simple both conceptually and in implementation, it is fully unsupervised, and it is parameter free. There are also theoretical connections between our algorithm and metric geometry, as shown in Section 2.2. We also show an extension of our basic technique to partially align time series across modalities (Section 3), and this is the first known solution to that problem. Finally, with proper normalization (Section 4), these techniques can address cross-modal alignment. We show favorable results on a number of benchmark datasets (Section 5). 1.1. Self-Similarity Matrices (SSMs) The main data structure we rely on in this work is the self-similarity matrix. Given a space curve parameterized by the unit interval γ : [0, 1] → (M, d), a Self-Similarity Image (SSI) is a function D : [0, 1] × [0, 1] → R so that Dγ (i, j) = d(γ(i), γ(j)) (1) The discretized version of an SSI corresponding to a sampled version of a curve is a self-similarity matrix (SSM). SSIs and SSMs are naturally blind to isometries of the underlying space curve and time-ordered point cloud, respectively; these structures remain the same if the curve/point cloud is rotated/translated/flipped. Time-ordered SSMs have been applied to the problem of human activity recognition in video [20], periodicity and symmetry detection in video motion [11], musical audio note boundary detection [14], music structure understanding and segmentation [4, 23, 35, 28], cover song identification [39], and dynamical systems [29], to name a few areas. In this work, we study more general properties of time-ordered SSMs that make them useful for alignment. 1.2. Warping Paths / Dynamic Time Warping The warping path is the basic primitive object we seek to synchronize two time-ordered point clouds. It is a discrete version of an orientation preserving homeomorphism of the unit interval used to re-parameterize curves. In layman’s terms, it provides a way to step forward along both point clouds jointly in a continuous way without backtracking, so that they are optimally aligned over all steps. More precisely, given two sets X and Y , a correspondence C between the two sets is such that C ⊂ X × Y and ∀x ∈ X∃y ∈ y s.t. (x, y) ∈ C and ∀y ∈ Y ∃x ∈ X s.t. (x, y) ∈ C. In other words, a correspondence is a matching between two sets X and Y so that each element in X is matched to at least one element in Y , and each element of Y is matched to at least one element in X. Let X and Y be two sets whose elements are adorned with a time order: X = {x1 , x2 , ..., xM } and Y = {y1 , y2 , ..., yN }. A warping path, between X and Y is a correspondence W which can be put into the sequence W = (c1 , c2 , ..., cK ) satisfying the following properties • Monotonicity: If (xi , yj ) ∈ W, then (xk , yl ) ∈ / W for k < i, l > j • Boundary Conditions: (x1 , y1 ), (xM , yN ) ∈ W • Continuity: ci − ci−1 ∈ {(0, 1), (1, 0), (1, 1)} Now suppose there are two time-ordered point clouds X and Y which both live in the same metric space (M, d). The Dynamic Time Warping (DTW) Dissimilarity[31, 32]1 between X and Y is X DTW(X, Y ) = min d(xi , yj ) W∈Ω (i,j)∈W where Ω is the set of all valid warping paths between X and Y . DTW satisfies the following subsequence relation    DT Wi−1,j−1  DT Wij = d(xi , yj ) + min DT Wi−1,j   DT Wi,j−1 (2) where DT Wij is the DTW dissimilarity between {x1 , x2 , ..., xi } and {y1 , y2 , ..., yj }. This makes it possible to solve DTW with a dynamic programming algorithm which takes O(M N ) time. This algorithm computes the cost of the shortest path from the upper left to the lower right of the “cross-similarity matrix” (CSM), or the M × N matrix holding all distances dij between Xi and Yj . A (not necessarily unique) shortest path realizing this distance is a warping path which can be used to align the two time series. 1.3. DTW After Spatial Transformations In addition to synchronizing curves in the same ambient space which are approximately re-parameterizations of each other, there has also been some recent work on the more difficult problem of matching curves which live in different ambient spaces or which live in the same space but which may differ by a spatial transformation in addition to re-parameterization. One objective for spatial alignment is the optimal rigid transformation taking one set of points to another. More precisely, given two Euclidean point clouds X, Y ∈ Rd , each with N points which are assumed to be in correspondence, the Procrustes distance [46, 22] is dP (X, Y ) = min Rx ,Ry ,tx ,ty N X ||Rx (xi − tx ) − Ry (yi − ty )||22 i=1 (3) 1 Note that DTW is not a metric, as it fails to satisfy the triangle inequality. For an example, see [30] section 4.1 One issue with Procrustes is that not only do X and Y have to have the same number of points, but the correspondences must be known a priori. Often in practice, neither of these assumptions are true. To deal with this, one can use the “Iterative Closest Points” (ICP) algorithm [6, 8], which switches back and forth between finding correspondences with nearest neighbors and solving the Procrustes problem. The authors of [49] use a modified version of ICP, replacing the nearest neighbor correspondence step with DTW. This ensures that the time order will be respected, which is not guaranteed with nearest neighbors only2 . There are also techniques which use canonical correlation analysis (CCA) instead of Procrustes analysis. Given two point clouds with N points represented by matrices X ∈ Rd1 ×N and Y ∈ Rd2 ×N , assumed to be in correspondence, CCA is defined as dCCA = min Vx ∈Rdx ×b ,Vy ||VxT X − VyT Y ||2F (4) for some chosen constant b ≤ min(d1 , d2 ), s.t. VxT XX T Vx = VyT Y Y T Vy = Ib . This is better suited to cross modal applications where scaling is involved. Like Procrustes, this assumes that the correspondences are known a priori. To find the correspondences, the authors in [53] take the same iterative approach as that authors in [49] did with ICP, but they alternate back and forth between DTW and CCA instead of DTW and Procrustes. An updated version of this algorithm known as “generalized time warping” (GTW) [51, 52] was developed which aligns multiple sequences using a single optimization objective where the spatial alignment and time warping are coupled. Finally, a recent work in [40, 41] takes a similar approach, but it replaces CCA by learning features in the projection stage with a deep neural network. Like all supervised learning approaches, however, this method requires training data with known correspondences. Furthermore, all of the techniques we have mentioned so far require a good initial guess to converge to a globally optimal solution. As an alternative to solving for a spatial alignment explicitly, many works perform time warping on a surrogate function which is invariant to isometries of the input. A popular choice is to numerically estimate curvature [24, 33, 15]. Some works use the triangle area between triples of points as an invariant [1], and some use the turning angle of the curve [9], which is related to curvature. These techniques can suffer from numerical difficulties when estimating the invariants. Also, most of the invariants are local, so small differences can cause the curves “drift” over time (e.g. a U is similar to a 6 with local curvature [33]), though using integrated curvature [10] can ameliorate this. 2 This analogous to the difference between the Fréchet Distance [2] and the Hausdorff Distance between curves. Figure 2. Self-similarity images of different parameterizations of a Figure 8. Rectangles in one image map to rectangles in the other image, and lines in one image map to lines in the other image. Beyond spatial alignment and invariants, the authors of [47] address more general case of cross-domain object matching (CDOM) with general correspondences and address warping paths as a special case. However, their problem reduces to the quadratic assignment problem, which is NP-hard, and their iterative approximation requires a good initial guess. The authors of [42] address a special case where curves form closed loops, using cohomology to find maps from point clouds to the circle, where they are synchronized, but this only works for periodic time series. The authors of [16] jointly align curves on manifolds, which is effective but requires learning the manifolds. Perhaps the most similar to our approach is the action recognition work of [21], from which we drew much inspiration, which applies DTW to small patches of SSMs to align time warped actions from different camera views. However, they only use elements near the diagonal of SSMs, and their scheme does not extend across modalities. 2. Isometry Blind Dynamic Time Warping Most of the approaches we reviewed to align time series which have undergone linear transformations try to explicitly factor out those transformations before doing an alignment, but this is not necessary if we build our algorithm on top a self-similarity matrix between two point clouds, which is already blind to isometries. To set the stage for our algorithms, we first study the maps that are induced between self-similarity images by re-parameterization functions, which will help in the algorithm design. For example, take the figure 8 curve,γ8 (t) = (cos(2πt), sin(4πt)). The bottom left of Figure 2 shows the SSM of a linearly parameterized sampled version of this curve, while the bottom right of Figure 2 shows the SSM corresponding to a reparameterized sampled version. Maps between the domains of the SSMs shown are always rectangles, and they are independent of underlying curve being parameterized (they only depend on the relationship between two parameterizations). To see this, start with a space curve γ : [0, 1] → Rd and its resulting self-similarity image Dγ . Given a homeomorphism h : [0, 1] → [0, 1], which yields a space curve γh : [0, 1] → Rd and a corresponding self-similarity image Dγh , there is an induced homeomorphism, h × h from the square to itself between the two domains of Dγ and Dγh ; that is, Dγh = Dγ (h(s), h(t)). If we fix a correspondence s ⇐⇒ u = h(s), then this shows that row h(s) of Dγ is a 1D re-parameterization of row s of Dγh , making rigorous the observation in Figure 1. Note that for a discrete version of these maps between time-ordered point clouds, one can replace the homeomorphism h with a warping path W, and the relationships are otherwise the same. 2.1. IBDTW Algorithm We now have the prerequisites necessary to define our main algorithm. The idea is quite simple. Based on our observations and Figure 1 and Figure 2, if we know that point i in a time-ordered point cloud (TOPC) X is in correspondence with a point j in TOPC Y, then we should match the ith row of X’s SSM to the j th row of Y’s SSM under the L1 distance, enforcing the constraint that (i, j) ∈ W. However, since it is unknown a priori which rows should be in correspondence, we try every row i of SSM A against every row j in SSM B, and we create a cross-similarity time warping matrix (CSWM) C so that Cij contains L1 DTW between row i of SSMA and row j of SSMB, constrained to warping paths which include (i, j). To enforce that (i, j) be in the optimal warping path, we exploit the boundary condition property of DTW by running the original DTW algorithm twice: once between SSM Ai1:i , SSM Bj1:j and once between SSM Aii:M and SSM Bjj:N , summing the costs. After doing this ∀i, j, apply the ordinary DTW algorithm to C. Algorithm 1 summarizes this process. Note that a serial implementation of this algorithm takes O(M 2 N 2 ) time, since a 1D DTW is computed for every row pair. To mitigate this, we implement a linear systolic array[50] version of DTW in CUDA. With unlimited parallel processors, this reduces computation to O(M + N ). In practice, we witness a 30x speedup between point clouds with hundreds of samples. Figure 3 shows an example of this algorithm on two rotated/translated/re-parameterized time-ordered point clouds in R2 (point clouds 1 and 2). As the colors show, IBDTW puts the points into correspondence correctly even without first spatially aligning them. We also show alignment to a third time-ordered point cloud, which is metrically distorted in addition to being rotated/translated/reparameterized. The returned warping degrades gracefully. We will explore this more rigorously in Section 5.1. 2.2. Analysis: Lower Bounding L1 Metric Stress IBDTW can be put into the Gromov-Hausdorff Distance framework, which describes how to “embed” one metric space into another. More formally, given two discrete metric spaces (X, dX ) and (Y, dY ), and a correspondence C between X and Y , the p-stress is defined as Figure 3. An example of IBDTW between 3 different samplings of a pinched ellipse. The optimal warping path found by Algorithm 1 is drawn in cyan on top of the CSWM in each case. Based on this, points which are in correspondence are drawn with the same color in the lower left figure. Though time-ordered point cloud 2 has more points towards the beginning and fewer points towards the end than time-ordered point cloud 1, correct regions are put into correspondence with each other. Furthermore, in addition to being parameterized this way, the time-ordered point could 3 is also distorted geometrically, but the correspondences are still reasonable. Algorithm 1 Isometry Blind Dynamic Time Warping 1: procedure IBDTW(X, Y , dX , dY ) 2: . TOPCs X and Y with M and N points, metrics dX and dY , respectively 3: . Initialize cross-similarity warp  matrix (CSWM) 0 ∞ ∞ ... ∞    ∞ 0 0 ... 0  M 4: C ← . . . . .. .. .. . . . ..     ∞ 0 0 ... 0 | {z } N 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: for i = 1 : M do .ith row of dX A ← [dX (xi , x1 ), dX (xi , x2 ), . . . , dX (xi , xM )] for j = 1 : N do .j th row of dY B ← [dY (yj , y1 ), dY (yj , y2 ), . . . , dY (yj , yN )] Cij ← ConstrainedDTW(A, B, L1 , i, j) end for end for . Use the CSWM C in ordinary DTW D ← 12 DTW(X, Y, C) return (D, C) . Return the cost and the CSWM end procedure 1/p  Sp (X, Y, C) =  X (dX (x, x0 ) − dY (y, y 0 ))p  (x,y),(x0 ,y 0 )∈C (5) Intuitively, the p-stress measures how much one has to stretch one metric space when moving it to another. The Gromov-Hausdorff Distance dGH uses S∞ specifically: 1 inf S∞ (X, Y, C) (6) 2 C∈Π where Π is the set of all correspondences between X and Y . In other words, the Gromov-Hausdorff Distance measures the smallest possible distortion between a pair of points over all possible embeddings of one metric space into another. Unfortunately, the Gromov-Hausdorff Distance is NP-complete, but we can still connect Algorithm 1 to the Gromov-Hausdorff Distance via the following lemma: dGH (X, Y ) = Lemma 1. The cost returned by Algorithm 1 lower bounds S1 (X, Y, W), or the 1-stress restricted to warping paths. Proof: Note that the optimal IBDTW warping path W ∗ has the following cost c(W ∗ ) X c(W ∗ ) = (xi ,yj |dX (xi , x0 ) − dY (yj , y 0 )| (7) ),(x0 ,y 0 )∈W ∗ which can be rewritten as c(W ∗ ) = 1 2 X X |dX (xi , x0 ), −dY (yj , y 0 )| (xi ,yj )∈W ∗ (x0 ,y 0 )∈W ∗ (8) since if (x0 , y 0 ) = (xi , yj ) then the cost is zero, all other terms counted twice. Now fix an xi and yj . Then the sum of the terms of the form |dX (xi , x0 )−dY (yj , y 0 )| is simply the L1 warping distance between 1D time series which are the ith row of dX , dX [i, :] and the j th row of dY , dY [j, :] under the warping W ∗ . Also, the DTW Distance between dX [i, :] and dY [j, :] is at most the L1 warping distance under W ∗ , and is potentially lower since we are computing them greedily only between xi and yj , ignoring all other constraints. Hence, the sum of the terms |dX (xi , x0 ) − dY (yj , y 0 )| is lower bounded by Line 11 in Algorithm 1.  For a more direct analogy with DTW, Algorithm 1 was designed to lower bound the 1-stress restricted to warping paths. We note that a similar technique could be used to lower bound the Gromov-Hausdorff Distance restricted to warping paths by replacing constrained DTW in the inner loop in Line 11 with a constrained version of the discrete Fréchet Distance [13] to find the maximum distortion induced by putting two points in correspondence. In this work, however, we stick to the 1-stress, since it gives a more informative overall picture of the full metric space. 3. Isometry Blind Partial Time Warping One of the drawbacks of IBDTW is that it requires a global alignment. However, if the sequences only partially Figure 4. Partial alignment with IBPTW on jigsaw puzzle pieces. The middle row shows the optimal partial alignment. The bottom row shows a locally optimally partial alignment with a lower score. Please refer to color version of this figure for full detail. overlap, forcing a global alignment leads to poor result, unless manual cropping is done to ensure that sequences start and end at the same place [53]. To automate cropping, we design an isometry blind time warping algorithm that can do partial alignment. This algorithm is like IBDTW, except DTW is replaced with the “Smith Waterman” algorithm [36, 45], which seeks the best contiguous subsequences in each time series which match each other 3 . Unlike dynamic time warping, Smith Waterman seeks to maximize an alignment score, and the alignment does not have to start on the first element of each sequence or end on the last element on each sequence. To solve this, the exact same dynamic programming algorithm is used, except there is one extra “restart” condition if a local alignment has become sufficiently poor. The recurrence is  SWi−1,j−1 + m(xi , yj )    SWi−1,j + g SWij = max SWi,j−1 + g    0     (9)    where m(xi , yj ) is a matching score between points xi and yj , which is positive for a match and negative for a mismatch, and g is a gap penalty. Like DTW, we may modify Smith Waterman to return the best subsequence constrained to match the ith point in the first sequence to the j th point in the second sequence by runing Smith Waterman between {X1 , X2 , ..., Xi } and Y1 , Y2 , ..., Yj , and then again between the reversed sequences {XM , XM −1 , XM −2 , ..., Xi } and {YN , YN −1 , YN −2 , ..., Y1 }. Then, the Isometry Blind Partial Time Warping (IBPTW) algorithm is exactly like Algorithm 1, except we replace Line 11 with constrained Smith 3 This algorithm was originally developed for gene sequence alignment, but it has been adapted to multimedia problems such as music alignment [34] and video copyright infringement detection [7]. Figure 5. An example of matching the SSM of an oscillating line segment captured with Lagrangian coordinates to an SSM of the oscillating line segment captured with Eulerian coordinates, and vice versa. The right column shows an example of a row from each of the matrices in different cases. The stipple line pattern shows the original row, the line segment shows the corresponding row from the SSM with the target distribution, and the solid row shows the remapped version of the original row. In this case, it is easier to remap the Lagrangian coordinates to Eulerian coordinates, though both remappings are closer to the target than the original. Waterman, and we replace Line 15 with unconstrained Smith Waterman. We refer to the matrix C (Line 4) as the “partial cross-similarity warp matrix (PCSWM).” In practice, we define m1 (a, b) = exp(−|d(a, b)|/σ) − 0.6 for Line 11. If d(a, b) is the L1 distance between elements of two histogram normalized SSM rows, then it ranges between 0 and 1. Thus, there is a positive matching score of up to 0.4 for the most similar SSM values and a negative matching score of -0.6 between the most dissimilar values. We also choose a gap penalty of -0.4 to promote diagonal matches. Otherwise, the warping path maximizing the alignment score contains longer horizontal and vertical lines, leading to undesirable pauses of one time series with respect to the other. For the outer loop (Line 15), we use m2 (ai , bj ) = (Sij − md(S)) max(|S − md(S))| where md is the median operation. This will give a high score up to ≤ 1 to row pairs which have a high subsequence score in common, and a low score ≥ −1 to rows which do not have a good subsequence. Figure 4 shows an example of this algorithm on two jigsaw puzzle pieces which should fit together with m1 and m2 defined as above, σ = 0.09, and g1 , g2 = −0.4. The longest subsequence is indeed along the cutouts where they match together. It is also possible to backtrace from anywhere in the PCSWM to find other subsequences which match in common, so Figure 4 also shows an example of suboptimal but good local alignment. 4. Cross-Modal Histogram Normalization The schemes we have presented work well for point clouds sampled from isometric curves, but the isometry assumption does not usually hold in cross-modal applications. Not only can the scales be drastically different between modalities, but it is unlikely that a uniform re-scaling will fix the problem. For instance, consider a 1D oscillating bar of length B oscillating sinusoidally over the interval [0, A] with a period of T . Its center position is measured as ct = (A/2) + (A/2) cos(2πt/T ). This type of measurement, which follows the object in question, is in Lagrangian coordinates. By contrast, suppose we take a 1D video of the bar with A pixels, where each pixel in each frame measures occupancy by the bar at that frame in the video. Then pixel i in video Xt is parameterized by time as   1 |ct + B/2 − i| < B/2 Xt [i] = (10) 0 otherwise These pixel by pixel measurements at fixed positions are referred to as Eulerian coordinates. Let the Lagrangian SSM D1 be the 1D metric between two different centers, D1 [s, t] = |cs − ct |, and let the Eulerian SSM D2 be the Euclidean metric D2 [s, t] = ||Xs − Xt ||2 between each frame of the video. Although they are measuring the same process, the SSMs have a locally different character. Rows of D1 are perfect sinusoids, while rows of D2 are more like square waves, since there are sharp transitions from foreground to background in Eulerian coordinates. Figure 5 summarizes all of this visually. To address this kind of local rescaling between an SSM D1 and an SSM D2 , we first divide each SSM by its respective max, and we quantize each to L levels evenly spaced in [0, 1]. We then apply a monotonic, one-to-one map f to each pixel in D1 so that the CDF of D1 approximately matches the CDF of D2 (see, e.g., [17] ch. 3.3). Note that this process can be done from D1 to D2 or from D2 to D1 , as shown in Figure 5. Since this process is not necessarily symmetric, we perform both sets of normalizations, and we choose the one which yields a better alignment score. 5. Experimental Results In this section, we will quantitatively compare the IBDTW algorithm for global alignment with several other techniques in the literature, including ordinary dynamic time warping (DTW), derivative dynamic time warping (DDTW) [24] (a curvature-based version), canonical time warping (CTW)[53], Generalized Time Warping (GTW)[51, 52], and Iterative Motion Warping (IMW)[19] (a simpler version of CTW which is restricted to the same space). We use code from [53] and [51, 52] to compute all of these alignments4 . We use the default parameters provided in this code, and, as in [53] and [51, 52], we use the results of DTW to initialize CTW and GTW. In all of our experiments, we show results both from IBDTW and 4 http://www.f-zhou.com/ta_code.html Figure 8. Distribution of IBPTW alignment errors for circularly shifted/warped/distorted MPEG-7 loops. Figure 6. Comparisons of alignment error distributions for different techniques on synthetic rotated/translated/reparamterized/distorted 2D/3D curves drawn from the classes shown on the left. Log plot shown for contrast since IBDTW performs so well relative to other methods. PCSWM Two Traversals After Alignment Before Alignment Figure 7. Two closed loops in the shape of a fork which have been rotated/translated/re-parameterized, in addition to starting at different points. The left plot shows the forks before alignment. The center plot shows the PCSWM resulting from aligning both point clouds each repeating themselves twice, as shown by the colors along the rows (left fork) and columns (right fork), which correspond to the colors in the left plot. The optimal partial warping path truncated to the first repetition of the left fork is superimposed in cyan. The forks in the right plot are put into correct correspondence by this truncated partial warping path. IBDTW after SSM rank normalization, which we refer to as “IBDTWN.” When a ground truth warping path exists, we report the alignment error as in [52] and [40]. Given a warping path W = (x1 , x2 , ..., xM ) and a ground truth path WGT = (y1 , y2 , ..., yN ), the alignment error is 1 M +N   M N X X N M  min ||xi − yj ||2 + min ||xi − yj ||2  i=1 j=1 j=1 before transformation/re-paramterization/distortion and let Y be the curve afterwards. The average ratio of dGH (X, Y )/diam(X), where diam is the “diameter” of X (the maximum inter point distance), is 0.18. Figure 6 shows the results. IBDTW performs the best, while doing the normalization for IBDTWN only degrades the results slightly. We also showcase our IBPTW algorithm by aligning 2D loops, or curves γ : [0, 1] → R2 so that γ(0) = γ(1), which is useful in recognizing boundaries of foreground objects in video. Note that a geometrically equivalent loop can be parameterized starting at a different point in the interior of the first loop: γ 0 (t) = γ(t − τ (mod1)). Also, it is possible that this loop is parameterized differently: γh0 (t) = γ 0 (h(t)) for some orientation preserving homeomorphism h : [0, 1] → [0, 1], and γh0 (t) may also be transformed spatially. To demonstrate how our algorithm is able to align such curves, we use examples from the MPEG-7 dataset of 2D contours [25]. Given a point cloud A and a point cloud B, we partially align the concatenated point clouds AA and BB. If A starts T samples later than B, then there will be a partial warping path which starts at sample 1 in AA and sample T in BB. Figure 7 shows an example where two forks are successfully put into correspondence this way. Figure 8 shows a histogram of alignment errors for distorted/circularly shifted/re-parameterized curves over 7 classes from the MPEG-7 dataset, using σ = 0.01 and m1 , m2 = −0.4, and with a mean dGH /diam = 0.11. IBPTW returns excellent alignments for most loops, though there are a cluster of outliers that occur due to (near) symmetries of some loops. i=1 (11) which is (roughly) the average number of samples by which W is shifted from WGT at any point in time. 5.1. Curve Alignment We first perform an experiment aligning a series of rotated/translated/flipped and re-parameterized sampled curves. As in [52], we re-parameterize the curves with random convex combinations of polynomial, logarithmic, exponential, and hyperbolic tangent functions. To distort the curves, we move random control points in random directions after spatial transformation and re-parameterization. Let X be the TOPC 5.2. Weizmann Walking Videos For our first cross modal experiment, we align 4 videos of people walking from the Weizmann dataset [18] cropped to 4 walking cycles each. As in [53], we use different features between each pair of videos we align. On one video, we use the binary mask of the foreground object of the person walking, where every pixel is a dimension, and every frame is a point in the TOPC. On the second video, we use the Euclidean distance transform (EDT) [27]. To assess performance rigorously, we create a more controlled experiment where the second video is the same as the first video after a time warp and applying EDT, so that we have access to the ground truth. Figure 9 shows the results. CTW Figure 9. Comparison of IBDTW with different time warping techniques on walking videos from the Weizmann action dataset[18] (left) and on 2D/3D facial expression videos from the BU4D dataset [48] (right). Figure 10. Example aligning MOCAP data expressed in the product space of quaternions with videos in raw pixel space. performs slightly better than IBDTWN, but not appreciably. Furthermore, IBTW without normalization has the worst average alignment error, demonstrating how normalization is needed in cross-modal applications. 5.3. BU4D 2D/3D Facial Expressions To show a more difficult cross-modal application, we also synchronize expressions drawn from the BU4D face dataset [48], which includes RGB videos of people making different facial expressions and a 3D triangle mesh corresponding to each frame. For our RGB features, we simply take each channel and each pixel to be a dimension, so a video with W × H pixels lives in R3W H . For the 3D mesh features, we use shape histograms [3] after mean centering and RMS normalizing each mesh. Our shape histograms have 20 radial shells, each with 66 sectors per shell with centers equally distributed across the sphere. We perform an experiment where we take the 2D features from a face and the 3D features of the same face which has been warped in time. We perform 10 such warpings and alignments for 9 faces from 6 different expression types. Figure 9 shows the aggregated results. The performance is strikingly worse than the Weizmann dataset, though the normalized IBDTW has about half of the alignment error of other techniques. 5.4. Non-Euclidean Examples One strength of our algorithms is that they run without modification for features in arbitrary metric spaces. For example, Figure 10 shows IBDTW between motion capture data expressed in a product space of quaternions of N joints Figure 11. Example aligning “Smooth Criminal” by Michael Jackson to a faster tempo cover by Alien Ant Farm. The optimal warping path is superimposed in magenta over the PCSWM. MJ’s version has an intro which is not present in the AAF version, and which is properly skipped by the warping path. with video data expressed asP raw pixels. The product space N of quaternions we choose is i=1 cos−1 (|qi · pi |) between two sets of quaternions (q1 , q2 , ..., qN ) and (p1 , p2 , ..., pN ). For our second example, Figure 11 shows IBPTW used to align two “cover songs” (two versions of the same song with different instruments / tempos) after fusing note-based and timbral features using similarity network fusion [43, 44] to learn an improved metric for self-similarity (see [38] for more info on this process). Please also refer to supplementary material for video and audio for these examples. 6. Conclusions In this work, we have shown it is possible to synchronize time-ordered point clouds that are spatially transformed without explicitly uncovering the spatial transformation. As we have shown by our experiments, our algorithms perform excellently when aligning nearly isometric sampled curves, and, with proper normalization, we are competitive with state of the art unsupervised techniques for cross-modal applications. Furthermore, IBDTW requires no parameters, making it approachable “out of the box,” while, in our experience, CTW and GTW require many parameters that make or break performance. Finally, we have opened the door for straightforward non-Euclidean time warping, and we hope to see more such applications (e.g. time series of graphs). Acknowledgments Christopher Tralie was partially supported by an NSF Graduate Fellowship NSF under grant DGF-1106401 and an NSF big data grant DKA-1447491. Paul Bendich is thanked for the suggestion to compare the technique to the Gromov-Hausdorff Distance, and for helpful comments on an initial manuscript. References [1] N. Alajlan, I. El Rube, M. S. Kamel, and G. Freeman. Shape retrieval using triangle-area representation and dynamic space warping. Pattern Recognition, 40(7):1911– 1920, 2007. 3 [2] H. Alt and M. Godau. Computing the fréchet distance between two polygonal curves. International Journal of Computational Geometry & Applications, 5(01n02):75–91, 1995. 3 [3] M. Ankerst, G. Kastenmüller, H.-P. Kriegel, and T. Seidl. 3d shape histograms for similarity search and classification in spatial databases. In International Symposium on Spatial Databases, pages 207–226. Springer, 1999. 8 [4] J. P. Bello. Grouping recorded music by structural similarity. Int. Conf. Music Inf. Retrieval (ISMIR-09), 2009. 2 [5] D. J. Berndt and J. Clifford. Using dynamic time warping to find patterns in time series. In KDD workshop, volume 10, pages 359–370. Seattle, WA, 1994. 1 [6] P. J. Besl and N. D. McKay. Method for registration of 3-d shapes. In Robotics-DL tentative, pages 586–606. International Society for Optics and Photonics, 1992. 3 [7] A. M. Bronstein, M. M. Bronstein, and R. Kimmel. The video genome. arXiv preprint arXiv:1003.5320, 2010. 5 [8] Y. Chen and G. Medioni. Object modelling by registration of multiple range images. Image and vision computing, 10(3):145–155, 1992. 3 [9] S. D. Cohen and L. J. Guibas. Partial matching of planar polylines under similarity transformations. In SODA, pages 777–786, 1997. 3 [10] M. Cui, J. Femiani, J. Hu, P. Wonka, and A. Razdan. Curve matching for open 2d curves. Pattern Recognition Letters, 30(1):1–10, 2009. 3 [11] R. Cutler and L. S. Davis. Robust real-time periodic motion detection, analysis, and applications. IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(8):781–796, 2000. 2 [12] A. De Luca, A. Hang, F. Brudy, C. Lindner, and H. Hussmann. Touch me once and i know it’s you!: implicit authentication based on touch screen patterns. In Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, pages 987–996. ACM, 2012. 1 [13] T. Eiter and H. Mannila. Computing discrete fréchet distance. Technical report, Citeseer, 1994. 5 [14] J. Foote. Automatic audio segmentation using a measure of audio novelty. In Multimedia and Expo, 2000. ICME 2000. 2000 IEEE International Conference on, volume 1, pages 452–455. IEEE, 2000. 2 [15] M. Frenkel and R. Basri. Curve matching using the fast marching method. In EMMCVPR, pages 35–51. Springer, 2003. 3 [16] D. Gong and G. Medioni. Dynamic manifold warping for view invariant action recognition. In Computer Vision (ICCV), 2011 IEEE International Conference on, pages 571– 578. IEEE, 2011. 3 [17] R. Gonzalez and R. Woods. Digital Image Processing. Addison-Wesley world student series. Addison-Wesley, 1992. 6 [18] L. Gorelick, M. Blank, E. Shechtman, M. Irani, and R. Basri. Actions as space-time shapes. Transactions on Pattern Analysis and Machine Intelligence, 29(12):2247–2253, December 2007. 7, 8 [19] E. Hsu, K. Pulli, and J. Popović. Style translation for human motion. In ACM Transactions on Graphics (TOG), volume 24, pages 1082–1089. ACM, 2005. 6 [20] I. N. Junejo, E. Dexter, I. Laptev, and P. Pérez. Cross-view action recognition from temporal self-similarities. In Proceedings of the 10th European Conference on Computer Vision: Part II, pages 293–306. Springer-Verlag, 2008. 2 [21] I. N. Junejo, E. Dexter, I. Laptev, and P. Perez. View-independent action recognition from temporal selfsimilarities. IEEE transactions on pattern analysis and machine intelligence, 33(1):172–185, 2011. 3 [22] W. Kabsch. A solution for the best rotation to relate two sets of vectors. Acta Crystallographica Section A: Crystal Physics, Diffraction, Theoretical and General Crystallography, 32(5):922–923, 1976. 2 [23] F. Kaiser and T. Sikora. Music structure discovery in popular music using non-negative matrix factorization. In ISMIR, pages 429–434, 2010. 2 [24] E. J. Keogh and M. J. Pazzani. Derivative dynamic time warping. In Proceedings of the 2001 SIAM International Conference on Data Mining, pages 1–11. SIAM, 2001. 3, 6 [25] L. Latecki. Shape data for the mpeg-7 core experiment ce-shape-1. Web Page: http://www. cis. temple. edu/˜ latecki/TestData/mpeg7shapeB. tar. g z, 2002. 7 [26] P. Maurel and G. Sapiro. Dynamic shapes average. 2003. 1 [27] C. R. Maurer, R. Qi, and V. Raghavan. A linear time algorithm for computing exact euclidean distance transforms of binary images in arbitrary dimensions. IEEE Transactions on Pattern Analysis and Machine Intelligence, 25(2):265–270, 2003. 7 [28] B. McFee and D. P. Ellis. Analyzing song structure with spectral clustering. In 15th International Society for Music Information Retrieval (ISMIR) Conference, 2014. 2 [29] G. McGuire, N. B. Azar, and M. Shelhamer. Recurrence matrices and the preservation of dynamical properties. Physics Letters A, 237(1-2):43–47, 1997. 2 [30] M. Müller. Information retrieval for music and motion, volume 2. Springer, 2007. 2 [31] H. Sakoe and S. Chiba. A similarity evaluation of speech patterns by dynamic programming. In Nat. Meeting of Institute of Electronic Communications Engineers of Japan, page 136, 1970. 1, 2 [32] H. Sakoe and S. Chiba. Dynamic programming algorithm optimization for spoken word recognition. IEEE transactions on acoustics, speech, and signal processing, 26(1):43– 49, 1978. 1, 2 [33] T. B. Sebastian, P. N. Klein, and B. B. Kimia. On aligning curves. IEEE transactions on pattern analysis and machine intelligence, 25(1):116–125, 2003. 3 [34] J. Serra, E. Gómez, P. Herrera, and X. Serra. Chroma binary similarity and local alignment applied to cover song identification. Audio, Speech, and Language Processing, IEEE Transactions on, 16(6):1138–1151, 2008. 5 [35] J. Serra, M. Müller, P. Grosche, and J. L. Arcos. Unsupervised detection of music boundaries by time series structure features. In Twenty-Sixth AAAI Conference on Artificial Intelligence, 2012. 2 [36] T. F. Smith and M. S. Waterman. Identification of common molecular subsequences. Journal of molecular biology, 147(1):195–197, 1981. 5 [37] G. A. ten Holt, M. J. Reinders, and E. Hendriks. Multidimensional dynamic time warping for gesture recognition. In Thirteenth annual conference of the Advanced School for Computing and Imaging, volume 300, 2007. 1 [38] C. J. Tralie. Early mfcc and hpcp fusion for robust cover song identification. In 18th International Society for Music Information Retrieval (ISMIR), 2017. 8 [39] C. J. Tralie and P. Bendich. Cover song identification with timbral shape. In 16th International Society for Music Information Retrieval (ISMIR) Conference, 2015. 2 [40] G. Trigeorgis, M. Nicolaou, S. Zafeiriou, and B. Schuller. Deep canonical time warping for simultaneous alignment and representation learning of sequences. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. 3, 7 [41] G. Trigeorgis, M. A. Nicolaou, S. Zafeiriou, and B. W. Schuller. Deep canonical time warping. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 5110–5118, 2016. 3 [42] M. Vejdemo-Johansson, F. T. Pokorny, P. Skraba, and D. Kragic. Cohomological learning of periodic motion. Applicable Algebra in Engineering, Communication and Computing, 26(1-2):5–26, 2015. 3 [43] B. Wang, J. Jiang, W. Wang, Z.-H. Zhou, and Z. Tu. Unsupervised metric fusion by cross diffusion. In Computer Vision and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 2997–3004. IEEE, 2012. 8 [44] B. Wang, A. M. Mezlini, F. Demir, M. Fiume, Z. Tu, M. Brudno, B. Haibe-Kains, and A. Goldenberg. Similarity network fusion for aggregating data types on a genomic scale. Nature methods, 11(3):333–337, 2014. 8 [45] M. S. Waterman. Introduction to computational biology: maps, sequences and genomes. CRC Press, 1995. 5 [46] G. Whaba. A least squares estimate of spacecraft attitude. SIAM Review, 7(3):409, 1965. 2 [47] M. Yamada, L. Sigal, M. Raptis, M. Toyoda, Y. Chang, and M. Sugiyama. Cross-domain matching with squared-loss mutual information. IEEE transactions on pattern analysis and machine intelligence, 37(9):1764–1776, 2015. 3 [48] L. Yin, X. Chen, Y. Sun, T. Worm, and M. Reale. A highresolution 3d dynamic facial expression database. In Automatic Face & Gesture Recognition, 2008. FG’08. 8th IEEE International Conference on, pages 1–6. IEEE, 2008. 8 [49] R. Ying, J. Pan, K. Fox, and P. K. Agarwal. A simple efficient approximation algorithm for dynamic time warping. In Proceedings of the 24th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, GIS ’16, pages 21:1–21:10, New York, NY, USA, 2016. ACM. 3 [50] C. W. Yu, K. Kwong, K.-H. Lee, and P. H. W. Leong. A smith-waterman systolic cell. In New Algorithms, Architectures and Applications for Reconfigurable Computing, pages 291–300. Springer, 2005. 4 [51] F. Zhou and F. De la Torre. Generalized time warping for multi-modal alignment of human motion. In Computer Vi- sion and Pattern Recognition (CVPR), 2012 IEEE Conference on, pages 1282–1289. IEEE, 2012. 3, 6 [52] F. Zhou and F. De la Torre. Generalized canonical time warping. IEEE transactions on pattern analysis and machine intelligence, 38(2):279–294, 2016. 3, 6, 7 [53] F. Zhou and F. Torre. Canonical time warping for alignment of human behavior. In Advances in neural information processing systems, pages 2286–2294, 2009. 3, 5, 6, 7
1cs.CV
arXiv:1610.03215v1 [math.ST] 11 Oct 2016 Specification testing in nonparametric AR-ARCH models∗ Marie Hušková, Natalie Neumeyer, Tobias Niebuhr, Leonie Selk Department of Statistics Department of Mathematics Charles University of Prague University of Hamburg January 15, 2018 Abstract In this paper an autoregressive time series model with conditional heteroscedasticity is considered, where both conditional mean and conditional variance function are modeled nonparametrically. A test for the model assumption of independence of innovations from past time series values is suggested. The test is based on an weighted L2 -distance of empirical characteristic functions. The asymptotic distribution under the null hypothesis of independence is derived and consistency against fixed alternatives is shown. A smooth autoregressive residual bootstrap procedure is suggested and its performance is shown in a simulation study. AMS 2010 Classification: Primary 62M10, Secondary 62G10 Keywords and Phrases: autoregression, conditional heteroscedasticity, empirical characteristic function, kernel estimation, nonparametric CHARN model, testing independence Running title: Nonparametric AR-ARCH models 1 Introduction Assume we have observations from a one-dimensional stationary weakly dependent time series Xj , j ∈ Z. Nonparametric modeling avoids misspecification problems and thus such models have gained much attention over the last years, see Fan and Yao (2003) and Gao (2007) for Financial support of the DFG (Research Unit FOR 1735 Structural Inference in Statistics: Adaptation and Effciency) and GAČR 15-09663S is gratefully acknowledged. Corresponding author: Natalie Neumeyer, University of Hamburg, Department of Mathematics, Bundesstrasse 55, 20146 Hamburg, Germany, e-mail: [email protected] ∗ 1 extensive overviews. One popular possibility is to analyze data by fitting a nonparametric AR(1)-ARCH(1)-model (also called CHARN-model), i. e. Xj = m(Xj−1 ) + σ(Xj−1)εj , j ∈ Z, with autoregression function m(x) = E[Xj | Xj−1 = x], conditional variance function σ 2 (x) = Var(Xj | Xj−1 = x), and innovations εj , independent from past time series values Xj−1 , Xj−2, . . . . Before applying any procedure developed for a time series model like the one defined, model assumptions need to be tested. Thus we are interested in testing the hypothesis H0 : εj and (Xj−1 , Xj−2 . . .) are stochastically independent. Although testing for this model assumption is essential for applications in order to obtain correct forecasts, it seems that the problem has not been considered before in the literature for the nonparametric case. The reason is presumably that tests for hypotheses involving the innovation distribution would typically be based on the empirical distribution function of nonparametrically estimated innovations (residuals). Only recently, asymptotic results for such processes in nonparametric autoregressive models are available. Müller et al. (2009) consider the above model in the homoscedastic case with constant σ. They prove an asymptotic expansion of the empirical process of residuals obtained from local-polynomial estimation of the autoregression function m. Further, Dette et al. (2009) base a test for the multiplicativity hypothesis m = cσ on the estimated innovation distribution. Selk and Neumeyer (2013) consider sequential empirical process of residuals and apply it to test for a change-point in the innovation distribution. In order to test an implication of the null hypothesis H0 one could consider, for some fixed and prespecified k ∈ N, test statistics based on an estimated difference of the joint empirical distribution function of εj and (Xj−1, . . . , Xj−k ) and the product of the marginal distributions. Asymptotic theory could be derived similar to the considerations in Müller et al. (2009), Dette et al. (2009), and Selk and Neumeyer (2013). Note, however, that the assumptions for deriving asymptotic distributions of residual-based processes as in the aforementioned literature are very restrictive. To avoid unnecessarily strong assumptions we follow a different path in the paper at hand and base our test on an estimated weighted L2 -distance between the joint and the marginal characteristic functions of εj and (Xj−1 , . . . , Xj−k ). In an iid context a test for independence of errors and covariates in nonparametric regression models based on residual empirical characteristic functions was suggested by Hlávka et al. (2011). Relatedly, in a time series context but for a parametric model Hlávka et al. (2012) test for a change in the innovation distribution of a linear autoregression model based on residual empirical characteristic functions. Another motivation for considering the empirical characteristic functions instead of empirical distribution functions is that in other contexts it has been observed that those tests inhabit better power properties, e.g., see Hlávka et al. (2016). A survey of testing procedures based on empirical characteristic functions is given in Meintanis (2016). The remainder of the paper is organized as follows. In section 2 we define our estimators and the test statistic. In section 3 we state model assumptions and give the asymptotic distribution 2 of the test statistic under the null hypothesis, whereas consistency under fixed alternatives is discussed in section 4. A bootstrap procedure is suggested in section 5, where also the finite sample performance is investigated in a simulation study. Section 6 concludes the paper, while all proofs are presented in an appendix. 2 The test statistic Assume we have observations X−k+1 , . . . , Xn from the time series Xj , j ∈ Z, considered in section 1. As test statistic for independence of innovations and past time series values we consider the weighted L2 -distance Z 2 Tn = n ϕ̂ε̂,X̄k (t0 , t1 , . . . , tk ) − ϕ̂ε̂ (t0 )ϕ̂X̄k (t1 , . . . , tk ) W (t0 , . . . , tk ) d(t0 , . . . , tk ). Here W denotes some weight function fulfilling assumption (A8) in Section 3. Furthermore !! n k X X tν Xj−ν ϕ̂ε̂,X̄k (t0 , t1 . . . , tk ) = w̄j exp i t0 ε̂j + ν=1 j=1 estimates the joint characteristic function of εj and X̄k,j = (Xj−1 , . . . , Xj−k ), whereas ϕ̂ε̂ (t) = n X w̄j exp (itε̂j ) , j=1 ϕ̂X̄k (t1 , . . . , tk ) = n X w̄j exp i j=1 k X ν=1 tν Xj−ν ! estimate the marginal characteristic functions of εj and X̄k,j , respectively. Here the weights P are defined as w̄j = wn (Xj−1 )/( nl=1 wn (Xl−1 )), where we choose a weight function wn (x) = I[−an ,an ] (x) for some sequence an → ∞. Here and throughout IA denotes the indicator function of set A. Other weight functions wn : R → [0, 1] which vanish outside [−an , an ] are possible as well but require slightly adapted assumptions. The weights are included in the definition of the empirical characteristic functions to avoid problems of kernel estimation in areas where only few data are available. Furthermore the residuals are defined as ε̂j = (Xj − m̂(Xj−1 ))/σ̂(Xj−1) and we use Nadaraya-Watson type estimators for the conditional mean and variance functions, Pn x−Xj−1 1 )Xj j=1 K( ncn cn m̂(x) = fˆX (x) P x−Xj−1 n 1 )(Xj − m̂(x))2 j=1 K( ncn cn 2 σ̂ (x) = fˆX (x) with kernel function K and sequence of bandwidths cn , n ∈ N. Here n 1 X  x − Xj−1  ˆ K fX (x) = ncn j=1 cn 3 denotes a kernel estimator for the marginal density fX of Xj . See, e. g., Robinson (1983), Masry and Tjøstheim (1995), Härdle and Tsybakov (1997) and Hansen (2008) for properties of these estimators in the time series context. 3 Assumptions and asymptotic results under the null hypothesis Under the null hypothesis we state the following assumptions. Please note that throughout we write t = (t0 , t1 , . . . , tk ) and use the notation g(t) for simplicity also for functions g that only depend on (t1 , . . . , tk ) (see e. g. ψ(t, x) from assumption (A4)). (A1) The process (Xt )t∈Z is strictly stationary and α-mixing with mixing coefficient α that for some q > 0, where s > 2 satisfies α(i) ≤ Ai−β for some A < ∞ and β > 1+(s−1)(2+1/q) s−2 s and E|X0 | < ∞. X1 has bounded marginal density fX such that for some constant B1 , sup E(|X1 |s |X0 = x)fX (x) ≤ B1 . x Furthermore (X0 , Xj ) has bounded joint density fj and there exists a constant B2 , such that for some j ∗ , sup E(|X1 Xj+1 |X0 = x0 , Xj = xj )fj (x0 , xj ) ≤ B2 x0 ,xj for all j ≥ j ∗ . (A2) Let m, σ 2 and fX be differentiable. Let there exist some r ∈ (0, ∞) such that the functions m, m′ , σ 2 , (σ 2 )′ , σ12 , f1X and fX′ are of order O((log n)r ) uniformly on the interval In = [−an − Ccn , an + Ccn ] (with C from assumption (A5)). Further we assume Lipschitz continuity of the derivatives fX′ , m′ and (σ 2 )′ in the following sense, sup |g(x) − g(y)| = O(cn (log n)r ) for g ∈ {fX′ , m′ , (σ 2 )′ }. x,y∈In |x−y|≤cn (A3) The innovations (εt )t∈Z are independent, centered and identically distributed. For each t ∈ Z, εt is independent from the past Xt−1 , Xt−2 , . . . . 2 let E[|ε1 |(2+2δ)∨4 ] < ∞ and supx∈In E[|εj |2(1+δ) | X0 = x] = O((log n)r ) For some δ > β−2 uniformly in j with r and In from assumption (A2). P (A4) Define ψ(t, x) = E[Y1 (t)|X0 = x] − E[Y1 (t)] with Y1 (t) = cos( kν=1 tν X1−ν ) and assume that sup sup |ψ(t, x) − ψ(t, z)| = O((log n)r cdn ) x,z∈In |x−z|≤Ccn t 4 for some d > 0 with r from assumption (A2) and C from assumption (A5). Assume the same condition holds for ψ̃(t, x) = E[Z1 (t)|X0 = x] − E[Z1 (t)] with Z1 (t) = P sin( kν=1 tν X1−ν ). (A5) The kernel K is a symmetric and Lipschitz continuous density with compact support R [−C, C] and K(u)u du = 0. (A6) For q, s and β from (A1) we have an = O(n1/(2q) log n), and for θ = β−2− q1 − 1+β s−1 β+2− 1+β s−1 it holds that log n = o(nθ cn ). Let a∗n =  log n ncn 1/2 + c2n , then a∗n = O(∆n n−1/4 ) with ∆n = inf |x|≤an fX (x). (A7) Let the sequence of bandwidths fulfill nc2n (log n)−D → ∞, nc4n (log n)D → 0 for all D > 0. (A8) The weight function W is nonnegative and symmetric such that W (±t0 , ±t1 , . . . , ±tk ) R = W (t0 , . . . , tk ). Further t40 W (t0 , . . . , tk )d(t0 . . . , tk ) < ∞. Remark 3.1 Apart from the typical assumptions on the kernel, bandwidths and weight functions we need smoothness assumptions on the unkown functions as well as moment assumptions and the mixing property, e. g. in order to obtain uniform rates of convergence for the kernel estimators, similar to Hansen (2008). Note that for (A6) and (A7) both to be satisfied one needs θ > 41 . We have the following asymptotic distribution of the test statistic under the null. Theorem 3.2 Under the assumptions (A1)–(A8) the test statistic Tn converges in distribution R to T = Rk+1 S 2 (t)W (t) dt, where S(t), t ∈ Rk+1, denotes a centered Gaussian process with the same covariance structure as S̃(t0 , . . . , tk )     Y1 (t) + Z1 (t) − E[Y1 (t) + Z1 (t)] = cos(t0 ε1 ) − E cos(t0 ε1 )    + sin(t0 ε1 ) − E[sin(t0 ε1 )] Y1 (t) − Z1 (t) − E[Y1 (t) − Z1 (t)]    1 + t0 ε1 E[sin(t0 ε1 )] + (ε21 − 1)E[sin(t0 ε1 )ε1 ] E[Y1 (t) + Z1 (t)|X0 ] − E[Y1 (t) + Z1 (t)] 2    1 − t0 ε1 E[cos(t0 ε1 )] + (ε21 − 1)E[cos(t0 ε1 )ε1 ] E[Y1 (t) − Z1 (t)|X0] − E[Y1 (t) − Z1 (t)] . 2 The proof is given in the appendix. An asymptotic level-α test is obtained by rejecting H0 whenever Tn > c1−α , where P (T > c1−α ) = α. Due to the complicated distribution of T we suggest a bootstrap procedure to estimate the critical value c1−α in section 5. 5 Remarks 3.3 (a) The replacement of true but unknown innovations εj by the estimated residuals ε̂j changes the asymptotic distribution drastically. Were the true innovations known and used in the test statistic instead of residuals the statistic S̃ in Theorem 3.2 would simplify to     S̃(t0 , . . . , tk ) = cos(t0 ε1 ) − E cos(t0 ε1 ) Y1 (t) + Z1 (t) − E[Y1 (t) + Z1 (t)]    + sin(t0 ε1 ) − E[sin(t0 ε1 )] Y1 (t) − Z1 (t) − E[Y1 (t) − Z1 (t)] . (b) If the aim is to test for independence of innovations and past time series values in a (homoscedastic) AR(1) model Xj = m(Xj−1) + εj , one simply sets σ̂ ≡ 1 in the definition of the residuals. Then the statistic S̃ in Theorem 3.2 changes to     Y1 (t) + Z1 (t) − E[Y1 (t) + Z1 (t)] S̃(t0 , . . . , tk ) = cos(t0 ε1 ) − E cos(t0 ε1 )    + sin(t0 ε1 ) − E[sin(t0 ε1 )] Y1 (t) − Z1 (t) − E[Y1 (t) − Z1 (t)]   + t0 ε1 E[sin(t0 ε1 )] E[Y1 (t) + Z1 (t)|X0 ] − E[Y1 (t) + Z1 (t)]   − t0 ε1 E[cos(t0 ε1 )] E[Y1 (t) − Z1 (t)|X0 ] − E[Y1 (t) − Z1 (t)] . (c) As mentioned in the introduction alternative testing procedures would be given by, e. g., Kolmogorov-Smirnov or Cramér-von Mises type statistics based on the F̂ε̂,X̄k −Fε̂ ⊗FX̄k , i. e. the weighted empirical joint distribution function of ε̂j and X̄k,j = (Xj−1, . . . , Xj−k ) (j = 1, . . . , n) and the product of the marginals. Following Müller et al. (2009), Dette et al. (2009), and Selk and Neumeyer (2013) to derive the asymptotic distribution would, however, require stronger assumptions on the data generating process. 4 Fixed alternatives Note that by construction the test statistic Tn cannot detect alternatives where the innovation εj is independent of (Xj−1 , . . . , Xj−k ), but depends on some Xj−ℓ for ℓ > k. However, the test is consistent against any fixed alternative H1 : εj and Xj−ℓ are stochastically dependent for some ℓ ∈ {1, . . . , k} under the following model. Assume that (Xj )j∈Z is a strictly stationary and weakly dependent time series that fulfills assumption (A1). Further define m(x) = E[Xj+1 | Xj = x] and σ 2 (x) = Var(Xj+1 | Xj = x). Let m, σ 2 and the marginal density fX fulfill assumption (A2). Let the kernel, weight function and sequence of bandwidth fulfill (A5)–(A8). Then we have the following result. 6 Theorem 4.1 Under the assumptions listed in this section, Tn /n converges to Z 2 T̃ = ϕε,X̄k (t0 , t1 , . . . , tk ) − ϕε (t0 )ϕX̄k (t1 , . . . , tk ) W (t0 , . . . , tk ) d(t0 , . . . , tk ) in probability, where ϕε,X̄k is the joint characteristic function of εj and (Xj−1 , . . . , Xj−k ), and ϕε and ϕX̄k are the corresponding marginal characteristic functions. The proof is given in the appendix. Note that under H1 one has T̃ > 0 and hence Tn −→ ∞ for n → ∞. From rejection of H0 one should conclude that the AR(1)-ARCH(1) model is not suitable to describe the data. Possible reasons are explained in the following example. Example 4.2 (a) Consider the conditional distribution of εj , given Xj−1. The first two moments of this distribution do not depend on Xj−1 by construction. Higher order moments could depend on Xj−1, i. e. E[εℓj | Xj−1] = hℓ (Xj−1 ) for some ℓ ≥ 3. In the simulation study we will consider a skew normal innovation distribution with mean zero, variance one and skewness dependent on Xj−1. (b) The conditional distribution of εj , given X̄k = (Xj−1 , . . . , Xj−k ) may still depend on X̄k . If this distribution does still depend on the first component Xj−1, but only on this component, modeling the autoregression and conditional variance function with lag 1 is appropriate, but one should not apply any procedures that assume independence of innovations and past time series values. (c) An AR(ℓ)-ARCH(ℓ) model could be appropriate for the data for some ℓ > 1, i. e. Xj = m̃(Xj−1 , . . . , Xj−ℓ ) + σ̃(Xj−1, . . . , Xj−ℓ )ηj with innovations ηj independent from Xj−1 , Xj−2, . . . . 5 Bootstrap and finite sample performance In this section we investigate the finite-sample performance of our test by simulations. Due to the complicated limiting distribution of T from Theorem 3.2, we suggest to use a smooth autoregressive residual bootstrap instead. Our bootstrap strategy is as follows. Firstly, based on the estimators as introduced in section 2, generate bootstrap innovations ε∗j from a smooth estimate of the innovation distribution, i. e. given the original data X−k+1 , . . . , Xn the distribution of ε∗j reads n 1 X  x − ε̃i  L Fn (x) = n i=1 hn 7 where hn denotes a positive bandwidth, L is some smooth distribution function and ε̃1 , . . . , ε̃n denote the standardized versions of the residuals ε̂1 , . . . , ε̂n . Secondly, compute the bootstrap process via ∗ ∗ Xj∗ = m̂(Xj−1 ) + σ̂(Xj−1 )ε∗j , j = 1, . . . , n, with some starting value X0∗ and a sufficiently large number of forerunnings to ensure the process is in balance. Thirdly, calculate the bootstrap analogue of the test statistic Tn , say Tn∗ . Frequent repetitions of these steps give the distribution of Tn∗ which approximates the distribution of Tn . By using the 1 − α percentile of the distribution of Tn∗ , say c∗1−α , the hypothesis of independence then is rejected if Tn > c∗1−α . It is worth noting that, given the original data ∗ ∗ , Xj−2 , . . . and thus the X−k+1 , . . . , Xn , the bootstrap innovations ε∗j are independent of Xj−1 bootstrap data fulfills the null hypothesis. The simulations are restricted to the hypothesis ’H0 : εj and Xj−1 are stochastically independent’, i.e. only the case k = 1 is investigated. To examine the performance of the test for finite sample sizes, we consider the following two AR-ARCH models: √ (i) m(x) = 0.9x, σ(x) ≡ 1, (ii) m(x) ≡ 0, σ(x) = 1 + 0.25x2 . Obviously, model (i) corresponds to an AR series and model (ii) represents an ARCH model. For both models, the performance under the null and under the alternative is investigated. We distinguish the null from the alternative by the choice of the innovation sequence. Under the null we use standard normally distributed innovations. Under the alternative we choose standardized skew normally distributed innovations, where the skewness parameter depends on past time series values. In particular the skewness parameter of εt+1 was set to 10Xt2 for all relevant time points t, according to the notation of Fernández and Steel (1998). Table 1: Rejection probabilities for the AR model (i) under the null hypothesis (left) and the under the alternative (right). α = 0.01 α = 0.05 α = 0.1 α = 0.01 α = 0.05 α = 0.1 n = 50 0.0000 0.0275 0.0475 n = 50 0.0150 0.0600 0.1125 n = 100 0.0000 0.0125 0.0225 n = 100 0.0450 0.1375 0.2200 n = 200 0.0005 0.0175 0.0425 n = 200 0.1550 0.3225 0.5200 n = 300 0.0000 0.0200 0.0375 n = 300 0.5100 0.7700 0.8675 n = 400 0.0000 0.0125 0.0425 n = 400 0.8350 0.9525 0.9900 Table 2: Rejection probabilities for the ARCH model (ii) under the null hypothesis (left) and under the alternative (right). α = 0.01 α = 0.05 α = 0.1 α = 0.01 α = 0.05 α = 0.1 n = 50 0.0075 0.0150 0.0225 n = 50 0.0325 0.0900 0.1525 n = 100 0.0000 0.0125 0.0325 n = 100 0.1000 0.2125 0.2775 n = 200 0.0150 0.0325 0.0700 n = 200 0.3125 0.4750 0.5275 n = 300 0.0025 0.0225 0.0625 n = 300 0.4900 0.5750 0.6375 n = 400 0.0075 0.0475 0.0825 n = 400 0.5575 0.6025 0.6450 Tables 1 and 2 state the rejection probabilities for 400 Monte Carlo simulations each with 400 bootstrap repetitions for several sample sizes n and significance levels α. We chose L as the standard normal distribution, hn was set to n−1/4 for reasons given in Neumeyer (2006), 8 and the bandwidth cn was chosen by Silverman’s rule by thumb, see Silverman (1986). The tables show that under the null hypothesis the test yields the given level of significance. While for model (ii) the test performance is very likely, for model (i) the test seems to be somehow over-conservative for the sample sizes used. Under the alternative the test power increases with increasing sample size in both models as to be expected. It is worth to note that the test power increases faster for model (i) than for model (ii). Altogether, the procedure performs satisfying in our simulations, however, it has to be noticed that the test performance depends on the time series at hand. For practitioners the computation of the test statistic Tn , and Tn∗ respectively, might be challenging. For that reason, we suppose using another representation of Tn , and Tn∗ , which avoids for solving complicated integrals. The alternative representation is stated in the following lemma. Lemma 5.1 Let F [V ](x) denote the Fourier transformation of V at point x. Under AssumpR Q tion (A8) and if W yields W (t0 , . . . , tk ) = V0 (t0 ) ki=1 Vi (ti ), it holds F [V ](x) = cos(tx)V (t)dt and the test statistic Tn can be represented by Tn =n n X s1 ,s2 =1 +n w̄s1 w̄s2 F [V0 ](ε̂s1 − ε̂s2 ) n X s1 ,s2 =1 − 2n n X s1 ,s2 ,s3 =1 k Y j=1 k Y j=1 s3 ,s4 =1 w̄s1 w̄s2 F [V0 ](ε̂s1 − ε̂s2 ) n X w̄s3 w̄s4 F [Vj ](Xs3 −j − Xs4 −j ) F [Vj ](Xs1 −j − Xs2 −j ) w̄s1 w̄s2 w̄s3 F [V0 ](ε̂s1 − ε̂s2 ) k Y j=1 F [Vj ](Xs1 −j − Xs3 −j ). Since the choice of the weighting function W belongs to the user, the additional assumption on its multiplicative form is very weak. If one further chooses W such that the Fourier transformations of the corresponding functions Vi , i = 0, . . . , k, are known, the test statistic Tn can straightforwardly be computed. Even more important, the implementation then simplifies a lot since the computation of the (k + 1)-fold integral is omitted. Example 5.2 Some choices of W fulfilling the assumptions of the lemma are: Q (a) W (t0 , . . . , tk ) = e−γ0 |t0 | kj=1 e−γj |tj | , where the Fourier transformation of Vj (tj ) := e−γj |tj | , 2γ j = 0, . . . , k, is given by F [Vj ](tj ) = γ 2 +4πj 2 x2 . j −γj t2j , where the Fourier j=1 e q 2 F [Vj ](x) = γπj e−(πx) /γj . 2 (b) W (t0 , . . . , tk ) = e−γ0 t0 0, . . . , k, is given by Qk 9 2 transformation of Vj := e−γj tj , j = 6 Concluding remarks and outlook In this paper we suggested a test for independence of innovations and past time series observations in an AR-ARCH model, where both the conditional mean and conditional volatility function are modeled nonparametrically. The test is based on empirical characteristic functions. For simplicity of presentation we considered the AR(1)-ARCH(1) case. However, generalizations to AR(p)-ARCH(p) models are straightforward, while then local polynomial estimators for the mean and variance function should be used. Facing the curse of dimensionality also semiparametric models might be of interest, see e. g. Yang et al. (1999) for a model with an additive autoregression function and multiplicative volatility function. Including covariates is possible as well. Then one considers a model of type Xj = m(Tj ) + σ(Tj )εj , where the vector Tj may include past observations. Testing independence of εj from Tj , Tj−1 , . . . would be of interest here and can be conducted in an analogous manner. A question related to the one considered in the paper at hand is whether the innovations really form an iid sequence. Corresponding tests for parametric times series models have been considered by Ghoudi et al. (2001), among others. Presumably with the methods developed in the paper at hand, such hypotheses tests for nonparametric time series models can be derived. We leave the consideration for future research. References Dette, H., Pardo-Fernández, J. C. & Van Keilegom, I. (2009). Goodness-of-Fit Tests for Multiplicative Models with Dependent Data. Scand. J. Statist. 36, 782–799. Fan, J. & Yao, Q. (2003). Nonlinear Time Series: Nonparametric and Parametric Methods. Springer Series in Statistics, New York. Fernández, C. and Steel, F.J. (1998). On Bayesian modeling of fat tails and skewness. J. American Stat. Assoc. 93, 259–371. Gao, J. (2007). Nonlinear Time Series: Semiparametric and Nonparametric Methods. Chapman & Hall/CRC, Boca Raton. Ghoudi, K., Kulperger, R. J. & Rémillard, B. (2001). A Nonparametric Test of Serial Independence for Time Series and Residuals. J. Multivariate Anal. 79, 191–218. Hansen, B.E. (2008). Uniform Convergence Rates for Kernel Estimation with Dependent Data. Econom. Theory 24, 726-748. Härdle, W. & Tsybakov, A. (1997). Local polynomial estimators of the volatility function in nonparametric autoregression. J. Econometrics 81, 223-242. 10 Hlávka, Z., Hušková, M., Kirch, C. & Meintanis, S. G. (2012). Monitoring changes in the error distribution of autoregressive models based on Fourier methods. TEST 21, 605–634. Hlávka, Z., Hušková, M., Kirch, C. & Meintanis, S. G. (2014). Fourier-Type Tests Involving Margingale Difference Processes. Econometric Reviews. DOI: 10.1080/07474938.2014.977074 Hlávka, Z., Hušková, M., Kirch, C. & Meintanis, S. G. (2016). Bootstrap procedures for on-line monitoring of changes in autoregressive models. Commun. Stat. Simul. Comput. 45, 2471–2490. Hlávka, Z., Hušková, M. & Meintanis, S. G. (2011). Tests for independence in non-parametric heteroscedastic regression models. J. Multivariate Anal. 102, 816–827. Ibragimov, I.A. & Khasminskii, R.Z. (1981). Statistical Estimation: Asymptotic Theory. Springer, New York. Masry, E. & Tjøstheim, D. (1995). Nonparametric estimation and identification of nonlinear ARCH time series. Econometric Theory 11, 258–289. Meintanis, S. G. (2016). A review of testing procedures based on the empirical characteristic function. South African Statistical Journal 50, 1–14. Müller, U. U., Schick, A. & Wefelmeyer, W. (2009). Estimating the innovation distribution in nonparametric autoregression. Probab. Theory Relat. Fields 144, 53–77. Neumeyer, N. (2009). Smooth residual bootstrap for empirical processes of nonparametric regression residuals. Scand. J. Statist. 36, 204–228. Robinson, P. M. (1983). Nonparametric estimators for time series. J. Time Ser. Anal. 4, 185-207. Selk, L. & Neumeyer, N. (2013). Testing for a change of the innovation distribution in nonparametric autoregression - the sequential empirical process approach. Scand. J. Statist. 40, 770–788 Silverman, B.W. (1986). Density estimation for statistics and data analysis. Chapman and Hall, New York. Su, L. & Xiao, Z. (2008). Testing structural change in time-series nonparametric regression models. Statistics and Its Interface. Vol. 1, 347-366. Sun, S. & Chiang, C-Y. (1997). Limiting behavior of the perturbed empirical distribution functions evaluated at U-statistics for strongly mixing sequences of random variables. J. Appl. Math. Stoch. Anal. 10, 3–20. 11 Yang, L., Härdle, W. & Nielsen, J. P. (1999). Nonparametric autoregression with multiplicative volatility and additive mean. J. Time Ser. Anal. 20, 579–604. Yokoyama, R. (1980). Moment Bounds for Stationary Mixing Sequences. Z. Wahrscheinlichkeitstheorie verw. Gebiete 52, 45–57. A Proofs: main results Throughout the proof D denotes some generic positive constant, independent of t, that may differ from line to line. Proof of Theorem 3.2. Note that for the test statistic we have Z X k k n X n n     X X X tν Xℓ−ν w̄j w̄ℓ exp i t0 ε̂j + tν Xj−ν − Tn = n w̄j exp i t0 ε̂j + ν=1 j=1 ν=1 j=1 ℓ=1 × W (t0 , . . . , tk ) d(t0 , . . . , tk ) Z h X k n k n X n  2   X X X w̄j w̄ℓ cos t0 ε̂j + tν Xℓ−ν = n w̄j cos t0 ε̂j + tν Xj−ν − ν=1 j=1 + n X j=1  w̄j sin t0 ε̂j + ν=1 j=1 ℓ=1 k X ν=1  tν Xj−ν − × W (t0 , . . . , tk ) d(t0 , . . . , tk ) n X n X j=1 ℓ=1 k  2 i X w̄j w̄ℓ sin t0 ε̂j + tν Xℓ−ν ν=1 and with the addition theorems for trigonometric functions one obtains Z (h X k n k n X   X  X w̄ℓ cos tν Xℓ−ν Tn = n w̄j cos(t0 ε̂j ) cos tν Xj−ν − ν=1 j=1 − n X + j=1  w̄j sin(t0 ε̂j ) sin n hX j=1 + n X j=1 k X  ν=1 w̄j sin(t0 ε̂j ) cos  w̄j cos(t0 ε̂j ) sin  tν Xj−ν − k X ν=1 k X ν=1 tν Xj−ν −  w̄ℓ sin k X n X w̄ℓ cos ℓ=1 n X ℓ=1 tν Xℓ−ν ν=1 ℓ=1  tν Xj−ν − × W (t0 , . . . , tk ) d(t0 , . . . , tk ). ν=1 ℓ=1 n X w̄ℓ sin k X tν Xℓ−ν ν=1 k X tν Xℓ−ν ν=1 From assumption (A8) by symmetry properties of cosine and sine we obtain Z Tn = (Sn (t))2 W (t) dt, 12 i2  i2 ) 2 where " n k k X  X  √ X w̄j cos(t0 ε̂j ) cos tν Xj−ν + sin tν Xj−ν Sn (t) = n ν=1 j=1 − + √ n n X n X  w̄ℓ cos ℓ=1 " w̄j sin(t0 ε̂j ) cos j=1 −  w̄ℓ cos ℓ=1  tν Xℓ−ν + sin ν=1 k X ν=1 n X ν=1 k X  tν Xj−ν − sin k X ν=1 k X tν Xℓ−ν ν=1 k X tν Xj−ν ν=1  tν Xℓ−ν − sin k X #   tν Xℓ−ν ν=1  # . For simplicity for the moment we consider only " # n k n k X  X X  X √ w̄j cos(t0 ε̂j ) cos tν Xj−ν − w̄ℓ cos tν Xℓ−ν . Sn(1) (t) = n j=1 ν=1 ℓ=1 ν=1 By a second order Taylor expansion for    m − m̂ σ − σ̂ (Xj−1 ) + (Xj−1 ) cos (t0 ε̂j ) = cos t0 εj + εj σ̂ σ̂ and introducing the notations n 1X wn (Xi−1 ) κ̂n = n i=1 Yj (t) = cos k X ν=1 (1) (1,1) we obtain the expansion Sn = Sn  tν Xj−ν , (1,2) + Sn (1,3) − 12 Sn n Sn(1,1) (t) (A.1) j = 1, . . . , n, , where n   1 1 X 1 1X √ = wn (Xℓ−1 )Yℓ (t) wn (Xj−1 ) cos(t0 εj ) Yj (t) − κ̂n n j=1 κ̂n n ℓ=1 n n    1 1 X 1 1X √ = wn (Xℓ−1 )Yℓ (t) wn (Xj−1 ) cos(t0 εj ) − E[cos(t0 εj )] Yj (t) − κ̂n n j=1 κ̂n n ℓ=1   n 1 1 X m̂ − m σ̂ − σ (1,2) √ Sn (t) = wn (Xj−1 ) sin(t0 εj )t0 (Xj−1) + εj (Xj−1 ) κ̂n n j=1 σ̂ σ̂ n i h 1 1X wn (Xℓ−1 )Yℓ (t) × Yj (t) − κ̂n n ℓ=1  2 n m̂ − m σ̂ − σ 1 1 X 2 (1,3) √ wn (Xj−1 ) cos(t0 ξj )t0 (Xj−1) + εj (Xj−1 ) Sn (t) = κ̂n n j=1 σ̂ σ̂ 13 n   1 1X wn (Xℓ−1 )Yℓ (t) × Yj (t) − κ̂n n ℓ=1 (with ξj between εj and ε̂j , j = 1, . . . , n). The last term is negligible because Z (Sn(1,3) (t))2 W (t) dt ≤ Z t40 W (t) dt n 1 X n i=1 2  a∗ 4  n ε2i + 1 nOP = oP (1) ∆n by assumptions (A3) and (A6), Proposition B.1 and (B.1). Lemmata B.2, B.3 and B.4 R (1) (1,1) (1,2) give further expansions of Sn and Sn . With this we obtain altogether that (Sn (t) − (1) S̃n (t))2W (t) dt = oP (1), where " n   1 X (1) S̃n (t) = √ wn (Xj−1 ) cos(t0 εj ) − E[cos(t0 εj )] (Yj (t) − E[Yj (t)]) n j=1 # 1   + t0 (ε2j − 1)E[sin(t0 ε1 )ε1 ] + εj E[sin(t0 ε1 )] E[Yj (t)|Xj−1] − E[Yj (t)] . 2 Analogously it follows that Sn = S̃n + Rn , where R Rn2 (t)W (t) dt = oP (1) and S̃n (t) " n   X   1 √ Yj (t) + Zj (t) − E[Yj (t) + Zj (t)] wn (Xj−1) cos(t0 εj ) − E cos(t0 εj ) = n j=1    + sin(t0 εj ) − E[sin(t0 εj )] Yj (t) − Zj (t) − E[Yj (t) − Zj (t)]    1 + t0 εj E[sin(t0 ε1 )] + (ε2j − 1)E[sin(t0 ε1 )ε1 ] E[Yj (t) + Zj (t)|Xj−1] − E[Yj (t) + Zj (t)] 2 #    1 2 − t0 εj E[cos(t0 ε1 )] + (εj − 1)E[cos(t0 ε1 )ε1 ] E[Yj (t) − Zj (t)|Xj−1] − E[Yj (t) − Zj (t)] , 2 with Zj (t) = sin k X tν Xj−ν ν=1  j = 1, . . . , n. To finish the proof of Theorem 3.2 we apply Theorem 22 (pages 380, 381) in Ibragimov and Chasminskij (1981). In order to verify the assumptions it suffices to show: • (i) S̃n (t) has asymptotically normal distribution with zero mean and finite variance; • (ii) for any compact set F in Rk+1 , sup E n Z F S̃n2 (t)W (t)dt < ∞; 14 • (iii) E|S̃n2 (t1 ) − S̃n2 (t2 )| ≤ D|t1 − t2 |γ ∀t1 , t2 for some γ > 0 and some D > 0; • (iv) for all η > 0 there exists some compact set Fη in Rk+1 with Z Z 2 S̃ 2 (t)W (t)dt < η. S̃n (t)W (t)dt < η ∀n, E E Rk+1 \Fη Rk+1 \Fη Since S̃n (t) is the sums of martingale differences for each t and the the central limit theorem for martingale differences can be applied which further implies (i). Direct calculations gives (ii). Concerning (iii) we have h  i 2 2 2 E|S̃n (t1 ) − S̃n (t2 )| ≤ E |S̃n (t1 ) − S̃n (t2 )| × |S̃n (t1 )| + |S̃n (t2 )|  2 1/2  2 ≤ E S̃n (t1 ) − S̃n (t2 ) × E |S̃n (t1 )| + |S̃n (t2 )| and since E(S̃n (t)2 ) ≤ D, ∀t it suffices to study 2 E S̃n (t1 ) − S̃n (t2 ) . We show here the needed inequality only for one of the terms in S̃n (t1 ) − S̃n (t2 ) all others are treated in the same way. Particularly, n  1 X  E √ wn (Xj−1) (cos(t01 εj ) − E cos(t01 εj ))(Yj (t1 ) − EYj (t1 )) n j=1 2 − (cos(t02 εj ) − E cos(t02 εj ))(Yj (t2) − EYj (t2 ))   = E wn (Xj−1) (cos(t01 εj ) − E cos(t01 εj ))(Yj (t1 ) − EYj (t1 )) 2 − (cos(t02 εj ) − E cos(t02 εj ))(Yj (t2) − EYj (t2 )) ≤ D||t1 − t2 ||2 where we used smoothness of cosine and moment assumptions. Proceeding similarly with other terms and putting all together we conclude E|S̃n2 (t1 ) − S̃n2 (t2 )| ≤ D||t1 − t2 || This implies the item (iii). Item (iv) follows straightforwardly by our moment assumptions and integrability of W . 15 Combining all the above arguments we can infer that the assertion of Theorem 3.2 holds true; see Lemma 7.1 and proof of Theorem 4.1 (a) in Hlávka et al. (2014) for a similar argumentation. ✷ Proof of Theorem 4.1. R We use the same decomposition of Tn = (Sn (t))2 W (t) dt as in the proof of Theorem 3.2. Please note that Lemma B.1 remains true under the assumptions of Theorem 4.1. A careful inspection of the proof of Theorem 3.2 shows that applying this Lemma one obtains R Sn = S̃n + Rn , where Rn2 (t)W (t) dt = oP (n) and " n     1X S̃n (t) √ wn (Xj−1 ) cos(t0 εj ) − E cos(t0 εj ) Yj (t) + Zj (t) − E[Yj (t) + Zj (t)] = n n j=1 #    + sin(t0 εj ) − E[sin(t0 εj )] Yj (t) − Zj (t) − E[Yj (t) − Zj (t)] . The proof is finished as the end of the proof of Theorem 3.2 applying Theorem 22 (pages 380, 381) in Ibragimov and Chasminskij (1981). To this end, condition (i) is replaced by convergence in probability of S̃n (t)/n1/2 to "     S̄(t) = E cos(t0 εj ) − E cos(t0 εj ) Yj (t) + Zj (t) − E[Yj (t) + Zj (t)] #   + sin(t0 εj ) − E[sin(t0 εj )] Yj (t) − Zj (t) − E[Yj (t) − Zj (t)]  for all t, whereas in conditions (ii)–(iv) S̃n is replaced by S̃n /n1/2 . Thus we obtain convergence of R Tn /n to (S̄(t))2 W (t) dt in probability. Note further that by the addition theorems for trigonoR metric functions and symmetry properties of cosine and sine it holds T̃ = (S̄(t))2 W (t)dt. This completes the proof. ✷ Proof of Lemma 5.1. R Using assumption (A8), it follows that Rk+1 |t40 W (t0 , . . . , tk )|d(t0 , . . . , tk ) < ∞ and since Q W (t0 , . . . , tk ) = V0 (t0 ) ki=1 Vi (ti ) by assumption, one obtains Z Z k Y 4 4 ∞> |t0 W (t0 , . . . , tk )|d(t0 , . . . , tk ) = t0 V0 (t0 ) Vi (ti )d(t0 , . . . , tk ) Rk+1 Rk+1 = Z R t40 V0 (t0 )dt0 i=1 k Z Y i=1 Vi (ti )dti R which gives that Vi ∈ L1 (R) for any i = 0, . . . , k. Hence, the Fourier transformation of any Vi , say F [Vi ], exists. The representation of the test statistic is now straightforwardly computed by using the definition of the Fourier transformation and of the empirical characteristic functions besides the multiplicative structure of W . Since the computation is tedious but without further insights, this part of the proof is omitted here. ✷ 16 B Auxiliary results First note that for κ̂n defined in (A.1) one obtains directly that E[(κ̂n − 1)2 ] can be bounded by 1 − FX1 ( a2n ) − FX1 (− a2n ) = o(1) and thus we have κ̂n = 1 + oP (1). (B.1) Proposition B.1 Let (Xj )j∈Z be a strictly stationary time series with marginal density fX . Define m(x) = E[Xj+1 | Xj = x] and σ 2 (x) = Var(Xj+1 | Xj = x) and assume (A1), (A2), (A5), (A6). Let ∆n = inf |x|≤an fX (x), a∗n = ((log n)/(ncn ))1/2 + (log n)D c2n and b∗n = ((cn /n)1/2 + c2n )(log n)D . Here, D > 0 is some multiple of r from assumption (A2) and may differ from line to line. We then have (i) sup |fˆX (x) − fX (x)| = OP (a∗n ) |x|≤an a∗n ) ∆n |x|≤an a∗n sup |σ̂(x) − σ(x)| = OP ( ) ∆n |x|≤an sup |m̂(x) − m(x)| = OP ( (ii)   n 1 X Xj−1 − x sup (m(Xj−1 ) − m(x)) = OP (b∗n ) K cn |x|≤an ncn j=1   n 1 X Xj−1 − x sup K (σ 2 (Xj−1) − σ 2 (x))| = OP (b∗n ) cn |x|≤an ncn j=1   n 1 X Xj−1 − x (m2 (Xj−1 ) − m2 (x))| = OP (b∗n ) K sup cn |x|≤an ncn j=1 (iii)   n Xj−1 − x 1 X K σ(Xj−1 )εj (m(Xj−1) − m(x))| = OP (b∗n ). sup nc c n j=1 n |x|≤an Proof. The first two results of (i) are stated in Theorems 6 and 8 by Hansen (2008) without the (log n)D factor of the c2n term. In comparison to Hansen (2008) we use a different bounding for the expectation terms since we do not assume second derivatives. E. g. we obtain, making use of the mean value theorem, the properties of the kernel function and our assumption (A2), Z ˆ sup |E[fX (x) − fX (x)]| = sup | K(u)(fX (x − cn u) − fX (x)) du| |x|≤an |x|≤cn 17 ≤ sup cn |x|≤an Z K(u)|u| sup ξ between x and x−cn u |f ′(ξ) − f ′ (x)| du = O(c2n (log n)r ). The result on σ̂ follows similarly to the derivations by Hansen (2008) by noting that σ̂ 2 (x) = ŝ(x) − m̂2 (x), where ŝ is the Nadaraya-Watson estimator for s(x) = E[Xj2 | Xj = x] based on the observation pairs (Xj−1, Xj2 ), j = 1, . . . , n. Towards the results in (ii) we treat only the first one since the others follow analogously. Note that by the mean value theorem m(Xi−1 ) − m(x) = (Xi−1 − x)m′ (x) + (Xi−1 − x)(m′ (ξXi−1 ,x ) − m′ (x)) for some ξXi−1 ,x between [min(Xi−1 , x), max(Xi−1 , x)], where the absolute value of the second summand can be bounded by (Xi−1 − x)2 (log n)r due to assumption (A2). It thus suffices to show   n Xi−1 − x 1 X K (Xi−1 − x)2 = OP (c2n ) sup cn |x|≤an ncn i=1   n Xi−1 − x 1 X K (Xi−1 − x)m′ (x) = OP (b∗n ). sup nc c n i=1 n |x|≤an The first relation is straightforward by assumption (A2) and applying Theorem 2 in Hansen (2008) with Yi = 1 and the kernel u 7→ K(u)u2 . For the latter one we receive with the same theorem applied with Yi = 1 and kernel u 7→ K(u)u   n h x − X  i 1 X x − Xi−1 i−1 sup K (x − Xi−1 ) − E K (x − Xi−1 ) cn cn |x|≤an ncn i=1  log n 1/2  = OP cn . ncn Further by direct calculation     Z n i x − Xi−1 1 x−y 1 X h E K (x − Xi−1 ) = K (x − y)fXi−1 (y)dy ncn i=1 cn cn cn Z Z 2 = cn K(z)zfXi−1 (x − zcn ))dz = O(cn z 2 K(z)dz sup |fX′ (x)|) = O(c2n (log n)r ) x∈I˜n where we utilize assumptions (A2) and (A5). The result (iii) can be proved in the same way as the results in (ii). Just set Yi = |εi | for the first and Yi = σ(Xi−1 )εi for the second relation (when applying Theorem 2 by Hansen, 2008) and note that i h x − X  i−1 (x − Xi−1 )σ(Xi−1 )εi = 0. E K cn ✷ 18 Lemma B.2 Under the assumptions of Theorem 3.2 we have Z (Sn(1,1) (t) − S̃n(1,1) (t))2 W (t) dt = oP (1), where n S̃n(1,1) (t)  1 X wn (Xj−1) cos(t0 εj ) − E[cos(t0 εj )] (Yj (t) − E[Yj (t)]). =√ n j=1 Proof. Due to (B.1) we have Sn(1,1) (t) = (1 + oP (1))(S̃n(1,1) (t) − Jn (t)Jn(1) (t) − Jn (t)Jn(2) (t)), where n   1 X wn (Xj−1) cos(t0 εj ) − E[cos(t0 εj )] Jn (t) = √ n j=1 Jn(1) (t) = n  1 X Yℓ (t) − E[Yℓ (t)] n ℓ=1 n Jn(2) (t) 1 1X Yℓ (t)(wn (Xℓ−1 ) − κ̂n ) . = n ℓ=1 κ̂n P Note that from assumption (A1) it follows that β > 2 and thus ∞ i=0 (i + 1)α(i) < ∞. From this, centeredness of the summands (under the null) and the boundedness of cosine analogously to the proof of Theorem 2 by Yokoyama (1980) one obtains E[(Jn (t))4 ] ≤ D (B.2) 1 (B.3) E[(Jn(1) (t))4 ] ≤ 2 D. n The constant D can be chosen independent of t due to the boundedness of the cosine function. Thus from the Cauchy Schwarz inequality we obtain directly hZ i 1 E (Jn (t)Jn(1) (t))2 W (t) dt = O( ). n Now note that n Jn(2) (t) 1X Yℓ (t)(wn (Xℓ−1 ) − E[wn (Xℓ−1 )]) = (1 + oP (1)) n ℓ=1 ! n n 1X 1X Yℓ (t) − (wn (Xj−1) − E[wn (Xj−1)]) n ℓ=1 n j=1 and thus by boundedness of Yℓ we have, uniformly with respect to t, n |Jn(2) (t)| 1X = OP (1) |wn (Xj−1 ) − E[wn (Xj−1 )]| = oP (1) n j=1 19 (B.4) by a consideration of the expectation of the sum due to the properties of the weight function. We obtain Z Z (2) 2 (Jn (t)Jn (t)) W (t) dt = oP (1) (Jn (t))2 W (t) dt = oP (1) by an application of (B.2). ✷ Lemma B.3 Under the assumptions of Theorem 3.2 we have Z (Sn(1,2) (t) − S̃n(1,2) (t))2 W (t) dt = oP (1), where n S̃n(1,2) (t) 1 X =√ wn (Xj−1 ) sin(t0 εj )t0 n j=1   σ̂ − σ m̂ − m (Xj−1) + εj (Xj−1 ) (Yj (t) − E[Yj (t)]). σ̂ σ̂ Proof. Due to (B.1) we have Sn(1,2) (t) = (1 + oP (1))(S̃n(1,2) (t) − t0 In (t)Jn(1) (t) − t0 In (t)Jn(2) (t)) (1) (2) with Jn and Jn as in Lemma B.2 and n 1 X wn (Xj−1 ) sin(t0 εj ) In (t) = √ n j=1   σ̂ − σ m̂ − m (Xj−1 ) + εj (Xj−1) . σ̂ σ̂ Now n √ 1 X a∗ |In (t)| ≤ √ (|εj | + 1)OP ( n ) = oP ( n) ∆n n j=1 uniformly with respect to t by assumption (A3) and Proposition B.1 (i). Thus Z Z (1) 2 (t0 In (t)Jn (t)) W (t) dt = oP (n) t20 (Jn(1) (t))2 W (t) dt = oP (1) by (B.3). Further, by (B.4) we obtain Z Z (2) 2 (t0 In (t)Jn (t)) W (t) dt = oP (1) t20 (In (t))2 W (t) dt = oP (1), where one yields the last equality as follows. Similarly to the proof of Lemma B.4 one can first replace the random denominators σ̂ fˆX in the definition of In by their true counterparts σfX R applying Proposition B.1. Let I˜n denote the resulting term, then E[ t20 (I˜n (t))2 W (t) dt] = O(1) is shown by straightforward calculations. ✷ 20 Lemma B.4 Under the assumptions of Theorem 3.2 we have Z  2 (1,2) (1,2,1) (1,2,2) S̃n (t) − S̃n (t) − S̃n (t) W (t) dt = oP (1), where S̃n(1,2,1) (t)   n n Xj−1 − Xi−1 wn (Xj−1)σ(Xi−1 )εi t0 X X 1 K sin(t0 εj ) = κ̂n n3/2 j=1 i=1 cn cn σ(Xj−1)fX (Xj−1) S̃n(1,2,2) (t) = t0 κ̂n n3/2 ×(Yj (t) − E[Yj (t)])   1 Xj−1 − Xi−1 wn (Xj−1)σ 2 (Xi−1 )(ε2i − 1) K sin(t0 εj )εj 2 (X c c 2σ )f (X ) n n j−1 X j−1 i=1 n X n X j=1 ×(Yj (t) − E[Yj (t)]) (1,2) Proof. Recall the definition of S̃n in Lemma B.3 and note that n t X wn (Xj−1 ) m − m̂ √0 sin(t0 εj ) (Xj−1 )(Yj (t) − E[Yj (t)]) κ̂n σ̂ n j=1 n fˆX m − m̂ t0 X wn (Xj−1 ) sin(t0 εj ) (Xj−1 ) (Xj−1 )(Yj (t) − E[Yj (t)]) + Rn(1) (t) = √ n j=1 κ̂n σ fX + Rn(2) (t) = S̃n(1,2,1) (t) + Rn(1) (t) + Rn(2) (t) + Rn(3) (t), where n Rn(1) (t) m̂ − m σ − σ̂ t0 X wn (Xj−1) sin(t0 εj ) (Xj−1) (Xj−1)(Yj (t) − E[Yj (t)]) = √ κ̂n σ̂ σ n j=1 n t0 X wn (Xj−1) m̂ − m fX − fˆX Rn(2) (t) = √ sin(t0 εj ) (Xj−1) (Xj−1)(Yj (t) − E[Yj (t)]) n j=1 κ̂n σ fX     Pn Xj−1 −Xi−1 1 n (m(X ) − m(X )) K X i−1 j−1 i=1 ncn cn wn (Xj−1) t0  √ sin(t0 εj )  Rn(3) (t) = fX (Xj−1 ) κ̂n n j=1 σ(Xj−1 ) ×(Yj (t) − E[Yj (t)])). By Proposition B.1 (i) one directly obtains that OP (n(a∗n /∆n )4 ) = oP (1). R (3) Concerning (Rn (t))2 W (t) dt notice that R (j) (Rn (t))2 W (t) dt for j = 1, 2 is of rate   n n X X 1 x − X t w (X ) i−1 0 n j−1 K (m(Xi−1 ) − m(x)) sup |Rn(3) (t)| ≤ D √ κ̂n n j=1 σ(Xj−1 )fX (Xj−1 ) |x|≤an ncn i=1 cn R (3) uniformly in t which together with assertion B.1 (ii) implies the rate (Rn (t))2 W (t) dt = OP (n(log n)4r (b∗n )2 ) = oP (1), where the latter equality follows from assumption (A7). 21 (1,2) Concerning the second term in the definition of S̃n in Lemma B.3 note that due to 2 2 σ̂ − σ = (σ̂ − σ )/(σ̂ + σ), analogous to before one shows that n t X wn (Xj−1 ) σ̂ − σ √0 sin(t0 εj )εj (Xj−1)(Yj (t) − E[Yj (t)]) n j=1 κ̂n σ̂ n (σ̂ 2 − σ 2 )fˆX t0 X wn (Xj−1 ) sin(t0 εj )εj (Xj−1 )(Yj (t) − E[Yj (t)]) + Rn(4) (t), = √ κ̂n 2σ 2 fX n j=1 R (4) where (Rn (t))2 W (t) dt = oP (1) now follows from Proposition B.1 (i). To treat the remaining term further we first insert the definition of σ̂ 2 and then use the fact that m2 − m̂2 = 2m(m − m̂) − (m − m̂)2 and insert the definition of m̂. With this one obtains n t X wn (Xj−1 ) (σ̂ 2 − σ 2 )fˆX √0 sin(t0 εj )εj (Xj−1 )(Yj (t) − E[Yj (t)]) κ̂n 2σ 2 fX n j=1 = S̃n(1,2,2) (t) + Rn(5) (t) + Rn(6) (t) + Rn(7) (t) + Rn(8) (t) − Rn(9) (t), where Rn(5) (t)   n n Xj−1 − Xi−1 wn (Xj−1 ) t0 X X 1 K sin(t0 εj )εj = 3/2 2 κ̂n n j=1 i=1 cn cn 2σ (Xj−1 )fX (Xj−1 ) Rn(6) (t) = Rn(7) (t) = Rn(8) (t) = Rn(9) (t) = t0 κ̂n n3/2 t0 κ̂n n3/2 ×(σ 2 (Xi−1 ) − σ 2 (Xj−1))(Yj (t) − E[Yj (t)])   n X n X wn (Xj−1 ) Xj−1 − Xi−1 1 K sin(t0 εj )εj 2 c cn 2σ (Xj−1 )fX (Xj−1 ) j=1 i=1 n ×(m2 (Xi−1 ) − m2 (Xj−1 ))(Yj (t) − E[Yj (t)])   n X n X 1 Xj−1 − Xi−1 wn (Xj−1) K sin(t0 εj )εj 2 c cn σ (Xj−1 )fX (Xj−1 ) j=1 i=1 n ×m(Xj−1 )(m(Xj−1 ) − m(Xi−1 ))(Yj (t) − E[Yj (t)])   1 wn (Xj−1) Xj−1 − Xi−1 K sin(t0 εj )εj 2 c cn σ (Xj−1 )fX (Xj−1 ) j=1 i=1 n t0 κ̂n n3/2 n X n X t0 κ̂n n3/2 n X n X ×σ(Xi−1 )εi (m(Xi−1 ) − m(Xj−1 ))(Yj (t) − E[Yj (t)])   wn (Xj−1 ) Xj−1 − Xi−1 1 K sin(t0 εj )εj 2 c c 2σ (X )f (X ) n n j−1 X j−1 j=1 i=1 ×(m(Xj−1 ) − m̂(Xj−1))2 (Yj (t) − E[Yj (t)]) R (j) (3) and one can show (Rn (t))2 W (t) dt = oP (1) completely analogous to the treatment of Rn (1) for j = 5, 6, 7, 8 and Rn for j = 9. ✷ 22 Lemma B.5 Under the assumptions of Theorem 3.2 we have Z (S̃n(1,2,1) (t) − S̄n(1,2,1) (t))2 W (t) dt = oP (1) Z (S̃n(1,2,2) (t) − S̄n(1,2,2) (t))2 W (t) dt = oP (1), where n S̄n(1,2,1) (t) t0 E[sin(t0 ε1 )] X √ = wn (Xj−1 )εj (E[Yj (t)|Xj−1] − E[Yj (t)]) n j=1 n S̄n(1,2,2) (t) t0 E[sin(t0 ε1 )ε1 ] X √ wn (Xj−1 )(ε2j − 1)(E[Yj (t)|Xj−1] − E[Yj (t)]). = 2 n j=1 Proof. We only prove the first assertion, the second one can be shown completely analogous. We have the expansion S̃n(1,2,1) (t) − S̄n(1,2,1) (t) = Un (t) + t0 E[sin(t0 ε1 )]Vn (t), where Un (t) = n n 1 XX n3/2 ϕ(t, εi , Xi−1 , ζj ) j=1 i=1 with ζj = (Xj−1 , . . . , Xj−k ), ϕ(t, εi , Xi−1 , ζj ) 1  Xj−1 − Xi−1  wn (Xj−1) = σ(Xi−1 )εi K sin(t0 εj )(Yj (t) − E[Yj (t)]) cn cn fX (Xj−1)σ(Xj−1 ) ! Z x − Xi−1  wn (x) 1 K E[sin(t0 ε1 )](E[Yj (t)|Xj−1 = x] − E[Yj (t)]) dx − cn cn σ(x) and n 1 X σ(Xi−1 )εi Vn (t) = √ n i=1 Z 1 x − Xi−1  wn (x)ψ(t, x) wn (Xi−1 )ψ(t, Xi−1)  dx K − cn cn σ(x) σ(Xi−1 ) with ψ(t, x) = E[Yi (t)|Xi−1 = x] − E[Yi (t)]. Straightforwardly we obtain negligibility of Vn by considering the expectation Z   E t20 Vn2 (t)W (t) dt Z Z Z 1 x − z  wn (x)ψ(t, x) wn (z)ψ(t, z)  2 2 2 K dx fX (z) dz W (t) dt. − = t0 σ (z) cn cn σ(x) σ(z) 23 Note that the inner integral is zero for z 6∈ In . We further separately consider the cases z ∈ Kn = [−an + cn C, an − cn C] and z ∈ In \ Kn to obtain Z   t20 Vn2 (t)W (t) dt E Z hZ Z 1 x − z  |ψ(t, x) − ψ(t, z)| 1 1  2 2 2 ≤ t0 dx K + − σ (z) cn cn σ(x) σ(x) σ(z) ×fX (z)I{z ∈ Kn } dz Z i Z 1 x − z  1 1  2 2 dx fX (z)I{z ∈ In \ Kn } dz W (t) dt K + + σ (z) cn cn σ(x) σ(z) = O((log n)5r (cn + cD n )) = o(1) by assumptions (A2) and (A4). R We will now prove E[ Un2 (t)W (t) dt] = o(1). To this end note that Z n n n n i 1 XXXX h E g(ξi1 , ξi2 , ξj1 , ξj2 ) , E[ Un2 (t)W (t) dt] = 3 n j =1 i =1 j =1 i =1 1 1 2 (B.5) 2 where ξi = (εi , ζi ) and g(ξi1 , ξi2 , ξj1 , ξj2 ) = Z ϕ(t, εi1 , Xi1 −1 , ζj1 )ϕ(t, εi2 , Xi2 −1 , ζj2 )W (t) dt We first consider the case where all indices i1 , j1 , i2 , j2 are different. Then the expectation is zero if either i1 or i2 is the largest index because E[εi ] = 0 and εi is independent of εj , Xi−1 , Xi−2 , . . . (for j 6= i). All other cases are treated similarly and thus we only discuss the case i1 < i2 < j1 < j2 in detail. We will apply a version of Lemma 2.1 by Sun and Chiang (1997) for multivariate random variables (see Su and Xiao’s (2008) Lemma D.1) in two separate subcases. First let i2 − i1 ≥ j1 − i2 . Denote by the process ξi∗ , i ∈ Z, an independent copy of ξi , i ∈ Z i. e. a process with the same distributional properties, but independent of the original data. Then E[g(ξi∗1 , ξi2 , ξj1 , ξj2 )] = 0 and, for δ > 0, i h 1+δ E g(ξi∗1 , ξi2 , ξj1 , ξj2 ) ≤ k1 sup σ 2+2δ (x) x∈[−an −Ccn ,an +Ccn ] ×E "Z × ≤ k2 × x∈[−an −Ccn ,an +Ccn ] σ −2−2δ (x)E[|ε1 |1+δ ] !1+δ 1 x − y K wn (x) dx fX (y) dy cn cn !1+δ # Z 1  Xj2 −1 − Xi2 −1  wn (Xj2 −1 ) 1  x − Xi2 −1  + K K wn (x) dx |εi2 |1+δ cn cn fX (Xj2 −1 ) cn cn 1  Xj1 −1 − y  wn (Xj1 −1 ) + K cn cn fX (Xj1 −1 ) sup σ 2+2δ (x) x∈[−an −Ccn ,an +Ccn ]  sup sup Z σ −2−2δ (x) sup x∈[−an −Ccn ,an +Ccn ] (fX (x)) x∈[−an −Ccn ,an +Ccn ] −1−δ +1  24 × c−δ n E " 1  Xj2 −1 − Xi2 −1  wn (Xj2 −1 ) +1 K cn cn fX (Xj2 −1 ) !1+δ |εi2 |1+δ # for some constants k1 , k2. This is of order O((log n)r̃ c−2δ n ) for r̃ = 5r(1 + δ) by assumptions (A2)–(A5). An application of the aforementioned inequality gives 1 n3 X i1 <i2 <j1 <j2 i2 −i1 ≥j1 −i2 h i E g(ξi1 , ξi2 , ξj1 , ξj2 ) = O((log n)r̃/(1+δ) ) = O 1 2δ/(1+δ) n3 cn n  (log n)5r  X 2δ/(1+δ) ncn ≤ o(1) ∞ X X i1 <i2 <j1 <j2 i2 −i1 ≥j1 −i2 (α(i2 − i1 ))δ/(1+δ) j(α(j))δ/(1+δ) j=1 βδ j 1− 1+δ = o(1) j=1 by assumptions (A1), (A3) and (A7). Here the mixing coefficient α of ξi , i ∈ Z, is the same as the mixing coefficient of Xi , i ∈ Z, see Fan and Yao (2003). In the subcase i2 − i1 < j1 − j2 we apply the same inequality but by considering E[g(ξi∗1 , ξi∗2 , ξj1 , ξj2 )] = 0 and obtain 1 n3 X i1 <i2 <j1 <j2 i2 −i1 ≥j1 −i2 h i E g(ξi1 , ξi2 , ξj1 , ξj2 ) = O((log n)r̃/(1+δ) ) = O 1 2δ/(1+δ) n3 cn n  (log n)5r  X 2δ/(1+δ) ncn X i1 <i2 <j1 <j2 i2 −i1 <j1 −i2 (α(j1 − i2 ))δ/(1+δ) j(α(j))δ/(1+δ) = o(1). j=1 For the case i1 = i2 we exemplarily consider the subcase i1 = i2 < j1 < j2 , other subcases are treated similarly. Note that E[g(ξi1 , ξi1 , ξj1 , ξj∗2 )] = 0 by the definition of ϕ(·), and E[|g(ξi1 , ξi1 , ξj1 , ξj∗2 )|1+δ ] = O((log n)r̃ c−2δ n ) as before. Thus we obtain 1 n3 X i1 <j1 <j2 h i E g(ξi1 , ξi1 , ξj1 , ξj2 ) = O((log n)r̃/(1+δ) ) = 1 X 2δ/(1+δ) n3 cn i1 <j1 <j2 n  (log n)5r  X O (α(j))δ/(1+δ) = 2δ/(1+δ) ncn j=1 (α(j2 − j1 ))δ/(1+δ) o(1). Finally, the cases where more than two indices in i1 , i2 , j1 , j2 are equal always lead to negligible terms by direct calculation. E. g. consider the term for j1 = i1 6= j2 = i2 in the sum (B.5). Applying assumption (A2) its absolute value can straightforwardly be bounded by n−1 O((log n)4r )(E[|ε1 |])2 K 2 (0)/c2n = o(1) by assumption (A7). The remaining terms are treated analogously. ✷ 25
10math.ST
Approximate FPGA-based LSTMs under Computation Time Constraints arXiv:1801.02190v1 [cs.CV] 7 Jan 2018 Michalis Rizakis, Stylianos I. Venieris, Alexandros Kouris, and Christos-Savvas Bouganis Dept. of Electrical and Electronic Engineering, Imperial College London {michail.rizakis14, stylianos.venieris10, a.kouris16, christos-savvas.bouganis}@imperial.ac.uk Abstract. Recurrent Neural Networks and in particular Long ShortTerm Memory (LSTM) networks have demonstrated state-of-the-art accuracy in several emerging Artificial Intelligence tasks. However, the models are becoming increasingly demanding in terms of computational and memory load. Emerging latency-sensitive applications including mobile robots and autonomous vehicles often operate under stringent computation time constraints. In this paper, we address the challenge of deploying computationally demanding LSTMs at a constrained time budget by introducing an approximate computing scheme that combines iterative low-rank compression and pruning, along with a novel FPGA-based LSTM architecture. Combined in an end-to-end framework, the approximation method’s parameters are optimised and the architecture is configured to address the problem of high-performance LSTM execution in time-constrained applications. Quantitative evaluation on a real-life image captioning application indicates that the proposed methods required up to 6.5× less time to achieve the same application-level accuracy compared to a baseline method, while achieving an average of 25× higher accuracy under the same computation time constraints. Keywords: LSTM, Low-Rank Approximation, Pruning, FPGAs 1 Introduction Recurrent Neural Networks (RNNs) is a machine learning model which offers the capability of recognising long-range dependencies in sequential and temporal data. RNN models, with the prevalence of Long Short-Term Memory (LSTMs) networks, have demonstrated state-of-the-art performance in various AI applications including scene labelling [1] and image generation [2]. Moreover, LSTMs have been successfully employed for AI tasks in complex environments including human trajectory prediction [3] and ground classification [4] on mobile robots, with more recent systems combining language and image processing in tasks such as image captioning [5] and video understanding [6]. Despite the high predictive power of LSTMs, their computational and memory demands pose a challenge with respect to deployment in latency-sensitive and power-constrained applications. Modern intelligent systems such as mobile robots and drones that employ LSTMs to perceive their surroundings often operate under time-constrained, latency-sensitive settings. In such scenarios, retrieving the best possible output from an LSTM given a constraint in computation II time may be necessary to ensure the timely operation of the system. Moreover, the requirements of such applications for low absolute power consumption, which would enable a longer battery life, prohibit the deployment of high-performance, but power-hungry platforms, such as multi-core CPUs and GPUs. In this context, reconfigurable computing in the form of Field-Programmable Gate Arrays (FPGAs) constitutes a promising target device that can combine customisation and reconfigurability to achieve high performance at a low power envelope. In this work, an approximate computing scheme along with a novel hardware architecture for LSTMs are proposed as an end-to-end framework to address the problem of high-performance LSTM execution in time-constrained settings. Our approach proposes an iterative approximation method that applies simultaneously low-rank compression and pruning of the LSTM model with a tunable number of refinement iterations. The iterative property enables our framework to (i) exploit the resilience of the target application to approximations, (ii) explore the trade-off between computational and memory load and application-level accuracy and (iii) run the LSTM under a time constraint with increasing accuracy as a function of computation time budget. At the hardware level, our system consists of a novel reconfigurable architecture mapped on an FPGA which exploits the inherent parallelism of the LSTM, parametrised with respect to the level of compression and pruning. By optimising the parameters of the approximation method, the proposed framework generates a system tailored to the target application, the available FPGA resources and the computation time constraints. 2 2.1 Background LSTM Model A vanilla RNN typically processes an input and generates an output at each time step. Internally, the network has recurrent connections from the output at one time step to the hidden units at the next time step which enables it to capture sequential patterns. The LSTM model differs from vanilla RNNs in that it comprises control units named gates, instead of layers. A typical LSTM has four gates. The input gate (Eq. (1)), along with the cell gate (Eq. (4)) are responsible for determining how much of the current input will propagate to the output. The forget gate (Eq. (2)) is responsible for determining whether the previous state of the LSTM will be forgotten or not, while the output gate (Eq. (3)) determines how much of the current state will be allowed to propagate to the final output of the LSTM at the current time step. Computationally, the gates are matrix-vector multiplication blocks, followed by a nonlinear elementwise activation function. The equations for the LSTM model are shown below: i(t) = σ(W ix x(t) + W ih h(t−1) ) f (t) (t) o (t) = σ(W f x x = σ(W ox x c(t) = f (t) (t) h =c (t) (t) (t−1) + W f hh + W oh h c(t−1) + i(t) o (t) (t−1) (1) ) (2) ) (3) tanh(W cx x + W ch h(t−1) ) (4) (5) III i(t) , f (t) and o(t) are the input, forget and output gates respectively, c(t) is the current state of the LSTM, h(t−1) is the previous output, x(t) is the current input at time t and σ(·) represents the sigmoid function. Eq. (5) is frequently found in the literature as h(t) = c(t) tanh(o(t) ) with tanh(·) applied to the output gate. In this work, we follow the image captioning LSTM proposed in [5] which removes the tanh(·) from the output gate and therefore we end up with Eq. (5). Finally, all the W matrices denote the weight matrices that contain the trainable parameters of the model, which are assumed to be provided. 3 Related Work The effectiveness of RNNs has attracted the attention of the architecture and reconfigurable computing communities. Li et al. [7] proposed an FPGA-based accelerator for the training of an RNN language model. In [8], the authors focus on the optimised deployment of the Gated Recurrent Unit (GRU) model [9] in data centres with server-grade FPGAs, ASICs, GPUs and CPUs and propose an algorithmic memoization-based method to reduce the computational load at the expense of higher memory consumption. The authors of [10] present an empirical study of the effect of different architectural designs on the computational resource, on-chip memory capacity and off-chip memory bandwidth requirements of an LSTM model. Finally, Guan et al. [11] proposed an FPGA-based LSTM accelerator optimised for speech recognition on a Xilinx VC707 FPGA platform. From an algorithmic perspective, recent works have followed a model-hardware co-design approach. Han et al. [12] proposed an FPGA-based speech recognition engine that employs a load-balance-aware compression scheme in order to compress the LSTM model size. Wang et al. [13] presented a method that addresses compression at several levels including the use of circulant matrices for three of the LSTM gates and the quantisation of the trained parameters, together with the corresponding ASIC-based hardware architecture. Zhang et al. [14] presented an FPGA-based accelerator for a Long-Term Recurrent Convolutional Network (LRCN) for video footage description that consists of a CNN followed by an LSTM. Their design focuses on balancing the resource allocation between the layers of the LRCN and pruning the fully-connected and LSTM layers to minimise the off-chip memory accesses. [12], [13] and [14] deviate from the faithful LSTM mapping of previous works but also require a retraining step in order to compensate for the introduced error of each proposed method. Finally, He et al. [15] investigated algorithmic strategies for CNN model selection under computation time constraints for both training and testing. Our work differs from the majority of existing efforts by proposing a hardware architecture together with an approximate computational method for LSTMs that is application-aware and tunable with respect to the required computation time and the application-level error. Our framework follows the same spirit as [12][13][14] by proposing an approximation to the model, but in contrast to these methods our scheme does not require a retraining phase for the model and assumes no access to the training set, while compensating for the induced error by means of iterative refinement, making it suitable for applications where the dataset is privacy-critical and the quality of the approximation improves as the time availability increases. IV 4 Methodology In this section, the main components of the proposed framework are presented (Fig. 1). Given an LSTM model with its set of weight matrices and a small application evaluation set, the proposed system searches for an appropriate approximation scheme that meets the application’s needs, by applying low-rank compression and pruning on the model. The design space is traversed by means of a roofline model to determine the highest performing configuration of the proposed architecture on the target FPGA. In this manner, the trade-off between computation time and application-level error is explored for different approximation schemes. The design point to be implemented on the device is selected based on user-specified requirements of the maximum computation time or applicationlevel error tolerance. Fig. 1. Design flow of the proposed framework 4.1 Approximations for LSTMs At the core of an LSTM’s computational workload lies the matrix-vector multiplications in each of the four gates. Neural networks have been extensively studied to have redundancy in terms of their trained parameters [16]. To reduce the computational demands of the LSTM, we propose an approximate computing scheme that enables the tuning between computational cost and applicationlevel accuracy. The proposed approach exploits the statistical redundancy of the LSTM by acting at two levels: (i) approximating the weight matrices with a low-rank, SVD-based decomposition and (ii) pruning the network by sparsifying the weight matrices based on an importance criterion of their elements. Low-rank approximation. Based on the set of LSTM equations (1)-(4), each gate consists of two weight matrices corresponding to the current input and previous output vectors respectively. In our scheme, we construct an augmented matrix by concatenating the input and output weight matrices as shown in Eq. (7). Similarly, we concatenate the input and previous output vectors (Eq. (6)) and thus the overall gate computation is given by Eq. (8). h iT T x̃(t) = x(t) h(t−1)T (6) V W i = [W ix W ih ] , ∀i ∈ [1, 4] (t) y i = nonlin(W i x̃ ), ∀i ∈ [1, 4] (7) (8) where nonlin(·) is either the sigmoid function σ(·) or tanh. In this way, a single weight matrix is formed for each gate, denoted by W i ∈ RR×C for the ith gate. We perform a full SVD decomposition on the four augmented matrices independently as W i = U i Σ i V Ti , ∀i ∈ [1, 4], where U i ∈ RR×R , Σ i ∈ RR×C gi = σ i ui v iT and V i ∈ RC×C and utilise a rank-1 approximation to obtain W 1 1 1 by keeping the singular vectors that correspond to the largest singular value. Pruning by means of network sparsification. The second level of approximation on the LSTM comprises the structured pruning of the connectivity between neurons. With each neural connection being captured as an element of the weight matrices, we express network pruning as sparsification applied on the augmented weight matrices (Eq. (7)). To represent a sparse LSTM, we introduce four binary mask matrices F i ∈ {0, 1}R×C , i ∈ [1, 4], with each entry representing whether a connection is pruned or not. Overall, we employ the following notation for a (weight, mask) matrix pair {W i , F i | i ∈ [1, 4]}. In the proposed scheme, we explore sparsity with respect to the connections per output neuron and constrain each output to have the same number of inputs. We cast the LSTM pruning to an optimisation problem of the following form. min ||W i − F i Fi f ij is W i ||22 , s.t. ||f ij ||0 = NZ, ∀i ∈ [1, 4], ∀j ∈ [1, n] (9) where the jth row of F i and NZ is the number of non-zero elements on each row of F i . || · ||0 is the l0 pseudo-norm denoting the number of non-zero entries in a vector. The solution to the optimisation problem in Eq. (9) is given by keeping the NZ elements on each row of W i with the highest absolute value and setting their indices to 1 in F i . In contrast to the existing approaches, the proposed pruning method does not employ a retraining step and hence removes the requirement for the training set, which is important for privacy-critical applications, as well as the computationally expensive step of retraining. Even though our sparsification method does not explicitly capture the impact of pruning on the application-level accuracy, our design space exploration, detailed in Section 5, searches over different levels of sparsity and as a result it explores the effect of pruning on the application. Hybrid compression and pruning. By applying both low-rank approximation and pruning, we end up with the following weight matrix approximation: f i = F i (σ i ui v iT ) W (10) 1 1 1 In this setting, for the ith gate the ranking of the absolute values in each row of i the rank-1 approximation σ1i ui1 v iT 1 depends only on v 1 , with each element of the i i vector σ1 u1 operating as a scaling factor for all elements of a row. Therefore, for the ith gate all the rows of F i become identical and hence can be represented by a single mask vector f i ∈ {0, 1}C . This leads to a weight matrix with zeros along n−NZ of its columns, which is described by the following expression: VI f i = σ i ui (f i W 1 1 v iT 1 ) (11) Nsteps ỹ i = X n i(n) i(n)  σ1 u1 (f i(n) i(n) T v1 ) x̃(t) o (12) n=1 In order to obtain a refinement mechanism, we propose an iterative algorithm, presented in Algorithm 1, that employs both the low-rank approximation and pruning methods to progressively update the weight matrix. On lines 4-6 the first approximation of the weight matrix is constructed by obtaining the rank-1 approximation of the original matrix and applying pruning in order to have NZ non-zero elements on each row, as in Eq. (11). Next, the weight matrix is refined for Nsteps iterations, by computing the error matrix E (line 10) and employing its pruned, rank-1 approximation as our update (line 15). Algorithm 1 Iterative LSTM Model Approximation Inputs: 1: Weight matrices W i ∈ RR×C , ∀i ∈ [1, 4] 2: Number of non-zero elements, NZ 3: Number of refinement steps, Nsteps Steps: 1: - - For all gates - 2: for i = 1 to 4 do 3: i matrix approximation - h- - Initialise weight i(0) i(0) i(0) = SVD(W i )1 4: u1 , σ 1 , v 1 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: i(0) f i(0) ← solution to Eq. (9) for vector v 1 T  i(0) i(0) i(0) f (0) f i(0) v W =σ u i 1 1 1 - - Apply refinements - for n = 1 to Nsteps do - - Compute error matrix - f (0) E = Wi − W i -h - Compute refinement -i i(n) i(n) i(n) = SVD(E)1 u1 , σ1 , v 1 i(n) f i(n) ← solution to optimisation problem (9) for vector v 1 - - Update weight matrix approximation -  T i(n) i(n) i(n) f i(n) = W f (n−1) W +σ u f i(n) v i 15: 1 1 1 16: end for 17: end for Notes: (i) SVD(X)1 returns the rank-1 SVD-based approximation of X. Different combinations of levels of sparsity and refinement iterations correspond to different design points in the computation-accuracy space. In this respect, the number of non-zero elements in each binary mask vector and the number of iterations are exposed to the design space exploration as tunable parameters (NZ, Nsteps ) to explore the LSTM computation-accuracy trade-off. VII 4.2 Architecture The proposed FPGA architecture for LSTMs is illustrated in Fig. 2. The main strategy of the architecture includes the exploitation of the coarse-grained parallelism between the four LSTM gates and is parametrised with respect to the fine-grained parallelism in the dot product and elementwise operations of the LSTM, allowing for a compile-time tunable performance-resource trade-off. SVD and Binary Masks Precomputation. In Algorithm 1, the number of refinement iterations (Nsteps ), the level of sparsity (NZ) and the trained weight matrices are data-independent and known at compile time. As such, the required SVD decompositions along with the corresponding binary masks are precomputed for all Nsteps iterations at compile time. As a result, the singular values i(n) i(n) i(n) σ1 , the vectors u1 and only the non-zero elements of the sparse f i(n) v 1 are stored in the off-chip memory, so that they can be looked-up at run time. Fig. 2. Diagram of proposed hardware architecture Inter-gate and Intra-gate Parallelism. In the proposed architecture, each gate is allocated a dedicated hardware gate unit with all gates operating in parallel. At each LSTM time-step t, a hardware gate unit is computing its output by performing Nsteps refinement iterations as in Eq. (12). At the beginning of the time-step, the current vector x̃(t) is stored on-chip as it will be reused in each i(n) i(n) iteration by all four gates. The vectors u1 and v 1 for each gate, along with i(n) their singular values σ1 , are streamed in the architecture from the off-chip i(n) i(n) memory in a tiled manner. u1 and v 1 are tiled with tile sizes of Tr and Tc C R respectively, leading to Tr and Tc tiles sequentially streamed in the architecture. At each gate, a dot product unit is responsible for computing the dot product i(n) of the current tile of v 1 with the corresponding elements of the input x̃(t) . The i(n) dot product unit is unrolled by a factor of Tc in order to process one tile of v 1 C per cycle. After accumulating the partial results of all the Tc tiles, the result is i(n) produced and multiplied with the scalar σ1 . The multiplication result is passed i(n) as a constant operand in a multiplier array, with u1 as the other operand. The i(n) multiplier array has a size of Tr in order to match the tiling of u1 . As a final stage, an array of Tr accumulators performs the summation across the Nsteps iterations, as expressed in Eq. (12) to produce the final gate output. The outputs from the input, forget and output gates are passed through a sigmoid unit while the output of the cell gate is passed through a tanh unit. After VIII the nonlinearities stage, the produced outputs are multiplied element-by-element as dictated by the LSTM equations to produce the cell state c(t) (Eq. (4)) and the current output vector h(t) (Eq. (5)). The three multiplier arrays and the one adder array all have a size of Tr to match the tile size of the incoming vectors and exploit the available parallelism. 5 Design Space Exploration Having parametrised the proposed approximation method over NZ and Nsteps and its underlying architecture over NZ and tile sizes (Tr , Tc ), corresponding metrics need to be employed for exploring the effects of each parameter on performance and accuracy. The approximation method parameters are studied based on an application-level evaluation metric (discussed in Section 5.2), that measures the impact of each applied approximation on the accuracy of the target application. In terms of the hardware architecture, roofline performance modelling is employed for exhaustively exploring the design space formed by all possible tile size combinations, to obtain the highest performing design point (discussed in Section 5.1). Based on those two metrics, the computation timeaccuracy trade-off is explored. 5.1 Roofline Model The design space of architectural configurations for all tile size combinations of Tr and Tc is explored exhaustively by performance modelling. The roofline model [17] is used to develop a performance model for the proposed architecture by relating the peak attainable performance (in terms of throughput) for each configuration on a particular FPGA device with its operational intensity, which relates the ratio of computational load to off-chip memory traffic. Based on this model, each design point’s performance can be bounded either by the peak platform throughput or by the maximum performance that the platform’s memory system can support. In this context, roofline models are developed for predicting the maximum attainable performance for varying levels of pruning (NZ). Given a tile size pair, the performance of the architecture is calculated as: P erf (ops/s) = 4Nsteps (2N Z + 2R + 1) + 37R workload(ops/input) = (13) II(cycles/input) max(Nsteps max( TRr , NTcZ ), 37 TRr ) where each gate performs 2N Z+2R+1 operations per iteration and 37R accounts for the rest of the operations to produce the final outputs. The initiation interval (II) is determined based on the slowest between the gate stage and the rest of the computations. Similarly, a gate’s initiation interval depends on the slowest between the dot product unit and the multiplier array (Fig. 2). Respectively, the operational intensity of the architecture, also referred to in the literature as Computation-to-Communication ratio (CTC), is formulated as: CT C(ops/byte) = 4Nsteps (2N Z + 2R + 1) + 37R operations(ops) = (14) mem access(bytes) 4(4Nsteps (N Z + R + 1) + 2R) where the memory transfers include the singular vectors and the singular value for each iteration of each gate and the write-back of the output and the cell state IX vectors to the off-chip memory. The augmented input vector x̃(t) is stored onchip in order to be reused across the Nsteps iterations. All data are represented with a single-precision floating-point format and require four bytes. The number of design points allows enumerating all possible tile size combinations for each number of non-zero elements and obtaining the performance and CTC values for the complete design space. Based on the target platform’s peak performance, memory bandwidth and on-chip memory capacity, the subspace containing the platform-supported design points can be determined. The proposed architecture is implemented by selecting the tile sizes (Tr , Tc ) that correspond to the highest performing design point within that subspace. 5.2 Evaluating the Impact of Approximations on the Application The proposed framework requires a metric that would allow us to measure the impact of the applied approximations on the application-level accuracy for different (NZ, Nsteps ) pairs. In our methodology, the error induced by our approximation methods is measured by running the target application end-to-end over an evaluation set with both our approximated weight matrices given a selected (NZ, Nsteps ) pair and with the original pretrained LSTM, acting as a reference model. By treating the output of the reference model as the ground truth, an application-specific metric is employed that assesses the quality of the output that was generated by the approximate model, exploring in this way the relationship between the level of approximation and the application-level accuracy. 6 Evaluation The image captioning system presented by Vinyals et al. [5] (winner of the 2015 MSCOCO challenge) is examined as a case study for evaluating the proposed framework. Input images are encoded by a CNN and fed to a trained LSTM model to predict corresponding captions. In the proposed LSTM, each gate consists of two R×R weight matrices, leading to a (R×C) augmented weight matrix per gate with R = 512 and C = 2R for a total of 2.1 M parameters. To determine the most suitable approximation scheme, we use a subset of the validation set of the Common Objects in Context (COCO) dataset1 , consisting of 35 images. To obtain image captions that will act as ground truth for the evaluation of the proposed approximation method, the reference image captioning application is executed end-to-end over the evaluation set, using TensorFlow2 . As a metric of the effect of low-rank approximation and pruning applied on the LSTM model, we select Bi-lingual Evaluation Understudy (BLEU) [18], which is commonly employed for the evaluation of machine translation’s quality by measuring the number of matching words, or “blocks of words”, between a reference and a candidate translation. Due to space limitations, more information about adopting BLEU as a quality metric for image captioning can be found in [5]. 1 2 http://cocodataset.org https://www.tensorflow.org X Experimental Setup. In our experiments, we target the Xilinx Zynq ZC706 board. All hardware designs were synthesised and placed-and-routed with Xilinx Vivado HLS and Vivado Design Suite (v17.1) with a clock frequency of 100 MHz. Single-precision floating-point representation was used in order to comply with the typical precision requirements of LSTMs as used by the deep learning community. Existing work [7][12] has studied precision optimisation in specific LSTM applications, which constitutes a complementary method to our framework as an additional tunable parameter for the performance-accuracy trade-off. Baseline Architecture. A hardware architecture of a faithful implementation of the LSTM model is implemented to act as a baseline for the proposed system’s evaluation. This baseline architecture consists of four gate units, implemented on parallel hardware, that perform matrix-vector multiplication in a tiled manner. Parametrisation with respect to the tiling along the rows (Tr ) and columns (Tc ) of the weight matrices is applied to this architecture and roofline modelling is used to obtain the highest performing configuration (Tr , Tc ), similarly to the proposed system’s architecture (Fig. 3). The maximum platform-supported attainable performance was obtained for Tr = 2 and Tc = 1, utilising 308 DSPs (34%), 69 kLUTs (31%), 437 kFFs (21%) and 26 18kbit BRAMs (2%). As Fig. 3 demonstrates, the designs are mainly memory bounded and as a result not all the FPGA resources are utilised. To obtain the application-level accuracy of the baseline design under time constrained scenarios, the BLEU of the intermediate LSTM’s output at each tile step of Tr is examined (Fig. 4). Fig. 3. Roofline model of the proposed and baseline architectures on the ZC706 board 6.1 Comparisons at Constrained Computation Time This section presents the gains of using the proposed methodology compared to the baseline design under computation time constraints. This is investigated by exploring the design space, defined by (NZ, Tr , Tc ), in terms of (i) performance (Fig. 3) and (ii) the relationship between accuracy and computation time (Fig. 4). As shown in Fig. 3, as the level of pruning increases and NZ becomes smaller, the computational and memory load per refinement iteration becomes smaller and the elementwise operations gradually dominate the computational intensity (Eq. (14)), with the corresponding designs moving to the right of the XI roofline graph. With respect to the architectural parameters, as the tiling parameters Tr and Tc increase, the hardware design becomes increasingly unrolled and moves towards the top of the roofline graph. In all cases, the proposed architecture demonstrates a higher performance compared to the baseline design reaching up to 3.72× for a single non-zero element with an average of 3.35× (3.31× geo. mean) across the sparsity levels shown in Fig. 3. Fig. 4. BLEU scores over time for all methods To evaluate our methodology in time-constrained scenarios, for each sparsity level the highest performing design of the roofline model is implemented. Fig. 4 shows the achieved BLEU score of each design over the evaluation set with respect to runtime, where higher runtime translates to higher number of refinements. In this context, for the target application the design with 512 nonzero elements (50% sparsity) achieves the best trade-off between performance per refinement iteration and additional information obtained at each iteration. The highest performing architecture with NZ of 512 has a tiling pair of (32, 1) and the implemented design consumes 862 DSPs (95%), 209 kLUTs (95%), 437 kFFs (40%) and 34 18kbit BRAMs (3%). In the BLEU range between 0.4 and 0.8, our proposed system reaches the corresponding BLEU decile up to 6.51× faster with an average speedup of 4.19× (3.78× geo. mean) across the deciles. As demonstrated in Fig. 4, the highest performing design of the proposed method (NZ=512) constantly outperforms the baseline architecture in terms of BLEU score at every time instant up to 2.7 ms, at which a maximum BLEU value of 0.9 has been achieved by both methods. As a result, given a specific time budget below 2.7 ms, the proposed architecture achieves a 24.88× higher BLEU score (geo. mean) compared to the baseline. Moreover, the proposed method demonstrates significantly higher application accuracy during the first 1.5 ms of the computation, reaching up to 31232× higher BLEU. In this respect, our framework treats a BLEU of 0.9 and a time budget of 2.7 ms as switching points to select between the baseline and the architecture that employs the proposed approximation method and deploys the highest performing design for each case. 7 Conclusion The high-performance deployment of LSTMs under stringent computation time constraints poses a challenge in several emerging applications. This paper presents a framework for mapping LSTMs on FPGAs in such scenarios. The proposed methodology applies an iterative approximate computing scheme in order to XII compress and prune the target network and explores the computation timeaccuracy trade-off. A novel FPGA architecture is proposed that is tailored to the degree of approximation and optimised for the target device. This formulation enables the co-optimisation of the LSTM approximation and the architecture in order to satisfy the application-level computation time constraints. Potential future work would include the precision optimisation of the LSTM in order to explore its complementary effect on the performance-accuracy trade-off. 8 Acknowledgements The support of the EPSRC Centre for Doctoral Training in High Performance Embedded and Distributed Systems (HiPEDS, Grant Reference EP/L016796/1) is gratefully acknowledged. This work is also supported by EPSRC grant 1507723. References 1. W. Byeon, T. M. Breuel, F. Raue, and M. Liwicki, “Scene Labeling with LSTM Recurrent Neural Networks,” in CVPR, 2015, pp. 3547–3555. 2. K. Gregor, I. Danihelka, A. Graves, D. Rezende, and D. Wierstra, “DRAW: A Recurrent Neural Network For Image Generation,” in ICML, 2015, pp. 1462–1471. 3. A. Alahi, K. Goel, V. Ramanathan, A. Robicquet, L. Fei-Fei, and S. Savarese, “Social LSTM: Human Trajectory Prediction in Crowded Spaces,” in CVPR, 2016. 4. S. Otte et al., “Recurrent Neural Networks for Fast and Robust Vibration-based Ground Classification on Mobile Robots,” in ICRA, 2016, pp. 5603–5608. 5. O. Vinyals, A. Toshev, S. Bengio, and D. Erhan, “Show and Tell: Lessons Learned from the 2015 MSCOCO Image Captioning Challenge,” TPAMI, pp. 652–663, 2017. 6. J. Donahue et al., “Long-Term Recurrent Convolutional Networks for Visual Recognition and Description,” TPAMI, vol. 39, no. 4, pp. 677–691, 2017. 7. S. Li, C. Wu, H. Li, B. Li, Y. Wang, and Q. Qiu, “FPGA Acceleration of Recurrent Neural Network Based Language Model,” in FCCM, 2015, pp. 111–118. 8. E. Nurvitadhi et al., “Accelerating Recurrent Neural Networks in Analytics Servers: Comparison of FPGA, CPU, GPU, and ASIC,” in FPL, 2016, pp. 1–4. 9. J. Chung et al., “Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling,” in NIPS Workshop on Deep Learning, 2014. 10. A. X. M. Chang and E. Culurciello, “Hardware Accelerators for Recurrent Neural Networks on FPGA,” in ISCAS, 2017, pp. 1–4. 11. Y. Guan, Z. Yuan, G. Sun, and J. Cong, “FPGA-based Accelerator for Long ShortTerm Memory Recurrent Neural Networks,” in ASP-DAC, 2017, pp. 629–634. 12. S. Han et al., “ESE: Efficient Speech Recognition Engine with Sparse LSTM on FPGA,” in FPGA, 2017, pp. 75–84. 13. Z. Wang, J. Lin, and Z. Wang, “Accelerating Recurrent Neural Networks: A Memory-Efficient Approach,” TVLSI, vol. 25, no. 10, pp. 2763–2775, oct 2017. 14. X. Zhang et al., “High-Performance Video Content Recognition with Long-Term Recurrent Convolutional Network for FPGA,” in FPL, 2017, pp. 1–4. 15. K. He and J. Sun, “Convolutional Neural Networks at Constrained Time Cost,” in CVPR, 2015. 16. M. Denil, B. Shakibi, L. Dinh, M. A. Ranzato, and N. de Freitas, “Predicting Parameters in Deep Learning,” in NIPS, 2013, pp. 2148–2156. 17. S. Williams et al., “Roofline: An Insightful Visual Performance Model for Multicore Architectures,” Communications of the ACM, vol. 52, no. 4, pp. 65–76, 2009. 18. K. Papineni, S. Roukos, T. Ward, and W.-J. Zhu, “BLEU: A Method for Automatic Evaluation of Machine Translation,” in ACL, 2002, pp. 311–318.
1cs.CV
arXiv:math/0702116v2 [math.NA] 10 Dec 2008 A Direct Matrix Method for Computing Analytical Jacobians of Discretized Nonlinear Integro-differential Equations Kevin T. Chua,b a Vitamin D, Inc., Menlo Park, CA 94025 b Institute of High Performance Computing, A*STAR, Singapore, Singapore In this pedagogical article, we present a simple direct matrix method for analytically computing the Jacobian of nonlinear algebraic equations that arise from the discretization of nonlinear integro-differential equations. The method is based on a formulation of the discretized equations in vector form using only matrix-vector products and componentwise operations. By applying simple matrix-based differentiation rules, the matrix form of the analytical Jacobian can be calculated with little more difficulty than that required when computing derivatives in single-variable calculus. After describing the direct matrix method, we present numerical experiments demonstrating the computational performance of the method, discuss its connection to the Newton-Kantorovich method, and apply it to illustrative 1D and 2D example problems. MATLAB code is provided to demonstrate the low code complexity required by the method. Keywords: analytical Jacobian; numerical methods; matrix calculus; Newton’s method; integro-differential equations 1. Introduction Many numerical methods for solving nonlinear integro-differential equations require computation of the Jacobian for the system of algebraic equations that arises when the continuous problem is discretized. For example, any Newton’s method calculation requires computation of the Jacobian (exactly or approximately) during each Newton iteration [ 28, 29]. Unfortunately, calculation of the Jacobian can be a time-consuming and errorprone procedure for both the computer and the scientific programmer. In this pedagogical article, we present a simple direct matrix method for calculating analytical Jacobians of discretized, nonlinear integro-differential equations. The direct matrix method produces the Jacobian for the discretized equations directly in matrix form without requiring calculation of individual matrix elements. The essential idea is to first write the discretized, integro-differential equation explicitly in terms of discrete operators (e.g., differentiation and quadrature matrices [ 8, 22, 41]) and then use simple matrix -based differentiation rules to calculate the Jacobian directly [ 10, 12, 13, 15]. The 1 2 K. T. Chu key observation underlying this approach is that there is a tremendous amount of structure in the nonlinear algebraic equations that arise from the discretization of nonlinear integrodifferential equations. By taking advantage of this structure, the calculation of analytical Jacobians is reduced to nearly the level of complexity required to compute derivatives of scalar, single variable functions. The operator-based approach of expressing and analyzing discretized differential equations has been used implicitly by the scientific computing community for decades, especially in the context of the Newton-Kantorovich and related methods [ 6, 7, 30]. However, a direct matrix approach seems to have been first formally described in one place by Chen who presented a collection of rules formulated in terms of specially defined matrix products [ 10, 12, 13]. In addition to using the method to solve nonlinear partial differential equations [ 12, 14], Chen used his formulation of the method to develop several interesting theoretical results (e.g., stability analysis of numerical methods for nonlinear time-dependent problems) based on the observation that when a nonlinear differential equation only has polynomial nonlinearities, there is a very close relationship between the discretized nonlinear differential equation and its Jacobian [ 10, 11]. Mathematically, the present formulation of the direct matrix method is equivalent to Chen’s approach. However, rather than introducing special matrix products, we rely solely on standard linear algebra operations augmented by component-wise operations (e.g., the Hadamard or Schur product [ 25]). In addition, we have chosen to use MATLAB notation in our formulation because of its prevalence in modern scientific computing. Working in MATLAB notation has the added benefit of making it almost trivial to translate the analytical calculations into working numerical code1 . Another feature of our formulation, which is also present to some extent in [ 10], is the emphasis on the analogy between calculation of Jacobians for discretized, nonlinear integro-differential equations and calculation of derivatives for scalar functions of a single variable. To help strengthen the analogy with single-variable calculus, we organize the operations required to compute a Jacobian as a short list of simple differentiation rules. This article is organized as follows. In the remainder of this section, we compare the direct matrix method with several common methods for computing Jacobians. In Section 2, we present the direct matrix method, including a discussion of its computational performance and its relation to the Newton-Kantorovich method. Finally, in Section 3, we apply the direct matrix method to two examples (one 1D and one 2D) from the field of electrochemical transport. To demonstrate the low code complexity required by the direct matrix method, MATLAB code for the example problems is provided in the appendices. Throughout our discussion, we will focus solely on collocation methods where the continuous and discrete forms of the integro-differential equation have essentially the same structure. However, it is important to recognize that the direct matrix method can also be used for Galerkin methods by applying it directly to the weak-form of the problem. 1.1. Comparison with Common Methods for Computing Jacobians One common approach for obtaining the Jacobian of a discretized, nonlinear integrodifferential equation is to compute it numerically using finite differences of the grid func1 With today’s powerful desktop and laptop computers, MATLAB is quite capable of handling moderatesized production work. Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 3 tion or expansion coefficient values [ 28, 29]. Unfortunately, numerical computation of the Jacobian can be time consuming for some problems. Depending on the numerical method, it might be possible to reduce the computational cost of a numerical Jacobian by taking advantage of the sparsity pattern in the Jacobian [ 19, 20, 29], but determining the sparsity pattern can be complicated for nontrivial problems. As an example, consider the Poisson-Nernst-Planck equations for electrochemical transport [ 4, 17, 36]: ∂c+ = ∇ · (∇c+ + c+ ∇φ) ∂t ∂c− = ∇ · (∇c− − c− ∇φ) ∂t ǫ∇2 φ = − (c+ − c− ) , (1) (2) (3) where c± are cation and anion concentrations, respectively, and φ is the electric potential, and ǫ is a dimensionless physical parameter related to the dielectric constant of the electrolyte. The first two of these are the Nernst-Planck equations for ion transport and are simply conservation laws for cations and anions [ 33, 36]. The last equation is the Poisson equation [ 27], which provides closure for the Nernst-Planck equations. Note that in (3), the local charge density has been written in terms of the individual ions, which are the only source of charge density in many electrochemical systems. (1) – (3) form a nonlinear parabolic system of partial differential equations, which suggests that we use an implicit time-stepping scheme to numerically solve the equations. This choice, however, requires (n+1) that at time tn+1 , we solve a nonlinear system of equations for c± which depends on (n+1) an auxiliary variable φ which is in turn related to c± through the Poisson equation. Note that in order to numerically compute the Jacobian for the resulting nonlinear system (n+1) of equations for c± , we must solve the Poisson equation for each perturbation to the (n+1) current iterate of c± . Therefore, for a pseudospectral discretization of (1) – (3) using N grid points, numerically computing the Jacobian requires O(N 4 ) operations, which is much higher than the O(N 2 ) elements in the Jacobian2 . Using an analytical Jacobian is one way to avoid the computational cost associated with numerical Jacobians. In principle, it is straightforward to derive the analytical Jacobian for the system of algebraic equations that arises when a nonlinear integro-differential equation is discretized. Index notation (also known as tensor notation) is perhaps the most common technique used to calculate analytical Jacobians. The basic idea behind the index notation method is to write the discretized form of the differential equation using index notation and then use tensor calculus to compute individual matrix elements in the Jacobian. For example, for a finite-difference or pseudospectral discretization, the discretized equations can be written in the form: Fi (u1 , u2, . . . , uN ) = 0 (4) for i = 1, 2, . . . , N where ui and Fi are the value of the solution and the discretized differential equation at the i-th grid point (or more generally, the i-th collocation point). 2 While low-order discretization of the equations do not show this same disparity in the computation time and the number of elements (requiring O(N 2 ) operations for O(N 2 ) elements), they typically require many more grid points to produce an accurate solution. 4 K. T. Chu Boundary conditions are included in this formulation by using the discretized boundary conditions (rather than the integro-differential equation) at grid points on the boundary (or immediately adjacent to if no grid points reside on the boundary)3 . The ij-th element of the Jacobian, J, for (4) is simply the partial derivative of Fi with respect to uj : Jij = ∂Fi /∂uj . While simple and straightforward, index notation suffers from the disadvantage of being somewhat tedious and error-prone. The main challenge in using index notation is keeping track of all of the indices when writing out and computing partial derivatives of the discrete equations. Automatic differentiation [ 24, 26] offers an important alternative when exact Jacobians are desired. Because it generates code for computing the Jacobian directly from the code used to evaluate the residual, automatic differentiation completely eliminates the possibility of human error when deriving the exact Jacobian and implementing it in code. Recent developments have made automatic differentiation available in several common programming languages (including MATLAB [ 37]). While useful, automatic differentiation still takes some effort to use and may not always generate the most compact, efficient code. Active development in this area will certainly continue to improve the usability of automatic differentiation software and the performance of generated code. The direct matrix method has several advantages over the methods discussed in this section. First, the direct matrix method yields a more accurate Jacobian than finite differences and generally in less time (see Section 2.4). Second, because the method is based on simple differentiation rules, the calculation is straightforward and less prone to error than the index notation approach. The differentiation rules also make it easier to calculate the Jacobian for differential equations which depend on auxiliary variables, such as (1) – (3). From a programming perspective, calculation of the Jacobian directly in matrix form facilitates implementation of numerical methods for nonlinear problems in languages that have built-in support for matrix and vector operations (e.g., MATLAB and Fortran 95). Finally, having the Jacobian available in matrix form can be useful for analyzing properties of numerical methods [ 10]. While it may be possible to to convert the element-wise representation of the Jacobian derived using index notation for simple problems, this step can be challenging for more complex problems4 . 2. The Direct Matrix Method There are two basic ideas underlying the direct matrix method for calculating analytical Jacobians of discretized, integro-differential equations. First, rather than writing the discretized, integro-differential equations at each of the collocation points in terms of individual elements of the solution vector, we write the entire system of equations as a single vector equation expressed explicitly in terms of matrix-vector products and componentwise multiplication (e.g., Hadamard products). Second, the analytical Jacobian for the discretized system of equations is computed directly in matrix form by using simple differ3 Care must be exercised when imposing boundary conditions, especially when using pseudospectral methods [ 23]. 4 Interestingly, the conversion from element-wise to matrix representation of the Jacobian often reveals the close relationship between the Jacobian for the discrete equations and the underlying structure of the original integro-differential equation. Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 5 entiation rules that are reminiscent of those used to compute derivatives in single-variable calculus. In this section, we develop both of these ideas in detail. Towards the end of the section, we comment on the computational performance of the direct matrix method and its relationship to the Newton-Kantorovich method [ 8]. 2.1. Matrix-vector Representation of Discretized Equations Writing the discretized, nonlinear integro-differential equation explicitly in terms of basic linear algebra and component-wise algebraic operations is the initial step of the direct matrix method. Because of the similarities in the structure between the discrete and continuous forms of the equations, the procedure is very straightforward. First, convert all differentiation and integration operators into their discrete analogues. Since both of these operations are linear, they become multiplication of vectors representing grid functions by differentiation and quadrature matrices, respectively: Z du → D ∗ û dx (5) udx → Q ∗ û, (6) where the hat accent indicates a discretized field variable and D and Q are the differentiation and quadrature matrices associated with the choice of computational grid. Next, convert all point-wise algebraic operations and function evaluations in the continuous equations to component-wise algebraic operations and function evaluations in the discrete equations. Some examples of the conversion process include: dv dx sin(u) u2 exp(u) u → û .∗ (D ∗ v̂) → sin(û) → û.∧ 2 → exp(û). (7) (8) (9) (10) In these examples, we have adopted the MATLAB convention of using .op to represent component-wise application of the op operation. Also, note that we have abused notation for component-wise function evaluations – f (û) represents the vector (f (û1 ), f (û2), . . . , f (ûN )) (11) not an arbitrary vector function of the entire solution vector û. Throughout our discussion, we will indicate component-wise and general functions of û by using lowercase and uppercase variables, respectively. 2.1.1. Differential and Integral Operators in Multiple Space Dimensions It is important to emphasize that the matrix-vector representation is not restricted to scalar field equations or functions of a single variable. Handling vector equations is simple – vector equations may be treated as systems of equations and vector operations may be expressed in component-wise form. The construction of differential and integral operators for functions of multiple variables is slightly more complicated but straightforward. First, we represent grid functions as a 6 K. T. Chu y (3,2) (3,2) (3,3) (3,4) (2,1) (2,2) (2,3) (2,4) (1,1) (1,2) (1,3) (1,4) x Figure 1. Example of a 2d grid with four grid points in the x-direction and three grid points in the y-direction. 1D vector by selecting an ordering of the grid points. Then, we derive the differentiation and integration matrices associated with this choice of ordering. While there is no unique mapping from a multi-dimensional grid to a 1D vector, it is important to choose the ordering of the grid points carefully because it directly affects the ease with which differentiation and integration matrices can be derived. For problems on logically rectangular computational domains, the computational grid may be constructed as a Cartesian product of one-dimensional grids [ 41]. The result is a structured grid (possibly non-uniform depending on the discretization in each coordinate direction). To represent a grid function as a 1D vector, the most natural way to flatten the grid is by using a lexicographic order for the grid indices. For example, on the small 3 by 4 Cartesian grid in Figure 1, we could order the grid function, û, one row at a time: û = (û11 , û12 , û13 , û14 , û21 , û22 , û23 , û24 , û31 , û32 , û33 , û34 )T (12) where ûij is the value of u at (xi , yj ). With this choice of ordering, discrete partial derivative operators are given as Kronecker product of the differentiation matrices with identity matrices [ 41]. For the example in Figure 1, the partial differentiation matrices are Dx = I3 ⊗ D4 Dy = D3 ⊗ I4 (13) (14) where Dn and In are the 1d differentiation and identity matrices of size n and ⊗ denotes the Kronecker product. Note that care must be taken to ensure that the order of the Kronecker products is consistent with the ordering of the grid function vector. To illustrate these ideas, let us consider the discretized forms of the curl and divergence ~ . Once we have chosen an ordering of the grid points and derived the of a vector field, U corresponding partial differentiation matrices Dx , Dy , and Dz , the discrete curl operator may be easily written as   Dy ∗ Uz − Dz ∗ Uy  Dz ∗ Ux − Dx ∗ Uz  , (15) Dx ∗ Uy − Dy ∗ Ux Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 7 ~ . The discrete divergence operator is also where Ux , Uy , and Uz are the components of U straightforward to derive: Dx ∗ Ux + Dy ∗ Uy + Dz ∗ Uz . (16) Boundary Conditions For problems in multiple space dimensions, it is often convenient to include discretized boundary conditions in a matrix-vector representation by first breaking the full differentiation and integration matrices into multiple components. Each component is defined by the grid points that it contributes to and the grid points it receives contributions from. For instance, it may be convenient to decompose a differentiation matrix into four mutually exclusive components that: (1) use interior points and contribute to interior points, (2) use interior points and contribute to boundary points, (3) use boundary points and contribute to interior points, and (4) use boundary points and contribute to boundary points. Splitting the differentiation and integration matrices into separate components can be helpful when computing residuals and Jacobians for the different types of grid points in the computational domain. Deriving these components is straightforward using zeroth-order restriction and prolongation matrices [ 9]. A zeroth-order restriction matrix is a matrix of zeros and ones which extracts a desired subset of elements from a vector. A zeroth-order prolongation matrix is also a matrix of zeros and ones, but it injects the elements of a restricted vector into a desired subset of the elements of a full-length vector. If {i1 , i2 , . . . , im } are the (flattened) indices of a subset of points from N grid points, then the associated restriction matrix, R, would be an m × N matrix, R, with ones at the positions (1, i1 ), (2, i2), . . . , (m, im ). The associated prolongation matrix, P , that injects a vector of length m into the positions {i1 , i2 , . . . , im } of a vector of length N is simply the transpose of R: P = RT . For example, the restriction and projection matrices for the two interior points of the grid in Figure 1 are given by   0 0 0 0 0 1 0 0 0 0 0 0 , P = RT (17) R= 0 0 0 0 0 0 1 0 0 0 0 0 To derive the differentiation matrix that uses values from grid points A and contributes to grid points B, we use the prolongation matrix for set A to expand the restricted grid function associated with A into a full-length vector and the restriction matrix for set B to compress derivative grid function to the set B: T DA→B = RB ∗ D ∗ PA = RB ∗ D ∗ RA . (18) Restricted integration matrices are derived in exactly the same manner. 2.2. Simple Differentiation Rules for Computing Exact Jacobians Once the continuous equations have been put in a discretized form that is expressed explicitly in terms of matrix-vector products and component-wise operations, the analytical Jacobian for the discretized equations can be calculated by applying a few simple matrix based differentiation rules. Because the differentiation rules are expressed completely in matrix form without any reference to individual elements in the Jacobian matrix, they 8 K. T. Chu allow us to compute the Jacobian directly in matrix form. In this section, we list these differentiation rules, which are essentially results from multivariate and matrix calculus applied specifically to the structure of discretized integro-differential equations. 2.2.1. Matrix-Vector Product Rule The Jacobian of a matrix-vector product (which corresponds to a linear operator acting on a function in the continuous equations) is just the matrix itself: ∂ (A ∗ û) = A. ∂ û (19) For example, the Jacobian of the discretized derivative of u, D ∗ û, is just D. 2.2.2. Diagonal Rule The Jacobian of a component-wise function f of a grid function û is a diagonal matrix with diagonal entries given by f ′ (û): ∂f (û) = diag (f ′ (û)) . ∂ û (20) In essence, the diagonal rule is a way to use matrix notation to represent the fact that the differential in the i-th component of f (û) only depends on the change in the i-th component of û and is given by δf (ûi) = f ′ (ûi )δûi, As an example, the Jacobian of sin(û) is diag (cos(û)). 2.2.3. Chain Rules The Jacobian of a matrix A times an arbitrary function, F , of all of the components of û is A times the Jacobian of F : ∂ ∂F (A ∗ F (û)) = A ∗ ∂ û ∂ û (21) Similarly, the Jacobian of a function, F (û), when its argument is a matrix A times the grid function û is the Jacobian of F evaluated at A ∗ û times A:   ∂F ∂ F (A ∗ û) = (A ∗ û) ∗ A (22) ∂ û ∂ û These rules are simply the chain rules for vector fields from multivariate calculus [ 1]. For the special but common case when F is a component-wise function F (û) = f (û), (21) reduces to A times the diagonal matrix with f ′ (û) on the diagonal: ∂ (A ∗ f (û)) = A ∗ diag (f ′ (û)) ∂ û (23) and (22) reduces to the diagonal matrix with f ′ (A ∗ û) on the diagonal times the matrix A: ∂ f (A ∗ û) = diag (f ′ (A ∗ û)) ∗ A ∂ û (24) Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 9 2.2.4. Product Rule To compute the Jacobian of a component-wise product of general functions F and G of a grid function û, we use the product rule: ∂F ∂G ∂ (F (û) .∗ G(û)) = diag (G(û)) ∗ + diag (F (û)) ∗ . ∂ û ∂ û ∂ û (25) The derivation of the product rule follows from the expression for the variation of the i-th component of F (û)G(û)   ∂Fi ∂Gi ∂Fi ∂Gi δ (Fi (û)Gi (û)) = Gi (û) δû, (26) δû + Fi (û) δû = Gi (û) + Fi (û) ∂ û ∂ û ∂ û ∂ û which yields the Jacobian    G1 (û) (∂F1 /∂ û) F1 (û) (∂G1 /∂ û)  G2 (û) (∂F2 /∂ û)   F2 (û) (∂G2 /∂ û)     +  .. ..    . . GN (û) (∂FN /∂ û) FN (û) (∂GN /∂ û)   ∂G ∂F  +diag (F (û))∗ (27)  = diag (G(û))∗ ∂ û ∂ û  2.3. Example Jacobian Calculations As our first example, let us consider the 1D Poisson equation: d2 u + ρ = 0. dx2 (28) To put this in discretized form, we need only replace the continuous second derivative operator by a discrete analogue: D 2 ∗ û + ρ̂ = 0. (29) Here, we have chosen to apply the discrete single derivative operator twice. Via a direct application of the matrix-vector product rule (19), the Jacobian of the left-hand side of this equation is easily found to be D 2 . Since this is a linear equation, there would not normally be a need to compute the Jacobian of the left hand side of this equation. Moreover, the Jacobian for this example is very easy to calculate using alternative means (or even by inspection). We merely present it to illustrate the direct matrix method on a simple model problem. As a less trivial, let us calculate the Jacobian for the discretized form of the nonlinear function f (u) = e2u du . dx (30) Converting this function to discrete form, we obtain f (û) = (e.∧ (2û)) .∗ (D ∗ û). (31) Using the product rule (25), we find that the the Jacobian is given by J = diag (D ∗ û) ∗ ∂(D ∗ û) ∂ (e.∧ (2û)) + diag (e.∧ (2û)) ∗ . ∂ û ∂ û (32) 10 K. T. Chu Then applying the diagonal rule (20) and the matrix-vector product rule (19), we find that J = 2diag (D ∗ û) ∗ diag (e.∧ (2û)) + diag (e.∧ (2û)) ∗ D, (33) which can be simplified to J = 2diag ((D ∗ û) .∗ (e.∧ (2û))) + diag (e.∧ (2û)) ∗ D (34) by observing that diag (û .∗ v̂) = diag (û) ∗ diag (v̂) . As a final example, let us calculate the Jacobian for the nonlinear algebraic equations that arise when solving the one-dimensional version of (1) – (3) using a simple backwards Euler discretization in time. Using the direct matrix approach for the spatial discretiza(n+1) (n+1) tion, the nonlinear algebraic equations for ĉ+ and ĉ− that need to be solved at each time step are:    (n+1) (n+1) (n+1) (n) ĉ+ − ∆t D 2 ∗ ĉ+ + D ∗ ĉ+ .∗ (D ∗ φ̂) − ĉ+ = 0 (35)    (n+1) (n+1) (n+1) (n) ĉ− − ∆t D 2 ∗ ĉ− − D ∗ ĉ− .∗ (D ∗ φ̂) − ĉ− = 0 (36)   (n+1) (n+1) ǫD 2 ∗ φ̂ + ĉ+ − ĉ− = 0 (37) (n) where ĉ± are the concentrations at the current time step and ∆t is the time step size. It is important to mention that several of the rows in (37) will typically be replaced to impose the discretized form of the boundary conditions for φ. For illustrative purposes, let us suppose that we have simple Dirichlet boundary conditions for φ. In this situation, (37) is only imposed at interior grid points [ 41]. Using the simple differentiation rules from the previous section, the Jacobian of (35) (n+1) with respect to ĉ+ is     ∂ φ̂ (n+1) I − ∆t D 2 + D ∗ diag D ∗ φ̂ + D ∗ diag ĉ+ ∗ D ∗ (n+1) ∂ĉ+ ! , (38)   (n+1) (n+1) where I is the identity matrix and ∂ φ̂/∂ĉ+ is the Jacobian of φ̂ with respect to ĉ+ .   (n+1) To eliminate ∂ φ̂/∂ĉ+ from this expression, we simply apply the differentiation rules to (37) with  two rows eliminated for the boundary conditions and solve for the interior (n+1) portion of ∂ φ̂/∂ĉ+ : ∂ φ̂ (n+1) ∂ĉ+ ! int =− −1 1 D 2 int , ǫ (39) where (D 2 )int is the submatrix of D 2 that remains when all of the columns and rows corresponding to boundary grid points have been removed. Since the boundary values of Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 11 (n+1) φ̂ are fixed and the valuesof ĉ+ atthe boundaries do not affect the potential in the (n+1) interior, the full Jacobian ∂ φ̂/∂ĉ+ is given by ∂ φ̂ (n+1) ∂ĉ+  0 ···  .. =  . − 1 (D 2 )−1 int ǫ 0 ···  0 ..  , .  0 (40) where we have assumed that the first and lastgrid points  correspond to boundary points. (n+1) It is important to recognize that the form for ∂ φ̂/∂ĉ+ in (40) is specific to problems with Dirichlet boundary conditions for φ. For other boundary conditions, the inversion   (n+1) generally leads to different forms for the Jacobian. of the equation for ∂ φ̂/∂ĉ+ The Jacobian for (35) can now be explicitly computed by substituting (40) into (38). The similar expression for the Jacobian of (36) is obtained using an analogous procedure. Using the direct matrix approach, we have reduced the calculation of the Jacobian to O(N 3 ) (cost of matrix-inversion and matrix-matrix multiplies) compared to the O(N 4 ) cost for computing a numerical Jacobian for high-order spatial discretizations. It is worth pointing out that in this example, the Jacobian for the concentrations does not depend explicitly on φ because the Poisson equation is linear. As a result, there is no need to solve for φ in order to compute the Jacobians for (35) and (36). For general problems, the Jacobian may depend on the auxiliary variable, so it might be necessary to solve the constraint equation. However, because only one solve for the auxiliary variables is required with the direct matrix method, the cost of computing the Jacobian is still dramatically reduced compared to using finite differences. 2.4. Computational Performance In general, using the direct matrix method to compute a Jacobian is faster than calculating a numerical Jacobian. As mentioned in the previous section, the performance difference is expected to be large when auxiliary variables are involved in the expression of the residual. However, the direct matrix method yields higher performance even for problems where the residual is relatively simple. Figure 2 compares the performance of the direct matrix method against the MATLAB numjac() function for the two example problems discussed in Section 3. As we can see, the direct matrix method is at least an order of magnitude faster for both the 1D and 2D problems. For the 2D problem, the direct matrix method also shows superior scaling with the grid size. To ensure a fair comparison, we vectorized the residual calculation to minimize the number of function calls required by numjac() and avoided the use of matrix multiplications5 , whenever possible, which benefited both methods. Matrixmatrix multiplications are especially detrimental for the direct matrix method because they can worsen the scaling of the Jacobian construction time with grid size to the point where the numerical Jacobian is faster to compute. For instance, in the left graph in Figure 2, a Jacobian computed using the direct matrix method with explicit matrixmatrix multiplications take O(N 3 ) time, which negates the performance benefits of the 5 For example, we express matrix-vector products of the form diag (û)∗ v̂ as component-wise multiplication of two grid functions û .∗ v̂. 12 K. T. Chu 0 3 10 10 2 10 −1 10 Order (numjac) = 2.4 1 Time (s) Time (s) Order (numjac) = 2.3 −2 10 10 0 10 −3 10 −1 10 Order (DMM) = 1.5 Order (DMM) = 2.1 −4 10 −2 1 10 2 10 N 3 10 10 2 10 3 10 N 4 10 Figure 2. Comparison of the computational performance of direct matrix method (circles) and numerical Jacobian computed using MATLAB numjac() function (squares) for the 1D electrochemical thin-film problem (Section 3.1) and the 2D metal colloid sphere problem (Section 3.2). For both comparisons, the numjac() and direct matrix method codes were optimized by vectorizing the residual functions and avoiding matrix multiplications whenever possible. The data for these graphs were generated on a 2.4 GHz MacBook Pro. method compared with a numjac() implementation before N even reaches 1000. In addition to avoiding matrix-matrix multiplication, it is important to use sparse matrices when possible. For problems in more than one space dimension, sparse matrices are produced when Kronecker products with identity matrices are used to construct differentiation matrices even if the 1D differentiation matrices are dense. Not only does the memory required for dense matrix representations easily exhaust the memory on workstations and laptops, dense matrix representations also leads to poor computational performance when applying and multiplying the matrices. In general, sparse matrix operations have better scaling properties as the grid size grows. 2.5. Relationship to the Newton-Kantorovich Method The direct matrix method for computing the Jacobian of discretized integro-differential equations is closely related to the calculation of the Fréchet derivative6 used in the NewtonKantorovich method [ 8, 30] (also known as quasilinearization [ 21]). The basic idea behind solving nonlinear integro-differential equations using the Newton-Kantorovich method is to carry out Newton’s method in function space. For each Newton iteration, we compute the Fréchet derivative of the integro-differential equation in function space and numerically solve the resulting linear integro-differential equation for the correction to the current iterate of the solution. Essentially, the Newton-Kantorovich method reverses the order of (1) discretization of the continuous problem and (2) Newton iteration. Because the equations to be solved during each Newton iteration is linear, there is no need to compute 6 Recall that the Fréchet derivative for nonlinear functionals is the generalization of the Jacobian for nonlinear functions over finite-dimensional spaces [ 8, 31, 40]. For intuition, Ortega and Rheinboldt provide a nice discussion of Fréchet derivatives in the context of finite-dimensional spaces [ 34]. Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 13 a Jacobian of the discretized equations. An important feature of the Newton-Kantorovich method is that the numerical discretization used to solve the linearized equation during each Newton iteration can, in principle, be completely independent of the discretization used to compute the residual of the nonlinear integro-differential equation. This freedom can affect the convergence rate of the method depending on the degree to which the discretized form of the linearized problem approximates the Jacobian of the discretized residual equation. Because the direct matrix method begins with a discrete equation possessing the same mathematical structure as the continuous residual equation, it produces a Jacobian that is a discrete analogue of the Fréchet derivative for the continuous integro-differential equation. Unlike the Newton-Kantorovich method, however, the direct matrix method produces the unique Jacobian associated with the particular choice of discretization for the residual of the nonlinear integro-differential equation. The freedom to independently choose the numerical discretizations for the residual equation and the Fréchet derivative is not present in the direct matrix method. As a result, given a numerical discretization for the residual equation, the direct matrix method can be viewed as a way to generate the optimal discretization for the linearized equation that arises during each Newton iteration of the Newton-Kantorovich method. 3. Applications Analysis of electrochemical systems is a classical subject that has recently seen a renewal of interest. Modern electrochemical systems of interest include ion channels in biological membranes [ 2, 3, 35], microfluidic devices based on electro-osmotic flows [ 5, 38], and thinfilm battery technologies [ 32, 39, 42]. A common feature of many of these applications is that the electrochemical system is operated under extreme conditions, such as large applied fields or very small physical size [ 4, 16]. In these regimes, numerical solutions of the nonlinear governing equations are useful for gaining insight into the rich behavior of these systems. As we shall see, the direct matrix method makes it easy to compute the analytical Jacobian required to solve these nonlinear equations using Newton’s method. 3.1. Electrochemical Thin-Films Analysis of 1D electrochemical systems leads to an example of a nonlinear integrodifferential equation. For steady-state electrochemical thin-films made up of a dilute solution of symmetric binary electrolyte with faradaic reactions at the surfaces of the thin-film [ 4, 16], the electric field, E, satisfies the second-order differential equation7 2 ǫ 7  d2 E 1 3 − E dx2 2  − 1 j (c0 + j(x + 1)) E − = 0 4 4 (41) This equation is mathematically equivalent to the Poisson-Nernst-Planck equation formulation of electrochemical transport [ 4]. To simplify the discussion, equation (41) is a slightly modified form of the master equation in [ 4, 16] derived by making the substitutions x → (x + 1)/2 and E → 2E. 14 K. T. Chu on the domain (−1, 1) subject to boundary conditions that represent the kinetics of electrode reactions − kc (c(1) + ρ(1)) + jr − j = 0 kc (c(−1) + ρ(−1)) − jr − j = 0, (42) (43) where c is the average ion concentration, ρ is the charge density, j is the current density flowing through the thin-film, ǫ is a parameter related to the dielectric constant, kc and jr are reaction rate constants, and c0 is the following expression   Z 1 2 2 c0 = (1 − j) + ǫ 2E(1) − 2E(−1) − E dx . (44) −1 The average ion concentration and charge density are related to the electric field via the equations c(x) = c0 + j(x + 1) + 2ǫ2 E 2 , ρ(x) = 4ǫ2 dE . dx (45) We can solve this set of equations via Newton’s method using a systematic application of the direct matrix method. To discretize the equations, we use a pseudospectral method based on the Chebyshev grid on the interval [−1, 1]. The differentiation matrix, D, for this computational grid is just the standard differentiation matrix for the Chebyshev grid [ 8, 22, 41]. For numerical integration, we use the Clenshaw-Curtis quadrature weights [ 41], which we denote by the row vector w. The quadrature weights are used to construct a quadrature matrix, Q, which is the analogue of the differentiation matrix: Q = [w T , w T , . . . , w T ]T . When a grid function f is multiplied by Q, the result is a vector where all entries are equal to the numerical approximation of the integral of f . With these discrete operators, we can put (41) into matrix-vector form:    1 1 j 2 2 ǫ D ∗ Ê − Ê.∧ 3 − Ĉ0 + j(x + 1) . ∗ Ê − = 0 (46) 2 4 4 with   Ĉ0 = (1 − j) + ǫ2 2Ê1 − 2ÊN − Q ∗ (Ê.∧ 2) , (47) where we have chosen to order the indices so that x1 = 1 and xN = −1 (this follows the convention used in [ 41] and in the code in Appendix A). The boundary conditions are imposed by replacing the discrete equations corresponding to x1 and xN with    (48) − kc ĉ0 + 2j + ǫ2 2Ê12 + 4D1 ∗ Ê + jr − j = 0    2 kc ĉ0 + ǫ2 2ÊN + 4DN ∗ Ê − jr − j = 0, (49) where D1 and DN are the rows of the differentiation matrix corresponding to x1 and xN , respectively, and ĉ0 is a single component of Ĉ0 . Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 15 0 −20 −40 E −60 −80 −100 −1 −0.5 0 x 0.5 1 Figure 3. Solution of electrochemical thin-film equations (41) – (43) computed using 100 grid points with ǫ = 0.01, kc = 10, and jr = 10 for j = 1.5 (solid), j = 1.0 (dash), and j = 0.5 (dot-dash). The Jacobians for the left-hand side of these discrete equations are now easily computed. Applying the differentiation rules from Section 2, the Jacobian for the interior grid points is      ∂ Ĉ  1  1 3 0 2 2 Jint = ǫ D − diag Ê.∧ 2 (50) − diag Ĉ0 + j(x + 1) − diag Ê ∗ 2 4 4 ∂ Ê with  2 ∂ Ĉ0 2  .. = ǫ  . ∂ Ê 2   0 · · · 0 −2   .. .. .. ..  − 2Q ∗ diag Ê   . . . .  0 · · · 0 −2 The Jacobian for the discretized boundary conditions are similarly calculated:   ∂ĉ0 2 2 + 4ǫ [E1 0 . . . 0] + 4ǫ D1 J1 = −kc ∂ Ê   ∂ĉ0 2 2 + 4ǫ [0 . . . 0 EN ] + 4ǫ DN , JN = k c ∂ Ê (51) (52) (53) where ∂ĉ0 ∂ Ê    = ǫ2 [2 0 . . . 0 − 2] − 2w ∗ diag Ê (54) From the perspective of computational performance, the above formulation of the Jacobian is suboptimal because it includes a matrix-matrix multiply in (50) that can be avoided. To reduce the time required to compute the Jacobian, the key observation is   ∂ Ĉ0 ∂ĉ0 that each row of ∂ Ê is equal ∂ Ê . Therefore, diag Ê ∗ ∂∂ĈÊ0 is more efficiently computed as 16 K. T. Chu 0 0 10 |an| 10 |an| −5 10 −10 −10 10 10 −15 10 0 −5 10 −15 50 100 150 x 200 250 10 0 50 100 150 200 250 x Figure 4. Plots of the absolute value of the spectral coefficients, an , for the numerical solution of the electrochemical thin-film equations with j = 1.5 (solid), j = 1.0 (dash), and j = 0.5 (dot-dash) as a function of the basis function degree when (41) – (43) are solved directly (left) and using the variable transformation (55) to place more grid points in the boundary layers (right). Although the convergence rate as a function of number of grid points is geometric in all cases, the variable transformation significantly reduces the number of grid points required obtain the best solution possible given the precision of the computation. Note that the spectral coefficients were calculated from a numerical solution generated using 250 grid points to make the roundoff plateau more apparent. 0 the Kronecker product of Ê and ∂ĉ . The evaluation of the residual can also be improved ∂ Ê by recognizing that all of the elements of Ĉ0 are equal to ĉ0 , but this optimization has a far smaller impact than the reformulation of the Jacobian. Now that we have explicitly computed all of the components for Newton’s method, it is straightforward to write a program to solve the nonlinear integro-differential equations for electrochemical thin-films. The MATLAB code for solving is relatively short and runs quickly (see Appendix A). One special issue that arises for this problem is that continuation methods [ 8] are required to obtain good initial iterates for the Newton iteration at high current densities. Figure 3 shows the numerical solution of (41) – (43) computed using 100 grid points with ǫ = 0.01, kc = 10, and jr = 10 for various values of j. As expected, we observe geometric convergence with respect to the number of grid points (see Figure 4). Notice that at higher current densities, we see slower convergence rates due to the presence of greater structure in the solution. While quite satisfactory, the convergence rate for the numerical discretization (46) – (49) as a function of the number of grid points is limited by the need to resolve the boundary layers. By using a mapping of the computational domain that allows us to place a few grid points within the boundary layers, we can obtain a faster convergence rate. For example, by using the variable transformation: 1 β x = tanh (atanh(β)y) , E(x) = cosh2 (atanh(β)y) E(y), (55) β atanhβ where β is an adjustable parameter less than 1, we can significantly reduce the number Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 17 of grid points required obtain a solution accurate to machine precision (see Figure 4). It is interesting to note that the optimal value for β depends on the current density j. For j = 0.5 and j = 1.0, a β value of 0.9 yields near optimal results. For j = 1.5, however, the fastest convergence is obtained near β = 0.75. As is typical, the transformed electrochemical thin-film equations are bit more complicated to deal with than the original equations. However, the direct matrix method makes it straightforward to discretize the transformed equations and compute the exact Jacobian for the resulting nonlinear algebraic equations (see Appendix B). 3.2. Double Layer Charging of Metal Colloid Sphere at High Applied Electric Fields Analysis of double layer charging for colloid systems subject to applied electric fields gives rise to nonlinear differential equations in multiple space dimensions with complicated boundary conditions. In the electroneutral limit [ 4, 33, 36], the steady-state governing equations for systems composed of symmetric binary electrolyte are [ 17] ∇2 c = 0 ∇ · (c∇φ) = 0, (56) (57) where c is the average ion concentration and φ is the electric potential. For metal colloid surfaces, the appropriate boundary conditions are [ 17, 18] ∂φ ∂n ∂c ǫ∇s · (w∇s ln c + q∇s φ) − ∂n √ −2 c sinh(ζ/2) √ 4 c sinh2 (ζ/4) √ ζ + 2δ c sinh(ζ/2) 0 = ǫ∇s · (q∇s ln c + w∇s φ) − c (58) 0 = (59) q = w = v−φ = (60) (61) (62) where q and w are the excess charge and ion concentration in the boundary layer, ζ is the electric potential drop across the boundary layer, v is the potential of the metal colloid, and δ is a parameter related to the capacitance of the boundary layer. As a model problem, we solve these equations for a metal colloid sphere subjected to a uniform applied electric field of strength E in the z-direction. To avoid infinite values of the electric potential, the numerical model is formulated in terms of ψ ≡ φ + Ez, the deviation of the electric potential from that of the uniform applied field. The spherical geometry of the problem also allows us to demonstrate the use of the direct matrix method on a non-Cartesian (though still logically rectangular) grid. While this problem may seem daunting, it is straightforward to obtain a solution numerically by using Newton’s method with an analytical Jacobian computed using the direct matrix method. Taking advantage of azimuthal symmetry, we discretize the equations in spherical coordinates on a 2D pseudospectral grid that is the tensor product of grids in the radial and polar angle directions. We use a shifted semi-infinite rational Chebyshev grid [ 8] in the radial direction and a uniformly spaced grid for the polar angle direction. The required differentiation matrices are constructed using Kronecker products, and the 18 K. T. Chu boundary conditions are handled using restriction and prolongation matrices as discussed in Section 2.1.1. To facilitate the formulation of the matrix-vector representation of the equations, let us fix our notation. Let Dr and Dθ be the radial and angular contributions to the discrete divergence operator, Gr and Gθ be the radial and angular components of the discrete gradient operator, and L be the discrete Laplacian operator. Also, let n and s subscripts denote normal and tangential derivative operators at the surface of the sphere. For the purpose of discussion (and implementation), it is convenient to decompose the discrete differential operators into pieces that correspond to contributions from finite and infinite grid points. For example, L can be decomposed into Lf and L∞ which respectively account for the contributions to the Laplacian operator from finite and infinite grid points; that is, L ∗ ĉ = Lf ∗ ĉf + L∞ ∗ ĉ∞ , where ĉf and ĉ∞ are the concentration values at finite and infinite grid points respectively. Similarly, to impose the boundary conditions, we use derivative operators that act only on surface values. Surface operators and surface field values will be denoted with superscripts s and subscripts s, respectively. Finally, to refer to values at interior grid points (i.e., finite grid points that are not on the surface of the sphere), we use the subscript i. In this notation, the discretized form of the bulk equations (56) and (57) are given by 0 = F1 ≡ Lf ∗ ĉf + L∞ ∗ c∞ h  i 0 = F2 ≡ Drf ∗ ĉf .∗ Gfr ∗ ψ̂f − E cos θ − Dr∞ ∗ (c∞ .∗ E cos θ) h  i f f + Dθ ∗ ĉf .∗ Gθ ∗ ψ̂f + E sin θ + Dθ∞ ∗ (c∞ .∗ E sin θ) . (63) (64) In these equations, the unknowns are the values of the c and ψ at finite grid points; values at infinity are specified by the boundary conditions and so are known quantities (which is why c∞ does not have a hat accent and ψ∞ = 0 does not show up at all). In discretized form, the boundary conditions on the surface of the sphere are 0 = H1 ≡ − 0 = H2 ≡ − h  i s s s ǫDs ∗ q̂ .∗ (G ∗ ln ĉs ) + ŵ .∗ G ∗ ψ̂s − G ∗ E cos θ   cs .∗ Gfn ∗ ψ̂f + E cos θ h  i ǫDs ∗ ŵ .∗ (Gs ∗ ln ĉs ) + q̂ .∗ Gs ∗ ψ̂s − Gs ∗ E cos θ  ∗ c Gfn ∗ ĉf + G∞ . ∞ n (65) (66) Closure for these equations is given by using (60) – (61) to relate q̂ and ŵ to the zetapotential and using (62) to compute the zeta-potential from φ and ĉs . The direct matrix method makes it straightforward to derive the analytical Jacobian for the system of equations (60) – (66). The derivatives of F1 and F2 with respect to the Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 19 unknowns ĉf and ψ̂f are easily calculated: DF1 = Dĉf DF1 = D ψ̂f DF2 = Dĉf DF2 = D ψ̂f Lf (67) 0 (68)     Drf ∗ diag Gfr ∗ ψ̂f − E cos θ + Dθf ∗ diag Gfr ∗ ψ̂f + E sin θ (69) Drf ∗ diag (ĉf ) ∗ Gfr + Dθf ∗ diag (ĉf ) ∗ Gfθ (70) The derivatives for the discretized boundary conditions are more complicated because q̂, ŵ, and ĉs implicitly depend on the unknown variables and because surface grid points must be treated differently than interior grid points. However, a systematic application of the differentiation rules in Section 2.2 yields the analytical Jacobian directly in matrix form: ǫ DH1 = Ds ∗ diag ( q ./ cs .∗ (Gs ∗ ln cs ) ) Dĉs 2   √ ∂ζ s − ǫDs ∗ diag .∗ (G ∗ ln cs ) cs .∗ cosh(ζ/2) .∗ ∂cs + ǫDs ∗ diag(q) ∗ Gs ∗ diag (1 ./ cs ) ǫ + Ds ∗ diag ( w ./ cs .∗ (Gs ∗ ψs − Gs ∗ E cos θ) ) 2   √ ∂ζ s s + ǫDs ∗ diag .∗ (G ∗ ψs − G ∗ E cos θ) cs .∗ sinh(ζ/2) .∗ ∂cs  − diag Gfn ∗ ψf + E cos θ (71) DH1 = 0 (72) Dci   √ ∂ζ DH1 s = −ǫDs ∗ diag .∗ (G ∗ ln cs ) + ǫDs ∗ diag(w) ∗ Gs cs .∗ cosh(ζ/2) .∗ Dψs ∂ψs   √ ∂ζ s s .∗ (G ∗ ψs − G ∗ E cos θ) cs .∗ sinh (ζ/2) .∗ + ǫDs ∗ diag ∂ψs − diag (cs ) ∗ Gsn (73) DH1 = −diag (cs ) Gin (74) Dψi 20 K. T. Chu ǫ DH2 = Ds ∗ diag ( w ./ cs .∗ (Gs ∗ ln cs ) ) Dĉs 2   √ ∂ζ s cs .∗ sinh(ζ/2) .∗ + ǫDs ∗ diag .∗ (G ∗ ln cs ) ∂cs + ǫDs ∗ diag(w) ∗ Gs ∗ diag (1 ./ cs ) ǫ + Ds ∗ diag ( q ./ cs .∗ (Gs ∗ ψs − Gs ∗ E cos θ) ) 2   √ ∂ζ s s .∗ (G ∗ ψs − G ∗ E cos θ) cs .∗ cosh(ζ/2) .∗ − ǫDs ∗ diag ∂cs − Gsn (75) DH2 = −Gin (76) Dci   √ DH2 ∂ζ s = ǫDs ∗ diag .∗ (G ∗ ln cs ) + ǫDs ∗ diag(q) ∗ Gs cs .∗ sinh(ζ/2) .∗ Dψs ∂ψs   √ ∂ζ s s .∗ (G ψs − G ∗ E cos θ) (77) cs .∗ cosh (ζ/2) .∗ − ǫDs ∗ diag ∂ψs DH2 = 0 (78) Dψi where 1 ∂ζ = − √ ∂ψs 1 + δ cs cosh (ζ/2) δ sinh (ζ/2) ∂ζ . = −√  √ ∂cs cs 1 + δ cs cosh (ζ/2) The Jacobian for the system of equations is obtained by assembling these pieces:  ∂F1 ∂F1    J =  ∂ĉ ∂F2 ∂ĉ ∂H1 ∂ĉ ∂H2 ∂ĉ ∂ ψ̂ ∂F2 ∂ ψ̂ ∂H1 ∂ ψ̂ ∂H2 ∂ ψ̂   ,  (79) (80) (81) where the Jacobians for H1 and H2 are constructed from (71) – (78) using restriction operators. For instance, ∂H1 ∂H1 ∂H1 = ∗ Rs + ∗ Ri , ∂ĉ ∂ĉs ∂ĉi (82) where Rs and Ri are restriction operators for surface and interior grid points, respectively. While the formulas may look complicated to program, they are actually quite easy to implement in MATLAB (see Appendix C). Figure 5 shows numerical solutions obtained using the above residual and Jacobian formulas. As for the electrochemical thin-film example, continuation is required to obtain good initial iterates for the Newton iteration at high values of the applied electric fields. The solutions shown are computed for E = 10, v = 0, ǫ = 0.01, and δ = 1 using 30 21 Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 4 1.2 2 1 0.8 ψ 0 0.6 −2 0.4 −4 1 3 0 2 −1 z 1 3 0 1 0 2 −1 x z 1 0 x Figure 5. Solution of equations (56) – (62) computed using 30 grid points in both the radial and polar angle directions with E = 10, v = 0, ǫ = 0.01, and δ = 1. grid points in both the radial and polar angle directions with scale parameter set to 0.5 for the shifted rational Chebyshev grid. Using pseudospectral grids and the analytical Jacobian, the solution is obtained very quickly, requiring only a few Newton iterations for each continuation stage (and less than a minute of computation time on a 2.4 GHz MacBook Pro). 4. Conclusions In this article, we have presented a direct matrix method for calculating analytical Jacobians for discretized, nonlinear integro-differential equations. Because this method is based on simple matrix-based differentiation rules, it is less tedious and less error prone than other approaches for computing analytical Jacobians. Furthermore, because it yields the Jacobian in matrix form, it is very easy to use languages that support vectorized computation to implement numerical methods that require the Jacobian. One interesting possibility that the direct matrix method presents is development of high-level automatic differentiation tool for discretized nonlinear integro-differential equations. In contrast to traditional automatic differentiation methods [ 24, 26] which operate at the level of individual scalar operations, automatic differentiation methods based on the direct matrix method would operate on the discrete differential operators associated with the continuous differential equation. Such an automatic differentiation tool could be useful for completely eliminating the need for a researcher to compute the Jacobian of discretized nonlinear integro-differential equations by hand. Acknowledgments The author gratefully acknowledges the support of the Department of Energy through the Computational Science Graduate Fellowship (CSGF) Program provided under grant number DE-FG02-97ER25308, Vitamin D, Inc., and the Institute for High-Performance Computing (IHPC) in Singapore. The author thanks B. Kim, P. Fok, and J. P. Boyd for 22 many helpful discussions and suggestions. K. T. Chu % compute d e l t a E and u p d at e s o l u t i o n d e l t a E = −J\ r e s ; E = E + delta E ; This code relies on cheb.m and clencurt.m [ 41]. % u p d at e c0 = res = − res (1) = + r e s (N) = − %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% N = 200; j = 1 .5 ; epsilon = 0.01; k c = 10; j r = 10; r e s t o l = 1 e −8; m a x i t e r s = 2 0 ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % compute g r i d , d i f f e r e n t i a t i o n m at r i x , and q u a d r a t u r e w e i g h t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [ D, x ] = ch eb (N− 1) ; % Chebyshev d i f f e r e n t i a t i o n m a t r i x L = D∗D; % Laplacian operator [ x , w ] = c l e n c u r t (N− 1) ; % Clenshaw−C u r t i s q u a d r a t u r e w e i g h t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % s e t up c o n t i n u a t i o n i n j %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% j s t a r t = 0 .5 ; dj = 0 . 1 ; j cur = j s t a r t ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % g e n e r a t e i n i t i a l i t e r a t e f o r Newton i t e r a t i o n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c0 = 1− j c u r ; c = c0 + j c u r ∗ ( x + 1 ) ; E = −2∗ j c u r . / ( j c u r ∗ ( x+1)+c0 ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Newton i t e r a t i o n w i t h s i m p l e c o n t i n u a t i o n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% w h i l e ( j c u r <= j & d j > 0 ) while ( ( res norm > r e s t o l ) & ( count < m a x i t e r s ) ) % c o n s t r u c t Jacobian f o r i n t e r i o r g r i d p o i n t s dc0 dE = −2∗ e p s i l o n ˆ2∗w. ∗ E ’ ; dc0 dE ( 1 ) = dc0 dE ( 1 ) + 2∗ e p s i l o n ˆ 2 ; dc0 dE (N) = dc0 dE (N) − 2∗ e p s i l o n ˆ 2 ; J = e p s i l o n ˆ2∗ L . . . − d i a g ( 1 . 5 ∗ e p s i l o n ˆ 2 ∗ (E . ∗ E) + 0 . 2 5 ∗ ( c0+j c u r ∗ ( x + 1 ) ) ) − 0 . 2 5 ∗ kr on ( E , dc0 dE ) ; % u p d at e l o o p v a r i a b l e s = norm ( r e s , i n f ) res norm count = count + 1 end % Newton iteration % u p d at e c o n t i n u a t i o n i f ( j − j cu r < dj ) dj = j − j c ur ; end j cur = j cu r + dj ; loop variables end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % plot solution %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure (1); c lf ; plot (x ,E, ’ k− ’); a x i s ([ −1 1 −100 0 ] ) ; x l a b e l ( ’ x ’ ) ; y l a b e l ( ’E’ , ’ Rotation ’ , 0 ) ; ... 23 % c o n s t r u c t J a c o b i a n f o r b ou n d ar y c o n d i t i o n s J ( 1 , : ) = −k c ∗ ( dc0 dE + 4∗ e p s i l o n ˆ2∗D ( 1 , : ) ) ; J ( 1 , 1 ) = J ( 1 , 1 ) − 4∗ k c ∗ e p s i l o n ˆ2∗E ( 1 ) ; J (N , : ) = k c ∗ ( dc0 dE + 4∗ e p s i l o n ˆ2∗D(N , : ) ) ; J (N, N) = J (N, N) + 4∗ k c ∗ e p s i l o n ˆ2∗E(N ) ; ... ... %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % plot spectral c o e f f i c i e n t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c o e f s = ab s ( f f t ( [ E ; f l i p u d (E ( 2 : end − 1 ) ) ] ) ) ; figure (2); c lf ; s e m i l o g y ( c o e f s ( 1 : N) , ’ ko ’ ) ; a x i s ( [ 0 N 1 e −15 1 e4 ] ) ; x l a b e l ( ’ n ’ ) ; y l a b e l ( ’ | a n | ’ , ’ Rotation ’ , 0 , ’ P osi ti on ’ ,[ −32 5e − 6 ] ) ; % display j cu r j cur = j cur % i n i t i a l i z e Newton i t e r a t i o n count = 0 ; % i t e r a t i o n c o u n t f o r s i n g l e Newton i t e r a t i o n c0 = 1− j c u r + e p s i l o n ˆ 2 ∗ ( 2 ∗E(1) −2∗E(N)−w∗ (E . ˆ 2 ) ) ; res = e p s i l o n ˆ 2 ∗ ( L∗E−0.5∗E . ˆ 3 ) . . . − 0 . 2 5 ∗ ( c0+j c u r ∗ ( x + 1 ) ) . ∗ E − 0 . 2 5 ∗ j c u r ; res (1) = −k c ∗ ( c0 +2∗ j c u r +e p s i l o n ˆ 2 ∗ ( 2 ∗E( 1) ˆ2+ 4∗D( 1 , : ) ∗ E ) ) + j r − j cur ; r e s (N) = k c ∗ ( c0+e p s i l o n ˆ 2 ∗ ( 2 ∗E(N)ˆ2+4∗D(N , : ) ∗ E ) ) . . . − j r − j cur ; res norm = norm ( r e s , i n f ) ; residual 1− j c u r + e p s i l o n ˆ 2 ∗ ( 2 ∗E(1) −2∗E(N)−w∗ (E . ˆ 2 ) ) ; e p s i l o n ˆ 2 ∗ ( L∗E−0.5∗E . ˆ 3 ) . . . 0 . 2 5 ∗ ( c0+j c u r ∗ ( x + 1 ) ) . ∗ E − 0 . 2 5 ∗ j c u r ; −k c ∗ ( c0 +2∗ j c u r+e p s i l o n ˆ 2 ∗ ( 2 ∗E( 1) ˆ2+ 4∗D( 1 , : ) ∗ E ) ) j r − j cur ; k c ∗ ( c0+e p s i l o n ˆ 2 ∗ ( 2 ∗E(N)ˆ2+4∗D(N , : ) ∗ E ) ) . . . j r − j cur ; Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. A. MATLAB Code for Electrochemical Thin-Film Example − d i a g ( 1 . 5 ∗ e p s i l o n ˆ 2 ∗ ( gamma . ˆ 3 ) . ∗ ( E . ˆ 2 ) . . . + 0. 25∗gamma . ∗ ( c0+j c u r ∗ ( x + 1 ) ) ) . . . − 0 . 2 5 ∗ kr on ( gamma . ∗ E , dc0 dE ) ; with Variable Transformation % c o n s t r u c t J a c o b i a n f o r b ou n d ar y c o n d i t i o n s J ( 1 , : ) = −k c ∗ ( dc0 dE + 4∗ e p s i l o n ˆ2∗gamma( 1 ) ∗D ( 1 , : ) ∗ diag gamma ) ; J ( 1 , 1 ) = J ( 1 , 1 ) − 4∗ k c ∗ e p s i l o n ˆ2∗gamma( 1 ) ˆ 2 ∗ E ( 1 ) ; J (N , : ) = k c ∗ ( dc0 dE + 4∗ e p s i l o n ˆ2∗gamma(N) ∗D(N , : ) ∗ diag gamma ) ; J (N, N) = J (N, N) + 4∗ k c ∗ e p s i l o n ˆ2∗gamma(N) ˆ 2 ∗E(N ) ; This code relies on cheb.m and clencurt.m [ 41]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% N = 2 0 0 ; b e t a = 0 . 7 5 ; a l p h a = at an h ( b e t a ) ; j = 1 .5 ; epsilon = 0.01; k c = 10; j r = 10; r e s t o l = 1 e −8; m a x i t e r s = 2 0 ; % compute d e l t a E and u p d at e s o l u t i o n E = E + delta E ; d e l t a E = −J\ r e s ; % u p d at e c0 = + res = − res (1) = residual 1− j c u r . . . e p s i l o n ˆ 2 ∗ ( 2 ∗gamma ( 1 ) ∗ E(1) −2∗gamma(N) ∗E(N)−w∗ (gamma . ∗ ( E . ˆ 2 ) ) ) ; e p s i l o n ˆ 2 ∗ ( L ∗ (gamma . ∗ E) − 0 . 5 ∗ (gamma . ˆ 3 ) . ∗ ( E . ˆ 3 ) ) . . . 0 . 2 5 ∗ ( c0+j c u r ∗ ( x + 1 ) ) . ∗ gamma . ∗ E − 0 . 2 5 ∗ j c u r ; −k c ∗ ( c0 +2∗ j c u r . . . +e p s i l o n ˆ 2 ∗ ( 2 ∗gamma( 1 ) ˆ 2 ∗ E ( 1 ) ˆ 2 . . . +4∗gamma( 1 ) ∗D ( 1 , : ) ∗ ( gamma . ∗ E ) ) ) . . . + j r − j cur ; r e s (N) = k c ∗ ( c0+e p s i l o n ˆ 2 ∗ ( 2 ∗gamma(N) ˆ 2 ∗E(N) ˆ 2 . . . +4∗gamma(N) ∗D(N , : ) ∗ ( gamma . ∗ E ) ) ) . . . − j r − j cur ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % compute g r i d , d i f f e r e n t i a t i o n m at r i x , and q u a d r a t u r e w e i g h t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% [ D, y ] = ch eb (N− 1) ; % Chebyshev d i f f e r e n t i a t i o n m a t r i x [ y , w ] = c l e n c u r t (N− 1) ; % Clenshaw−C u r t i s q u a d r a t u r e w e i g h t s x = t an h ( a l p h a ∗y ) / b e t a ; % mapped g r i d p o i n t s gamma = b e t a / a l p h a ∗ c o s h ( a l p h a ∗y ) . ˆ 2 ; % d e r i v a t i v e t r a n s f o r m a t i o n f a c t o r % c a c h e d i a g ( gamma) diag gamma = d i a g ( gamma ) ; L = diag gamma ∗D∗ diag gamma ∗D ; % transformed Laplacian operator %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % s e t up c o n t i n u a t i o n i n j %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% j s t a r t = 0 .5 ; dj = 0 . 1 ; j cur = j s t a r t ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % g e n e r a t e i n i t i a l i t e r a t e f o r Newton i t e r a t i o n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c0 = 1− j c u r ; c = c0 + j c u r ∗ ( x + 1 ) ; E = −2∗ j c u r . / ( j c u r ∗ ( x+1)+c0 ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Newton i t e r a t i o n w i t h s i m p l e c o n t i n u a t i o n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% w h i l e ( j c u r <= j & d j > 0 ) % display j cu r j cur = j cur % i n i t i a l i z e Newton i t e r a t i o n c o u n t = 0 ; % i t e r a t i o n c o u n t f o r s i n g l e Newton i t e r a t i o n c0 = 1− j c u r . . . + e p s i l o n ˆ 2 ∗ ( 2 ∗gamma ( 1 ) ∗ E(1) −2∗gamma(N) ∗E(N)−w∗ (gamma . ∗ ( E . ˆ 2 ) ) ) ; res = e p s i l o n ˆ 2 ∗ ( L ∗ (gamma . ∗ E) − 0 . 5 ∗ (gamma . ˆ 3 ) . ∗ ( E . ˆ 3 ) ) . . . − 0 . 2 5 ∗ ( c0+j c u r ∗ ( x + 1 ) ) . ∗ gamma . ∗ E − 0 . 2 5 ∗ j c u r ; r e s ( 1 ) = −k c ∗ ( c0 +2∗ j c u r . . . +e p s i l o n ˆ 2 ∗ ( 2 ∗ gamma( 1 ) ˆ 2 ∗ E( 1 ) ˆ 2 . . . +4∗gamma( 1 ) ∗D ( 1 , : ) ∗ ( gamma. ∗ E ) ) ) . . . + j r − j cur ; r e s (N) = k c ∗ ( c0+e p s i l o n ˆ 2 ∗ ( 2 ∗gamma(N) ˆ 2 ∗E(N) ˆ 2 . . . +4∗gamma(N) ∗D(N , : ) ∗ ( gamma . ∗ E ) ) ) . . . − j r − j cur ; = norm ( r e s , i n f ) ; res norm ( ( res norm > r e s t o l ) & ( count < m a x i t e r s ) ) % c o n s t r u c t Jacobian f o r i n t e r i o r g r i d p o i n t s dc0 dE = −2∗ e p s i l o n ˆ2∗w . ∗ ( gamma. ∗ E ) ’ ; dc0 dE ( 1 ) = dc0 dE ( 1 ) + 2∗ e p s i l o n ˆ2∗gamma ( 1 ) ; dc0 dE (N) = dc0 dE (N) − 2∗ e p s i l o n ˆ2∗gamma(N ) ; J = e p s i l o n ˆ2∗ L∗ diag gamma . . . % u p d at e l o o p v a r i a b l e s res norm = norm ( r e s , i n f ) count = count + 1 end % Newton iteration % u p d at e c o n t i n u a t i o n i f ( j − j cu r < dj ) dj = j − j c ur ; end j cur = j cu r + dj ; loop variables end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % plot solution %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% figure (1); c lf ; p l o t ( x , E . ∗ gamma , ’ k − ’ ) ; a x i s ([ −1 1 −100 0 ] ) ; x l a b e l ( ’ x ’ ) ; y l a b e l ( ’E’ , ’ Rotation ’ , 0 ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % plot spectral c o e f f i c i e n t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c o e f s = ab s ( f f t ( [ E ; f l i p u d (E ( 2 : end − 1 ) ) ] ) ) ; figure (2); c lf ; s e m i l o g y ( c o e f s ( 1 : N) , ’ ko ’ ) ; a x i s ( [ 0 N 1 e −15 1 e4 ] ) ; x l a b e l ( ’ n ’ ) ; y l a b e l ( ’ | a n | ’ , ’ Rotation ’ , 0 , ’ P osi ti on ’ ,[ −25 5e − 6 ] ) ; K. T. Chu while 24 B. MATLAB Code for Electrochemical Thin-Film Example Sphere % construct gradient operator G = { kr on ( s p e y e ( n u m g r i d p t s t h e t a ) , D r ) , kr on ( D t h et a , o n e o v e r r ) } ; This code relies on cheb.m [ 41]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Parameters %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % p h y s i c a l parameters v = 0; E = 10; epsilon = 0.01; delta = 1; % N N L g r i d parameters r = 30; % number o f g r i d p o i n t s i n r a d i a l d i r e c t i o n t = 30; % number o f g r i d p o i n t s i n p o l a r a n g l e d i r e c t i o n r = 0.5; % s c a l e parameter i n r a d i a l d i r e c t i o n % c o n t i n u a t i o n parameters E s t a r t = 1 ; E f i n a l = E ; dE = 0 . 5 ; % Newton i t e r a t i o n p a r a m e t e r s r e s t o l = 1 e −8; d e l t a t o l = 1 e −13; m a x i t e r s = 2 0 ; % z e t a −p o t e n t i a l i t e r a t i o n p a r a m e t e r s z e t a m a x i t e r s = 2 0 ; z e t a d e l t a t o l = 1 e −13; % construct divergence operator D = { kr on ( s p e y e ( n u m g r i d p t s t h e t a ) , 2∗ o n e o v e r r + D r ) , . . . kr on ( o n e o v e r s i n t h e t a ∗ D t h e t a ∗ s i n t h e t a m a t , o n e o v e r r ) } ; z e t a r e s t o l = 1 e −9; % b ou n d ar y c o n d i t i o n s c i nf in ity = 1; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % C o n s t r u c t c o m p u t a t i o n a l g r i d and d i f f e r e n t i a t i o n o p e r a t o r s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % c o n s t r u c t the d i f f e r e n t i a t i o n matrix f o r the r a d i a l c o o r d i n a t e [ D y , y ] = ch eb ( N r ) ; o n e m i n u s y = s p d i a g s (1−y , 0 , N r +1 , N r + 1 ) ; D r = 0. 5/ L r ∗( one minus y ˆ2)∗ D y ; war n i n g o f f MATLAB: d i v i d e B y Z e r o r = L r ∗(1+y ) . / ( 1 − y ) ; war n i n g on MATLAB: d i v i d e B y Z e r o r = r +1; % s h i f t 0 t o 1 % c o n s t r u c t the d i f f e r e n t i a t i o n matrix f o r the p o l a r an gl e c o o r d i n a t e t h e t a = ( 2 ∗ [ 1 : N t ] ’ − 1 ) ∗ p i /2/ N t ; T = repmat ( t h e t a , 1 , N t ) ; c = ones ( 1 , N t ) . ∗ ( − 1 ) . ˆ ( [ 1 : N t ] + 1 ) ; off diag D = . . . repmat ( c , N t , 1 ) . ∗ s i n ( N t ∗T ) . ∗ s i n (T ’ ) . / ( c o s (T’) − c o s (T)+ e y e ( N t ) ) ; d i a g D = −0.5∗ c o t ( t h e t a ) ; D t h e t a = t r i u ( o f f d i a g D , 1 ) + t r i l ( o f f d i a g D , −1) + d i a g ( d i a g D ) ; num gridpts r = length ( r ) ; num gridpts theta = length ( theta ) ; n u m g r i d p t s = ( n u m g r i d p t s r −1)∗ N t ; n u m g r i d p t s i n t e r i o r = n u m g r i d p t s−N t ; % construct surface derivative operators D s = o n e o v e r s i n t h e t a ∗ D t h e t a ∗ s i n t h e t a m a t / r ( end ) ; G s = D t h e t a / r ( end ) ; % c o n s t r u c t n or m al d e r i v a t i v e o p e r a t o r % d/ dn = −d / d r a t r = 1 G n = −kr on ( s p e y e ( N t ) , D r ( end , : ) ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Construct m a t r i c e s to e x t r a c t s u b s e t s o f g r i d p o i n t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % c o n s t r u c t m a t r i c e s t o e x t r a c t t h e r ows c o r r e s p o n d i n g t o f i n i t e % grid points ( everything except f or r = i n f t y ) r f i n i t e p t r e s t r i c t o r = s p d i a g s ( ones ( n u m gri d p ts r −1 ,1) , 1 , . . . n u m g r i d p t s r −1, n u m g r i d p t s r ) ; f i n i t e p t r e s t r i c t o r = kr on ( s p e y e ( N t ) , r f i n i t e p t r e s t r i c t o r ) ; % c o n s t r u c t m a t r i x t o e x t r a c t t h e r ows c o r r e s p o n d i n g t o i n t e r i o r % g r i d p o i n t s ( e v e r y t h i n g e x c e p t f o r r = 1 and r = i n f t y ) r i n t e r i o r r e s t r i c t o r = s p d i a g s ( ones ( n u m gri d p ts r −2 ,1) , 1 , . . . n u m g r i d p t s r −2, n u m g r i d p t s r ) ; i n t e r i o r r e s t r i c t o r = kr on ( s p e y e ( N t ) , r i n t e r i o r r e s t r i c t o r ) ; % c o n s t r u c t m a t r i x t o e x t r a c t t h e r ows c o r r e s p o n d i n g t o r = 1 ( s u r f a c e ) % fr om a v e c t o r t h a t a l r e a d y h as r = i n f i n i t y removed r s u r f r e s t r i c t o r = s p a l l o c ( 1 , n u m gri d p ts r −1 ,1); r s u r f r e s t r i c t o r ( 1 , n u m g r i d p t s r −1) = 1 ; s u r f r e s t r i c t o r = kr on ( s p e y e ( N t ) , r s u r f r e s t r i c t o r ) ; % c o n s t r u c t m a t r i x t o e x t r a c t t h e r ows c o r r e s p o n d i n g r i n f r e s t r i c t o r = s p a l l o c (1 , num gridpts r , 1 ) ; r i n f r e s t r i c t o r (1 ,1) = 1; i n f r e s t r i c t o r = kr on ( s p e y e ( N t ) , r i n f r e s t r i c t o r ) ; to r = i n f t y % e x t r a c t part of G op er at or that co n t r i b u t e s to f i n i t e p oi n t s % using f i n i t e points G f = { f i n i t e p t r e s t r i c t o r ∗G{1}∗ f i n i t e p t r e s t r i c t o r ’ , . . . f i n i t e p t r e s t r i c t o r ∗G{2}∗ f i n i t e p t r e s t r i c t o r ’ } ; % % % D s p l i t t h e D o p e r a t o r s i n t o two p a r t s : ( 1 ) c o n t r i b u t i o n s fr om f i n i t e p o i n t s t o f i n i t e p o i n t s ( 2 ) c o n t r i b u t i o n s fr om i n f i n i t y t o f i n i t e p o i n t s f = { i n t e r i o r r e s t r i c t o r ∗D{1}∗ f i n i t e p t r e s t r i c t o r ’ , . . . i n t e r i o r r e s t r i c t o r ∗D{2}∗ f i n i t e p t r e s t r i c t o r ’ } ; D i n f = { i n t e r i o r r e s t r i c t o r ∗D{1}∗ i n f r e s t r i c t o r ’ , . . . i n t e r i o r r e s t r i c t o r ∗D{2}∗ i n f r e s t r i c t o r ’ } ; % % % G G s p l i t t h e G n o p e r a t o r s i n t o two p a r t s : ( 1 ) c o n t r i b u t i o n s fr om f i n i t e p o i n t s ( 2 ) c o n t r i b u t i o n s fr om i n f i n i t y n f = G n∗ f i n i t e p t r e s t r i c t o r ’ ; n i n f = G n∗ i n f r e s t r i c t o r ’ ; % split the Laplacian operators i n t o two p a r t s : 25 % c a c h e common e x p r e s s i o n s o ne o v er r = spdiags ( 1 . / r ,0 , num gridpts r , num gridpts r ) ; co s the t a = cos ( theta ) ; s in t h et a = sin ( theta ) ; c o s t h e t a f u l l = kr on ( c o s t h e t a , o n e s ( n u m g r i d p t s r − 1 , 1 ) ) ; s i n t h e t a f u l l = kr on ( s i n t h e t a , o n e s ( n u m g r i d p t s r − 1 , 1 ) ) ; sin theta mat = spdiags ( s in the ta , 0 , num gridpts theta , num gridpts theta ) ; one over sin theta = spdiags (1./ sin theta ,0 , . . . num gridpts theta , num gridpts theta ) ; % construct laplacian operators L = kr on ( s p e y e ( n u m g r i d p t s t h e t a ) , 2 ∗ o n e o v e r r ∗ D r + D r ˆ 2 ) . . . + kr on ( o n e o v e r s i n t h e t a ∗ D t h e t a ∗ s i n t h e t a m a t ∗ D t h et a , o n e o v e r r ˆ 2 ) ; Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. C. MATLAB Code for Double Layer Charging of Metal Colloid (1) (2) f = inf 26 % % L L c o n t r i b u t i o n s fr om f i n i t e p o i n t s t o f i n i t e p o i n t s c o n t r i b u t i o n s fr om i n f i n i t y t o f i n i t e p o i n t s i n t e r i o r r e s t r i c t o r ∗L∗ f i n i t e p t r e s t r i c t o r ’ ; = i n t e r i o r r e s t r i c t o r ∗L∗ i n f r e s t r i c t o r ’ ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % C o n t i n u a t i o n l o o p f o r Newton i t e r a t i o n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% E = E s t a r t ; c = ones ( num gridpts , 1 ) ; p s i = z e r o s ( num gridpts , 1 ) ; w h i l e ( E <= E f i n a l & dE > 0 ) % Show p r o g r e s s i n f o r m a t i o n mesg = s p r i n t f ( ’ E = %f ’ , E ) ; d i s p ( mesg ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % compute c o n s t a n t t e r m s i n F = ( F1 , F2 , H1 , H2 ) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% F1 con st term = c i n f i n i t y ∗( L i n f ∗ ones ( N t , 1 ) ) ; F 2 c o n s t t e r m = E∗ c i n f i n i t y ∗(− D i n f {1}∗ c o s t h e t a + D i n f {2}∗ s i n t h e t a ) ; H 2 con st term = − c i n f i n i t y ∗( G n i n f ∗ ones ( N t , 1 ) ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % compute c o n s t a n t p a r t s o f J a c o b i a n %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% D F1 D c con st = L f ; D F2 D c con st = . . . − D f {1}∗ s p d i a g s (E∗ c o s t h e t a f u l l , 0 , n u m g r i d p t s , n u m g r i d p t s ) . . . + D f {2}∗ s p d i a g s (E∗ s i n t h e t a f u l l , 0 , n u m g r i d p t s , n u m g r i d p t s ) ; D H 1 D c con st = s p a l l o c ( N t , n u m g r i d p t s , N t ) ; D H 1 D c con st ( : , n u m g r i d p t s r −1: n u m g r i d p t s r −1: end ) = . . . −s p d i a g s (E∗ c o s t h e t a , 0 , N t , N t ) ; D H 2 D c con st = −G n f ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % i n i t i a l i z e loop v a r ia b l e s using current % s o l u t i o n f o r c and p s i %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % e x t r a c t s u r f a c e c o n c e n t r a t i o n and p o t e n t i a l c s = c ( n u m g r i d p t s r −1: n u m g r i d p t s r −1: end ) ; p h i s = p s i ( n u m g r i d p t s r −1: n u m g r i d p t s r −1: end ) − E∗ c o s t h e t a ; % compute z e t a p o t e n t i a l zeta = computeZetaPotential( . . . v−p h i s , c s , d e l t a , z e t a r e s t o l , zeta delta tol , zeta max iters ) ; % c a c h e some common e x p r e s s i o n s l o g c s = log ( c s ) ; si nh z e ta ove r t wo = sinh ( zeta /2) ; c o s h z e t a o v e r t w o = cosh ( zeta / 2 ) ; % compute s u r f a c e c h a r g e d e n s i t y and e x c e s s q = −2∗ s q r t ( c s ) . ∗ s i n h z e t a o v e r t w o ; w = 4∗ s q r t ( c s ) . ∗ ( s i n h ( z e t a / 4 ) ) . ˆ 2 ; neutral ion concentration % b e g i n Newton i t e r a t i o n l o o p w h i l e ( r e s > r e s t o l && n o r m d e l t a s o l n > d e l t a t o l && c o u n t < m a x i t e r s ) % compute J a c o b i a n D z e t a D p s i = −1./(1+ d e l t a ∗ s q r t ( c s ) . ∗ c o s h z e t a o v e r t w o ) ; Dzeta Dc s = −d e l t a ∗ s i n h z e t a o v e r t w o . / s q r t ( c s ) . . . ./(1+ d e l t a ∗ s q r t ( c s ) . ∗ c o s h z e t a o v e r t w o ) ; DH1 Dc var = ( e p s i l o n ∗ D s ∗ ( . . . + spdiags (0.5∗ q ./ c s . ∗ ( G s∗ l o g c s ) . . . −s q r t ( c s ) . ∗ c o s h z e t a o v e r t w o . ∗ D z e t a D c s . ∗ ( G s ∗ l o g c s 0,N t , N t) . . . + sp d i ags ( q , 0 , N t , N t )∗ G s∗ sp d i ags ( 1 . / c s , 0 , N t , N t ) . . . + s p d i a g s ( 0 . 5 ∗ w. / c s . ∗ ( G s ∗ p h i s ) . . . +s q r t ( c s ) . ∗ s i n h z e t a o v e r t w o . ∗ D z e t a D c s . ∗ ( G s ∗ p h i s ) , 0,N t , N t) ) . . . − sp d i ags ( G n f ∗ psi , 0 , N t , N t ) )∗ s u r f r e s t r i c t o r ; D H 1 D p si var = e p s i l o n ∗ D s ∗ ( . . . − s p d i a g s ( s q r t ( c s ) . ∗ c o s h z e t a o v e r t w o . ∗ Dzeta Dpsi . ∗ ( G s∗ l o g c s 0,N t , N t) . . . + s p d i a g s (w, 0 , N t , N t ) ∗ G s . . . + s p d i a g s ( s q r t ( c s ) . ∗ s i n h z e t a o v e r t w o . ∗ Dzeta Dpsi . ∗ ( G s∗ p h i s ) , 0,N t , N t) ) ∗ surf restrictor . . . − sp d i ags ( c s , 0 , N t , N t )∗ G n f ; DH2 Dc var = e p s i l o n ∗ D s ∗ ( . . . + s p d i a g s ( 0 . 5 ∗ w. / c s . ∗ ( G s ∗ l o g c s ) . . . +s q r t ( c s ) . ∗ s i n h z e t a o v e r t w o . ∗ D z e t a D c s . ∗ ( G s ∗ l o g c s 0,N t , N t) . . . + s p d i a g s (w, 0 , N t , N t ) ∗ G s ∗ s p d i a g s ( 1 . / c s , 0 , N t , N t ) . . . + spdiags (0.5∗ q ./ c s . ∗ ( G s∗ phi s ) . . . −s q r t ( c s ) . ∗ c o s h z e t a o v e r t w o . ∗ D z e t a D c s . ∗ ( G s ∗ p h i s ) , 0,N t , N t) ) ∗ surf restrictor ; D H 2 D p si var = e p s i l o n ∗ D s ∗ ( . . . s p d i a g s ( s q r t ( c s ) . ∗ s i n h z e t a o v e r t w o . ∗ Dzeta Dpsi . ∗ ( G s∗ l o g c s 0,N t , N t) . . . + sp d i ags ( q , 0 , N t , N t )∗ G s . . . − s p d i a g s ( s q r t ( c s ) . ∗ c o s h z e t a o v e r t w o . ∗ Dzeta Dpsi . ∗ ( G s∗ p h i s ) , 0,N t , N t) ) ∗ surf restrictor ; J = [ D F1 D c con st , s p a l l o c ( n u m g r i d p t s i n t e r i o r , n u m g r i d p t s , 0 ) ; . . . ( D F2 D c con st . . . + D f {1}∗ s p d i a g s ( G f {1}∗ p s i , 0 , n u m g r i d p t s , n u m g r i d p t s ) . . . + D f {2}∗ s p d i a g s ( G f {2}∗ p s i , 0 , n u m g r i d p t s , n u m g r i d p t s ) ) , . . . ( D f {1}∗ s p d i a g s ( c , 0 , n u m g r i d p t s , n u m g r i d p t s ) ∗ G f {1} . . . + D f {2}∗ s p d i a g s ( c , 0 , n u m g r i d p t s , n u m g r i d p t s ) ∗ G f {2} ) ; . . . ( D H 1 D c con st + DH1 Dc var ) , D H 1 D p si var ; . . . ( D H 2 D c con st + DH2 Dc var ) , D H 2 D p si var ] ; ), ... ... ), ... ... ), ... ... ), ... ... % compute d e l t a s o l n d e l t a s o l n = −J\F ; % u p d at e s o l u t i o n c = c + d e l t a s o l n ( 1 : num gridpts ) ; p s i = p s i + d e l t a s o l n ( n u m g r i d p t s +1: end ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%% % u p d at e r e s i d u a l %%%%%%%%%%%%%%%%%%%%%%%%%%%% % e x t r a c t s u r f a c e c o n c e n t r a t i o n and p o t e n t i a l K. T. Chu % compute i n i t i a l r e s i d u a l F1 = F 1 c o n s t t e r m + L f ∗ c ; F2 = F 2 c o n s t t e r m + D f { 1} ∗ ( c . ∗ ( G f {1}∗ p s i −E∗ c o s t h e t a f u l l ) ) . . . + D f { 2} ∗ ( c . ∗ ( G f {2}∗ p s i+E∗ s i n t h e t a f u l l ) ) ; H1 = e p s i l o n ∗ D s ∗ ( q . ∗ ( G s ∗ l o g c s ) + w . ∗ ( G s ∗ p h i s ) ) . . . − c s . ∗ ( G n f ∗ p s i + E∗ c o s t h e t a ) ; H2 = e p s i l o n ∗ D s ∗ (w . ∗ ( G s ∗ l o g c s ) + q . ∗ ( G s ∗ p h i s ) ) . . . − G n f ∗c + H2 const term ; F = [ F1 ; F2 ; H1 ; H2 ] ; r e s = norm ( F , i n f ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Newton i t e r a t i o n l o o p %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% norm delta soln = 1; count = 0 ; % compute z e t a p o t e n t i a l zeta = computeZetaPotential( . . . v−p h i s , c s , d e l t a , z e t a r e s t o l , zeta delta tol , zeta max iters ) ; % c a c h e some common e x p r e s s i o n s l o g c s = log ( c s ) ; sinh z e t a ov er t wo = sinh ( zeta /2) ; c o s h z e t a o v e r t w o = cosh ( zeta / 2 ) ; % compute s u r f a c e c h a r g e d e n s i t y and e x c e s s q = −2∗ s q r t ( c s ) . ∗ s i n h z e t a o v e r t w o ; w = 4∗ s q r t ( c s ) . ∗ ( s i n h ( z e t a / 4 ) ) . ˆ 2 ; neutral ion concentration % compute r e s i d u a l F1 = F 1 c o n s t t e r m + L f ∗ c ; F2 = F 2 c o n s t t e r m + D f { 1} ∗ ( c . ∗ ( G f {1}∗ p s i −E∗ c o s t h e t a f u l l ) ) . . . + D f { 2} ∗ ( c . ∗ ( G f {2}∗ p s i+E∗ s i n t h e t a f u l l ) ) ; H1 = e p s i l o n ∗ D s ∗ ( q . ∗ ( G s ∗ l o g c s ) + w . ∗ ( G s ∗ p h i s ) ) . . . − c s . ∗ ( G n f ∗ p s i + E∗ c o s t h e t a ) ; H2 = e p s i l o n ∗ D s ∗ (w . ∗ ( G s ∗ l o g c s ) + q . ∗ ( G s ∗ p h i s ) ) . . . − G n f ∗c + H2 const term ; F = [ F1 ; F2 ; H1 ; H2 ] ; r e s = norm ( F , i n f ) ; % u p d at e n o r m d e l t a s o l n , cou n t , and r e s i d u a l n o r m d e l t a s o l n = norm ( d e l t a s o l n , i n f ) ; count = count + 1 ; % show s t a t s status = [ res end norm delta soln % end Newton iteration history count ] loop C.1. computeZetaPotential() max iters ) % i n i ti a l iz e iteration zeta = Psi ; % u s e P s i a s an i n i t i a l g u e s s f o r z e t a d e l t a z e t a = 1 ; n o r m d e l t a z e t a = norm ( d e l t a z e t a , i n f ) ; r e s = 1 ; n o r m r e s = norm ( r e s , i n f ) ; count = 0 ; r e s = z e t a + 2∗ d e l t a ∗ s q r t ( c s ) . ∗ s i n h ( z e t a / 2 ) − P s i ; end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Append v a l u e s a t i n f i n i t y t o r e s u l t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% c = fi n ite pt re stri cto r ’∗c ; c ( 1 : n u m g r i d p t s r : end ) = c i n f i n i t y ; psi = f i n i t e p t r e s t r i c t o r ’∗ psi ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Plot r e s u l t s %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% axis scale = 3; relative % concentration figure (2); c lf ; m i n c = min ( c ) ; max c = max ( c ) ; x scale = ax is sc a le ; y scale = a x i s sc al e /2; [ r r , t t ] = m e s h g r i d ( r , p i /2− t h e t a ) ; [ xx , yy ] = p o l 2 c a r t ( t t , r r ) ; s u r f ( xx , yy , r e s h a p e ( c ’ , N r +1 , N t ) ’ ) ; h o l d on ; s u r f t h e t a = p i /2 −[0; th eta ; p i ] ; [ s u r f x , s u r f y ] = p o l 2 c a r t ( s u r f t h e t a , ones ( s i z e ( s u r f t h e t a ) ) ) ; s u r f z = min c ∗ ones ( s i z e ( s u r f x ) ) ; p r o j c o l o r = [ 1 8 0 200 2 2 0 ] / 2 5 6 ; plot3 ( surf x , surf y , surf z , ’ k ’ ) ; f i l l 3 ( surf x , surf y , surf z , pr oj color ) ; xlabel ( ’x ’ ) ; ylabel ( ’ z ’ ) ; zlabel ( ’ c ’ , ’ rotation ’ ,0 , ’ position ’ ,[ −1.4 2 0 . 8 5 ] ) ; a x i s ( [ 0 x s c a l e − y s c a l e y s c a l e m i n c max c ] ) ; function zeta = computeZetaPotential ( . . . P si , c s , d e l t a , r e s t o l , d e l t a z e t a t o l , % u p d at e E i f ( E f i n a l − E< dE) dE = E f i n a l − E ; end E = E + dE ; % psi = potential figure (1); c lf ; m i n p s i = min ( p s i ) ; m a x p s i = max ( p s i ) ; x scale = ax is sc a le ; y scale = a x i s sc al e /2; [ r r , t t ] = m e s h g r i d ( r , p i /2− t h e t a ) ; [ xx , yy ] = p o l 2 c a r t ( t t , r r ) ; s u r f ( xx , yy , r e s h a p e ( p s i ’ , N r +1 , N t ) ’ ) ; h o l d on ; s u r f t h e t a = p i /2 −[0; th eta ; p i ] ; [ s u r f x , s u r f y ] = p o l 2 c a r t ( s u r f t h e t a , ones ( s i z e ( s u r f t h e t a ) ) ) ; s u r f z = mi n p si ∗ ones ( s i z e ( s u r f x ) ) ; p r o j c o l o r = [ 1 8 0 200 2 2 0 ] / 2 5 6 ; plot3 ( surf x , surf y , surf z , ’ k ’ ) ; f i l l 3 ( surf x , surf y , surf z , pr oj color ) ; xl abe l ( ’ x ’ ) ; yl abe l ( ’ z ’ ) ; z l a b e l ( ’\ psi ’ , ’ rotation ’ , 0 ) ; a x i s ( [ 0 x s c a l e −y s c a l e y s c a l e m i n p s i max psi ] ) ; to applied field % Newton i t e r a t i o n wh i l e ( norm res > r e s t o l & n o r m d e l t a z e t a > d e l t a z e t a t o l & count < m a x i t e r s ) J = 1 + d e l t a ∗ s q r t ( c s ) . ∗ cosh ( zeta / 2 ) ; d e l t a z e t a = −r e s . / J ; zeta = zeta + d el t a ze t a ; r e s = z e t a + 2∗ d e l t a ∗ s q r t ( c s ) . ∗ s i n h ( z e t a / 2 ) − P s i ; n o r m r e s = norm ( r e s , i n f ) ; n o r m d e l t a z e t a= norm ( d e l t a z e t a , i n f ) ; count = count + 1 ; end ... Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. c s = c ( n u m g r i d p t s r −1: n u m g r i d p t s r −1: end ) ; p h i s = p s i ( n u m g r i d p t s r −1: n u m g r i d p t s r −1: end ) − E∗ c o s t h e t a ; 27 28 K. T. Chu REFERENCES 1. T. M. Apostol, Calculus (Volume II), John Wiley & Sons, Inc., 1969. 2. V. Barcilon, D.-P. Chen, R. S. Eisenberg, Ion Flow Through Narrow Membrane Channels: Part II, SIAM J. Appl. Math. 52 (1992) 1405–1425. 3. V. Barcilon, D.-P. Chen, R. S. Eisenberg, J. W. Jerome, Qualitative Properties of Steady-State Poisson-Nernst-Planck Systems: Perturbation and Simulation Study, SIAM J. Appl. Math. 57 (1997) 631–648. 4. M. Z. Bazant, K. T. Chu, B. J. Bayly, Current-voltage relations for electrochemical thin films, SIAM J. Appl. Math. 65 (2005) 1463–1484. 5. M. Z. Bazant, T. M. Squires, Induced-Charge Electrokinetic Phenomena: Theory and Microfluidic Applications, Phys. Rev. Lett. 92 (2004) 066101. 6. J. P. Boyd, An Analytical and Numerical Study of the Two-Dimensional Bratu Equation, J. Sci. Comput. 1 (1986) 183–206. 7. J. P. Boyd, Solitons from Sine Waves: Analytical and Numerical Methods for Nonintegrable Solitary and Cnoidal Waves, Physica 21D (1986) 227–246. 8. J. P. Boyd, Chebyshev and Fourier Spectral Methods, 2nd ed., Dover Publications, Inc., Mineola, NY, 2001. 9. W. L. Briggs, V. E. Henson, S. F. McCormick, A Multigrid Tutorial, SIAM, 2000. 10. W. Chen, Jacobian matrix: a bridge between linear and nonlinear polynomial-only problems, arXiv:cs (1999) 9904006v1. 11. W. Chen, Relationship Theorem between Nonlinear Polynomial Equation and the Corresponding Jacobian Matrix, Int. J. of Nonlinear Sciences and Numerical Simulation 1 (2000) 5–14. 12. W. Chen, C. Shu, W. He, T. Zhong, The application of special matrix product to differential quadrature solution of geometrically nonlinear bending of orthotropic rectangular plates, Computers & Structures 74 (2000) 65–76. 13. W. Chen, T. Zhong, The Study on the Nonlinear Computations of the DQ and DC Methods, Numerical Methods for Partial Differential Equations 13 (1997) 57–75. 14. W. Chen, T. Zhong, Y. Yu, Applying special matrix product to nonlinear numerical computations, J. Appl. Comp. Math. 12 (1998) 51–58. 15. K. T. Chu, Asymptotic Analysis of Extreme Electrochemical Transport, Ph.D. thesis, Massachusetts Institute of Technology, Department of Mathematics (2005). 16. K. T. Chu, M. Z. Bazant, Electrochemical thin films at and above the classical limiting current, SIAM J. Appl. Math. 65 (2005) 1485–1505. 17. K. T. Chu, M. Z. Bazant, Nonlinear electrochemical relaxation around conductors, Phys. Rev. E 74 (2006) 011501. 18. K. T. Chu, M. Z. Bazant, Surface conservation laws at microscopically diffuse interfaces, J. Colloid Interface Sci. 315 (2007) 319–329. 19. T. F. Coleman, J. J. Moré, Estimation of sparse Jacobian matrices and graph coloring problems, SIAM J. Numer. Anal. 20 (1983) 187–209. 20. A. R. Curtis, M. J. D. Powell, J. K. Reid, On the estimations of sparse Jacobian matrices, J. Inst. Math. Appl. 13 (1974) 117–119. 21. P. Deuflhard, Newton Methods for Nonlinear Problems, Springer, Berlin, Germany, 2004. Direct Matrix Method for Computing Jacobians of Discretized Integro-diff. Eqs. 29 22. B. Fornberg, A Practical Guide to Pseudospectral Methods, Cambridge University Press, New York, NY, 1998. 23. B. Fornberg, A Pseudospectral Fictitious Point Method for High Order InitialBoundary Value Problems, SIAM J. Sci. Comput. 28 (2006) 1716–1729. 24. A. Griewank, A. Walther, Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, SIAM, Philadelphia, PA, 2008. 25. R. A. Horn, C. R. Johnson, Topics in Matrix Analysis, Cambridge University Press, 1991. 26. P. Hovland, B. Norris, Argonne national laboratory computational differentiation project, http://www-fp.mcs.anl.gov/autodiff/ (2006). 27. J. D. Jackson, Classical Electrodynamics, John Wiley & Sons, Inc., 1998. 28. C. T. Kelley, Iterative Methods for Solving Linear and Nonlinear Equations, SIAM, Philadelphia, PA, 1995. 29. C. T. Kelley, Solving Nonlinear Equations with Newton’s Method, SIAM, Philadelphia, PA, 2003. 30. C. T. Kelley, E. W. Sachs, A Quasi-Newton Method for Elliptic Boundary Value Problems, SIAM J. Numer. Anal. 24 (1987) 516–531. 31. A. N. Michel, C. J. Herget, Applied Algebra and Functional Analysis, Dover Publications, Inc., 1981. 32. B. J. Neudecker, N. J. Dudney, J. B. Bates, ‘Lithium-Free” Thin-Film Battery with in situ Plated Li Anode, J. Electrochem. Soc. 147 (2000) 517–523. 33. J. Newman, Electrochemical Systems, 2nd ed., Prentice-Hall, Inc., Englewood Cliffs, NJ, 1991. 34. J. M. Ortega, W. C. Rheinboldt, Iterative Solution of Nonlinear Equations in Several Variables, Academic Press, New York, NY, 1970. 35. J.-H. Park, J. W. Jerome, Qualitative Properties of Steady-State Poisson-NernstPlanck Systems: Mathematical Study, SIAM J. Appl. Math. 57 (1997) 609–630. 36. I. Rubinstein, Electro-Diffusion of Ions, SIAM Studies in Applied Mathematics, SIAM, Philadelphia, PA, 1990. 37. L. F. Shampine, R. Ketzscher, S. A. Forth, Using AD to solve BVPs in MATLAB, ACM T. Math. Software 31 (2005) 1–16. 38. T. M. Squires, M. Z. Bazant, Induced-charge electro-osmosis, J. Fluid Mech. 509 (2004) 217–252. 39. N. Takami, T. Ohsaki, H. Hasabe, M. Yamamoto, Laminated Thin Li-Ion Batteries Using a Liquid Electrolyte, J. Electrochem. Soc. 149 (2002) A9–A12. 40. A. E. Taylor, The Differential: Nineteenth and Twentieth Century Developments, Arch. Hist. Exact Sci. 12 (1974) 355–383. 41. L. N. Trefethen, Spectral Methods in MATLAB, SIAM, Philadelphia, PA, 2000. 42. B. Wang, J. B. Bates, F. X. Hart, B. C. Sales, R. A. Zuhr, J. D. Robertson, Characterization of Thin-Film Rechargeable Lithium Batteries with Lithium Cobalt Oxide Cathodes, J. Electrochem. Soc. 143 (1996) 3204–3213.
5cs.CE
ESTIMATING PARAMETERS ASSOCIATED WITH MONOTONE PROPERTIES arXiv:1707.08225v1 [math.CO] 25 Jul 2017 CARLOS HOPPEN, YOSHIHARU KOHAYAKAWA, RICHARD LANG, HANNO LEFMANN, AND HENRIQUE STAGNI Abstract. There has been substantial interest in estimating the value of a graph parameter, i.e., of a real-valued function defined on the set of finite graphs, by querying a randomly sampled substructure whose size is independent of the size of the input. Graph parameters that may be successfully estimated in this way are said to be testable or estimable, and the sample complexity qz = qz (ε) of an estimable parameter z is the size of a random sample of a graph G required to ensure that the value of z(G) may be estimated within an error of ε with probability at least 2/3. In this paper, for any fixed monotone graph property P = Forb(F), we study the sample complexity of estimating a bounded graph parameter zF that, for an input graph G, counts the number of spanning subgraphs of G that satisfy P. To improve upon previous upper bounds on the sample complexity, we show that the vertex set of any graph that satisfies a monotone property P may be partitioned equitably into a constant number of classes in such a way that the cluster graph induced by the partition is not far from satisfying a natural weighted graph generalization of P. Properties for which this holds are said to be recoverable, and the study of recoverable properties may be of independent interest. 1. Introduction and main results In the last two decades, a lot of effort has been put into finding constant-time randomized algorithms (conditional on sampling) to gauge whether a combinatorial structure satisfies some property, or to estimate the value of some numerical function associated with this structure. In this paper, we focus on the graph case and, as usual, we consider algorithms that have the ability to query whether any desired pair of vertices in the input graph is adjacent or not. Let G be the set of finite simple graphs and let G(V ) be the set of such graphs with vertex set V . We shall consider subsets P of G that are closed under isomorphism, which we call graph properties. To avoid technicalities, we restrict ourselves to graph properties P such that P ∩ G(V ) 6= ∅ whenever V 6= ∅. For instance, this includes all nontrivial monotone and hereditary graph properties, which are graph properties that are inherited by subgraphs and by induced subgraphs, respectively. Here, we will focus on monotone properties. The prototypical example of a monotone property is Forb(F ), Date: 2017/07/27, 12:23am. C. Hoppen acknowledges the support of FAPERGS (Proc. 2233-2551/14-9) and CNPq (Proc. 448754/2014-2 and 308539/2015-0). C. Hoppen and H. Lefmann acknowledge the support of CAPES and DAAD via PROBRAL (CAPES Proc. 408/13 and DAAD 57141126 and 57245206). C. Hoppen, Y. Kohayakawa and H. Stagni thank FAPESP (Proc. 2013/03447-6) and NUMEC/USP (Project MaCLinC/USP) for their support. Y. Kohayakawa was partially supported by FAPESP (2013/07699-0) and CNPq (310974/2013-5 and 459335/2014-6). H. Stagni was supported by FAPESP (2015/15986-4) and CNPq (141970/2015-4 and 459335/2014-6). R. Lang acknowledges support by Millennium Nucleus Information and Coordination in Networks ICM/FIC RC130003. Some results in this paper appeared in preliminary form in the Proceedings of APPROX/RANDOM 2016 [30]. 1 the class of all graphs that do not contain a copy of a fixed graph F . More generally, if P is a monotone property and F contains all minimal graphs that are not in P, then the graphs that lie in P are precisely those that do not contain a copy of an element of F. This class of graphs will be denoted by P = Forb(F). The elements of Forb(F) are said to be F-free. A graph property P is said to be testable if, for every ε > 0, there exist a positive integer qP = qP (ε), called the query complexity, and a randomized algorithm TP , called a tester, which may perform at most qP queries in the input graph, satisfying the following property. For an n-vertex input graph Γ, the algorithm TP distinguishes with probability at least 2/3 between the cases in which Γ satisfies P and in which Γ is ε-far from satisfying P, that is, in which no graph obtained from Γ by the addition or removal of at most εn2 /2 edges satisfies P. This may be stated in terms of graph distances: given two graphs Γ and Γ′ on the same vertex set V (Γ) = V (Γ′ ), we may define the normalized edit distance between Γ and Γ′ by d1 (Γ, Γ′ ) = |V2|2 |E(Γ)△E(Γ′ )|, where E(Γ)△E(Γ′ ) denotes the symmetric difference of their edge sets. If P is a graph property, we let the distance between a graph Γ and P be d1 (Γ, P) = min{d1 (Γ, Γ′ ) : V (Γ′ ) = V (Γ) and Γ′ ∈ P}.  For instance, if Γ = Kn and P = Forb(K3 ), Turán’s Theorem ensures that n2 − ⌊n2 /4⌋ edges need to be removed to produce a graph that is K3 -free. In particular, d1 (Kn , Forb(K3 )) → 1/2. Thus a graph property P is testable if there is a tester with bounded query complexity that distinguishes with probability at least 2/3 between the cases d1 (Γ, P) = 0 and d1 (Γ, P) > ε. The systematic study of property testing was initiated by Goldreich, Goldwasser and Ron [26], and there is a very rich literature on this topic. For instance, regarding testers, Goldreich and Trevisan [27] showed that it is sufficient to consider simpler canonical testers, namely those that randomly choose a subset X of vertices in Γ and then verify whether the induced subgraph Γ[X] satisfies some related property P ′ . For example, if the property being tested is having edge density 1/2, then the algorithm will choose a random subset X of appropriate size and check whether the edge density of Γ[X] is within, say, ε/2 of 1/2. Regarding testable properties, Alon and Shapira [6] proved that every monotone graph property is testable, and, more generally, that the same holds for hereditary graph properties [5]. For more information about property testing, we refer the reader to [25] and the references therein. In a similar vein, a function z : G → R from the set G of finite graphs into the real numbers is called a graph parameter if it is invariant under relabeling of vertices. A graph parameter z : G → R is estimable if for every ε > 0 and every large enough graph Γ with probability at least 2/3, the value of z(Γ) can be approximated up to an additive error of ε by an algorithm that only has access to a subgraph of Γ induced by a set of vertices of size qz = qz (ε), chosen uniformly at  random. The query complexity of such an algorithm is q2z and the size qz is called its sample complexity. Estimable parameters have been considered in [20] and were defined in the above level of generality in [12]. They are often called testable parameters. Borgs et al. [12, Theorem 6.1] gave a complete characterization of the estimable graph parameters which, in particular, also implies that the distance from monotone graph properties is estimable. Their work uses the concept of graph limits and does not give explicit bounds on the query complexity required for this estimation. 2 We obtain results for the bounded graph parameter, which, for a graph family F, counts the number of F-free spanning subgraphs of the input graph Γ. Recall that G′ = (V ′ , E ′ ) is a spanning subgraph of a graph G = (V, E) if V ′ = V and E ′ ⊆ E. Formally, given a graph Γ ∈ G and a family F of graphs, we denote the set of all F-free spanning subgraphs of Γ by Forb(Γ, F) = {G is a spanning subgraph of Γ: G ∈ Forb(F)}, and we consider the parameter 1 zF (Γ) = log2 | Forb(Γ, F)|. (1) |V (Γ)|2 For example, if F = {K3 } and Γ = Kn , computing zF requires estimating the number of K3 -free 2 subgraphs of Kn up to a multiplicative error of 2o(n ) : 1 n 1 2 1 1 log2 | Forb(Γ, F)| = 2 log2 2 2 ( 2 )+o(n ) → . 2 n n 4 This was done by Erdős, Kleitman and Rothschild for F = {Kk } [17], see also Erdős, Frankl and Rödl [16] for F -free subgraphs. Counting problems of this type were studied by several people. Consider for instance, the work of Prömel and Steger [34, 35], the logarithmic density in Bollobás [10], and some more recent results about the number of n-vertex graphs avoiding copies of some fixed forbidden graphs [8, 9]. Algorithmic aspects have been investigated by Duke, Lefmann and Rödl [15] and, quite recently, by Fox, Lovász and Zhao [22]. As it turns out, estimating graph parameters zF (Γ) is related to estimating distances of graphs from the corresponding graph property P = Forb(F). Alon, Shapira and Sudakov [7, Theorem 1.2] proved that the distance to every monotone graph property P is estimable using a natural algorithm, which simply computes the distance from the induced sampled graph to P. However, one disadvantage of this approach is that the accuracy of the estimate relies heavily on stronger versions of Szemerédi’s Regularity Lemma [36, 3]. Therefore, the query complexity is at least of the order TOWER(poly(1/ε)), by which we mean a tower of twos of height that is polynomial in 1/ε. Moreover, it follows from a result of Gowers [29] that any approach based on Szemerédi’s Regularity Lemma cannot lead to a bound that is better than TOWER(poly(1/ε)). In this paper, we introduce the concept of recoverable graph properties. Roughly speaking, given a function f : (0, 1] → R, we say that a graph property P is f -recoverable if every large graph G ∈ P is ε-close to admitting a partition V of its vertex set into at most f (ε) classes that witnesses membership in P, i.e., such that any graph that can be partitioned in the same way must be in P. zF (Kn ) = Theorem 1.1. Let Forb(F) be an f -recoverable graph property, for some function f : (0, 1] → R. Then, for all ε > 0 there is n0 such that, for any graph Γ with |V (Γ)| ≥ n0 , the graph parameter zF defined in (1) can be estimated within an additive error of ε with sample complexity poly(f (ε/6)/ε). Although one could apply strong versions of regularity to show that every monotone property Forb(F) is f -recoverable, this approach would provide an upper bound of at least TOWER(poly(ε−1 )) for the function f . We find a connection between this notion of recoverability and the graph Removal Lemma, which can lead to better bounds for the function f (ε). The Removal Lemma was first stated explicitly in the literature by Alon et al. [2] and by Füredi [24]. The following version, which holds for arbitrary families of graphs was first proven in [6]. 3 Lemma 1.2 (Removal Lemma). For every ε > 0 and every (possibly infinite) family F of graphs, there exist M = M (ε, F), δ = δ(ε, F) > 0 and n0 = n0 (ε, F) such that the following holds. If a graph G on n ≥ n0 vertices satisfies d1 (G, Forb(F)) ≥ ε, then there is F ∈ F with |V (F )| ≤ M such that G has at least δn|V (F )| copies of F .  Conlon and Fox [14] showed that Lemma 1.2 holds with δ−1 , n0 ≤ TOWER(poly(ε−1 )). Although this remains the best known bound for the general case, there are many families F for which Lemma 1.2 holds with a significantly better dependency on ε. For families F = {F } where F is an arbitrary graph, Fox [21] (see also [33]) showed that Lemma 1.2 holds with both δ−1 and n0 bounded by TOWER(O(log(ε−1 ))) — as a consequence, this same bound holds for every finite family F. Moreover if F is bipartite, than δ−1 and n0 are polynomial in ε−1 and, though it is not possible to get polynomial bounds when F is not bipartite (see [1]), the best known lower bound for δ−1 is only quasi-polynomial in ε−1 . Lemma 1.2 also holds with δ−1 , M, n0 ≤ poly(ε−1 ) for certain infinite families F. For instance, results from [26] provide such polynomial bounds when Forb(F) is the property of “being k-colorable” (for every positive integer k) or the property of “having a bisection of size at most ρn2 ” (for every ρ > 0) or many other properties that can be expressed as “partition problems”. We show that every monotone graph property Forb(F) is f -recoverable for some function f that is only exponential in the bounds given by the Removal Lemma for the family F. In fact, we use a weighted version of this lemma (see Lemma 3.6). Theorem 1.3. For every family F of graphs, the property Forb(F) is f -recoverable for f (ε) = n0 2poly(M/δ) , where δ, M and n0 are as in Lemma 3.6 with input F and ε. The case of F finite is an instance where the bounds given by Lemma 3.6 relate polynomially with the bounds of Lemma 1.2. In particular, Theorem 1.3, together with the abovementioned bounds for Lemma 1.2 obtained by Fox [21] for finite families F, implies that Forb(F) is f -recoverable with f (ε) = TOWER(poly(log(1/ε))). The remainder of the paper is structured as follows. In Section 2 we introduce notation and describe some tools that we use in our arguments. In Section 3, we introduce the concept of recoverable graph properties and prove Theorem 1.3. Theorem 1.1 is a consequence of Theorem 4.1, which is the main result in Section 4. In Section 5 we prove Theorem 3.2, which is the technical tool for establishing Theorem 4.1. We finish the paper with some concluding remarks in Section 6. 2. Notation and tools A weighted graph R over a (finite) set of vertices V is a symmetric function from V × V to [0, 1]. A weighted graph R may be viewed as a complete graph (with loops) in which a weight R(i, j) is given to each edge (i, j) ∈ V (R) × V (R), where V (R) denotes the vertex set of R. The set of all weighted graphs with vertex set V is denoted by G ∗ (V ) and we define G ∗ as the union of all G ∗ (V ) for V finite. In particular, a graph G is a weighted graph such that G(i, i) = 0, for every i ∈ V (G), and either G(i, j) = 1 or G(i, j) = 0 for every (i, j) ∈ V (G) × V (G), i 6= j. For a weighted graph P R ∈ G ∗ (V ) and for sets A, B ⊂ V , we denote eR (A, B) = (i,j)∈A×B R(i, j) and e(R) = e(V, V )/2. 4 Given a graph G = (V, E) and vertex sets U, W ⊆ V (G), let EG (U, W ) = {(u, w) ∈ E : u ∈ U, w ∈ W } and eG (U, W ) = |EG (U, W )|. An equipartition V = {Vi }ki=1 of a weighted graph R is a partition of its vertex set V (R) such that |Vi | ≤ |Vj | + 1 for all (i, j) ∈ [k] × [k]. We sometimes abuse terminology and say that V is a partition of R. Let V = {V1 , . . . , Vk } be an equipartition into k classes of a graph G = (V, E). The cluster graph of G by V is a weighted graph G/V ∈ G ∗ ([k]) such that G/V (i, j) = eG (Vi , Vj )/(|Vi ||Vj |) for all (i, j) ∈ [k] × [k]. For a fixed integer K > 0, the set of all equipartitions of a vertex set V into at most K classes will be denoted by ΠK (V ). We also define the set G/ΠK = { G/V : V ∈ ΠK (V (G))} of all cluster graphs of G whose vertex set has size at most K. The distance between two weighted graphs R, R′ ∈ G ∗ (V ) on the same vertex set V is given by X 1 d1 (R, R′ ) = |R(i, j) − R′ (i, j)|. |V |2 (i,j)∈V ×V For a property H ⊆ G ∗ of weighted graphs, i.e., for a subset of the set of weighted graphs which is closed under isomorphisms, we define d1 (R, H) = min R′ ∈H: V (R′ )=V (R) d1 (R, R′ ). Unless said otherwise, we will assume that H contains weighted graphs with vertex sets of all possible sizes. Next, to set up the version of regularity (or Regularity Lemma) that we use in this work, we use a second well-known distance between weighted graphs. Let R1 , R2 ∈ G ∗ (V ) be weighted graphs on the same vertex set. The cut-distance between R1 and R2 is defined as 1 d (R1 , R2 ) = max |eR1 (S, T ) − eR2 (S, T )|. |V |2 S,T ⊆V Let Γ ∈ G(V ) and V = {Vi }ki=1 be a partition of V . We define the weighted graph ΓV ∈ G ∗ (V ) as the weighted graph such that ΓV (u, v) = Γ/V (i, j) if u ∈ Vi and v ∈ Vj . Graph regularity lemmas ensure that, for any large graph Γ, there exists an equipartition V into a constant number of classes such that ΓV is a faithful approximation of Γ. Here, we use the regularity introduced by Frieze and Kannan [23]. Henceforth we write b = a ± x for a − x ≤ b ≤ a + x. Definition 2.1. A partition V = {Vi }ki=1 of a graph Γ is γ-FK-regular if d (Γ, ΓV ) ≤ γ, or, equivalently if for all S, T ⊆ V (Γ) it holds that X e(S, T ) = |S ∩ Vi ||T ∩ Vj | Γ/V (i, j) ± γ|V (Γ)|2 . (i,j)∈[k]×[k] The concept of F K-regularity is also known as weak regularity. Lemma 2.2 (Frieze-Kannan Regularity Lemma). For every γ > 0 and every k0 > 0, there is K = k0 · 2poly(1/γ) such that every graph Γ on n ≥ K vertices admits a γ-FK-regular equipartition into k classes, where k0 ≤ k ≤ K.  5 We remark that Conlon and Fox [13] found graphs where the number of classes in any γ-FK60 2 regular equipartition is at least 21/(2 γ ) (for an earlier result, see Lovász and Szegedy [32]). 3. Recoverable parameters The main objective of this section is to introduce the concept of ε-recoverability and to state our main results in terms of it. 3.1. Estimation over cluster graphs. For a weighted graph R ∈ G ∗ (V ) and a subset Q ⊆ V of vertices, let R[Q] denote the induced weighted subgraph of R with vertex set Q. Let us now define estimable parameters in the context of weighted graphs. Definition 3.1. We say that a function z : G ∗ → R (also called a weighted graph parameter) is estimable with sample complexity q : (0, 1) → N if, for every ε > 0 and every weighted graph Γ∗ ∈ G ∗ (V ) with |V | ≥ q(ε), we have z(Γ∗ ) = z(Γ∗ [Q]) ± ε with probability at least 2/3, where Q is chosen uniformly from all subsets of V of size q. The following result states that graph parameters, that can be expressed as the optimal value of some optimization problem over the set G/ΠK of all cluster graphs of G of vertex size at most K, can be estimated with a query complexity that is only exponential in a polynomial in K and in the error parameter. Theorem 3.2. Let z : G → R be a graph parameter and suppose that there is a weighted graph parameter z ∗ : G ∗ → R and constants K > 0 and c > 0 such that (1) z(Γ) = maxR∈ Γ/Π z ∗ (R) for every Γ ∈ G, and K (2) |z ∗ (R) − z ∗ (R′ )| ≤ c · d1 (R, R′ ) for all weighted graphs R, R′ ∈ G ∗ on the same vertex set. Then z is estimable with sample complexity ε 7→ poly(K, c/ε). The proof of Theorem 3.2 is rather technical and is therefore deferred to Section 5. Moreover, in Section 4 we show how to express the parameter zF introduced in (1), in terms of the solution of a suitable optimization problem over the set Γ/ΠK of cluster graphs of Γ of vertex size at most K. 3.2. Recovering partitions. We are interested in the property of graphs that are free of copies of members of a (possibly infinite) family F of graphs. To relate this property to a property of cluster graphs, we introduce some definitions. Let ϕ : V (F ) → V (R) be a mapping from the set of vertices of a graph F ∈ G to the set of vertices of a weighted graph R ∈ G ∗ . The homomorphism weight homϕ (F, R) of ϕ is defined as Y homϕ (F, R) = R(ϕ(i), ϕ(j)). (i,j)∈E(F ) The homomorphism density t(F, R) of F ∈ G in R ∈ G ∗ is defined as the average homomorphism weight of a mapping in Φ := {ϕ : V (F ) → V (R)}, that is, 1 X t(F, R) = homϕ (F, R). |Φ| ϕ∈Φ 6 Note that, if F and R are graphs, then t(F, R) is approximately the density of copies of F in R (and converges to this quantity when the vertex size of R tends to infinity). Since weighted graphs will represent cluster graphs associated with a partition of the vertex set of the input graph, it will be convenient to work with the following property of weighted graphs: Forb∗hom (F) = {R ∈ G ∗ : t(F, R) = 0 for every F ∈ F}. Let R, S ∈ G ∗ (V ) be weighted graphs on the same vertex set V . We say that S is a spanning subgraph of R, which will be denoted by S ≤ R, if S(i, j) ≤ R(i, j) for every (i, j) ∈ V × V . When there is no ambiguity, we will just say that S is a subgraph of R. We also define Forb∗hom (R, F) = {S ∈ Forb∗hom (F) : S ≤ R}. The following result shows that having a cluster graph in Forb∗hom (F) witnesses membership in Forb(F). Proposition 3.3. Let F be a family of graphs and let V be an equipartition of a graph G. If G/V ∈ Forb∗hom (F), then G ∈ Forb(F). Proof. Let V = {Vi }ki=1 be an equipartition of G and let R = G/V . Fix an arbitrary element F ∈ F and an arbitrary injective mapping ϕ : V (F ) ֒→ V (G). Define the function ψ : V (F ) → V (R) by ψ(v) = i if ϕ(v) ∈ Vi . Now, if t(F, R) = 0, there must be some edge (u, w) ∈ E(F ) such that R(ψ(u), ψ(w)) = 0, thus G(ϕ(u), ϕ(v)) = 0 and hence homϕ (F, G) = 0. Since ϕ and F were taken arbitrarily, we must have G ∈ Forb(F).  It is easy to see that the converse of Proposition 3.3 does not hold in general. Indeed, there exist graph families F and graphs G ∈ Forb(F) such that G/V is actually very far from being in Forb∗hom (F) for some equipartition V of G. As an example, let G be the n-vertex bipartite Turán graph T2 (n) for the triangle K3 with partition V (G) = A ∪ B and consider V = {Vi }ti=1 with Vi = Ai ∪ Bi , i = 1, . . . , t, where {Ai }ti=1 and {Bi }ti=1 are equipartitions of A and B respectively. Then G/V has weight 1/2 on every edge, so that the distance of G/V to the family Forb∗hom ({K3 }) tends to 1/4 for t large by Turán’s Theorem. More generally, if V is a random equipartition of a triangle-free graph G ∈ Forb({K3 }) with large edge density, then with high probability the cluster graph G/V is still approximately 1/4-far from being in Forb∗hom ({K3 }). On the other hand, we will prove that there exist partitions for graphs in Forb(F) with respect to which an approximate version of the converse of Proposition 3.3 does hold, that is, we will prove that every graph in Forb(F) is not too far from having a partition into a constant number of classes that witnesses membership in Forb(F). We say that such a partition is recovering with respect to Forb(F). Let us make this more precise. Definition 3.4. Let P = Forb(F) be a monotone graph property. An equipartition V of a graph G ∈ P is ε-recovering for P if d1 ( G/V , Forb∗hom (F)) ≤ ε. Definition 3.5. Let P be a graph property. For a fixed function f : (0, 1] → R, we say that the class P is f -recoverable if, for every ε > 0, there exists n0 = n0 (ε) such that the following holds. For every graph G ∈ P on n ≥ n0 vertices, there is an equipartition V of G into at most f (ε) classes which is ε-recovering for P. 7 As a simple example, one can verify that the graph property P = Forb(F) of being r-colorable is f -recoverable for f (ε) = r/ε; here and in what follows, for simplicity, we ignore divisibility conditions and drop floor and ceiling signs. Let G be a graph in P, with color classes C1 , . . . , Cr . Let k = r/ε. Start by fixing parts V1 , . . . , Vt of size n/k each, with each Vi contained in some Cj (j = j(i)), and leaving out fewer than n/k vertices from each Cj , 1 ≤ j ≤ r. The sets Vi , 1 ≤ i ≤ t, cover a subset Cj′ of Cj and Xj = Cj \ Cj′ is left over. We then complete the partition by taking S arbitrary parts U1 , . . . , Uk−t of size n/k each, forming a partition of 1≤j≤r Xj . The cluster graph G/V can be made r-partite by giving weight zero to every edge incident to vertices corresponding to U1 , . . . , Uk−t . Therefore G/V is at distance at most r/k ≤ ε from being r-partite. Thus, d1 ( G/V , Forb∗hom (F)) ≤ ε as required. We finish this section by noting that the definition of f -recoverable properties has some similarity with the notion of regular-reducible properties P defined by Alon, Fischer, Newman and Shapira [4]. When dealing with monotone properties P = Forb(F), the main difference is that the notion of being regular-reducible requires that every graph G ∈ P should have a regular partition such that G/V is close to some property H∗ of weighted graphs, while the definition of f -recoverable properties requires only that every G has a partition V (regular or not) such that G/V is close to Forb∗hom (F). Another difference is that H∗ must be such that having a (regular) cluster graph in H∗ witnesses only closeness to P, while having a (regular or not) cluster graph in Forb∗hom (F) witnesses membership in P. 3.3. Monotone graph properties are recoverable. Szemerédi’s Regularity Lemma [36] can be used to show that every monotone (and actually every hereditary) graph property is f -recoverable, for f (ε) = TOWER(poly(1/ε)). In the remainder of this section, we prove that monotone properties P = Forb(F) are recoverable using a weaker version of regularity along with the Removal Lemma, which leads to an improvement on the growth of f for families F where the Removal Lemma is known to hold with better bounds than the Regularity Lemma. We first derive a version of the Removal Lemma stated in the introduction (Lemma 1.2) that applies to weighted graphs and homomorphic copies. Lemma 3.6. For every ε > 0 and every (possibly infinite) family F of graphs, there exist δ = δ(ε, F), M = M (ε, F) and n0 = n0 (ε, F) such that the following holds. If a weighted graph R such that |V (R)| > n0 satisfies d1 (R, Forb∗hom (F)) ≥ ε, then there is a graph F ∈ F with |V (F )| ≤ M such that t(F, R) ≥ δ. To prove Lemma 3.6, we use the following auxiliary result, which follows from work of Erdős and Simonovits [18]. For completeness we include its proof. Proposition 3.7. Let Fb and F be graphs in G such that there is a surjective homomorphism b we must have t(F, H) ≥ δbℓ , ζ : V (F ) → V (Fb). Then, for every graph H such that t(Fb, H) ≥ δ, b where ℓ = (|V (F )| + 1)|V (F )| . Proof. We will consider the particular case in which F is obtained from blowing up a single vertex v of Fb into r distinct vertices v1 , . . . , vr with the same adjacency as v, hence we assume that ζ(vj ) = v for every j = 1, . . . , r and ζ(u) = u for every u ∈ / {v1 , . . . , vr }. 8 Let n = |V (H)|, b a = |V (Fb )|, a = |V (F )| = b a + r − 1 and Fb− = Fb − v be the graph on b a−1 b a −1 b b vertices obtained from F by deleting v. Let N = t(F− , H)n be the number of homomorphisms b− ) V ( F b from F− to H and ϕ1 , . . . , ϕN ∈ V (H) be an enumeration of such homomorphisms. Note that b a −1 b a −1 b b N ≤n and N ≥ t(F , H)/n ≥ δn . For every i ∈ [N ] and u ∈ V (H), we consider the function ϕui that extends ϕi by mapping v to u. Define Zi = {u ∈ V (H) : homϕui (Fb, H) = 1} and zi = |Zi |. We claim there are zir ways of extending ϕi to a homomorphism from F to H. Indeed, every possible extension ϕ′i : V (F ) → V (H) of ϕi , such that ϕ′i (vj ) ∈ Zi , for every j = 1, . . . , r, satisfies homϕ′i (F, H) = 1. Therefore we have P r r t(F, H)na ≥ N i=1 zi . Since g(x) = x is a convex function for x ≥ 0 and r ≥ 1, we get !r PN a i=1 zi t(F, H)n ≥ N . N PN b ba and our previous bounds on N to obtain that = t(Fb, H)nba ≥ δn !r b ba δn b ba−1 t(F, H)na ≥ δn = δbr+1 nba+r−1 = δbr+1 na . nba−1 Now we use the fact that i=1 zi Therefore, t(F, H) ≥ δbr+1 ≥ δba+1 . The general case may be easily obtained by induction on the number of vertices of Fb.  Proof of Lemma 3.6. Denote by Fb the set of all homomorphic images of members of F, that is, the set of all graphs Fb ∈ G such that there is a surjective homomorphism F → Fb, for some F ∈ F. c, δb and n Let M b0 be as in Lemma 1.2 with input Fb and ε/2. We take M= min |V (F )|, max F ∈F : b: Fb∈F c F → Fb |V (Fb)|≤M 2 c n0 = n b0 , δ = (ε/2)M δbℓ , where ℓ = (M + 1)M . Let R be a weighted graph such that |V (R)| > n0 and d1 (R, Forb∗hom (F)) ≥ ε. We first define a graph H ∈ G(V (R)) such that H(i, j) = 1 if and only if R(i, j) ≥ ε/2. It follows from d1 (R, Forb∗hom (F)) ≥ ε that d1 (H, Forb(Fb)) ≥ ε/2. Indeed, suppose to the contrary that there exists H ′ ∈ Forb(Fb) such that d1 (H, H ′ ) < ε/2. Define R′ such that R′ (i, j) = R(i, j) if H ′ (i, j) = 1 and R′ (i, j) = 0 otherwise. By construction, R′ ∈ Forb∗hom (F), and we get a contradiction from X 1 d1 (R, R′ ) = R(i, j) − R′ (i, j) 2 |V (R)| i∈V (R), j∈V (R) 1 = |V (R)|2    X     (i,j): R(i, j) − R′ (i, j) + X (i,j): H(i,j)=0, H ′ (i,j)=0 H(i,j)=1, H ′ (i,j)=0 9     R(i, j) − R′ (i, j)    ≤ 1 |V (H)|2 X H(i, j) − H ′ (i, j) + i∈V (H) j∈V (H) X ε 1 2 |V (R)| 2 i∈V (R) j∈V (R) ε < ε. 2 b By definition b with |V (Fb )| ≤ M c, such that t(Fb, H) ≥ δ. By Lemma 1.2 there must be Fb ∈ F, of M , there must be F ∈ F such that |V (F )| ≤ M and there is a surjective homomorphism F → Fb. It follows from Proposition 3.7 that t(F, H) ≥ δbℓ . Since = d1 (H, H ′ ) + 2 homϕ (F, R) ≥ (ε/2)|E(F )| homϕ (F, H) ≥ (ε/2)M homϕ (F, H) for each ϕ : V (F ) → V (R), we must have P  ε M 2 P homϕ (F, H)  ε M 2 ϕ homϕ (F, R) ϕ t(F, R) = ≥ ≥ · · δbℓ = δ. 2 2 |V (R)||V (F )| |V (H)||V (F )|  We will use the next result, which states that a graph has homomorphism densities close to the ones of the cluster graphs with respect to FK-regular partitions. Lemma 3.8 ([12, Theorem 2.7(a)]). Let V be a γ-FK-regular equipartition of a graph G ∈ G. Then, for any graph F ∈ G it holds that t(F, G) = t(F, GV ) ± 4e(F )γ = t(F, G/V ) ± 4e(F )γ.  We are now ready to prove Theorem 1.3, which establishes that every monotone graph property is f -recoverable. Proof of Theorem 1.3. Let δ, M and n0 be as in Lemma 3.6 with input F and ε and let γ = δ/(3M )2 . By Lemma 2.2, it suffices to show that any γ-FK-regular equipartition V = {Vi }ki=1 of a graph G ∈ Forb(F) into k ≥ n0 classes is ε-recovering. Let R = G/V and suppose for contradiction that d1 (R, Forb∗hom (F)) ≥ ε. Then, by Lemma 3.6, we have t(F, R) ≥ δ for some graph F ∈ F such that |F | ≤ M . By Lemma 3.8, we have t(F, G) ≥ δ − 2γM 2 > 0, a contradiction to G ∈ Forb(F).  4. Estimation of | Forb(Γ, F)| The objective of this section is to prove Theorem 1.1. To do this, we shall approximate the parameter zF by the solution of an optimization problem as in Theorem 3.2. Recall that Forb∗hom (R, F) = {S ≤ R : t(F, S) = 0 for every F ∈ F}, and set ex∗ (R, F) = 1 |V (R)|2 max S∈Forb∗hom (R,F ) e(S), which measures the largest edge density of a subgraph of R not containing a copy of any F ∈ F up to a multiplicative constant. We shall derive Theorem 1.1 from the following auxiliary result. Theorem 4.1. Let F be a family of graphs such that Forb(F) is f -recoverable for some function f : (0, 1] → R. Then, for any ε > 0, there exists K = f (poly(ε)) and N = poly(K) such that for 10 any graph Γ of vertex size n ≥ N it holds that log2 | Forb(Γ, F)| = max ex∗ (R, F) ± ε. n2 R∈ Γ/ΠK We define the following subsets of edges of a weighted graph R: E0 (R) = {(i, j) ∈ V (R) × V (R) : R(i, j) = 0} E1 (R) = {(i, j) ∈ V (R) × V (R) : R(i, j) > 0}. We will also make use of the binary entropy function, defined by H(x) = −x log2 (x) − (1 − x) log2 (1 − x) for 0 < x < 1. Note that H(x) ≤ −2x log2 x for x ≤ 1/8. This function has the property (cf. [31, Corollary 22.2]) that the following inequality holds for ε = k/n < 1/2: k   X n ≤ 2H(ε)n . (2) i i=0 Proof of Theorem 4.1. Let F be a family of graphs such that Forb(F) is f -recoverable, and fix ε > 0, without loss of generality ε < 1. Let ε′ = ε/18. Using that log2 x ≤ x − 1 for x < 1 and H(y) ≤ −2y log2 y for 0 < y ≤ 1/8, we infer H(ε′ )+ε′ ≤ −2ε′ log2 ε′ +ε′ ≤ 2ε′ (1−ε′ )+ε′ ≤ 3ε′ ≤ ε/6. We set K = f (ε′2 ) and N ≥ 2K 2 /ε big enough so that log2 N/N < ε/3. Let Γ be an n-vertex graph, n ≥ N . We first show that log2 | Forb(Γ, F)| ≥ max ex∗ (R, F) − ε. n2 R∈ Γ/ΠK Let R = Γ/V be an arbitrary cluster graph in Γ/ΠK with V = {Vi }ki=1 for k ≤ K. Choose S ∈ Forb∗hom (R, F) such that e(S) = k2 ex∗ (R, F). Further let G ≤ Γ be the subgraph of Γ such that G(r, s) = 0 if there is a pair (i, j) ∈ E0 (S) such that r ∈ Vi and s ∈ Vj and G(r, s) = Γ(r, s) otherwise. Thus, we obtain G by deleting all edges from Γ between Vi and Vj if (i, j) ∈ E0 (S). Since e(S) maximizes ex∗ (R, F) it follows that G/V = S, which implies, by Proposition 3.3, that G ∈ Forb(Γ, F). Since every subgraph of G also lies in Forb(Γ, F), we obtain log2 | Forb(Γ, F)| ≥ |e(G)| = 1 2 X S(i, j)|Vi ||Vj | ≥ (i,j)∈[k]×[k] (n − k)2 e(S) k2 ≥ ex∗ (R, F)n2 − kn ≥ (ex∗ (R, F) − ε)n2 . Note that we used the facts that e(S) ≤ k 2 /2 and n > k/ε, as well as |Vi | ≥ n/k − 1 for all i. Now let us prove the other direction log2 | Forb(Γ, F)| ≤ max ex∗ (R, F) + ε. n2 R∈ Γ/ΠK S We first define U = G∈Forb(Γ,F ) G/ΠK to be the set of all possible cluster graphs of vertex size at most K of graphs in Forb(Γ, F). Since Forb(F) is f -recoverable we can define a function η : Forb(Γ, F) → ΠK × U G 7→ (V, T ) 11 where V is an (ε′2 )-recovering partition of G into k ≤ K classes and T = G/V . Clearly | Forb(Γ, F)| ≤ |ΠK × U | · max |η −1 (V, T )|. (3) (V,T ) Since each mapping from V (Γ) → [K] gives a partition of V (Γ) into at most K classes, we have |ΠK | ≤ K n ≤ nn . Moreover, given an arbitrary graph G ∈ G(V ) and any partition V of V , an edge 2 G/V (i, j) may assume n2 different values. Hence, we have |U | ≤ n2K ≤ nn . Finally we make the following claim, whose proof is deferred for a moment: !   ε ∗ −1 log2 max |η (V, T )| ≤ max ex (R, F) + n2 . (4) 3 (V,T ) R∈ Γ/ΠK Combining this we can take the logarithm of (3) to get as desired: ε log2 | Forb(Γ, F)| ≤ log2 (nn ) + log2 (nn ) + max ex∗ (R, F) + 3 R∈ Γ/ΠK ! max ex∗ (R, F) + ε n2 ≤ R∈ Γ/ΠK ! n2 (as log2 n/n ≤ ε/3). It remains to prove (4). To this end, fix (V, T ) in the image of η and let R = Γ/V . Choose ∈ Forb∗ (R, F) such that d1 (T, S ′ ) ≤ ε′2 . This is possible because V is an (ε′2 )-recovering partition. Set E1 = E1 (S ′ ) and partition E0 (S ′ ) into E0+ := {(i, j) ∈ E0 (S ′ ) : T (i, j) > ε′ } and  i ||Vj |R(i,j) ways to choose |Vi ||Vj |T (i, j) edges out E0− = E0 (S ′ ) \ E0+ . Since there are b(i, j) := |V |Vi ||Vj |T (i,j) of the |Vi ||Vj |R(i, j) edges between Vi and Vj in Γ, we obtain Y Y p Y Y |η −1 (V, T )| ≤ b(i, j) ≤ b(i, j) b(i, j) b(i, j). (5) S′ 1≤i<j≤k (i,j)∈E0+ (i,j)∈E1 (i,j)∈E0− Let us estimate the factors of (5): We can bound each of the factors b(i, j) of E1 by 2R(i,j)|Vi ||Vj | . Since d1 (T, S ′ ) ≤ ε′2 we have |E0+ | ≤ ε′ k2 , as otherwise it would be the case that X d1 (T, S ′ ) ≥ |T (i, j) − S ′ (i, j)| > |E0+ |ε′ ≥ ε′2 k2 , (i,j)∈E0+ which is a contradiction. Clearly, we have |E0− | ≤ k2 . This allows us to upper bound each of the ′ factors of E0+ trivially by 2|Vi ||Vj | , and each of the factors of E0− by 2H(ε )|Vi ||Vj | using (2). Now let S ∈ Forb∗ (R, F) be such that  0 if (i, j) ∈ E0 (S ′ ) S(i, j) = R(i, j) otherwise. Taking the logarithm of (5) and using |Vi ||Vj | ≤ (n + k)2 /k2 we get X X R(i, j) |Vi ||Vj | + H(ε′ )|Vi ||Vj | + log2 |η −1 (V, T )| ≤ 2 − (i,j)∈E1 (i,j)∈E0 12 X (i,j)∈E0+ |Vi ||Vj | ≤  X (i,j)∈E1 ≤  1 2k2 R(i, j) + 2k2 X (i,j)∈E1 X (i,j)∈E0− H(ε′ ) + k2 X (i,j)∈E0+  S(i, j) + H(ε′ ) + ε′ (n + k)2 . 1 (n + k)2 k2 Now by using the fact that S ∈ Forb∗ (R, F) and that H(ε′ ) + ε′ ≤ ε/6 we infer   ε ε 2 log2 |η −1 (V, T )| ≤ ex∗ (R, F) + (n + k)2 ≤ ex∗ (R, F) + n , 6 3 which implies (4).  Proof of Theorem 1.1. Let F be a family of graphs such that Forb(F) is f -recoverable. Set K = f (poly(ε)) and N = poly(K) given by Theorem 4.1 applied to ε/3. Theorem 4.1 ensures that, whenever Γ is a graph on n ≥ N vertices, we have log2 | Forb(Γ, F)| ε − max ex∗ (R, F) ≤ . 2 n 3 R∈ Γ/ΠK (6) Let zb: G → R be the graph parameter defined by zb(Γ) = maxR∈ Γ/Π z ∗ (R), where z ∗ (R) = K We claim that, given R and R′ in G ∗ (V ), we have |z ∗ (R) − z ∗ (R′ )| ≤ d1 (R, R′ ). Indeed, assume without loss of generality that z ∗ (R) ≥ z ∗ (R′ ) and fix a subgraph S ≤ R such that S ∈ Forb∗hom (R, F) and z ∗ (R) = e(S)/|V |2 . If S ∈ Forb∗hom (R′ , F), we are done, so assume that this is not the case. Let S ′ be a subgraph of S and R′ maximizing e(S ′ ), that is, S ′ (i, j) = min{S(i, j), R′ (i, j)}. Clearly, ex∗ (R, F). e(S ′ ) ≥ e(S) − 1 2 X R(i, j) − R′ (i, j) =e(S) − (i,j)∈V ×V |V |2 d1 (R, R′ ), 2 so that 0 ≤ z ∗ (R) − z ∗ (R′ ) ≤ (e(S) − e(S ′ )) /|V |2 ≤ 12 d1 (R, R′ ). This allows us to apply Theorem 3.2 to conclude that zb is estimable with sample complexity q(ε) = poly(K, 1/ε). Let Q be chosen uniformly from all subsets of V of size q ′ = max{q(ε/3), N } and set Γ = Γ[Q]. It follows that, with probability at least 2/3, we have |b z (Γ) − zb(Γ)| ≤ ε/3. By (6) −2 we have n log2 | Forb(Γ, F)| − zb(Γ) ≤ ε/3. On the other hand, we can also apply (6) to Γ to obtain zb(Γ) − q ′ −2 log2 | Forb(Γ, F)| ≤ ε/3. By adding the last three inequalities, we get that 1 1 log2 | Forb(Γ, F)| − ′ 2 log2 | Forb(Γ, F)| ≤ ε, 2 n q as required.  5. Proof of Theorem 3.2 Here we will prove Theorem 3.2. Its proof is based on the following lemma, which asserts that the set of cluster graphs of a graph Γ is very ‘similar’ to the set of cluster graphs of ‘large enough’ samples of Γ. 13 Lemma 5.1. Given K > 0, ε > 0 there is q = poly(K, 1/ε) such that the following holds. Consider a graph Γ whose vertex set V has cardinality n ≥ q and a random subgraph Γ = Γ[V ], where V is chosen uniformly from all subsets of V of size q. Then, with probability at least 2/3, we have (1) for each V ∈ ΠK (V ), there is a V ∈ ΠK (V ) with d1 ( Γ/V , Γ/V ) ≤ ε, and (2) for each V ∈ ΠK (V ), there is a V ∈ ΠK (V ) with d1 ( Γ/V , Γ/V ) ≤ ε. For a set of vertices V and an integer k, define Π=k (V ) as the set of all equipartitions of V of size exactly k. For every R ∈ G ∗ ([k]) and ε ≥ 0, we define the property (ε) GR = {G ∈ G : ∃V ∈ Π=k (V (G)) such that d1 ( G/V , R) ≤ ε} (ε) of all graphs admitting a reduced graph which is ε-close to R. Note that GR contains no graphs (ε) (ε) of size less than k. In particular, if |V (G)| < k, then d1 (G, GR ) = ∞. Since we will compare GR only with large graphs, this is not a problem. The following theorem is a consequence of a more general result of [19, Theorem 2.7]. For our application it suffices to state this result in the case of simple graphs (r = 2, s = 1) with density tensor Ψ = {S ∈ G ∗ ([k]) : d1 (R, S) ≤ ε}. Theorem 5.2 ([19, Theorem 2.7]). For every positive integer k, and every ε > 0 and δ > 0, there is q ′ = q ′ (k, ε, δ) = log3 (δ−1 ) · poly(k, ε−1 ) such that the following holds. For every R ∈ G ∗ ([k]) there is a randomized algorithm T which takes as input an oracle access to a graph G of size at least k and satisfies the following properties: (ε) (1) If G ∈ GR , then T accepts G with probability at least 1 − δ. (ε) (2) If d1 (G, GR ) > ε, then T rejects G with probability at least 1 − δ. The query complexity of T is bounded by q ′ .  Corollary 5.3. For every positive integer k, and any ε > 0 and δ > 0, there is an integer q = q5.3 (k, ε, δ) = poly(k, 1/ε, log 3 (1/δ)) such that for every R ∈ G ∗ ([k]) and every graph G ∈ G(V ), with |V | ≥ q, we have (ε) (ε) (1) If G ∈ GR , then P(d1 (G[Q], GR ) > ε) < δ. (ε) (ε) (2) If d1 (G, GR ) > ε, then P(G[Q] ∈ GR ) < δ. (ε) Proof. Fix R ∈ G ∗ ([k]) and let T be a tester for the property GR as in the statement of Theorem 5.2, with query complexity q ′ (k, ε, δ). It follows from a result of Goldreich and Trevisan [27, Theorem 2] (see also [28]), that there is (ε) canonical tester T ′ for GR with sample complexity q(k, ε, δ) = poly(q ′ (k, ε, δ)), i.e., a tester that  simply chooses a set Q ∈ Vq uniformly at random and then accepts the input if and only if G[Q] satisfies a certain property Acc of graphs of size q. (ε) / Acc) < δ. Moreover, if Q is a set of size q such To prove (1), if G ∈ GR then we get P(G[Q] ∈ (ε) / Acc — because G[Q] must be rejected (with probability 1) that d1 (G[Q], GR ) > ε, then G[Q] ∈ (ε) when given as input to T . So P(d1 (G[Q], GR ) > ε) < δ. 14 (ε) Analogously, if d1 (G, GR ) > ε, then P(G[Q] ∈ Acc) < δ. Moreover, if Q is a set of size q such (ε) that G[Q] ∈ GR , then G[Q] ∈ Acc — because G[Q] must be accepted (with probability 1) when (ε)  given as input to T . So P(G[Q] ∈ GR ) < δ. Lemma 5.4. For n > 2k, let G1 , G2 ∈ G(V ) with |V | = n and let V ∈ Π=k (V ). Then, it is d1 ( G1/V , G2/V ) ≤ d1 (G1 , G2 ) + 2k/(n − 2k).  Proof. d1 ( G1/V , G2/V ) = ≤ ≤ ≤ = 1 k2 1 k2 X X  |eG1 (Vi , Vj ) − eG2 (Vi , Vj )| (n−k)2 k2 (i,j)∈[k]2 1 (n − k)2  | G1/V (i, j) − G2/V (i, j)| (i,j)∈[k]2 X |G1 (u, v) − G2 (u, v)| (i,j)∈[k]2 u∈Vi v∈Vj 2k 1+ n − 2k 1+ X 2k n − 2k   1 n2 X (u,v)∈V |G1 (u, v) − G2 (u, v)| 2 d1 (G1 , G2 ).  2 1 · (ε/4)K and Proof of Lemma 5.1. Fix ε > 0 and K as in the statement of the lemma. Let δ = 6K take    8K 1 q = max + 2K, q5.3 K, ε, δ = poly(K, ε). ε 4 Let 1 ≤ k ≤ K. Fix a family R ⊆ G ∗ ([k]) such that, for every S ∈ G ∗ ([k]), there is R ∈ R such 2 that d1 (R, S) ≤ ε/4. There is one such family with cardinality at most (4/ε)k .  Let Γ be a graph with vertex set V , where |V | ≥ q. Let Q ∈ Vq be chosen uniformly at random and consider the following events   (1) E ′ = ∃V ∈ Π=k (V ) satisfying d1 ( Γ/V , Γ[Q]/V ′ ) > ε for every V ′ ∈ Π=k (Q) ,   (2) E = ∃V ′ ∈ Π=k (Q) satisfying d1 ( Γ/V , Γ[Q]/V ′ ) > ε for every V ∈ Π=k (V ) . We claim that these two events occur each with probability less than 1/(6K). It then follows by taking the union bound over k = 1, . . . K, that Q satisfies both (1) and (2) of the statement of Lemma 5.1 with probability at least 1 − 1/6 − 1/6 = 2/3. We only prove that P(E) ≤ 1/(6K). An analogous argument shows that P(E ′ ) ≤ 1/(6K). Suppose that event E happens and let V ′ ∈ Π=k (Q) be as in (2). Define S = Γ[Q]/V ′ and let (ε) (0) / GS , the triangle inequality implies R ∈ R be such that d1 (R, S) ≤ ε/4. Since Γ[Q] ∈ GS and Γ ∈ (3ε/4) (ε/4) . Therefore and Γ ∈ / GR that Γ[Q] ∈ GR   (3ε/4) (ε/4) . and Γ ∈ / GR P(E) ≤ P ∃R ∈ R : Γ[Q] ∈ GR 15 (ε/4) (3ε/4) , then d1 (Γ, GR ) > ε/4. To show this, consider the contrapositive We claim that if Γ ∈ / GR (ε/4) ′ such that d1 (Γ, Γ′ ) ≤ ε/4. By definition there is an equipartition statement and let Γ ∈ GR V ′ ∈ Π=k (V ) such that d1 ( Γ′/V ′ , R) ≤ ε/4. In addition Lemma 5.4 implies that ′ d1 ( Γ/V ′ , Γ /V ′ ) ≤ d1 (Γ, Γ′ ) + 2k/(|V | − 2k) ≤ ε/4 + 2K/(q − 2K) ≤ ε/2. It follows from the triangle inequality that d1 ( Γ/V ′ , R) ≤ 3ε/4. Therefore   (ε/4) (ε/4) P(E) ≤ P ∃R ∈ R : Γ[Q] ∈ GR and d1 (Γ, GR ) > ε/4  X  (ε/4) (ε/4) and d1 (Γ, GR ) > ε/4 ≤ P Γ[Q] ∈ GR R∈R ≤ δ|R| ≤ 1/(6K) (ε/4) where the last line comes from Corollary 5.3(2) with d1 (Γ, GR ) > ε/4.  We now deduce Theorem 3.2 from Lemma 5.1. Proof of Theorem 3.2. Fix ε > 0 and an input graph Γ ∈ G(V ). Let q be as in Lemma 5.1 with input K and ε/c. Choose Q uniformly from all subsets of V of size q and set Γ = Γ[Q]. We will show that z(Γ) = z(Γ) ± ε with probability at least 2/3. Let V ∈ ΠK (V ) be an equipartition of Γ such that z(Γ) = z ∗ ( Γ/V ). By Lemma 5.1(1), with probability at least 2/3, there is a partition V of Γ such that d1 ( Γ/V , Γ/V ) < ε/c. By the second condition on z ∗ in the statement of Theorem 3.2, we have |z ∗ ( Γ/V ) − z ∗ ( Γ/V )| ≤ ε, and therefore z(Γ) ≤ z ∗ ( Γ/V ) ≤ z ∗ ( Γ/V ) + ε = z(Γ) + ε. A symmetric argument relying on Lemma 5.1(2) shows that z(Γ) ≤ z(Γ) + ε.  6. Concluding remarks In this paper, we introduced the concept of f -recoverability of a graph property P. Using this concept, and the fact that any monotone property P = Forb(F) is recoverable for a function f whose size is given by the Graph Removal Lemma, we found a probabilistic algorithm to estimate the number of F-free subgraphs of a large graph G whose sample complexity does not depend on regularity. Being a new concept, little is known about f -recoverability itself, and we believe that it would be interesting to investigate this notion in more detail. For instance, in our proof that any monotone property Forb(F) is f -recoverable, we found ε-recovering partitions V that were γ-FK-regular (in fact, we showed that any such partition is ε-recovering), where γ(ε) is chosen in such a way that the Removal Lemma applies. On the other hand, our discussion after Definition 3.5 implies that the property of being r-colorable is ε-recoverable with sample complexity r/ε, and thus we may find an ε-recovering partition whose size is less than the size required to ensure the existence of an FK-regular partition. It is natural to ask for properties that can be recovered by small partitions; more precisely, one could ask for a characterization of properties that are f (ε)-recoverable for f (ε) polynomial in 1/ε. 16 Here, we restricted ourselves to monotone graph properties. We should mention that the parameter 1 zc log2 |{G ≤ Γ : G ∈ P}| P (Γ) = |V (Γ)|2 might not even be estimable for arbitrary (non-monotone) properties P. For instance, if P is the hereditary property of graphs having no independent sets of size three, then the complete graph Kn and the graph Kn − E(K3 ), which is obtained from Kn by removing the edges of a 2 triangle, have quite a different number of spanning subgraphs satisfying P, namely 2n /4 and 0, respectively, although their edit distance is negligible. It follows from [12, Theorem 6.1] that zc P is not estimable. Nevertheless, the definition of f -recoverable can be extended to cope with general hereditary properties, which, along with Theorem 3.2, provides a way of estimating other interesting hereditary properties. In particular, this framework is used in a follow-up paper to estimate the edit distance to any fixed hereditary property with a sample complexity similar to the one obtained here. We should mention here that, given a monotone property Forb(F), the parameter zF is actually closely related to the parameter dF : Γ 7→ d1 (Γ, Forb(F)). In fact, ε-recovering partitions along with techniques analogous to the ones used in [11] can be used to show that, for any graph Γ = (V, E), we have 2|E| dF (Γ) = − 2zF (Γ) ± o(1), |V |2 which implies that estimating zF provides an indirect way for estimating dF . References 1. Noga Alon, Testing subgraphs in large graphs, Random Structures Algorithms 21 (2002), no. 3-4, 359–370, Random Structures and Slgorithms (Poznan, 2001). 2. Noga Alon, Richard A. Duke, Hanno Lefmann, Vojtěch Rödl, and Raphael Yuster, The Algorithmic Aspects of the Regularity Lemma, Journal of Algorithms 16 (1994), no. 1, 80–109. 3. Noga Alon, Eldar Fischer, Michael Krivelevich, and Mario Szegedy, Efficient testing of large graphs, Combinatorica 20 (2000), no. 4, 451–476. 4. Noga Alon, Eldar Fischer, Ilan Newman, and Asaf Shapira, A combinatorial characterization of the testable graph properties: it’s all about regularity, SIAM J. Comput. 39 (2009), no. 1, 143–167. 5. Noga Alon and Asaf Shapira, A characterization of the (natural) graph properties testable with one-sided error, SIAM Journal on Computing 37 (2008), no. 6, 1703–1727. 6. , Every monotone graph property is testable, SIAM J. Comput. 38 (2008), no. 2, 505–522. 7. Noga Alon, Asaf Shapira, and Benny Sudakov, Additive approximation for edge-deletion problems, Annals of Mathematics 170 (2009), no. 1, 371–411. 8. József Balogh, Béla Bollobás, and Miklós Simonovits, The number of graphs without forbidden subgraphs, Journal of Combinatorial Theory, Series B 91 (2004), no. 1, 1–24. 9. József Balogh and Wojciech Samotij, The number of Ks,t -free graphs, J. Lond. Math. Soc. (2) 83 (2011), no. 2, 368–388. 10. Béla Bollobás, Hereditary properties of graphs: Asymptotic enumeration, global structure, and colouring, Documenta Mathematica (1998), 333–342. 11. Béla Bollobás and Andrew Thomason, Hereditary and monotone properties of graphs, The mathematics of Paul Erdős, II, Algorithms Combin., vol. 14, Springer, Berlin, 1997, pp. 70–78. 17 12. Christian Borgs, Jennifer T. Chayes, László Lovász, Vera T. Sós, and Katalin Vesztergombi, Convergent sequences of dense graphs. I. Subgraph frequencies, metric properties and testing, Adv. Math. 219 (2008), no. 6, 1801–1851. 13. David Conlon and Jacob Fox, Bounds for graph regularity and removal lemmas, Geom. Funct. Anal. 22 (2012), no. 5, 1191–1256. 14. , Graph removal lemmas, Surveys in combinatorics 2013, London Math. Soc. Lecture Note Ser., vol. 409, Cambridge Univ. Press, Cambridge, 2013, pp. 1–49. 15. Richard A. Duke, Hanno Lefmann, and Vojtěch Rödl, A fast approximation algorithm for computing the frequencies of subgraphs in a given graph, SIAM J. Comput. 24 (1995), no. 3, 598–620. 16. Paul Erdős, Péter Frankl, and Vojtěch Rödl, The asymptotic number of graphs not containing a fixed subgraph and a problem for hypergraphs having no exponent, Graphs and Combinatorics 2 (1986), no. 1, 113–121. 17. Paul Erdős, Daniel J. Kleitman, and Bruce L. Rothschild, Asymptotic enumeration of Kn -free graphs, Colloquio Internazionale sulle Teorie Combinatorie (Rome, 1973), Tomo II, Accad. Naz. Lincei, Rome, 1976, pp. 19–27. Atti dei Convegni Lincei, No. 17. 18. Paul Erdős and Miklós Simonovits, Supersaturated graphs and hypergraphs, Combinatorica 3 (1983), no. 2, 181– 192. 19. Eldar Fischer, Arie Matsliah, and Asaf Shapira, Approximate hypergraph partitioning and applications, SIAM J. Comput. 39 (2010), no. 7, 3155–3185. 20. Eldar Fischer and Ilan Newman, Testing versus estimation of graph properties, SIAM J. Comput. 37 (2007), no. 2, 482–501. 21. Jacob Fox, A new proof of the graph removal lemma, Ann. of Math. (2) 174 (2011), no. 1, 561–579. 22. Jacob Fox, László Miklós Lovász, and Yufei Zhao, On Regularity Lemmas and their Algorithmic Applications, Combin. Probab. Comput. 26 (2017), no. 4, 481–505. 23. Alan Frieze and Ravi Kannan, Quick approximation to matrices and applications, Combinatorica 19 (1999), no. 2, 175–220. 24. Zoltán Füredi, Proceedings of the International Congress of Mathematicians: August 3–11, 1994 Zürich, Switzerland, ch. Extremal Hypergraphs and Combinatorial Geometry, pp. 1343–1352, Birkhäuser Basel, Basel, 1995. 25. Oded Goldreich (ed.), Property testing - current research and surveys [outgrow of a workshop at the Institute for Computer Science (ITCS) at Tsinghua University, January 2010], Lecture Notes in Computer Science, vol. 6390, Springer, 2010. 26. Oded Goldreich, Shari Goldwasser, and Dana Ron, Property testing and its connection to learning and approximation, J. ACM 45 (1998), no. 4, 653–750. 27. Oded Goldreich and Luca Trevisan, Three theorems regarding testing graph properties, Random Struct. Algorithms 23 (2003), no. 1, 23–57. 28. , Errata to the paper: Three theorems regarding testing graph properties, (2005), http://www.wisdom.weizmann.ac.il/~ oded/PS/tt-err.ps. 29. William T. Gowers, Lower bounds of tower type for Szemerédi’s uniformity lemma, Geometric & Functional Analysis GAFA 7 (1997), no. 2, 322–337. 30. Carlos Hoppen, Yoshiharu Kohayakawa, Richard Lang, Hanno Lefmann, and Henrique Stagni, Estimating Parameters Associated with Monotone Properties, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2016) (Dagstuhl, Germany) (Klaus Jansen, Claire Mathieu, José D. P. Rolim, and Chris Umans, eds.), Leibniz International Proceedings in Informatics (LIPIcs), vol. 60, Schloss Dagstuhl–Leibniz-Zentrum für Informatik, 2016, pp. 35:1–35:13. 31. Stasys Jukna, Extremal combinatorics: with applications in computer science, Texts in Theoretical Computer Science. An EATCS Series, second edition, 2011, Springer-Verlag, Berlin, 2001. 32. László Lovász and Balázs Szegedy, Szemerédi’s lemma for the analyst, Geom. Funct. Anal. 17 (2007), no. 1, 252–270. 33. Guy Moshkovitz and Asaf Shapira, A sparse regular approximation lemma, (2016), http://arxiv.org/abs/1610.02676, submitted, pp. 37. 18 34. Hans Jürgen Prömel and Angelika Steger, The asymptotic number of graphs not containing a fixed color-critical subgraph, Combinatorica 12 (1992), no. 4, 463–473. 35. , Counting H-free graphs, Discrete Mathematics 154 (1996), no. 1-3, 311–315. 36. Endre Szemerédi, Regular partitions of graphs, Colloq. Internat. CNRS 260 (1976), 399–401. Instituto de Matemática, UFRGS, Avenida Bento Gonçalves, 9500, 91501-970 Porto Alegre, RS, Brazil (C. Hoppen) E-mail address: [email protected] Instituto de Matemática e Estatı́stica, Universidade de São Paulo, Rua do Matão 1010, 05508-090 São Paulo, Brazil (Y. Kohayakawa and H. Stagni) E-mail address: {yoshi|stagni}@ime.usp.br Departamento de Ingenierı́a Matemática, Universidad de Chile, Beauchef 851, Torre Norte, Piso 4, Oficina 415, Santiago, Chile (R. Lang) E-mail address: [email protected] Fakultät für Informatik, Technische Universität Chemnitz, Straße der Nationen 62, 09111 Chemnitz, Germany (H. Lefmann) E-mail address: [email protected] 19
8cs.DS
1 arXiv:1801.04223v1 [cs.IT] 12 Jan 2018 Machine Intelligence Techniques for Next-Generation Context-Aware Wireless Networks Tadilo Endeshaw Bogale1,2 , Xianbin Wang1 and Long Bao Le2 Western University, London, Canada1 Institute National de la Recherche Scientifique (INRS), Université du Québec, Montréal, Canada2 Email: {tadilo.bogale, long.le}@emt.inrs.ca, [email protected] Abstract The next generation wireless networks (i.e. 5G and beyond), which would be extremely dynamic and complex due to the ultra-dense deployment of heterogeneous networks (HetNets), poses many critical challenges for network planning, operation, management and troubleshooting. At the same time, generation and consumption of wireless data are becoming increasingly distributed with ongoing paradigm shift from people-centric to machine-oriented communications, making the operation of future wireless networks even more complex. In mitigating the complexity of future network operation, new approaches of intelligently utilizing distributed computational resources with improved context-awareness becomes extremely important. In this regard, the emerging fog (edge) computing architecture aiming to distribute computing, storage, control, communication, and networking functions closer to end users, have a great potential for enabling efficient operation of future wireless networks. These promising architectures make the adoption of artificial intelligence (AI) principles which incorporate learning, reasoning and decision-making mechanism, as natural choices for designing a tightly integrated network. Towards this end, this article provides a comprehensive survey on the utilization of AI integrating machine learning, data analytics and natural language processing (NLP) techniques for enhancing the efficiency of wireless network operation. In particular, we provide comprehensive discussion on the utilization of these techniques for efficient data acquisition, knowledge discovery, network planning, operation and management of the next generation wireless networks. A brief case study utilizing the AI techniques for this network has also been provided. Keywords– 5G and beyond, Artificial (machine) intelligence, Context-aware-wireless, ML, NLP, Ontology I. I NTRODUCTION The advent of the fifth generation (5G) wireless network and its convergence with vertical applications constitute the foundation of future connected society which is expected to support 125 billion devices by 2030 (IHS Markit). As these applications and devices are featured by ubiquitous connectivity requirements, future 5G and beyond networks are becoming more complex. Besides the complexity increase of base stations (BSs) and user equipments (UEs), significant challenges arise from the initial network planning to the deployment and situation-dependent operation and management stages. The network architecture of 5G and beyond will be inevitably heterogeneous and multi-tier with ultra- dense deployment of small cells to achieve the anticipated 1000 fold capacity increase cost-effectively. For instance, the mixed use of planned and centrally controlled macro-BSs and randomly deployed wireless fidelity (WiFi) access points or femto-BSs in the ultradense heterogeneous network (HetNet) raises several unexpected operation scenarios, which are not possible to envision at the network design stage. This requires future wireless networks to have self organizing, configuring and healing capability based on the operational condition through tight coordination among different nodes, tiers and communication layers. These challenges make the existing network design strategies utilizing a fairly simple statistics experience unacceptable performance (for example, in terms of spectrum Network interoperability Distributed & affordable computing resources AI opportunities for wireless networks Predictive network characteristics Massive data availability Fig. 1. Favorable conditions for the adoption of machine intelligence techniques in the next generation wireless networks. and energy efficiency, coverage, delay and cost) [1], [2]. The rapidly growing number of machine-typecommunication (MTC) devices contribute a considerable portion on the complexity of this ultra-dense network. Many of the future MTC applications supported by 5G and beyond will require the underlying wireless networks to achieve high availability, reliability and security, very short transit time and low latency [3]. Furthermore, in such use cases, uninterrupted and safe operation is often the top priority (for instance, connected vehicles). Taking a MTC application offline for any reason can cause significant business loss or non-tolerable customer experience, and many of the MTC devices are resource-constrained and will not be able to rely solely on their own limited resources to fulfill their processing demands [4]. As a result, these latency critical applications cannot be moved to the network controller or cloud due to delay, bandwidth, or other constraints. Moreover, the data sets generated from these devices will be extremely diverse and may have large-scale missing (inaccurate) values [5]. In addition, a number of new data hungry MTC immersive use-cases will arise including wearables, virtual realities, intelligent product and supportsystems where most of them will use built-in backend data infrastructure and analytics engine to provide context-aware services. All these necessitates the next generation network (i.e. 5G and beyond) to adopt an intelligent and context-aware approach for network planning, design, analysis, and optimization. We are in the beginning phase of an intelligent era that has been driven by the rapid evolution of semiconductor industries, computing technologies, and diverse use cases. This is witnessed by the tight integration of networked information systems, sensing and communication devices, data sources, decision making, and cyber physical infrastructures. The proliferation of tiny wireless sensors and MTC devices, and smart phones also show clear evidences for the exceptional processing capability and cost-effectiveness of semiconductor devices. These promising developments facilitate distributed computing resources not only in the cloud but also in the fog and edge nodes. Both fog and edge computing attempt pushing the intelligence and processing capabilities down closer to where the data originates. The edge computing aims to integrate intelligence and processing power capabilities closest to the original data source. The edge node, for example, intelligent programmable automation controllers (PACs), determines which raw input data should be stored locally or sent to the fog (cloud) for further analysis. On the other hand, in the fog computing, all the raw input data will first be converted to the appropriate Internet protocol (such as HTTP) before sending to the fog nodes. Thus, higher-level data contents are processed, stored and sent to the cloud for further analysis in the fog devices (for example, intelligent routers, access points, Internet of things (IoT) gateways). Thus, the edge and fog enabled network allows distributed computing, storage, control, communication and networking functions by reducing the data transmitted and work load of the cloud, latency and system response time especially for applications demanding localized and location dependent information [6]. Moreover, the node, user, sensor, or MTC device is potentially capable of generating row and processed data at different granularity levels which ultimately help the network to have a massive amount of data likely exhibiting some pattern. This will help different nodes to leverage data mining and analytics techniques to predict relevant network metrics such as user mobility, traffic behavior, network load fluctuation, channel variations, and interference levels. All these opportunities enable efficient and flexible resource allocation and management, protocol stack configuration, and signaling procedure and physical layer optimization, and facilitate existing devices to harness the powers of sensors, edge, fog and cloud based computing platforms, and data analytics engines [7]–[9]. These also create favorable conditions to engineer a tightly integrated wireless network by adopting the AI principles (see Fig. 1) incorporating learning, reasoning and decision making mechanisms which are crucial to realize context-awareness capability. A typical next generation network utilizing the AI principles at different nodes is shown in Fig. 2. Towards this end, the current paper provides a comprehensive survey on the utilization of AI integrating machine learning, data analytics and natural language processing (NLP) techniques for enhancing the efficiency of wireless systems. We particularly focus on the utilization of these techniques for efficient wireless data acquisition and knowledge discovery, planning, and operation and management of the next generation wireless networks. A brief case study showing the utilization of AI techniques for this network has also been provided. The paper is organized as follows. In Section II, we discuss data acquisition and knowledge discovery approaches used in AI enabled wireless. Then, a comprehensive discussion on how these knowledge can be used in network planning, operation and management of the next generation wireless is given in Sections III and IV. A case study discussing the applications of AI techniques for channel impulse response (CIR) prediction and context-aware data transmission is then provided in Section V. Finally, conclusions are drawn in Section VI. II. DATA ACQUISITION AND K NOWLEDGE D ISCOVERY Efficient data acquisition and knowledge discovery is one of the requirements of future wireless networks as it helps to realize situation aware and optimized decisions as shown in Fig. 3. The gathered data may need to be processed efficiently to extract relevant knowledge. Furthermore, as the available data may contain a large amount of erroneous (missing) values, a robust knowledge discovery may need to be devised [5]. A. Data Acquisition The AI based tools relying on machine learning for the input data mining and knowledge model extraction at different levels could be applied [10]. This includes the cell level, cell cluster level and user level. In general, one can collect data from three main sources; network, user, and external. The network data characterizes the network behavior including outage and usage statistics of services or nodes, and load of a cell. The user data could comprise user subscription information and user device type. And, the external data contains a user specific information obtained from different sources such as sensors and channel measurements [11]. One way of collecting wireless data is by employing content caching where the idea is to store popular contents at the network edge (at BSs, devices, or other intermediate locations). In this regard, one can enable the proactive cache type if the traffic learning algorithm predicts that the same content will be requested in the near future [12], [13]. Moreover, since different users may request the same content with different qualities, each edge node may need to cache the same content in different granularity (for example, caching video data with different resolution). This further requires the edge device to apply coded (adaptive) caching technique based on the quality of service (QoS) requirement of the requester [14]. Coded caching also enables devices to create multicasting opportunities for certain contents via coded multicast transmissions [15]. In some cases, a given edge (fog) may collect date from more than one sources with different connectivity criteria [16]. In a fog enabled wireless network, this is facilitated by employing IoT devices which leverage a multitude of radio-access technologies such as wireless local area network (WLAN) and cellular networks. In this regard, context-aware data collection from multiple sources probably in a compressed format by employing appropriate dimensionality reduction techniques under imperfect statistical knowledge of the data while simultaneously optimizing multiple objective functions such as delay and transmission power can be enabled [13]. B. Knowledge Discovery Efficient knowledge discovery is critical for optimized operation and management of the network. The network may need to use a novel learning technique such as deep learning to extract the hidden contextual information of the network which are crucial for knowledge base (KB) creation. In general, context is related to any information used to characterize the situation of an entity, including surrounding location, identity, preferences, and activities. Context may affect the operation and management procedures of complex systems at various levels, from the physical device level to the communication level, up to the application level [17]. For instance, uncovering the relation between the device and network information (user location, velocity, battery level, and other medium access control (MAC) and higher layer aspects) would permit adaptive communication and processing capa- IoT edges Cloud Microwave mmWave Fog Fog BS BS Cellular edges ITS edges Fig. 2. Typical next generation network adopting AI principles with learning, reasoning and decision making. Network, user, external data Data acquisition Knowledge discovery Reasoning and decision Optimized network Fig. 3. Optimized network design with AI techniques. bilities based on the changes in the environment and application [2], [17]. Analyzing wireless data contextually (semantically) facilitate wireless operators to optimize their network traffic. To realize semantic aware traffic optimization, however, the network may need to understand the content of the signal. One way of understanding the information content of a data is by creating semantic aware ontology using predefined vocabulary of terms and concepts [18]. The ontology specification can provide an expressive language with many logical constructs to define classes, properties and their relationships. In this regard, the authors of [18] propose a semantic open data model for sensor data called MyOntoSens and write using ontology web language 2 description logic language. The proposed KB has been implemented using protégé and pre-validated with pellet reasoner. In a similar context, an ontology for wireless sensor networks (WSNs) dedicated to the description of sensor features and observation has been presented in [19], [20]. Understanding the context also helps to produce a context-aware compressed (summary) information which will utilize less radio resource for transmission. For instance, if a BS would like to transmit text information to a user, the BS can transmit only its contextual coded data. The user will, then, extract the desired content just from the context by utilizing appropriate decoder and big-data analytics technique such as NLP. As context differs from the user’s world knowledge about the content, the coding and decoding technique may vary among users [17]. In general, two types of content summarizing approaches are commonly adopted; abstractive and extractive. The extractive approach uses only the relevant content from the original information whereas, the abstractive approach may use new words (expressions or contents) as part of the summary information [21], [22]. Although most of the existing methods can extract useful information for the summary, they are very far from generating human understandable summary. One of the main reasons is the loose associations and unordered information distribution which make it hard to extract syntactically correct and semantically coherence information from the summary. In fact, modeling the coherence of information summary is one of the active areas of research [21]. III. N ETWORK P LANNING One of the most critical aspects determining the performance of a wireless network is the initial planning. This includes infrastructure (node deployment), frequency, number of parameters and their configuration setting procedures, and energy consumption to run the network in both idle (no data communication takes place between the network and a user) and active (data communication takes place between the network and a user) conditions. A well planned network may need to guarantee satisfactory user QoS (in terms of data rate, reliability and latency) and the network operator requirements (in terms of cost). The machine learning technique can be used for planning different parts of the network by utilizing the network and user data. A. Node Deployment, Energy Consumption and RF Planning The future generation wireless networks will be extremely dense and heterogeneous, equipped likely with moving and flying BSs, and featured by continually varying network conditions [23]. This fact makes the existing network planning techniques, which are mainly static and designed from expensive field tests, not suitable for the future wireless networks [2], [24]. The utilization of AI techniques for network planning has recently received an interest in the research community. For instance, a machine learning technique is suggested for content popularity and request distribution predictions of a cache where its design in the network considers several factors including cache placement and update strategy which are determined by utilizing the users’ content request distribution and frequency, and mobility pattern [25]. In [26], an AI based system which leverages graph theory based problem formulations for the fiber to home network is proposed to automate the planning process. To solve the problems, mixed integer linear programming (MILP), ant colony optimization (ACO) and genetic algorithm (GA) have been applied. The authors of [10] employ the principles of AI for radio access network (RAN) planning which includes new cell, radio frequency (RF) and spectrum of the 5G wireless. The analysis is performed by processing input data from multiple sources, through learning based classification, prediction and clustering models, and extracting relevant knowledge to drive the decisions made by 5G network. Wireless networks contribute an increasing share in the energy consumption of the information communications technology (ICT) infrastructure. Over 80% of a wireless network power consumption is used by the RANs, especially at the BS, since the present BS deployment is designed on the basis of peak traffic loads and generally stays active irrespective of the huge variations in traffic load [27]. This makes the current energy planning inefficient for the future smart cities aiming to realize green communication. To enable energy efficient wireless, different AI techniques have been suggested. For instance, the authors of [28] propose a method to realize the efficient use of electricity by autonomously controlling network equipments such as servers, air-conditioners in an integrated manner. Furthermore, the authors of [29] suggest predictive models, including neural network and Markov decision, for the energy consumption of IoT in smart cities. Along this line, a BS switching solution for traffic aware greener cellular networks using AI techniques has also been discussed in [27]. B. Configuration Parameter and Service Planning The number of configurable parameters in cellular networks fairly increases when moving from one generation to the next. For instance, in a typical 3G and 4G nodes these parameters are around 1000 and 1500, respectively. It is anticipated that this trend will continue and the recently suggested 5G network node will likely have 2000 or more parameters. In addition, unlike the current and previous generation networks which provides static services, the next generation network may need to support the continuously evolving new services and use cases, and establish sufficient network resource and provisioning mechanisms while ensuring agility and robustness. These necessitate the next generation network to understand parameter variations, learn uncertainties, configure network parameters, forecast immediate and future challenges, and provide timely solutions by interacting with the environment [27]. In this direction, the utilization of big data analytics has been discussed for protocol stack configuration, signaling procedure and physical layer procedure optimizations in [9]. Future smart cities require well planned wired and wireless networks with ubiquitous broadband connectivity, and flexible, real time and distributed data processing capability. Although most modern cities have multiple cellular networks that provide adequate coverage and data processing capability, these networks often have limited capacity and peak bandwidths and fail to meet the real time constraint of different emerging tactile applications. These make the realization of advanced delay critical municipal services envisioned in a smart city (e.g., real-time surveillance, public safety, on-time advisories, and smart buildings) challenging [1]. One way of addressing this challenge would be by deploying an AI integrated fog based wireless architecture which allows data processing of the network using a number of distributed nodes. This will help for analyzing network status, detecting anticipated faults and planning new node deployment using AI techniques [1]. IV. N ETWORK O PERATION AND M ANAGEMENT Energy and spectrum efficiency, latency, reliability, and security are the key parameters that are taken into account during the network operation stage. And properly optimizing these parameters usually yield satisfactory performance for both the service providers and end users. In addition, these optimization parameters usually require simple and real time learning and decision making algorithms. A. Resource Allocation and Management Different AI techniques have been proposed for resource allocation, management and optimization of wireless networks such as cellular, wearable, WSN, body area network (BAN) [24]. In [30], the potential of AI in solving the channel allocation problem in wireless communication is considered. It is demonstrated that the AI based approach has shown better performance than those of randomized-based heuristic and genetic algorithms (GAs). In [31], radio access technology (RAT) selection utilizing the Hopfield neural networks as a decision making tool while leveraging the ability of AI reasoning and the use of multi-parameter decision by exploiting the options of IEEE 802.21 protocol is proposed. A machine learning based techniques including supervised, unsupervised, and reinforcement learning techniques, have been exploited to manage the packet routing in many different network scenarios [32]. Specifically, in [33], [34], a deep learning approach for shortest traffic route identification to reduce network congestion is presented. A deep learning technique aiming to shift the computing needs from rule-based route computation to machine learning based route estimation for high throughput packet processing is proposed in [32]. Along this line, a fog computing based radioaccess network which exploits the advantage of local radio signal processing, cooperative radio resource management, and distributed storage capability of fog has been suggested to decrease the load on the front haul and avoid large scale radio signal processing in the centralized baseband controllers [1]. The utilization of unlicensed spectrum as a complement to licensed one receives an interest to offload network traffic through the carrier aggregation framework, while critical control signaling, mobility, voice and control data will always be transmitted on the licensed bands. In this aspect, the authors of [35] propose a hopfield neural network scheme for multiradio packet scheduling. The problem of resource allocation with uplink-downlink decoupling in a long term evolution-unlicensed (LTE-U) system has been investigated in [36] for which the authors propose a decentralized scheme based on neural network. The authors in [37] propose a distributed approach based on Q-learning for the problem of channel selection in an LTE-U system. Furthermore, in a multi-RAT scenario, machine learning techniques can allow the smart use of different RATs wherein a BS can learn when to transmit on each type of frequency band based on the network conditions. For instance, one can apply a machine learning to predict the availability of a line of sight (LoS) link, by considering the users’ mobility pattern and antenna tilt, thus allowing the transmission over the millimeter wave band. B. Security and Privacy Protection The inherent shared nature of radio propagation environment makes wireless transmissions vulnerable to malicious attacks, including eavesdropping and jamming. For this reason, security and privacy protection are fundamental concerns of today’s wireless communication system. Wireless networks generally adopt separate security level at different layers of the communication protocol stack. Furthermore, different applications usually require different encryption methods [42]. The utilization of AI techniques for wireless security has received a significant interest. TABLE I M AIN I SSUES IN AI- ENABLED W IRELESS N ETWORK Ref. [13] [14], [15] [18]–[20] [5] [10], [26] [38] [27], [28] [1], [9] [30], [31] [1], [32] [35] [39]–[41] [5], [38] 7.4 Average SE (bps/Hz) Data acquisition and knowledge discovery • Context-aware data acquisition from single/multiple sources • Coded (adaptive) caching • Semantic-aware Ontology (KB) creation from network data • Robust knowledge discovery from erroneous (missing) data Network planning • Node deployment and radio frequency allocation • Caching and computing placement and content update • Energy consumption modeling and prediction (idle/active) • Parameter and service configuration procedure Network operation and management • Resource allocation: RAT and channel selection, packet routing, distributed storage and processing, multi-RAT packet scheduling • Security: Spoofing attack and intrusion detection • Latency: Context-aware edge computing and scheduling 7.2 7 6.8 Predicted CIR: Analytical (RLS) Predicted CIR: ML (Linear regression) Perfect CIR 6.6 1 2 3 4 5 6 7 8 CIR prediction index (in OFDM block) In [39], a spoofing attack detection scheme using random key distribution based artificial immune system (AIS) has been proposed. In a similar path, an approach based on GA and AIS, called GAAIS, for dynamic intrusion detection in mobile ad-hoc network (MANETs) is suggested in [41]. In [40], advanced detection of intrusions on sensor networks (ADIOS) based intrusion detection and prevention system is developed. The ADIOS is designed to mitigate denialof-service attacks in wireless sensor networks by capturing and analyzing network events using AI and an expert system developed using the C language integrated production system tool. In a similar work, the authors of [43] propose AI based scheme to secure the communication protocol of connected vehicles. C. Latency Optimization for Tactile Applications The next generation wireless networks are featured by several mission critical (tactile) applications such as lane switching in automated vehicles. For vehicular networks, different levels of automation has been defined by the USA department of transportation (DOT) ranging from a simple driver assistance (level 1) to the full automation mode (level 5). For this application, one can apply different message representations including warning alarm, picture and audio information to request intervening. In fact, recently it is demonstrated via experiment that the use of natural language generation techniques from imprecise data improves the human decision making accuracy. Such a linguistic description of data could be designed by modeling vague expressions such as small and large, which are norms in daily life conversation, using fuzzy logic theory [44]. All these facilitates the utilization of predictive machine learning as in [45], [46]. Fig. 4. Comparison of analytical and machine learning (ML) approaches in terms of achieved average SE for different future OFDM block index CIR. From the computing side, edge devices can be used for effective low-latency computations, using the emerging paradigm of mobile edge computing. However, optimizing mobile edge computing faces many challenges such as computing placement, computational resource allocation, computing task assignment, end-to-end latency, and energy consumption. In this aspect, a machine learning technique can be used to address these challenges by utilizing historical data. Predicting computational requirements enable the network devices to schedule the computational resources in advance to minimize the global latency. In this aspect, the authors of [38] propose a cross-system learning framework in order to optimize the long-term performance of multi-mode BSs, by steering delaytolerant traffic towards WiFi. Furthermore, in a fog enabled wireless system, latency can be addressed by exploiting different levels of awareness at each edge network. In fact, a number of learning techniques can be applied to achieve these awareness including incremental, divide and conquer, parallel and hierarchical [5]. A brief summary of different issues in the AIenabled wireless network is presented in Table I. V. D ESIGN C ASE S TUDIES This section discusses typical design case studies in which the AI techniques can be applied for the context-aware wireless network. A. Machine Learning for CIR Prediction This study demonstrates the utilization of machine learning tools for optimizing wireless system resources. In this aspect, we select the wireless CIR prediction as the design objective. To solve this design objective, the first possibility could be to apply different analytical CIR prediction techniques (for example, the recursive least square (RLS) prediction proposed in [45]). The second possibility could be to predict future CIRs by leveraging the past experience. The former possibility is very expensive particularly when real time prediction is needed. Furthermore, in most cases, the analytical prediction approach may fail whenever there is a modeling error or uncertainty. The latter possibility, however, is simple as it employs the past experience and applies standard vector multiplication and addition operations [47]. This simulation compares the performances of RLS and machine learning prediction approaches. For the machine learning, we employ the well known multivariate linear regression. For the comparison, we consider an orthogonal frequency domain multiplexing (OFDM) transmission scheme where a BS equipped with N antennas is serving a single antenna IoT device. The CIR is modeled by considering a typical scenario of the IEEE 802.11 standard with channel correlation both spatially and temporarily. The spatial channel covariance matrix is modeled by considering the uniform linear array (ULA) structure, and the temporal channel correlation is designed by the well known Jake’s model [48]. The number of multipath taps L = 4, fast Fourier transform (FFT) size M = 64, N = 8, OFDM symbol period Ts = 166µs, RLS window size Sb = 8, forward prediction window size Sf = 8, carrier frequency 5.6GHz, and mobility speed of the IoT device 30km/hr. The signal to noise ratio (SNR) for each subcarrier is set to 10dB. With these settings, Fig. 4 shows the average spectrum efficiency (SE) obtained by the RLS and machine learning approaches for sub-carrier s = 4. In both cases, the achieved SE decreases as the future OFDM-block index increases. This is expected since the number of unknown CIR coefficients increase as the future block index increases leading to a degraded CIR prediction quality. However, for a fixed future prediction index, the machine learning approach yields better performance than the RLS one1 . 1 Note that similar average performance is observed for other sub-carriers. Sample Traffic Data 1 13% 9% 3% 19% 2 3 56% 4 5 Fig. 5. Data traffic of a sample abstract information: In this figure, (Sets) 1 to 5 denote, Background, Objective, Method and Result, Conclusion, and Related and Future Works, respectively. B. Context-Aware Data Transmission using NLP Techniques Context (semantic) aware information transmission is crucial in the future generation network. To validate this, we employ abstract texts from scientific articles [49]. According to this paper, each scientific abstract text consists of different types of information including research background, methodology, main results etc. Fig. 5 shows the expert annotated data size for different types for 2000 biomedical article abstracts. As can be seen from this figure, different information types use different portions of the overall data set. And for a given user, one can transmit the desired information according to the context. For instance, for a user who is interested in the basics about the article, transmitting the background information could be sufficient which accounts for only 9% of the total traffic. This shows that semantically enabled data transmission will reduce the network traffic while simultaneously maintaining the desired QoS experience of users. Such a transmission, however, is realized when sentences of similar types are clustered correctly for each abstract. In scientific papers, the location and part-of-speech voice of a sentence are crucial features to identify its class set [49]. We have employed these features with the commonly used data clustering algorithms (i.e., K-means and Agglomerative) and present the accuracy achieved by these algorithms for each type as shown in Table II. As can be seen from this table, different clustering algorithms yield different accuracy. One can also notice from this table that significant research work may need to be undertaken TABLE II ACCURACY OF DIFFERENT CLUSTERING METHODS Clustering Method K-Means Agglomerative Set 1 0.34 0.21 Set 2 0.17 0.18 Set 3 0.35 0.38 Set 4 0.31 0.30 Set 5 0.16 0.15 to reach the ideal performance. VI. C ONCLUSIONS The next generation wireless networks, which would be more dynamic, complex with dense deployment of BSs of different types and access technologies, poses many design challenges for network planning, management and troubleshooting procedures. Nevertheless, wireless data can be generated from different sources including networked information systems, and sensing and communication devices. Furthermore, the emerging fog computing architecture aiming for distributed computing, storage, control, communication, and networking functions closer to end users contribute for the efficient realization of wireless systems. This article provides a comprehensive survey on the utilization of AI integrating machine learning, data analytics and NLP techniques for enhancing the efficiency of wireless networks. We have given a comprehensive discussion on the utilization of these techniques for efficient wireless data acquisition and knowledge discovery, planning, operation and management of the next generation wireless networks. A brief case study showing the utilization of AI techniques has also been provided. R EFERENCES [1] A. Munir, P. Kansakar, and S. U. Khan, “IFCIoT: integrated Fog Cloud IoT: A novel architectural paradigm for the future internet of things,” IEEE Consumer Electronics Magazine, vol. 6, no. 3, pp. 74–82, July 2017. [2] T. E. Bogale and L. Le, “Massive MIMO and mmWave for 5G wireless HetNet: Potential benefits and challenges,” IEEE Vehic. Techno. Mag., vol. 11, no. 1, pp. 64 – 75, Mar. 2016. [3] M. Weiner, M. Jorgovanovic, A. Sahai, and B. Nikoli, “Design of a low-latency, high-reliability wireless communication system for control applications,” in Proc. IEEE Int. Conf. Commun. (ICC), 2014, pp. 3829 – 3835. [4] M. Chiang and T. Zhang, “Fog and IoT: An overview of research opportunities,” IEEE Internet of Things, vol. 3, no. 6, pp. 854 – 864, Dec. 2016. [5] X. Wang and Y. He, “Learning from uncertainty for big data: Future analytical challenges and strategies,” IEEE Systems, Man, and Cybernetics Magazine, vol. 2, no. 2, pp. 26–31, April 2016. [6] Ruilong Deng, Rongxing Lu, Chengzhe Lai, Tom H Luan, and Hao Liang, “Optimal workload allocation in fog-cloud computing toward balanced delay and power consumption,” IEEE Internet of Things Journal, vol. 3, no. 6, pp. 1171– 1181, 2016. [7] M. Chiang, S. Ha, C. L. I, F. Risso, and T. Zhang, “Clarifying Fog computing and networking: 10 questions and answers,” IEEE Communications Magazine, vol. 55, no. 4, pp. 18–20, April 2017. [8] Y. Sun, H. Song, A. J. Jara, and R. Bie, “Internet of things and big data analytics for smart and connected communities,” IEEE Access, vol. 4, pp. 766 – 773, 2016. [9] S. Han, C. L. I, G. Li, S. Wang, and Q. Sun, “Big data enabled mobile network design for 5G and beyond,” IEEE Communications Magazine, vol. PP, no. 99, pp. 2–9, 2017. [10] J. Prez-Romero, O. Sallent, R. Ferrs, and R. Agust, “Knowledge-based 5G radio access network planning and optimization,” in 2016 International Symposium on Wireless Communication Systems (ISWCS), Sept 2016, pp. 359–365. [11] J. Prez-Romero, O. Sallent, R. Ferrs, and R. Agust, “Artificial intelligence-based 5G network capacity planning and operation,” in 2015 International Symposium on Wireless Communication Systems (ISWCS), Aug 2015, pp. 246–250. [12] E. Bastug, M. Bennis, and M. Debbah, “Living on the edge: The role of proactive caching in 5G wireless networks,” IEEE Communications Magazine, vol. 52, no. 8, pp. 82–89, Aug 2014. [13] E. Bastug, M. Bennis, M. Medard, and M. Debbah, “Toward interconnected virtual reality: Opportunities, challenges, and enablers,” IEEE Communications Magazine, vol. 55, no. 6, pp. 110–117, 2017. [14] G. Paschos, E. Bastug, I. Land, G. Caire, and M. Debbah, “Wireless caching: Technical misconceptions and business barriers,” IEEE Communications Magazine, vol. 54, no. 8, pp. 16–22, August 2016. [15] Y. Fadlallah, A. M. Tulino, D. Barone, G. Vettigli, J. Llorca, and J. M. Gorce, “Coding for caching in 5G networks,” IEEE Commun. Magazine, vol. 55, no. 2, pp. 106 – 113, 2017. [16] D. Ohmann, A. Awada, I. Viering, M. Simsek, and G. P. Fettweis, “Achieving high availability in wireless networks by inter-frequency multi-connectivity,” in 2016 IEEE International Conference on Communications (ICC), May 2016, pp. 1–7. [17] F. Chiti, R. Fantacci, M. Loreti, and R. Pugliese, “Contextaware wireless mobile autonomic computing and communications: Research trends and emerging applications,” IEEE Wireless Commun., vol. 23, no. 2, pp. 86 – 92, Apr. 2016. [18] L. Nachabe, M. Girod-Genet, and B. El Hassan, “Unified data model for wireless sensor network,” IEEE Sensors Journal, vol. 15, no. 7, pp. 3657–3667, July 2015. [19] R. Bendadouche, C. Roussey, G. De Sousa, J. Chanet, and K-M. Hou, “Extension of the semantic sensor network ontology for wireless sensor networks: The stimulus-WSNnodecommunication pattern,” in Proc. 5th Int. Conf. Semantic Sensor Networks - Vol. 904, 2012, pp. 49–64. [20] M. Compton, A. A. Henson, L. Lefort, H. Neuhaus, and A. P. Sheth, “A survey of the semantic specification of sensors,” in Proc. CEUR Workshop, 2009, pp. 17–32. [21] E. Cambria and B. White, “Jumping NLP curves: A review of natural language processing research,” IEEE Comp. Intelligence Mag., pp. 48 – 57, May 2014. [22] T. Hirao, M. Nishino, Y. Yoshida, J. Suzuki, N. Yasuda, and M. Nagata, “Summarizing a document by trimming the [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] discourse tree,” IEEE/ACM Trans. Audio, Speech, and Lang. Process, vol. 23, no. 11, pp. 2081 – 2092, Nov. 2015. M. Alzenad, A. El-Keyi, F. Lagum, and H. Yanikomeroglu, “3-D placement of an unmanned aerial vehicle base station (UAV-BS) for energy-efficient maximal coverage,” IEEE Wireless Communications Letters, vol. 6, no. 4, pp. 434–437, Aug 2017. Z. Fadlullah, F. Tang, B. Mao, N. Kato, O. Akashi, T. Inoue, and K. Mizutani, “State-of-the-art deep learning: Evolving machine intelligence toward tomorrow’s intelligent network traffic control systems,” IEEE Communications Surveys Tutorials, vol. PP, no. 99, pp. 1–1, 2017. M. Chen, M. Mozaffari, W. Saad, C. Yin, M. Debbah, and C. S. Hong, “Caching in the sky: Proactive deployment of cache-enabled unmanned aerial vehicles for optimized quality-of-experience,” IEEE JSAC, vol. 35, no. 5, pp. 1046 – 1061, 2017. K. F. Poon, A. Chu, and A. Ouali, “An AI-based system for telecommunication network planning,” in 2012 IEEE International Conference on Industrial Engineering and Engineering Management, Dec 2012, pp. 874–878. R. Li, Z. Zhao, X. Zhou, G. Ding, Y. Chen, Z. Wang, and H. Zhang, “Intelligent 5G: When cellular networks meet artificial intelligence,” IEEE Wireless Communications, vol. PP, no. 99, pp. 2–10, 2017. K. Awahara, S. Izumi, T. Abe, and T. Suganuma, “Autonomous control method using AI planning for energyefficient network systems,” in 2013 Eighth International Conference on Broadband and Wireless Computing, Communication and Applications, Oct 2013, pp. 628–633. W. Ejaz, M. Naeem, A. Shahid, A. Anpalagan, and M. Jo, “Efficient energy management for the internet of things in smart cities,” IEEE Communications Magazine, vol. 55, no. 1, pp. 84–91, January 2017. S. I. Suliman, G. Kendall, and I. Musirin, “Artificial immune algorithm in solving the channel assignment task,” in 2014 IEEE International Conference on Control System, Computing and Engineering (ICCSCE 2014), Nov 2014, pp. 153–158. V. Rakovic and L. Gavrilovska, “Novel RAT selection mechanism based on Hopfield neural networks,” in International Congress on Ultra Modern Telecommunications and Control Systems, Oct 2010, pp. 210–217. B. Mao, Z. M. Fadlullah, F. Tang, N. Kato, O. Akashi, T. Inoue, and K. Mizutani, “Routing or computing? the paradigm shift towards intelligent computer network packet transmission based on deep learning,” IEEE Transactions on Computers, vol. PP, no. 99, pp. 1–1, 2017. N. Kato, Z. M. Fadlullah, B. Mao, F. Tang, O. Akashi, T. Inoue, and K. Mizutani, “The deep learning vision for heterogeneous network traffic control: Proposal, challenges, and future perspective,” IEEE wireless commun. Mag, vol. 24, no. 3, pp. 146–153, 2017. F. Tang, B. Mao, Z. M. Fadlullah, N. Kato, O. Akashi, T. Inoue, and K. Mizutani, “On removing routing protocol from future wireless networks: A real-time deep learning approach for intelligent traffic control,” IEEE Wireless Commun. Mag, 2017. Y. Cui, Y. Xu, R. Xu, and X. Sha, “A multi-radio packet scheduling algorithm for real-time traffic in a heterogeneous [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] wireless network environment,” Information Technology Journal, vol. 10, pp. 182 – 188, Oct. 2010. M. Chen, W. Saad, C. Yin, and M. Debbah, “Echo state networks for proactive caching in cloud-based radio access networks with mobile users,” IEEE Trans. Wireless Commun., vol. 16, no. 6, pp. 3520 – 3535, Jun. 2017. J. Perez-Romero, O. Sallent, R. Ferrus, and R. Agusti, “A robustness analysis of learning-based coexistence mechanisms for LTE-U operation in non-stationary conditions,” in Proc. of IEEE Vehicular Technology Conference (VTC Fall), Sep. 2015. M. Bennis, M. Simsek, A. Czylwik, W. Saad, W. Valentin, and M. Debbah, “When cellular meets WiFi in wireless small cell networks,” IEEE Commun. Magazine, vol. 51, no. 6, pp. 44 – 50, 2013. E. S. Kumar, S. M. Kusuma, and B. P. V. Kumar, “A random key distribution based artificial immune system for security in clustered wireless sensor networks,” in Electrical, Electronics and Computer Science (SCEECS), 2014 IEEE Students’ Conference on, March 2014, pp. 1–7. V. F. Taylor and D. T. Fokum, “Securing wireless sensor networks from denial-of-service attacks using artificial intelligence and the clips expert system tool,” in 2013 Proceedings of IEEE Southeastcon, April 2013, pp. 1–6. F. Barani, “A hybrid approach for dynamic intrusion detection in ad hoc networks using genetic algorithm and artificial immune system,” in 2014 Iranian Conference on Intelligent Systems (ICIS), Feb 2014, pp. 1–6. Y. Zou, J. Zhu, X. Wang, and L. Hanzo, “A survey on wireless security: Technical challenges, recent advances, and future trends,” Proceedings of IEEE, vol. 104, no. 9, pp. 1727 – 1765, Sept. 2016. P. Sharma, H. Liu, H. Wang, and S. Zhang, “Securing wireless communications of connected vehicles with artificial intelligence,” in 2017 IEEE International Symposium on Technologies for Homeland Security (HST), April 2017, pp. 1–7. D. Gkatzia, O. Lemon, and V. Rieser, “Data-to-text generation improves decision-making under uncertainty,” IEEE Computational Intelligence Magazine, vol. 12, no. 3, pp. 10– 17, Aug 2017. T. E. Bogale, X. Wang, and L. B. Le, “Adaptive channel prediction, beamforming and scheduling design for 5G V2I network,” in Proc. IEEE Veh. Technol. Conf (VTC-Fall)., Sep. 2017. K. Zhang, Y. Mao, S. Leng, Y. He, and Y. ZHANG, “Mobileedge computing for vehicular networks: A promising network paradigm with predictive off-loading,” IEEE Vehicular Technology Magazine, vol. 12, no. 2, pp. 36–44, June 2017. T. E. Bogale, X. Wang, and L. B. Le, “Adaptive channel prediction, beamforming and feedback design for 5G V2I network,” in IEEE (In preparation for submission), 2017. D. Schafhuber and G. Matz, “MMSE and adaptive prediction of time-varying channels for OFDM systems,” IEEE Tran. Wireless Commun., vol. 4, no. 2, pp. 593–602, March 2005. Y. Guo, A. Korhonen, I. Silins, and U. Stenius, “A weaklysupervised approach to argumentative zoning of scientific documents,” in Proc. of Conf. on Empir. Methods in Nat. Lang. Process., 2011, pp. 273 – 283.
7cs.IT
Linear-Array Photoacoustic Imaging Using Minimum Variance-Based Delay Multiply and Sum Adaptive Beamforming Algorithm Moein Mozaffarzadeha , Ali Mahloojifar*a , Mahdi Oroojia , Karl Kratkiewiczb , Saba Adabib , Mohammadreza Nasiriavanakib a arXiv:1709.07965v3 [eess.SP] 29 Jan 2018 b Department of Biomedical Engineering, Tarbiat Modares University, Tehran, Iran Department of Biomedical, Wayne State University, 818 W. Hancock, Detroit, Michigan, USA Abstract. In Photoacoustic imaging (PA), Delay-and-Sum (DAS) beamformer is a common beamforming algorithm having a simple implementation. However, it results in a poor resolution and high sidelobes. To address these challenges, a new algorithm namely Delay-Multiply-and-Sum (DMAS) was introduced having lower sidelobes compared to DAS. To improve the resolution of DMAS, a novel beamformer is introduced using Minimum Variance (MV) adaptive beamforming combined with DMAS, so-called Minimum Variance-Based DMAS (MVB-DMAS). It is shown that expanding the DMAS equation results in multiple terms representing a DAS algebra. It is proposed to use the MV adaptive beamformer instead of the existing DAS. MVB-DMAS is evaluated numerically and experimentally. In particular, at the depth of 45 mm MVB-DMAS results in about 31 dB, 18 dB and 8 dB sidelobes reduction compared to DAS, MV and DMAS, respectively. The quantitative results of the simulations show that MVB-DMAS leads to improvement in full-width-half-maximum about 96 %, 94 % and 45 % and signal-to-noise ratio about 89 %, 15 % and 35 % compared to DAS, DMAS, MV, respectively. In particular, at the depth of 33 mm of the experimental images, MVB-DMAS results in about 20 dB sidelobes reduction in comparison with other beamformers. Keywords: Photoacoustic imaging, beamforming, Delay-Multiply-and-Sum, minimum variance, linear-array imaging. *Ali Mahloojifar, [email protected] 1 Introduction Photoacoustic imaging (PAI) is a promising medical imaging modality that uses a short electromagnetic pulse to generate Ultrasound (US) waves based on the thermoelastic effect.1 Having the merits of the US imaging spatial resolution and the optical imaging contrast in one imaging modality is the main motivation of using PAI.2 Unlike the X-ray which uses an ionizing radiation, PAI uses nonionizing waves, i.e. short laser or radio frequency (RF) pulses. In comparison with other imaging modalities, PAI has multiple advantages leading to many investigations.3, 4 PAI is a multiscale imaging modality that has been used in different cases of study such as tumor detection,5, 6 cancer detection and staging,7 ocular imaging,8 monitoring oxygenation in blood vessels9 1 and functional imaging.10, 11 There are two techniques of PAI: Photoacoustic Tomography (PAT) and Photoacoustic Microscopy (PAM).12, 13 In 2002, for the first time, PAT was successfully used as in vivo functional and structural brain imaging modality in small animals.14 In PAT, an array of elements may be formed in linear, arc or circular shape, and mathematical reconstruction algorithms are used to obtain the optical absorption distribution map of a tissue.15–17 Most of the reconstruction algorithms are defined under an ideal imaging condition and full-view array of elements. Also, the noise of measurement system is not considered as a parameter in the reconstruction procedure. Thus, Photoacoustic (PA) reconstructed images contain inherent artifacts caused by imperfect reconstruction algorithms. Reducing these artifacts has become a crucial challenge in PA image reconstruction for different number of transducers and different properties of imaging media.18, 19 Since there is a high similarity between US and PA detected signals, many of beamforming algorithms used in US imaging can be used in PAI. Moreover, integrating these two imaging modalities has been a challenge.20, 21 Common US beamforming algorithms such as Delay-And-Sum (DAS) and Minimum variance (MV) can be used in PA beamforming with modifications.22 These modifications in algorithms have led to use different hardware to implement an integrated US-PA imaging device. There are many studies focused on developing one beamforming technique for US and PA image formation in order to reduce the cost of imaging system.23, 24 Although DAS is the most common beamforming method in linear array imaging, it is a blind beamformer. Consequently, DAS causes a wide mainlobe and high level of sidelobes.25 Adaptive beamformers are commonly employed in Radar and have the ability of weighting the aperture based on the characteristics of detected signals. Apart from that, these beamformers form a high quality image with a wide range of off-axis signals rejection. MV can be considered as one of the commonly used adaptive methods in medical imaging.26–28 Over time, vast variety of modifications have been investigated on 2 MV such as complexity reduction,29, 30 shadowing suppression,31 using of the eigenstructure,32, 33 and combination of MV and Multi-line transmission (MLT) technique.34 Matrone et al. proposed, in,35 a new beamforming algorithm namely Delay-Multiply-and-Sum (DMAS) as a beamforming technique, used in medical US imaging. This algorithm, introduced by Lim et al. , was initially used in confocal microwave imaging for breast cancer detection.36 In addition, DMAS was used in Synthetic Aperture imaging.37 Double stage (DS-DMAS), in which two stages of DMAS is used in order to achieve a higher contrast and resolution compared to DMAS, was proposed for linear-array US and PAI.38–40 In addition, a modified version of coherence factor (MCF) and a high resolution CF were used to provide a higher contrast and resolution in linear-array PAI, respectively, compared to conventional CF.41, 42 In this paper, a novel beamforming algorithm, namely Minimum Variance-Based DMAS (MVBDMAS), is introduced. The expansion of DMAS algorithm is used, and it is shown that in each term of the expansion, there is a DAS algebra. Since DAS algorithm is a non-adaptive beamformer and leads to low resolution images, we proposed to use MV instead of the existing DAS in DMAS algebra expansion. It is shown that using MVB-DMAS results in resolution improvement and sidelobe levels reduction at the expense of higher computational burden. A preliminary version of this work and its eigenspace version have been reported before.43–45 However, in this paper, we are going to present a highly more complete description of this approach and evaluate, numerically and experimentally, its performance and the effects of its parameters. The rest of the paper is organized as follows. In section 2, the DMAS and MV beamforming algorithms are presented. In section 3, the proposed method and the necessary modifications are explained. The numerical and experimental results are presented in section 4 and 5, respectively. The advantages and disadvantages of proposed method are discussed in section 6, and finally con3 clusion is presented in section 7. 2 Background 2.1 Beamforming When PA signals are detected by a linear array of US transducer, beamforming algorithms such as DAS can be used to reconstruct the image using the following equation: yDAS (k) = M X i=1 xi (k − ∆i ), (1) where yDAS (k) is the output of the beamformer, k is the time index, M is the number of elements of array, and xi (k) and ∆i are detected signals and corresponding time delay for detector i, respectively. DAS is a simple algorithm and can be used for realtime PA and US imaging. However, in linear array transducer only a few numbers of detection angles are available. In other words, a low quality image is formed due to the limited available angles in linear array transducers. DMAS was introduced in35 to improve the image quality. DMAS calculates corresponding sample for each element of the array, the same as DAS, but before summation, samples are combinatorially coupled and multiplied. The DMAS formula is given by: yDM AS (k) = M −1 X M X i=1 j=i+1 xi (k − ∆i )xj (k − ∆j ). (2) To overcome the dimensionally squared problem of (2), following equations are suggested:35 q x̂ij (k) = sign[xi (k − ∆i )xj (k − ∆j )] |xi (k − ∆i )xj (k − ∆j )|. 4 (3) yDM AS (k) = M −1 X M X x̂ij (k). (4) i=1 j=i+1 A product in time domain is equivalent to the convolution of the spectra of the signals in the frequency domain. Consequently, new components centered at the zero frequency and the harmonic frequency appear in the spectrum due to the similar ranges of frequency for xi (k − ∆i ) and xj (k − ∆j ). A band-pass filter is applied on the beamformed output signal to only pass the necessary frequency components, generated after these non-linear operations, while keeping the one centered on 2f0 almost unaltered. Finally, the Filtered-DMAS (F-DMAS) is obtained, extensively explained in.35 The procedure of DMAS algorithm can be considered as a correlation process which uses the auto-correlation of aperture. In other words, the output of this beamformer is based on the spatial coherence of PA signals, and it is a non-linear beamforming algorithm. 2.2 Minimum Variance The output of MV adaptive beamformer is given by: y(k) = W H (k)X d (k) = M X i=1 wi (k)xi (k − ∆i ), (5) where X d (k) is time-delayed array detected signals X d (k) = [x1 (k), x2 (k), ..., xM (k)]T , W (k) = [w1 (k), w2 (k), ..., wM (k)]T is the beamformer weights, and (.)T and (.)H represent the transpose and conjugate transpose, respectively. The detected array signals can be written as follows: X(k) = s(k) + i(k) + n(k) = s(k)a + i(k) + n(k), 5 (6) where s(k), i(k) and n(k) are the desired signal, interference and noise components received by array transducer, respectively. Parameters s(k) and a are the signal waveform and the related steering vector, respectively. MV bemaformer can be used to adaptively weight the calculated samples, and the goal of MV beamformer is to achieve optimal weights in order to estimate the desired signal as accurately as possible. The superiority of the MV algorithm has been evaluated in comparison with static windows, such as Hamming window.28 To acquire the optimal weights, signal-to-interference-plus-noise ratio (SIN R) needs to be maximized:46 SIN R = σs2 |W H a|2 , W H Ri+n W (7) where Ri+n is the M × M interference-plus-noise covariance matrix, and σs2 is the signal power. The maximization of SIN R can be gained by minimizing the output interference-plus-noise power while maintaining a distortionless response to the desired signal using following equation: min W H Ri+n W , s.t. W H a = 1. W (8) The solution of (8) is given by:47 W opt = R−1 i+n a . aH R−1 i+n a (9) In practical application, interference-plus-noise covariance matrix is unavailable. Consequently, the sample covariance matrix is used instead of unavailable covariance matrix using N recently received samples and is given by: R̂ = N 1 X X d (n)X d (n)H . N n=1 6 (10) Using MV in medical US imaging encounters some problems which are addressed in,27 and it is out of this paper discussion, but we briefly review it here. It should be noticed that by applying delays on each element of the array, the steering vector a for each signal waveform becomes a vector of ones.26–28 The subarray-averaging or spatial-smoothing method can be used to achieve a good estimation of covariance matrix using decorrelation of the coherent signals received by array elements. The covariance matrix estimation using spatial-smoothing can be written as: MX −L+1 1 X ld (k)X ld (k)H , R̂(k) = M − L + 1 l=1 (11) l+L−1 where L is the subarray length and X ld (k) = [xld (k), xl+1 (k)] is the delayed input d (k), ..., xd signal for the lth subarray. Due to limited statistical information, only a few temporal samples are used to estimate covariance matrix. Therefore, to obtain a stable covariance matrix, the diagonal loading (DL) technique is used. This method leads to replacing R̂ by loaded sample covariance matrix, R̂l = R̂ + γI, where γ is the loading factor given by: γ = ∆.trace{R̂(k)}, (12) where ∆ is a constant related to subarray length. Also, temporal averaging method can be applied along with spatial averaging to gain the resolution enhancement while the contrast is retained. The estimation of covariance matrix using both temporal averaging and spatial smoothing in given by: K MX −L+1 X 1 R̂(k) = × X ld (k + n)X ld (k + n)H , (2K + 1)(M − L + 1) n=−K l=1 7 (13) where temporal averaging is used over (2K + 1) samples. After estimation of covariance matrix, optimal weights are calculated by (9) and (13) and finally the output of MV beamformer is given by: MX −L+1 1 l ŷ(k) = WH ∗ (k)X d (k). M − L + 1 l=1 (14) where W ∗ (k) = [w1 (k), w2 (k), ..., wL (k)]T . 3 Proposed Method In this paper, it is proposed to use the MV adaptive beamformer instead of the existing DAS algebra inside DMAS mathematical expansion. To illustrate this, consider the expansion of the DMAS algorithm which can be written as follows: yDM AS (k) = M −1 X M X xid (k)xjd (k) = i=1 j=i+1 h i x1d (k)x2d (k) + x1d (k)x3d (k) + ... + x1d (k)xM d (k)) h + x2d (k)x3d (k) + x2d (k)x4d (k) + ... + x2d (k)xM d (k)] + ... (15) h i h i + x(M −2)d (k)x(M −1)d (k) + x(M −2)d (k)xM d (k) + x(M −1)d (k)xM d (k) , where xid (k) and xjd (k) are delayed detected signals for element i and j, respectively, and we hold this notation all over this section. As can be seen, there is a DAS in every terms of the expansion, and it can be used to modify the DMAS beamformer. To illustrate this, consider the 8 following equation: yDM AS (k) = M −1 X M X xid (k)xjd (k) = i=1 j=i+1 h i h i x1d (k) x2d (k) + x3d (k) + x4d (k) + ... + xM d (k) +x2d (k) x3d (k) + x4d (k) + ... + xM d (k) {z } | {z } | first term second term h i h i + ... + x(M −2)d (k) x(M −1)d (k) + xM d (k) + x(M −1)d (k).xM d (k) . | {z } | {z } (M-2)th term (M-1)th term (16) In (16), in every terms, there exists a summation procedure which is a type of DAS algorithm. It is proposed to use MV adaptive beamformer for each term instead of DAS. In other words, since DAS is a non-adaptive beamformer and considers all calculated samples for each element of the array the same as each other, consequently, the acquired image by each term is a low quality image with high levels of sidelobes and broad mainlobe. In order to use MV instead of every DAS in the expansion, we need to carry out some modifications and prepare the expansion in (16) for the proposed method. Following section contains the essential modifications. 3.1 Modified DMAS It should be noticed that the quality of covariance matrix estimation in MV highly depends on the selected length of subarray. The upper boundary is limited to M/2 and the lower boundary to 1. Choosing L = M/2 leads to resolution enhancement at the cost of robustness, and L = 1 leads to resolution reduction and robustness increment. In (16), each term can be considered as a DAS algorithm with different number of elements of array. In other words, the number of samples of elements contributing in the existing DAS is different in each term, which results from the nature 9 of DMAS algorithm. To illustrate this, consider the length of array M and L = M/2. There will be M − 1 terms in DMAS expansion, while first term contains M − 1 entries, second term contains M − 2 entries and finally the last term contains only one entry. Limited number of entries in each term causes problem for MV algorithm due to the limited length of the subarray. This problem can be addressed by adding the unavailable elements in each term in order to acquire large enough number of available elements and consequently high quality covariance matrix estimation. The extra terms, needed to address the problem, are given by: yextra (k) = 2 1 X X xid (k)xjd (k) + yextra∗ i=M −2 j=i−1 h i = x(M −2)d (k) x(M −3)d (k) + x(M −4)d (k) + ... + x2d (k) + x1d (k) h i + x(M −3)d (k). x(M −4)d (k) + x(M −5)d (k) + ... + x2d (k)] + x1d (k) (17) h i + ... + x3d (k). x2d (k) + x1d (k) + x2d (k)x1d (k) + yextra∗ (k) , where h i yextra∗ (k) = xM d (k) x(M −1)d (k) + x(M −2)d (k) + ... + x3d (k) + x2d (k) + x1d (k) . (18) (17) is used to make the terms in (16) ready to adopt a MV algorithm. Finally, by adding (16) and (17), a modified version of DMAS algorithm namely modified DMAS (MDMAS) is obtained and 10 can be written as: yM DM AS (k) = yDM AS (k) + yextra (k) = M M X X i=1 xid (k)xjd (k) = j=1,j6=i h i = x1d (k) x2d (k) + x3d (k) + ... + x(M −1)d (k) + xM d (k) {z } | first term h i + x2d (k) x1d (k) + x3d (k) + ... + x(M −1)d (k) + xM d (k) {z } | (19) second term h i + ... + x(M −1)d (k). x1d (k) + x2d (k) + ... + x(M −2)d (k) + xM d (k) {z } | h first term i + xM d (k) x1d (k) + x2d (k) + ... + x(M −2)d (k) + x(M −1)d (k) . | {z } Mth term The introduced algorithm in (19) has been evaluated by simulations, and it is proved that this formula can be a modification of DMAS algebra with the same results. To put it more simply, (19) is the multiplication of DMAS output by 2, and since all the cross-products are considered twice, simulations give the same results. Now, the combination of MDMAS algorithm and MV beamformer is mathematically satisfying and instead of every terms in (19), MV can be implemented using all entities in each term. The expansion of MDMAS combined with MV beamformer can be 11 written as follows: yM V −DM AS (k) = M X i=1 M X i=1 M X M X i=1  xid (k) W H i,M −1 (k)X id,M −1 (k) =  X  X   M M H xid (k) wj (k)xjd (k) = xid (k) W (k)X d (k) − wi (k)xid (k) = i=1 j=1,j6=i X  M xid (k) wj (k)xjd (k) − wi (k)xid (k) = (20) j=1 xid (k) i=1 X M | j=1  wj (k)xjd (k) − {z } MV M X i=1   xid (k) wi (k)xid (k) , where W i,M −1 and X id,M −1 are almost the same as W (k) and X d (k) used in (5), respectively, but the ith element of the array is ignored in calculation and as a result, the length of these vectors becomes M −1 instead of M . Considering (20), the expansion can be written based on a summation which is considered as a DAS algebra. To illustrate this, consider following expansion: yM V −DM AS (k) = M X xid (k) i=1 | X M | j=1 M X xid (k) i=1 X M | j=1     X M xid (k) wi (k)xid (k) = wj (k)xjd (k) − {z MV wj (k)xjd (k) −wi (k)x2id (k) . {z MV {z ith term } } i=1 (21) } It is proved that DAS leads to low quality images and high levels of sidelobe and obviously in (21), expansion leads to a summation and this summation can be considered as a DAS. As a final step of MVB-DMAS development, it is proposed to use another MV instead of DAS in order to reduce the contribution of off-axis signals and noise of imaging system. To put it more simply, considering (21), each term is contributed in a summation process which is regarded as a DAS, represented in 12 (1). Since (5) leads to image enhancement compared to (1), it is expected to improve the image quality in terms of resolution and levels of sidelobe having MV instead of outer summation in (21). MVB-DMAS formula can be written as follows: yM V B−DM AS (k) = M X i=1 wi,new xid (k) X M j=1 | !  wj (k)xjd (k) − wi (k)x2id (k) , {z ith term } (22) where wi,new is the calculated weight for each term in (22) using (9) while the steering vector is a vector of ones. It should be noticed that when there is a multiplication, resulting in squared dimension, the method mentioned in (4) is used to prevent the squared dimension. Moreover, there are two MV algorithms inside the proposed method, one on the delayed signals and one on the ith term obtained with (21). Since we face with the correlation procedure of DMAS, including product function in time domain, in the proposed method, necessary band-pass filter is applied in (21) for each term, before outer summation. In other words, each term in the proposed method in (22) is filtered to only pass the necessary components, generated after the non-linear operations, and then all of them are contributed in the second MV algorithm. In the section 4, it is shown that MVB-DMAS beamformer results in resolution improvement and sidelobes level reduction. 4 NUMERICAL RESULTS AND PERFORMANCE ASSESSMENT In this section, numerical results are presented to illustrate the performance of the proposed algorithm in comparison with DAS, DMAS and MV. 13 4.1 Simulated Point Target 4.1.1 Simulation Setup The K-wave Matlab toolbox was used to simulate the numerical study.48 Eleven 0.1 mm radius spherical absorbers as initial pressure were positioned along the vertical axis every 5 mm beginning 25 mm from the transducer surface. The imaging region was 20 mm in lateral axis and 80 mm in vertical axis. A linear-array having M =128 elements operating at 5 M Hz central frequency and 77% fractional bandwidth was used to detect the PA signals generated from the defined initial pressures. The speed of sound was assumed to be 1540 m/s during simulations. The sampling frequency was 50 M Hz, subarray length L=M /2, K=5 and ∆ = 1/100L for all the simulations. Also, a band-pass filter was applied by a Tukey window (α=0.5) to the beamformed signal spectra, covering 6-16 M Hz, to pass the necessary information. 4.1.2 Qualitative Evaluation Fig. 1(a), Fig. 1(b), Fig. 1(c) and Fig. 1(d) show the output of DAS, MV, DMAS and MVB-DMAS beamformers, respectively. It is clear that DAS and DMAS result in low resolution images, and at the high depths of imaging both algorithms lead to a wide mainlobe. However, DMAS leads to lower level of sidelobes and a higher resolution. In Fig. 1(b), it can be seen that MV results in high resolution, but the high level of sidelobes affect the reconstructed image. Formed image using MVB-DMAS is shown in Fig. 1(d) where the resolution of MV beamformer is maintained and the level of sidelobe are highly degraded compared to MV. To assess the different beamforming algorithms in details, lateral variations of the formed images are shown in Fig. 2. Lateral variations at the depth of 50 mm is shown in Fig. 2(c) where DAS, MV, DMAS and MVB-DMAS result in about -40 dB, -50 dB, -55 dB and -65 dB sidelobes, respectively. On the other hand, width of 14 MV DMAS MVB-DMAS 0 10 10 10 10 20 20 20 20 30 40 50 30 40 50 Axial distance [mm] 0 Axial distance [mm] 0 Axial distance [mm] Axial distance [mm] DAS 0 30 40 50 30 40 50 60 60 60 60 70 70 70 70 80 -10 0 Lateral distance [mm] (a) 10 80 -10 0 10 Lateral distance [mm] (b) 80 -10 0 Lateral distance [mm] (c) 10 80 -10 0 10 Lateral distance [mm] (d) Fig 1: Images of the simulated point targets phantom using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS, (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals considering a SNR of 50 dB. Fig 2: Lateral variations of DAS, MV, DMAS and MVB-DMAS at the depths of (a) 40 mm, (b) 45 mm, (c) 50 mm and (d) 65 mm. mainlobe can be regarded as a parameter, indicating the resolution metric. It can be seen that MV and MVB-DMAS result in significant higher resolution in comparison with DAS and DMAS. 15 Table 1: FWHM (µm) values (in -6 dB) at the different depths. ``` ``Beamformer DAS DMAS MV MVB-DMAS ``` ``` Depth(mm) ` 25 1200 850 93 54 1476 1059 99 54 30 35 1842 1286 115 61 2277 1584 133 72 40 45 2710 1862 143 82 50 3565 2355 172 95 3800 2535 187 102 55 60 4400 2937 226 113 4967 3273 288 123 65 70 5512 3639 305 146 75 6625 4244 471 212 ``` Table 2: SNR (dB) values at the different depths. ``Beamformer DAS DMAS MV MVB-DMAS ``` ```` Depth(mm) 25 30.7 51.1 42.7 57.7 30 28.6 46.9 39.3 53.2 26.8 43.6 37.7 50.8 35 25.2 40.2 35.3 48.2 40 45 23.5 36.2 34.4 46.5 21.7 32.0 33.2 45.0 50 20.1 28.2 32.4 50.8 55 60 18.5 25.0 31.3 48.2 65 17.2 22.6 30.4 46.5 16.3 20.7 30.1 45.0 70 75 15.5 19.1 29.0 43.3 ``` ``` 4.1.3 Quantitative Evaluation To quantitatively compare the performance of the beamformers, the full-width-half-maximum (FWHM) in -6 dB and signal-to-noise ratio (SNR) are calculated in all imaging depths using point targets in the reconstructed images. The results for FWHM and SNR are shown in TABLE 1 and TABLE 2, respectively. As can be seen in TABLE 1, MVB-DMAS results in the narrowest -6 dB width of mainlobe in all imaging depths compared to other beamformers. In particular, consider depth of 50 mm where FWHM for DAS, DMAS, MV and MVB-DMAS is about 3565 µm, 2355 16 µm, 172 µm and 95 µm, respectively. More importantly, the FWHM differentiation of the first and last imaging depth indicates that MVB-DMAS and MV techniques variate 158 µm and 378 µm, respectively, while DAS and DMAS variate 5425 µm and 3394 µm, respectively. As a result, FWHM is more stabilized using MVB-DMAS and MV in comparison with DAS and DMAS. The represented SNRs in TABLE 2 are calculated using following equation: SN R = 20 log10 Psignal /Pnoise . (23) where Psignal and Pnoise are difference of maximum and minimum intensity of a rectangular region including a point target (white dashed rectangle in Fig. 1(d)), and standard deviation of the noisy part of the region (red rectangle in Fig. 1(d)), respectively.39, 49 As can be seen in TABLE 2, MVB-DMAS outperforms other beamformers in SNR. Consider, in particular, the depth of 50 mm where SNR for DAS, DMAS, MV and MVB-DMAS is 21.7 dB, 32.0 dB, 33.2 dB and 45.0 dB, respectively. 4.2 Sensitivity to Sound Velocity Inhomogeneities In this section, the proposed method is evaluated in the term of robustness against the sound velocity errors resulting from medium inhomogeneities which are inevitable in practical imaging. The simulation design for Fig. 1 is used in order to investigate the robustness, except that the sound velocity is overestimated by 5%, which covers and may be more than the typical estimation error.26, 27 It should be noticed that in the simulation, we have intentionally overestimated the sound velocity by 5% to evaluate the proposed method. This is important since we usually face this phenomenon in the practical situations where the medium is inhomogeneous, but the images are reconstructed 17 assuming a sound velocity of 1540 m/s. As can be seen in Fig. 3(b), MV leads to higher resolution compared to DAS, but the high levels of sidelobe and negative effects of overestimated sound velocity still affect the reconstructed image. It should be noticed that the appeared noise and artifacts in Fig. 3(b) are due to the overestimated sound velocity and the temporal averaging with K=5. DMAS, in Fig. 3(c), reduces these negative effects, but the resolution is not well enough. As can be seen in Fig. 3(d), MVB-DMAS results in the high negative effects reduction of DMAS and the high resolution of MV. However, the reconstructed image using MVB-DMAS contains more artifacts compared to DMAS, which is mainly as a result of the lower SNR of MVB-DMAS compared to DMAS. Fig. 4 shows the lateral variation of the reconstructed images in Fig. 3. As can be seen, MVB-DMAS detects the peak amplitude of point target as well as DAS. The resolution of the formed image using MVB-DMAS is improved in comparison with DAS and DMAS. Moreover, the levels of sidelobe using MVB-DMAS is reduced in comparison with other mentioned beamformers. 4.3 Effects of Varying L To evaluate the effects of varying L, the proposed method has been implemented using L=64, L=45, L=32 and L=16. The lateral variations of the formed images at the depth of 45 mm are presented in Fig. 5. Clearly, increasing L results in a higher resolution, and lower level of sidelobes. Moreover, the SNR, in two imaging depths, is presented in Table 3. It is shown that SNR does not significantly vary for different L. However, L=45 results in higher SNR. In addition, Table 4 shows the calculated FWHM for different amounts of L, and it proves that FWHM is reduced with higher L. 18 MV DMAS MVB-DMAS 0 10 10 10 10 20 20 20 20 30 40 50 30 40 50 Axial distance [mm] 0 Axial distance [mm] 0 Axial distance [mm] Axial distance [mm] DAS 0 30 40 50 30 40 50 60 60 60 60 70 70 70 70 80 -10 0 Lateral distance [mm] (a) 10 80 -10 0 10 Lateral distance [mm] (b) 80 -10 0 Lateral distance [mm] (c) 10 80 -10 0 10 Lateral distance [mm] (d) Fig 3: Images of the simulated point targets phantom using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS, (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. The sound velocity is overestimated about 5 %. Noise was added to the detected signals considering a SNR of 50 dB. Fig 4: Lateral variations of DAS, MV, DMAS and MVB-DMAS at the depths of (a) 45 mm and (b) 70 mm while the sound velocity is 5% overestimated. 4.4 Effects of Coherence Weighting The proposed algorithm is also evaluated when it has been combined with CF. To have a fair comparison, all the beamformers are combined with CF weighting. The reconstructed images along with the corresponding lateral variations are shown in Fig. 6 and Fig. 7, respectively. As can be seen in Fig. 6, MVB-DMAS+CF results in higher resolution and lower sidelobes compared to other beamformers. The higher resolution of MVB-DMAS+CF is visible compared to DMAS+CF, 19 Depth= 45 mm 0 MVB-DMAS, L=16 MVB-DMAS, L=32 MVB-DMAS, L=45 MVB-DMAS, L=64 Power [dB] -20 -40 -60 -80 -10 -8 -6 -4 -2 0 2 4 6 8 10 Lateral distance [mm] Fig 5: Lateral variations of MVB-DMAS at the depth of 45 mm for L=16, L=32 , L=45 and L=64. Table 3: SNR (dB) values of MVB-DMAS for the different amounts of L. hhhh hhh Number of L hhhh 16 32 45 64 hhh Depth(mm) hhh h 45 67.5 67.2 67.3 66.0 65 61.8 61.6 62.4 61.0 especially at high depths of imaging. In addition, it is clear that MVB-DMAS+CF reduces the sidelobes compared to MV+CF and improves the target detectability. To have a better comparison, consider Fig. 7 where MVB-DMAS+CF outperforms other beamformers in the terms of width of mainlobe in -6 dB and sidelobes. It is shown that sidelobes for DAS, DMAS, MV and MVBDMAS, when all of them are combined with CF, are about -120 dB, -120 dB, -111 dB and -160 dB, respectively, showing the superiority of MVB-DMAS+CF. 5 EXPERIMENTAL RESULTS To evaluate the MVB-DMAS algorithm, in this section results of designed experiments are presented. 5.1 Experimental Setup A linear-array of PAI system was used to detect the PA waves and the major components of system include an ultrasound data acquisition system, Vantage 128 Verasonics (Verasonics, Inc., Redmond, WA), a Q- switched Nd:YAG laser (EverGreen Laser, Double-pulse Nd: YAG system) with 20 Table 4: FWHM (µm) values of MVB-DMAS (in -6 dB) for the different amounts of L. hhh hhhh hhh Number of L 16 32 45 64 hhhh Depth(mm) hhh h 45 480 199 95 59 735 259 161 97 65 Fig 6: Images of the simulated point targets phantom using the linear-array transducer. (a) DAS+CF, (b) MV+CF, (c) DMAS+CF, (d) MVB-DMAS+CF. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals considering a SNR of 50 dB. a pulse repetition rate of 25 Hz, wavelength 532 nm and a pulse width of 10 ns. A transducer array (L7-4, Philips Healthcare) with 128 elements and 5.2 M Hz central frequency was used as a receiver. A function generator is used to synchronize all operations (i.e., laser firings and PA signal recording). The data sampling rate was 20.8320 M Hz. The schematic of the designed system is presented in Fig. 8, and a gelatin-based phantom used as imaging target is shown in Fig. 9, including two blood inclusions to provide optoacoustic properties. The experimental setup for PA linear-array imaging is shown in Fig. 10 where two parallel wire are used as phantom for another experiment. It should be noticed that in all experiments, surface of the transducer is perpendicular to the imaging targets. Thus, it is expected to see a cross section of the targets. A band-pass filter was applied by a Tukey window (α=0.5) to the beamformed signal spectra, covering 6-13 M Hz, 21 Fig 7: Lateral variations of DAS+CF, MV+CF, DMAS+CF and MVB-DMAS+CF at the depths of 45 mm. to pass the necessary information. 5.2 Qualitative Evaluation The reconstructed images using the phantom shown in Fig. 9 are presented in Fig. 11. Clearly, there are three structures seen in the reconstructed images, Fig. 11, which two of them are blood inclusions, and the first one is because of the small fracture on the upper part of the phantom shown in Fig. 9. As is demonstrated, DAS leads to a low resolution image having high level of sidelobe, especially the target at the depth of 35 mm. MV leads to a higher resolution in comparison with DAS, but negative effects of the high level of sidelobes are obvious Fig. 11(b), and the background of the reconstructed image are affected by noise. DMAS enhances the image in the terms of sidelobes and artifacts, but still provides a low resolution image. MVB-DMAS leads to a higher resolution image having lower sidelobes compared to DAS, DMAS and MV. It Fig 8: Schematic of the experimental setup. 22 20 mm Fig 9: Photographs of the phantom used in the first experiment. L7-4 Transducer Probe Surface of the Water Wire-1 20 mm Wire-2 Fig 10: Experimental setup of PA linear-array imaging of two parallel wires. is clear that MVB-DMAS provides the high resolution of MV and low sidelobes of DMAS. The line above the targets is due to the PA signal generation at the surface of the phantom (due to the top illumination) and is supposed to look like what is seen in Fig. 11(d), considering the area of illumination, its location and laser beam profile. The phantom we used was a bit old, and its surface was slightly dried. Hence, when we added the ultrasound gel on the top of the sample, there was a rather large impedance mismatch created at the interface between the surface of the sample and the US gel. In our other similar tests (Fig. 12), we observed the similar artifact, but much weaker. In 23 DAS MV 0 DMAS 0 MVB-DMAS 0 0 1 10 10 10 0.9 10 40 30 40 20 Axial distance [mm] 30 20 Axial distance [mm] 20 Axial distance [mm] Axial distance [mm] 0.8 30 40 0.7 20 0.6 30 0.5 0.4 40 0.3 0.2 50 50 50 50 0.1 60 -20 0 60 -20 20 Lateral distance [mm] (a) 0 60 -20 20 Lateral distance [mm] (b) 0 60 -20 20 Lateral distance [mm] (c) 0 0 20 Lateral distance [mm] (d) Fig 11: Images of the phantom shown in Fig. 9 using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS and (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. DAS MV 0 DMAS 0 MVB-DMAS 0 0 1 10 10 10 10 20 20 20 20 0.9 40 30 40 Axial distance [mm] 30 Axial distance [mm] Axial distance [mm] Axial distance [mm] 0.8 30 40 0.7 0.6 30 0.5 0.4 40 0.3 50 50 50 50 60 60 60 60 0.2 0.1 0 -20 0 20 Lateral distance [mm] (a) -20 0 20 Lateral distance [mm] (b) -20 0 20 Lateral distance [mm] (c) -20 0 20 Lateral distance [mm] (d) Fig 12: Images of the wires shown in Fig. 10 using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS and (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. Fig. 11(a) and Fig. 11(c), the extended version of the line is seen which is considered as an artifact. DAS and DMAS stretch imaging targets (please see the two imaging targets in Fig. 11(a) and Fig. 11(c)). On the other hand, the stretch in MVB-DMAS is much less due to the correlation process and two stages of MV. The reconstructed images for the designed experiment shown in Fig. 10 are 24 Depth= 33 mm DAS DMAS MV MVB-DMAS 0 Power [dB] -10 -20 -30 -40 -50 -60 -70 3 4 5 6 7 8 9 Lateral distance [mm] Fig 13: Lateral variations at the depth of 33 mm. shown in Fig. 12. Since the surface of the transducer is perpendicular to the wires, it is expected to see the targets like points. As is demonstrated in Fig. 12(a), DAS results in low resolution points, along with high levels of artifacts, especially at the depth of about 30 mm. In Fig. 12(b), MV leads to resolution improvement while the image is still suffers from high level of sidelobes. The reconstructed image using DMAS, shown in Fig. 12(c), contains low level of sidelobes, but the resolution is low. Finally, MVB-DMAS provides an image with characteristics of DMAS and MV, which are reduced sidelobes and high resolution, respectively. Fig. 13 demonstrates the lateral variations of the beamformers at the depth of 33 mm of Fig. 12. As shown in the green circle, MVB-DMAS results in a narrower width of mainlobe and lower sidelobes (see the arrows) 5.3 Quantitative Evaluation To compare the experimental results quantitatively, SNR and Contrast Ratio (CR) metrics are used. TABLE 5 and TABLE 6 show the calculated SNR and CR for the two targets in the Fig. 11. CR formula is explained in.35 As can be seen, the calculated metrics show that MVB-DMAS outperforms other beamformers. In other words, it leads to higher SNR and CR. 25 Table 5: SNR (dB) values at the different depths using the targets in Fig. 11. ``` ``` ``Beamformer DAS DMAS MV MVB-DMAS ``` ``` Depth(mm) ` 35 28.6 46.96 39.32 53.21 24.20 45.87 37.91 50.11 55 Table 6: CR (dB) values at the different depths using the targets in Fig. 11. ``` ``` ``Beamformer DAS DMAS MV MVB-DMAS ``` ```` Depth(mm) 35 30.4 33.8 27 36.3 55 26.3 30.1 26.2 32.5 5.4 In Vivo Imaging We imaged median antebrachial vein of a 30 years old Middle Eastern male in vivo (see Fig. 14). The illumination was done from side using a single large diameter PMMA fiber (10 mm). L22-14v transducer was used to collect the PA signals while it was positioned perpendicular to the vein. The institutional review board at Wayne State University (Independent Investigational Review Board, Detroit, MI) approved the study protocol, and informed consent was obtained from the individual before enrolment in the study. In the reconstructed images, as shown in Fig. 15, the top and bottom of the antebrachial vein showed up. It can be seen that the reconstructed image using MVB-DMAS has lower sidelobes, noise and artifacts compared to other methods, and the cross-sections (top and bottom) of the vein are more detectable. 6 Discussion The main improvement gained by the introduced method is that the high resolution of MV beamforming algorithm is retained while the level of sidelobes are reduced. PA images reconstructed by DAS bemaformer have a low quality, along with high effects of off-axis signals and high sidelobes. This is mainly due to the blindness of DAS. In fact, the DAS algorithm is a procedure in which 26 Table 7: Computational operation and processing time(s) ``Beamformer DAS DMAS MV MVB-DMAS ``` ```` Metric Order M M2 M3 M3 1.1 10.8 90.9 187.1 Processing Time ``` ``` Fig 14: The photo of the median antebrachial vein of a 30 years old Middle Eastern male. all contributing samples are treated identically. On the other hand, DMAS beamformer is a nonlinear algorithm and leads to high level of off-axis signals rejection due to its correlation process. In DMAS beamformer, all the calculated samples are weighted using a linear combination of the received signals. This procedure makes DMAS a non-blind beamforming algorithm which results in lower effects of off-axis signals and higher contrast reconstructed images compared to DAS. However, the resolution improvement by DMAS is not good enough in comparison with the MV algorithm. In MV beamformer, samples are weighted adaptively resulting significant resolution improvement. However, it leads to high level of sidelobes. Therefore, we face two types of beamformers which one of them (DMAS) results in sidelobes improvement, and the other one (MV) leads to significant resolution enhancement. The expansion of DMAS algebra shows there are multiple terms which each of them can be interpreted as a DAS with different lengths of array. This could be the source of the low resolution of DMAS algorithm, and using MV instead of these terms can be an appropriate choice to improve 27 Fig 15: In vivo images of the target shown in Fig. 14 using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS and (d) MVB-DMAS. All images of the median antebrachial vein. All the image are shown with a dynamic range of 60 dB. the resolution. However, as shown in (16), the number of contributing samples in each term of the expansion is different. The length of the subarray in the spatial smoothing highly effects the performance of MV algorithm, and in (16) there are some terms representing a low length of array and subarray. To address this problem, necessary terms are added to each term, and then MV algorithm is applied on it. The superiority of MV has been proved compared to DAS, and it is expected to have resolution improvement using MV instead of the existing DAS inside the expansion. This method has been used in the introduced algorithm twice to suppress the artifacts and sidelobes of MV. In other words, there are two MV algorithms inside the proposed method, one on the delayed signals and one on the ith term of (21). The MV implemented on the delayed signals improves the resolution, but since there is another summation procedure interpreting as DAS, shown in 16, the level of sidelobes and artifacts reduce the image quality. Second MV is implemented on the ith term of (21) to use the properties of MV algorithm in order to improve the image quality. It should be noticed that since the expansion of DMAS is used to integrate the MV algorithm for resolution improvement, there are multiplication operations in the introduced algorithm. The same as DMAS, a band-pass filter is needed to only pass the necessary information.35 The proposed algorithm adaptively calculates the weights for each samples, which improves the resolution. Since 28 the correlation procedure of DMAS contributes in the proposed method, the sidelobe level of MV are reduced while the resolution is retained due to the existence of MV in the proposed method. MVB-DMAS has been evaluated numerically and experimentally. It should be noticed that the processing time of the proposed method is higher than other mentioned beamformers. TABLE 7 shows the order of beamformers computations and corresponding processing time. The correlation process of DMAS needs more time compared to DAS, and MV needs time to adaptive calculation of the weights. MVB-DMAS uses two stages of MV algorithm and a correlation procedure, so it is expected to result in higher processing time compared to MV and DMAS. The computational complexity for calculating the weighting coefficients in MVB-DMAS is in the order of O(L3 ). Considering the fact that L supposed to be a fraction of M , the computational complexity is a function of M 3 . Given the weighting coefficient, the computational complexity of the reconstruction procedure is a function of M , so the bottle neck of the computational burden is M 3 , which is the same as regular MV algorithm. Note that, the complexity of DMAS and DAS are O(M 2 ) and O(M ), respectively. Since MV algorithm is used in the proposed method, twice, the effects of length of L has been investigated, and the results showed that it effects MVB-DMAS the same as it effects MV. The proposed algorithm significantly outperforms DMAS and MV in the terms of resolution and level of sidelobes, respectively, mainly due to having the specifications of DMAS and MV at the same time. In fact, MVB-DMAS uses the correlation process of DMAS to suppress the artifacts and noise, and adaptive weighting of MV to improve the resolution. 7 Conclusion In PAI, DAS beamformer is a common beamforming algorithm, capable of real-time imaging due to its simple implementation. However, it suffers from poor resolution and high level of sidelobes. 29 To overcome these limitations, DMAS algorithm was used. Expanding DMAS formula leads to multiple terms of DAS. In this paper, we introduced a novel beamforming algorithm based on the combination of MV and DMAS algorithms, called MVB-DMAS. This algorithm was established based on the existing DAS in the expansion of DMAS algebra, and it was proposed to use MV beamforming instead of the existing DAS. Introduced algorithm was evaluated numerically and experimentally. It was shown that MVB-DMAS beamformer reduces the level of sidelobes and improves the resolution in comparison with DAS, DMAS and MV, at the expense of higher computational burden. Qualitative results showed that MVB-DMAS has the capabilities of DMAS and MV concurrently. Quantitative comparisons of the experimental results demonstrated that MVBDMAS algorithm improves CR about 20 %, 9 % and 33 %, and enhances SNR 89 %, 15 % and 35 %, with respect to DAS, DMAS and MV. Acknowledgments This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors, and the authors have no potential conflicts of interest to disclose. References 1 M. Jeon and C. Kim, “Multimodal photoacoustic tomography,” IEEE Transactions on Multimedia 15(5), 975–982 (2013). 2 J. Xia and L. V. Wang, “Small-animal whole-body photoacoustic tomography: a review,” IEEE Transactions on Biomedical Engineering 61(5), 1380–1389 (2014). 3 J. Yao and L. V. Wang, “Breakthroughs in photonics 2013: Photoacoustic tomography in biomedicine,” IEEE Photonics Journal 6(2), 1–6 (2014). 30 4 P. Beard, “Biomedical photoacoustic imaging,” Interface Focus 1(4), 602–631 (2011). 5 B. Guo, J. Li, H. Zmuda, et al., “Multifrequency microwave-induced thermal acoustic imaging for breast cancer detection,” IEEE Transactions on Biomedical Engineering 54(11), 2000–2010 (2007). 6 M. Heijblom, W. Steenbergen, and S. Manohar, “Clinical photoacoustic breast imaging: the twente experience.,” IEEE Pulse 6(3), 42–46 (2015). 7 M. Mehrmohammadi, S. Joon Yoon, D. Yeager, et al., “Photoacoustic imaging for cancer detection and staging,” Current molecular imaging 2(1), 89–105 (2013). 8 A. de La Zerda, Y. M. Paulus, R. Teed, et al., “Photoacoustic ocular imaging,” Optics Letters 35(3), 270–272 (2010). 9 R. O. Esenaliev, I. V. Larina, K. V. Larin, et al., “Optoacoustic technique for noninvasive monitoring of blood oxygenation: a feasibility study,” Applied Optics 41(22), 4722–4731 (2002). 10 J. Yao, J. Xia, K. I. Maslov, et al., “Noninvasive photoacoustic computed tomography of mouse brain metabolism in vivo,” Neuroimage 64, 257–266 (2013). 11 M. Nasiriavanaki, J. Xia, H. Wan, et al., “High-resolution photoacoustic tomography of resting-state functional connectivity in the mouse brain,” Proceedings of the National Academy of Sciences 111(1), 21–26 (2014). 12 Y. Zhou, J. Yao, and L. V. Wang, “Tutorial on photoacoustic tomography,” Journal of Biomedical Optics 21(6), 061007–061007 (2016). 13 J. Yao and L. V. Wang, “Photoacoustic microscopy,” Laser & Photonics Reviews 7(5), 758– 778 (2013). 31 14 X. Wang, Y. Pang, G. Ku, et al., “Noninvasive laser-induced photoacoustic tomography for structural and functional in vivo imaging of the brain,” Nature Biotechnology 21(7), 803–806 (2003). 15 M. Xu and L. V. Wang, “Time-domain reconstruction for thermoacoustic tomography in a spherical geometry,” IEEE Transactions on Medical Imaging 21(7), 814–822 (2002). 16 Y. Xu, D. Feng, and L. V. Wang, “Exact frequency-domain reconstruction for thermoacoustic tomography. i. planar geometry,” IEEE Transactions on Medical Imaging 21(7), 823–828 (2002). 17 Y. Xu, M. Xu, and L. V. Wang, “Exact frequency-domain reconstruction for thermoacoustic tomography. ii. cylindrical geometry,” IEEE Transactions on Medical Imaging 21(7), 829– 833 (2002). 18 Q. Sheng, K. Wang, T. P. Matthews, et al., “A constrained variable projection reconstruction method for photoacoustic computed tomography without accurate knowledge of transducer responses,” IEEE Transactions on Medical Imaging 34(12), 2443–2458 (2015). 19 C. Zhang, Y. Wang, and J. Wang, “Efficient block-sparse model-based algorithm for photoacoustic image reconstruction,” Biomedical Signal Processing and Control 26, 11–22 (2016). 20 M. Abran, G. Cloutier, M.-H. R. Cardinal, et al., “Development of a photoacoustic, ultrasound and fluorescence imaging catheter for the study of atherosclerotic plaque,” IEEE Transactions on Biomedical Circuits and Systems 8(5), 696–703 (2014). 21 C.-W. Wei, T.-M. Nguyen, J. Xia, et al., “Real-time integrated photoacoustic and ultrasound (paus) imaging system to guide interventional procedures: ex vivo study,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 62(2), 319–328 (2015). 32 22 C. Yoon, Y. Yoo, T.-k. Song, et al., “Pixel based focusing for photoacoustic and ultrasound dual-modality imaging,” Ultrasonics 54(8), 2126–2133 (2014). 23 E. Mercep, G. Jeng, S. Morscher, et al., “Hybrid optoacoustic tomography and pulse-echo ultrasonography using concave arrays,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 62(9), 1651–1661 (2015). 24 T. Harrison and R. J. Zemp, “The applicability of ultrasound dynamic receive beamformers to photoacoustic imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 58(10), 2259–2263 (2011). 25 M. Karaman, P.-C. Li, and M. O’Donnell, “Synthetic aperture imaging for small scale systems,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 42(3), 429– 442 (1995). 26 J. Synnevag, A. Austeng, and S. Holm, “Adaptive beamforming applied to medical ultrasound imaging,” IEEE Transactions on Ultrasonics Ferroelectrics and Frequency Control 54(8), 1606 (2007). 27 B. M. Asl and A. Mahloojifar, “Minimum variance beamforming combined with adaptive coherence weighting applied to medical ultrasound imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 56(9), 1923–1931 (2009). 28 J.-F. Synnevag, A. Austeng, and S. Holm, “Benefits of minimum-variance beamforming in medical ultrasound imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 56(9), 1868–1879 (2009). 29 B. M. Asl and A. Mahloojifar, “A low-complexity adaptive beamformer for ultrasound imag- 33 ing using structured covariance matrix,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 59(4), 660–667 (2012). 30 A. M. Deylami and B. M. Asl, “Low complex subspace minimum variance beamformer for medical ultrasound imaging,” Ultrasonics 66, 43–53 (2016). 31 S. Mehdizadeh, A. Austeng, T. F. Johansen, et al., “Minimum variance beamforming applied to ultrasound imaging with a partially shaded aperture,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 59(4), 683–693 (2012). 32 B. M. Asl and A. Mahloojifar, “Eigenspace-based minimum variance beamforming applied to medical ultrasound imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 57(11), 2381–2390 (2010). 33 S. Mehdizadeh, A. Austeng, T. F. Johansen, et al., “Eigenspace based minimum variance beamforming applied to ultrasound imaging of acoustically hard tissues,” IEEE Transactions on Medical Imaging 31(10), 1912–1921 (2012). 34 A. Rabinovich, A. Feuer, and Z. Friedman, “Multi-line transmission combined with minimum variance beamforming in medical ultrasound imaging,” IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control 62(5), 814–827 (2015). 35 G. Matrone, A. S. Savoia, G. Caliano, et al., “The delay multiply and sum beamforming algorithm in ultrasound b-mode medical imaging,” IEEE Transactions on Medical Imaging 34(4), 940–949 (2015). 36 H. B. Lim, N. T. T. Nhung, E.-P. Li, et al., “Confocal microwave imaging for breast cancer detection: Delay-multiply-and-sum image reconstruction algorithm,” IEEE Transactions on Biomedical Engineering 55(6), 1697–1704 (2008). 34 37 G. Matrone, A. S. Savoia, G. Caliano, et al., “Depth-of-field enhancement in filtered-delay multiply and sum beamformed images using synthetic aperture focusing,” Ultrasonics 75, 216–225 (2017). 38 M. Mozaffarzadeh, M. Sadeghi, A. Mahloojifar, et al., “Double stage delay multiply and sum beamforming algorithm applied to ultrasound medical imaging,” Ultrasound in Medicine and Biology PP(99), 1–1 (2017). 39 M. Mozaffarzadeh, A. Mahloojifar, M. Orooji, et al., “Double stage delay multiply and sum beamforming algorithm: Application to linear-array photoacoustic imaging,” IEEE Transactions on Biomedical Engineering PP(99), 1–1 (2017). 40 M. Mozaffarzadeh, A. Mahloojifar, and M. Orooji, “Image enhancement and noise reduction using modified delay-multiply-and-sum beamformer: Application to medical photoacoustic imaging,” in Electrical Engineering (ICEE), 2017 Iranian Conference on, 65–69, IEEE (2017). 41 M. Mozaffarzadeh, M. Mehrmohammadi, and B. Makkiabadi, “Enhanced Lineararray Photoacoustic Beamforming using Modified Coherence Factor,” arXiv preprint arXiv:1710.00157 (2017). 42 M. Mozaffarzadeh, M. Mehrmohammadi, and B. Makkiabadi, “Image Improvement in Linear-Array Photoacoustic Imaging using High Resolution Coherence Factor Weighting Technique,” arXiv preprint arXiv:1710.02751 (2017). 43 M. Mozaffarzadeh, A. Mahloojifar, and M. Orooji, “Medical photoacoustic beamforming using minimum variance-based delay multiply and sum,” in SPIE Digital Optical Technologies, 1033522–1033522, International Society for Optics and Photonics (2017). 35 44 M. Mozaffarzadeh, S. A. O. I. Avanji, A. Mahloojifar, et al., “Photoacoustic imaging using combination of eigenspace-based minimum variance and delay-multiply-and-sum beamformers: Simulation study,” arXiv preprint arXiv:1709.06523 (2017). 45 M. Mozaffarzadeh, A. Mahloojifar, M. Nasiriavanaki, et al., “Eigenspace-based minimum variance adaptive beamformer combined with delay multiply and sum: Experimental study,” arXiv preprint arXiv:1710.01767 (2017). 46 R. A. Monzingo and T. W. Miller, Introduction to adaptive arrays, Scitech publishing (1980). 47 J. Capon, “High-resolution frequency-wavenumber spectrum analysis,” Proceedings of the IEEE 57(8), 1408–1418 (1969). 48 B. E. Treeby and B. T. Cox, “k-wave: Matlab toolbox for the simulation and reconstruction of photoacoustic wave fields,” Journal of Biomedical Optics 15(2), 021314–021314 (2010). 49 J. Mazzetta, D. Caudle, and B. Wageneck, “Digital camera imaging evaluation,” Electro Optical Industries 8 (2005). Moein Mozaffarzadeh was born in Sari, Iran, in 1993. He received the B.Sc. degree in electronics engineering from Babol Noshirvani University of Technology, Mazandaran, Iran, in 2015 and M.Sc. degree in biomedical engineering from Tarbiat Modares University, Tehran, Iran, in 2017. He is currently a research assistant at research center for biomedical technologies and robotics, institute for advanced medical technologies, Tehran, Iran. His current research interests include photoacoustic image reconstruction, ultrasound beamforming and biomedical imaging. Ali Mahloojifar obtained a B.Sc. degree in electronic engineering from Tehran University, Tehran, Iran, in 1988, and he received the M.Sc. degree in digital electronics from Sharif University of 36 Technology, Tehran, Iran, in 1991. He obtained his Ph.D. degree in biomedical instrumentation from the University of Manchester, Manchester, UK, in 1995. Dr. Mahloojifar joined the Biomedical Engineering group at Tarbiat Modares University, Tehran, Iran, in 1996. His research interests include biomedical imaging and instrumentation. Mahdi Orooji was born in Tehran, Iran, in 1980. He received the B.Sc. degree in electrical engineering from the University of Tehran, in 2003; the M.Sc. degree in electrical engineering from Iran University of Science and Technology, Tehran, in 2006; and the Ph.D. degree in communication systems and signal processing from the School of Electrical Engineering and Computer Science, Louisiana State University (LSU), Baton Rouge, LA, USA, in 2013. Since June 2013, he has been with the Center for Computational Imaging and Personalized Diagnostics, Department of Biomedical Engineering, Case Western Reserve University, Cleveland, OH, USA. Dr. Orooji has served several IEEE transactions and conferences as a reviewer and joined the Biomedical Engineering group at Tarbiat Modares University, Tehran, Iran, in 2016. Karl Kratkiewicz graduated summa cum laude with a B.S. in biomedical physics from the Wayne State Universitys Honors College, Detroit, Michigan, in 2017. He is now a biomedical engineering PhD student at Wayne State University. His area of research includes multimodal (ultrasound/photoacoustic/elastography) imaging and photoacoustic neonatal brain imaging. Saba Adabi currently is a research fellow in medical imaging in Mayo Clinic. She received her Ph.D. in Applied Electronics department in biomedical engineering from Roma Tre university in Rome, Italy, in 2017. She joined Wayne State University as a scholar researcher in 2016 (to 2017). Her main research interests include optical coherence tomography, photoacoustic/ultrasound imag- 37 ing. She is a member of OSA and SPIE. Mohammadreza Nasiriavanaki received a Ph.D. with outstanding achievement in medical optical imaging and computing from the University of Kent, United Kingdom, in 2012. His bachelor’s and master’s degrees with honors are in electronics engineering. In 2014, he completed a three-year postdoctoral fellowship at Washington University in St. Louis, in the OILab. He is currently an assistant professor in the Biomedical Engineering, Dermatology and Neurology Departments of Wayne State University and Scientific member of Karmanos Cancer Institute. He is also serving as the chair of bioinstrumentation track. List of Figures 1 Images of the simulated point targets phantom using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS, (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals considering a SNR of 50 dB. 2 Lateral variations of DAS, MV, DMAS and MVB-DMAS at the depths of (a) 40 mm, (b) 45 mm, (c) 50 mm and (d) 65 mm. 3 Images of the simulated point targets phantom using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS, (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. The sound velocity is overestimated about 5 %. Noise was added to the detected signals considering a SNR of 50 dB. 4 Lateral variations of DAS, MV, DMAS and MVB-DMAS at the depths of (a) 45 mm and (b) 70 mm while the sound velocity is 5% overestimated. 38 5 Lateral variations of MVB-DMAS at the depth of 45 mm for L=16, L=32 , L=45 and L=64. 6 Images of the simulated point targets phantom using the linear-array transducer. (a) DAS+CF, (b) MV+CF, (c) DMAS+CF, (d) MVB-DMAS+CF. All images are shown with a dynamic range of 60 dB. Noise was added to the detected signals considering a SNR of 50 dB. 7 Lateral variations of DAS+CF, MV+CF, DMAS+CF and MVB-DMAS+CF at the depths of 45 mm. 8 Schematic of the experimental setup. 9 Photographs of the phantom used in the first experiment. 10 Experimental setup of PA linear-array imaging of two parallel wires. 11 Images of the phantom shown in Fig. 9 using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS and (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. 12 Images of the wires shown in Fig. 10 using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS and (d) MVB-DMAS. All images are shown with a dynamic range of 60 dB. 13 Lateral variations at the depth of 33 mm. 14 The photo of the median antebrachial vein of a 30 years old Middle Eastern male. 15 In vivo images of the target shown in Fig. 14 using the linear-array transducer. (a) DAS, (b) MV, (c) DMAS and (d) MVB-DMAS. All images of the median antebrachial vein. All the image are shown with a dynamic range of 60 dB. 39 List of Tables 1 FWHM (µm) values (in -6 dB) at the different depths. 2 SNR (dB) values at the different depths. 3 SNR (dB) values of MVB-DMAS for the different amounts of L. 4 FWHM (µm) values of MVB-DMAS (in -6 dB) for the different amounts of L. 5 SNR (dB) values at the different depths using the targets in Fig. 11. 6 CR (dB) values at the different depths using the targets in Fig. 11. 7 Computational operation and processing time(s) 40
7cs.IT
Chapter 1 Ensemble Control of Cycling Energy Loads: Markov Decision Approach arXiv:1701.04941v2 [cs.SY] 23 Oct 2017 Michael Chertkov, Vladimir Y. Chernyak and Deepjyoti Deka Abstract A Markov decision process (MDP) framework is adopted to represent ensemble control of devices with cyclic energy consumption patterns, e.g., thermostatically controlled loads. Specifically we utilize and develop the class of MDP models previously coined linearly solvable MDPs, that describe optimal dynamics of the probability distribution of an ensemble of many cycling devices. Two principally different settings are discussed. First, we consider optimal strategy of the ensemble aggregator balancing between minimization of the cost of operations and minimization of the ensemble welfare penalty, where the latter is represented as a KL-divergence between actual and normal probability distributions of the ensemble. Then, second, we shift to the demand response setting modeling the aggregator’s task to minimize the welfare penalty under the condition that the aggregated consumption matches the targeted time-varying consumption requested by the system operator. We discuss a modification of both settings aimed at encouraging or constraining the transitions between different states. The dynamic programming feature of the resulting modified MDPs is always preserved; however, ‘linear solvability’ is lost fully or partially, depending on the type of modification. We also conducted some (limited in scope) numerical experimentation using the formulations of the first setting. We conclude by discussing future generalizations and applications. Michael Chertkov Theoretical Division, T-4 & CNLS, Los Alamos National Laboratory Los Alamos, NM 87545, USA and Energy System Center, Skoltech, Moscow, 143026, Russia, e-mail: chertkov@lanl. gov Vladimir Y. Chernyak Department of Chemistry, Wayne State University, 5101 Cass Ave, Detroit, MI 48202, USA, email: [email protected] Deepjyoti Deka Theoretical Division, T-4 & CNLS, Los Alamos National Laboratory Los Alamos, NM 87545, USA, e-mail: [email protected] 1 2 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka 1.1 General Motivation/Introduction Power systems, as well as other energy systems, have undergone a transition from traditional device-oriented and deterministic approaches to a variety of novel approaches to account for • stochasticity and uncertainty in how devices, especially new devices such as wind farms, are operated; • network aspects, e.g., with respect to optimization, control, and design/planning; and • utilization of massive amounts of newly available measurements/data for the aforementioned settings. Such approaches, in particular Demand Response (DR), have become one important component of smart grid development, see [8, 36] and references therein. Novel DR architectures break the traditional paradigm where only generators are flexible, and hence suggest that participation of flexible loads in control can benefit the grid at large without compromising load/consumer comforts significantly. DR assumes that the loads are capable of following operational commands from the system operator (SO). Using DR in the range from tens of seconds to minutes is a potential attractive niche for frequency control that maintains the balance between production and consumption [35, 16, 3, 41]. Traditional frequency control is achieved by adjusting the generators, whereas DR (when developed) helps to achieve the balance additionally by adjusting the loads. The control task for loads in the DR setting is set by the SO as a temporal consumption request. Such requests can be formulated ahead of time (e.g., for the next 10 min) or in real time, using frequent updates (e.g., every 10 seconds). This type of frequency control, namely DR services, is already provided by big consumers such as aluminum smelters [38] and desalination plants [2]. However, the potential effect would be an order of magnitude larger if small loads are available to provide DR services. Nevertheless, direct involvement of smallscale consumers is expensive because of associated communication and control costs. A viable solution to this problem is to control many small-scale consumers indirectly via an intermediate entity, also called the aggregator of an ensemble that includes many (e.g., thousands or tens of thousands) small-scale consumers [13, 25, 14, 30, 31, 28, 29, 9, 8, 4]. Therefore, this novel DR architecture assumes, action-wise, separation into the following three levels: (a)SO sends control request/signal to an aggregator. The SO request is stated as a temporal profile (possibly binned into short intervals e.g. 15 seconds) that is expected from the ensemble for an upcoming duration of length e.g. 10 minutes. (b)Aggregator (A) processes the SO signal by solving an optimization/control problem and broadcasts the same A-signal, which is the output/solution of the optimization/control problem, to all members of the ensemble (end-point consumers). The broadcast of identical signal to end-point devices/consumers, makes the communication step cheap. 1 Ensemble Control of Loads 3 (c)End-point devices receive and implement the A-signal into control action. The implementation is assumed to be straightforward, and at most require only light device-level computations. A number of challenges are associated with this novel aggregator-based DR architecture. The challenges are of both formulation (conceptual) and solution (implementation) type. We will mention a couple of these challenges most relevant to level (b) of the control architecture, which is the focus of this manuscript. In posing the A-optimization, one desires a simple/minimal, yet sufficiently accurate, way of modeling individual devices. In particular, an acceptable framework needs to model the devices in terms of their achievable states and spatio-temporal resolution. To address this challenge, we will state the aggregator-level problems through the language of Markov decision process (MDP), and therefore utilize the transition probabilities between states in MDP as control variables. More accurately, we will assume that each device can find itself in all (or a subset of all) of the finite number of states. Then we describe the probabilistic state of the ensemble in terms of a vector of non-negative numbers that represent the fraction of all consumers observed in different states at any given moment of time. At each time, the probabilistic state vector thus sums to unity. The optimization/control degree of freedom for the A-optimization is represented by the set of stochastic transition probability matrices between the states, defined at each time slot over the discretized and finite time horizon. In addition to the frequency control formulation, we will also discuss another setting that is of interest by itself but also less challenging in terms of finding efficient computational solutions. In this algorithmically simplified case we will look for an optimal balance between the cost of the ensemble operations when the price of electricity changes in time and the deviation of the probabilistic state of the ensemble from its natural/normal behavior under uniform prices or without the price bias. The discrete-time, discrete-space ensamble modeling has a continuous-time, mixed-space counterpart known as thermostatically controlled loads (TCLs), or even more generally cycling loads, that are characterized by periodic (or quasiperiodic) evolution in the phase space. See [8] and our recent paper [11] for detailed discussions of TCL modeling and relevant references. In this manuscript we choose to work with discrete-time, discrete-space Markov process (MP) models because of their universality and flexibility. Indeed, an MP model can be viewed as a macro-model that follows from its micro-model counterpart - the TCL, after spatiotemporal model reduction (coarse-graining), see e.g. [34]. However, MPs can represent a much broader class of models than those obtained via coarse-graining of TCLs or even than a combination (average) of different TCL models. The more general class of MDP models is especially useful in the context of machine learning (ML), where an MP is reconstructed from actual measurements/samples of the underlying ensemble. From MP, which represents stochastic dynamics, we transition to MDP, which represents stochastic optimization with the MP/ensemble state constrained to being within a specified class of state dynamics. Many choices of MDP are reasonable from the perspective of practical engineering. In this manuscript we adopt and de- 4 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka velop an approach pioneered in [22] and further developed in [26, 27, 39, 19, 20, 33]. This relatively unexplored formulation of the stochastic optimal control is known as “path integral control” in the case of continuous-time, continuous-space formulations [26] and as “Linearly Solvable MDP” (LS-MDP) in the case of a discrete-time, discrete-space setting [39, 19, 20]. Linear solvability is advantageous because it allows us to determine analytic expressions for the optimal solution in settings that go one step further than possibly through Dynamic Programming (DP) approaches. (We remind the reader that DP involves recursive solutions of the Hamilton–Jacobi– Bellman [HJB] equations.) One extra advantage of the LS-MDP, which holds even when reduction of the HJB equation to a linear equation is not possible, is related to the fact that the penalty term associated with deviation of the optimized transition probability from its ideal shape (not perturbed by the SO signal) has a very natural form of the generalized Kublack–Leibler (KL) distance [15] between the two probability measures. switch on 4 5 3 6 2 7 1 8 switch off 0.2 0.5 0.1 0.03 0.02 0.03 0.1 0.02 0.02 0.2 0.5 0.1 0.03 0.02 0.03 0.1 0.1 0.02 0.2 0.5 0.1 0.03 0.02 0.03 0.03 0.1 0.02 0.2 0.5 0.1 0.03 0.02 0.02 0.03 0.1 0.02 0.2 0.5 0.1 0.03 0.03 0.02 0.03 0.1 0.02 0.2 0.5 0.1 0.1 0.03 0.02 0.03 0.1 0.02 0.2 0.5 0.5 0.1 0.03 0.02 0.03 0.1 0.02 0.2 Fig. 1.1 An example MDP resulting from space-binning/discretization and time-discretization of a two-level mixed-state TCL model of the type discussed in [11]. This model is used in Section 1.4 for illustrative experiments. The directed graph of the “natural” transitions and respective stochastic p̄ matrix are shown in the left and right subfigures, respectively. When discussing MPs and MDPs, we will utilize the following (rather standard) notations and terminology: • The dynamic state of the ensemble is described in terms of a vector, ρ(t) = (ρα (t)|∀α), where ρα (t) ≥ 0 is the probability to find a device (from the ensemble) in state α at time t. The vector is normalized (no probability loss) at all times considered, i.e., ∑α ρα (t) = 1, ∀t= 0, · · · , T , ∀α. 1 Ensemble Control of Loads 5 • p(t) = (pαβ (t)|∀t, ∀α, β ) is the transition probability matrix that describes an MP. It is set to be an optimization variable within the MDP framework. The matrix element, pαβ (t), represents the transition probability, i.e. the probability for a device which was at state β at time t to transition to state α at t + 1. The matrix is stochastic, i.e. ∑ pαβ (t) = 1, ∀t = 0, · · · , T − 1, ∀β , (1.1) α • The evolution of the MP/ensemble state is described by the master equation (ME): ρα (t + 1) = ∑ pαβ (t)ρβ (t), ∀t, ∀α. (1.2) β The ME should be supplemented by the initial condition for the state of the ensemble: ρα (0) = ρin;α , ∀α (1.3) Given the initial condition (1.3), one needs to run ME (1.2) forward in time to find the states of the MP ensemble at all future times. The direction of time is important because it reflects the physical causality of the setting. • MDP formulations discussed in the manuscript are stated as optimizations over the transition probability matrix p. All of the formulations also depend on the target p̄, which corresponds to the optimal transition matrix if the ensemble is “left alone” for a sufficiently long time. In the case of frequency control, discussed in Section 1.5, p̄ corresponds to the steady state of the ensemble when the frequency tracking guidance is ignored. In the formulations of Sections 1.2 and 1.3, p̄ corresponds to the steady state of the ensemble operating for a sufficiently long time in the case of a flat, i.e., time- and state-independent, cost. An example MP and respective “natural” p̄, introduced in the result of coarse-graining of a TCL, is shown in Fig. (1.1). The material in the remainder of the manuscript is organized as follows. MDPs aimed at finding the profit optimal transition probability vector for an ensemble of devices are defined and analyzed in Section 1.2. MDPs discussed in this section measure the deviation of the “optimal” p from its “normal” counterpart, p̄, in terms of the standard KL divergence. This formulation is an LS-MDP; we have placed a detailed technical discussion of the MDP’s linear solvability and related features and properties in Appendix 1.9. Next, in Section 1.3, a modified MDP is discussed that differentiates between state transitions, i.e., discounts some transitions and encourages others. This formulation is richer in comparison to the differentiation-neutral formulation of Section 1.2. Numerical simulations for the optimization objectives discussed in Sections 1.2 and 1.3 are presented in Section 1.4. In Section 1.5 we describe and discuss the solution of an MDP, seeking to minimize the welfare deviation, stated in terms of the KL distance (or weighted KL distance) between the “op- 6 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka timal” and “normal” transition probabilities while also matching the SO objective exactly. Preliminary discussion on integrating the MDP approaches into the optimum power flow formulations, e.g., to jointly control grid voltages and to minimize the power losses, is given in Section 1.6. Section 1.7 is reserved for the conclusions and discussions of the path forward. 1.2 Cost-vs-Welfare Optimal Our main MDP formulation of interest, which we term “cost vs welfare”, is stated as the following optimization:        T −1  pαβ (t)     (1.4) , + ∑ log Uα (t + 1) min Eρ  ∑ ∑   p,ρ  t=0 α  | {z } p̄αβ  β     {z } Cost of Electricity | welfare penalty Eqs. (1.1,1.2,1.3)    T −1 pαβ (t) = min ∑ ∑ ρβ (t) ∑ pαβ (t) Uα (t + 1) + log (1.5) , p,ρ p̄αβ α t=0 β Eqs. (1.1,1.2,1.3) where the matrix p is the optimization/control variable, which is stochastic according to Eq. (1.1). Here in Eq. (1.4), p̄ is an exogenously known stochastic matrix describing the transition probabilities corresponding to normal dynamics/mixing within the ensemble, i.e., p̄ explains the dynamics that the ensemble would show in the case of “cost ignored” objective (U = 0). The stochasticity of p̄ means that p̄ satisfies Eq. (1.1), when p is replaced by p̄. We assume that when following p̄, the ensemble mixes sufficiently fast to reach statistical steady state, ρ (st) , i.e., p̄ρ (st) = ρ (st) . The essence of the optimization (1.4) is a compromise that an aggregator aims to achieve between cost savings for the ensemble and keeping the level of discomfort (welfare penalty) to its minimum. The two conflicting objectives are represented by the two terms in Eq. (1.4). Optimization (1.4) is rather general, whereas for the example of a specific discrete-time–discrete-space TCL, one sets Uα to non-zero for only the states α that represent the “switch-on” states of the TCL. Eq. (1.4) belongs to the family of the so-called LS-MDPs introduced in [39], discussed in [19, 20, 32], and briefly described as a special case in Appendix 1.9. Solution of Eqs. (1.4) is fully described by Eqs. (1.24, 1.27, 1.28). According to the general description part of Appendix 1.9, the problem is solved in two DP steps: 1 Ensemble Control of Loads 7 • Backward in time step. Compute p recursively by advancing backward in time according to Eqs. (1.24, 1.27), where γ(t) is substituted by 1, and starting from the final condition Eq. (1.28). • Forward in time step. Reconstruct ρ by running Eq. (1.2) forward in time with the initial condition Eq. (1.3). 1.3 Differentiating States through a Penalty/Encouragement The KL welfare penalty term in Eq. (1.4) is restrictive in terms of how the transitions between different states, and also those observed at different moments of time, compare to each other. To encourage/discourage or generally differentiate the transitions, one may weight the terms in the KL sum differently, thus introducing the γαβ (t) factors:     T −1    min Eρ  ∑ ∑  p,ρ  t=0 α       pαβ (t)   (1.6) . + ∑ γαβ (t) log Uα (t + 1)  | {z } p̄αβ  β {z } Cost of Electricity | welfare penalty Eqs. (1.1,1.2,1.3) This generalization of Eq. (1.4) aims to ease the implementation of the optimal decision, e.g., emphasizing or downplaying the controllability of transitions between the states and at different moments of time. Solution of the optimization (1.6) is described in Appendix 1.9. Even though linear solvability of the state-uniform formulation, discussed in Section 1.2, does not extend to the non-uniform formulation of Eq. (1.6), the basic DP approach still holds and the problem is solved via the following backward-forward algorithm: • Backward in time step. Starting with the final conditions Eq. (1.17), one solves Eq. (1.18) for ϕ recursively backward in time. Solving Eq. (1.18) requires, at each time step, execution of inner loop iterations (until convergence), according to Eq. (1.22), to find the Lagrangian multiplier λ . Following it, p at that time is reconstructed according to Eq. (1.19). Alternatively, p can be determined by minimizing convex function Eq. (1.18) directly with a linear constraint reflecting the stochasticity of p. • Forward in time step. Reconstruct ρ running Eq. (1.2) forward in time with the initial condition Eq. (1.3). 8 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka Fig. 1.2 Example solution of the MDP problem for the case without penalty, i.e., with the objective represented by Eq. (1.4). The initial probability distribution corresponds to the steady state of the “target” MC with the transition probabilities shown in Fig. (1.1). Eight curves show optimal dynamics of the respective, ρα (t), α = 1, · · · , 8. Fig. 1.3 Example solution of the MDP problem for the case with penalty, i.e., with the objective represented by Eq. (1.6). The initial probability distribution corresponds to the steady state of the “target” MC with the transition probabilities shown in Fig. (1.1). Eight curves show optimal dynamics of the respective, ρα (t), α = 1, · · · , 8 for the setting, equivalent to the one used in Fig. (1.2). 1 Ensemble Control of Loads 9 1.4 Computational Experiments In this section we describe some (preliminary) computational experiments conducted for MDP settings discussed in the two preceding sections. We choose the example case with 8 states (four “on”, four “off”) and target transition probability, p̄, in the form shown in Fig. (1.1). We conduct the experiments in the regime with a nonstationary, time-dependent, and random cost term, ∼ 1 + rand(t), that is nonzero for only the first four (“on”) states. For the same target p̄, we show solutions of two optimization formulations that correspond to the setting of Eq. (1.4) and Eq. (1.6), respectively. In the latter case, we choose a time-independent penalty factor γαβ = 10 for all transitions except for those that correspond to advancing one (counterclockwise) step along the cycle. The special “along the cycle” transitions are not penalized and given a penalty factor equal to unity, γmod[α+1],α = 1, α = 1, · · · , 7. We use the algorithms described at the end of Section 1.2 and Section 1.3, respectively to solve the MDPs. The results are shown in Figs. (1.2, 1.3). Comparing the figures corresponding to the two regimes (with and without penalty), one observes that imposing penalty leads to a more homogeneous distribution ρα over the states α. 1.5 Ancillary Services-vs-Welfare Optimal Another viable business model for an aggregator of an ensemble of cycling devices is to provide ancillary (frequency control) services to a regional SO. The ancillary services consist of adjusting the energy consumption of the ensemble to an exogenous signal. Tracking the signal may require some (or all) participants of the ensemble to sacrifice their natural cycling behavior. In this section we aim to study whether a perfect tracking of a predefined (exogenous) signal is feasible and then, in the case of feasibility, we would like to find the optimal solution causing least discomfort to the ensemble. Putting it formally, the aggregator solves the following optimization problem     T −1 pαβ (t)    min p Eρ  ∑ ∑ γαβ (t) log   t=0 α,β p̄αβ   | {z } welfare penalty s.t. Eqs. (1.1) s(t) = ∑ εα ρα (t), ∀α, (1.7) ∀t = 1, · · · , T α | {z energy tracking constraint } (1.8) 10 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka where p̄ is the “target” distribution represented by a stochastic matrix, e.g., one that leads to the standard steady state when U = 0. p is the stochastic matrix which is constrained by Eq. (1.1). s(t) is the amount of energy requested by the system operator to balance the (transmission level) grid, and εα is the amount of energy consumed by a device when it stays in the state α for a unit time slot. The setting of Eq. (1.8) assumes perfect tracking, that is, the total consumption of the ensemble is exactly equal to the amount requested by the SO. Introducing the Lagrangian multiplier for the energy tracking constraint, one restates Eq. (1.7) as the following min-max (max-min according to normal Lagrangian formulation) optimization: # ! " T −1 T pαβ (t) T + ∑ ∑ ξ (t)εα − ∑ ξ (t)s(t) max min Eρ ∑ ∑ γαβ (t) log (1.9) , p,ρ p̄αβ ξ t=1 α t=0 α,β t=1 Eq. (1.1) We observe that optimization over p and ρ in the resulting expression becomes equivalent under a substitution Uα (t) = ξ (t)εα , ∀α, t = 1, · · · , T. (1.10) to the penalized KL welfare penalty optimization (1.6), discussed in Section 1.3. In spite of the close relation between the energy tracking problem Eq. (1.8) and the profit optimality problem Eq. (1.6), the former is more difficult to implement. Indeed one can solve Eq. (1.6) in only one backward-forward run. On the other hand, we are not aware of the existence of a similar efficient algorithm for solving Eq. (1.8). The difficulty is related to the fact that ξ (t) itself should be derived as the result of a KKT condition that reinforces the energy tracking constraint Eq. (1.8). A natural resolution of this problem is through an outer-loop iteration including the following two substeps: • Run the backward-forward penalty optimization algorithm described at the end of Section 1.3 using the current ξ (t) (outer-step-specific) profile. • Update current ξ (t) according to Eq. (1.8), utilizing the current ρ(t) derived from the previous substep. The outer-loop iterative scheme is initiated with ξ (t) derived from Eq. (1.8), with ρ(t) corresponding to the “normal” MP, p → p̄. Iterations are run until a preset tolerance is achieved. We plan to experiment with and analyze convergence of this iterative scheme in the future. 1 Ensemble Control of Loads 11 4 3 2 1 4 3 2 1 5 6 7 8 5 6 7 8 4 3 2 1 4 3 2 1 5 6 7 8 5 6 7 8 4 3 2 1 4 3 2 1 5 6 7 8 5 6 7 8 Fig. 1.4 Scheme illustrating hybrid/integrated and power-grid-aware MDP formulation. Nodes of the distribution level power system are each characterized by a sub-ensemble modeled as an MP. Nodes are connected in a tree-like power system. 1.6 Hybrid Modeling: Toward Voltage-Aware & Hierarchical Ensemble Control In this section we describe one possible scheme of an MDP approach for integration into control of power distribution networks. The description here is preliminary and meant to motivate a formulation for further exploration. The aggregation of many loads discussed in the manuscript so far has ignored details of power flows (PF) as well as related voltage and line flow constraints. We have assumed that any of the discussed solutions is PF-feasible, i.e. solution of PF equations is realizable for any of the consumption configurations with voltages and line flows staying within the prescribed bounds. For these assumptions to hold, either the aggregated devices should be in immediate geographical proximity of one another or the power system should be operated with a significant safety margin. In general, satisfying either of the two conditions globally for a large ensemble is impractical. This motivates a discussion of the following hybrid model, stated in terms of many geographically localized and different sub-ensembles connected into a power distribution network (see also Fig. (1.4) for illustration): 12 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka   T −1 min Eρ  ∑ p,ρ,s,V ∑∑ t=0 i (i) Uα(i) (t + 1) + ∑ α (i) γαβ (t) log β pαβ (t) (i) p̄αβ  (1.11)  s.t. (i) (i) (i) ρα (t + 1) = ∑ pαβ (t)ρβ (t), ∀t, ∀i, ∀α (1.12) β . (i) (i) s (t) = ∑ εα ρα (t) = V (i) (t) ∑ (i) α | j∼i V (i) (t) −V ( j) (t) zi j {z Nodal PF relations v(i) ≤ |V (i) |(t) ≤ v(i) , ∀i, ∀t. | {z } voltage constraints !∗ , ∀i, ∀t,(1.13) } (1.14) where each sub-ensemble i, representing for example stochastic/fluctuating consumption of a large apartment complex, is modeled as an aggregated MP that includs devices and consumers of different types. The objective (1.11) generalizes Eq. (1.6), thus accounting for the cost of services and welfare quality (deviation from normal) for multiple ensembles. As done earlier in the manuscript, we introduce the addi(i) tional penalty factor, γαβ (t), in front of the KL (welfare penalty) term. This allows us to reflect the significance of different ensembles, transitions, and times. Eq.(1.12) generalizes the ME (1.2) to sub-ensembles. Eqs. (1.13, 1.14) introduce PF and voltage constraints into the MDP  setting. We thus seek  for an optimum (1.11) over three (i) vectors: the vector p = pαβ (t) |∀i, ∀α, β , ∀t , constructed from the stochastic transition-probability matrices, where each component represents anode in the net (i) work at all moments of time; the vector ρ = ρα (t) |∀i, ∀α, ∀t , reconstructed from p according to Eqs.  (1.12) with the  proper initial conditions provided; and the (i) vector of voltages V = V (t) |∀i, ∀t . Notice that other objectives (such as a contribution enforcing minimization of power losses in the distribution systems), other constraints (such as imposing bounds on line flows), as well as other controls (such as voltage/ position of tapchangers and/or reactive consumption at the nodes containing inverters) can be incorporated into the scheme in the spirit of [40, 37]. Because the MDP problem is stochastic by nature, it also allows incorporation of other stochastic sources, e.g., solar or wind renewables, which can be done either via modeling the stochastic sources as MP (with no control) or by extending the model by adding so-called chance-constrained descriptions in the spirit of [5]. An efficient solution of the hybrid problem (1.11) can be built by combining the techniques of temporal DP, developed in this manuscript for individual MDPs, with spatial (tree-graph) DP techniques, developed recently for the Optimal PF (OPF) in power distributions [18] and taking advantage of the tree-graph operational layout of power distribution networks. We plan to work on practical implementation of these and other components of the hybrid model in the future. 1 Ensemble Control of Loads 13 1.7 Conclusions & Path Forward In this manuscript we review and develop a computationally scalable approach for optimization of an ensemble of devices modeled via finite-space, finite-time MP. This approach builds upon earlier publications [23, 33, 34] addressing DR applications in power systems and beyond. A particularly practical and popular example of MP, relevant for power systems, is the ensemble of cycling loads, such as air conditioners, water heaters, or residential water pumps [8, 36]. We have developed a number of useful MDP formulations aiming to achieve optimality for a diverse set of objectives of interest for an aggregator (of the ensemble) under different circumstances. We started the manuscript by describing MDP that balances overall expenses of the ensemble acquired when the cost of electricity varies in time, with a welfare penalty that measures ensemble operational deviation from its normal behavior. Then we proceeded to discuss MDP built to test feasibility of the ensemble to provide ancillary frequency control services to SO. Finally, we addressed the future challenge of building a hybrid model that incorporates MP and MDP modeling into deterministic and stochastic frameworks of OPFs (operational dispatch) for power distribution. The most important technical achievement of this paper is the development of an appropriate DP framework for stochastic optimization including DR. For the costvs-welfare optimization we also tested the developed methodology and algorithms numerically (on a small-scale example). This manuscript does not offer a concluding fine-tuned summary of a completed project. Instead, we have focused here on presenting a new open-ended paradigm. In other words, we expect to see emergence of many more future extensions and generalizations of the approach that we have started to develop here. Some of these proposed future developments have been already discussed in the preceding sections, especially in Section 1.6. Others are briefly highlighted below. • Utilizing and Extending Lin-Solvability. Intuitively, it is clear that lin-solvability is a rich property that should be advantageous for both analysis and algorithms. However, the use of this strong property in this manuscript was rather limited. We expect that the lin-solvability will provide an actual computational/algorithmic benefit not just for solving MDP per se but also for solving more-complex multilevel optimization/control problems where an individual MDP represents an element of a richer model. (Some examples are mentioned below.) On the other hand, the lin-solvability described in Appendix 1.9.1.1 is a rather delicate property of the model and it is easy to lose either partially or completely, as shown for the setting/formulation discussed in Appendix 1.9.1 and the main part of Appendix 1.9, respectively. This observation motivates further investigation of other settings/formulations amenable for either full or partial lin-solvability. One promising direction for future analysis is to consider a generalization from the KL-divergence to Renyi-divergence, building upon and extending the approach of [19, 20]. 14 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka • Model Reduction. Many models of power systems are too large and detailed for computations. This applies even to the routine PF computation, which is a routing subtask for many power system problems of high level involving optimization, control, and generalizations accounting for stochasticity and robustness. Seeking to represent large-scale, long-time behavior, one is interested in building a reduced model in order to aggregate the small-scale and/or short-time details in a compact way. The reduction may be lossless or lossy, with or without the ability to reconstruct the small-scale/short-time details. The intrinsically stochastic MP framework developed here is appropriate for the lossy case, where stochasticity represents the loss of insignificant details. We envision building reduced models capable of more efficient but still accurate computations of, e.g., PF, in the format similar to that discussed in Section 1.6. The reduced model may consist of power lines with effective impedances and stochastic load/generation elements represented by MPs. The level of coarse-graining may be predefined by a geographypreserving procedure, e.g., of the type discussed in [24], but it may also be left flexible/adaptive, where the number of states and allowable transitions for an individual MP is the subject of optimization. • Hierarchical Control. When the reduced model with MPs representing aggregated loads/generators is to be used in the context of optimization and control, changing from MP to MDP may be understood as allowing the optimization/control to be split into two levels. Optimization with many MDPs modeling aggregated end-users, as discussed in Section 1.6, will produce optimal transition probability matrices for each individual MDP. Then, the task of implementing this policy is delegated to aggregators responsible for individual MDPs. In this case, implementation means the global optimality/control is substituted by a two-level hierarchical control. The scheme may be extended to represent more levels of control. • Derivation of MDP from a Detailed Microscopic Model. Consider an ensemble of continuous-time TCLs, each represented by a microscopic state in terms of temperature (continuous variable) and switch on/off status (discrete variable). In the case of an inhomogeneous ensemble, where each TCL or a group of TCLs may be parameterized differently, e.g., in terms of the allowed temperature rates and/or transition rates between on/off states, one is posing the question of representing this inhomogeneous ensemble as a single discrete time and discrete space (binned) MP or MDP. Developing a methodology for constructing a representative MP/MDP for an aggregated ensemble is an important task for future research. • Accounting for Risk-Metric. The MP/MDP methodology is sufficiently rich and flexible to account for and mitigate risks of different types, e.g., overloading. Indeed, incorporating additional constraints into MDP optimization by limiting some elements of ρ or p is a straightforward way of limiting the risk in probabilistic terms, natural for MDP. • Stochastic MDP. MDP models already account for the intrinsic stochasticity of an ensemble of devices (or coarse-grained areas) that a model represents. However, exogenous effects, such as those representing the cost of electricity or the 1 Ensemble Control of Loads • • • • 15 frequency signal, are modeled in this manuscript deterministically, even though it is often more appropriate to represent generically uncertain and stochastic exogenous signals probabilistically. Formulating appropriate “second-order” statistical models represents an interesting challenge for future research. Interesting recent studies dealing with exogenous fluctuations and uncertainty added to the MP/MDP setting are presented in [7, 6]. From MDP to Reinforcement Learning (RL). MDP is a standard tool used in the field of RL. One of the data-driven RL approaches [39] relevant for our discussion suggests considering “ideal” transition probabilities, p̄, as unknown/uncertain and then attempting to learn p̄ from the data in parallel with solving the MDP. The approach was coined in [39] as Z-learning, and it is also closely related to the so-called approximate DP (see [1] and references therein for many books and reviews). We anticipate that this general approach, when applied to the models introduced in the manuscript, will allow us to build a data-driven and MDP-based framework for controlling an ensemble whose normal behavior is known only through limited samples of representative behavior. MDP for Supervised Learning (SL). Recently a SL methodology was applied as a real-time proxy to solve difficult power system problems, such as finding an efficient description of the feasibility domain [21] to solve OPF [10] or power system reliability management problems [17]. The main idea in this line of research rests on replacing an expensive power system computation with an ML black box trained to evaluate a sufficient number of samples labeled by relevant output characteristics. One interesting option consists of using properly designed MPs and/or MDPs for opening up the black box and turning it into (at least partially) a physics-informed ML. Another possible direction would be to use MPs/MDPs as labels. MDP as an Element of a Graphical Model (GM) framework. It was argued recently in [18, 12] that the approach of GM offers a flexible framework and efficient solutions/algorithms for a variety of optimization and control problems in energy systems (power systems and beyond). It is of interest to extend the GM framework and build into it MDP methodology, formulations, and solutions. Applications to Systems, e.g., Energy Systems. The MDP models discussed in this manuscript are of interest well beyond representing ensembles (and coarse regions) in power systems. Similar methods and approaches are relevant for problems representing behavior and DR capabilities of consumers’/producers’ ensembles in other energy infrastructures, such as natural gas systems and district heating systems. In fact, the models discussed above fit practically “as is” to describe aggregation of many consumers of district heating systems residing in a big apartment complex or a densely populated residential area. The language of MDP is also universal enough to optimize joint energy consumption through multiple energy infrastructures of a “residential” ensemble (including electricity, heat, and gas—possibly used as an alternative to central heating in local boilers). 16 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka 1.8 Acknowledgments The authors are grateful to S. Backhaus, I. Hiskens, and D. Calloway for fruitful discussions, guidance, and valuable comments. The work at LANL was carried out under the auspices of the National Nuclear Security Administration of the U.S. Department of Energy under Contract No. DE-AC52-06NA25396. 1.9 Dynamic/Bellman Programming In this appendix we discuss the DP solution for the most general of the formulations considered in this paper, the profit-vs-welfare optimal formulations. Specifically we consider Eq. (1.6) that introduces in-homogeneity in the inter-state transitions, expressed through the state and time-dependent γβ α (τ) factors. Let us restate Eq. (1.6) as   , (1.15) min C p|T0 −1 , ρ(0) p ∑β pβ α (τ)=1, ∀α where p|T0 −1 is the shortcut notation for the vector constructed of the transition probability matrices evaluated at t = 0, · · · , T − 1, i.e., (p(t)|∀t = 0, · · · , T − 1). The so-called value function in Eq. (1.15) can be decomposed according to         C p|T0 −1 , ρ(0) = C p|τ−1 , ρ(0) + ∑ ϕα τ, p|Tτ −1 ρα τ, p|τ−1 , (1.16) 0 0 α   where the notation ρα τ, p|τ−1 is introduced temporarily (just for the purpose 0 of this derivation) to emphasize that ρα computed at the moment of time τ also depends, according to Eq. (1.2), on the transition probability matrices computed at all the preceding times. Here in Eq. (1.16) ϕα is defined at the final moment of time according to ϕα (T ) = Uα (T ), (1.17) and then solved backward in time by the following recursive equations     −1 ∀α, τ = T − 1, · · · 0 : ϕα τ, p|Tτ −1 = ∑ ϕβ τ + 1, p|Tτ+1 pβ α (τ) β  + ∑ γβ α (τ)pβ α (τ) log β pβ α (τ) +Uα (τ), p̄β α  (1.18)   where, the notation ϕα τ, p|Tτ −1 emphasizes that (by construction) ϕα (τ) depends only on p|Tτ −1 . 1 Ensemble Control of Loads 17 The DP-decomposed (recursive) structure of Eqs. (1.16, 1.18) allows us to evaluate optimization over p in Eq. (1.15) greedily as KarushKuhnTucker (KKT) firstorder conditions—first over p(T − 1) and then over p(T − 2) all the way to p(0). The KKT condition for minimization of (1.18) with linear constraint ∑β pβ α (τ) = 1 gives the following DP relation for the optimal p:   ϕβ (τ + 1) − λα (τ) , ∀α, β , ∀τ = T − 1, · · · , 0, (1.19) pβ α (τ) = p̄β α exp −1 − γβ α (τ) where the Lagrange multipliers, λα (τ), are determined implicitly from the stochasticity of p(τ)   ϕβ (τ + 1) − λα (τ) p̄ exp −1 − = 1, ∀α, ∀τ = T − 1, · · · , 0. (1.20) ∑ βα γβ α (τ) β The Lagrange multipliers λ can also be extracted from one-dimensional convex optimizations one gets substituting (1.19) into the corresponding Lagrangian relaxation of (1.18) !   ϕβ (τ + 1) − µ − µ , (1.21) λα (τ) = arg min ∑ p̄β α γβ α (τ) exp −1 − µ γβ α (τ) β ∀α, ∀τ = T − 1, · · · , 0. Computationally, one may solve Eq. (1.21) via gradient descent !   ϕβ (τ + 1) − λα (τ) λα (τ) ← λα (τ) − δ ∑ p̄β α exp −1 − − 1 , (1.22) γβ α (τ) β ∀α, ∀τ = T − 1, · · · , 0. choosing an appropriate step, δ , and iterating Eq. (1.22) until the target tolerance of the solution’s accuracy is reached. Then Eqs. (1.19, 1.18) can be used to determine p(τ) and ϕ(τ). Another way to determine p(τ), ϕ(τ) is to minimize (1.18) directly resolving the p-stochasticity constraint. As x log x is a convex function, minimizing (1.18) is a convex problem that can be solved with standard solvers, e.g. Ipopt or cvx. 1.9.1 The case which allows explicit normalization In the case of a general γ(τ) Eq. (1.19) the Lagrange multipliers, λ (t), cannot be expressed via p in a closed form. An exception is the case when γβ α (τ) is independent of β , i.e. 18 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka γβ α (τ) ⇒ γα (τ). (1.23) Then, Eq. (1.19) results in  ϕ (τ+1)  exp − βγα (τ) p̄β α   pβ α (τ) = , ϕ (τ+1) ∑ν exp − νγα (τ) p̄να ∀α, β , ∀t. (1.24) Substituting Eq. (1.24) into Eq. (1.18), one derives !   ϕβ (τ + 1) ϕα (τ) = −γα (τ) log ∑ exp − p̄β α +Uα (τ), γα (τ) β ∀α, ∀τ. (1.25) Notice that there are also other special cases that may allow for analytic expressions for the normalization. In particular, the case when γαβ (τ), ∀τ, α, β take values from a finite alphabet. We leave discussion of this and other interesting cases to future studies. 1.9.1.1 Linearly solvable case Reduction (1.23) allows us to map Eq. (1.15) to solution of DP equations (1.25) that are, however, nonlinear. We now make an additional reduction to limit Eq. (1.23) even further to the state independent case γαβ (τ) ⇒ γ(τ), (1.26) Eq. (1.25) now reduces to what was coined in [39, 19, 20] as the linearly solvable MDP     ϕα (τ) . Uα (τ) = uα (τ) = ∑ uβ (τ + 1) p̄β α exp − . (1.27) exp − γ(τ) γ(τ) β Eq. (1.27) is solved backward in time with the final condition   Uα (T ) uα (T ) = exp − , ∀α. γ(T ) (1.28) Two remarks are in order. First, we note that Eq. (1.26) is of practical interest when one aims to change the relative importance of the welfare reinforcement vs. price balance in the optimization. Second, other linearly solvable cases, in addition to those described by Eq. (1.26), may exist. We postpone a more general discussion of a broader class of the linearly solvable cases as well as their practical utility, to future publications. 1 Ensemble Control of Loads 19 References 1. Reinforcement Learning, howpublished = https://en.wikipedia.org/wiki/ reinforcement_learning, note = Accessed: 2017-01-07 2. Study on the demand response potential for seawater desalination projects (2016). URL http://www.ercot.com/content/wcm/lists/89476/Demand_Response_ Potential_for_Seawater_Desalination_Projects_11_18_2016.pdf 3. Aunedi, M., Kountouriotis, P.A., Calderon, J.E.O., Angeli, D., Strbac, G.: Economic and environmental benefits of dynamic demand in providing frequency regulation. IEEE Transactions on Smart Grid 4(4), 2036–2048 (2013). DOI 10.1109/TSG.2013.2258047 4. Bashash, S., Fathy, H.K.: Modeling and control insights into demand-side energy management through setpoint control of thermostatic loads. In: Proceedings of the 2011 American Control Conference, pp. 4546–4553 (2011). DOI 10.1109/ACC.2011.5990939 5. Bienstock, D., Chertkov, M., Harnett, S.: Chance-constrained optimal power flow: Risk-aware network control under uncertainty. SIAM Review 56(3), 461–495 (2014). DOI 10.1137/ 130910312. URL http://dx.doi.org/10.1137/130910312 6. Bušić, A., Meyn, S.: Distributed Randomized Control for Demand Dispatch. ArXiv e-prints (2016) 7. Bušić, A., Meyn, S.: Ordinary Differential Equation Methods For Markov Decision Processes and Application to Kullback-Leibler Control Cost. ArXiv e-prints (2016) 8. Callaway, D., Hiskens, I.: Achieving controllability of electric loads. Proceedings of the IEEE 99(1), 184–199 (2011). DOI 10.1109/JPROC.2010.2081652 9. Callaway, D.S.: Tapping the energy storage potential in electric loads to deliver load following and regulation, with application to wind energy. Energy Conversion and Management 50(5), 1389 – 1400 (2009). DOI http://dx.doi.org/10.1016/j.enconman.2008.12.012. URL http: //www.sciencedirect.com/science/article/pii/S0196890408004780 10. Canyasse, R., Dalal, G., Mannor, S.: Supervised Learning for Optimal Power Flow as a RealTime Proxy. ArXiv e-prints (2016) 11. Chertkov, M., Chernyak, V.: Ensemble of thermostatically controlled loads: Statistical physics approach (2017) 12. Chertkov, M., Krishnamurthy, D., Misra, S., Hentenryck, P.V., Vuffray, M.: Graphical models and belief propagation-hierarchy for optimal physics-constrained network flows (2017) 13. Chong, C.Y., Debs, A.S.: Statistical synthesis of power system functional load models. In: Decision and Control including the Symposium on Adaptive Processes, 1979 18th IEEE Conference on, vol. 2, pp. 264–269 (1979). DOI 10.1109/CDC.1979.270177 14. Chong, C.Y., Malhami, R.P.: Statistical synthesis of physically based load models with applications to cold load pickup. Power Apparatus and Systems, IEEE Transactions on PAS-103(7), 1621–1628 (1984). DOI 10.1109/TPAS.1984.318643 15. Cover, T.M., Thomas, J.A.: Elements of information theory. John Wiley & Sons (2012) 16. Donnelly, M., Harvey, D., Munson, R., Trudnowski, D.: Frequency and stability control using decentralized intelligent loads: Benefits and pitfalls. In: IEEE PES General Meeting, pp. 1–6 (2010). DOI 10.1109/PES.2010.5589835 17. Duchesne, L.: Machine learning of proxies for power systems reliability management. Master’s thesis, Faculty of Applied Sciences, Department of Electrical Engineering and Computer Science, University of Liege, Belgium (2016). URL https://matheo.ulg.ac.be/ bitstream/2268.2/1374/4/master_thesis_laurine_duchesne.pdf 18. Dvijotham, K., Chertkov, M., Van Hentenryck, P., Vuffray, M., Misra, S.: Graphical models for optimal power flow. Constraints pp. 1–26 (2016). DOI 10.1007/s10601-016-9253-y. URL http://dx.doi.org/10.1007/s10601-016-9253-y 19. Dvijotham, K., Todorov, E.: A Unifying Framework for Linearly Solvable Control. arxiv:1202.3715 (2012) 20. Dvijotham, K., Todorov, E.: Linearly Solvable Optimal Control, pp. 119–141. John Wiley & Sons, Inc. (2013). DOI 10.1002/9781118453988.ch6. URL http://dx.doi.org/10. 1002/9781118453988.ch6 20 Michael Chertkov, Vladimir Chernyak and Deepjyoti Deka 21. Dymarsky, A., Horodnytskyi, O., Maximov, Y., Turitsyn, K.: Statistical learning of power flow feasibility domain (2017) 22. Fleming, W.H., Mitter, S.K.: Optimal control and nonlinear filtering for nondegenerate diffusion processes. Stochastics 8(1), 63–77 (1982). DOI 10.1080/17442508208833228. URL http://dx.doi.org/10.1080/17442508208833228 23. Ghaffari, A., Moura, S., Krstic, M.: Pde-based modeling, control, and stability analysis of heterogeneous thermostatically controlled load populations. Journal of Dynamic Systems Measurement and Control 137(10) (2015) 24. Grudzien, C., Deka, D., Chertkov, M., Backhaus, S.: Structure-& physics-preserving reductions of power grid models (2017) 25. Ihara, S., Schweppe, F.: Physically based modeling of cold load pickup. Power Apparatus and Systems, IEEE Transactions on PAS-100(9), 4142–4150 (1981). DOI 10.1109/TPAS.1981. 316965 26. Kappen, H.J.: Linear theory for control of nonlinear stochastic systems. Phys. Rev. Lett. 95, 200,201 (2005). DOI 10.1103/PhysRevLett.95.200201. URL http://link.aps.org/ doi/10.1103/PhysRevLett.95.200201 27. Kontoyiannis, I., Meyn, S.: Large deviations asymptotics and the spectral theory of multiplicatively regular markov processes. Electron. J. Probab. 10, no. 3, 61–123 (2005). DOI 10.1214/EJP.v10-231. URL http://ejp.ejpecp.org/article/view/231 28. Lu, N., Chassin, D.: A state-queueing model of thermostatically controlled appliances. Power Systems, IEEE Transactions on 19(3), 1666–1673 (2004). DOI 10.1109/TPWRS.2004. 831700 29. Lu, N., Chassin, D., Widergren, S.: Modeling uncertainties in aggregated thermostatically controlled loads using a state queueing model. Power Systems, IEEE Transactions on 20(2), 725–733 (2005). DOI 10.1109/TPWRS.2005.846072 30. Malhame, R., Chong, C.Y.: Electric load model synthesis by diffusion approximation of a high-order hybrid-state stochastic system. IEEE Transactions on Automatic Control 30(9), 854–860 (1985). DOI 10.1109/TAC.1985.1104071 31. Malhame, R., Chong, C.Y.: On the statistical properties of a cyclic diffusion process arising in the modeling of thermostat-controlled electric power system loads. SIAM Journal on Applied Mathematics 48(2), 465–480 (1988). DOI 10.1137/0148026. URL http://dx.doi.org/ 10.1137/0148026 32. Meyn, S., Barooah, P., Busic, A., Chen, Y., Ehren, J.: Ancillary service to the grid using intelligent deferrable loads. Automatic Control, IEEE Transactions on 60(11), 2847–2862 (2015). DOI 10.1109/TAC.2015.2414772 33. Meyn, S.P., Barooah, P., Busic, A., Chen, Y., Ehren, J.: Ancillary service to the grid using intelligent deferrable loads. IEEE Transactions on Automatic Control 60(11), 2847–2862 (2015). DOI 10.1109/TAC.2015.2414772 34. Paccagnan, D., Kamgarpour, M., Lygeros, J.: On the range of feasible power trajectories for a population of thermostatically controlled loads. In: 2015 54th IEEE Conference on Decision and Control (CDC), pp. 5883–5888 (2015). DOI 10.1109/CDC.2015.7403144 35. Schweppe, F.C., Tabors, R.D., Kirtley, J.L., Outhred, H.R., Pickel, F.H., Cox, A.J.: Homeostatic utility control. IEEE Transactions on Power Apparatus and Systems PAS-99(3), 1151– 1163 (1980). DOI 10.1109/TPAS.1980.319745 36. Siano, P.: Demand response and smart gridsa survey. Renewable and Sustainable Energy Reviews 30, 461 – 478 (2014). DOI http://dx.doi.org/10.1016/j.rser.2013.10.022. URL http: //www.sciencedirect.com/science/article/pii/S1364032113007211 37. Sulc, P., Backhaus, S., Chertkov, M.: Optimal distributed control of reactive power via the alternating direction method of multipliers. IEEE Transactions on Energy Conversion 29 (2014). URL https://arxiv.org/abs/1310.5748 38. Todd, D., Caufield, M., Helms, B., Starke, M., Kirby, B., Kueck, J.: Providing reliability services through demand response: A preliminary evaluation of the demand response capabilities of alcoa inc. (2009). URL https://www.ferc.gov/eventcalendar/Files/ 20100526085850-ALCOA%20Study.pdf 1 Ensemble Control of Loads 21 39. Todorov, E.: Linearly-solvable markov decision problems. In: B. Schölkopf, J. Platt, T. Hoffman (eds.) Advances in Neural Information Processing Systems 19, pp. 1369–1376. MIT Press (2007). URL http://papers.nips.cc/paper/ 3002-linearly-solvable-markov-decision-problems.pdf 40. Turitsyn, K., Sulc, P., Backhaus, S., Chertkov, M.: Options for control of reactive power by distributed photovoltaic generators. Proceedings of the IEEE 99(6), 1063–1073 (2011) 41. Zheng, Y., Hill, D.J., Zhang, C., Meng, K.: Non-interruptive thermostatically controlled load for primary frequency support. In: 2016 IEEE Power and Energy Society General Meeting (PESGM), pp. 1–5 (2016). DOI 10.1109/PESGM.2016.7741469
3cs.SY
arXiv:1701.05990v1 [math.RA] 21 Jan 2017 THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS WENHUA ZHAO Abstract. Let K be a field of characteristic zero and A a Kalgebra such that all the K-subalgebras generated by finitely many elements of A are finite dimensional over K. A K-E-derivation of A is a K-linear map of the form I − φ for some K-algebra endomorphism φ of A, where I denotes the identity map of A. In this paper we first show that for all locally finite K-derivations D and locally finite K-algebra automorphisms φ of A, the images of D and I − φ do not contain any nonzero idempotent of A. We then use this result to show some cases of the LFED and LNED conjectures proposed in [Z4]. More precisely, We show the LNED conjecture for A, and the LFED conjecture for all locally finite K-derivations of A and all locally finite K-E-derivations of the form δ = I − φ with φ being surjective. In particular, both conjectures are proved for all finite dimensional K-algebras. Furthermore, some finite extensions of derivations and automorphism to inner derivations and inner automorphisms, respectively, have also been established. This result is not only crucial in the proofs of the results above, but also interesting on its own right. 1. Motivations and the Main Results Let R be a unital ring (not necessarily commutative) and A an Ralgebra. We denote by 1A or simply 1 the identity element of A, if A is unital, and IA or simply I the identity map of A, if A is clear in the context. An R-linear endomorphism η of A is said to be locally nilpotent (LN) if for each a ∈ A there exists m ≥ 1 such that η m (a) = 0, and locally finite (LF) if for each a ∈ A the R-submodule spanned by η i (a) (i ≥ 0) over R is finitely generated. Date: January 24, 2017. 2000 Mathematics Subject Classification. 47B47, 08A35, 16W25, 16D99. Key words and phrases. Mathieu subspaces (Mathieu-Zhao spaces), the LNED conjecture, the LFED conjecture, locally finite or locally nilpotent derivations and E-derivations, inner derivations, inner automorphisms, idempotents. The author has been partially supported by the Simons Foundation grant 278638. 1 2 WENHUA ZHAO By an R-derivation D of A we mean an R-linear map D : A → A that satisfies D(ab) = D(a)b + aD(b) for all a, b ∈ A. By an R-Ederivation δ of A we mean an R-linear map δ : A → A such that for all a, b ∈ A the following equation holds: (1.1) δ(ab) = δ(a)b + aδ(b) − δ(a)δ(b). It is easy to verify that δ is an R-E-derivation of A, if and only if δ = I − φ for some R-algebra endomorphism φ of A. Therefore an RE-derivation is a special so-called (s1 , s2 )-derivation introduced by N. Jacobson [J] and also a special semi-derivation introduced by J. Bergen in [B]. R-E-derivations have also been studied by many others under some different names such as f -derivations in [E1, E2] and φ-derivations in [BFF, BV], etc.. We denote by EndR (A) the set of all R-algebra endomorphisms of A, DerR (A) the set of all R-derivations of A, and Eder R (A) the set of all R-E-derivations of A. Furthermore, for each R-linear endomorphism η of A we denote by Im η the image of η, i.e., Im η := η(A), and Ker η the kernel of η. When η is an R-derivation or R-E-derivation, we also η denote by A the kernel of η. Next let us recall the following notion first introduced in [Z2, Z3]. Definition 1.1. Let ϑ represent the words: left, right, or two-sided. An R-subspace V of an R-algebra A is said to be a ϑ-Mathieu subspace (ϑ-MS) of A if for all a, b, c ∈ A with am ∈ V for all m ≥ 1, the following conditions hold: 1) bam ∈ V for all m ≫ 0, if ϑ = left; 2) am c ∈ V for all m ≫ 0, if ϑ = right; 3) bam c ∈ V for all m ≫ 0, if ϑ = two-sided. A two-sided MS will also be simply called a MS. Note that a MS is also called a Mathieu-Zhao space in the literature (e.g., see [DEZ, EN, EH], etc.) as first suggested by A. van den Essen [E3]. The introduction of the new notion is mainly motivated by the study in [M, Z1] of the well-known Jacobian conjecture (see [Ke, BCW, E2]). See also [DEZ]. But, a more interesting aspect of the notion is that it provides a natural but highly non-trivial generalization of the notion of ideals of associative algebras. Note that the MSs of algebraic algebras over a field K can be characterized by the following theorem, which is a special case of [Z3, Theorem 4.2]. Theorem 1.2. Let K be a field of arbitrary characteristic and A a unital K-algebra that is algebraic over K. Then a K-subspace V is THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS 3 a MS of A, if and only if for every idempotent e (i.e., e2 = e), the principal ideal (e) of A generated by e is contained in V . Next let us recall the following two conjectures proposed in [Z4]. Conjecture 1.3 (The LFED Conjecture). Let K be a field of characteristic zero, A a K-algebra and δ a LF (locally finite) K-derivation or a LF K-E-derivation of A. Then the image Im δ of δ is a MS of A. Conjecture 1.4 (The LNED Conjecture). Let K be a field of characteristic zero, A a K-algebra and δ a LN (locally nilpotent) Kderivation or a LN K-E-derivation of A. Then δ maps every ϑ-ideal of A to a ϑ-MS of A, where ϑ represents the words: left, right, or two-sided. In this paper we prove some cases of the LFED and LNED conjectures above under the following condition on A: (KC) all the K-subalgebras generated by finitely many elements of A are finite dimensional over K. For the studies of some other cases of the LFED and LNED conjectures above, see [EWZ], [Z4]–[Z7]. Remark 1.5. The condition (KC) above is satisfied by all commutative algebraic K-algebras. But for noncommutative algebraic K-algebras the condition (KC) is the same as saying that the well-known Kurosch’s Problem [Ku] (see also [R] and [Zel]) has a positive answer for all finitely generated K-subalgebras of A. Note that the Kurosch’s Problem does not have a positive answer for all noncommutative affine algebras. In this paper we shall first show the following Theorem 1.6. Let K be a field of characteristic zero and A a Kalgebra that satisfies the condition (KC) above. Let δ be a LF Kderivation of A or a LF K-E-derivation of A. Then the image Im δ of δ does not contain any non-zero idempotent e of A if δ also satisfies one of the following two conditions: 1) δ ∈ DerK (A); 2) δ = I − φ for some K-algebra automorphism φ of A. Note that for every LN K-E-derivation δ = I − φ, the K-algebra P i endomorphism φ is invertible with the inverse map (I − δ)−1 = ∞ i=0 δ . Note also that every LN K-linear map is also LF. Therefore, by Theorems 1.2 and 1.6 above we have the following Corollary 1.7. Let K, A be as in Theorem 1.6 and δ ∈ Der K (A) or EderK (A). Then the following statements hold: 4 WENHUA ZHAO 1) if δ is LN, then δ maps every K-subspace of A to a MS of A. In particular, the LNED conjecture 1.4 holds for A; 2) if δ is LF and satisfies the condition 1) or 2) in Theorem 1.6, then Im δ is a MS of A, i.e., the LFED conjecture 1.3 holds for δ. Actually, it will be shown in Proposition 2.3 in subsection 2.3 that the LFED conjecture 1.3 holds also for all the LF K-E-derivations δ of A of the form δ = I − φ with φ ∈ EndK (A) being surjective. Some other cases of the LFED conjecture 1.3 and the LNED conjecture 1.4 will also be proved in subsection 2.3. For example, it will be shown in Proposition 2.4 that both the LFED and LNED conjectures hold for all finite dimensional algebras over a field of characteristic zero. Remark 1.8. It is easy to see that the following algebras over a field K satisfy the condition (KC): i) finite dimensional algebras over K; ii) commutative algebras that are algebraic over K; iii) the union of an increasing sequence of K-algebras in i) or ii), e.g., the N × N matrix algebra over K with only finitely nonzero entries; etc. Therefore, Theorem 1.6 and Corollary 1.7 above as well as some other results proved in this paper apply to all the algebras above. In order to show Theorem 1.6 we need to show a theorem (Theorem 1.9 below) on finite extensions of a derivation (resp.,, an automorphism) of A to an inner derivation (resp.,, an inner automorphism). Since this theorem is interesting on its own right, we formulate and prove it in a more general setting. Let R be a unital ring (not necessarily commutative), A an Ralgebra. Recall that a derivation D of A is inner if there exists u ∈ A such that D = ad u , where ad u is the adjoint derivation induced by u, i.e., ad u (a) := [u, a] := ua−au for all a ∈ A. An automorphism φ of A is inner if there exists a unit u ∈ A such that φ = Ad u , where Ad u is the conjugation automorphism of A induced by u, i.e., Ad u (a) := uau−1 for all a ∈ A. An R-linear endomorphism η of A is integral over R if there exists a monic polynomial p(t) ∈ R[t] such that p(η) = 0. Although R may not be commutative, the valuation p(η) does not depend on which side we write the coefficients of p(t), since η is an R-linear endomorphism of A. Theorem 1.9. Let R be a unital ring (not necessarily commutative), A a unital R-algebra and D (resp., φ) an R-derivation (resp., R-algebra THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS 5 automorphism) of A. Let p(t) be a monic polynomial in R[t] such that p(D) = 0 (resp., p(φ) = 0 and p(0) is a unit of R). Then there exists an R-algebra B containing A as an R-subalgebra such that the following statements hold: 1) B is finitely generated as both a left A-module and a right Amodule; 2) there exists u ∈ B (resp., a unit u ∈ B) such that p(u) = 0 and D = ad u |A (resp., φ = Ad u |A ). Arrangement: We give a proof for the derivation case of Theorem 1.6 in subsection 2.1, and the E-derivation case in a more general setting in subsection 2.2 (see Proposition 2.2). In subsection 2.3 we discuss some other consequences of Theorem 1.6 and Proposition 2.2. We then give a proof for the derivation case of Theorem 1.9 in subsection 3.1, and the automorphism case in subsection 3.2. Acknowledgment: The author is very grateful to Professors Arno van de Essen for reading carefully an earlier version of the paper and pointing out some mistakes and typos, etc.. 2. Proof and Some Consequences of Theorem 1.6 In this section we assume Theorem 1.9 and give a proof for Theorem 1.6. We divide the proof into two cases: the case of derivations in subsection 2.1 and the case of E-derivations in subsection 2.2. We then derive some consequences of Theorem 1.6 and Proposition 2.2 in subsection 2.3. Throughout this section K denotes a field of characteristic zero and A a unital K-algebra that satisfies the condition (KC) on page 3. All the notations introduced in Section 1 will also be freely used. 2.1. Proof of Theorem 1.6, 1). Let D be a LF (locally finite) Kderivation of A. Assume that Theorem 1.6, 1) fails, i.e., there exists a nonzero idempotent e ∈ Im D. Let a ∈ A such that e = Da and A1 be the K-subalgebra generated by D i (aj ) (i, j ≥ 0) over K. Then A1 is D-invariant. Furthermore, by the condition (KC) assumed on A a is algebraic over K. Therefore there exists d ≥ 1 (e.g., the degree of the minimal polynomial of a over K) such that aj (j ≥ d) lies in the K-subspace spanned over K by ai (0 ≤ i ≤ d − 1). On the other hand, since D is LF, for each fixed 0 ≤ i ≤ d − 1 the K-subspace spanned over K by D j (ai ) (j ≥ 0) is of finite dimension over K. Therefore A1 is generated by finitely many elements of A. By the condition (KC) on A again A1 is also finite dimensional over K. 6 WENHUA ZHAO Replacing A by A1 and D by D |A1 we may assume that A itself is finite dimensional over K, and consequently, D is a K-derivation of A that is integral over K. By Theorem 1.9 there exists a K-algebra extension B of A and some u ∈ B such that D = ad u |A . Furthermore, since B is finitely generated as a left A-module, B is also finite dimensional over K. Let n = dimK B and µ be the regular representation of B to the K-algebra HomK (B, B) of all K-linear endomorphisms of A, i.e., µ(b) for each b ∈ B is the multiplication map by b from the left. Then µ is a faithful representation, since A, hence also B, is unital. Choosing a K-linear basis of B we identify HomK (B, B) with the n × n matrix algebra Mn (K) over K. Since (2.1) µ(e) = µ(ad u (a)) = µ([u, a]) = [µ(u), µ(a)], we see that the trace of the matrix µ(e) is equal to zero. On the other hand, µ(e) is also a nonzero idempotent matrix. It is well-known in linear algebra that the trace of any nonzero idempotent in Mn (K) is not zero. For example, by using the Jordan form of the matrix µ(e) in Mn (K̄), where K̄ is the algebraic closure of K, it is easy to see that the trace of µ(e) is actually equal to its rank. Hence we get a contradiction. Therefore, statement 1) in Theorem 1.6 holds. 2.2. The E-Derivation Case of Theorem 1.6. Throughout this and also the next subsection we fix a K-algebra endomorphism φ of A and P Ker φi and Ā := A/ Ker ≥1 φ. We denote by π the set Ker ≥1 φ := ∞ i=1 quotient map from A to Ā and φ̄ the induced map by φ from Ā to Ā. We will also freely use the fact that φ is LF (locally finite), if and only if I − φ is LF. Lemma 2.1. With the setting above we have 1) Ker ≥1 φ ⊆ Im (I − φ). 2) φ̄ is injective. This lemma is actually part of [Z4, Lemma 5.3]. But for the sake of completeness we include a proof here. Proof of Lemma 2.1: 1) Let a ∈ Ker ≥1 φ. Then φk (a) = 0 for some P k ≥ 1. Let b = ∞ φi (a), which is a well-defined element of A. Then i=0P i (I − φ)(b) = (I − φ)( ∞ i=1 φ )(a) = a. Therefore a ∈ Im (I − φ). 2) Let a ∈ A such that φ̄(π(a)) = 0. Since φ̄π = πφ, we have π(φ(a)) = 0, i.e., φ(a) ∈ Ker ≥1 φ. Then φk+1(a) = φk (φ(a)) = 0 for some k ≥ 1, and a ∈ Ker ≥1 φ = Ker π, whence π(a) = 0 and φ̄ is injective. ✷ THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS 7 Next, we show the following proposition, from which Theorem 1.6, 2) follows immediately, since φ is LF, if and only if I − φ is LF. Proposition 2.2. Assume that A satisfies the condition (KC), and φ ∈ EndK (A) such that φ is LF and φ̄ is surjective (e.g., when φ itself is surjective). Then for each idempotent e ∈ A we have that e ∈ Im (I − φ), if and only if e ∈ Ker ≥1 φ. Consequently, if φ is a K-algebra automorphism of A, then Im (I−φ) does not contain any nonzero idempotent of A. Proof: We first consider the case that φ is bijective. Note that in this case Ker ≥1 φ = 0 and Ā = A. So it suffices to show that Im (I − φ) does not contain any nonzero idempotent of A. But this can be proved by a similar argument as the proof of Theorem 1.6, 1) in the previous subsection. For example, by letting p(t) be the minimal polynomial of φ we have that p(0) 6= 0 and hence is a unit of the base ring K. So we may apply Theorem 1.9 to the automorphism φ (instead of applying it to the derivation D). By using the same notation Eq. (2.1) becomes µ(e) = µ(a − Ad u (a)) = µ(a − uau−1 ) = µ(a) − µ(u)µ(a)µ(u)−1, from which we see that the trace of the nonzero idempotent matrix µ(e) is equal to zero, which is a contradiction again. Next we consider the general case. Note that by Lemma 2.1, 1) it suffices to show that every idempotent e ∈ Im (IA − φ) lies in Ker ≥1 φ. By Lemma 2.1, 2) and the surjectivity of φ̄ we see that φ̄ is a Kalgebra automorphism of Ā. Then by the bijective case shown above Im (IĀ − φ̄) does not contain any nonzero idempotent of Ā. On the other hand, for all e ∈ Im (IA −φ) it is easy to see that π(e) is an idempotent in Im (IĀ − φ̄). Therefore we have π(e) = 0, and hence e ∈ Ker π = Ker ≥1 φ, as desired. ✷ 2.3. Some Consequences. In this subsection we derive some consequences of Theorem 1.6 and Proposition 2.2. All the notations fixed in the previous subsection will still be in force in this subsection. Proposition 2.3. Let δ be a LF K-derivation of A, or a LF K-Ederivation of the form δ = I − φ for some φ ∈ EndK (A) such that φ̄ is surjective (e.g., when φ itself is surjective). Then the LFED conjecture 1.3 holds for δ. Proof: If δ is a K-derivation of A, then the proposition follows immediately from Corollary 1.7, 2). Assume that δ = I − φ for some φ ∈ EndK (A) such that φ̄ is surjective. Let e be an idempotent lying in Im δ. Then e ∈ Ker ≥1 φ by 8 WENHUA ZHAO Proposition 2.2. Since Ker ≥1 φ is an ideal of A, the principal ideal (e) ⊆ Ker ≥1 φ. Then by Lemma 2.1, 1) we have (e) ⊆ Im (I − φ), and by Theorem 1.2 the proposition follows. ✷ Proposition 2.4. Both the LFED conjecture 1.3 and the LNED conjecture 1.4 hold for all finite dimensional algebras over a field K of characteristic zero. Proof: Let A be a finite dimensional K-algebra. Then by Corollary 1.7 it is sufficient to show the LFED conjecture 1.3 for every LF K-Ederivation δ of A. Write δ = I − φ for some φ ∈ EndK (A). Then by Lemma 2.1, 1) we have that φ̄ is injective. Since A is finite dimensional over K, then so is Ā. Hence φ̄ is also surjective. Then by Proposition 2.3 the LFED conjecture 1.3 holds for δ, whence the proposition follows. ✷ Finally, it is also worthy to point out the following special case of the LFED conjecture 1.3 and the LNED conjecture 1.4, which follows directly from Theorems 1.2, 1.6 and the fact that all finite order Kalgebra automorphisms of A are LF. Corollary 2.5. For every finite order K-algebra automorphism φ of A we have 1) Im (I − φ) does not contain any nonzero idempotents of A. 2) I − φ maps every K-subspace of A to a MS of A. In particular, both the LFED conjecture 1.3 and the LNED conjecture 1.4 hold for the K-E-derivation δ = I − φ of A. Note that by [Z4, Corollary 5.5] both the LFED and LNED conjectures also hold for all K-E-derivations associated with finite order K-algebra automorphisms of a commutative K-algebra. But, for the most of other K-algebras these two conjectures are still open for this special family of K-E-derivations. 3. Proof of Theorem 1.9 In this section we give a proof for Theorem 1.9. We divide the proof into two cases, one for the derivation case in subsection 3.1 and the other for the automorphism case in subsection 3.2. Throughout this section R stands for a unital ring (not necessarily commutative) and A for a unital R-algebra. THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS 9 3.1. The Derivation Case. We fix an R-derivation D of A and recall first the construction of the following so-called generalized polynomial algebra over R associated with D. Let A[X; D] be the set of all the (generalized) polynomials f (X) of P the form f (x) = di=0 ai X i with d ≥ 0 and ai ∈ A (0 ≤ i ≤ d). Then A[X; D] with the obvious addition and the left scalar multiplication forms a left R-module. We define a multiplication for A[X; D] by setting first for all a ∈ A (3.1) Xa = aX + Da, , or equivalently (3.2) ad X (a) = Da, and then extend it to the product of two arbitrary elements of A by using the associativity and the distribution laws. With the operations defined above A[X; D] becomes a unital Ralgebra, which contains A as an R-subalgebra and D = ad X A . In other words, the derivation D of A becomes inner after A is extended to the R-algebra A[X; D]. What we need to show next is that under the integral assumption on D we may replace A[X; D] by one of its quotient R-algebras that is finitely generated as an A-module. We begin with the following three lemmas. Lemma 3.1. For all n ≥ 0 and a ∈ A, we have in A[X, D]. n   X n n n n (3.3) D i (a)X n−i . [X , a] := X a − aX = i i=1 Proof: First, it is well-known and also easy to check inductively that the following equation holds: n   X n n (ad X )i (a)X n−i . [X , a] = i i=1 Then by Eq. (3.2) it is also easy to see inductively that (ad X )i (a) = D i (a) for all i ≥ 0, from which and the equation above Eq. (3.3) follows. ✷ P Now, for every f (X) = di=0 ai X i in A[X; D], we call a0 the constant P term of f (X) and denote it by [0]f (X). Since the expression di=0 ai X i for f (X) is unique (by definition of A[X; D]), we see that [0]f (X) is well defined. 10 WENHUA ZHAO Lemma 3.2. Let q(X) ∈ R[X] and (q(X)) the principal (two-sided) ideal of A[X; D] generated by q(X). Then for all f (X) ∈ (q(X)), we have [0]f (X) ∈ A Im q(D), where Im q(D) := q(D)(A), i.e., the image of the map q(D) : A → A. Proof: By the linearity we may assume f (X) = ah(X) with h(X) = X m q(X)bX k for some m, k ≥ 0 and a, b ∈ A. Therefore it suffices to show [0]h(X) ∈ Im q(D). If k ≥ 1, then it is easy to see by Eq. (3.1) that [0]h(X) = 0, whence [0]h(X) ∈ Im q(D). So assume k = 0, i.e., h(X) = X m q(X)b and write P q(X) = di=0 αi X i for some d ≥ 0 and αi ∈ R (0 ≤ i ≤ d). Since D is an R-derivation of A, all α ∈ R commute with X, for ad X (α) = Dα = 0. Then by Lemma 3.1 we have q(X)b = bq(X) + [q(X), b] = bq(X) + [α0 , b] + d X αi [X i , b] i=1 = bq(X) + [α0 , b] + d X i  X i=1 j=1  i αi D j (b)X i−j , j from which we get (3.4) d X  [0] q(X)b = bα0 + [α0 , b] + αi D i (b) i=1 = α0 b + d X αi D i (b) i=1 = d X αi D i (b) = q(D)(b). i=0  If m = 0, then [0]h(X) = [0] q(X)b = q(D)(b) ∈ Im q(D). So we assume m ≥ 1. Since [X, α] = 0 for all α ∈ R, X and q(X) commute. Then   [0]h(X) = [0] X m q(X)b = [0] q(X)(X mb)  = [0] q(X)bX m + q(X)[X m , b] Applying Lemma 3.1: = [0] q(X)bX m + q(X) m X i=1 m = [0] q(X)D (b)) D i (b)X m−i  THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS 11 Applying Eq. (3.4) with b replaced by D m (b): = q(D)(D m (b)). Hence [0]h(X) ∈ Im q(D), as desired. ✷ Lemma 3.3. Let p(t) ∈ R[t] such that p(D) = 0. Then the composition A → A[X; D] → A[X; D]/ p(X) is injective. Proof: Since p(D) = 0, we have Im p(D) = 0, whence A Im p(D) = 0. Then by Lemma 3.2 with q(X) = p(X) and f (X) = a (a ∈ A) we have A ∩ (p(X)) = 0, from which the lemma follows. ✷ Now we are ready to prove Theorem 1.9 on integral derivations. Proof of Theorem 1.9, Part I: Let D and p(t) be as in the the orem, and set B := A[X; D]/ p(X) . Then B is an R-algebra and by Lemma 3.3, B contains A as an R-subalgebra. To show statement 1), denote by X̄ the image of X in the quotient algebra B. Since p(t) is monic, it is easy to see that B as a left A-module is (finitely) generated by X̄ i (0 ≤ i ≤ d − 1), where d = deg p(t). Then by Eq. (3.3) it is easy to verify that B as a right A-module is also (finitely) generated by X̄ i (0 ≤ i ≤ d − 1). To show statement 2), note first that the inner derivation adX of  A[X, D] obviously preserves the principal ideal p(X) . Therefore, adX induces an inner derivation on the quotient algebra B. Letting u = X̄ ∈ B and by Eq. (3.2) we see statement 2) also follows. ✷ We end this subsection with the following interesting bi-product of Lemma 3.3. Corollary 3.4. Assume further that D 6= 0 and A is a simple algebra, i.e., the only two-sided ideals of A are 0 and A itself. Then A Im D = A. Proof: Assume otherwise, i.e., A Im D 6= A. Then by Lemma 3.2 with f (X) = q(X) = X we have (X) ∩ A ⊆ A Im D 6= A. Therefore (X) ∩ A is a proper ideal of A. Since A is simple, we have (X) ∩ A = {0}. On the other hand, by Eq. (3.1) we have Im D ⊆ (X) ∩ A, whence Im D = 0, i.e., D = 0. Contradiction. ✷ One remark on the corollary above is as follows. 12 WENHUA ZHAO P Remark 3.5. For all f (X) ∈ A[X, D] write f (X) = ni=0 X i ci with ci ∈ A, and set {0}f (X) := c0 . Then by studying {0}f (X) instead of [0]f (X) it can be shown that the equation (Im D)A = A also holds in Corollary 3.4. 3.2. The Automorphism Case. Throughout this subsection we let R and A be as in Theorem 1.9, and φ an R-algebra automorphism of A, and p(t) a monic polynomial in R[t] such that p(φ) = 0 and p(0) is a unit of R. Let X be a free variable. For any P set S we denote by S[X −1 , X] the set of elements of the form f (X) := ni=m αi X i for some m, n ∈ Z and αi ∈ S (m ≤ i ≤ n). Formally, S[X −1 , X] is just the set of all “Laurent polynomials” in X with the coefficients (appearing on the left) in S. Next we define an associative R-algebra A[X −1 , X; φ] as follows. First, A[X −1 , X; φ] as a set is equal to the set A[X −1 , X]. With the obvious left scalar multiplication by elements of R and addition A[X −1 , X; φ] forms a left R-module. To make it an R-algebra we define the multiplication for A[X −1 , X; φ] to be the unique associative multiplication of A[X −1 , X; φ] such that XX −1 = X −1 X = 1A and for every a ∈ A, (3.5) Xa = φ(a)X, or equivalently, (3.6) XaX −1 = φ(a). Then it is easy to see that A[X −1 , X; φ] contains A as an R-subalgebra, and by Eq. (3.6) we also have φ = Ad X |A . What we need to show next is that we may replace A[X −1 , X; φ] by one of its quotient algebras B which contains A and is finitely generated as a left A-module, and also as a right A-module. To do so, we need to fix the following notation. For ∈ Pnevery f (X) i −1 A[X , X; φ], we first write it uniquely as i=m αi X with P f (X) = αi ∈ A (m ≤ i ≤ n), and then set f [1] := ni=m αi . One remark on the “value” f [1] defined above is that, if f (X) = Pℓ i i=k PnX βi with βi ∈ A (k ≤ i ≤ ℓ), then f [1] may not be equal to i=0 βi . In other words, in order to “evaluate f (X) at X = 1”, we need first to write it as a Laurent polynomial in X with all the coefficients appearing on the left of X i ’s.  Lemma 3.6. Let f (X) ∈ R[X −1 , X] and f (X) the principal (twosided) ideal of A[X −1, X; φ] generated by f (X). Then for every h(X) ∈ THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS  f (X) we have (3.7) 13 h[1] ∈ A Im f (φ), where Im f (φ) := f (φ)(A). Pn i Proof: Write f (X) = i=m αi X for some m, n ∈ Z and αi ’s in R. By the linearity we may assume h(X) = bX j f (X)cX k for some j, k ∈ Z and b, c ∈ A. Since φ is an R-algebra automorphism of A, we have φ(r1A ) = r1A . Then by Eq. (3.5) we see that all elements of R commute with X in A[X −1 , X; φ]. By this fact and Eq. (3.6) we consider n X j k (X j αi )(X i c)X k h(X) = bX f (X)cX = b i=m =b =b n X j i −i (X αi )(X cX )X i=m n X i+k =b αi φj (φi (c))X j+i+k = b i=m n X αi X j φi (c)X i+k i=m n X i=m  αi φi (φj (c)) X j+i+k . Therefore we have h[1] = b n X i=m Hence the lemma follows.  αi φi (φj (c)) = bf (φ)(φj (c)). ✷ Lemma 3.7. For each f (X) ∈ R[X −1 , X] such that f (φ) = 0, the composition A → A[X −1 , X; φ] → A[X −1 , X; φ]/ f (X) is injective. Proof: Since f (φ) = 0, A Im f (φ) = {0}. Then for each a ∈ A, by Lemma 3.6 we have that a ∈ f (X) , if and only if a = 0. Therefore A ∩ f (X) = {0}, whence the lemma follows. ✷ Now we are ready to show the automorphism case of Theorem 1.9. Proof of Theorem 1.9, Part II: Let φ and p(t) ∈ R[t] be as in  the theorem, and set B := A[X −1 , X; φ]/ p(X) . Then by Lemma 3.7 B contains A as an R-subalgebra. Since the inner automorphism  Ad X −1 of A[X , X; φ] obviously preserves the principal ideal p(X) , Ad X induces an inner automorphism of B. Let u be the image of X in B. Then p(u) = 0 and by Eq. (3.6) φ = Ad u A . Therefore, it remains only to show that B as a left A-module as well Pd−1 d as a right A-module is finitely generated. Write p(t) = t + i=0 αi ti 14 WENHUA ZHAO P i for some d ≥ 0 and αi ∈ R (0 ≤ i ≤ d). Then X̄ d = − d−1 i=0 αi X̄ in B, whence for each m ≥ d, X̄ m lies in the left A-submodule generated by X̄ i (0 ≤ i ≤ d − 1). On the other hand, since by assumption α0 = p(0) is a unit in R, and α0−1 X̄ −d p(X̄) = 0 in B, we have X̄ −d = −α0−1 − d−1 X α0−1 αi X̄ −d+i . i=1 n Therefore, for each n ≤ −d, X̄ lies in the A-submodule generated by X̄ −i (0 ≤ i ≤ d − 1). Hence B as a left A-module is (finitely) generated by ui = X̄ i (−d + 1 ≤ i ≤ d − 1). Furthermore, by Eq. (3.5) it is easy to see inductively that X̄ k r = k φ (r)X̄ k for all a ∈ A and k ∈ Z, from which we see that A as a right A-module is also (finitely) generated by X̄ i (−d + 1 ≤ i ≤ d − 1). ✷ References [BCW] H. Bass, E. Connell and D. Wright, The Jacobian Conjecture, Reduction of Degree and Formal Expansion of the Inverse. Bull. Amer. Math. Soc. 7, (1982), 287–330. [B] J. Bergen, Derivations in Prime Rings. Canad. Math. Bull. 26 (1983), 267-270. [BFF] M. Brešar, A. Fošner and M. Fošner, A Kleinecke-Shirokov Type Condition with Jordan Automorphisms. Studia Math. 147 (2001), no. 3, 237-242. [BV] M. Brešar and AR Villena, The Noncommutative SingerWermer Conjecture and φ-Derivations. J. London Math. Soc. 66 (2002), 710-720. [DEZ] H. Derksen, A. van den Essen and W. Zhao, The Gaussian Moments Conjecture and the Jacobian Conjecture. To appear in Israel J. Math.. See also arXiv:1506.05192 [math.AC]. [E1] A. van den Essen, The Exponential Conjecture and the Nilpotency Subgroup of the Automorphism Group of a Polynomial Ring. Prepublications. Univ. Autònoma de Barcelona, April 1998. [E2] A. van den Essen, Polynomial Automorphisms and the Jacobian Conjecture. Prog. Math., Vol.190, Birkhäuser Verlag, Basel, 2000. [E3] A. van den Essen, Introduction to Mathieu Subspaces. “International ShortSchool/Conference on Affine Algebraic Geometry and the Jacobian Conjecture” at Chern Institute of Mathematics, Nankai University, Tianjin, China. July 14-25, 2014. [EH] A. van den Essen and L. C. van Hove, Mathieu-Zhao Spaces. To appear. [EN] A. van den Essen and S. Nieman, Mathieu-Zhao Spaces of Univariate Polynomial Rings with Non-zero Strong Radical. J. Pure Appl. Algebra, 220 (2016), no. 9, 3300–3306. [EWZ] A. van den Essen, D. Wright and W. Zhao, Images of Locally Finite Derivations of Polynomial Algebras in Two Variables. J. Pure Appl. Algebra 215 (2011), no.9, 2130-2134. [MR2786603]. See also arXiv:1004.0521[math.AC]. THE LNED AND LFED CONJECTURES FOR ALGEBRAIC ALGEBRAS [J] [Ke] [Ku] [M] [P] [R] [Zel] [Z1] [Z2] [Z3] [Z4] [Z5] [Z6] [Z7] 15 N. Jacobson, Structure of Rings. Amer. Math. Soc. Coll. Pub. 37, Amer. Math. Soc. Providence R. I., 1956. O. H. Keller, Ganze Gremona-Transformationen. Monats. Math. Physik 47 (1939), no. 1, 299-306. A. G. Kurosch, Problems in Ring Theory Which Are Related to the Burnside Problem for Periodic Groups. Izv. Akad. Nauk SSSR 5, no. 3 (1941), 233240. O. Mathieu, Some Conjectures about Invariant Theory and Their Applications. Algèbre non commutative, groupes quantiques et invariants (Reims, 1995), 263–279, Sémin. Congr., 2, Soc. Math. France, Paris, 1997. R. S. Pierce, Associative Algebras. Graduate Texts in Mathematics, 88. Springer-Verlag, New York-Berlin, 1982. L. H. Rowen, Ring Theory, 83: Student Edition. Academic Press. Student Manual/Study Guide edition, 1991. E Zelmanov, Some open problems in the theory of infinite dimensional algebras. J. Korean Math. Soc. 44 (2007), No. 1185–1195. W. Zhao, Images of Commuting Differential Operators of Order One with Constant Leading Coefficients. J. Alg. 324 (2010), no. 2, 231–247. [MR2651354]. See also arXiv:0902.0210 [math.CV]. W. Zhao, Generalizations of the Image Conjecture and the Mathieu Conjecture. J. Pure Appl. Alg. 214 (2010), 1200-1216. See also arXiv:0902.0212 [math.CV]. W. Zhao, Mathieu Subspaces of Associative Algebras. J. Alg. 350 (2012), no.2, 245-272. See also arXiv:1005.4260 [math.RA]. W. Zhao, Some Open Problems on Locally Finite or Locally Nilpotent Derivations and E-Derivations. Preprint. W. Zhao, Idempotents in Intersection of the Kernel and the Image of Locally Finite Derivations and E-derivations. Preprint. W. Zhao, The LFED and LNED Conjectures for Laurent Polynomial Algebras. Preprint. W. Zhao, Images of Ideals under Derivations and E-Derivations of Univariate Polynomial Algebras over a Field of Characteristic Zero. Preprint. Department of Mathematics, Illinois State University, Normal, IL 61761. Email: [email protected]
0math.AC
arXiv:1202.5810v3 [math.AC] 10 Nov 2013 Compositions and collisions at degree p2 Raoul Blankertz, Joachim von zur Gathen & Konstantin Ziegler B-IT, Universität Bonn D-53113 Bonn, Germany [email protected],{gathen,zieglerk}@bit.uni-bonn.de http://cosec.bit.uni-bonn.de/ March 22, 2018 Abstract A univariate polynomial f over a field is decomposable if f = g ◦ h = g(h) for nonlinear polynomials g and h. In order to count the decomposables, one wants to know, under a suitable normalization, the number of equal-degree collisions of the form f = g ◦ h = g ∗ ◦ h∗ with (g, h) 6= (g ∗ , h∗ ) and deg g = deg g ∗ . Such collisions only occur in the wild case, where the field characteristic p divides deg f . Reasonable bounds on the number of decomposables over a finite field are known, but they are less sharp in the wild case, in particular for degree p2 . We provide a classification of all polynomials of degree p2 with a collision. It yields the exact number of decomposable polynomials of degree p2 over a finite field of characteristic p. We also present an efficient algorithm that determines whether a given polynomial of degree p2 has a collision or not. Keywords. computer algebra, finite fields, wild polynomial decomposition, equal-degree collisions, ramification theory of function fields, counting special polynomials 1 Introduction The composition of two polynomials g, h ∈ F [x] over a field F is denoted as f = g◦h = g(h), and then (g, h) is a decomposition of f , and f is decomposable if g and h have degree at least 2. In the 1920s, Ritt, Fatou, and Julia studied structural properties of these decompositions over C, using analytic methods. 1 Particularly important are two theorems by Ritt on the uniqueness, in a suitable sense, of decompositions, the first one for (many) indecomposable components and the second one for two components, as above. Engstrom (1941) and Levi (1942) proved them over arbitrary fields of characteristic zero using algebraic methods. The theory was extended to arbitrary characteristic by Fried & MacRae (1969), Dorey & Whaples (1974), Schinzel (1982, 2000), Zannier (1993), and others. Its use in a cryptographic context was suggested by Cade (1985). In computer algebra, the method of Barton & Zippel (1985) requires exponential time. A fundamental dichotomy is between the tame case, where the characteristic p does not divide deg g, and the wild case, where p divides deg g, see von zur Gathen (1990a,b). A breakthrough result of Kozen & Landau (1989) was their polynomial-time algorithm to compute tame decompositions. In the wild case, considerably less is known, both mathematically and computationally. Zippel (1991) suggests that the block decompositions of Landau & Miller (1985) for determining subfields of algebraic number fields can be applied to decomposing rational functions even in the wild case. A version of Zippel’s algorithm in Blankertz (2013) computes in polynomial time all decompositions of a polynomial that are minimal in a certain sense. Avanzi & Zannier (2003) study ambiguities in the decomposition of rational functions over C. A set of distinct decompositions of f is called a collision. The number of decomposable polynomials of degree n is thus the number of all pairs (g, h) with deg g · deg h = n reduced by the ambiguities introduced by collisions. In this paper, we study only equal-degree collisions of f = g ◦ h = g ∗ ◦ h∗ , where deg g = deg g ∗ and thus deg h = deg h∗ . The task of counting compositions over a finite field of characteristic p was first considered in Giesbrecht (1988). Von zur Gathen (2009) presents general approximations to the number of decomposable polynomials. These come with satisfactory (rapidly decreasing) relative error bounds except when p divides n = deg f exactly twice. The main result (Theorem 6.6) of the present work determines exactly the number of decomposable polynomials in one of these difficult cases, namely when n = p2 and hence deg g = deg h = p. This is shown in three steps. First, we exhibit some classes of collisions in Section 3. Their properties are easy to check. In the second step we show that these are all possibilities (Theorem 5.9). In Section 4 we use ramification theory of function fields to study the root multiplicities in collisions, and in Section 5 classify all collisions at degree p2 . In the third step we count the resulting possibilities (Section 6). Our contribution is fourfold: • We provide explicit constructions for collisions at degree r2 , where r is 2 a power of the characteristic p > 0 (Fact 3.1, Theorem 3.22). • We provide a classification of all collisions at degree p2 , linking every collision to a unique explicit construction (Theorem 5.9). • We use these two results to obtain an exact formula for the number of decomposable polynomials at degree p2 (Theorem 6.6). • The classification yields an efficient algorithm to test whether a given polynomial of degree p2 has a collision or not (Algorithm 5.14). An Extended Abstract of this paper appeared as Blankertz, von zur Gathen & Ziegler (2012). Notice: this is the authors’ version of a work that was accepted for publication in Journal of Symbolic Computation. Changes resulting from the publishing process, such as peer review, editing, corrections, structural formatting, and other quality control mechanisms may not be reflected in this document. Changes have been made to this work since it was submitted for publication. A definitive version was subsequently published as Blankertz, von zur Gathen & Ziegler (2013). 2 Definitions and examples We consider a field F of positive characteristic p > 0. Composition of g and h with linear polynomials introduces inessential ambiguities in decompositions f = g ◦ h. To avoid them, we normalize f , g, and h to be monic original, that is with leading coefficient 1 and constant coefficient 0 (so that the graph of f passes through the origin); see von zur Gathen (2009). For a nonnegative integer k, an (equal-degree) k-collision at degree n is a set of k distinct pairs (g, h) of monic original polynomials in F [x] of degree at least 2, all with the same composition f = g ◦ h of degree n and deg g the same for all (g, h). A k-collision is called maximal if it is not contained in a (k + 1)-collision. We also say that f has a (maximal) k-collision. Furthermore, g is a left component and h a right component of f . For n ≥ 1, we define Pn (F ) = {f ∈ F [x] : f is monic original of degree n}, Dn (F ) = {f ∈ Pn (F ) : f is decomposable}, Cn,k (F ) = {f ∈ Pn (F ) : f has a maximal k-collision}. (2.1) Thus #Pn (Fq ) = q n−1 . We sometimes leave out F from the notation when it is clear from the context. Let f ∈ Pn have a k-collision C, f 0 6= 0, and m be a divisor of n. If all right components in C are of degree m and indecomposable, then 3 k ≤ (n − 1)/(m − 1); see Blankertz (2011, Corollary 3.27). For n = p2 , both components are of degree p and thus indecomposable and we find k ≤ p + 1; see also von zur Gathen, Giesbrecht & Ziegler (2010, Proposition 6.5 (iv)). For counting all decomposable polynomials of degree p2 over Fq , it is sufficient to count the sets Cp2 ,k of polynomials with maximal k-collision for k ≥ 2, since X #Dp2 = q 2p−2 − (k − 1) · #Cp2 ,k . (2.2) k≥2 Lemma 2.3. In a decomposition (g, h), g is uniquely determined by g ◦ h and h. Proof. Let f = g ◦ h. Consider the F -algebra homomorphism ϕ : F [x] → F [x] with x 7→ h. Its kernel is trivial, since h is nonconstant, and thus ϕ is injective. Hence there is exactly one u ∈ F [x] such that ϕ(u) = f , namely u = g. Furthermore, g is easy to compute from g ◦ h and h by the generalized Taylor expansion; see von zur Gathen (1990a, Section 2). The following is a simple example of a collision. Example 2.4. Let r = pe . For h ∈ Pr (F ), we have xr ◦ h = ϕr (h) ◦ xr , (2.5) where ϕr is the eth power of the Frobenius endomorphism on F , extended to polynomials coefficientwise. If h 6= xr , then {(xr , h), (ϕr (h), xr )} is a 2-collision and we call it a Frobenius collision. In the case r = p, we have the following description. Lemma 2.6. (i) Assume that f ∈ Pp2 (F ) has a 2-collision. Then it is a Frobenius collision if and only if f 0 = 0. (ii) A Frobenius collision of degree p2 is a maximal 2-collision. Proof. (i) If f is a Frobenius collision, then f 0 = 0 by definition. Conversely, let f ∈ Pp2 (F ) with f 0 = 0. Then f ∈ F [xp ] and thus f = g ◦ xp for some monic original polynomial g. Let f = g ∗ ◦ h∗ be another decomposition of f . By Lemma 2.3, f and h∗ determine g ∗ uniquely, hence h∗ = 6 xp and h∗ 0 6= 0. Thus from f 0 = g ∗ 0 (h∗ ) · h∗ 0 = 0 follows g ∗ 0 = 0 and hence g ∗ = xp . Furthermore, f = xp ◦ h∗ = ϕp (h∗ ) ◦ xp by (2.5), g = ϕp (h∗ ) by the uniqueness in Lemma 2.3, and f is a Frobenius collision. (ii) Let f = xp ◦ h = ϕp (h) ◦ xp , with h 6= xp , be a Frobenius collision, and ∗ (g , h∗ ) a decomposition of f . Then 0 = f 0 = g ∗ 0 (h∗ ) · h∗ 0 and thus g ∗ 0 = 0 or h∗ 0 = 0. If h∗ 0 = 0, then h∗ = xp and thus g ∗ = ϕp (h), by Lemma 2.3. If g ∗ 0 = 0, then g ∗ = xp and f = ϕp (h∗ ) ◦ xp as in (i). Thus ϕp (h∗ ) = ϕp (h) by the uniqueness in Lemma 2.3, which implies h = h∗ . 4 If F is perfect—in particular if F is finite or algebraically closed—then the Frobenius endomorphism ϕp is an automorphism on F . Thus for f ∈ Pp2 (Fq ), 2 f 0 = 0 implies that f is either a Frobenius collision or xp . For f ∈ Pn (F ) and w ∈ F , the original shift of f by w is f [w] = (x − f (w)) ◦ f ◦ (x + w) ∈ Pn (F ). We also simply speak of a shift. Original shifting defines a group action of the additive group of F on Pn (F ). Indeed, we have for w, w0 ∈ F 0 (f [w] )[w ] = (x − f [w] (w0 )) ◦ f [w] ◦ (x + w0 ) = (x − (f (w0 + w) − f (w))) ◦ (x − f (w)) ◦ f ◦ (x + w) ◦ (x + w0 ) 0 = (x − f (w0 + w)) ◦ f ◦ (x + w0 + w) = f [w +w] . Furthermore, for the derivative we have (f [w] )0 = f 0 ◦(x+w). Shifting respects decompositions in the sense that for each decomposition (g, h) of f we have a decomposition (g [h(w)] , h[w] ) of f [w] , and vice versa. We denote (g [h(w)] , h[w] ) as (g, h)[w] . 3 Explicit collisions at degree r2 This section presents two classes of explicit collisions at degree r2 , where r is a power of the characteristic p > 0 of the field F . The collisions of Fact 3.1 consist of additive and subadditive polynomials. A polynomial A of degree rκ P i is r-additive if it is of the form A = 0≤i≤κ ai xr with all ai ∈ F . We call a polynomial additive if it is p-additive. A polynomial is additive if and only if it acts additively on an algebraic closure F of F , that is A(a + b) = A(a) + A(b) for all a, b ∈ F ; see Goss (1996, Corollary 1.1.6). The composition of additive polynomials is additive, see for instance Proposition 1.1.2 of the cited book. The decomposition structure of additive polynomials was first studied by Ore (1933). Dorey & Whaples (1974, Theorem 4) show that all components of an additive polynomial are additive. Giesbrecht (1988) gives lower bounds on the number of decompositions and algorithms to determine them. For a divisor m of r − 1, the (r, m)-subadditive polynomial associated P i with the r-additive polynomial A is S = x( 0≤i≤κ ai x(r −1)/m )m of degree rκ . Then A and S are related as xm ◦ A = S ◦ xm and fall into the First Case of Ritt’s Second Theorem. Dickson (1897) notes a special case of subadditive polynomials, and Cohen (1985) is concerned with the reducibility of some related polynomials. Cohen (1990a,b) investigates their connection to exceptional polynomials and coins the term “sub-linearized”; see also 5 Cohen & Matthews (1994). Coulter, Havas & Henderson (2004) derive the number of indecomposable subadditive polynomials and present an algorithm to decompose subadditive polynomials. Ore (1933, Theorem 3) describes exactly the right components of degree p of an additive polynomial. Henderson & Matthews (1999) relate such additive decompositions to subadditive polynomials, and in their Theorems 3.4 and 3.8 describe the collisions of Fact 3.1 below. The polynomials of Theorem 3.22 popped up in the course of trying to prove that these examples might be the only ones; see the proof of Theorem 5.9. In Section 5, we show that together with the Frobenius collisions of Example 2.4, these two examples and their shifts comprise all 2-collisions at degree p2 . Fact 3.1. Let r be a power of p, u, s ∈ F × , ε ∈ {0, 1}, m a positive divisor of r − 1, ` = (r − 1)/m, and f = S(u, s, ε, m) = x(x`(r+1) − εusr x` + usr+1 )m ∈ Pr2 (F ), T = {t ∈ F : tr+1 − εut + u = 0}. (3.2) For each t ∈ T and g = x(x` − usr t−1 )m , h = x(x` − st)m , (3.3) both in Pr (F ), we have f = g ◦ h. Moreover, f has a #T -collision. The polynomials f in (3.2) are “simply original” in the sense that they have a simple root at 0. This motivates the designation S. Proof. For t ∈ T , we have g ◦ h = x(x` − st)m (x` (x` − st)r−1 − usr t−1 )m = x(x` (x` − st)r − (x` − st)usr t−1 )m = x(x`r+` − sr tr x` − usr t−1 x` + usr+1 )m = x(x`(r+1) − sr (tr + ut−1 )x` + usr+1 )m = x(x`(r+1) − εusr x` + usr+1 )m = f. This proves that (g, h) is a decomposition of f . While f does not depend on t, the #T different choices for t yield #T pairwise different values for the coefficients of xr−` in h, namely hr−` = −mst 6= 0. 6 The polynomial S(u, s, ε, m) is r-additive for m = 1 and (r, m)-subadditive for all m. Bluher (2004) shows that for ε = 1 and F ∩ Fr of size Q, the cardinality of T is either 0, 1, 2, or Q + 1. This also holds for ε = 0. In either case, T is independent of m and `. If T is empty, then S(u, s, ε, m) has no decomposition of the form (3.3), but r + 1 such decompositions exist over the splitting field of the squarefree polynomial y r+1 − εuy + u ∈ F [y]. For a polynomial f ∈ Pn (F ) and an integer i, we denote the coefficient of P i x in f by fi , so that f = xn + 1≤i<n fi xi with fi ∈ F . The second degree of f is deg2 f = deg(f − xn ). (3.4) If p | n and p - deg2 f , then deg2 f = deg(f 0 ) + 1. Fact 3.5 (von zur Gathen, Giesbrecht & Ziegler (2010), Proposition 6.2). Let r be a power of p, and u, s, ε, m and u∗ , s∗ , ε∗ , m∗ satisfy the conditions of Fact 3.1. For f = S(u, s, ε, m) and f ∗ = S(u∗ , s∗ , ε∗ , m∗ ), the following hold. (i) For ε = 1, we have f = f ∗ if and only if (u, s, ε, m) = (u∗ , s∗ , ε∗ , m∗ ). (ii) For ε = 0, we have f = f ∗ if and only if (usr+1 , ε, m) = (u∗ (s∗ )r+1 , ε∗ , m∗ ). (iii) The stabilizer of f under original shifting is F if m = 1, and {0} otherwise. For F = Fq , the orbit of f under original shifting has size 1 if m = 1, and size q otherwise. (iv) The only polynomial of the form (3.2) in the orbit of f under original shifting is f itself. Proof. The appearance of O(xi ) for some integer i in an equation means the existence of some polynomial of degree at most i that makes the equation valid. Let ` = (r − 1)/m. Then gcd(r, `) = gcd(r, m) = 1 and `m ≡ −1 mod p. We have f = x(x`(r+1) − εusr x` + usr+1 )m = x(xr 2 −1 − mεusr xr r2 fr2 −`r fr2 −`r−` r r2 −`r = x − mεus x = −mεusr , = musr+1 6= 0, deg2 f = 2 −`r−1 + musr+1 xr r+1 r2 −`r−` + mus  r 2 − `r if ε = 1, r 2 − `r − ` if ε = 0. x 2 −`r−`−1 + O(x + O(xr r2 −2`r ), 2 −2`r−1 )) (3.6) (3.7) (3.8) (3.9) 7 From the last equation, we find ε = 1 if r | deg2 f , and ε = 0 otherwise. For either value of ε, deg2 f determines ` and m = (r − 1)/` uniquely. Similarly, deg2 f ∗ determines ε∗ , `∗ , and m∗ uniquely. Therefore, if deg2 f = deg2 f ∗ , then (ε, `, m) = (ε∗ , `∗ , m∗ ). (3.10) Furthermore, m and the coefficient fr2 −`r−` determine usr+1 = fr2 −`r−` /m uniquely by (3.8). Similarly, m∗ and fr∗2 −`∗ r−`∗ determine u∗ (s∗ )r+1 uniquely. Thus, if m = m∗ and fr2 −`r−` = fr∗2 −`∗ r−`∗ , then usr+1 = u∗ (s∗ )r+1 . (3.11) (i) If (u, s, ε, m) = (u∗ , s∗ , ε∗ , m∗ ), then f = f ∗ . On the other hand, we have fr2 −`r = −musr 6= 0 in (3.7) and with (3.8) this determines uniquely s = −fr2 −`r−` /fr2 −`r , u = −fr2 −`r /msr = `fr2 −`r /sr . (3.12) This implies the claim (i). (ii) The condition (usr+1 , ε, m) = (u∗ (s∗ )r+1 , ε∗ , m∗ ) is sufficient for f = f ∗ by direct computation from (3.2). It is also necessary by (3.10) and (3.11). (iii) For m = 1, f is r-additive as noted after the proof of Fact 3.1 and f [w] = f for all w ∈ F . For m > 1 and w ∈ F , we find 2 f [w] = xr − mεusr xr + wusr+1 xr 2 −`r + musr+1 xr 2 −`r−`−1 + O(xr 2 −`r−` 2 −`r−`−2 [w] fr2 −`r = fr2 −`r = −mεusr , [w] fr2 −`r−` [w] fr2 −`r−`−1 (3.13) ), (3.14) = fr2 −`r−` = musr+1 6= 0, (3.15) = wusr+1 . (3.16) We have f = f [0] by definition and f 6= f [w] for w 6= 0 by (3.16) and usr+1 = 6 0. (iv) For m = 1, the claim follows from (iii). For m > 1 and w ∈ F , assume f0 = S(u0 , s0 , ε0 , m0 ) = f [w] for parameters u0 , s0 , ε0 , m0 satisfying the conditions of Fact 3.1. Then deg2 f0 = deg2 f [w] by assumption and deg2 f [w] = deg2 f =  r 2 − `r if ε = 1, r 2 − `r − ` if ε = 0, (3.17) from (3.13) and (3.9). Thus, we have ` = `0 by (3.10). The coefficient of 2 xr −`r−`−1 is 0 in f0 and wusr+1 in f [w] by (3.6) and (3.16), respectively. With usr+1 6= 0, we have w = 0 and f0 = f [0] = f . 8 Algorithm 3.18 identifies the examples of Fact 3.1 and their shifts. The algorithm involves divisions which we execute conditionally “if defined”. Namely, for integers the quotient is returned, if it is an integer, and for field elements, if the denominator is nonzero. Otherwise, “failure” is returned. Besides the field operations +, −, · , we assume a routine for computing the number of roots in F of a polynomial. Furthermore, we denote by M(n) a number of field operations which is sufficient to compute the product of two polynomials of degree at most n. Algorithm 3.18: Identify simply original polynomials P Input: a polynomial f = i fi xi ∈ Pr2 (F ) with all fi ∈ F and r a power of char F Output: integer k, parameters u, s, ε, m as in Fact 3.1, and w ∈ F such that f = S(u, s, ε, m)[w] has a k-collision with k = #T as in (3.2), if such values exist, and “failure” otherwise 1 if deg2 f = −∞ then return “failure” if r | deg2 f then 2 ε←1 3 ` ← (r2 − deg2 f )/r and m ← (r − 1)/` if defined 4 s ← −fr2 −`r−` /fr2 −`r if defined 5 else 6 ε←0 7 ` ← (r2 − deg2 f )/(r + 1) and m ← (r − 1)/` if defined 8 s←1 9 end r+1 10 u ← −`fr2 −`r−` /s if defined 11 if us = 0 then return “failure” w ← mfr2 −`r−`−1 /fr2 −`r−` if defined [w] 12 if f = S(u, s, ε, m) then r+1 13 k ← #{y ∈ F : y − εuy + u = 0} 14 return k, u, s, ε, m, w 15 end 16 return “failure” Theorem 3.19. Algorithm 3.18 works correctly as specified. If F = Fq , it takes O(M(n) log(nq)) field operations on input a polynomial of degree n = r2 . Proof. For the first claim, we show that for u0 , s0 , ε0 , m0 as in Fact 3.1 and w0 ∈ F the algorithm does not fail on input f = S(u0 , s0 , ε0 , m0 )[w0 ] . We have deg2 f > 0 by (3.17). Thus, step 1 does not return “failure”. By the same equation, we have r | deg2 f if and only if ε0 = 1. Therefore, ε = ε0 after step 2 or 6, respectively, and since (3.17) determines `0 = (r − 1)/m0 9 uniquely, we find ` = `0 and m = (r − 1)/`0 = m0 after step 3 or 7, respectively. If ε = 1, then step 4 computes s = s0 from (3.12), (3.14), and (3.15). Furthermore, step 10 computes u = u0 from (3.8) and (3.15). If ε = 0, then m [w0 ] [w0 ] S(u0 , s0 , 0, m)[w0 ] = (x(x`(r+1) +u0 sr+1 = S(u0 sr+1 . (3.20) 0 ) ) 0 , 1, 0, m) Therefore, we can choose s = 1 in step 8 and set u = −`fr2 −`r−` = u0 sr+1 0 by (3.8) and (3.15) in step 10. For either value of ε, we have us 6= 0 from u0 s0 6= 0 and step 11 does not return “failure”. For m = 1, we have S(u, s, ε, 1)[w0 ] = S(u, s, ε, 1)[0] by Fact 3.5 (iii) and w = f0 /f1 = 0 in step 11 is a valid choice. For m > 1, we find w0 from (3.15) and (3.16) as w = mfr2 −`r−`−1 /fr2 −`r−` = w0 . A polynomial f of the assumed form passes the final test in step 12, while an f not of this form will fail here at the latest. The size k of the set T = {t ∈ F : tr+1 − εut + u = 0} is computed in step 13 and f is a k-collision according to Fact 3.1. In the following cost estimate for F = Fq , we ignore the (cheap) operations on integers. The calculation of the right-hand side in step 12 takes O(M(n) log n) field operations, and the test another n operations. In step 13, we compute k as degy (gcd(y q − y, y r+1 − εuy + u)) with O(M(r)(log q + log r)) field operations. The cost of all other steps is dominated by these bounds. (S) Let Cn,k (F ) denote the set of polynomials in Pn (F ) that are shifts of some (S) S(u, s, ε, m) with T as in (3.2) of cardinality k. Over a finite field, #Cr2 ,k (Fq ) can be computed exactly, as in von zur Gathen, Giesbrecht & Ziegler (2010, Corollary 6.3). Proposition 3.21. Let r be a power of p, q a power of r, and τ the number of positive divisors of r − 1. For k ≥ 2, we have − q + 1)(q − 1)2 (r − 2) 2(r − 1) (S) #Cr2 ,k (Fq ) =  (τ q − q + 1)(q − 1)(q − r)    r(r2 − 1)     0  (τ q         10 if k = 2, if k = r + 1, otherwise. (S) Proof. We count the polynomials in Cr2 ,k (Fq ) by counting the admissible parameters u, s, ε, m, w modulo the ambiguities described in Fact 3.5. r+1 For ε = 1, we count the possible u ∈ F× − uy + u ∈ Fq [y] q such that y × r+1 −r has exactly k roots in Fq . Let a, b ∈ Fq and u = a b . The invertible transformation x 7→ y = −ab−1 x gives a bijection r+1 r+1 {x ∈ F× + ax + b = 0} ↔ {y ∈ F× − uy + u = 0}. q : x q : y Theorem 5.1 and Proposition 5.4 of von zur Gathen, Giesbrecht & Ziegler (2) r+1 2 (2010) determine the number cq,r,k of pairs (a, b) ∈ (F× +ax+b q ) such that x has exactly k roots, as described below. Every value of u corresponds to exactly q − 1 pairs (a, b), namely an arbitrary a ∈ F× q and b uniquely determined by (2) r −1 r+1 b = u a . Hence, there are exactly cq,r,k /(q−1) values for u where #T = k. For m = 1, the orbit under original shifting has size 1 by Fact 3.5 (iii) and (2) taking into account the q − 1 possible choices for s we find that there are cq,r,k polynomials of the form S(u, s, 1, 1)[w] . For m > 1, the orbit under original shifting contains exactly one polynomial of the form (3.2) by Fact 3.5 (iv) and has size q by (iii). Taking into account the q − 1 choices for s and the (2) τ − 1 possible values for m, we find that there are cq,r,k · (τ − 1) · q polynomials of the form S(u, s, 1, m)[w] . For ε = 0, we have S(u, s, 0, m)[w] = S(usr+1 , 1, 0, m)[w] as in (3.20) and T = {t ∈ Fq : tr+1 + usr+1 = 0} as in (3.2). This set has exactly γ = gcd(r + 1, q − 1) elements, if −u is an (r + 1)st power, and is empty otherwise. Then #T = k ≥ 2 if and only if k = γ and −u is an (r +1)st power. There are exactly (q − 1)/γ distinct (r + 1)st powers in F× q and therefore r+1 exactly (q − 1)/γ distinct values for us such that #T = γ. With δ being Kronecker’s delta function, we find, as above, that there are δγ,k · (q − 1)/γ (S) polynomials of the form S(u, s, 0, 1)[w] in Cr2 ,k (Fq ) and δγ,k · (τ − 1)q(q − 1)/γ of the form S(u, s, 0, m)[w] with m > 1. This yields (S) #Cr2 ,k (Fq ) = (τ q − q + 1) · (2) cq,r,k ! q−1 + δγ,k . γ The work cited above provides the following explicit expressions for k ≥ 2, with q = rd : (2] cq,r,2 − 1)(qr − 2q − 2r + 3) 2(r − 1) = 2  (q − 1) (r − 2)    2(r − 1)    (q   11 if q and d are odd, otherwise, (2) cq,r,r+1 − 1)(q − r2 ) r(r2 − 1) =  (q − 1)(q − r)    r(r2 − 1)  (q     if d is even, if d is odd, (2) and cq,r,k = 0 for k ∈ / {2, r + 1}. Furthermore, we have from Lemma 3.29 in von zur Gathen (2009, Preprint) d    1   if d is odd and r is even,   r + 1 if d is even. γ = gcd(r + 1, r − 1) = 2 if d is odd and r is odd, The claimed formulas follow from  2   (q − 1) (r − 2) if k = 2,     2(r − 1)   q − 1 (2) = (q − 1)(q − r) cq,r,k + δγ,k  if k = r + 1, γ    r(r2 − 1)     0 otherwise. For a prime p ≥ 7, we have τ ≥ 4. Large values of τ occur when m ≈ exp(k log k) is the product of the first k primes and p ≤ mC the smallest prime congruent 1 mod m for Linnik’s constant C. Then k ≈ −1 log m/ loglog m & C −1 log p/ loglog p and τ ≥ 2k & 2C log p/ loglog p . By HeathBrown (1992) and Xylouris (2011) we can take C just under 5. Except for the constant factor, τ is asymptotically not more than this value (Hardy & Wright, 1985, Theorem 317). Luca & Shparlinski (2008) give general results on the (S) possible values of τ . It follows that #Cr2 ,2 (Fq ) ≈ τ q 3 /2 is in q 3 O(p1/ loglog p ). The odd/even distinctions for q, r, and d cancel out in the formula of Proposition 3.21. This might indicate that those distinctions are alien to the problem. The second and new construction of collisions goes as follows. Theorem 3.22. Let r be a power of p, b ∈ F × , a ∈ F \ {0, br }, a∗ = br − a, m an integer with 1 < m < r − 1 and p - m, m∗ = r − m, and ∗ f = M (a, b, m) = xmm (x − b)mm  ∗  xm + a∗ b−r ((x − b)m − xm ) ∗ ∗ ∗ m ∗ · xm + ab−r ((x − b)m − xm ) m∗ g = xm (x − a) , m , (3.23) ∗ h = xr + a∗ b−r (xm (x − b)m − xr ), ∗ g ∗ = xm (x − a∗ )m , ∗ h∗ = xr + ab−r (xm (x − b)m − xr ). 12 Then f = g ◦ h = g ∗ ◦ h∗ ∈ Pr2 (F ) has a 2-collision. The polynomials f in (3.23) are “multiply original” in the sense that they have a multiple root at 0. This motivates the designation M . The notation is set up so that ∗ acts as an involution on our data, leaving b, f , r, and x invariant. Mike Zieve (2011) points out that the rational functions of case (4) in Proposition 5.6 of Avanzi & Zannier (2003) can be transformed into (3.23). Zieve also mentions that this example already occurs in unpublished work of his, joint with Bob Beals. Proof. Let ∗ H = h/xm = xm + a∗ b−r ((x − b)m − xm ), ∗ ∗ ∗ H ∗ = h∗ /xm = xm + ab−r ((x − b)m − xm ). (3.24) ∗ Then h − a = (x − b)m H ∗ and h∗ − a∗ = (x − b)m H. It follows that ∗ ∗ ∗ g ◦ h = g ∗ ◦ h∗ = xmm (x − b)mm H m (H ∗ )m = f. (3.25) If g = g ∗ , then the coefficients of xr−1 in g and g ∗ yield mbr = 0, hence p | m, a contradiction. Thus f is a 2-collision. For r ≤ 4, there is no value of m satisfying the assumptions. The construction works for arbitrary a ∈ F and 1 ≤ m ≤ r − 1. But when a ∈ {0, br }, we get a Frobenius collision; see Example 2.4. When p | m, we e e e write m = pe m0 with p - m0 and have f = xp ◦ M (a, bp , m0 ) ◦ xp with r/pe instead of r in (3.23). When m is 1 or r − 1, an original shift of (3.23) yields a polynomial of the form S(u, s, ε, m). Indeed, for m = 1, let w = a∗ b−r+1 , c = (ab1−r )r − a∗ , and (−aa∗ b1−r , 1, 0, r − 1, −a∗ b1−r , ab1−r ) if c = 0, (u, s, ε, m, t, t ) = (c/sr , −aa∗ b1−r /c, 1, r − 1, −c/a, c/a∗ ) otherwise. ( ∗ Then M (a, b, 1)[w] = S(u, s, ε, m), (g, h)[w] is of the form (3.3), and so is (g ∗ , h∗ )[w] with t replaced by t∗ . Furthermore, for m = r − 1, we have M (a, b, r − 1) = M (a∗ , b, 1) and the claimed parameters can be found as described by interchanging a and a∗ . Next, we describe the (non)uniqueness of this construction. We take all polynomial gcds to be monic, except that gcd(0, 0) = 0. Proposition 3.26. Let r be a power of p, b ∈ F × , a ∈ F \ {0, br }, m an integer with 1 < m < r − 1 and p - m, and f = M (a, b, m) as in (3.23). Then the following hold. 13 (i) In the notation of Theorem 3.22 and with H and H ∗ as in (3.24), we have gcd(m, m∗ ) = 1 and the four polynomials x, x − b, H, and H ∗ are squarefree and pairwise coprime. (ii) The stabilizer of f under original shifting is {0}. For F = Fq , the orbit of f under original shifting has size q. (iii) For a0 , b0 , m0 satisfying the conditions of Theorem 3.22, we have M (a, b, m) = M (a0 , b0 , m0 ) if and only if (a0 , b0 , m0 ) ∈ {(a, b, m), (a∗ , b, m∗ )}. If we impose the additional condition m < r/2, then (a, b, m) is uniquely determined by M (a, b, m). (iv) There are exactly two polynomials of the form (3.23) in the orbit of f under original shifting, namely f and f [b] = M (−a∗ , −b, m). Proof. (i) If d > 1 was a common divisor of m and m∗ , then d | m + m∗ = r and thus d would be a power of p—in particular p | m, a contradiction. Thus gcd(m, m∗ ) = 1. From mH − xH 0 = m∗ a∗ b1−r (x − b)m−1 and H(0) · H(b) 6= 0, we find that H is squarefree and coprime to x(x − b), and similarly for H ∗ . Since H | h, H ∗ | (h − a), and gcd(h, h − a) = 1, we have gcd(H, H ∗ ) = 1. 2 (ii) For the coefficient of xr −r−2 in the composition f = g ◦ h, we find fr2 −r−2 = gr−1 (h2r−1 − hr−2 ), since r > 2. For the shifted composition f [w] = g [h(w)] ◦ h[w] , we have the coefficients [h(w)] gr−1 = gr−1 = −m∗ a 6= 0, [w] hr−1 = hr−1 = −ma∗ (−b)1−r 6= 0, [w] hr−2 = hr−2 − whr−1 , [w] fr2 −r−2 = gr−1 (h2r−1 − hr−2 + whr−1 ). [w] Thus, fr2 −r−2 = fr2 −r−2 if and only if w = 0. (iii) Sufficiency is a direct computation. Conversely, assume that f = M (a, b, m) = M (a0 , b0 , m0 ) = f0 . From (i) and the multiplicity mm∗ of 0 and b in f , we find mm∗ = m0 m∗0 and b0 = b; see (3.25). If necessary, we replace (a, b, m) by (a∗ , b, m∗ ), and obtain m0 = m. Dividing f and f0 by ∗ ∗ ∗ ∗ xmm (x − b)mm yields H m (H ∗ )m = H0m (H0∗ )m by (3.25). Hence by (i), we find H0 = H and thus a0 = a. (iv) We find f [b] = M (−a∗ , −b, m) by a direct computation. Conversely, we take a0 , b0 , m0 as in Theorem 3.22 and assume that f [w] = M (a0 , b0 , m0 ) = f0 . 14 By (iii), we may assume that m, m0 < r/2. We have ∗ −1 g 0 = m∗ axm−1 (x − a)m m∗ −1 h0 = ma∗ b1−r x f 0 = (g 0 ◦ h) · h0 , (x − b)m−1 , = mm∗ aa∗ b1−r (x(x − b))mm (3.27) ∗ −1 ∗ −1 H m−1 (H ∗ )m . Now (i) and p - mm∗ show that f 0 has roots of multiplicity mm∗ − 1 exactly at 0 and b and otherwise only roots of multiplicity at most m∗ − 1 < mm∗ − 1. Furthermore, (f [w] )0 = f 0 (x + w) has roots of multiplicity mm∗ − 1 exactly at −w and b − w. Similarly, f0 has roots of multiplicity m0 m∗0 − 1 at 0 and b0 , and all other roots have smaller multiplicity. It follows that mm∗ = m0 m∗0 and m = m0 . Furthermore, one of −w and b − w equals 0, so that w ∈ {0, b}. Hence (a0 , b0 , m0 , w) ∈ {(a, b, m, 0), (a∗ , b, m∗ , 0), (−a∗ , −b, m, b), (−a, −b, m∗ , b)}. We now provide the exact number of these collisions over Fq , matching Proposition 3.21. When r ≤ 4, there are no polynomials of the form (3.23). Corollary 3.28. For r ≥ 3 and F = Fq , the number of polynomials that are of the form (3.23) or shifts thereof is q(q − 1)(q − 2)(r − 4 r p − 2) . Proof. There are q − 1, q − 2, and r − r/p − 2 choices for the parameters b, a, and m, respectively. By Proposition 3.26 (iii), exactly two distinct triples of parameters generate the same polynomial (3.23). By (ii), the shift orbits are of size q and by (iv), they contain two such polynomials each. Over a field F of characteristic p > 0, Algorithm 3.29 finds the parameters for polynomials that are original shifts of (3.23), just as Algorithm 3.18 does for original shifts of (3.2). It involves conditional divisions and routines for extracting pth and square roots. Given a field element, the latter produce a root, if one exists, and “failure” otherwise. If F is finite, then every element has a pth root. The algorithm for a square root yields a subroutine to determine the set of roots of a quadratic polynomial. Theorem 3.30. Algorithm 3.29 works correctly as specified. If F = Fq , it takes O(M(n) log n + n log q) field operations on input a polynomial of degree n = r2 . 15 Algorithm 3.29: Identify multiply original polynomials Input: a polynomial f ∈ Pr2 (F ) with r a power of p = char F Output: parameters a, b, m, as in Theorem 3.22, and w ∈ F such that f = M (a, b, m)[w] , if such values exist, and “failure” otherwise 0 0 1 f0 ← f / lc(f ) if defined 1/2 2 if p = 2 then f0 ← f0 if defined f1 ← f0 / gcd(f0 , f00 ) if defined 3 if deg f1 < 4 or deg f1 > r + 2 then return “failure” determine the maximal k such that f1k | f0 via the generalized Taylor expansion of f0 in base f1 4 if p = 2 then k ← 2k m ← min{k + 1, r − k − 1} 2 5 if m < 2 then return “failure” if p = 2 or p - m + 1 then 6 f2 ← gcd(f1r−m , f0 )/ gcd(f1r−m−1 , f0 ) 7 else 8 f3 ← f0 / gcd(f1r−m−1 , f0 ) if defined 9 determine the maximal ` such that p` divides every exponent of x with nonzero coefficient in f3 10 11 12 13 14 15 16 17 18 19 20 21 1/p` f3 ← f3 if defined f2 ← f3 / gcd(f3 , f30 ) end if deg f2 6= 2 then return “failure” compute the set X of roots of f2 in F if #X < 2 then return “failure” write X as {x1 , x2 } and set b ← x2 − x1 and w ← −x1 compute the set A of roots of y 2 − br y − m−2 br−1 lc(f 0 ) ∈ F [y] in F for a ∈ A do if f = M (a, b, m)[w] then return a, b, m, w end end return “failure” 16 Proof. For the correctness, it is sufficient—due to the check in step 17—to show that for a0 , b0 , m0 as in Theorem 3.22 and w0 ∈ F , the algorithm does not return “failure” on input f = M (a0 , b0 , m0 )[w0 ] . As remarked after Theorem 3.22, we have r ≥ 5 and by Proposition 3.26 (iii), we may assume m0 < r/2. Furthermore, (3.27) determines lc(f 0 ) 6= 0 explicitly and step 1 is defined. The square root in step 2 is defined, since for p = 2, m0 and r − m0 are odd and all exponents in the monic version of (3.27) are even. By (3.27) and Proposition 3.26 (i), we have after steps 1 and 2 f0 =  ϕm0 (r−m0 )−1 H0m0 −1 H0∗ r−m0 −1 if p > 2, ϕ(m0 (r−m0 )−1)/2 H (m0 −1)/2 H ∗ (r−m0 −1)/2 0 0 if p = 2, (3.31) with ϕ = (x + w0 )(x − b0 + w0 ), H0 = H ◦ (x + w0 ), H0∗ = H ∗ ◦ (x + w0 ), and H and H ∗ as in (3.24) with a0 , a∗0 , b0 , m0 , m∗0 instead of a, a∗ , b, m, m∗ , respectively. By Proposition 3.26 (i), these three polynomials are squarefree and pairwise coprime. Let δ, ε, ε∗ be 0 if p divides the exponent of ϕ, H0 , H0∗ , respectively, in (3.31), and be 1 otherwise. Then gcd(f0 , f00 ) =  ∗ ϕm0 (r−m0 )−1−δ H0m0 −1−ε H0∗ r−m0 −1−ε if p > 2, ϕ(m0 (r−m0 )−1)/2−δ H (m0 −1)/2−ε H ∗ (r−m0 −1)/2−ε∗ 0 0 if p = 2. This gcd is nonzero, and step 2 computes ∗ f1 = f0 / gcd(f0 , f00 ) = ϕδ H0ε H0∗ ε . We have ( δ= 1 if p = 2 or p - m20 + 1, 0 otherwise. (3.32) For odd p, this follows from m0 (r − m0 ) − 1 ≡ −m20 − 1 mod p, and for p = 2 from 4 - m20 + 1. The sum of the exponents of H0 and H0∗ in (3.31) is r − 2 for odd p and r/2 − 1 for p = 2. In either case, it is coprime to p and at least one of ε and ε∗ equals 1. If p > 2 and ε = 0, then m0 ≡ 1 mod p, and thus m20 ≡ 1 mod p. Hence p - m20 + 1 and δ = 1. Similarly, ε∗ = 0 implies δ = 1, and we find that at least two of δ, ε, and ε∗ take the value 1. This also holds for p = 2. Since deg ϕ = 2, deg H0 , deg H0∗ ≥ 2, and deg H0 + deg H0∗ = r, this implies 4 ≤ deg f1 ≤ r + 2 and step 3 does not return “failure”. The exponents in (3.31) satisfy m0 − 1 < r − m0 − 1 < m0 (r − m0 ) − 1. If p > 2, then k as determined in step 3 equals m0 − 1 if ε = 1, and r − m0 − 1 otherwise. In characteristic 2, step 4 modifies k ∈ {(m0 − 1)/2, (r − m0 − 1)/2}, so that in 17 any characteristic, step 4 recovers m = m0 ≥ 2 and step 5 does not return “failure”. The condition in step 5 reflects the case distinction in (3.32). • If the condition holds, we have δ = 1 and ε(m−1) gcd(f1r−m , f0 ) = ϕr−m H0 H0∗ ε ε(m−1) gcd(f1r−m−1 , f0 ) = ϕr−m−1 H0 ∗ (r−m−1) H0∗ , ε∗ (r−m−1) , and therefore f2 = ϕ in step 6. • Otherwise, we have δ = 0, p > 2, ε = ε∗ = 1, f0 = ϕm(r−m)−1 H0m−1 H0∗ r−m−1 , gcd(f1r−m−1 , f0 ) = H0m−1 H0∗ r−m−1 , and f3 = ϕm(r−m)−1 in step 8. After step 10, we have f3 = ϕe for some e with p - e and f2 = ϕe /ϕe−1 = ϕ in step 11. In any case, we have f2 = (x+w0 )(x−b0 +w0 ) with distinct roots −w0 and b0 − w0 in F , and steps 13, 13, and 14 do not return “failure”. We determine a, b, and w in steps 14–17. In step 14, we have (b, w) ∈ {(b0 , w0 ), (−b0 , w0 − b0 )}, depending on the choice of the order of x1 and x2 . Since f = M (a0 , b0 , m)[w0 ] = M (br0 − a0 , −b0 , m)[w0 −b0 ] according to Proposition 3.26 (iv), we have f = M (ā, b, m)[w] for some ā ∈ {a0 , br0 − a0 }. The leading coefficient of f 0 is −m2 āb1−r (br − ā) by (3.27) yielding a quadratic polynomial in F [y] with roots ā and br − ā for step 15. There, we find A = {ā, br − ā} and step 17 identifies ā. For the cost over F = Fq , the conditions in steps 3 and 5 ensure that all powers of f1 in the gcd computations of steps 6 and 8 have degree at most (r + 2)(r − 2) < n and we have O(M(n) log n) field operations for the quotients, gcds, and products in steps 1, 2, 6, 8, 11, and 17. The f1 -adic P expansion of f0 is a sequence a0 , . . . , aν−1 ∈ Fq [x] such that f0 = 0≤i<ν ai f1i and deg ai < deg f1 for all i < ν. We may bound ν by the smallest power of 2 greater than deg f0 / deg f1 . Then ν < 2 deg f0 / deg f1 and for k in step 3 we have k + 1 = min{0 ≤ i < ν : ai 6= 0}. We can compute the expansion with O(M(ν deg f1 ) log ν) field operations; see von zur Gathen & Gerhard (2013, Theorem 9.15). Thus the cost of step 3 is O(M(n) log n) field operations. The calculation of the right-hand side in step 17 takes O(M(n) log n) field operations, by first substituting x + w for x in M (a, b, m) as in (3.23), then computing its coefficients and leaving away the constant term. We ignore the (cheap) operations on integers in the various tests, in step 9, and the 18 computation of derivatives in steps 1, 2, and 11. The polynomial square root in step 2 and the p` th root in step 10 take O(n log q) field operations each c ` ` using uq /p = u1/p for u ∈ Fq and the smallest c ≥ 1 with q c ≥ p` . Taking the square roots in steps 13 and 15 can be done deterministically by first reducing the computations to the prime field Fp , see von zur Gathen & Gerhard (2013, Exercise 14.40), and then finding square roots in Fp by exhaustive search. √ These take O(log q) and O( n) field operations, respectively, since n = r2 is a power of p. 4 Root multiplicities in collisions In this section we describe the structure of root multiplicities in collisions over an algebraic closure of F under certain conditions. In Section 5 these results will be used for the classification of 2-collisions at degree p2 . For the classification, its proof, and the lemmas in this section, we follow ideas of Dorey & Whaples (1974) and Zannier (1993); an earlier version can be found in Blankertz (2011). After some general facts about root multiplicities, we state an assumption on 2-collisions (Assumption 4.7) under which we determine the root multiplicities of their components (Proposition 5.4). In Example 4.12 we see that this assumption holds for the 2-collisions in Fact 3.1 and in Theorem 3.22. Then we recall the well-known relation between decompositions of polynomials and towers of rational function fields. We reformulate a result by Dorey & Whaples (1974) about the ramification in such fields in the language of root multiplicities of polynomials (Proposition 4.22) and derive further properties about the multiplicities in collisions for which Assumption 4.7 holds. We use the following notation. Let F be a field of characteristic p > 0 and K = F an algebraic closure of F . For a nonzero polynomial f ∈ F [x] and b ∈ K, let multb (f ) denote the root multiplicity of b in f , so that f = (x − b)multb (f ) u with u ∈ K[x] and u(b) 6= 0. For c ∈ K, we denote as f −1 (c) the set of all b ∈ K such that f (b) = c. Lemma 4.1. Let f = g ◦ h ∈ Pn (F ) and c ∈ K. Then [ f −1 (c) = ˙ h−1 (a) a∈g −1 (c) is a partition of f −1 (c), and for all b ∈ f −1 (c), we have multb (f − c) = multh(b) (g − c) · multb (h − h(b)). (4.2) The partition of f −1 (c) from Lemma 4.1 is illustrated in Figure 1, where we write g −1 (c) = {a0 , a1 , a2 , . . . } and h−1 (ai ) = {ai0 , ai1 , ai2 , . . . } for i ≥ 0. 19 −1 −1 h (g (c)) = f −1 (c) g (c) (a 2 1 1 h− h− .. . .. . b02 b01 −1 ) ) (a 1 ) (a 0 1 h− .. . .. b20 b00 b10 h a0 a1 . b20 a2 ... g c c∈K Figure 1: Partition of f −1 (c) Proof. Let b ∈ a∈g−1 (c) h−1 (a) and a ∈ g −1 (c) such that b ∈ h−1 (a). Hence f (b) = g(h(b)) = g(a) = c and thus b ∈ f −1 (c). On the other hand, let b ∈ f −1 (c) and set a = h(b). Then b ∈ h−1 (a) and a ∈ g −1 (c), since g(a) = S g(h(b)) = c. Hence b ∈ a∈g−1 (c) h−1 (a). Moreover if b ∈ h−1 (a) ∩ h−1 (a0 ) for some a, a0 ∈ K, then a = h(b) = a0 . For (4.2), let b ∈ f −1 (c), a = h(b), e = multa (g −c), and e0 = multb (h−a). Then g − c = (x − a)e G and h − a = (x − b)e0 H for some G, H ∈ K[x] with G(a) · H(b) 6= 0. Thus f − c = g(h) − c = (h − a)e G(h) = ((x − b)e0 H)e G(h) = (x − b)ee0 H e G(h) with (H e G(h))(b) = H(b)e G(a) 6= 0. S Lemma 4.3. Let f ∈ K[x] and b ∈ K. Then b is a root of f 0 if and only if there is some c ∈ K with multb (f − c) > 1. Moreover, for any c ∈ K with p - multb (f − c), we have multb (f 0 ) = multb (f − c) − 1. Proof. Let b be a root of f 0 and set c = f (b). Then b is a root of f − c. We write f − c = (x − b)u for some u ∈ K[x]. Then f 0 = (f − c)0 = u + (x − b)u0 , and thus u(b) = f 0 (b) = 0. Hence b is a multiple root of f − c. Now, let c ∈ K with e = multb (f − c). Then f − c = (x − b)e u for some u ∈ K[x] with u(b) 6= 0 and f 0 = (f − c)0 = (x − b)e−1 (eu + (x − b)u0 ). Thus, b is a root of f 0 if e > 1. This proves the converse. Moreover, if p - e then (eu + (x − b)u0 )(b) = eu(b) 6= 0 and hence multb (f 0 ) = e − 1. We use the following proposition. The second part was stated as Proposition 6.5 (i) in von zur Gathen, Giesbrecht & Ziegler (2010) for F = Fq . 20 Proposition 4.4. Let r be a power of p and f ∈ Pr2 (F ) have a 2-collision C such that deg g = deg h = r and g 0 h0 = 6 0 for all (g, h) ∈ C. Then f 0 6= 0 and the following hold. (i) There are integers d1 and d2 such that deg g 0 = d1 and deg h0 = d2 for all (g, h) ∈ C. (ii) Furthermore, if r = p, then d1 = d2 . Proof. (i) Let (g, h) ∈ C and f = g ◦ h. Then deg f 0 = deg g 0 · deg h + deg h0 . (4.5) Since g 0 h0 6= 0, this is an equation of nonnegative integers. Moreover, deg h0 < deg h = r and thus deg g 0 and deg h0 are uniquely determined by deg f 0 and r, which proves the claim. (ii) For r = p, let ` = deg2 g and m = deg2 h with the second degree deg2 as in (3.4). Since g 0 h0 6= 0, we find d1 = deg g 0 = ` − 1 and d2 = deg h0 = m − 1 for all (g, h) ∈ C and it is sufficient to show ` = m. We have g = xp + g` x` + O(x`−1 ), h = xp + hm xm + O(xm−1 ) with g` , hm ∈ F × . The highest terms in h` and g ◦ h are given by h` = (xp + hm xm + O(xm−1 ))` = x`p + `hm x(`−1)p+m + O(x(`−1)p+m−1 ), 2 g ◦ h = xp + hpm xmp + O(x(m−1)p ) + g` x`p + `g` hm x(`−1)p+m + O(x(`−1)p+m−1 ) + O(x(`−1)p ). (4.6) Algorithm 4.10 of von zur Gathen (2013) computes the components g and h from f , provided that hp−1 6= 0. We do not assume this, but can apply the same method. Once g` and hm are determined, the remaining coefficients first of h, then of g, are computed by solving linear equations of the form uhi = v, where u and v are known at that point, and u 6= 0. Quite generally, g is determined by f and h, see Lemma 2.3. For (g ∗ , h∗ ) ∈ C, we find that (g` , hm ) = (g`∗ , h∗m ) implies (g, h) = (g ∗ , h∗ ) by the uniqueness of the procedure just sketched. Inspection of the coefficient of x(`−1)p+m in (4.6) shows that g` = g`∗ if and only if hm = h∗m . Now take some (g ∗ , h∗ ) ∈ C and assume that ` 6= m. Then deg2 (g ◦ h) is one of the two distinct integers mp or `p. If m > `, then hpm (and hence hm ) is uniquely determined by f , and otherwise g` is. In either case, we conclude from the previous observation that (g, h) = (g ∗ , h∗ ). This shows ` = m if (g, h) 6= (g ∗ , h∗ ). 21 A common right component (over K) of two polynomials h, h∗ ∈ K[x] is a nonlinear polynomial v ∈ K[x] such that h = u ◦ v and h∗ = u∗ ◦ v for some u, u∗ ∈ K[x]. We now state an assumption which we use in Proposition 4.22, the lemmas thereafter, and in Proposition 5.4. Assumption 4.7. Let f ∈ Pn (F ) have a 2-collision {(g, h), (g ∗ , h∗ )}. We consider the following conditions. (A1 ) The derivative f 0 is nonzero. (A2 ) The degrees of all components are equal, that is, deg g = deg g ∗ = deg h = deg h∗ . (A3 ) The right components h and h∗ have no common right component over K. (A4 ) For all c ∈ K, neither g − c nor g ∗ − c have roots in K with multiplicity divisible by p. (A5 ) The degrees of g 0 and h∗ 0 are equal. Lemma 4.8. Let f ∈ Pn (F ) have a 2-collision {(g, h), (g ∗ , h∗ )}. (i) Assumption (A1 ) holds if and only if all derivatives g 0 , g ∗ 0 , h0 , and h∗ 0 are nonzero. (ii) If h or h∗ is indecomposable, then (A3 ) holds. In particular, it holds if deg h = deg h∗ is prime. (iii) If deg g = p and (A1 ) holds, then (A4 ) holds. (iv) If n = p2 and (A1 ) holds, then (A5 ) holds. (v) If (A1 ), (A2 ), and (A5 ) hold, then deg g 0 = deg g ∗ 0 = deg h0 = deg h∗ 0 . Proof. (i) The claim follows from the fact that f 0 = g 0 (h) · h0 . (ii) Assume that h is indecomposable. Then a common right component of h and h∗ would imply h = h∗ and thus (g, h) = (g ∗ , h∗ ), by Lemma 2.3, a contradiction. Hence (A3 ) holds. Moreover, polynomials of prime degree are indecomposable. (iii) If a root multiplicity of g − c was divisible by p for some c ∈ K, then g − c = (x − a)p for some a ∈ K. This would imply g 0 = 0, contradicting (A1 ). Similarly, for all c ∈ K the root multiplicities of g ∗ − c are not divisible by p. Thus (A4 ) holds. 22 (iv)–(v) We can apply Proposition 4.4, since deg g = deg g ∗ = deg h = deg h∗ by n = p2 or (A2 ), respectively, and g 0 h0 g ∗ 0 h∗ 0 6= 0 by (A1 ) and (i). Then (ii) of the cited proposition shows deg g 0 = deg g ∗ 0 = deg h0 = deg h∗ 0 , proving (iv) and (v). In Example 4.12 we show that Assumption 4.7 holds for the collisions in Fact 3.1 and in Theorem 3.22. We need the next two propositions to check (A3 ) for these collisions. Proposition 4.9. Let r be a power of p, let a, a∗ ∈ F and m be a positive divisor of r − 1, ` = (r − 1)/m, and h = x(x` − a)m , h∗ = x(x` − a∗ )m . If h and h∗ have a common right component, then h = h∗ . In particular, the right components in 2-collisions of the form as in Fact 3.1 have no common right component. Proof. By Henderson & Matthews (1999, Theorem 4.1) it suffices to prove the claim for additive polynomials, that is, for m = 1. Furthermore, we can assume without loss of generality that F is algebraically closed. Let v ∈ Ppν (F ) be a common right component of h and h∗ with h = u ◦ v and h∗ = u∗ ◦ v for some u, u∗ ∈ Ppk (F ), ν ≥ 1, and r = pk+ν . Then u, u∗ , and v are additive polynomials; see Cohen (1990b, Lemma 2.4). By Ore (1933, Theorem 3 in Chapter 1) and since F is algebraically closed, we may assume P i ν = 1 and v = xp − bx, for some b ∈ F . For u = 0≤i≤k ui xp , we have h = xr − ax = u ◦ (xp − bx) = uk xr + i i (ui−1 − ui bp )xp − u0 bx. X 1≤i≤k i j Thus uk = 1 and ui−1 = ui bp = i≤j≤k bp , for 1 ≤ i ≤ k. Moreover, a = Q j u0 b = 0≤j≤k bp is uniquely determined by b. Thus a = a∗ and h = h∗ . Q Proposition 4.10. Let r, b, a, a∗ , m, m∗ , g, and h be as in Theorem 3.22. Then g and h are indecomposable. Proof. Let g = u ◦ v with u ∈ Pk (F ), v ∈ P` (F ), k` = r, and ` > 1. Then p | `. By Lemma 4.1 we have [ ˙ v −1 (a0 ) = g −1 (0) = {0, a}. a0 ∈u−1 (0) 23 (4.11) Since v is original, we have {0} ⊆ v −1 (0) ⊆ {0, a}. If v −1 (0) = {0}, then v = x` and thus p | ` | m, by (4.2), in contradiction to p - m. Thus v −1 (0) = {0, a}. Since the union in (4.11) is disjoint, we find that u−1 (0) = {0} and 0 is the only root of u. Hence u = xk and k | gcd(m, m∗ ) = 1, by (4.2) and Proposition 3.26 (i). Therefore u is linear and thus g is indecomposable. ∗ By (3.24) and Proposition 3.26 (i), we find h = xm H and h − a = (x − b)m H ∗ with squarefree polynomials H and H ∗ . Thus h[b] = xm H̃ for squarefree H̃ = H ∗ ◦ (x + b). We find that h is decomposable if and only if h[b] is decomposable. By Proposition 3.26 (iii) either m > r/2 or m∗ > r/2. If m > r/2, then we rename h as h[b] , H as H̃ and m as m∗ . We have in either case m∗ > r/2. Now let h = u ◦ v with u ∈ Pk (F ), v ∈ P` (F ), k` = r, and ` > 1. Then p | `. The only multiple root in h is 0, since H is squarefree, by Proposition 3.26 (i). Its multiplicity is mult0 (h) = m∗ = mult0 (u) · mult0 (v). Thus mult0 (v) | m∗ and hence p - mult0 (v). Since the multiplicities of v sum up to `, which is divisible by p, there is another root b0 6= 0 of v. Then 1 = multb0 (h) = mult0 (u) · multb0 (v) and thus mult0 (u) = 1. Hence mult0 (v) = m∗ . We have ` > m∗ > r/2, thus ` = r and u is linear. Example 4.12. Assumption 4.7 holds for the #T -collisions in Fact 3.1 with #T ≥ 2 and the 2-collisions in Theorem 3.22. In both cases (A2 ) holds by definition. Assumption (A3 ) follows from Proposition 4.9 and from Proposition 4.10 and Lemma 4.8 (ii), respectively. The derivatives of the components in Fact 3.1 are g 0 = −usr t−1 (x` − usr t−1 )m−1 , h0 = −st(x` − st)m−1 . (4.13) Since u, s, t ∈ F × , we find deg g 0 = deg h0 = `(m − 1) ≥ 0, independent of t ∈ T , and thus (A5 ) holds. By (4.5), deg f 0 ≥ 0 and thus (A1 ) holds. If there is c ∈ K such that g − c has a multiple root b ∈ K, then b is also a root of g 0 by Lemma 4.3. Since g 0−1 (0) ⊆ g −1 (0) by (4.13), we have only simple roots in g − c for c 6= 0. The multiple roots of g have multiplicity m and (A4 ) follows from p - m | r − 1. For the collisions in Theorem 3.22, (A4 ) follows similarly from p - mm∗ . Finally, (A1 ) and (A5 ) are satisfied by (3.27) and a, a∗ , b ∈ F × . Lemma 4.14. Let f ∈ F [x] be monic and y be transcendental over K(x). Then f − y ∈ K(y)[x] is irreducible. Proof. Assume f − y = uv for some u, v ∈ K[x, y]. The degree in y of f − y is degy (f − y) = 1 = degy u + degy v. Thus we may assume degy u = 1 and 24 degy v = 0. Then av = −1, where a ∈ K[x] is the leading coefficient of u in y. Thus v ∈ K[x]× = K × and f − y is irreducible in K[x, y]. A factorization of f − y in K(y)[x] yields a factorization in K[x, y], by the Lemma of Gauß, see Lang (2002, Corollary 2.2 in Capter IV). Hence f − y is also irreducible in K(y)[x]. Let f ∈ Pn (F ) with f 0 6= 0 and y be transcendental over K(x). Then f − y ∈ K(y)[x] is irreducible and separable over K(y), by Lemma 4.14 and since the derivative of f − y with respect to x is (f − y)0 = f 0 6= 0. In particular, f − y ∈ F (y)[x] is irreducible and separable. Let α ∈ K(y) be a root of f − y. Then K(y)[α] = K(α) is a rational extension of K(y) of degree n. Let M be the set of intermediate fields between K(α) and K(y) and R = {h ∈ Pm (K) : m | n and there is g ∈ Pn/m (K) such that f = g ◦ h} be the set of right components of f . Fact 4.15 (Fried & MacRae (1969), Proposition 3.4). Let f ∈ Pn (K) with f 0 6= 0 and let α ∈ K(y) be a root of f − y ∈ K(y)[x]. Then the map R → M, h 7→ K(h(α)) (4.16) is bijective. The fact follows from Fried & MacRae (1969, Proposition 3.4). Indeed, for each u ∈ K[x] of degree m there is exactly one v ∈ Pm (K) such that u = ` ◦ v for some linear polynomial ` ∈ K[x]; see von zur Gathen (2013, Section 2). The sets R and M can be equipped with natural lattice structures for which (4.16) is an isomorphism. We now use the theory of places and ramification indices in function fields; see Stichtenoth (2009) for the background. A place in a function field L over K is the maximal ideal of some valuation ring of L over K. For an finite extension M of L a place p in M is said to lie over a place P in L if P ⊆ p. Then we write p | P and define the ramification index of p | P as the integer e(p | P ) such that vp (a) = e(p | P ) · vP (a) for all a ∈ L, where vp and vP are the corresponding valuations of p and P , respectively; see Stichtenoth (2009, Proposition 3.1.4 and Definition 3.1.5). Later, we translate this into the language of root multiplicities of polynomials. First, we need the following result, which is proven in Dorey & Whaples (1974, Lemma 1) for rational function fields under the assumption that the characteristic of K is zero. Our proof avoids this assumption. Theorem 4.17. Let L, M , M ∗ , N be function fields over K such that L ⊆ M, M ∗ ⊆ N are finite separable field extensions and M ⊗L M ∗ ∼ = MM∗ = N. 25 Let P be a place in L, and p, p∗ be places over P in M and M ∗ , respectively. Assume that at least one of the ramification indices m = e(p | P ) and m∗ = e(p∗ | P ) is not divisible by the characteristic of K. Then there are gcd(m, m∗ ) places q in N which lie over p and over p∗ . Moreover, for such a place we have e(q | P ) = lcm(m, m∗ ). Proof. Abhyankar’s Lemma says that for a place q in N over p and over p∗ , e(q | P ) = lcm(m, m∗ ), (4.18) see Stichtenoth (2009, Theorem 3.9.1). Now we proceed as in Dorey & Whaples (1974). For places p, p∗ , and q over P in M , M ∗ , and N , respectively, we b M cp , M d∗ p∗ , and N cq the completions of L, M , M ∗ , and N denote by Λ = L, ∗ c p is with respect to P , p, p , and q, respectively. The tensor product N ⊗M M the direct sum of the completions of N with respect to the places in N over p, and M ∗ ⊗L Λ is the direct sum of the completions of M ∗ with respect to the places in M ∗ over P ; see Neukirch (1999, Proposition 8.3 in Chapter II). Since M ⊗L M ∗ ∼ = N , we have M cq ∼ cp ∼ cp ∼ cp N = N ⊗M M = M ∗ ⊗L M ⊗M M = M ∗ ⊗L M q|p cp ) ∼ cp ∼ = M ∗ ⊗L (Λ ⊗Λ M = (M ∗ ⊗L Λ) ⊗Λ M M d∗ p∗0 ⊗ M cp , ∼ M = Λ p∗0 |P where the last direct sum is taken over all places p∗0 in M ∗ over P . We show d∗ p∗ ⊗ M c p is the direct sum of the completions of N with respect to that M Λ the places that lie over p and p∗ . For this purpose, consider the (external) d∗ p∗ and M c p in an algebraic closure Ω of N cq ; those are composite fields of M the field extensions Γ ⊆ Ω of Λ such that there are two field homomorphisms d∗ p∗ and M c p , respectively, into Γ and whose images generate which map M ∗ d∗ p ⊗ M c p is the direct sum of the composite fields of M d∗ p∗ and Γ . Then M Λ c p ; see Jacobson (1964, Theorem 21 in Chapter I). Each such composite M L cq field Γ is isomorphic to a summand in q|p N , by the Krull-Remak-Schmidt Theorem; see Lang (2002, Theorem 7.5). Thus there exists q | p such that cq . Since Γ is an extension of M d∗ p∗ , we find q | p∗ as claimed. On the Γ =N cq is a composite field of M d∗ p∗ other hand, for a place q in N over p and p∗ , N c p and thus is a summand in M d∗ p∗ ⊗ M cp . and M Λ p∗ p d c ∗ The summands of M ⊗Λ M are of degree lcm(m, m∗ ), by (4.18), and d∗ p∗ ⊗ M c p is mm∗ . Thus there are mm∗ / lcm(m, m∗ ) = the Λ-dimension of M Λ ∗ gcd(m, m ) places over p and p∗ . 26 In the following we link the notion of places and ramification indices to the notion of roots and root multiplicities. Let K(t) be a rational function field. Then the local ring O∞ = {g/h ∈ K(t) : g, h ∈ K[t], deg g ≤ deg h} is the 1/t-adic valuation ring of K(t) and P∞ = (1/t)O∞ is its maximal ideal. For c ∈ K, the local ring Ot−c = {g/h ∈ K(t) : g, h ∈ K[t], h(c) 6= 0} is the (t − c)-adic valuation ring of K(t) and Pc = (t − c)Ot−c is its maximal ideal. We denote the (t − c)-adic valuation by vPc . Then we have for f ∈ K[x] vPc (f (t)) = multc (f ). (4.19) Since the irreducible polynomials in K[t] are linear, the places P∞ and Pc for all c ∈ K are pairwise distinct and comprise all places in K(t); see Stichtenoth (2009, Theorem 1.2.2). We call the places Pc finite places. The map K → {P : P is a finite place in K(t)}, c 7→ Pc (4.20) is bijective. 6 0, let α ∈ K(y) be a root of Lemma 4.21. Let f ∈ Pn (K) with f 0 = f − y ∈ K(y)[x], let b, c ∈ K, and let Pc and qb be the corresponding finite places in K(y) and K(α), respectively. Then qb | Pc if and only if f (b) = c. Furthermore e(qb | Pc ) = multb (f − c). Proof. Let qb | Pc . Then y − c ∈ qb and thus f (α) − c = y − c = (α − b)g/h for g, h ∈ K[α] with h(b) 6= 0. Hence, f (b) − c = (b − b)g(b)/h(b) = 0. Conversely, let f (b) = c. Then α−b | f (α)−c in K[α] . Let (y−c)g/h ∈ Pc for some g, h ∈ K[y] with h(c) 6= 0. Then h(f (b)) = h(c) 6= 0 and thus (y − c)g/h = (f (α) − c)g(f (α))/h(f (α)) ∈ qb . By (4.19) and since vPc (y − c) = 1, we have e(qb | Pc ) = vqb (y − c) = vqb (f (α) − c) = multb (f − c). Proposition 4.22. Let c ∈ K and f ∈ Pn (F ) have a 2-collision {(g, h), (g ∗ , h∗ )} satisfying (A1 )–(A4 ) in Assumption 4.7. For a ∈ g −1 (c) and a∗ ∈ g ∗ −1 (c), there are exactly gcd (multa (g − c), multa∗ (g ∗ − c)) roots b ∈ f −1 (c) such that h(b) = a and h∗ (b) = a∗ . Furthermore, for each such root b we have multb (f − c) = lcm (multa (g − c), multa∗ (g ∗ − c)) . (4.23) Proof. By (A1 ) we have f 0 = 6 0 and thus f − y ∈ F (y)[x] is irreducible and separable; see Lemma 4.14 and the paragraph thereafter. Let α ∈ K(y) be 27 a root of f − y, M = K(h(α)) and M ∗ = K(h∗ (α)), as in (4.16). Then α is a root of h − h(α) and by Lemma 4.14, h − h(α) is irreducible in M [x]. Thus the minimal polynomial of α over M is h − h(α), and similarly the minimal polynomial of h(α) over K(y) is g − y. Hence [K(α) : M ] = deg h and [M : K(y)] = deg g. Figure 2 illustrates the relation between these field extensions and their respective minimal polynomials. K(α) h∗ − h∗ (α) h − h(α) M ∗ = K(h∗ (α)) M = K(h(α)) g∗ − y g−y K(y) Figure 2: Lattice of subfields By Fact 4.15 and since M M ∗ ⊆ K(α), there is a monic original v ∈ K[x] such that M M ∗ = K(v(α)). Since M ⊆ M M ∗ , there is u ∈ K[x] such that h = u ◦ v, by applying Fact 4.15 to K(α) | M . Similarly, there is u∗ ∈ K[x] such that h∗ = u∗ ◦ v. Hence v = x, by (A3 ), and M M ∗ = K(α). Moreover, M M ∗ is contained in M ⊗K(y) M ∗ as a direct summand; see Jacobson (1964, Theorem 21 in Chapter I). Their K(y)-dimensions both equal deg f = deg g · deg h = (deg g)2 , by (A2 ). Thus M ⊗K(y) M ∗ ∼ = M M ∗ = K(α). Let Pc be as in (4.20). Since, by Lemma 4.21, the root multiplicities of g − c are the ramification indices of the places over Pc in M , (A4 ) rules out finite wildly ramified places in M | K(y). Thus we can apply Theorem 4.17, as follows. Let m = multa (g − c) and m∗ = multa∗ (g ∗ − c), see Figure 3. By Lemma 4.21, there are finite places pa and p∗a∗ over Pc in M and M ∗ , respectively, with m = e(pa | Pc ) and m∗ = e(p∗a∗ | Pc ). Then, by Theorem 4.17, there are gcd(m, m∗ ) places q over pa and p∗a∗ in K(α). By the bijection (4.20), for each such place q there is b ∈ K such that q = qb , and by applying Lemma 4.21 to K(α) | M and to K(α) | M ∗ , we find b ∈ h−1 (a) ∩ h∗ −1 (a∗ ) ⊆ f −1 (c). On the other hand, for b ∈ h−1 (a) ∩ h∗ −1 (a∗ ), 28 f −1 (c) h−1 (a) h∗ −1 (a∗ ) b g ∗ −1 (c) g −1 (c) h h∗ a a∗ m = multa (g − c) m∗ = multa∗ (g ∗ − c) g∗ g c Figure 3: Roots and multiplicities the place qb lies over pa and p∗a∗ . Thus #h−1 (a) ∩ h∗ −1 (a∗ ) = gcd(m, m∗ ) and multb (f − c) = e(qb | Pc ) = lcm(m, m∗ ), by Theorem 4.17. Combining (4.23) and (4.2), for b ∈ K, a = h(b), a∗ = h∗ (b), and c = f (b), we find multa (g−c) · multb (h−a) = multb (f −c) = lcm (multa (g − c), multa∗ (g ∗ − c)) and thus multb (h − a) = lcm (multa (g − c), multa∗ (g ∗ − c)) / multa (g − c). (4.24) Hence, the root multiplicities of h − a are determined by those of g − c and g ∗ − c. From Proposition 4.22 we derive further results about the root multiplicities of f , g, and g ∗ . Lemma 4.25. Let c ∈ K, r be a power of p, f ∈ Pr2 (F ) have a 2-collision {(g, h), (g ∗ , h∗ )} satisfying Assumption 4.7, and let a ∈ g −1 (c) and e = multa (g − c). Then the following hold. (i) We have gcd{multa∗ (g ∗ − c) : a∗ ∈ g ∗ −1 (c)} = 1. 29 (4.26) In particular, if e divides multa∗ (g ∗ − c) for all roots a∗ ∈ g ∗ −1 (c), then e = 1. (ii) The multiplicity e either equals 1 or divides multa∗ (g ∗ − c) for all roots a∗ ∈ g ∗ −1 (c) but exactly one. Proof. (i) Let d be the gcd of all root multiplicities of g ∗ − c. Then d divides P ∗ ∗ a∗ ∈g ∗−1 (c) multa∗ (g − c) = deg(g − c) = r. Thus d is a power of p and hence all multiplicities of g ∗ − c are divisible by p if d > 1, which contradicts (A4 ), and (i) follows. Before we start with the proof of (ii), we introduce some notation and results for arbitrary c ∈ K, a ∈ g −1 (c), and a∗ ∈ g ∗ −1 (c). We define i(c, g) = X multa (g 0 ), a∈g −1 (c) i(c, h∗ ) = X multb (h∗ 0 ), b∈f −1 (c) j(a, a∗ ) = X (4.27) multb (h∗ 0 ), b∈h−1 (a)∩h∗ −1 (a∗ ) and have X i(c, g) = deg g 0 , c∈K X i(c, h∗ ) = deg h∗ 0 , (4.28) c∈K X ∗ ∗ j(a, a ) = i(c, h ), a∈g −1 (c) a∗ ∈g ∗−1 (c) S S since ˙ c∈K g −1 (c) = K, ˙ c∈K f −1 (c) = K, and [ f −1 (c) = ˙ h−1 (a) ∩ h∗ −1 (a∗ ) a∈g −1 (c) a∗ ∈g ∗−1 (c) by Lemma 4.1. By (A4 ), p - multa (g − c) and thus multa (g 0 ) = multa (g − c) − 1, by Lemma 4.3. Hence for c ∈ K we have i(c, g) = (multa (g − c) − 1) = deg g − #g −1 (c). X (4.29) a∈g −1 (c) Let e = multa (g − c) and e∗ = multa∗ (g ∗ − c). By Proposition 4.22, the set h−1 (a) ∩ h∗ −1 (a∗ ) has size gcd(e, e∗ ) and for a root b ∈ h−1 (a) ∩ h∗ −1 (a∗ ), 30 we have multb (h∗ − a∗ ) = multb (f − c)/e∗ = lcm(e, e∗ )/e∗ , by (4.24). Thus multb (h∗ 0 ) = lcm(e, e∗ )/e∗ − 1 by (A4 ) and Lemma 4.3 and we have j(a, a∗ ) = gcd(e, e∗ ) · (lcm(e, e∗ )/e∗ − 1) = e − gcd(e, e∗ ). (4.30) We now show X j(a, a∗ ) ≥ e − 1. (4.31) a∗ ∈g ∗−1 (c) Let a∗0 , . . . , a∗` be the roots of g ∗ − c in K and e∗i = multa∗i (g ∗ − c) be their multiplicities. If e divides all e∗i , then e = 1 by (i) and (4.31) follows trivially. If e divides all e∗i except exactly one, say e - e∗0 and e | e∗i for 1 ≤ i ≤ `, then the gcd of e and e∗0 divides all e∗i and hence divides gcd{e∗i : 0 ≤ i ≤ `} = 1; see (4.26). Thus gcd(e, e∗0 ) = 1, j(a, a∗0 ) = e − 1 by (4.30), and (4.31) follows. Now assume that e does not divide at least two e∗i , say e - e∗0 and e - e∗1 . Then gcd(e, e∗i ) 6= e, gcd(e, e∗i ) ≤ e/2, and j(a, a∗i ) ≥ e/2 by (4.30) for i = 0, 1. Hence, (4.31) holds with strict inequality. Summing both sides of (4.31) over all roots of g − c yields i(c, h∗ ) = X j(a, a∗ ) > a∈g −1 (c) a∗ ∈g ∗−1 (c) X (multa (g − c) − 1) = i(c, g) a∈g −1 (c) by (4.27) and (4.29). With (4.28), this leads to deg h∗ 0 > deg g 0 , a contradiction to (A5 ). Lemma 4.32. Let c ∈ K, r be a power of p, and let f ∈ Pr2 (F ) have a 2-collision {(g, h), (g ∗ , h∗ )} satisfying Assumption 4.7. Then the following statements are equivalent. (i) g − c is squareful. (ii) g ∗ − c is squareful. (iii) f − c is squareful. Furthermore, if g − c is squareful, then g − c has at most one simple root. Proof. Assume that g − c is squareful. Then there is a root of g − c with multiplicity greater than 1. This multiplicity divides all multiplicities of g ∗ − c but exactly one, by Lemma 4.25 (ii). Hence all multiplicities of g ∗ − c but at most one are greater than 1. Thus g ∗ − c is squareful and has at most one 31 simple root. We interchange the rôles of g and g ∗ in Lemma 4.25 and obtain the equivalence of (i) and (ii) and the last claim. Now let a ∈ K be a multiple root of g − c, and b ∈ h−1 (a). Then multb (f − c) = multa (g − c) · multb (h − h(b)) > 1, by Lemma 4.1, and thus f − c is squareful. It is left to prove that if f −c is squareful, then g−c or g ∗ −c is squareful. Let b ∈ K be a multiple root of f − c. Then 1 < multb (f − c) = lcm(multh(b) (g − c), multh∗ (b) (g ∗ − c)), by Proposition 4.22. Thus multh(b) (g − c) > 1 or multh∗ (b) (g ∗ − c) > 1. Lemma 4.33. Let r be a power of p, and let f ∈ Pr2 (F ) have a 2-collision {(g, h), (g ∗ , h∗ )} satisfying Assumption 4.7. Then the following hold. (i) There is at most one c ∈ K such that f − c is squareful. (ii) For all c ∈ K, #g −1 (c) = #g ∗ −1 (c). Proof. (i) Assume g − c is squareful, for some c ∈ K. Then g − c has at most P one simple root, by Lemma 4.32. Thus r = deg g = a∈g−1 (c) multa (g − c) ≥ 1+2(#g −1 (c)−1). Hence #g −1 (c) ≤ (r+1)/2 and thus i(c, g) = r−#g −1 (c) ≥ (r − 1)/2, by (4.29). Now, if there is another value c0 ∈ K \ {c} such that P g − c0 is also squareful, then r − 2 ≥ deg g 0 = c∈K i(c, g) ≥ r − 1, by (4.28). By this contradiction, there is at most one c in K such that g − c is squareful. Hence there is at most one c in K such that f − c is squareful, by Lemma 4.32. (ii) If g − c is squarefree, then so is g ∗ − c, by Lemma 4.32, and both have exactly deg g = deg g ∗ = r roots. If g − c is squareful, then by (i), c is unique with this property and thus the roots of g 0 are the multiple roots of g − c by Lemma 4.3. Hence deg g 0 = multa∈g−1 (c) multa (g 0 ) = i(c, g) = deg g − #g −1 (c) (4.34) by (4.29). Interchanging the rôles of g and g ∗ shows deg g ∗ 0 = deg g ∗ −#g ∗ −1 (c) and Lemma 4.8 (v) yields deg g 0 = deg g ∗ 0 , thus #g −1 (c) = #g ∗ −1 (c). The previous lemmas deal with the root multiplicities over K. The next lemma shows that certain parameters are in F , when F is assumed to be perfect. Lemma 4.35. Let F be perfect, c ∈ K, r be a power of p, and f ∈ Pr2 (F ) have a 2-collision {(g, h), (g ∗ , h∗ )} satisfying Assumption 4.7. Then the following hold. (i) If f − c is squareful, then c ∈ F . 32 (ii) If g − c = g1m1 g2m2 for some monic squarefree coprime polynomials g1 , g2 ∈ K[x] and integers m1 6= m2 , then c ∈ F and g1 , g2 ∈ F [x]. 1 m2 (iii) If a ∈ F and h − a = hm for some monic squarefree coprime 1 h2 polynomials h1 , h2 ∈ K[x] and positive integers m1 6= m2 , then h1 , h2 ∈ F [x]. Proof. Since F is perfect, K is Galois over F . An element c ∈ K is fixed by all automorphisms in the Galois group Gal(K | F ) if and only if c ∈ F . (i) Let f − c be squareful and σ ∈ Gal(K | F ). Then σ(f − c) = f − σ(c) is squareful as well. Indeed, if f − c = (x − a)2 u for some a ∈ K and u ∈ K[x], then σ(f − c) = (x − σa)2 σ(u). But by Lemma 4.33 (i), c is unique and thus c = σ(c). This holds for all σ ∈ Gal(K | F ) and hence c ∈ F . (ii) Since m1 6= m2 , g − c is squareful and thus f − c is squareful, by Lemma 4.32. By (i), we find c ∈ F . Let σ ∈ Gal(K | F ). Then g1m1 g2m2 = g − c = σ(g − c) = σ(g1 )m1 σ(g2 )m2 . Since m1 6= m2 , unique factorization implies that gi = σ(gi ) and thus gi ∈ F [x] for i = 1, 2. The proof of (iii) is analogous to that of (ii). 5 Classification We use the results of the previous section to describe in Proposition 5.4 the factorization of the components of 2-collisions at degree r2 satisfying Assumption 4.7 over a perfect field F . All non-Frobenius collisions at degree p2 satisfy this assumption and in Theorem 5.9 we provide a complete classification of 2-collisions at that degree over a perfect field. That is, the 2-collisions at degree p2 are up to original shifting those of Example 2.4, Fact 3.1, and Theorem 3.22. This yields the maximality of these collisions (Corollary 5.11) and an efficient algorithm to determine whether a given polynomial f ∈ Pp2 (F ) has a 2-collision (Algorithm 5.14). In the next section we use this classification to count exactly the decomposable polynomials over a finite F . Let F be a perfect field and denote by K = F an algebraic closure of F . Definition 5.1. Let r be a power of p and f ∈ Pr2 (F ) have a 2-collision {(g, h), (g ∗ , h∗ )} satisfying Assumption 4.7. We call f multiply original if there is some c ∈ K such that f − c has no simple roots in K. Otherwise, we call f simply original. By Lemma 4.33 (i), there is at most one c ∈ K such that f − c is squareful. Since F is perfect, such a c lies in F if it exists, by Lemma 4.35 (i). Furthermore, if f is multiply original, then there is some c ∈ F such that f − c is squareful. If f is simply original, then either f − c is squarefree for 33 all c ∈ K or there is a unique c ∈ F such that f − c is squareful and has a simple root. Example 5.2. Assumption 4.7 holds for the 2-collisions M (a, b, m) of Theorem 3.22 and the #T -collisions S(u, s, ε, m) of Fact 3.1 with #T ≥ 2; see Example 4.12. Moreover, a polynomial M (a, b, m) has no simple roots and is therefore multiply original. When #T ≥ 2, then f = S(u, s, ε, m) is squareful with a simple root if m > 1, and f − c is squarefree for all c ∈ K if m = 1. Proposition 5.4 and Theorem 5.9 answer the converse question, namely whether every simply original or multiply original polynomial can be obtained as S(u, s, ε, m)[w] or M (a, b, m)[w] , respectively. We need the following graphtheoretic lemma. Lemma 5.3. Let G = (V, E) be a directed bipartite graph with bipartition V = A ∪ A∗ , where the outdegree of each vertex equals ` > 1 and #A = #A∗ = ` + 1. Then some vertex in A is connected to all other vertices in A by a path of length 2. Proof. Let A = {0, . . . , `}, A∗ = {`+1, . . . , 2`+1}, and M the (2`+2)×(2`+2) adjacency matrix of G having for each edge from i ∈ A ∪ A∗ to j ∈ A ∪ A∗ the entry 1 at position (i, j) and entries 0 everywhere else. Since G is bipartite, we have ! 0 N M= , N∗ 0 where N and N ∗ are (`+1)×(`+1)-matrices satisfying the following properties by the assumptions of the lemma. (i) Each row in N has exactly one entry 0 and all other entries 1. (ii) Exactly ` + 1 entries of N ∗ are 0 and all other entries are 1. The number of paths of length 2 that connect a vertex i ∈ A to a vertex j ∈ A is given by the entry (i, j) of ! N · N∗ 0 M = . ∗ 0 N ·N 2 If every column of N ∗ contains at least two 1’s, then N · N ∗ has only positive entries, because of (i), and every vertex in A is connected to all other vertices in A by a path of length 2. Otherwise, N ∗ has a column j that contains at most one 1. Because of (ii), every different column of N ∗ contains at most one 0. Because of ` > 1 and (i), all entries at (j, j 0 ) with j 0 6= j in N · N ∗ are positive. Starting from j we can reach all other vertices by a path of length 2. 34 Thanks go to Rolf Klein and an anonymous referee for this proof, much simpler than our original one. Proposition 5.4. Let r be a power of the characteristic p > 0 of the perfect field F and let f ∈ Pr2 (F ) have a 2-collision {(g, h), (g ∗ , h∗ )} satisfying Assumption 4.7. Then exactly one of the following holds. (s) The polynomial f is simply original. Let m = (r − 1)/(r − 1 − deg g 0 ). Then there are w ∈ F and unique monic squarefree polynomials fˆ, ĝ, ĥ, ĝ ∗ , and ĥ∗ in F [x], none of them divisible by x, with fˆ of degree (r2 − 1)/m and the other four polynomials of degree r − 1 − deg g 0 = (r − 1)/m such that f [w] = xfˆm , g [h(w)] = xĝ m , h[w] = xĥm , [h∗ (w)] (g ∗ ) (5.5) = x(ĝ ∗ )m , (h∗ )[w] = x(ĥ∗ )m . If deg f 0 > 0, then w is unique. Otherwise, factorizations (5.5) with the claimed properties exist for all w ∈ F . (m) The polynomial f is multiply original and there are a, b, and m as in Theorem 3.22 and w ∈ F such that f [w] = M (a, b, m) and the collision {(g, h)[w] , (g ∗ , h∗ )[w] } is as in Theorem 3.22. Proof. Every polynomial satisfying the assumption of the proposition is either simply original or multiply original by Definition 5.1. So, at most one of the two statements holds and it remains to exhibit the claimed parameters in each case. We begin with two general observations. (i) If deg f 0 = 0, then f − c is squarefree for all c ∈ K, by Lemma 4.3. Thus f is simply original. Moreover, f [w] has derivative (f [w] )0 = f 0 ◦(x+w) = f 0 ∈ F × for all w ∈ F and is therefore squarefree. (ii) If deg f 0 > 0, then there is some c ∈ K such that f − c has a multiple root by Lemma 4.3. Moreover, c is unique by Lemma 4.33 (i), and in F by Lemma 4.35 (i). Let #g −1 (c) = ` + 1 be the number of distinct roots of g − c in K. By Lemma 4.33 (ii), g ∗ − c also has ` + 1 roots in K and ` = r − 1 − deg g 0 ≥ 1, 35 (5.6) by (4.34). Let a0 , . . . , a` and a∗0 , . . . , a∗` be the distinct roots of g − c and g ∗ − c, respectively, and let ei = multai (g − c) and e∗i = multa∗i (g ∗ − c) be their multiplicities, that is, g−c= Y (x − ai )ei , g∗ − c = 0≤i≤` Y ∗ (x − a∗i )ei . (5.7) 0≤i≤` By Proposition 4.22, for each i and j the set Bi,j = h−1 (ai ) ∩ h∗ −1 (a∗j ) ⊆ K has cardinality gcd(ei , e∗j ). We now deal with the two cases of the theorem separately. Case (s): Let f be simply original. First, if deg f 0 = 0, then deg g 0 = 0, by (4.5). Hence m = (r − 1)/(r − 1 − deg g 0 ) = 1 and f [w] = g [h(w)] ◦ h[w] = ∗ (g ∗ )[h (w)] ◦ (h∗ )[w] is squarefree for all w ∈ F , by (i). Thus the monic ∗ polynomials fˆ = f [w] /x, ĝ = g [h(w)] /x, ĥ = h[w] /x, ĝ ∗ = (g ∗ )[h (w)] /x, and ĥ∗ = (h∗ )[w] /x are also squarefree and not divisible by x, and (5.5) holds for all w ∈ F . Second, we assume deg f 0 > 0 for the rest of case (s). By (ii), there is a unique c ∈ F such that f − c has multiple roots and we assume the notation of (5.7) for g − c and g ∗ − c. By the definition of simple originality, f − c has a simple root, say b0 ∈ f −1 (c). Furthermore, g − c and g ∗ − c also have simple roots, since 1 = multb0 (f − c) = lcm(multh(b0 ) (g − c), multh∗ (b0 ) (g ∗ − c)) by Proposition 4.22. But g − c and g ∗ − c have at most one simple root by Lemma 4.32. We may number the roots so that these unique simple roots are a0 = h(b0 ) and a∗0 = h∗ (b0 ), both with multiplicity e0 = e∗0 = 1, and ei , e∗i > 1 for all i ≥ 1. By Lemma 4.25 (ii) and using e∗0 = 1, each ei with i ≥ 1 divides all e∗j with j ≥ 1. Similarly, each e∗j with j ≥ 1 divides all ei with i ≥ 1. Thus all these multiplicities are equal to some integer m ≥ 2, and with r = deg g = 1 + `m from (5.7), we have m = (r −1)/` = (r −1)/(r −1−deg g 0 ) by (5.6). Therefore g − c = (x − a0 )g̃ m , g ∗ − c = (x − a∗0 )(g̃ ∗ )m with monic squarefree polynomials g̃ = 1≤i≤` (x − ai ) and g̃ ∗ = 1≤i≤` (x − a∗i ) ∈ K[x]. We find a0 , a∗0 ∈ F and g̃, g̃ ∗ ∈ F [x] by Lemma 4.35 (ii). Next, we show that h − a0 and h∗ − a∗0 have the same root multiplicities as g ∗ − c and g − c, respectively. For 0 ≤ i ≤ `, we find from (4.24) with the unique bi ∈ B0,i and the unique b∗i ∈ Bi,0 as implicitly defined in (ii) that Q Q multbi (h − a0 ) = lcm(multa0 (g − c), multa∗i (g ∗ − c)) = multa∗i (g ∗ − c), 36 multb∗i (h∗ − a∗0 ) = multai (g − c). Since #B0,0 = 1 by Proposition 4.22, we have b0 = b∗0 and arrive at h − a0 = (x − b0 )h̃m , h∗ − a∗0 = (x − b0 )(h̃∗ )m with monic squarefree polynomials h̃ = 1≤i≤` (x − bi ) and h̃∗ = 1≤i≤` (x − b∗i ) ∈ K[x]. Again, we find b0 ∈ F and h̃, h̃∗ ∈ F [x], by Lemma 4.35 (iii). Finally, we let w = b0 , ĝ = g̃ ◦ (x + a0 ), ĥ = h̃ ◦ (x + b0 ), ĝ ∗ = g̃ ∗ ◦ (x + a∗0 ), ĥ∗ = h̃∗ ◦ (x + b0 ), and fˆ = ĥ · ĝ(xĥm ). Then h(b0 ) = a0 , f (b0 ) = g(h(b0 )) = g(a0 ) = c, and Q Q g [h(w)] = (x − c) ◦ g ◦ (x + a0 ) = xĝ m , h[w] = (x − a0 ) ◦ h ◦ (x + b0 ) = xĥm , ∗ (w)] (g ∗ )[h = (x − c) ◦ g ∗ ◦ (x + a∗0 ) = x(ĝ ∗ )m , (h∗ )[w] = (x − a∗0 ) ◦ h∗ ◦ (x + b0 ) = x(ĥ∗ )m with squarefree monic ĝ, ĝ ∗ , ĥ, and ĥ∗ of degree ` = r−1−deg g 0 . Furthermore, Q ĝ(0) = g̃(a0 ) = 1≤i≤` (a0 − ai ) 6= 0. This shows that ĝ is coprime to x and similar arguments work for ĝ ∗ , and for ĥ and ĥ∗ with b0 6= bi for i ≥ 1, since Q h(b0 ) = a0 6= ai = h(bi ) for i ≥ 1. Moreover, fˆ = ĥ · 1≤i≤` (xĥm − ai + a0 ) is monic and not divisible by x, and f [w] = g [h(w)] ◦ h[w] = (xĝ m ) ◦ (xĥm ) = xfˆm . Since B0,0 = {b0 } and lcm(e0 , e∗0 ) = 1, we find that f − c has a simple root b0 , P by Proposition 4.22. Furthermore, f −c has i+j≥1 #Bi,j = 2`+`2 m = `(r+1) roots with multiplicity m. Thus fˆ is squarefree and of degree `(r + 1) = (r2 − 1)/m, and the values as claimed in (s) indeed exist. For the uniqueness in the case deg f 0 > 0, we consider another factorization f [w0 ] = xfˆ0m satisfying the conditions of case (s). Then f (x) − f (w) = f [w] ◦ (x − w) = (x − w)(fˆ(x − w))m and f (x) − f (w0 ) = f [w0 ] ◦ (x − w0 ) = (x−w0 )(fˆ0 (x−w0 ))m . The value for c such that f −c is squareful with a simple root is unique for a simply original polynomial with deg f 0 > 0, as remarked in (i). Thus c = f (w) = f (w0 ) and (x − w)(fˆ(x − w))m = (x − w0 )(fˆ0 (x − w0 ))m . Since deg f 0 > 0, we have deg g 0 > 0 and m > 1. Unique factorization yields w = w0 and fˆ = fˆ0 . An analogous argument works for ĝ, ĝ ∗ , ĥ, and ĥ∗ . This concludes case (s), and we continue with the case (m). Case (m): Let f be multiply original. Then deg f 0 > 0 by (i) from the beginning of the proof. By (ii), there is a unique c ∈ F such that f − c is squareful, and then f − c has no simple root by Definition 5.1 of multiple originality. By Lemma 4.32, g − c and g ∗ − c are also squareful. Assume that g − c has a simple root. Then ` > 0 and we may number the roots of g − c such that e0 = 1 in the notation (5.7). By Lemma 4.32, g − c has 37 at most one simple root and thus e1 > 1. By Lemma 4.25 (ii), e1 divides all e∗j but one and we may number the roots of g ∗ − c such that e1 | e∗j for 1 ≤ j ≤ `. Interchanging the rôles of g and g ∗ in Lemma 4.25 (ii), we have e∗0 | e1 since e0 = 1. Combining these divisibility conditions shows e∗0 | gcd{e∗j : 0 ≤ j ≤ `} and we find e∗0 = 1 from (4.26). Hence there exists some b ∈ K such that multb (f − c) = lcm(e0 , e∗0 ) = 1, by Proposition 4.22, contradicting Definition 5.1 of multiply original by the uniqueness of c. Therefore g − c has no simple root and ei > 1 for all i ≥ 0. An analogous argument for g ∗ shows e∗i > 1 for all i ≥ 0. We now proceed in three steps. First, we determine the factorizations of g − c and g ∗ − c. Second, we derive the factorizations of h − ai and h∗ − a∗i for the roots ai ∈ g −1 (c) and a∗i ∈ g ∗ −1 (c), respectively. Third, we apply an appropriate original shift and prove the claimed form. To compute `, we translate Proposition 4.22 into the language of graphs. We consider the directed bipartite graph on the set V = A ∪ A∗ of vertices, with disjoint A = {i : 0 ≤ i ≤ `} and A∗ = {i∗ : 0 ≤ i ≤ `}. The set E of edges consists of all (i, j ∗ ) with ei | e∗j plus all (i∗ , j) with e∗i | ej . Each vertex has outdegree `, by Lemma 4.25 (ii), since no root is simple. If ` > 1, then by Lemma 5.3 some vertex i in A is connected to all other vertices in A. Then ei > 1 divides all other multiplicities of g − c, which contradicts (4.26) with g instead of g ∗ . Hence ` = 1 and therefore g − c = (x − a0 )e0 (x − a1 )e1 , ∗ ∗ g ∗ − c = (x − a∗0 )e0 (x − a∗1 )e1 with 1 < ei , e∗i < r − 1, for i = 0, 1. We know by Lemma 4.25 (i) applied to g and g ∗ , respectively, that gcd(e0 , e1 ) = gcd(e∗0 , e∗1 ) = 1 and since ei , e∗i > 1 for i = 0, 1, each ei divides exactly one e∗j , by (ii) of the cited lemma, and similarly each e∗j divides exactly one ei . By renumbering if required, we assume e0 | e∗1 . If e∗1 | e1 , then gcd(e0 , e1 ) = e0 > 1, a contradiction to Lemma 4.25 (i). Therefore e∗1 | e0 and we have e0 = e∗1 . Similar arguments show e∗0 | e1 and e1 | e∗0 , and hence e1 = e∗0 . We write m = e0 = e∗1 and m∗ = e1 = e∗0 . Then m and m∗ are coprime, m∗ = r − m, since r = e0 + e1 , and p - m, by (A4 ). Lemma 4.35 (ii) yields distinct a0 , a1 ∈ F and distinct a∗0 , a∗1 ∈ F with ∗ g − c = (x − a0 )m (x − a1 )m , ∗ g ∗ − c = (x − a∗0 )m (x − a∗1 )m . For the sets Bi,j defined in (ii), we find #B0,0 = #B1,1 = 1, #B0,1 = m, 38 and #B1,0 = m∗ . The multiplicity of each bi,j ∈ Bi,j satisfies lcm(ei , e∗j ) multbi,j (h − ai ) = ei =   m∗      m 1 if i = j = 0, if i = j = 1, otherwise, by (4.24), and similarly multbi,j (h∗ − a∗j ) =   m      m∗ 1 if i = j = 0, if i = j = 1, otherwise. Writing B0,0 = {b0,0 } and B1,1 = {b1,1 }, this shows ∗ h − a0 = (x − b0,0 )m H0 , h − a1 = (x − b1,1 )m H0∗ , h∗ − a∗0 = (x − b0,0 )m H0∗ , h − a∗1 = (x − b1,1 )m H0 ∗ with squarefree monic H0 = b∈B0,1 (x − b) and H0∗ = b∈B1,0 (x − b) that do not vanish at b0,0 or b1,1 . Lemma 4.35 (iii) implies that b0,0 , b1,1 ∈ F and H0 , H0∗ ∈ F [x]. We use this information to apply the appropriate original shift to our decompositions. Let w = b0,0 , a = a1 −a0 , a∗ = a∗1 −a∗0 , and b = b1,1 −b0,0 , with all differences being different from 0, and squarefree monic H = H0 ◦ (x + w) and H ∗ = H0∗ ◦ (x + w). Then h(w) = a0 , h∗ (w) = a∗0 , g(a0 ) = g ∗ (a∗0 ) = c, and Q Q ∗ g [h(w)] = xm (x − a)m , ∗ h[w] − a = (x − b)m H ∗ , h[w] = xm H, ∗ (w)] g ∗ [h ∗ = xm (x − a∗ )m , (5.8) ∗ h∗ [w] = xm H ∗ , h∗ [w] − a∗ = (x − b)m H. Equations (5.8) yield a system of linear equations ∗ xm H − (x − b)m H ∗ = a, ∗ −(x − b)m H + xm H ∗ = a∗ over F (x) in H and H ∗ . We apply Cramer’s rule and find H = (axm + a∗ (x − b)m )/br , ∗ ∗ H ∗ = (a∗ xm + a(x − b)m )/br , and a + a∗ = br , since H is monic. Therefore, the polynomials H and H ∗ are ∗ ∗ ∗ as in (3.24) and f [w] = g [h(w)] ◦h[w] = xmm (x−b)mm H m (H ∗ )m = M (a, b, m), as in Theorem 3.22. 39 For 2-collisions at degree p2 , we can refine the classification of Proposition 5.4. Theorem 5.9. Let F be a perfect field of characteristic p and f ∈ Pp2 (F ). Then f has a 2-collision {(g, h), (g ∗ , h∗ )} if and only if exactly one of the following holds. (F) The polynomial f is a Frobenius collision as in Example 2.4. (S) The polynomial f is simply original and there are u, s, ε, and m as in Fact 3.1 and w ∈ F such that f [w] = S(u, s, ε, m) and the collision {(g, h)[w] , (g ∗ , h∗ )[w] } is contained in the #T -collision described in Fact 3.1, with #T ≥ 2. (M) The polynomial f is multiply original and there are a, b, and m as in Theorem 3.22 and w ∈ F such that f [w] = M (a, b, m) and the collision {(g, h)[w] , (g ∗ , h∗ )[w] } is as in Theorem 3.22. Proof. By Lemma 2.6 (i), f is a Frobenius collision if and only if f 0 = 0. The rest of the proof deals with the case f 0 6= 0. Assumption 4.7 holds by Lemma 4.8, the assumptions in Definition 5.1 are satisfied, and f is either simply original or multiply original. For a multiply original f , Proposition 5.4 yields the claimed parameters directly, and we now show their existence in the simply original case. We take w, m, ĝ, ĥ as in Proposition 5.4 (s) and have g [h(w)] = xĝ m , h[w] = xĥm . We determine the form of ĝ and ĥ. Let ` = deg ĝ = (p − 1)/m. The derivative of g [h(w)] is ĝ m−1 (ĝ + mxĝ 0 ), and its degree equals deg g 0 = p − 1 − `, by (5.6). Thus deg g 0 = (m − 1)` + deg(ĝ + mxĝ 0 ) = deg g 0 + deg(ĝ + mxĝ 0 ) and P deg(ĝ + mxĝ 0 ) = 0. We write ĝ = 0≤i≤` ĝi xi with ĝi ∈ F for all i ≥ 0. Then P ĝ + mxĝ 0 = 0≤i≤` (1 + mi)ĝi xi and we have ĝ0 = 6 0 and (1 + mi)ĝi = 0 for all i ≥ 1. Since 1 + mi 6= 0 in F for 1 ≤ i < `, it follows that ĝi = 0 for these values of i. Thus we get ĝ = x` − ĝ0 and ĝ0 6= 0. An analogous argument yields ĥ = x` − ĥ0 with ĥ0 6= 0. Therefore, we find f [w] = x(x`(p+1) − (ĥp0 + ĝ0 )x` + ĝ0 ĥ0 )m . 40 (5.10) Let (u, s, ε, t) =  (ĝ0 ĥ0 , 1, 0, ĥ0 ) ((ĥp 0 if ĥp0 + ĝ0 = 0, + ĝ0 )p+1 /(ĝ0 ĥ0 )p , ĝ0 ĥ0 /(ĥp0 + ĝ0 ), 1, ĥ0 /s) otherwise. In both cases, u, s, and t are in F × and the equations tp+1 −εut+u = 0, ĥ0 = st, ĝ0 = usp t−1 , and f [w] = g [h(w)] ◦ h[w] = S(u, s, ε, m) hold. Similarly, we find ∗ g ∗ [h (w)] = x(x` −ĝ0∗ )m and h∗ [w] = x(x` −ĥ∗0 )m for some ĝ0∗ , ĥ∗0 ∈ F × , and derive ∗ the parameters u∗ , s∗ , ε∗ , and t∗ analogously. Since f [w] = g ∗ [h (w)] ◦ h∗ [w] , it follows from (5.10) that ĥp0 + ĝ0 = (ĥ∗0 )p + ĝ0∗ and ĝ0 ĥ0 = ĝ0∗ ĥ∗0 . Hence ε = ε∗ , u = u∗ , and s = s∗ . Since the decompositions are distinct, we have t 6= t∗ and thus (g, h)[w] and (g ∗ , h∗ )[w] are both of the form (3.3) with different values for t. Corollary 5.11. (i) A polynomial in case (S) of Theorem 5.9 has a maximal #T -collision with T as in (3.2). (ii) A polynomial in case (M) of Theorem 5.9 has a maximal 2-collision. Proof. For a polynomial f with collision C and w ∈ F , we write C [w] = {(g, h)[w] : (g, h) ∈ C} for the corresponding collision of f [w] . If f is a Frobenius collision as in case (F) of Theorem 5.9, then f is maximal by Lemma 2.6 (ii). Now let f be a polynomial with a 2-collision C = {(g, h), (g ∗ , h∗ )} that does not fall into case (F) of Theorem 5.9. (i) If f falls into case (S) of Theorem 5.9, we have by that theorem u, s, ε, and m as in Fact 3.1 and w ∈ F such that f = S(u, s, ε, m)[−w] and C ⊆ D(u, s, ε, m)[−w] , where D(u, s, ε, m)[−w] denotes the #T -collision described in Fact 3.1 shifted by −w. Take another decomposition (g0 , h0 ) 6= (g, h) of f . We apply Theorem 5.9 to f with 2-collision C0 = {(g, h), (g0 , h0 )}. Due to the mutual exclusivity of the three cases this falls again in case (S), and we obtain u0 , s0 , ε0 , and m0 as in Fact 3.1, and w0 ∈ F such that f = S(u0 , s0 , ε0 , m0 )[−w0 ] and C0 ⊆ D(u0 , s0 , ε0 , m0 )[−w0 ] . Thus, f [w0 ] = S(u, s, ε, m)[w0 −w] = S(u0 , s0 , ε0 , m0 ). By Fact 3.5 (iv), the only polynomial of the form (3.2) in the orbit of S(u, s, ε, m) under original shifting is the polynomial itself. Therefore, S(u, s, ε, m) = S(u0 , s0 , ε0 , m0 ). (5.12) If m > 1, then the stabilizer of S(u, s, ε, m) under original shifting is {0} by Fact 3.5 (iii) and we have w = w0 . Otherwise, m = 1 and S(u, s, ε, m), 41 D(u, s, , m), and D(u0 , s0 , 0 , m0 ) consist only of additive polynomials which are invariant under original shifting. In that case, we can assume w = w0 without loss of generality. If ε = 1, then Fact 3.5 (i) yields (u, s, ε, m) = (u0 , s0 , ε0 , m0 ) from (5.12) and therefore D(u, s, ε, m)[−w] = D(u0 , s0 , ε0 , m0 )[−w0 ] 3 (g0 , h0 ). Otherwise, ε = 0 and Fact 3.5 (ii) yields (usp+1 , ε, m) = (u0 sp+1 0 , ε0 , m0 ) from (5.12). By the definition of D(u0 , s0 , ε0 , m0 )[−w0 ] via Fact 3.1, there is some t0 ∈ F satisfying tp+1 = −u0 such that 0 [h (−w0 )] g0 0 [−w0 ] h0 m0 = x(xp−m0 − u0 sp0 t−1 = x(xp−m − usp t−1 )m , 0 ) = x(xp−m0 − s0 t0 )m0 = x(xp−m − st)m for t = t0 s0 /s ∈ F . Since t satisfies tp+1 = −u, this shows (g0 , h0 ) ∈ D(u, s, ε, m)[−w] . (ii) Let f fall into case (M) of Theorem 5.9 and take another decomposition (g0 , h0 ) 6= (g, h) of f . We apply that theorem to f with 2-collisions C and C0 = {(g, h), (g0 , h0 )} and obtain a, b, m and a0 , b0 , m0 as in Theorem 3.22 and w, w0 ∈ F , respectively, such that f = M (a, b, m)[−w] = M (a0 , b0 , m0 )[−w0 ] , C = E(a, b, m)[−w] , and C0 = E(a0 , b0 , m0 )[−w0 ] , where E(a, b, m)[−w] denotes the 2-collision defined in (3.23) shifted by −w, and E(a0 , b0 , m0 )[−w0 ] is analogous. We have M (a, b, m)[w0 −w] = M (a0 , b0 , m0 ). (5.13) The only polynomials in the orbit of M (a, b, m) that are of the form (3.23) are M (a, b, m) itself and M (a, b, m)[b] according to Proposition 3.26 (iv); and by (ii), the stabilizer of M (a, b, m) under original shifting is {0}. Hence, w0 − w = 0 or w0 − w = b. If w0 = w, then M (a0 , b0 , m0 ) = M (a, b, m) from (5.13) and with (iii) of the cited proposition (a0 , b0 , m0 ) ∈ {(a, b, m), (a∗ , b, m∗ )}. If w0 = w + b, then M (a0 , b0 , m0 ) = M (a, b, m)[b] = M (−a∗ , −b, m) and again with (iii) (a0 , b0 , m0 ) ∈ {(−a∗ , −b, m), (−a, −b, m∗ )}. In either case, we check directly that E(a0 , b0 , m0 )[−w0 ] = E(a, b, m)[−w] and therefore (g0 , h0 ) ∈ C. 42 In particular, the polynomials of case (M) have no 3-collision. We combine Theorem 5.9 with the algorithms of Section 3 for a general test of 2-collisions in Algorithm 5.14. Algorithm 5.14: Collision determination Input: a polynomial f ∈ Pp2 (F ), where p = char F Output: “(F)”, “(S)”, or “(M)” as in Theorem 5.9, if f has a 2-collision, and “no 2-collision” otherwise p p2 1 if f ∈ F [x ] \ {x } then return “(F)” if Algorithm 3.18 does not return “failure” on input f , but k, u, s, ε, m, w then 2 if k ≥ 2 then return “(S)” 3 end 4 if Algorithm 3.29 does not return “failure” on input f then 5 return “(M)” 6 end 7 return “no 2-collision” Theorem 5.15. Algorithm 5.14 works correctly as specified. If F = Fq and n = p2 = deg f , it takes O(M(n) log(pq)) field operations. The correctness follows from Theorem 5.9. Its cost is dominated by that of Algorithm 3.18, where the log n factor is subsumed in log(pq) since n = p2 and pq ≥ p2 . If f is found to have a collision, then that can be returned as well, using Example 2.4 for (F). 6 Counting at degree p2 The classification of the composition collisions at degree p2 yields the exact number of decomposable polynomials over a finite field Fq . Theorem 6.1. Let p be a prime and q a power of p. For k ≥ 1, we write ck for #Cp2 ,k (Fq ) as in (2.1), δ for Kronecker’s delta function, and τ for the number of positive divisors of p − 1. Then the following hold. (τ q − q + 1)(q − 1)(qp − q − p) p q(q − 1)(q − 2)(p − 3) − (1 − δp,2 ) , 2 (τ q − q + 1)(q − 1)2 (p − 2) c2 = q p−1 − 1 + 2(p − 1) c1 = q 2p−2 − 2q p−1 + 2 − 43 (6.2) q(q − 1)(q − 2)(p − 3) , 4 (τ q − q + 1)(q − 1)(q − p) , cp+1 = p(p2 − 1) ck = 0, if k ∈ / {1, 2, p + 1}. + (1 − δp,2 ) (6.3) (6.4) (6.5) Proof. For k ≥ 2, we consider Ck = Cp2 ,k (Fq ). Theorem 5.9 provides the partition (F ) (S) (M ) Ck = Ck ∪˙ Ck ∪˙ Ck , where the sets on the right-hand side correspond to the cases (F), (S), and (M), respectively. Lemma 2.6 (ii), Proposition 3.21, and Corollary 3.28 imply that ( p−1 q − 1 if k = 2, 0 if k ≥ 3,  2 (τ q − q + 1)(q − 1) (p − 2)    if k = 2,    2(p − 1)   (S) #Ck = (τ q − q + 1)(q − 1)(q − p)  if k = p + 1,    p(p2 − 1)     0 otherwise,   (1 − δ ) q(q − 1)(q − 2)(p − 3) if k = 2, (M ) p,2 #Ck =  4  0 if k ≥ 3. (F ) #Ck = Summing up yields the exact formulas (6.3), (6.4), and (6.5). Finally, there is a total of q 2p−2 pairs (g, h) ∈ Pp (Fq ) × Pp (Fq ) and therefore (6.2) follows from X c1 = q 2p−2 − k · ck . k≥2 Equation (2.2) now yields the counting result of this paper, namely the following exact formula for the number of decomposable polynomials of degree p2 over Fq . Theorem 6.6. Let Fq be a finite field of characteristic p, δ Kronecker’s delta function, and τ the number of positive divisors of p − 1. Then (τ q − q + 1)(q − 1)(qp − p − 2) 2(p + 1) q(q − 1)(q − 2)(p − 3) − (1 − δp,2 ) . 4 #Dp2 (Fq ) = q 2p−2 − q p−1 + 1 − 44 Proof. By (2.2) and Theorem 6.1 we find #Dp2 (Fq ) = q 2p−2 − c2 − pcp+1 , from which the claim follows. For p = 2, this yields 2 + q −2 , 3 consistent with the result in von zur Gathen (2013). Furthermore, we have   3 −1 −2 −3 −4 4 for p = 3, #D9 (Fq ) = q 1 − (q + q − q − q ) 8   #Dp2 (Fq ) = q 2p−2 1 − q −p+1 + O(q −2p+5+1/d ) for q = pd and p ≥ 5. #D4 (Fq ) = q 2 · We have two independent parameters p and d, and q = pd . For two eventually positive functions f, g : N2 → R, here g ∈ O(f ) means that there are constants b and c so that g(p, d) ≤ c · f (p, d) for all p and d with p + d ≥ b. With the bounds on τ mentioned after the proof of Proposition 3.21, we have the following asymptotics. Corollary 6.7. Let p ≥ 5, d ≥ 1, and q = pd . Then c1 = q 2p−2 (1 − 2q −p+1 + O(q −2p+5+1/d )), c2 = q p−1 (1 + O(q −p+4+1/d )),   cp+1 = (τ − 1)q 3−3/d 1 + O(q − max{2/d,1−1/d} )   = O q 3−3/d+1/(d loglog p) . Von zur Gathen (2009) considers the asymptotics of ( νq,n = #Dn /q 2`−2 if n = `2 , #Dn /2q `+n/`−2 otherwise, where ` is the smallest prime divisor of n. It turns out that for any composite n, lim supq→∞ νq,n = 1, and that lim inf q→∞ νq,n = 1 for many n. But when ` divides n exactly twice, denoted as `2 k n, determining the limes inferior was left as an open question. If n = `2 , we obtain from Theorem 6.6 lim ν 2 q→∞ q,` =1 for any prime ` > 2. For n = 4, the sequence has no limit, but oscillates between close to lim inf q→∞ νq,4 = 2/3 and lim supq→∞ νq,4 = 1, and these are the only two accumulation points of the sequence νq,4 . If `2 k n and n 6= `2 , the question of good asymptotics is still open, as it is for νq,n when q is fixed and n → ∞. 45 7 Conclusion In the wild case of univariate polynomial decomposition, we present some (equal-degree) collisions in the special case where the degree is r2 for a power r of the characteristic p, and determine their number. We give a classification of all 2-collisions at degree p2 and an algorithm which determines whether a given polynomial has a 2-collision, and if so, into which class it falls. We compute the exact number of decomposable polynomials of degree p2 over finite fields. This yields tight asymptotics on νq,n = (number of decomposables of degree n)/q 2`−2 for q → ∞, when n = `2 is the square of a prime `. Ritt’s Second Theorem covers distinct-degree collisions, even in the wild case, see Zannier (1993), and they can be counted exactly in most situations; see von zur Gathen (2010). It would be interesting to see a similar classification for general equal-degree collisions. This paper only deals with decomposition of univariate polynomials. The study of rational functions with our method remains open. 8 Acknowledgments Many thanks go to Mike Zieve for useful comments and pointers to the literature and to Rolf Klein and an anonymous referee for simplifying our proof of Lemma 5.3. This work was funded by the B-IT Foundation and the Land NordrheinWestfalen. References Roberto M. Avanzi & Umberto M. Zannier (2003). The equation f (X) = f (Y ) in rational functions X = X(t), Y = Y (t). Compositio Math. 139(3), 263–295. doi:10.1023/B:COMP.0000018136.23898.65. David R. Barton & Richard Zippel (1985). Polynomial Decomposition Algorithms. Journal of Symbolic Computation 1, 159–168. Raoul Blankertz (2011). Decomposition of Polynomials. Diplomarbeit, Universität Bonn. Modified version available at http://arxiv.org/abs/ 1107.0687. 46 Raoul Blankertz (2013). A polynomial time algorithm for computing all minimal decompositions of a polynomial. To appear in ACM Communications in Computer Algebra. Raoul Blankertz, Joachim von zur Gathen & Konstantin Ziegler (2013). Compositions and collisions at degree p2 . Journal of Symbolic Computation 59, 113–145. ISSN 0747-7171. URL http://dx.doi.org/ 10.1016/j.jsc.2013.06.001. Also available at http://arxiv.org/abs/ 1202.5810. Extended abstract in Proceedings of the 2012 International Symposium on Symbolic and Algebraic Computation ISSAC2012, Grenoble, France (2012), 91–98. Antonia W. Bluher (2004). On xq+1 + ax + b. Finite Fields and Their Applications 10(3), 285–305. URL http://dx.doi.org/10.1016/j.ffa. 2003.08.004. John J. Cade (1985). A New Public-key Cipher Which Allows Signatures. In Proceedings of the 2nd SIAM Conference on Applied Linear Algebra. SIAM, Raleigh NC. Stephen D. Cohen (1985). Reducibility of sub-linear polynomials over a finite field. Bulletin of the Korean Mathematical Society 22, 53–56. Stephen D. Cohen (1990a). Exceptional polynomials and the reducibility of substitution polynomials. Enseign. Math. (2) 36(1-2), 53–65. ISSN 0013-8584. Stephen D. Cohen (1990b). The Factorable Core of Polynomials Over Finite Fields. Journal of the Australian Mathematical Society, Series A 49(02), 309–318. doi:10.1017/S1446788700030585. Stephen D. Cohen & Rex W. Matthews (1994). A class of exceptional polynomials. Transactions of the American Mathematical Society 345(2), 897–909. ISSN 0002-9947. URL http://www.jstor.org/stable/2155005. Robert S. Coulter, George Havas & Marie Henderson (2004). On decomposition of sub-linearised polynomials. Journal of the Australian Mathematical Society 76(3), 317–328. ISSN 1446-7887. URL http://dx. doi.org/10.1017/S1446788700009885. L. E. Dickson (1897). The analytic representation of substitutions on a power of a prime number of letters with a discussion of the linear group. Annals of Mathematics 11, 65–120, 161–183. 47 F. Dorey & G. Whaples (1974). Prime and Composite Polynomials. Journal of Algebra 28, 88–101. URL http://dx.doi.org/10.1016/ 0021-8693(74)90023-4. H. T. Engstrom (1941). Polynomial Substitutions. American Journal of Mathematics 63, 249–255. URL http://www.jstor.org/stable/ pdfplus/2371520.pdf. Michael D. Fried & R. E. MacRae (1969). On the invariance of chains of Fields. Illinois Journal of Mathematics 13, 165–171. Joachim von zur Gathen (1990a). Functional Decomposition of Polynomials: the Tame Case. Journal of Symbolic Computation 9, 281–299. URL http://dx.doi.org/10.1016/S0747-7171(08)80014-4. Joachim von zur Gathen (1990b). Functional Decomposition of Polynomials: the Wild Case. Journal of Symbolic Computation 10, 437–452. URL http://dx.doi.org/10.1016/S0747-7171(08)80054-5. Joachim von zur Gathen (2009). The Number of Decomposable Univariate Polynomials — Extended Abstract. In Proceedings of the 2009 International Symposium on Symbolic and Algebraic Computation ISSAC2009, Seoul, Korea, edited by John P. May, 359–366. ACM Press. ISBN 978-1-60558609-0. Preprint (2008) available at http://arxiv.org/abs/0901.0054. Joachim von zur Gathen (2010). Shift-invariant polynomials and Ritt’s Second Theorem. Contemporary Mathematics 518, 161–184. Joachim von zur Gathen (2013). Lower bounds for decomposable univariate wild polynomials. Journal of Symbolic Computation 50, 409–430. URL http://dx.doi.org/10.1016/j.jsc.2011.01.008. Joachim von zur Gathen & Jürgen Gerhard (2013). Modern Computer Algebra. Cambridge University Press, Cambridge, UK, Third edition. ISBN 9781107039032. URL http://cosec.bit.uni-bonn.de/science/mca/. Other editions: 1999, 2003, Chinese edition, Japanese translation. Joachim von zur Gathen, Mark Giesbrecht & Konstantin Ziegler (2010). Composition collisions and projective polynomials. Statement of results. In Proceedings of the 2010 International Symposium on Symbolic and Algebraic Computation ISSAC2010, Munich, Germany, edited by Stephen Watt, 123–130. ACM Press. URL http://dx.doi.org/10. 1145/1837934.1837962. Preprint available at http://arxiv.org/abs/ 1005.1087. 48 Mark William Giesbrecht (1988). Some Results on the Functional Decomposition of Polynomials. Master’s thesis, Department of Computer Science, University of Toronto. Technical Report 209/88. Available as http://arxiv.org/abs/1004.5433. David Goss (1996). Basic Structures of Function Field Arithmetic. SpringerVerlag. ISBN 3-540-61087-1. G. H. Hardy & E. M. Wright (1985). An introduction to the theory of numbers. Clarendon Press, Oxford, 5th edition. First edition 1938. D. R. Heath-Brown (1992). Zero-free regions for Dirichlet L-functions and the least prime in an arithmetic progression. Proceedings of the London Mathematical Society 64, 265–338. Marie Henderson & Rex Matthews (1999). Composition behaviour of sub-linearised polynomials over a finite field. In Finite Fields: Theory, Applications, and Algorithms (Waterloo, ON, 1997), volume 225 of Contemp. Math., 67–75. Amer. Math. Soc., Providence, RI. Nathan Jacobson (1964). Lectures in abstract algebra: Volume III – Theory of fields and Galois theory. Van Nostrand. ISBN 9780387901688. Dexter Kozen & Susan Landau (1989). Polynomial Decomposition Algorithms. Journal of Symbolic Computation 7, 445–456. URL http: //dx.doi.org/10.1016/S0747-7171(89)80027-6. An earlier version was published as Technical Report 86-773, Cornell University, Department of Computer Science, Ithaca, New York, 1986. S. Landau & G. L. Miller (1985). Solvability by Radicals is in Polynomial Time. Journal of Computer and System Sciences 30, 179–208. Serge Lang (2002). Algebra. Springer-Verlag. ISBN 9780387953854. H. Levi (1942). Composite Polynomials with coefficients in an arbitrary Field of characteristic zero. American Journal of Mathematics 64, 389–400. Florian Luca & Igor E. Shparlinski (2008). On the values of the divisor function. Monatshefte für Mathematik 154, 59–69. URL http: //dx.doi.org/10.1007/s00605-007-0511-3. Jürgen Neukirch (1999). Algebraic Number Theory. Springer-Verlag. ISBN 3-540-65399-6. 49 O. Ore (1933). On a Special Class of Polynomials. Transactions of the American Mathematical Society 35, 559–584. Andrzej Schinzel (1982). Selected Topics on Polynomials. Ann Arbor; The University of Michigan Press. ISBN 0-472-08026-1. Andrzej Schinzel (2000). Polynomials with special regard to reducibility. Cambridge University Press, Cambridge, UK. ISBN 0521662257. Henning Stichtenoth (2009). Algebraic Function Fields and Codes. Springer-Verlag. ISBN 978-3-540-76877-7. Triantafyllos Xylouris (2011). Über die Nullstellen der Dirichletschen L-Funktionen und die kleinste Primzahl in einer arithmetischen Progression. Dissertation. Rheinische Friedrich-Wilhelms-Universität Bonn. U. Zannier (1993). Ritt’s Second Theorem in arbitrary characteristic. Journal für die reine und angewandte Mathematik 445, 175–203. Michael Zieve (2011). Personal communication. Richard Zippel (1991). Rational Function Decomposition. In Proceedings of the 1991 International Symposium on Symbolic and Algebraic Computation ISSAC ’91, Bonn, Germany, edited by Stephen M. Watt, 1–6. ACM Press, Bonn, Germany. ISBN 0-89791-437-6. 50
0math.AC
arXiv:1507.04118v4 [math.ST] 13 Sep 2017 Oracle inequalities for network models and sparse graphon estimation Olga Klopp, CREST and MODAL’X, University Paris Ouest Alexandre B. Tsybakov, ENSAE, UMR CNRS 9194 Nicolas Verzelen, INRA. September 14, 2017 Abstract Inhomogeneous random graph models encompass many network models such as stochastic block models and latent position models. We consider the problem of statistical estimation of the matrix of connection probabilities based on the observations of the adjacency matrix of the network. Taking the stochastic block model as an approximation, we construct estimators of network connection probabilities – the ordinary block constant least squares estimator, and its restricted version. We show that they satisfy oracle inequalities with respect to the block constant oracle. As a consequence, we derive optimal rates of estimation of the probability matrix. Our results cover the important setting of sparse networks. Another consequence consists in establishing upper bounds on the minimax risks for graphon estimation in the L2 norm when the probability matrix is sampled according to a graphon model. These bounds include an additional term accounting for the “agnostic” error induced by the variability of the latent unobserved variables of the graphon model. In this setting, the optimal rates are influenced not only by the bias and variance components as in usual nonparametric problems but also include the third component, which is the agnostic error. The results shed light on the differences between estimation under the empirical loss (the probability matrix estimation) and under the integrated loss (the graphon estimation). 1 Introduction Consider a network defined as an undirected graph with n nodes. Assume that we observe the values Aij ∈ {0, 1} where Aij = 1 is interpreted as the fact that the nodes i and j are connected and Aij = 0 otherwise. We set Aii = 0 for all 1 ≤ i ≤ n and we assume that Aij is a Bernoulli random variable with parameter (Θ0 )ij = P(Aij = 1) for 1 ≤ j < i ≤ n. The random variables Aij , 1 ≤ j < i ≤ n, are assumed independent. We denote by A the adjacency matrix i.e., the n × n symmetric matrix with entries Aij for 1 ≤ j < i ≤ n and zero diagonal entries. Similarly, we denote by Θ0 the n × n symmetric matrix with entries (Θ0 )ij for 1 ≤ j < i ≤ n and zero diagonal entries. This is a matrix of probabilities associated to the graph; the nodes i and j are connected with probability (Θ0 )ij . The model with such observations A′ = (Aij , 1 ≤ j < i ≤ n) is a special case of inhomogeneous random graph model that we will call for definiteness the network sequence model1 , to emphasize a parallel with the gaussian sequence model. 1.1 Graphons and sparse graphon models Networks arise in many areas such as information technology, social life, genetics. These real-life networks are in permanent movement and often their size is growing. Therefore, it is natural to look for a well-defined ”limiting object” independent of the network size n and such that a stochastic network can be viewed as a partial observation of this limiting object. Such objects called the graphons play a central role in the recent theory of graph limits introduced by Lovász and Szegedy [11]. For a detailed description of this theory we 1 In some recent papers, it is also called the inhomogeneous Erdös-Rényi model, which is somewhat ambiguous since the words “Erdös-Rényi model” designate a homogeneous graph. 1 refer to the monograph by Lovász [12]. Graphons are symmetric measurable functions W : [0, 1]2 → [0, 1]. In the sequel, the space of graphons is denoted by W. The main message is that every graph limit can be represented by a graphon. This beautiful theory of graph limits was developed for dense graphs, that is, graphs with the number of edges comparable to the square of the number of vertices. Graphons give a natural way of generating random graphs [12, 9]. The probability that two distinct nodes i and j are connected in the graphon model is the random variable (Θ0 )ij = W0 (ξi , ξj ) (1) where ξ1 , . . . , ξn are unobserved (latent) i.i.d. random variables uniformly distributed on [0, 1]. As above, the diagonal entries of Θ0 are zero. Conditionally on ξ = (ξ1 , . . . , ξn ), the observations Aij for 1 ≤ j < i ≤ n are assumed to be independent Bernoulli random variables with success probabilities (Θ0 )ij . For any positive integer n, a graphon function W0 defines a probability distribution on graphs of size n. Note that this model is different from the network sequence model since the observations Aij are no longer independent. If W0 is a step-function with k steps, we obtain an analog of the stochastic block model with k groups. More generally, many exchangeable distributions on networks [9], including random dot product graphs [14] and some geometric random graphs [13] can be expressed as graphons. Given an observed adjacency matrix A′ sampled according to the model (1), the graphon function W0 is not identifiable. The topology of a network is invariant with respect to any change of labelling of its nodes. Consequently, for any given function W0 (·, ·) and a measure-preserving bijection τ : [0, 1] → [0, 1] (with respect to the Lebesgue measure), the functions W0 (x, y) and W0τ (x, y) := W0 (τ (x), τ (y)) define the same probability distribution on random graphs. The equivalence classes of graphons defining the same probability distribution are characterized in a slightly more involved way based on the following result. Proposition 1.1 ([12, Sect.10]). Two graphons U and W in W are called weakly isomorphic if there exist measure preserving maps φ, ψ: [0, 1] → [0, 1] such that U φ = W ψ almost everywhere. Two graphons U and W define the same probability distribution if and only if they are weakly isomorphic. This proposition motivates considering the equivalence classes of graphons that are weakly isomorphic. f The corresponding quotient space is denoted by W. It is easy to see that the expected number of edges in model (1) is a constant times the squared number of vertices, which corresponds to the dense case. Networks observed in the real life are often sparse in the sense that the number of edges is of the order o(n2 ) as the number n of vertices tends to infinity. The situation in the sparse case is more complex than in the dense case. Even the almost dense case with n2−o(1) edges is rather different from the dense case. The extremely sparse case corresponds to the bounded degree graph where all degrees are smaller than a fixed positive integer. It is an opposite extreme to the dense graph. Networks that occur in the applications are usually between these two extremes described by dense and bounded degree graphs. They often correspond to inhomogeneous networks with density of edges tending to 0 but with the maximum degree tending to infinity as n grows. For a given ρn > 0, one can modify the definition (1) to get a random graph model with O(ρn n2 ) edges. It is usually assumed that ρn → 0 as n → ∞. The adjacency matrix A′ is sampled according to graphon W0 ∈ W with scaling parameter ρn if for all j < i, (Θ0 )ij = ρn W0 (ξi , ξj ) (2) where ρn > 0 is the scale parameter that can be interpreted as the expected proportion of non-zero edges. Alternatively, model (2) can be considered as a graphon model (1) that has been sparsified in the sense that its edges have been independently removed with probability 1 − ρn and kept with probability ρn . This sparse graphon model was considered in [2, 3, 16, 17]. 1.2 Our results This paper has two contributions. First, we study optimal rates of estimation of the probability matrix Θ0 under the Frobenius norm from an observation A′ = (Aij , 1 ≤ j < i ≤ n) in the network sequence model. We estimate Θ0 by a block-constant matrix and we focus on deriving oracle inequalities with optimal rates 2 (with possibly non-polynomial complexity of estimation methods). Note that estimating Θ0 by a k × k block constant matrix is equivalent to fitting a stochastic block model with k classes. Estimation of Θ0 has already been considered by [6, 17, 5] but convergence rates obtained there are far from being optimal. More recently, Gao et al. [10] have established the minimax estimation rates for Θ0 on classes of block constant matrices and on the smooth graphon classes. Their analysis is restricted to the dense case (1) corresponding to ρn = 1 when dealing with model (2). In this paper, we explore the general setting of model (2). In particular, our aim is to understand the behavior of least squares estimators when the probabilities (Θ0 )ij can be arbitrarily small. This will be done via developing oracle inequalities with respect to the block constant oracle. Two estimators will be considered - the ordinary block constant least squares estimator, and its restricted version where the estimator is chosen in the ℓ∞ cube of a given radius. As corollaries, we provide an extension for the sparse graphon model of some minimax results in [10] and we quantify the impact of the scaling parameter ρn on the optimal rates of convergence. Second, we consider estimation of the graphon function W0 based on observation A′ . In view of Proposition 1.1, graphons are not identifiable and can only be estimated up to weak isomorphisms. Hence, we f of graphons. In order to contrast this problem with the study estimation of W0 in the quotient space W estimation of Θ0 , one can invoke an analogy with the random design nonparametric regression. Suppose that we observe (yi , ξi ), i = 1, . . . , n, that are independently sampled according to the model y = f (ξ) + ǫ where f is an unknown regression function, ǫ is a zero mean random variable and ξ is distributed with some density h on [0, 1]. Given a sample of (yi , ξi ), estimation of f with respect to the empirical loss is equivalent to estimation of the vector (f (ξ1 ), . . . , f (ξn )) in, for instance, the Euclidean norm. On the other hand, estimation under the integrated loss consists in constructing an estimator fˆ such that the integral R ˆ (f (t) − f (t))2 h(t)dt is small. Following this analogy, estimation of Θ0 corresponds to an empirical loss problem whereas the graphon estimation corresponds to an integrated loss problem. However, as opposed to nonparametric regression, in the graphon models (1) and (2) the design ξ1 , . . . , ξn is not observed, which makes it quite challenging to derive the convergence rates in these settings. In Section 3, we obtain L2 norm non-asymptotic estimation rates for graphon estimation on classes of step functions (analogs of stochastic block models) and on classes of smooth graphons in model (2). This result improves upon previously known bounds by Wolfe and Olhede [16]. For classes of step function graphons, we also provide a matching minimax lower bound allowing one to characterize the regimes such that graphon optimal estimation rates are slower than probability matrix estimation rates. In a work parallel to ours, Borgs et al. [4] have analyzed the rates of convergence for estimation of step function graphons under the privacy model. Apart from the issues of privacy that we do not consider here, their results in our setting provide a weaker version of the upper bound in Corollary 3.3, with a suboptimal rate, which is the square root of the rate of Corollary 3.3 in the moderately sparse zone. We also mention the paper by Choi [7] devoted to the convergence of empirical risk functions associated to the graphon model. 1.3 Notation We provide a brief summary of the notation used throughout this paper. • For a matrix B, we denote by B ij (or by B i,j , or by (B)ij ) its (i, j)th entry. • For an integer m, set [m] = {1, . . . , m}. • Let n, k and n0 be integers such that 2 ≤ k ≤ n, n0 ≤ n. We denote by Zn,k,n0 the set of all mappings z from [n] to [k] such that mina=1,...,k |z −1 (a)| ≥ n0 (the minimal size of each “community” is n0 ). For brevity, we set Zn,k = Zn,k,1 . k×k • We denote by Rsym the class of all symmetric k × k matrices with real-valued entries. P • The inner product between matrices D, B ∈ Rn×n will be denoted by hD, Bi = i,j D ij B ij . • Denote by kBkF and by kBk∞ the Frobenius norm and the entry-wise supremum norm of matrix B ∈ Rn×n respectively. • We denote by ⌊x⌋ the maximal integer less than x ≥ 0 and by ⌈x⌉ the smallest integer greater than or equal to x. 3 • We denote by E the expectation with respect to the distribution of A if we consider the network sequence model and the expectation with respect to the joint distribution of (ξ, A) if we consider the graphon model. • We denote by C positive constants that can vary from line to line. These are absolute constants unless otherwise mentioned. • We denote by λ the Lebesgue measure on the interval [0, 1]. 2 Probability matrix estimation In this section, we deal with the network sequence model and we obtain optimal rates of estimation in the Frobenius norm of the probability matrix Θ0 . Fixing some integer k > 0, we estimate the matrix Θ0 by a block constant matrix with k × k blocks. 2.1 Least squares estimator b of Θ0 in the collection of all k × k block constant matrices First, we study the least squares estimator Θ with block size larger than some given integer n0 . Recall that we denote by Zn,k,n0 the set of all possible k×k , we define mappings z from [n] to [k] such that mina=1,...,k |z −1 (a)| ≥ n0 . For any z ∈ Zn,k,n0 , Q ∈ Rsym the residual sum of squares X X (Aij − Qab )2 L(Q, z) = (a,b)∈[k]×[k] (i,j)∈z −1 (a)×z −1 (b), j<i and consider the least squares estimator of (Q, z): (Q̂, ẑ) ∈ arg min Q∈Rk×k sym , z∈Zn,k,n0 L(Q, z) b ij = Q b The block constant least squares estimator of (Θ0 )ij is defined as Θ ẑ(i)ẑ(j) for all i > j. Note b ij ∈ [0, 1]. Finally, we denote by Θ b the symmetric matrix with entries Θ b ij for all i > j and with that Θ zero diagonal entries. According to the stochastic block models terminology, Q̂ stands for the estimated connection probabilities whereas ẑ is the estimated partition of the of nodes into k communities. The only difference between this estimator and the one considered in [10] is the restriction |z −1 (a)| ≥ n0 . This prevents the partition z from being too unbalanced. A common choice of n0 is of the order n/k, which is referred to as balanced partition. Taking larger n0 when we have additional information allows us to obtain simpler estimators since we reduce the number of configurations. 2.2 Restricted least squares estimator Given r ∈ (0, 1], consider the least squares estimator restricted to the l∞ ball of radius r, (Q̂r , ẑr ) ∈ arg min Q∈Rk×k sym : kQk∞ ≤r, z∈Zn,k L(Q, z). b r of matrix Θ0 is defined as the symmetric matrix with entries Θ b r = (Q b )ẑ (i)ẑ (j) for all The estimator Θ ij r r r i > j, and with zero diagonal entries. Note that here we consider any partitions, including really unbalanced ones (n0 = 1). 2.3 Oracle inequalities Let Θ∗,n0 be the best Frobenius norm approximation of Θ0 in the collection of matrices k×k such that Θij = Qz(i)z(j) , i 6= j, and Θii = 0 ∀i}. Tn0 [k] = {Θ : ∃ z ∈ Zn,k,n0 , Q ∈ Rsym In particular, T1 [k] is the set of all probability matrices corresponding to k-class stochastic block models without group size restriction. For brevity, we write T1 [k] = T [k], and Θ∗,1 = Θ∗ . 4 Proposition 2.1. Consider the network sequence model. There exist positive absolute constants C1 , C2 , C3 such that for n0 ≥ 2,       C1 C3 log(n/n0 ) log(k) k 2 log(k) k 2 1 b 2 2 E 2 kΘ − Θ0 kF ≤ 2 kΘ0 − Θ∗,n0 kF + C2 kΘ0 k∞ + 2 + + 2 . (3) n n n n n0 n n To discuss some consequences of this oracle inequality, we consider the case of balanced partitions. Corollary 2.2. Consider the network sequence model. Let n0 ≥ Cn/k for some C > 0 (balanced partition), n0 ≥ 2, and kΘ0 k∞ ≥ k log(k) . Then, there exist positive absolute constants C1 , C2 , such that n     C1 log(k) k 2 1 b 2 2 (4) E 2 kΘ − Θ0 kF ≤ 2 kΘ0 − Θ∗,n0 kF + C2 kΘ0 k∞ + 2 . n n n n block modelwith balanced In particular, if Θ0 ∈ Tn0 [k] (i.e., when we have a k-class stochastic   communi2 2 ties), the rate of convergence is of the order kΘ0 k∞ log(k) + nk 2 . In [10], the rate log(k) + nk 2 is shown to n n be minimax over all stochastic block models with k blocks, with no restriction on kΘ0 k∞ except the obvious  2 log(k) + nk 2 obtained in Corollary one, kΘ0 k∞ ≤ 1. We prove in the next subsection that the rate kΘ0 k∞ n 2.2 exhibits the optimal dependency on kΘ0 k∞ . Before doing this, we provide an oracle inequality for the b r. restricted least squares estimator Θ Proposition 2.3. Consider the network sequence model. There exist positive absolute constants C1 and C2 such that the following holds. If kΘ0 k∞ ≤ r, then     C1 1 br log(k) k 2 2 2 (5) E 2 kΘ − Θ0 kF ≤ 2 kΘ0 − Θ∗ kF + C2 r + 2 . n n n n As opposed to Corollary 2.2, the risk bound (5) is applicable for unbalanced partitions and for arbitrarily small values of kΘ0 k∞ . However, this restricted least squares estimator requires the knowledge of an upper bound of kΘ0 k∞ . Whereas the mean value of (Θ0 )ij is easily inferred from the data, the maximal value kΘ0 k∞ is difficultP to estimate. If the matrix Θ0 satisfies the sparse graphon model (2), one can set r = rn = un A where A = 2 j<i Ai,j /(n(n − 1)) is the edge density of the graph and un is any sequence that tends to R infinity (for example, un = log log n). For n large enough, A/ρn is close to [0,1]2 W0 (x, y)dxdy in the sparse graphon model (2) with probability close to one, and therefore rn is greater than kΘ0 k∞ . The price to pay for this data-driven choice of rn is that the rate in the risk bound (5) is multiplied by un . 2.4 Stochastic block models Given an integer k and any ρn ∈ (0, 1], consider the set of all probability matrices corresponding to k-class stochastic block model with connection probability uniformly smaller than ρn : T [k, ρn ] = {Θ0 ∈ T [k] : kΘ0 k∞ ≤ ρn } . Gao et al. [10] have proved that the minimax estimation rate over T [k, 1] is of order the following proposition extends their lower bound to arbitrarily small ρn > 0. (6) k2 n2 Proposition 2.4. Consider the network sequence model. For all k ≤ n and all 0 < ρn ≤ 1,     log(k) k 2   1 b 2 kT − Θ0 kF ≥ C min ρn + 2 , ρ2n inf sup EΘ0 2 b n n n T Θ0 ∈T [k,ρn ] + log(k) n . The (7) where EΘ0 denotes the expectation with respect to the distribution of A when the underlying probability matrix is Θ0 and inf Tb is the infimum over all estimators.   log(k) k2 k2 If ρn ≥ log(k) . This rate is achieved + + , the minimax rate of estimation is of the order ρ 2 n 2 n n n n by the restricted least squares estimator with r ≍ ρn and by the least squares estimator if the partition is k2 balanced and ρn ≥ k log(k)/n. For really sparse graphs (ρn smaller than log(k) n + n2 ), the estimation problem b = 0 and the constant least squares estimator Θ b with becomes rather trivial since both the null estimator T 2 b all entries Θij = A achieve the optimal rate ρn . 5 2.5 Smooth graphons We now use Propositions 2.1 and 2.3 to obtain rates of convergence for the probability matrix estimation when Θ0 satisfies the sparse graphon model (2) and the graphon W0 ∈ W is smooth. For any α > 0, L > 0, define the class of α-Hölder continuous functions Σ(α, L) as the set of all functions W : [0, 1]2 → [0, 1] such that |W (x′ , y ′ ) − P⌊α⌋ ((x, y), (x′ − x, y ′ − y))| ≤ L(|x′ − x|α−⌊α⌋ + |y ′ − y|α−⌊α⌋ ) for all (x′ , y ′ ), (x, y) ∈ [0, 1]2 , where ⌊α⌋ is the maximal integer less than α, and the function (x′ , y ′ ) 7→ P⌊α⌋ ((x, y), (x′ − x, y ′ − y)) is the Taylor polynomial of degree ⌊α⌋ at point (x, y). It follows from the standard embedding theorems that, for any W ∈ Σ(α, L) and any (x′ , y ′ ), (x, y) ∈ [0, 1]2 , |W (x′ , y ′ ) − W (x, y)| ≤ M (|x′ − x|α∧1 + |y ′ − y|α∧1 ) (8) where M is a constant depending only on α and L. In the following, we will use only this last property of W ∈ Σ(α, L). The following two propositions give bounds on the bias terms kΘ0 − Θ∗,n0 k2F and kΘ0 − Θ∗ k2F . Proposition 2.5. Consider the graphon model (2) with W0 ∈ Σ(α, L) where α, L > 0. Let n0 ≥ 2 and k = ⌊n/n0 ⌋. Then,    α∧1 1 1 2 2 2 E kΘ0 − Θ∗,n0 kF ≤ CM ρn . (9) n2 k2 We will also need the following proposition proved in [10], Lemma 2.1. Proposition 2.6. Consider the graphon model (2) with W0 ∈ Σ(α, L) where α, L > 0. Then, almost surely, 1 kΘ0 − Θ∗ k2F ≤ CM 2 ρ2n n2  1 k2 α∧1 . (10) Corollary 2.7. Consider the graphon model (2) with W0 ∈ Σ(α, L) where α, L > 0 and 4/n < ρn ≤ 1. Set 1  1+α∧1 l m m l 1 1/2 k= ρn n if ρn ≥ n(α∧1)−1 and k = (ρn n) 2(α∧1) if ρn < n(α∧1)−1 2(α∧1) 2(1+α∧1) (i) Assume that ρn ≥ n− 1+2(α∧1) (log(nρn )) 1+2(α∧1) and there exists n0 ≥ 2 such that k = ⌊n/n0 ⌋. Then b there exists a positive constant C depending only on L and α such that the least squares estimator Θ constructed with this choice of n0 satisfies   2+α∧1   2(α∧1) ρn log(ρn n) 1 b . (11) − Θ0 k2F ≤ C ρn1+α∧1 n− 1+α∧1 + E 2 kΘ n n (ii) Assume that r ≥ ρn ≥ Cn−1 . Then there exists a positive constant C depending only on L and α such b r satisfies that the restricted least squares estimator Θ     2+α∧1 1 br r log(ρn n) − 2(α∧1) 2 1+α∧1 1+α∧1 . (12) E 2 kΘ − Θ 0 kF ≤ C r n + n n Corollary 2.7 extends the results obtained in Gao et al. [10] to arbitrary ρn ∈ (0, 1]. To simplify the discussion assume that α ≤ 1. There are two ingredients in the rates of convergence in Corollary 2.7, the 2+α 2α n n) nonparametric rate ρn1+α n− 1+α and the clustering rate ρn log(ρ . The smoothness index α has an impact n on the rate only if α ∈ (0, 1) and only if the network is not too sparse, that is if ρn ≥ Cnα−1 (log ρn n))1+α . 2(α∧1) In [10], Gao et al. prove a lower bound showing that the rate n− 1+α∧1 + log(n) is optimal if ρn = 1. n Following the same lines as in Proposition 2.4, one can readily extend their result to prove that the rate in (12) is minimax optimal for ρn ≥ Cn−1 . 6 3 Graphon estimation problem In this section, our purpose is to estimate the graphon function W0 (·, ·) in the sparse graphon model (2). 3.1 From probability matrix estimation to graphon estimation We start by associating a graphon to any n × n probability matrix Θ. This provides a way of deriving an estimator of f0 (·, ·) = ρn W0 (·, ·) from an estimator of Θ0 . Given a n × n matrix Θ with entries in [0, 1], define the empirical graphon feΘ as the following piecewise constant function: feΘ (x, y) = Θ⌈nx⌉,⌈ny⌉ (13) for all x and y in (0, 1]. The empirical graphons associated to the least squares estimator and to the restricted least squares estimator with threshold r will be denoted by fb and fbr respectively: fb = feΘ b , fbr = feΘ br. They will be used as graphon estimators. For any estimator fˇ of f0 = ρn W0 , define the squared error Z Z δ 2 (fˇ, f0 ) := inf |f0 (τ (x), τ (y)) − fˇ(x, y)|2 dxdy (14) τ ∈M (0,1)2 where M is the set of all measure-preserving bijections τ : [0, 1] → [0, 1]. It has been proved in [12, Ch.8,13] f of graphons. that δ(·, ·) defines a metric on the quotient space W The following lemma is a simple consequence of the triangle inequality. b of Θ0 such Lemma 3.1. Consider the graphon model (2). For any W0 ∈ W, ρn > 0, and any estimator T b that T is an n × n matrix with entries in [0, 1], we have   i h  h i 1 b 2 2 e (15) E δ (fTb , f0 ) ≤ 2 E 2 kT − Θ0 kF + 2 E δ 2 feΘ0 , f0 . n b − Θ0 k2 The bound on the integrated risk in (15) is a sum of two terms. The first term containing kT F r b = Θ b and T b = Θ b . It is the estimation error term. The second has been considered in Section 2 for T term containing δ 2 (feΘ0 , f0 ) measures the distance between the true graphon f0 and its discretized version sampled at the unobserved random design points ξ1 , . . . , ξn . We call it the agnostic error. The behavior of δ 2 (feΘ0 , f0 ) depends on the topology of the considered graphons as shown below for two examples, namely, the step function graphons and the smooth graphons. 3.2 Step function graphons Define W[k] the collection of k-step graphons, that is the subset of graphons W ∈ W such that for some k×k Q ∈ Rsym and some φ : [0, 1] → [k], for all x, y ∈ [0, 1] . W (x, y) = Qφ(x),φ(y) (16)   A step function W ∈ W[k] is called balanced if λ φ−1 (1) = . . . = λ φ−1 (k) = 1/k where λ is the Lebesgue measure on [0, 1]. The agnostic error associated to step function graphons is evaluated as follows. Proposition 3.2. Consider the graphon model (2). For all integers k ≤ n, W0 ∈ W[k] and ρn > 0 we have r i h  k 2 2 e E δ fΘ0 , f0 ≤ Cρn . n Combining this result with Lemma 3.1 and Propositions 2.1 and 2.3 we obtain the following risk bounds for the least squares and restricted least squares graphon estimators. 7 Corollary 3.3. Consider the graphon model (2) with W0 ∈ W[k]. There exist absolute constants C1 and C2 such that the following holds. (i) If ρn ≥ k log(k) , n0 = ⌊n/2k⌋, and the step function W0 is balanced, then the least squares graphon n b estimator f constructed with this choice of n0 satisfies "  r #  i h  k k2 log(k) 2 2 b + ρn . + E δ f , f0 ≤ C1 ρn n2 n n (ii) If ρn ≤ r, the restricted least squares graphon estimator fbr satisfies "  r #  i h  k2 k log(k) 2 b 2 E δ fr , f0 ≤ C2 r + ρn . + n2 n n (17) As an immediate consequence of this corollary, we get the following upper bound on the minimax risk: ) ("  r #  i h  2 k k log(k) (18) ρn + ρ2n ∧ ρ2n + inf sup EW0 δ 2 fb, f0 ≤ C3 n2 n n fb W0 ∈W[k] where C3 is an absolute constant. Here, EW0 denotes the expectation with respect to the distribution of observations A′ = (Aij , 1 ≤ j < i ≤ n) when the underlying sparse graphon is ρn W0 and inf fb is the infimum over all estimators. The bound (18) follows from (17) with r = ρn and the fact that the risk of the null estimator f˜ ≡ 0 is smaller than ρ2n . The next proposition shows that the upper bound (18) is optimal in a minimax sense (up to a logarithmic factor in k in one of the regimes). Proposition 3.4. There exists a universal constant C > 0 such that for any sequence ρn > 0 and any positive integer 2 ≤ k ≤ n, ) ("  # r  i h  k−1 k2 1 2 b 2 2 (19) ρn inf sup EW0 δ f , f0 ≥ C + ρn ∧ ρn , + n2 n n fb W0 ∈W[k] where EW0 denotes the expectation with respect to the distribution of observations A′ = (Aij , 1 ≤ j < i ≤ n) when the underlying sparse graphon is ρn W0 and inf fb is the infimum over all estimators. p The proof is given in Section 4.9. Showing the rate ρ2n (k − 1)/n relies on two arguments. First, we construct a family of graphons that are well separated with respect to the δ(·, ·) distance. The difficulty comes from the fact that this is not a classical L2 distance but a minimum of the L2 distance over all measure-preserving transformations. Second, we show that the behavior of the Kullback-Leibler divergences between the graphons in this family is driven by the randomness of the latent variables ξ1 , . . . , ξn while the nature of the connection probabilities can be neglected. This argument is similar to the “data processing” inequality. Proposition 3.4 does not cover the case k = 1 (Erdős-Rényi models). In fact, in this case the constant graphon estimator fb = feA achieves the optimal rate, which is equal to ρn /n2 . The suboptimality of the bound of Proposition 3.2 for k = 1 is due to the fact that the diagonal blocks of fb and fbr are all equal to zero. By p carefully defining the diagonal blocks of these estimators, we could have achieved the optimal bound ρ2n (k − 1)/n but this would need a modification of the notation and of the proofs. The bounds (18) and (19) imply that there are three regimes depending on the sparsity parameter ρn : p √ (i) Weakly sparse graphs: ρn ≥ log(k) ∨ ( nk )3/2 . The minimax risk is of the order ρ2n k/n, and thus it is kn driven by the agnostic error arising from the lack of knowledge of the design. 8 log(k) n ∨  k 2 n ≤ ρn ≤ log(k) √ kn ∨  k 3/2 . n The risk bound (18) is driven by the   2 , which is probability matrix estimation error. The upper bound (18) is of the order ρn nk 2 + log(k) n (ii) Moderately sparse graphs: the optimal rate of probability matrix estimation, cf. Proposition 2.4. Due to (19), it is optimal up to log(k) factor with respect to the δ(·, ·) distance. 2 ∨ nk . The minimax risk is of the order ρ2n , and it is attained by (iii) Highly sparse graphs: ρn ≤ log(k) n the null estimator. In a work parallel to ours, Borgs et al. [4] provide an upper bound for the risk of step function graphon estimators in the context of privacy. If the partitions are balanced, Borgs et al. [4] obtain the bound on the agnostic error as in Proposition 3.2. When there is no privacy issues, comparing the upper bound of [4] with that of Corollary 3.3, we see that it has a suboptimal rate, which is the square root of the rate of Corollary 3.3 in the moderately sparse zone. Note also that the setting in [4] is restricted to balanced partitions while we consider more general partitions. 3.3 Smooth graphons We now derive bounds on the mean squared error of smooth graphon estimation. The analysis will be based on the results of Section 2 and on the following bound for the agnostic error associated to smooth graphons. Proposition 3.5. Consider the graphon model (2) with W0 ∈ Σ(α, L) where α, L > 0 and ρn > 0. Then h i ρ2n E δ 2 (feΘ0 , f0 ) ≤ C α∧1 n (20) where the constant C depends only on L and α. Combining Proposition 3.5 with Lemma 3.1 and with Propositions 2.1 and 2.3 we obtain the following risk bounds for the least squares and restricted least squares graphon estimators. Corollary 3.6. Consider the graphon model (2) with W0 ∈ Σ(α, L) where α, L > 0 and 4/n < ρn ≤ 1. Fix 1 l  1+α∧1 m m l 1 1/2 k= ρn n if ρn ≥ n(α∧1)−1 and k = (ρn n) 2(α∧1) if ρn < n(α∧1)−1 2(1+α∧1) 2(α∧1) (i) Assume that ρn ≥ n− 1+2(α∧1) (log(nρn )) 1+2(α∧1) and there exists n0 ≥ 2 such that k = ⌊n/n0 ⌋. Then, there exists a positive constant C1 depending only on L and α such that the least squares graphon estimator fb constructed with this choice of n0 satisfies  2+α∧1  i h  ρn log(ρn n) ρ2n − 2(α∧1) 1+α∧1 2 b 1+α∧1 n + E δ f , f0 ≤ C1 ρn (21) + α∧1 . n n (ii) Assume that r ≥ ρn ≥ Cn−1 . Then, there exists a positive constant C2 depending only on L and α such that the restricted least squares graphon estimator fbr satisfies   i h  2+α∧1 r log(ρn n) ρ2n − 2(α∧1) 2 b 1+α∧1 1+α∧1 n + E δ fr , f0 ≤ C2 r (22) + α∧1 . n n For the purpose of the discussion, assume that r ≍ ρn . If ρn ≤ nα−1 log(ρn n), the rate of convergence is  r  b − Θ0 k2 /n2 , of the order ρn log(ρn n)/n, the same as that of the probability matrix estimation risk E kΘ F cf. Corollary 2.7. Observe that the above condition is always satisfied when α ≥ 1. If ρn ≥ nα−1 log(ρn n), the rate of convergence in (22) for α ≤ 1 is of the order ρ2n /nα due to the agnostic error. This is slower than 2+α 2α the optimal nonparametric rate ρn1+α n− 1+α for probability matrix estimation. We conjecture that this loss is unavoidable when considering graphon estimation with the δ 2 (·, ·) error measure. We also note that the rates in (22) are faster than those obtained by Wolfe and Olhede [16] for the maximum likelihood estimator. In some cases, the improvement in the rate is up to n−α/2 . 9 4 Proofs In this section, we will repeatedly use Bernstein’s inequality that we state here for reader’s convenience: Let X1 , . . . , XN be independent zero-mean random variables. Suppose that |Xi | ≤ M almost surely, for all i. Then, for any t > 0, v   u N N X  u X 2M Xi ≥ t2t P t ≤ e−t . (23) E(Xi2 ) +  3  i=1 i=1 In the proofs of the upper bounds, to shorten the notation, we assume that instead of the n(n − 1)/2 observations A′ we have the symmetrized observation matrix A, and thus L(Q, z) = 1 2 X X (a,b)∈[k]×[k] (i,j)∈z −1 (a)×z −1 (b), j6=i (Aij − Qab )2 . This does not change the estimators nor the results. The changes are only in the values of constants that do not explicitly appear in the risk bounds. 4.1 Proof of Proposition 2.1 b is a least squares estimator, we have Since Θ b − Θ0 k2F ≤ kΘ0 − Θ∗ k2F + 2hΘ b − Θ0 , Ei + 2hΘ0 − Θ∗ , Ei kΘ (24) where E = A − Θ0 is the noise matrix. The last summand on the right hand side of (24) has mean zero. So, b − Θ0 , Ei. For any z ∈ Zn,k,n0 , denote by to prove the proposition it suffices to bound the expectation of hΘ e Θz the best Frobenius norm approximation of Θ0 in the collection of matrices k×k Tz := {Θ : ∃Q ∈ Rsym such that Θij = Qz(i)z(j) , i 6= j, and Θii = 0 ∀i}. We have the following decomposition: b − Θ0 , Ei = hΘ e ẑ − Θ0 , Ei + hΘ b −Θ e ẑ , Ei = (I) + (II) . hΘ In this decomposition, (I) is the error due to misclustering and (II) is the error due to the Bernoulli noise. We bound each of these errors separately. Control of (I). We apply Bernstein’s inequality (23)  together with the union bound over all z ∈ Zn,k,n0 and we  P e e E ij . Since the variance of E ij satisfies Var(E ij ) ≤ kΘ0 k∞ use that hΘz −Θ0 , Ei = 2 Θz − Θ0 1≤j<i≤n ij while E ij ∈ [−1, 1], and the cardinality of Zn,k,n0 satisfies |Zn,k,n0 | ≤ k n , we obtain   p e ẑ − Θ0 k∞ (n log(k) + t) ≤ e−t , e ẑ − Θ0 , Ei ≥ 2kΘ e ẑ − Θ0 kF kΘ0 k∞ (n log(k) + t) + 4 kΘ P hΘ 3 e ẑ are equal to averaged entries of Θ0 over blocks, we obtain that for all t > 0. Since the entries of Θ p e e ẑ − Θ0 kF kΘ0 k∞ (n log(k) + t) kΘẑ − Θ0 k∞ ≤ kΘ0 k∞ . Using this observation, decoupling the term 2kΘ via the elementary inequality 2uv ≤ u2 + v 2 and then integrating with respect to t we obtain   e ẑ − Θ0 k2 ≤ CkΘ0 k∞ n log(k) . e ẑ − Θ0 , Ei − 1 kΘ (25) E hΘ F 8 Control of (II). The control of the error due to the Bernoulli noise is more involved. We first consider the intersection of Tz with the unit ball in the Frobenius norm and construct a 1/4−net on this set. Then, using the union bound and Bernstein’s inequality, we can write a convenient bound on hΘ, Ei for any Θ from this net. Finally we control (II) using a bound on hΘ, Ei on the net and a bound on the supremum e ẑ − Θ e ẑ k∞ . We control the supremum norm kA e ẑ − Θ e ẑ k∞ using the definition of ẑ and Bernstein’s norm kA inequality. 10 e z the best Frobenius For any z ∈ Zn,k,n0 , define the set Tz,1 = {Θ ∈ Tz : kΘkF ≤ 1} and denote by A ez = A ez − Θ e z is the projection of E onto Tz . Notice that norm approximation of A in Tz . Then, E ez e z −Θ ez ′ ′ E A e z −Θ e z kF = kE e z kF maximizes hΘ , Ei over all Θ ∈ Tz,1 . Denote by Cz the minimal 1/4-net on Tz,1 in the kA Frobenius norm. To each V ∈ Cz , we associate Ve ∈ arg min Θ′ ∈Tz,1 ∩ Bk·kF (V ,1/4) kΘ′ k∞ , which is a matrix minimizing the entry-wise supremum norm over the Frobenius ball Bk·kF (V , 1/4) of radius 1/4 centered at V . Finally, define Cez := {Ve : V ∈ Cz }. A standard bound for covering numbers implies that log |Cez | ≤ Ck 2 , where |S| denotes the cardinality of set S. By Bernstein’s inequality combined with the union bound, we find that with probability greater than 1 − e−t , p 4 hΘ, Ei ≤ 2 kΘ0 k∞ (n log(k) + k 2 + t) + kΘk∞ (n log(k) + k 2 + t) 3 ˜ simultaneously for all Θ ∈ Cz with any z ∈ Zn,k,n0 . Here, we have used that kΘkF ≤ 1 for all Θ ∈ C˜z . e ẑ − Θ e ẑ 6= 0. By the definition of C˜z , there exists Θ ∈ Ceẑ , such that Assume w.l.o.g. that A kΘ − e ẑ −Θ e ẑ A e ẑ −Θ e ẑ kF kA  Note that for this Θ, the matrix 2 Θ − e e Aẑ −Θẑ h kA e −Θ e k , Ei ≤ hΘ, Ei + ẑ since e ẑ −Θ e ẑ A e ẑ −Θ e ẑ kF kA ẑ F kF ≤ 1 2 e ẑ −Θ e ẑ A e ẑ −Θ e ẑ kF kA 1 2 and kΘk∞ ≤  e ẑ − Θ e ẑ k∞ kA . e ẑ − Θ e ẑ kF kA belongs to Tz,1 . Thus, max hΘ′ , Ei = hΘ, Ei + ′ Θ ∈Tẑ,1 E 1D A e ẑ −Θ e ẑ , E e ẑ −Θ e ẑ kF 2 kA maximizes hΘ′ , Ei over all Θ′ ∈ Tẑ,1 . Using the last two displays we obtain that e ẑ − Θ e ẑ , Ei ≤ 4kA e ẑ − Θ e ẑ kF hA p 8 e 2 e kΘ0 k∞ (n log(k) + k 2 + t) + kA ẑ − Θẑ k∞ (n log(k) + k + t) 3 (26) with probability greater than 1 − e−t . e ẑ − Θ e ẑ k∞ . Since A e ẑ − Θ e ẑ = E e ẑ we have Next, we are looking for a bound on kA P i h l′ 6=l: ẑ(l′ )=ẑ(i),ẑ(l)=ẑ(j) E l′ l e e = ′ Aẑ − Θẑ |(l , l) : l′ 6= l, ẑ(l′ ) = ẑ(i), ẑ(l) = ẑ(j)| ij e ẑ − Θ e ẑ k∞ ≤ sup for all i 6= j. Consequently, we have kA m=n0 ,...,n sups=n0 ,...,n Xms where Xms := sup sup V1 :|V1 |=m V2 :|V2 |=s P (i,j)∈V1 ×V2 : i6=j E ij ms − |V1 ∩ V2 | . Since n0 ≥ ms − |V1 ∩ V2 | ≥ ms − m ∧ s ≥ ms/2 for all m, s ≥ n0 . Furthermore |{V1 : |V1 | =  2, we have n m}| ≤ m ≤ (en/m)m . Therefore, Bernstein’s inequality combined with the union bound over V1 , V2 leads to !# " r m log(en/m) + s log(en/s) + t m log(en/m) + s log(en/s) + t kΘ0 k∞ ≥ 1 − 2e−t + P Xms ≤ C ms ms for any t > 0. From a union bound over all integers m, s ∈ [n0 , n], we conclude that    e ẑ − Θ e ẑ k∞ ≤ C kΘ0 k∞ + log(n/n0 ) + t ≥ 1 − 2e−t . P kA n0 11 (27) Decoupling (26) by use of the inequality 2uv ≤ u2 + v 2 and combining the result with (27) we obtain e ẑ − Θ e ẑ , Ei hA ≤  e ẑ − Θ e ẑ k2 kA F + C kΘ0 k∞ (n log(k) + k 2 + t) 16 log(n/n0 )(n log(k) + k 2 ) + t(n log(k) + k 2 + t)  + n0 with probability greater than 1 − 3e−t . Integrating with respect to t leads to # "   e ẑ − Θ e ẑ k2 log(n/n0 )(n log(k) + k 2 ) kA 2 F e e ≤ C kΘ0 k∞ (n log(k) + k ) + . E hAẑ − Θẑ , Ei − 16 n0 (28) b =A e ẑ , and hence kΘ e ẑ − Θ0 kF ≤ kΘ b − Θ0 kF by definition of Θ e ẑ . Thus, kA e ẑ − Θ e ẑ kF = Now, note that Θ b e b kΘ − Θẑ kF ≤ 2kΘ − Θ0 kF . These remarks, together with (25) and (28), imply   h i 3 log(n/n0 )(n log(k) + k 2 ) 2 2 b b E hΘ − Θ0 , Ei ≤ E kΘ − Θ0 kF + C kΘ0 k∞ (n log(k) + k ) + . 8 n0 The result of the proposition now follows from the last inequality and (24). 4.2 Proof of Proposition 2.3 We first follow the lines of the proof of Proposition 2.1. As there, we have r r b −Θ e ẑr , Ei + 2hΘ0 − Θ∗ , Ei. b − Θ0 k2 ≤ kΘ0 − Θ∗ k2 + 2hΘ e ẑr − Θ0 , Ei + 2hΘ kΘ F F Here, EhΘ0 − Θ∗ , Ei = 0, and analogously to (25),   1 e 2 e E hΘẑr − Θ0 , Ei − kΘẑr − Θ0 kF ≤ CkΘ0 k∞ n log(k). 8 (29) br − Θ e ẑr , Ei, which corresponds to the term (II) in It remains to obtain a bound on the expectation of hΘ the proof of Proposition 2.1 (the error due to the Bernoulli noise). To do this, we consider the subset A of matrices in Tẑr such that their supremum norm is bounded by 2r and Frobenius norm is bounded by br − Θ e ẑr belongs to this set it is enough to obtain a bound on the supremum of hΘ, Ei br − Θ e ẑr kF . As Θ kΘ for Θ ∈ A. To control this supremum, we construct a finite subset Cz∗ that approximates well the set A both in the Frobenius norm and in the supremum norm. Consider the set br −Θ e ẑr kF }. A = {Θ ∈ Tẑr : kΘk∞ ≤ 2r, kΘkF ≤ kΘ Then, br − Θ e ẑr , Ei ≤ maxhΘ, Ei := hT̂ , EiF hΘ Θ∈A (30) where T̂ is a matrix in A that achieves the maximum. If kT̂ kF < 2 r we have a trivial bound hT̂ , EiF ≤ 2rn since all components of E belong to [−1, 1]. Thus, it suffices to consider the case kT̂ kF ≥ 2r. In order to bound hT̂ , EiF in this case, we construct a finite subset of Tẑr that approximates well T̂ both in the Frobenius norm and in the supremum norm. For each z ∈ Zn,k , let Cz be a minimal 1/4-net of Tz,1 in the Frobenius norm. Set ǫ0 = r and ǫq = 2q ǫ0 for any integer q = 1, . . . , qmax , where qmax is the smallest integer such that 2rn ≤ ǫqmax . Cearly, qmax ≤ C log(n). For any V ∈ Cz , any q = 0, . . . , qmax , and any matrix U ∈ {−1, 0, 1}k×k , define a matrix V q,U ,z ∈ Rn×n ,z ,z such that V q,U = 0 for all i ∈ [n], and for all i 6= j, with elements V q,U ij ii ,z V q,U = sign(V ij ) (|ǫq V ij | ∧ (2r)) (1 − |U z(i)z(j) |) + rU z(i)z(j) . ij Finally, denote by Cz∗ the set of all such matrices: Cz∗ := {V q,U ,z : V ∈ Cz , q = 0, . . . , qmax , U ∈ {−1, 0, 1}k×k }. 12 (31) For any z ∈ Zn,k we have log |Cz∗ | ≤ C(k 2 + log log(n)) while log |Zn,k | ≤ n log(k). Also, the variance of E ij satisfies Var(E ij ) ≤ kΘ0 k∞ ≤ r, and E ij ∈ [−1, 1]. Thus, from Bernstein’s inequality combined with the union bound we obtain that, with probability greater than 1 − e−t , hV , Ei ≤ 2kV kF p 4 r(k 2 + n log(k) + t) + r(k 2 + n log(k) + t) 3 simultaneously for all matrices V ∈ Cz∗ and all z ∈ Zn,k . Here, we have used that kV k∞ ≤ 2r for all V ∈ Cz∗ , cf. (31). It follows that, with probability greater than 1 − e−t , hV , Ei − 1 kV k2F ≤ Cr(k 2 + n log(k) + t) 50 (32) simultaneously for all matrices V ∈ Cz∗ and all z ∈ Zn,k . We now use the following lemma proved in Subsection 4.10. Lemma 4.1. If kT̂ kF ≥ 2r there exists a matrix V̂ in Cẑ∗r , such that • kT̂ − V̂ kF ≤ kT̂ kF /4, • kT̂ − V̂ k∞ ≤ r. Thus, on the event kT̂ kF ≥ r, as a consequence of Lemma 4.1 we obtain that 2(T̂ − V̂ ) ∈ A. This and the definition of T̂ imply hT̂ − V̂ , Ei ≤ hT̂ , EiF /2, so that hT̂ , EiF ≤ 2hV̂ , Ei, and thus Furthermore, by Lemma 4.1 br − Θ e ẑr , Ei/2 ≤ hV̂ , Ei. hΘ r b −Θ e ẑr k/4. kV̂ kF ≤ 5kT̂ kF /4 ≤ 5kΘ These remarks (recall that they hold on the event kT̂ kF ≥ r), and (32) yield " ! # br − Θ e ẑr k2 r k Θ F b −Θ e ẑr , Ei − P hΘ 1{kT̂ kF ≥r} ≥ Cr(k 2 + n log(k) + t) ≤ e−t 16 br − Θ e ẑr , Ei ≤ rn for kT̂ kF < r we obtain for all t > 0. Integrating with respect to t and using that hΘ " # br − Θ e ẑr k2 r k Θ F b −Θ e ẑr , Ei − EΘ0 hΘ ≤ Cr(n log(k) + k 2 ). 16 In view of this inequality and (29) the proof is now finished by the same argument as in Proposition 2.1. 4.3 Proof of Proposition 2.4 The proof follows the lines of Theorem 2.2 in [10]. So, for brevity, we only outline the differences from that proof. The remaining details can be found in [10]. First, note that to prove the theorem it suffices to obtain separately the lower bounds of the order ρn (k/n)2 ∧ ρ2n and of the order ρn log(k)/n ∧ ρ2n . Next, note that the Kullback-Leibler divergence K(ρn p, ρn q) between two Bernoulli distributions with parameters ρn p and ρn q such that 1/4 < p, q < 3/4 satisfies     1 − ρn q q + (1 − ρn q) log (33) K(ρn p, ρn q) = ρn q log p 1 − ρn p q(q − p) 1 − ρn q (q − p)2 16 ≤ ρn + ρn (p − q) = ρn ≤ ρn (q − p)2 . p 1 − ρn p p(1 − ρn p) 3 The main difference from the proof in [10] is that now the matrices Θ0 defining the probability distributions in the Fano lemma depend on ρn . Namely, to prove the ρn (k/n)2 ∧ρ2n bound we consider matrices of connection 13 √ √  probabilities with elements ρ2n + c1 ρn nk ∧ ρn ωab with suitably chosen ωab ∈ {0, 1} and c1 > 0 small enough (for ρn = 1 this coincides with the definition of elements Qω ab in [10]). Then the squared Frobenius distance between matrices Θ0 in the corresponding set is of the order n2 (ρn (k/n)2 ∧ ρ2n ), which leads to the desired rate, whereas in view of (33) theKullback-Leibler divergences between the probability measures in 2 this set are bounded by Cn2 ρn nk2 ρn ∧ 1 ≤ Ck 2 . Thus, the lower bound of the order ρn (k/n)2 ∧ ρ2n follows. The argument used to prove the lower bound of the order ρn log(k)/n ∧ ρ2n is quite analogous. To this end, we modify the corresponding construction of [10] only in that we take the connection probabilities of q  √ √ log(k) ρn ∧ ρn ωa with suitably chosen ωa ∈ {0, 1} and c2 > 0 small enough (for the form 2 + c2 ρn n ρn = 1 this coincides with the definition of probabilities Ba in the proof of [10]). 4.4 Proof of Proposition 2.5 We prove that there exists a random matrix Θ measurable with respect to ξ1 , . . . , ξn and with values in Tn0 [k] satisfying  α∧1   1 1 2 2 2 E ≤ CM ρ Θk kΘ − . (34) 0 n F 2 n k2 Obviously, this implies (9). To obtain such Θ we construct a balanced partition z ∗ where the first k − 1 classes contain exactly n0 elements and the last class contains n − n0 (k − 1) elements. Then we construct Θ using block averages on the blocks given by z ∗ . Let n = n0 k + r where r is a remainder term between 0 and n0 − 1. Define z ∗ : [n] → [k] by  −1 (z ∗ ) (a) = i ∈ [n] : ξi = ξ(j) for some j ∈ [(a − 1)n0 + 1, an0 ] for each a ∈ {1, . . . , k − 1} and (z ∗ ) −1  (k) = i ∈ [n] : ξi = ξ(j) for some j ∈ [(k − 1)n0 + 1, n] where ξ(j) denotes the jth order statistic. Note that with this partition the first k − 1 classes contain n0 elements and the last class contains n0 + r elements. We define  2 n , if a 6= b, a 6= k, b 6= k,    0 (n0 + r)n0 , if a = k or b = k and a 6= b, ∗ nab = (n − 1)n , if a = b and a 6= k,  0 0   (n0 + r)(n0 + r − 1), if a = b = k. Using the partition z ∗ , we define the block average Q∗ab = 1 n∗ab X ρn W (ξi , ξj ). i∈(z ∗ )−1 (a),j∈(z ∗ )−1 (b),i6=j Finally, the approximation Θ of Θ0 is defined as a symmetric matrix with entries Θij = Q∗z∗ (i)z∗ (j) for all i 6= j and Θii = 0 for all i. We have   X X 1 1 2 2 E (Θij − Q∗ab ) kΘ0 − ΘkF = 2 E 2 n n a∈[k],b∈[k] i∈(z ∗ )−1 (a),j∈(z ∗ )−1 (b),i6=j !2 P X X 1 u∈(z ∗ )−1 (a),v∈(z ∗ )−1 (b),u6=v ρn W (ξu , ξv ) = 2 E . ρn W (ξi , ξj ) − n n∗ab ∗ −1 ∗ −1 a∈[k],b∈[k] i∈(z ) (a),j∈(z ) (b),i6=j 14 Define Ja = [(a − 1)n0 + 1, an0 ] if a < k and Jk = [(k − 1)n0 + 1, n]. By definition of z ∗ we have E  1 kΘ0 − Θk2F n2  ρ2 = n2 n ρ2 ≤ n2 n X X E i∈Ja ,j∈Jb ,i6=j a∈[k],b∈[k] X X a∈[k],b∈[k] i∈Ja ,j∈Jb ,i6=j  W (ξ(i) , ξ(j) ) −   1 n∗ab X P u∈Ja ,v∈Jb ,u6=v u∈Ja ,v∈Jb ,u6=v W (ξ(u) , ξ(v) ) n∗ab 2  2 E W (ξ(i) , ξ(j) ) − W (ξ(u) , ξ(v) )  . (35) Using (8) and Jensen’s inequality we obtain    2 ′ ′ 2 E W (ξ(i) , ξ(j) ) − W (ξ(u) , ξ(v) ) ≤ M 2 E |ξ(i) − ξ(u) |α + |ξ(j) − ξ(v) |α   ′ ′ ≤ 2M 2 (E |ξ(i) − ξ(u) |2 )α + (E |ξ(j) − ξ(v) |2 )α where we set for brevity α′ = α ∧ 1. Note that by definition of z ∗ we have |i − u| < 2n0 and |j − v| < 2n0 . Therefore, application of Lemma 4.10 (see Section 4.10) leads to 2 ′ ′ E W (ξ(i) , ξ(j) ) − W (ξ(u) , ξ(v) ) ≤ C(n0 /n)2α ≤ C(1/k)2α where we have used that k = ⌊n/n0 ⌋. Plugging this bound into (35) proves the proposition. 4.5 Proof of Proposition 3.2 For any W0 ∈ W[k], we first construct an ordered graphon W ′ isomorphic to W0 and we set f ′ = ρn W ′ . Then we construct an ordered empirical graphon fb′ isomorphic to feΘ0 and we estimate the δ(·, ·)-distance between these two ordered versions f ′ and fb′ . Consider the matrix Θ′0 with entries (Θ′0 )ij = ρn W (ξi , ξj ) for all i, j. As opposed to Θ0 , the diagonal entries of Θ′0 are not constrained to be null. By the triangle inequality, we get i i h  i h  h  . (36) E δ 2 feΘ0 , f0 ≤ 2 E δ 2 feΘ0 , feΘ′0 + 2 E δ 2 feΘ′0 , f0 Since the entries of Θ0 coincide with those of Θ′0 outside the diagonal, the difference feΘ0 − feΘ′0 is null outside of a set of measure 1/n. Also, the entries of Θ′0 are smaller than ρn . It follows that E[δ 2 (feΘ0 , feΘ′0 )] ≤ ρ2n /n. Hence, it suffices to prove that p E[δ 2 (feΘ′0 , f0 )] ≤ Cρ2n k/n.   We prove this inequality by induction on k. The result is trivial for k = 1 as δ 2 fbΘ′0 , f0 = 0. Fix some k×k k > 1 and assume that the result is valid for W[k − 1]. Consider any W0 ∈ W[k] and let Q ∈ Rsym and φ : [0, 1] → [k] be associated to W0 as in definition (16). We assume w.l.o.g. that all the rows of Q are distinct and that λa := λ(φ−1 (a)) is positive for all a ∈ [k], since otherwise W0 belongs to W[k − 1]. For any b ∈ [k], define the cumulative distribution function b X Fφ (b) = λa a=1 and set Fφ (0) = 0. For any (a, b) ∈ [k] × [k] define Πab (φ) = [Fφ (a − 1), Fφ (a)) × [Fφ (b − 1), Fφ (b)) where 1A (·) denotes the indicator function of set A. Finally, we consider the ordered graphon ′ W (x, y) = k k X X Qab 1Πab (φ) (x, y) . a=1 b=1 15 Obviously, f ′ = ρn W ′ is weakly isomorphic to f0 = ρn W0 . Let n X ba = 1 λ 1{ξi ∈φ−1 (a)} n i=1 be the (unobserved) empirical frequency of group a. Here, ξ1 , . . . , ξn are the i.i.d. uniformly distributed random variables in the graphon model (2). Pk Pk Note that the relations a=1 λa = a=1 λ̂a = 1 imply X ba a:λa >λ ba ) = (λa − λ X ba >λa a:λ (λ̂a − λa ). (37) Consider a function ψ : [0, 1] → [k] such that: ba ∧ λa ), (i) ψ(x) = a for all a ∈ [k] and x ∈ [Fφ (a − 1), Fφ (a − 1) + λ ba for all a ∈ [k]. (ii) λ(ψ −1 (a)) = λ ba , conditions (i) and (ii) are trivially satisfied Such a function ψ exists. Indeed, for each a such that λa > λ −1 b ba left if we take ψ (a) = [Fφ (a − 1), Fφ (a − 1) + λa ), and there is an interval of Lebesgue measure λa − λ non-assigned. Summing over all such a, we see that there is a union of intervals with Lebesgue measure P ba ) left non-assigned. On the other hand, for a such that λa < λ ba , we must have m+ := a:λa >λba (λa − λ ψ(x) = a for x ∈ [Fφ (a − 1), Fφ (a − 1) + λa ) to satisfy (i), while to meet condition (ii) we need additionally to assign ψ(x) = a for x on a set of Lebesgue measure λ̂a − λa . Summing over all such a, we need additionally P ba ) to make such assignments. But this set is to find a set of Lebesgue measure m− := a:λba >λa (λa − λ ba since m+ = m− by virtue readily available as a union of non-assigned intervals for all a such that λa > λ of (37). Finally define the graphon fb′ (x, y) = Qψ(x),ψ(y) . Notice that in view of (ii) fb′ is weakly isomorphic to f the empirical graphon feΘ . Since δ(·, ·) is a metric on the quotient space W, 0 δ (feΘ0 , f0 ) = δ 2 (fb′ , f ′ ) ≤ 2 Z [0,1]2 |fb′ (x, y) − f ′ (x, y)|2 dxdy ≤ ρ2n Z [0,1]2 1{f ′ (x,y)6=fb′ (x,y)} dxdy. The two functions f0 (x, y) and fb(x, y) are equal except possibly the case when either x or y belongs to one ba ∧ λa , Fφ (a − 1) + λa ) for a ∈ [k]. Hence, the Lebesgue measure of the set of the intervals [Fφ (a − 1) + λ Pk ba |. Thus, {(x, y) : f ′ (x, y) 6= fb′ (x, y)} is not greater than 2m+ = m+ + m− = a=1 |λa − λ δ (fbΘ′0 , f0 ) ≤ ρ2n 2 k X a=1 ba |. |λa − λ ba has a binomial distribution with Since ξ1 , . . . , ξn are i.i.d. uniformly distributed random variables, nλ q ba |] ≤ λa (1−λa ) . Applying again parameters (n, λa ). By the Cauchy-Schwarz inequality we get E[|λa − λ n the Cauchy-Schwarz inequality, we conclude that r k h i k ρ2n X p 2 b ′ 2 λa ≤ ρn . E δ (fΘ0 , f0 ) ≤ √ n a=1 n 4.6 Proof of Proposition 3.5 Arguing as in the proof of Proposition 3.2, we have i i 2ρ2 h  h  E δ 2 feΘ0 , f0 ≤ n + 2 E δ 2 feΘ′0 , f0 , n 16 where we recall that Θ′0 is defined by (Θ′0 )ij = ρn W (ξi , ξj ) for all i, j. Hence, it suffices to prove that i h  ρ2n E δ 2 feΘ′0 , f0 ≤ C α∧1 . n We have n Z   X δ 2 feΘ′0 , f0 = inf τ ∈M i,j=1 j/n (j−1)/n Z i/n (i−1)/n |f0 (τ (x), τ (y)) − (Θ′0 )ij |2 dxdy. The infimum over all measure-preserving bijections is smaller than the minimum over the subclass of measurepreserving bijections τ satisfying the following property Z σ(j)/n Z σ(i)/n Z j/n Z i/n W (x, y)dxdy W (τ (x), τ (y))dxdy = (j−1)/n (σ(j)−1)/n (i−1)/n (σ(i)−1)/n for some permutation σ = (σ(1), . . . , σ(n)) of {1, . . . , n}. Such τ correspond to permutations of intervals [(i − 1)/n, i/n] in accordance with σ. For (x, y) ∈ [(σ(i) − 1)/n, σ(i)/n] × [(σ(j) − 1)/n, σ(j)/n] we use the bound   σ(i) σ(j) |ρn W0 (x, y) − ρn W0 (ξi , ξj )| ≤ ρn W0 (x, y) − ρn W0 n+1 , n+1 (38)     σ(i) σ(j) , n+1 − ρn W0 ξ(σ(i)) , ξ(σ(j)) + ρn W0 ξ(σ(i)) , ξ(σ(j)) − ρn W0 (ξi , ξj ) + ρn W0 n+1 where ξ(m) denotes the mth largest element of the set {ξ1 , . . . , ξn }. We choose a random permutation σ = (σ(1), . . . , σ(n)) such that ξσ−1 (1) ≤ ξσ−1 (2) ≤ · · · ≤ ξσ−1 (n) . With this choice of σ, we have that   ξ(σ(i)) , ξ(σ(j)) = (ξi , ξj ) and ρn W0 ξ(σ(i)) , ξ(σ(j)) − ρn W0 (ξi , ξj ) = 0 almost surely. For the first summand in (38), as W0 (·, ·) satisfies (8) and   σ(i) σ(j) n+1 , n+1 ∈ [(σ(i) − 1)/n, σ(i)/n] × [(σ(j) − 1)/n, σ(j)/n] we get W0 (x, y) − W0  σ(i) σ(j) n+1 , n+1  ′ ≤ 2Ln−α , (39) where we set for brevity α′ = α ∧ 1. To evaluate the contribution of the second summand on the right hand side of (38) we use that     α′ α′  σ(i) σ(j) σ(i) σ(j) , n+1 − W0 ξ(σ(i)) , ξ(σ(j)) ≤ M n+1 − ξ(σ(i)) + n+1 − ξ(σ(j)) . (40) W0 n+1 Squaring, integrating and taking expectation we obtain  X Z σ(j)/n Z σ(i)/n σ(i)  E n+1 − ξ(σ(i)) i,j (σ(j)−1)/n " n X 1 = E n m=1 ≤ max E m=1,...,n m n+1  (σ(i)−1)/n − ξ(m) m n+1 2α′ − ξ(m) # 2α′  ≤ max m=1,...,n 2α′  dxdy  α′ ′ Var(ξ(m) ) ≤ Cn−α (41) m where we have used the relations E(ξ(m) ) = n+1 , Var(ξ(m) ) ≤ C/n, and Jensen’s inequality. The contribution corresponding to the second summand on the right hand side of (40) is evaluated analogously. Combining (39) – (41) with (38) we get h  i ′ E δ 2 feΘ′0 , f0 ≤ Cρ2n n−α . 17 4.7 Proof of Corollary 2.7 To prove the first part of the corollary, notice that its assumptions imply that the partition is balanced and ρn ≥ Ck log(k)/n. Thus, similarly to Corollary 2.2, we obtain from Proposition 2.1 that     log(k) k 2 C 1 b − Θ0 k2F ≤ 2 kΘ0 − Θ∗,n0 k2F + Cρn + 2 . E 2 kΘ n n n n Using Proposition 2.5 to bound the expectation of the first summand on the right hand side we get      1 b ρ2n log(k) k 2 2 E 2 kΘ − Θ0 kF ≤ C . (42) + 2 + ρn n n n k 2(α∧1) m l m l  1 1 Now (11) follows from (42) by taking k = ρn n2 2(1+α∧1) if ρn ≥ n(α∧1)−1 and k = (ρn n) 2(α∧1) if ρn < n(α∧1)−1 . Bound (12) for the restricted least squares estimator follows from Propositions 2.3 and 2.6. 4.8 Proof of Corollary 3.3 To prove part (i) of the corollary, we control the size of each block of Θ0 . For any a in [k], the number Na of nodes belonging to block a is a binomial random variable with parameters (n, 1/k) since the graphon W is balanced. By Bernstein’s inequality,   h i n t2 /2 P Na − ≤ −t ≤ exp − . k n/k + t/3 Taking t = n/(2k) in the above inequality, we obtain h ni ≤ exp[−Cn/k]. P Na ≤ 2k This inequlity and the union bound over all a ∈ [k] imply that the size of all blocks of Θ0 is greater than n0 with probability greater than 1 − k exp(−Cn/k). Together with Propositions 2.1 and 3.2, this yields r ! i h  2 k k log(k) E δ 2 fb, f0 ≤ C ′ ρn 2 + ρn + k exp(−Cn/k) , + ρ2n n n n where the last summand is negligible. The second part of the corollary is a straightforward consequence of Propositions 2.1 and 2.3. 4.9 Proof of Proposition 3.4 It is enough to prove separately the following three minimax lower bounds. r k−1 2 b 2 , inf sup EW0 [δ (f , ρn W0 )] ≥ Cρn b n f W0 ∈W[k]   k2 inf sup EW0 [δ 2 (fb, ρn W0 )] ≥ C ρn 2 ∧ ρ2n , n fb W0 ∈W[k] ρ  n inf sup EW0 [δ 2 (fb, ρn W0 )] ≥ C ∧ ρ2n . n fb W0 ∈W[2] 4.9.1 (43) (44) (45) Proof of (43) Without loss of generality, it suffices to prove (43) for k = 2 and for all k = 16k̄ with integer k̄ large enough. Indeed, for any k > 2, there exists k ′ ≤ k such that k − k ′ ≤ 15 and k ′ is either a multiple of 16 or equal to 2, so that r r i h  i h  C 2 k−1 k′ − 1 2 2 b 2 b ≥ ρn . inf sup EW0 δ f ; f0 ≥ inf sup EW0 δ f ; f0 ≥ Cρn n 4 n fb W0 ∈W[k′ ] fb W0 ∈W[k] 18 We first consider k which is a multiple of 16. The case k = 2 is sketched afterwards. The proof follows the general scheme of reduction to testing of finite number of hypotheses (cf., e.g., [15]). The main difficulty is to obtain the necessary lower bound for the distance δ(·, ·) between the graphons generating the hypotheses since this distance is defined as a minimum over all measure-preserving bijections. We start by constructing a matrix B from which the step-function graphons will be derived. Lemma 4.2. Fix η0 = 1/16 and assume that k is a multiple of 16 and is greater than some constant. There exists a k × k symmetric {−1, 1} matrix B satisfying the following two properties. • For any (a, b) ∈ [k] with a 6= b, the inner product between the two columns hB a,· , B b,· i satisfies |hB a,· , B b,· i| ≤ k/4. (46) • For any two subsets X and Y of [k] satisfying |X| = |Y | = η0 k and X ∩ Y = ∅ and any labelings π1 : [η0 k] → X and π2 : [η0 k] → Y , we have η0 k X [B π1 (a),π1 (b) − B π2 (a),π2 (b) ]2 ≥ η02 k 2 /2. (47) a,b=1 Note that any Hadamard matrix satisfies condition (46) since its columns are orthogonal. Unfortunately, the second condition (47) seems difficult to check for such matrices. This is why we adopt a probabilistic approach in the proof of this lemma showing that, with positive probability, a symmetric matrix with independent Rademacher entries satisfies the above conditions. The graphon “hypotheses” that we consider in this proof are generated by the matrix of connection probabilities Q := (J + B)/2 where B is a matrix from Lemma 4.2 and J is a k × k matrix with all entries equal to 1. Pk Fix some ǫ < 1/(4k). Denote by C0 the collection of vectors u ∈ {−ǫ, ǫ}k satisfying a=1 ua = 0. For any u P ∈ C0 , define the cumulative distribution Fu on {0, . . . , k} by the relations Fu (0) = 0 and Fu (a) = a/k + ab=1 ub for a ∈ [k]. Then, set Πab (u) = [Fu (a − 1), Fu (a)) × [Fu (b − 1), Fu (b)) and define the graphon Wu ∈ W[k] by X Qab 1Πab (u) (x, y). Wu (x, y) = (a,b)∈[k]×[k] The graphon Wu is slightly unbalanced as the weight of each class is either 1/k − ǫ or 1/k + ǫ. Let PWu denote the distribution of observations A′ := (Aij , 1 ≤ j < i ≤ n) sampled according to the sparse graphon model (2) with W0 = Wu . Since the matrix Q is fixed the difficulty in distinguishing between the distributions PWu and PWv for u 6= v comes from the randomness of the design points ξ1 , . . . , ξn in the graphon model (2) rather than from the randomness of the realization of A′ conditionally on ξ1 , . . . , ξn . The following lemma gives a bound on the Kullback-Leibler divergences K(PWu , PWv ) between PWu and PWv . Lemma 4.3. For all u, v ∈ C0 we have K(PWu , PWv ) ≤ 16nk 2 ǫ2 /3. Next, we need the following combinatorial result in the spirit of the Varshamov-Gilbert lemma [15, Chapter 2]. It shows that there exists a large subset of C0 composed of vectors u that are well separated in the Hamming distance. We state this result in terms of the sets Au := {a ∈ [k] : ua = ǫ} where u ∈ C0 . Notice that, by definition of C0 , we have |Au | = k/2 for all u ∈ C0 . Lemma 4.4. There exists a subset C of C0 such that log |C| ≥ k/16 and |Au ∆Av | > k/4 (48) for any u 6= v ∈ C. Lemmas 4.4 and 4.2 are used to obtain the following lower bound on the distance δ(Wu , Wv ) between two distinct graphons in C. This lemma is the main ingredient of the proof. 19 Lemma 4.5. For all u, v ∈ C such that u 6= v, the graphons Wu and Wv are well separated in the δ(·, ·) distance: δ 2 (Wu , Wv ) ≥ η02 kǫ/2, so that δ 2 (ρn Wu , ρn Wv ) ≥ ρ2n η02 kǫ/2, Now, choose ǫ such that ǫ2 = 3 (16)3 nk . ∀ u, v ∈ C : u 6= v. (49) Then it follows from Lemmas 4.3 and 4.4 that K(PWu , PWv ) ≤ 1 log |C|, 16 ∀ u, v ∈ C : u 6= v. (50) In view of Theorem 2.7 in [15], inequalities (49) and (50) imply that inf sup fb W0 ∈W[k] EW0 [δ (fb, ρn W0 )] ≥ Cρ2n 2 r k n where C > 0 is an absolute constant. This completes the proof for the case when k is a large enough multiple of 16. Let now k = 2.Then, wereduce the lower bound to the problem of testing two hypotheses. We consider 1 1 the matrix B = and the two corresponding graphons Wu1 and Wu2 with u1 = (ǫ, −ǫ) and 1 −1 u2 = (−ǫ, ǫ). Adapting the argument of Lemma 4.5, one can prove that δ 2 (ρn Wu1 , ρn Wu2 ) ≥ ρ2n ǫ. Moreover, exactly as in Lemma 4.3, the Kullback-Leibler divergence between PWu1 and PWu2 is bounded by Cnǫ2 . Taking ǫ of the order n−1/2 and using Theorem 2.2 from [15] we conclude that r 1 2 b 2 inf sup EW0 [δ (f , ρn W0 )] ≥ Cρn b n f W0 ∈W[2] where C > 0 is an absolute constant. Proof of Lemma 4.2. Let B be a k × k symmetric random matrix such that its elements B a,b , a ≤ b ∈ [k], are independent Rademacher random variables. It suffices to prove that B satisfies properties (46) and (47) with positive probability. Fix a 6= b. Then, hB a,· , B b,· i is distributed as a sum of k independent Rademacher variables. By Hoeffindg’s inequality P [|hB a,· , B b,· i| ≥ k/4] ≤ 2 exp[−k/32]. By the union bound, property (46) is satisfied for all a 6= b with probability greater than 1 − 2k 2 exp[−k/32]. For k larger than some absolute constant, this probability is greater than 3/4. Fix any two subsets X and Y of [k] such that |X| = |Y | = η0 k and X ∩ Y = ∅. Let π1 and π2 be any Pη0 k [B π1 (a),π1 (b) − B π2 (a),π2 (b) ]2 . By symmetry of B, two labelings of X and Y . Then, define Tπ1 ,π2 := a,b=1 P Tπ1 ,π2 /8 is greater than a<b [B π1 (a),π1 (b) − B π2 (a),π2 (b) ]2 /4 (we have put aside the diagonal terms) where all the summands [B π1 (a),π1 (b) − B π2 (a),π2 (b) ]2 /4 are independent Bernoulli random variables with parameter 1/2 since π1 ([η0 k]) ∩ π2 ([η0 k]) = ∅. Thus, Tπ1 ,π2 /8 is stochastically greater than a binomial random variable with parameters η0 k(η0 k − 1)/2 and 1/2. Applying again Hoeffding’s inequality, we find   2 2  η0 k η k η2 k2 ≤ exp − 0 . P Tπ1 ,π2 /8 ≤ 0 − 8 4 32 For k large enough we have η0 k/4 ≤ η02 k 2 /16 so that Tπ1 ,π2 ≥ η02 k 2 /2 with probability greater than 1 − exp(−η02 k 2 /32). There are less than k 2η0 k such maps (π1 , π2 ) so that property (47) is satisfied with probability greater than 1 − exp(2η0 k log(k) − η02 k 2 /32). Again, this probability is greater than 3/4 for k large enough. Applying once again the union bound we find that properties (46) and (47) are satisfied with probability greater than 1/2. 20 Proof of Lemma 4.4. Let C be a maximal subset C0 of points u such that the corresponding Au are k/4separated with respect to the measure of symmetric difference distance. By maximality of C, the union of all balls in the Hamming distance centered at u ∈ C with radii k/4 covers C0 . Denoting by B[u, k/4] such a ball, we obtain by a volumetric argument |B[u, k/4]|/|C0| ≥ |C|−1 . (51) If we endow C0 with the uniform probability, then |B[u, k/4]| |C0 |−1 is the probability to draw a point from B[u, k/4]. Note that a point v is in B[u, k/4] if |Av \ Au | ≤ k/8. One can construct the set Av doing k/2 sampling without replacement from the set [k]. We call an a ∈ [k] a success if a ∈ Au . There are k/2 of them. Let Sk denotes the number of success, then Sk follows an hypergeometric distribution with parameters (k, k/2, k/2) and we have |B[u, k/4]| = P[Sk ≥ 3k/8] . |C0 | Now we only have to bound the deviations of Sk . It follows from [1, p.173] that Sk has the same distribution as the random variable E[η|B] where η is a binomial random variable with parameters (k/2, 1/2) and B is some suitable σ-algebra. Thus, by a convexity argument, we obtain that, for any λ > 0, 2 E eλ(Sk −k/4) ≤ E eλ(η−k/4) ≤ eλ k/16 , where the last bound is due to Hoeffding’s inequality. Applying the exponential Markov inequality and choosing λ = 1, we obtain   k P Sk − ≥ k/8 ≤ exp [−k/16] 4 and, in view of (51), we conclude that |C| ≥ exp[k/16]. Proof of Lemma 4.5. Let u and v be two different vectors in C and let τ be a measure preserving bijection [0, 1] 7→ [0, 1]. We aim to prove that, for any τ , Z |Wu (x, y) − Wv (τ (x), τ (y))|2 dxdy ≥ η02 kǫ/2 , (52) where we recall that η0 = 1/16. If x and x′ correspond to two different classes of Wu , that is x ∈ [Fu (a − 1), Fu (a)) and x′ ∈ [Fu (b − 1), Fu (b)) for some a 6= b, then the inner product between Wu (x, ·) and Wu (x′ , ·) satisfies Z k (Wu (x, y) − 1/2)(Wu (x′ , y) − 1/2)dy = ≤ ≤ 1X 4 c=1   1 + uc B ac B bc k 1 1 hB a,. , B b,. i + kǫ 4k 4 1/8 , (53) since we assume that 4kǫ ≤ 1. For any a, b ∈ [k], define of [Fu (a − 1), Fu (a)] ∩ τ ([Fv (b − 1), Fv (b)]). Since τ P P ωab the Lebesgue measure is measure preserving, b ωab = 1/k + ua and a ωab = 1/k + vb . For any a and b ∈ [k] define hu,a (y) = Wu (Fu (a − 1), y) − 1/2 and kv,b (y) = Wv (Fv (b − 1), τ (y)) − 1/2. Then, we have Z |Wu (x, y) − Wv (τ (x), τ (y))|2 dxdy = k X k X a=1 b=1 ωa,b Z |hu,a (y) − kv,b (y)|2 dy. Let h·, ·i2 and k · k2 denote the standard inner product and the Euclidean norm in L2 ([0, 1]). By definition of Wu we have that |kv,a (y)| = 1/2 for all y ∈ [0, 1] and any a ∈ [k] which implies kkv,a k2 = 1/2. Now for b1 6= b2 , kkv,b1 − kv,b2 k22 ≥ 1/2 − 1/4 = 1/8 by (53). By the triangle inequality, this implies that khu,a − kv,b1 k22 + khu,a − kv,b2 k22 ≥ 21 kkv,b1 − kv,b2 k22 ≥ 1/16 . 2 As a consequence, for any a ∈ [k] there exists at most one b ∈ [k] such that khu,a − kv,b k2 < 1/32. If such an index b exists, it is denoted by π(a). Exactly the same argument shows that for any b ∈ [k] there exists at most one a ∈ [k] such that khu,a − kv,b k2 < 1/32 which implies that there exists no a 6= a′ such that π(a) = π(a′ ). Thus, it is possible to extend π to a permutation of [k]. We get Z |Wu (x, y) − Wv (τ (x), τ (y))|2 dxdy ≥ k k  1 X X 1 X ωa,b = 1/k + ua − ωa,π(a) . 32 a=1 32 a=1 b6=π(a) Pk If the sum a=1 1/k + ua − ωa,π(a) is greater than kǫ/16, then (52) is satisfied. Thus, we can assume Pk in the sequel that a=1 1/k + ua − ωa,π(a) ≤ kǫ/16. Using that ωa,b ≤ (1/k + ua ) ∧ (1/k + vb ) and the cardinality of the collection {a ∈ [k] : ua > 0} is k/2 we deduce that the collection {a ∈ [k] : ua > 0, vπ(a) > 0 and ωa,π(a) ≥ 1/k} has cardinality greater than 7k/16. Since for u 6= v ∈ C, |Au ∩ Av | ≤ 3k/8 (Lemma 4.4), there exist subsets A ⊂ Au and B ⊂ Av of cardinality η0 k (recall that η0 = 1/16) such that π(A) = B, A ∩ B = ∅, and ωa,π(a) ≥ 1/k for all a ∈ A. Hence, Z |Wu (x, y) − Wv (τ (x), τ (y))|2 dxdy X X Z ≥ |Wu (x, y) − Wv (τ (x), τ (y)|2 dxdy a1 ∈A a2 ∈A ≥ ≥ X X a1 ∈A a2 ∈A [Fu (a1 −1),Fu (a1 ))×[Fu (a2 −1),Fu (a2 )) ωa1 ,π(a1 ) ωa2 ,π(a2 ) [Qa1 ,a2 − Qπ(a1 ),π(a2 ) ]2 1 X X [B a1 ,a2 − B π(a1 ),π(a2 ) ]2 , 4k 2 a1 ∈A a2 ∈A where the last inequality follows from the facts that Q = (J + B)/2 and ωa,π(a) ≥ 1/k. Finally, we apply the property (47) of B to conclude that Z |Wu (x, y) − Wv (τ (x), τ (y))|2 dxdy ≥ η02 /8 ≥ η02 kǫ/2. This proves (52) and thus the lemma. Proof of Lemma 4.3. For u ∈ C0 , let ζ(u) = (ζ1 (u), . . . , ζn (u)) be the vector of n i.i.d. random variables with the discrete distribution on [k] defined by P[ζ1 (u) = a] = 1/k + ua for any a ∈ [k]. Let Θ0 be the n × n symmetric matrix with elements (Θ0 )ii = 0 and (Θ0 )ij = ρn Qζi (u),ζj (u) for i 6= j. Assume that, conditionally on ζ(u), the adjacency matrix A is sampled according to the network sequence model with such probability matrix Θ0 . Notice that in this case the observations A′ = (Aij , 1 ≤ j < i ≤ n) have the probability distribution PWu . Using this remark and introducing the probabilities αa (u) = P[ζ(u) = a] and pAa = P[A′ = A|ζ(u) = a] for a ∈ [k]n , we can write the Kullback-Leibler divergence between PWu and PWv in the form  P XX pAa αa (u) a K(PWu , PWv ) = pAa αa (u) log P a pAa αa (v) a A where the sums in a are over [k]n and the sum in A is over all triangular upper halves of matrices in {0, 1}n×n. Since the function (x, y) 7→ x log(x/y) is convex we can apply Jensen’s inequality to get     X X 1/k + ua αa (u) (1/k + ua ) log =n (54) K(PWu , PWv ) ≤ αa (u) log αa (v) 1/k + va a a∈[k] where the last equality follows from the fact that αa (u) are n-product probabilities. Since the KullbackLeibler divergence does not exceed the chi-square divergence we obtain   X X (ua − va )2 1/k + ua (1/k + ua ) log ≤ ≤ 16k 2 ǫ2 /3, 1/k + va 1/k + va a∈[k] a∈[k] 22 where last inequality uses that |va | ≤ ǫ ≤ 1/(4k), and |ua − va | ≤ 2ǫ. Combining this with (54) proves the lemma. 4.9.2 Proof of (44) As in the proof of Proposition 2.4, we use here Fano’s method. The main difference is that the graphon separation in δ(·, ·) distance is more difficult to handle than the matrix separation in the Frobenius distance. First, note that it is sufficient to prove (44) for k > k0 where k0 is any fixed integer. Indeed, if k ≤ k0 , the lower bound (44) immediately follows from (45). Let C0 denote the set of all symmetric k × k matrices with entries in {−1, 1}. The graphon hypotheses that we consider in this proof are generated by matrices of intra-class connection probabilities of the form QB := (J + ǫB)/2 where B ∈ C0 , ǫ ∈ (0, 1/2), and J is a k × k matrix with all entries equal to 1. Given a matrix QB , define the graphon WB ∈ W[k] by the formula X (QB )ab 1[(a−1)/k,a/k)×[(b−1)/k,b/k) (x, y). WB (x, y) = (a,b)∈[k]×[k] As in the previous proof, we use the following combinatorial result in the spirit of the Varshamov-Gilbert lemma [15, Chapter 2] that grants the existence of a large subset C of C0 such that the matrices B ∈ C are well separated in some sense. Given any two permutations π and π ′ of [k] and any matrix B, we denote by ′ ′ B π,π a matrix with entries B π,π ab = B π(a)π ′ (b) . Lemma 4.6. Let k0 be an integer large enough. For any k > k0 , there exists a subset C of C0 satisfying log |C| ≥ k 2 /32 and such that ′ k2 (55) k2F ≥ kB 1 − B π,π 2 2 for all permutations π, π ′ and all B 1 6= B 2 ∈ C. We assume in the rest of this proof that k is greater than k0 . As noticed above, it is enough to prove (44) only in this case. We choose a maximal subset C satisfying the properties stated in Lemma 4.6. The next lemma shows that the separation between matrices B in C translates into separation between the corresponding graphons WB . Lemma 4.7. Let C be a maximal set satisfying the properties stated in Lemma 4.6. For any two distinct B 1 and B 2 in C, we have (56) δ 2 (ρn WB 1 , ρn WB 2 ) ≥ ρ2n ǫ2 /8. Finally, in order to apply Fano’s method, we need to have an upper bound on the Kullback-Leibler divergence between the distributions PWB for B ∈ C. It is given in the next lemma. Lemma 4.8. For any B 1 and B 2 in C, we have Choosing now ǫ =  K(PWB 1 , PWB2 ) ≤ 3n2 ρn ǫ2 . √k n ρn  ∧ 1 /32 we deduce from Lemmas 4.8 and 4.6 that K(PWB1 , PWB2 ) ≤ 1 log |C|, 10 ∀ B 1 , B 2 ∈ C : B 1 6= B 2 . In view of Theorem 2.7 in [15], inequalities (56) and (57) imply that   k2 2 2 b inf sup EW0 [δ (f , ρn W0 )] ≥ C ρn 2 ∧ ρn n fb W0 ∈W[k] where C > 0 is an absolute constant. This completes the proof of (44). 23 (57) ′ kF , where Proof of Lemma 4.6. Define the pseudo-distance dΠ on C0 by dΠ (B 1 , B 2 ) := min′ kB 1 − B π,π 2 π,π the p minimum is taken over all permutations of [k]. Let C be a maximal subset C0 of matrices B that are k(k + 1)/2-separated the union of all balls in dΠ distance centered p with respect to dΠ . By maximality of C,p at B ∈ C with radii k(k + 1)/2 covers C0 . Denoting by B[B, k(k + 1)/2, dΠ ] such a ball, we obtain by a volumetric argument p B[B, k(k + 1)/2, dΠ ] /|C0 | ≥ |C|−1 . ′ kF , we have Since dΠ (B 1 , B 2 ) is the infimum over all k!2 permutations of the distance kB 1 − B π,π 2 p p B[B, k(k + 1)/2, dΠ ] ≤ k!2 B[B, k(k + 1)/2, k.kF ] , p where B[B, k(k + 1)/2, k · kF ] is the ball centered at B with respect to the Frobenius distance. Given B 1 and B 2 in C0 , kB 1 − B 2 k2F /4 is equal to the Hamming distance between B 1 and B 2 . Consider the ball B[B, k(k + 1)/8, dH ] centered at B with respect to the Hamming distance. As matrices in C0 are symmetric, C0 is in bijection with {0, 1}k(k+1)/2 . Using Hamming bound and Varshamov-Gilbert lemma [15, Chapter 2] we obtain 2−k(k+1)/2 |B[B, k(k + 1)/8, dH ]| ≤ |C ′ |−1 ≤ e−k(k+1)/16 -separated with respect to the Hamming distance. where C ′ is a maximal subset of matrices B that are k(k+1) 4 We then conclude that |C0 | p |C| ≥ ≥ exp [k{(k + 1)/16 − 2 log(k)}] , 2 k! |B[B, k(k + 1)/2, k · kF ]| which is larger exp(k 2 /32) for k large enough. Proof of Lemma 4.7. Let B 1 and B 2 be two distinct matrices in C and let τ be a measure preserving bijection [0, 1] 7→ [0, 1]. Our aim is to prove that, for any such τ , Z (58) |WB 1 (x, y) − WB 2 (τ (x), τ (y))|2 dxdy ≥ ǫ2 /8. For any a, b ∈ [k], letPωab denote the Lebesgue measure of [(a − 1)/k, a/k] ∩ τ ([(b − 1)/k, b/k]). Since τ is P measure preserving, b ωab = 1/k and a ωab = 1/k. Hence, the k × k matrix kω, where ω = (ωab )a,b∈[k] , is doubly stochastic. For any permutation π of [k], denote H(π) the corresponding permutation matrix. By of permutation matrices, that is there the Birkhoff–von Neumann theorem P [8], kω is a convex combination P exist positive numbers γπ such that π γπ = 1/k, and ω = π γπ H(π) where the summation runs over all permutations. Using these remarks we obtain Z |WB 1 (x, y) − WB 2 (τ (x), τ (y))|2 dxdy = ǫ2 4 = ǫ X 4 π ,π 2 a1 ,a2 ,b1 ,b2 ∈[k] 1 = X a1 ,a2 ,b1 ,b2 ∈[k]  2 γπ1 γπ2 H(π1 )a1 a2 H(π2 )b1 b2 (B 1 )a1 b1 − (B 2 )a2 b2 2 a,b ǫ2 X γπ1 γπ2 kB 1 − B π2 1 ,π2 k2F 4 π ,π 1 ≥ 2  2 ωa1 a2 ωb1 b2 (B 1 )a1 b1 − (B 2 )a2 b2 (by the definition of permutation matrices) X 2 ǫ2 X γπ 1 γπ 2 (B 1 )ab − (B 2 )π1 (a)π2 (b) 4 π ,π 1 = X X π1 ,π2 2 γπ 1 γπ 2 ǫ2 ǫ2 k 2 = , 8 8 24 where we have used Lemma 4.6 and the property P π γπ = 1/k. Proof of Lemma 4.8. The proof is quite similar to that of Lemma 4.3. Fix two matrices B 1 and B 2 in C. Let ζ = (ζ1 , . . . , ζn ) be the vector of n i.i.d. random variables with uniform distribution on [k]. Let Θ1 be the n × n symmetric matrix with elements (Θ1 )ii = 0 and (Θ1 )ij = ρn [1 + (B 1 )ζi ,ζj ]/2 for i 6= j. Assume that, conditionally on ζ(u), the adjacency matrix A is sampled according to the network sequence model with such probability matrix Θ1 . Notice that in this case the observations A′ = (Aij , 1 ≤ j < i ≤ n) have the probability distribution PWB1 . Using this remark, we introduce the probabilities αa = P[ζ = a] and (1) (2) pAa = P[A′ = A|ζ = a] for a ∈ [k]n . Next, we introduce the analogous probabilities pAa for a matrix Θ2 depending on B 2 in the same way as Θ1 depends on B 1 . The Kullback-Leibler divergence between PWB1 and PWB 2 has the form ! P (1) XX (1) a αa pAa K(PWB1 , PWB 2 ) = αa pAa log P (2) a A a αa pAa where the sums in a are over [k]n and the sum in A is over all triangular upper halves of matrices in {0, 1}n×n. Since the function (x, y) 7→ x log(x/y) is convex we can apply Jensen’s inequality to get ! (1) X X (1) pAa K(PWB1 , PWB 2 ) ≤ αa pAa log . (2) pAa a A Here, the sum in A for fixed a is the Kullback-Leibler divergence between two n(n−1)/2-products of Bernoulli measures, each of which has success probability either ρn (1 + ǫ)/2 or ρn (1 − ǫ)/2. Thus, for p = (1 + ǫ)/2 and q = (1 − ǫ)/2 we have n(n − 1) ρn κ(p, q), (59) K(PWB1 , PWB 2 ) ≤ 2 where κ(p, q) is the Kullback-Leibler divergence between the Bernoulli measures with success probabilities p and q. Since the Kullback-Leibler divergence does not exceed the chi-square divergence we obtain κ(p, q) ≤ (p − q)2 (p−1 + q −1 ) = 4ǫ2 /(1 − ǫ2 ) ≤ 16ǫ2 /3 for any ǫ < 1/2. The lemma now follows by substitution of this bound on κ(p, q) into (59). 4.9.3 Proof of (45) We use here a reduction to the problem of testing two simple hypotheses by Le Cam’s method. Fix some 0 < ǫ ≤ 1/4. Let W1 be the constant graphon with W1 (x, y) ≡ 1/2, and let W2 ∈ W[2] be the 2-step graphon with W2 (x, y) = 1/2 + ǫ if x, y ∈ [0, 1/2)2 ∪ [1/2, 1]2 and W2 (x, y) = 1/2 − ǫ elsewhere. Obviously, we have δ 2 (ρn W1 , ρn W2 ) = ρ2n ǫ2 . (60) We have inf max fb W0 ∈{W1 ,W2 } EW0 [δ (fb, ρn W0 )] 2 ≥ ≥ ≥ 1 2 Z   δ 2 (fb, ρn W1 ) + δ 2 (fb, ρn W2 ) min(d PW1 , d PW2 ) Z δ 2 (ρn W1 , ρn W2 ) min(d PW1 , d PW2 ) 4  ρ2n ǫ2 exp −χ2 (PW2 , PW1 ) 8 (61) where χ2 (PW2 , PW1 ) is the chi-square divergence between PW2 and PW1 . In the last inequality we have used (2.24) q and (2.26) from [15], and (60). Finally, the following lemma allows us to conclude the proof by setting c0 ǫ = nρ ∧ 41 . n Lemma 4.9. There exists an absolute constant c0 > 0 such that χ2 (PW2 , PW1 ) ≤ 1/4 if ǫ satisfies nρn ǫ2 ≤ c0 . 25 Proof of Lemma 4.9. Let L(A′ ) be likelihood ratio of PW2 with respect to PW1 . Since χ2 (PW2 , PW1 ) = EW1 [L(A′ )2 ] − 1 it remains to prove that EW1 [L(A′ )2 ] ≤ 5/4. For the sake of brevity, we write in what follows E[·] = EW1 [·]. We also set p0 := ρn /2, p1 := ρn (1/2 + ǫ) and p2 := ρn (1/2 − ǫ). As the graphon ρn W2 is a 2-step function, we may assume that the components of ξ = (ξ1 , . . . , ξn ) are i.i.d. uniformly distributed on {0, 1}. Given ξ, define the collection S := {{a, b} : ξa = ξb } of subsets of indices with identical position. For {i, j} in S (resp. S c ), Ai,j follows a Bernoulli distribution with parameter p1 (resp. p2 ). Denote µ the distribution of S and n(2) = n(n − 1)/2 the number of subsets of size 2 of [n]. Then, the likelihood has the form Z L(A′ ) = LS (A′ )dµ(S) , LS (A′ ) :=  1 − p1 1 − p0 |S|  1 − p2 1 − p0 By Fubini theorem, we may write E[L2 (A′ )] =  E LS1 (A )LS2 (A )  ′ ′ =  1 − p1 1 − p0 {a,b}∈S1c ∩S2c = h 1+ R  {a,b}∈S 1 − p2 1 − p0 2Aab p2 (1−p0 ) p0 (1−p2 ) i|S1 ∩S2 | h (p1 −p0 )2 1+ p0 (1−p0 ) Using the definition of p0 , p1 and p2 , we find   E LS1 (A′ )LS2 (A′ ) =  1+ Y {a,b}∈S c  p2 (1 − p0 ) p0 (1 − p2 ) ρ2n ǫ2 p0 (1 − p0 ) 2n(2) −|S1 |−|S2 | Y {a,b}∈S1 ∆S2 (p2 −p0 )2 p0 (1−p0 )  E h Y {a,b}∈S1 ∩S2 p1 p2 (1−p0 )2 p20 (1−p1 )(1−p2 ) i|S1c ∩S2c | h |S1 ∩S2 |+|S1c ∩S2c |  1+ 1−  . 2Aab × p1 (1−p0 ) p0 (1−p1 ) Aab i p1 p2 +p20 −p1 p0 −p2 p0 p0 (1−p0 ) ρ2n ǫ2 p0 (1 − p0 ) |S1 ∩S2 |+|S1c ∩S2c |−|S1 ∆S2 | ρ2n ǫ2 ≤ 1+ p0 (1 − p0 ) i  h ≤ exp 2|S1 ∩ S2 | + 2|S1c ∩ S2c | − n(2) 4ρn ǫ2 .  Aab   E LS1 (A′ )LS2 (A′ ) dµ(S1 )dµ(S2 ), where |S1 |+|S2 |  Y Y  p1 (1 − p0 ) Aab p0 (1 − p1 ) n(2) −|S| i|S1 ∆S2 | . |S1 ∆S2 | Thus, to bound the second moment of L(A′ ), it suffices to control an exponential moment of T := |S1 ∩ S2 | + |S1c ∩S2c | where S1 and S2 are independent and distributed according to µ. To handle this quantity, we denote by ξ = (ξ1 , . . . , ξn ) and by ξ ′ = (ξ1′ , . . . , ξn′ ) the positions for the first and second sample corresponding to S1 and S2 , respectively. Next, for any i, j ∈ {0, 1}2, define  Nij := | a : ξa = i and ξ ′ a = j | . 2 2 2 2 Then we have 2|S1 ∩ S2 | + n = N00 + N01 + N10 + N11 and 2|S1c ∩ S2c | = 2N00 N11 + 2N01 N10 so that 2 2 2T + n = (N00 + N11 ) + (N01 + N10 ) . Define the random variable Z := N00 + N11 − n/2. It has a centered binomial distribution with parameters n and 1/2. We have 2T − n(2) = (n/2 + Z)2 + (n/2 − Z)2 − n − n(2) = 2Z 2 − n/2 . Plugging this identity into the expression for E[L2 (A′ )], we conclude that   E[L2 (A′ )] ≤ E exp 8ρn ǫ2 Z 2 , where E[·] stands for the expectation with respect to the distribution of Z. By Hoeffding’s inequality, Z has a subgaussian distribution with subgaussian norm smaller than n1/2 . Consequently, E[L2 (A′ )] ≤ 5/4 as soon as 8ρn nǫ2 is smaller than some numerical constant. 26 4.10 Technical lemmas Lemma 4.10. Let X1 , . . . , Xn be i.i.d. uniformly distributed variables on [0, 1] and X(i) is the ith element of the ordered sample X(1) ≤ X(2) ≤ · · · ≤ X(n) . Then, for any n0 ≤ n, and 0 ≤ s < n0 , E X(i) − X(i+s) 2 =  n 2 s(s + 1) 0 . ≤ (n + 1)(n + 2) n Proof. Note that X(i) − X(i+s) ∼ Beta(s, n − s + 1). For Y ∼ Beta(β, γ) we have E(Y 2 ) = β(β + 1) (β + γ + 1)(β + γ) which implies the lemma. Proof of Lemma 4.1. Since kT̂ k∞ ≤ 2r, the definition of qmax and the fact that kT̂ kF ≥ r imply ǫ0 ≤ kT̂ kF ≤ ǫqmax . Denote by q̂ the integer such that 2−1 ǫq̂ ≤ kT̂ kF < ǫq̂ . Let V̂ 0 be a matrix minimizing q̂,Û ,ẑr kT̂ /kT̂ kF − V kF over all V in Cẑr . Then, take V̂ = V̂ 0 over all U ∈ {−1, 0, 1} k×k q̂,U ,ẑr q̂,U ,ẑr where Û is a minimizer of kT̂ − V̂ 0 . Notice that Û is also a minimizer of kT̂ − V̂ q̂,U ,ẑr k∞ 0 over all U ∈ {−1, 0, 1} kF k×k are block-constant matrices with the same block structure determined by ẑr . since both T̂ and V̂ 0 Denoting by 0 the zero k × k matrix we have kT̂ − V̂ kF q̂,0,ẑr ≤ kT̂ − V̂ 0 q̂,U ,ẑr kF (since Û is a minimizer of kT̂ − V̂ 0 = kT̂ − ǫq̂ V̂ 0 kF (since kT̂ k∞ ≤ 2r) kF ) = kT̂ − ǫq̂ T̂ /kT̂ kF kF + ǫq̂ kT̂ /kT̂ kF − V̂ 0 kF ≤ (kT̂ kF − ǫq̂ ) + ǫq̂ kT̂ /kT̂ kF − V̂ 0 kF ǫq̂ (since Cẑr is a 1/4-net) ≤ (kT̂ kF − ǫq̂ ) + 4 ≤ kT̂ kF /4. q̂,Û ,ẑr Next, since V̂ = V̂ 0 q̂,U ,ẑr minimizes kT̂ − V̂ 0 k∞ over U we have q̂,U ∗ ,ẑr kT̂ − V̂ k∞ ≤ kT̂ − V̂ 0 k∞ where U ∗ is the matrix with elements defined by the relation U ∗ab = sign(T̂ ij ) if i ∈ ẑr−1 (a), j ∈ ẑr−1 (b) for q̂,U ∗ ,ẑr in each block are either equal to r or to −r depending on (a, b) ∈ [k] × [k]. Thus, all the entries of V̂ 0 whether the value of T̂ on this block is positive or negative respectively. Since kT̂ k∞ ≤ 2r we obtain that q̂,U ∗ ,ẑr kT̂ − V̂ 0 k∞ ≤ r. Acknowledgement The work of O. Klopp was conducted as part of the project Labex MME-DII (ANR11-LBX-0023-01). The work of A.B. Tsybakov was supported by GENES and by the French National Research Agency (ANR) under the grants IPANEMA (ANR-13-BSH1-0004-02), and Labex ECODEC (ANR - 11-LABEX-0047). The work of N. Verzelen was partly supported by the ANR under the grant ANR-2011BS01-010-01, project Calibration. This research benefited from the support of the “Chaire Economie et Gestion des Nouvelles Données”, under the auspices of Institut Louis Bachelier, Havas-Media and ParisDauphine. The authors are grateful to Jiaming Xu for a comment on Corolary 2.7 in a previous version of this manuscript. References [1] David J. Aldous. Exchangeability and related topics. In École d’été de probabilités de Saint-Flour, XIII—1983, volume 1117 of Lecture Notes in Math., pages 1–198. Springer, Berlin, 1985. 27 [2] Peter J Bickel and Aiyou Chen. A nonparametric view of network models and newman–girvan and other modularities. Proceedings of the National Academy of Sciences, 106(50):21068–21073, 2009. [3] Peter J Bickel, Aiyou Chen, Elizaveta Levina, et al. The method of moments and degree distributions for network models. The Annals of Statistics, 39(5):2280–2301, 2011. [4] Christian Borgs, Jennifer Chayes, and Adam Smith. Private graphon estimation for sparse graphs. In Advances in Neural Information Processing Systems, pages 1369–1377, 2015. [5] Stanley H. Chan and Edoardo M. Airoldi. A consistent histogram estimator for exchangeable graph models. In Proceedings of The 31st International Conference on Machine Learning, pages 208–216, 2014. [6] Sourav Chatterjee. Matrix estimation by universal singular value thresholding. The Annals of Statistics, 43(1):177–214, 2014. [7] David Choi. Co-clustering of nonsmooth graphons. arXiv preprint arXiv:1507.06352, 2015. [8] Vasek Chvtal. Linear programming. A Series of books in the mathematical sciences. Freeman, New York (N. Y.), 1983. Rimpressions : 1999, 2000, 2002. [9] Persi Diaconis and Svante Janson. Graph limits and exchangeable random graphs. Rend. Mat. Appl. (7), 28(1):33–61, 2008. [10] Chao Gao, Yu Lu, and Harrison H Zhou. arXiv:1410.5837, 2014. Rate-optimal graphon estimation. arXiv preprint [11] L. Lovasz and B. Szegedy. Limits of dense graph sequences. ArXiv Mathematics e-prints, August 2004. [12] László Lovász. Large networks and graph limits, volume 60 of American Mathematical Society Colloquium Publications. American Mathematical Society, Providence, RI, 2012. [13] Mathew Penrose. Random geometric graphs, volume 5 of Oxford Studies in Probability. Oxford University Press, Oxford, 2003. [14] Minh Tang, Daniel L. Sussman, and Carey E. Priebe. Universally consistent vertex classification for latent positions graphs. Ann. Statist., 41(3):1406–1430, 2013. [15] Alexandre B. Tsybakov. Introduction to nonparametric estimation. Springer Series in Statistics. Springer, New York, 2009. Revised and extended from the 2004 French original, Translated by Vladimir Zaiats. [16] Patrick J. Wolfe and Sofia C. Olhede. arXiv:1309.5936, 2013. Nonparametric graphon estimation. arXiv preprint [17] Jiaming Xu, Laurent Massoulié, and Marc Lelarge. Edge label inference in generalized stochastic block models: from spectral theory to impossibility results. arXiv preprint arXiv:1406.6897, 2014. 28
10math.ST
HyDA-Vista: Towards Optimal Guided Selection of k-mer Size for Sequence Assembly Seyed Basir Shariat Razavi* Narjes Sadat Movahedi Tabrizi** Hamidreza Chitsaz* Christina Boucher* arXiv:1408.5592v1 [cs.CE] 24 Aug 2014 * Department of Computer Science, Colorado State University Fort Collins, CO, USA, {basir,cboucher,chitsaz}@cs.colostate.edu ** Department of Computer Science, Wayne State University Detroit, MI, USA, [email protected] August 26, 2014 Abstract Motivation: Intimately tied to assembly quality is the complexity of the de Bruijn graph built by the assembler. Thus, there have been many paradigms developed to decrease the complexity of the de Bruijn graph. One obvious combinatorial paradigm for this is to allow the value of k to vary; having a larger value of k where the graph is more complex and a smaller value of k where the graph would likely contain fewer spurious edges and vertices. One open problem that affects the practicality of this method is how to predict the value of k prior to building the de Bruijn graph. We show that optimal values of k can be predicted prior to assembly by using the information contained in a phylogenetically-close genome and therefore, help make the use of multiple values of k practical for genome assembly. Results: We present HyDA-Vista, which is a genome assembler that uses homology information to choose a value of k for each read prior to the de Bruijn graph construction. The chosen k is optimal if there are no sequencing errors and the coverage is sufficient. Fundamental to our method is the construction of the maximal sequence landscape, which is a data structure that stores for each position in the input string, the largest repeated substring containing that position. In particular, we show the maximal sequence landscape can be constructed in O(n+n log n)-time and O(n)-space. HyDA-Vista first constructs the maximal sequence landscape for a homologous genome. The reads are then aligned to this reference genome, and values of k are assigned to each read using the maximal sequence landscape and the alignments. Eventually, all the reads are assembled by an iterative de Bruijn graph construction method. Our results and comparison to other assemblers demonstrate that HyDA-Vista achieves the best assembly of E. coli before repeat resolution or scaffolding. Availability: HyDA-Vista is freely available at https://sites.google.com/site/hydavista. The code for constructing the maximal sequence landscape and the choosing the optimal value of k for each read is also on the website and could be incorporated into any genome assembler. Contact: [email protected] 1 Introduction The ability to accurately assemble genomes is a fundamental problem in bioinformatics that is vital to the success of many scientific projects, including the 10,000 vertebrate genomes (Genome 10K) [15], Arabidopsis variations (1001 genomes) [29], human variations (1000 genomes) [37], and Human Microbiome Project [38]. The genome assembly process aims to build contiguous sequences, called contigs, predominantly from short read sequencing data. Other sources of information have also been used to boost the accuracy, including genetic linkage data [23], optical mapping data [27], and longer sequencing reads (e.g. PacBio data) [16]. A potential source of information that has not been fully explored is the information contained in phylogenetically-close genomes. The genome of an individual of the same species or that of a phylogenetically-close species can potentially be used as an extra source of information, and increase the assembly quality. We argue that genome assemblers can benefit from using a reference genome to help guide the assembly process, particularly in those regions of the genome that are pervaded by repetitive sequences. In Eulerian sequence assembly [17, 32], a de Bruijn graph is constructed with a vertex v for every (k − 1)-mer present in an input set of reads, and an edge (v, v 0 ) for every observed k-mer in the reads with (k − 1)-mer prefix 1 v and (k − 1)-mer suffix v 0 . A contig corresponds to a non-branching path through this graph. SPAdes [2], IDBA [30], Euler-SR [6], Velvet [41], SOAPdenovo [22], ABySS [36] and ALLPATHS [5] all use this paradigm for assembly. The majority of de Bruijn graph based assemblers follow the same general outline: break the (possibly error corrected) reads into k-mers, construct the de Bruijn graph on the set of resulting k-mers, simplify the de Bruijn graph, resolve the repeated regions by using mate-pair information, and construct the contigs (simple paths in the de Bruijn graph). Therefore, the majority of assemblers require or allow the value of k to be specified by the user. The problem of determining an appropriate value of k for the de Bruijn graph construction is important since it has a direct impact on assembly quality; stated very briefly, when k is too small the resulting graph is complicated by spurious edges and vertices, and when k is too large the graph becomes too sparse and possibly disconnected. Repetitive regions are especially problematic for genome assembly since they inadvertently result in spurious edges and vertices in the de Bruijn graph [1] and are very sensitive to the choice of k. There has been a significant effort in developing algorithms that will choose an ideal value for k by preprocessing the sequence reads, and thus, reduce the complexity of the de Bruijn graph [2, 30, 7]. A more obvious combinatorial approach for building a simplified de Bruijn graph would be to allow the value of k to vary; having a larger value of k where the graph is more complex and a smaller value of k where the graph would likely contain fewer spurious edges and vertices. A major difficulty in implementing this approach is determining a practical method that makes this idea feasible assembling large genomes. Peng et al. [30] and Bankevich et al. [2] both introduced assemblers that use various values of k. IDBA builds the de Bruijn graph in an iterative manner from k = kmin to k = kmax ; these values of k are predetermined and (by default) do not change for different datasets or genomes. At iteration i, the de Bruin graph for ki is built from the current set of reads and the contigs for that graph are constructed, then all the reads that align to at least one of those contigs are removed from the current set of reads. In the next iteration the graph is built by converting every edge from the previous graph to a vertex while treating contigs as edges. SPAdes [2] uses a similar approach but uses all the reads at each iteration. While this method has been shown to greatly improve assembly quality [2, 30], it is not efficient since all the reads are assembled at each iteration. Thus, one challenge that remains to be addressed is how to efficiently determine which values of k should be used for this iterative assembly process and how to assign a k-mer value for each read. If this could be accomplished prior to assembly of the de Bruijn graph(s) then these iterative assembly methods could be made more efficient without degrading the assemblies quality. Our Contribution. We introduce an efficient algorithm for determining an optimal value of k for each read prior to constructing the de Bruijn graph, and implement this method into a modified version of HyDA, a de novo assembler developed by Movahedi et al. [26]. This modified assembler, which we refer to as HyDA-Vista, takes as input a phylogenetically-close genome and a set of paired-end reads. Imperative to HyDA-Vista is the construction of the maximal sequence landscape, which is a data structure that stores for every position in the input string, the longest repeat containing it. Prior to de Bruijn graph construction, HyDA-Vista constructs the maximal sequence landscape for the phylogenetically-close genome, and aligns the reads to the reference genome. The alignment and landscape allows the optimal value of k for each read be determined in linear time in the length of the read, provided the read is longer than the longest repeat. These values of k are “optimal” in the sense that for unchanged parts of the genome, the de Bruijn graph will have no spurious edges or vertices if there are no sequencing errors, and the length of the repeat is smaller than the read length. Unaligned reads are assigned a default value of k. After the assignment of values of k to each read, HyDA-Vista constructs the de Bruijn graph in an iterative manner. Our approach for choosing values of k for each read takes into consideration the repeat structure of the genome, which enables us to avoid overly-complex regions of the graph since the assignment of values of k to reads is done prior to the assembly rather than during the assembly. We compare HyDA-Vista versus IDBA [30], SPAdes [2], SOAPdenovo [22], ABySS [36] and HyDA [26]. Our results demonstrate that HyDA-Vista produces the best assembly of E. coli before repeat resolution or scaffolding. We aim to achieve the best assembly without repeat resolution and scaffolding and note that such methods could be applied to all these initial assemblies. Lastly, we demonstrate that this method improves the efficiency of iterative assembly. Roadmap. We review related tools for the problem in the remainder of this section. Section 2 then sets notation and formally lays down the problem and the data structures that will be used for the construction of the maximal sequence. We formally define the maximal sequence landscape in Section 3.1. Section 4.3 gives details of HyDA-Vista. In Section 5 we give results that demonstrate how HyDA-Vista compares against competing assemblers. Finally, Section 6 offers reflections and some future areas of research that warrant investigation. 2 Related Work. The re-sequencing methods include LOCAS and SUPERLOCAS [35, 19], e-RGA [39], Colombus module of Velvet 1 and IDBA-Hybrid 2 . Since these methods aim to determine structural variations between species, and require extremely high sequence similarity to produce reasonable results, they have only been applied to individuals of the same species. Our focus is to produce high quality de novo assemblies using homology information contained in the reference genome of the same species or phylogenetically-close species. Gnerre et al. [12] also consider how to improve assembly quality by using the alignment of reads to a reference genome. Their method simultaneously builds a de novo assembly from the reads and aligns these same reads to one or more related genomes. The alignment is then used to improve the assembly quality, e.g., reads that were not used in the assembly are incorporated into the assembly using the alignment. Complementary to the work of Chikhi and Medvedev [7], Peng et al. [30], and Bankevich et al. [2], there has been an effort in developing methods that use paired-end data to constrain the construction of the de Bruijn graph [35, 31, 33, 25, 40]. Medvedev et al. [25] introduced the concept of a paired de Brujin graph . Since the insert size is variable among mate pairs, this method requires that all the paths within some threshold be considered in order to ensure an edge is not missed. Thus, Bankevich et al. [2] improve upon this idea by developing the rectangle graph, which eliminates the need to consider all paths. Vyahhi et al. [40] furthered this study of rectangle graphs for genome assembly. These methods merit mentioning the goal of these methods is the same as the goal of increasing the value of k in certain regions; both aim to minimize spurious edges and branching in the graph but in a different manner. Determining all maximal exact repeats in a string has been previously studied [14, 9, 4]. It has been shown that all maximal repeats of a string can be found and stored in O(n)-time and O(n)-space using a suffix tree (although the output maybe of size Θ(n2 )) or directed acrylic graph [9]. Therefore, the maximal sequence landscape, which we define in this paper, can be constructed from either a suffix tree or a directed acrylic graph in O(n)-time and O(n)-space using these algorithms directly or adapting them. However, the constant in the order notation of the space complexity of these constructions is relatively large. The algorithm we present uses a suffix array and thus, requires linear space with a smaller constant and O(n log n)-time. Hence, we pay a log n cost in time to remove the large constant from the linear space time. We also note that the related problem of finding inexact maximal repeats also has been previously studied [20, 11, 3, 34]. 2 Background Strings. Consider a fixed alphabet Σ = {σ1 , . . . , σm } and a total order ≤L defined over Σ = Σ ∪ {$} where $∈ / Σ, and for all σ ∈ Σ we have $ ≤L σ. We denote a finite string s as s1 s2 . . . sn , where si ∈ Σ. We use sij , pre where 1 ≤ i ≤ j ≤ n, to indicate substring si si+1 · · · sj of string s. We call substrings si = s1i and ssuf = sin i th th with i ∈ {1, . . . , n} the i prefix and i suffix of s respectively. Based on the total order ≤L , we define a lexicographical total order on the strings in Σ∗ . Arrays. We denote arrays of integers by all capital letter strings like A, SP, LCP, etc. A[i], with 1 ≤ i ≤ |A|, stands for the integer in the ith cell of array A. Also, A[i, j] indicates the projection of A onto indices i to j, inclusive of both ends. For an array A, with |A| = n, that holds a permutation of integers {1, . . . , n}, index array of A is another array I(A) with |I(A)| = n such that I(A)[i] = j if and only if A[j] = i. Suffix and Longest Common Prefix Arrays. SAs , for some string s, denotes the suffix array associated with s [24]. SAs [i] = l for i ∈ {1, . . . , n} if and only if ssuf is the ith string in the lexicographically sorted list of l all suffixes of s. We also indicate the longest common prefix array of some string s with LCPs , and LCPs [i] = l suf for i ∈ {1, . . . , n − 1} if and only if the length of the longest common prefix between ssuf SAs [i] and sSAs [i+1] equals to l. 3 Approach 3.1 The Maximal Sequence Landscape We formally define the maximal sequence landscape in this section. Clift et al. [9] introduced the concept of a sequence landscape, which is a data structure that stores the occurrences of any substring from a source string s in a target string t. In set representation, the sequence landscape Lt|s of a target string t with respect to a source string s is defined as a set of tuples {m1 , m2 , . . . , ml }, where mi = (bi , ei , fi ) corresponds to the occurrence of substring sbi ei = sbi sbi +1 · · · sei from s in t with frequency fi . If s and t are equal then the sequence landscape 1 Unpublished. 2 Unpublished. http://bioweb2.pasteur.fr/docs/velvet/Columbus_manual.pdf http://i.cs.hku.hk/~alse/hkubrg/projects/idba_hybrid/index.html 3 1 1 2 4 2 22 444 CATCATTTG 2 11 4 2 1 2 2 44 114 42222 GGCATCATTGGGTATAACC Figure 1: (left) The self sequence landscape for CATCATTTG, and (right) the sequence landscape of GGCATCATTGGGTATAACC with respect to CATCATTTG. The mountains (yellow or blue) demonstrate occurrences of substrings of source string in the target string. Numbers at the peak of the mountains denote the frequency of occurrence. The maximal sequence landscape is highlighted in yellow, and the red arrows demonstrate the ascent and descent of the landscapes. categorizes all repeated substrings in the source string s. We define to this special case where s = t as the self sequence landscape. Fig. 1 illustrates an example of a self sequence landscape and a sequence landscape. Given a position i of the input string s, all the repeated substrings containing si can be recovered from the self sequence landscape in linear-time in the number of different repetitions. The occurrences of the substrings in the source string are defined as mountains. This terminology reflects the visual representation that was first introduced by Clift et al. [9] that illustrates each occurrence as a mountain having height equal to the length of the substring, i.e. the height of mountain mi of Lt|s is denoted as h(mi ) and equal to ei − bi + 1. The peak of each mountain is labelled with the frequency of the substring corresponding to it. In Fig. 1 (left), the substring CAT is represented as two mountains each of which has a height equal to three and frequency equal to two. We say that a mountain mj = (bj , ej , fj ) in a landscape Lt|s covers index i and denote it by mj 4 i if and only if i ∈ {bj , . . . , ej }. Hence, the cover set of a specific index i of the sequence landscape Lt|s is the set of all the mountains that covers i. We denote the cover set as CLt|s (i) and define it as follows: CLt|s (i) := {mj |mj 4 i, h(mj ) > 1, fj > 1}. (1) Lastly, we define the summit of index i as the highest mountains in its cover set. We denote the summit of i by SLt|s (i) and define it as follows: SLt|s (i) := {mj | h(mj ) ≥ h(mk ) ∀ mk ∈ CLt|s (i)}. (2) Please note that the summit of index i can be empty or non-unique so the height of summit of index i is defined to be zero for empty set. Definition 1. The maximal sequence landscape, which we denote as L∗t|s , is the set of the summits of all positions in s that have frequency greater than one. L∗t|s can be formally defined as follows: L∗t|s = {SLt|s (i)|i = 1, . . . , n}. The maximal sequence landscape is highlighted in yellow in Fig. 1. The maximal sequence landscape is obtained from the sequence landscape by removing all mountains except those that are highest and have frequency greater than one at each position. In the case of the maximal sequence landscape constructed from a self sequence landscape, this results in a data structure containing the longest repeat at each position of the input string. In Subsection 4.1 we give an algorithm that builds the maximal sequence landscape and returns an array containing the length of the longest repeat at each position of the input string (MSL in Algorithm 2). Therefore, given a position i in s, we can determine the length of the longest repeat in s containing that position in constant time by simply indexing the maximal sequence landscape at position i. By choosing a value for k that is larger than the length of this repeat it can guaranteed that there will be no branching in the corresponding vertices of the de Bruijn graph, if the same substring is not repeated in changed parts of the genome that is being assembled. This is our idea based on which we determine the optimal value of k for each read. We consider the maximal sequence landscape constructed from the self sequence landscape for the remainder of this paper since it is what is used by HyDA-Vista. 4 Methods Algorithm 1 gives an overview of HyDA-Vista algorithm. We explain each of these steps in detail in the subsequent subsections. 4 Algorithm 1 An overview of HyDA-Vista 1: Build the maximal sequence landscape for the reference genome. 2: Align all reads to the reference using BWA. 3: For each aligned read: assign a value of k using the maximal sequence landscape. 4: Unaligned reads are assigned a value of k using a heuristic. 5: The de Bruijn graph is constructed in an iterative manner, as shown in Algorithm 3. Algorithm 2 Maximal sequence landscape construction Require: String s of length n. Ensure: Maximum Sequence Landscape Array MSL. 1: MSL ← ∅ 2: Build SAs , LCPs , SPs , and the ordered binary search tree of the LCPs 3: b ← 0, e ← 0 . b and e denote positions in the string s 4: [samin , samax ] ← [1, n] 5: for i := 1 to n do 6: e ← e + 1, p ← sb sb+1 · · · se 7: if p ∈ SAs and has frequency greater than one then 8: Update [samin , samax ] . A repeat has been found 9: else 10: while b 6= e and no repeat is found do 11: b ← b + 1, p = sb sb+1 · · · se 12: Find the new interval [samin , samax ] . See Section 4.1 13: if p ∈ SAs and has frequency greater than one then 14: Update [samin , samax ] . A repeat has been found 15: end if 16: end while 17: end if 18: Update MSL[i] 19: end for 4.1 Construction of the Maximal Sequence Landscape In this section we demonstrate that the maximal sequence landscape for an input string s can be built in O(n + n log n)-time and O(n)-space using a very simple algorithm, where n is the length of s. Algorithm 2 gives the pseudocode for constructing the maximal sequence landscape. Our method relies on the use of suffix array and longest common prefix array and thus, begins by building the suffix array (SAs ), and the longest common prefix array (LCPs ). This construction can be done in O(n)-space and O(n)-time [18]. Two other auxiliary data structures are constructed at the beginning of the algorithm. However, we delay the definition and construction of those to later in this section. The algorithm then iterates through each position of s and finds the longest repeated substring in s that contains it using SAs , LCPs , and the auxiliary data structures. An important aspect of our algorithm that allows us to achieve O(n + n log n)-time is that we only search that interval of SAs which is between the indices SAmin and SAmax at each iteration, not the entire array. In other words this invariant holds at each iteration of our algorithm: [SAmin , SAmax ] holds the the interval in the suffix array that corresponding suffixes share a same prefix. This prefix is the longest repeat that has been seen so far and covers that position. Thus, each time the largest repeated substring is found for a particular position, the maximal sequence landscape ( MSL), SAmin , and SAmax are updated for search at the next iteration. Two possibilities exist at each iteration i of the algorithm when we are processing si ; (a) The longest repeated substring at position i − 1 can be extended by appending si . The maximal sequence landscape, SAmin , and SAmax are updated. (b) The longest repeated substring at position i − 1 cannot be extended by appending si (either the extended string does not occur or it does occur but its frequency is one). Let p = sj · · · si−1 be the longest repeated substring yet found that contains si−1 , and p0 = sj+1 · · · si be the string obtained by removing the first letter of p and appending si . If p0 ’s frequency of occurrence is greater than one, then the maximal sequence landscape, and the search interval is updated as in (a). Otherwise, the search for the longest repeated substring continues by eliminating the first character of p0 each time until a repeating match is found or the null string is reached. If the null string is reached then the maximal sequence landscape is empty at that position and the search interval is updated to [1, n]. 5 Table 1: Construction of the suffix pointer array (SPs ) using the suffix array. The dark column in each table denotes the index of the array. We build an inverse index I(SAs ) from the suffix array, and SPs can be constructed by scanning this array once, i.e. setting SPs [I(SAs )[i − 1]] = I(SAs )[i] for all i ∈ [2, n] and SPs [1] = 0. 1 2 3 4 5 6 7 8 9 10 Suffix Start 1 mybananas$ 2 ybananas$ 3 bananas$ 4 ananas$ 5 nanas$ 6 anas$ 7 nas$ 8 as$ 9 s$ 10 $ =⇒ 1 2 3 4 5 6 7 8 9 10 Suffix 10 4 6 8 3 1 5 7 9 2 & LCPArrays 0 $ 0 ananas$ 3 anas$ 1 as$ 0 bananas$ 0 mybananas$ 0 nanas$ 2 nas$ 0 s$ 0 ybananas$ =⇒ SA Index 1 6 2 10 3 5 4 2 5 7 6 3 7 8 8 4 9 9 10 1 SP =⇒ 1 2 3 4 5 6 7 8 9 10 0 7 8 9 2 10 3 4 1 5 The search interval contains all indices in SAs for which the corresponding suffixes have the current longest repeated substring as a prefix. In (a), the interval is updated by performing binary search. In (b) the search interval is no longer valid since we removed a letter from the beginning of the current longest repeated substring and we need (a more complicated) scheme to efficiently find the correct search interval. To accomplish this we need two auxiliary data structures that are constructed at the beginning of the algorithm: the SPs array, and an ordered binary search tree containing all consecutive intervals of LCPs . SPs [j] holds the index in SAs that is obtained by removing the first letter from the beginning of sj sj+1 · · · sn in order to obtain sj+1 · · · sn . This array can be built in linear time by scanning the index array of SAs (see background for definition of index array). Table 1 illustrates the construction of SPs in linear time. Thus, to find the correct interval in (b), we locate an index of SAs (denoted as sp) where the corresponding suffix contains sj+1 . . . si−1 as a prefix, and find the largest interval around sp where all the suffixes in the interval have sj+1 . . . si−1 as prefix. This is the new search interval. The sp index can be found in constant time by correctly indexing SPs (see the appendix). The second step is equivalent to finding the largest interval [d, u] around sp that for all j ∈ [d, u] we have LCPs [j] ≥ |p0 | − 1. Corollary 2 shows that this can be done in O(log n)-time and O(n)-space using an ordered binary search tree. We leave the proof of the corollary, and the construction of the ordered binary search tree to the appendix. Corollary 2. Given a string p, SPs , LCPs , and an ordered binary search tree of all consecutive intervals in LCPs , the largest interval of SAs that contains all the suffixes of s that share the same prefix of p can be found in O(log n)-time and O(n)-space. Theorem 3 gives the space and time complexity of our construction algorithm. See the appendix for the proof of this result. Informally, the time complexity can be seen by first noting that at each iteration of the algorithm the maximal sequence landscape either ascends by one after a number of descents (possible zero) or it is undefined after a number of nonzero descents, and each of these ascents or descents require O(log n)-time. Note that in (a) the maximal sequence landscape is ascending, and in (b) the maximal sequence landscape is descending, and the frequency of a substring in s can be determined in constant time using LCPs . Second, since each time it ascends one character from s is processed and the number of ascents equals the number of descents, the total number of ascents and descents is 2n. Therefore, since the data structures are constructed in O(n)-time, and since there are at most 2n ascents or descents which take O(log n)-time, the running time of the algorithm is O(n + n log n). Theorem 3. The maximal sequence landscape of string s of size n can be built in O(n + n log n)-time and O(n)-space. 4.2 Assignment of k-mer Sizes to Reads We assign values of k to the reads using the maximal sequence landscape constructed for the reference genome by first aligning the reads to the reference genome using BWA (version 0.7.4) [21] in paired-end mode. We consider all forward and reverse alignments of every read. Let p be the position in the reference genome where a read of length ` aligns, and let k ∗ be the maximum of {MSL[p] + 1, MSL[p + 1] + 1, . . . , MSL[p + `] + 1}, where MSL is the maximal sequence landscape array that contains the height of the maximal sequence landscape at each position. We compute k ∗ for each forward alignment and let K ∗ be the set of all these values. The optimal value of k for the (forward) read is equal to the maximum value in K ∗ . We follow the same procedure for the reverse alignments with the exception that we compute the reverse complement of the read. Thus, the optimal values of k can be computed in linear time in the length of the read. 6 If the computed k-mer size (maximum of all maximal sequence landscape heights of all aligned nucleotides) is larger than the read length, then a default value (k = 77 is the default) is used instead. Unaligned reads are also assigned a default k-mer value (k = 55 is the default). 4.3 The de Bruijn Graphs Let R = {r1 , . . . , rN } denote the set of reads. We also denote the k-mer size assigned to ri in the previous section by K(ri ). In the first step of constructing the assembly de Bruijn graphs, we partition R into Rk := {r ∈ R | K(r) = k}, in which k ranges from kmin = minr∈R K(r) to kmax = maxr∈R K(r). The HyDA-Vista assembly procedure, shown in Algorithm 3, iteratively builds de Bruijn graphs Gkmin , . . . , Gkmax with k = kmin , . . . , kmax respectively and obtains Akmin , . . . , Akmax assembly contig sequences after iterative graph condensation and error removal. Each Gk is constructed from the reads whose assigned k-mer size is not more than k and the contigs resulting from Gk−1 constructed in the previous iteration, k [ Rj ∪ Ak−1 . (3) j=kmin The rationale behind this idea is that those reads that have an assigned k-mer size not more than k should ideally not create any repeats when they are assembled with the k-mer size k. The iterative inclusion of contigs from previous rounds, first introduced in IDBA [30] and later adopted by others [2], is an idea that has already shown merit in improving assembly quality. In Algorithm 3, HyDA is a function that accepts a set of input sequences and an integer k, and returns a set of contigs which are obtained from assembling the input sequences with a k de Bruijn graph. Algorithm 3 Construction of the de Bruijn graphs 1: function HyDA-Vista(R, K) 2: kmin ← minr∈R K(r), kmax ← maxr∈R K(r) 3: for all kmin ≤ k ≤ kmax do 4: Rk ← ∅ 5: end for 6: for all r ∈ R do 7: k ← K(r) 8: Rk ← Rk ∪ {r} 9: end for 10: R0 ← ∅ 11: Akmin −1 ← ∅ 12: for k := kmin to kmax do 13: R 0 ← R 0 ∪ Rk 14: Ak ← HyDA(R0 ∪ Ak−1 , k) 15: end for 16: return Akmax 17: end function 5 5.1 . assembly contigs . contigs resulting from assembly with HyDA Results Improved Efficiency Due to Maximal Sequence Landscape HyDA-Vista uses the maximal landscape to break the reads into groups by assigning each a value of k. It then uses these groups to build the graph iteratively. This is in contrast to other methods that also iteratively build of the graph; SPAdes [2] uses all the reads at each iteration, and IDBA [30] uses a more complicated approach to remove some subset of reads at each iteration. Thus, one of the main advantages of using the maximal sequence landscape is that it increases the efficiency of building the assembly graph iteratively without degrading assembly quality (see the next subsection for a comparison of the different assemblers). To demonstrate this efficiency experimentally we ran HyDA-Vista with and without the maximal sequence landscape on multicell E. coli (substr. K-12) Illumina data and the E. coli (substr. K-12) reference genome. See Subsection 5.2 for a description of this dataset. Without the maximal sequence landscape the assembly took 1,414 minutes, and with the maximal sequence landscape the assembly took 822 minutes with 42 number of minutes for building the maximal sequence landscape and assigning the values of k to the reads. 7 5.2 Comparison Between Competing Assemblers and HyDA-Vista on E.Coli The first data set consists of approximately 27 million paired-end 100 bp reads from multicell E. coli (substr. K-12), generated by the Illumina Genome Analayzer (GA) IIx platform. It was obtained from the NCBI Short Read Archive (accession ERA000206, EMBL-EBI Sequence Read Archive). To assess assembly quality, we aligned the reads to the E. coli reference genome (substr. K-12) using BWA (version 0.5.9) [21] with default parameters. We call a read mapped if BWA outputs an alignment for it and unmapped otherwise. Analysis of the alignments revealed that 98% of the reads mapped to the reference genome, representing an average depth of approximately 600×; An analysis using BLAST against known contaminants revealed that the unmapped reads are attributed to minor contamination of the sample [8]. All reads were error corrected using BayesHammer [28] with default parameters. KmerGenie [7] predicted 41 to be the optimal k-mer value for this dataset. Therefore, for the assemblers that require a single value of k to be specified (SOAPdenovo, ABySS, HyDA) we used k = 41. HyDA and HyDA-Vista were ran with a cut off of five. All other parameters of SOAPdenovo and ABySS were kept at their default. SPAdes and IDBA were run with their default parameters in single-end mode. Since the input reads were corrected prior to assembly, the reported data for SPAdes is from the “only assembly” stage. IDBA was run with and without error correction, yielding the same statistics as expected. Table 2: The performance comparison between major assembly tools and HyDA-Vista on the error-corrected standard multicell E. coli dataset (6.2 Gbps, 28 million reads, 100bp, treated as single-end) using QUAST in default mode [13]. All statistics are based on contigs no shorter than 500 bp. Since there are not (QUASTdefined) misassemblies in any of the assemblies, the length statistics are based on correct contigs. NGA50 (NA50) is a (QUAST-corrected) contig size the contigs larger than which cover half of the genome (assembly) size [13, 10]. Total is sum of the length of all contigs. MA is the number of misassemblies. GF is the genome fraction percentage, which is the fraction of genome bases that are covered by the assembly. Unaligned is the total length of all of the contigs that could not be aligned to the reference. Assembler SOAPdenovo ABySS SPAdes IDBA HyDA HyDA-Vista NGA50 32,032 31,237 60,338 57,826 36,292 82,838 NA50 35,343 32,987 60,768 58,549 39,069 94,910 Largest (bp) 101,201 110,012 173,976 173,964 123,771 204,602 Total (bp) 4,304,232 4,530,701 4,545,775 4,538,426 4,524,075 4,544,286 MA 3 0 0 0 0 0 GF (%) 95.2 97.56 97.8 97.7 97.4 97.9 Unaligned (bp) 3,421 0 3,001 2,349 0 0 Table 2 gives the standard assembly statistics of all the assemblies. All statistics in Table 2 were computed by QUAST in default mode [13]. The results demonstrate that HyDA-Vista achieves the best assembly prior to repeat resolution or scaffolding. Note that upon determination of k-mer sizes, all assemblers were run in single-end mode, i.e., ignoring the pairing information, to study only the effect of our k assignment on contigs. HyDA provides a skeletal de Bruijn graph implementation on which other technologies can be developed. HyDA alone does not compete with some of the state of the art assemblers such as SPAdes and IDBA that employ multiple sophisticated technologies. However, empowered by only the maximum landscape information without any other sophisticated technology particularly pairing information, HyDA-Vista increases the N50 and NG50 more than twice (in comparison to HyDA) and outperforms the competing assemblers in all measures (the NG50 of 36 kbps obtained by HyDA increases to 82 kbps by HyDA-Vista). 6 Conclusion We demonstrated that HyDA-Vista achieves superior performance with respect to standard assembly statistics for ecoli genome before repeat resolution and scaffolding. A crucial aspect of our method is the construction of the maximal sequence landscape for the phylogenetically-close genome, which allows for the optimal k-mer value to be computed for each read. The maximal sequence landscape requires that a pair of substrings be an exact match in order for them to be considered to be the same repetition. An area that warrants future investigation is determining if there is an efficient algorithm for computing the maximal sequence landscape for inexact matches, i.e., the maximal sequence landscape with the condition that two substrings x and y are considered to represent the same repetition (mountain) if the Hamming distance or edit distance between the two is at most d, where d is a parameter in the problem. Another open problem is determining whether the maximal sequence landscape could be constructed with only a suffix array. Since all the data structures (including the suffix array) are constructed in O(n)-time and O(n)-space the order notation of the running time of such a maximal sequence landscape construction algorithm would likely not improve the running time of the 8 existing algorithm by more than a small constant factor. However, the removal of the auxiliary data structures may simplify the algorithm and would be of theoretical interest. Acknowledgement The authors would like to thank Ross McConnell from Colorado State University for many insightful discussions and suggestions. 9 References [1] C. Alkan, S. Sajjadian, and E. E. Eichler. Limitations of next-generation genome sequence assembly. Nature Methods, 8(1):61–65, 2011. [2] A. Bankevich et al. SPAdes: A new genome assembly algorithm and its applications to single-cell sequencing. J. of Comp. Bio., 19(5):455–477, 2012. [3] G. Benson. A space efficient algorithm for finding the best nonoverlapping alignment score. Theoretical Computer Science, 145(1):357–369, 1995. [4] A. Blumer, J. Blumer, D. Haussler, A. Ehrenfeucht, M.T. Chen, and J. Seiferas. The Smallest Automation Recognizing the Subwords of a Text. Theor Comput Sci, 40:31–55, 1985. [5] J. Butler et al. ALLPATHS: De Novo assembly of whole-genome shotgun microreads. Genome Res., 18(5):810–820, 2008. [6] M. J. Chaisson and P. A. Pevzner. Short read fragment assembly of bacterial genomes. Genome Res., 18(2):324–330, 2008. [7] R. Chikhi and P. Medvedev. Informed and automated k-mer size selection for genome assembly. Bioinformatics, 30(1):31–37, 2014. [8] H. Chitsaz et al. Efficient de novo assembly of single-cell bacterial genomes from short-read data sets. Nature Biotech, 29(10):915–921, 2011. [9] B. Clift, D. Haussler, R. M. McConnell, T. D. Schneider, and G. D. Stormo. Sequence landscapes. Nucleic Acids Res., 14:141–158, 1986. [10] D. Earl et al. Assemblathon 1: a competitive assessment of de novo short read assembly methods. Genome Res., 21(12):2224–2241, 2011. [11] W. M. Fitch, T. Smith, and J. L. Breslow. Detecting internally repeated sequences and inferring the history of duplication. Methods in enzymology, 128:773–788, 1985. [12] S. Gnerre, E. S. Lander, K. Lindblad-Toh, and D. B. Jaffe. Assisted assembly: how to improve a de novo genome assembly by using related species. Genome Biol, 10(8):R88, 2009. [13] A. Gurevich, V. Saveliev, N. Vyahhi, and G. Tesler. QUAST: quality assessment tool for genome assemblies. Bioinformatics, 29(8):1072–1075, 2013. [14] D. Gusfield. Algorithms on strings, trees and sequences: computer science and computational biology. Cambridge University Press, 1997. [15] D. Haussler et al. Genome 10K: a proposal to obtain whole-genome sequence for 10,000 vertebrate species. J. Hered., 100(6):659–674, 2009. [16] J. Huddleston et al. Reconstructing complex regions of genomes using long-read sequencing technology. Genome Res., 24(4):688–696, 2014. [17] R.M. Idury and M.S. Waterman. A new algorithm for dna sequence assembly. J. of Comp. Bio., 2(2):291– 306, 1995. [18] J. Kärkkäinen, P. Sanders, and S. Burkhardt. Linear word suffix array construction. J. ACM, 53(6):918– 936, 2006. [19] J. D. Klein et al. LOCAS–a low coverage assembly tool for resequencing projects. PLOS ONE, 6(8):e23455, 2011. [20] S. Kurtz, J. V Choudhuri, E. Ohlebusch, Chris Schleiermacher, J. Stoye, and R. Giegerich. Reputer: the manifold applications of repeat analysis on a genomic scale. Nucleic acids research, 29(22):4633–4642, 2001. [21] H. Li and R. Durbin. Fast and accurate short read alignment with Burrows-Wheeler transform. Bioinformatics, 25(14):1754–1760, 2009. [22] R. Li et al. De novo assembly of human genomes with massively parallel short read sequencing. Genome Res., 20(2):265–272, 2010. 10 [23] H.C. Lin et al. AGORA: Assembly Guided by Optical Restriction Alignment. BMC Bioinformatics, 13(1):189, 2012. [24] U. Manber and G. Myers. Suffix arrays: a new method for on-line string searches. SIAM Journal on Computing, 22(5):935–948, 1993. [25] P. Medvedev, S. Pham, M. Chaisson, G. Tesler, and P. A. Pevzner. Paired de bruijn graphs: A novel approach for incorporating mate pair information into genome assemblers. J of Comp Bio, 18(11):1625– 1634, 2011. [26] N. S. Movahedi, E. Forouzmand, and H. Chitsaz. De novo co-assembly of bacterial genomes from multiple single cells. In IEEE Conference on Bioinformatics and Biomedicine, pages 561–565, 2012. [27] N. Nagarajan, T. D. Read, and M. Pop. Scaffolding and validation of bacterial genome assemblies using optical restriction maps. Bioinformatics, 24(10):1229–1235, 2008. [28] S.I. Nikolenko, A.I. Korobeynikov, and M.A. Alekseyev. Bayeshammer: Bayesian clustering for error correction in single-cell sequencing. BMC Genomics, 14(Suppl 1):S7, 2013. [29] S. Ossowski et al. Sequencing of natural strains of Arabidopsis thaliana with short reads. Genome Res., 18(12):2024–2033, 2008. [30] Y. Peng, H.C.M. Leung, S.M. Yiu, and F.Y.L. Chin. IDBA – a practical iterative de Bruijn graph de novo assembler. In Research in Computational Molecular Biology, volume 6044 of Lecture Notes in Computer Science, pages 426–440, 2010. [31] P. A. Pevzner, H. Tang, and G. Tesler. De novo Repeat Classification and Fragment Assembly. Genome Res, 14(9):1786–1796, 2004. [32] P. A. Pevzner, H. Tang, and M. S. Waterman. An eulerian path approach to dna fragment assembly. PNAS, 98(17):9748–9753, 2001. [33] A. M. Phillippy, M. C. Schatz, and M. Pop. Genome assembly forensics: Finding the elusive mis-assembly. Genome Biol, 9(3):R55, 2008. [34] M. Sagot. Spelling approximate repeated or common motifs using a suffix tree. In LATIN’98: Theoretical Informatics, pages 374–390. Springer, 1998. [35] K. Schneeberger et al. Reference-guided assembly of four diverse Arabidopsis thaliana genomes. Proc. Natl. Acad. Sci. U.S.A., 108(25):10249–10254, 2011. [36] J. T. Simpson et al. ABySS: A parallel assembler for short read sequence data. Genome Res., 19(6):1117– 1123, 2009. [37] The 1000 Genomes Project Consortium. An integrated map of genetic variation from 1,092 human genomes. Nature, 491(7422):56–65, 2012. [38] P. J. Turnbaugh et al. The human microbiome project: exploring the microbial part of ourselves in a changing world. Nature, 449(7164):804–810, 2007. [39] Francesco Vezzi, Federica Cattonaro, and Alberto Policriti. e-RGA: enhanced reference guided assembly of complex genomes. EMBnet. journal, 17(1):pp–46, 2011. [40] Nikolay Vyahhi, Alex Pyshkin, Son Pham, and Pavel A. Pevzner. From de bruijn graphs to rectangle graphs for genome assembly. In Algorithms in Bioinformatics, volume 7534 of Lecture Notes in Computer Science, pages 249–261, 2012. [41] R. Zerbino and E. Birney. Velvet: Algorithms for de novo short read assembly using de bruijn graphs. Genome Res., 18(5):821–829, 2008. 11
5cs.CE
arXiv:1208.0977v1 [math.AC] 5 Aug 2012 A NOTE ON EUCLIDEAN ORDER TYPES PETE L. CLARK Abstract. Euclidean functions with values in an arbitrary well-ordered set were first considered in a 1949 work of Motzkin and studied in more detail in work of Fletcher, Samuel and Nagata in the 1970’s and 1980’s. Here these results are revisited, simplified, and extended. The two main themes are (i) consideration of Ord-valued functions on an Artinian poset and (ii) use of ordinal arithmetic, including the Hessenberg-Brookfield ordinal sum. In particular, to any Euclidean ring we associate an ordinal invariant, its Euclidean order type, and we initiate a study of this invariant. The main new result gives upper and lower bounds on the Euclidean order type of a finite product of Euclidean rings in terms of the Euclidean order types of the factor rings. Throughout, “a ring” means a commutative ring with multiplicative identity. We denote by R• the set R \ {0} and by R× the group of units of R. We denote by N the natural numbers, including 0. When we are thinking of N as the least infinite ordinal, we denote it by ω. If S is any class equipped with a “zero element” – here, either the least element of an ordered class or the identity element of a monoid – then we put S • = S \ {0}. By an ordered set X we mean a pair (X, ≤) with X a set and ≤ a reflexive, antisymmetric, transitive relation on X (i.e., what is often called a partial ordering). We will encounter some ordinal arithmetic, and it is important to remember that the “ordinary” sum and product of transfinite ordinal numbers need not be commutative. The literature seems to agree that for α, β ∈ Ord, α + β should be the order type of a copy of β placed above a copy of α, so that ω + 1 > ω, 1 + ω = ω. However, both conventions on αβ seem to be in use. We take the one in which 2ω = ω + ω, not the one in which 2ω = 2 + 2 + . . . = ω. 1. Ordered Classes, Isotone Maps, and Length Functions 1.1. Isotone Maps and Artinian Ordered Classes. For a set X, let OrdX denote the class of all maps f : X → Ord, ordered by f ≤ g ⇐⇒ ∀x ∈ X, f (x) ≤ g(x).1 Note that every nonempty subclass C = {fc } has an infimum in OrdX : that is, there is a largest element f ∈ OrdX with the property that f ≤ fc for all fc ∈ C. Indeed, we may take fC (x) = minc fc (x). An ordered class C is downward small if for all x ∈ C, {y ∈ X | y ≤ x} is a set. For any set X, OrdX is downward small. Let X and Y be ordered classes. We denote by X × Y the Cartesian product Thanks to David Krumm and Robert Varley for providing the inspiration for this work. c Pete L. Clark, 2012. 1We hasten to reassure the reader that this is the limit of our set-theoretic ambitiousness: we will never consider the collection of all maps between two proper classes! 1 2 PETE L. CLARK endowed with the ordering (x1 , y1 ) ≤ (x2 , y2 ) ⇐⇒ x1 ≤ x2 and y1 ≤ y2 . A map f : X → Y is weakly isotone (resp. isotone) if x1 ≤ x2 ∈ X =⇒ f (x1 ) ≤ f (x2 ) (resp. x1 < x2 =⇒ f (x1 ) < f (x2 )). The composite of (weakly) isotone maps is (weakly) isotone. An ordered class X is Noetherian (resp. Artinian) if there is no isotone map f : Z+ → X (resp. f : Z− → X). Thus a well-ordered class is precisely a linearly ordered Artinian class. For an ordered set X, we define Iso(X) ⊂ OrdX to be the subclass of isotone maps, with the induced partial ordering. Lemma 1. Let X be an ordered set. Then every nonempty subclass of Iso(X) has an infimum in Iso(X). Proof. Let C = {fc } be a nonempty subclass of Iso(X), and let f be the infimum in OrdX ; it suffices to show that f is isotone. If x < y in X, then fi (x) < fi (y) for all i ∈ I, so f (x) = mini∈I fi (x) < mini∈I (fi (x) + 1) ≤ mini∈I fi (y) = f (y).  Theorem 2. For a downward small ordered class X, TFAE: (i) There is an isotone map f : X → Ord. (ii) There is an Artinian ordered set Y and an isotone map f : X → Y . (iii) X is Artinian. Proof. (i) =⇒ (ii): If f : X → Ord(X) is an isotone map, then f : X → f (X) is an isotone map with codomain an Artinian ordered set. (ii) =⇒ (iii): Suppose not: then there is an isotone map ι : Z− → X is an isotone map. But then f ◦ ι : Z− → Y is isotone, so Y is not Artinian. (iii) =⇒ (i) [Na85, Prop. 4]: We will construct λX ∈ Iso(X) by a transfinite process. For α ∈ Ord, at the αth stage we assign some subset Xα ⊂ X the value α. Let X0 be the set of minimal elements of X. Having defined Xβ for all β < α, we assign the value α to all x ∈ X \ XβSsuch that there is Yx ⊂ Xβ with x = sup Yx . Then, for arbitrary X, taking X ′ = α Xα , this defines λX ∈ Iso(X ′ ). We claim that since X is Artinian and downward small, X ′ = X: if not, let x be a minimal element of X \ X ′ . Then λX is defined on D◦ (x) = {y ∈ X | y < x} and x = sup D◦ (x), so if α = sup λX (D◦ (x)), then λX (x) = α (if α ∈ / λX (D◦ (x)) or λX (x) = α + 1 (if α ∈ D◦ (x)).  1.2. Length Functions. By Theorem 2 and Lemma 1, for any Artininan ordered set X, Iso(X) has a bottom element. Indeed the map λX : X → Ord constructed in the proof of Theorem 2 is the bottom element of Iso(X). Following [Br02], we call λX the length function. If X has a top element T , we define the length of X to be len(X) = λX (T ). Example 1.1: For α ∈ Ord and x ≤ α, λα+1 (x) = x, so len(α + 1) = λα+1 (α) = α. Example 1.2: For m, n ∈ Z+ , let X1 = {0, . . . , m} and X2 = {0, . . . , n}, and let X = X1 × X2 . Then for all (i, j) ∈ X, λX (i, j) = i + j and len(X) = m + n. A NOTE ON EUCLIDEAN ORDER TYPES 3 For α, β ∈ Ord, we define the Brookfield sum α ⊕B β := len((α + 1) × (β + 1)). We recall the following, a version of the Cantor normal form: for any α, β ∈ Ord there are γ1 , . . . , γr ∈ Ord, r ∈ Z+ and m1 , . . . , mr , n1 , . . . , nr ∈ N with α = m1 ω γ1 + . . . + mr ω γr , β = n 1 ω γ1 + . . . + n r ω γr . This representation of the pair (α, β) is unique if we require max(mi , ni ) > 0 for all i. We may then define the Hessenberg sum α ⊕H β = (m1 + n1 )ω γ1 + . . . + (mr + nr )ω γr . Theorem 3. For all α, β ∈ Ord, α ⊕B β = α ⊕H β. Proof. See [Br02, Thm. 2.12].  In view of Theorem 3 we write α ⊕ β for α ⊕B β = α ⊕H β and speak of the Hessenberg-Brookfield sum. This operation is well-known to the initiates of ordinal arithmetic, who call it the “natural sum”. The next result collects facts about α ⊕ β for our later use. Proposition 4. Let α, β ∈ Ord. a) If β < ω, then α + β = α ⊕ β. b) In general we have (1) max(α + β, β + α) ≤ α ⊕ β ≤ αβ + βα. Proof. Left to the reader.  2. Euclidean Functions 2.1. Basic Definitions. A Euclidean function is a function ϕ : R• → Ord such that for all a ∈ R, b ∈ R• , there are q, r ∈ R with a = qb + r and (r = 0 or ϕ(r) < ϕ(b)). A ring is Euclidean if it admits a Euclidean function. Example 2.1: Let R = Z. Then n 7→ |n| is a Euclidean function. Example 2.2: Let k be a field and let R = k[t]. Then ϕ : R• → Z+ given by P 7→ 1 + deg P is a Euclidean function, as is P 7→ 2deg P . Example 2.3: [Sa71, Prop. 5] Let R be a semilocal PID with nonassociate prime elements π1 , . . . , πn . We may write x ∈ R× as uπ1a1 · · · πnan for a1 , . . . , an ∈ N, and then x 7→ a1 + . . . + an is a Euclidean function. Proposition 5. a) Let ϕ : R• → Ord be a Euclidean function. For every nonzero ideal I of R, let x ∈ I • be such that ϕ(x) ≤ ϕ(y) for all y ∈ I • . Then I = hxi. b) In particular, a Euclidean ring is principal. Proof. Left to the reader; or see [Sa71, Prop. 3].  Extension at zero: It will be convenient to define our Euclidean functions at the zero element of R. There are several reasonable ways to do this. Although the initially appealing one is to take ϕ(0) = 0 and require ϕ to take nonzero values on 4 PETE L. CLARK R• , in the long run it turns out to be useful to take a quite different convention: we allow Euclidean functions to take the value zero at nonzero arguments – so that, in particular, the bottom Euclidean function ϕR will take the value 0 precisely at the units – and we define ϕ(0) = supx∈R• ϕ(x) + 1. This is actually not so strange: after all, 0 is the top element of R with respect to the divisibility quasi-ordering. 2.2. Structure Theory of Principal Rings. Q Theorem 6. a) If R = ri=1 Ri , then R is principal iff Ri is principal for all i. b) For every principal ring R there is r ∈ N, a finite set of principal Qn ideal domains R1 , . . . , Rn and a principal Artinian ring A such that R ∼ = i=1 Ri × A. The Ri ’s are uniquely determined by R up to isomorphism (and reordering), and A is uniquely determined by R up to isomorphism: we call A the Artinian part of R. c) A ring is Artinian principal iff it is isomorphic to a finite product of local Artinian principal rings. Proof. See [ZS, p. 245].  2.3. Generalized Euclidean Functions. A generalized Euclidean function is a function ϕ from R• to an Artinian ordered class X such that for all x ∈ R, y ∈ R• , there are q, r ∈ R with a = qx + r such that either r = 0 or ϕ(r) < ϕ(b). As several authors have observed over the years, nothing in the theory of Euclidean functions is lost by entertaining Euclidean functions with values in any Artinian ordered class. In particular, the proof of Proposition 5 carries over easily to show that a ring admitting a generalized Euclidean function is principal. But there is a better way to see this: Lemma 7. Let X, Y be Artinian ordered classes, ϕ : R → X a generalized Euclidean function and f : X → Y an isotone map. Then f ◦ ϕ : R → Y is a generalized Euclidean function. Proof. Left to the reader.  Corollary 8. ([Sa71, Prop. 11], [Na85, Prop. 4]) A ring which admits a generalized Euclidean function is Euclidean. Proof. If ϕ : R → X is generalized Euclidean, λX ◦ ϕ : R → Ord is Euclidean.  Proposition 8 may suggest that there is nothing to gain in considering Euclidean functions with values in a non-well-ordered sets. But this is not the case! Lemma 9. ([Na85, Thm. 2]) Let R1 , R2 be commutative rings, X1 , X2 be Artinian ordered classes, and ϕ1 : R1 → X1 , ϕ2 : R2 → X2 be generalized Euclidean functions. Then ϕ1 × ϕ2 : R1 × R2 → X1 × X2 is a generalized Euclidean function. Proof. Let x = (x1 , x2 ) ∈ R, y = (y1 , y2 ) ∈ R• . We may assume y ∤ x and thus x ∈ R• . Since ϕ1 and ϕ2 are Euclidean, for i = 1, 2 there are qi , ri ∈ Ri with xi = qi yi + ri and (ri = 0 or ϕi (ri ) < ϕi (yi )). Since y ∤ x, r 6= 0. Now: Case 1: Suppose that any one of the following occurs: (i) r1 6= 0, r2 6= 0. A NOTE ON EUCLIDEAN ORDER TYPES 5 (ii) r1 = y1 = 0, and thus r2 , y2 6= 0. (iii) r2 = y2 = 0, and thus r1 , y1 6= 0. Put q = (q1 , q2 ) and r = (r1 , r2 ), so x = qy + r and ϕ(r) = (ϕ(r1 ), ϕ(r2 )) < (ϕ(y1 ), ϕ(y2 )) = ϕ(y). Case 2: Suppose r1 = 0, y1 6= 0, and thus r2 6= 0. Then take q = (q1 − 1, q2 ) and r = (y1 , r2 ), so x = qy + r and ϕ(r) = (ϕ(y1 ), ϕ(r2 )) < (ϕ(y1 ), ϕ(y2 )) = ϕ(y). Similarly if r2 = 0, y2 6= 0. Case 3: Suppose r2 = 0, y2 6= 0, and thus r1 6= 0. Put q = (q1 , q2 − 1) and r = (r1 , y2 ), so x = qy + r and ϕ(r) = (ϕ(r1 ), ϕ(y2 )) < (ϕ(y1 ), ϕ(y2 )) = ϕ(y).  2.4. Isotone Euclidean Functions. For a ring R, the divisibility relation is a quasi-ordering – i.e., reflexive and transitive but not necessarily anti-symmetric. If X and Y are quasi-ordered sets, we can define an isotone map f : X → Y just as above: if x1 < x2 =⇒ f (x1 ) < f (x2 ). Lemma 10. Let X be a quasi-ordered set and Y be an ordered set. Suppose that f : X → Y is an isotone map. Then X is ordered. Proof. For x1 , x2 ∈ X, x1 < x2 , x2 < x1 =⇒ f (x1 ) < f (x2 ), f (x2 ) < f (x1 ).  If X is a quasi-ordered set, it has an ordered completion: i.e., an ordered set X and a weakly isotone map X → X which is universal for weakly isotone maps from X into an ordered set. Indeed, we simply take the quotient of X under the equivalence relation x1 ∼ x2 if x1 ≤ x2 and x2 ≤ x1 . If we do this for the divisibility relation on R, we get precisely the ordered set Prin R of principal ideals of R. All this is to motivate the following definition. A Euclidean function ϕ : R → Ord is weakly isotone (resp. isotone) if whenever x divides y, ϕ(x) ≤ ϕ(y) (resp. whenever x strictly divides y, ϕ(x) < ϕ(y). Example 2.4: Define ϕ : Z• → Ord• by 1 7→ 2 and n 7→ |n| else. Then ϕ is Euclidean. But (1) = (−1) and ϕ(1) 6= ϕ(−1), so ϕ is not weakly isotone. Theorem 11. Let ϕ : R• → Ord be a Euclidean function. Then the set of isotone Euclidean functions ψ ≤ ϕ has a maximal element ϕ : x ∈ R• 7→ min• ϕ(y). y∈(x) Proof. Step 1: We show ϕ is a Euclidean function: let a ∈ R, b ∈ R• . Then there exists c ∈ R such that bc 6= 0 and ϕ(b) = ϕ(bc). Since ϕ is Euclidean, there are q, r ∈ R with a = qbc + r and either r = 0 – so b |a– or ϕ(r) ≤ ϕ(r) < ϕ(bc) = ϕ(b). Step 2: We show ϕ is isotone: If ac 6= 0, then ϕ(a) = miny | ay6=0 ϕ(ay) ≤ mincy | acy6=0 ϕ(acy) = ϕ(ac). Conversely, suppose ϕ(ac) = ϕ(a), and write a = qac + r with r = 0 or ϕ(r) < ϕ(ac) = ϕ(a). But if r 6= 0, then by what we have just shown, ϕ(r) = ϕ(a(1 − qc)) ≥ ϕ(a), a contradiction. So r = 0 and (a) = (ac). Step 3: By construction ϕ ≤ ϕ. Moreover, if ψ ≤ ϕ is an isotone Euclidean function,  then for all a, c ∈ R with ac 6= 0, ψ(a) ≤ ψ(ac) ≤ ϕ(ac), so ψ(a) ≤ ϕ(a). 6 PETE L. CLARK Corollary 12. A Euclidean function is weakly isotone iff it is isotone. Proof. Of course any isotone function is weakly isotone. Conversely, let ϕ : R• → Ord be a weakly isotone Euclidean function, let a, c ∈ R with ac 6= 0, and suppose ϕ(ac) = ϕ(c). Write a = qac + r with r = 0 or ϕ(r) < ϕ(ac) = ϕ(a). If r 6= 0, then ϕ(r) = ϕ(a(1 − qc)) ≥ ϕ(a), contradiction. So r = 0 and (a) = (ac).  2.5. The Bottom Euclidean Function and the Euclidean Order Type. For any commutative ring R, let Euc(R) ⊂ OrdR be the subclass of Euclidean functions ϕ : R → Ord, with the induced partial ordering. Lemma 13. Let R be a commutative ring. Then every nonempty subclass of Euc(R) has an infimum in Euc(R). Proof. Let C = {ϕc } be a nonempty subclass of Euc(R), and let ϕ be the infimum in OrdR ; it suffices to show that ϕ is Euclidean. Let a, b ∈ R with b ∤ a. Choose i ∈ I such that ϕ(b) = ϕi (b). Since ϕi is Euclidean, there are q, r ∈ R such that ϕi (r) < ϕi (b), and then ϕ(r) ≤ ϕi (r) < ϕi (b) = ϕ(b).  Theorem 14. Let R be a Euclidean ring. a) The class Euc(R) of all Euclidean functions on R has a bottom element ϕR . b) The bottom Euclidean function ϕR is isotone. c) The set ϕR (R) is an ordinal. Proof. a) This is immediate from Lemma 13. b) Since ϕR is the bottom Euclidean function, we must have ϕR = ϕR . c) It’s enough to show ϕR (R) is downward closed: we need to rule out the existence of α < β ∈ Ord such that ϕR (R) contains β but not α. Let α′ be the least element of ϕR (R) exceeding α. If we redefine ϕR to take the value α whenever ϕR takes the value α′ , we get a smaller Euclidean function than ϕR : contradiction.  Proposition 15. If R is Euclidean, the bottom Euclidean function ϕR is isotone. Proof. By Theorem 11, ϕR is an isotone Euclidean function. But ϕR is the bottom  Euclidean function, so ϕR = ϕR . For any Euclidean ring R we define the order type e(R) = ϕR (R) ∈ Ord. This ordinal invariant of R is our main object of interest: given a Euclidean ring R we would like to compute its order type e(R); conversely we would like to know which ordinals arise as order types of Euclidean rings. Example 2.5: Let R = Z. The map n ∈ Z 7→ # of binary digits of |n| is the bottom Euclidean function, so e(Z) = ω. Example 2.6: Let R = k[t]. The map x ∈ k[t] 7→ 1 + deg t is the bottom Euclidean function, so e(k[t])) = ω. Theorem 16. Suppose R is Euclidean with e(R) ≤ ω. Then: a) For all x ∈ R• , R/(x) is Artinian. b) R is either a PID or an Artinian principal ring. A NOTE ON EUCLIDEAN ORDER TYPES 7 Proof. a) If R/(x) were not Artinian, there would be a sequence of elements {xn }∞ n=0 in R with x0 = x and (xn+1 ) ( (xn ) for all n ∈ N. Applying Corollary 12b) we get ϕ(x) = ϕ(x0 ) > ϕ(x1 ) > . . . > ϕ(xn ) > . . ., contradicting ϕ(x) ∈ ω. b) This follows immediately from Theorem 6.  Corollary 17. (Fletcher [Fl71]) a) If A is an Artinian Euclidean ring, then e(R) < ω. b) A Euclidean ring R with e(R) = ω is a domain. Proof. a) The value of ϕA at x ∈ R depends only on the ideal (x). But an Artinian principal ring has only finitely many ideals! So e(R) < ω. b) This follows immediately from Theorem 16b) and part a).  2.6. The Localized Euclidean Function. Theorem 18. Let R be a Euclidean domain, and let S ⊂ R be a multiplicatively closed subset. Then the localization S −1 R is Euclidean and e(S −1 R) ≤ e(R). Proof. See [Mo49, §4] or Samuel [Sa71, Prop. 7].  2.7. The Quotient Euclidean Function. Theorem 19. Let ϕ : R → Ord be a Euclidean function. Let b ∈ R• be an ideal of R, and let f : R → R/(b) be the quotient map. For x ∈ R/(b), let x̃ ∈ f −1 (x) be any element such that ϕ(x̃) ≤ ϕ(y) for all y ∈ f −1 (x). a) Then ϕ′ : x ∈ (R/(b))• 7→ ϕ(x̃) is a Euclidean function. b) For the bottom Euclidean function ϕR , we have (2) ϕ′R (0) = sup ϕ′R (x) + 1 = ϕR (b). x6=0 Proof. a) For x ∈ R/(b), y ∈ (R/(b))• , x̃ ∈ R, ỹ ∈ R• , so there are q, r ∈ R with x̃ = q ỹ + r and ϕ(r) < ϕ(ỹ). Then x = f (q)y + f (r) and hence ϕ′ (f (r)) ≤ ϕ(r) < ϕ(ỹ) = ϕ′ (y). b) The first equality in (2) is the definition of the extension to 0 of any Euclidean function. The second equality is a key – in fact, characteristic – property of the bottom Euclidean function which is proved in [Sa71, Prop. 10].  Corollary 20. If R is Euclidean, so is every quotient ring R′ , and e(R′ ) ≤ e(R). 2.8. The Product Theorem. Lemma 21. (Ordinal Subtraction) a) For α ≤ β ∈ Ord, there is a unique γ ∈ Ord such that α + γ = β. We may therefore define −α + β = γ. b) Suppose we have ordinals α, β, γ such that γ ≤ α < β. Then −γ + α < −γ + β. Proof. a) Existence of γ: If α = β, then we take γ = 0. Otherwise, α ( β; let x0 be the least element of β \ α and let γ be the order type of {x ∈ β | x ≥ x0 }. Uniqueness of γ: suppose we have two well-ordered sets W1 and W2 such that α+W1 is order-isomorphic to α + W2 . Then the unique order-isomorphism between them induces an order-isomorphism from W1 to W2 . b) For if not, −γ + β ≤ −γ + α, and then β = γ + (−γ + β) ≤ γ + (−γ + α) = α.  8 PETE L. CLARK Theorem 22. Qn(Product Theorem) Let R1 , . . . , Rn be Euclidean rings. a) The ring i=1 Ri is Euclidean iff Ri is Euclidean for all i. b) If the equivalent conditions of part a) hold, then (3) e(R1 ) + . . . + e(Rn ) ≤ e( n Y Ri ) ≤ e(R1 ) ⊕ . . . ⊕ e(Rn ). i=1 Proof. Induction reduces us to the case n = 2. Put R = R1 × R2 . a) This is immediate from Lemma 9, Corollary 8 and Theorem 19. b) Let b = (0, 1), so R/(b) = R1 and thus by Theorem 19b), we have ϕR (b) = e(R1 ). For y ∈ R2 , b = (0, 1) | (0, y), so by Proposition 15, ϕR ((0, 1)) ≤ ϕR ((0, y)). By Lemma 21 we may put ψ(y) = −ϕR ((0, 1)) + ϕR ((0, y)). We claim ψ : R2 → Ord is a Euclidean function. Granting this for the moment, it then follows that ψ ≥ ϕR2 , so e(R) = ϕR ((0, 0)) = ϕR ((0, 1)) + ψ(0) ≥ e(R1 ) + e(R2 ). proof of claim: Let x ∈ R2 , y ∈ R2• ; as usual, we may assume y ∤ x. Since ϕR is Euclidean, there are q = (q1 , q2 ), r = (r1 , r2 ) ∈ R such that (0, x) = q(0, y) + r = (r1 , q2 y + r2 ) and either r = 0 or ϕR (r) < ϕR ((0, y)). Thus r1 = 0 and x = q2 y + r2 . Since y ∤ x we have r2 6= 0, so r 6= 0 and thus ϕR ((0, r2 )) < ϕR ((0, y)). By Lemma 21b) we may subtract ϕR (0, 1) – on the left! – from both sides to get ψ(r2 ) = −ϕR ((0, l)) − ϕR ((0, r2 )) < −ϕR ((0, 1)) − ϕR ((0, y)) = ψ(y). For the second inequality of (3), let ϕ1 : R1 → e(R1 ), ϕ2 : R2 → e(R2 ) be the bottom Euclidean functions on R1 and R2 . By definition of the Hessenberg-Brookfield sum, we have an isotone map λ : (e(R1 ) + 1) × (e(R2 ) + 1) → e(R1 ) ⊕ e(R2 ) and thus a Euclidean function λ ◦ (ϕ1 × ϕ2 ) : R → e(R1 ) ⊕ e(R2 ).  Remark 2.7: The upper bound on the order type of the product ring in (3) is essentially due to Nagata. Moreover, in the proof of Proposition 6 of [Sa71], Samuel gives the bound e(R1 × R2 ) ≤ e(R1 ) × e(R2 ) + e(R2 ) × e(R1 ). By Proposition 4b), Samuel’s bound is not as good as Nagata’s: there is a penalty to pay for employing the “usual” ordinal operations rather than the Hessenberg-Brookfield sum. 2.9. Applications. Let R be a nonzero local principal ring with maximal ideal (π). Then every element x ∈ R• may be written as uπ a for u ∈ R× and a unique a ∈ N. If R is a domain, then we take the convention that 0 = 1 · π ω . Otherwise R is Artinian and there is a least positive integer a such that 0 = 1 · π a ; this a is nothing else than ℓ(R), the length of R as an R-module. Theorem 23. a) (Samuel) Let R be a local principal ring with maximal ideal generated by π. The map ϕ : R → Ord by uπ a 7→ a is a Euclidean function on R. b) In fact ϕ = ϕR is the bottom Euclidean function, hence: • If R is a domain, e(R) = ω. • If R is Artinian, then e(R) = ℓ(R). A NOTE ON EUCLIDEAN ORDER TYPES 9 Proof. a) Let x = u1 π a ∈ R, y = u2 π b ∈ R• . If b ≤ a then y | x and we may write x = qy + 0. If b > a we may write x = 0 · y + x, and then ϕ(x) < ϕ(y). b) Let ϕR be the bottom Euclidean function on R, which is isotone by Proposition 15. Suppose first that R is a domain. Then for all a ∈ ω we must have 0 = ϕR (π 0 ) < ϕR (π 1 ) < . . . < ϕR (π a ) < . . . , and thus ϕ ≤ ϕR , so ϕR = ϕ and e(R) = ϕ(0) = sup ϕ(π a ) + 1 = ω. a∈N Similarly, if R is Artinian then 0 = ϕR (π 0 ) < ϕR (π 1 ) < . . . < ϕR (π ℓ(R) ), and as above this forces ϕR = ϕ and e(R) = ϕ(0) = ℓ(R).  Corollary 24. If R is an Artinian principal ring, then R is Euclidean and e(R) = ℓ(R), the length of R as an R-module. Proof. This follows immediately from Theorem 23 and Theorem 22. Q Theorem 25. Let R = ri=1 Ri × A = R′ × A be a Euclidean ring. a) We have e(R) = e(R′ ) + ℓ(A). b) e(R′ ) is a limit ordinal (possibly zero). c) e(R′ ) ≥ rω.  Proof. a) By Corollary 24, A is Euclidean with e(A) = ℓ(A); then by Theorem 22, e(R′ ) + ℓ(A) = e(R′ ) + e(A) ≤ e(R) ≤ e(R′ ) ⊕ e(A) = e(R′ ) + e(A) = e(R′ ) + ℓ(A). The remaining assertions hold trivially if r = 0, so we assume r ≥ 1. b) Since R′ is a product of domains, the set of nonzero ideals of R has no minimal element, so e(R′ ) is a nonzero limit ordinal. c) By part b) and Theorem 22, rω ≤ e(R1 ) + . . . + e(Rr ) ≤ e(R′ ).  Corollary 26. (Fletcher) A Euclidean ring R with e(R) = ω is a domain. Qr We say a Euclidean ring R ∼ = i=1 Ri × A(R) is small if e(Ri ) = ω for all i; otherwise we say R is large. Qr Theorem 27. a) Let R ∼ = i=1 Ri × A be a small Euclidean ring. Then e(R) = rω + ℓ(A), where n is the length of the Artinian principal ring A. b) For every ordinal α < ω 2 , there is a small Euclidean ring R with e(R) = α. Proof. a) By Theorem 25, e(A) = ℓ(A) < ω. Now we apply the Product Theorem: rω + ℓ(A) = e1 (R) + . . . + er (R) + e(A) ≤ e(R) ≤ r M e(Ri ) ⊕ ℓ(A) = rω + ℓ(A). i=1 b) The ordinals less than ω 2 are of the form rω + n for r, n ∈ ω. By part a), e(C[t]r × C[t]/(tn )) = rω + n.  10 PETE L. CLARK Are all Euclidean rings small? If so, Theorem 27 would be the ultimate result on Euclidean order types. This question was implicit in [Mo49] and made explicit in [Sa71]. It was later answered negatively by Hiblot [Hi75], [Hi77] and Nagata [Na78]. It seems that the Euclidean order type of these large Euclidean domains has never been investigated...and, alas, will not investigated here. However, the following result shows that Euclidean rings of the sort familiar in number theory are small. Proposition 28. ([Sa71, Prop. 15]) Let R be a Euclidean domain such that R/(a) is a finite ring for all a ∈ R• . Then R is small. Proof. If not, there is b ∈ R with ϕR (b) = ω. Let ϕ : R/(b) → Ord be the quotient Euclidean function. Write the elements of R/(b) as x1 = 0, x2 , . . . , xn . For all i > 1, ϕ(xi ) < ϕ(0) ≤ ω. But ϕ(0) = supi>1 ϕ(xi ) + 1 < ω. Thus, there exists b′ ∈ (b) with ϕR (b′ ) < ω, contradicting the fact that ϕR is isotone.  3. Length Functions on Rings 3.1. The length function on a Noetherian ring. In this section we closely follow work of Gulliksen [Gu73] and Brookfield [Br02]. Let R be a ring, and let I(R) be the lattice of ideals of R. Then I(R) is Noetherian (resp. Artinian) iff R is Noetherian (resp. Artinian). Thus the dual lattice I ∨ (R) is Artinian (resp. Noetherian) iff R is Noetherian (resp. Artinian). Henceforth we suppose R is Noetherian, so I ∨ (R) is Artinian with top element (0). By the results of §1 there is a least isotone map λR : I ∨ (R) → Ord, the length function λR of R, and we define the length of R as len(R) = λR ((0)). For any ideal I of R, R/I is Noetherian, so λR/I and len(R/I) are well-defined. If we denote the quotient map R → R/I by q, then the usual pullback of ideals q ∗ identifies I(R/I) with an ordered subset of I(R) and hence also I ∨ (R/I) with an ordered subset of I ∨ (R), and it is easy to see that under this identification we have λR |I ∨ (R/I) = λR/I , and thus also len(R/I) = λR/I ((0))) = λR (q ∗ ((0))) = λR (I). To ease notation, for x ∈ R we put ℓ(x) = λR ((x)). Proposition 29. Let ϕ be a Euclidean function on R. For all x ∈ R, ℓ(x) ≤ ϕ(x). Proof. Since R admits a Euclidean function, it is a principal ring, and thus I ∨ (R) = R• /R× . We may assume that ϕ = ϕR is the bottom Euclidean function on R. Then both ℓ and ϕ induce well-defined isotone functions on R• /R× . But by definition ℓ = λR is the least isotone function on I ∨ (R), so ℓ(x) ≤ ϕR (x) for all x ∈ R.  If R is a PID and x ∈ R• , then the ring R/(x) is an Artinian ring and thus its length, which is equal to ℓ(x), is finite. In particular, for all x ∈ R• ℓ(x) < ω and ℓ(0) = ω. From this the next result follows directly. A NOTE ON EUCLIDEAN ORDER TYPES 11 Proposition 30. Let R be a PID which is not a field, and let x ∈ R. a) If x ∈ R× , then ℓ(x) = 0. b) If x ∈ R• \ R× , we may write x = π1 · · · πn for not necessarily distinct prime elements π1 , . . . , πn , and then ℓ(x) = n. c) We have ℓ(0) = len(R) = ω. 3.2. ℓ-Euclidean rings. A ring R is ℓ-Euclidean if the function x ∈ R 7→ ℓ(x) ∈ Ord• is a Euclidean function on R. The point is that if ℓ is a Euclidean function on R, it is then the least Euclidean function on R, so that e(R) = len(R). Example 3.1: a) The ring Z is not ℓ-Euclidean. b) For a field k, the ring k[t] is ℓ-Euclidean iff k is algebraically closed. Example 3.2: A norm on a nonzero ring R is a function | · |R → N such that |x| = 0 ⇐⇒ x = 0, |x| = 1 ⇐⇒ x ∈ R× and |xy| = |x||y| for all x, y ∈ R. A ring admitting a norm is necessarily a domain: if x, y ∈ R• , |xy| = |x||y| 6= 0, so xy ∈ R• . An ℓ-Euclidean domain admits a Euclidean norm: x ∈ R• 7→ 2x . Proposition 31. A localization of an ℓ-Euclidean domain is ℓ-Euclidean. Proof. Left to the reader.  Proposition 31 furnishes further examples of ℓ-Euclidean domains, namely any ring between k[t] and its fraction field. One wonders about further examples. Question 32. Is there a classification of ℓ-Euclidean domains? References [Br02] G. Brookfield, The length of Noetherian modules. Comm. Algebra 30 (2002), 3177-3204. [Fl71] C.R. Fletcher, Euclidean rings. J. London Math. Soc. 4 (1971), 79-82. [Gu73] T.H. Gulliksen, A theory of length for Noetherian modules. J. Pure Appl. Algebra 3 (1973), 159-170. [He06] G. Hessenberg, Grundbegriffe der Mengenlehre. Göttingen, 1906. [Hi75] J.-J. Hiblot, Des anneaux euclidiens dont le plus petit algorithme n’est pas à valeurs finies. C. R. Acad. Sci. Paris Sér. A-B 281 (1975), no. 12, Ai, A411-A414. [Hi77] J.-J. Hiblot, Correction à une note sur les anneaux euclidiens: “Des anneaux euclidiens dont le plus petit algorithme n’est pas à valeurs finies” (C. R. Acad. Sci. Paris Sér. A-B 281 (1975), no. 12, A411–A414). C. R. Acad. Sci. Paris S er. A-B 284 (1977), no. 15, A847-A849. [Mo49] T. Motzkin, The Euclidean algorithm. Bull. Amer. Math. Soc. 55 (1949), 1142-1146. [Na78] M. Nagata, On Euclid algorithm. C. P. Ramanujama tribute, pp. 175–186, Tata Inst. Fund. Res. Studies in Math., 8, Springer, Berlin-New York, 1978. [Na85] M. Nagata, Some remarks on Euclid rings. J. Math. Kyoto Univ. 25 (1985), 421-422. [Sa71] P. Samuel, About Euclidean rings. J. Algebra 19 (1971), 282-301. [ZS] O. Zariski and P. Samuel, Commutative algebra, Volume I. Van Nostrand, Princeton, New Jersey, 1958. Department of Mathematics, Boyd Graduate Studies Research Center, University of Georgia, Athens, GA 30602-7403, USA E-mail address: [email protected]
0math.AC
Multivariate analysis for Maxima in High Dimensions Jérémy Barbay and Javiel Rojas arXiv:1701.03693v1 [cs.CG] 13 Jan 2017 Departmento de Ciencias de la Computación, Universidad de Chile, Chile {jeremy, jrojas}@dcc.uchile.cl Abstract We study the problem of computing the Maxima of a set of n d-dimensional points. For dimensions 2 and 3, there are algorithms to solve the problem with order-oblivious instance-optimal running time. However, in higher dimensions there is still room for improvements. We present an algorithm sensitive to the structural entropy of the input set, which improves the running time, for large classes of instances, on the best solution for Maxima to date for d ≥ 4. 1 Introduction The problem of computing the Maxima of a set S of points was first formulated in 1974 by Kung et al. [9]: a point from S is called maximal if none of the remaining vectors in S dominates it in every component, and the Maxima of S (denoted by M (S)) is the set of maximal points in S. For any constant dimension d this problem can be solved naively in time within O(n2 ) by comparing every possible pair of points. Kung et al. [9] proposed two different algorithms to solve the problem in two and three dimensions, respectively, running in time within O(n log n). For higher dimensions, Kung et al. [9] presented a divide-and-conquer algorithm running in time within O(n logd−2 n) for dimensions d > 3, and showed a lower bound of within Ω(n log n) for this problem for any dimension d > 2. In 1985, Kirkpatrick and Seidel [8] gave the first output-size sensitive algorithm for this problem, running in time within O(n log h) in the plane, and within O(n logd−2 h) for dimension d > 3, where h is the size of the Maxima. In 2 and 3 dimensions, this result remained unbeaten for almost 25 years until Afshani et al. [2] described an instance-optimal algorithm for this problem (i.e., an algorithm whose cost is at most a constant factor from the cost of any other algorithm running on the same input, for every input instance). Given this improvement in 2 and 3 dimensions, one natural question is whether the same technique can be applied to higher dimensions in order to improve upon Kirkpatrick and Seidel’s results [8] in dimension d ≥ 4. We show that the upper bound can indeed be applied to higher dimensions, even though the generalization of the order-oblivious instance-optimality result is still open due to the lack of advanced lower bound techniques in high dimensions. We introduce some basic definitions in Section 2; and describe our generalization of Afshani et al.’s upper bound [2] to high dimension in Section 3, before discussing the potential for instance-optimality results in high dimension in Section 4. 2 2 Preliminaries An algorithm is said to be instance-optimal if its cost is at most a constant factor from the cost of any other algorithm on the same input, for every input instance. As such algorithm does not always exist, it is often useful to consider a relaxation of this concept, order-oblivious instance-optimality: an algorithm is said to be order-oblivious instance-optimal if it is instance-optimal on the worst input order possible. Afshani et al. [2] improved on the analysis of Kirkpatrick and Seidel [8] for the computation of the Maxima in dimensions 2 and 3 refining it to order-oblivious instance-optimal algorithms. In 2 dimensions, they showed that a simple variant of the output sensitive algorithm originally described by Kirkpatrick and Seidel [8] is, surprisingly, order-oblivious instance-optimal. For the 3 dimensional case, they described a completely new algorithm and a proof of its order-oblivious instance-optimality. To refine the analysis, Afshani et al. [2] introduced the notion of structural entropy of a set S of points, a measure of difficulty of the input instances of Maxima, and described two algorithms sensitive to this measure. To define the structural entropy of a point-set, Afshani et al. [2] first introduced the concept of respectful partition: Definition 1 (Respectful Partition). A partition Π of a set S of points in Rd into disjoint subsets S1 , . . . , St is said to be respectful if each subset Sk is either a singleton or can be enclosed by a d-dimensional axis-aligned box Bk whose interior is completely below the Maxima of S. Intuitively, the entropy of a respectful partition is the minimum number of bits required to encode it, and the structural entropy of a point-set is the entropy of a respectful partition with minimal entropy. Formally, the structural entropy of a point-set is defined as follows: Definition 2 (Structural Entropy). The entropy H(Π) Pt of a partition Π of S into disjoint subsets S1 , . . . , St is defined as the value k=1 (|Sk |/n) log(n/|Sk |). The structural entropy H(S) of the input set S is the minimum of H(Π) over all respectful partitions Π of S. Afshani et al. [2] showed that the Maxima of a point-set in dimensions 2 and 3, can be computed in time within O(n(H(S) + 1)), and proved a matching lower bound for any algorithm which ignores the input order. In Section 3 we generalize to higher dimensions Afshani et al. [2]’s upper bound on the computational complexity of Maxima in the worst case over instances of fixed size and structural entropy. This yields an algorithm sensitive to the structural entropy of the input set, hence improving on the solution described by Kirkpatrick and Seidel [8] for d ≥ 4. 3 3 Multivariate analysis for the computation of Maxima We present the algorithm DPC-Maxima (where DPC stands for “Divide, Prune, and Conquer”) which computes the Maxima of a d-dimensional set S of points with running time sensitive to the structural entropy of the input set. Similar to Afshani et al.’s algorithm [2], DPC-Maxima performs several pruning steps removing from S points that are detected to be dominated, until the remaining set becomes the Maxima of the original set. For this, the algorithm repeatedly partitions S into an increasing number of subsets, and for each partition removes from S the subsets that are contained in a box completely below the Maxima of S. The following is an outline of DPC-Maxima: Algorithm 1 DPC-Maxima Input: A set S of n points in Rd Output: The Maxima of S 1: j ← 0, M ← {S} 2: while there is a set in M with more than one point do j 3: j ← j + 1, rj ← 22 , M ← {} 4: partition S into rj subsets S1 , S2 , . . . , Srj of size at most n/rj 5: for i = [1..rj ] do 6: Let Γi be the minimum axis-aligned enclosing rectangle of Si 7: if Γi is below the Maxima of S then remove all points in Si from S else add Si to M 8: return the points remaining in S Note that DPC-Maxima always terminates: due to the restriction on the size of the subsets (in step 4), at most log log n iterations of the outer loop will be performed for any set S of n points. Besides, the algorithm is correct: only dominated points are removed, and in the last iteration of the outer loop every subset is a singleton, so the points remaining in S after that iteration are precisely those in the Maxima of S. In the rest of the section we analyze the running time of DPC-Maxima. Two main issues need to be addressed: how partitions are chosen in step 4, and how the filter steps 5-7 are performed efficiently. Partitions need to be chosen with care: if B is a box in an optimal respectful partition of S, the subsets considered by the algorithm that contain points within B need to be small (compact) enough so they fall completely inside B (and the subsets get pruned), but large enough that only a small number of subsets is needed to prune all the points within B. Besides, for a given partition, DPC-Maxima needs to check in small time whether the minimum axis-aligned enclosing rectangle of each subset in the partition is below the Maxima of S. 4 We address first the selection of the partition. We show in the following lemma that any point set S can be partitioned into subsets so that the faces of any axis aligned box B intersects a small number of them. In particular, if B is a box in a respectful partition of S, the lemma provides a bound on the number of points in S ∩ B remaining after the filtering in steps 5-7 of the algorithm DPC-Maxima. Lemma 1. Let S be a set of n points in Rd , and r be an integer in [1..n]. There is a partition Π of S into r subsets such that each subset has at most n/r points, and for any axis aligned d-dimensional box B: i. B partially intersects (i.e. intersects but does not contain) at most O(r1−1/d ) subsets in Π ii. There are at most min{|S ∩ B|, O(n/r1/d )} points within B that belong to subsets in Π not fully contained within B Besides, this partition can be found in time within O(|S| log r). Proof. The partition Π can be obtained building a k-d tree [4], using the median to split at each level, and recursing until the number of points within each cell drops to n/r or less. Built like this, the k-d tree will have at most log r levels and r leaf cells, each containing at most n/r points. For each leaf cell in the k-d tree, the subset of points contained within it is added to Π. If needed, empty subsets are added also to obtain the total r subsets. This way of proceeding requires running time within O(|S|) for each level, for a total running time within O(|S| log r). To prove proposition (i), we use the fact that any axis aligned d-dimensional box intersects at most O(r1−1/d ) leaf cells in a k-d tree with O(r) leaf cells [4]. Since the subsets in Π fall within cells in a k-d tree with at most r leafs, the result follows. Finally, (ii) derives from (i) and from the fact that every subset has at most n/r points: the points within B belong, in the partition, to subsets that are completely contained within B, or partially intersecting B; the latest ones can be at most O(r1−1/d ) because of (i), and contain at most n/r points each, for a total number of points within O(n/r1/d ), which completes the proof. t u Now, we turn the attention to the filtering process in steps 5-7 of the algorithm DPC-Maxima. For this, we introduce a data structure that answers dominance queries over a point set, and that benefits from knowing a priori the number of queries to perform. With it, the subsets in the partition that fall within boxes completely below the Maxima can be detected in small time. Lemma 2. Given a set S of n points in Rd , and an integer parameter r ∈ [1..n], there is a data structure that answers r dominance queries over S (i.e. given a query point q, detecting whether exists a point p ∈ S that dominates q) in total time and space within O(n logd−2 r). 5 Proof. Afshani et al. [2] introduced a simple data structure that answers dominance queries over a point-set of size n in time within O(logd−2 n), with preprocessing time within O(n logd−2 n). Combining this data structure with a grouping trick (e.g. such as described by Chan [5]) yields the result in the lemma: S is partitioned into dn/re subsets S1 , . . . , Sdn/re of size at most r, and each Si is processed into a data structure to answer dominance queries over Si . The total preprocessing time is within O( nr (r logd−2 r)) = O(n logd−2 r). To answer whether a point q is dominated by any of the points in S, the data structures corresponding to each Si are queried, for i ∈ [1..dn/re]: the final answer is “yes” only if q is dominated in any of the data structures. Thus, each query is answered t u in time within O( nr logd−2 r), for a total time within O(n logd−2 r). Note that, to detect whether a subset of S falls within a box that is completely below the Maxima of S (as in step 7 of DPC-Maxima), it is enough to query whether the corner with maximal coordinates (i.e. the “upper, right,. . . ” corner) of the minimum axis-aligned rectangle of the subset is dominated by any point in S. With this observation, and lemmas 1 and 2 we provide a first bound for the running time of DPC-Maxima: Lemma 3. Let S be a set of points, and σj be the size of S right after iteration j of the algorithm DPC-Maxima. The running time of DPC-Maxima is within P  log log n j(d−2) O σj × 2 . j=0 j Proof. Let rj = 22 (as defined in step 3 of DPC-Maxima). Obtaining the partition in step 4 using Lemma 1 costs time within O(|S| log rj ). Besides, the data structure described in Lemma 2 allows to perform the filtering steps in lines 5-7 collectively in total time within O(σj logd−2 rj ) (using rj as the parameter in the lemma). Applying the definition of rj yields a total time within O(σj × 2j(d−2) ). Since at most log log n iterations of the outer loop are performed, the result follows. t u Finally, we show that DPC-Maxima runs in time sensitive to the structural entropy of the input set in the following theorem: Theorem 1. Let S be a set of n points in Rd , and let Π be any optimal respectful partition of S into subsets S1 , . . . , Sh of sizes n1 , . . . , nh , respectively. The algorithm DPC-Maxima computes the Maxima of S in time within O(n + Ph d−2 n k=1 nk log nk ). Proof. Let σj be the size of S during iteration P j. From Lemma 3 we have that the log log n running time of DPC-Maxima is within O σj × 2j(d−2) . Now, consider j=0 a subset Sk in Π, and let Bk be the minimum axis-aligned box enclosing Sk . By j Lemma 1.(ii) there are at most min{nk , O(n/22 /d )} points in Sk that remain j in S after iteration j (remember that rj = 22 is used as the parameter in the lemma). By summing over all the subsets in the partition, and plugging the previous bound for the point remaining in each subset after the j-th iteration of the outer loop, we have that the running time of the algorithm is within: 6 logX log n O(σj × 2j(d−2) ) j=0 ⊆ logX log n X h j=0 = k=1 )} × 2j(d−2) j /d )} × 2j(d−2) min{nk , O(n/22 (reordering terms) j=0 k=1 ∈ /d k=1 log n h logX X h X j min{nk , O(n/22  n log(d log X nk  O ) nk × 2j(d−2) + j=0  logX log n n 1 j=1+log(d log n nk 2d2 ) j  × 2j(d−2)  The left inner summation can be bounded by directly by O(nk logd−2 n 1 nk ) . show that the right one is within O(nk ), start by bounding 2j(d−2) by 2 and take the infinite sum: logX log n j=1+log(d log n n nk ) 2 2j d ∞ X × 2j(d−2) ≤ j=1+log(d log To 2j−1 d , n n nk ) 2 2j−1 d This settles the case when nk > n/2: when n is factored out, the remaining series converges, and the total summation is within O(n) ⊆ O(nk ). For nk ≤ n/2, we substitute the variable of the sum by i = j − log(d log nnk ) − 1 to obtain: ∞ X j=1+log(d log n n nk )2 = 2j−1 d = nk ∞ X i=0 ∞ X i=0 n 22i log n/nk = ∞ X i=0 n n/nk 2i ∞ X 1 1 i −1 ≤ nk 2 2 (n/nk ) (2) i −1 i=0 ⊆ O(nk ) (because n/nk ≥ 2) (the serie converges) Finally, inner summations P replacing the bounds  for the two  yields the bound Ph h d−2 n d−2 n O n (1 + log ) ⊆ O n + n log t u k=1 k k=1 k nk nk . We prove next that, thanks to the concavity of the polylog function, the bound in Theorem 1 is never asymptotically worse than O(n logd−2 h), and hence the running time of DPC-Maxima is never worse than the running time of Kirkpatrick and Seidel’s algorithm [8]: 1 Use the identity Pm i=0 2c×i = 2c+cm −1 2c −1 ∈ O(2cm ) ⊆ O(logc m), for any constant c. 7 Lemma 4. Let S be a set of n points in Rd , of Maxima of size h, and let Π be any optimal respectful partition of S into subsets S1 , . . . , Sh of sizes n1 , . . . , nh , respectively. Then, O h X nk log d−2 k=1 n nk !   ⊆ O n logd−2 h P P Proof. For any concave function ϕ, and a = k ak , b = k bk , Gibbs’ inequality states that     X b bk . ≤ aϕ ak ϕ ak a i Since f (x) = logd−2 x is a concave function 2 , choosing ak = k = [1..h] yields: h X nk k=1 n log d−2  n nk  nk n , bk = 1 for ≤ logd−2 h. Multiplying both sides of the inequality by n yields the result. t u The upper bound in Theorem 1 properly generalizes Afshani et al.’s result [2] for dimensions 2 and 3 (d ∈ [2, 3]), but the lower bound proving is more tricky to prove: we discuss in the next section. 4 Discussion Ph The bound of O(n + k=1 nk logd−2 nnk ) in Theorem 1 is within Θ(n logd−2 h) for instances where all the subsets in an optimal respectful partition have equal size n/h (as illustrated in Figure 1.a). However, for instances with optimal unbalanced partitions (and hence with low structural entropy), the improvement in running time of DPC-Maxima over Kirkpatrick and Seidel’s algorithm [8] can be significant. Consider, for example, an instance where all the points not in the Maxima are dominated by a same unique point (as the one illustrated in Figure 1.b), and let h ∈ O(n1−ε ) be the size of the Maxima: Kirkpatrick and Seidel’s algorithm [8] for this instance runs in time within O(n logd−2 n), while DPC-Maxima runs in time within O(n), linear in the input size. For the problem of Maxima in dimension d ≥ 3, the best computational comPh plexity lower bound known so far is Ω(n(H(S) + 1)) = Ω(n + k=1 nk log nnk ), obtained by extending the bound given in 2009 by Afshani et al. [2] for 2 dimensions. For dimension d ≥ 4 there is a gap between this lower bound and the running time of the algorithm DPC-Maxima (which increases with d). The generalization of the order-oblivious instance-optimality result for the d-dimensional case for d ≥ 4 is still open. In general, there is a lack of advanced lower bound 2 f (x)00 = d(d − 1 − log x)(log d−2 x)/x2 ≤ 0 for all x ≥ 2d−1 8 REFERENCES x2 x2 B1 B1 B2 B2 Bh x1 (a) Bh x1 (b) Figure 1: Two sets of n points and Maxima of size h with worst-case (a) and bestcase (b) structural entropies, respectively. In both cases Π = {B1 , B2 , . . . , Bh } is an optimal respectful partition, in (a) all the boxes contain n/h points, while in (b) B1 contains (n − h + 1) points, and B2 , . . . , Bh are singletons. techniques for problems handling high dimensional data. In this sense, a theory of fine classes of problems (as partially done in the field of Parameterized Complexity [6]) could help to palliate this lack of techniques for lower bounds. A closely related problem is Dominance Reporting, where for a set S of n points in d-dimensional space, and a set of query points Q, one must report the points q ∈ Q for which there is a point in S that dominates q. For the offline version of the problem, where the size of Q is known to be significantly bigger than the size of S, the fastest data structure known to date, in dimension d ≥ 3, was presented in 2012 by Afshani et al. [1]. Karp et al. [7] considered an online version, where the size of Q is not known in advance, for which they describe a deferred data structure sensitive to the sizes of S and Q. One natural question is whether the results by Karp et al. [7] for online Dominance Reporting can be improved via a deferred data structure sensitive to the structural entropy of the input set to query. References [1] Peyman Afshani, Lars Arge, and Kasper Green Larsen. “Higher-dimensional orthogonal range reporting and rectangle stabbing in the pointer machine model.” In: Symposuim on Computational Geometry 2012, SoCG ’12, Chapel Hill, NC, USA, June 17-20, 2012. Ed. by Tamal K. Dey and Sue Whitesides. ACM, 2012, pp. 323–332. [2] Peyman Afshani, Jérémy Barbay, and Timothy M. Chan. “Instance-Optimal Geometric Algorithms.” In: 50th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2009, October 25-27, 2009, Atlanta, Georgia, USA. IEEE Computer Society, 2009, pp. 129–138. REFERENCES [3] [4] [5] [6] [7] [8] [9] 9 Jérémy Barbay, Ankur Gupta, Srinivasa Rao Satti, and Jonathan Sorenson. “Near-optimal online multiselection in internal and external memory.” In: J. Discrete Algorithms 36 (2016), pp. 3–17. Jon Louis Bentley. “Multidimensional Binary Search Trees Used for Associative Searching.” In: Commun. ACM 18.9 (1975), pp. 509–517. Timothy M. Chan. “Output-Sensitive Results on Convex Hulls, Extreme Points, and Related Problems.” In: vol. 16. 4. 1996, pp. 369–387. Rodney G. Downey and Michael R. Fellows. Parameterized Complexity. Monographs in Computer Science. Springer, 1999. Richard M. Karp, Rajeev Motwani, and Prabhakar Raghavan. “Deferred Data Structuring.” In: SIAM J. Comput. 17.5 (1988), pp. 883–902. David G. Kirkpatrick and Raimund Seidel. “Output-size sensitive algorithms for finding maximal vectors.” In: Proceedings of the First Annual Symposium on Computational Geometry, Baltimore, Maryland, USA, June 5-7, 1985. Ed. by Joseph O’Rourke. ACM, 1985, pp. 89–96. H. T. Kung, Fabrizio Luccio, and Franco P. Preparata. “On Finding the Maxima of a Set of Vectors.” In: J. ACM 22.4 (1975), pp. 469–476.
8cs.DS
Uncountably many quasi-isometry classes of groups of type F P Robert P. Kropholler Ian J. Leary∗ Ignat Soroko† arXiv:1712.05826v1 [math.GR] 15 Dec 2017 December 19, 2017 Abstract In [8] one of the authors constructed uncountable families of groups of type F P and of n-dimensional Poincaré duality groups for each n ≥ 4. We show that the groups constructed in [8] comprise uncountably many quasi-isometry classes. We deduce that for each n ≥ 4 there are uncountably many quasi-isometry classes of acyclic n-manifolds admitting free cocompact properly discontinuous discrete group actions. 1 Introduction Throughout this article, the phrase ‘continuously many’ will be used to describe sets having the cardinality of the real numbers. In [8] one of the authors exhibited continuously many isomorphism types of groups of type F P , extending the work of Bestvina and Brady [1], who constructed the first examples of groups of type F P that are not finitely presented. We extend these results still further, by showing that the groups constructed in [8] fall into continuously many quasi-isometry classes. Bestvina-Brady associate a group BBL to each finite flag complex in such a way that the homological properties of the group BBL are controlled by those of the flag complex L. In particular, in the case when L is acyclic but not contractible, BBL is type F P but not finitely presented. In [8], a group GL (S) is associated to each connected finite flag complex L and each set S ⊆ Z in such a way that the homological properties of GL (S) e In the case when L and L e are both are controlled by those of L and its universal cover, L. acyclic, each GL (S) is type F P . The construction of GL (S) generalizes that of BBL , and in particular GL (Z) is BBL . Our first main theorem is as follows. ∗ Partially supported by a Research Fellowship from the Leverhulme Trust. Partially supported by NSF Grants DMS-1107452, 1107263, 1107367 and ‘RNMS:Geometric Structures and Representation Varieties’ (the GEAR Network) 0 This work was started at MSRI, Berkeley (during the program Geometric Group Theory), where research is supported by the National Science Foundation under Grant No. DMS-1440140. It was completed at INI, Cambridge, during the programme Nonpositive curvature, group actions and cohomology, where research is supported by EPSRC grant EP/K032208/1. The authors thank both MSRI and INI for their support and hospitality. † 1 Theorem 1. For each fixed finite connected flag complex L that is not simply-connected, there are continuously many quasi-isometry classes of groups GL (S). The invariant that we rely on to distinguish the groups GL (S) is the invariant that was introduced by Bowditch [2] in his construction of continuously many quasi-isometry classes of 2-generator groups. (Grigorchuk’s construction of such a family, using growth rate to distinguish the groups [7], is no help to us because the groups GL (S) all have exponential growth.) To a graph Γ Bowditch associates a set H(Γ) of natural numbers, consisting of the lengths of loops in Γ that are taut in the sense that they are not consequences of shorter loops. He describes the relationship between H(Γ) and H(Γ′ ) in the case when Γ and Γ′ are quasi-isometric. When Γ is the Cayley graph associated to a group presentation satisfying the C ′ (1/6) small cancellation condition, the set H(Γ) is equal to the set of lengths of the relators of the presentation. Our proof involves estimating the set H(Γ(S)), where Γ(S) is the Cayley graph associated to the natural generating set for GL (S). The natural presentation for GL (S) contains relators whose lengths are parametrized by the absolute values of the members of S, but it also contains many relators of length 3, and does not satisfy the C ′ (1/6) condition. To apply Bowditch’s technique we need a lower bound for the word lengths of elements in the kernel of the map GL (S) → GL (T ) for S ⊆ T , in terms of T − S. The Cayley graph Γ(S) embeds naturally in a CAT(0) cubical complex. Our lower bound on word length uses this embedding and an easy lemma concerning maps between CAT(0) spaces. In the statement, the singular set for a map consists of all points at which it is not a local isometry. Lemma 2. Let f : X → Y be a continuous map of CAT(0) metric spaces, and suppose that x 6= x′ but f (x) = f (x′ ). Then the distance dX (x, x′ ) is at least twice the distance from x to the singular set for f . In the final section of this article, we study the behaviour of the Bowditch length spectrum of a Cayley graph under the operation of taking certain semi-direct products with infinitely generated right-angled Coxeter groups. Such semi-direct products arise when applying Davis’s trick to the groups GL (S) [5, 6]. For each S ⊆ Z one constructs a group J(S) which is the semi-direct product of GL (S) and a suitable Coxeter group, together with maps J(S) → J(T ) for S ⊆ T . Our aim is to estimate H(Λ(S)), where Λ(S) is a Cayley graph of the group J(S). Once again, the main problem is to give lower bounds for the word lengths of elements of the kernel of the map J(S) → J(T ). Roughly speaking, we show that short elements in this kernel give rise to short elements in the kernel of GL (S) → GL (T ). The main result of this section, Theorem 13, is too technical to state in this introduction, but instead we give one of its applications. Corollary 3. For each d ≥ 4 there is a closed aspherical d-manifold admitting continuously many quasi-isometry classes of regular acyclic covers. In contrast to the geometric methods used throughout the rest of the article, the proof of Theorem 13 is purely algebraic. It would be interesting to have a geometric proof of this theorem and conversely to have algebraic proofs of our results concerning GL (S). 2 Acknowledgements The authors thank Noel Brady and Martin Bridson for their interest in this project and for stimulating discussions about it. We also thank them both for having posed the question of whether the groups GL (S) fall into continuously many quasi-isometry classes, which initiated the project. 2 Background There are various types of Cayley graphs, but we shall need just one type which we shall call the simplicial Cayley graph Γ(G, S) associated to the group G and generating set S. This is the simplicial graph with vertex set G and edge set the 2-element sets of the form {g, gs} for some s ∈ S. This definition could be made for any S ⊆ G; the fact that S generates G is equivalent to the graph Γ(G, S) being connected. Any simplicial graph with a free, transitive G-action on its vertex set is isomorphic as a graph with G-action to Γ(G, S) for some S. The action of G on the edges of Γ(G, S) is free if and only if S contains no element of order two. Next we recall some material from [2] concerning quasi-isometries and Bowditch’s taut loop length spectrum. Since we change the language slightly we restate some of the results from [2] in our terms: the proofs are identical to the originals. Each graph Γ that we consider will be connected, simplicial, and will be viewed as a metric space via the path metric dΓ , in which each edge has length one. The induced metric on the vertex set of a Cayley graph Γ(G, S) is thus the S-word length metric on the group G. For k > 0 an integer, recall that a function f : X → Y between metric spaces is k-Lipschitz if dY (f (x), f (x′ )) ≤ k.dX (x, x′ ) for all x, x′ ∈ X. Following Bowditch [2], we say that graphs Γ and Λ are k-quasi-isometric if there exist a pair of k-Lipschitz maps of vertex sets φ : V (Γ) → V (Λ) and ψ : V (Λ) → V (Γ) so that dΓ (x, ψ ◦ φ(x)) ≤ k for each vertex x of Γ and similarly dΛ (y, φ ◦ ψ(y)) ≤ k for each vertex y of Λ. Graphs are quasi-isometric if they are k-quasi-isometric for some integer k > 0. We remark that the above definition is not the standard one; see for example [3, I.8.14] for the standard definition of a quasi-isometry between metric spaces. We leave it as an exercise to check that graphs Γ, Λ are quasi-isometric as above if and only if the metric spaces (Γ, dΓ ) and (Λ, dΛ ) are quasi-isometric in the usual sense. An edge loop of length l in a (simplicial) graph Γ is a sequence v0 , . . . , vl of vertices such that v0 = vl and {vi−1 , vi } is an edge for 1 ≤ i ≤ l. For a graph Γ and an integer constant l, let Γl denote the 2-complex whose 1-skeleton is the geometric realization of Γ, with one 2-cell attached to each edge loop in Γ of length strictly less than l. An edge loop of length l in Γ is said to be taut if it is not null-homotopic in Γl . Bowditch’s taut loop length spectrum H(Γ) for the graph Γ is the set of lengths of taut loops. We are interested in the 2-complex Γl only to define taut loops: if Γ′ is any subcomplex with Γ ⊆ Γ′ ⊆ Γl so that the induced map on fundamental groups π1 (Γ′ ) → π1 (Γl ) is an isomorphism, then an edge loop is taut if and only if it is not null-homotopic in Γ′ . Bowditch defines subsets H, H ′ ⊆ N to be k-related if for all l ≥ k 2 + 2k + 2, whenever l ∈ H then there is some l′ ∈ H ′ with l/k ≤ l′ ≤ lk and vice-versa. He then proves Lemma 4. If (connected) graphs Γ and Λ are k-quasi-isometric, then H(Γ) and H(Λ) 3 are k-related. In our terms, the lemmas that Bowditch uses to prove the above result are as follows. Lemma 5. H(Γ) is equal to the set of l ∈ N for which the induced map of fundamental groups π1 (Γl ) → π1 (Γl+1 ) is not an isomorphism. For any fixed l, let iΓ,l denote the inclusion of Γ in the 2-complex Γl . Lemma 6. If φ : Γ → Λ and ψ : Λ → Γ form a k-quasi-isometry between Γ and Λ, then for any l ≥ k 2 + 2k + 2 there are homotopies iΓ,l ◦ ψ ◦ φ ≃ iΓ,l and iΛ,l ◦ φ ◦ ψ ≃ iΛ,l . Next we review some material from [1, 8]. A flag complex or clique complex is a simplicial complex in which every finite set of mutually adjacent vertices spans a simplex. Let T denote the circle R/Z, viewed as a CW-complex with Qone vertex at 0 + Z ∈ R/Z and one edge. For a finite set V let TV denote the product v∈V Tv , where Tv denotes a copy of T. Non-empty subcomplexes of TV are in bijective correspondence with simplicial complexes with vertex set contained in V . If L is a flag complex with vertex set V , let TL denote the corresponding subcomplex of TV . This complex is aspherical, and its fundamental group is the right-angled Artin group AL associated to L, with generators corresponding to the vertices of L, subject only to the relations that v and w commute whenever {v, w} is an edge of L. The universal covering space XL of TL has a natural cubical structure, and is a CAT(0) cubical complex. The additive group structure in T = R/Z defines a map l : TV → T, e L to be the regular covering of TL induced and hence a map lL : TL → T. Define T by pulling back the universal covering of T along lL . The Bestvina-Brady group BBL e L ), or equivalently the kernel of the map is defined to be the fundamental group π1 (T AL → Z of fundamental groups induced by l : TL → T. Bestvina and Brady showed that many properties of BBL are determined by properties of L. In the case when L is acyclic but not simply connected, BBL is type F P but not finitely presented [1]. Let fL : XL → R be the map of universal coverings induced by lL . This map has the following properties: if we identify each n-cube of XL with [0, 1]n then its restriction to each n-cube is equal to an affine map; the image of each vertex of XL is an integer; the image of each n-cube of XL is an interval of length n. We view fL as defining a height e L , with covering group BBL . function on XL . There is a regular covering map XL → T In [8] this is generalized, under the extra assumption that L be connected. For each (S) set S ⊆ Z, a CAT(0) cubical complex XL is defined, together with a regular branched (S) e L , and the group GL (S) is by definition the covering group for this covering map XL → T (S) covering. The only branch points of this covering are the vertices of XL whose height is not in S, and the stabilizer in GL (S) of each branch point is a subgroup isomorphic to the fundamental group π1 (L). (In particular, the construction is non-trivial only when L is not simply-connected.) If S ⊆ T ⊆ Z, there is a regular branched covering map (S) (T ) XL → XL , branched only at vertices of height in T − S, and the branched covering (S) XL → TL factors through this. If S ⊆ T then there is a surjective group homomorphism (S) (T ) GL (S) → GL (T ), and the branched covering map XL → XL is equivariant for this homomorphism. The group GL (Z) is equal to BBL . 4 (S) The height function on XL induces a GL (S)-invariant height function on XL for e L has only one vertex of each integer height, the group GL (S) acts each S ⊆ Z. Since T (S) transitively on the vertices of XL of each height. The intersection of the 2-skeleton (S) of XL and the 0-level set (i.e., the points of height 0) is a simplicial graph Γ whose 0-skeleton is the vertices of height 0. Orbits of edges in Γ correspond to AL -orbits of squares in XL , or equivalently to edges of L. If 0 ∈ S then GL (S) acts freely on Γ, and so Γ can be identified with a simplicial Cayley graph for GL (S). This gives a natural choice of generators for GL (S) when 0 ∈ S, in bijective correspondence with the directed edges of L. Under the composite map GL (S) → GL (Z) = BBL → AL the element corresponding to the directed edge from vertex x to vertex y maps to the element xy −1 . To give a presentation for GL (S) with this generating set, we first fix a finite collection Ω of directed loops in L that normally generates π1 (L). In other words, if one attaches discs to L along the loops in Ω, one obtains a simply-connected complex. Three families of relators occur in this presentation, which we call P (L, Ω): • (Edge relations) for each directed edge a with opposite edge a, the relation aa = 1; • (Triangle relations) for each directed triangle (a, b, c) in L the relations abc = 1 and a−1 b−1 c−1 = 1; • (Long cycle relations) for each n ∈ S − {0} and each (a1 , . . . , al ) ∈ Ω the relation an1 an2 · · · anl = 1. Another crucial property of these presentations is that only the long relations corresponding to n ∈ S hold in GL (S): if (a1 , . . . , al ) ∈ Ω is not null-homotopic in L, then an1 an2 · · · anl 6= 1 for n ∈ / S ∪ {0}. We close by giving some references for more general background material. For CAT(0) spaces we suggest [3], and for homological finiteness conditions such as the F P property we suggest [4]. Each of these topics is also covered briefly in the appendices to [6], which is our recommended source for Coxeter groups. 3 Bounding word lengths by CAT(0) distances Our first task is to establish Lemma 2, as stated in the Introduction. Recall that a singular point of a map between CAT(0) spaces is a point at which the map is not a local isometry. Proof. (Lemma 2). As in the statement, let x, x′ ∈ X be distinct points such that f (x) = f (x′ ), and suppose that the geodesic arc γ from x to x′ does not pass through the singular set. In this case, f ◦ γ is a locally geodesic arc in Y , whose end points are both equal to f (x). In a CAT(0) space any locally geodesic arc is a geodesic arc, and the unique geodesic arc from f (x) to f (x′ ) = f (x) is the constant arc of length 0. This contradiction shows that γ must pass through the singular set. The claim follows. Lemma 7. Let L be a finite flag complex of dimension d. For any S ⊆ Z √ the distance (S) from the 0-level set in the CAT(0) space XL to a vertex of height n is |n|/ d + 1. 5 Proof. By symmetry it suffices to consider the case n > 0. Let γ be a path starting at (S) a vertex v of height n, and moving at unit speed in XL to the 0-level set. Minimizing the length of γ is equivalent to maximizing the speed of descent, i.e., minimizing the derivative of fL ◦ γ. The initial direction of travel of the path γ can be represented by a point of the link, (S) LkX (v), of v in X = XL . This is a simplicial complex in which each m-cube C of (S) XL that is incident on v contributes one (m − 1)-simplex, consisting of the unit tangent vectors at v that point into C. (S) If we identify an m-cube C of XL with [0, 1]m , then fL restricted to C is equal to (t1 , . . . , tm ) 7→ t1 + t2 + · · · + tm + r for√some integer r. The gradient of fL on the cube C is the vector (1, 1, . . . , 1), of length m. Thus any path γ of fastest descent leaves v travelling in the direction of the long diagonal of a cube C of maximal dimension whose highest √ vertex is v. If m < n then the path will reach the unique lowest vertex v ′ of C before it reaches the 0-level set; at this vertex a new choice of cube C ′ of maximal dimension with v ′ as its highest vertex should be made. (S) If w is any vertex of X = XL then the cubes of X that have w as their highest vertex correspond to a subcomplex of LkX (w) called the descending or ↓-link, Lk↓X (w). e Each descending link Lk↓X (w) is isomorphic to either L or its universal covering space L, depending only on whether the height of w lies in S. In particular, each descending link has dimension equal to d, the dimension of L. It follows that we can √ always find at least one unit speed path γ starting at v with 1 and there is no path descending faster. Hence the distance constant rate of descent d + √ from v to the 0-level set is n/ d + 1 as claimed. For S ⊆ Z, define m(S) := min{|n| : n ∈ S}. Lemma 8. Suppose that L is d-dimensional and that 0 ∈ S ⊆ T ⊆ Z, and take the standard generating set for GL (S) and GL (T ). The word length of p any non-identity element in the kernel of the map GL (S) → GL (T ) is at least m(T − S) 2/(d + 1). (S) Proof. The Cayley graph Γ(S) for GL (S) is embedded in the 0-level set in X := XL , (T ) and similarly Γ(T ) is embedded in the 0-level set in Y := XL . Moreover the branched covering map X → Y induces the natural quotient map Γ(S) → Γ(T ). Let v be a (S) height 0 vertex of X = XL . Each standard generator for GL (S) is represented by the diagonal of a square of X so for any g ∈ √GL (S) the triangle inequality tells us that the word length l(g) satisfies dX (v, gv) ≤ 2l(g). Now g is in the kernel of the map to GL (T ) if and only if gv and v map to the same vertex of Y . Singular points for the map X → Y are vertices w whose heights lie in T − S, and by Lemma 7 these √ have √ By Lemma 2 it follows that d (v, gv) ≥ 2m(T −S)/ d+1 dX (v, w) ≥ m(T −S)/ d + 1. X p √ and hence l(g) ≥ dX (v, gv)/ 2 ≥ m(T − S) 2/(d + 1). 4 Digression on convexity The arguments used in the previous section can be used to show that the 0-level sets are very rarely convex or even quasi-convex. The material in this section is not needed for our main theorem. 6 (S) Corollary 9. The 0-level set in XL is convex if and only if L is a single simplex. In (S) this case XL = XL does not depend on S. (S) Proof. If L is a d-simplex then XL = XL is a copy of Rd+1 and the 0-level set is an affine subspace. For the converse, if L is any flag complex other than a single simplex, then (S) L will contain at least two maximal simplices. If v is any vertex of XL of height one, the directions defined by the barycentres of these two maximal simplices give distinct geodesic paths from v to the 0-level set that are both locally distance minimizing, with end points x, x′ of height 0. Within the geodesic arc from x to x′ , at most one point can locally minimize distance to v; the assumption that this geodesic arc lies in the 0-level set leads to a contradiction. e does and Corollary 10. If either L contains two simplices of maximal dimension d, or L (S) Z − S is infinite, then the 0-level set in XL is not quasi-convex. Proof. We give only a sketch. Let θ = θ(d) be the angle in Rd+1 between the vector (1, 1, . . . , 1) and one of the coordinate hyperplanes. Let v be a vertex of height N in (S) X := XL . If L has a unique simplex of dimension d, then N should be chosen in Z − S, otherwise N may be arbitrary. In this case there are two distance-minimizing geodesic paths from v to the 0-level set, with end points x and x′ as above, corresponding to leaving v in the directions given by the barycentres of two distinct d-dimensional simplices of the descending link. We view x, x′ and other points that depend on them as functions of N. The angle at v between these two geodesics is at least the constant 2θ. The geodesic triangle with vertices x, x′ and v is isoceles √ with angle at least 2θ between the two equal sides. The length of the equal sides is N/ d + 1. √ If y is the midpoint of the geodesic arc ′ from x to x , it follows that dX (v, y) ≤ N√cos(θ)/ d + 1. By increasing N this distance can be made arbitrarily smaller than N/ d + 1, the distance from v to the 0-level set. Hence for any k, there is an N so that y is not in the k-neighbourhood of the 0-level set. Thus the 0-level set is not quasi-convex. 5 Taut loop length spectra for GL(S) Throughout this section we fix a finite connected non-simply connected flag complex L. For S a subset of Z containing 0, let Γ(S) denote the Cayley graph of GL (S) with respect to the standard generators. We give partial information concerning the taut loop length spectrum H(Γ(S)). As in [2], it will be convenient to assume that elements of S grow quickly. p Define α = α(L) by α = 2/(d + 1), where d is the dimension of L. For a finite set Ω of loops in S that normally generates π1 (L), let β(L, Ω) be the maximum of the lengths of the loops in Ω, and define β(L) to be the minimum value of β(L, Ω) over all such Ω. Choose an integer constant C = C(L) so that C > β/α and Cα > 3. For F any subset n of N, define S(F ) = {0} ∪ {C 2 : n ∈ F }. With these definitions we prove a statement that is identical to [2, Proposition 1]. Proposition 11. If F, F ′ are subsets of N so that Γ(S(F )) and Γ(S(F ′)) are quasiisometric then the symmetric difference of F and F ′ is finite. 7 Theorem 1 follows immediately from this proposition. To prove the proposition we first describe H(Γ(S(F ))). Theorem 12. For any F ⊆ N, the set H(Γ(S(F ))) is contained in the disjoint union S n n n n {3} ∪ n∈N [αC 2 , βC 2 ]. The set H(Γ(S(F ))) ∩ [αC 2 , βC 2 ] is non-empty if and only if n ∈ F . Also 3 is in H(Γ(S(F ))) if and only if L is not 1-dimensional. 0 Proof. The choice of C ensures that 3 < αC 2 and that for all n βC 2 < αC 2 which implies that the union is disjoint. Since Γ = Γ(S(F )) is a simplicial Cayley graph, the edge relations aa = 1 do not contribute to H(Γ), but the triangle relations imply that 3 ∈ H(Γ) whenever L has dimension at least two. If F = ∅ then the presentation P (L, Ω) contains only relations of length at most 3, so H(Γ) is either empty if L is 1-dimensional or is equal to {3} otherwise. It remains to establish three statements n n+1 • If n ∈ F then H(Γ(S(F ))) ∩ [αC 2 , βC 2 ] 6= ∅; n n • If n ∈ / F then H(Γ(S(F ))) ∩ [αC 2 , βC 2 ] = ∅; S n n • If k > 3 and k ∈ / n∈N [αC 2 , βC 2 ] then k ∈ / H(Γ(S(F ))). n n The second and third of these statements can be grouped together into a single fourth statement: S n n • If k > 3 and k ∈ / n∈F [αC 2 , βC 2 ] then k ∈ / H(Γ(S(F ))). For the first statement, let F ′ = F − {n}, and consider the covering map Γ(S(F ′)) → Γ(S(F )). The group GL (S(F ′ )) acts freely on Γ(S(F ′ )), so we may attach free orbits of 2-cells to Γ(S(F ′ )) to make a simply-connected Cayley 2-complex ∆. Now let K be the kernel of the map GL (S(F ′ )) → GL (S(F )), or equivalently the covering group for the regular covering Γ(S(F ′)) → Γ(S(F )). The quotient ∆/K is a 2-complex with 1-skeleton the graph Γ(S(F )) and fundamental group K. We know that any non-identity element n of K has word length at least αC 2 and that there is a non-identity element of K of word n length βC 2 . The shortest non-identity element of K defines a loop in Γ(S(F )) ⊆ ∆/K that must be taut, since it is not null-homotopic in ∆/K whereas every strictly shorter loop in Γ(S(F )) is null-homotopic in ∆/K. It remains to prove the fourth statement. Fix an integer k > 3 that is not an element S n n n of n∈F [αC 2 , βC 2 ]. Choose n ∈ N maximal so that βC 2 < k, if such n exists, and define n := −1 in the case when 3 < k < αC. Now let F ′ := F ∩[0, n], where by definition [0, −1] = ∅. Once again, consider the covering map Γ(S(F ′)) → Γ(S(F )). Since every n relator in the presentation for GL (S(F ′ )) has length at most βC 2 , we may build a Cayley 2-complex ∆ with 1-skeleton Γ(S(F ′ )) in which each 2-cell is attached to a loop of length n at most βC 2 . Now suppose that γ is a loop of length k in Γ(S(F )). If γ lifts to a loop in Γ(S(F ′)) then it cannot be taut, since every loop in Γ(S(F ′ )) is null-homotopic in ∆. If on the other hand γ lifts to a non-closed path in Γ(S(F ′)) then it corresponds to a non-identity element of the kernel of the map GL (S(F ′ )) → GL (S(F )) of word length at m most k. But the shortest element in the kernel of this map has length at least αC 2 , m where m is the least element of S(F ) − S(F ′ ). By choice of n, we have that k ≤ βC 2 , m m and by hypothesis k ∈ / [αC 2 , βC 2 ]. This contradiction shows that the loop γ cannot be taut. 8 Proof. (Propostion 11). For any l ∈ [αC 2 , βC 2 ] and l′ ∈ [αC 2 , βC 2 ] for some n m > 0, we have that l′ /l ≥ C 2 . Hence if H(Γ(S(F ))) and H(Γ(S(F ′))) are k-related n and n is in the symmetric difference of F and F ′ then C 2 < k. n 6 n n+m n+m Semidirect products A right-angled Coxeter group is a group W admitting a presentation in which the only relators are that each generator has order two and that certain pairs of generators commute. A simplicial graph K gives rise to a right-angled Coxeter group WK , with generators the set V (K) of vertices of K and as commuting pairs the ends of each element of the edge set E(K). Now suppose that a group G acts as automorphisms of the graph K. This induces an action of G on WK by automorphisms, permuting the given generators for WK , and so there is a semidirect product group J = WK ⋊G. Identify G with its image inside the semidirect product J. A choice of generating set for G together with a choice of G-orbit representatives in V (K) gives rise to a generating set for J. Now suppose that S 7→ G(S) is a functor from the category of subsets of Z with inclusions as morphisms to the category of finitely generated groups and surjective homomorphisms; for example S 7→ GL (S) is such a functor for any connected finite flag complex L. Suppose further that G(∅) acts freely cocompactly on a (simplicial) graph K(∅) in such a way that any two vertices in the same G(∅)-orbit are at edge path distance at least four. For S ⊆ Z, define K(S) to be the quotient of K(∅) by the kernel of the map G(∅) → G(S), so that G(S) acts freely cocompactly on the graph K(S). For S ⊆ Z, define J(S) to be the semidirect product WK(S) ⋊G(S). Then S 7→ J(S) is another functor from subsets of Z and inclusions to finitely generated groups and surjective group homomorphisms. Fix a finite generating set for J(∅) consisting of a finite generating set for G(∅) and a set of V ′ of G(∅)-orbit representatives in V (K(∅)). As generating set for J(S), take the image of our given generating set for J(∅), and as generating set for G(S) take the image of our given generating set for G(∅). For each S, the generating set for G(S) is a subset of the generating set for J(S), and its complement consists of generators that are in the kernel of the map J(S) → G(S). It will be useful to have a presentation for J(S) in terms of our generating set. Since G(∅) acts freely on the graph K(∅), the Coxeter relators between all of the generators for WK(∅) are consequences of a finite set of relators indexed by the orbit representatives of vertices and edges in K(∅). To describe these relations, we choose a set E ′ of G(∅)-orbit representatives of edges in K(∅), in such a way that each e ∈ E ′ is incident on at least one v ∈ V ′ . For each u ∈ V = V (K(∅)), let gu ∈ G(∅) be the unique element such that gu .u ∈ V ′ . Now define an integer N1 by N1 := max{l(gu ) : u is incident on some edge in E ′ }, where l(g) denotes the word length of g ∈ G(∅). The relations in our presentation for J(S) are of the following kinds: • v 2 for each v ∈ V ′ ; • relators (vgu ugu−1)2 , where e ∈ E ′ , u and v are the vertices incident on e and v ∈ V ′ ; 9 • the relators in a presentation for G(S). Note that J(S) is finitely presented whenever G(S) is, and that the relators of the second kind are of length at most 4N1 + 4. In the theorem below we write lJ(S) and lG(S) for the word length with respect to these generating sets. Theorem 13. Take notation and hypotheses as in the paragraphs above, and define N := 2N1 . For all S ⊆ T ⊆ Z, if w ∈ J(S) is in the kernel of J(S) → J(T ) and lJ(S) (w) > N then there is g ∈ G(S) − {1} with lG(S) (g) ≤ lJ(S) (w) so that g is in the kernel of G(S) → G(T ). Proof. In the case when w is not in the kernel of the map J(S) → G(S), we may take g = w, the image of w, since this element is in the kernel of G(S) → G(T ) and lG(S) (g) ≤ lJ(S) (w). Before starting the remaining (more difficult) case, we recall Tits’ solution to the word problem for a right-angled Coxeter group [6, Theorem 3.4.2]. If w = v1 v2 · · · vl is a word in the standard generators for a right-angled Coxeter group that represents the identity, then w can be reduced to the trivial word using some sequence of moves of two types: • if v, v ′ are Coxeter generators that commute, replace the subword vv ′ by v ′ v; • replace a subword vv by the trivial subword. The kernel of the map J(S) → G(S) is the right-angled Coxeter group W (S) := WK(S) . Let w be in the kernel of this map as well as in the kernel of the map J(S) → J(T ). Pick a shortest word in the generators for J(S) representing w, and write this word in ′ the form w = hP 0 v1 h1 v2 h2 · · · hn−1 vn hn , where each vi ∈ V , each hi ∈ G(S), and so that lJ(S) (w) = n + ni=0 lG(S) (hi ). Now define gi = h0 h1 · · · hi−1 for 1 ≤ i ≤ n. We have that w = h0 v1 h1 v2 h2 · · · hn1 vn hn = (g1 v1 g1−1 )(g2 v2 g2−1 ) · · · (gn vn gn−1 ). This second expression for w will not be reduced in general, but each subword gi vi gi−1 is equal to one of the standard Coxeter generators for the subgroup W (S). By hypothesis w is non-trivial in W (S) but is in the kernel of the map W (S) → W (T ). Hence there must be a Tits move that can be applied to the image of this expression in W (T ) that cannot be applied to the same expression in W (S). If there is a Tits move of the second type that can be applied in W (T ) but not in W (S), this implies that there exist i and j with 1 ≤ i < j ≤ n so that gi = gj ∈ G(T ), but gi 6= gj ∈ G(S). If on the other hand there is a Tits move of the first type that can be applied in W (T ) but not in W (S), there exist 1 ≤ i < j ≤ n so that gi = gj gu ∈ G(T ) but gi 6= gj gu ∈ G(S), where gu is one of the elements that takes a vertex of some edge in E ′ to a vertex in V ′ , and so by definition of N1 , lG(S) (gu ) ≤ lG(∅) (gu ) ≤ N1 . Define an element of J(S) by w ′ := vi hi vi+1 · · · hj−1 vj , where i and j are as above. Since the expression w = h0 v1 h1 v2 h2 · · · hn vn is of minimal length in terms of our generators for J(S), the length of the defining expression for w ′ is also minimal. But lJ(S) (w ′ ) is greater than or equal to the length of its image in G(S), hi hi+1 · · · hj−1 = gi−1 gj . Thus lJ(S) (w ′) ≥ lG(S) (gi−1gj ). Depending which sort of Tits move was applied, gi−1 gj is either a non-trivial element of the kernel of the map G(S) → G(T ) or differs from such an element 10 by some gu . Let g be this element of the kernel, and note that lG(S) (g) ≤ lG(S) (gi−1 gj )+N1 . Since w maps to the identity element of G(S) and the image in G(S) of w ′ is a path whose endpoints are at distance at least lG(S) (gi−1 gj ), we see that lJ(S) (w) ≥ 2lG(S) (gi−1gj ). Putting these inequalities together we obtain lG(S) (g) ≤ lJ(S) (w)/2 + N1 . If lJ(S) (w) > N = 2N1 , this implies that lG(S) (g) ≤ lJ(S) (w) as required. Now we specialize to the case of interest; the case when G(S) is the group GL (S) for some finite flag complex L that is connected but not simply connected. In this case, Theorem 13 allows us to prove an analogue of Theorem 12 for the semidirect product J(S) := WK(S) ⋊GL (S). We define constants α = α(L), β := β(L) and C := C(L) as in the previous section, and for F ⊆ N we define S(F ) ⊆ N as before. Finally, we define M := 4N1 + 4, which depends on both L and on the action of G(∅) on K(∅), and we denote by Λ(S(F )) the Cayley graph Γ(J(S(F ))). Theorem 14. For any F ⊆ N, the set H(Λ(S(F ))) is contained in the union [0, M] ∪ S n n n n 2n [αC , βC 2 ]. If αC 2 > M, then H(Λ(S(F ))) ∩ [αC 2 , βC 2 ] is non-empty if and n∈N only if n ∈ F . Proof. Since the presentation for GL (S(∅)) has only relators of length at most 3, we see that our presentation for J(S(∅)) consists of relators of length at most M. This verifies the claim in the case when F = ∅. As in the proof of Theorem 12, it suffices to verify two claims: • If n ∈ F and αC 2 > M then H(Λ(S(F ))) ∩ [αC 2 , βC 2 ] 6= ∅; S n n • If k > M and k ∈ / n∈F [αC 2 , βC 2 ], then k ∈ / H(Λ(S(F ))). n n n These statements can be verified exactly as in Theorem 12. For the first, we consider F ′ := F − {n} and look at the covering map Λ(S(F ′)) → Λ(S(F )). Attach free J(S)orbits of 2-cells to Λ(S(F ′)) to make a simply-connected Cayley complex ∆, and let K ′ be the kernel of the map J(S(F ′ )) → J(S(F )). The quotient ∆/K ′ has 1-skeleton Λ(S(F )) and fundamental group K ′ . As before, we know that there is an element of K ′ ∩G(S(F ′ )) n of length βC 2 and that any non-identity element of this subgroup has length at least n αC 2 . Since M = 4N1 + 4 > N = 2N1 , Theorem 13 tells us that the word length of any n non-identity element of K ′ is also at least αC 2 . Now the shortest non-identity element of K ′ defines a taut loop in the required range. n For the second statement, given such a k, take n maximal so that βC 2 < k, let F ′ := F ∩ [0, n], and consider the covering map Λ(S(F ′ )) → Λ(S(F )). As before, we can build a Cayley 2-complex ∆ with 1-skeleton Λ(S(F ′ )) in which each 2-cell is attached to n a loop of length at most max{M, βC 2 }. If γ is a loop in Λ(S(F )) of length k, then either γ is not taut, or the lift of γ to Λ(S(F ′ )) is a non-closed path. In the second case one obtains a non-identity element in the kernel of the map J(S(F ′ )) → J(S(F )) of length at most k. Since k > M > N, Theorem 13 tells us that there is a non-identity element of length at most k in the kernel of the map G(S(F ′)) → G(S(F )), which cannot happen. This contradiction shows that γ cannot be taut. The next two corollaries follow easily by the same proofs as in the previous section. Corollary 15. If F , F ′ are subsets of N so that Λ(S(F )) and Λ(S(F ′)) are quasiisometric, the symmetric difference of F and F ′ is finite. 11 Corollary 16. For any L that is not simply-connected, and any graph K(∅) with a free GL (∅)-action, there are continuously many quasi-isometry classes of groups J(S). The reason why Corollary 16 is of value concerns the use of the Davis trick [6] to construct non-finitely presented Poincaré duality groups, as described in [8, Sec. 18]. The starting point is a 2-complex L for which each GL (S) is type F P ; for this group there is a finite 2-complex that is an Eilenberg-Mac Lane space K(GL (∅), 1). For any n ≥ 4, one can find a compact n-manifold V with boundary that is also a K(GL (∅), 1). Now let K be the 1-skeleton of the barycentric subdivision of a triangulation of the boundary of V , and let K(∅) be the 1-skeleton of the induced triangulation of the boundary of the universal cover of V , with GL (∅) acting via deck transformations. For this choice of K(∅), the group J(∅) contains a finite-index torsion-free subgroup J ′ that is the fundamental group of a closed aspherical n-manifold M, and such that regular covering M(S) of M with fundamental group the kernel of J ′ → J(S) is acyclic for each S ⊆ Z. One deduces that each J(S) contains a finite-index torsion-free subgroup that is a Poincaré duality group of dimension n. Since the inclusion of a finite-index subgroup is always a quasi-isometry, Corollary 16 implies Corollary 17. For each n ≥ 4 there are continuously many quasi-isometry classes of non-finitely presented n-dimensional Poincaré duality groups. It remains to prove Corollary 3 from the introduction. This follows from the above discussion by the Schwarz-Milnor Lemma [3, I.8.19], which tells us that the acyclic covering manifold M(S) is quasi-isometric to J(S). References [1] M. Bestvina and N. Brady, Morse theory and finiteness properties of groups, Invent. Math. 129 (1997), 445–470. [2] B. H. Bowditch, Continuously many quasiisometry classes of 2-generator groups, Comm. Math. Helv. 73 (1998), 232–236. [3] M. R. Bridson and A. Haefliger, Metric spaces of non-positive curvature, Grundlehren der Mathematischen Wissenschaften 319, Springer-Verlag (1999). [4] K. S. Brown, Cohomology of Groups, Grad. Texts in Math. 87, Springer-Verlag (1982). [5] M. W. Davis, The cohomology of a Coxeter group with group ring coefficients, Duke Math. J. 91 (1998) 297–314. [6] M. W. Davis, The geometry and topology of Coxeter groups, London Mathematical Series Monographs Series 32, Princeton University Press (2008). [7] R. I. Grigorchuk, Degrees of growth of finitely generated groups and the theory of invariant means (English translation) Math. U.S.S.R. Izv. 25 (2) (1985) 259–300. [8] I. J. Leary, Uncountably many groups of type F P , arXiv:1512.06609v2, 35 pages. 12
4math.GR
IET Research Journals Weighted Sum-Throughput Maximization for Energy Harvesting Powered MIMO Multi-Access Channels ISSN 1751-8644 doi: 0000000000 www.ietdl.org Zheng Nan1∗ , Wenming Li2 1 RF Tech. R&D Laboratory, AVIC Beijing Keveen Aviation Instrument Co., Ltd., 43 North 3rd Ring Road West, Beijing, 100086, P.R.China SPD Bank, 1688 Lianhua Road, Shanghai, 200233, P.R.China * E-mail: [email protected] arXiv:1709.09627v1 [cs.IT] 27 Sep 2017 2 Abstract: This paper develops a novel approach to obtaining the optimal scheduling strategy in a multi-input multi-output (MIMO) multi-access channel (MAC), where each transmitter is powered by an individual energy harvesting process. Relying on the stateof-the-art convex optimization tools, the proposed approach provides a low-complexity block coordinate ascent algorithm to obtain the optimal transmission policy that maximizes the weighted sum-throughput for MIMO MAC. The proposed approach can provide the optimal benchmarks for all practical schemes in energy-harvesting powered MIMO MAC transmissions. Based on the revealed structure of the optimal policy, we also propose an efficient online scheme, which requires only causal knowledge of energy arrival realizations. Numerical results are provided to demonstrate the merits of the proposed novel scheme. 1 Introduction Energy harvesting is an effective solution for prolonging the operating lifetime of self-sustainable wireless networks, and it has attracted growing research interest in recent years [2, 3]. The wireless terminals with embedded energy harvesting devices and rechargeable batteries are able to harvest renewable energy from environmental sources such as solar and wind [4, 5]. The emergence of a new technique, known as simultaneous wireless information and power transfer (SWIPT), even makes it possible for wireless terminals to harvest energy from the ambient radio-frequency (RF) signals [6, 7]. Different from traditional communication systems, due to the intermittent nature of most renewable energy sources, an energy availability constraint is imposed such that the energy accumulatively consumed up to any time cannot exceed what has been accumulatively harvested so far. With this new type of constraints taken into consideration, the optimal transmission polices for an energy harvesting node in time-invariant point-to-point channels were derived in [8–10] without battery-capacity constraint, and in [11] with a finite battery capacity constraint. A directional water-filling approach was developed to obtain the optimal packet transmission strategy over time-varying fading channels in [12], while a dynamic string tautening algorithm was proposed to generate the most energy-efficient schedule for delay-limited traffic of transmitters with non-negligible circuit power in [13]. Based on the optimal transmission policies, efficient online transmission schemes were also developed in [12, 13]. A unified approach to obtaining the optimal transmission schedules for both time-invariant and time-varying fading channels was put forth in [14]. Generalizing the approaches for point-to-point channels, optimal transmission policies for the energy harvesting powered multi-input multi-output (MIMO) broadcast channels were addressed in [15–18]. Different from the point-to-point or broadcasting transmission with a single energy harvesting powered transmitter, there are multiple transmitters powered by individual energy harvesting processes for a multi-access channel (MAC). These multiple energy harvesting processes can have coupled effect on the users’ sum-throughput as well as the transmission strategies; hence, optimization approaches for the cases with single energy harvesting node cannot apply any more. As a result, design and analysis of the optimal scheduling policy for energy-harvesting powered MACs is challenging, and the existing research on this critical issue is in a rather primitive stage. IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 Among the limited number of works concerning the scheduling of energy harvesting powered MACs, [19, 20] simply investigated the optimal transmission polices for the two-user single-antenna MACs. In this paper, we explore the optimal scheduling for the general energy harvesting powered multi-antenna (i.e., MIMO) MACs. Assuming that full harvested energy and channel information is available, we obtain the optimal (offline) transmission policy that maximizes the sum-throughput of multiple users. Relying on a “nested optimization” method [17, 21], we show that the optimal MIMO MAC scheduling problem can be converted into a convex power allocation problem. An iterative block coordinate ascent algorithm is then developed to find the optimal power allocation. Specifically, to bypass the coupling effect resulting from the multiple energy harvesting processes, we compute the optimal power allocation for one user with all other users’ powers being fixed per iteration. The problem corresponding to each iteration is similar to finding the optimal power scheduling for an equivalent “point-topoint” link between the selected user and the access point, for which the “string-tautening” algorithm in [18] can be applied to obtain the solution with a linear computational complexity. By ascending the sum-throughput through optimizing each user’s power allocation in a sequential way, the proposed approach is guaranteed to converge to the globally optimal power allocation solution, and consequently the globally optimal MIMO MAC strategy. The proposed approach can provide the optimal benchmarks for practical transmission schemes over energy harvesting powered MIMO MACs. The revealed structures of the optimal policy are also used to develop an online scheduling scheme which requires only causal knowledge of the harvested energy realizations. The rest of the paper is organized as follows. Section II describes the system models. Section III presents the proposed novel approach to optimal scheduling for the energy harvesting powered MIMO MAC. Section IV evaluates the proposed scheme with numerical examples. We conclude the paper in Section V. 1 2 Notations 2.1 Indices, Numbers, and Sets K, k N i, n Nt Nr q CMAC (q) Number and index of transmitters (users). Number of epochs. Indices of epochs. Number of transmit antennas of each user. Number of receive antennas of the access point. Iteration index of the block coordinate ascent algorithm. Capacity region of MAC. T I Emax,k λe Ēk (q) ωi,k +(q) tτ ω+ , ω− τ +, τ − Instant that transmission terminates. Identity covariance matrix. Battery capacity of user k. Energy arrival rate. Mean of energy amount in each arrival. ∗ P̃ i + − Pn,k , Pn,k 2.5 Basic Variables 2.3 Hk H xk (t) y(t) z(t) Ei,k Ek E Li L a En,k c En,k wk w π Channel coefficient matrix from the kth user to the access point. H := [H 1 , . . . , H K ]. Transmitted vector signal of user k at time t. Received complex-baseband signal at the access point. Zero mean additive complex-Gaussian. Amount of the ith energy arrival of user k. Vector collecting {Ei,k }N i=1 . Matrix collecting {E k }K k=1 . Length of the ith epoch. Vector collecting {Li }N i=1 . Amount of energy that has been harvested so far by user k. Least amount of energy that must be consumed so far by user k. Priority weight of user k. Weight vector collecting {wk }K k=1 . Permutation of user indices {1, . . . , K} such that wπ(1) ≥ wπ(2) ≥ · · · ≥ wπ(K) . Functions R(P i ) L(P , Λ) g(Pi,k ) Ak (t) Dmin,k (t) Dk (t) 3 Optimal values of λn,k and µn,k in the qth iteration. Water-level of user k within epoch i in the qth iteration. Constant water-levels to make the nth causality and non-overflow constraints of user k become tight at tn in the qth iteration. First water-level changing time in Algorithm 1. Candidate water-levels in Algorithm 1. Indices of energy causality and non-overflow constraints corresponding to candidate water-levels in Algorithm 1, respectively. Optimal sum-throughput in the qth iteration. Initial transmit power of user k within epoch i. ∗ K Vector collecting {P̃i,k }k=1 . Constant powers to make the nth causality and non-overflow constraints of user k become tight at tn . Sum-rate within epoch i. Lagrangian function. Partial derivative of R(P i ) with respect to Pi,k . Energy arrival curve. Minimum energy departure curve. Energy departure curve. Modeling Preliminaries In this section, we outline the MAC and energy harvesting models under consideration. 3.1 Multi-Access Channel Decision Variables 2.4 Qi,k Qi Q Pi,k Pi P rkM (Qi ) r M (Qi ) Λ λn,k , µn,k θi,k P i,−k (q) Pi,k 2 −(q) ωi,k , ωi,k W (q) (0) ∗ P̃i,k , Pi,k Constants 2.2 (q) λn,k , µn,k Transmit covariance matrix of user k within epoch i. Qi := [Qi,1 , . . . , Qi,K ]. Q := [Q1 , . . . , QN ]. Transmit power of user k within epoch i. Vector collecting {Pi,k }K k=1 . Matrix collecting {P i }N i=1 . Achieved rate of user k within epoch i. Vector collecting {rkM (Qi )}K k=1 . Vector collecting all Lagrange multipliers. Lagrange multipliers. P PN ∗ ∗ θi,k := N n=i λn,k − n=i µn,k . Vector collecting all power values in P i except for Pi,k . Optimal value of Pi,k in the qth iteration. Fig. 1: An energy harvesting powered multi-access channel. IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 Consider a general MIMO MAC, where an access point serves a total of K transmitters (i.e. users); see Fig. 1. Each of the K users has Nt transmit antennas and the access point has Nr receive antennas. Let H k ∈ CNr ×Nt denote the channel coefficient matrix from the kth user to the access point, k = 1, . . . , K. The received complexbaseband signal at the access point is given by: y(t) = K X H k xk (t) + z(t), (1) k=1 where xk (t) is the transmitted vector signal of user k at time t, and z(t) is additive complex-Gaussian with zero mean and identity covariance matrix I of size Nr . Let Qk := E[xk x†k ]  0 denote the transmit covariance matrix for user k, and let P := [P1 , . . . , PK ] collect the transmit-power budgets for all the K users. Let H := [H 1 , . . . , H K ]. For a given P , the MAC capacity region is: [   {Qk : tr(Qk )≤Pk , ∀k}  CMAC (P ; H) = X k∈S rk ≤ log I + X H k Qk H †k k∈S (r1 , . . . , rK ) :   , ∀S ⊆ {1, . . . , K} ,  where rk is the achievable transmission rate of user k. 3.2 Energy Harvesting Process Fig. 2: Energy harvesting processes of the K users. maximize the weighted-sum of user throughput: max Q s. t. K X " wk k=1 N X # (rkM (Qi )Li ) i=1 n X a (C1): (Pi,k Li ) ≤ En,k , ∀n, ∀k, i=1 Suppose that all users do not have persistent power supply. Instead, with the energy harvesting devices and rechargeable batteries, each of the K users could harvest renewable energy (e.g. solar, wind or RF) from the surrounding environment and then store the energy in the battery for future use, as shown in Fig. 1. Each user is powered by an individual energy harvesting process. To be specific, for user k, the battery capacity is Emax,k , and the initial energy available in the battery (at time t0 = 0) is denoted by E0,k . Over the entire transmission interval [0, T ], suppose that there are N − 1 energy arrivals occurring at time {t1 , t2 , . . . , tN −1 } in amounts {E1,k , E2,k , . . . , EN −1,k }. Note that we only require Ei,k > 0 for a certain k at any ti ; i.e., it is allowed that Ei,k = 0 without loss of generality (w.l.o.g.) for some k, implying the independence of the K users’ energy harvesting processes; see an illustration in Fig. 2. For convenience, let tN = T . The time interval between two consecutive energy arrivals is defined as an epoch. The length of the ith epoch is then Li = ti − ti−1 , i = 1, . . . , N . It is clear that we have 0 < Ei,k ≤ Emax,k , i = 0, 1, . . . , N − 1, k = 1, . . . , K; otherwise, the excess energy Ei,k − Emax,k cannot be stored in the battery and w.l.o.g. we can set Ei,k = Emax,k in such cases. 4 Optimal Scheduling for Energy-Harvesting Powered MIMO MAC Consider a time-invariant channel H := {H 1 , . . . , H K } over transmission interval [0, T ]. Let Qi := [Qi,1 , . . . , Qi,K ] collect the transmit-covariance matrices during the ith epoch and Q := [Q1 , . . . , QN ]. With the covariance matrix Qi,k , the transmitpower for user k within epoch i is then Pi,k := tr(Qi,k ), where tr(·) denotes the trace operation. Let rkM (Qi ) denote the achieved rate for M user k within epoch i, and r M (Qi ) := [r1M (Qi ), . . . , rK (Qi )]. P a c For convenience, we define En,k := n−1 E , and En,k := i,k i=0 P + ( n E − E ) , ∀k, ∀n, where E := E , ∀k. max,k N,k max,k i=0 i,k Provided a priority weight vector w := [w1 , . . . , wK ], we aim to IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 (2) n X c , ∀n, ∀k, (C2): (Pi,k Li ) ≥ En,k i=1 (C3): r M (Qi ) ∈ CMAC (P i ; H), ∀n, ∀k. Here, the first set of constraints (C1) are the energy causality constraints: the total amount of energy consumed by user k up to any a arrival time tn cannot be greater than En,k , which is what has been accumulatively harvested so far by user k. The second set of constraints (C2) are the non-overflow constraints: the total amount of c , in energy consumed by user k up to tn cannot be less than En,k order to avoid the waste of energy [11]. Due to the finite battery capacity, an energy overflow occurs if the sum of unconsumed energy and newly arriving energy with any user k exceeds Emax,k at the time of energy arrival. Since any transmission policy causing energy overflows can be dominated by a policy without such overflows, the optimal power allocation must satisfy the non-overflow constraints. Hence, the optimal policy can be found among the policies that satisfy all the energy causality and non-overflow constraints in (2). Note that with EN,k = Emax,k , ∀k, the non-overflow and causality constraints at tN render PN PN −1 i=1 (Pi,k Li ) = i=0 Ei,k , ∀k, i.e., all the energy harvested must be used up at the end per user k. PK M With R(P i ) := maxrM (Qi )∈CMAC (P i ;H) k=1 wk rk (Qi ), we can establish that: Lemma 1. The strictly concave function R(P i ) can be alternatively obtained as the optimal value of the following convex problem: max Qi,k 0 K X (wπ(k) − wπ(k+1) ) log I k=1 + k X H π(u) Qi,π(u) H †π(u) (3) u=1 s. t. tr(Qi,k ) = Pi,k , k = 1, . . . , K, 3 where π is the permutation of user indices {1, . . . , K} such that wπ(1) ≥ wπ(2) ≥ · · · ≥ wπ(K) , and wπ(K+1) = 0.  Proof: See Appendix A. Using R(P i ), we can then reformulate (2) into the following power allocation problem: max {P i } s. t. N X [R(P i )Li ] i=1 n X a (Pi,k Li ) ≤ En,k , ∀n, ∀k, i=1 n X c (Pi,k Li ) ≥ En,k , i=1 Pi,k (4) Optimal User Power Allocation 4.2 Different from the point-to-point and broadcast transmissions, each user in the MAC has its own set of energy causality and non-overflow constraints. These K sets of energy harvesting constraints could have coupled effect on the optimal user transmission strategies. To bypass this difficulty, we resort to a sequential optimization manner. To be specific, we find the optimal power allocation for a single user with all other users’ powers being fixed per iteration. Let P i,−k collect all the power values in P i except for Pi,k , and rewrite R(q) (Pi,k , P i,−k ) := R(P i ). Let q denote the iteration (q) (q) (q) index, Pi,k the optimal value of Pi,k , and λn,k , µn,k the corresponding optimal Lagrange multipliers in the qth iteration. With P i,−k fixed, it follows from (5) that ∀n, ∀k, " (q) ≥ 0, ∀n, ∀k. Pi,k ≥0 = arg max Optimality Conditions 4.1 N X ( ( i=1 − + N X K X n X λn,k n=1 k=1 i=1 N X K X n X µn,k n=1 k=1 = N X i=1 " R(P i ) − a Pi,k Li − En,k ! c Pi,k Li − En,k i=1 K X N X k=1 n=i λn,k − N X ! µn,k # Pi,k Li + C(Λ) n=i PN P c a where C(Λ) = N n=i (µn,k En,k ). n=i (λn,k En,k ) − ∗ Let P i denote the optimal solution for (4) and Λ∗ denote P ∗ the optimal Lagrange multiplier. Define θi,k := N n=i λn,k − PN ∗ n=i µn,k . Based on the Karush-Kuhn-Tucker (KKT) optimality conditions [22], we must have: ∀i, ∀k, " P ∗i = arg max R(P i )Li − P i 0 = arg max R(P i ) − K X θi,k Pi,k Li # (5) ∀n, ∀k. Pn (q) (q) a λn,k = 0, if i=1 (Pi,k Li ) < En,k ; Pn (q) (q) a i=1 (Pi,k Li ) = En,k , if λn,k > 0; Pn (q) (q) c µn,k = 0, if i=1 (Pi,k Li ) > En,k ; Pn (q) (q) c i=1 (Pi,k Li ) = En,k , if µn,k > 0; ∀n; ∀n. (9) (10) Interestingly, (8)–(10) correspond to the KKT conditions with the total-throughput maximization problem for an equivalent “point-topoint” link between user k and the access point. Hence, the “stringtautening” algorithm in our recent work [18] could be applied to obtain {P ∗i } with a low computational complexity. Note that the signals from other users, if not cancelled, are treated as noises in the optimal MIMO MAC decoding. Therefore, although the physical MIMO MAC is time-invariant here, the resultant equivalent point-to-point link obtained by fixing other useraŕs ˛ powers is in fact “time-varying” due to the possibly different noise levels introduced by different signal powers with other users per epoch. As a result, we should employ a water-level based “string-tautening” algorithm to find {P ∗i }. ∂R(q) (P ,P ) i,k i,−k Define g(Pi,k ) := , and let g −1 denote the ∂Pi,k inverse function of g. It can be inferred from (8)–(10) that: (q) (q) filling alike form: Pi,k = g −1(q) (1/ωi,k ), where the “water-level” (q) (q) (q) k=1 Pn ∗ ∗ a λ n,k = 0, if i=1 (Pi,k Li ) < En,k ; P n ∗ a ∗ i=1 (Pi,k Li ) = En,k , if λn,k > 0; (8) i (q) (Pi,k , P i,−k ) − θi,k Pi,k . ωi,k := 1/θi,k , ∀i. θi,k Pi,k . In addition, the non-negative multipliers λ∗n,k and µ∗n,k satisfy the complementary slackness conditions: ∀n, ∀k,  R (q) Lemma 2. In the optimal transmission strategy, we have the following two propers: (q) 1) The optimal power values {Pi,k } are given by a water- # k=1 " P i 0 K X # (q) θi,u Pi,u On the other hand, directly from (6)–(7), we must have: [R(P i )Li ] ! K X u=1 h Pi,k ≥0 Since R(P i ) is a concave function of P i per Lemma 1, it then follows that (4) is a convex problem. Let Λ := {λn,k , µn,k , n = 1, . . . , N, k = 1, . . . , K}, where λn,k and µn,k denote the Lagrange multipliers associated with the causality and non-overflow constraints of user k, respectively. The Lagrangian of (4) is given by: L(P , Λ) = R(q) (Pi,k , P i,−k ) − Pi,k = arg max 2) The water-level ωi,k only changes at some tn where the causality or non-overflow constraints are tight; specifically, it P (q) a increases after a tn where n i=1 (Pi,k Li ) = En,k , and it decreases Pn (q) c after a tn where i=1 (Pi,k Li ) = En,k . (6) Proof: See Appendix B. (7) Since R(P i ) is strictly concave, g(Pi,k ) is strictly decreasing in (q) (q) (q) Pi,k . Hence, Pi,k = g −1(q) (θi,k ) = g −1(q) (1/ωi,k ) is an increas- Since R(P i ) is not given in closed-form, the globally optimal {P ∗i } for (4) satisfying (5)–(7) are challenging to find by general convex program solvers. Relying on the specific structure revealed by (5)–(7), we next develop a low complexity block coordinate ascent method to obtain {P ∗i }. ing function of the water-level ωi,k . In the optimal user power allocation, it is not difficult to see that we shall maintain a constant water-level whenever it is possible. Note that by the water-filling principle, a constant water-level leads to a higher power for an epoch with higher quality to achieve the most efficient usage of available resources. We have to change the water-level when the energy  4 Pn ∗ ∗ c µ n,k = 0, if i=1 (Pi,k Li ) > En,k ; P n ∗ c ∗ i=1 (Pi,k Li ) = En,k , if µn,k > 0; ∀n, ∀k.  (q) IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 causality or non-overflow constraints become tight. A causality constraint is tight, i.e., all available energy is used up at tn when the energy harvested so far is not enough; as a result, a lower waterlevel (thus power) is maintained before tn than that after. Similarly, a non-overflow constraint is tight at tn when the energy harvested so far is abundant, then a higher water-level (thus power) is maintained before tn than that after. Based on the structure revealed in Lemma 2, we next develop +(q) a water-level based “string-tautening” algorithm. Let ωn,k and −(q) ωn,k denote the constant water-levels to make the nth causality and non-overflow constraints of user k become tight at tn in the qth iteration, respectively. Given an invariant water-level ω before tn , (q) the user power per epoch i is given by Pi,k = g −1(q) (1/ω). Thus, −(q) +(q) the values of ωn,k and ωn,k , ∀n, ∀k, can be calculated by solving the equations: ∀n, ∀k, n  X i=1 n  X i=1 g −1(q)  g −1(q)  1   a Li = En,k ;   c Li = En,k . +(q) ωi,k 1 −(q) ωi,k 1: procedure S CHEDULE(energy set E k , length set L, user k) (q) 2: Noffset = 0, Pi,k = 0, ∀i; 3: while Noffset < N do 4: [τ , ω, E] = FirstChangeW(E k , L, k); 5: for i = 1 to τ do (q) 6: Pi,k = g −1(q) (1/ω); 7: end for 8: Noffset = Noffset + τ ; 9: update E k , L; 10: end while 11: end procedure 12: function [τ , ω, E] =F IRST C HANGE W(E k , L, k) 13: ω − = 0, ω + = ∞, τ − = τ + = 0; Ne = |Ek |; 14: for n = 1 to Ne do +(q) −(q) 15: obtain ωn,k and ωn,k by solving equations in (11); +(q) 17: 18: 19: a τ + = n, ω + = ωn,k , E + = Eτ,k ; end if −(q) if ωn,k ≥ ω − then +(q) −(q) c 20: τ − = n, ω − = ωn,k , E − = Eτ,k ; 21: end if 22: if ω − > ω + & τ − < τ + then 23: return τ = τ − , ω = ω − , E = E − ; 24: else if (ω − ≥ ω + & τ − ≥ τ + ) or (τ + = Ne ) then 25: return τ = τ + , ω = ω + , E = E + ; 26: end if 27: end for 28: end function The key component in Algorithm 1 is the function FirstChange, which determines the first water-level changing time tτ and the water-level ω used before tτ . The two candidate water-levels are IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 Proof: See Appendix C. 4.3  Block Coordinate Ascent (11) Algorithm 1 Water-Level based String Tautening if ωn,k ≤ ω + then (q) Proposition 1. Algorithm 1 can compute Pi,k , i = 1, . . . , N with a complexity O(N ). Define E := {E 1 , . . . , E K }. Building on Algorithm 1, we propose to solve (4) by calling Procedure Iteration(E, L) in Algorithm 2. Pn −1(q) (1/ω)Li ] is increasing in ω. Hence, the Note that i=1 [g equations in (11) can be solved by a bisection search. +(q) −(q) Upon with ωn,k and ωn,k obtained, we are ready for implementation of the water-level based “string-tautening” scheme. Define E k := {E0,k , E1,k , . . . , EN,k } and L := {L1 , . . . , LN }. (q) The powers Pi,k , i = 1, . . . , N can be obtained by calling Procedure Schedule(E k , L, k) in Algorithm 1. 16: −(q) +(q) updated as: ω + = mini≤n ωi,k , and ω − = maxi≤n ωi,k . If we have ω + < ω − at a certain time tn , then the water-level needs to be changed before tn since no invariant water-level can satisfy all the causality and non-overflow constraints so far. The first waterlevel changing time can be obtained by comparing τ − and τ + to see which type of constraint first becomes tight. When the returned tτ < T , the function FirstChange can be reused for a new (E k , L, k) system over the remaining time to find the next water-level. Algorithm 2 Block Coordinate Ascent 1: procedure I TERATION(energy set E, length set L) 2: select a tolerance level  > 0, and q = 1; (0) 3: find a set of feasible {Pi,k }, ∀i, ∀k; 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: calculate initial throughput W (0) ; while 1 > 0 do for k = 1 to K do (q) calculate Pi,k , ∀i by calling Schedule(E k , L, k); end for calculate throughput W (q) ; if (W (q) − W (q−1) )/W (q−1) ≤  then (q) (q) P ∗i = [Pi,1 , . . . , Pi,K ], ∀i; break; end if q = q + 1; end while end procedure Procedure Per iteration q in Algorithm 2, we sequentially optimize the users’ transmit-powers one-by-one using the water-level based (q) string-tautening procedure in Algorithm 1. Based on P i = (q) (q) (q) (q) [Pi,1 , Pi,2 , . . . , Pi,K ], we solve (3) to compute R(P i ) per Lemma 1. Then we calculate the sum-throughput W (q) = PN (q) (q−1) from last iteration. i=1 [R(P i )Li ] and compare it with W The iteration is terminated when the increment of sum-throughput is less than the tolerance level. Since Algorithm 2 in fact follows the classic block coordinate ascent method, it converges to at least a local optimum. As (4) is a convex problem, every local optimum is global optimum; i.e., Algorithm 2 converges to the globally optimal P ∗ for (4). Having obtained P ∗ , we can consequently find the optimal transmit-covariance matrices {Q∗i,k } by solving (3) with ∗ Pi,k ≡ Pi,k , ∀i, k for the MIMO MAC. Summarizing, we have: Theorem 1. The proposed block coordinate ascent approach is guaranteed to find the globally optimal MIMO MAC transmission policy for (2). The proposed Algorithm 2 is initialized by a set of feasible (0) {Pi,k }. Note that Algorithm 2 is guaranteed to converge to P ∗ (0) with any feasible Pi,k per Theorem 1. However, the convergence speed may vary when selecting different initial points. We envision that a good initialization can be obtained as follows. Treat the MIMO MAC as K decoupled “point-to-point” links between each user and the access point. Then calculate the optimal power alloca∗ tion {P̃i,k , ∀i} per link k. Note that for the decoupled time-invariant 5 link, we just need a simpler power-based (instead of water-level ∗ based) “string-tautening” algorithm to find {P̃i,k , ∀i}; this can be vividly illustrated by the trajectory of letting a string P tie its one end −1 at the origin (0, 0), pass the other end through (T, N i=0 Ei,k ), and then tauten between user k’s own energy arrival curve and min∗ imum departure curve [18, 23]. Since each set of {P̃i,k , ∀i} satisfies the energy causality and non-overflow constraints with user k, it is ∗ ∗ ∗ clear that the resultant P̃ i := [P̃i,1 , . . . , P̃i,K ] is feasible for (4). Interestingly, simulations will show the sum-throughput achieved by ∗ {P̃ i } is always very close to that with the optimal {P ∗i }; hence, it provides a good initial point. 12 Energy (User 1) 10 8 6 4 2 0 0 1 Ak (t) = Dmin,k (t) = N −1 X   Ei,k u(t − ti ) , i=0 N −1 X Ei,k u(t − ti )  (12) , 0 ≤ t ≤ T, i=0 where u(t) is the unit-step function: u(t) = 1 if t ≥ 0, and u(t) = 0 otherwise. Consider a piece-wise linear energy departure curve: ∀k, Dk (t) = n−1 X 7 8 9 10 6 7 8 9 10 Energy (User 2) 4 3 2 0 0 1 2 3 4 5 Time Fig. 3: Energy arrival, minimum energy departure, initial energy departure and optimal energy departure curves of the users. While the initial amounts of energy E0,k , ∀k are known, all Ei,k , i = 1, . . . , n − 1, ∀k, and Li , i = 1, . . . , n, are clearly non-causal information that is seldom available a-priori in practice. However, it P is worth noting that n−1 i=1 Ei,k Pis the total energy harvested by user k during (0, tn ), where tn = n i=1 Li . Then, given λe and Ēk , we have: n X n Li ≈ (14) λe i=1 Pi,k Li + Pn,k (t − tn−1 ), ∀n ∈ [1, N ], (13) where the user powers Pi,k per epoch serve as the piece-wise nonnegative slopes for Dk (t). As mentioned previously, we can obtain the initial energy departure curve D̃k (t) of user k by the trajectory of letting a string tie its one end at the origin (0, 0), pass the other P −1 end through (T, N i=0 Ei,k ), and then tauten between Ak (t) and Dmin,k (t); see the two-user example in Fig. 3. Consequently, the (0) (0) ∗ initial user powers {P̃i,k } (or {Pi,k }) can be derived from Dk (t), ∀k. ∗ }, ∀i, ∀k obtained by Substituting the optimal user powers {Pi,k Algorithm 2 into (13), we produce the optimal energy departure curves Dk∗ (t) of the K users; see Fig. 3. The differences between the two policies are obviously seen. Recall that D̃k (t) is also regarded as the optimal transmission policy for the decoupled point-to-point link between the kth user and the access point. In this policy, the ∗ transmit power P̃i,k of user k only changes at its non-zero energy ∗ arrival instants [14]. For example, as can be seen in Fig. 3, P̃i,2 only changes at t4 = 8, t5 = 9 and t6 = 4, where the corresponding amounts of arriving energy Ei,2 > 0. As for Dk∗ (t), however, since it concerns the coupling between multiple energy harvesting ∗ processes, the transmit power Pi,k of a user can change at both the non-zero energy arrival instants of its own and those of all other users. Heuristic Online Scheme The near-optimality of the decoupled “power-tautening” method motivates us to develop a heuristic online scheme. Suppose that the time-invariant H is known, and the harvested energy of each user is modeled by a compound Poisson process, where the number of energy arrivals over a horizon T follows a Poisson distribution with mean λe and the energy amount in each arrival is independent and identically distributed (i.i.d.) with mean Ēk [21]. It is assumed that λe and Ēk are known a priori or that they can be estimated on-thefly by the average energy arrival interval and amount from previous energy harvesting process. 6 6 1 and i=1 4.5 5 0 ≤ t ≤ T, !+  4 Energy Arrival Curve Minimum Energy Departure Curve Initial Energy Departure Curve Optimal Energy Departure Curve 6 Visualization of the Optimal Policy The optimal policy obtained by Algorithm 2 can be visualized by using a calculus approach similar to the ones in [23–25], which was developed for energy-efficient transmissions of bursty data arrivals with delay constraints. Mimicking the definitions of data arrival and minimum departure curves in [23–25], we define the energy arrival curve Ak (t) and minimum energy departure curve Dmin,k (t) of user k as: ∀k, 3 Time 5 4.4 2 Pn−1 (n − 1)Ēk n−1 i=1 Ei,k P = λe Ēk , ≈ n n/λe n i=1 Li (15) + where the approximation becomes exact as ti → ∞. Let Pn,k and − Pn,k denote the constant power to make the nth causality and nonoverflow constraints of user k become tight at tn , respectively. Using (14)–(15), we can then approximate: + Pn,k ≈ λe E0,k + (n − 1)Ēk , n (16) (E0,k + nĒk − Emax,k )+ . (17) n Using the approximations in (16) and (17), we can implement the power-tautening method in the same spirit with Algorithm 1 to produce the first set of powers adopted by the users at t0 . This set of powers is kept in use before new energy arrives at t1 . Then we treat t1 as new “t0 ”, and update the initial E0,k with the sum of unconsumed energy (if any) and newly arriving energy amount E1,k , ∀k. Relying on (16)–(17), the algorithm is run again to yield the next set of user powers. This process continues until all energy is used up or the end of transmission period T is reached. − Pn,k ≈ λe 5 Numerical Results For a time-invariant MIMO MAC with K = 2 users, consider data transmission over T = 20 seconds. The weight vector w = [1, 1], and each element in channel matrix H k , k = 1, 2, is a zero-mean complex Gaussian random variable with unit variance. The battery capacity of each user is Emax,1 = Emax,2 = 10 Joules. Assume each user’s energy harvesting setup is modeled by a compound Poisson process with the same mean λe . The amount of energy in each arrival is assumed to be independent and uniformly distributed with mean 5 Joules. Fig. 4 shows the average throughput after each iteration of the proposed Algorithm 2 when (Nt , Nr ) is set to (2, 2), and λe = 0.1, IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 1.88 2.5 1.875 λe = 0.1 1.87 0 1 2 3 4 5 6 2 Throughput (bits/sec) 2.686 2.684 2.682 λe = 0.2 0 1 2 3 4 5 0 1 2 3 4 5 6 3.51 3.505 3.5 1.5 λe = 0.3 3.495 3.49 Throughput (bits/sec) 2.688 1 6 3.78 Proposed Algorithm 2 Decoupled P-Tautening Causality-Satisfied Non-Overflow Heuristic Online 3.775 3.77 λe = 0.4 0 1 2 3 Iteration Times 4 5 0.5 10 6 Fig. 4: Average throughput after each time of iteration. 0.2, 0.3, or 0.4 sec−1 . The fast convergence of Algorithm 2 is clearly observed: for each λe value, the proposed algorithm could always converge to the optimum in 5 iterations. Fig. 5 and Fig. 6 show the average throughputs versus T for two different values of λe = 0.1 and 0.3 sec−1 , respectively, where each result is obtained as the average of 40 randomly generated trial cases. We compare the performance of the proposed Algorithm 2 with that of the decoupled power-tautening (P-Tautening) scheme, and the proposed online scheme. In addition, we also include the performance of two other feasible schemes for comparison: Causality-Satisfied and Non-Overflow, which are obtained by always selecting each user’s power to meet its next causality and nonoverflow constraints, respectively. The sum-throughputs of all the five schemes slightly increase as the transmit duration T extends from 10 to 50 sec. With full energy-harvesting information available a-prior, Algorithm 2 always provides the optimal benchmark for all values of T in both cases. It is interestingly observed that the decoupled P-Tautening scheme, in which each user only requires its own energy-harvesting information, could achieve a throughput that is over 98% of the optimal benchmark, as accurately revealed by Table 1. This observation just corroborates the merit of our initial point selecting scheme in Section 4.3. Requiring only the next (non-causal) energy arrival information, Causality-Satisfied and Non-Overflow schemes both incur roughly over 0.3 bits/sec throughput loss. The proposed online scheme could always attain a fairly good 85% of the optimal sum-throughput for all T values, even though only causal information is required by each user. For further illustration, we next depict the influence of the energy arrival rate on the sum-throughputs in Fig. 7 and Fig. 8. We test two scenarios: (Nt , Nr ) = (2, 2) and (Nt , Nr ) = (2, 4) for all the five transmit schemes with a fixed transmit duration T = 20 sec. It is clearly seen that the sum-throughputs of all the five schemes increase as λe increases, since there can be more energy available at the users when λe becomes larger. For small λe values, the performance of the decoupled P-Tautening scheme almost reaches the optimal benchmark, while as λe increases, without concerning the coupling effect of users, it gradually becomes sub-optimal. It is also observed that the sum-throughput is significantly improved for the MIMO MAC as the number of receive antennas Nr doubles. Concluding Remarks We proposed a novel approach to obtaining the optimal transmission policy for energy harvesting powered MIMO MACs. An efficient algorithm was developed to find the optimal offline solution with a low computational complexity. Our approach can provide the IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 20 25 30 35 40 45 50 Fig. 5: Average throughput vs. transmit duration T (λe = 0.1, Nr = 2). 4.5 4 3.5 3 2.5 Proposed Algorithm 2 Decoupled P-Tautening Causality-Satisfied Non-Overflow Heuristic Online 2 1.5 10 15 20 25 30 35 40 45 50 T (s) Fig. 6: Average throughput vs. transmit duration T (λe = 0.3, Nr = 2). optimal benchmarks for practical schemes. Development of online scheme based on the revealed optimal structure was also discussed. In our proposed approach, the energy harvesting processes were modeled as deterministic processes, where the amount of each energy arrival is accurately known a-priori. Due to the unpredictable and intermittent nature of the renewable energy sources, the amount of harvested energy may not always be a-priori available in practice [26, 27]. Taking this uncertainty into account, we may obtain a result of improved practical significance. This will be an interesting direction to pursue in our future work. Table 1 Average throughputs of Algorithm 2 and Decoupled P-Tautening vs. T . T (sec) 6 15 T (s) Throughput (bits/sec) 3.765 10 20 30 40 50 Algorithm 2 P-Tautening λe = 0.1 sec−1 1.9603 1.9967 2.0719 2.1205 2.1784 1.9564 1.9859 2.0576 2.0972 2.1541 Algorithm 2 P-Tautening λe = 0.3 sec−1 3.3204 3.5012 3.6691 3.8225 3.9159 3.3150 3.4828 3.6510 3.8007 3.8953 7 6 4.5 7 4 8 3.5 Throughput (bits/sec) 9 3 10 2.5 11 2 12 Proposed Algorithm 2 Decoupled P-Tautening Causality-Satisfied Non-Overflow Heuristic Online 1.5 1 0.1 0.15 0.2 0.25 0.3 λe (sec -1 ) 0.35 0.4 0.45 13 0.5 14 Fig. 7: Average throughput vs. energy arrival rate λe (T = 20, Nr = 2). 15 16 17 5.5 18 5 Throughput (bits/sec) 19 20 4.5 21 22 4 23 3.5 3 0.1 Proposed Algorithm 2 Decoupled P-Tautening Causality-Satisfied Non-Overflow Heuristic Online 24 25 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 λ e (sec-1 ) 26 Fig. 8: Average throughput vs. energy arrival rate λe (T = 20, Nr = 4). As an alternative promising solution for achieving energy efficiency, the smart-grid industry has seen fast growth in the past decade [28]. It is expected that future wireless communication systems will be equipped with energy harvesting devices and powered by smart-grids. Energy management strategies of smart-grid powered coordinated multi-point (CoMP) systems and MIMO broadcasting systems have been explored in [29–31]. Building on the proposed approach, system design and power control of smart-grid involved MIMO MACs are also worth investigating. 7 1 2 3 4 5 8 27 28 29 30 31 Fang, Z., Yuan, X., Wang, X.: ‘Distributed energy beamforming for simultaneous wireless information and power transfer in the two-way relay channel’, IEEE Signal Processing Letters, 2015, 22, (6), pp. 656–660 Wang, F., Peng, T., Huang, Y., Wang, X.: ‘Robust transceiver optimization for power-splitting based downlink MISO SWIPT systems’, IEEE Signal Processing Letters, 2015, 22, (9), pp. 1492–1496 Yang, J., Ulukus, S.: ‘Optimal packet scheduling in an energy harvesting communication system’, IEEE Trans. Commun., 2012, 60, (1), pp. 220–230 Sharma, V., Mukherji, U., Joseph, V., Gupta, S.: ‘Optimal energy management policies for energy harvesting sensor nodes’, IEEE Trans. Wireless Commun., 2010, 9, (4), pp. 1326–1336 Ho, C., Zhang, R.: ‘Optimal energy allocation for wireless communications with energy harvesting constraints’, IEEE Trans. Signal Process., 2012, 60, (9), pp. 4808–4818 Tutuncuoglu, K., Yener, A.: ‘Optimum transmission policies for battery limited energy harvesting nodes’, IEEE Trans. Wireless Commun., 2012, 11, (3), pp. 1180– 1189 Ozel, O., Tutuncuoglu, K., Jing, Y., Ulukus, S., Yener, A.: ‘Transmission with energy harvesting nodes in fading wireless channels: Optimal policies’, IEEE J. Sel. Areas Commun., 2011, 29, (8), pp. 1732–1743 Chen, X., Ni, W., Wang, X., Sun, Y.: ‘Optimal quality-of-service scheduling for energy-harvesting powered wireless communications’, IEEE Trans. Wireless Commun., 2016, 15, (5), pp. 3269–3280 Wang, X., Zhang, R.: ‘Optimal transmission policies for energy harvesting node with non-ideal circuit power’. Proc. SECON, Singapore, Jun. 2014, pp. 1–9 Antepli, M., Uysal-Biyikoglu, E., Erkal, H.: ‘Optimal packet scheduling on an energy harvesting broadcast link’, IEEE J. Sel. Areas Commun., 2011, 29, (8), pp. 1721–1731 Yang, J., Ozel, O., Ulukus, S.: ‘Broadcasting with an energy harvesting rechargeable transmitter’, IEEE Trans. Wireless Commun., 2012, 11, (2), pp. 571–583 Ozel, O., Yang, J., Ulukus, S.: ‘Optimal broadcast scheduling for an energy harvesting rechargeable transmitter with a finite capacity battery’, IEEE Trans. Wireless Commun., 2012, 11, (6), pp. 2193–2203 Wang, X., Nan, Z., Chen, T.: ‘Optimal MIMO broadcasting for energy harvesting transmitter with non-ideal circuit power consumption’, IEEE Trans. Wireless Commun., 2015, 14, (5), pp. 2500–2512 Tutuncuoglu, K., Yener, A.: ‘The energy harvesting multiple access channel with energy storage losses’. Proc. ITW, Lausanne, Switzerland, Sep. 2012, pp. 1–5 Yang, J., Ulukus, S.: ‘Optimal packet scheduling in a multiple access channel with energy harvesting transmitters’, J. Commun. Netw., 2012, 14, (2), pp. 140–150 Xu, J., Zhang, R.: ‘Throughput optimal policies for energy harvesting wireless transmitters with non-ideal circuit power’, IEEE J. Sel. Areas Commun., 2014, 32, (2), pp. 322–332 Boyd, S., Vandenberghe, L.: ’Convex Optimization’ (Cambridge University Press, 2004) Zafer, M., Modiano, E.: ‘A calculus approach to minimum energy transmission policies with quality of service guarantees’. Proc. INFOCOM, Miami, USA, Mar. 2005, pp. 548–559 Wang, X., Li, Z.: ‘Energy-efficient transmissions of bursty data packets with strict deadlines over time-varying wireless channels’, IEEE Trans. Wireless Commun., 2013, 12, (5), pp. 2533–2543 Nan, Z., Chen, T., Wang, X., Ni, W.: ‘Energy-efficient transmission schedule for delay-limited bursty data arrivals under non-ideal circuit power consumption’, IEEE Trans. Vehicular Tech., 2016, 65, (8), pp. 6588–6600 Wang, X., Zhang, Y., Giannakis, G. B., Hu, S.: ‘Robust smart-grid powered cooperative multipoint systems’, IEEE Trans. Wireless Commun., 2015, 14, (11), pp. 6188–6199 Hu, S., Zhang, Y., Wang, X., Giannakis, G. B.: ‘Weighted sum-rate maximization for MIMO downlink systems powered by renewables’, IEEE Trans. Wireless Commun., 2016, 15, (8), pp. 5615–5625 Chen, X., Ni, W., Chen, T., Collings, I. B., Wang, X., Giannakis, G. B.: ‘Real-time energy trading and future planning for fifth-generation wireless communications’, IEEE Wireless Commun. Mag., 2017, 24, (4), pp. 24–30 Wang, X., Zhang, Y., Chen, T., Giannakis, G. B.: ‘Dynamic energy management for smart-grid powered coordinated multipoint systems’, IEEE J. Sel. Areas Commun., 2016, 34, (5), pp. 1348–1359 Wang, X., Chen, X., Chen, T., Huang, L., Giannakis, G. B.: ‘Two-scale stochastic control for integrated multipoint communication systems with renewables’, IEEE Trans. Smart Grid, 2017, 8, pp. 1–13 Wang, X., Chen, T., Chen, X., Zhou, X., Giannakis, G. B.: ‘Dynamic resource allocation for smart-grid powered MIMO downlink transmissions’, IEEE J. Sel. Areas Commun., 2016, 34, (12), pp. 3354–3365 References Li, W., Nan, Z., Wang, X., Zhou, X.: ‘Optimal transmission policy for energyharvesting powered MIMO multi-access channels’. Proc. ICCC, Shanghai, China, Oct. 2014, pp. 1–6 Lei, J., Yates, R., Greenstein, L.: ‘A generic model for optimizing single-hop transmission policy of replenishable sensors’, IEEE Trans. Wireless Commun., 2009, 8, (2), pp. 547–551 Gatzianas, M., Georgiadis, L., Tassiulas, L.: ‘Control of wireless networks with rechargeable batteries’, IEEE Trans. Wireless Commun., 2010, 9, (2), pp. 581–593 Kansal, A., Hsu, J., Zahedi, S., Srivastava, M. B.: ‘Power management in energy harvesting sensor networks’, ACM Trans. Embed. Comput. Syst., 2007, 6, (4), pp. 1–38 Chen, X., Ni, W., Wang, X., Sun, Y.: ‘Provisioning quality-of-service to energy harvesting wireless communications’, IEEE Commun. Mag., 2015, 53, (4), pp. 102–109 8 Appendices 8.1 Proof of Lemma 1 To show the strict concavity of R(P i ), consider the Lagrangian of (3): L(Qi , λ) = f (Qi ) − K X  λk tr(Qi,k ) − Pi,k , (18) k=1 IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 where f (Qi ) denotes the objective function of (3). Since (3) is convex program, we have: " R(P i ) = min max f (Qi ) − λ Qi K X λk tr(Qi,k ) − Pi,k #  . k=1 For a given P i , let Q∗i (P i ) and λ∗ (P i ) denote the optimal primal and dual variables for (3). For P̃ i , P̂ i , and P̌ i = β P̃ i + (1 − β)P̂ i with β ∈ [0, 1], we have: R(P̃ i ) =f (Q∗i (P̃ i )) − X h i λ∗k (P̃ i ) tr(Q∗i,k (P̃ i )) − P̃i,k k ≤f (Q∗i (P̃ i )) − X ≤f (Q∗i (P̌ i )) − X λ∗k (P̌ i ) h tr(Q∗i,k (P̃ i )) − P̃i,k i k h i λ∗k (P̌ i ) tr(Q∗i,k (P̌ i )) − P̃i,k . k (19) ∗ As for (19), the first inequality follows from that λ ( P̃ )= i P minλ [f (Q∗i (P̃ i )) − k λk (tr(Q∗i,k (P̃ i )) − P̃i,k )], and the second follows from that Qi (P̌ i ) = maxQ [f (Qi ) − P inequality ∗ λ ( P̌ )tr(Q i i,k )]. Similarly, we have: k k R(P̂ i ) ≤ f (Q∗i (P̌ i )) − X h i λ∗k (P̌ i ) tr(Q∗i,k (P̌ i )) − P̂i,k . k 8.3 Proof of Proposition 1 Due to the rules used in the function FirstChangeW, we can prove that the water-level changing pattern in the transmission policy produced by Algorithm 1 is consistent with the structure revealed in Lemma 2, i.e., 1) if the water-level P in use by user k is first ωk aand , then changed to ω̃k at tτ where τi=1 (g −1(q) (1/ωk )Li ) = En,k then we must have ω̃ > ω ; and 2) if the water-level is changed at k k P c , then we must have the tτ where τi=1 (g −1(q) (1/ωk Li ) = En,k next water-level ω̃k < ωk . Suppose w.l.o.g that the water-level of user k changes J times in (q) (q) Wk := {ωi,k , i = 1, . . . , N } yielded by Algorithm 1. We divide (q) the policy into J + 1 phases: water-level ωi,k = ω̌1,k over epoches (q) ωi,k (q) i ∈ [1, τ1 ], = ω̌2,k over epoches i ∈ [τ1 + 1, τ2 ], . . . , ωi,k = ω̌J+1,k over epoches i ∈ [τJ + 1, N ]. We can then construct a (q) (q) (q) set of Lagrange multipliers Λk := {λn,k , µn,k , n = 1, . . . , N } as follows: (q) Let λN,k = g (q) (P̌J+1,k ) = 1/ω̌J+1,k > 0, where the inequality is due to the strict increasing of R(Pi,k , P i,−k ), lead(q) ing to positivity of g(Pi,k ). Let λτj ,k = 1/ω̌j,k − 1/ω̌j+1,k , if Pτj (q) (q) −1(q) (1/ωi,k )Li ) = Eτaj ,k , or let µτj ,k = 1/ω̌j+1,k − i=1 (g Pτj (q) 1/ω̌j,k if i=1 (g −1(q) (1/ωi,k )Li ) = Eτcj ,k , ∀j = 1, . . . , J. We have shown that the water-level ω̌j+1,k > ω̌j,k if the causality constraint is tight at tτj , or ω̌j+1,k < ω̌j,k if the non-overflow (q) constraint is tight at tτj . It then readily follows that λτj ,k > 0 or (q) µτj ,k > 0, depending which type of constraint is tight at tτj . Except It then follows that: (q) multipliers in are set to zero. (q) With such a Λk , the complementary slackness condi(q) tions (9)–(10) clearly hold. Using such a Λk also leads to PN PN (q) (q) (q) θi,k = n=i λn,k − n=i µn,k = 1/ω̌j,k , ∀i ∈ [τj−1 + 1, τj ] k i −β P̃i,k + (1 − β)P̂i,k X ∗   λk (P̌ i ) tr(Q∗i,k (P̌ i )) − P̌i,k =f (Q∗i (P̌ i )) − (q) (with τ0 := 1 and τJ+1 := N ). This implies that Pi,k = (q) g −1(q) (1/ω̌j,k ) = arg maxPi,k ≥0 [R(q) (Pi,k , P i,−k ) − θi,k Pi,k ], k ∀i ∈ [τj−1 + 1, τj ]. Thus, =R(P̌ i ). Proof of Lemma 2 Due to the strict concavity and increasing of R(P i ), it clearly fol(q) (q) lows that we should have g (q) (Pi,k ) = θi,k , leading to: Pi,k = (q) g −1(q) (θi,k ). (q) (q) Clearly Pi,k changes only when water-level ωi,k changes P PN −1 (q) (q) (q) its value. By the definition θi,k := N n=i λn,k − n=i µn,k , PN PN −1 (q) (q) (q) (q) we have: 1/ω1,k = 1/( n=1 λn,k − n=1 µn,k ); and ωN,k = (q) (q) {Pi,k , i = 1, . . . , N } follows the struc(q) In fact, it can be shown that the strict inequality holds if β ∈ (0, 1) due to the strict concavity of log function in f (Qi ). (q) (q) (q) Λk βR(P̃ i ) + (1 − β)R(P̂ i ) X ∗  ≤f (Q∗i (P̌ i )) − λk (P̌ i ) tr(Q∗i (P̌ i )) 8.2 (q) for these J + 1 positive λN,k and λj,k or µj,k , all other Lagrange ture in Lemma 2 and it is guaranteed that each Pi,k satisfies (8). (q) We have proven that Pi,k , i = 1, . . . , N yielded by Algorithm 1 (q) and the Lagrange multipliers Λk constructed accordingly, satisfy the sufficient and necessary optimality conditions (8)–(10). It read(q) (q) ily follows that Pk := {Pi,k , i = 1, . . . , N } is a global optimal policy for the equivalent point-to-point link between user k and the access point corresponding to iteration q. In the search of a water-level changing point and the associated water-level (thus power) per iteration q, at most N energy arrival times need to be tested. Clearly, we need to search at most N waterlevel points in the worst case; hence, the proposed Algorithm 1 can (q) compute Pi,k , i = 1, . . . , N with a complexity O(N ). (q) 1/λN,k . If λn,k = µn,k = 0, ∀n = 1, . . . , N − 1, then a constant (q) (q) ωi,k = 1/λN,k is maintained over all epoches. We have a change of (q) (q) (q) ωi,k at tn only when λn,k > 0 or µn,k > 0 for a certain n. (q) From the complementary slackness conditions (6)–(7), λn,k > P (q) (q) a 0 implies that n i=1 (Pi,k Li ) = En,k , whereas µn,k > 0 implies Pn (q) (q) c that i=1 (Pi,k Li ) = En,k . Note that we cannot have both λn,k > (q) (q) (q) 0 and µn,k > 0 for the same n. If λn,k > 0, we have 1/ωn+1,k − (q) (q) (q) (q) 1/ωn,k = −λn,k < 0. This implies that ωn+1,k > ωn,k . Similarly, (q) (q) (q) (q) if µn,k > 0, we have 1/ωn+1,k − 1/ωn,k = µn,k > 0, implying (q) ωn+1,k < (q) ωn,k . IET Research Journals, pp. 1–9 c The Institution of Engineering and Technology 2015 9
7cs.IT
Natural Gradient Deep Q-learning arXiv:1803.07482v1 [cs.LG] 20 Mar 2018 Ethan Knight∗ [email protected] Stanford Cognitive & Systems Neuroscience Lab The Nueva School Osher Lerner [email protected] The Nueva School Abstract This paper presents findings for training a Q-learning reinforcement learning agent using natural gradient techniques. We compare the original deep Q-network (DQN) algorithm to its natural gradient counterpart (NGDQN), measuring NGDQN and DQN performance on classic controls environments without target networks. We find that NGDQN performs favorably relative to DQN, converging to significantly better policies faster and more frequently. These results indicate that natural gradient could be used for value function optimization in reinforcement learning to accelerate and stabilize training. 1 Introduction Natural gradient was originally proposed by Amari as a method to accelerate gradient descent [1998]. Rather than exclusively using the loss gradient or including second-order (curvature) information, natural gradient uses the “information” found in the parameter space of the model. Natural gradient has been successfully applied to several deep learning domains and has been used to accelerate the training of reinforcement learning systems [Desjardins et al., 2015, Kakade, 2001, Schulman et al., 2015, Wu et al., 2017]. To motivate our approach, we hoped that using natural gradient would accelerate the training of a DQN as it did with other reinforcement learning systems, making our system more sample-efficient, thereby addressing one of the major problems in reinforcement learning. We also hoped that since natural gradient stabilizes training (e.g. natural gradient is relatively unchanged when changing the order of training inputs [Pascanu and Bengio, 2013]), NGDQN could be able to achieve good results without a target network, and converge to good solutions with more stability. In our experiments, we observed both effects. When training without a target network, NGDQN converged much faster and more frequently than our DQN baseline, and the NGDQN training appeared much more stable. This paper was inspired by the Requests for Research list published by OpenAI, which has listed the application of natural gradient techniques to Q-learning since June 2016 [2016, 2018]. This paper presents the first successful attempt to our knowledge: our method to accelerate the training of Q-networks using natural gradient. 2 Background In reinforcement learning, an agent is trained to interact with an environment to maximize cumulative reward. An agent interacts with an environment by observing a state s, performing an action a, and receiving a new state s0 and reward r0 . Often, this environment is modeled as a Markov Decision Process (MDP), which defines a set of states S, a set of actions A, R, the expected reward given s ∗ Contributor statement and acknowledgements at end of paper and a, dynamics P which give the probability of a state s0 given prior state s and action a [Sutton and Barto, 1998]. The discount factor γ is also defined, which specifies how the cumulative reward Rt is calculated [Mnih et al., 2013]: Rt = T X 0 γ t −t rt0 (1) t0 =t The agent attempts to learn a policy π to maximize this cumulative reward. 2.1 Q-learning Q-learning [Watkins, 1989, Rummery and Niranjan, 1994] is a model-free reinforcement learning algorithm which works by gradually learning Q(s, a), the expectation of the cumulative reward. The Bellman equation defines the optimal Q-value Q∗ [Sutton and Barto, 1998, Hester et al., 2017]: # " X 0 ∗ ∗ Q (s, a) = E R(s, a) + γ P (s |s, a) max Q (s, a) (2) 0 s0 a This function Q can be then optimized through value iteration, which defines the update rule Q(s, a) ← E [r + γ maxa0 Q(s0 , a0 )|s, a] [Sutton and Barto, 1998, Mnih et al., 2013]. Additionally, the optimal policy π is defined as π(s) = argmaxa Q∗ (s, a) [Sutton and Barto, 1998, Hester et al., 2017]. To train a Q-learning agent, we often use an -greedy policy. Initially, the training agent acts nearly randomly in order to explore potentially successful strategies. As the agent learns, it acts randomly less (this is sometimes called the “exploit” stage, as opposed to the prior “explore” stage). Mathematically, the probability of choosing a random action  is gradually annealed over the course of training. Q-learning was recently used to play Atari games using convolutional networks by Mnih et al. [2013]. For a state s, action a, and learning rate α, the function Q estimates the future reward and is updated as follows: Q(s, a) ← (1 − α)Q(s, a) + αy (3) If the agent has not yet reached the end of the task, given discount factor γ and reward r, the target is defined as: y = r + γ max Q(s0 , a0 ) (4) 0 a In environments with defined endings, the final timestep is defined as y = r since there is no future reward. In deep Q-learning, this mapping is learned by a neural network. A neural network can be described as a parametric function approximator that uses “layers” of units, each containing weights, biases and activation functions, called “neurons”. Each layer’s output is fed into the next layer, and the loss is backpropagated to each layer’s weights in order to adjust the parameters according to their effect on the loss. For deep Q-learning, the neural network, parameterized by θ, takes in a state s and outputs a predicted future reward for each possible action a with a linear activation on the final layer. The loss of this network is defined as follows, given the environment ε:   L = E (y − Q(s, ai ; θ))2 where Q(s, ai ; θ) is the output of the network corresponding to action taken ai , and h i 0 0 y = Es0 ∼ε r + γ max Q(s , a ; θ) s, a i 0 a (5) (6) Notice that we take the mean-squared-error between the expected Q-value and actual Q-value. The neural network is optimized over the course of numerous iterations through some form of gradient descent. In the original DQN (deep Q-network) paper, an adaptive gradient method is used to train this network [Mnih et al., 2013]. 2 Deep Q-networks use experience replay to train the Q-value estimator on a randomly sampled batch of previous experiences (essentially replaying past remembered events back into the neural network) [Lin, 1992]. Experience replay makes the training samples independent and identically distributed (i.i.d.), unlike the highly correlated consecutive samples which are encountered during interaction with the environment [Schaul et al., 2015]. This is a prerequisite for many SGD convergence theorems. Additionally, we use an -greedy policy in both our DQN baseline and in NGDQN. We combine these two approaches, using natural gradient to optimize an arbitrary neural network in Q-learning architectures. 3 Natural gradient for Q-learning Gradient descent optimizes parameters of a model with respect to a loss function by “descending” down the loss manifold. To do this, we take the gradient of the loss with respect to the parameters, then move in the opposite direction of that gradient [Goodfellow et al., 2016]. Mathematically, gradient descent proposes the point given a learning rate of α and parameters θ: θ − α∇θ L(x, y; θ). A commonly used variant of gradient descent is stochastic gradient descent (SGD). Instead of calculating the entire gradient at a time, SGD uses a mini-batch of training samples: θ − α∇θ L(xi , yi ; θ). Our baselines use Adam, an adaptive gradient optimizer, which is a modification of SGD [Kingma and Ba, 2014]. However, this approach of gradient descent has a number of issues. For one, gradient descent will often become very slow in plateaus where the magnitude of the gradient is close to zero. Also, while gradient descent takes uniform steps in the parameter space, this does not necessarily correspond to uniform steps in the output distribution. Natural gradient attempts to fix these issues by incorporating the inverse Fisher information matrix, a concept from statistical learning theory [Amari, 1998]. Essentially, the core problem is that Euclidean distances in the parameter space do not give enough information about the distances between the corresponding outputs, as there is not a strong enough relationship between the two [Foti, 2013]. Kullback and Leibler define a more expressive distributionwise measure, as follows [1951]: Z ∞ µ1 (s) KL(µ1 |µ2 ) = µ1 (s) log ds (7) µ2 (s) −∞ However, since KL(µ1 |µ2 ) 6= KL(µ1 |µ2 ), symmetric KL divergence, also known as JensenShannon (JS) divergence, is defined as follows [Foti, 2013]: 1 KLsym (µ1 |µ2 ) := (KL(µ1 |µ2 ) + KL(µ2 |µ1 )) (8) 2 To perform gradient descent on the manifold of functions given by our model, we use the Fisher information metric on a Riemannian manifold. Since symmetric KL divergence behaves like a distance measure in infinitesimal form, a Riemannian metric is derived as the Hessian of the divergence of symmetric KL divergence [Pascanu and Bengio, 2013]. We give Pascanu and Bengio’s definition, which assume that the probability of a point sampled from the network is a gaussian with the network’s output as the mean and with a fixed variance. Given some probability density function p, input vector s, and parameters θ [Pascanu and Bengio, 2013]: Fθ = Es,q [(∇ log pθ (q|s))T (∇ log pθ (q|s))] (9) Finally, to achieve uniform steps on the output distribution, we use Pascanu and Bengio’s derivation of natural gradient given a loss function L [2013]: ∇LN = ∇LFθ −1 (10) Using this definition and solving the Lagrange multiplier for minimizing the loss of parameters updated by ∆θ under the constraint of a constant symmetric KL divergence, one can derive the approximation for constant symmetric KL divergence, using the information matrix. Taking the second-order Taylor expansion [Pascanu and Bengio, 2013] gets: 1 (11) KLsym (pθ |pθ+∆θ ) ≈ ∆θT Fθ ∆θ 2 3 As the output probability distribution is dependent on the final layer activation, Pascanu and Bengio [2013] give the following representation for a layer with a linear activation (interpreted as a conditional Gaussian distribution), here adapted for Q-learning, where β is defined as the standard deviation: pθ (q|s) = N (q|Q(s, θ), β 2 ) (12) In this formulation, since the information is only dependent on the final layer’s activation we can use different activations in the hidden layers without changing the Fisher information. As in Pascanu and Bengio [2013], the Fisher information can be derived where JQ corresponds to the Jacobian of the output vector with respect to the parameters as follows:   Flinear = β 2 Es∼dπ (s) JTQ JQ (13) 4 Related work We borrow heavily from the approach of Pascanu and Bengio [2013], using their natural gradient for deep neural networks formalization and implementation in our method. Next, we look at work on a different method of natural gradient descent by Desjardins et al. [2015]. In this paper, algorithm called “Projected Natural Gradient Descent” (PRONG) is proposed, which also considers the Fisher information matrix in its derivation. While our paper does not explore this approach, it could be an area of future research, as PRONG is shown to converge better on multiple data-sets, such as CIFAR-10 [Desjardins et al., 2015]. Additional methods of applying natural gradient to reinforcement learning using reinforcement learning algorithms such as policy gradient and actor-critic are explored in Kakade [2001] and Peters et al. [2005]. In both works, the natural variants of their respective algorithms are shown to perform favorably compared to their non-natural counterparts. Details on theory, implementation, and results are in their respective papers. Insights into the mathematics of optimization using natural conjugate gradient techniques are provided in the work of Honkela et al. [2015]. These methods allow for more efficient optimization in high dimensions and nonlinear contexts. The Natural Temporal Difference Learning algorithm applies natural gradient to reinforcement learning systems based on the Bellman error, although Q-learning is not explored [Tesauro, 1995]. The authors use natural gradient with residual gradient, which minimizes the MSE of the Bellman error and apply natural gradient to SARSA, an on-policy learning algorithm. Empirical experiments show that natural gradient again outperforms standard methods in the tested environments. Finally, to our knowledge, the only one other published or publicly available version of natural Q-learning was created by [Barron et al., 2016]. In this work, the authors re-implemented PRONG and verified its efficacy at MNIST. However, when the authors attempted to apply it to Q-learning they got negative results, with no change on CartPole and worse results on GridWorld. 5 Methods In our experiments, we use a standard method of Q-learning to act on the environment. Lasagne [Dieleman et al., 2015], Theano [Theano Development Team, 2016], and AgentNet [Yandex, 2016] complete the brunt of the computational work. Because our implementation of natural gradient adapted from Pascanu and Bengio originally fit an X to a mapping y and directly back-propagated a loss, we modify the training procedure to use a target value change similar to that described in 5. We also decay the learning rate by multiplying it by a constant factor every iteration. As the output layer of our Q-network has a linear activation function, we use the parameterization of the Fisher information matrix for linear activations, which determines the natural gradient. For this, we refer to equation 13, approximated at every batch. The MinRes-QLP Krylov Subspace Descent Algorithm [Choi et al., 2011] calculates the change in parameters according to the Fisher information matrix as in Pascanu and Bengio [2013] by efficiently solving the system of linear equations relating the desired change in parameters to the gradients of the loss (see Algorithm 1). Our implementation runs on the OpenAI Gym platform which provides 4 several classic control environments, such as the ones shown here, as well as other environments such as Atari [Brockman et al., 2016]. The current algorithm takes a continuous space and maps it to a discrete set of actions. In Algorithm 1, we adapt Mnih et al.’s Algorithm 1 and Pascanu and Bengio’s Algorithm 2 [2013, 2013]. Because these environments do not require preprocessing, we have omitted the preprocessing step, however this can easily be re-added. In our experiments, ∆α was chosen somewhat arbitrarily to be 1 − 7e−5 , and α was selected according to our grid-search (see: Hyperparameters). According to our grid search, we either leave the damping value unchanged or adjust it according to the Levenberg-Marquardt heuristic as used in Pascanu and Bengio [2013] and Martens [2010]. Algorithm 1 Natural Gradient Deep Q-Learning with Experience Replay Require: Initial learning Rate α0 Require: Learning rate decay ∆α Require: Function update damping Initialize replay memory D to capacity N Initialize action-value function Q with random weights α ← α0 for episode = 1, M do Initialize sequence with initial state s1 for t = 1, T do With probability  select a random action at , otherwise select action at = maxa Q∗ (st , a; θ) Execute action at in emulator and observe reward rt and state st+1 Store transition (st , at , rt , st+1 ) in memory D Sample random minibatch of n transitions (sj , aj , rj , sj+1 ) from D  r for terminal sj+1 yj ← j rj + γ maxa0 Q(sj+1 , a0 ; θ) for non-terminal sj+1 g ← ∂L ∂θ d ← update q damping(d) P ∂L 2 gnorm ← ∂θ Define G such that G(v) = ( n1 JQ v)JQ Solve argminx (G + dI)x − ∂L ∂θ with MinresQLP [Choi et al., 2011] gnatural ← gnorm x θ ← θ − αgnatural α ← ∆α α end for end for 6 6.1 Experiments Overview To run Q-learning models on OpenAI gym, we adapt Pascanu and Bengio’s implementation [2013]. For the baseline, we use OpenAI’s open-source Baselines library [Dhariwal et al., 2017], which allows reliable testing of tuned reinforcement learning architectures. As is defined in Gym, performance is measured by taking the best 100-episode reward over the course of running. We run a grid search on the parameter spaces specified in the Hyperparameters section, measuring performance for all possible combinations. Because certain parameters like the exploration fraction are not used in our implementation of NGDQN, we grid search those parameters as well. As we wish 5 Figure 1: Average best 100-episode run over 10 trials with IQR2 . We can see that in every environment tested, NGDQN achieves a higher max 100-episode average than our DQN baseline. to compare “vanilla” NGDQN to “vanilla” DQN, we do not use target networks, model saving, or any other features, such as prioritized experience replay.2 Following this grid search, we take the best result performance for each environment from both DQN and NGDQN, and run this configuration 10 times, recording a moving 100-episode average and the best 100-episode average over the course of a number of runs. These experiments reveal that natural gradient compares favorably to standard adaptive gradient techniques. However, the increase in stability and speed comes with a trade-off: due to the additional computation, natural gradient takes longer to train when compared to adaptive methods, such as the Adam optimizer [Kingma and Ba, 2014]. Details of this can be found in Pascanu and Bengio’s work [2013]. Below, we describe the environments, summarizing data taken from https://github.com/ openai/gym and information provided on the wiki: https://github.com/openai/gym/wiki. 6.2 CartPole-v0 The classic control task CartPole involves balancing a pole on a controllable sliding cart on a frictionless rail for 200 timesteps. The agent “solves” the environment when the average reward over 100 episodes is equal to or greater than 195. However, for the sake of consistency, we measure performance by taking the best 100-episode average reward. The agent is assigned a reward for each timestep where the pole angle is less than ±12 deg, and the cart position is less than ±2.4 units off the center. The agent is given a continuous 4-dimensional space describing the environment, and can respond by returning one of two values, pushing the cart either right or left. 6.3 CartPole-v1 CartPole-v1 is a more challenging environment which requires the agent to balance a pole on a cart for 500 timesteps rather than 200. The agent solves the environment when it gets an average reward of 450 or more over the course of 100 timesteps. However, again for the sake of consistency, we again measure performance by taking the best 100-episode average reward. This environment essentially behaves identically to CartPole-v0, except that the cart can balance for 500 timesteps instead of 200. 6.4 Acrobot-v1 In the Acrobot environment, the agent is given rewards for swinging a double-jointed pendulum up from a stationary position. The agent can actuate the second joint by returning one of three actions, 2 The DQN performance shown may be worse than DQN performance one might find when comparing to other implementations. The discrepancy is that DQN is often used with target networks, whereas in this case, we do not use target networks for either NGDQN or DQN. The reason for this is that we want to compare NGDQN to DQN on the original DQN algorithm presented in Algorithm 1 of Mnih et al. [2013] in order to test if the natural gradient can stabilize deep Q-networks in place of target networks. We plan to expand our analysis to include target networks in future work. 6 Figure 2: DQN baseline and NGDQN performance over 10 trials over time with average line3 . We can see that when training, NGDQN appears to be significantly more stable than the DQN baseline (i.e. NGDQN teneded reliably converged to a solution while the DQN baseline did not). corresponding to left, right, or no torque. The agent is given a six dimensional vector describing the environments angles and velocities. The episode ends when the end of the second pole is more than the length of a pole above the base. For each timestep that the agent does not reach this state, it is given a −1 reward. 6.5 LunarLander-v2 Finally, in the LunarLander environment, the agent attempts to land a lander on a particular location on a simulated 2D world. If the lander hits the ground going too fast, the lander will explode, or if the lander runs out of fuel, the lander will plummet toward the surface. The agent is given a continuous vector describing the state, and can turn its engine on or off. The landing pad is placed in the center of the screen, and if the lander lands on the pad, it is given reward. The agent also receives a variable amount of reward when coming to rest, or contacting the ground with a leg. The agent loses a small amount of reward by firing the engine, and loses a large amount of reward if it crashes. Although this environment also defines a solve point, we use the same metric as above to measure performance. 7 Results NGDQN and DQN were run against these four experiments, to achieve the following results summarized in Figure 1. The hyperparameters can be found in the Hyperparameters section, and the code for this project can be found in the Code section. Each environment was run for a number of episodes (see Hyperparameters), and as per Gym standards the best 100 episode performance was taken. In all experiments, natural gradient converges faster and significantly more consistently than the DQN benchmark, indicating its robustness in this task compared to the standard adaptive gradient optimizer used in the Baseline library (Adam). The success across all tests indicates that natural gradient generalizes well to diverse control tasks, from simpler tasks like CartPole to more complex tasks like LunarLander.3 3 The LunarLander-v2 task for NGDQN was not completed, as the Sherlock cluster where the environments were run does not permit GPU tasks for over 48 hours. Therefore, each of the 10 trials was run for 48 hours and then stopped. 7 8 Conclusions In this paper, natural gradient methods are shown to accelerate and stabilize training for common control tasks. This could indicate that Q-learning’s instability may be diminished by naturally optimizing it, and also that natural gradient could be applied to other areas of reinforcement learning in order to address important problems such as sample efficiency. Contributions & Acknowledgements Here, a brief contributor statement is provided, as recommended by Sculley et al. [2018]. Primary author led the research, wrote the first draft of the paper, edited later stages of the paper, and wrote or adapted all the code for this project. Additionally, experiments were run by primary author. Secondary author verified all of the code for correctness and edited the paper. Secondary author was also important in the derivation and understanding of KL divergence and the calculation of the natural gradient, and in his reaching out to fellow academics. Thanks to Jen Selby for providing valuable insight and support, and for reviewing the paper and offering her suggestions over the course of the writing process. Thanks to Leonard Pon for his instruction, advice, and generous encouragement, especially during Applied Math, where the first part of this project took place. Also, huge thanks to Kavosh Asadi for providing us with valuable feedback and direction, and for helping us navigate the research scene. References Shun-Ichi Amari. Natural gradient works efficiently in learning. Neural computation, 10(2):251–276, 1998. Alex Barron, Todor Markov, and Zack Swafford. Deep q-learning with natural gradients, Dec 2016. URL https://github.com/todor-markov/natural-q-learning/blob/master/ writeup.pdf. Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. ArXiv e-prints, abs/1606.01540, 2016. URL http: //arxiv.org/abs/1606.01540. Sou-Cheng T. Choi, Christopher C. Paige, and Michael A. Saunders. MINRES-QLP: A krylov subspace method for indefinite or singular symmetric systems. SIAM Journal on Scientific Computing, 33(4):1810–1836, 2011. doi: 10.1137/100787921. URL http://web.stanford. edu/group/SOL/software/minresqlp/MINRESQLP-SISC-2011.pdf. Guillaume Desjardins, Karen Simonyan, Razvan Pascanu, and Koray Kavukcuoglu. Natural neural networks. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 2071–2079. Curran Associates, Inc., 2015. URL http://papers.nips.cc/paper/5953-natural-neural-networks.pdf. Prafulla Dhariwal, Christopher Hesse, Oleg Klimov, Alex Nichol, Matthias Plappert, Alec Radford, John Schulman, Szymon Sidor, and Yuhuai Wu. Openai baselines. https://github.com/ openai/baselines, 2017. Sander Dieleman, Jan Schlüter, Colin Raffel, Eben Olson, Søren Kaae Sønderby, Daniel Nouri, Daniel Maturana, Martin Thoma, Eric Battenberg, Jack Kelly, Jeffrey De Fauw, Michael Heilman, Diogo Moitinho de Almeida, Brian McFee, Hendrik Weideman, Gábor Takács, Peter de Rivaz, Jon Crall, Gregory Sanders, Kashif Rasul, Cong Liu, Geoffrey French, and Jonas Degrave. Lasagne: First release, August 2015. URL http://dx.doi.org/10.5281/zenodo.27878. Nick Foti. The natural gradient, Jan 2013. URL https://hips.seas.harvard.edu/blog/2013/ 01/25/the-natural-gradient/. Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http: //www.deeplearningbook.org. 8 T. Hester, M. Vecerik, O. Pietquin, M. Lanctot, T. Schaul, B. Piot, D. Horgan, J. Quan, A. Sendonaris, G. Dulac-Arnold, I. Osband, J. Agapiou, J. Z. Leibo, and A. Gruslys. Deep Q-learning from Demonstrations. ArXiv e-prints, April 2017. Antti Honkela, Matti Tornio, Tapani Raiko, and Juha Karhunen. Natural conjugate gradient in variational inference. International Conference on Neural Information Processing, 2015. URL https://www.hiit.fi/u/ahonkela/papers/Honkela07ICONIP.pdf. Sham Kakade. A natural policy gradient. In Thomas G. Dietterich, Suzanna Becker, and Zoubin Ghahramani, editors, Advances in Neural Information Processing Systems 14 (NIPS 2001), pages 1531–1538. MIT Press, 2001. URL http://books.nips.cc/papers/files/nips14/CN11. pdf. Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. ArXiv e-prints, abs/1412.6980, 2014. URL http://arxiv.org/abs/1412.6980. S. Kullback and R. A. Leibler. On information and sufficiency. Ann. Math. Statist., 22(1):79– 86, 03 1951. doi: 10.1214/aoms/1177729694. URL http://dx.doi.org/10.1214/aoms/ 1177729694. Long-Ji Lin. Reinforcement Learning for Robots Using Neural Networks. PhD thesis, Carnegie Mellon University, Pittsburgh, PA, USA, 1992. James Martens. Deep learning via hessian-free optimization. In ICML, 2010. Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin A. Riedmiller. Playing atari with deep reinforcement learning. ArXiv e-prints, abs/1312.5602, 2013. URL http://arxiv.org/abs/1312.5602. OpenAI. Requests for research: Initial commit, 2016. URL https://github.com/openai/ requests-for-research/commit/03c3d42764dc00a95bb9fab03af08dedb4e5c547. OpenAI. Requests for research, 2018. URL https://openai.com/requests-for-research/ #natural-q-learning. Razvan Pascanu and Yoshua Bengio. Natural gradient revisited. ArXiv e-prints, abs/1301.3584, 2013. URL http://arxiv.org/abs/1301.3584. Jan Peters, Sethu Vijayakumar, and Stefan Schaal. Natural Actor-Critic, pages 280–291. Springer Berlin Heidelberg, Berlin, Heidelberg, 2005. ISBN 978-3-540-31692-3. doi: 10.1007/11564096 29. URL https://doi.org/10.1007/11564096_29. G. A. Rummery and M. Niranjan. On-line Q-learning using connectionist systems. Technical Report 166, Cambridge University Engineering Department, September 1994. URL ftp://svr-ftp. eng.cam.ac.uk/reports/rummery_tr166.ps.Z. T. Schaul, J. Quan, I. Antonoglou, and D. Silver. Prioritized Experience Replay. ArXiv e-prints, November 2015. John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In Francis Bach and David Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 1889–1897, Lille, France, 07–09 Jul 2015. PMLR. URL http://proceedings.mlr.press/ v37/schulman15.html. D. Sculley, Jasper Snoek, Alex Wiltschko, and Ali Rahimi. Winner’s curse? on pace, progress, and empirical rigor. ICLR 2018 (under review), Feb 2018. URL https://openreview.net/forum? id=rJWF0Fywf. Richard S. Sutton and Andrew G. Barto. Introduction to Reinforcement Learning. MIT Press, Cambridge, MA, USA, 1st edition, 1998. ISBN 0262193981. URL https://pdfs. semanticscholar.org/aa32/c33e7c832e76040edc85e8922423b1a1db77.pdf. 9 Gerald Tesauro. Temporal difference learning and td-gammon. Commun. ACM, 38(3):58–68, March 1995. ISSN 0001-0782. doi: 10.1145/203330.203343. URL http://doi.acm.org/10.1145/ 203330.203343. Theano Development Team. Theano: A Python framework for fast computation of mathematical expressions. arXiv e-prints, abs/1605.02688, May 2016. URL http://arxiv.org/abs/1605. 02688. Christopher John Cornish Hellaby Watkins. Learning from Delayed Rewards. PhD thesis, King’s College, Cambridge, UK, May 1989. URL http://www.cs.rhul.ac.uk/~chrisw/new_thesis. pdf. Y. Wu, E. Mansimov, S. Liao, R. Grosse, and J. Ba. Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation. ArXiv e-prints, August 2017. Yandex. Agentnet, 2016. URL https://github.com/yandexdataschool/AgentNet. Appendix A: Hyperparameters Both NGDQN and DQN had a minimum epsilon of 0.02 and had a γ of 1.0 (both default for Baselines). The NGDQN model was tested using an initial learning rate of 1.0. For NGDQN, the epsilon decay was set to 0.995, but since there wasn’t an equivalent value for the Baselines library, the grid search for Baselines included an exploration fraction (defined as the fraction of entire training period over which the exploration rate is annealed) of either 0.01, 0.1, or 0.5 (see 8). Likewise, to give baselines the best chance of beating NGDQN, we also searched a wide range of learning rates, given below. Environment # of Episodes Ran For Layer Configuration CartPole-v0 CartPole-v1 Acrobot-v1 LunarLander-v2 2000 2000 10,000 10,000 [64] [64] [64, 64] [256, 128] Table 1: Shared configuration The batch job running time is given below (hours:minutes:seconds) for Sherlock. NGDQN LunarLander-v2 was run on the gpu partition which supplied either an Nvidia GTX Titan Black or an Nvidia Tesla GPU. All other environments were run on the normal partition. Additional details about natural gradient computation time can be found in Pascanu and Bengio [2013]. Environment NGDQN Batch Time DQN Batch Time CartPole-v0 CartPole-v1 Acrobot-v1 LunarLander-v2 4:00:00 9:00:00 48:00:00 48:00:004 1:00:00 1:00:00 8:00:00 12:00:00 Table 2: Running time 4 Jobs not completed; see Figure 2 for details 10 Hyperparameter grid-search space: Hyperparameter Search Space Learning Rate Adapt Damping Batch Size Memory Length Activation [0.01, 1.0] [Yes, No] [32, 128] [500, 2500, 50000] [Tanh, ReLU] Table 3: NGDQN hyperparameter search space Hyperparameter Learning Rate Exploration Fraction Batch Size Memory Length Activation Search Space [1e-08, 1e-07, 1e-06, 5e-06, 1e-05, 5e-05, 0.0001, 0.0005, 0.005, 0.05] [0.01, 0.1, 0.5] [32, 128] [500, 2500, 50000] [Tanh, ReLU] Table 4: Baseline DQN hyperparameter search space Best grid-searched configurations, used for experiments: Environment Learning Rate Adapt Damping Batch Size Memory Length Activation CartPole-v0 CartPole-v1 Acrobot-v1 LunarLander-v2 0.01 0.01 1.0 0.01 No Yes No No 128 128 128 128 50,000 50,000 50,000 50,000 Tanh Tanh Tanh ReLU Table 5: NGDQN hyperparameter configuration Environment Learning Rate Exploration fraction Batch Size Memory Length Activation CartPole-v0 CartPole-v1 Acrobot-v1 LunarLander-v2 1e-07 1e-08 1e-05 1e-05 0.01 0.1 0.01 0.01 128 32 128 128 2500 50,000 50,000 2500 Tanh Tanh ReLU Tanh Table 6: Baseline DQN hyperparameter configuration Appendix B: Code The code for this project can be found at https://github.com/hyperdo/ natural-gradient-deep-q-learning. It uses a fork of OpenAI Baselines to allow for different activation functions: https://github.com/hyperdo/baselines. 11
2cs.AI
Bayesian Belief Updating of Spatiotemporal Dynamics Gerald Cooray 1 2 Richard Rosch 2 3 Torsten Baldeweg 3 Louis Lemieux 1 Karl Friston 2 Biswa Sengupta 4 5 6 arXiv:1705.07278v2 [stat.ML] 12 Nov 2017 Abstract Epileptic seizure activity shows complicated dynamics in both space and time. To understand the evolution and propagation of seizures spatially extended sets of data need to be analysed. We have previously described an efficient filtering scheme using variational Laplace that can be used in the Dynamic Causal Modelling (DCM) framework (Friston et al., 2003) to estimate the temporal dynamics of seizures recorded using either invasive or non-invasive electrical recordings (EEG/ECoG). Spatiotemporal dynamics are modelled using a partial differential equation – in contrast to the ordinary differential equation used in our previous work on temporal estimation of seizure dynamics (Cooray et al., 2016). We provide the requisite theoretical background for the method and test the ensuing scheme on simulated seizure activity data and empirical invasive ECoG data. The method provides a framework to assimilate the spatial and temporal dynamics of seizure activity, an aspect of great physiological and clinical importance. 1. Introduction Epilepsy is a chronic disorder characterised by heterogeneous and dynamic pathophysiological processes that lead to an altered balance between excitatory and inhibitory influences at the cortical level. Electrocorticography (ECoG) recordings use a grid of electrodes to cover a cortical area of clinical importance. This methodology allows for a sampling of epileptic seizure activity. Quantitative analysis of the temporal aspect of cortical activity using neural mass 1 Department of Clinical and Experimental Epilepsy, Institute of Neurology, University College London, UK 2 Wellcome Trust Centre for Neuroimaging, Institute of Neurology, University College London, UK 3 Developmental Neuroscience Programme, Institute of Child Health, University College London, UK 4 Dept. of Bioengineering, Imperial College London 5 Dept. of Engineering, University of Cambridge 6 Cortexica Vision Systems, UK. Correspondence to: Biswa Sengupta <[email protected]>. ICML 2017 Time Series Workshop, Sydney, Australia, 2017. Copyright 2017 by the author(s). (mean-field) models was introduced by Wilson and Cowan (Jansen & Rit, 1995; Wilson & Cowan, 1972; 1973). Variation in the parameters of neural mass models have subsequently been used to model seizure activity, and inferences about these changes can be made using Bayesian statistics; including stochastic filtering or genetic algorithms (Blenkinsop et al., 2012; Freestone et al., 2014; Nevado-Holgado et al., 2012; Schiff & Sauer, 2008; Ullah & Schiff, 2010; Wendling et al., 2005; Sengupta et al., 2015a;b). The inherent assumptions of neural mass models preclude an in depth analysis of spatiotemporal dynamics, however, other neuronal models, such as neural field models, have explicitly included the spatial aspects of neuronal activity (Moran et al., 2013; Pinotsis et al., 2012; Schiff & Sauer, 2008). The comparatively high computational complexity of these models makes inference under such models very difficult. Several studies have suggested that during seizures there are changes in intra- and extracellular factors such as electrolytes, metabolites and neurotransmitters. Mediated through the local interaction between glial and neuronal cells many of these factors will change the intrinsic dynamics of the cortex (Fröhlich et al., 2010; Ullah & Schiff, 2010; Wei et al., 2014). We argue that a simplified spatiotemporal field can model the temporal and spatial behaviour of seizure activity. To contain model complexity and allow inference, we decouple fast temporal activity from slower spatiotemporal fluctuations. This adiabatic assumption respects the biology based on the diffusion or transport of extracellular or intracellular factors as described above and their interaction with the synaptic connectivity of cortical neurons, which are assumed to produce fast temporal activity. The model is formulated within the Dynamic Causal Modelling (DCM) framework (Friston et al., 2003) – a model comparison and averaging framework for Bayesian inference of hierarchical yet dynamical generative models. This paper introduces a novel application of dynamic causal modelling based upon a hierarchical DCM, with first (fast) level spectral activity and second (slow) level spatial dynamics. Bayesian Belief Updating 2. Methods To construct an invertible generative model, we partition our model into hidden states/parameters that are not explicitly (conditionally) dependent on spatial location (x, θi , θe ) and parameters that depend on spatial location (θsp ). Furthermore, we assume that the temporal fluctuations of the spatially dependent subset will be several orders slower than the temporal dynamics of the hidden states/parameters that are conditionally independent of spatial location. Parameters not governed by spatial dynamics are sampled from a Gaussian distribution. For reasons of numerical efficiency, we introduce the simplifying assumption that transport of electrolytes through the extracellular medium or through glial cells is via passive diffusion. At this point we appeal to the assumption that the dynamics of the neuronal activity (x) compared to the spatially varying parameters (θsp ) are at least several orders of magnitude faster. This allows us to estimate neuronal activity as the steady state activity of a neural mass governing x. We can then formulate the expected spectrum of the neuronal activity as a function of the parameters (θi , θsp , θe ). This approach has been adopted in a similar setting (Cooray et al., 2016; Moran et al., 2011). Our model of the spectra measured during discrete time intervals from the local field potentials is given by the following measurement model and a partial differential equation (Eq. 1): yk dθsp dt = of local standing-waves of neural field models (Daunizeau et al., 2009). The data generated by this model comprised of windowed spectral data yk,ij from the ith row and the j th column of any electrode array used to measure the electrographic activity sampled at time tk . We estimate the parameters of our model in each time window using variational Laplace (MacKay, 2002). The values in the next time window are predicted using Eq. 2, given the previous values. We can then estimate an approximate solution to the above stochastic model using Bayesian belief updating as has been previously described (Cooray et al., 2016). For technical details please refer to Section A-D. H (θi (tk ) , θsp (tk ) , θe ) + rk = O2 θsp + q (t) (1) In the following equations, sampling error rk ∼ N (0, Rk ) is sampled from a Gaussian distribution and q (t) is defined as a white noise process (Eq. 2). The diffusion equation is infinite dimensional, making it difficult to solve analytically and numerically. However, we approximate the partial differential equation using a finite set of eigenfunctions, φi (x), and eigenvalues, λi . This results in the following set of equations (Särkkä et al., 2012; Solin et al., 2012): yk = H (θi (x, tk ) , θsp (x, tk ) , θe (x, tk )) + rk X θsp (t) ≈ ci (tk ) φi (x) e−λi (t−tk ) ci (tk ) Figure 1. Left pane: Simulated fluctuation in parameter. Right pane: Results of inversion of simulated data (not shown). = ci (tk−1 ) e−λi (tk −tk−1 ) + qi (tk−1 ) (2) In this equation qi (tk ) ∼ N (0, Qi,k ) is sampled from a Gaussian distribution. A similar idea has previously been presented in DCM of distributed electromagnetic responses where the cortical activity was parameterised using a set 3. Results We simulated ECoG data with two-dimensional spatial dynamics: giving an excellent fit to the spectral activity (explained variation > 0.99; Figure 1). Furthermore, the inferred fluctuations of the excitatory parameter were nearly identical to the simulated dynamics. We also estimated a spatially dependent excitatory gain parameter for epileptic seizure activity using recordings from two patients with focal cortical dysplasia and refractory epilepsy (Figure 2). Subdural recordings were made from a 32-contact and a 20-contact platinum array (AdTech) placed over the lesion. We used two seizures free of artefacts from each data set for modelling the averaged induced spectral activity. The model also estimated parameters (without spatiotemporal dynamics) of intrinsic connectivity within the cortical column that were sampled from a white noise process. We allowed this random variation during Bayesian belief updating to accommodate unmodelled changes during the seizure activity. There was a good fit between the data and the predicted activity (explained variation > 0.85). Bayesian Belief Updating of this work, therefore, lies in the potential to fit the parameters of spatiotemporal dynamics of generative models to individual patients. This should allow us to understand individual differences that would not only guide epileptogenic resections but also be used for prediction of epilepsy surgery outcomes. Figure 2. Estimated cortical excitability at different time points Spatial dynamics controlling cortical excitability were inferred from the data, enabling parameters (excitatory gain) to be estimated at each point within the cortical grid over time. The parameter increased to a maximum towards the end of the seizure (a) and then quickly dissipates during termination of the seizure (b) (Figure 2). 4. Discussion We present a framework for analysing spatiotemporal dynamics, in our specific case such a dynamics emerges from epileptic seizure activity. We extended an inference scheme previously described for inference of the temporal structure of seizure activity (Cooray et al., 2016; Cooray et al., 2017) – we achieved this objective using a field model to incorporate spatial dynamics. Including spatial processes allow us to model the epileptic spread of seizure activity, which is one of the key physiological processes underlying a focal seizure. A deeper understanding of the spatial spread of focal seizures over the cortex could be used for curtailing the spread of a seizure; limiting its effect on the patient by either surgical or other procedures such as direct or induced electrical currents delivered by e.g. transcranial magnetic stimulation or deep brain stimulation (Engel, 1993; Rotenberg et al., 2008). The current framework for the analysis of seizure activity assumes that the spatial dynamics can be estimated using a finite set of eigenfunctions of the underlying partial differential equation (modelling the spatial dynamics). This assumption is only valid for relatively simple spatiotemporal dynamics (partial differential equations with analytical solutions) on simple representations of the cortical surface (such as a plane or spherical surface) (Evans, 2010). If any of these assumptions are violated, as in the case of realistic geometries obtained using MRI or more realistic descriptions of the spatiotemporal dynamics, the forward model would require re-formulation using numerical approximations. One way forward is by reformulating our scheme under a finite element framework using the approach described in Sengupta & Friston (2017); although this requires extensive computational expenditure. The real value In conclusion, we present a straightforward way of extending an established Bayesian belief update/filtering scheme to include the spatial spread of seizure activity. This requires several (plausible) assumptions regarding the behaviour of cortical columns, the geometry of the cortex and a separation of time scales of fast neuronal activity and slower fluctuations in cortical gain. We suggest that these assumptions have some experimental evidence but that the method can be modified if these assumptions are shown to be invalid or too inaccurate in the future. In particular, by comparing spatiotemporal models of different complexity (e.g. diffusion models versus complex reaction-diffusion models with threshold dynamics), using their model evidence, the above framework could be used to address important questions about how seizure activity spreads in patients. References Blenkinsop, Alex, Valentin, Antonio, Richardson, Mark P, and Terry, John R. The dynamic evolution of focal-onset epilepsies–combining theoretical and clinical observations. European Journal of Neuroscience, 36(2):2188–2200, 2012. Cooray, Gerald K, Sengupta, Biswa, Douglas, Pamela K, and Friston, Karl. Dynamic causal modelling of electrographic seizure activity using Bayesian belief updating. NeuroImage, 125:1142–1154, 2016. Cooray, G.K, Rosch, R., Baldeweg, T., Lemieux, L., Friston, K., and Sengupta, B. Bayesian Belief Updating of Spatiotemporal Seizure Dynamics. ArXiv e-prints, 2017. Daunizeau, Jean, Kiebel, Stefan J, and Friston, Karl J. Dynamic causal modelling of distributed electromagnetic responses. NeuroImage, 47(2):590–601, 2009. Engel, J. Surgical treatment of the epilepsies. Raven Press, 1993. Evans, CE. Partial Differential Equations. American Mathematical Society, 2010. Freestone, Dean R, Karoly, Philippa J, Nešić, Dragan, Aram, Parham, Cook, Mark J, and Grayden, David B. Estimation of effective connectivity via data-driven neural modeling. Frontiers in neuroscience, 8, 2014. Friston, Karl J, Harrison, Lee, and Penny, Will. Dynamic causal modelling. Neuroimage, 19(4):1273–1302, 2003. Fröhlich, Flavio, Sejnowski, Terrence J, and Bazhenov, Maxim. Network bistability mediates spontaneous transitions between normal and pathological brain states. Journal of Neuroscience, 30(32):10734–10743, 2010. Bayesian Belief Updating Jansen, Ben H and Rit, Vincent G. Electroencephalogram and visual evoked potential generation in a mathematical model of coupled cortical columns. Biological cybernetics, 73(4):357– 366, 1995. MacKay, David J. C. Information Theory, Inference & Learning Algorithms. Cambridge University Press, New York, NY, USA, 2002. Moran, Rosalyn, Pinotsis, Dimitris A, and Friston, Karl. Neural masses and fields in dynamic causal modeling. Frontiers in computational neuroscience, 7, 2013. Moran, Rosalyn J, Stephan, Klaas E, Dolan, Raymond J, and Friston, Karl J. Consistent spectral predictors for dynamic causal models of steady-state responses. Neuroimage, 55(4):1694– 1708, 2011. Nevado-Holgado, Alejo J, Marten, Frank, Richardson, Mark P, and Terry, John R. Characterising the dynamics of EEG waveforms as the path through parameter space of a neural mass model: application to epilepsy seizure evolution. Neuroimage, 59(3):2374–2392, 2012. Pinotsis, Dimitris A, Moran, Rosalyn J, and Friston, Karl J. Dynamic causal modeling with neural fields. Neuroimage, 59(2): 1261–1274, 2012. Rotenberg, Alexander, Muller, Paul, Birnbaum, Daniel, Harrington, Michael, Riviello, James J, Pascual-Leone, Alvaro, and Jensen, Frances E. Seizure suppression by EEG-guided repetitive transcranial magnetic stimulation in the rat. Clinical Neurophysiology, 119(12):2697–2702, 2008. Särkkä, Simo, Solin, Arno, Nummenmaa, Aapo, Vehtari, Aki, Auranen, Toni, Vanni, Simo, and Lin, Fa-Hsuan. Dynamic retrospective filtering of physiological noise in BOLD fMRI: DRIFTER. NeuroImage, 60(2):1517–1527, 2012. Schiff, Steven J and Sauer, Tim. Kalman filter control of a model of spatiotemporal cortical dynamics. BMC Neuroscience, 9(1): O1, 2008. Sengupta, B., Friston, K. J., and Penny, W. D. Gradient-based MCMC samplers for dynamic causal modelling. Neuroimage, 2015a. Sengupta, B., Friston, K. J., and Penny, W. D. Gradient-free MCMC methods for dynamic causal modelling. Neuroimage, 112:375–81, 2015b. Sengupta, Biswa and Friston, Karl. Sentient self-organization: Minimal dynamics and circular causality. arXiv preprint arXiv:1705.08265, 2017. Solin, Arno et al. Hilbert space methods in infinite-dimensional Kalman filtering. 2012. Ullah, Ghanim and Schiff, Steven J. Assimilating seizure dynamics. PLoS computational biology, 6(5):e1000776, 2010. Wei, Yina, Ullah, Ghanim, Ingram, Justin, and Schiff, Steven J. Oxygen and seizure dynamics: II. Computational modeling. Journal of neurophysiology, 112(2):213–223, 2014. Wendling, Fabrice, Hernandez, Alfredo, Bellanger, Jean-Jacques, Chauvel, Patrick, and Bartolomei, Fabrice. Interictal to ictal transition in human temporal lobe epilepsy: insights from a computational model of intracerebral EEG. Journal of Clinical Neurophysiology, 22(5):343, 2005. Wilson, Hugh R and Cowan, Jack D. Excitatory and inhibitory interactions in localized populations of model neurons. Biophysical journal, 12(1):1–24, 1972. Wilson, Hugh R and Cowan, Jack D. A mathematical theory of the functional dynamics of cortical and thalamic nervous tissue. Biological Cybernetics, 13(2):55–80, 1973. Bayesian Belief Updating Appendices A. Canonical mean-field equations The cortical columns described in this note were modelled using a neural mass (mean-field) model generating electrographic seizure activity. The canonical cortical microcircuit (CMC) is comprised of four subpopulations of neurons corresponding to superficial and deep pyramidal, excitatory, and inhibitory cells (Moran et al., 2013). These cell populations are connected using ten inhibitory and excitatory connections. Afferent connections drive the excitatory granular cells and efferent connections derive from the superficial pyramidal cells. The equations governing the four mean-fields are given by, xe 2ẋe + 2 Te Te 2ẋi xi ẍi + + 2 Ti Ti 2ẋsp xsp ẍsp + + 2 Tsp Tsp 2ẋdp xdp ẍdp + + 2 Tdp Tdp ẍe + = − g1 s (xe ) − g3 s (xi ) − g2 s (xsp ) = θsp g5 s (xe ) + θsp g6 s (xdp ) − g4 s (xi ) = θsp g8 s (xe ) − g7 s (xsp ) = − g10 s (xdp ) − g9 s (xi ) (3) θsp is the parameter with spatiotemporal dynamics. Parameter g7 was sampled from a Gaussian distribution during Bayesian filtering. All other parameters were kept constant during the inversion. B. Solution of parameter field equations The spatio-temporal (on a single spatial dimension) parameter is modelled as a heat equation with time dependent boundary conditions, u (x, t) : parameter with spatiotemporal variation α : diffusion coefficient φ1/0 (t) : boundary condition (time dependent) f (x) : initial condition L : length of one dimensional domain over which u varies ω (x) : time independent particular solution v (x, t) : homogenous solution to diffusion equation S (x, t) : auxillary variable ut = α2 uxx u (0, t) = φ0 , u (L, t) = φ1 u (x, 0) = f (x) ω = u = φ0 + x (φ1 − φ0 ) L ω+v ut = ωt + vt = α2 vxx vt = α2 vxx − ωt v (0, t) = v (L, t) = 0 Bayesian Belief Updating v (x, 0) = f (x) − ω (x, 0) S (x, t) = − ω̇ (4) The solution to the diffusion equation is separated into time and space dependent functions; i.e., by using separation of variables. The full solution can then be written as an infinite series of eigenfunctions (space dependent functions), together with their time-dependent variation. The eigenfunctions of the diffusion equation satisfy an equivalent ordinary differential equation. For the one-dimensional diffusion equation with Dirichlet boundary conditions (zero along boundaries), the eigenfunctions can be written as sine functions. For the two-dimensional case with rotational symmetry, a linear combination of first and second order Bessel functions are used, λn : eigenvalue of ordinary differential equation Sn (t) : coefficient of the eigenfunction sinλn x in the eigenfunction expansion of the auxiliary variable S (x, t) vn (t) : coefficient of the eigenfunction sinλn x in the eigenfunction expansion of v (x, t) cn : coefficient of the eigenfunction sinλn x in the eigenfunction expansion of the initial condition of v (x, t) , i.e., v (x, 0) S (x, t) = ∞ X Sn (t) sinλn x n=1 Sn (t) λn = v (x, t) = v (x, 0) Z 2 L nπ L ∞ X = − = 0 L dω sinλn xdx dt vn (t) sinλn x n=1 ∞ X cn sinλn x n=1 cn u (x, t) = 2 L Z L (f (x) − ω (x, 0)) sinλn xdx 0 = ω (x, t) + ∞ Z X t Sn (t) exp α2 λ2n τ    dτ + cn exp −α2 λ2n t sinλn x 0 n=1 (5) C. Bayesian belief updating The following equations operationalize the Bayesian belief updating of the parameters as data is inverted sequentially across the windowed data, yi , see (Cooray et al., 2016; Cooray et al., 2017) for more details. The priors on the n eigenfunction coefficients of parameter θsp in each window is given by, µi : posterior mean vector of θsp in the ith window i.e., (c1 , c2 , . . . , cn )i λ : eigenvalues, i.e. (λ1 , λ2 , . . . , λn ) ∆ : time interval between windows Qi : posterior covariance matrix of θsp in the ith window R : volatility covariance matrix of θsp p (θsp |yi , . . . , y1 ) p (θsp |yi , . . . , y1 ) = prior probability density of θsp in the i+1th window  = N µi e−λ∆ , Qi + R (6) Bayesian Belief Updating Using a variational Bayes formulation, we update this prior probability distribution using the data in window i + 1. D. Parameterizations of field models Neural field u (x, t) : neural field representing activity of a population of neurons at location x at time t w (y) : the strength of connections between neurons separated by a distance y f (u) : ut (x, t) firing rate function, Z ∞ = −u + w (y) f (u (x − y, t)) dy −∞ (7) Parameter field Note that the spatial variation of the neural field is due to the time independent variable w. As this term is convolved over space with the firing rate it becomes difficult to separate the spatial and the temporal dynamics. In the case of the parameter field it is possible to have a slowly diffusing parameter (diffusion rate dependent on α) that interacts as though it is constant with respect to the dynamics of the faster neural mean fields (rate dependent on k). u (x, t) : neural field representing activity of a population of neurons at location x at time t f (u) : firing rate function θ (x, t) : parameter field k : rate coefficient of neural mass α : diffusion coefficient utt (x, t) − 2kut (x, t) − k 2 u (x, t) θt = f (u (x, t) , θ (x, t)) = α2 θxx (8)
9cs.NE
Invariant Gaussian Fields on Homogeneous Spaces : Explicit Constructions and Geometric Measure of the Zero-Set Alexandre Afgoustidis∗ arXiv:1602.02560v1 [math.PR] 8 Feb 2016 August 31, 2015 Abstract This paper is concerned with the properties of Gaussian random fields defined on a riemannian homogeneous space, under the assumption that the probability distribution be invariant under the isometry group of the space. We first indicate, building on early results on Yaglom, how the available information on group-representationtheory-related special functions makes it possible to give completely explicit descriptions of these fields in many cases of interest. We then turn to the expected size of the zero-set: extending two-dimensional results from Optics and Neuroscience, we show that every invariant field comes with a natural unit of volume (defined in terms of the geometrical redundancies in the field) with respect to which the average size of the zero-set depends only on the dimension of the source and target spaces, and not on the precise symmetry exhibited by the field. Both the volume unit and the associated density of zeroes can in principle be evaluated from a single sample of the field, and our result provides a numerical signature for the fact that a given individual map be a sample from an invariant Gaussian field. 1 Introduction Interest for Gaussian random fields with symmetry properties has risen recently. While it is not surprising that these fields should have many applications (Kolmogorov insisted as early as 1944 that they should be relevant to mathematical discussions of turbulence), a short list of recent domains in which they appeared will help me describe the motivation for this paper. ● Optics and the Earth sciences. Suppose a wave is emitted at some point, but thereafter undergoes multiple diffractions within a disordered material (like a tainted glass, or the inside of the Earth). If the material is disordered enough, beyond it one will observe a superposition of waves propagating in somewhat random directions, with somewhat random amplitudes and phases. In Sismology and in Optics, there are theoretical and practical benefits in treating the output as a single realization of a complex-valued gaussian field, which inherits symmetry properties from those of the material which diffracted the waves. ∗ CEREMADE (UMR CNRS no. 7534), Université Paris-Dauphine, Place du Maréchal de Lattre de Tassigny, 75775 Paris Cedex 16, France, and Institut de Mathématiques de Jussieu Paris Rive Gauche, Université Paris Diderot, Bâtiment Sophie Germain, 75013, Paris, France. Email: [email protected] 1 See [10] for Optics, [36] for Sismology. ● Astrophysics. The Cosmic Microwave Background (CMB) radiation is understood to be an observable relic of the “Big Bang". There are fluctuations within it1 : the frequency of the radiation changes very slightly around the mean value as one looks to different parts of the sky. The fact that the variations are small is essential for cosmology of course, but their precise structure is quite as important: they are supposed to be a relic of the slight homogeneities which made it possible for the galaxies and stars to take shape. Because it is customary to assume that the universe is, and has always been, isotropic on a large scale, a much-discussed model for the CMB treats it as a single realization of an isotropic gaussian field on the sphere2 . This has of course prompted mathematical developments [21], as well as motivation for a recent monograph by A. Malyarenko [20] on random fields with symmetry properties. ● Texture modelling and synthesis. Many homogeneous-looking regions in natural images, usually called textures, are difficult to distinguish with the naked eye from realizations of an appropriate stationary Gaussian random field. Thus, stationary Gaussian fields are a simple and natural tool for image synthesis; an appreciable advantage of this is that thanks to the ergodicity properties of Gaussian fields ([2], chapter 6), the probability distribution of a stationary Gaussian random field can be roughly recovered from a single realization: measuring correlations in a single sample yields a good approximation for the covariance function of the field, and one can draw new examples of the given texture from it: this is widely used in practice. See [30, 26, 14]. Textures obviously have a meaning on homogeneous spaces as well as Euclidean space3 , and the mathematical generalization of widely-used image-processing tools to curved spaces should feature homogeneous fields4 . ● Neuroscience (more detailed discussions can be found in [3, 4]). In the primary visual cortex of mammals, neurons record several local features of the visual input, and the electrical activity of a given neuron famously depends on the presence, in its favourite region of space, of oriented stimuli (“edges"): there are neurons which activate strongly in the presence of vertical edges in the image, others which react to oblique edges, and so on. The map which, to a point of the cortical surface, assigns the "orientation preference" of the neuron situated there (the stimulus direction which maximizes the electrical activity of the neuron) has been observed to be continuous in almost all (though not all) mammals, and to have strikingly constant geometrical properties across species and individuals. Prevailing models for the early stage in the development of these cortical maps treat the arrangment in a given individual as a single realization of a Gaussian random field on the cortical surface, with the orientation map obtained after taking the argument; a key to the success of the models is the assumption, meant to reflect the initial homogeneity of the biological tissue, that when the cortical surface is identified with a Euclidean plane, the underlying 1 These were detected in 1992; see G. Smoot and J. Mather’s Nobel lectures [27, 22]. In fact, the expectation function of the field should not be a constant, because the CMB has rather large-scale fluctuations, famously attributed to a Doppler effect due to the metric expansion of space, in addition to the above-mentioned variations. So it is the centered version (with the large-scale fluctuations substracted off) that should be isotropic. Instead of being Gaussian, the field could also be a function of an underlying Gaussian field: this seems to be a prevailing hypothesis; see [21]. 3 The example images in [14] can obviously imagined on the surface of a sphere or in a hyperbolic plane. 4 This does not mean that it will be faster to work with on a computer than a version less naturally suited to the curvature of the manifold! 2 2 Gaussian field is homogeneous and isotropic. In at least two of these fields, Optics and Neuroscience, the zeroes of stationary gaussian fields have attracted detailed attention. In a heated debate on the evolution of the early visual system in mammals (see [23]), the mean number of zeroes in a region with a given area has been taken up as a criterion to decide between two classes of biological explanations for the geometry of cortical maps. Experiments show the mean value to be remarkably close to π with respect to an appropriate unit of area (re-defined for Gaussian fields in section 5 below). This strikingly coincidates with the exact mean value obtained for stationary isotropic Gaussian fields by Wolf and Geisel in related work, and independently by Berry and Dennis in optics-related work (there the zeroes are points where the light goes off, or the sound waves cancel each other : Berry and Dennis call them "lines of darkness, or threads of silence"). Along with the key role symmetry arguments play in the discussion of the visual cortex, the remarkable coincidence is one of my motivations for generalizing to arbitrary homogeneous spaces the Euclidean-and-planar results which appeared in Optics and Neuroscience. These recent developments take up an old theme: understanding the properties of the level sets of (the paths of) a random field is a classical subject in the theory of stochastic processes. This paper is a mathematical follow-up on [3] ; some of the results below have been announced (with incorrect statements !) in the appendix to that article. It has two relatively independent aims: ● Describe invariant Gaussian fields on homogeneous spaces as explicitly as possible, ● Study the mean number of zeroes, or the average size of the zero-set, of an invariant field in a given region of a homogeneous space. The first problem has been solved in the abstract by Yaglom in 1961 [35] using the observation (to be recalled in section 2.1) that the possible correlation functions of homogeneous complex-valued fields form a class which has been much studied in the representation theory of Lie groups. Section 2.2 is a summary (with independent proofs) of the consequences of his results that I will use. Since Yaglom’s time, representation theory has grown to incorporate several more concrete constructions, and in section 3 below, I show that explicit descriptions (that can be worked with on a computer) are possible on many spaces of interest, including symmetric spaces. Section 3.1 also includes simple facts which show that on a given manifold, not all transitive Lie groups can give rise to invariant random fields with continuous trajectories. Turning to the second problem, what I show below is that when expressed in a unit of volume appropriate to the field (defined in section 4 for real-valued fields and at the beginning of section 5 for others), the average size of the zero-set does not depend on the group acting, but only on the dimension of the homogeneous space on which the field is defined and that of the space in which it takes its values. When looking at a single realization of a random field, observing the average size for the zero-set expressed by Theorem 2 below can be viewed a signature that the field has a symmetry, regardless of the fine structure of the symmetry involved. 3 Acknowledgment. This paper is to become part of the author’s Ph.D. thesis; I thank Daniel Bennequin for his advice and support. 2 2.1 Invariant real-valued gaussian fields on homogeneous spaces Gaussian fields and their correlation functions Suppose X is a smooth manifold and V a finite-dimensional Euclidean space. A Gaussian field on X with values in V is a random field Φ on X such that for each n in N and every n-tuple (x1 , ...xn ) in X n , the random vector (Φ(x1 ), ...Φ(xn )) in V n is a Gaussian vector. A Gaussian field Φ is centered when the map x ↦ E [Φ(x)] is identically zero, and it is continuous, resp. smooth, when x ↦ Φ(x) is almost surely continuous, resp. smooth. In this paper, our space X will be a smooth manifold equipped with a smooth and transitive action (g, x) ↦ g ⋅ x of a Lie group G. Choose x0 in X and write K for the stabilizer of x0 in G. A Gaussian field on X with values in V is invariant when the probability distribution of Φ and that of the Gaussian field Φ○(x ↦ g ⋅ x) are the same for every g in G. The case in which V equals R is of course important. If Φ is a real-valued Gaussian field on X, its covariance function is the (deterministic) map (x, y) ↦ E [Φ(x)Φ(y)] from X × X to R. A real-valued Gaussian field is standard if it is centered and if Φ(x) has unit variance at each x ∈ X. When describing scalar-valued Gaussian fields with symmetry properties, we shall see in the next subsection that the relationship with representation theory makes it useful that the covariance function, and thus the field as well, be allowed to be complex-valued rather than real-valued. A precise word about the kind of complex-valued Gaussian fields we need is perhaps in order here. A circularly symmetric Gaussian variable is a complex-valued random variable whose real and imaginary parts are independent, identically distributed real Gaussian variables. A circularly symmetric complex Gaussian field on X is a Gaussian random field Z on X with values in the vector space C, with the additional requirement that (x, y) ↦ E [Z(x)Z(y)] be identically zero. Note that while this imposes that Z(x) be circularly symmetric for all x, this does not necessitate that Re(Z)(x) and Im(Z)(y) be uncorrelated if x is not equal to y. The correlation, or covariance, function of a circularly symmetric complex Gaussian field on X is the (deterministic) map (x, y) ↦ E [Z(x)Z(y)⋆ ] from X × X to C, where the star denotes complex conjugation. A standard complex Gaussian field on X is a circularly symmetric complex Gaussian field on X such that E [Z(x)Z(x)⋆ ] = 1 for all x. Note that the real part of the covariance function of a circularly symmetric complexvalued Gaussian field is twice the covariance function of the real-valued Gaussian field obtained by considering its real part. A circularly symmetric complex Gaussian field on X has a real-valued correlation function if and only if its real and imaginary parts are independent as processes. 4 We are now ready for the classical theorem which describes the correlation functions of standard complex Gaussian fields, those of real-valued Gaussian fields being a particular case as we saw (see however [1] for a separate description of the real case). Proposition 2.1 (see for instance [18], section 2.3). Suppose C is a deterministic map from X × X to C. Then it is the covariance function of a continuous (resp. smooth), invariant, standard complex-valued Gaussian field if and only if it has the following properties. (a) The map C is continuous (resp. smooth); (b) for each x, y in X and every g in G, C(gx, gy) = C(x, y); (c) for every x in X, C(x, x) = 1; (d) (positive-definiteness) for each n in N and every n-tuple (x1 , ...xn ) in X n , the hermitian matrix (C(xi , xj ))1≤i,j≤n is positive-definite. If Φ1 and Φ2 are continuous (resp. smooth), invariant, standard complex-valued Gaussian fields with covariance function C, then they have the same probability distribution. A consequence is that there is a left-and-right K-invariant continuous (resp. smooth) function Γ on G, taking the value one at 1G , such that C(gx, x) = Γ(g) for every g in G and every x in X. Proposition 2.1 thus says that taking covariance functions yields a natural bijection between ● probability distributions of continuous (resp. smooth), invariant, standard complexvalued Gaussian fields on X = G/K, and ● positive-definite, continuous (resp. smooth), K-bi-invariant functions on G, taking the value one at 1G . A positive-definite, continuous, complex-valued function on G which takes the value one at 1G is usually called a state of G. We are thus looking for the K-bi-invariant (and smooth, if need be,) states of G. 2.2 How invariant Gaussian fields correspond to group representations This subsection describes some results due to Yaglom [35], although the presentation differs slightly because I would like to give direct proofs. Unitary representations of G are a natural source of positive-definite functions: if U is a continuous morphism from G to the unitary group U (H) of a Hilbert space H, then for every unit vector v in H, g ↦ ⟨v, U (g)v⟩ is a state of G. In fact if m is a state of G, there famously is5 a Hilbert space Hm and a continuous morphism from G to U (Hm ), as well 5 This is the Gelfand-Naimark-Segal construction: on the vector space Cc (G) of continuous, compactly-supported functions on a locally compact second countable unimodular group G, we can consider the bilinear form ⟨f, g⟩m ∶= ∫G2 m(x−1 y)f (x)f¯(y)dxdy. It defines a scalar product on Cc (G)/ {f ∈ Cc (G) , ⟨f, f ⟩m = 0}, and we can complete this into a Hilbert space Hm ; the natural action of G on Cc (G) yields a unitary representation of G on Hm . 5 as a unit vector vm in Hm , such that6 m(g) = ⟨vm , U (g)vm ⟩. The study of K-bi-invariant states is a classical subject when (G, K) is a Gelfand pair, that is, when G is connected, K is compact and the convolution algebra of K-bi-invariant integrable functions on G is commutative7 . It is immediate from the definition that a state of G is a bounded function on G ; thus the K-bi-invariant states of G form a convex subset C of the vector space L∞ (G) of bounded functions. Viewing L∞ (G) as the dual of the space L1 (G) of integrable functions (here we assume a Haar measure is fixed on the − automatically unimodular − group G), and equipping it with the weak topology, C appears as a relatively compact, convex subset of L∞ (G) because of Alaoglu’s theorem. The extreme points of C are usually known as elementary spherical functions for the pair (G, K). Their significance to representation theory is that they correspond to irreducible unitary representations: if m is a state of G and (H, U, v) is such that m = g ↦ ⟨v, U (g)v⟩ as above, then m is an elementary spherical function for (G, K) if and only if the unitary representation U of G on H irreducible8 . The condition of K-bi-invariance translates into the existence of a K-fixed vector in H. When (G, K) is a Gelfand pair, the unitary irreducible representations of G which have a K-fixed vector have the subspace of K-fixed vector one-dimensional and not larger: a consequence is that different elementary spherical functions correspond to nonequivalent class-one9 representations of G. So the Gelfand-Naimark-Segal construction yields a bijection between elementary spherical functions for (G, K) and unitary irreducible representations of G having a K-fixed vector. To come back to the description of general K-bi-invariant states in terms of the extreme points of C, the Choquet-Bishop-de Leeuw representation theorem (a measure-flavoured generalization of the Krein-Milman theorem) exhibits a general K-bi-invariant state as a "direct integral" of elementary spherical functions, in a way that mirrors the (initially more abstract) decomposition of the corresponding representation of G into irreducibles. To be precise, let Λ be the space of extreme points of C, a topological space if one lets it inherit the weak topology from L∞ (G). Then Choquet’s theorem says every point of C is the barycentre of a probability measure concentrated on Λ, and the probability measure is actually unique in our case: for a discussion and proof see [13], Chapter II. We can summarize the above discussion with the following statement. Proposition 2.2 (the Godement-Bochner theorem). Suppose (G, K) is a Gelfand pair, and Λ is the (topological) space of elementary spherical functions for the pair (G, K), or 6 The linear functional f ↦ ∫G f m̄ extends to a bounded linear functional on Hm , and the Riesz representation theorem yields one vm in Hm which has the desired property. 7 The subject of positive-definite functions becomes tractable because the Gelfand spectrum of this commutative algebra furnishes a handle on positive-definite functions through the elementary spherical functions to be defined just below. 8 Indeed, should there be U (G)-invariant subspaces H1 , H2 such that H = H1 ⊕ H2 , orthogonal direct sum, writing v = v1 + v2 with vi in Hi , one would have m(g) = ⟨v1 , U (g)v1 ⟩ + ⟨v2 , U (g)v2 ⟩, and g ↦ vi vi ⟨√ , U (g) √ ⟩ would be a positive-definite function, thus m would not be an extreme point of C. The 2 2 reverse implication is just as easy using the Gelfand-Naimark-Segal construction. 9 A class-one representation is an irreducible representation which has nonzero K-fixed vectors. 6 equivalently the (topological) space of equivalence classes of unitary irreducible representations of G having a K-fixed vector. Then the K-bi-invariant states of G are exactly the continuous functions on G which can be written as ϕ = ∫Λ ϕλ dµϕ (λ), where µϕ is a measure on Λ. Let us make the backwards way from the theory of positive-definite functions for a Gelfand pair (G, K) to that of Gaussian random fields on G/K. It starts with a remark: suppose m1 , m2 are K-bi-invariant states of G and Φ1 , Φ2 are independent Gaussian fields whose covariance functions, when turned into functions on G as before, are m1 and m2 , respectively. Then a Gaussian field whose correlation function is m1 + m2 necessarily has the same probability distribution as Φ1 + Φ2 . A simple application of Fubini’s theorem extends this remark to provide a spectral decomposition for Gaussian fields, which mirrors the above decomposition of spherical functions: ● For every λ in Λ, there is, up to equality of the probability distributions, exactly one Gaussian field whose correlation function is ϕλ ; ● Suppose (Φλ )λ∈Λ is a collection of mutually independent Gaussian fields, and for each λ, Φλ has correlation function ϕλ . Then for each probability measure µ on Λ, the covariance function of the Gaussian field x ↝ ∫ ΦΛ (x)dµ(λ) Λ is ∫Λ ϕλ dµϕ (λ). In the next section, I will focus on special cases (most importantly, symmetric spaces); in these cases I will give explicit descriptions of Λ and, for each λ in Λ, of the spherical function ϕλ and of a Gaussian field whose correlation function is ϕλ . 3 3.1 Existence theorems and explicit constructions Semidirect products with a vector normal subgroup: easy no-go results Suppose H is a Lie group, A is a finite-dimensional vector space, and ρ ∶ H → GL(A) is a continuous morphism. The semidirect product G = H ⋉ρ A (whose underlying set if H ×A, and whose composition reads (h1 , a1 )⋅(h2 , a2 ) ∶= (h1 h2 , a1 +ρ(h1 )a2 )) is a Lie group. Since an H-bi-invariant function on G is entirely determined by its restriction to A, the convolution of H-bi-invariant functions on G is a commutative operation. So when H is compact, (G, H) is a Gelfand pair; for this case I shall make the situation fully explicit in subsection 3.3 below. When H is not compact, (G, H) is not a Gelfand pair, and that is not only because the definition as I wrote it needs the compactness: I shall start this section by showing that G-invariant continuous Gaussian fields need not exist on G/H. Examples. The Poincaré group P is the largest subgroup of the affine group of R4 under which the space of solutions to Maxwell’s (that is, the wave) equation for a scalarvalued field in a vacuum is stable. It is a famous result of Poincaré that P = SO(3, 1) ⋉ R4 , with the obvious action of SO(3, 1) on R4 . The Galilei group is the subgroup of the affine 7 group of R4 = R3 ×R gathering the transformations which, for pairs of points in R4 , preserve the notion of Euclidean distance between the (“space") projections on R3 as well as the distance between the (“time") projections on R (to be formal, the Galilei group consists of affine transformations of R4 leaving the map [(x1 , t1 ), (x2 , t2 )] ↦ (∥x1 − x2 ∥ , t1 − t2 ) from R4 × R4 to R2 invariant10 ). To state our easy no-go result, recall that the Fourier tranform of a function on A is a function on the set  of characters of A: . Recall also that an action of H on the Abelian group A yields an action ρ̂ of H on  if we set ρ̂(h)χ ∶= x ↦ χ(ρ(h)−1 x). Proposition 3.1. Let G be a semidirect product H ⋉ A as above. If there is no compact ̂ but the trivial one, then no real-valued standard Gaussian field on R4 whose orbit of H in A probability distribution is G-invariant can have continuous trajectories. Proof. Such a field would yield a positive-definite, continuous, H-bi-invariant function, say Γ̃, on G, taking the value one at 1G , but we shall see now that there can be no such function except the constant one. Write Γ for the restriction of Γ̃ to A; because Γ is positive-definite as a function on the abelian group A, Bochner’s theorem (see for instance [?]) says it is ̂ Because Γ is invariant under the the Fourier transform of a bounded measure νΓ on A. linear action on H on A and because of the elementary properties of the Fourier transform, the measure νΓ must also be invariant, and so if Ω is a compact subset of an H-orbit in ̂ νΓ (Ω) must be equal to νΓ (h ⋅ Ω) for each h in H. That is not possible when H ⋅ Ω A, is noncompact unless νΓ (Ω) is zero, because there is a sequence (hn ) in H N such that ∪n hn ⋅ Ω is a disjoint union, and because the total mass of νΓ is finite. A consequence is ̂ and since νΓ is the Fourier transform of a that the support of νΓ must be the origin in A, continuous function, it must be a multiple of the Dirac mass at zero. ̂ with R4 in a HIf H ⋉ A = SO(3, 1) ⋉ R4 is the Poincaré group, we can identify A ̂ appear equivariant way using Minkowski’s quadratic form, and then the orbits of H on A 4 as the level sets of Minkowski’s quadratic form in R . So of course the hypothesis of Proposition 3.1 is satisfied: Corollary. No standard real-valued Gaussian field on R4 whose probability distribution is invariant under the Poincaré group can have continuous trajectories. Let us now consider whether a standard real-valued Gaussian field on R4 whose probability distribution is invariant under the Galilei group can have continuous trajectories. The linear part of an element in the Galilei group reads (x, t) ↦ (A⃗ x + v⃗t, t), where A is 3 ⃗ − (A−1 v⃗)t, t) an element of SO(3) and v⃗ is a vector in R , and its inverse reads (x, t) ↦ (A−1 x ̂4 and decomposes as (⃗ ⃗⟩ + ωχ t, then χ(A−1 x ⃗ − (A−1 v⃗)t) = ; so if χ is in R x, t) ↦ ⟨k⃗χ , x ⃗⟩ + (ωχ + ⟨k⃗χ , v⃗⟩) t. This means that if h is the element (x, t) ↦ (A⃗ ⟨Ak⃗χ , x x + v⃗t, t) of the linear part of the Galilei group, h ⋅ χ ∶= h ⋅ (k⃗χ , vχ ) = (Ak⃗χ , ωχ + ⟨k⃗χ , v⃗⟩) . ̂4 are thus the cylinders Cκ ∶= {(k, ⃗ ω) ∣ ∥k∥ ⃗ = κ}, κ > 0, The orbits of the Galilei group on R and the points {(0, ω)}, ω ∈ R. The proof of Proposition 3.1 shows that the support of νΓ must be the union of the compact orbits, and this is the “time frequency" axis 10 The action of the affine group here is the diagonal action on R4 × R4 . 8 {(0, ω) ∣ ω ∈ R}; the measure νΓ then appears as the product of the Dirac mass on the line of R4 which is dual to the “time" axis, with a bounded measure on that line. So a standard real-valued Gaussian field on R4 whose probability distribution is invariant under the Galilei group cannot have continuous trajectories without losing any form of space dependence : Corollary. A standard, real-valued Gaussian field whose probability distribution is invariant under the Galilei group and which has continuous trajectories reads but (x, t) ↦ Φ(t), where Φ is a stationary and continuous Gaussian field on the real line. Remark 3.1. Proposition 3.1 and its corollaries might seem incompatible with the fact that, leaving Gelfand pairs aside, every unitary representation contributes a continuous positive-definite function. The representation-theoretic counterpart to Proposition 3.1 is thus the fact that no irreducible unitary representation of H ⋉ A except the trivial one can have a H-invariant vector. If we look for fields with smooth trajectories instead of continuous ones11 , an interesting remark by Adler and Taylor makes Proposition 3.1 trivial: Lemma 3.1. If there exists a smooth, non-constant, real-valued Gaussian field on G/K whose probability distribution is G-invariant, then K is compact. Proof. For each p in G/K and every (Xp , Yp ) in (Tp (G/K))2 , set g(Xp , Yp ) ∶= E [(dΦ(p)Xp )(dΦ(p)Yp )] . This has a meaning as soon as the samples of Φ are almost surely smooth, and it does define a riemannian metric on G/K. The invariance of the field now implies that this metric is G-invariant, and in particular that the positive-definite quadratic form it provides on Tx0 (G/K) is K-invariant. Thus K is contained in the isometry group of a finite-dimensional Euclidean space, so it is compact. 3.2 Monochromatic fields on commutative spaces Let us start again with a Gelfand pair (G, K) with connected G. From now on, I shall assume that G is a Lie group and focus on Gaussian fields which have smooth trajectories. The reason, here summarized as Theorem 3.1, is that in this case, the spherical functions are solutions to invariant partial differential equations: as I promised earlier, the coefficients for these partial differential equations must determine all the statistical properties the corresponding field, and we shall see this at work with the density of the zero-set. In addition, fully explicit constructions are possible in many cases of interest. A good reference for this subsection is J. A. Wolf [33]. Let me write DG (X) for the algebra of G-invariant differential operators on X = G/K. Then Thomas [28] and Helgason [16] proved that (G, K) is a Gelfand pair if and only if 11 In another direction, one could argue that the inverse Fourier transform of a noncompact orbit, while not a continuous spherical function, is a tempered distribution which could be used to define distributionvalued Gaussian fields on R4 ; although we shall not take up this point of view, Yaglom mentioned the possibility at the end of [35], and on the group-theoretic side, the distribution-theoretic theory of generalized Gelfand pairs has been worked out, see [11]. 9 DG (X) is a commutative algebra. Theorem (See [33], Theorems 8.3.3-8.3.4). A smooth, K-bi-invariant function φ is an elementary spherical function for (G, K) if and only if there is, for each D in DG (X), a complex number χ(D) such that Dϕ = χϕ (D)ϕ. The eigenvalue assignation D ↦ χϕ (D) defines a character of the commutative algebra DG (X). It determines the spherical function ϕ: when χ is a character of DG (X), there is a unique spherical function ϕ such that χ = χϕ . Definition 3.2. A standard Gaussian random field on X whose correlation function is a multiple of an elementary spherical function will be called monochromatic; the corresponding character of DG (X) will be called its spectral parameter. Note that with a choice of G-invariant riemannian metric on G/K comes an element of DG (X), the Laplace-Beltrami operator ∆X . Example 3.3. If X is a two-point homogeneous space, that is, if G is transitive on equidistant pairs12 of points in X, then DG (X) is the algebra of polynomials in ∆X . Example 3.4. If X is a symmetric space (see below), then DG (X) is finitely generated; thus a character of DG (X) is specified by a finite collection of real numbers. 3.3 Explicit constructions. A: Flat homogeneous spaces Suppose (G, K) is a Gelfand pair, and the commutative space X = G/K is flat. Then we know from early work by J. A. Wolf (see [34], section 2.7) that X is isometric to a product Rn × T s . I will be concerned with the simply connected case: let V be a Euclidean space, K be a closed subgroup of SO(V ), and G be the semidirect product K ⋉ V . Then as we saw (G, K) is a Gelfand pair, and we can describe the G-invariant continuous Gaussian fields on V = G/K from the monochromatic ones. The next proposition provides a description of the elementary spherical functions. Proposition 3.2. Suppose V is a Euclidean vector space, and K is a closed subgroup of SO(V ). Then the Fourier transform of a K-orbit in V is a smooth function ; once normalized to take the value one at zero, it is an elementary spherical function for the Gelfand pair (K ⋉ V, K). In fact, every elementary spherical function for (K ⋉ V, K) restricts on V to the Fourier transform of a K-orbit in V . Proof. To get a handle on the K-bi-invariant states of K ⋉ V , let me start with a bounded measure on the orbit space V /K and the measure µ̃ on V obtained by pulling µ back with the help of the Hausdorff measure of each K-orbit (normalized so that each orbit 12 This means that two pairs of points (p1 , q1 ), (p2 , q2 ) satisfy d(p1 , p2 ) = d(q1 , q2 ) if and only if there is an isometry g ∈ G such that g ⋅ p1 = q1 and g ⋅ p2 = q2 . 10 has total mass one). I first remark that the Fourier transform of µ̃ provides a positivedefinite function for (K ⋉ V, K). Indeed, Bochner’s theorem says it provides a positivedefinite function on V , and if (k1 , v1 ) and (k2 , v2 ) are elements of K ⋉ V , (k1 , v1 )(k2 , v2 )−1 is equal to (k1 k2−1 , v1 − k1 k2−1 v2 ), so a K-bi-invariant function takes the same value at (k1 , v1 )(k2 , v2 )−1 as it does at (k1−1 , 0)(k1 , v1 )(k2 , v2 )−1 (k2 , 0) = (1K , k1−1 v1 − k2−1 v2 ) ; this checks the positive-definiteness directly. Now suppose Γ̃ is a K-bi-invariant state of K ⋉ V , and write Γ for its restriction to V , a bounded K-invariant positive-definite continuous function on V . The Fourier transform of Γ, a bounded complex measure on V with total mass one because of Bochner’s theorem, is K-invariant, and yields a bounded measure on the orbit space K/V . If the support of this measure is not a singleton, we can split it as the half-sum of bounded measures with total mass one, and lifting them to V and taking Fourier transform exhibits our initial state as a sum of two K-bi-invariant functions taking the value one at 1K⋉V which, according to the previous paragraph, are positive-definite. So the extreme points among the K-bi-invariant states correspond to K-invariant measures concentrated on a single K-orbit in V , which proves the proposition. Remark 3.5. Suppose DG (V ) is finitely generated. Since the elements in DG (V ) are invariant under the translations of V , they have constant coefficients, so they become multiplication by polynomials after taking Fourier transform. Taking the Fourier transform of what Proposition 3.1 says, we see that a K-orbit in V is an affine algebraic subset of V , and that all orbits are obtained by varying the constant terms in a generating system for the ring of Fourier transforms of elements of DG (V ). Of course the simplest case is when the orbits are spheres and G is the Euclidean motion group of V . Proposition 3.2 is explicit enough to allow for computer simulation: suppose ϕ is an elementary spherical function, and let us see how to build a Gaussian field ΦΩ on V whose covariance function is ϕ. By definition, we must have E [ΦΩ (x)ΦΩ (0)] = ϕ(x), so using Fubini’s theorem we see that (almost) all samples of Φ must have their Fourier transform concentrated on the same K-orbit of V , say Ω, as Φ. Thus Φ is a random superposition of waves whose wave-vectors lie on Ω. Lemma 3.2. Assume (ζk⃗ )k∈Ω is a collection of mutually independent standard Gaussian ⃗ random variables. Normalize the Hausdorff measure on Ω so that it has total mass one. Then the Gaussian random field ⃗ ⃗ . ΦΩ ∶= x ↦ [∫ ei⃗x⋅k ζk⃗ dk] Ω is G-homogeneous, smooth, and has covariance function ϕΩ . Proof. This is straightforward from the definition, since applying Fubini’s theorem twice 11 yields ⃗ (∫ ζ ⋆ d⃗ E [ΦΩ (⃗ x)ΦΩ (0)⋆ ] = E [(∫ eik⋅⃗x ζk⃗ dk) ⃗ u)] u ⃗ Ω Ω = E [∫ =∫ e ⃗x ik⋅⃗ Ω2 ⃗x ik⋅⃗ Ω2 e ⃗ u] ζk⃗ ζu⃗⋆ dkd⃗ ⃗ u E [ζk⃗ ζu⃗⋆ ] dkd⃗ ⃗ = ∫ eik⋅⃗x dk⃗ Ω = ϕΩ (⃗ x) as announced. The smoothness and invariance follow from Proposition 2.1. Figure 1: a real-valued map, sampled from a real-valued monochromatic field on the Euclidean plane. Figure 2: Two real-valued maps, sampled from real-valued invariant fields on the Euclidean plane: because of Proposition 3.2, the elementary spherical functions form a half-line; the power spectrum (the measure on R+ defined in Proposition 2.2) of the upper map is roughly the indicatrix of a segment, the power spectrum of the lower one has the same support but decreases as 1/R2 12 3.4 Explicit constructions. B: Compact homogeneous spaces Suppose (G, K) is a Gelfand pair, and the commutative space X = G/K is positively curved. Then G is a connected compact Lie group, and the Hilbert spaces for irreducible representations of G are finite-dimensional. A consequence is that if T ∶ G → U (H) is an irreducible representation, the map g ↦ Trace(T (g)) is a continuous, complex-valued function; it is of course the global character of G. Proposition 3.3 (G. Van Dijk, see Theorem 6.5.1 in [11]). The elementary spherical functions for (G, K) are the maps x ↦ ∫ χ(x−1 k)dk K where χ runs through the set of global characters of irreducible representations of G having a K-fixed vector, and the integration is performed w.r.t the normalized Haar measure of K. Note that if χ is the global character of an irreducible representation of G which has no K-fixed vector, the above expression is zero. The reason why this provides an explicit formula for the spherical functions is that Hermann Weyl famously wrote down the global character of an irreducible representation of G. Let T be a maximal torus in G, let t and g be the complexified Lie algebras of T and G, and let W be the Weyl group of the pair (g, t), C ⊂ t⋆ be a Weyl chamber in t⋆ , Σ be the set of positive roots of (g, t) in the ordering determined by C − a subset of t⋆ as well −, ρ be the half-sum of elements of Σ, Λ be the subset of t⋆ gathering the differentials of continuous morphisms T → C, and Λ+ be Λ ∩ C . Two of the most famous results in representation theory are: ● There is a natural bijection (the highest-weight theory) between Λ+ and the equivalence classes of irreducible representation of G; ● The global character of all irreducible representations with highest weight λ restricts to expG (t) as13 ∑ ε(w)e⟨λ+ρ,wH⟩ w∈W eH ↦ . ∑ ε(w)e⟨ρ,wH⟩ w∈W This gives a completely explicit description of the covariance functions of invariant Gaussian random fields on X (provided one can find a maximal torus, the Weyl group, the roots... explicitly: the atlas software seems to do that − and much more − when G is reductive). In contrast to what happened above for flat spaces and to what will happen below for symmetric spaces, however, I am not aware that this leads to an explicit description of the Gaussian random field with a given spherical function as its covariance function. We must stick to Yaglom’s general construction here: without assuming that (G, K) is a Gelfand pair but only that it is a pair of connected compact Lie groups, let T ∶ G → U (H) be an irreducible representation, (e1 , ...er ) be an orthonormal basis for the space of K-fixed vectors, and let (er+1 , ...ed ) be an orthonormal basis for its orthocomplement. Yaglom proved the following two facts: 13 Recall that the conjugates of expG (t) is G and the character is conjugation-invariant! 13 ● The maps gK ↦ ⟨ei , T (g)e, ⟩, i, j = 1..r, are elementary spherical functions for (G, K), ● If (ζi )i=1,...d is a collection of i.i.d. standard Gaussian variables, then for every i0 in {1, ..r}, d gK ↦ ∑ ζi ⟨ei , T (g)ei0 ⟩ (1) i=1 is an invariant standard Gaussian random field on G/K, whose covariance function is gK ↦ ⟨e1 , T (g)e1 ⟩. While Yaglom’s result is rather abstract compared to the above descriptions for flat spaces, in many cases of interest explicit bases (ei ) and explicit formulae for the matrix elements ⟨ei , T (g)ej ⟩ are known (the obvious reference is [29]), making (1) startingly concrete. Figure 3: a sample from a real-valued monochromatic field on the sphere. This uses a combination of spherical harmonics with i.i.d. gaussian coefficients. 3.5 Explicit constructions. C: Symmetric spaces of noncompact type Suppose (G, K) is a Gelfand pair, and the commutative space X = G/K is negatively curved. Then G is noncompact, and without any additional hypothesis on G it is quite difficult to do geometry and analysis on X. It is easier to do so if X is a symmetric space. The isometry group G is then semisimple. In that case Harish-Chandra determined the elementary spherical functions for (G, K) in 1958; Helgason later reformulated his discovery in a way which brings it very close to Proposition 3.2. For the contents of this subsection, see chapter III in [17], and see of course [15], [16], [17] for more on the subject. Suppose G is a connected semisimple Lie group with finite center and K is a maximal compact subgroup in G. Write g and k for their Lie algebras, p for the orthocomplement of k with respect to the Killing form of g, a for a maximal abelian subspace of p. Using 14 a subscript ⋅C to denote complexifications, let C ⊂ ia⋆ ⊂ a⋆C be the Weyl chamber corresponding to a choice of positive roots for (gC , aC ), and ρ be the corresponding half-sum of positive roots. The direct sum of real root spaces for the chosen positive roots is a Lie subalgebra, say n, of g, and if A and N are the subgroups expG (a) and expG (n) of G, the map (k, a, n) ↦ kan is a diffeomorphism between K × A × N and G. When the Iwasawa decomposition of x ∈ G accordingly is k expG (H)n, let me write A(x) = H for the a-component. Now suppose λ is in a⋆ and b is in K. Define eλ,b ∶ G → R x ↦ e⟨iλ+ρ ∣ A(b−1 x̃)⟩ . Then eλ,b defines a smooth function from X = G/K to C; it is an eigenfunction of ∆X , with eigenvalue14 − (∥∣λ∥2 + ∥ρ∥2 ). These functions are useful for harmonic analysis on G/K in about the same way as plane waves are useful for classical Fourier analysis. If (λ1 , b1 ) and (λ2 , b2 ) are elements of a⋆ × K, then eλ1 ,b1 and (λ2 , b2 ) coincide if and only if there is an element w in the Weyl group of (gC , aC ) such that λ1 = wλ2 and if b1 and b2 have the same image in the quotient B = K/M , where M is the centralizer of a in K. Each of the eλ,b thus coincides with exactly one of the eλ+ ,b s, where λ+ runs through the closure Λ+ of C in ia⋆ . Theorem (Harish-Chandra). For each λ in Λ+ , ϕλ ∶= x ↦ ∫ eλ,b (x)db B is15 an elementary spherical function for (G, K). Every spherical function for (G, K) is one of the ϕλ , λ ∈ Λ+ . Thus the possible spectral parameters for monochromatic fields occupy a closed cone Λ+ in the Euclidean space ia⋆ (and the topology on the space of spherical functions described in section 2.2 coincides with the topology inherited from a⋆ ). The fact that spherical functions here again appear as a constructive interference of waves yields an explicit description for the monochromatic field with spectral parameter λ (same proof as Lemma 3.2): Lemma 3.3. Assume (ζb )b∈B is a collection of mutually independent standard Gaussian random variables. Then the Gaussian field Φλ ∶= x ↦ [∫ eλ,b ζb db] . B is G-homogeneous, smooth, and has covariance function ϕλ . 14 15 Here the norm is the one induced by the Killing form. Here the invariant measure on B is normalized so as to have total mass one. 15 Figure 4: a real-valued map on the Poincaré disk, sampled from a monochromatic field using Lemma 3.3. 4 The typical spacing in an invariant field Let us start with a homogeneous real -valued Gaussian field Φ on a riemannian homogeneous space X with isometry group G. In view of the above pictures, if the correlation function of Φ is close enough to being an elementary spherical function, one expects Φ to exhibit some form of quasiperiodicity16 . Let us now see whether we can give a meaning to the “quasiperiod". Draw a geodesic γ on X, and if Σ is a segment on γ, write NΣ for the random variable recording the number of zeroes of Φ on Σ. Because the field Φ is homogeneous and the metric on X is invariant, the probability distribution of NΣ depends only on the length, say ∣Σ(γ)∣, of Σ. The identity component of the subgroup of G fixing γ is a one-parameter subgroup of G, and reads expG (R⃗ γ ) for some γ⃗ in g ; it is isomorphic to a circle if X is of the compact type, and isomorphic to the additive group of the real line if X is of the Euclidan or noncompact type. In any case, this means we can pull back Φ∣γ to R⃗ γ and view it as a stationary, real-valued Gaussian field on the real line. In this way, the group exponential relating R⃗ γ to γ sends the Lebesgue measure of R to a constant multiple of the metric γ inherits from that of X. The zeroes of the pullback of Φ∣γ to R⃗ γ can thus be studied through the classical, one-dimensional, Kac-Rice formula: Proposition (Rice’s formula). Suppose Φ is a translation-invariant smooth Gaussian field on the real line, with smooth trajectories ; choose a real number u, and consider an interval I of length ` on the real line. Write Nu,I for the random variable recording the number of points x on I where Φ(x) = u ; then 2 √ e−u /2 λ E [Nu,I ] = ` ⋅ (2) π where λ = E [Φ′ (0)2 ] is the second spectral moment of the field. 16 In a mathematically loose sense. 16 An immediate consequence of (2) is that the expectation E [NΣ ] depends linearly on ∣Σ∣. Definition 4.1. The typical spacing of Φ is the positive number Λ(Φ) such that 1 E [NΣ ] ∶= . Λ(Φ) ∣Σ(γ)∣ For a comment on the definition, see Example 4.2 below. Proposition 4.1. Suppose X is a riemannian homogeneous space, and in the setting of Definition 5.1, assume the samples of Φ lie almost surely in the eigenspace {f ∈ C ∞ (X) ∣ ∆X f = Kf }, and write β for the variance of Φ(x) at any point x ∈ X. Then π . Λ(Φ) = √ (dim X)β∣K∣ Proof. Let me write κ for the second spectral moment of the stationary gaussian field on the real line, say u, obtained by restricting Φγ to Rγ⃗ as above: κ is the variance E [u′ (0)2 ]. Because of (2), Λ(Φ) is equal to √πκ . Now, u′ (0) is the derivative of Φ in the direction γ⃗ . Its variance can be recovered from the second derivative of the covariance function of Φ in the direction γ⃗ : let me write Γ for the covariance function of Φ, turned into a function on G thanks to a choice of base point x0 in X. Recall that Γ(a−1 b) = E [Φ(a ⋅ x0 )Φ(b ⋅ x0 )], consider the functions f1 ∶ (a, b) → Γ(a−1 b) and f2 ∶ (a, b) → E [Φ(a ⋅ x0 )Φ(b ⋅ x0 )] from G2 to C. Write the Lie derivative in the direction γ⃗ with respect to a or b as as Laγ⃗ or Lbγ⃗ . Then (Laγ⃗ Lbγ⃗ f1 ) (1G ) = −L2γ⃗ (Γ) (1G ), while (Laγ⃗ Lbγ⃗ f2 ) (1G ) = E [(Lγ⃗ Φ) (x0 )2 ]. Naturally f1 = f2 , so E [(Lγ⃗ Φ) (x0 )2 ] = −L2γ⃗ (Γ) (1G ). If ΓX is the map x ↦ Γ(x), then −L2γ⃗ (ΓX ) (x0 ). Of course, the Laplace-Beltrami operator on X has much to do with second derivatives : ● when X is flat, ∆X is the usual laplacian, we can choose Euclidean coordinates on X such that R⃗ γ is the first coordinate axis; writing Xi for the vector fields generating the translations along the coordinate axes, we then have ∆X = (dim X) ∑ i=1 L2Xi . ● In the general case, we can localize the computation and use normal coordinates γp be elearound x0 : suppose (γ1x0 , ...γpx0 ) is an orthonormal basis of Tx0 X, and let γ⃗1 , ...⃗ ments of g whose induced vector fields on X coincide at x0 with the γi s. Then (∆X Γ) (x0 ) = p ∑ (Lγ⃗i Γ) (x0 ). i=1 We now use the fact that the field is G-invariant and note that the directional derivatives of ΓX at the identity coset are all identical ; so 1 (∆X ΓX ) (x0 ). dim X In the special case where Γ is an eigenfunction of ∆X , we thus get (L2γ⃗ Γ) (x0 ) = κ = (dim X)∣K∣Γ(0) = (dim X)β∣K∣ (recall that K is nonpositive when X is compact and nonnegative otherwise), and Proposition 4.1 follows. 17 Example 4.2. Suppose X is the Euclidean plane, and we start from the monochromatic complex-valued invariant field, say Φ, with characteristic wavelength λ. Then its real part ΦR has β = 1/2 and Λ(ΦR ) = λ. This we may have expected, since the samples of Φ are superpositions of waves with wavelength λ. When the curvature is nonzero, however, Proposition 5.1 seems to say something nontrivial. Example 4.3. Suppose X is a symmetric space of noncompact type, and we start from a monochromatic invariant field, say Φ, with spectral parameter ω and β = 1/(dim X). In the notations of section 3.4, we get 2π Λ(Φ) = √ . ∣ω∣2 + ∣ρ∣2 This is not quite as unsurprising as Example 4.1 : the samples of Φ are superpositions of Helgason waves whose phase surfaces line up at invariant distance 2π ∣ω∣ . The curvatureinduced shift in the typical spacing comes from to the curvature-induced growth factor in the eigenfunctions for ∆X . Example 4.4. Suppose X is a compact homogeneous space. Then the gap between zero and the first nonzero eigenvalue17 of ∆X provides a nontrivial upper bound for the typical spacing of invariant gaussian fields on X (this upper bound is not the diameter of X). This is clear from Lemma 4.1 for fields with samples in an eigenspace of ∆X , and the next lemma will make it clear for other fields also. For general invariant fields on commutative spaces, we can recover the typical spacing as follows: Lemma 4.1. Suppose X is a commutative space, Φ is a smooth, invariant, real-valued Gaussian field on X, and write β for the variance of Φ(x) at any point x ∈ X. Write the spectral decomposition of Φ (section 2) as Φ = ∫ Φλ dP (λ); Λ then 2 ( 2 2π 2π ) =∫ ( ) dP (λ). Λ(Φ) Λ Λ(Φλ ) Proof. Let me write Γ for the covariance function of Φ, ϕλ for the spherical function with spectral parameter λ. Note that Γ = ∫Λ ϕλ dP (λ) as we saw, and taking up the notations of the proof of Lemma 4.1, recall that ( 2π ) = L2γ⃗ (Γ) . Λ(Φ) I just need to evaluate L2γ⃗ (Γ). But of course switching with the integration with respect to λ yields L2γ⃗ (Γ) (x0 ) = ∫ L2γ⃗ (ϕλ ) (x0 )dP (λ), Λ and the lemma follows. 17 Relating this to the geometry of X is a deep question ! See for instance [9], III.D. 18 Remark 4.5. The hypotheses in Lemma 5.2 are of course unnecessarily stringent given the proof, and one can presumably evaluate the typical spacing of a general field on a riemannian homogeneous space X by using spectral theory to split it into fields with samples in an eigenspace of ∆X . 5 5.1 Density of zeroes for invariant smooth fields on homogeneous spaces Statement of the result In this section, the homogeneous space X need not be commutative, but need only be riemannian. Let us start with a definition. Suppose Φ is an invariant Gaussian field on X with values in a finite-dimensional vector space V . For each u in V , the typical spacing Λ (⟨u∣Φ⟩) of the projection of Φ on the axis Ru depends on the variance√ βu of the real-valued Gaussian variable Λ (⟨u∣Φ(p)⟩) (here p is any point of X), but βu Λ (⟨u∣Φ⟩) does not depend on u. Choosing an orthonormal basis (u1 , ...udim V ) of V , we can form the quantity dim V √ βu Λ (⟨u∣Φ⟩); it does not depend on the chosen basis, I will call it the volume of an ∏ i=1 elementary cell for Φ, and write V(Φ) for it. The terminology is transparent if dim V and dim X coincide, provided Φ(p) is an isotropic Gaussian vector and βu equals 1 for each u. The notion corresponds to the notion of hypercolumn from neuroscience (see [19] for the biological definition, [31] for its geometrical counterpart). Theorem 5.1. Suppose Φ is a smooth, invariant Gaussian random field on X with values in Rdim X . Write NA for the random variable recording the number of zeroes of Φ in a Borel region A of X, and Vol(A) for its volume (measured using the G-invariant metric introduced above). Write V(Φ) for the volume of an elementary cell for Φ. Then E (NA ) V(Φ) π (dim X)/2 = (dim X)! ( ) . Vol(A) 2 Remark 5.2. My reason for stating Theorem 5.1 on its own, even though it is a special case of Theorem 3 below, is that the two-dimensional result which motivated this study is one in which it is natural to have dim X = 2 and V = C, and that Theorem 5.1 is a neatly stated generalization to higher dimensions. ⋆ Theorem 5.1 can be extended to a result on the volume of the zero-set of Gaussian fields with values in a Euclidean space of any dimension, as follows. If Φ is a smooth invariant Gaussian field on a symmetric space X with values in a finite-dimensional space V , then the zero-set of Φ is generically a union of (dim X −dim V )-dimensional submanifolds (and is generically empty if dim V > dim X. Every submanifold of X inherits a metric, and hence a volume form, from that of X, and this almost surely gives a meaning to the volume of the intersection of Φ−1 (0) with a compact subset of X. When A is a Borel region of X and u is an element of V , we wan thus define a real-valued random variable MΦ,A (u) by 19 recording the volume of A ∩ Φ−1 (u) for all samples of Φ for which u is a regular value, and recording, say, zero for all samples of Φ for which u is a singular value. Theorem 5.3. Suppose Φ is a reduced invariant Gaussian random field on a homogeneous space X with values in a Euclidean space V . Write MΦ,A for the random variable recording the geometric measure of Φ−1 (0) in a Borel region A of X, and Vol(A) for the volume of A. Write V(Φ) for the volume of an elementary cell for Φ. Then E (MΦ,A ) ⋅ V(Φ) (dim X)! π (dim V )/2 = ⋅( ) Vol(A) (dim X − dim V )! 2 Theorem 2 obviously implies Theorem 1 if we take as a convention that MΦ,A (u) is N (A, u) when dim X and dim V coincide. Remark 5.4. Thus, in the unit provided by the volume of an elementary cell, the density of the zero-set in an invariant field depends only on the dimension of the source and target spaces, and not on the group acting. Of course the group structure is quite relevant for determining the appropriate unit, as we saw. Remark 5.5. I should remark here that when dim X and dim V do not coincide, the volume unit V(Φ) is not the volume of anything dim X-dimensional in any obvious way − but E (MΦ,A ) is not, either. It is Theorem 5.2 that makes it natural to interpret V(Φ) as a volume unit. 5.2 Proof of Theorem 5.2 I will use Azais and Wschebor’s Kac-Rice formula for random fields (Theorem 6.8 in [5]); the proof of Theorem 5.2 will be a rather direct adaptation of the one which appears for complex-valued fields on the Euclidean plane and space in [6], [7]. Let me recall their formula, adding a trivial adaptation to our situation where the base space is a riemannian manifold rather than a Euclidean space. Lemma 5.1. Suppose (M, g) is a riemannian manifold, and Φ ∶ M ↝ Rdim M is a smooth Gaussian random field. Assume that the variance of the Gaussian vector Φ(p) at each point p in M is nonzero. For each u in Rdim M and every Borel subset A in M , write N (A, u) for the random variable recording the number of points in Φ−1 (u). Then as soon as P {∃p ∈ M , Φ(p) = u and det [dΦ(p)] = 0} = 0, E [N (A, u)] = ∫ E {∣ det [dΦ(p)dΦ(p)† ] ∣1/2 ∣∣Φ(p) = u} pΦ(p) (u)dV olg (p) (3) A Proof. After splitting A into a suitable number of Borel subsets, I can obviously work in a single chart and assume that A is contained in an open subset U of M for which there is a diffeomorphism ψ ∶ M ⊃ U → ψ(U ) ⊂ Rdim M . I turn Φ∣U into a Gaussian random field Ψ on Rdim M by setting Ψ ○ ψ = Φ. Then I can apply Theorem 6.2 in [5] to count the zeroes of Ψ in ψ(A); since there are as many zeroes of Ψ in ψ(A) as there are zeroes of Φ in A, the theorem yields E [N (A, u)] = ∫ ψ(A) E {∣ det [dΨ(x)dΨ(x)† ] ∣1/2 ∣∣Ψ(x) = u} pΨ(x) (u)dx, 20 where the volume element is Lebesgue measure. Now, let us start from the right-hand-side of (3) and change variables using ψ; we get † 18 ∫ E {∣ det [dΦ(p)dΦ(p) ] ∣ ∣Φ(p) = u} pΦ(p) (u)dV olg (p) = A ∫ E {∣ det [dΦ(ψ −1 (x))dΦ(ψ −1 (x))† ] ∣1/2 ∣Φ(ψ −1 (x)) = u} pΦ(ψ−1 (x)) (u) ∣det [dψ −1 (x)]∣ dx = 19 ∫ E {∣ det [dψ −1 (x)] det [dΦ(ψ −1 x)] det [dΦ(ψ −1 x)† ] ∣ det [dψ −1 (x)† ] ∣1/2 ∣Ψ(x) = u} pΨ(x) (u)dx = 20 ψ(A) ψ(A) ∫ ψ(A) E {∣ det [dΨ(x)dΨ(x)† ] ∣1/2 ∣Ψ(x) = u} pΨ(x) (u)dx = N (A, u) as announced. Let us return to the case where Φ is an invariant Gaussian field on a homogeneous space. Choose an orthonormal basis (u1 , ...udim V ) of V , write βi for the standard deviation of the Gaussian variable ⟨ui , Φ(p)⟩ at each p (which does not depend on p, and V for the quantity β1 ...βdim V , which is the volume of the characteristic ellipsoid for the Gaussian vector Φ(p) at each p and depends neither on p nor on the choice of basis in V . To prove Theorem 2 we need to look for for N (A, 0), and since the field Φ is Gaussian, we know that pΦ(p) (0) = V(2π)−(dim V )/2 for each p. In addition, because of the invariance we know that p ↦ E [Φ(p)2 ] is a constant function on X, so for any vector field γ⃗ on X, E [(Lγ⃗ Φ)(p)Φ(p)] = 0. A first consequence is that P {∃p ∈ M , Φ(p) = 0 and det [dΦ(p)dΦ(p)† ] = 0} is indeed zero, and that we can use Lemma 5.1. Another consequence is that if we choose a basis in Tp X and view dΦ(p) as a matrix, the entries will be Gaussian random variables which are independent from every component of Φ(p). This means we can remove the conditioning in (3). Thus, E [N (A, 0)] = 1 (2πV 2 )(dim X)/2 † ∫ E {∣ det [dΦ(p)dΦ(p) ] ∣} dV olg (p). (4) A Now, dΦ(p) is a random endomorphism from Tp X to V . Recall that if γ is a tangent vector to X at p, the probability distribution of (Lγ Φ)(p), a Gaussian random vector in V , does not depend on p, and does not depend on γ. Thus there is a basis (v1 , ...vdim V ) of V such that for each γ in Tp X, ⟨(Lγ Φ)(p), vi ⟩ is independent from ⟨(Lγ Φ)(p), vj ⟩ if i ≠ j (the vi s generate the principal axes for (Lγ Φ)(p)). If we choose any basis of Tp X and write down the corresponding matrix for dΦ(p) (it has dim X rows and dim V columns), then the columns will be independent and will be isotropic Gaussian vectors in Rdim X . To go furher, we need the following simple remark. Lemma 5.2. Suppose M is a matrix with n rows and k columns, n ≥ k, and write (m1 , ...mk ) ∈ (Rn )k for its columns. Then the determinant of M M † is the square of the k volume of the parallelotope { ∑ ti mi ∣ ti ∈ [0, 1]}. i=1 21 Proof. Choose an orthonormal basis (mk+1 , ...mn ) of Span(m1 , ...mk )⊥ . Then the signed k volume of the k-dimensional parallelotope { ∑ ti mi ∣ ti ∈ [0, 1]} is the same as that of the i=1 n n-dimensional parallelotope { ∑ ti mi ∣ ti ∈ [0, 1]}. i=1 Write M̃ for the n × n matrix whose columns are the coordinates of the mi in the canonical basis of Rn . Then M̃ M̃ † is block-diagonal, one block is M M † and the other block is the identity because (mk+1 , ...mn ) is an orthonormal family. Thus the determinant of M M † is the square of that of M̃ , and det(M̃ ) is the volume n of the parallelotope { ∑ αi mi ∣ αi ∈ [0, 1]}. i=1 Coming back to the proof of Theorem 2, we are left with evaluating the mean Hausdorff volume of the random parallelotope generated by dim V independent isotropic Gaussian vectors in Rdim X . Lemma 5.3. Suppose u1 , ...uk are independent isotropic Gaussian vectors with values in 2 2 Rn , so that the probability distribution of ui is x ↦ √1 e−∥x∥ /2αi . Write V for the charαi 2π acteristic volume α1 ...αk , and write V for the random variable recording the k-dimensional k volume of the parallelotope { ∑ ti ui ∣ ti ∈ [0, 1]}. Then i=1 E[V] = n! V. (n − k)! Proof. Let me start with k (deterministic) vectors in Rn , say u01 , ...u0k , and choose a basis u0k+1 , ...u0n for Span(u01 , ...u0n )⊥ Since det(u01 , ....uk 0) = det(u01 , ....un 0) is the (signed) volume of the parallelotope generated by the u0i s, we can use the “base times height" formula: writing PV for the orthogonal projection from Rn onto a subspace V , Vol(u01 , ....u0n ) = ∥PSpan(u0 ,...u0n )⊥ (u01 )∥ Vol (u02 , ...u0n ) . 2 Of course then k Vol(u01 , ....u0n ) = ∏ ∥PSpan(u0 0 ⊥ i+1 ,...un ) i=1 (u0i )∥ . Let me now return to the situation with random vectors. Because u1 , ...uk are independent, the above formula becomes k E [Vol(u1 , ....uk )] = ∏ E [N (ui , V i )] i=1 where N (ui , V i ) is the random variable recording the norm of the projection of ui on any (i)-dimensinal subspace of Rn . The projection is a Gaussian vector, and so its norm has a chi-squared distribution with i degrees of freedom. Given the probability distribution of ui , the expectation for the norm is then iαi , and this does prove Lemma 5.3. To complete the proof of Theorem 5.2, choose an orthonormal basis (γ1 , ...γn ) in Tp X. Apply Lemma 5.3 to the family ((Lγi ⟨vi , Φ⟩) (p))i=1..n . Then (4) becomes 22 E [N (A, 0)] = 1 (2π)(dim V )/2 V Vol(A) dim V (dim X)! 2 1/2 ∏ E [(Lγ1 (⟨vi , Φ⟩)(x0 )) ] . (dim X − dim V )! i=1 To bring the typical spacing back into the picture, recall that the definition and the 1/2 Kac-Rice formula (2) say that E [(Lγ1 (⟨vi , Φ⟩)(x0 ))2 ] is none other than π Λ(⟨vi ,Φ⟩) . Thus d E [N (A, 0)] V ∏ Λ(⟨vi , Φ⟩) i=1 Vol(A) = π dim V (2π) (dim V )/2 (dim X)! . (dim X − dim V )! d and since V ∏ Λ(⟨vi , Φ⟩) is the volume of an elementary cell for Φ, Theorem 2 is i=1 established. References [1] P. Abrahamsen, A review of Gaussian random fields and correlation functions. Norsk Regnesentral, 1995. [2] R. J. Adler & J. E. Taylor, Random fields and geometry Berlin: Springer; 2009. [3] A. Afgoustidis, Orientation Maps in V1 and non Euclidean Geometry, The Journal of Mathematical Neuroscience 5:12 (2015) [4] A. Afgoustidis, Monochromaticity of Orientation Maps in V1 Implies Minimum Variance for Hypercolumn Size, The Journal of Mathematical Neuroscience 5:10 (2015) [5] J. M. Azais & M. Wschebor, Level Sets and Extrema of Random Processes and Fields, Wiley, 2009. [6] J. M. Azais, J.R. Leon & M. Wschebor, Rice formulae and Gaussian waves. Bernoulli 17(1) (2011), 170-193. [7] J. M. Azais, J.R. Leon & M. Wschebor, Rice formulae and Gaussian waves II. Publicationes Matematicas del Uruguay 12 (2011), 15-38. [8] P. Baldi, D. Marinucci & V. S. Varadarajan, On the characterization of isotropic Gaussian fields on homogeneous spaces of compact groups, Electron. Comm. Probab. 12 (2007), 291-302. [9] M. Berger, P. Gauduchon & P. Mazet, Le spectre d’une variété riemanienne, Springer Lecture Notes in Mathematics, Vol. 194 (1971) [10] M. V. Berry & M. R. Dennis, Phase singularities in isotropic random waves, Proc. Roy. Soc. London A 456 (2001), 2059-2079. [11] G. Van Dijk, Introduction to Harmonic Analysis and Generalized Gelfand Pairs, de Gruyter Studies in Mathematics, vol. 39 (2009) 23 [12] S. Cohen & M. A. Lifshits, Stationary Gaussian Random Fields on Hyperbolic Spaces and on Euclidean Spheres, ESAIM: Probability and Statistics / Volume 16 / 2012, pp 165 – 221 [13] J. Faraut, Finite and infinite dimensional spherical analysis. Summer School: Large N limits, l’étang de Hasselfurth (2008) [14] B. Galerne, Y. Gousseau & J. M. Morel , Random Phase Textures: Theory and Synthesis, IEEE Transactions in Image Processing 20(1) (2011), 257-267. [15] S. Helgason, Differential geometry, Lie groups, and symmetric spaces. New York: Academic press; 1979. [16] S. Helgason, Groups & Geometric Analysis: Radon Transforms, Invariant Differential Operators and Spherical Functions New York: Academic Press; 1984 [17] S. Helgason, Geometric analysis on symmetric spaces. American Mathematical Society; 2008. [18] T. Hida & T. Hitsuda, Gaussian Processes, AMS translations of mathematical monographs, 1990. [19] D. Hubel, Eye, brain, and vision. New York : Scientific American Library, 1995. [20] A. Malyarenko, Invariant Random Fields on Spaces with a Group Action, Probability and Its Applications, Springer (2013) [21] D. Marinucci & G. Peccati, Random Fields on the Sphere: Representations, Limit Theorems and Cosmological Applications, Cambridge University Press (2011) [22] J. Mather, From the Big Bang to the Nobel Prize and Beyond, Nobel Lecture, December 2006. [23] K. D. Miller, π = Visual Cortex, Science 330 (2010): 1059-60. [24] L. Nicolaescu, Critical sets of random smooth functions on compact manifolds. arXiv preprint (2010): arXiv:1008.5085 [25] J. F. Nye & M. V. Berry, Dislocations in wave trains, Proc. R. Soc. Series A 336 (1974), 165-90 [26] G. S. Xia, S. Ferradans, G. Peyré & J. F. Aujol, Synthesizing and mixing stationary Gaussian texture models. SIAM Journal on Imaging Sciences, 7(1) (2014) 476-508. [27] G. Smoot, Cosmic Microwave Background Radiation Anisotropies: their Discovery and Utilization, Nobel Lecture, December 2006. [28] E. F. G. Thomas, An infinitesimal characterization of Gel’fand pairs, Contemp. Math. 26 (1984), 379-385. [29] N. Ja. Vilenkin & A. U. Klimyk, Representation of Lie Groups and Special Functions (3 volumes), Mathematics and Its Applications (Soviet Series), 1991 [30] L. Y. Wei, S. Lefebvre, V. Kwatra & G. Turk, State of the Art in Example-based Texture Synthesis, Eurographics, 2009 24 [31] F. Wolf and T. Geisel, Spontaneous pinwheel annihilation during visual development, Nature 395 (1998), 73-78. [32] F. Wolf and T. Geisel, Universality in visual cortical pattern formation. . Journal of Physiology-Paris 97(2) (2003) 253-264. [33] J. A. Wolf, Harmonic Analysis on Commutative Spaces, Mathematical Surveys and Monographs 142, AMS, 2007. [34] J. A. Wolf, Spaces of Constant Curvature (sixth edition); AMS Chelsea publishing, [35] A. M. Yaglom, Second-order homogeneous random fields. Proceedings of the Fourth Berkeley Symposium on Mathematical Statistics and Probability, Volume 2: Contributions to Probability Theory. The Regents of the University of California, 1961. [36] A. Zerva, Spatial variation of seismic ground motions, Advances in Engineering series, CRC Press (2009) 25
4math.GR
arXiv:1612.04330v1 [math.ST] 13 Dec 2016 Phase retrieval with random Gaussian sensing vectors by alternating projections Irène Waldspurger ∗ Abstract We consider a phase retrieval problem, where we want to reconstruct a n-dimensional vector from its phaseless scalar products with m sensing vectors, independently sampled from complex normal distributions. We show that, with a suitable initalization procedure, the classical algorithm of alternating projections succeeds with high probability when m ≥ Cn, for some C > 0. We conjecture that this result is still true when no special initialization procedure is used, and present numerical experiments that support this conjecture. 1 Introduction A phase retrieval problem consists in recovering an unknown vector x0 ∈ Cn from m phaseless linear measurements, of the form bk = | hak , x0 i |, k = 1, . . . , m. Such problems naturally appear in various applications, notably in optical imaging [Schechtman et al., 2015]. A lot of efforts have thus been made to design efficient algorithms that could numerically solve these problems. The oldest reconstruction algorithms [Gerchberg and Saxton, 1972, Fienup, 1982] were iterative: they started from a random initial guess of x0 , and tried to iteratively refine it by various heuristics. These methods sometimes succeed, but can also fail to converge towards the correct solution: they may get stuck in stagnation points, whose existence is due to the non-convexity of the problem. When they convergence and when they do not is not clearly understood. To overcome convergence problems, convexification methods have been introduced [Chai et al., 2011, Candès et al., 2013]. Their principle is to lift the non-convex problem to a matricial space, where it can be approximated by a convex problem. These methods provably reconstruct the unknown vector x0 with high probability if the sensing vectors ak are “random enough” [Candès and Li, 2014, Candès et al., 2015, Gross et al., 2015]. Numerical experiments show that ∗ MIT Institute for Data, Systems and Society; e-mail address: [email protected]. 1 they also perform well on more structured, non-random phase retrieval problems [Sun and Smith, 2012, Waldspurger et al., 2015]. Unfortunately, this good precision comes at a high computational cost: optimizing an n × n matrix is much slower than directly reconstructing a ndimensional vector. More recently, a new family of algorithms has thus been developed, which enjoy similar theoretical guarantees as convexified methods, but have a much smaller computational complexity. The algorithms of this family rely on the following two-step scheme: (1) an initialization step, that returns a point close to the solution; (2) a gradient descent (with possible additional refinements) over a wellchosen non-convex cost function. The intuitive reason why this scheme works is that the cost function, although globally non-convex, enjoys some good geometrical property in a neighborhood of the solution (like convexity or a weak form of it [White et al., 2015]). When the initial point belongs to this neighborhood, the gradient descent then converges to the correct solution. A preliminary form of this scheme appeared in [Netrapalli et al., 2013], with an alternating minimization in step (2) instead of a gradient descent. [Candès et al., 2015] then proved, for a specific cost function, that this two-step scheme was able to exactly reconstruct the unknown x0 with high probability, in the regime m = O(n log n), if the sensing vectors were independent and Gaussian. In [Chen and Candès, 2015, Kolte and Özgür, 2016], the same result was shown in the regime m = O(n) for a slightly different cost function, with additional truncation steps. In [Zhang and Liang, 2016, Wang et al., 2016], it was extended to a different, non-smooth, cost function. These new methods enjoy much stronger theoretical guarantees than “traditional” algorithms. However, it is not clear whether they really perform better in applications, or whether they actually behave similarly, and are simply easier to theoretically study. Traditional algorithms are well-known, simple and very easy to implement; understanding how they compare to more modern methods is of much value for applications. In this article, we take a first step towards this goal, by considering the very classical alternating projections algorithm, introduced by [Gerchberg and Saxton, 1972], arguably the most simple and widely used method for phase retrieval. We show that, in the setting where sensing vectors are independent and Gaussian, it performs as well as gradient descent over a suitable cost function: it converges linearly to the true solution with high probability, provided that it is correctly initialized. Theorem (See Corollary 3.7). There exist absolute constants C1 , C2 , M > 0, δ ∈]0; 1[ such that, if m ≥ M n and the sensing vectors are independently chosen according to complex normal distributions, the sequence of iterates (zt )t∈N produced by the alternating projections method satisfies ∀t ∈ N∗ , inf ||eiφ x0 − zt || ≤ δ t ||x0 ||, φ∈R 2 with probability at least 1 − C1 exp(−C2 m), provided that alternating projections are correctly initialized, for example with the method described in [Chen and Candès, 2015]. Several authors have already tried to establish properties of this kind, but, compared to ours, their results were significantly suboptimal in various respects. Using transversality arguments, [Noll and Rondepierre, 2016, Chen et al., 2016] have shown the local convergence of alternating projections for relatively general families of sensing vectors. Unfortunately, transversality arguments give no control on the convergence radius of the algorithm, which can be extremely small. Lower bounding the radius requires using the statistical properties of the sensing vectors. This was first attempted in [Netrapalli et al., 2013]. The result obtained by these authors was very similar to ours, but required resampling the sensing vectors at each step of the algorithm, an operation that is almost never done in practice. For a non resampled version, a preliminary result was given in [Soltanolkotabi, 2014], but this result did not capture the correct scaling of the convergence radius as a function of m and n. As a consequence, it only established global convergence to the correct solution for a suboptimal number of measurements (m = O(n log2 n)), and with a complex initialization procedure. To have theory and practice exactly coincide, the role of the initialization procedure should also be examined: in applications, alternating projections are often used with a random initialization, and not with a carefully chosen one. Our numerical experiments indicate that removing the careful initialization does not significantly alter the convergence of the algorithm (still in the setting of Gaussian independent sensing vectors). This fact is related to the observations of [Sun et al., 2016], who proved that, at least in the regime m ≥ O(n log3 n) and for a specific cost function, the initialization part of the two-step scheme is not necessary in order for the algorithm to converge. In the context of alternating projections, we were however not able to prove a similar result1 , and leave it as a conjecture. Conjecture (See Conjecture 4.1). Let any ǫ > 0 be fixed. When m ≥ Cn, for C > 0 large enough, alternating projections, starting from a random initialization (chosen according to a rotationally invariant distribution), converge to the true solution with probability at least 1 − ǫ. The article is organized as follows. Section 2 precisely defines phase retrieval problems and the alternating projections algorithm. Section 3 states and proves the main result: the global convergence of alternating projections, with proper initialization, for m = O(n) independent Gaussian measurements. Section 4 contains numerical experiments, and presents our conjecture about the nonnecessity of the initialization procedure. 1 The proof technique used by [Sun et al., 2016] collapses when gradient descent is replaced with alternating projections, as described in an extended version of this article [Waldspurger, 2016]. 3 This article only considers the most simple setting, where sensing vectors are independent and Gaussian, and measurements are not noisy. We made this choice in order to keep the technical content simple, but we hope that our results extend to more realistic settings, and future work should examine this issue. 1.1 Notations For any z ∈ C, |z| is the modulus of z. We extend this notation to vectors: if z ∈ Ck for some k ∈ N∗ , then |z| is the vector of (R+ )k such that |z|i = |zi |, ∀i = 1, . . . , k. For any z ∈ C, we set Ephase (z) to be the following subset of C: n o z Ephase (z) = |z| if z ∈ C − {0}; iφ = {e , φ ∈ R} if z = 0. We extend this definition to vectors z ∈ Ck : Ephase (z) = k Y Ephase (zi ). i=1 For any z ∈ C, we define phase(z) by z phase(z) = |z| =1 if z ∈ C − {0}; if z = 0, and extend this definition to vectors z ∈ Ck , as for the modulus. We denote by ⊙ the pointwise product of vectors: for all a, b ∈ Ck , (a ⊙ b) is the vector of Ck such that (a ⊙ b)i = ai bi , ∀i = 1, . . . , k. We define the operator norm of any matrix A ∈ Cn1 ×n2 by |||A||| = sup v∈Cn2 ,||v||=1 ||Av||. We denote by A† its Moore-Penrose pseudo-inverse. We note that AA† is the orthogonal projection onto Range(A). 2 2.1 Problem setup Phase retrieval problem Les n, m be positive integers. The goal of a phase retrieval problem is to reconstruct an unknown vector x0 ∈ Cn from m measurements with a specific form. 4 We assume a1 , . . . , am ∈ Cn are given; they are called the sensing vectors. We define a matrix A ∈ Cm×n by  ∗ a1  ..  A =  . . a∗m This matrix is called the measurement matrix. The associated phase retrieval problem is: def reconstruct x0 from b = |Ax0 |. (1) As the modulus is invariant to multiplication by unitary complex numbers, we can never hope to reconstruct x0 better than up to multiplication by a global phase. So, instead of exactly reconstructing x0 , we want to reconstruct x1 such that x1 = eiφ x0 , for some φ ∈ R. In all this article, we assume the sensing vectors to be independent realizations of centered Gaussian variables with identity covariance:     1 1 (ai )j ∼ N 0, + N 0, i, ∀1 ≤ i ≤ m, 1 ≤ j ≤ n. (2) 2 2 The measurement matrix is in particular independent from x0 . [Balan et al., 2006] and [Conca et al., 2015] have proved that, for generic measurement matrices A, Problem (1) always has a unique solution, up to a global phase, provided that m ≥ 4n − 4. In particular, with our measurement model (2), the reconstruction is guaranteed to be unique, with probability 1, when m ≥ 4n − 4. 2.2 Alternating projections The alternating projections method has been introduced for phase retrieval problems by [Gerchberg and Saxton, 1972]. It focuses on the reconstruction of Ax0 ; if A is injective, this then allows to recover x0 . To reconstruct Ax0 , it is enough to find z ∈ Cm in the intersection of the following two sets. (1) z ∈ {z ′ ∈ Cm , |z ′ | = b}; (2) z ∈ Range(A). Indeed, when the solution to Problem (1) is unique, Ax0 is the only element of Cm that simultaneously satisfies these two conditions (up to a global phase). A natural heuristic to find such a z is to pick any initial guess z0 , then to alternatively project it on the two constraint sets. In this context, we call projection on a closed set E ⊂ Cm a function P : Cm → E such that, for any x ∈ Cm , ||x − P (x)|| = inf ||x − e||. e∈E 5 The two sets defining constraints (1) and (2) admit projections with simple analytical expressions, which leads to the following formulas: yk′ = b ⊙ phase(yk ); † yk+1 = (AA )yk′ . (Projection onto set (1)) (3a) (Projection onto set (2)) (3b) If, for each k, we define zk as the vector such that yk = Azk 2 , an equivalent form of these equations is: zk+1 = A† (b ⊙ phase(Azk )). The hope is that the sequence (yk )k∈N converges towards Ax0 . Unfortunately, it can get stuck in stagnation points. The following proposition (proven in Appendix A) characterizes these stagnation points. Proposition 2.1. For any y0 , the sequence (yk )k∈N is bounded. Any accumulation point y∞ of (yk )k∈N satisfies the following property: (AA† )(b ⊙ u) = y∞ . ∃u ∈ Ephase (y∞ ), In particular, if y∞ has no zero entry, (AA† )(b ⊙ phase(y∞ )) = y∞ . Despite the relative simplicity of this characteristic property, it is extremely difficult to exactly compute the stagnation points, determine their attraction basin or avoid them when the algorithm happens to run into them. 3 Alternating projections with good initialization In this section, we prove our main result: for m = O(n) Gaussian independent sensing vectors, the method of alternating projections converges to the correct solution with high probability, if it is carefully initialized. 3.1 Local convergence of alternating projections We begin with a key result, that we will need to establish our statement. This result is a local contraction property of the alternating projections operator x → A† (b ⊙ phase(Ax)). Theorem 3.1. There exist ǫ, C1 , C2 , M > 0, and δ ∈]0; 1[ such that, if m ≥ M n, then, with probability at least 1 − C1 exp(−C2 m), 2 which exists and is unique, because y belongs to Range(A) and A is injective with k probability 1 6 the following property holds: for any x ∈ Cn such that inf ||eiφ x0 − x|| ≤ ǫ||x0 ||, φ∈R we have inf ||eiφ x0 − A† (b ⊙ phase(Ax))|| ≤ δ inf ||eiφ x0 − x||. φ∈R (4) φ∈R Proof. For any x ∈ Cn , we can write Ax as Ax = λx (Ax0 ) + µx v x , (5) where λx ∈ C, µx ∈ R+ , and v x ∈ Range(A) is a unitary vector orthogonal to Ax0 . As we will see, the norm of |||A† ||| can be upper bounded by a number arbitrarily close to 1, so to prove Inequality (4), it is enough to focus on the following quantity: inf ||eiφ Ax0 − b ⊙ phase(Ax)|| φ∈R = inf ||eiφ |Ax0 | ⊙ phase(Ax0 ) − |Ax0 | ⊙ phase(Ax)||. φ∈R As Ax is close to Ax0 (up to a global phase), we can use a kind of mean value inequality, formalized by the following lemma (proven in Paragraph B.1). In the lemma, the term Im (z/z0 ) is the derivative of the phase function (up to phase shift); the term 1|z|≥|z0 |/6 can be thought of as a second order term. Lemma 3.2. For any z0 , z ∈ C, | phase(z0 + z) − phase(z0 )| ≤ 2.1|z|≥|z0|/6 + 6 Im 5  z z0  . From this lemma, for any i = 1, . . . , m, | phase(λx )(Ax0 )i − (b ⊙ phase(Ax))i | = |phase(λx )(Ax0 )i − |Ax0 |i phase(λx (Ax0 )i + µx (v x )i )|   µx x (v )i = |Ax0 |i phase(Ax0 )i − phase (Ax0 )i + λx ! µx x v 6 i λx ≤ 2.|Ax0 |i 1|µx /λx ||vix |≥|Ax0 |i /6 + |Ax0 |i Im 5 (Ax0 )i ! µx x 6 λx vi . = 2.|Ax0 |i 1|µx /λx ||vix |≥|Ax0 |i /6 + Im 5 phase((Ax0 )i ) 7 As a consequence, || phase(λx )(Ax0 ) − b ⊙ phase(Ax)|| ≤ 2.|Ax0 | ⊙ 1|µx /λx ||vx |≥|Ax0 |/6 + 6 Im 5  µx x v λx   ⊙ phase(Ax0 ) ≤ 2 |Ax0 | ⊙ 16|µx /λx ||vx |≥|Ax0 |    6 µx x + . v ⊙ phase(Ax0 ) Im 5 λx (6) Two technical lemmas allow us to upper bound the terms of this sum. The first one is proved in Paragraph B.2, the second one in Paragraph B.3. Lemma 3.3. For any η > 0, there exists C1 , C2 , M, γ > 0 such that the inequality || |Ax0 | ⊙ 1|v|≥|Ax0 | || ≤ η||v|| holds for any v ∈ Range(A) such that ||v|| < γ||Ax0 ||, with probability at least 1 − C1 exp(−C2 m), when m ≥ M n. Lemma 3.4. For M, C1 > 0 large enough, and C2 > 0 small enough, when m ≥ M n, the property ||Im (v ⊙ phase(Ax0 ))|| ≤ 4 ||v|| 5 holds for any v ∈ Range(A) ∩ {Ax0 }⊥ , with probability at least 1 − C1 exp(−C2 m). We also recall a classical result, that allows us to control the norms of A and A† . Proposition 3.5 ([Davidson and Szarek, 2001], Thm II.13). If A is chosen according to Equation (2), then, for any t, with probability at least  1 − 2 exp −mt2 , we have, for any x ∈ Cn , r   √ n − t ||x|| ≤ ||Ax||; m 1− m r   √ n ||Ax|| ≤ m 1 + + t ||x||. m 8 √ This lemma says that, if m ≥ M n for M large enough, then ||Ax||/( m||x||) √ is arbitrarily√close to 1, uniformly over x ∈ Cn − {0}. In particular, |||A|||/ m and |||A† |||. m can be upper bounded by constants arbitrarily close to 1, with probability 1 − 2 exp(−C2 m). iφ Let us set ǫx = inf φ∈R ||e ||xx00 ||−x|| ≤ ǫ. We have ǫx |||A||| ||x0 || ≥ inf ||eiφ Ax0 − Ax|| φ∈R p = (1 − |λx |)2 ||Ax0 ||2 + |µx |2 . Bounding |||A||| as in the last remark, we deduce from this inequality that, if ǫ is small enough, √ |µx | ≤ 1.01 mǫx ||x0 ||. (7) |λx | Let η > 0 be such that 24 < 0.98. 25 We define γ > 0 as in Lemma 3.3. Using Lemmas 3.3 and 3.4, we can upper bound Equation (6) by 12η + || phase(λx )(Ax0 ) − b ⊙ phase(Ax)||   24 µx ≤ 12η + 25 λx √ ≤ 0.98 × 1.01 mǫx ||x0 || √ ≤ 0.99 mǫx ||x0 ||. This holds for all x such that inf φ∈R ||eiφ x0 − x|| ≤ ǫ||x0 ||, with probability at least 1 − C1′ exp(−C2′ m). (From Equation (7) and Proposition 3.5, the condition ||v|| < γ||Ax0 || in Lemma 3.3 is satisfied if ǫ > 0 is small enough.) This implies inf ||eiφ x0 − A† (b ⊙ phase(Ax))|| φ∈R ≤ || phase(λx )x0 − A† (b ⊙ phase(Ax))|| ≤ |||A† ||| || phase(λx )(Ax0 ) − b ⊙ phase(Ax)|| √ ≤ 0.99|||A† ||| mǫx ||x0 || √ = 0.99|||A† ||| m inf ||eiφ x0 − x||. φ∈R √ As we have seen, |||A† ||| m can be bounded by any constant larger than 1 if M is large enough (with high probability), so if δ ∈]0; 1[ is close enough to 1, inf ||eiφ x0 − A† (b ⊙ phase(Ax))|| ≤ δ inf ||eiφ x0 − x||, φ∈R φ∈R 9 and this holds, with high probability, for any x such that inf φ∈R ||eiφ x0 − x|| ≤ ǫ||x0 ||. 3.2 Global convergence In the last paragraph, we have seen that the alternating projections operator is contractive, with high probability, in an ǫ||x0 ||-neighborhood of the solution x0 . This implies that, if the starting point of alternating projections is at distance at most ǫ||x0 || from x0 , alternating projections converge to x0 . So if we have a way to find such an initial point, we obtain a globally convergent algorithm. Several initialization methods have been proposed that achieve the precision we need with an optimal number of measurements, that is m = O(n). Let us mention the truncated spectral initialization by [Chen and Candès, 2015] (improving upon the slightly suboptimal spectral initializations introduced by [Netrapalli et al., 2013] and [Candès et al., 2015]), the null initialization by [Chen et al., 2016] and the method described by [Gao and Xu, 2016]. All these methods consist in computing the largest or smallest eigenvector of m X αi ai a∗i , i=1 where the α1 , . . . , αm are carefully chosen coefficients, that depend only on b. The method of [Chen and Candès, 2015], for example, has the following guarantees. Theorem 3.6 (Proposition 3 of [Chen and Candès, 2015]). Let ǫ > 0 be fixed. We define z as the main eigenvector of m 1 X ∗ 2 ∗ |a x0 | ai ai 1|a∗i x0 |2 ≤ m9 Pm ∗ 2. j=1 |ai x0 | m i=1 i (8) There exist C1 , C2 , M > 0 such that, with probability at least 1 − C1 exp(−C2 m), the vector z obeys inf φ∈R,λ∈R∗ + ||eiφ x0 − λz|| ≤ ǫ||x0 ||, provided that m ≥ M n. Combining this initialization procedure with alternating projections, we get Algorithm 1. As shown by the following corollary, it converges towards the correct solution, at a linear rate, with high probability, for m = O(n). Corollary 3.7. There exist C1 , C2 , M > 0, δ ∈]0; 1[ such that, with probability at least 1 − C1 exp(−C2 m), 10 Input : A ∈ Cm×n , b = |Ax0 | ∈ Rm , T ∈ N∗ . Initialization: set z0 to be the main eigenvector of the matrix in Equation (8). for t = 1 to T do Set zt ← A† (b ⊙ phase(Azt−1 )). end Output: zT . Algorithm 1: Alternating projections with truncated spectral initialization Algorithm 1 satisfies ∀t ∈ N∗ , inf ||eiφ x0 − zt || ≤ δ t ||x0 ||, φ∈R (9) provided that m ≥ M n. Proof. Let us fix ǫ, δ ∈]0; 1[ as in Theorem 3.1. Let us assume that the properties described in Theorems 3.1 and 3.6 hold; it happens on an event of probability at least 1 − C1 exp(−C2 m), provided that m ≥ M n, for some constants C1 , C2 , M > 0. Let us prove that, on this event, Equation (9) also holds. We proceed by recursion. From Theorem 3.6, there exist φ ∈ R, λ ∈ R∗+ such that ||eiφ x0 − λz0 || ≤ ǫ||x0 ||. So, from Theorem 3.1, applied to x = λz0 , inf ||eiφ x0 − z1 || = inf ||eiφ x0 − A† (b ⊙ phase(z0 ))|| φ∈R φ∈R = inf ||eiφ x0 − A† (b ⊙ phase(λz0 ))|| φ∈R ≤ δ inf ||eiφ x0 − λz0 || φ∈R ≤ ǫδ||x0 ||. This proves Equation (9) for t = 1. The same reasoning can be reapplied to also prove the equation for t = 2, 3, . . . . 3.3 Complexity Let η > 0 be the relative precision that we want to achieve: inf ||eiφ x0 − zT || ≤ η||x0 ||. φ∈R 11 Unstructured case Fourier masks Alternating projections  O mn log2 (1/η) + log(n) O (m log(n) (log(1/η) + log(n))) Truncated Wirtinger flow O (mn (log(1/η) + log(n))) O (m log(n) (log(1/η) + log(n))) Figure 1: Complexity of alternating projections with initialization, and truncated Wirtinger flow. Let us compute the number of operations that Algorithm 1 requires to reach this precision. The main eigenvector of the matrix defined in Equation (8) can be computed - up to precision η - in approximately O(log(1/η) + log(n)) power iterations. Each power iteration is essentially a matrix-vector multiplication, and thus requires O(mn) operations.3 As a consequence, the complexity of the initialization is O(mn (log(1/η) + log(n))). Then, at each step of the for loop, the most costly operation is the multiplication by A† . When performed with the conjugate gradient method, it requires O(mn log(1/η)) operations. To reach a precision equal to η, we need to perform O(log(1/η)) iterations of the loop. So the total complexity of Algorithm 1 is  O(mn log2 (1/η) + log(n) ). Let us mention that, when A has a special structure, there may exist fast algorithms for the multiplication by A and the orthogonal projection onto Range(A). In the case of masked Fourier measurements considered in [Candès et al., 2015], for example, assuming that our convergence theorem still holds, despite the non-Gaussianity of the measurements, the complexity of each of these operations reduces to O(m log n), yielding a global complexity of O(m log(n)(log(1/η) + log(n))). The complexity is then almost linear in the number of measurements. As a comparison, Truncated Wirtinger flow, which is currently the most efficient known method for phase retrieval from Gaussian measurements, has an identical complexity, up to a log(1/η) factor in the unstructured case (see Figure 1). 4 Numerical experiments In this section, we numerically validate Corollary 3.7. We formulate a conjecture about the convergence of alternating projections with random initialization, in 3 These matrix-vector multiplications can be computed without forming the whole matrix (which would require O(mn2 ) operations), because this matrix factorizes as where I ∈ Rm 1 ∗ A Diag(|Ax0 |2 ⊙ I)A, m is such that ∀i ≤ m, Ii = 1|A x0 |2 ≤ 9 Pm |A i m 12 j=1 i x0 | 2. Number of measurements m 92 80 68 56 44 32 20 8 2 6 10 14 18 22 26 30 Signal size n Figure 2: Probability of success for Algorithm 1, as a function of n and m. Black points indicate a probability equal to 0, and white points a probability equal to 1. The red line serves as a reference: it is the line m = 3n. the regime m = O(n). The code used to generate Figures 2 and 3 is available at http://www-math.mit.edu/~waldspur/code/alternating_projections_code.zip. 4.1 Alternating projections with careful initialization Corollary 3.7 states that alternating projections succeed with high probability, when they start from a good initial point, in the regime where the number of measurements is linear in the problem dimension (m = O(n)). We use the initialization method described in [Chen and Candès, 2015], as presented in Algorithm 1. We run the algorithm for various choices of n and m, 3000 times for each choice. This allows us to compute an empirical probability of success, for each value of (n, m). The results are presented in Figure 2. They confirm that, when m = Cn, for a sufficiently large constant C > 0, the success probability can be arbitrarily close to 1. 4.2 Alternating projections without careful initialization In a second experiment, we measure the probability that alternating projections succeed, when started from a random initial point (sampled from the unit sphere with uniform probability). 13 Number of measurements m 152 132 112 92 72 52 32 12 2 6 10 14 18 22 26 30 Signal size n Figure 3: Probability of success for alternating projections with a random Gaussian initialization, as a function of n and m. Black points indicate a probability equal to 0, and white points a probability equal to 1. The red line serves as a reference: it is the line m = 3n. As previously, we compute this probability, for any pair (m, n), by averaging the results of 3000 tests. The results are presented in Figure 3. From this figure, it seems that alternating projections behave similarly with and without a careful initialization procedure: they converge towards the correct solution as soon as m ≥ Cn, for a suitable constant C > 0. Only the precise value of C depends on whether the initialization procedure is careful or not. As a consequence, we have the following conjecture. Conjecture 4.1. Let any ǫ > 0 be fixed. When m ≥ Cn, for C > 0 large enough, alternating projections with a random rotationally invariant initialization succeed with probability at least 1 − ǫ. Complementary experiments (not shown here), suggest that, in the regime m = O(n), there are attractive stagnation points, so there are initializations for which alternating projections fail. However, it seems that these bad initializations occupy a very small volume in the space of all possible initial points. Therefore, a random initialization leads to success with high probability. Unfortunately, proving the conjecture a priori requires to evaluate in some way the size of the attraction basin of stagnation points, which seems difficult. 14 A Proof of Proposition 2.1 Proposition (Proposition 2.1). For any y0 , the sequence (yk )k∈N is bounded. Any accumulation point y∞ of (yk )k∈N satisfies the following property: (AA† )(b ⊙ u) = y∞ . ∃u ∈ Ephase (y∞ ), In particular, if y∞ has no zero entry, (AA† )(b ⊙ phase(y∞ )) = y∞ . Proof of Proposition 2.1. The boundedness of (yk )k∈N is a consequence of the fact that ||yk′ || = ||b|| for all k, so ||yk+1 || ≤ |||AA† ||| ||b||. Let us show the second part of the statement. Let y∞ be an accumulation point of (yk )k∈N , and let φ : N → N be an extraction such that yφ(n) → y∞ when n → +∞. ′ By compacity, as (yφ(n) )n∈N and (yφ(n)+1 )n∈N are bounded sequences, we can assume, even if we have to consider replace φ by a subextraction, that they also ′ +1 converge. We denote by y∞ and y∞ their limits: ′ ′ yφ(n) → y∞ +1 and yφ(n)+1 → y∞ when n → +∞. Let us define Eb = {y ′ ∈ Cm , |y ′ | = b}. We observe that, for any k, ′ d(yk−1 , Range(A)) ≥ d(yk , Eb ) ≥ d(yk′ , Range(A)). Indeed, because the operators y → b⊙phase(y) and y → (AA† )y are projections, ′ ′ d(yk−1 , Range(A)) = d(yk−1 , yk ) ≥ d(yk , Eb ); d(yk , Eb ) = d(yk , yk′ ) ≥ d(yk′ , Range(A)). So the sequences (d(yk , Eb ))k∈N and (d(yk′ , Range(A)))k∈N converge to the same non-negative limit, that we denote by δ. In particular, ′ d(y∞ , Eb ) = δ = d(y∞ , Range(A)). ′ ′ If we pass to the limit the equalities d(yφ(n) , Eb ) = ||yφ(n) −yφ(n) || and d(yφ(n) , Range(A)) = ′ ||yφ(n) − yφ(n)+1 ||, we get ′ ′ +1 ′ ||y∞ − y∞ || = ||y∞ − y∞ || = δ = d(y∞ , Range(A)). ′ As Range(A) is convex, the projection of y∞ onto it is uniquely defined. This implies +1 y∞ = y∞ , 15 ′ and, because ∀n, yφ(n)+1 = (AA† )yφ(n) , +1 ′ y∞ = y∞ = (AA† )y∞ . ′ To conclude, we now have to show that y∞ = b ⊙ u for some u ∈ Ephase (y∞ ). ′ We use the fact that, for all n, yφ(n) = b ⊙ phase(yφ(n) ). For any i ∈ {1, . . . , m}, if (y∞ )i 6= 0, phase is continuous around (y∞ )i , ′ so (y∞ )i = bi phase((y∞ )i ). We then set ui = phase((y∞ )i ), and we have ′ (y∞ )i = bi ui . ′ If (y∞ )i = 0, we set ui = phase((y∞ )i ) ∈ Ephase (0) = Ephase ((y∞ )i ). We ′ ′ then have y∞ = |y∞ |ui = bi ui . ′ With this definition of u, we have, as claimed, y∞ = b ⊙ u and u ∈ Ephase (y∞ ). B B.1 Technical lemmas for Section 3 Proof of Lemma 3.2 Lemma (Lemma 3.2). For any z0 , z ∈ C, 6 | phase(z0 + z) − phase(z0 )| ≤ 2.1|z|≥|z0|/6 + Im 5  z z0  . Proof. The inequality holds if z0 = 0, so we can assume z0 6= 0. We remark that, in this case, | phase(z0 + z) − phase(z0 )| = | phase(1 + z/z0 ) − 1|. It is thus enough to prove the lemma for z0 = 1, so we make this assumption. When  |z| ≥1/6, the inequality is valid. Let us now assume that |z| < 1/6. Let θ ∈ − π2 ; π2 be such that eiθ = phase(1 + z). Then | phase(1 + z) − 1| = |eiθ − 1| = 2| sin(θ/2)| ≤ | tan θ| |Im (1 + z)| |Re (1 + z)| |Im (z)| ≤ 1 − |z| 6 ≤ |Im (z)|. 5 = So the inequality is also valid. 16 B.2 Proof of Lemma 3.3 Lemma (Lemma 3.3). For any η > 0, there exists C1 , C2 , M, γ > 0 such that the inequality || |Ax0 | ⊙ 1|v|≥|Ax0 | || ≤ η||v|| holds for any v ∈ Range(A) such that ||v|| < γ||Ax0 ||, with probability at least 1 − C1 exp(−C2 m), when m ≥ M n. Proof. For any S ⊂ {1, . . . , m}, we denote by 1S the vector of Cm such that (1S )j = 1 if j ∈ S = 0 if j ∈ / S. We use the following two lemmas, proven in Paragraphs B.2.1 and B.2.2. Lemma B.1. Let β ∈]0; 1/2[ be fixed. There exist C1 > 0 such that, with probability at least 1 − C1 exp(−β 3 m/e), the following property holds: for any S ⊂ {1, . . . , m} such that Card(S) ≥ βm, || |Ax0 | ⊙ 1S || ≥ β 3/2 e−1/2 ||Ax0 ||. (10)  1  be fixed. There exist M, C1 , C2 > 0 such that, if Lemma B.2. Let β ∈ 0; 100 m ≥ M n, then, with probability at least 1 − C1 exp(−C2 m), the following property holds: for any S ⊂ {1, . . . , m} such that Card(S) < βm and for any y ∈ Range(A), p ||y ⊙ 1S || ≤ 10 β log(1/β)||y||. (11) p Let β > 0 be such that 10 β log(1/β) ≤ η. Let M be as in Lemma B.2. We set γ = β 3/2 e−1/2 . We assume that Equations (10) and (11) hold; from the lemmas, this occurs with probability at least 1 − C1′ exp(−C2′ m), for some constants C1′ , C2′ > 0, provided that m ≥ M n. On this event, for any v ∈ Range(A) such that ||v|| < γ||Ax0 ||, if we set Sv = {i s.t. |vi | ≥ |Ax0 |i }, we have that Card Sv < βm. 17 Indeed, if it was not the case, we would have, by Equation (10), ||v|| ≥ ||v ⊙ 1Sv || ≥ || |Ax0 | ⊙ 1Sv || ≥ β 3/2 e−1/2 ||Ax0 || = γ||Ax0 ||, which is in contradiction with the way we have chosen v. So we can apply Equation (11), and we get || |Ax0 | ⊙ 1|v|≥|Ax0 | || ≤ ||v ⊙ 1S || p ≤ 10 β log(1/β)||v|| ≤ η||v||. B.2.1 Proof of Lemma B.1 Proof of Lemma B.1. If we choose C1 large enough, it is enough to show the property for m larger than some fixed constant. We first assume S fixed, with cardinality Card S ≥ βm. We use the following lemma. Lemma B.3 ([Dasgupta and Gupta, 2003], Lemma 2.2). Let k1 < k2 be natural numbers. Let X ∈ Ck2 be a random vector whose coordinates are independent, Gaussian, of variance 1. Let Y be the projection of X onto its k1 first coordinates. Then, for any t > 0, ! r tk1 ||Y || ≤ exp (k1 (1 − t + log t)) if t < 1; ≤ Proba ||X|| k2 ! r tk1 ||Y || ≤ exp (k1 (1 − t + log t)) if t > 1. ≥ Proba ||X|| k2 From this lemma, for any t ∈]0; 1[, because Ax0 has independent Gaussian coordinates,   || |Ax0 | ⊙ 1S || p P ≤ tβ ≤ exp (−βm(t − 1 − ln t)) . ||Ax0 || In particular, for t = P β2 e ,   || |Ax0 | ⊙ 1S || ≤ β 3/2 e−1/2 ||Ax0 ||    2 β − 2 ln β . ≤ exp −βm e 18 (12) As soon as m is large enough, the number of subsets S of {1, . . . , m} with cardinality ⌈βm⌉ satisfies  m ⌈βm⌉  ⌈βm⌉ em ≤ ⌈βm⌉   1 . ≤ exp 2mβ log β  (13) (The first inequality is a classical result regarding binomial coefficients.) We combine Equations (12) and (13): Property (10) is satisfied for any S of cardinality ⌈βm⌉ with probability at least   β3 1 − exp − m , e provided that m is larger that some constant which depends on β. If it is satisfied for any S of cardinality ⌈βm⌉, then it is satisfied for any S of cardinality larger than βm, which implies the result. B.2.2 Proof of Lemma B.2 Proof of Lemma B.2. We first assume S to be fixed, of cardinality exactly ⌈βm⌉. Any vector y ∈ Range(A) is of the form y = Av, for some v ∈ Cn . Inequality (11) can then be rewritten as: p (14) ||AS v|| = ||Diag(1S )Av|| ≤ 10 β log(1/β)||Av||, where AS , by definition, is the submatrix obtained from A by extracting the rows whose indexes are in S. We apply Proposition 3.5 to A and AS , respectively for t = 12 and t = p 3 log(1/β). It guarantees that the following properties hold: r   ||Av|| √ 1 n inf ; ≥ m − v∈Cn ||v|| 2 m r   p ||AS v|| √ n sup ≤ Card S 1 + + 3 log(1/β) , Card S v∈Cn ||v|| with respective probabilities at least  m 1 − 2 exp − ; 4 and 1 − 2 exp (−9(Card S) log(1/β)) ≥ 1 − 2 exp (−9β log(1/β)m) . 19 Assuming m ≥ M n for some M > 0, we deduce from these inequalities that, for all v ∈ Cn , ! p r p n log(1/β) + 3 Card S 1 + Card S pn ||Av|| ||AS v|| ≤ 1 m 2 − m q   p r 1 + 3 1 + log(1/β) βM 1   ||Av||, q ≤ β+ (15) m 1 1 − 2 M with probability at least  m . 1 − 2 exp (−9β log(1/β)m) − 2 exp − 4 √ Ifp we choose M large enough, pcan upper bound Equation (15) by (ǫ+2 β(1+ √ we 3 log(1/β)))||Av|| ≤ (ǫ+8 β log(1/β)) for any fixed ǫ > 0. So this inequality implies Equation (14). As in the proof of Lemma B.1, there are at most   1 exp 2mβ log β subsets of {1, . . . , m} with cardinality ⌈βm⌉, as soon as m is large enough. As a consequence, Equation (14) holds for any v ∈ Cn and S of cardinality ⌈βm⌉ with probability at least     1 1 m . − 2β log 1 − 2 exp (−7β log(1/β)m) − 2 exp − 4 β When β ≤ 1 100 , we have 1 1 − 2β log > 0, 4 β so the resulting probability is larger than 1 − C1 exp(−C2 m), for some well-chosen constants C1 , C2 > 0. This ends the proof. Indeed, if Equation (14) holds for any set of cardinality ⌈βm⌉, it also holds for any set of cardinality Card S < βm, because ||AS ′ v|| ≤ ||AS v|| whenever S ′ ⊂ S. This implies Equation (11). B.3 Proof of Lemma 3.4 Lemma (Lemma 3.4). For M, C1 > 0 large enough, and C2 > 0 small enough, when m ≥ M n, the property ||Im (v ⊙ phase(Ax0 ))|| ≤ 4 ||v|| 5 holds for any v ∈ Range(A) ∩ {Ax0 }⊥ , with probability at least 1 − C1 exp(−C2 m). 20 (16) Proof. If we multiply x0 by a positive real number, we can assume ||x0 || = 1. Moreover, as the law of A is invariant under right multiplication by a unitary matrix, we can assume that 1! 0 x0 = .. . . 0 Then, if we write A1 the first column of A, and A2:n the submatrix of A obtained by removing this first column, Range(A) ∩ {Ax0 }⊥   hw, A1 i = w− A , w ∈ Range(A ) . 1 2:n ||A1 ||2 We first observe that sup w∈Range(A2:n )−{0} (17) | hw, A1 i | ||w|| is the norm of the orthogonal projection of A1 onto Range(A2:n ). The (n − 1)dimensional subspace Range(A2:n ) has a rotationally invariant distribution in Cm , and is independent of A1 . Thus, from Lemma B.3 coming from [Dasgupta and Gupta, 2003], for any t > 1, r t(n − 1) | hw, A1 i | < , sup m w∈Range(A2:n )−{0} ||w|| ||A1 || with probability at least 1 − exp (−(n − 1)(t − 1 − ln t)) . m We take t = n−1 (0.04)2 (which is larger than 1 when m ≥ M n with M > 0 large enough), and it implies that sup w∈Range(A2:n )−{0} | hw, A1 i | < 0.04 ||w|| ||A1 || (18) with probability at least 1 − exp(−c2 m) for some constant c2 > 0, provided that m ≥ M n with M large enough. Second, as A2:n is a random matrix of size m × (n − 1), whose entries are independent and distributed according to the law N (0, 1/2) + N (0, 1/2)i, we deduce from Proposition 3.5 applied with t = 0.01 that, with probability at least  1 − 2 exp −10−4 m , we have, for any x ∈ Cn−1 , √ ||A2:n x|| ≥ m 1 − r √ ≥ 0.98 m||x||, 21 ! (n − 1) − 0.01 ||x|| m (19) provided that m ≥ 10000n. We now set C = Diag(phase(A1 ))A2:n .  The matrix Im C Re C has size m × (2(n − 1)); its entries are independent and distributed according to the law N (0, 1/2). So by [Davidson and Szarek, 2001, Thm II.13] (applied with t = 0.01), with probability at least 1 − exp(−5.10−5m), we have, for any x ∈ R2(n−1) , Im C ! r m 2(n − 1) Re C x ≤ 1+ + 0.01 ||x|| 2 m r m ≤ 1.02 ||x||, 2  r (20) provided that m ≥ 20000n. When Equations (19) and (20) are simultaneously valid, any w = A2:n w′ belonging to Range(A2:n ) satisfies: Im (w ⊙ phase(Ax0 )) = ||Im (Cw′ )||    Re w′ Im C Re C Im w′ r   m Re w′ ≤ 1.02 Im w′ 2 r m ′ ||w || = 1.02 2 1.02 √ ||A2:n w′ || ≤ 0.98 2 1.02 √ ||w|| = 0.98 2 ≤ 0.75||w||. = (21) We now conclude. Equations (18), (19) and (20) hold simultaneously with probability at least 1 − C1 exp(−C2 m) for any C1 large enough and C2 small enough, provided that m ≥ M n with M large enough. Let us show that, on this event, Equation (16) also holds. Any v ∈ Range(A) ∩ {Ax0 }⊥ , from Equality (17), can be written as v=w− hw, A1 i A1 , ||A1 ||2 22 for some w ∈ Range(A2:n ). Using Equation (18), then Equation (21), we get: Im (v ⊙ phase(Ax0 )) ≤ Im (w ⊙ phase(Ax0 )) + hw, A1 i A1 ||A1 ||2 ≤ Im (w ⊙ phase(Ax0 )) + 0.04||w|| ≤ 0.79||w||. But then, by Equation (18) again, 2 ||v||2 = ||w||2 − hw, A1 i ≥ (1 − (0.04)2 )||w||2 . ||A1 ||2 So Im (v ⊙ phase(Ax0 )) ≤ 0.79||w|| 0.79 ||v|| ≤ p 1 − (0.04)2 4 ≤ ||v||. 5 Bibliography R. Balan, P. Casazza, and D. Edidin. On signal reconstruction without noisy phase. Applied and Computational Harmonic Analysis, 20:345–356, 2006. E. J. Candès and X. Li. Solving quadratic equations via phaselift when there are about as many equations as unknowns. Foundations of Computational Mathematics, 14(5):1017–1026, 2014. E. J. Candès, T. Strohmer, and V. Voroninski. Phaselift: exact and stable signal recovery from magnitude measurements via convex programming. Communications in Pure and Applied Mathematics, 66(8):1241–1274, 2013. E. J. Candès, X. Li, and M. Soltanolkotabi. Phase retrieval from coded diffraction patterns. Applied and Computational Harmonic Analysis, 39(2):277–299, 2015. E. J. Candès, X. Li, and M. Soltanolkotabi. Phase retrieval via wirtinger flow: theory and algorithms. IEEE Transactions of Information Theory, 61(4): 1985–2007, 2015. 23 A. Chai, M. Moscoso, and G. Papanicolaou. Array imaging using intensity-only measurements. Inverse Problems, 27(1), 2011. P. Chen, A. Fannjiang, and G.-R. Liu. Phase retrieval with one or two diffraction patterns by alternating projection with null initialization. preprint, 2016. http://arxiv.org/abs/1510.07379. Y. Chen and E. J. Candès. Solving random quadratic systems of equations is nearly as easy as solving linear systems. To appear in Communications on Pure and Applied Mathematics, 2015. A. Conca, D. Edidin, M. Hering, and C. Vinzant. Algebraic characterization of injectivity in phase retrieval. Applied and Computational Harmonic Analysis, 32(2):346–356, 2015. S. Dasgupta and A. Gupta. An elementary proof of a theorem of Johnson and Lindenstrauss. Random Structures and Algorithms, 22(1):60–65, 2003. K. R. Davidson and S. J. Szarek. Local operator theory, random matrices and Banach spaces. In W. B. Johnson and J. Lindenstrauss, editors, Handbook of the geometry of Banach spaces, volume 1, pages 317–366. Elsevier, 2001. J. R. Fienup. Phase retrieval algorithms: a comparison. Applied Optics, 21(15): 2758–2769, 1982. B. Gao and Z. Xu. Gauss-Newton method for phase retrieval. preprint, 2016. http://arxiv.org/abs/1606.08135. R. Gerchberg and W. Saxton. A practical algorithm for the determination of phase from image and diffraction plane pictures. Optik, 35:237–246, 1972. D. Gross, F. Krahmer, and R. Kueng. A partial derandomization of PhaseLift using spherical designs. Journal of Fourier Analysis and Applications, 21(2): 229–266, 2015. R. Kolte and A. Özgür. Phase retrieval via incremental truncated Wirtinger flow. preprint, 2016. arxiv.org/abs/1606.03196. P. Netrapalli, P. Jain, and S. Sanghavi. Phase retrieval using alternating minimization. In Advances in Neural Information Processing Systems 26, pages 1796–2804, 2013. D. Noll and A. Rondepierre. On local convergence of the method of alternating projections. Foundations of Computational Mathematics, 16(2):425–455, 2016. Y. Schechtman, Y. C. Eldar, O. Cohen, H. N. Chapman, J. Miao, and M. Segev. Phase retrieval with application to optical imaging: a contemporary overview. IEEE Signal processing magazine, 32(3):87–109, 2015. 24 M. Soltanolkotabi. Algorithms and theory for clustering and nonconvex quadratic programming. PhD thesis, Stanford University, 2014. D. L. Sun and J. O. Smith. Estimating a signal from a magnitude spectrogram via convex optimization. In Audio Engineering Society 133rd Convention, 2012. J. Sun, Q. Qu, and J. Wright. A geometric analysis of phase retrieval. preprint, 2016. http://arxiv.org/abs/1602.06664. I. Waldspurger. Phase retrieval with random gaussian sensing vectors by alternating projections. preprint, 2016. https://arxiv.org/abs/1609.03088. I. Waldspurger, A. d’Aspremont, and S. Mallat. Phase recovery, maxcut and complex semidefinite programming. Mathematical Programming, 149(1-2): 47–81, 2015. G. Wang, G. B. Giannakis, and Y. C. Eldar. Solving random systems of quadratic equations via truncated generalized gradient flow. In Advances in Neural Information Processing Systems 29, 2016. C. D. White, S. Sanghavi, and R. Ward. The local convexity of solving systems of quadratic equations. preprint, 2015. http://arxiv.org/abs/1506.07868. H. Zhang and Y. Liang. Reshaped Wirtinger flow for solving quadratic systems of equations. In Advances in Neural Information Processing Systems 29, 2016. 25
10math.ST
Journal of Advanced Bioinformatics Applications and Research ISSN 0976-2604.Online ISSN 2278 – 6007 Vol 3, Issue 3, 2012, pp 379-390 http://www.bipublication.com PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES AS MYCOBACTERIUM TUBERCULOSIS H37RV INHABITORS Doreswamy and *Chanabasyya M. Vastrad Department of Computer Science Mangalore University, Mangalagangotri-574 199, Karnataka, INDIA Email: [email protected] , *[email protected] Tel: +91-9480073398 [Received-10/10/2012, Accepted-21/11/2012] ABSTRACT: Antitubercular activity of Sulfathiazole Derivitives series were subjected to Quantitative Structure Activity Relationship (QSAR) Analysis with an attempt to derive and understand a correlation between the Biologically Activity as dependent variable and various descriptors as independent variables. QSAR models generated using 28 compounds. Several statistical regression expressions were obtained using Partial Least Squares (PLS) Regression ,Multiple Linear Regression (MLR) and Principal Component Regression (PCR) methods. The among these methods, Partial Least Square Regression (PLS) method has shown very promising result as compare to other two methods. A QSAR model was generated by a training set of 18 molecules with correlation coefficient r ( ) of 0.9191 , significant cross validated correlation coefficient ( ) of 0.8300 , F test of 53.5783 , for external test set ( -3.6132, coefficient of correlation of predicted data set Partial Least Squares Regression Method. ) 1.4859 and degree of freedom 14 by Keywords: MLR , PLS , PCR , LOO [I] INTRODUCTION Tuberculosis in humans is mainly caused by Mycobacterium tuberculosis.The infection is transmitted by respirable droplets generated during forceful expiratory manoeuvres such as coughing. Tuberculosis infection can be either active or latent[1] . The World Health Organization (WHO) estimates that within the next 20 years about 30 million people will be infected with the bacillus [2-3]. The clinical management of TB has relied heavily on a limited number of drugs such as Isonicotinic acid, Hydrazide, Rifampicin, Ethambutal, Streptomycin, Ethionamide, Pyrazinamide, Fluroquinolones etc [4]. However with the advent of these chemotherapeutic agents the spread of TB has not been eradicated completely because of prolonged treatment schedules There is now recognition that new drugs to treat TB are urgently required, specifically for use in shorter treatment regimens than are possible with the current agents and which can be employed to treat multi-drug resistant and latent disease[5]. Sulfathiazoles exhibit potent in vitro and in vivo antimycobacterial activity [6]. There is also a considerable effort to discover and develop newer PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES sulfathiazoles, and some of them might have value in the treatment of TB [7]. Cheminformatics[26] and computer-aided drug design (CADD) are expected to contribute to a possible solution for the perilous situation regarding this infectious disease by assisting in the rapid identification of novel effective anti-TB agents.An alternative way for overcoming the absence of experimental measurements for biological systems is based on the activity to formulate quantitative structure activity relationship (QSAR) [8] . QSAR models are mathematical equations constructing a relationship between chemical structures and biological activities. These models have another ability, which is providing a deeper knowledge about the mechanism of biological activity. In the first step of a typical QSAR study one needs to find a set of molecular descriptors with the higher impact on the biological activity of interest [9]. A wide range of descriptors[10] has been used in QSAR modeling. These descriptors[11] have been classified into different categories, including constitutional, geometrical, topological, quantum chemical and so on. Using such an approach one could predict the activities of newly designed compounds before a decision is being made whether these compounds should be really synthesized and tested. In this work, we attempt to compare the performance of Partial Least Squares(PLS) based QSAR models with the results produced by Multi Linear Regression(MLR ) and Principal Component Regression (PCR) techniques to find structural requirements for further improved antitubercular activity. [II] MATERIALS AND METHODS 2.1 Molecular Data Sets A series of 28 molecules belonging to derivatives for Mycobacterium tuberculosis(H37Rv) inhibitors were taken from large Antituberculosis drug discovry databases[12] using Substructure mining tool Schrodinger Canvas 2010(Trial version)[13]. All molecules were processed by the Vlife MDS [14] - 2D coordinates of atoms were Doreswamy and Chanabasyya M. Vastrad recalculated counter ions and salts were removed from molecular structures, molecules were neutralized, mesomerized and aromatized. Data sets were then filtered from duplicates. The 2DQSAR models were generated using a training set of 18 molecules. Predictive power of the resulting models was evaluated by a test set of 10 molecules with uniformly distributed biological activities. The observed selection of test set molecules was made by considering the fact that test set molecules represents a range of biological activity similar to the training set. The observed and predicted biological activities of the training and test set molecules are presented in Table 1. 2.2 Biological Activity Data For the development of QSAR models of Sulfathiazoles , in vitro antitubercusis activity in terms of half maximal inhibitory concentration IC50 (µM) against (H37Rv) strains were taken from the Antituberculosis drug discovry databases[12]. The IC50 summary data contains only molecules that have at least exhibited some activity.The biological activity data (IC50) were converted in to pIC50 according to the formula pIC50 = (-log (IC50 X )) was used as dependent variable, thus correlating the data linear to the free energy change. 2.3 Descriptor calculation The VLife MDS tool was employed for the calculation of different descriptors including topological index (J), connectivity index (x), radius of gyration (RG), moment of inertia, Wiener index(W), balaban index(J), centric index , hosoya index (Z), information based indices, XlogP, logP , hydrophobicity, elemental count, path count, chain count, pathcluster count, molecular connectivity index (chi), kappa values, electro topological state indices, electrostatic surface properties, dipole moment, polar surface area(PSA), alignment independent descriptor (AI)[11,14] . The calculated descriptors were gathered in a data matrix. The preprocessing of the independent variables (i.e., descriptors) was done by removing invariable (constant column) 380 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES and cross-correlated descriptors (with r = 0.99). which resulted in total 156, 125 and 162 descriptors for MLR, PCR and PLS respectively to be used for QSAR analysis.2.4 Selection of Training and Test Set The dataset of 28 molecules was divided into training and test set by Sphere Exclusion (SE)[1516] method. In this method initially data set were divided into training and test set using sphere exclusion method. In this method dissimilarity value provides an idea to handle training and test set size. It needs to be adjusted by trial and error until a desired division of training and test set is achieved. Increase in dissimilarity value results in increase in number of molecules in the test set. This method is used for MLR, PCR and PLS model with pIC50 activity field as dependent variable and various 2D descriptors calculated for the molecules as independent variables. 2.5 Model Validation Validation [17-18] is a crucial aspect of quantitative structure–activity relationship (QSAR) modeling. This is done to test the internal stability and predictive ability of the QSAR models. Developed QSAR models were validated by the following procedure. 2.5.1 Internal Validation Internal validation was carried out using leaveone-out ( LOO- ) method. For calculating , each molecule in the training set was eliminated once and the activity of the eliminated molecule was predicted by using the model developed by the remaining molecules. The was calculated using the equation which describes the internal stability of a model. ------- (1) In Eq. (1), and indicate predicted and observed activity values respectively and indicate mean activity value. A model is considered acceptable when the value of exceeds 0.5. 2.5.2 External Validation Doreswamy and Chanabasyya M. Vastrad For external validation, the activity of each molecule in the test set was predicted using the model developed by the training set. The value is calculated as follows. ------ (2) In Eq (2) and indicate predicted and observed activity values respectively of the test set compounds and indicates mean activity value of the training set. For a predictive should be QSAR model, the value of more than 0.5. 2.5.3 Randomization Test Randomization test or Y-scrambling is important popular mean of statistical validation. To evaluate the statistical significance of the QSAR model for an actual dataset, one tail hypothesis testing was used. The robustness of the models for training sets was examined by comparing these models to those derived for random datasets. Random sets were generated by rearranging the activities of the molecules in the training set. The statistical model was derived using various randomly rearranged activities (random sets) with the selected descriptors and the corresponding were calculated. The significance of the models hence obtained was derived based on a calculated . A Z score value is calculated by the following formula: = ----------------- (3) Where h is the value calculated for the actual dataset, µ the average , and s is its standard deviation calculated for various iterations using models build by different random datasets. The probability (a) of significance of randomization test is derived by comparing value with critical value as reported, if value is less than 4.0; otherwise it is calculated by the formula as given in the literature. For example, a value greater than 3.10 indicates that there is a probability (a) of less than 0.001 that the QSAR model constructed for the real dataset is random. The randomization test 381 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES suggests that all the developed models have a probability of less than 1% that the model is generated by chance. 2.6 Multiple Linear Regression (MLR) Analysis MLR is a method used for modeling linear relationship between a dependent variable Y (pIC50) and independent variable X (2D descriptors). MLR is based on least squares: the model is fit such that sum-of-squares of differences of observed and a predicted value is minimized. MLR estimates values of regression by applying least squares curve coefficients ( fitting method. The model creates a relationship in the form of a straight line (linear) that best approximates all the individual data points. In regression analysis, conditional mean of dependant variable (pIC50) Y depends on (descriptors) X. MLR analysis extends this idea to include more than one independent variable. Regression equation takes the form. Y = b1x1 + b2x2 + b3x3 --------- (4) where Y is dependent variable, ‘b’s are regression coefficients for corresponding ‘x’s (independent variable), ‘c’ is a regression constant or intercept [19,25]. 2.7 Principal Component Regression (PCR) Analysis PCR is a data compression method based on the correlation among dependent and independent variables. PCR provides a method for finding structure in datasets. Its aim is to group correlated variables, replacing the original descriptors by new set called principal components (PCs). These PCs uncorrelated and are built as a simple linear combination of original variables. It rotates the data into a new set of axes such that first few axes reflect most of the variations within the data. First PC (PC1) is defined in the direction of maximum variance of the whole dataset. Second PC (PC2) is the direction that describes the maximum variance in orthogonal subspace to PC1. Subsequent components are taken orthogonal to those previously chosen and describe maximum of Doreswamy and Chanabasyya M. Vastrad remaining variance, by plotting the data on new set of axes, it can spot major underlying structures automatically. Value of each point, when rotated to a given axis, is called the PC value. PCA selects a new set of axes for the data. These are selected in decreasing order of variance within the data. Purpose of principal component PCR is the estimation of values of a dependent variable on the basis of selected PCs of independent variables [21]. 2.8 Partial Least Squares (PLS) Regression Analysis PLS analysis is a popular regression technique which can be used to relate one or more dependent variable (Y) to several independent (X) variables. PLS relates a matrix Y of dependent variables to a matrix X of molecular structure descriptors. PLS is useful in situations where the number of independent variables exceeds the number of observation, when X data contain colinearties or when N is less than 5 M, where N is number of compound and M is number of dependant variable. PLS creates orthogonal components using existing correlations between independent variables and corresponding outputs while also keeping most of the variance of independent variables. Main aim of PLS regression is to predict the activity (Y) from X and to describe their common structure [22,23] . PLS is probably the least restrictive of various multivariate extensions of MLR model. PLS is a method for constructing predictive models when factors are many and highly collinear 2.9 Evaluation of the QSAR Models The Developed QSAR models are evaluated using the following statistical measures: n (Number of compounds in regression); K (Number of variables(desriptors)); DF (Degree of freedom); optimum component ( number of optimums); ( the squared correlation coefficient); F test (Fischer’s Value) for statistical significance; (cross-validated correlation coefficient); ( for external test set); ( Z score calculated by the randomization test); (highest value in the 382 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES randomization test) ; highest value in the randomization test) ; α ( statistical significance parameter obtained by the randomization test). The regression coefficient is a relative measure of fit by the regression equation. It represents the part of the variation in the observed data is explained by the regression. However , a QSAR model is considered to be predictive , if the following conditions are satisfied: > 0.6 , > 0.6 and [24] . The F-test refects the ratio of variance explained by the model and variance due to the error in the regression. High values of the F-test indicate that model is statisticaly significant. The low standard error of and shows absoute quility of the fittness of the model. The cross-correlation limit was set at 0.5. [III] RESULTS Training set of 18 and 10 of test set of Sulfathiazoles having different substitution were employed. 3.1 Generation of QSAR Models 3.1.1 Model – 1 Partial Least Squares (PLS) Regression Analysis The compounds were subjected to under goes PLS method to developed QSAR models by using Simulated anealining variable selection mode. Model - 1 is having following QSAR equation 5 with 5 variables. pIC50 = 0.0317(PolarSurfaceAreaExcludingPandS) 0.00001(MomInertiaX) - 0.5204(slogp) - 0.6920(SaaScount)-0.0562(SsOHE-index) + 11.5501 ---- (5) The model -2 gave correlation coefficient ( ) of 0.9199, significant cross validated correlation coefficient ( ) of 0.8300 , F test of 53.5783 and degree of freedom 14. The model is validated by = 0.00000, = 0.00000, , = 0.07412, = 5.55165 and = 5.41451. The randomization test suggests that Doreswamy and Chanabasyya M. Vastrad the developed model have a probability of less than 1% that the model is generated by chance. Statistical data is shown in Table 2. The plot of observed vs. predicted activity is shown in Figure 1. The descriptors which contribute for the pharmacological action are shown in Figure 2. Parameters PLS MLR N 28 28 28 DF 14 13 14 0.9199 0.8647 0.8088 0.8300 0.7692 0.6715 F-test 53.5783 0.07412 PCR 20.7628 19.7379 0.44613 0.25466 -0.02584 0.13938 5.55165 4.96006 9.21353 5.41451 4.98651 7.70877 0.00000 0.00001 0.00000 0.00000 0.00001 0.00005 0.2321 0.3130 0.3586 0.3381 0.4088 0.4699 -3.6132 -2.3101 -1.8381 1.4859 1.2587 1.1655 Table 2 Statistical parameters of PLS, MLR And PCR The above study leads to the development of statistically significant QSAR model, which allows understanding of the molecular properties/features that play an important role in governing the variation in the activities. In addition, this QSAR study allowed investigating influence of very simple and easy-to-compute descriptors in determining biological activities, which could shed light on the key factors that may aid in design of novel potent molecules. All the parameters and their importance, which contributed to the specific Antituberculosis inhibitory activity in the generated models are discussed here. 1. PolarSurfaceAreaExcludingPandS: This descriptor signifies total polar surface area excluding phosphorous and sulphur. Negative 383 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES Contibution of this descriptor to the model is 27.92%. 2. MomInertiaX: This descriptor signifies Moment of Inertia of the molecule. Negative Contibution of this descriptor to the model is 28.62%. 3. SLogP: This descriptor signifies most hydrophobichydrophilic distance. Negative Contibution of this descriptor to the model is 23.99%. 4. SaaScount: This descriptor signifies the total number of sulphur atom connected with one single bond along with two aromatic bonds. Negative Contibution of this descriptor to the model is 10.97%. 5. SsOHE-index: This is also an estate contribution descriptor which represents electrotopological state indices for number of OH group connected with three single bond. Negative Contibution of this descriptor to the model is 8.49%. Fig. 2 Plot of percentage contribution of each descriptor in developed PLS model explaining variation in the activity 3.1.2 Model – 2 Multiple Linear Regression (MLR) Analysis After 2D QSAR study by Multiple Linear Regression method using simulatead annealing variable selection method, the final QSAR equation 6 was developed having 4 variables as follows. pIC50 = 83.7268(AveragePotential) 0.0179(PolarSurfaceAreaExcludingPandS) 0.00001(MomInertiaX) - 0.2923(chiV2) + 9.4202 ---(6) Fig. 1 Graph of Obsered vvs. Predicted activities for training and test set molecules by Partial Least Square model. (A) Training set (Red dots) (B) Test Set (Blue dots). Doreswamy and Chanabasyya M. Vastrad Model – 2 has a correlation coefficient ( ) of 0. 0.8647, significant cross validated correlation coefficient ( ) of 0.7692, F test of 20.7628 and degree of freedom 13. The model is validated by = 0.00001 , = 0.00001, = 0.44613, = -0.02584 , = 4.96006 and = 4.98651. The randomization test suggests that the 384 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES developed model have a probability of less than 1% that the model is generated by chance. The observed and predicted pIC50 along with residual values are shown in Table 1.Statistical data is shown in Table 2.The plot of observed vs. predicted activity is shown in Figure 3. The descriptors which contribute for the pharmacological action are shown in Figure 4. All the parameters and their importance, which contributed to the specific Antituberculosis inhibitory activity in the generated models are discussed here . 1. AveragePotential: This descriptor signifies average of the total electrostatic potential on van der Waals surface area of the molecule. Positive Contibution of this descriptor to the model is 17%. 2. PolarSurfaceAreaExcludingPandS: This descriptor signifies total polar surface area excluding phosphorous and sulphur. Negative Contibution of this descriptor to the model is 24.59%. 3. MomInertiaX: This descriptor signifies Moment of Inertia of the molecule. Negative Contibution of this descriptor to the model is 33.57%. 4. chiV2: This descriptor signifies atomic valence connectivity index (order 2). Negative Contibution of this descriptor to the model is -24.83%. Fig .3 Graph of Observed vs. Predicted activities for training and test set molecules from the Multiple Linear Regression model. (A) Training set (Red dots) (B) Test Set (Blue dots). Doreswamy and Chanabasyya M. Vastrad Fig. 4 Plot of percentage contribution of each descriptor in developed MLR model explaining variation in the activity. 3.1.3 Model – 3 Principal Component Regression (PCR) Analysis The compounds were subjected to under goes PCR method to developed QSAR models by using Simulated anealining variable selection mode By using model – 3 the final QSAR equation 7 was developed having 5 variables as follows. pIC50 = 135.3315(AveragePotential) 0.0103(PolarSurfaceAreaIncludingPandS) 0.0101(Quadrupole3) - 0.2208(OxygensCount) 0.0526(HydrogensCount) + 7.6332 ---(7) The model -3 gave correlation coefficient ( of 0.8088, significant cross validated correlation coefficient ( ) of 0.6715, F test of 19.7379 and degree of freedom 14. The model is validated by = 0.00000, = 0.00005, = 0.25466, =-0.13938 , = 9.21353 and = 7.70877. The randomization test suggests that the 385 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES developed model have a probability of less than 1% that the model is generated by chance. Statistical data is shown in Table 2. The plot of observed vs. predicted activity is shown in Figure 5 .The descriptors which contribute for the pharmacological action are shown in Figure 6. All the parameters and their importance, which contributed to the specific Antituberculosis inhibitory activity in the generated models are discussed here. 1. AveragePotential: This descriptor signifies average of the total electrostatic potential on van der Waals surface area of the molecule. Positive Contibution of this descriptor to the model is 27.96% 2. PolarSurfaceAreaIncludingPandS: This descriptor signifies total polar surface area including phosphorous and sulphur. Negative Contibution of this descriptor to the model is 19.08%. 3. Quadrupole3: This descriptor signifies third order magnetic dipole moments of free and bounded nucleons in the molecule. Negative Contibution of this descriptor to the model is 21.88%. 4. OxygensCount: This descriptor signifies total number of oxygen atoms in the Molecule. Negative Contibution of this descriptor to the model is -16.51%. 5. HydrogensCount: This descriptor signifies total number of hydrogen atoms in the Molecule. Negative Contibution of this descriptor to the model is -14.57%. Fig. 6 Plot of percentage contribution of each descriptor in developed PCR model explaining variation in the activity [IV] CONCLUSION The 2D QSAR studies were conducted with a series of Sulfathiazoles derivatives for Mycobacterium tuberculosis(H37Rv) inhibitors , and some useful perdictive molecular models were obtained. The physicochemical descriptors were found to have an important role in governing the change in activity. The statistical measures determine the estimation power of model for the data set from which it has been determined and evaluate it only internally. The overall degree of prediction was found to be around 86% in case of PLS,MLR and PCR. Among the three 2D-QSAR models (MLR, PCR, and PLS), results of PLS analysis showed significant predictive power and reliability as compare to other two methods. ACKNOWLEDGEMENTS The Authors are thankful to Dr Mahesh .B. Palkar Department of Pharamaceutical Chemistry K.L.E Pharmacy College Hubli. REFRENCES Fig. 5 Graph of Observedl vs. Predicted activities for training and test set molecules by Principal Component Regression model. A) Training set (Red dots) B) Test Set (Blue dots). Doreswamy and Chanabasyya M. Vastrad [1] “ Tuberculosis” Centers for Disease Control and Prevention1600 Clifton Rd. Atlanta, GA 30333, 386 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES USA http://www.cdc.gov/tb/topic/basics/default.htm [2] “Weekly Epidemiological Record (WER)” WHO annual report on global TB control – summa ry http://www.who.int/wer/2003/wer7815/en/index.ht ml [3] “Update on Drug-Resistant Pathogens: Mechanisms of Resistance, Emerging Strains” by Phyllis C. Braun, PhD, and John D. Zoidis, MD http://www.rtmagazine.com/issues/articles/200401_01.asp [4] “Tuberculosis management” From Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Tuberculosis_manage ment [5] ” Multidrug-resistant tuberculosis (MDR-TB)” From World Health Organization http://www.who.int/tb/challenges/mdr/en/ [6] “Mixed-Ligand Nickel(II) Complexes Containing Sulfathiazole and Cephalosporin Antibiotics: Synthesis, Characterization, and Antibacterial Activity” International Journal of Inorganic Chemistry Volume 2012 [2012], Article ID 106187 http://www.hindawi.com/journals/ijic/2012/106187 / [7] “Immunochemical Approaches to the Detection of Sulfathiazole in Animal Tissues” Lee N.1; Holtzapple C. K.1; Muldoon M. T.1; Deshpande S. S.2; Stanker L. H.1 Food and Agricultural Immunology, Volume 13, Number 1, 1 March [2001] , pp. 5-17(13) http://www.ingentaconnect.com/content/tandf/cfai/ 2001/00000013/00000001/art00001 [8] “QSAR and Drug Design” David R. Bevan Department of Biochemistry and Anaerobic Microbiology Virginia Polytechnic Institute and State University Blacksburg, VA 24061-0308 USA http://www.netsci.org/Science/Compchem/feature1 2.html [9] “Application of different chemometric tools in QSAR study of azoloadamantanes against influenza A virus” R. Karbakhsh1,* and R. Sabet2 Research in Pharmaceutical Sciences, April [2011]; 6(1): 23-33 [10] “Molecular Descriptors “ The Free Online resource http://www.moleculardescriptors.eu/tutorials/what_ is.htm [11] “Molecular Descriptors Guide” Version 1.0.2 Copyright [2008] US Environamental Protection agency [12] “Streamline Drug Discovery with CDD colabrative web based software “ https://www.collaborativedrug.com/ ( Accesed in May-june [2012] ) Doreswamy and Chanabasyya M. Vastrad [13] ”Canv as” A comprehensive cheminformatics computing environment http://www.schrodinger.com/products/14/23/ [14] “VlifeMDS” Integrated platform for Computer Aided Drug Design (CADD) http://www.vlifesciences.com/products/VLifeMDS /Product_VLifeMDS.php [15] “Sphere Exclusion Method for set selection” Rajarshi Guha Penn State University http://rguha.net/writing/pres/tropsha.pdf [16] “Dissimilarity-Based Algorithms for Selecting Structurally Diverse Sets of Compounds” JOURNAL OF COMPUTATIONAL BIOLOGY Volume 6, Numbers 3/4, [1999] Mary Ann Liebert, Inc. Pp. 447–457 [17] Tropsha, A.; Gramatica, P.; Gombar,V.K. The importance of being earnest: Validation is the absolute essential for successful application and interpretation of QSPR models. QSAR Comb. Sci. [2003], 22, 69-77 [18] “On Two Novel Parameters for Validation of Predictive QSAR Models” Partha Pratim Roy, Somnath Paul, Indrani Mitra and Kunal Roy* Molecules [2009], 14, 1660-1701 ISSN 1420-3049 [19] “Multile linear Regression” http://www.ltrr.arizona.edu/~dmeko/notes_11.pdf [20] “Variable Selection by Simulated Annealing” Dr. Frank Dieterle http://www.frankdieterle.de/phd/2_8_6.html [21] “Principal Components Regression With DataChoosen Components and related methods” J.T. Gene Hwang , Dan Nettleton www.math.cornell.edu/~hwang/pcr.pdf [22] “Partial Least Squares(PLS) Regression ” Herv´e Abdi1 The University of Texas at Dallas [23] “An introduction to partial least squares Regression” Randall D. Tobias, SAS Institute Inc., Carry, NC www.ats.ucla.edu/stat/sas/library/pls.pdf [24] Golbraikh .A , and A. Tropsha, [2002] Predictive QSAR modeing based on diversity of sampling of experimental datasets for the training and test set selection J. Comp Aided . Mol Design , 16:357-366. [25] “Influence of observations on the misclassification probability in quadratic discriminant analysis” https://lirias.kuleuven.be/bitstream/123456789/856 08/1/qda.pdf [26] “An introduction to the Computer Science and Chemistry of Chemical Information Systems” Craig A. James, eMolecules, Inc. http://www.emolecules.com/doc/cheminformatics101.php 387 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES Table 1 Structure, Experimental and Predicted Activity of Sulfathiazoles Used in Training and Test Set Using Model 1 (PLS) Expt. = Experimental activity, Pred. = Predicted activity a = Compound concentration in Sl no micro mole required to inhibit growth by 50% b=Log (IC50 X ): Training data set developed using model 1 (PLS) T = Test Set PIC50b Compound IC50a(µg/ml) Expt Pred Residual 1 82.3 4.09 7.1474 -3.0574 1.47 5.84 5.5317 0.3083 15.08 4.83 5.3109 -0.4809 91.16 4.05 3.9509 0.0991 14.89 4.83 54.5 4.27 4.4413 -0.1713 0.91 5.50 5.4827 0.0173 76.56 4.12 4.0849 0.0351 4.8 5.32 5.4276 -0.1076 29.21 5.32 4.4763 0.8437 11.17 4.54 4.2910 0.249 9.04 4.96 5.2175 -0,2575 2 3 4 5 4.7150 0.115 6 7 8 9 10 11 12 Doreswamy and Chanabasyya M. Vastrad 388 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES 13 2.61 5.59 5.8590 -0.269 3.12 5.51 3.7152 1.7948 97.05 4.02 4.2570 -0.237 1.47 5.84 6.9261 -1.0861 2.58 5.59 5.4794 0.1106 1.78 5.75 5.5579 0.1921 86.26 4.07 4.2298 -0.1598 80.57 4.10 4.0209 0.0791 6.62 5.18 5.6805 -0.5005 81.03 4.10 4.0422 0.0578 14 15 16 17 18 19 20 21 22 Doreswamy and Chanabasyya M. Vastrad 389 PREDICTIVE COMPARATIVE QSAR ANALYSIS OF SULFATHIAZOLE ANALOGUES 23 0.79 6.11 5.8378 0.2722 11.73 4.94 4.9564 -0.0164 75.13 4.13 3.9966 0.1334 3.06 5.52 3.7152 1.8048 51.93 4.29 4.3847 -0.0947 3.95 4.08 2.6570 1.423 24 25 26 27 28 Doreswamy and Chanabasyya M. Vastrad 390
5cs.CE
Q# , a quantum computation package for the .NET platform A. S. Tolba, M. Z. Rashad, and M. A. El-Dosuky Dept. of Computer Science, Faculty of Computers and Information Sciences, Mansoura University, Mansoura, Egypt. [email protected], [email protected], [email protected] October 2007 ABSTRACT Quantum computing is a promising approach of computation that is based on equations from Quantum Mechanics. A simulator for quantum algorithms must be capable of performing heavy mathematical matrix transforms. The design of the simulator itself takes one of three forms: Quantum Turing Machine, Network Model or circuit model of connected gates or, Quantum Programming Language, yet, some simulators are hybrid. We studied previous simulators and then we adopt features from three simulators of different implementation languages, different paradigms, and for different platforms. They are Quantum Computing Language (QCL), QUASI, and Quantum Optics Toolbox for Matlab 5. Our simulator for quantum algorithms takes the form of a package or a programming library for Quantum computing, with a case study showing the ability of using it in the circuit model. The .NET is a promising platform for computing. VB.NET is an easy, high productive programming language with the full power and functionality provided by the .NET framework. It is highly readable, writeable, and flexible language, compared to another language such as C#.NET in many aspects. We adopted VB.NET although its shortage in built-in mathematical complex and matrix operations, compared to Matlab. For implementation, we first built a mathematical core of matrix operations. Then, we built a quantum core which contains: basic qubits and register operations, basic 1D, 2D, and 3D quantum gates, and multi-view visualization of the quantum state, then a window for demos to show you how to use and get the most of the package. Keywords: Quantum Computing, quantum simulator, Quantum Programming Language, Q# , a quantum computation package , .NET platform, Turing Machine, Quantum circuit model, Quantum gates. 1. Introducing Quantum Computing Quantum computing is a promising approach of computation that is based on equations from Quantum Mechanics. A Bit is the basic computational unit of computing. It encodes a 0 or a 1. A register of n bits can store ANY n-bit number. A qubit (quantum bit) exists in a superposition of states, and encodes the values 1 and 0 simultaneously. A quantum register of n qubits stores ALL n-bit numbers, i.e. 2n values[1]. Quantum State The quantum state |ψ〉 represents a qubit if there are α, β ∈ C, where C is the set of Complex numbers, such that |ψ〉 = α|0〉 + β|1〉 or |ψ〉 = sin θ |0〉 + cos θ |1〉 With |α|2 + |β|2 =1. |0〉 and |1〉 are the computational basis states. Measuring the state |ψ〉 with respect to {|0〉, |1〉} basis will give |0〉 with probability |α|2 and |1〉 with probability |β|2 . The states |+〉 and |–〉 defined as 1 1 0 + 1 2 2 1 1 − = 0 − 1 2 2 + = Matrix notation A 2-level quantum system can store a single qubit state .We will have Also, we can say that: |0〉 = 01 and |1〉 = 10. That is |x〉 = binary (x + 1). The symbol |.〉 is called a ket, while the symbol 〈.| is called a bra. 〈ψ| represents the conjugate transpose of |ψ〉 ⎛ z1 ⎞ ⎜ ⎟ ψ =⎜ M ⎟ ⎜ zn ⎟ ⎝ ⎠ t ⎛ z1 ⎞ ⎜ ⎟ ψ = ⎜ M ⎟ = z1,..., zn ⎜ zn ⎟ ⎝ ⎠ ( ) where z1,…, zn ∈ Complex. Writing |1〉 〈0| + |0〉 〈1| means mapping |1〉 to 〈0| and |0〉 to 〈1|. Note that |ψ〉 〈ψ| = 1 . 1 Combing Qubits Let A and B be quantum systems with state spaces HA and HB , the state space of the joint quantum system is For two qubits, This is made by tensor product This means that : • An operation on a single qubit will in general affect all coefficients of the joint state vector. • A single qubit operation is highly parallel operation. • Adding a single quantum bit doubles the memory A note about operations on a Quantum Computer is that apart from measurements (Input/Output Operations) any quantum operation U is Linear, Length-preserving (i.e. input vectors and output vectors have the same number of components), Unitary (i.e. UU t = I , where I is the identity matrix), Reversible, and Deterministic . For detailed discussions on quantum computing and information, you can selectively refer to ([2], [3], [4]). 2. Previous Work on Designing a Simulator for Quantum Algorithms. Any simulator for quantum algorithms must be capable of performing heavy mathematical matrix transforms. The design of the simulator itself takes one of three forms: • Quantum Turing Machine • Network Model or circuit model of connected gates • Quantum Programming Language yet, some simulators are hybrid. Turing machine A Turing machine M is a finite device, which performs operations on a paper tape ([3], [5]). This tape is infinite in both directions, and is divided into same-sized squares. At any given time each square of the tape is either blank (B) or contains a single symbol from a fixed finite list of symbols s1, s2 …, sn that form the alphabet of M. M has a reading head which at any given time scans or reads a single square of the tape. Current state display window M qi Reading Head Tape ... s1 s2 s1 s3 ... Square being scanned (Figure 1: Turing Machine) M is capable of three kinds of simple operations: Replacing the symbol in the square being scanned ay another symbol from the alphabet of M, Moving the reading head one square to right, or Moving the reading head one square to left. 2 The action that M takes at any instant depends on the current state of M and the symbol currently being scanned. This dependence is described in M’s specification which consists of a finite set Q of quadruples, each of which takes one of the following forms: q i sj sk q l ⎛ 1 ≤ i, l ≤ m ⎞ ⎜⎜ ⎟⎟ q i sj R q l ⎝ 0 ≤ j, k ≤ n ⎠ q i sj L q l A quadruple qi sj α ql in Q specifies the action to be taken when the state is qi and scanning the symbol sj , as follows: 1- Operate on the tape thus: a) if α = sk erase sj, and write sk n the square being scanned; b) if α = R move the reading head one square to the right: c) if α = L move the reading dean one square to the left: 2- Change into state ql. Circuit model of computation The circuit model of computation is equivalent to Turing machine model but is nearer to real computers ([2]). The building blocks that can build any circuit are called logic gates. The functionality of logic gates is described in terms of truth table, which specifies all possible configurations of input and the corresponding output. The elementary logic gates with their truth tables are given below, where A and B denote inputs and F denotes output. (Figure 2: elementary classical logic gates) A set of connected gates accomplishing a certain computation is called a circuit. A gate called XOR (exclusive OR) and its inverse are given below. Actually, XOR is a common used circuit, so we handle it as if it is an elementary gate. (Figure 3: another two elementary logic gates) Note that: the NOT gate is reversible (as you can guess the input for any given output), while the AND gate is irreversible , so we can say that the AND gate erases information. Quantum gates are the same as the classical ones, but with maintaining the Reversibility and Length-preserving by usually outputting extra bits (ancilla bits) which usually correspond to a sufficient number of the inputs. For example, the quantum XOR gate takes two inputs, x and y say , and outputs x and the main output that is x ⊕y. |x, y〉 Æ |x, x ⊕ y〉 Hence, any classical gate can be modified to be used as a quantum gate. When studying quantum gates we usually classify them according to the number of qubits the gate operates on into 1D (1 dimensional), 2D, and 3D. The common 1D quantum gates are: ⎛1 0⎞ ⎛0 1⎞ ⎛1 0 ⎞ 1 ⎛1 1 ⎞ 1 ⎛1 − 1⎞ ⎜⎜ ⎜ ⎟⎟ ⎟⎟ ⎟⎟ ⎟⎟ ⎟ Phase _ Flip = ⎜⎜ Hadamard = NOT = Identity = ⎜⎜ NOT = ⎜⎜ 2 ⎝1 − 1⎠ 2 ⎜⎝1 1 ⎟⎠ ⎝0 1⎠ ⎝1 0⎠ ⎝ 0 − 1⎠ The common 2D quantum gates are CNOT and SWAP. The CNOT (Controlled-Not) is quantum version of the XOR operation and it indicates the interaction between two qubits. This gate has many representations besides |x, y〉 Æ |x, x ⊕ y〉 3 Input/Output transform Gate Matrix Block diagram and function first input is the control (black) If first qubit is set then, apply NOT on the second qubit, else do nothing (Figure 4: Different representations of CNOT gate) The SWAP gate can be derived from successive CNOT gates. The common 3D quantum gates are Toffoli and Fredkin which may be considered as the controlled 3D versions of CNOT and SWAP, respectively. For more about classical and quantum circuit models, you can refer to ([6], [7]) and ([1], [3]) respectively. Quantum Programming Language Quantum Programming Language is a programming language used to write programs for quantum computers. However, since – at least in the current times – any implementation of a quantum machine has to be controlled by classical device, existing quantum programming languages incorporate classical control structures such as loops (for, while, …) and conditional branching (if, if-else, … ) and allow to operate on classical and quantum data([8], [9]). The quantum programming language can be either Imperative or functional. For the imperative quantum programming, we find that the quantum pseudo-code proposed by E. Knill is the first formalized language for description of quantum algorithms([10]). This language was tightly connected with model of quantum machine called Quantum Random Access Machine (QRAM), which is an extension of the classical random access machine but with exploiting quantum resources. Examples for the imperative quantum programming include QCL (Quantum Computer Language), Q Language , and qGCL (Quantum Guarded Command Language). For the functional quantum programming, we find that during the last few years many quantum programming languages based on functional programming paradigm where proposed, exploiting the advantages of functional programming languages which allow to express algorithms clearly. Examples for the functional quantum programming include Quantum Lambda Calculus, QPL and cQPL. The first attempt to define quantum lambda calculus was made by Philip Maymin in 1996([11]). In 2003 André van Tonder has defined extension of lambda calculus suitable to prove correctness of quantum programs, with an implementation in Scheme programming language ([12]). Well-known Quantum Computing simulators Nowadays, there are many well-known quantum computing simulation implemented in many programming languages such as Matlab/Octave/Mathematica, Perl/PHP, and C/C++/Java. Some of them are just an editor or a parser and the other may have graphical user interface (GUI). Some of them are standalone and some are just a package or a toolkit to be used in later projects as an extension to the implementing language. The most known simulators implemented in Matlab/Octave/Mathematica are Quack, M-fun for QC Progs, Qubit4matlab , Quantum Octave, QuCalc , QDENSITY, qmatrix , and the Quantum Optics Toolbox for Matlab 5. However the last one is mainly for optic physics, we find it the most comprehensive package in the field and we adopted – besides others – its philosophy and many of its notations. A remarkable note is that implementing the simulator as a package or a toolkit is common in Matlab/Octave/Mathematica because of their high extensibility. The most known simulators implemented in Perl/PHP are Quantum::Superpositions, and Quantum::Entanglement. However, the majority of the community prefers C/C++/Java especially for applications associated with a master or a doctoral thesis. The most known simulators are Quantum Computer Language (QCL), Open Qubit (library), libquantum, Qubiter(compiler), QCSim , QDD (library), qsims , QGAME(Quantum Gate And Measurement Emulator), QuIDD Pro (Quantum Information Decision Diagram data structure), QuaSi (Graphical algorithm construction), Quantum Algorithm Designer, Quantum Fog(simulator and graphic programming language), Virtual quantum mechanics, jQuantum ( Quantum Computer Simulator ), Quantum Qudit Simulator ,Quantum Computer Emulator (solving Schrodinger equation ), Qdns (GUI, Quantum Designer and Network Simulator), Optical Simulator , Fraunhofer Quantum Computing Simulator (up to 31 qubit) 4 Our recommendations and adoptions We adopt features from three simulators of different implementation languages, different paradigms, and for different platforms. They are Quantum Computing Language (QCL), QUASI, and Quantum Optics Toolbox for Matlab 5 (let us give it QOTM5 acronym). QCL is the most advanced implemented quantum programming language([13]). It was implemented in C, as a standalone full integrated compiler. Its syntax and data types are similar to those in C. The basic built-in quantum data type is qreg (quantum register), which can be interpreted as an array of qubits. And here is a code snippet in QCL: qureg x1[2]; // 2-qubit quantum register x1 qureg x2[2]; // 2-qubit quantum register x2 H(x1); // Hadamard operation on x1 H(x2[1]); // Hadamard operation on the first qubit of the register x1 QCL standard library provides standard quantum operators used in quantum algorithms, with the ability to define and use user-defined operators and functions([14]). For example, the following code defines inverse_about_the_mean operator used in Grover's algorithm: operator diffuse(qureg q) { H(q); // Hadamard Transform Not(q); // Invert q CPhase(pi,q); // Rotate if q=1111.. ! Not(q); // undo inversion ! H(q); // undo Hadamard Transform } Within QOTM5, the basic data type is a “quantum array” which is a collection of one or more simple “quantum objects”([15]). Each quantum object may represent a vector, operator over some Hilbert space. In the computer, the members of a quantum array object are represented as complex-valued vectors or matrices. In Matlab, a column vector with n components is written as [c1; c2; ...; cn] where the semicolons separate the rows. In order to create a state within QOTM5 and assign it to a variable psi, we would write a command such as >> psi = qo([0.8;0;0;0.6]); The function qo constructs a quantum object from a column vector. If then we type psi at the prompt, the response is >> psi psi = Quantum object, Hilbert space dimensions [ 4 ] by [ 1 ] 0.8000 0 0 0.6000 An object of type qo contains the following fields: dims Hilbert space dimensions of each object in the array size Size of the array, specifying the number of members shape Shape of each object in the array as a 2D matrix data Data for the quantum object stored as a “flattened” 2D matrix In order to examine these fields, one may enter, for example, >> psi.dims [4] [1] >> psi.shape 41 >> psi.data (1,1) 0.8000 (4,1) 0.6000 In order to produce a unit ket in an N dimensional Hilbert space, the toolbox function basis(N, indx) creates a quantum object with a single one in the component specified by indx. Thus we have, for example, >> basis(4,2) ans = Quantum object, Hilbert space dimensions [ 4 ] by [ 1 ] 0 1 0 0 5 QOTM5 defines many basic quantum gates. It also defines many quantum operations such as tensor products. >> psi1 = qo([0.6; 0.8]); >> psi2 = qo([0.8; 0.4; 0.2; 0.4]); >> psi = tensor(psi1,psi2) psi = Quantum object, Hilbert space dimensions [ 2 4 ] by [ 1 1 ] 0.4800 0.2400 0.1200 0.2400 0.6400 0.3200 0.1600 0.3200 QuaSi is a general purpose quantum circuit simulator written at the University of Karlsruhe([16]). It is available on the web as a java-applet. The user is able to build and simulate quantum circuits in a graphical user interface. Key features are that it can simulate up to 20 qubits. It can also realize arbitrarily controlled one-qubit operations. It supports permutation-matrices and can evaluate functions. The graphical user interface consists of four main windows. The upper left window "Circuit" displays the quantum circuit you want to simulate. The upper right window displays the current system state expressed in the standard basis (|00..0〉, |00..1〉, ...|11..1〉). The lower windows display these amplitudes graphically from left to right. The left window shows the absolute value (length) and the relative phase (direction) of the amplitudes of the basis states, where the phase is indicated by the color and the absolute value by the length of each line. The right window splits the amplitudes into real (blue) and imaginary parts (red) and draws each of them. (figure 5: The upper left window "Circuit") 3. Microsoft .NET platform In order to establish the .NET platform, we need to first install the .NET Framework which is Microsoft’s latest offering in the world of cross development (developing both desktop and Web applications), interoperability, and, cross-platform development([17]). Recently, Microsoft distributes the framework with Windows operating system. .NET contains functionality that a developer can easily access. This same functionality operates within the confines of standardized data types and naming conventions. The .NET Framework consists of three parts: the Common Language Runtime, the Framework classes, and ASP.NET for web applications. Now, instead of compiling directly to hardware-specific machine code, the compilation is performed to MSIL (Microsoft Intermediate Language).The syntax of MSIL is similar to machine code, but any MSIL will need to be reinterpreted after it is deployed to the destination machine. This enables a degree of language interoperability: Software components from different languages can interact as if they were written in one language. The new Integrated Development Environment (IDE) incorporates some of the best ideas of VB 6.0 and InterDev to make it easier and more intuitive to quickly create applications using a wider variety of development resources. Among the .NET languages there are C#.NET, J#.NET, VB.NET, F#.NET, and many more, all are using and accessing the same resources in the .NET framework. 6 VB.NET is an easy, high productive programming language with the full power and functionality provided by the .NET framework. Besides its English–like syntax which increases the readability, the editor provides many magical auto–completion for all programming constructs which increases the writability. Also, VB.NET is a very flexible language, compared to another language such as C#.NET in many aspects: • VB.NET is case-insensitive. That is the capital and small cases of a letter are treated the same. • VB.NET provides both programming styles of object-oriented or structured programming. • VB.NET is customizable. For example, you can tell the editor to check for variable declarations or not. For these mentioned reasons and others, we preferred and adopted VB.NET to be the implementation language of the proposed package, although its shortage in built-in mathematical complex and matrix operations, compared to Matlab. 4. The proposed Q# Initially, we studied previous simulations (esp. QCL, QUASI, and QOTM5) and specified the implementation language to be VB.NET, then we were ready for implementation. First of all, we built a mathematical core of matrix operations. Secondly, we built a quantum core upon the mathematical core. The quantum core contains: basic qubits and register operations, basic 1D, 2D, and 3D quantum gates, and multi-view visualization of the quantum state. A case study utilizing the functionality provided by the package is then implemented. Figure 6 shows the main window for demos to show you how to use and get the most of the package. (figure 6: the main window for demos ) Defining a row vector Defining a row vector can be accomplished in many ways. For example, to define the row r =[0.8, 0, 0, 0.6], you can write one of the following lines: Dim r As RowVector = row(0.8, 0, 0, 0.6) Dim r As New RowVector(0.8, 0, 0, 0.6) Dim r = row(0.8, 0, 0, 0.6) r = row(0.8, 0, 0, 0.6) where the last way assumes either you already declared a variable named r, or you state Option Explicit Off at the beginning of the file to tell the editor to turn of checking for variable declarations. It was programmed to make the row takes any number of components as you wish. You can count the number of components in a row r by r.Width .You can access the component at index x by r(x), with x starts from 0. For example: r = row(0.8, 0, 0, 0.6) 0.8, 0, 0, 0.6 r.Width 4 r(3) 0.6 Defining a column vector Defining a column vector can be accomplished in many ways, with the ease to make the column takes any number of rows. Counting rows of a column c is by c.Height. Using tr on a column performs matrix transpose. For example: c = col(row(0.8, 0, 0, 0.6), row(1, 0, 1, 0)) 1, 0, 1, 0 0.8, 0, 0, 0.6 c.Height 2 c(1) 0.8, 0, 0, 0.6 tr(c) 1, 0.8 0, 0 1, 0 0, 0.6 7 Defining qubits and registers A qubit can be defined in three different ways: As a column vector, Using the basis function, or Specifying the quantum state, as shown below. As a column vector Hilbert space dimensions [ 2 ] by [ 4 ] 0.8, 0, 0, 0.6 psi1 = qBit(row(0.8, 0, 0, 0.6), row(0.5, 0.3, 0.2, 0.1)) 0.5, 0.3, 0.2, 0.1 Using the basis function Hilbert space dimensions [ 2 ] by [ 1 ] 1 psi2 = basis(2, 1) 0 Specifying the quantum state, where Hilbert space dimensions [ 8 ] by [ 1 ] d = down 0 u = up 1 0 0 psi3 = qState("ddu") 0 0 0 0 Once you defined qubits, you can use many provided operations such as scalar product, tensor product, summing. For example: tensor(psi1, psi2) results in: Hilbert space dimensions [ 4 ] by [ 4 ] 0.8, 0.0, 0.5, 0.0, 0.0, 0.0, 0.3, 0.0, 0.0, 0.0, 0.2, 0.0, 0.6 0.0 0.1 0.0 Also you can define a quantum register with any number of qubits, of the same size. For example: psi1 = basis(2, 1) psi2 = basis(2, 2) r = qReg(psi1, psi2) result in Register containing 2 qubits, Hilbert space dimensions [ 4 ] by [ 1 ] 0 1 0 0 with ability to access any qubit in such a register. For example: q = r(0) yields Hilbert space dimensions [ 2 ] by [ 1 ] 1 0 Defined quantum gates 1D: IDENTITY, PHASEFLIP, NOTGate (NOT), SNOT ("Square Root of NOT"), HADAMARD 2D: CNOT= XORGate 3D: FREDKIN, TOFFOLI For example, calling the IDENTITY gate, results in Hilbert space dimensions [ 2 ] by [ 2 ] 1, 0 0, 1 A worth-saying note is that : when programming those gates we did not define them as stored matrices. However, we gave them their quantum operational definition. For example, the HADAMARD gate is defined as : Dim u = qState("u"), d As = qState("d") Dim result = sum( tensor(sum(d, minus(u)), tr(u)), tensor(sum(d, u), tr(d))) Return divide(result, Math.Sqrt(2)) Displaying state diagram You can display a colorful, highly customizable diagram of one or more quantum state. The default color of the real and imaginary amplitudes are red and yellow, respectively, with the ability to manually change this sitting. The scales are automatic fixed with the range of displayed data and the size of the window. The state diagram is provided with the ability to change the view into 2D and 3D visualizations such as lines, charts, areas,…etc as preferred. 8 (figure 7: state diagram) 5. Case study: Grover Database search Classically, searching a database of N elements for a certain element to specify its index requires O(N) comparisons, and O⎛⎜ N ⎞⎟ on average. Grover's algorithm achieves the same in O N ([18]). Figure 8 shows a sample database. ⎝2⎠ index value 1 Chicago 2 Cairo 3 Mansoura ( ) M M (figure 8: sample search database) Grover's algorithm operates an N-element database, which sometimes is called Quantum Auto-associative Memory (QuAM). The basic idea of Grover's algorithm is to perform a check on all the elements several times and gradually increase the amplitude of the required state. After O N iterations, a measurement operation will give the correct answer with probability close to 1. ( ) In the sample database, |x〉 and |I(x)〉 correspond to indices and values respectively. Unitary operators applied are: U1= I – 2 |w〉 〈w| U2= 2 | p0〉 〈 p0| – I where | p0〉 is the initial state of the database and |w〉 , a target state. When a target state |w〉 is 0, then p0 = 1 N N −1 ∑x x =0 U2 is a reverse transformation on the average, and is called a Diffusion operator. U1 is a transformation of selective rotation on a target state, and is called an Oracle operator, with the following effect: f ( x) O x = (− 1) x If x is the required element then the state |x〉 is rotated through π. Where f(x) =1 if x is the target, and f(x) =0 otherwise. Tracing Grover's Algorithm When it was the time to implement a case study utilizing the package, we decided to re-implement the most of the package, initially in VB.NET, into a web Flash object with ActionScript, and then embed it into a form as if it is built in VB.NET. This weird implementation is for many reasons: • Challenging our programming skills. • Better visuality, compared to command-line textual outputs • Increasing the ability of spreading the package over other platforms other than .NET. • Execution speed, compared to other web objects such as java applets. The window for Grover's algorithm is shown in figure 9. At the first sight, the overall design of the window looks similar to that found in adopted Quasi. The window consists of two sky-blue panels with three buttons in between. The upper panel shows the circuit, with a blue indicator to track progress of execution which can be controlled using the forward and backward buttons. Each step is called a stage. The lower panel is for states. 9 indicator a stage (figure 9: Grover windows) The algorithm is restricted to the case of searching for an item out of four. We then need 2 (= log2 4) qubits and a third on for control. To specify the index of the desired item, use restart button which shows the following window: (figure 10: specifying the index) The initial state is ( |000> 1.0 + 0.0i), and here are some steps of execution: State after stage 1: |000> 0.7071067811865475 + 0.0i |100> 0.7071067811865475 + 0.0i State after stage 2: |000> 0.4999999999999999 + 0.0i |010> 0.4999999999999999 + 0.0i |100> 0.4999999999999999 + 0.0i |110> 0.4999999999999999 + 0.0i 10 State after stage 3: |001> 0.4999999999999999 + 0.0i |011> 0.4999999999999999 + 0.0i |101> 0.4999999999999999 + 0.0i |111> 0.4999999999999999 + 0.0i State after stage 4: |000> 0.3535533905932737 + 0.0i |001> -0.3535533905932737 + 0.0i |010> 0.3535533905932737 + 0.0i |011> -0.3535533905932737 + 0.0i |100> 0.3535533905932737 + 0.0i |101> -0.3535533905932737 + 0.0i |110> 0.3535533905932737 + 0.0i |111> -0.3535533905932737 + 0.0i (figure 11: first steps of execution of Grover's algorithm) we have 16 stages and a final measure (M). A better look shows that we are applying one circuit twice each of 7 stages. We think that gate symbols are self describing as H for hadamard and ⊕ for phase flip. Stage 5 is the oracle. At the end, we will find the system in the required state. 6. Conclusions Our simulator for quantum algorithms is capable of performing heavy mathematical matrix transforms, and takes the form of a package for a Quantum Programming Language, with a case study showing the ability of using it in the form of Network Model or circuit model of connected gates. We adopt features from three simulators of different implementation languages, different paradigms, and for different platforms. They are Quantum Computing Language (QCL), QUASI, and Quantum Optics Toolbox for Matlab 5. The .NET is a promising platform for computing. VB.NET is an easy, high productive programming language with the full power and functionality provided by the .NET framework. Besides its English–like syntax which increases the readability, the editor provides many magical auto–completion for all programming constructs which increases the writability. Also, VB.NET is a very flexible language, compared to another language such as C#.NET in many aspects: • VB.NET is case-insensitive. That is the capital and small cases of a letter are treated the same. • VB.NET provides both programming styles of object-oriented or structured programming. • VB.NET is customizable. For example, you can tell the editor to check for variable declarations or not. For these mentioned reasons and others, we preferred and adopted VB.NET to be the implementation language of the proposed package, although its shortage in built-in mathematical complex and matrix operations, compared to Matlab. The implementation of the package has many phases. First, we built a mathematical core of matrix operations. Secondly, we built a quantum core upon the mathematical core. The quantum core contains: basic qubits and register operations, basic 1D, 2D, and 3D quantum gates, and multi-view visualization of the quantum state, then a window for demos to show you how to use and get the most of the package. 7. Future Work We should not forget that we have just made a package or a programming library. Although this "steals" the full power of VB.NET, but for the long run it would be better to make it a standalone programming language for sake of independency. The future will be discussed in three dimensions. The first is extending the functionality of the package, a suggestion is to adopt the symbolic representation together with the current numerical. The second dimension is applying the package in some possible fields as in image processing. Finally, trying to make it a standalone full programming language for sake of independency 11 8. References [1] Andreas Klappenecker, “The Quantum Circuit Model”, Quantum computing seminar, Departments of Computer Science, Texas A&M University , 2001. [2] Rob Pike, “An Introduction to Quantum Computation and Quantum Communication”, Bell Labs, 2000 [3] G. Benenti, G. Casati, and G. Strini, “Principles of Quantum Computation and Information, Volume 1: Basic Concepts”, World Scientific, 2004. [4] M. Brocks, “Quantum Computing and Communications”, Springer, 1999. [5] N.J. Cutland, Computability: an introduction to recursive function theory, Cambridge University Press, 1980. [6] M.M. Mano, Computer System Architecture, Prentice-Hall International, 3rd ed., 1993. [7] M.M. Mano, Digital Design, Prentice-Hall International, 3rd ed, 2001. [8] S. Gay, Quantum Programming Languages: Survey and Bibliography, Bulletin of the European Association for Theoretical Computer, June 2005. [9] S. Bettelli, Toward an architecture for quantum programming PhD Thesis, Universita di Trento, 2002 [10] E. Knill, Conventions for quantum pseudocode, Los Alamos National Laboratory technical report, LAUR-96-2724, 1996. [11] P. Maymin, The lambda-q calculus can efficiently simulate quantum computers, 1997. quant-ph/9702057 [12] A. van Tonder, A Lambda Calculus for Quantum Computation, SIAM J. Comput. 33, 1109-1135, 2004. quantph/0307150 [13] B. Ömer, Quantum Programming in QCL, Master thesis (technical physics), Technical University of Vienna, 2001. [14] I. Glendinning, B. Ömer, Parallelization of the QC-lib Quantum Computer Simulator Library, Springer LNCS 3019, 2004. [15] Sze Meng Tan, A Quantum Optics Toolbox for Matlab 5, University of Auckland, Private Bag 92019, Auckland [16] QuaSi - Quantum Circuit Simulator, online version as java applet, at the site of the University of Karlsruhe [17] Cameron Wakefield and Henk-Evert Sonder,VB.NET Developer’s Guide, Syngress Publishing, 2001. [18] Qcs - Quantum computer Simulator, online tutorial, at the site of www.senko-corp.co.jp 12
6cs.PL
arXiv:1309.1963v1 [math.AG] 8 Sep 2013 SYMMETRIZATION OF MONOÏDS AS HYPERGROUPS SIMON HENRY Abstract. We adapt the construction of the Grothendieck group associated to a commutative monoı̈d to handle idempotent monoı̈ds. Our construction works for a restricted class of commutative monoı̈ds, it agrees with the Grothendieck group construction in many cases and yields a hypergroup which solves the universal problem for morphisms to hypergroups. It gives the expected non-trivial hypergroup construction in the case of idempotent monoı̈ds. Contents 1. Introduction 2. Notations 3. Universal property 4. Definition of s(B) 5. Theorem 6. Examples References 1 2 2 2 3 6 7 1. Introduction The Grothendieck group construction associates an abelian group to a commutative monoı̈d in a universal way. It is used in a large variety of mathematical situations, as for example in the construction of K-theory groups. But as soon as the monoı̈d we start from is not cancellative the Grothendieck construction looses information, and in the case of an idempotent monoı̈d, i.e. a monoı̈d fulfilling x + x = x for all x, this construction always yields the trivial group. It is known however, especially in the case of an idempotent monoı̈d (see 6.2), that there is a natural non-trivial associated hypergroup which carries more information. We develop a notion of symmetrization which agrees with the usual one for monoı̈ds such as N or R+ , gives the expected non-trivial hypergroup answer in the case of idempotent additive monoı̈ds such as Rmax + , and solves the universal problem for morphisms to hypergroups. Our main result is Theorem 5.1 which gives a necessary and sufficient condition on a commutative monoı̈d so that the proposed symmetrization yields an hypergroup. This condition means that the set of decompositions of any element, partially ordered by refinement, is filtering, so that any two decompositions admit a common refinement. It holds for the monoid of positive elements 2000 Mathematics Subject Classification. 20N20,43A62. Key words and phrases. monoı̈ds, hypergroups. 1 in a commutative totally ordered group and also for the idempotent monoı̈d associated to a totally ordered set endowed with the operation x ∨ y := max(x, y). In both cases the construction yields the desired result. 2. Notations We start by reviewing the notion of a canonical hypergroup H [3], [2]. For our applications it will be enough to consider this particular class of hypergroups and we shall simply call them hypergroups. We denote by + the hyper-composition law in H. The sum x + y of two elements in H is no longer a single element of H but a non-empty subset of H. The hyper-operation on H is a map + : H × H → P(H)∗ taking values into the set P(H)∗ of all non-empty subsets of H. Thus, ∀a, b ∈ H, a + b is a non-empty subset of H, not necessarily a singleton. One uses the notation ∀A, B ⊆ H, A + B := {∪(a + b)|a ∈ A, b ∈ B}. The definition of a (canonical) hypergroup requires that H has a neutral element 0 ∈ H (i.e. an additive identity) and that the following axioms apply: (1) x + y = y + x, ∀x, y ∈ H (2) (x + y) + z = x + (y + z), (3) 0 + x = x = x + 0, ∀x, y, z ∈ H ∀x ∈ H (4) ∀x ∈ H ∃! y(= −x) ∈ H s.t. 0 ∈ x + y (5) x ∈ y + z =⇒ z ∈ x − y. Property (5) is usually called reversibility. It follows from the other 4 axioms since x ∈ y + z =⇒ 0 ∈ (−x) + (y + z) =⇒ 0 ∈ (−x + y) + z =⇒ z ∈ x − y 3. Universal property Let B be a commutative monoı̈d denoted additively endowed with a neutral element 0. Given a hypergroup H, a map f : B → H is additive if it fulfills the following conditions: f (0) = 0 f (a + b) ∈ f (a) + f (b) ⊂ H , ∀a, b ∈ B We say that a pair (H, f ) of a hypergroup H and a map f : B → H is universal when for any additive map g : B → K to a hypergroup K there exists a unique morphism of hypergroups h : H → K such that g = h ◦ f . If it exists such a pair is unique up to canonical isomorphism. 4. Definition of s(B) Let B be a monoı̈d. One lets s(B) be the set (B × {−1, 1})/ ∼ , where ∼ is the equivalence which identifies (a, +1) ∼ (b, −1) for any pair (a, b) such that a + b = 0. The uniqueness of the additive inverse if it exists shows that this is an equivalence relation. One endows s(B) with the hypersum + given by (a, 1) + (b, 1) = (a, −1) + (b, −1) = (a, 1) + (b, −1) = {(a + b, 1)} {(a + b, −1)} {(z, 1)|z + b = a} ∪ {(z, −1)|z + a = b} 2 (1) One needs to show that this definition is compatible with the equivalence relation. Assume that b has an additive inverse b′ and let us show that (a, 1) + (b, −1) = (a, 1) + (b′ , 1). The required compatibility between + and ∼ then follows. One has (a, 1) + (b, −1) = {(z, 1)|z + b = a} ∪ {(z, −1)|z + a = b} since b has an additive inverse there exists a most one z ∈ B such that z + b = a namely z = a + b′ . If there exists z ∈ B such that z + a = b then a has an additive inverse a′ = z + b′ and z = a′ + b so that (z, −1) is equivalent to the other solution (a + b′ , 1), thus in the quotient one has (a, 1) + (b, −1) = (a, 1) + (b′ , 1). One has a canonical map i : B → s(B) which maps b to (b, 1), and it is an injection by construction. To a monoı̈d B corresponds an ordered set B≤ associated to the preorder on B: x ≤ y ⇐⇒ ∃z ∈ B, x + z = y (2) By construction, the hyperlaw (1) makes sense, i.e. gives a non-empty set for any pair, if and only if the order B≤ is a total order. 5. Theorem Theorem 5.1. (i) Let B be a monoı̈d, then s(B) is an hypergroup if and only if B fulfills the following property: ( x + z = u, z + v = y, ∀x, y, u, v ∈ B, x + y = u + v =⇒ ∃z ∈ B, (3) or x = u + z, v = z + y. (ii) Under this hypothesis (s(B), i) is the universal solution to the embedding of B in a hypergroup. Proof. (i) Assume first that s(B) is an hypergroup. Let x, y, u, v ∈ B be such that x+y = u+v. We use the notation ±a := (a, ±1) for the elements of s(B) associated to an element a ∈ B. One then has in s(B) using (1), that u ∈ (x + y) − v, and thus using associativity, that u ∈ x + (y − v). Thus there exists t ∈ (y − v) such that u ∈ x + t. There are two cases: If t is an element of B, one has u = x + t since u ∈ {x + t} = x + t and y = t + v, using (1), since t ∈ y − v. Otherwise one has t = −z with z ∈ B. Then u + z = x since u ∈ x + t = x − z and z + y = v since −z = t ∈ y − v. Thus B fulfills condition (3). Let us now assume that B fulfills condition (3). First taking u = y, v = x we find that for any pair x, y ∈ B there exists z ∈ B such that x + z = y or x = y + z. Thus B≤ is a total order and the hyperlaw (1) is well defined. Let us show that it is associative, i.e. that for a, b, c ∈ s(B) one has (a + b) + c = a + (b + c). If a, b and c have the same sign this follows from the associativity in B. One can thus assume that only one of the three is negative. Let us first show that (a + b) − c = a + (b − c). Let d ∈ (a + b) − c be positive, so that d + c = a + b. There are two cases: If there exists z ∈ B such that b = z + c and d = a + z then z ∈ (b − c) and since d = a + z one has d ∈ a + (b − c). If there exists z ∈ B such that c = z + b and a = d + z then −z ∈ (b − c) and d ∈ a − z thus d ∈ a + (b − c). Assume now that −d ∈ (a+b)−c, with d ∈ B, i.e. d+a+b = c. Then −(d+a) ∈ (b− c) and −d ∈ a−(d+a) thus −d ∈ a+(b−c) which shows that (a+b)−c ⊂ a+(b−c). 3 Let us show that a + (b − c) ⊂ (a + b) − c. The elements of a + (b − c) are of three types : the sum of a and a positive element of (b − c), the positive elements of the sum of a with a negative element of (b − c), the negative elements of the sum of a with a negative element of (b − c). We treat each case separately: Let d = a + u with u + c = b then d + c = a + u + c = a + b i.e. d ∈ (a + b) − c. Let d ∈ a − u with u + b = c then a = d + u and a + b = d + u + b = c + d i.e. d ∈ (a + b) − c. Let −d ∈ a − u with u + b = c then u = a + d thus d + a + b = c i.e. −d ∈ (a + b) − c). We have thus shown that (a+b)−c = a+(b−c). It follows that (−a+b)+c = −a+ (b+c) since c+(b−a) = (b+c)−a. In the same way one gets (a−b)+c = a+(−b+c) since c + (a − b) = (c + a) − b = (a + c) − b = a + (c − b). We have thus shown that the hyperlaw (1) is associative. One has (0, 1) ∼ (0, −1) and the condition (3) follows. Let us check (4). One has 0 ∈ (a, 1) + (b, −1) if and only if a = b. Moreover if 0 ∈ (a, 1) + (b, 1), then a+b = 0, so b = a′ is the additive inverse of a and the equivalence relation identifies (b, 1) ∼ (a, −1). Thus one gets uniqueness in all cases. (ii) Let us show that (s(B), i) is the universal solution to the embedding of B in a hypergroup. Let H be an hypergroup and f : B → H be additive. Let us show that there exists a unique extension f˜ of f to s(B) such that f˜(u + v) ⊂ f˜(u) + f˜(v). Define f˜ by f˜(a, 1) = f (a) and f˜(a, −1) = −f (a). It is well defined i.e. compatible with the equivalence relation, since if u has an additive inverse u′ in B one has 0 ∈ f (u) + f (u′ ) and f (u′ ) = −f (u). It is unique since a morphism of hypergroups fulfills h(−x) = −h(x) automatically, while f˜ = f on B. Let us check that f˜(u + v) ⊂ f˜(u) + f˜(v). Let x ∈ u + v, to show that f˜(x) ∈ f˜(u) + f˜(v) one considers two cases: If u and v have the same sign u = (u′ , 1), v = (v ′ , 1) one has x = (u′ + v ′ , 1) and f˜(x) = f (u′ + v ′ ) ∈ f (u′ ) + f (v ′ ) by additivity of f . (same argument if both are negative). If u and v have opposite signs one can assume u = (u′ , 1), v = (v ′ , −1) and x = (x′ , 1), so that x′ + v ′ = u′ . Then f (u′ ) ∈ f (x′ ) + f (v ′ ) by additivity of f . Thus f˜(u) ∈ f˜(x) − f˜(v) and one gets f˜(x) ∈ f˜(u) + f˜(v) using reversibility (5).  In order to understand better the meaning of the condition (3) of Theorem 5.1, let us reformulate P it using the following notion of refinement of a decomposition into a sum a = i∈I ai of an element P a ∈ B, where the index set I is a finite totally ordered set. We say that a = j∈J bj is a refinement of the above decomposition if the finite totally ordered set J can be decomposed as the Pdisjoint union of intervals J = ∪i∈I Ji such that for each i ∈ I one has ai = j∈Ji bj . This relation is symmetric and transitive and one has: Proposition 5.2. Let B be a commutative monoı̈d. The condition (3) holds if and only if the partially ordered set of decompositions of any element of B is filtering. Proof. To show that the filtering condition P implies condition (3), let x, y, u, v ∈ b such that x + y = u + v and let a = 1≤j≤n bj be a common refinement of the decompositions a = x + y = u + v. Then there exists k, ℓ ∈ {1, . . . , n − 1} such Pk Pn Pℓ Pn Pℓ that x = 1 bj , y = k+1 bj , u = 1 bj , v = ℓ+1 bj . Using z = k+1 bj when Pk k < ℓ and z = ℓ+1 bj when k > ℓ gives the required P Conversely P decomposition. assume that the condition (3) holds, then let a = 1≤i≤n ai , a = 1≤j≤m bj be 4 two decompositions of the same element. When n + m ≤ 4 the existence of a common refinement follows from condition (3). We assume that we have already handled the case n + m < N and consider the case n + m = N . We can assume that both n and m are > 1. We let X X x= ai , y = an , u = bj , v = bm . 1≤i≤n−1 1≤i≤m−1 We apply condition (3) to x + y = u + v. If there exists z ∈ B such that x + z = u and v + z = y, then the equality X X u= ai + z = bj 1≤i≤n−1 1≤i≤m−1 and the induction hypothesis on N give a common refinement of the form X u= uj j∈J and it is enough to adjoin v = bm as the last element to obtain the required common refinement of X X a= ai = bj 1≤i≤n 1≤j≤m If there exists z ∈ B such that x = u + z and v = y + z, then the equality X X x= bj + z = ai 1≤i≤m−1 1≤i≤n−1 and the induction hypothesis on N give a common refinement of the form X x= xj j∈J and it is enough to adjoin y = an as the last element to obtain the required common refinement.  Of course, in some good case, our construction produces the same group as the classical Grothendieck construction : Proposition 5.3. Let B be a monoı̈d satisfying condition (3), then the following conditions are equivalent : (1) s(B) is a group. (2) s(B) is the group given by the Grothendieck construction (up to unique isomorphism). (3) B is cancellative, i.e. x + a = y + a ⇒ x = y. Proof. (2) ⇒ (1) is obvious. If s(B) is the group, then it is the universal solution of the problem of sending B into the group, it is hence canonically isomorphic to the group of the Grothendieck construction which is also solution to this universal problem. One has (1) ⇔ (2). Assume (1), if x + a = y + a = z in B then in s(B), x, y ∈ z − a hence if S(B) is a group, one has x = y which show that (1) ⇒ (3). Conversely, assume (3), we have to show that s(B) is a group, i.e. that every sum give a singleton. The sum of two positive elements or two negative elements is a singleton by definition, so we only have to consider a sum of the form (a, 1) + (b, −1) = {(z, 1)|z + b = a} ∪ {(z, −1)|z + a = b}. Consider two elements in this 5 sum : if they are of the same sign then the cancellation condition shows they are equal, and if they are of opposite sign the cancellation condition shows that they are equivalent.  6. Examples Proposition 6.1. Let A be an abelian totally ordered group and P the monoı̈d of positive elements P = {x ∈ A | x ≥ 0}. Then P fulfills the condition of Theorem 5.1, and s(P ) is the group A. Proof. Let x, y, u, v ∈ P and x + y = u + v. If u ≥ x, let z = u − x ∈ P , then y − v = z and one gets that there exists z ∈ P such that x + z = u and v + z = y. If u < x let z = x − u ∈ P , then v − y = z and one gets that there exists z ∈ P such that x = u + z and v = y + z. It remains to prove that s(P ) is A. By 5.3, as P is cancellative, s(P ) is a group. In S(P ) a relation (a, 1) = (b, −1) with a and b positive, means that a + b = 0 which implies a = b = 0 so the equivalence relation involved in the definition of s(P ) only identifies (0, 1) with (0, −1). Hence there is a bijection between elements of s(P ) and elements of A : a positive element a ∈ A corresponds to (a, 1), a negative element to (−a, −1), and 0 to (0, 1) = (0, −1). The group laws on A and s(P ) agree : When we sum same sign elements then the two additions are reduced to addition in P , and in the case of elements of different signs the sum in s(P ) is given by (a, 1)+(b, −1) = {(z, 1)|z+b = a}∪{(z, −1)|z+a = b}. There are three cases : • If a − b is positive then the first set contains only (a − b, 1) and the second is empty. • If a − b is negative then the first set is empty and the second reduces to (b − a, −1). • If a = b then (a − b) is {0} in s(P ). And in all these three cases the result agrees with the sum computed in A.  Proposition 6.2. Let S be a monoı̈d such that x + x = x for all x ∈ S. Then S fulfills the condition of Theorem 5.1 if and only if the partial order S≤ is total. If this holds then, then the elements of s(S) are exactly : • 0, • The elements of the form +s with s ∈ S non zero, • The elements of the form −s with s ∈ S non zero. Moreover, the addition in the hypergroup s(S) is   x, x+y = y,  [−x, x]= {(t, ±1)|t 6 |x|}, described as follows: if |x| > |y| or x = y; if |x| < |y| or x = y; if y = −x. (4) Where | | denotes the map which sends ±a ∈ s(S) to a ∈ S. Proof. We already know that the condition of Theorem 5.1 implies that the partial order S≤ is total. Conversely, one has, for x, y ∈ S, x ≤ y ⇐⇒ x + y = y 6 since if x + b = y for some b ∈ S one gets x + y = x + (x + b) = (x + x) + b = y. Thus one has x ≤ y & y ≤ x =⇒ x = y and if the partial order S≤ is total, one gets that S is a totally ordered set with a minimal element 0 and endowed with the law x + y := sup(x, y). One needs to show that this law fulfills the condition of Theorem 5.1. Thus let x, y, u, v be such that x + y = u + v. We need to show that there exists z ∈ B such that x + z = u and v + z = y or x = u + z and v = y + z. There are two cases, either the sup occurs at the same place, say x = sup(x, y), u = sup(u, v) or it occurs at different places, say x = sup(x, y), v = sup(u, v). In the first case, assume first y ≤ v then take z = v to get x = u + z and v = y + z. If v ≤ y then take z = y to get x + z = u and y = v + z. In the second case x = sup(x, y), v = sup(u, v), take z = x = v. One has x = u + z and v = y + z. We now move to the description of s(S) : a + b = 0 in S implies that 0 = a + b = a + b + b = 0 + b = b hence that a = b = 0. So there is no other identification in the construction of s(S) than (0, 1) = (0, −1) and the description of the elements of s(S) we give in the proposition holds. If x and y are both positive (or both negative), then the addition law described in the proposition reduces to the addition of S and hence it coincide with the addition of s(S). If we are computing a sum of the form x − y with both x and y positives, then there are three cases : • if x > y then x + z can never be equal to y and y + h = x if and only if h = x hence x − y = x, • if x < y then x + z = y if and only if z = y and y + z can never be equal to x hence x − y = −y, • if x = y then x + z = y if z 6 x and y = x + z if and only if z 6 x hence x − x = [−x, x]. Which also gives the three cases of the law described in proposition 6.2.  The next corollary illustrates the fact that in good circumstances, symmetrization commutes with dequantization: max Corollary 6.3. Let S be the monoı̈d Rmax + , then the hypergroup s(S) = s(R+ ) is the dequantization R♭ (cf. [1], [4]) of the symmetrization s(R+ ) = R of the semifield of positive real numbers (with usual operations). References [1] A. Connes, C. Consani, The universal thickening of the field of real numbers, arXiv:0420079v1 [mathNT] (2012). [2] M. Krasner, A class of hyperrings and hyperfields. Internat. J. Math. Math. Sci. 6 (1983), no. 2, 307–311. [3] F. Marty, Sur une généralisation de la notion de groupe in Huitième Congres des Mathématiciens, Stockholm 1934, 45–59. [4] O. Viro Hyperfields for tropical geometry I, hyperfields and dequantization arXiv:1006.3034v2. Simon. Henry:,, Paris, F-75005 France, E-mail address: [email protected] 7
0math.AC
EFFICIENT CONSTRAINED SENSOR PLACEMENT FOR OBSERVABILITY OF LINEAR SYSTEMS VIA GREEDY ALGORITHMS arXiv:1711.08264v1 [math.OC] 22 Nov 2017 PRIYANKA DEY, NIRANJAN BALACHANDRAN, AND DEBASISH CHATTERJEE Abstract. This article deals with problems related to efficient sensor placement in linear time-invariant discrete-time systems with partial state observations. The output matrix is assumed to be constrained in the sense that the set of states that each output can measure are pre-specified. Two problems are addressed assuming purely structural conditions at the level of only the interconnections between the system being known. 1) We establish that identifying the minimal number of sensors required to ensure a desired structural observability index is NP-complete. 2) We propose an efficient greedy strategy for selecting a fixed number of sensors from the given set of sensors in order to maximize the number of states structurally observable in the system. We identify a large class of systems for which both the problems are solvable in polynomial time using simple greedy algorithms to provide best approximate solutions. An illustration of the techniques developed here is given on the benchmark IEEE 118-bus power network, which has ∼ 400 states in its linearized model. 1. Introduction Controllability and observability have been regarded as important properties of controlled dynamical systems since the seminal work of Kalman [Kal60]. In the past few decades, due to the increasing size and complexity of the dynamical systems around us, the analysis of controllability and observability of systems has gained prominence and led to a variety of studies. Examples include analysing the dynamics of power grids that span countries, understanding the chemical pathways of complex reactions in the human brain, etc [Her13, Kat11, NBW06]. Various methods have been developed for the regulation and observation of such large-scale networks, with noteworthy techniques proposed in [PKP+16, PBP15] for regulation of brain and neural networks and [OMM10] for the control of biological systems. On the one hand, the ever-increasing demand for low-cost control and quick reconstruction of past states from the observations for large-scale systems has brought to the foreground the problem of identifying a subset of the states with fewest elements that are required to “efficiently” control or observe these systems assuming exact knowledge of the system parameters. This problem may look deceptively simple, but it is a computationally difficult one: Indeed, it was proved in [Ols14] that the problem of finding precisely the smallest number of actuators to make a linear system controllable is NP-hard. In fact, it can be demonstrated that even approximating the minimum number of states to which actuators are directly attached within a multiplicative factor of log d is NP-hard, where d is the number of states in the system; an analogues statement holds for observability. On the other hand, it is imperative to control large scale systems such as power networks with the Key words and phrases. structural observability, graph theory, matching, submodular functions. 1 2 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE knowledge of only the interconnections among the states of the dynamical system because of ubiquitous modeling uncertainties and system parameters that are prone to drift over time due to ageing or structural alterations, etc. In this situation, it is still possible to address crucial system theoretic problems involving controllability and observability using tools from structural systems theory. Recall that structural systems theory deals with system-theoretic properties that depend only on the interconnections between the system states, inputs, and outputs. The locations of fixed zeroes in the system, input, and output matrices of a linear system provide crucial information about controllability, observability and other system-theoretic properties. The literature on structural system theory is comprehensive, the key concepts having been explored in several articles, e.g., [Lin74, LSB11, Ols15, PKA16]. We resort to structural system theory to deal with certain problems related to structural observability. Throughout this article we assume that the output matrix and the set of states that each output can measure are known a priori. Most systems in the real world admit only partial state observations, and one of the central problems in systems theory is the efficient recovery of the actual system states from the observations. In this connection, it is essential to understand how quickly the states can be recovered from the observations of a discrete-time linear system. The observability index characterises this property and determines the minimum number of iterations required to fully reconstruct the states of a discrete-time linear control system. The definition of structural observability index was introduced in [Mor82], and various methods required for its computation were proposed in [SDT97]. Therefore, we focus on addressing the problem of determining the minimal number of sensors/outputs required to guarantee a desired bound on structural observability index when the output matrix and the set of states to which each output is connected are pre-specified. This is the minimal sensor placement problem. We also address this problem when a “forbidden set” of states is given: the forbidden set consists of the subset of states that cannot be directly connected to any output. Recently, [SH13] provided bounds on the (controllability and) observability index for structured linear systems by employing graph-theoretic techniques, and it was proved in [Roc14] that the problem of identifying the minimum number of states to be connected to distinct outputs to ensure a specific bound on structural observability index is NP-complete. Alongwith the minimal sensor placement problem we address the problem of identifying a fixed number of outputs from the given set of outputs so that maximum number of states are structurally observable in the system. This is the cardinality constrained sensor placement problem. This particular problem becomes relevant when the permissible number of outputs may not be adequate to observe the entire system. Therefore, we need a design strategy to select outputs in such a way that maximum number of states are structurally observable in the system. In the case of small-scale networks, it is possible to solve both of the above problems by brute force, i.e., testing all possible sensor placement combinations. However, in the case of large-scale networks, testing all the combinations and identifying the subsets of sets to fulfil the objectives constitutes a hard combinatorial problem. For a simple illustration, consider the IEEE 118-bus network, for which the output matrix is typically taken to be the identity matrix Id , where d is the EFFICIENT CONSTRAINED SENSOR PLACEMENT 3 number of states in the dynamical model of IEEE 118-bus network which, in this case is 407.1 Clearly, finding brute-force solutions to the problems discussed above involves testing all the possible subsets of 407 states, which is quite impossible. Let us precisely state the problems considered in this article. Given a set of states and sensors/outputs, we consider two problems: (1) Minimal sensor placement problem: The determination of the minimal number of sensors that is essential to guarantee a specific given bound on the structural observability index of the system. We also consider a more general version of this problem by considering a “forbidden set” of states, consisting of those states that are not directly connected to any output. (2) Cardinality constrained sensor placement problem: The selection of a fixed number of sensors from the available set of sensors to maximize the number of states that can be structurally observable in the system. We identify mild condition under which both the problems are solvable in polynomial time (in the dimension of states and outputs) using simple greedy algorithms.2 The advantage of greedy algorithms is that they provide a suboptimal solutions of our hard combinatorial optimization problems in reasonable times. The key contributions of this article are as follows: ◦ We propose a polynomial time greedy algorithm for solving the minimal sensor placement problem and provide a solution that approximates up to multiplicative factor of O(log d), where d is the number of states in the system. ◦ We extend the minimal sensor placement problem by considering a “forbidden set” of states and provide an approximate solution for it. ◦ A greedy algorithm to solve the cardinality constrained sensor placement problem with an approximation ratio of (1 − 1/e) is proposed here. ◦ The above sensor-placement problems being NP-complete, these are the best possible results that can be obtained via greedy algorithms and at the level of generality considered here. The rest of this article unfolds as follows: §2 reviews certain concepts and results from discrete mathematics that will be used in this article. The precise problem statements and our main results for approaching the problems at hand to sensor placement are presented in §3. An illustrative benchmark example of an IEEE 118bus power network is presented in §4. We conclude with a summary of this article and a set of future directions in §5. 2. Preliminaries The notations employed here are standard: We denote the set of real numbers by R, the positive integers by N⋆ , and let [n] := {1, 2, . . . , n} for n ∈ N⋆ . Given a set X, we denote by |X| its cardinality. For sets X and Y , X \ Y represents the elements belonging to X and not to Y . If A ∈ Rn×n is a matrix, then Aij represents the entry located at ith row and jth column, and A(J) denotes the |J| × n submatrix of A obtained by retaining the rows in J for J ⊂ [n]. We denote by In the identity matrix of dimension Rn×n and I(J) as the submatrix of the identity matrix obtained by retaining the rows in J for J ⊂ [n]. 1The linearized model of IEEE 118-bus power network is explained in §4. 2See §3, Assumption 3.4. 4 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE 2.1. System description. Consider a linear time-invariant system ( x(t + 1) = Ax(t), (2.1) y(t) = Cx(t), t ∈ N⋆ , where x(t) ∈ Rd are the states and y(t) ∈ Rp are the outputs at time t, and A ∈ Rd×d and C ∈ Rp×d are the given state and output matrices respectively. The system (2.1) is completely described by the pair (A, C), and we shall interchangeably refer to (2.1) and (A, C) in the sequel. As stated in the introduction, in our analysis the precise numerical values of the entries of A and C will not matter, but the information about the locations of fixed zeros in A and C is necessary. For any matrix R, the sparsity matrix of R is defined as a matrix of same dimension as R with each entry as either a zero or a star, denoted by ⋆. Each nonzero entry in R is represented by ⋆ and zero entry in R is represented by 0 in its sparsity matrix. A numerical realisation of R is obtained by assigning nonzero numerical values to the star entries of the sparsity matrix of R. Let A ∈ {0, ⋆}d×d and C ∈ {0, ⋆}p×d represent the sparsity matrices of the system and the output matrices. [A] be the collection of all matrices of the same dimension and structure/sparsity as A. Given a linear time-invariant system (2.1), a digraph G(A, C) is associated with it in the following natural fashion: Let A = {v1 , v2 , . . . , vd } and C = {1, 2, . . . , p} be the state vertices and the output vertices corresponding to the states x(k) ∈ Rd and the outputs y(k) ∈ Rp of the system (2.1). Let EA = {(vj , vi ) | Aij 6= 0} and EC = {(xj , i) | Cij 6= 0}. The directed graph G(A, C) is represented as (V, E), where V = A ⊔ C and E = EA ⊔ EC , and ⊔ represents the disjoint union. In simple words, EA symbolizes the set of edges between the state vertices, and EC symbolizes the set of edges from the state vertices to the output vertices in the graph G(A, C). In a similar manner, we can define G(A) = (A, EA ) as a directed graph with vertex set A and edge set considering the edges between the state vertices. For U ⊂ A ⊔ C, the induced subgraph to U consists of U and all the edges whose endpoints are contained in U . Therefore, G(A) is the induced subgraph of G(A, C) to A. Note that the sparsity matrix of A and C are utilized to obtain a directed graph G(A, C). A sequence of edges {(v1 , v2 ), (v2 , v3 ), . . . , (vk−1 , vk )}, where each (vi , vj ) ∈ EA , is called a directed walk from v1 to vk . If there exists a directed walk from v1 to vk then it is represented as v1 → vk . Note that the vertices need not have to be distinct. The length of the walk is defined as the number of edges it contains. If a directed ℓ → vk . If all the vertices walk from v1 to vk of length ℓ exists then it is denoted by v1 − v1 , . . . , vk are distinct then a sequence of edges {(v1 , v2 ), (v2 , v3 ), . . . , (vk−1 , vk )} is called a directed path from v1 to vk . Definition 2.1. For the directed graph G(A, C) corresponding to the system (2.1) and a subset S ⊂ A, the out-neighbourhood of S is the set N + (S) = {vj | (vi , vj ) ∈ EA ⊔ EC , vi ∈ S}. Each vertex in N + (S) is termed as an out-neighbour of S. The directed graph G(A, C) is said to have a contraction if there exists a set S ⊂ A such that |N + (S)| < |S|. A fundamental connection between the system theoretic property of structural observability and certain structural/sparsity properties of G(A, C) is given by Theorem 2.2. [Lin74, Theorem 1] The following are equivalent: EFFICIENT CONSTRAINED SENSOR PLACEMENT 5 (a) The pair (A, C) is structurally observable.3 (b) The directed graph G(A, C) derived from (2.1) every state vertex vi has a directed path from vi to one of the output vertices, and G(A, C) is free of contractions. The directed graph G(A) derived above from (2.1) can also be represented by an undirected bipartite graph in the following standard fashion: H(A) := (VA1 ⊔VA2 , Γ), where VA1 := {v11 , v21 , . . . , vd1 }, VA2 := {v12 , v22 , . . . , vd2 }, and Γ = {(vj1 , vi2 ) | Aij 6= 0}. We shall need a few more definitions in the context of graph H(A). A matching M in H(A) is a subset of edges in Γ that do not share vertices. A maximum matching M in H(A) is defined as a matching M that has largest number of edges among all possible matchings. An edge e is said to be matched if e ∈ M . A vertex is said to be matched if it belongs to an edge in the matching M ; otherwise, it is unmatched. A matching M in H(A) is said to be perfect if all the vertices in H(A) are matched. Given a matching M in H(A), an M-alternating path is a path that alternates between edges in M and not in M . An M -alternating path whose endpoints are unmatched by M is an M-augmenting path. The following theorem establishes the connection between a matching M and an M -augmenting path associated with it in H(A). Theorem 2.3. [Wes96, p. 109] A matching M in a bipartite graph H is a maximum matching in H if and only if H has no M -augmenting path.4 p A maximum matching M can be found in H(A) in polynomial time O( |VA1 ⊔ VA2 | |Γ|). Note that a maximum matching M may not be unique and its non-uniqueness is illustrated via a simple example in Fig. 1. v1 v2 v3 v5 v4 v11 v12 v11 v12 v21 v22 v21 v22 v31 v32 v31 v32 v41 v42 v41 v42 v51 v52 v51 v52 Figure 1. Illustration of a digraph and its bipartite representations. The two possible maximum matchings M1 and M2 associated with the bipartite graph are depicted in dashed blue. The matched edges of M1 are: (v11 , v22 ), (v21 , v32 ), (v31 , v42 ), (v41 , v52 ), (v51 , v12 ). The matched edges of M2 are: (v11 , v22 ), (v21 , v12 ), (v31 , v42 ), (v41 , v52 ), (v51 , v32 ). Note that both the matchings M1 and M2 are perfect. In a similar manner as above, any matrix W ∈ Rm×n can be represented by an undirected bipartite graph B = (V1 ⊔ V2 , E), where V1 = {a1 , a2 , . . . , am }, V2 = {b1 , b2 , . . . , bn }, and E = {(ai , bj ) | Wji 6= 0}. Each vertex in V1 and V2 corresponds 3A pair (A, C) is structurally observable if there exists a observable pair (A , C ) of the same 1 1 dimension and structure arbitarily close to the pair (A, C); see [Lin74] and [DCW03]. 4This theorem is valid for any undirected graph G. 6 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE to a row and a column of W . The following lemma establishes the connection between the rank of the matrix W and the size of a matching M in B. Lemma 2.4. [CM13, Theorem 1] For a matrix W ∈ Rm×n , let B = (V1 ⊔ V2 , E) be its bipartite representation. If B has a matching M of size t, then there exists a numerical realization N of W for which rank(N ) ≥ t. 2.2. Structural observability index. We catalogue some important notions specific to structural observability index. The observability index µ(A, C) of (2.1) is given by n (2.2) µ(A, C) = inf k ∈ [d] rank C ⊤ (CA)⊤ · · · o  (CAk−1 )⊤ = d . The observability index µ(A, C) is the minimum number of iterations required to recover/determine uniquely the initial state x0 . In other words, x0 may be obtained by left-inversion in the linear equation     C y0     CA y1      x0 =   . .. ..     . . µ(A,C)−1 yµ(A,C)−1 CA The k-step observability matrix associated with the pair (A, C) is given by  (2.3) Ok (A, C) := C ⊤ (CA)⊤ . . . (CAk−1 )⊤ . The structural counterpart of the observability index as defined in (2.2), namely, structural observability index, is defined as ( )  (2.4) µ(A, C) := inf k ∈ [d] sup rank C ⊤ (CA)⊤ · · · (CAk−1 )⊤ = d . A∈[A] C∈[C] If the value of the infimum is +∞, which happens when none of the pairs in ([A], [C]) is observable, the problems considered here are trivially invalid. If the pair (A, C) has structural observability index µ(A, C) = ℓ, where ℓ ≤ d is some positive integer, then almost all numerical realisations of pair (A, C) with the same structure as (A, C) have observability index ℓ off a manifold with zero Lebesgue measure in 2 Rd +dp [Rei88, p. 44]. Definition 2.5. Let G(A, C) = (A ⊔ C, EA ⊔ EC ) be the directed graph associated with the pair (A, C). A set Yi (k) associated with output vertex i, where i ∈ {1, 2, . . . , p} and k ∈ {1, 2, . . . d}, defined by k → i} Yi (k) := {vj ∈ VA vj − is called output-set of i at iteration k. Yi (k) is, therefore, the set of states that are observable from output i in exactly 1 → i, then k steps. If the output i is directly connected to some vj ∈ A, i.e., vj − Yi (1) = {vi }. We also say that the state vertex vj admits output i. Therefore, for k ≥ 2 we have the iterative description Yi (k) := {vj ∈ VA (vj , vr ) ∈ EA s.t. vr ∈ Yi (k − 1)}. Definition 2.6. Let G(A, C) = (A ⊔ C, EA ⊔ EC ) be the directed graph associated with the pair (A, C). Let Z(C) = {Yi (k)}i∈C,k∈[ℓ] be the output-sets up to iterations ℓ associated with the output vertices C. A bipartite graph B(A ⊔ Z(C), E) is where the vertices of A and vertices corresponding to Z(C) forms a partition and (vi , Yj (k)) ∈ E if vi ∈ Yj (k). EFFICIENT CONSTRAINED SENSOR PLACEMENT 7 Consider the simple example in Fig. 2 as an illustration of the constructions in Definitions 2.5 and 2.6.   0 0 0 0 ⋆ 0 ⋆ 0 0 0 0 0     ⋆ 0 0 0 0 0  and C = 0 ⋆ 0 0 0 ⋆ A= 0 0 ⋆ ⋆ 0 0 0 0 0 0 ⋆ 0   0 0 ⋆ ⋆ 0 0 0 ⋆ 0 0 0 0 The digraph G(A, C) and the bipartite graph B(A ⊔ Z(C), E) is shown in Fig. 2; here Z = {Yi (k)}i∈C,k∈[3] is the set associated with the output vertices in C. v1 Y1 (1) v2 Y1 (2) v3 Y1 (3) v4 Y2 (1) v5 v5 Y2 (2) 2 v6 Y2 (3) v1 v2 v3 v6 1 v4 Figure 2. Illustration of the digraph G(A, C) and the bipartite graph B(A ⊔ Z(C), E), where Z = {Yi (k)}i∈C,k∈[3] , associated with the output vertices C = {1, 2}, defined in Definitions 2.5 and 2.6. Here Y1 (1) = {2, 6}, Y1 (2) = {1, 2}, Y1 (3) = {1, 5}, Y2 (1) = {5}, Y2 (2) = {3, 4}, Y2 (3) = {1, 3, 4}. We need a little digression into properties of submodular functions: 2.3. Submodular functions. Let V be a finite set, and let 2V denotes the collection of all subsets of V . Definition 2.7. A function f : 2V → R is submodular if for all S ⊂ T ⊂ V and v ∈ V \ T we have f (S ∪ {v}) − f (S) ≥ f (T ∪ {v}) − f (T ). A function f : 2V → R is supermodular if (−f ) is submodular. Intuitively, this property implies that adjoining an element v to the set S results in a larger increment in f than adding v to a superset T of S [Lov83]. The restriction of function f to S ⊂ V denoted by f ◦ S(·) is defined by f ◦ S(X) := f (X) for all X ⊂ S ⊂ V . Theorem 2.8. [Nar97, Theorem 9.3.4] Let S ⊂ V . If f : 2V → R is a submodular function then f ◦ S(·) is also a submodular function. Definition 2.9. A function f : 2V → R is monotone non-decreasing if for every S ⊂ T ⊂ V we have f (S) ≤ f (T ). 8 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE Let V be a finite set, let h : 2V → R be a non-decreasing submodular function, and let n ∈ N⋆ . Consider the optimization problem (2.5) minimize |∆| subject to h(∆) ≥ n. ∆⊂V The optimization problem (2.5) deals with finding a set ∆ of smallest cardinality such that the constrain h(∆) ≥ n is satisfied. The following greedy Algorithm 1 has been proposed for providing an approximate solution of (2.5), for which the subsequent theorem holds. Algorithm 1: Approximate solution to Problem (2.5). Input: h, n Output: Approximate solution ∆∗ to Problem (2.5) ∗ 1 Initialization: ∆ ← ∅ ∗ 2 while h(∆ ) < n do ∗ ∗ ∗ 3 a ← arg maxa∈V \∆∗ h(∆ ∪ {a}) − h(∆ ) ∗ ∗ ∗ 4 ∆ ← ∆ ∪ {a } 5 end while Theorem 2.10. [NW99, Chapter III, Section 3.9, Theorem 9.4] Consider the problem (2.5) with its associated data. Let ∆′ denote an optimal solution of (2.5). Suppose that Algorithm 1 terminates after k steps, with a minimizer ∆∗ , so that |∆∗ | = k and h(∆∗ ) ≥ n. Then   h(V ) − h(∅) k , ≤ 1 + log |∆′ | h(V ) − h(∆k−1 ) where h(∆k−1 ) denotes the value of h at the (k − 1)th iteration. Under the assumptions of problem (2.5), we consider a second optimization problem: maximize h(∆) ∆⊂V (2.6) subject to |∆| ≤ r, where r is a positive integer. In other words, (2.6) selects an at most r-element subset of V that maximises h. Algorithm 2 will be utilized in the subsequent theorem that provides an approximate solution of (2.6). Algorithm 2: Approximate solution to Problem (2.6). Input: h, r Output: Approximate solution to Problem (2.6) ∗ 1 Initialization: ∆ ← ∅, i ← 0 2 while i < r do ∗ ∗ ∗ 3 a ← arg maxa∈V \∆∗ h(∆ ∪ {a}) − h(∆ ) ∗ ∗ ∗ 4 ∆ ← ∆ ∪ {a } 5 i←i+1 6 end while EFFICIENT CONSTRAINED SENSOR PLACEMENT 9 Theorem 2.11. [NW99, Chapter III, Section 3.9, Theorem 9.3] Consider the problem (2.6) with its associated data. Let h(∆′ ) be the optimal value of (2.6). Let h(∆∗ ) be the value associated with the subset ∆∗ obtained from Algorithm 2. Then   1 ∗ h(∆ ) ≥ 1 − h(∆′ ). e In the next section we provide the exact problem statements and approximation algorithms to obtain a solution of the problems dealt in the sequel. 3. Sensor placement Problems In this section we address the problems related to the efficient placement of sensors/outputs in a linear time-invariant system as defined in (2.1). Specifically, we deal with: minimal sensor placement problem and cardinality constrained sensor placement problem. Recall that for a matrix W , W (J) denote the |J|×d submatrix of W obtained by retaining the rows in J. 3.1. Minimal sensor placement problem. In this subsection we consider the problem: Given A ∈ Rd×d , C ∈ Rp×d , and ℓ ∈ [d] such that µ(A, C) ≤ ℓ, minimize (P1 ) J⊂C |J| subject to µ(A, C(J)) ≤ ℓ, where C(J) is the submatrix of the output matrix C obtained by retaining the rows corresponding to output vertices in J. (P1 ) determines the minimal number of outputs required from the set of available outputs to ensure a desired structural observability index ℓ. The following is a special case of (P1 ): Given A ∈ Rd×d , C = Id , and ℓ ∈ [d], minimize (P2 ) L⊂C |L| subject to µ(A, I(L)) ≤ ℓ, where I(L) is the submatrix of the identity matrix Id obtained by retaining the rows corresponding to output vertices in L. (P2 ) determines the minimal number of state variables that must admit output so as to ensure that the structural observability index of the system (2.1) is at most ℓ. It was proved in [Roc14] that an instance of the SET COVER is polynomially transformed to an instance of (P2 ). It means that each step required to transform an instance of SET COVER to an instance of (P1 ) takes polynomial time. The overall procedure also takes polynomial time. Since (P2 ) is in the complexity class NP and the SET COVER is NP-hard, (P2 ) is NP-complete [CLRS09, Lemma 34.8]. Specifically, for parameters A and C = Id a solution to (P1 ) provides in particular, a solution to (P2 ). Therefore, (P1 ) is at least as difficult as (P2 ), which is known to be NP-complete. Theorem 3.1. (P1 ) is NP-complete. Remark 3.2. Let n1 denote the minimum number of outputs needed such that the resulting structural observability index is at most ℓ and n2 denotes the minimum number of state variables to admit output to ensure an upper bound of ℓ on the structural observability index of the system (2.1). Then n1 ≤ n2 . In other words, the minimum number of outputs required is always at most the minimum number of state variables needed to ensure a desired structural observability index. The following result characterises a pair (A, C) with specified structural observability index. 10 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE Theorem 3.3. Let A = {v1 , v2 , . . . vd } and C = {1, 2, . . . , p} be the state vertices and output vertices. Let Z(C) = {Yi (k)}i∈C,k∈[ℓ] be the output-sets up to iterations ℓ associated with the output vertices C and B(A ⊔ Z(C), E) be the corresponding bipartite graph as defined in Definition 2.6. The pair (A, C) has structural observability index µ(A, C) bounded above by ℓ if and only if the following conditions hold simultaneously: (a) There exists a matching into A in the bipartite graph B(A ⊔ Z(C), E), and (b) the directed graph G(A, C) derived from (2.1) has no contraction. Proof. (⇐=) Condition (a) ensures that every vertex vi ∈ G(A) has a directed path starting from vi and ending at one of the output vertices j ∈ C, and condition (b) ensures that G(A, C) has no contraction. Hence both the conditions of Theorem 2.2 are satisfied, structurally observability of G(A, C) follows. Consider a matrix L where the columns of L correspond to the state vertices in A and the rows of L represent the vertices corresponding to Z(C) = {Yi (k)}i∈C,k∈[ℓ] . Observe that L has precisely the same structure as the matrix Ol (A, C) defined in (2.3) and each non zero entry in L corresponds to an edge in B(A ⊔ Z(C), E). By condition (a) there exists a matching of size d in Oℓ (A, C). Hence, by Lemma 2.4 there exists a numerical realisation of Ol (A, C) such that rank(Oℓ (A, C)) ≥ d and µ(A, C) ≤ ℓ. (=⇒) It is given that the pair (A, C) has structural observability index µ(A, C) ≤ ℓ. Therefore, the pair (A, C) is structurally observable. By Theorem 2.2, G(A, C) has no contraction and every state vertex has a directed path to one of the output vertices. Hence, condition (b) is satisfied. Suppose condition (a) is not satisfied and there does not exist any matching M that saturates all the state vertices of A in B(A ⊔ Z(C), E). As a consequence of this, there exists a vertex vj ∈ A such that vj ∈ / M . Since vj ∈ / M , the minimum number of iterations r required for the rank of Or (A, C) to be equal to d is strictly greater than ℓ. Therefore, µ(A, C) > ℓ. This contradicts our assumption that µ(A, C) ≤ ℓ and completes the proof.  Here we impose the following assumption to find approximation algorithm for solving (P1 ). Assumption 3.4. Throughout it is assumed that each state vertex has a self loop in the graph G(A). Consequently, the resultant G(A, C) has no contraction.5 Before solving (P1 ), we define the function Ξ : 2C → R by (3.1) Ξ(S) := size of a maximum matching in B(A ⊔ Z(S), E) where Z(S) = {Yi (k)}i∈S,k∈[ℓ] and B(A ⊔ Z(S), E) are defined in Definition 2.6. Observation 1. Let B(D ⊔ (Y1 ⊔ Y2 ), (E1 ⊔ E2 )) be a bipartite graph. Then there exists a maximum matching M of B such that M restricted to (D ⊔ Y1 , E1 ) is a maximum matching in this induced bipartite subgraph. Proof. Let us denote M restricted to (D ⊔Y1 , E1 ) by M1 . Suppose N is a maximum sized matching in the induced bipartite subgraph on (D ⊔ Y1 ). Consider M1 ∪ N . If there is any path consisting of more edges of N than of M1 then that induces an M -augmenting path in B. By Theorem 2.3 this contradicts the maximality of M in B. Hence, every component of M1 ∪ N must have same number of edges of M1 5This is a reasonable assumption since a large class of systems, e.g., power grids, multi-agent networks, etc, exhibit this feature. EFFICIENT CONSTRAINED SENSOR PLACEMENT 11 and N . Therefore, M1 is a maximum matching in the induced bipartite subgraph on (D ⊔ Y1 ).  We prove that Ξ(·) is a submodular function. Theorem 3.5. Consider the system (2.1) and the associated sets A and C as defined in §2. Let Z(C) = {Yi (k)}i∈C,k∈[ℓ] be the output-sets up to iterations ℓ associated with the output vertices C and B(A ⊔ Z(C), E) be the corresponding bipartite graph defined in Definitions 2.5 and 2.6. Then Ξ : 2C → R defined in (3.1) is a monotone non-decreasing submodular function. Proof. We employ the following conventions in the proof. If L ⊂ C and v ∈ C, then we write Lv := L ∪ {v}. Z(L) denotes the collection of output-sets up to iterations ℓ associated with the output vertices in L. B(L) represents the bipartite graph B(A ⊔ Z(L), E), defined in Definition 2.6. Let M (L) denote a maximum matching in B(L). By the definition of Ξ(·) it is clear that for S ⊂ T ⊂ C, Ξ(S) ≤ Ξ(T ). Therefore, Ξ(·) is a monotone non-decreasing function. Let S ⊂ T ⊂ C, and suppose that v ∈ / T . To show that Ξ(·) is submodular it is enough to establish that (3.2) Ξ(Sv ) − Ξ(S) ≥ Ξ(Tv ) − Ξ(T ). If Ξ(Tv )− Ξ(T ) = 0, then (3.2) is satisfied automatically, since Ξ(Sv )− Ξ(S) ≥ 0. In general we show that if Ξ(Tv ) − Ξ(T ) = β, then Ξ(Sv ) − Ξ(S) ≥ β. Let M (Tv ) be a maximum matching of B(Tv ) that satisfies Observation 1. Therefore, the restriction of M (Tv ) to B(T ), denoted by M (T ), is a maximum matching of B(T ). Since Ξ(Tv )−Ξ(T ) = β, we must have |M (Tv )|−|M (T )| = β. Clearly, the increment of β occurs when the vertices corresponding to {Yv (k)}k∈[ℓ] are added to B(T ). Let D represents the set of vertices of A matched to the subset of vertices corresponding to {Yv (k)}k∈[ℓ] in B(Tv ). We use the matching M (T ) to obtain another maximum matching M ′ (T ) in B(T ) that satisfies Observation 1 and none of the vertices of D ⊂ A are matched by M ′ (T ). We obtain a maximum matching M (S) in B(S) by restricting the matching M ′ (T ) to B(S). A matching M (Sv ) in B(Sv ) is established by matching the vertices of D ⊂ A to the subset of vertices corresponding to {Yv (k)}k∈[ℓ] alongwith the matched edges of M (S). The matching M (Sv ) (may not be a maximum matching,) satisfies the criterion that |M (Sv )| − |M (S)| = β. Therefore, any maximum matching M ′ (Sv ) in B(Sv ) must have |M ′ (Sv )| − |M (S)| ≥ β. Hence, Ξ(Sv ) − Ξ(S) ≥ β. This proves that Ξ(·) is a submodular function.  For any S ⊂ C, the function Ξ(S) as defined in (3.1) determines the number of state vertices that are matched by a maximum matching in B(A ⊔ Z(S), E). The value of Ξ(S) lies in the interval [0, 1]; the fraction Ξ(S) takes value 1 if the system d d (A, C) is observable and µ(A, C(S)) ≤ ℓ, and 0 if no state variable is observable with µ(A, C(S)) ≤ ℓ. Based on Definition 3.1, a new version of (P1 ) is introduced: (P1′ ) minimize |S| subject to Ξ(S) ≥ 1. d S⊂C Remark 3.6. There always exists at least one S meeting the condition Ξ(S) ≥ d, namely, the set S = C; in other words, (P1′ ) is always feasible. 12 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE Theorem 3.7. Consider the system (2.1) and the associated data A, C and ℓ ∈ [d] such that µ(A, C) ≤ ℓ. Let A and C be the state vertices and output vertices as defined in §2. Let Z(C) = {Yi (k)}i∈C,k∈[ℓ] be the output-sets up to iterations ℓ associated with the output vertices C and B(A ⊔ Z(C), E) be the corresponding bipartite graph defined in Definitions 2.5 and 2.6. The function Ξ : 2C → R is defined in (3.1). Suppose that Assumption 3.4 holds. Then S ∗ is an optimal solution of (P1 ) if and only if S ∗ is an optimal solution of (P1′ ). Proof. We prove that an optimal solution of (P1 ) is an optimal solution of (P1′ ) and vice-versa. We assume that S ∗ is an optimal solution of (P1 ). By Assumption 3.4, G(A) has a perfect matching. Consequently, condition (b) of Theorem 3.3 is always satisfied irrespective of the output matrix C. Suppose S ∗ is not an optimal solution of (P1′ ). Then there exists an L ⊂ C such that |L| < |S ∗ | and Ξ(L) ≥ d. Definition 3.1 of Ξ(·) implies that a matching into A exists in B(A ⊔ Z(L), E), where Z(L) = {Yi (k)}i∈L,k∈[ℓ] . Hence, condition (a) of Theorem 3.3 is also satisfied with µ(A, C(L)) ≤ ℓ. This contradicts the assumption that S ∗ is an optimal solution of (P1 ) and completes the proof that S ∗ is also an optimal solution of (P1′ ). In the similar manner we can prove that if S ∗ is an optimal solution of (P1′ ), then S ∗ is an optimal solution of (P1 ).  Submodularity of Ξ(·) enables us to provide a greedy algorithm to find an approximate solution to (P1 ). Algorithm 3: Algorithm for solving (P1 ) Input: G(A, C), a positive number ℓ ∈ [d], and output sets {Yi (k)} i ∈ C and 1≤k≤ℓ Output: A set S ∗ ⊂ C s.t. µ(A, C(S ∗ )) ≤ ℓ ∗ ∗ 1 Initialization: S ← ∅, Ξ(S ) ← 0 ∗ 2 while Ξ(S ) < d do ∗ ∗ ∗ 3 s ← arg maxs∈C\S ∗ Ξ(S ∪ {s}) − Ξ(S ) ∗ ∗ ∗ 4 S ← S ∪ {s } 5 end while ∗ 6 return S ; exit The following theorem depicts how close the solution obtained by the greedy Algorithm 3 is from the optimal solution of (P1 ): Theorem 3.8. Let S ′ be an optimal solution of (P1 ). If Algorithm 3 terminates after step k so that |S ∗ | = k, then k |S ∗ | = ′ ≤ 1 + log d. |S ′ | |S | Proof. Theorem 2.10 asserts that the greedy algorithm for solving minimization problems of the form min{|S| Ξ(S) ≥ d}, where Ξ(·) is a non-decreasing submodular function, returns a set S ∗ satisfying   |S ∗ | Ξ(C) − Ξ(∅) , ≤ 1 + log |S ′ | Ξ(C) − Ξ(Sk−1 ) EFFICIENT CONSTRAINED SENSOR PLACEMENT 13 where Sk−1 is the set obtained in the (k − 1)th iteration of the greedy Algorithm 3. Since Ξ(∅) = 0, Ξ(C) = d, and Ξ(Sk−1 ) < d, we have   |S ∗ | d (3.3) . ≤ 1 + log |S ′ | d − Ξ(Sk−1 ) The value of Ξ(Sk−1 ) can be at most (d − 1) in the (k − 1)th iteration. Therefore, an immediate bound for the right hand side of (3.3) is   d |S ∗ | ≤ 1 + log d.  ≤ 1 + log |S ′ | d − Ξ(Sk−1 ) Remark 3.9. In the worst case, Algorithm 3 will not terminate until S = C, i.e., p iterations. Each iteration requires O(d4 ) computations. Therefore, the total runtime is O(pd4 ). This is the best bound any polynomial time algorithm can achieve assuming P 6= NP. Note that this is a worst-case bound; Algorithm 3 often performs much better than the above bound in practice, as the numerical experiments in §4 demonstrate. 3.2. Minimal sensor placement problem with forbidden set. A set of state vertices F ⊂ A is termed as forbidden if the vertices in F are not allowed to admit any output. Let F be the set of output vertices in C which are directly connected to one of the state vertices in F . Let (P1 ) is altered by including a forbidden set F and the set of vertices F which are not allowed in the solution of (P1 ). The exact statement is: Given A ∈ Rd×d , C ∈ Rp×d , F ⊂ C, and ℓ ∈ [d] such that µ(A, C) ≤ ℓ, consider minimize (3.4) J⊂C\F |J| subject to µ(A, C(J)) ≤ ℓ, where C(J) is the submatrix of the output matrix C obtained by retaining the rows corresponding to output vertices in J. Note that the output vertices in J have an empty intersection with F . By Theorem 3.5, we know that Ξ(·) is a submodular function. By Theorem 2.8, Ξ ◦ (C \ F)(·) is also a submodular function. Hence, an approximate solution of (3.4) is obtained by modifying Algorithm 3 and choosing a vertex s∗ ← arg maxs∈C\S⊔F Ξ(S ∗ ∪ {s}) − Ξ(S ∗ ) in step 3 of each iteration. Remark 3.10. Given a set F , verification of whether a solution of (3.4) is likely to exist or not is done by considering the bipartite graph B(A ⊔ Z(C \ F), E), where Z(C \ F) = {Yi (k)}i∈C\F ,k∈[ℓ] . If a matching into A exists in B(A ⊔ Z(C \ F), E), then a solution is guaranteed to exist. Since (P2 ) is a special case of (P1 ), the results and algorithms discussed above are applicable to provide a solution for (P2 ). 3.3. Cardinality constrained sensor placement. We address the problem that involves selecting a set of S output vertices of cardinality at most r (1 ≤ r ≤ p) such that the maximum number of state vertices are observable from S in the graph G(A). We define the function Ξ′ : 2C → R by (3.5) Ξ′ (S) := size of a maximum matching in B(A ⊔ Z(S), E), where S ⊂ C and Z(S) = {Yi (k)}i∈S,k∈[d] . For S ⊂ C, Ξ′ (S) determines the maximum number of state vertices observable from S with the condition that the structural observability index is at most d, i.e., µ(A, C) ≤ d. Here we aim to optimally place the outputs such that maximum 14 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE number of state vertices are observable from S. Based on Definition 3.5 of Ξ′ (S), the problem of selecting up to r output vertices is given by Ξ′ (S) S⊂C d subject to |S| ≤ r, maximize (P3 ) where i ≤ r ≤ p. Although maximizing a submodular function Ξ′ (·) is a NPhard problem, there exists efficient greedy algorithms for providing an approximate solution for (P3 ). Algorithm 4: Algorithm for solving (P3 ) Input: G(A, C), output sets {Yi (k)} i ∈ C and 1 ≤ k ≤ d and maximum number of outputs r Output: A set S ∗ ⊂ C ∗ 1 Initialization: S = ∅, i ← 0 2 while i < r do ∗ ′ ∗ ′ ∗ 3 s ← arg maxs∈C\S ∗ Ξ (S ∪ {s}) − Ξ (S ) ∗ ∗ ∗ 4 S ← S ∪ {s } 5 i←i+1 ′ ∗ 6 if Ξ (S ) = d stop 7 else go to step 2 8 end 9 end while ∗ 10 return S ; exit The following theorem depicts how close the solution obtained by the Algorithm 4, is from the optimal solution of (P3 ): Theorem 3.11. Let Ŝ be an optimal solution of (P3 ), and let S ∗ be the set returned by Algorithm 4. Then   1 Ξ′ (Ŝ) Ξ′ (S ∗ ) ≥ 1− . (3.6) d e d Proof. Theorem 2.11 asserts that for any monotone non-decreasing submodular function Ξ′ (·), the greedy algorithm returns a set satisfying Ξ′ (S ∗ ) ≥ (1−1/e)Ξ′(Ŝ), where Ξ′ (Ŝ) := max{Ξ′ (S) |S| ≤ r}.  Remark 3.12. Without loss of generality, Assumption 3.4 can be relaxed to a weaker condition of having a perfect matching in the graph G(A), e.g., the Kautz digraph K(r, n) has a perfect matching for n ≥ 2.6 Under this weaker assumption also, all the results and algorithms discussed are applicable to provide a solution for (P1 ) and (P3 ). 6The Kautz digraph K(r, n) = (V, E) has the vertex set V = the edge set E=   0, 1, . . . , r n + r n−1 − 1 (x, y) y ≡ −(xr + α)(mod r n + r n−1 ), α = 1, . . . , r . See [Xu13, Section 3.3, p. 139] for details. and EFFICIENT CONSTRAINED SENSOR PLACEMENT 15 Remark 3.13. By duality [Kai80, p. 53] between controllability and observability in linear time-invariant systems, structural controllability of (A, B) is equivalent to structural observability of (A⊤ , B ⊤ ). Thus, all the results discussed are applicable to find a minimal input configuration B(S) such that the structural controllability index µc (A, B(S)) is bounded above by ℓ, where ℓ ∈ [d] and B(S) is the submatrix of the input matrix B formed by the columns corresponding to S. 4. Illustrative example In this section we provide an illustration of our results in the context of a benchmark electrical power grids, namely, the IEEE 118-bus system. The IEEE 118-bus system corresponds to an electric power grid composed of ◦ 118 buses; ◦ 53 power generators and, ◦ 65 power loads, coupled through network interconnections. We adopt the cyber-physical model of the generators and loads proposed in [IXKM10], where the linear system is obtained via linearization at the nominal operating point. The corresponding digraph G(A) is shown in Fig. 3. The total number of vertices in G(A) is 407 and the total number of directed edges is 920. Table 1 describes the variables of interest, i.e., the state variables of generators and loads associated with the system. Table 1. State variables of the generators and loads State variable PTG PG wG aG PL wL IL Description mechanical power of turbine electrical power of generator generator’s output frequency valve opening of generator electrical power delivered to load frequency measured at load Real power consumed by load Let us assume that generator i and load j are connected to each other by a transmission line (i, j), represented in the form of a digraph in Fig. 4. The frequency component of bus i, i.e., wGi affects the dynamics of the power component of bus j, i.e., PLj , and vice-versa. This implies that there exist outgoing edges from the frequencies of the components into the powers of the components in the neighbouring buses. We provide an approximate solution to the minimal sensor placement problem (P1 ) given the linear time-invariant system that models the IEEE 118-bus system. Note that by construction, shown in Fig. 4, each vertex of the generators and the loads has a self loop. For simplicity, self loops are not depicted in Fig. 3. Therefore, Assumption 3.4 holds for G(A). We start with the output matrix C = Id , where d = 407 and Id is the identity matrix of size d× d. We employ Algorithm 3 to identify the minimal number of outputs needed to ensure a bound on the structural observability index of the system. The plot in Fig. 5 shows the variation of the minimal number of outputs required to obtain a desired structural observability index as the structural observability index varies. Fig. 5 depicts that the minimal number of outputs needed to ensure a specific structural observability index decreases with the structural observability index 16 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE Figure 3. Graphical representation of the IEEE 118-bus system, G(A). PTGi aG i ωGi PGi ILj ωLj PLj Figure 4. Illustration of digraph representation of generator i connected to load j through transmission line (i, j). of the system. If the structural observability index is small, the number of outputs required to obtain a certain structural observability index is quite large, which is natural. However, beyond a certain threshold of the structural observability index, the number of required outputs remains unchanged, i.e., the required number of outputs stays at 14 after the structural observability index crosses 30. Similarly, we provide an approximate solution of the cardinality constrained sensor placement Problem (P3 ) by using Algorithm 4. Fig. 6 depicts the variation in the number of states observable in the system as the permissible number of outputs changes. Fig. 6 portrays that the number of states observable in the graph G(A) increases with the permissible number of outputs. If the number of outputs permitted is small, the number of states observable is quite small, which is natural. However, beyond a certain threshold of the permissible number of outputs, i.e., in this case 14, all the vertices in G(A) are observable. EFFICIENT CONSTRAINED SENSOR PLACEMENT 17 90 80 Number of outputs required 70 60 50 40 30 20 10 0 10 20 30 40 50 60 Structural observability index 70 80 90 100 Figure 5. Illustration of the plot between the number of outputs required for ensuring a desired structural observability index against the structural observability index of the system. 450 Number of states observable 400 350 300 250 200 150 100 50 2 4 6 8 10 12 14 16 18 20 Maximum number of outputs Figure 6. Illustration of the plot between the number of states observable against the permissible number of outputs. 5. Concluding remarks In this article we have addressed and solved two problems of optimal sensor placement in linear systems associated with the observability of the system, namely, the minimal sensor placement problem and the cardinality-constrained sensor placement problem. Both are, in general, hard combinatorial optimization problems. However, this fact does not preclude the existence of classes, where it is possible to determine solutions efficiently. In fact, we provided simple greedy algorithms that have polynomial complexity (in the dimension of states and outputs,) to solve these 18 P. DEY, N. BALACHANDRAN, AND D. CHATTERJEE problems under a mild assumption on the structure of the system. The problems being NP-complete, these are the best possible results at the level of greedy algorithms and the level of generality considered here. By standard duality argument, all the results have analogous counterparts and interpretation for controllability and actuator placement. Future research involves determining interesting subclasses where the current problems can be solved efficiently, and identification of vulnerable connections between the states in the system whose deletion leads to sudden jumps in the observability index of the system. References [CLRS09] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms. MIT Press, Cambridge, MA, third edition, 2009. [CM13] A. Chapman and M. Mesbahi. Security and infiltration of networks: A structural controllability and observability perspective. In Control of Cyber-Physical Systems, pages 143–160. Springer, 2013. [DCW03] J. Dion, C. Commault, and J. Woude. Generic properties and control of linear structured systems: a survey. Automatica, 39:1125–1144, 2003. [Her13] A. M. Hermundstad. Structural foundations of resting-state and task-based functional connectivity in the human brain. Proceedings of the National Academy of Sciences (PNAS), 110(10):6169–6174, 2013. [IXKM10] M. D. Ilic, L. Xie, U. A. Khan, and J. M. F. Moura. Modeling of future cyber-physical energy systems for distributed sensing and control. IEEE Transactions on Systems, Man, and Cybernetics - Part A: Systems and Humans, 40(4):825–838, 2010. [Kai80] T. Kailath. Linear Systems. Prentice-Hall, Inc., Englewood Cliffs, N.J., 1980. PrenticeHall Information and System Sciences Series. [Kal60] R. E. Kalman. Contributions to the theory of optimal control. Boletı́n de la Sociedad Matemática Mexicana. Segunda Serie, 5:102–119, 1960. [Kat11] Y. Katz. Inferring the structure and dynamics of interactions in schooling fish. Proceedings of the National Academy of Sciences (PNAS), 108(46):18720–18725, 2011. [Lin74] C. T. Lin. Structural controllability. IEEE Transactions on Automatic Control, 19(3):201–208, 1974. [Lov83] L. Lovász. Submodular functions and convexity. In Mathematical Programming: The State of the Art (Bonn, 1982), pages 235–257. Springer, Berlin, 1983. [LSB11] Y. Y. Liu, J. J. Slotine, and A. L. Barabasi. Controllability of complex networks. Nature, 473(7346):167, 2011. [Mor82] H. Mortazavian. On k-controllability and k-observability of linear systems. In Analysis and optimization of systems (Versailles, 1982), volume 44 of Lecture Notes in Control and Information Sciences, pages 600–612. Springer, Berlin, 1982. [Nar97] H. Narayanan. Submodular Functions and Electrical Networks, volume 54 of Annals of Discrete Mathematics. North-Holland Publishing Co., Amsterdam, 1997. [NBW06] M. Newman, A. L. Barabási, and D. J. Watts, editors. The Structure and Dynamics of Networks. Princeton Studies in Complexity. Princeton University Press, Princeton, NJ, 2006. [NW99] G. Nemhauser and L. Wolsey. Integer and Combinatorial Optimization. WileyInterscience Series in Discrete Mathematics and Optimization. John Wiley & Sons, Inc., New York, 1999. Reprint of the 1988 original, A Wiley-Interscience Publication. [Ols14] A. Olshevsky. Minimal controllability problems. IEEE Transactions on Control of Network Systems, 1(3):249–258, 2014. [Ols15] A. Olshevsky. Minimum input selection for structural controllability. In 2015 American Control Conference (ACC), pages 2218–2223, 2015. [OMM10] G. Orosz, J. Moehlis, and R. M. Murray. Controlling biological networks by timedelayed signals. Philosophical Transactions of the Royal Society of London. Series A. Mathematical, Physical and Engineering Sciences, 368(1911):439–454, 2010. [PBP15] S. Pequito, P. Bogdan, and G. J. Pappas. Minimum number of probes for brain dynamics observability. In 2015 54th IEEE Conference on Decision and Control (CDC), pages 306–311, 2015. [PKA16] S. Pequito, S. Kar, and A. P. Aguiar. A framework for structural input/output and control configuration selection in large-scale systems. IEEE Transactions on Automatic Control, 61(2):303–318, 2016. EFFICIENT CONSTRAINED SENSOR PLACEMENT 19 [PKP+ 16] S. Pequito, A. N. Khambhati, G. J. Pappas, D. D. Šiljak, D. Bassett, and B. Litt. Structural analysis and design of dynamic-flow networks: implications in the brain dynamics. In 2016 American Control Conference (ACC), pages 5758–5764, 2016. [Rei88] K. J. Reinschke. Multivariable Control: a Graph-Theoretic Approach, volume 108 of Lecture Notes in Control and Information Sciences. Springer-Verlag, Berlin, 1988. [Roc14] P. S. Rocha. Output Selection for Large-Scale Structural Systems: a Matroid Theory Approach. Department of Electrical and Computer Engineering, Faculty of Engineering, University of Porto, Porto, Portugal, 2014. [SDT97] C. Sueur and G. Dauphin-Tanguy. Controllability indices for structured systems. Linear Algebra and its Applications, 250:275–287, 1997. [SH13] S. Sundaram and C. N. Hadjicostis. Structural controllability and observability of linear systems over finite fields with applications to multi-agent systems. IEEE Transactions on Automatic Control, 58(1):60–73, 2013. [Wes96] D. B. West. Introduction to Graph Theory. Prentice Hall, Inc., Upper Saddle River, NJ, 1996. [Xu13] J. Xu. Topological Structure and Analysis of Interconnection Networks, volume 7. Springer Science & Business Media, 2013. Systems & Control Engineering, Indian Institute of Technology Bombay, Powai, Mumbai 400076, India. E-mail address: dey [email protected] Department of Mathematics, Indian Institute of Technology Bombay, Powai, Mumbai 400076, India. E-mail address: [email protected] Systems & Control Engineering, Indian Institute of Technology Bombay, Powai, Mumbai 400076, India. E-mail address: [email protected]
3cs.SY
DeepMasterPrint: Fingerprint Spoofing via Latent Variable Evolution Philip Bontrager 1 Aditi Roy 1 Julian Togelius 1 Nasir Memon 1 arXiv:1705.07386v3 [cs.CV] 16 Feb 2018 Abstract Biometric authentication is important for a large range of systems, including but not limited to consumer electronic devices such as phones. Understanding the limits of and attacks on such systems is therefore crucial. This paper presents an attack on fingerprint recognition system using MasterPrints, synthetic fingerprints that are capable of spoofing multiple people’s fingerprints. The method described is the first to generate complete image-level Masterprints, and further exceeds the attack accuracy of previous methods that could not produce complete images. The method, Latent Variable Evolution, is based on training a Generative Adversarial Network on a set of real fingerprint images. Stochastic search in the form of the Covariance Matrix Adaptation Evolution Strategy is then used to search for latent variable (inputs) to the generator network that optimize the number of matches from a fingerprint recognizer. We find MasterPrints that a commercial fingerprint system matches to 23% of all users in a strict security setting, and 77% of all users at a looser security setting. The underlying method is likely to have broad usefulness for security research as well as in aesthetic domains. 1. Introduction Fingerprints are commonly used for authentication in a large variety of systems. They are used for unlocking doors, unlocking personal data on smartphones, and authorizing payments. A person’s fingerprint has become their new signature. Unfortunately, like a signature, fingerprints can be faked. Fingerprints are vulnerable, as are all biometric authentication methods, to presentation attacks, where the attacker presents a spoofed fingerprint to the authenti1 Department of Computer Science, New York University Tandon, Brooklyn, New York, USA. Correspondence to: Philip Bontrager <[email protected]>, Aditi Roy <[email protected]>, Julian Togelius <[email protected]>, Nasir Memon <[email protected]>. cation system (Uludag & Jain, 2004), (Ratha et al., 2001), (Matsumoto et al., 2002). Since this type of attack does not need any knowledge of the target person, image specifications or database access privileges, it represents a real threat for fingerprint verification systems used in mobile devices (Frank, 2013), (Sousedik & Busch, 2014). Further, it was recently pointed out that smartphone sensors are particularly vulnerable (Roy et al., 2017). Due to the demand for quick matches, low cost, and the decreasing space left for fingerprint sensors, smartphones use small sensors that only read part of the fingerprint (Han et al., 2014). Small sections of the fingerprint are not nearly as unique as a full fingerprint and leave smartphones open to a particularly vicious type of presentation attack. There have already been instances where hackers have used images of fingerprints to get access to peoples fingerprints. Jan Krissler was able to spoof the German Defense Ministers fingerprints just from publicly available images (Hern, 2014). In this work, we look at the case where a single synthetic fingerprint can spoof many peoples fingerprints. Previous work (Roy et al., 2017) has shown that it is possible to perform a dictionary attack on a partial fingerprint dataset with substantial accuracy using a set of carefully chosen MasterPrints, partial fingerprints that can fool fingerprint recognition software into matching a large number of people. This means it is possible to spoof fingerprints for subjects for which the attacker has no information. The work thus far has generated MasterPrints at the “template level” by manipulating the minutiae, a relatively high-level representation of fingerprints. They relied on stochastic search in the space of minutiae to generate synthetic Masterprint templates, which cannot easily be translated to high-quality fingerprint images. However, to launch a spoof-attack in practice, it is required to construct a MasterPrint at the ”image level” which can then be transferred to a real physical artifact (Feng & Jain, 2011), (Cao et al., 2014), (Jain & Cao, 2015), (Cao & Jain, 2015a). This observation motivated us to find a method for generating MasterPrint images which are visually similar to natural fingerprint images. To design MasterPrint images, there needs to be a way to feasibly search the space of fingerprint images for the ideal image. Since not all authentication systems use minutiae, it is best if minutiae are not used during the design pro- DeepMasterPrint cess. Neural networks can be used to generate synthetic fingerprint images. In particular, Generative Adversarial Networks (GAN) have shown great promise in generating images that reproduce a particular style or domain (Goodfellow et al., 2014; Goodfellow, 2016). However, their standard design is not controllable. In other words, it does not allow the generator to target additional constraints and objectives beyond reproducing the style of the training data. For a MasterPrint, we need to create a synthetic fingerprint that fools a fingerprint verification system. The verification system not only has to recognize that the image is a fingerprint, but also match the fingerprint to many different identities. Therefore, a generator network would need to be combined with a way of searching for fingerprints that are suitable for MasterPrints. In this paper, we present a novel technique for creating MasterPrints. This method uses a neural network to learn to generate images of fingerprints. It then uses evolutionary optimization to search the latent variables of the neural network for a MasterPrint. The Covariance Matrix Adaptation Evolution Strategy (CMA-ES) is used to search the input to the trained neural network for a fingerprint image a commercial fingerprint recognition software would identify as multiple people. This unique combination of evolution and generative neural networks allows the neural network to constrain the search space while the evolutionary algorithm can handle the discrete fitness function. This is the first work that creates a MasterPrint that could be directly used and proves the danger of this vulnerability. Previous work has proven the existence of this vulnerability but does not go as far as creating a method to make imagelevel MasterPrints. This work directly shows how to execute this exploit and is able to spoof 23% of the subjects in our dataset with an authentication system that has a 0.1% false match rate. With a 1% false match rate we spoof 77% of the subjects in the dataset. This work gets the state of the art one step closer to generating synthetic fingerprints that have an unacceptably high chance of unlocking any random phone. The cost of creating synthetic fingers based on images is high, but it is well documented and would only have to be done once for a MasterPrint attack. By demonstrating how to create MasterPrints, we show that this is a real vulnerability that needs to be addressed. 2. Background 2.1. Fingerprint presentation attacks Research and practice in a cybersecurity is a constant arms race between fixing vulnerabilities and discovering new ones. It is important for researchers to find vulnerabilities before bad actors so that the issue can be fixed. Sometimes it is not just necessary to show that a vulnerability exists, but show how an attack would actually be executed. This does two things for people designing secure systems: it allows them to evaluate the immediate risk of this threat, and it gives them a concrete attack vector to protect against. Research around the MasterPrint vulnerability is important for these reasons. Recently, Roy et al.(Roy et al., 2017) studied the vulnerability of fingerprint-based biometric systems that have small sensors for authentication and therefore only scan part of the fingerprint. They found these systems are highly susceptible to a type of presentation attack (Une et al., 2007) that is known as a MasterPrint attack. A MasterPrint is a biometric sample, real or synthesized, that impersonates multiple subjects’ biometrics. This type of attack does not require an individual’s biometric sample but instead is be deployed against unknown people with some probability of a successful attack. Small fingerprint scanners are too small to read the entire fingerprint and therefore the system must authenticate on just the cross-section of the finger that is read from the sensor. Since it would be impractical to require the user to place their finger the exact same way every time, these systems normally take multiple readings from the same finger during enrollment. When an input is presented to the system during verification, it compares the input against all the partial prints that it has for a subject. If a subject has n fingers in the system and there are k partial prints saved per fingerprint, then there are n × k opportunities for a match and the system only needs a match one of them. This type of setup is common on consumer mobile devices. Roy et al. (Roy et al., 2017) showed that there exist synthetic MasterPrints that serendipitously match a large proportion of the fingerprint population in a dataset. Their method represents fingerprints as minutiae templates. A minutiae template represents all the points of interest in a fingerprint. This includes where ridges end, where they split, and the angle going away from that point. Many fingerprint identification systems will first identify the minutiae in the fingerprint and then compare them to the minutiae template saved in the system. Roy et al then use a hill-climbing algorithm to search for a minutiae template to use for a MasterPrint attack; the objective function is the number of people in the database that the fingerprint matches with. However, it may be noted that the MasterPrints generated by Roy et al. cannot be used directly to launch a spoof attack. Reconstruction of ”image level” MasterPrints is needed from these ”template level” MasterPrints (Cao & Jain, 2015b). This reconstruction step is a lossy technique which may reduce the attack accuracy and relies on the authentication system to use minutiae. DeepMasterPrint In this work, we generate the MasterPrint images directly instead of working with minutiae templates. The advantage of the approach we present here is that by working at the image level it is possible to optimize for systems that don’t use minutiae, systems such as the iPhone (Apple, 2017), or where we do not have access to the appropriate input vector for minutiae, such as in the case where we only have access to a physical sensor. 2.2. Image generation Recently, there have been rapid advancements in image generation by way of neural networks. Some of the most popular methods for image generation are Fully Visible Belief Networks (FVBN), Variational Autoencoders (VAE), and Generative Adversarial Networks (GAN) (Goodfellow, 2016). FVBNs such as PixelRNN produce one pixel at a time, similar to text generation but can often be noisy in their output. VAEs, on the other hand, tend to produce very smooth outputs. Current GAN methods are perceived to produce results with fewer artifacts than FVBNs and sharper images than VAEs (Goodfellow, 2016). In the end, any of these methods could have been used with our method as long as they generate clear fingerprint images. GANs learn to generate images in an unsupervised fashion. There are two parts to GAN; a generator and a discriminator. The generator is typically a neural network that takes random noise as an input and outputs an image. The discriminator is also typically a neural network, it takes an image as an input and classifies it as real or generated. To train the generator to produce images within the domain of the sample images, training happens in three steps: 1. Provide real images to the discriminator. Train the discriminator to classify them as real. 2. Provide generated images to the discriminator. Train it to classify them as generated. 3. Provide the generator with the discriminator’s gradients. Train the generator to produce images that are classified as real. This process is repeated until the network converges on the distribution of the real data. A major difficulty during training is keeping the two networks balanced so one doesn’t get significantly better than the other. Much work since the invention of GANs has focused on stabilizing training; two popular approaches have been the Wasserstein GAN (WGAN) and WGAN with gradient penalty (Arjovsky et al., 2017; Gulrajani et al., 2017). In standard GAN training, the discriminator classifies the input as either real or generated. The difference between the real data distribution and the generated data is then measured using the Jensen-Shannon divergence (JS) (Arjovsky et al., 2017). This metric does not provide a gradient everywhere for the generator and therefore requires that the discriminator and generator are closely matched. This, in turn, makes training unstable. WGAN instead uses an approximation of the Wasserstein distance function to measure the difference between the real and fake distributions (Arjovsky et al., 2017). Since it is differentiable everywhere, it provides meaningful gradients for the generator. The two networks don’t have to be well balanced so the discriminator can be better trained preventing mode collapse. While we had success with WGAN, any GAN algorithm can be used. A recent study tested a number of GAN algorithms and found that with enough parameter tuning there was not a significant difference between them (Lui et al., 2017). If larger images are needed, recent work shows that progressive growing of GANs produces good results (Karras et al., 2017). 2.3. Evolutionary Optimization Optimization via evolutionary strategies has been used within AI for a long time. Evolutionary computation is a family of versatile optimization techniques that only need to be able to sample from a population and evaluate the relative fitness of each sample to operate. This makes evolution particularly suited to instances where the evaluation mechanism is a black box and only the final evaluation of each sample is available. The Covariance Matrix Adaption Evolutionary Strategy(CMA-ES) is a robust approach that’s been shown to work on non-linear and non-convex fitness domains (Hansen & Ostermeier, 2001). CMA-ES samples its population from a multivariate normal distribution. Each generation it updates a covariance matrix of the correlation between each variable and successful samples. This is used to update the distribution of successful samples. The model it learns is an approximation of a second-order model of the fitness function (Hansen & Ostermeier, 2001). This makes CMA-ES a powerful strategy when optimizing for difficult real-valued domains. Evolution has been used with neural networks for a long time. This has primarily occurred through neuroevolution, where evolution is used to evolve the weights and sometimes the topology of a neural network (Yao, 1999). Recently, researchers have shown that neuroevolution can be used on deep neural networks and can even compete against reinforcement learning algorithms (Such et al., 2017; Lehman et al., 2017). Our work does not involve evolving the weights of the neural networks. Instead, in our work, the neural networks are trained separately with gradient descent and evolution is applied to the network inputs. A similar DeepMasterPrint approach has recently been proposed for an interactive evolution system (Bontrager et al., 2018); the difference there is that human aesthetic preference is used as the fitness function. 3. Methods To create a MasterPrint that can be deployed as a real attack, there needs to be a fingerprint image. The ideal system for generating a MasterPrint image would be able to generate every possible image and test every possible image on all fingerprint biometric systems in existence and choose the image that matches the most people. Since it is infeasible to have access to every identity and system, it is necessary to build a MasterPrint with a sample of identities and verification systems and have it generalize. Limiting the images to images of fingerprints should help generalization. Our scaled back ideal system is able to generate any fingerprint and search over a sample of identities and matching systems to find the ideal fingerprint system. This setup not only provides an image but it also has the potential to find a better MasterPrint than previous approaches. To implement this system we developed Latent Variable Evolution. There are two parts to Latent Variable Evolution (LVE); (1) train a neural network to generate images of fingerprints (2) search the latent variables of the network (the input vector to the generator network) for a fingerprint that produces the best MasterPrint attack. To train an image generator, we use the WGAN method described earlier and then use CMA-ES to evolve the fingerprint. The method is tested on two different fingerprint datasets and with two different matching systems. 3.1. Fingerprint Generator In this work we train two generator networks, both using the WGAN algorithm. The networks are modeled after deep convolutional GAN and defined in Figure1 (Radford et al., 2015). One network is trained on a dataset of fingerprints scanned with a capacitive sensor and the other on a dataset of fingerprints rolled in ink. The networks are trained adversarially with a Wasserstein loss function and RMSProp with a learning rate of 0.00005 (Arjovsky et al., 2017). The generators are trained via minibatch. Each batch samples 64 images and 64 latent variable vectors. We trained each generator for 120,000 updates with the discriminator trained 5 times between each generator update. Originally we used deconvolutions in the generator but this kept causing blocky artifacts until we switched to upsampling with convolutions. It should be noted that there has been some work into how much of a data distribution a GAN actually learns (Arora & Zhang, 2017). Arora and Zhang tested a few GAN architectures for diversity and none of the GANs that they 1. Upsample x 2 2. Convolution 3. Tanh 128 x 128 x 3 1. Upsample x 2 2. Convolution Kernel: 3 Stride: 1 Padding: 1 3. Batch Norm 4. Relu 32 x 32 x 256 1. Dense 2. Batch Norm 3. Relu 64 x 64 x 128 16 x 16 x 512 8x8 x 1024 4x4 x 1024 100 values x ~ 𝒩(0,1) Figure 1: Generator Network Architecture. The discriminator is the inverse of this model with subsampling instead of upsampling and LeakyReLu activation functions. tested were able to model the entire data distribution well. Nevertheless, we acknowledge that WGAN will only model part of the image distribution and our technique will not be able to produce every type of fingerprint. 3.2. Searching the Space of Latent Variables Algorithm 1 Latent Variable Evolution f mr ← 1%, .1%, .01% and f ingerprint ← 12 partial 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: Gθ ← trainGAN(data) function MatchingScore(X) img ← Gθ (X) score ← 0 for f ingerprint in data do for partial in f ingerprint do if matching(img, partial, f mr) then score + + break end if end for end for return score end function M asterP rint ← CMAES(MatchingScore To create a MasterPrint we must evolve the latent variables of the generator to the optimal values. The inputs to a generator are called latent variables because their effect on the network output is only understood through the observed image. Since our network takes a hundred latent variables as input, then the optimal solution is a point in a hundred dimensional space. As shown in Figure 2, LVE samples a number of these points, converts them to images, and then DeepMasterPrint Input Latent Variables Sample from Distribution Trained Generator Evaluate Latent Variable Fitness Function Score Output Image Check for Matches Update Model of Distribution *Size based on score CMA-ES Optimization Latent Variable Fitness Function Figure 2: Latent Variable Evolution with trained network. On the left is a high level overview of CMA-ES and the box on the right shows how the latent variables are evaluated scores the images to learn the distribution over time of the best points. These optimal points are the genotypes of the MasterPrints which can then be mapped to images. LVE could use any evolutionary algorithm (or other stochastic global optimizers, such as Particle Swarm Optimization) to search the latent space. An evolutionary algorithm does not require gradients and therefore is ideal for black-box optimization. In this domain, the verification system can report how many identities match and how good each match is, but it does not provide any information about how it came to these results. There are no gradients that inform us which pixel of a MasterPrint is most or least effective. Since the fitness score for LVE is the number of identity matches, the fitness landscape is also discontinuous. Due to the hierarchical nature of convolutional networks, the latent variables are also not independently separable. For these reasons, it is important to use an evolutionary technique that works well on rugged fitness domains, such as CMA-ES (Hansen & Ostermeier, 2001). Since CMA-ES learns a covariance matrix of the latent variables, it can also intelligently mutate the correlated variables. In this work, we use Hansens Python implementation of CMA-ES (Hansen, 2006). To evolve each fingerprint, we let the algorithm run for 3 days. As detailed in Algorithm 1, the fitness score is the sum total of identity matches. Each identity is represented by 12 partial fingerprints. To be verified, only one of the 12 partial fingerprint templates has to match. This is the fundamental weakness that MasterPrint is exploiting. The fitness of a latent variable involves converting each set of latent variables to an image, checking images against all the partial prints in the verification system, and then summing up the unique identities that have at least one match. Using a discrete score discourages the system from matching all the identities a little while not having many complete matches. For our work, we use two different fingerprint verification systems. We use the widely deployed commercial fingerprint system, VeriFinger 9.0 SDK. This system is used in the fitness function in Algorithm 1 To be able to test how well optimization for one black-box transfers to another, we also use the Bozorth3 system. This system is provided open source by NIST as part of their NIST Biometric Image Software (NBIS). Both systems identify minutiae points on the fingerprint and then do matching via these points. 3.3. Experimental Setup Smartphones are the primary focus of a MasterPrint attack due to their smart sensors. Since smartphone systems currently use capacitive sensors, we evolve our MasterPrints for a capacitive dataset. We evolve the MasterPrints on the VeriFinger system, which is the current benchmark system used for MasterPrints. To stay consistent with previous work, we evolve MasterPrints for three different security levels, therefore we get 6 MasterPrints with the two generators. In the work of Roy et al. (Roy et al., 2017), they evolve minutiae points for a 1%, 0.1%, and 0.01% False Match Rate (FMR). The FMR is the probability that an impostor fingerprint will be marked as a match. If the FMR is set too high, the system is not very secure. If it is too low, it will reject too many legitimate fingerprint readings. DeepMasterPrint To verify that our MasterPrints generalize well we split the capacitive dataset in half, a test set and a training set. The test set is used for scoring the candidate MasterPrints during optimization. The MasterPrint should do well against these fingerprints as it is directly optimized for them. We test the generators on the test set to show how well the attack generalizes. The capacitive MasterPrints show the results for a scenario where the attacker can get similar data to the system while the rolled MasterPrints are from a completely different dataset to test the robustness of the attack. To test the effectiveness of a MasterPrint attack in the case where one does not have access to the target matching system, we test our MasterPrints on the Bozarth3 matching system using the same test set. The MasterPrints are not optimized for this verification system or the identities. This would be the easiest of our attack to perform in real life. 4. Datasets In this work, we model two types of fingerprint images; those scanned from rolled impressions and those obtained from a capacitive sensor. Rolled fingerprints are produced by applying ink to the finger and rolling the finger on paper. Capacitive sensors record ridge information based on where the finger contacts the sensor. 4.1. Rolled images The rolled fingerprints come from the publicly available NIST Special Database 9 fingerprint dataset (Watson, 1993). The dataset consists of all 10 fingerprints of 5400 unique subjects. Each fingerprint is an 8-bit grayscale image. For each subject, the right thumbprint is selected since that is a common finger used in authentication systems. The images are preprocessed by cropping out the whitespace and then downscaling to 256 × 256 pixels. To get partial fingerprint samples, a random 128 × 128 region is selected every time an image is selected. 4.2. Capacitive images The capacitive fingerprint images come from the FingerPass DB7 dataset (Jia et al., 2012). This dataset has 12 partial fingerprints per each of its 720 subjects. Each partial print is of size 144 × 144 pixels at a resolution of 500 dpi. This is similar to what is scanned by an iPhone (Apple, 2017). This is the same dataset used by Roy et al. (Roy et al., 2017). 5. Results 5.1. Generated fingerprints The results of training the WGAN generator can be seen in Figure 3. In the right column are the generated images, the left column contains samples from the actual datasets. The image generator seems to have captured the basic structures in both instances. Figure 3a shows partial fingerprints for rolled fingerprints from the NIST dataset. Looking at the right batch, it is clear that the generator has learned the general ridge structure of a fingerprint. Looking closer, there are certain areas that look smudged. Most likely due to the fact that the data is generated from random sections of the fingerprint, the generator had a difficult time learning the more global shapes of a fingerprint. From visual inspection, it appears to have learned the texture. Some of the generated results do look like real fingerprints. Figure 3b displays the results for the capacitive fingerprints. The results look better for this dataset. There are fewer smudges on the images and the ridges are better connected. Looking at larger batches, the generated capacitive images are more consistently good than the rolled images. This is likely because the capacitive data is cleaner and there is far less detail to learn. To evaluate the images as fingerprints we can extract the minutiae points from the image. The randomly generated images have a similar number of minutiae points to real images in the dataset. Something interesting we noticed is that the generated images on average had double the False Match Rate as the real data. This means that without evolution, the fingerprints are already twice as good at spoofing a system than a random real fingerprint. This suggests that the generated images display common features more often than the real data distribution. As a sanity check, we provide images of randomly generated noise to the Verification systems and they found no minutiae points. This means that the generator is not only producing images that look like fingerprints to humans, but they are algorithmically being identified as fingerprints too. 5.2. MasterPrints The MasterPrints created via LVE can be seen in Figure 4. On the left are the MasterPrints optimized for the highest level of security and on the right are the ones for the lowest level of security. The results look very similar across different security settings but not between datasets. The evolutionary algorithm is able to get more distorted images by sampling latent variables far outside the distribution used to train the generator network. This occurred in these MasterPrints with the average latent value more than three standard deviations outside the original sampling distribution in some cases. This is not necessarily a problem as the images are still identified as fingerprints with around 20 minutiae points identified per MasterPrint. In Table 1 the percentage of false subject matches are dis- DeepMasterPrint (a) Real (left) and generated (right) samples for the NIST dataset. (b) Real (left) and generated (right) samples for the FingerPass capacitive dataset. Figure 3 5.2.1. ROLLED M ASTER P RINTS The three rolled MasterPrints make up the top of Figure 4. At the lowest security level, 1% FMR, a single MasterPrint is able to match with 78% of the people in the dataset. This is a large number of subjects but it is unlikely that many systems are running with this low of a security setting. At the 0.1% FMR level, the MasterPrint matches 8.61% of the dataset. This represents a much more realistic security expectation and is a much higher number of matches than the FMR would lead one to expect. At the highest security level (FMR 0.01%), the attack results arent very good, but this is also an unlikely security level as it would be inconvenient to the user. Figure 4: Evolved MasterPrints for rolled fingerprints (top) and for capacitive fingerprints (bottom). Left to right, each fingerprint is optimized for an FMR at 0.01%, 0.1%, and 1% respectively. played. The number of false subject matches is the number of subjects in the dataset that the MasterPrint matches. The second row in the table shows the results on the VeriFinger system when used with the test data. The third row is the percentage of subjects matched to each MasterPrint by the Bozorth3 system. The results show the level to which LVE created MasterPrints work on unseen verification systems. A very interesting part of the results is how well these MasterPrints do on the Bozorth3 verification system. These fingerprints are not optimized for it and yet the results are still good. At the medium security setting, the MasterPrint actually does better on the Bozorth3 system. This suggests that the fingerprint features in the MasterPrint that allow it to match so many subjects have general properties and it is not just targeting quirks in the VeriFinger system. Since both systems are minutiae based, it does not suggest generality beyond minutiae systems but it is an important first step in showing that these results are applicable. DeepMasterPrint Table 1: Attack accuracy of MasterPrints from Figure 4 on the capacitive training and test data using two authentication systems. VeriFinger Training VeriFinger Test Bozorth3 Test Rolled MasterPrint Matches 0.01% FMR 0.1% FMR 1% FMR 5.00% 13.89% 67.50% 0.28% 8.61% 78.06% 0.14% 16.25% 55.83% 5.2.2. C APACITIVE M ASTER P RINTS The three capacitive MasterPrints make up the bottom row of Figure 4. Since all the match rates are for capacitive data, the capacitive MasterPrints are much more visually similar to the subject data than the rolled MasterPrints. This should allow these MasterPrints to do better than the rolled MasterPrints. Looking at Table 1, the results are, as a whole, a little better than the rolled MasterPrints. At the 0.01% FMR level, the results are much better. A one in five subject match rate is very bad for an authentication system. The results on the Bozorth3 system are not nearly as good as what is seen with the rolled MasterPrint. One explanation for this is that the Bozorth3 system is designed and tested for the NIST data which consists of rolled fingerprint impressions. It may struggle with the capacitive MasterPrints. The images produced by the capacitive generator have much thicker ridges which mean the model might be less flexible in targeting the system. The rolled MasterPrints are for the most part coherent while the capacitive MasterPrints have a lot of noise at the center of the image. Noise can easily target an individual system, but it does not usually transfer. Figure 4 supports this observation. 5.2.3. C OMPARATIVE R ESULTS In our work, we created a MasterPrint that’s intended to spoof a system in a single try. Previous work had much worse success when only given a single attempt. Besides also providing an image, LVE creates a much more effective MasterPrint. Table 2 has the results of the minutiae approaches and the capacitive DeepMasterPrint. In the work by Roy et al. (Roy et al., 2017), they also evolved a suite of five fingerprints that can be used sequentially in the case where a system gives someone five attempts. Our result for a single MasterPrint is comparable to this suite of MasterPrints. We would expect LVE would do very well in creating a suite of sequential MasterPrints too. Capacitive MasterPrint Matches 0.01% FMR 0.1% FMR 1% FMR 6.94% 29.44% 89.44% 1.11% 22.50% 76.67% 0.00% 5.28% 6.67% Table 2: Percentage of subjects matched from our capacitive DeepMasterPrint and from previous state of the art results on VeriFinger. 0.01% FMR 0.1% FMR 1% FMR 1.88% 6.88% 1.11% 6.60% 30.69% 22.50% 33.40% 77.92% 76.67% MasterPrint MasterPrint Suite DeepMasterPrint ification systems. The first step is to train a GAN on a fingerprint dataset. Then LVE searches the latent variables of the image generator network for an image that maximizes the number of people identified as belonging to that fingerprint. The results of our method (1) improved the state of the art in terms of number of individuals identified as, and importantly (2) for the first time generates complete MasterPrint images, taking us a large step closer to a practical MasterPrint attack. Testing with two different fingerprint recognition systems, and two different datasets, show that the method is robust and not dependent on the artifacts of any particular fingerprint recognition system. Future testing should verify the effectiveness of this system in the wild, against e.g. smartphone fingerprint recognition systems. It is also plausible that the method could be extended to many other biometric modalities that are vulnerable to presentation attacks. Beyond the application of MasterPrints, this paper successfully shows the usefulness of searching the latent space of a generator network for images, or other artifacts, that meet a given objective. This idea is surprisingly under-explored and could be useful in computational creativity research as well as other security domains; see initial work on using a similar approach for aesthetic purposes in an interactive setting (Bontrager et al., 2018). Acknowledgement 6. Conclusion This paper presents Latent Variable Evolution as a method for generating MasterPrint images; partial fingerprints which can be used for dictionary attacks on fingerprint ver- We are thankful to NVIDIA for donating GPUs that were used for this project. DeepMasterPrint References Apple. ios security - white paper, 2017. Arjovsky, Martin, Chintala, Soumith, and Bottou, Léon. Wasserstein gan. arXiv preprint arXiv:1701.07875, 2017. Arora, Sanjeev and Zhang, Yi. Do gans actually learn the distribution? an empirical study. arXiv preprint arXiv:1706.08224, 2017. Bontrager, Philip, Lin, Wending, Togelius, Julian, and Risi, Sebastian. Deep interactive evolution. In International Conference on Evolutionary and Biologically Inspired Music and Art. Springer, 2018. Hansen, Nikolaus and Ostermeier, Andreas. Completely derandomized self-adaptation in evolution strategies. Evolutionary computation, 9(2):159–195, 2001. Hern, Alex. Hacker fakes german minister’s fingerprints using photos of her hands. Guardian News and Media, 2014. Jain, Anil K and Cao, Kai. Fingerprint image analysis: role of orientation patch and ridge structure dictionaries. Geometry Driven Statistics, 121:288, 2015. Cao, Kai and Jain, Anil K. Learning fingerprint reconstruction: From minutiae to image. Information Forensics and Security, IEEE Transactions on, 10(1):104–117, 2015a. Jia, Xiaofei, Yang, Xin, Zang, Yali, Zhang, Ning, and Tian, Jie. A cross-device matching fingerprint database from multi-type sensors. In Pattern Recognition (ICPR), 2012 21st International Conference on, pp. 3001–3004. IEEE, 2012. Cao, Kai and Jain, Anil K. Learning fingerprint reconstruction: From minutiae to image. IEEE Transactions on information forensics and security, 10(1):104–117, 2015b. Karras, Tero, Aila, Timo, Laine, Samuli, and Lehtinen, Jaakko. Progressive growing of gans for improved quality, stability, and variation. arXiv preprint arXiv:1710.10196, 2017. Cao, Kai, Liu, Eryun, and Jain, Anubhav K. Segmentation and enhancement of latent fingerprints: A coarse to fine ridgestructure dictionary. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 36(9):1847–1859, 2014. Lehman, Joel, Chen, Jay, Clune, Jeff, and Stanley, Kenneth O. Safe mutations for deep and recurrent neural networks through output gradients. arXiv preprint arXiv:1712.06563, 2017. Feng, Jianjiang and Jain, Anil K. Fingerprint reconstruction: from minutiae to phase. Pattern Analysis and Machine Intelligence, IEEE Transactions on, 33(2):209–223, 2011. Lui, Mario, Kurach, Karol, Michalski, Marcin, Gelly, Sylvain, and Bousquet, Olivier. Are gans created equal? a large-scale study. arXiv, 2017. URL https://arxiv. org/pdf/1711.10337.pdf. Frank. Chaos computer club breaks apple touchid, 2013. URL https://www.ccc.de/en/updates/ 2013/ccc-breaks-apple-touchid. Goodfellow, Ian. Nips 2016 tutorial: Generative adversarial networks. arXiv preprint arXiv:1701.00160, 2016. Goodfellow, Ian, Pouget-Abadie, Jean, Mirza, Mehdi, Xu, Bing, Warde-Farley, David, Ozair, Sherjil, Courville, Aaron, and Bengio, Yoshua. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014. Gulrajani, Ishaan, Ahmed, Faruk, Arjovsky, Martin, Dumoulin, Vincent, and Courville, Aaron C. Improved training of wasserstein gans. In Advances in Neural Information Processing Systems, pp. 5769–5779, 2017. Matsumoto, Tsutomu, Matsumoto, Hiroyuki, Yamada, Koji, and Hoshino, Satoshi. Impact of artificial gummy fingers on fingerprint systems. In Electronic Imaging, pp. 275– 289. International Society for Optics and Photonics, 2002. Radford, Alec, Metz, Luke, and Chintala, Soumith. Unsupervised representation learning with deep convolutional generative adversarial networks. arXiv preprint arXiv:1511.06434, 2015. Ratha, Nalini K, Connell, Jonathan H, and Bolle, Ruud M. An analysis of minutiae matching strength. In Audioand Video-Based Biometric Person Auth., pp. 223–228. Springer, 2001. Han, Byron B, Marciniak, Craig A, and Westerman, Wayne C. Fingerprint sensing and enrollment, April 3 2014. US Patent App. 14/244,143. Roy, Aditi, Memon, Nasir, and Ross, Arun. Masterprint: Exploring the vulnerability of partial fingerprint-based authentication systems. IEEE Transactions on Information Forensics and Security, 2017. Hansen, Nikolaus. The cma evolution strategy: a comparing review. Towards a new evolutionary computation, pp. 75–102, 2006. Sousedik, Ctirad and Busch, Christoph. Presentation attack detection methods for fingerprint recognition systems: a survey. IET Biometrics, 3(4):219–233, 2014. DeepMasterPrint Such, Felipe Petroski, Madhavan, Vashisht, Conti, Edoardo, Lehman, Joel, Stanley, Kenneth O, and Clune, Jeff. Deep neuroevolution: Genetic algorithms are a competitive alternative for training deep neural networks for reinforcement learning. arXiv preprint arXiv:1712.06567, 2017. Uludag, Umut and Jain, Anil K. Attacks on biometric systems: a case study in fingerprints. In SPIE Electronic Imaging, pp. 622–633. Intl Society for Optics and Photonics, 2004. Une, Masashi, Otsuka, Akira, and Imai, Hideki. Wolf attack probability: A new security measure in biometric authentication systems. In International Conference on Biometrics, pp. 396–406. Springer, 2007. Watson, Craig I. Nist special database 9, mated fingerprint card pairs. National Institute of Standard and Technology (February 1993), 1993. Yao, Xin. Evolving artificial neural networks. Proceedings of the IEEE, 87(9):1423–1447, 1999.
1cs.CV
Improved Capacity Upper Bounds for the Discrete-Time Poisson Channel João Ribeiro∗ arXiv:1801.02745v4 [cs.IT] 8 Mar 2018 Mahdi Cheraghchi Abstract We present new capacity upper bounds for the discrete-time Poisson channel with no dark current and an average-power constraint. These bounds are a simple consequence of techniques developed by one of the authors for the seemingly unrelated problem of upper bounding the capacity of binary deletion and repetition channels. Previously, the best known capacity upper bound in the regime where the averagepower constraint does not approach zero was due to Martinez (JOSA B, 2007), which we re-derive as a special case of our framework. Furthermore, we instantiate our framework to obtain a closed-form bound that noticeably improves the result of Martinez everywhere. 1 Introduction We study the capacity of the classical discrete-time Poisson (DTP) channel. Given an input x ∈ R≥0 , the channel outputs a sample from Poisson distribution with mean x + λ, where λ ≥ 0 is a channel parameter called the dark current. The DTP channel is motivated by applications in optical communication, involving a sender with a photon-emitting source and a receiver that observes the arrived photons (some of which may not have originated in the sender’s source, hence the dark current parameter) [SS90]. The capacity of the DTP channel is infinite if there are no constraints on the input distributions. For this reason, a power constraint should be imposed on the input distribution. The most typical choice, that we consider in this work, is an average-power constraint µ ∈ R≥0 , under which only input distributions X satisfying E[X] ≤ µ are allowed. Several works also consider the case where a peak-power constraint is imposed on X, i.e., X ≤ A for some fixed A ∈ R>0 with probability 1 (e.g., [LM09, LSVW11, WW14, SSEL15, AAG+ 15]). Currently, no expression for the capacity of the DTP channel under an average-power constraint is known. Consequently, there has been considerable interest in obtaining sharp bounds and in determining the asymptotic behavior of the DTP channel capacity in several settings, and in investigating properties of capacity-achieving distributions. We focus on upper bounds for the capacity of the DTP channel with λ = 0 under an average-power constraint µ. Note that any such upper bound is also a capacity upper bound for the DTP channel with λ > 0, as such a channel can be simulated from the DTP channel with λ = 0 by having the receiver add an independent Poisson random variable with parameter λ to the output. 1.1 Previous work The two main regimes for studying the asymptotic behavior of the DTP channel capacity are when µ → 0 and µ → ∞. Brady and Verdú [BV90] studied the asymptotic behavior of the capacity under an averagepower constraint µ when µ → ∞ and µ/λ is kept fixed. Later, Lapidoth and Moser [LM09] studied the same problem when λ is constant, with and without an additional peak-power constraint. When µ → 0, Lapidoth et al. [LSVW11] determined the first-order asymptotic behavior of the capacity when µ goes to zero, both when µ/λ is kept constant and when λ is fixed, with and without a peak-power constraint. Later, Wang and Wornell [WW14] improved their result when µ/λ is constant. Obtaining capacity upper bounds for the DTP channel has been a major subject of interest. Explicit asymptotic capacity upper bounds for the DTP channel under an average-power constraint can be found ∗ Department of Computing, Imperial College London, UK. Emails: {m.cheraghchi, j.lourenco-ribeiro17}@imperial.ac.uk. 1 in [LM09, LSVW11, WW14, AAG+ 15]. The current best non-asymptotic upper bound, which is in fact the best capacity upper bound outside the limiting case µ → 0, was derived by Martinez [Mar07]. However, its proof contains a small gap, as mentioned in [LM09], and is not considered completely rigorous. A more detailed discussion of these upper bounds and of the asymptotic behavior of the capacity can be found in Section 3. While we focus on capacity upper bounds, we mention that explicit (asymptotic and non-asymptotic) capacity lower bounds for several settings have been derived in [Mar07, LM09, CHC10, LSVW11, WW14, YZWD14]. Other aspects and settings of the DTP channel have also received attention recently. Cao, Hranilovic, and Chen [CHC14a, CHC14b] studied the shape of capacity-achieving distributions for the DTP channel, a topic which was first studied by Shamai [SS90]. A generalization of the DTP channel was studied by Aminian et al. [AAG+ 15], where simple and general capacity upper bounds in the presence of averageand peak-power constraints are also given for the classical DTP channel. Sutter et al. [SSEL15] studied numerical algorithms for approximating the capacity of the DTP channel in the presence of both averageand peak-power constraints, and obtain sharp capacity bounds in this setting. 1.2 Our contributions and techniques In this work, we derive improved capacity upper bounds for the DTP channel with λ = 0 under an averagepower constraint. Our technique is based on a natural convex duality formulation developed by Cheraghchi [Che17] for the seemingly unrelated problem of upper bounding the capacity of binary deletion and repetition channels. We show that the result of Martinez [Mar07] can be effortlessly obtained as an immediate special (suboptimal) case of our results, thus giving a remarkably simple and rigorous proof for this bound. Furthermore, we extract two improved bounds from our more general result (Theorem 5); one involving the minimization of a smooth convex function over (0, 1), as well as a closed-form bound (Theorem 7). Both of these bounds are strictly and significantly tighter than the bound by Martinez for all µ > 0. Thus, we obtain the current best capacity upper bounds for the DTP channel with λ = 0 under an average-power constraint µ for all values of µ outside the limiting case µ → 0. An additional feature of our results is that they are remarkably simple to derive. The rest of the article is organized as follows: In Section 2 we introduce our notation. Further discussion of the best previously known bounds, along with the asymptotic behavior of the capacity when λ = 0, appear in Section 3. The duality-based framework and the derivation of our upper bounds (including the bound by Martinez as a special case) are presented in Section 4. Finally, we compare the bounds from Section 4 with those from Section 3 in Section 5. 2 Notation We denote the capacity of the DTP channel with average-power constraint µ and λ = 0 by C(µ). We measure capacity in nats per channel use and denote the natural logarithm by log. The Kullback-Leibler divergence between X and Y is denoted by DKL (XkY ). 3 Previously known upper bounds and asymptotic results In this section, we survey the best previously known capacity upper bounds and the known results on the asymptotic behavior of C(µ). The asymptotic regimes considered in the literature are when µ → 0 and µ → ∞. In the small µ regime, Lapidoth et al. [LSVW11] showed that lim µ→0 C(µ) = 1. µ log(1/µ) Moreover, they gave the following upper bound matching the asymptotic behavior [LSVW11, expression 2 (86)], C(µ) ≤ −µ log p − log(1 − p) +    1 µ 1 Γ̄(1/2, 1/β) √ + + µ · max 0, log β + log , β 2 2β π (1) where p ∈ (0, 1) and β > 0 are free constants, and Γ̄ is the upper incomplete gamma function. It is easy to µ . see that the optimal choice for p is p = 1+µ Later, Wang and Wornell [WW14] determined the higher-order asymptotic behavior of C(µ) in the small µ regime, where it was shown that C(µ) = µ log(1/µ) − µ log log(1/µ) + O(µ) when µ → 0. This was previously noted by Chung, Guha, and Zheng [CGZ11], although they only proved the result for a more restricted set of input distributions (as mentioned in [WW14]). Wang and Wornell [WW14, expression (180)] gave an upper bound (valid for small enough µ) matching this asymptotic behavior; namely, !     1 1 1 C(µ) ≤ µ + µ log log + log + µ log + µ · sup φµ (x), (2) 1 µ 1−µ 1 − log(1/µ) x≥0   −x x . where φµ (x) := 1−ex log µ log(1/µ) In the large µ regime, Lapidoth and Moser [LM09] showed that lim µ→∞ 1 C(µ) = . log µ 2 The best upper bound in this regime (and, in fact, anywhere outside the asymptotic limit µ → 0) was derived by Martinez [Mar07, expression (10)] and is given by ! √     1 1 1 2e − 1 C(µ) ≤ µ + log µ + − µ log µ − + log 1 + √ . (3) 2 2 2 1 + 2µ It holds that (3) attains the first-order asymptotic behavior of C(µ) both when µ → 0 and when µ → ∞, and is strictly better than (1) for all µ > 0. However, as noted in [LM09], the proof in [Mar07] is not considered to be completely rigorous as it contains a gap (a certain equality is only shown numerically). Aminian et al. [AAG+ 15, Example 2] give the upper bound sup Cov(X + λ, log(X + λ)) PX :E[X]≤µ for the capacity of the DTP channel with an average-power constraint µ and dark current λ, where Cov(·, ·) denotes the covariance. However, this bound is only useful when λ is large. 4 The proposed upper bounds In this section, we derive new upper bounds on C(µ). While previous upper bounds are mostly based on duality results from [LM03], our derivation (although still duality based) follows from the application of a framework recently developed in [Che17] in the context of binary deletion-type channels. 4.1 The convex duality formulation In this section, we give a high-level overview of our approach towards obtaining improved capacity upper bounds. Given a channel Ch with input and output alphabets contained in R and channel law PY |X , we denote by Chµ the channel having the same input and output alphabets and channel law PY |X with the additional constraint that only input distributions whose corresponding output distributions Y satisfy E[Y ] = µ are admissible. We call such channels mean-limited, and denote the mean-limited version of the DTP channel by DTPµ . A main component of our proof is the following natural duality result proved in [Che17]: 3 Theorem 1 ( [Che17, Theorem 1], adapted). Let Ch be a channel with input alphabet R≥0 , output alphabet Z≥0 , and channel law PY |X . Suppose that there exist a random variable Y , supported on the output alphabet, and parameters ν1 , ν2 ∈ R such that DKL (Yx kY ) ≤ ν1 E[Yx ] + ν2 for every x ∈ R≥0 , where Yx denotes the output of Ch when x is given as input. Then, we have C(Chµ ) ≤ ν1 µ + ν2 for every µ ≥ 0. Moreover, if Y is the channel output distribution associated to some input distribution X and DKL (Yx kY ) = ν1 E[Yx ] + ν2 for all x ∈ supp(X), then C(Chµ ) = ν1 µ + ν2 . For the DTP channel with λ = 0, we wish to find a distribution Y and parameters ν1 , ν2 > 0 such that D(Yx ||Y ) ≤ ν1 E[Yx ] + ν2 = ν1 x + ν2 for all x ∈ R≥0 , and the inequality gap as small as possible. Using Theorem 1, we readily obtain an upper bound for C(DTPµ ), and subsequently, for C(µ). 4.2 The digamma distribution The result of Martinez [Mar07] follows the common approach of a convex duality formulation that leads to capacity upper bounds given an appropriate distribution on the channel output alphabet. Indeed, this is also the approach that we take. The dual distribution chosen by [Mar07] is a negative binomial distribution, which is a natural choice corresponding to a gamma distribution for the channel input. However, lengthy manipulations and certain adjustments are needed to obtain a closed-form capacity upper bound for this choice. We use a slightly different duality formulation, as discussed in 4.1. Furthermore, for the dual output distribution, we use a distribution that we call the “digamma distribution” and is designed by Cheraghchi [Che17] precisely for the purpose of use in the duality framework of [Che17]. This distribution asymptotically behaves like the negative binomial distribution. However, it is constructed to automatically yield provable capacity upper bounds without need for any further manipulations or adjustments. This is the key to our refined bounds and dramatically simplified analysis1 . For a parameter q ∈ (0, 1), the digamma distribution Y (q) is defined over non-negative integers with probability mass function PY (q) (y) := y0 exp(yψ(y))(q/e)y , y! y = 0, 1, . . . , (4) where y0 is a normalizing factor depending on q (we omit this dependence in the notation for brevity), d ψ(y) = dy log Γ(y) is the digamma function (Γ denotes the gamma function), and yψ(y) is understood to Py−1 be zero for y = 0. For positive integers y, we have ψ(y) = −γ + k=1 1/k, where γ ≈ 0.5772 is the Euler-Mascheroni constant. We will need to control the normalizing factor y0 , which is accomplished by the following result. Lemma 2 ( [Che17, Corollary 16]). We have       2 1 1 1 √ log 1 + 1+γ √ −1 ≤ − log y0 ≤ log 1 + √ −1 e 1−q 1−q 2e for all q ∈ (0, 1). 1 We note that the duality framework of [Che17] uses standard techniques and the dual-feasibility of the digamma distribution also has a simple proof. 4 We will also be using the fact that the digamma distribution is closely related to the negative binomial distribution. We denote the negative binomial distribution with number of failures r (note that r is not necessarily an integer) and success probability p by NBr,p . Lemma 3 ( [Che17, Corollary 16]). For all y ≥ 1 and q ∈ (0, 1), √ 1 − qPY (q) (y) 1 2 NB (y) ≤ ≤ √ NB1/2,q (y). 1/2,q 1+γ e y0 2e 4.3 A first capacity upper bound In this section, we use the digamma distribution and the approach outlined in Section 4.1 in order to derive an upper bound for C(µ). The Kullback-Leibler divergence between Yx and Y (q) has a simple form for every x. Let g(y) := yψ(y). We have   ∞  X  PYx (y) (q) = DKL Yx Y PYx (y) log PY (q) (y) y=0 = ∞ X PYx (y)(− log y0 + y(1 − log q) − g(y) − x + y log x) y=0 = − log y0 − x log q + x log x − EYx [g(Yx )]. (5) The following result lets us control EYx [g(Yx )]. Lemma 4 ( [Che17, Corollary 9]). We have EYx [g(Yx )] = x(E1 (x) + log x), where E1 (x) = R∞ 1 e−xt dt/t is the exponential integral function. Using the fact that E1 (x) > 0 for all x > 0, Lemma 4 and (5) allow us to conclude that   DKL Yx Y (q) ≤ −x log q − log y0 (6) for all x ≥ 0. Applying Theorem 1, we conclude that C(DTPµ ) ≤ −µ log q − log y0 . (7) Recall that we wish to convert an upper bound on C(DTPµ ) into an upper bound for C(µ). In order to do this, first note that if X and Y are the input and output distributions of the DTP channel with λ = 0, then E[Y ] = E[X]. Therefore, (7) also gives an upper bound on the capacity of the DTP channel with the constraint that E[X] = µ. Moreover, since the RHS of (7) increases with µ for every fixed q ∈ (0, 1), we conclude that the upper bound still holds if we only require that E[X] ≤ µ. Therefore, we have C(µ) ≤ −µ log q − log y0 . (8) Finally, noting that (8) holds for every q ∈ (0, 1), we obtain the following result. Recall that y0 is not a constant, but rather a normalizing factor that depends on q. Theorem 5. For all µ ≥ 0, we have C(µ) ≤ inf (−µ log q − log y0 ). q∈(0,1) 5 (9) 4.4 Improved bounds in a systematic way While Theorem 5 gives an upper bound on C(µ), it involves minimizing a rather complicated function (for which we do not know an exact closed-form expression) over a bounded interval. Since it is of interest to have easy-to-compute but high quality upper bounds, we consider instantiating the parameter q inside the infimum in (9) with a simple function of µ. In this section, we present a systematic way of deriving such a good choice q(µ). Finally, we upper bound − log(y0 ) using Lemma 2, obtaining an improved closed-form bound for C(µ). We determine a good choice q(µ) for the parameter q in (9) indirectly by instead choosing q(µ) so that the associated distribution Y (q(µ)) (given by (4)) has expected value close to µ. The reasons for this are the following: First, a capacity-achieving distribution X yields a channel output distribution Y satisfying E[Y ] = E[X] ≤ µ, and, under the natural assumption that C(µ) is strictly increasing with µ, we must actually have E[X] = E[Y ] = µ. While a capacity-achieving X does not necessarily induce a digamma distribution over the output, the digamma distribution seems to be close to optimal, since the gap between the two expressions in (6) is xE1 (x), which decays exponentially with x. Second, numerical computation suggests that the distribution Y induced by the choice of q that minimizes the boundfrom Theorem 5 has  expected value very close (or equal) to µ. While determining a choice q(µ) such that E Y (q(µ)) is very close to µ for all µ > 0 may be complicated, we settle for a choice q(µ) that behaves well when µ → 0 and µ → ∞. We begin by studying how q(µ) should behave when µ → ∞. In this case, we should have q(µ) → 1. Lemma 2 implies that     √ p p 2 1−q 1 1 2 √ √ + 1 − 1 − q ≤ ≤ + 1 − 1 − q, 1+γ 1+γ e e y0 2e 2e from which we can conclude that 2 e1+γ √ ≤ 1−q 1 ≤ √ + o(1) y0 2e (10) when q → 1. Combining (10) with Lemma 3, we obtain √ 2 2e PY (q) (y) e1+γ − o(1) ≤ ≤ √ ≈ 1.038 1+γ e NB1/2,q (y) 2 2e for y = 0, 1, . . . , when q → 1, and so we conclude that the digamma distribution is well-approximated by NB1/2,q when q is close to 1. Recall that we want a choice of q(µ) such that Y (q(µ)) value as close as possible to µ in the   has expected 2µ large µ regime. The choice of q which ensures that E NB1/2,q = µ is q = 1+2µ , and so we want q(µ) to   2µ + o µ1 when µ → ∞. satisfy q(µ) = 1+2µ 2µ One could set q(µ) = 1+2µ to obtain the desired behavior above, but we will show that we can correct   this choice in order to achieve E Y (q(µ)) = µ + o(µ) when µ → 0. To make the derivation simpler, we will 1 instead work with the quantity 1−q(µ) . Consider a choice q(µ) satisfying 1 βµ2 = 1 + αµ + 1 − q(µ) 1+µ 1 for some constants α and β. It is easy to see that 1−q(µ) behaves as 1 + αµ + o(µ) when µ → 0 and as 1 + (α + β)µ + o(µ) when µ → ∞, which means we can set its asymptotic behavior in both the small and large µ regimes independently of each other. Moreover, setting α + β = 2 leads to the desired behavior  2µ 1 q(µ) = 1+2µ + o µ when µ → ∞.  We now  proceed to choose α. As mentioned before, we determine the choice of α which ensures that E Y (q(µ)) = µ + o(µ) when µ → 0. It is straightforward to see that, by construction, q(µ) = αµ + o(µ) when µ → 0. We will need the following result.   Lemma 6. We have E Y (q) = e−(1+γ) q + o(q) as q → 0. 6 Proof. Recall that g(y) = yψ(y), and note that   ∞ X E Y (q) eg(y)−y q y−1 = y0 e−(1+γ) + y0 . y· q y! y=2 (11) It is easy to see that y0 approaches 1 (using Lemma 2, for example) and the second term in the RHS of (11) vanishes when q → 0, and so the result follows.   The remarks above, combined with Lemma 6, imply that E Y (q(µ)) = e−(1+γ) αµ + o(µ) when µ → 0.   Therefore, it suffices to set α = e1+γ to have E Y (q(µ)) = µ + o(µ) when µ → 0. Based on this, we set q(µ) to be such that 1 (2 − e1+γ )µ2 = 1 + e1+γ µ + . (12) 1 − q(µ) 1+µ Combining the previous discussion, Theorem 5, and Lemma 2, we immediately obtain the following result. Theorem 7. We have C(µ) ≤ inf f (µ, q), (13) q∈(0,1)  where f (µ, q) := −µ log q + log 1 + √1 2e  √1 1−q  −1 . In particular, by instantiating q with q(µ) defined in (12), s ! !!  1 + 1 + e1+γ µ + 2µ2 1 1 + (1 + e1+γ )µ + 2µ2 + log 1 + √ −1 . C(µ) ≤ µ log e1+γ µ + 2µ2 1+µ 2e (14) Note that f (µ, ·) is an elementary, smooth, and convex function for every fixed µ ≥ 0. Therefore, (13) can be easily approximated to any desired degree of accuracy. Remark 8. The reasons why we base our choice of q(µ) on (9) instead of (13) are the following: First, q(µ) is still close to optimal when used in (13) (see Figure 1). Second, the choice is independent of the upper bound on − log y0 , and so can be reutilized if a better bound is used. 4.5 The result of Martinez as a special case In this section, we show that the bound by Martinez (3) can be quite easily recovered through our techniques. More precisely, we show that this bound is a special case of (13) with a sub-optimal choice of q = 2µ/(1+2µ). In particular, this implies that (13) is strictly tighter than this section, we define m(µ) to be the   (3). In  RHS of (3). Recall that f (µ, q) = −µ log q + log 1 + √1 2e √1 1−q −1 .   2µ = m(µ) for all µ ≥ 0. Moreover, for every µ > 0 there is qµ∗ ∈ (0, 1) Theorem 9. We have f µ, 1+2µ such that f (µ, qµ∗ ) < m(µ). Proof. To prove the first statement of the theorem, we compute   2µ m(µ) − f µ, 1 + 2µ ! √     1 1 1 2e − 1 = µ+ log µ + − µ log µ − + log 1 + √ 2 2 2 1 + 2µ       1 + 2µ 1 p − µ log − log 1 + √ 1 + 2µ − 1 2µ 2e ! √       √ 1 1 1 1 1 + 2µ + 2e − 1 √ = log µ + + µ log µ + − log µ − + log 2 2 2 2 1 + 2µ 7 ! √  √ 1 + 2µ 1 + 2µ + 2e − 1 √ − µ log − log 2µ 2e   r  1 2e 1 1 = log µ + − + log = 0. 2 2 2 1 + 2µ  To see that the second statement holds, it suffices to show that ∂f µ (µ, q) = − + √ ∂q q 2 2e + Instantiating with q = 2µ 1+2µ ∂f ∂q   2µ µ, 1+2µ 6 0 for all µ > 0. We have = 1 √1 1−q  . − 1 (1 − q)3/2 (15) yields   ∂f 2µ 1 + 2µ (1 + 2µ)3/2 , µ, =− + √ √ ∂q 1 + 2µ 2 2 2e + 1 + 2µ − 1 and now it is enough to note that  √ p − (1 + 2µ) 2e + 1 + 2µ − 1 + (1 + 2µ)3/2 √ = (1 + 2µ)(1 − 2e) < 0 for all µ ≥ 0. Finally, we show that the explicit choice q(µ) from Section 4.4 yields a strictly better upper bound than the Martinez bound (3).   2µ Theorem 10. We have f (µ, q(µ)) < f µ, 1+2µ = m(µ) for all µ > 0. Proof. We first show that the statement holds whenever µ ≥ 1.61 and when µ is sufficiently small. Let d(µ) := m(µ) − f (µ, q(µ)). 2µ We begin by noting that q(µ) > 1+2µ for all µ > 0. Then, due to the convexity of f (µ, ·), the statement holds for a given µ if ∂f ∂q (µ, q(µ)) ∂f ∂q (µ, q(µ)) < 0 (recall (15)). By standard algebraic manipulations, it can be seen that < 0 for a given µ ≥ 0 if and only if  √  √ e2+2γ − 4e1+γ + 8 2e − 8e + 24 2e − 3e2+2γ + e3+3γ − 24e − 8 µ  √   √  + 24 2e − 8e1+γ + 2e2+2γ − 24e − 4 µ2 + 8 2e − 8e − 4 µ3 < 0, which can be easily seen to hold for µ ≥ 1.61. It can be easily verified that d(µ) behaves as 1 1 e 2 +γ 1 + γ + √ − log 2 − √ 2e 2 2 ! µ + o(µ) ≈ 0.27µ + o(µ) when µ → 0, which implies that m(µ) > f (µ, q(µ)) for µ small enough. For the remaining cases, one can use a computer algebra system to formally show that d(µ) > 0. However, d(µ) is a complicated transcendental expression, and so cannot be fed directly to such a system. We avoid this issue in the following way: For µ ∈ [0.3, 1.61], we lower bound d(µ) by positive rational functions. This is done by replacing the logarithmic and square root terms of the expression by appropriate bounds which are themselves rational functions. Then, the question of whether d(µ) > 0 is reduced to showing that a certain polynomial is positive in the given interval, which can be formally checked by a computer algebra system with little effort. For µ < 0.3, our lower bounds for d(µ) are not good enough, and so we use the same reasoning to show that its second derivative d00 (µ) is negative for µ < 0.3. This implies that d(µ) is concave in [0, 0.3], which, combined with the previous results, concludes the proof. 8 We do not explicitly write down the relevant lower bounds for d(µ) and upper bounds for the second derivative, as they feature high-degree polynomials. Instead, we describe the relevant bounds on the logarithmic and square root terms. Then, determining the corresponding rational function and formally checking whether it is positive/negative in a given interval is a straightforward (albeit tedious) process. √ p The expression d(µ) features logarithmic terms, along with square root terms of the form 1 + 2µ and (1 + (1 + e1+γ )µ + 2µ2 )/(1 + µ) (recall (3) and (14)). For every x ≥ 1, we have the bounds (x − 1)(x + 5) (x − 1)(6 + 5(x − 1)) ≤ log x ≤ , 2(3 + 2(x − 1)) 2x(2 + x) p √ which can be found in [Top06]. Furthermore, we can upper bound 1 + 2µ and (1 + (1 + e1+γ )µ + 2µ2 )/(1 + µ) by their Taylor series of degree 5 and 3, respectively, around µ = 1. Replacing the relevant terms in d(µ) by their respective bounds described above yields a rational function lower bound which can be easily shown to be positive for µ ∈ [0.3, 1.61] by a standard computer algebra system. For µ < 0.3, the bounds above are not tight enough to show that d(µ) is positive, and so we focus on its second derivative d00 (µ). However, d00 (µ) cannot be fed directly to a computer algebra system either, and so we same reasoning as before. The only terms of d00 (µ) that need to be bounded are √ of the form √ follow the p 1 + 2µ and (1 + (1 + e1+γ )µ + 2µ2 )/(1 + µ). It suffices to upper bound (resp. lower bound) 1 + 2µ by its Taylor p series of degree 1 (resp. 2) around µ = 0. However, we need to be more careful when dealing with (1 + (1 + e1+γ )µ + 2µ2 )/(1 + µ). We split the interval [0, 0.3] into two intervals: First, in (0, 0.25] we lower bound it by its Taylor series of degree 2 around µ = 0. Second, in (0.25, 0.3] we lower bound it by its Taylor series of degree 2 around µ = 0.25. Replacing the relevant terms of d00 (µ) by their respective bounds, we obtain a negative rational function upper bounding d00 (µ) in each of (0, 0.25] and (0.25, 0.3], which can be formally checked with a computer algebra system. This implies that d(µ) is concave in (0, 0.3], and so, combined with the facts that d(µ) > 0 for µ small enough and d(µ) > 0 for µ ≥ 0.3, we conclude that d(µ) > 0 for all µ > 0. 5 Comparison with previously known upper bounds In this section, we compare the bounds from Theorem 7 with the previously known bounds described in Section 1. Moreover, we investigate the loss incurred by using (14) instead of (9). Figure 1 showcases a plot comparing the bounds from Theorem 7 to the previously known  upper bounds. The curve corresponding to the bound of Lapidoth et al. (1) is actually the plot of µ log 1+µ + log(1 + µ), µ which lower bounds the RHS of (1). There is a noticeable improvement over the Martinez bound (3) when µ is not very small, and one can see that (14) is very close to (13) (with significant overlap), which confirms that the choice q(µ) from Section 4.4 is close to optimal. Due to the fact that our bounds are tighter than Martinez’s bound, both of them satisfy the first-order asymptotic behavior of C(µ) when µ → 0 and when µ → ∞. However, they do not exhibit the correct second order asymptotic term when µ → 0. In fact, the second-order asymptotic term of our bounds when µ → 0 is −O(µ), while the correct term is −µ log log(1/µ). For this reason, our bounds do not improve on the Wang-Wornell bound (2) when µ is sufficiently small (numerically, when µ < 10−6 ), while they noticeably improve on every previous bound when µ is not too small. Figure 2 showcases the distance of the Martinez bound (3) to (9) and (14). The plotted curves have similar shapes and are close to each other, which shows that we do not lose much by replacing − log y0 by the upper bound of Lemma 2 and instantiating q with the sub-optimal explicit choice q(µ) from Section 4.4. Figure 3 showcases the relative distance of the Martinez bound (3) to (9) and (14). In other words, if m(·) denotes the Martinez bound (3) and b(·) is either the RHS of (9) or of (14), then the plot shows the quantity (m(µ) − b(µ))/m(µ). Observe that, using (14), we obtain an improvement of up to 8.2% over (3), while we can get improvements close to 9.5% using (9). Once again, note that the two curves are close to each other and similar shape, reinforcing the fact that the loss incurred by using (14) instead of (9) is small. 9 Bound (13) 0.8 Bound (14) Lapidoth et al. (1) nats/channel use Wang-Wornell (2) 0.6 Martinez (3) 0.4 0.2 0.0 0.00 0.05 0.10 0.15 0.20 average-power constraint Figure 1: Comparison of known upper bounds for µ ∈ [0, 0.2]. Bound (9) difference (nats/channel use) 0.04 Bound (14) 0.03 0.02 0.01 0.00 0 2 4 6 8 10 average-power constraint Figure 2: Comparison of difference between (3) and (9), and between (3) and (14) for µ ∈ [0, 10]. 0.10 Bound (9) Bound (14) relative difference 0.08 0.06 0.04 0.02 0.0 0.2 0.4 0.6 0.8 1.0 average-power constraint Figure 3: Relative difference between (3) and (9), and between (3) and (14) for µ ∈ [0, 1]. 10 References [AAG+ 15] Gholamali Aminian, Hamidreza Arjmandi, Amin Gohari, Masoumeh Nasiri-Kenari, and Urbashi Mitra. Capacity of diffusion-based molecular communication networks over LTI-Poisson channels. IEEE Transactions on Molecular, Biological and Multi-Scale Communications, 1(2):188–201, 2015. [BV90] David Brady and Sergio Verdú. The asymptotic capacity of the direct detection photon channel with a bandwidth constraint. In 28th Allerton Conference on Communication, Control and Computing, pages 691–700, 1990. [CGZ11] Hye Won Chung, Saikat Guha, and Lizhong Zheng. On capacity of optical channels with coherent detection. In 49th Annual Allerton Conference on Communication, Control, and Computing, 2011, pages 879–885. IEEE, 2011. [CHC10] Jihai Cao, Steve Hranilovic, and Jun Chen. Lower bounds on the capacity of discrete-time Poisson channels with dark current. In 25th Biennial Symposium on Communications (QBSC), 2010, pages 357–360. IEEE, 2010. [CHC14a] Jihai Cao, Steve Hranilovic, and Jun Chen. Capacity-achieving distributions for the discretetime Poisson channelpart i: General properties and numerical techniques. IEEE Transactions on Communications, 62(1):194–202, 2014. [CHC14b] Jihai Cao, Steve Hranilovic, and Jun Chen. Capacity-achieving distributions for the discrete-time Poisson channelpart ii: Binary inputs. IEEE Transactions on Communications, 62(1):203–213, 2014. [Che17] Mahdi Cheraghchi. Capacity upper bounds for deletion-type channels. CoRR, abs/1711.01630, 2017. [LM03] Amos Lapidoth and Stefan M Moser. Capacity bounds via duality with applications to multiple-antenna systems on flat-fading channels. IEEE Transactions on Information Theory, 49(10):2426–2467, 2003. [LM09] Amos Lapidoth and Stefan M Moser. On the capacity of the discrete-time Poisson channel. IEEE Transactions on Information Theory, 55(1):303–322, 2009. [LSVW11] Amos Lapidoth, Jeffrey H Shapiro, Vinodh Venkatesan, and Ligong Wang. The discrete-time Poisson channel at low input powers. IEEE Transactions on Information Theory, 57(6):3260– 3272, 2011. [Mar07] Alfonso Martinez. Spectral efficiency of optical direct detection. JOSA B, 24(4):739–749, 2007. [SS90] S Shamai (Shitz). Capacity of a pulse amplitude modulated direct detection photon channel. IEE Proceedings I (Communications, Speech and Vision), 137(6):424–430, 1990. [SSEL15] Tobias Sutter, David Sutter, Peyman Mohajerin Esfahani, and John Lygeros. Efficient approximation of channel capacities. IEEE Transactions on Information Theory, 61(4):1649–1666, 2015. [Top06] Flemming Topsøe. Some bounds for the logarithmic function. Inequality theory and applications, 4:137–151, 2006. [WW14] Ligong Wang and Gregory W Wornell. A refined analysis of the Poisson channel in the highphoton-efficiency regime. IEEE Transactions on Information Theory, 60(7):4299–4311, 2014. [YZWD14] Yingying Yu, Zaichen Zhang, Liang Wu, and Jian Dang. Lower bounds on the capacity for Poisson optical channel. In Sixth International Conference on Wireless Communications and Signal Processing (WCSP), 2014, pages 1–5. IEEE, 2014. 11
7cs.IT
The Space Complexity of 2-Dimensional Approximate Range Counting and Combinatorial Discrepancy∗ arXiv:1207.4382v3 [cs.DS] 23 May 2016 Zhewei Wei †Ke Yi ‡ November 20, 2017 Abstract We study the problem of 2-dimensional orthogonal range counting with additive error. Given a set P of n points drawn from an n × n grid and an error parameter ε, the goal is to build a data structure, such that for any orthogonal range R, it can return the number of points in P ∩ R with additive error εn. A well-known solution for this problem is the ε-approximation, which is a subset A ⊆ P that can estimate the number of points in P ∩ R with the number of points in A ∩ R. It is known that an ε-approximation of size O( 1ε log2.5 1ε ) exists for any P with respect to orthogonal ranges, and the best lower bound is Ω( 1ε log 1ε ). The ε-approximation is a rather restricted data structure, as we are not allowed to store any information other than the coordinates of the points in P . In this paper, we explore what can be achieved without any restriction on the data structure. We first describe a simple data structure that uses O( 1ε (log2 1ε + log n)) bits and answers queries with error εn. We then prove a lower bound that any data structure that answers queries with error εn must use Ω( 1ε (log2 1ε + log n)) bits. Our lower bound is information-theoretic: We show that there is a collection of 2Ω(n log n) point sets with large union combinatorial discrepancy, and thus are hard to distinguish unless we use Ω(n log n) bits. 1 Introduction Range counting is one of the most fundamental problems in computational geometry and data structures. Given n points in d dimensions, the goal is to preprocess the points into a data structure, such that the number of points in any query range can be returned. Range counting has been studied intensively, and a lot of work has focused on the space-query time tradeoff or the update-query tradeoff of the data structure. We refer the reader to the survey by Agarwal and Erickson [2] for these results. In this paper, we look at the problem from a data summarization/compression point of view: What is the minimum amount of space that is needed to encode all the range counts approximately? Approximation is necessary here, since otherwise we will have to remember the entire the point set. It is also easy to see that relative approximation will not help either, as it requires us to differentiate between empty ranges and those containing only one point. Thus, we aim at an absolute error guarantee. As we will be dealing with bit-level space complexity, it is convenient to focus on an integer grid. More formally, we are given a set of n points P drawn from ∗ A preliminary version of the paper appeared in SODA’13. School of Information, Renmin University of China. [email protected] ‡ Hong Kong University of Science and Technology. [email protected] † 1 an n × n grid and an error parameter ε . The goal is to build a data structure, such that for any orthogonal range R, the data structure can return the number of points in P ∩ R with additive error εn. We should mention that there is another notion of approximate range counting that approximates the range, i.e., points near the boundary of the range may or may not be counted [5]. Such an approximation notion clearly precludes any sublinear-space data structure as well. 1.1 Background and related results ε-approximations. Summarizing point sets while preserving range counts (approximately) is a fundamental problem with applications in numerical integration, statistics, and data mining, among many others. The classical solution is to use the ε-approximation from discrepancy theory. Consider a range space (P, R), where P is a finite point set of size n. A subset A ⊆ P is called an ε-approximation of (P, R) if |R ∩ A| |R ∩ P | − ≤ ε. max R∈R |A| |P | This means that we can approximate |R ∩ P | by counting the number of points in R ∩ A and scaling back, with error at most εn. Finding ε-approximations of small size for various geometric range spaces has been a central research topic in computational geometry. Please see the books by Matousek [19] and Chazelle [9] for a comprehensive coverage on this topic. Here we only review the most relevant results, i.e., when the range space is the set of all orthogonal rectangles in 2 dimensions, which we denote as R2 . This question dates back to Beck [7], who showed that there are ε-approximations of size O( 1ε log4 1ε ) for any point set P . This was later improved to O 1ε log2.5 1ε by Srinivasan [25]. These were not constructive due to the use of a non-constructive coloring with combinatorial discrepancy O(log2.5 n) for orthogonal rectangles. Recently, Bansal [6] and Lovett et al. [17] proposed algorithms to construct such a coloring, and therefore has made these results constructive. On the lower bound side, it is known that there are point sets that require ε-approximations of size Ω( 1ε log 1ε ) [7]. Combinatorial discrepancy. Given a range space (P, R) and a coloring function χ : P → {−1, +1}, we define the discrepancy of a range R ∈ R under χ to be X χ(P ∩ R) = χ(p). p∈P ∩R The discrepancy of the range space (P, R) is defined as disc(P, R) = min max |χ(P ∩ R)| , χ R∈R namely, we are looking at the coloring that minimizes the color difference of any range in R. This kind of discrepancy is called combinatorial discrepancy or sometimes red-blue discrepancy. Taking the maximum over all point sets of size n, we say that the combinatorial discrepancy of R is disc(n, R) = max|P |=n disc(P, R). There is a close relationship between combinatorial discrepancy and ε-approximations, as observed by Beck [7]. For orthogonal ranges, the relationship is particularly simple: The combinatorial 2 discrepancy is at most t(n) if and only if there is an ε-approximation of size O( 1ε t( 1ε )). In fact, all the aforementioned results on ε-approximations follow from the corresponding results on combinatorial discrepancy. So the current upper bound on the combinatorial discrepancy of R2 is O(log2.5 n) [25]. The lower bound is Ω(log n) [7], which follows from the Lebesgue discrepancy lower bound (see below). Closing the Θ(log1.5 n) gap between the upper and the lower bound remains a major open problem in discrepancy theory. For orthogonal ranges in d ≥ 3 dimensions, the current best upper bound is O(logd+1/2 n) by Larsen [16], while the lower bound is Ω((log n)d−1 ) , which is recently proved by Matoušek and Nikolov [18]. Lebesgue discrepancy. Suppose the points of P are in the unit square [0, 1)2 . The Lebesgue discrepancy of (P, R) is defined to be D(P, R) = sup |P ∩ R| − R ∩ [0, 1)2 . R∈R The Lebesgue discrepancy describes how uniformly the point set P is distributed in [0, 1)2 . Taking the infimum over all point sets of size n, we say that the Lebesgue discrepancy of R is D(n, R) = inf |P |=n D(P, R). The Lebesgue discrepancy for R2 is known to be Θ(log n). The lower bound is due to Schmidt [23], while there are many point sets (e.g., the Van der Corput sets [26] and the b-ary nets [24]) that are proved to have O(log n) Lebesgue discrepancy. It is well known that the combinatorial discrepancy of a range space cannot be lower than its Lebesgue discrepancy, so this also gives the Ω(log n) lower bound on the combinatorial discrepancy of R2 mentioned above. ε-nets. For a range space (P, R), a subset A ⊆ P is called an ε-net of P if for any range R ∈ R that satisfies |P ∩ R| ≥ εn, there is at least 1 point in A ∩ R. Note that an ε-approximation is an ε-net, but the converse may not be true. For a range space (P, A), Haussler and Welzl [14] show that if the range space has finite VCdimension d, there exists an ε-net of size O( dε log dε ). For R2 , the current best construction is due to Aronv, Ezra and Sharir [3], which has size O( 1ε log log 1ε ). A recent result by Pach and Tardos [20] shows that this bound is essentially optimal. For more results on ε-nets, please refer to the book by Matoušek [19]. In this paper, our data structure will be based an ε-net for R2 . Approximate range counting data structures. The ε-approximation is a rather restricted data structure, as we are not allowed to store any information other than the coordinates of a subset of points in P . In this paper, we explore what can be achieved without any restriction on the data structure. In 1 dimension, there is nothing better: An ε-approximation has size O( 1ε ), which takes O( 1ε log n) bits. On the other hand, simply consider the case where the n points are divided into groups of size εn, where all points in each group have the same location. There are n1/ε such point sets and the data structure has to differentiate all of them. Thus log(n1/ε ) = 1ε log n is a lower bound on the number of bits used by the data structure. Finally, we remark that there are also other work on approximate range counting with various error measure, such as relative ε-approximation [13], relative error data structure [1, 4], and absolute error model [5]. These error measures are different from ours, and it is not clear if these problems admit sublinear space solutions. 1.2 Our results This paper settle the following problem: How many bits do we need to encode all the orthogonal range counts with additive error εn for a point set on the plane? We first show that if we are allowed 3 to store extra information other than the coordinates of the points, then there is a data structure that uses O( 1ε (log2 1ε + log n)) bits. This is a Θ(log1.5 1ε ) improvement from ε-approximations. The majority of the paper is the proof of a matching lower bound: We show that for ε ≥ c log n/n for some constant c, any data structure that answers queries with error εn must use Ω( 1ε (log2 1ε + log n)) bits. In particular, if we set ε = c log n/n, then any data structure that answers queries with error εn must use Ω(n log n) bits, which implies that that answering queries with error O(log n) is as hard as answering the queries exactly. The core of our lower bound proof is the construction of a collection P ∗ of 2Ω(n log n) point sets with large union combinatorial discrepancy. More precisely, we show that the union of any two point sets in P ∗ has high combinatorial discrepancy, i.e., at least c log n. Then, for any two point sets P1 , P2 ∈ P ∗ , if disc(P1 ∪ P2 , R2 ) ≥ c log n, that means for any coloring χ on P1 ∪ P2 , there must exist a rectangle R such that |χ(R)| ≥ c log n. Consider the coloring χ where χ(p) = 1 if p ∈ P1 and χ(p) = −1 if p ∈ P2 . Then there exists a rectangle R such that |χ(R)| = ||R ∩ P1 | − |R ∩ P2 || ≥ c log n. This implies that a data structure that answers queries with error 2c log n have to distinguish P1 and P2 . Thus, to distinguish all the 2Ω(n log n) point sets in P ∗ , the data structure has to use at least Ω(n log n) bits, which is a tight lower bound for ε = n/ log n. We will show how the combinatorial discrepancy bound implies tight lower bound for arbitrary ε in Section 3. While point sets with low Lebesgue discrepancy or high combinatorial discrepancy have been extensively studied, here we have constructed a large collection of point sets in which the pairwise union has high combinatorial discrepancy. This particular aspect appears to be novel, and our construction could be useful in proving other space lower bounds. It may also have applications in situations where we need a “diverse” collection of (pseudo) random point sets. 2 Upper Bound In this section, we build a data structure that supports approximate range counting queries. Given a set of n points on an n × n grid, our data structure uses O( 1ε (log2 1ε + log n) bits and answers an orthogonal range counting query with error εn. We note that it is sufficient to only consider two-sided ranges, since an 4-sided range counting query can be expressed as a linear combination of four two-sided range counting queries by the inclusion-exclusion principle. A two-sided range is specified by a rectangle of the form [0, x) × [0, y), where (x, y) is called the query point. The data structure. Our data structure is an approximate variant of Chazelle’s linear-space version of the range tree, originally for exact orthogonal range counting [10]. Consider a set P of n points on an n × n grid. We divide P into the left point set PL and the right point set PR by the median of the x-coordinates. We will recursively build a data structure for PL and PR . Let B be n quantiles of the y-coordinates of P . a parameter to be determined later. Let Q(P ) denote the B Note that the i-th quantile is the y-coordinate in P with exactly iB points below it. We use indices n n ] = 1, . . . , B to represent Q(P ), where i denote the i-th quantile. We don’t explicitly store the [B y-values or even the indices of Q(P ). Instead, for each index i in Q(P ) with coordinate y, we store n a pointer to the successor of y in Q(PL ). Note that these B pointers form a monotone increasing n n n sequence of B indices in [ 2B ], and can be encoded in O( B ) bits. Similarly, we store the successor n ) bits. It follows that the space in bits satisfies recursion pointers from Q(P ) to Q(PR ) with O( B n n n n S(n) = 2S( 2 ) + O( B ), with base case S(B) = 0. The recurrence solves to S(n) = O( B log B ). 1 1 Finally, we explicitly store the ε quantiles Q0 (P ) for the y-coordinates of P with O( ε log n) bits. 4 Given a query q = (q.x, q.y). For simplicity, we assume q.y is in Q0 (P ). If not, we can use the successor of q.y in Q0 (P ) as an estimation with additive error at most εn to the final count. If q is in PL , we follow the pointer to find the successor of q.y in Q.L, and the recurse the problem in PL . If q is in Pr , we first follow the pointer to get the successor of q.y in Q(PL ). This gives an approximate count for PL ∩ q with additive error B. We then follow the pointer to get the successor of q.y in Q(PR ), and recurse the problem in PR . Note that rounding q.y with the successor in PR or RL causes additive error B, and using the approximate count for PL ∩ q also causes additive error B. Thus, the overall additive error satisfies E(n) = E( n2 ) + 2B, with base case E(B) = B. The n recurrence solves to E(n) = O(B log B ), and we can then set B = εn/ log 1ε to make E(n) = O(εn). It follows that S(n) = O( 1ε log2 1ε ), and thus total space usage is O( 1ε (log2 1ε +log n)) bits. The query time can also be made O(log 1ε ), if we use succinct rank-select structures to encode the pointers, as in Chazelle’s method. Theorem 2.1. Given a set of n points drawn from an n × n grid, there is a data structure that uses O( 1ε (log2 1ε + log n)) bits and answers orthogonal range counting query with additive error εn. 3 Lower Bound In this section, we prove a lower bound that matches the upper bound in Theorem 2.1. Theorem 3.1. Consider a set of n points drawn from an n × n grid. A data structure that answers orthogonal range counting query with additive error εn for any point set must use Ω( 1ε (log2 1ε +log n)) bits. To prove Theorem 3.1, we need the following theorem on union discrepancy. Theorem 3.2. Let P denote the collection of all n-point sets drawn from an n × n grid. There exists a constant c and a sub-collection P ∗ ⊆ P of size 2Ω(n log n) , such that for any two point sets P1 , P2 ∈ P ∗ , their union discrepancy disc(P1 ∪ P2 , R2 ) ≥ c log n. We first show how Theorem 3.2 implies Theorem 3.1. of Theorem 3.1. We only need to prove the Ω( 1ε log2 1ε ) lower bound. Suppose we group the points into N = 1ε log 1ε fat points, each of size εn/ log 1ε . By Theorem 3.2, there is a collection P ∗ of 2Ω(N log N ) fat point sets, such that for any two fat point sets P1 , P2 ∈ P ∗ , there exists a rectangle R such that the number of fat points in R ∩ P1 and R ∩ P2 differs by at least ≥ c log N . Since each fat points corresponds to εn/ log 1ε points, it follows that the counts of P1 ∩ R and P2 ∩ R differs by at least   1 εn εn 1 · c log N = · c log log ≥ cεn. ε ε log 1ε log 1ε Therefore, a data structure that answers queries with error 2c εn have to distinguish P1 and P2 . Thus, to distinguish all the 2Ω(N log N ) point sets in P ∗ , the data structure has to use at least Ω(N log N ) = Ω( 1ε log2 1ε ) bits. In the rest of this section, we will focus on proving Theorem 3.2. To derive the sub-collection in Theorem 3.2, we begin by looking into a collection of point sets called binary nets. Binary nets are a special type of point sets under a more general concept called (t, m, s)-nets, which are P∗ 5 Ga,b(3, 3) 2a 2b n/2b Number of (a, b)-cells: n/2a G0 G1 G2 G3 Figure 1: Illustrations of (a, b)-cells and canonical cells. introduced in [19] as an example of point sets with low Lebesgue discrepancy. See the survey by Clayman et al. [11] or the book by Hellekalek et al. [15] for more results on (t, m, s)-nets. In this paper we will show that binary nets have two other nice properties: 1) A binary net has high combinatorial discrepancy, i.e., Ω(log n); 2) there is a bit vector representation for every binary net, which allows us to extract a sub-collection by constructing a subset of bit vectors. In the following sections, we will define binary nets, and formalize these two properties. 3.1 Definitions For ease of the presentation, we assume that the n × n grid is embedded in the unit square [0, 1)2 . We partition [0, 1)2 into n × n squares, each of size n12 . We assume the grid points are placed at 1 j 1 the mass centers of the n2 squares, that is, each grid point has coordinates ( ni + 2n , n + 2n ), for i, j ∈ [n], where [n] denote the set of all integers in [0, n). For the sake of simplicity, we define the 1 j 1 grid point (i, j) to be the grid point with coordinates ( ni + 2n , n + 2n ), and we do not distinguish a grid point and the square it resides in. Now we introduce the concepts of (a, b)-cell and k-canonical cell. a b b ) × [ j2n , (j+1)2 ). We use Definition 3.1. A (a, b)-cell at position (i, j) is the rectangle [ i2n , (i+1)2 n n Ga,b (i, j) to denote the (a, b)-cell at position (i, j), and Ga,b to denote the set of all (a, b)-cells. a Definition 3.2. A k-canonical cell at position (i, j) is a (k, log n − k)-cell with coordinates (i, j). We use Gk (i, j), to denote the k-canonical cell at position (i, j), and Gk to denote the set of all k-canonical cells. Figure 1 is the illustration of (a, b)-cells and canonical cells. Note that the position (i, j) for a (a, b)-cell takes value in [n/2a ]×[n/2b ]. In particular, we call G0 (i, 0) the i-th column and Glog n (0, j) the j-th row. Note that for a fixed k, Gk partitions the grid [0, 1)2 into n rectangles. Based on the definition of k-canonical cells, we define the binary nets: Definition 3.3. A point set P is called a binary net if for any k ∈ [log n], P has exactly one point in each k-canonical cell. 6 X(k, i, j) x + v Gk (i, j) x+u+v Y (k, i, j) q Gk (i, j)U L Gk (i, j)U R n/2k x+u x Gk (i, j)LR Gk (i, j)LL 2k Figure 2: Illustration of the corner volume and the four analogous points. The area in shadow represents the corner volume VP (k, i, j). Let P0 denote the collection of binary nets. In other word, P0 is the set {P | |P ∩ Gk (i, j)| = 1, k ∈ [log n], i ∈ [n/2k ], j ∈ [2k ]}. It is known that the point sets in P0 have Lebesgue discrepancy O(log n); below we show that they also have Ω(log n) combinatorial discrepancy. However, the union of two point sets in P0 could have combinatorial discrepancy as low as O(1). Thus we need to carefully extract a subset from P0 with high pairwise union discrepancy. 3.2 Combinatorial Discrepancy and Corner Volume In this section, we focus on proving the following theorem, which shows that the combinatorial discrepancy of a binary net is large. Theorem 3.3. For any point set P ∈ P0 , we have disc(P, R2 ) = Ω(log n). Strictly speaking, Theorem 3.2 does not depend on Theorem 3.3, but this theorem gives us some insights on the binary nets. Moreover, a key lemma to proving Theorem 3.2 (Lemma 3.3) shares essentially the same proof with Theorem 3.3. To prove Theorem 3.3, we need the following definition of corner volume: Definition 3.4. Consider a point set P ∈ P0 and a k-canonical cell Gk (i, j). Let q be the point of P in Gk (i, j). We define the corner volume VP (k, i, j) to be the volume of the orthogonal rectangle defined by q and its nearest corner of Gk (i, j). We use SP to denote the summation of the corner volumes over all possible triples (k, i, j), that is, SP = k k −1 log X−1 2X Xn n/2 k=0 VP (k, i, j). j=0 i=0 See Figure 2 for the illustration of corner volumes. A key insight of our lower bound proof is the following lemma, which relates the combinatorial discrepancy of P with its corner volume sum SP . 7 Lemma 3.1. There exists a constant c, such that for any point set P ∈ P0 with corner volume sum SP ≥ c log n, we have disc(P, R2 ) = Ω(log n). The proof of Lemma 3.1 makes use of the Roth’s orthogonal function method [21], which is widely used for proving lower bounds for Lebesgue discrepancy (see [9, 19]). Proof. Consider a binary net P ∈ P0 that satisfies SP ≥ c log n, where c is constant to be determined later. Given any coloring χ : P → {−1, +1} and a point x = (x1 , x2 ) ∈ [0, 1)2 , the combinatorial discrepancy D(x) at a point x is defined to be X D(x) = χ(p). p∈P ∩[0,x1 )×[0,x2 ) If we can prove supx∈[0,n)2 |D(x)| = Ω(log n), the lemma will follow. For k ∈ [log n], we define normalized wavelet functions fk as follow: for each k-canonical cell Gk (i, j), let q denote the point contained in it. We subdivide Gk (i, j) into four equal-size quadrants, and use Gk (i, j)U R , Gk (i, j)U L , Gk (i, j)LR , Gk (i, j)LL to denote the upper right, upper left, lower right and lower left quadrants, respectively (See Figure 2). Set fk (x) = χ(q) over quadrants Gk (i, j)U R and Gk (i, j)LL , and fk (x) = −χ(q) over the other two quadrants. To truly reveal the power of these wavelet functions, we define a more general class of functions called checkered functions. Definition 3.1. We say a function f : [0, 1)2 → R is (a, b)-checkered if for each (a, b)-cell, there exists a color C ∈ {−1, +1} such that f is equal to C over Ga,b (i, j)U R and Ga,b (i, j)LL and −C over the other two quadrants. Note that our definition of checkered function is slight different from the one used in [9]. It is easy to see the wavelet function fk is (k, log n − k)-checkered, and the integration of a (a, b)checkered function over an (a, b)-cell is 0. The following lemma states that the checkered property is “closed” under multiplication. Fact 3.1. If f is (a1 , b1 )-checkered and g is (a2 , b2 ) checkered, where a1 < a2 and b1 > b2 , then f g is (a1 , b2 )-checkered. For a proof, consider an (a1 , b2 )-cell Ga1 ,b2 (i, j). We observe that this cell is defined by the intersection of an (a1 , b1 )-cell and an (a2 , b2 )-cell, and we use Ga,b (i1 , j1 ) and Ga2 ,b2 (i2 , j2 ) to denote these two cells, respectively. Therefore the four quadrants of Ga1 ,b2 (i, j) are defined by the intersections of two neighboring quadrants of Ga1 ,b1 (i1 , j1 ) and two neighboring quadrants of Ga2 ,b2 (i2 , j2 ). Without loss of generality, we assume the four quadrants are defined by the intersections of the two upper quadrants of Ga1 ,b1 (i1 , j1 ) and two left quadrants of Ga2 ,b2 (i2 , j2 ) (see Figure 3). Since f is (a1 , b1 )checkered and g is (a2 , b2 ) checkered, we can assume f equal to C1 and −C1 over Ga1 ,b1 (i1 , j1 )U R and Ga2 ,b2 (i2 , j2 ), and g equal to C2 and −C2 over Ga2 ,b2 (i2 , j2 )U L and Ga2 ,b2 (i2 , j2 )LL , respectively. It follows that the f g is equal to C1 C2 over Ga1 ,b2 (i, j)U L and Ga1 ,b2 (i, j)LR , and −C1 C2 over Ga1 ,b2 (i, j)U R and Ga1 ,b2 (i, j)LL . Thus f g is an (a1 , b2 )-checkered function. A direct corollary from Fact 3.1 is that the wavelet functions are generalized orthogonal: 8 Ga1,b2 (i, j) 2 b2 Ga2,b2 (i2, j2) Ga1,b1 (i1, j1) 2 a1 Figure 3: Illustration of the intersection of two cells Corollary 3.1. For 0 ≤ k1 < · · · < kl ≤ log n, the function fk1 (x) · · · fkl (x) is a (k1 , log n − kl )checkered. As a consequence, we have Z fk1 (x) · · · fkl (x)dx = 0. [0,1)2 In the remaining of the paper we assume the range of the integration is [0, 1)2 and the variable of integration is dx when not specified. We define the Riesz product G(x) = −1 + log Yn (γfk (x) + 1), k=0 where γ is some constant to be determined later. By the inequality Z Z Z GD ≤ |GD| ≤ sup |D| · |G| , x∈[0,1)2 we can lower-bound the combinatorial discrepancy of P as follows: Z Z sup |D| ≥ GD |G| . (3.1) x∈[0,1)2 For the denominator Z R |G|, we have Z −1 + =2+ log Xn |G| = log Yn (γfk + 1) ≤ 1 + k=0 l=1 γ l log Xn l=0 X 0≤k1 <...<kl ≤log n Z 9 γ l X 0≤k1 <...<kl ≤log n fk1 · · · fkl = 2. Z f k1 · · · f kl (3.2) R The last equation is due to Corollary 3.1. The numerator follow: ! Z Z log Yn −1 + GD = (γfk + 1) · D G(x)D(x)dx can be expressed as k=0 =  Z ≥γ γ log Xn fk + k=0 log Xn Z log Xn γl l=2 fk D − X log Xn 0≤k1 <...<kl ≤log n γ 0≤k1 <...<kl ≤log n l=2 k=0 f k1 · · · f kl  · D X l  Z f k1 · · · f kl D . (3.3) R In order to estimate fk D, we consider the integration of a single product fk (x)D(x) over a k-canonical cell Gk (i, j). Recall that there is exactly one point of P that lies in Gk (i, j). We use k−1 q to denote this point in P , and χ(q) denote its color. Define horizontal vector u = ( 2 n , 0) and 1 ). Then for any point x ∈ Gk (i, j)LL , points x + u, x + v and x + u + v vertical vector v = (0, 2k+1 are the analogous points in quadrants Gk (i, j)LR , Gk (i, j)U L and Gk (i, j)U R of x, respectively (see Figure 2). The four analogous points defines an orthogonal rectangle. We use Rx to denote the orthogonal rectangle, and function R(x) to denote the indicator function of point q and Rx , that is, R(x) = 1 if q ∈ Rx and R(x) = 0 if otherwise. We can express the integral as Z fk (x)D(x)dx = Gk (i,j) = Z Z Gk (i,j)LL Gk (i,j)LL χ(q) (D(x) − D(x + u) − D(x + v) + D(x + u + v)) dx Z R(x)dx. χ(q) · χ(q)R(x)dx = Gk (i,j)LL The second equation is because (D(x) − D(x + u) − D(x + v) + D(x + u + v)) only counts points inside Rx , which can only be q, or nothing otherwise. Observe that R(x) = 1 if and only if one of x’s analogous points lies inside the rectangle defined by q and its nearest corner (see Figure 2), so we have Z Z R = VP (k, i, j). (3.4) fk D = Gk (i,j)LL Gk (i,j) Now we can compute the first term in (3.3): γ log Xn Z k=0 fk D = γ k k −1 Z log Xn n/2 X−1 2X k=0 i=0 j=0 fk D = γ Gk (i,j) = γSP ≥ cγ log n. k k −1 log Xn n/2 X−1 2X k=0 i=0 VP (k, i, j) j=0 (3.5) For the second term in (3.3), consider a (k1 , log n − kl )-cell Gk1 ,log n−kl . Note that P intersects Gk1 ,log n−kl (i, j) with at most 1 point. By Fact 3.1, function fk1 · · · fkl is (k1 , log n − kl )checkered, so following similar arguments in the proof of equation (3.4), we can show that the 10 integral R Gk1 ,log n−kl (i,j) fk1 · · · fkl D is 0 if P ∩ Gk1 ,log n−kl = ∅ and otherwise equal to the cor- ner volume of Gk1 ,kl (i, j). In the latter case, we can relax the corner volume to the volume of 1 Gk1 ,log n−kl (i, j), that is, 2kl −k . Thus we can estimate the integral as follows: 1n Z 1 fk1 · · · fkl D ≤ k −k1 . l 2 n Gk ,log n−k (i,j) 1 l Since there are n non-empty (k1 , log n − kl )-cells, we have Z 1 1 fk1 · · · fkl D ≤ n · k −k1 = k −k1 . 2 l n 2 l Now we can estimate the second term in (3.3): log Xn γ l=2 l X 0≤k1 <...<kl ≤log n Z f k1 · · · f kl D ≤ log Xn l=2 = log Xn X γl 1 0≤k1 <...<kl ≤log n γ l l=2 log n+1 X X w=l−1 kl −k1 =w 2kl −k1   1 w−1 . 2w l − 2 (3.6)  For the last equation we replace kl − k1 with a new index w and use the fact that there are w−1 l−2 ways to choose k2 , . . . , kl−1 in an interval of length w. Note that for a fixed w, there are log n+1−w possible values for k1 , so    log  n+1 log n+1 X Xn logX Xn logX log n + 1 − w w − 1 1 w−1 l l = γ γ 2w l − 2 2w l−2 l=2 w=l−1 kl −k1 =w ≤ l=2 w=l−1 log Xn log n+1 X γ l=2 l w=l−1 = log n log Xn γ l=2 l   log n w − 1 2w l−2 log n+1 X w=l−1   1 w−1 . 2w l − 2 (3.7) By inverting the order of the summation,    n+1 X log log n+1 w+1  Xn logX X 1 w−1 1 X w − 1 l−2 l 2 γ log n γ =γ log n l−2 2w l − 2 2w l=2 w=1 w=l−1 kl −k1 =w l=2 log n+1 X 1 (1 + γ)w−1 2w w=1  log n+1  X 2γ 2 1 + γ w−1 2 ≤ log n. =2γ log n 2 1−γ =γ 2 log n w=1 So from (3.5), (3.6), (3.7) and (3.8) we have Z 2γ 2 GD ≥ cγ log n − log n. 1−γ Setting γ small enough while combining with (3.1) and (3.2) completes the proof. 11 (3.8) Now we can give a proof to Theorem 3.3. By Lemma 3.1, we only need to show that the corner volume sum of any point set P ∈ P0 is large. Fix k and consider a k-canonical cell Gk (i, j). Let q denote the point in P ∩ Gk (i, j). We define the corner x-distance of Gk (i, j) to be the difference between the x-coordinate of q and that of its nearest corner of Gk (i, j). The corner y-distance is defined in similar manner. See Figure 2. We use X(k, i, j) and Y (k, i, j) to denote the corner xdistance and corner y-distance, respectively. Note that the corner volume VP (k, i, j) is the product of X(k, i, j) and Y (k, i, j). The following fact holds for the x-distances of canonical cells in a column: Fact 3.2. Fix k and i, we have {X(k, i, j) | j ∈ [2k ]} = { nj + are taken as multisets. 1 j 2n , n + 1 2n | j ∈ [2k−1 ]}, where both For a proof, note that the k-canonical cell Gk (i, j) is intersecting with 2k columns: G0 (i2k , 0), . . . , G0 ((i+ − 1, 0). There are 2k points in Gk (i, 0), . . . , Gk (i, 2k − 1), and they must reside in different columns. Therefore there is exactly one point in the each of the 2k columns, and their corner k−1 1 1 to 2 n −1 + 2n , and each value is hit exactly twice. Similarly, we have x-distances span from 2n 1)2k Fact 3.3. Fix k and j, we have {X(k, i, j) | i ∈ [n/2k ]} = { ni + both are taken as multisets. 1 i 2n , n + 1 2n | i ∈ [n/2k+1 ]}, where Now consider the product of X(k, i, j) and Y (k, i, j) over all (i, j) for a fixed k: n/2k −1 2k −1 Y i=0 Y n/2k −1 2k −1 Y VP (k, i, j) = j=0 i=0 Y X(k, i, j)Y (k, i, j) Y X(k, i, j) · j=0 n/2k −1 2k −1 = Y i=0 j=0 j=0 n/2k −1 2k−1 −1 = Y i=0 k −1 n/2k −1 2Y Y Y i=0 2k −1 1 2 Y j ) · ( + n 2n The last equation is due to Fact 3.2 and Fact 3.3. By relaxing we have n/2k −1 2k −1 Y i=0 Y VP (k, i, j) ≥ j=0 n/2k −1 2k−1 −1  Y i=0 = 1 nn Y j=0 n/2k −1  Y i=0 n/2k+1 −1 Y j=0 j=0 i+1 2n (2k−1 )! 22k−1 12 2 2 · 2k −1 Y (k, i, j) i n ( i=0 + 1 2n and i 1 2 + ) . n 2n j n k −1 n/2k+1 −1  2Y Y j=0 i=0 1 2n to j+1 2n 2 + Y  (n/2k+1 )! 2 · . 2n/2k+1 j=0 i+1 2n and j+1 2n , By the inequality x! ≥ (x/e)x , n/2k −1 2k −1 Y i=0 Y j=0 1 V (k, i, j) ≥ 2n n 1 = 2n n n/2k −1 Y i=0  2k−1 2e 2k−1 !2 n/2k −1 2k −1 i=0 j=0 · k −1 2Y j=0  n/2k+1 2e n/2k+1 !2 k k Y  2k−1 2 Y  n/2k+1 n/2 · 2e 2e 2k ·n/2k  n/2k ·2k 1 2k−1 n/2k+1 = 2n · n 2e 2e  k n  n  n k n/2 1 2 1 . · = = 2n n 4e 4e 16en  Using the inequality of geometric means, 1/n  k n/2 −1 2k −1 n/2k −1 2k −1 Y Y X X VP (k, i, j) ≥n· VP (k, i, j) ≥ n ·  i=0 j=0 j=0 i=0 1 1 = . 16en 16e P n Pn/2k −1 P2k −1 So the corner volume sum SP = log i=0 j=0 V (k, i, j) is lower bounded by log n/16e, k=0 and by Lemma 3.1, Theorem 3.3 follows. 3.3 A bit vector representation for P0 Another nice property of P0 is that we can derive the exact number of point sets in it. The following lemma is from the book [12]. We sketch the proof here, as it also provides a bit vector presentation of each binary net, which is essential in our lower bound proof. 1 Lemma 3.2 ([12]). The number of point sets in P0 is 2 2 n log n . Proof. It is equivalent to prove that the number of possible ways to place n points on the n × n 1 grid such that any k-canonical cell Gk (i, j) has exactly 1 point is 2 2 n log n . Our proof proceeds by an induction on n. Let P0 (n) denote the collection of binary nets of size n in a n × n grid. Observe that the line y = n/2 divides the grid [0, 1)2 into two rectangles: the upper grid [0, 1) × [ 12 , 1) and the lower grid [0, 1) × [0, 21 ). For i even, let Ri denote the rectangle defined by the union of i-th and (i + 1)-th columns G0 (i, 0) and G0 (i + 1, 0). Note that the line y = n/2 divides Ri into G1 ( 2i , 0) and G1 ( 2i , 1), and therefore defines four quadrants. By the definition of P0 , for any point set P ∈ P0 , the two points in G0 (i, 0) and G1 (i + 1, 0) must either reside in the lower left and upper right quadrants or in the lower right and upper left quadrants. There are in total n/2 even i’s, so the number of the possible choices is 2n/2 . See Figure 4. Note that after determining which half the point in each column resides in, the problem is divided into two sub-problems: counting the number of possible ways to place n/2 points in the upper grid and the lower grid. It is easy to show that each sub-problem is identical to the problem of counting the number of point sets in P0 (n/2), so we have the following recursion: n |P0 (n)| = 2 2 · |P0 (n/2)|2 . 1 Solving this recursion with P0 (1) = 1 yields that |P0 (n)| = 2 2 n log n . 13 n 2 n points in a n × n grid points in n 2 × n2 grid ⇒ ... ⇒ ... ... G0(0, 0) G0(1, 0)    ZP (0, 0, 0) =   0 1 G0(n − 2, 0) G0(n − 1, 0) ...    ZP (0, n/2 − 1, 0) =   0 1 Figure 4: Illustration of the partition vector of G0 . A critical observation is that the proof of Lemma 3.2 actually reveals a bit vector representation for each of the point sets in P0 , which will allow us to refine the collection P0 . To see this, we define the partition vector ZP for a point set P ∈ P0 as follows. For any (k, i, j) ∈ [log n] × [n/2k+1 ] × [2k ], consider the k-canonical cells Gk (2i, j) and Gk (2i + 1, j) and (k + 1)-canonical cells Gk+1 (i, 2j) and Gk+1 (i, 2j + 1). The two k-canonical cells overlap with the two (k + 1)-canonical cells, which defines four quadrants. By the definition of binary nets, there are two points in P contained in these quadrants. We define ZP (k, i, j) = 0 if the two points are in the lower left and upper right quadrants and ZP (k, i, j) = 1 if they are in the lower right and upper left quadrants. See Figure 4. We say the k-canonical cells Gk (2i, j) and Gk (2i + 1, j) is associated with bit ZP (k, i, j). Note that we use the triple (k, i, j) as the index into ZP for the ease of presentation; we can assume that the bits in ZP are stored in for example the lexicographic order of (k, i, j). Since the number of triples 1 (k, i, j) is 12 n log n, the total number of bits in ZP is 12 n log n. Let Z0 = {0, 1} 2 n log n denote the set of all possible partition vector ZP ’s. By the proof of Lemma 3.2, there is a bijection between Z0 and P0 . 3.4 Combinatorial discrepancy and corner volume distance Although we have proved that binary nets have large combinatorial discrepancy, it does not yet lead us to Theorem 3.2. In this section, we will refine P0 , the collection of all binary nets, to derive a collection P ∗ , such that the union of any two point sets in P ∗ has large combinatorial discrepancy. In order to characterize the combinatorial discrepancy of the union of two point sets, we will need the following definition of corner volume distance. Definition 3.5. For two point sets P1 , P2 ∈ P0 , the corner volume distance of P1 and P2 is the summation of |VP1 (k, i, j) − VP2 (k, i, j)|, over all (k, i, j). In other words, let ∆(P1 , P2 ) denote the 14 corner volume distance of P1 and P2 , then ∆(P1 , P2 ) = k k −1 log X−1 2X Xn n/2 k=0 i=0 |VP1 (k, i, j) − VP2 (k, i, j)| . j=0 The following lemma relates the combinatorial discrepancy of the union of two point sets with their corner volume distance: Lemma 3.3. Let P ∗ be a subset of P0 . If there exists a constant c, such that for any two point sets P1 , P2 ∈ P0 , that their corner volume distance satisfies ∆(P1 , P2 ) ≥ c log n, then disc(P1 ∪P2 , R2 ) = Ω(log n). Proof. The proof follows the same framework as the proof for Lemma 3.1. Note that there are exactly two points of P1 ∪ P2 in each k-canonical cell Gk (i, j), and we use q1 , q2 denote the two points from P1 and P2 , respectively. We will set fk (x) = C for quadrants Gk (i, j)U R and Gk (i, j)LL and fk (x) = −C for the other two quadrants, where C is determined as follows:  χ(q1 ) if VP1 (k, i, j) ≥ VP2 (k, i, j); C= χ(q2 ) if VP1 (k, i, j) < VP2 (k, i, j). Let D(x) be the combinatorial discrepancy at x over P1 ∪ P2 . By equation (3.5) in the proof of Lemma 3.1, we get  Z (VP1 (k, i, j) + VP2 (k, i, j)) if χ(q1 ) = χ(q2 ); fk D = |VP1 (k, i, j) − VP2 (k, i, j)| if χ(q1 ) 6= χ(q2 ). Gk (i,j) In either case, Z Gk (i,j) fk D ≥ |VP1 (k, i, j) − VP2 (k, i, j)| . And the rest of the proof follows the same argument in the proof of Lemma 3.1. Here we briefly explain the high level idea for proving Theorem 3.2. By Lemma 3.3, it is sufficient to find a sub-collection P ∗ ⊆ P0 , such that for any two point sets in P ∗ , their corner volume distance is large. We will choose a subset Z1 ⊆ Z0 , and project each vector in Z1 down to a slightly shorter bit vector T. The collection T of all resulted bit vector T’s induces a sub-collection P1 ⊆ P0 , and each T represents a point set in P1 . Then we prove that for any two point sets P1 , P2 ∈ P1 , there is a linear dependence between the corner volume distance ∆(P1 , P2 ) and the Hamming distance of their bit vector representations TP1 and TP2 . Finally, we show that there is a large sub-collection of T with large pair-wise Hamming distances, and this sub-collection induces a collection of point sets P ∗ ∈ P1 in which the union of any two point sets has large combinatorial discrepancy. We focus on an (k + 6, log n − k)-cell Gk+6,log n−k (i, j), for k ∈ {0, 6, 12, . . . , log n − 6}. Note that Gk+6,log n−k (i, j) only contains (k + l)-canonical cells for l ∈ [7]. Let Fk,i,j (l) denote the set of all (k + l)-canonical cells in Gk+6,log n−k (i, j), which can be listed as Fk,i,j (l) = {Gk+l (26−l i + s, 2l j + t) | s ∈ [26−l ], t ∈ [2l ]}. 15 Note that |Fk,i,j (l)| = 64 for each l ∈ [7]. Let Zk,i,j (l) denote the set of indices of bits in the partition vector that are associated with the some (k + l)-canonical cells in Gk+6,log n−k (i, j), for l ∈ [6], i.e., Zk,i,j (l) = {(k + l, 25−l i + s, 2l j + t) | s ∈ [25−l ], t ∈ [2l ]}. Define Zk,i,j to be the union of the Zk,i,j (l)’s. Since there are 32 bits in Zk,i,j (l) for each l ∈ [6], the total number of bits in Zk,i,j is 192 (here we use the indices in Zk,i,j to denote their corresponding bits in the partition vector of P , with a slightly abuse of notation). The following fact shows the Zk,i,j ’s partition all the 21 n log n bits: Fact 3.4. The number of Zk,i,j ’s is ∅. 1 384 n log n; For different (k, i, j) and (k ′ , i′ , j ′ ), Zk,i,j ∩ Zk′ ,i′ ,j ′ = The proof of the above claims are fairly straightforward: The number of different Zk,i,j ’s is equal to the number of different Gk+6,log n−k (i, j)’s. For a fixed k, the number of different (k+6, log n−k)cells is n/64, and the number of different k’s is log n/6, so the total number of different Zk,i,j ’s is 1 ′ 384 n log n. For the second claim, we consider the following two cases: If k = k , we have(i, j) 6= ′ ′ (i , j ). This implies that the two (k, log n − k + 6)-cells are disjoint, therefore the bits associated with the canonical cells inside them are disjoint. For k 6= k ′ , observe that we choose k and k′ from {0, 6, . . . , log n − 6}, and Zk,i,j and Zk′ ,i′ ,j ′ only contain bits associated with (k + l)-canonical cells and (k′ + l′ )-canonical cells, respectively, for l, l′ ∈ [6], so Zk,i,j (l) and Zk′ i′ j ′ (l′ ) are disjoint, for l, l′ ∈ [6]. The reason we group the bits in the partition vector into small subsets is that we can view each subset Zk,i,j as a partition vector of the cell Gk+6,log n−k (i, j), which allows us to manipulate the positions of the points inside it. More precisely, we can view Gk+6,log n−k (i, j) as a 64 × 64 grid, with each grid cell being a (k, log n − k − 6)-cell in the original [0, 1)2 grid. Moreover, a (k + l)canonical cell contained in Gk+6,log n−k (i, j) corresponds to a l-canonical cell in the 64 × 64 grid. Note that there are 64 points in this grid, and the bits in Zk,i,j correspond to the partition vector of this 64-point set. Now consider a (k + 3)-canonical cell Gk+3 (8i, 8j), which corresponds to the lower left 8 × 8 grid in Gk+6,log n−k (i, j). For each point set P ∈ P0 , there is exactly one point in Gk+3 (8i, 8j), and the bits in Zk,i,j encode the position of the point on the 8×8 grid. Suppose s1 and s2 are two bit vectors of length 192, such that when the bits in Zk,i,j are assigned as s1 (denoted Zk,i,j = s1 ), the point in Gk+3 (8i, 8j) resides in the upper left grid cell,; and when Zk,i,j = s2 , it resides in the grid cell to the upper left of the center of Gk+3 (8i, 8j) (see Figure 5). Note that by this definition, the corner volume distance of this two point is at least n/8. Meanwhile, since there are no constraints on the other 63 points in Gk+6,log n−k (i, j), it is easy to show that such assignments s1 and s2 indeed exist. By restricting the assignments of Zk,i,j to {s1 , s2 }, we have created a subset Z1 of Z0 = 1 {0, 1} 2 n log n : Z1 = {Z | Zk,i,j = s1 or s2 , k ∈ {0, 6, . . . , log n − 6}, i ∈ [n/2k+6 ], j ∈ [2k ]}. Let P1 denote the sub-collection of P0 that Z1 encode. By Fact 3.4, the number of Zk,i,j ’s is 1 n log n 1 1 384 . Define a bit vector T of length 384 n log n, such that T(k, i, j) = 0 384 n log n, so |P1 | = 2 if Zk,i,j = s1 and T(k, i, j) = 1 if Zk,i,,j = s2 , then a bit vector T encodes a bit vector Z ∈ Z1 , and 1 therefore encodes a point set in P1 . Let T = {0, 1} 384 n log n denote the collection of all bit vectors 1 T. Then there is a bijection between T and P1 , and |T | = |P1 | = 2 384 n log n . 16 n/2k n/2k+3 2k+3 2k+6    s1 s2 Gk+3(8i, 8j) Zk,i,j =   Gk+6,log n−k (i, j) Figure 5: Illustration of the 64 × 64 grid. The volume of each cell in Gk+3 (8i, 8j) is n/64. The cells in shadow represent the corner volume difference of s1 and s2 . Consider two point sets P1 and P2 in P1 . Let TP1 and TP2 denote the bit vector that encode these two point sets, respectively. The following lemma relates the corner volume distance of P1 and P2 with the Hamming distance between TP1 and TP2 . Lemma 3.4. Suppose there exists a constant c, such that for any P1 , P2 ∈ P1 , the Hamming distance H(TP1 , TP2 ) ≥ cn log n, then the corner volume distance between P1 and P2 , ∆(P1 , P2 ), is Ω(n2 log n). Proof. We make the following relaxation on ∆(P1 , P2 ) : ∆(P1 , P2 ) = k k −1 log Xn n/2 X−1 2X k=0 ≥ i=0 X |VP1 (k, i, j) − VP1 (k, i, j)| j=0 k∈{0,6,...,log n−6} n/2k+6 −1 2k −1 X i=0 X |VP1 (k + 3, 8i, 8j) − VP1 (k + 3, 8i, 8j)| . j=0 Now consider the bits TP1 (k, i, j) and TP2 (k, i, j). If TP1 (k, i, j) 6= TP2 (k, i, j), then by the choice of s1 and s2 we have |VP1 (k + 3, 8i, 8j − VP2 (k + 3, 8i, 8j)| ≥ n/8. So the corner volume distance ∆(P1 , P2 ) is lower bounded by the Hamming distance H(TP1 , TP2 ) multiplied by n/8, and the lemma follows. The following lemma (probably folklore; we provide a proof here for completeness) states that there is a large subset of T , in which the vectors are well separated in terms of Hamming distance. 1 1 n log n. There is a subset T ∗ ⊆ T = {0, 1}N of size 2 16 N , such that for Lemma 3.5. Let N = 384 ∗ any T1 6= T2 ∈ T , the Hamming distance H(T1 , T2 ) ≥ 41 N . Proof. We embed T into a graph (V, E). Each node in V represents a vector T ∈ T , and there is edge between two nodes T1 and T2 if and only if H(T1 , T2 ) < 14 N . By this embedding, it is 1 equivalent to prove that there is an independent set of size 2 16 N in (V, E). 17 Fix a vector T ∈ T , and consider a random vector T′ uniformly drawn from T . It is easy to see that the Hamming distance H(T, T′ ) follows binomial distribution. By Chernoff bound 1 1 1 Pr[H(T, T′ ) < N ] ≤ e− 16 N ≤ 2− 16 N . 4 1 This implies that the probability that there is an edge between T and T′ is at most 2− 16 N . By the 1 fact that T′ is uniformly chosen from T , it follows that the degree of T is at most d = 2N · 2− 16 N = 15 2 16 N . Since a graph with maximum degree d must have an independent set of size at least |V | /d, 1 there must be an independent set of size at least 2 16 N . 1 Let P ∗ denote the collection of point sets encoded by T ∗ . By Lemma 3.5, |P ∗ | ≥ 2 16 N = 1 2 6144 n log n . From Lemma 3.3 and 3.4 we know that for any two point sets P1 6= P2 ∈ P ∗ , the combinatorial discrepancy of the union of P1 and P2 is Ω(log n). This completes the proof of Theorem 3.2. References [1] P. Afshani and T. Chan. On approximate range counting and depth. Discrete and Computational Geometry, 42(1):3–21, 2009. [2] P. K. Agarwal and J. Erickson. Geometric range searching and its relatives. In Discrete and Computational Geometry: Ten Years Later. Mathematical Society Press, 1997. [3] B. Aronov, E. Ezra, and M. Sharir. Small-size ε-nets for axis-parallel rectangles and boxes. SIAM Journal on Computing, 39(7):3248–3282, 2010. [4] B. Aronov and M. Sharir. Approximate halfspace range counting. SIAM Journal on Computing, 39(7):2704–2725, 2010. [5] S. Arya and D. M. Mount. Approximate range searching. Computational Geometry: Theory and Applications, 17(3–4):135–152, 2000. [6] N. Bansal. Constructive algorithms for discrepancy minimization. In Proc. IEEE Symposium on Foundations of Computer Science, pages 3–10. IEEE, 2010. [7] J. Beck. Balanced two-colorings of finite sets in the square, I. Combinatorica, 1(4):327–335, 1981. [8] J. Beck and T. Fiala. “Integer-making” theorems. Discrete Applied Mathematics, 3(1):1–8, 1981. [9] B. Chazelle. The Discrepancy Method. Cambridge University Press, 2000. [10] B. Chazelle. A functional approach to data structures and its use in multidimensional searching. SIAM Journal on Computing, 17(3):427–462, 1988. [11] A. Clayman, K. Lawrence, G. Mullen, H. Niederreiter, and N. Sloane. Updated tables of parameters of(t, m, s)-nets. Journal of Combinatorial Designs, 7(5):381–393, 1999. 18 [12] M. Darnall. Results on low discrepancy point sets. ProQuest, 2008. [13] S. Har-Peled and M. Sharir. Relative (p, ε)-approximations in geometry. Discrete and Computational Geometry, 45(3):462–496, 2011. [14] D. Haussler and E. Welzl. Epsilon-nets and simplex range queries. Discrete and Computational Geometry, 2:127–151, 1987. [15] P. Hellekalek, G. Larcher, and J. Beck. Random and quasi-random point sets, volume 138. Springer Verlag, 1998. [16] K. G. Larsen. On range searching in the group model and combinatorial discrepancy. In Proc. IEEE Symposium on Foundations of Computer Science, 2011. [17] S. Lovett and R. Meka. Constructive discrepancy minimization by walking on the edges. In Proc. IEEE Symposium on Foundations of Computer Science, pages 61–67. IEEE, 2012. [18] J. Matoušek, and A. Nikolov. Combinatorial Discrepancy for Boxes via the gamma 2 Norm. International Symposium on Computational Geometry, pages 1–15, 2015 [19] J. Matoušek. Geometric Discrepancy. Springer, Heidelberg, Germany, 1999. [20] J. Pach and G. Tardos. Tight lower bounds for the size of epsilon-nets. In Journal of the American Mathematical Society, 26(3)645–658, 2013. [21] K. Roth. On irregularities of distribution. Mathematika, 1(02):73–79, 1954. [22] K. Roth. On a theorem of Beck. Glasgow Mathematical Journal, 27(1):195–201, 1985. [23] W. Schmidt. Irregularities of distribution. vii. Acta Arithmetica, 21:45–50, 1972. [24] I. Sobol’. On the distribution of points in a cube and the approximate evaluation of integrals. Zhurnal Vychislitel’noi Matematiki i Matematicheskoi Fiziki, 7(4):784–802, 1967. [25] A. Srinivasan. Improving the discrepancy bound for sparse matrices: Better approximations for sparse lattice approximation problems. In Proc. ACM-SIAM Symposium on Discrete Algorithms, pages 692–701, 1997. [26] J. Van der Corput. Verteilungsfunktionen. NV Noord-Hollandsche Uitgevers Maatschappij, 1936. 19 (k + 2)εn (k + 1)εn kεn xa2l x(a+1)2l
8cs.DS
Call-by-Name Gradual Type Theory (Extended Version) Max S. New∗1 and Daniel R. Licata†2 arXiv:1802.00061v2 [cs.PL] 23 Mar 2018 1 2 Northeastern University, Boston, USA, [email protected] Wesleyan University, Middletown, USA, [email protected] March 28, 2018 Abstract We present gradual type theory, a logic and type theory for call-by-name gradual typing. We define the central constructions of gradual typing (the dynamic type, type casts and type error) in a novel way, by universal properties relative to new judgments for gradual type and term dynamism, which were developed in blame calculi and to state the “gradual guarantee” theorem of gradual typing. Combined with the ordinary extensionality (η) principles that type theory provides, we show that most of the standard operational behavior of casts is uniquely determined by the gradual guarantee. This provides a semantic justification for the definitions of casts, and shows that non-standard definitions of casts must violate these principles. Our type theory is the internal language of a certain class of preorder categories called equipments. We give a general construction of an equipment interpreting gradual type theory from a 2-category representing non-gradual types and programs, which is a semantic analogue of Findler and Felleisen’s definitions of contracts, and use it to build some concrete domain-theoretic models of gradual typing. This work is licensed under a Creative Commons “Attribution 4.0 International” license. ∗ This material is based upon work supported by the National Science Foundation under grant CCF-1453796. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. † This research was partially supported by the United States Air Force Research Laboratory under agreement numbers FA-95501210370 and FA-95501510053. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the United States Air Force Research Laboratory, the U.S. Government or Carnegie Mellon University. 1 1 Introduction Gradually typed languages allow for static and dynamic programming styles within the same language. They are designed with twin goals of allowing easy interoperability between static and dynamic portions of a codebase and facilitating a smooth transition from dynamic to static typing. This allows for the introduction of new typing features to legacy languages and codebases without the enormous manual effort currently necessary to migrate code from a dynamically typed language to a fully statically typed language. Gradual typing allows exploratory programming and prototyping to be done in a forgiving, dynamically typed style, while later that code can be typed to ease readability and refactoring. Due to this appeal, there has been a great deal of research on extending gradual typing [33, 29] to numerous language features such as parametric polymorphism [1, 16], effect tracking [2], typestate [37], session types [15], and refinement types [18]. Almost all work on gradual typing is based solely on operational semantics, and recent work such as [28] has codified some of the central design principles of gradual typing in an operational setting. In this paper, we are interested in complementing this operational work with a type-theoretic and category-theoretic analysis of these design principles. We believe this will improve our understanding of gradually typed languages, particularly with respect to principles for reasoning about program equivalence, and assist in designing and evaluating new gradually typed languages. One of the central design principles for gradual typing is gradual type soundness. At its most general, this should mean that the types of the gradually typed language provide the same type-based reasoning that one could reasonably expect from a similar statically typed language, i.e. one with effects. While this has previously been defined using operational semantics and a notion of blame [35], the idea of soundness we consider here is that the types should provide the same extensionality (η) principles as in a statically typed language. This way, programmers can reason about the “typed” parts of gradual programs in the same way as in a fully static language. This definition fits nicely with a category-theoretic perspective, because the β and η principles correspond to definitions of connectives by a universal property. The second design principle is the gradual guarantee [28], which we will refer to as graduality (by analogy with parametricity). Informally, graduality of a language means that syntactic changes from dynamic to static typing (or vice-versa) should result in simple, predictable changes to the semantics of a term. More specifically, if a portion of a program is made “more static”/“less dynamic” then the new program should either have the same behavior or result in a runtime type error. Other observable behavior such as values produced, I/O actions performed or termination should not be changed. In other words, a “less dynamic” program should expose “less information”: by making types more static, we limit the interface for the program and thus hide behavior, replacing it with a runtime type error. Of course, limiting the interface is precisely what allows for the typed reasoning principles that gradual type soundness requires. In this paper, we codify these two principles of soundness and graduality directly into a logical syntax we dub (call-by-name) Gradual Type Theory (Section 2). For graduality, we develop a logic of type and term dynamism that can be used to reason about the relationship between “more dynamic” and “less dynamic” versions of a program, and to give a novel uniform specification (universal property) for the dynamic type, type errors, and the runtime type casts of a gradually typed language. For soundness, we assert β and η principles as axioms of term dynamism, so it can also be used to reason about programs’ behavior. Furthermore, using the η principles for types, we show that most of the operational rules of runtime casts of existing (call-by-name) gradually typed languages are uniquely determined by these constraints of soundness and graduality (Section 3). As an example application, uniqueness implies that a complicated space-efficient contract enforcement scheme in a particular language (e.g. as in [30]) is equivalent to a standard wrapping implementation, if it satisfies soundness and graduality (which might be separately provable by a logical relations argument). Contrapositively, uniqueness implies that any enforcement scheme in a specific gradually typed language that is not equivalent to the standard “wrapping” ones must violate either soundness or graduality. We have chosen call-by-name because it is a simple setting with the necessary η principles (for negative types) to illustrate our technique; we leave call-by-value gradual type theory to future work. We give a sound and complete category theoretic semantics for gradual type theory in terms of certain preorder categories (double categories where one direction is thin) (Section 4). We show that the contract interpretation of gradual typing [34] can be understood as a tool for constructing models (Section 5): starting from some existing language/category C, we first implement casts as suitable pairs of functions/morphisms from C, and then equip every type with canonical casts to the dynamic type. Technically, the first step forms 2 a double category from a 2-category by interpreting vertical arrows as Galois insertions/coreflections, i.e., related pairs of an upcast and a downcast. Second, from a suitable choice of dynamic type, we construct a “vertical slice” preorder category whose objects are vertical arrows into the chosen dynamic type. We apply this to construct some concrete models in domains (Section 6). Conceptually, gradual type theory is analogous to Moggi’s monadic metalanguage [21]: it clarifies general principles present in many different programming languages; it is the internal language of a quite general class of category-theoretic structures; and, for a specific language, a number of useful results can be proved all at once by showing that a logical relation over it is a model of the type theory. A logic of dynamism and casts Before proceeding to the technical details, we explain at a high level how our type theory accounts for two key features of gradual typing: graduality and casts. The “gradual guarantee” as defined in [28] applies to a surface language where runtime type casts are implicitly inserted based on type annotations, but we will focus here on an analysis of fully elaborated languages, where explicit casts have already been inserted (so our work does not yet address gradual type checking). The gradual guarantee as defined in [28] makes use of a syntactically less dynamic ordering on types: the dynamic type (universal domain) ? is the most dynamic, and A is less dynamic than B if B has the same structure as A but some sub-terms are replaced with ? (for example, A → (B × C) is less dynamic than ? → (B×?), ? →? and ?). Intuitively, a less dynamic type constrains the behavior of the program more, but consequently gives stronger reasoning principles. This notion is extended to closed well-typed terms t : A and t0 : A0 with A less dynamic than A0 : t is syntactically less dynamic than t0 if t is obtained from t0 by replacing the input and output type of each type cast with a less (or equally) dynamic type (in [28] this was called “precision”). For example, if add1 : ? → N and true : ?, then add1 ((? ⇐ N)(N ⇐ ?)true) (cast true from dynamic to N and back, to assert it is a number) is syntactically less dynamic than add1 ((? ⇐ ?)(? ⇐ ?)true) (where both casts are the identity). Then the gradual guarantee [28] says that if t is syntactically less dynamic than t0 , then t is semantically less dynamic than t0 : either t evaluates to a type error (in which case t0 may do anything) or t, t0 have the same first-order behavior (both diverge or both terminate with t producing a less dynamic value). In the above example, the less dynamic term always errors (because true fails the runtime N check), while the more dynamic term only errors if add1 uses its argument as a number. In contrast, a program that returns a different value than add1 (true) does will not be semantically less dynamic than it. The approach we take in this paper is to give a syntactic logic for the semantic notion of one term being less dynamic than another, with f (type error) the least element, and all term constructors monotone. We call this the term dynamism relation t v t0 , and it includes not only syntactic changes in type casts, as above, but also equational laws like identity and composition for casts, and βη rules—so t v t0 intuitively means that t type-errors more than (or as much as) t0 , but is otherwise equal according to these equational laws. A programming language that is a model of our type theory will therefore be equipped with a semantic tJvKt0 relation validating these rules, so tJvKt0 if t type-errors more than t0 up to these equational and monotonicity laws. In particular, making type cast annotations less dynamic will result in related programs, and if JvK is adequate (doesn’t equate operationally distinguishable terms), then this implies the gradual guarantee [28]. Therefore, we say a model “satisfies graduality” in the same sense that a language satisfies parametricity. Next, we discuss the relationship between term dynamism and casts/contracts, one of the most novel parts of our theory. Explicit casts in a gradually typed language are typically presented by the syntactic form (B ⇐ A)t, and their semantics is either defined by various operational reductions that inspect the structure of A and B, or by “contract” translations, which compile a language with casts to another language, where the casts are implemented as ordinary functions (which, e.g. check the inputs and outputs of functions, check the components of pairs, etc.) . In both cases, the behavior of casts is defined by inspection on types and part of the language definition, with little justification beyond intuition and precedent. In gradual type theory, on the other hand, the behavior of casts is not defined by inspection of types. Rather, we use the new type and term dynamism judgments, which are defined prior to casts, to give a few simple and uniform rules specifying casts in all types via a universal property (optimal implementation of a specification). Our methodology requires isolating two special subclasses of casts, upcasts and downcasts. An upcast goes from a “more static” to a “more dynamic” type— for instance (? ⇐ (A → B)) is an upcast from a function type up to the dynamic type—whereas a downcast is the opposite, casting to the more static type. We represent the relationship “A is less dynamic than B” by a type dynamism judgment A v B (which corresponds to the “naı̈ve subtyping” of [35]). In gradual type theory, the upcast hB  Ai from A to B and the downcast hA  Bi from B to A can be formed whenever A v B. This leaves out certain casts like 3 (? × N) ⇐ (N × ?) where neither type is more dynamic than the other. However, as first recognized in [14], these casts are macro-expressible [9] as a composite of an upcast to the dynamic type and then a downcast from it (define (B ⇐ A)t as the composite hB  ?ih?  Ait). A key insight is that we can give upcasts and downcasts dual specifications using term dynamism, which say how the casts relate programs to type dynamism. If A v B, then for any term t : A, the upcast hB  Ait : B is the least dynamic term of type B that is more dynamic than t. In order-theoretic terms, hB  Ait : B is the v-meet of all terms u : B with t v u. Downcasts have a dual interpretation as a v-join. Intuitively, this property means upcast hB  Ait behaves as much as possible like t itself, while supporting the additional interface provided by expanding the type from A to B. This simple definition has powerful consequences that we explore in Section 3, because it characterizes the upcasts and downcasts up to program equivalence. We show that standard implementations of casts are the unique implementations that satisfy β, η and basic congruence rules. In fact, almost all of the standard operational rules of a simple call-by-name gradually typed language are term-dynamism equivalences in gradual type theory. The exception is rules that rely on disjointness of different type connectives (such as h? → ?  ?ih?  ? × ?it 7→ f), which are independent, and can be added as axioms. Another major contribution of our paper is a soundness and completeness theorem for gradual type theory with respect to semantics in preorder categories, i.e., categories internal to the category of preordered sets, i.e., sets with a reflexive, transitive relation. This presents a simple alternative, algebraic specification of type and term dynamism. A preorder category is a category where the sets of objects and arrows have the structure of a preorder, and the source, target, identity and composition functions are all monotone. The ordering on objects models type dynamism and the ordering on terms models term dynamism, and the rest of the requirements succinctly describe the relationship between those two notions. To model the casts, we in addition need that for any two objects with A v B, there exist morphisms A → B and B → A that model upcasts and downcasts. In the category theory literature, this sort of preorder category is called an equipment and we can use existing constructions and results from that work. In fact, in constructing models we at times need a generalization of preorder categories called double categories, which have the same relation to preorder categories that categories have to preorders. In addition to providing a different perspective on the structure of type and term dynamism, the preorder category semantics of gradual typing enables us to systematically build models of gradual typing. In particular, we cast the “contract interpretation” of casts as a semantic construction of a model of gradual typing from a 2-category. Furthermore we can decompose this construction into simple pieces. First, we form a double category from a 2-category by interpreting vertical arrows as Galois insertions/coreflections, i.e., related pairs of an upcast and a downcast. Second, from a suitable choice of dynamic type, we construct a “vertical slice” preorder category whose objects are vertical arrows into the chosen dynamic type. We then instantiate this construction with multiple domain theoretic models. First we show that Dana Scott’s classical construction of a model of types from retracts of a universal domain is an instance, but is inadequate for interpreting gradual typing because it conflates type errors and nontermination. Then we show that a better model can be constructed by using a category of “ordered domains” that in addition to the domain ordering have a separate “type error ordering” that models term dynamism. 2 Gradual Type Theory In this section, we present the rules of gradual type theory (GTT). Gradual type theory presents the types, connectives and casts of gradual typing in a modular, type-theoretic way: the dynamic type and casts are defined by rules using the judgmental structure of the type theory, which extends the usual judgmental structure of call-by-name typed lambda calculus with a syntax for type and term dynamism. Since the judgmental structure is as important as these types, we present a bare preorder type theory (PTT) with no types first. Then we can modularly define what it means for this theory to have a dynamic type, casts, functions and products, and gradual type theory is preorder type theory with all of these. 2.1 Preorder Type Theory Preorder type theory (PTT) has 6 judgments: types, contexts, type dynamism, dynamism contexts, terms and term dynamism. Their presuppositions (one is only allowed to make a judgment when these conditions 4 A type A type 0 A type Γ context 0 Γ context 0 Γ context Γ context 0 AvA Φ:ΓvΓ A type Φ : Γ v Γ0 Γ`t:A A v A0 Γ0 ` t0 : A0 Φ ` t v t0 : A v A0 Γ`t:A Figure 1: Judgment Presuppositions of Preorder Type Theory X ∈ Σ0 X type Γ context · context f ∈ Σ2 (A1 , . . . , An ; B) A type x 6∈ dom(Γ) Γ, x : A context ∆ ` γ : x1 : A1 , . . . , xn : An ∆ ` f (γ(x1 ), . . . , γ(xn )) : B Γ, x : A, Γ0 ` x : A Γ`γ:∆=γ∈ Y (Γ ` A) x:A∈∆ Figure 2: Preorder Type Theory: Type and Term Structure hold) are presented in Figure 1, where A type and Γ context have no conditions. The types, contexts and terms (Figure 2) are structured as a standard call-by-name type theory. Terms are treated as intrinsically typed with respect to a context and an output type, contexts are ordered lists (this is important for our definition of dynamism context below). For bare preorder type theory, the only types are base types, and the only terms are variables and applications of uninterpreted function symbols (whose rule we omit). These are all given by a signature Σ, formally defined below in 1. A substitution γ : Γ0 ` Γ is defined as usual as giving, for every typed variable in the output context x : A ∈ Γ, a term of that type relative to the input context Γ0 ` γ(x) : A. Our term language supports a notion of substitution where if γ : Γ0 ` Γ and Γ ` t : A then γ 0 ` t[γ] : A. Weakening, contraction, and exchange are all special cases of the admissible action of substitution. Next, we discuss the new judgments of type dynamism, dynamism contexts, and term dynamism. A type dynamism judgment (Figure 3) A v B relates two well-formed types, and is read as “A is less dynamic than B”. In preorder type theory, the only rules are reflexivity and transitivity, making type dynamism a preorder, and axioms from a signature. The remaining rules in Figure 3 define type dynamism contexts Φ, which are used in the definition of term dynamism. While terms are indexed by a type and a typing context, term dynamism judgments Φ ` t v t0 : A v A0 are indexed by two terms Γ ` t : A and Γ0 ` t0 : A0 , such that A v A0 (A is less dynamic than A0 ) and Γ is less dynamic than Γ0 . Thus, we require a judgment Φ : Γ v Γ0 , which lifts type dynamism to contexts pointwise (for any x : A ∈ Γ, the corresponding x0 : A0 ∈ Γ0 satisfies A v A0 ). This uses the structure of Γ and Γ0 as ordered lists: a dynamism context Φ : Γ v Γ0 implies that Γ and Γ0 have the same length and associates variables based on their order in the context, so that Φ is uniquely determined by Γ and Γ0 . If we want to form a judgment t v t0 where their contexts are not aligned in this way, we can always use exchange on one of them to align it with the other. We notate dynamism contexts to evoke a logical relations interpretation of term dynamism: under the conditions that x1 v x01 : A1 v A01 , . . . then we have that t v t0 : B v B 0 . The term dynamism judgment admits constructions (Figure 4) corresponding to both the structural rules of terms and the preorder structure of type dynamism, beginning from arbitrary term dynamism axioms (TmPrec-Ax). First, there is a rule (TmPrec-Var) that relates variables. Next there is a compositionality rule (TmPrec-Comp) that allows us to prove dynamism judgments by breaking terms down into components. We elide the definition of substitution dynamism Φ ` γ v γ 0 : Ψ, which is pointwise term dynamism. Last, we add an appropriate form of reflexivity (TmPrec-Refl) and transitivity (TmPrec-Trans) as rules, whose well-formedness depends on the reflexivity and transitivity of type dynamism. While the reflexivity rule is 5 AvA AvB BvC AvC (A, B) ∈ Σ1 AvB Φ : Γ v Γ0 A v A0 (Φ, x v x0 : A v A0 ) : Γ, x : A v Γ0 , x0 : A0 ·:·v· when Φ : Γ v Γ0 and Ψ : ∆ v ∆0 , δ : Γ ` ∆ and δ 0 : Γ0 ` ∆0 Φ ` δ v δ 0 : Ψ = ∀(x v x0 : A v A0 ∈ Ψ). Φ ` δ(x) v δ 0 (x0 ) : A v A0 Figure 3: Type and Context Dynamism x v x0 : A v A0 ∈ Φ 0 0 Φ`xvx :AvA Γ`t:A Φ ` t v t0 : A v A0 TmPrec-Var 0 Ψ ` t[γ] v t [γ ] : A v A0 TmPrec-Comp Φ : Γ v Γ0 ` t v t0 : A v A0 Φ : Γ0 v Γ00 ` t0 v t00 : A0 v A00 0 Φ:ΓvΓ Φ`tvt:AvA Ψ ` γ v γ0 : Φ 0 TmPrec-Refl (t, t0 ) ∈ Σ3 Γ`t:A Ψ : Γ v Γ00 ` t v t00 : A v A00 Γ0 ` t0 : A0 Φ ` t v t0 : A v A0 TmPrec-Trans Φ : Γ v Γ0 TmPrec-Ax Figure 4: Primitive Rules of Term Dynamism intuitive, the transitivity rule is more complex. Consider an example where A v A0 v A00 and B v B 0 v B 00 : x v x 0 : A v A0 ` t v t 0 : B v B 0 x0 v x00 : A0 v A00 ` t0 v t00 : B 0 v B 00 x v x00 : A v A00 ` t v t00 : B v B 00 In a logical relations interpretation of term dynamism, we would have relations vA,A0 , vA0 ,A00 , vA,A00 and similarly for the B’s, and the term dynamism judgment of the conclusion would be interpreted as “for any u vA,A00 u00 , t[u/x] vB,B 00 t00 [u00 /x00 ]00 . However, we could only instantiate the premises of the judgment if we could produce some middle u0 with u vA,A0 u0 vA0 ,A00 u00 . In such models, a middle u0 always exists, because an implicit condition of the transitivity rule is that vA,A00 is the relation composite of vA,A0 and vA0 ,A00 (the composite exists by type dynamism transitivity, and type dynamism witnesses are unique in PTT (thin in the semantics)). PTT itself does not give a term for this u0 , but the upcasts and downcasts in gradual type theory do (take it to be hA0  Aiu or hA0  A00 iu00 ). We also introduce some convenient syntactic sugar for term dynamism contexts and term dynamism, but for maximum clarity we will not use the sugar when introducing rules, only when it shortens proofs we present in the theory. Sometimes it is convenient to use the same variable name at the same type in both t and t0 and so in such a case we simply write x : A, which, in a type dynamism context is just a macro for x v x : A v A using the reflexivity of type dynamism. Then with this sugar, type contexts are a subset of type dynamism contexts. Similarly when t and t0 have the same output type we write Φ ` t v t0 : A rather than the tediously long Φ ` t v t0 : A v A. PTT Signatures While gradual type theory proves that most operational rules of gradual typing are equivalences, some must be added as axioms. Compare Moggi’s monadic metalanguage [21]: since it is a general theory of monads, it is not provable that an effect is commutative, but we can add a commutativity axiom and prove additional consequences. Similarly, in our type theory it is not provable without adding non-type-theoretic axioms that an upcast followed by its complementary downcast is the identity, or that the function type and product type are disjoint. To allow such axioms, preorder type theory is formally a family of type theories parameterized by a signature; the signature is also needed for a precise categorical semantics, because it represents the “generating data” of a specific model. The signatures for preorder type theory (and, below, gradual type theory) package together all of the base types, uninterpreted function symbols and type and term dynamism axioms we desire. This is mutually 6 defined with the definition of the type theory itself, so that for instance we can add function symbols whose codomain is a non-base type. Definition 1 (PTT Signature). A preorder type theory signature (PTT signature) consists of 1. A 0-PTT signature is a set, and elements are called base types. 2. For a 0-PTT signature Σ0 , P T T0 (Σ0 ) is the set of types generated by that signature and the rules of preorder type theory. 3. A 1-PTT Signature relative to a 0-PTT signature Σ0 is a subset of P T T0 (Σ0 )2 , and elements are called type dynamism axioms. 4. A 2-PTT Signature relative to 0, 1-PTT signatures Σ0 , Σ1 is a set Σ2 with functions s : Σ2 → P T T0 (Σ0 )∗ and t : Σ2 → PTT0 (Σ0 ), and whose elements are called function symbols. 5. For 0, 1, 2-PTT signatures Σ0 , Σ1 , Σ2 , define P T T1 (Σ0 , Σ1 , Σ2 ) to be the set of all terms in PTT generated by those signatures. 6. A 3-PTT Signature Σ3 relative to 0, 1, 2-signatures Σ0 , Σ1 , Σ2 is a subset of P T T1 (Σ0 , Σ1 , Σ2 )2 such that if (t, t0 ) ∈ Σ3 and Γ ` t : A and Γ0 ` t0 : A0 , then it is derivable using Σ0 , Σ1 , Σ2 that Γ v Γ0 and A v A0 . Elements of Σ3 are called term dynamism axioms. 7. Finally a PTT signature is a tuple of 0, 1, 2, 3-PTT signatures (Σ0 , Σ1 , Σ2 , Σ3 ), each relative to the previous signatures. 2.2 Gradual Type Theory Preorder Type Theory gives us a simple foundation with which to build Gradual Type Theory in a modular way: we can characterize different aspects of gradual typing, such as a dynamic type, casts, and type errors separately. Casts We start by defining upcasts and downcasts, using type and term dynamism in Figure 5. Given that A0 v A1 , the upcast is a function from A0 to A1 such that for any t : A0 , hA1  A0 it is the least dynamic term of type A1 that is more dynamic than t. The UR rule can be thought of as the “introduction rule”, saying hA0  Aix is more dynamic than x, and then UL is the “elimination rule”, saying that if some x0 : A0 is more dynamic than x : A, then it is more dynamic than hA0  Aix — since hA0  Aix is the least dynamic term with this property. The rules for projections are dual, ensuring that for x0 : A0 , hA  A0 ix0 is the most dynamic term of type A that is less dynamic than x0 . In fact, combined with the TmPrec-Trans rule, we can show that it has a slightly more general property: hA0  Aix is not just less dynamic than any term of type A0 more dynamic than x, but is less dynamic than any term of type A0 or higher, i.e. of type A00 w A0 . Indeed, it is often convenient to use the following sequent-calculus style rules (everything in the conclusion is fully general, except for one cast), which are derivable using TmPrec-Trans and TmPrec-Comp, assuming A v A0 and A0 v A00 : Φ ` t v t 0 : A v A0 Up-R Φ ` t v hA00  A0 it0 : A v A00 Φ ` t v t00 : A v A00 Up-L Φ ` hA0  Ait v t00 : A0 v A00 Φ ` t0 v t00 : A0 v A00 Dn-L Φ ` hA  A0 it0 v t00 : A v A00 Φ ` t v t00 : A v A00 Dn-R Φ ` t v hA0  A00 it00 : A v A0 In particular, the upcast is left-invertible, and the downcast is right-invertible (which agrees with their status and left and right adjoints discussed below). However, when reasoning “bottom-up”, the presuppositions the conclusion of Up-R (A v A00 and A0 v A00 ) do not entail A v A0 , and the presuppositions of the conclusion of Dn-L (A v A0 and A v A00 ) do not entail A0 v A00 . Thus, the premise suffices whenever it is well-formed, but it might not be. As we will discuss in Section 3, these rules allow us to prove that the pair of the upcast and downcast form a Galois connection (adjunction), meaning hA0  AihA  A0 it v t and t v hA  A0 ihA0  Ait. However 7 Γ ` t : A0 A v A0 Γ`t:A 0 0 Γ ` hA  Ait : A Upcast A v A0 0 Γ ` hA  A it : A A v A0 Downcast A v A0 x v x : A v A ` x v hA0  Aix : A v A0 UR x0 v x0 : A0 v A0 ` hA  A0 ix0 v x0 : A v A0 A v A0 A v A0 x v x0 : A v A0 ` hA0  Aix v x0 : A0 v A0 UL x v x0 : A v A0 ` x v hA  A0 ix0 : A v A A v A0 x : A v x : A ` hA  A0 ihA0  Aix v x : A DL DR Φ:ΓvΓ RetractAx Av? Γ ` fA : A Φ ` fA v t : A Figure 5: Upcasts, Downcasts, Dynamic Type and Type Error in programming practice, the casts satisfy the stronger condition of being a Galois insertion, in which the left adjoint, the downcast, is a retract of the upcast, meaning t wv hA  A0 ihA0  Ait. We can restrict to Galois insertions by adding the retract axiom RetractAx. Most theorems of gradual type theory do not require it, though this axiom is satisfied in all models of preorder type theory in Section 6. Dynamic Type and Type Errors The remaining rules in Figure 5 define the dynamic type and type errors, which are also given a universal property in terms of type and term dynamism. The dynamic type is defined as the most dynamic type. The type error, written as f, is defined by the fact that it is a constant at every type A that is a least element of A. By transitivity, this further implies that fA v t : A v A0 for any A0 w A. Negative Connectives Next we illustrate how simple negative types can be defined in preorder type theory. Specifically, we present the unit type, products and function types in 6. The type and term constructors are the same as those in the simply typed λ-calculus. Each type constructor extends type dynamism in the standard way [14, 35, 28]: every connective monotone in every argument, including the function type. Due to the covariance of the function type, type dynamism is sometimes referred to as “naı̈ve subtyping”; see 5 for a semantic intuition. For term dynamism, we add two classes of rules. First, there are congruence rules that “extrude” the term constructor rules for the type, which are like a “congruence of contextual approximation” condition. Next, the computational rules reflect the ordinary β, η equivalences as equi-dynamism: we write wv to mean a rule exists in each direction (which requires that the types and contexts are also equi-dynamic). Gradual Type Theory and Signatures We call the accumulation of all of these connectives gradual type theory. A gradual type theory signature is a PTT signature where each declaration can additionally use the structure of gradual type theory: Definition 2 (GTT Signature). A GTT signature (Σ0 , Σ1 , Σ2 , Σ3 ) is a PTT signature, where each declaration may make use of the rules for dynamic type, casts, type error, functions, products and unit types, in addition to the rules of PTT. 3 Theorems and Constructions in Gradual Type Theory In this section, we discuss the many consequences of the simple axioms of gradual type theory. We show that almost every reduction in an operational presentation of call-by-name gradual typing, and many principles used in optimization of implementations, are justified by the universal property for casts in all types, the β, η rules, and the congruence rules for connectives and terms. Thus, the combination of graduality and η principles is a strong specification for gradual typing and considerably narrows the design space. We summarize these derivations in the following theorem: 8 A v A0 B v B0 A → B v A0 → B 0 0 0 Γ, x : A ` t : B Γ ` λx : A.t : A → B 0 0 Φ, x v x : A v A ` t v t : B v B Φ ` λx : A.t v λx0 : A0 .t0 : A → B v A0 → B 0 Γ ` (λx : A.t)u wv t[u/x] : B A1 v A01 A2 v A02 A1 × A2 v A01 × A02 Γ`t:A→B Γ`u:A Γ ` tu : B Φ ` t v t 0 : A → B v A0 → B 0 Φ ` u v u0 : A v A0 Φ ` t u v t0 u0 : B v B 0 Γ ` t wv (λx : A.t x) : A → B v A → B Γ ` t 1 : A1 Γ ` t2 : A2 Γ ` (t1 , t2 ) : A1 × A2 Φ ` t1 v t01 : A1 v A01 Φ ` t2 v t02 : A2 v A02 Φ ` (t1 , t2 ) v (t01 , t02 ) : A1 × A2 v A01 × A02 i ∈ {1, 2} Γ ` πi (t1 , t2 ) wv ti : Ai Γ ` () : 1 Γ ` t : A1 × A2 i ∈ 1, 2 Γ ` π i t : Ai Φ ` t v t0 : A1 × A2 v A01 × A02 Φ ` πi t v πi t0 : Ai v A0i Γ ` t wv (π1 t, π2 t) : A1 × A2 Γ ` t wv () : 1 Figure 6: Simple Negative Types Theorem 1. In Gradual Type Theory, all of the following are derivable whenever the upcasts, downcasts are well-formed. 1. Universal Property: Casts are unique up to wv. 2. Identity: hA  Ait wv t and hA  Ait wv t. 3. Composition: hA00  Ait wv hA00  A0 ihA0  Ait and hA  A00 it wv hA  A0 ihA0  A00 it. 4. Function Cast Reduction: hA0 → B 0  A → Bit wv λx : A0 .hB 0  Bi(t(hA  A0 ix)) and hA → B  A0 → B 0 it wv λx : A0 .hB  B 0 i(t(hA0  Aix)). 5. Product Cast Reduction: hA00 × A01  A0 × A1 it wv (hA00  A0 iπ0 t, hA01  A1 iπ1 t) and hA0 × A1  A00 × A01 it wv (hA0  A00 iπ0 t, hA1  A01 iπ1 t). 6. Adjunction: t v hA  A0 ihA0  Ait and hA0  AihA  A0 it v t, for which the retract axiom is the converse. 7. Cast Congruence: x v y : A v B ` hA0  Aix v hB 0  Biy : A0 v B 0 and x0 v y 0 : A0 v B 0 ` hA  A0 ix0 v hB  B 0 iy 0 : A v B. 8. Errors: hA0  AifA wv fA0 , and by the retract axiom hA  A0 ifA wv .fA0 . 9. Equi-dynamism implies isomorphism: If A wv B, then A is isomorphic to B. Many of these facts are usually given as part of the definition of the operational semantics of the language, but we show here that they are uniquely determined by the other principles of gradual type theory, the specification for upcasts/downcasts, the congruence rules for term dynamism and the η equivalence principles for types. This shows that the combination of graduality and η principles is a strong specification for gradual typing and considerably narrows the design space. We can also weaken results to an ordering if η only holds in one direction. 9 Uniqueness of Casts First, to prove that casts are unique, suppose that there was a second version of the upcast hA0 ←- Ait with analogous Up-L’ and Up-R’. Then we can show that this upcast is equivalent to the original in analogy with the way we show function/product types are unique: use the “elimination” rule of one and then the “introduction” rule of the other. x:A`xvx:A Up-R’ x : A ` x v hA0 ←- Aix : A v A0 Up-R x : A ` hA0  Aix v hA0 ←- Aix : A0 x:A`xvx:A Up-R x : A ` x v hA0  Aix : A v A0 Up-R’ x : A ` hA0 ←- Aix v hA0  Aix : A0 By duality, the same holds for the downcast. Identity Casts The upcast and downcast from a type to itself are the identity function. The intuition is simple: given t : A, t itself is the least dynamic element of A that is at least as dynamic as t! For a formal proof, we show that x : A and hA  Aix are equi-precise and each direction is an instance of Up-L or Up-R. x : A ` x v hA  Aix : A UR x : A v x : A ` hA  Aix v x : A v A UL Since this is our first example of using the cast term dynamism rules, it is instructive to note that, given A v B so that hB  Ai is well-defined, we cannot show that hB  Aix v x analogously to the second derivation x : A v x0 : A ` hB  Aix v x0 : B v A not an instance of UL because the conclusion violates the presupposition of the judgment, which would require B v A, and is moreover not an instance of Up-L, which would require x0 to have type B, not type A. That is, the existence of appropriate type dynamism relations is crucial to these rules, so it is important to be careful about the types involved. The downcast case has a perfectly dual proof. Composition of Casts Next, we show that if A v A0 v A00 , then the upcast from A to A00 factors through A0 , and dually for the downcast from A00 to A. This justifies the operational rule familiar in gradual typing that separates the function contract into the “higher-order” part that proxies the original function and the “first-order” tag checking: h?  A → Bit 7→ h?  ? → ?ih? → ?  A → Bit More generally, it implies that casts from A to B commute over the dynamic type, e.g. h?  BihB  Aix wv h?  Aix—intuitively, if casts only perform checks, and do not change values, then a value’s representation in the dynamic type should not depend on how it got there. This can also justify some optimizations of gradual programs, collapsing multiple casts into one. This property, combined with the identity property, also says that upcasts and downcasts form respective subcategories of arbitrary terms (the composition of two upcasts (downcasts) is an upcast (downcast) and identity terms are also upcasts and downcasts), and that the upcasts and downcasts each determine functors from the category of types and type dynamism relations to the category of types and terms. The proofs are dual, so for upcasts, we want to show hC  Aix wv hC  BihB  Aix. On the one hand, to show something of type C is more dynamic than hC  Aix, we just have to show that it is more dynamic than x, which is true of hC  BihB  Aix. The other direction is similar, first we peel off hC  Bi· and then hB  Ai·. More formally, assuming A v B v C, the following are valid derivations: 10 Up-R x : A ` x v hB  Aix : A v B Up-R x : A ` x v hC  BihB  Aix : A v C Up-L x : A ` hC  Aix v hC  BihB  Aix : C Up-R x : A ` x v hC  Aix : A v C Up-L x : A ` hB  Aix v hC  Aix : B v C Up-L x : A ` hC  BihB  Aix v hC  Aix : C Casts are Galois Connections Next, as mentioned previously, we show that the specifications of the upcast and downcast make them into a Galois connection/adjunction with the upcast as the upper/left adjoint. This tells us that given A v A0 , the “round-trip” from A0 down to A and back results in a less dynamic term and the other round-trip results in a more dynamic term. In programming practice, we expect the round trip from A to A0 and back to be in fact an identity and this is implied by the addition of the retract axiom. x 0 : A0 ` x 0 v x 0 : A0 v A0 Dn-L x0 : A0 ` hA  A0 ix0 v x0 : A v A0 Up-L x0 : A0 ` hA0  AihA  A0 ix0 v x0 : A0 x:A`xvx:AvA Up-L x : A ` x v hA0  Aix : A v A0 Dn-R x : A ` x v hA  A0 ihA0  Aix : A Cast Congruence and the Gradual Guarantee Recall that the gradual guarantee [28] says that making casts less dynamic results in semantically less dynamic terms, but does not otherwise change the behavior of programs. To see that a model of gradual type theory satisfies the gradual guarantee, the key syntactic fact is that making casts less dynamic results in a term dynamism relationship: When A v A0 , B v B 0 , A v B, A0 v B 0 , x v y : A v B ` hA0  Aix v hB 0  Biy : A0 v B 0 x0 v y 0 : A0 v B 0 ` hA  A0 ix0 v hB  B 0 iy 0 : A v B This is a congruence rule for casts in the type positions on type dynamism relations A v B and A0 v B 0 . The proof of the first is xvy:AvB`xvy:AvB Up-R x v y : A v B ` x v hB 0  Biy : A v B 0 Up-L x v y : A v B ` hA0  Aix v hB 0  Biy : A0 v B 0 and the second is dual. All other term constructors are congruences by primitive rules, so v is a congruence. Strictness of Casts Next we show that upcasts and downcasts are strict with respect to the type error f. The upcast preserves f because it is a left/upper adjoint and therefore preserves colimits/joins like f. More concretely, hA0  AifA v fA0 because fA0 is more dynamic than fA and is the least dynamic term of type A0 so is in particular less dynamic than anything more dynamic than fA . As derivations: Err-Bot’ · ` fA0 v hA0  AifA : A0 Err-Bot 11 · ` fA v fA0 : A v A0 Up-L · ` hA0  AifA v fA0 : A0 The proof that the downcast preserves f is less modular as it depends on the presence of the upcast and the retract axiom. The proof is simple though: to show hA  A0 ifA0 wv fA : A, we have fA0 wv hA0  AifA by above, and so we can apply the downcast to both sides to get hA  A0 ifA0 wv hA  A0 ihA0  AifA , and the right-hand side is equivalent to fA by the retract axiom. Function and Product Casts In this section we derive the standard “wrapping” implementations from [11, 10] for the function and product casts, i.e., casts derived from dynamism derivations of A → B v A0 → B 0 and A0 × A1 v A00 × A01 . A function upcast uses the downcast on inputs and upcast on outputs and vice-versa for the downcast. This shows that the standard implementation is in fact the unique implementation to satisfy soundness and graduality. Each proof is modular (depends on no more type or term constructors other than those related to function and product types respectively). To make the proofs shorter, we first derive a higher-level “extensionality principle” for each: a function is less dynamic than another if applying it to a less dynamic input yields a less dynamic result and a product is less dynamic than another if its components are: Φ, x v x0 : A v A0 ` tx v t0 x0 : B v B 0 Fun-Ext Φ ` t v t 0 : A → B v A0 → B 0 ∀i ∈ {0, 1}.Φ ` πi t v πi t0 : Ai v A0i Prod-Ext Φ ` t v t0 : A0 × A1 v A00 → A01 Both follow from the η principles for each type and the congruence rules for the introduction forms: t v λx.tx Φ, x v x0 : A v A0 ` tx v t0 x0 : B v B 0 λx .t x v t Φ ` λx.tx v λx0 .t0 x0 : A → B v A0 → B 0 TmPrec-Trans Φ ` t v t 0 : A → B v A0 → B 0 0 0 0 0 ∀i ∈ {0, 1}.Φ ` πi t v πi t0 : Ai v A0i Φ ` (π0 t, π1 t) v (π0 t0 , π1 t0 ) : A0 × A1 v A00 → A01 (π0 t0 , π1 t0 ) v t0 TmPrec-Trans Φ ` t v t0 : A0 × A1 v A00 → A01 t v (π0 t, π1 t) For the function contract, the standard implementation is hA0 → B 0  A → Bif wv λx0 : A0 .hB 0  Bi(f (hA  A0 ix0 )) First to show v, it is sufficient to show that the right hand side is more dynamic than f itself. Next we invoke the extensionality principle (Fun-Ext) and β and then we have to show that x v x0 : A v A0 ` f x v hB 0  Bi(f (hA  A0 ix0 )). This follows from congruence of application and the rules of casts. The other direction is essentially the dual. In fact, a more direct, but less high-level proof is possible that shows that each direction of the equivalence hA0 → B 0  A → Bif v λx0 : A0 .hB 0  Bi(f (hA  A0 ix0 )) only relies on the corresponding direction of the η principle f wv λx.f x, and we don’t need to use β equivalence at all. In Figure 7, we show the direct proofs of both directions of wv for the upcasts of function and product types; the downcast proofs are dual. Disjointness of Types and Equi-Dynamism versus Isomorphism Finally, because types A and B in gradual type theory can be related both by type dynamism A v B and by functions A → B, there are two reasonable notions of equivalence of types1 . First, equi-dynamism A wv B means A v B and B v A. Second, isomorphism means functions f : A → B and g : B → A such that f ◦ g wv (λx : B.x) and g ◦ f wv (λx : A.x). If two types are equi-dynamic, then any casts between them are an isomorphism: If A wv B, then • x.hB  Aix and y.hA  Biy form an isomorphism of types. x:A`xvx:A x : A ` hB  Aix v x : B v A x : A ` hA  BihB  Aix v x : A 1 Corresponding x : A ` x v hB  Aix : A v B x : A ` x v hA  BihB  Aix : A to the two notions of isomorphism in double categories 12 f, x v x0 ` x v x0 : A v A0 f, x v x0 ` x v hA  A0 ix0 : A v A f, x v x0 ` f v f : A → B v A → B f, x v x0 ` f x v f (hA  A0 ix0 ) : B v B f, x v x0 ` f x v hB 0  Bi(f (hA  A0 ix0 )) : B v B 0 f v λx.f x λx.f x v λx0 : A0 .hB 0  Bi(f (hA  A0 ix0 )) f ` f v λx0 : A0 .hB 0  Bi(f (hA  A0 ix0 )) : A → B v A0 → B 0 f : A → B ` hA0 → B 0  A → Bif v λx0 : A0 .hB 0  Bi(f (hA  A0 ix0 )) : A0 → B 0 f ` f v (hA0 → B 0  A → Bif ) x0 ` hA  A0 ix0 v x0 f, x0 ` f (hA  A0 ix0 ) v (hA0 → B 0  A → Bif )x0 f, x0 : A0 ` hB 0  Bi(f (hA  A0 ix0 )) v (hA0 → B 0  A → Bif )x0 D f ` λx0 : A0 .hB 0  Bi(f (hA  A0 ix0 )) v λx0 .(hA0 → B 0  A → Bif )x0 D λx0 .tx0 v t with t = hA0 → B 0  A → Bif f : A → B ` λx0 : A0 .hB 0  Bi(f (hA  A0 ix0 )) v hA0 → B 0  A → Bif : A0 → B 0 πi p v πi p ∀i ∈ 0, 1. πi p v hA0i  Ai iπi p p v (π0 p, π1 p) p ` (π0 p, π1 p) v (hA00  A0 iπ0 p, hA01  A1 iπ0 p) p ` p v (hA00  A0 iπ0 p, hA01  A1 iπ0 p) p : A0 × A1 ` hA00 × A01  A0 × A1 ip v (hA00  A0 iπ0 p, hA01  A1 iπ0 p) : A00 × A01 pvp p v hA00 × A01  A0 × A1 ip πi p v πi hA00 × A01  A0 × A1 ip ∀i ∈ 0, 1. hA0i  Ai iπi p v πi hA00 × A01  A0 × A1 ip E 0 (hA0  A0 iπ0 p, hA01  A1 iπ0 p) v (π0 hA00 × A01  A0 × A1 ip, π1 hA00 × A01  A0 × A1 ip) E (π0 t, π1 t) v t with t = hA00 × A01  A0 × A1 ip p : A0 × A1 ` (hA00  A0 iπ0 p, hA01  A1 iπ0 p) v hA00 × A01  A0 × A1 ip : A00 × A01 Figure 7: Negative Type Upcast Implementations 13 • x.hA  Bix and y.hB  Aiy form an isomorphism of types. This is dual to the previous part. • x.hB  Aix and y.hA  Biy form an isomorphism of types. x:A`xvx:A x : A ` hB  Aix v x : B v A x : A ` hA  BihB  Aix v x : A x : A ` x v hB  Aix : A v B x : A ` x v hA  BihB  Aix : A • x ` hA  Bix wv hA  Bix. This follows from uniqueness of inverses (which is true by the usual argument) and the previous two. The converse, isomorphic types are equi-dynamic, does not hold by design, because it does not match gradual typing practice. Gradually typed languages typically have disjointness of connectives as operational reductions; for example, disjointness of products and functions can be expressed by an axiom h(C × D)  ?ih?  (A → B)ix v f which says that casting a function to a product errors. This axiom is incompatible with isomorphic types being equi-dynamic, because a function type can be isomorphic to a product type (e.g. X →Y ∼ = (X → Y ) × 1), and for equi-dynamic types A and B, a cast hB  ?ih?  Aix should succeed, not fail. If it fails, then every term of A, B equals f: Assume A wv B and hB  ?ih?  Aix v f. By composition and the adjunction property hB  Aix v hB  ?ih?  BihB  Aix wv hB  ?ih?  Aix v f But by above, hA  Bi is an isomorphism, so x : A wv hA  BihB  Aix v hB  Aif wv f where the last step is by strictness, so every element of A (and B, by congruence of casts) is equal to a type error. That is, disjointness axioms make equi-dynamism an intensional property of the representation of a type, and therefore stronger than isomorphism. Nonetheless, the basic rules of gradual type theory do not imply disjointness; in Section 6, we discuss a countermodel. 4 Categorical Semantics Next, we define what a category-theoretic model of preorder and gradual type theory is, and prove that PTT/GTT are internal languages of these classes of models by proving soundness and completeness (i.e. initiality) theorems. This alternative axiomatic description of PTT/GTT is a useful bridge between the syntax and the concrete models presented in Section 6. The models are in preorder categories, which are categories internal to the category of preorders.2 A preorder category is a category where the set of all objects and set of all arrows are each equipped with a preorder (a reflexive, transitive, but not necessarily anti-symmetric, relation). That is, rather than having merely a set of objects and set of arrows, preorder categories have a preordered set of objects and preordered set of arrows and the relevant functions are all monotone with respect to these orderings. A preorder category is also a double category where one direction of morphism is thin. Intuitively, the preorder of objects represents types and type dynamism, while the preorder of morphisms represents terms and term dynamism, and we reuse the notation v for the orderings on objects and morphisms. Definition 3 (Preorder Category). A preorder category C consists of 1. A preorder of “objects” C0 2. A preorder of “arrows” C1 3. Monotone functions of “source” and “target” s, t : C1 → C0 and “identity” i : C0 → C1 2 To avoid confusion, these are not categories that happen to be preorders (thin categories) and these are not categories enriched in the category of preorders, where the hom-sets between two objects are preordered, but the objects are not. 14 4. A monotone composition function ◦ : C1 ×C0 C1 → C1 , i.e., a monotone function that takes for any f, g ∈ C1 with sf = tg, a morphism f ◦ g with s(f ◦ g) = sg and t(f ◦ g) = tf . 5. unitality and associativity laws for composition: f ◦ i(A) = f , i(B) ◦ f = f and (f ◦ g) ◦ h = f ◦ (g ◦ h). While the axioms of a preorder category are similar to the judgmental structure of preorder type theory, in a preorder category, morphisms have one source object and one target object, whereas in preorder type theory, terms have an entire context of inputs and one output. This is a standard mismatch between categories and type theories, and is classically resolved by assuming that models have product types and using categorical products to interpret the context [17]. However, we take a more modern multicategorical view, in which our notion of model will axiomatize algebraically a notion of morphism with many inputs. Using terminology from [5], we define a model of preorder type theory as a “virtually” cartesian preorder category, which does not necessarily have product objects, but whose morphisms’ source is a “virtual” product of objects, i.e. a context. Definition 4 (Virtually Cartesian Preorder Category). A virtually cartesian preorder category (VCP category) C consists of 1. a preordered set of “objects” C0 2. a preordered set of “multiarrows” C1 3. Monotone functions of “source” s : C1 → Ctx(C)0 , “target” C1 → C0 . 4. A monotone function of “identity”/“projection” x : Ctx(C)0 ×C0 ×Ctx(C)0 → C1 satisfying s(x(Γ, A, ∆)) = Γ, A, ∆ and t(x(Γ, A, ∆)) = A 5. A monotone “composition” function ◦ : C1 ×Ctx(C)0 Ctx(C)1 → C1 satisfying s(f ◦ γ) = s(γ) and t(f ◦ γ) = t(f ) 6. Satisfying “Identity”/ “Projection” laws: f ◦ id = f x(Γ, A, ∆) ◦ γ = γ(|Γ|) 7. Satisfying the “Associativity” law: (f ◦ γ) ◦ δ = f ◦ (γ ◦ δ) 8. for every Γ, ∆ ∈ Ctx(C)0 and A ∈ C0 and morphism f ∈ C1 (Γ; A) and substitution γ ∈ Ctx(C)1 (∆; Γ), a composite f ◦ γ. where we simultaneously define Ctx(C) by 1. Ctx(C)0 is the set of lists of elements of C0 (called “contexts”) with the point-wise preorder. 2. A substitution Ctx(C)1 (Γ; A1 , . . . , An ) is a function γ that assigns for every i ∈ {1, . . . , n} a multiarrow γ(i) ∈ C1 (Γ; Ai ), with pointwise ordering. Then Ctx(C)1 is the set of triples of two contexts and a substitution between them, with pointwise ordering. 3. Substitutions are composed as follows. Given γ ∈ Ctx(C)(∆, Γ) and γ 0 ∈ Ctx(C)(Γ, A1 , . . . , An ), define (γ 0 ◦ γ)(i) = γ 0 (i) ◦ γ where the latter ◦ is composition of a substitution with a multiarrow. 4. The identity substitution Ctx(C) is given by the pointwise identity morphism. Note that the axioms of multiarrow composition with substitutions are precisely what is needed to make the definition of identity and composition for Ctx(C) into a preorder category. Next, we present the soundness and completeness theorems of the interpretation of preorder type theory in a preorder category. Soundness informally means that any interpretation of the base types, function symbols and axioms of PTT can be extended to a compositional semantics in which all derivable theorems are true. 15 Definition 5 (Interpretation of Preorder Type Theory/Soundness). We define a sequence of denotation functions J·K interpreting the syntax of preorder type theory in a preorder category C. Let Σ = (Σ0 , Σ1 , Σ2 , Σ3 ) be a PTT signature, and all syntax be relative to Σ. 1. Given a base-type interpretation L·M : Σ0 → C0 , we extend it to a type interpretation function J·K : Type → C0 . This is trivial since PTT only has base types. 2. If for every (A, B) ∈ Σ1 , JAK v JBK holds, then for any derivable A v B, JAK v JBK holds. The reflexivity and transitivity rules hold in a preorder. 3. Given an interpretation of the function symbols L·M : Σ2 (A1 , . . . , An ; B) → C1 (JA1 K, . . . , JAn K; JBK) we can extend it to a compositional a semantics function J·K : x1 : A1 . . . , xn : An ` · : B → C1 (JA1 K, . . . , JAn K; JBK) in that: Jf (x1 , . . . , xn )K = Lf M Jt[γ]K = JtK ◦ JγK where we simultaneously define semantics of substitutions as JγK = J·K ◦ γ. This is defined as: JΓ, x : A, ∆ ` x : AK = x(bΓc, A, b∆c) JΓ ` f (γ(x1 ), . . . , γ(xn ))K = Lf M ◦ JγK where bx1 : A1 , . . . , xn : An c = A1 , . . . , An . 4. If for every (t, t0 ) ∈ Σ3 , JtK v Jt0 K holds, then for any derivation Φ ` t v t0 : A v A0 , JtK v Jt0 K holds. The four rules (Var, Comp, Refl, Trans) for term dynamism are a syntactic presentation of the horizontal and vertical identity and composition operations for squares in a double category, and thus hold in any preorder category. Next, completeness informally means that if a theorem is true in every model, then it is derivable in the syntax. We prove it in the standard method for categorical models, which is to show that the syntax presents a preorder category where the true theorems are exactly the derivable theorems. Theorem 2 (Completeness of Preorder Category Semantics). Let Σ be a PTT signature and let all syntax be relative to that signature. 1. For any two types A, B, if for every interpretation of Σ L·M → C, JAK v JBK holds then it is derivable that A v B. 2. For any two terms t, t0 relative to Σ, if for every interpretation JtK v Jt0 K then it is derivable in PTT that t v t0 . Proof. We construct the preorder category PTT(Σ) as follows: 1. The objects are the types generated by Σ. 2. A v B holds when A v B is derivable. 3. A term PTT(Σ)(A1 , . . . , An ; B) is a term x1 : A1 , . . . , xn : An ` t : B for some variables x1 , . . . , xn , quotiented by α-renaming (but not reordering). Composition is given by substitution and identity/projection by variable usage. 4. t v t0 holds when Φ ` t v t0 : A v A0 for the unique Φ, A, A0 making that well-formed. Proving this is a VCP category involves the standard proofs of the associativity and unitality of substitution and an easy proof that substitution is monotone with respect to term dynamism. Together these theorems imply initiality of Preorder Type Theory in the category of Preorder categories. 16 Theorem 3 (Preorder Type Theory is Initial). 1. A translation of PTT signatures i : Σ → Θ consists of a function ij : Σj → Θj sending base types to base types, type precision axioms to type precision axioms, function symbols to function symbols and term precision axioms to term precision axioms, each respecting the previous. This makes PTT signatures into a category PttS in the obvious way. 2. A monotone functor of vcp categories F : C → D consists of a monotone function on objects F0 : C0 → D0 and a monotone function on multiarrows F1 : C1 → D1 that preserves source and target in that t ◦ F1 = F0 ◦ t, s ◦ F1 = CtxF0 ◦ s, preserves composition in that F1 (f ◦ γ) = F1 (f ) ◦ CtxF1 (γ) and preserves projection in that F1 (x(Γ, A, ∆)) = x(CtxF1 (Γ), F1 (A), CtxF1 (∆)). This defines a category VcpC with obvious identity and composition. 3. Interpretations Σ → C form a profunctor between PttS and VcpC in that they can be precomposed by translations of signatures and post-composed with monotone functors in an associative, unital way. 4. The Preorder Type Theory generated by a signature Σ is a VCP category (proved above in completeness) PTT(Σ). 5. There is a “canonical” interpretation Σ : Σ → PTT(Σ) that interprets each generator as “itself ”. 6. From every interpretation i : Σ → C gives a monotone functor J·Ki : PTT(Σ) → C. 7. that extends the interpretation in that J·Ki ◦ Σ = i. 8. The interpretation extension is compositional in that J·KF ◦i = F ◦ J·Ki . 9. The extension of the canonical interpretation is the identity functor: J·KΣ = idPTTΣ Proof. 1. Σ interprets a base type as “itself” and a function symbol f ∈ Σ2 (A1 , . . . , An ; B) as x1 : A1 , . . . , xn : An ` f (x1 , . . . , xn ) : B. 2. J·Ki is defined as in the soundness theorem and it clearly preserves source, target and identity. For composition, by induction on terms: Jf (t1 , . . . , tn )[γ]Ki = Jf (t1 [γ], . . . , tn [γ])Ki = i(f ) ◦ (Jt1 [γ]Ki , . . . , Jtn [γ]Ki ) = i(f ) ◦ (Jt1 K ◦ CtxJ·Ki (γ), . . . , Jtn Ki ◦ CtxJ·Ki (γ)) = i(f ) ◦ (Jt1 K, . . . , Jtn K) ◦ CtxJ·Ki (γ) = Jf (t1 , . . . , tn )K ◦ CtxJ·Ki (γ) Jx1 , . . . , xn ` xj [γ]Ki = Jγ(xj )Ki = CtxJ·Ki (γ)(j) = xj ◦ CtxJ·Ki (γ) = Jxj K ◦ CtxJ·Ki (γ) 3. As mentioned in the soundness theorem, this extends i because Jf (x1 , . . . , xn )Ki = i(f )[x1 /x1 , . . . , xn /xn ] = f (x1 , . . . , xn )[x1 /xn , . . . , xn /xn ] = f (x1 . . . , xn ) 4. Compositionality: Given i, F , the object portion is trivial. For the arrow portion, by induction, we have F1 (Jf (t1 , . . . , tn )Ki ) = F1 (i(f ) ◦ (Jt1 Ki , . . . , Jtn Ki )) = F1 (i(f )) ◦ Ctx(F1 )(Jt1 Ki , . . . , Jtn Ki ) = (F ◦ i)(f ) ◦ (F1 (Jt1 Ki ), . . . , F1 (Jtn Ki )) = (F ◦ i)(f ) ◦ (Jt1 KF ◦i , . . . , Jtn KF ◦i ) = Jf (t1 , . . . , tn )KF ◦i 17 and F1 (JxKi ) = F1 (x) = x = JxKF ◦i 5. Identity extension. By induction on terms: Jf (t1 , . . . , tn )K = Jf K ◦ (Jt1 K , . . . , Jt1 K ) = f (x1 , . . . , xn )[t1 /x1 , . . . , tn /xn ] = f (t1 , . . . , tn ) and JxK = x 4.1 Gradual Typing Structures Next, we describe the additional structure on a VCP category to model full gradual type theory: casts are modeled by an equipment [27], a dynamic type by a greatest object, and the type error by a least element of every hom-set. Definition 6 (Equipment [27]). A VCP category C is an equipment if for every A v B, there exist morphisms uA,B ∈ C(A, B) and dA,B ∈ C(B, A) such that the following hold: 1. uA,B v idB 2. idA v uA,B 3. dA,B v idB 4. idA v dA,B An equipment is coreflective if also dA,B ◦ uA,B v idA . Definition 7 (Greatest Object). A greatest object in a VCP category C is a greatest element of the preorder of objects C0 . Definition 8 (Local Bottoms). A VCP category C has local bottoms if every hom set C(A1 , . . . , An ; B) has a least element ⊥ and for every substitution γ ∈ Ctx(C)1 (B1 . . . , Bm ; A1 , . . . , An ) we have ⊥ ◦ γ wv ⊥. Interpreting Negative Types Next, we define a cartesian closed VCP category, which will model negative function and product types. While we use the adjectives “closed” and “cartesian”, the structure exhibited here is only unique up to canonical isomorphism, and the objects are not unique up to orderequivalence (equi-dynamism). Thus, there may be different order-inequivalent ways that a VCP category can be closed or cartesian, so it is important that e.g. a closed VCP category is a VCP category with a choice of exponentials. Definition 9 (Closed VCP Category). A Closed VCP category is a VCP category C with a monotone function on objects →: C20 → C0 making for every pair of objects X, Y ∈ C an “exponential” object X → Y with a monotone function λ : C(Γ, X; Y ) → C(Γ; X → Y ) that is natural in that for any appropriate Γ, γ, h λ(h) ◦ γ wv λ(h ◦ (γ, x(Γ, X, ·))) with a morphism app ∈ C(X → Y, X; Y ) such that the function given by f 7→ app ◦ (f, x(X)) : C(Γ; X → Y ) → C(Γ, X; Y ) is an inverse to λ up to wv. 18 Definition 10 (Cartesian VCP Category). A Cartesian VCP category is a VCP category C with a monotone function × : C20 → C0 and a chosen object 1 ∈ C0 with functions pair : C(Γ; X) × C(Γ; Y ) → C(Γ; X × Y ) unit : 1 → C(Γ; 1) that are natural in that for any f, g, γ pair(f, g) ◦ γ wv pair(f ◦ γ, g ◦ γ) unit ◦ γ wv unit and morphisms π1 : C(X × Y ; X) π2 : C(X × Y ; Y ) such that the function given by f 7→ (π1 ◦ f, π2 ◦ f ) : C(Γ; X × Y ) → C(Γ; X) × C(Γ; Y ) is an inverse to pair up to wv. A cartesian closed VCP category is a VCP category with a choice of both cartesian and closed structure. 4.2 Soundness and Completeness for Gradual Type Theory Now we extend the soundness and completeness theorems for preorder type theory to full gradual type theory. Definition 11 (GTT category). A GTT category is a cartesian closed VCP coreflective equipment with a greatest object and local bottoms. Definition 12 (Interpretation of Gradual Type Theory/Soundness). Let C be a GTT category and Σ = (Σ0 , Σ1 , Σ2 , Σ3 ) a GTT signature. Then interpreting all syntax as relative to Σ, 1. Given an interpretation L·M : Σ0 → C0 , we extend it to a compositional function J·K : GT T0 (Σ0 ) → C0 defined by: JX ∈ Σ0 K = LXM J?K = > JA → BK = JAK → JBK JA × BK = JAK × JBK J1K = 1 2. If for every (A, B) ∈ Σ1 then JAK v JBK holds, then for any derivation A v B, JAK v JBK holds. For the dynamic type, this is by definition of a greatest element, and for the congruence rules for type constructors, by monotonicity of the closed and cartesian structures. 3. Given an interpretation of the function symbols L·M : Σ2 (A1 , . . . , An ; B) → C1 (JA1 K, . . . , JAn K; JBK), we extend it do a compositional semantics function J·K : Γ ` · : A → C1 (JΓK, JAK) by JΓ, x : A, ∆ ` x : AK = x(bΓc, A, b∆c) JΓ ` f (γ(x1 ), . . . , γ(xn ))K = Lf M ◦ JγK JhB  AitK = uJAK,JBK ◦ JtK JhA  BitK = dJAK,JBK ◦ JtK JfK = ⊥ Jλx : A.tK = λ(JtK) JtuK = app ◦ (JtK, JuK) J(t1 , t2 )K = pair(Jt1 K, Jt2 K) Jπi tK = πi ◦ JtK J()K = unit 19 4. If for every (t, t0 ) ∈ Σ3 , JtK v Jt0 K holds, then for any derivation Γ v Γ0 ` t v t0 : A v A0 , JtK v Jt0 K holds. For casts, this is by definition of an equipment, and for type errors, by definition of a local bottom. For type constructors, the congruence rules hold by monotonicity of the cartesian and closed structures, and the βη by the equational laws for the closed structure. 5. An interpretation L·M : Σ → C is a pair of base type and function symbol interpretation functions satisfying the conditions of the definitions above. Theorem 4 (Completeness of GTT Category Semantics). For any GTT signature Σ, 1. for any GTTΣ types A, B if for every interpretation L·M : Σ → C, JAK v JBK holds, then A v B is derivable. 2. For any GTTΣ contexts Φ : Γ v Γ0 , types A v A0 , and terms Γ ` t : A and Γ0 ` t0 : A0 , if for every interpretation JtK v Jt0 K, then Φ ` t v t0 : A v A0 derivable. As usual, the proof of completeness is by building a GTT category from the syntax such that the true dynamism theorems are precisely the derivable ones. Together these theorems imply that the syntax is initial: the semantics given by Definition 12 is the unique extension making a morphism of GTT categories using the GTT category structure of Theorem 4. Theorem 5 (Initiality). Given a GTT interpretation L·M : Σ → C, The semantics J·K : GTTΣ → C is the unique (up to wv) morphism of GTT categories extending it: it is a functor of preorder categories that preserves GTT structure up to wv. 5 Semantic Contract Interpretation As a next step towards constructing specific GTT categories, we define a general contract construction that provides a semantic account of the “contract interpretation” of gradual typing, which models a gradual type by a pair of casts. The input to our contract construction is a locally thin 2-category C, whose objects and arrows should be thought of as the types and terms of a programming language, and each hom-set C(A, B) is ordered by an “approximation ordering”, which is used to define term dynamism in our eventual model. We require each hom-set to have a least element (the type error), and the category to be cartesian closed (function and product types/contexts). The contract construction then “implements” gradual typing using the morphisms of the non-gradual “programming language” C. Coreflections To build a GTT model from C, we need to choose an interpretation of type dynamism (the ordering on objects of the VCP category) that induces appropriate casts, which we know by Theorem 1.6 must be Galois connections that satisfy the retract axiom. Such Galois connections are called Galois insertions (in order theory), coreflections (in category theory) and embedding-projection pairs (in domain theory). We will use the term coreflection since it is shortest. Since type dynamism judgments must induce a coreflection, we will construct a model where the semantics of a type dynamism judgment A v B is literally a coreflection. However, there can be many different coreflections between two objects of our 2-category C, so this first step of our construction does not produce a preorder category, where type dynamism is an ordering, but rather a double category. Double categories generalize preorder categories in the same way that categories generalize preorders: they are categories internal to the category of categories, rather than the category of preorders. Concretely, the ordering on objects is generalized to proof-relevant data specifying a second class of vertical morphisms, and the ordering on terms becomes a notion of 2-dimensional “square” between morphisms. Definition 13 (Double Category). A double category consists of 1. A category of objects and “vertical” arrows C0 2. A category of “horizontal” arrows and 2-cells C1 3. source, target and identity functors with associativity and unitality axioms. 20 In the model we build from C, the vertical morphisms will model type dynamism and be coreflections, while the (horizontal) morphisms of a preorder category will be arbitrary morphisms of C and model terms. We still require only double categories that are locally thin, in that there is at most one 2-cell filling in any square. Thus, the first step of our contract construction can be summarized as creating a double category that is an equipment with the retract property, i.e. a double category modeling upcasts and downcasts, a slight variation on a theorem in [27]: We can think of this as a model of a “type dynamism proof-relevant” system where there might be many different ways that A v B (the next step in the construction will remedy this). Then we get an interpretation of term dynamism Φ ` t v t0 : A v A0 as well, but as squares whose sides are on the proofs that Γ v Γ0 and A v A0 and the terms t and t0 . Given specific coreflections (uA , dA ) : A / A0 and (uB , dB ) : B / B 0 in C, then a 2-cell from f : A → B to f 0 : A0 → B 0 along them should be thought of as a logical relatedness proof. Specifically, in the well-pointed case any coreflection induces a relation between its domain and codomain, so for instance we have a relation vA,A0 that gives us a notion of when an element of A is less dynamic than an element of A0 by x vA,A0 x0 if uA (x) vA0 x0 or equivalently x vA dA (x0 ). Then a 2-cell from f to g exists if for every x vA,A0 x0 then f (x) vB,B 0 f 0 (x0 ). More formally, we can make the following construction, a slight variation on a construction in [27] Definition 14 (Equipment of Coreflections [27]). Given a 2-category C we construct a (double category) equipment CoReflect(C) as follows. 1. Its object category has C0 as objects and coreflections in C as morphisms, i.e., a vertical morphism A / B is an adjoint pair of morphisms u : A → B and d : B → A where the unit is an equivalence: d ◦ u ≡ id. Composition of coreflections is covariant in the left adjoint and contravariant in the right adjoint: (u, d) ◦ (u0 , d0 ) = (u ◦ u0 , d0 ◦ d). 2. Its arrow category CoReflect(C)1 has morphisms of C as objects and a 2-cell from f : A → B to f 0 : A0 → B 0 is a triple of a coreflection (uA , dA ) : A / A0 , a coreflection (uB , dB ) : B / B 0 and a morphism of coreflections, i.e., a 2-cell in C α : uB ◦ f ⇒ f 0 ◦ uA which by a simple calculation can be equivalently presented as a morphism α0 : f ◦ dA ⇒ dB ◦ f 0 . 3. The upcast from (cl , cr ) is cl and the downcast is cr . As is well-known in domain theory, any mixed-variance functor preserves coreflections [36, 31], so the product and exponential functors of C extend to be functorial also in vertical arrows. This produces the classic “wrapping” construction familiar from higher-order contracts [11]: (u, d) → (u0 , d0 ) = (d → u0 , u → d0 ) This construction preserves the structure from C that will be needed to make a model of gradual type theory: Theorem 6 (Properties of CoReflect(C)). 1. If C is locally thin then so is CoReflect(C). 2. If a 2-category C has (pseudo) products and exponentials, then so does CoReflect(C) because all functors preserve coreflections. 3. If C has local ⊥s then so does CoReflect(C). We conjecture that this construction has a universal property: the coreflection construction should be right adjoint to the forgetful functor to 2-categories from the double category of coreflective equipments. Vertical Slice Category The double category CoReflect(C) is not yet a model of gradual type theory for two reasons. First, gradual type theory requires a dynamic type: every type should have a canonical coreflection into a specific type. Second, type dynamism in GTT is proof-irrelevant, because the rules do not track different witnesses of A v B, but there may be different coreflections from A to B. It turns out that we can solve both problems at once by taking what we call the “vertical slice” category 3 over an object 3 This definition of vertical slice category is not quite the most natural from a higher categorical perspective because the horizontal arrows ignore the chosen object, but it is more useful for our purposes. 21 D ∈ CoReflect(C) that is rich enough to serve as a model of the dynamic type. In CoReflect(C)/D, the objects are not just an object A of C, but an object with a vertical morphism into D, in this case a coreflection written (uA , dA ) : A / D.4 Thus, gradual types are modeled as coreflections into the dynamic type, analogous to Scott’s “retracts of a universal domain” [26]. Then a vertical arrow from (uA , dA ) : A/D to (uB , dB ) : B /D is a coreflection (uA,B , dA,B ) : A / B that factorizes uA = uB ◦ uA,B and dA = dA,B ◦ dB : this means the enforcement of A’s type can be thought of as also enforcing B’s type. Since upcasts are monomorphisms and downcasts are epimorphisms, this factorization is unique if it exists, so there is at most one vertical arrow between any two objects of CoReflect(C)/D. Further, the identity coreflection (id, id) : D / D is a vertically greatest element since any morphism is factorized by the identity. This interpretation also helps us understand the unusual transitivity rule mentioned in Section 2.1: x : A v x 0 : A0 ` t v t 0 : B v B 0 x0 v x00 : A0 v A00 ` t0 v t00 : B 0 v B 00 x v x00 : A v A00 ` t v t00 : B v B 00 Consider the interpretation of this rule where we have (unique) morphisms (l0 , r0 ) : A / A0 , (l1 , r1 ) : A0 / A00 , (l2 , r2 ) : A / A00 . Then in the bottom we are given x, x00 with l2 (x) v x00 but in the premises we need to produce a x0 with l1 (x) v x0 and l2 (x0 ) v x00 . However by the uniqueness of factorizations, we also know l2 = l1 ◦ l0 so we can define x0 = l1 (x). Definition 15 (Vertical Slice Category). Given any double category E and an object D ∈ E, we can construct a double category E/D by defining (E/D)0 to be the slice category E0 /D, a horizontal morphism from (c : A/D) to (d : B / D) to be a horizontal morphism from A to B in E, and the 2-cells are similarly inherited from E. Next consider cartesian closed structure on CoReflect(C)/D. The action of → (respectively ×, 1) on objects is given by composition of the action in CoReflect(C) (u, d) → (u0 , d0 ) with an arbitrary choice of “encoding” of the “most dynamic function type” (u→ , d→ ) : (D → D) / D. In most of the models we consider later, D is a sum and this coreflection simply projects out of the corresponding case, failing otherwise. This reflects the separation of the function contract into “higher-order” checking (u, d) → (u0 , d0 ) and “first-order tag” checking (u→ , d→ ) that has been observed in implementations [14]. We summarize the relevant results in the following theorems: Theorem 7 (Vertical Slice Properties). 1. If C is an equipment, then so is C/D. 2. If C is cartesian, any pair of vertical morphisms e× : D × D / D and e1 : 1 / D give C/D the structure of a cartesian double category by defining c × d to be e× ◦ (c × d) and inheriting the relevant morphisms from C’s cartesian structure. 3. If C is closed, any vertical morphism e→ : (D → D) / D gives C/D the structure of a closed double category by defining c → d = e→ ◦ (c → d). 4. C/D is vertically thin (i.e., a preorder category) if and only if every vertical morphism in C is a monomorphism. 5. If C has local ⊥s then so does C/D Summary Finally, we construct a virtually cartesian model from a cartesian model : Definition 16 (VCP Category from a Cartesian Preorder Category). If C is a cartesian preorder category, then we can construct a VCP category Virt(C) by 1. Virt(C)0 = C0 2. Virt(C)(A1 , . . . , An ; B) = C1 (A1 × (· · · (An × 1) · · · ); B) Proof. This follows from a quite general result of [5]. Combining these constructions, we produce: Theorem 8 (Contract Model of Gradual Typing). If C is a locally thin cartesian closed 2-category with local ⊥s, then for any object D ∈ C with chosen coreflections c→ : (D → D) / D, c× : (D × D) / D, and c1 : 1 / D, then (Virt(CoReflect(C)/idd ), c→ , c× , c1 ) is a GTT category. 4 We do not write A v D because coreflections are not a preorder. 22 6 Concrete Models Now that we have identified a general method of constructing models of gradual type theory, we can produce some concrete models by producing suitable 2-categories. Pointed Preorder Model First, we present a simple first-order preorder model. The model is firstorder because it models the fragment of gradual type theory without function types. However, by not accommodating function types it is much more elementary. The 2-category for the preorder model is the category P reOrd⊥ whose objects are preorders with a least element, which following domain-theoretic terminology we call “pointed” preorders, and whose morphism are monotone functions (that don’t necessarily preserve ⊥) and 2-cells are given by the obvious ordering on morphisms. This is a cartesian locally thin 2-category with local ⊥s (also closed but we will not use this). To construct a suitable dynamic type, we can start with a base set, such as the natural numbers N and construct the dynamic type by finding the least solution of the equation: D∼ = N⊥ ⊕ (D × D) where ⊕ is the wedge sum of pointed preorders that identifies the ⊥s of the two sides. Since this is a covariant domain equation, this can be constructed as a simple colimit, and the solution has as elements finite binary trees whose leaves are either natural numbers or a base element ⊥. The ordering on the trees T v T 0 holds when T can be produced from T 0 by replacing some number of subtrees by ⊥, which is a simple model of the dynamism ordering. Finally to get a model, the upcast of the coreflection D × D / D simply injects to the right side of ⊕ and the downcast errors on the N⊥ case and otherwise returns the pair. Scott’s Model Next we present two models based on domains that are operationally inadequate because they identify the dynamic type error and diverging programs. The first is merely a new presentation of Dana Scott’s classical models of untyped lambda calculus but for a gradually typed language [26]. The second is a variation on that construction where product and function types have overlapping representation, showing that the product and function types cannot be proven disjoint in gradual type theory. Both are based on the 2-category of pointed ω-chain complete partial orders, which we simply call domains and continuous functions. By standard domain-theoretic techniques (see [36, 31, 24]) we can construct a suitable dynamic type by solving the recursive domain equation: D∼ = N⊥ ⊕ (D × D) ⊕ (D → D) where ⊕ is the wedge sum of domains that identifies their least element. The classical technique for solving this equation naturally produce the required coreflections (D × D) / D and (D → D) / D. Next, to get a model in which product and function types are not disjoint we can construct a dynamic type as a product of our connectives rather than a sum: D0 ∼ = N⊥ × (D0 × D0 ) × (D0 → D0 ) This is a kind of “coinductive” dynamic type that can be thought of as somewhat object-oriented: rather than an element of the dynamic type being a tagged value, it is something that responds to a set of messages (given by the projections) and if it “doesn’t implement” the message it merely returns ⊥. Then h(? × ?)  ?ih?  (? → ?)ix 6≡ f because there are elements of the domain that are non-trivial both in the D × D position and D → D position. Resolution: Pointed Domain Preorders We can combine the best aspects of the domain and pointed preorder models into a single model of pointed, preorder domains, i.e., domains that in addition to their intrinsic domain ordering that models a “divergence ordering” with diverging programs modeled by the divergence-least element have a second, “error ordering” with a least element f that models the dynamic type error. The error ordering needs two properties related to the domain structure First, the diverging element should be maximal, meaning that it is not considered to be more erroring than anything else, which ensures that when we take the wedge sum, we only identify ⊥s and don’t otherwise affect the error ordering. Second, the error ordering should be an admissible relation, meaning that a limit of one chain is error-less-than the limit of another, if at every step they are related. 23 Definition 17 (Domain Preorder, Pointed Domain Preorder). 1. A domain preorder X is a set |X| with two orderings ≤X and vX such that (|X|, ≤X ) is an ω-complete pointed partial order with ≤X -least element ⊥X ∈ |X| and vX is a preorder such that (a) ⊥X is a vX -maximal element: if ⊥ v x then x = ⊥ (b) v is ≤-admissible/closed under limits W of ≤XW-ω-chains: if {xi }i<ω , {yi }i<ω are ≤X -ω-chains in X and xi v yi for every i < ω, then {xi } v {yi }. A continuous function of domain preorders is a function of the underlying sets that is continuous with respect to ≤X and monotone with respect to vX . 2. A pointed domain preorder X is a domain preorder with a vX -least element f ∈ |X|. Continuous functions of pointed domain preorders are just continuous functions of the underlying domain preorders We model our types as pointed domain preorders because they have an interpretation for both divergence ⊥ and type error f. First, we show that both categories are cartesian closed. Lemma 9. The categories of domain preorders and pointed domain preorders are cartesian closed. Proof. Since the category of pointed domain preorders is a full subcategory of domain preorders, we can show that it has unit, product and exponential if the category of domain preorders has the corresponding universal property and the operations happen to produce pointed domian preorders when given pointed domain preorders. 1. 1 is the singleton {∗} with the unique ordering. The unique element is a ≤ and v-least element. 2. X ×Y is constructed as follows. The underlying set is the product of underlying sets |X ×Y | = |X|×|Y |. Each ordering is point-wise, and limits are taken pointwise. Because limits are pointwise, vX × vY is admissible. If X, Y have fs, then X × Y has a v-least element fX×Y = (fX , fY ). The pairing, and projection functions are clearly continuous in ≤ and monotone in v. 3. X → Y . The underlyings set is the set of continuous functions of domain preorders from X to Y . The orderings are given pointwise. Since this is a subset of the set of continuous functions of the underlying domains, to show that it is closed under ≤-ω-chains, we just need to show thatWthe limit of a chain of monotone functions is W monotone. WThe limit of the chain {fi } is just λx. {fi (x)}. Given x vX y, we need to show {fi (x)} vY {fi (y)}. Since vY is admissible, it is sufficient to show that fi (x) v fi (y) for each i, which follows by monotonicity of fi . Next, the pointwise ordering is clearly admissible because limits are taken pointwise. Next, if f : X × Y → Z is a continuous function of preorder domains, λy f : X → (Y → Z) is clearly continuous. And the application function app : (X → Y ) × X → Y is also continuous. If Y has a f, then X → Y has a least element fX→Y = λx.fY . Next, we will solve the recursive domain equations using the classic construction using ep pairs. Our category of domain preorders is an O-category in the sense of [36, 31], but does not have all ω op limits due to the restriction that the ⊥ element be v-maximal. However, if the ω op diagram is made of strict (⊥-preserving) functions, the limit does exist, and this is all the central theorem of [31] actually requires because projections are always strict. Lemma 10. The category of domain preorders and continuous functions is an O-category with the point-wise ≤ ordering. Proof. We need to show two properties 1. First, every hom set is an ω-cppo as shown in lemma 9. 24 2. Next we need to show composition is ≤-continuous. Since composition can be defined as λf.λg.λx.g(f (x)) it is sufficient to show that λ : (X × Y toZ) → (X → (Y → X)) is continuous (application is continuous because the category is cartesian closed). Given a chain of fi : X × Y → Z, on the one hand _ _ ( {λfi })(x)(y) = {fi (x, y)} i i and on the other hand (λ _ _ _ {fi })(x)(y) = ( {fi })(x, y) = {fi (x, y)} i i i Lemma 11. The category of domain preorders has all ω op limits where the diagram is made of ⊥-preserving maps. Proof. Given an ω op diagram of domain preorders fi : Di+1 → Di where i ∈ ω, the proposed limit Dω has as underlying set |Dω | = {d : Πi∈ω Di |∀i ∈ ω. fi (di+1 ) = di } The orderings ≤, v are both given point-wise, and admissibility follows from that. λi.⊥Di ∈ Dω because fi (⊥i+1 ) = ⊥i by strictness. Since the order is pointwise, it is a least element and maximal. Finally, because the ordering is pointwise, a function into Dω is continuous if and only if its composition with each projection is continuous, so Dω is the limit of the given diagram. Lemma 12. The product ×, exponential →, wedge sum ⊕ and adjoining an error ·f are all locally continuous mixed-variance functors on the category of domain preorders. Proof. 1. ×: f × g = λ(x, y).(f x, gy), this is obviously functorial and is locally continuous because the orderings are point-wise. 2. →: f → g = λh.g ◦ h ◦ f , obviously functorial and locally continuous because the ordering is pointwise. 3. Xf The underlying set is {0} × |X| ] {1} × {f} and the orderings are defined as (i, z) ≤ (i0 , z 0 ) = i = i0 ∧ z ≤ z 0 and (i, z) v (i0 , z 0 ) = i = 1 ∨ (i = i0 = 0 ∧ z vX z 0 ) Which is clearly a domain preorder. The functorial action is defined by ff (1, f) = f ff (0, x) = (0, f (x)) which is clearly functorial and continuous. 4. ⊕. |X ⊕ Y | = ({0} × X ] {1} × Y )/((0, ⊥X ) = (1, ⊥Y )) with the ≤-ordering defined as (i, z) ≤X⊕Y (i0 , z 0 ) = (z = ⊥X ) ∨ z = ⊥Y ∨ (i = i0 ∧ z ≤ z 0 ) And error ordering similarly defined as (i, z) vX⊕Y (i0 , z 0 ) = (z, z 0 ∈ {⊥X , ⊥Y }) ∨ (i = i0 ∧ z v z 0 ) These define a domain and preorder structure respectively, and v is admissible. Since ⊥X , ⊥Y are maximal, ⊥X⊕Y is also maximal. 25 We can then construct a suitable dynamic type in the same fashion as Theorem 13 ((Smyth-Plotkin)). There exists a domain preorder with an isomorphism i:D∼ = (N⊥ )f ⊕ (Df × Df ) ⊕ (Df → Df ) Then we interpret the dynamic type as Df . The coreflection (e1 , p1 ) : 1 / Df is the unique f-coreflection: e1 (∗) = f and p1 (x) = ∗. The coreflection (e× , p× ) : Df × Df / Df is defined as e× (x) = i((1, x)) p× (f) = f p× (⊥) = ⊥ p× (0, n : (N⊥ )f ) = f p× (1, t : (Df × Df )) = t p× (2, f : (Df → Df )) = f Which is monotone because ⊥ is a maximal element. The coreflection (e→ , p→ ) : Df → Df / Df is defined in the same way, but using the function case of the sum. 7 Related and Future Work Logic and Semantics of Dynamism Our logic and semantics of type and term dynamism builds on the formulation introduced with the gradual guarantee in [28], but the rules of our system differ in two key ways. First, our system includes the β, η equivalences as equi-dynamism axioms, making term dynamism a more semantic notion. Second, we only allow casts that are either upcasts or downcasts (as defined by type dynamism), whereas their system allows for a more liberal “compatibility” condition. Accordingly our rules of dynamism for casts are slightly different, but where it makes sense, the rules of the two systems are interderivable. Modifying their cast rule to our syntax and ignoring any compatibility constraint on the casted types, they have the following two rules: Φ ` t1 v t2 : A1 v A2 (A1 v B2 ) Cast-R Φ ` t1 v hB2 ⇐ A2 it2 : A1 v B2 Φ ` t1 v t2 : A1 v A2 (B1 v A2 ) Cast-L Φ ` hB1 ⇐ A1 it1 v t2 : B1 v A2 Then we see that our four rules for upcast and downcasts are the special case where the casts involved are upcasts or downcasts. In the reverse direction, if we define the “oblique” casts as hB ⇐ Ait = hB  ?ih?  Ait, we can derive their rules in 8. First, their cast right rule follows directly by applying Dn-R and Up-R. The left rule takes slightly more work, using the retract axiom, because we can’t cast up to ? on the left side because it might be more dynamic than A2 . Instead, we first prove that we can define the oblique cast hB ⇐ Ait not just as the cast through ?, but also through any C with A, B v C using the retract axiom and composition of upcasts, downcasts. Then we pick C in the Cast-L case to be A2 , and then proof proceeds dually to the Cast-R case. As a relational logic with a sound and complete categorical semantics, it has commonalities with logics for parametric polymorphism [25], and the categorical semantics in terms of reflexive graph categories which are like double categories where vertical arrows lack composition [23]. In particular the System P logic presented in [8] is similar to a “dynamism proof-relevant” version of preorder type theory. Additionally, the bifibration condition of [13] is essentially the same as the definition of an equipment, but with a twist: in gradual typing every contract induces an adjoint pair of terms, but there every term induces an adjoint pair of relations: the graph and “cograph”. Hopefully the similarity with parametric logics will be useful in studying the combination of graduality with parametricity. Contracts as Coreflections Our semantic model of contracts as coreflections has precedent in much previous work, though we are the first to identify the relationship to gradual typing’s notions of type and 26 Φ ` t 1 v t 2 : A1 v A2 Up-R Φ ` t1 v h?  A2 it2 : A1 v ? Dn-R Φ ` t1 v hB2  ?ih?  A2 it2 : A1 v B2 if A, B v C hB  ?ih?  Ait wv hB  CihC  ?ih?  Cih?  Ait wv hB  CihC  Ait Φ ` t1 v t2 : A1 v A2 Up-L Φ ` hA2  A1 it1 v t2 : A2 v A2 Dn-L Φ ` hB1  A2 ihA2  A1 it1 v t2 : B1 v A2 Figure 8: [28] Cast Rules Derived term dynamism . First, Dana Scott’s seminal denotational work on models of the lambda calculus is very similar to our vertical slice category: types are modeled as retracts (or their associated idempotent) of a fixed universal domain and morphisms are continuous functions of the underlying domain (ignoring the universal domain). Our treatment of type and term dynamism utilizes additional details of this model, and the move from retracts to coreflections allows us to give our specification for upcasts and downcasts. Additionally, Scott’s paper and later work denotational work use coreflections to solve mixed-variance domain equations [26, 36, 31]. The key reason is that one cannot construct a solution to D ∼ = D → D as a limit or colimit because → has contravariant and covariant arguments. Instead, one moves to the category of coreflections where → is covariant in both arguments. Our coreflection model shows that this “trick” is also the reason that the function type constructor is monotone with respect to type dynamism. The double category setting allows us to better understand the intertwined relationship between the categories of continuous maps and coreflections and in this respect has much similarity to [24]’s work, much of which could be fruitfully reframed in a double categorical setting. Henglein’s work [14] on dynamic typing defines casts that are retracts to the dynamic type, introduced the upcast-followed-by-downcast factorization that we use here, and defines a syntactic rewriting relation similar to our term dynamism rules. Further they define a “subtyping” relation that is the same as type dynamism and characterize it by a semantic property analogous to the semantics of type dynamism in our contract model. Findler and Blume’s work on contracts as pairs of projections [10] is also similar. There a contract is defined in an untyped language to be given by a pair of functions that divide enforcement of a type between the a “positive” component that checks the term and a “negative” component that checks the continuation, naturally supporting a definition of blame when a contract is violated. We give no formal treatment of blame in this paper, but our separation into upcasts and downcasts naturally supports a definition of blame analogous to theirs. In their paper, each component c is idempotent and satisfies c v id. Their work is fundamentally untyped so a direct comparison is difficult. Their pairs of projections are not coreflections between the untyped domain and itself and it doesn’t make sense to ask whether our upcasts and downcasts are error projections because they are not endomorphisms. We can say that on the one hand any coreflection with components u, d : A / ? produces an error projection u ◦ d on ?, but then we are left with a single projection rather than two. We might be able to make a more direct comparison using a semantic type system over an untyped language, in the style of [4]. Recent work on interoperability in a (non-gradual) dependently typed language [6, 7] defines casts as “partial type equivalences” between types, which are defined as a pair of terms f : A → B, g : B → A satisfying projection in both directions: f ◦ g v id and g ◦ f v id. This does not model type dynamism, but rather the notion of “general” cast that is not necessarily an upcast or a downcast. Using our decomposition of general casts into an upcast followed by a downcast, we can prove in our logic that any general cast is a partial type equivalence. Their work also identifies Galois connections/insertions as being a possible model of upcasts and downcasts, but they do not develop the idea further. 27 “Dogma” of Gradual Typing There are two recent proposals for a more general theory of gradual typing: Abstracting Gradual Typing (AGT) [12] and the Gradualizer [3]. Broadly, their systems and ours are similar in that type dynamism and graduality are central and a gradually typed language is constructed from a statically typed language. Gradual type theory is quite different in that it is based on an axiomatic semantics, whereas both of theirs are based on operational semantics. As such our notion of gradual type soundness is stronger than theirs: we assert program equivalences whereas their soundness theorem is related to the syntactic type soundness theorem of the static language. Their systems also develop a surface syntax for gradually typed languages (including implicit casts and gradual type checking), whereas our logic here only applies to the runtime semantics of the language. In particular, their languages have implicit casts which are elaborated into an explicit cast calculus that is more similar to our type theory. Their approaches also consider the problem of how a gradual type checker should balance the demands of disallowing terms that will produce type errors with the requirement that the language still have a subset that supports a dynamically typed programming style. Finally, AGT is based on abstract interpretation and uses a Galois insertion between gradual types and sets of static types, but we do not see a precise relationship to our use of coreflections. Cast Factorization The factorization of an arbitrary cast A ⇒ B into an upcast to ? followed by a downcast is superficially similar to the work on triple casts in [30], which collapse a sequence of casts starting at A and ending at B into a downcast to A u B followed by an upcast to B. Note that their factorization is in fact opposite: ours is an upcast followed by a downcast. The factorization we present is trivial and was originally presented in [14], whereas theirs involves some actual computation of a type and is similar to image factorization. Furthermore, it was shown in [12] that the correctness of factorization through A u B is not always possible and is highly dependent on the available language of gradual types, whereas our factorization solely depends on the presence of a dynamic type, which could even be weakened to the two types having a common v-supertype. Relative to this related work, we believe the axiomatic specification of casts via a universal property relative to dynamism is a new idea in gradual typing, as is our categorical semantics and the presentation of the contract interpretation as a model construction. Future Work In this paper we have shown that the combination of soundness and graduality produces strong specifications for call-by-name gradual typing implementations. However so far we have only validated this by denotational semantics, and we plan to develop operational models of this kind of gradual type theory where program equivalence is given by contextual equivalence and term dynamism is modeled by a type of contextual approximation. We also will investigate extensions to richer languages. First, we would like to develop a similar theory for call-by-value gradual typing, as every gradually typed language in use today is call-by-value, and to extend call-by-name with an appropriate notion of positive type (booleans, general sums). We plan to build on existing work on categorical semantics and universal properties of types in call-by-value [19, 32]. The combination of gradual typing and parametric polymorphism has proven quite complex [20, 22, 1, 16]. If we could show that the combination of graduality with parametricity has a unique implementation, as we have shown here for simple typing, it would provide a strong semantic justification for a design. Acknowledgments We thank Amal Ahmed for the countless insightful discussions of this work. References [1] A. Ahmed, D. Jamner, J. G. Siek, and P. Wadler. Theorems for free for free: Parametricity, with and without types. In International Conference on Functional Programming (ICFP), 2017. [2] F. Bañados Schwerter, R. Garcia, and E. Tanter. A theory of gradual effect systems. In Proceedings of the 19th ACM SIGPLAN International Conference on Functional Programming, ICFP ’14, pages 283–295, 2014. 28 [3] M. Cimini and J. G. Siek. Automatically generating the dynamic semantics of gradually typed languages. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017, pages 789–803, 2017. [4] R. L. Constable, S. F. Allen, H. M. Bromley, W. R. Cleaveland, J. F. Cremer, R. W. Harper, D. J. Howe, T. B. Knoblock, N. P. Mendler, P. Panangaden, J. T. Sasaki, and S. F. Smith. Implementing Mathematics with the NuPRL Proof Development System. Prentice Hall, 1986. [5] G. S. H. Cruttwell and M. A. Shulman. A unified framework for generalized multicategories. Theory and Applications of Categories, 24(21), 2009. [6] P.-E. Dagand, N. Tabareau, and E. Tanter. Partial type equivalences for verified dependent interoperability. In International Conference on Functional Programming (ICFP), 2016. [7] P.-E. Dagand, N. Tabareau, and É. Tanter. Foundations of Dependent Interoperability. working paper or preprint, 2017. [8] B. P. Dunphy. Parametricity As a Notion of Uniformity in Reflexive Graphs. PhD thesis, Champaign, IL, USA, 2002. [9] M. Felleisen. On the expressive power of programming languages. ESOP’90, 1990. [10] R. Findler and M. Blume. Contracts as pairs of projections. In International Symposium on Functional and Logic Programming (FLOPS), Apr. 2006. [11] R. B. Findler and M. Felleisen. Contracts for higher-order functions. In International Conference on Functional Programming (ICFP), pages 48–59, Sept. 2002. [12] R. Garcia, A. M. Clark, and E. Tanter. Abstracting gradual typing. In ACM Symposium on Principles of Programming Languages (POPL), 2016. [13] N. Ghani, P. Johann, F. N. Forsberg, F. Orsanigo, and T. Revell. Bifibrational functorial semantics for parametric polymorphism. In Proceedings of Mathematical Foundations of Program Semantics, 2015. [14] F. Henglein. Dynamic typing: Syntax and proof theory. Sci. Comput. Programming, 22(3):197–230, 1994. [15] A. Igarashi, P. Thiemann, V. Vasconcelos, and P. Wadler. Gradual session types. In International Conference on Functional Programming (ICFP), 2017. [16] Y. Igarashi, T. Sekiyama, and A. Igarashi. On polymorphic gradual typing. In International Conference on Functional Programming (ICFP), Oxford, United Kingdom, 2017. [17] J. Lambek and P. J. Scott. Introduction to Higher Order Categorical Logic. Cambridge University Press, 1986. [18] N. Lehmann and E. Tanter. Gradual refinement types. In Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages, POPL 2017. [19] P. B. Levy. Call-by-Push-Value. Ph. D. dissertation, Queen Mary, University of London, London, UK, Mar. 2001. [20] J. Matthews and A. Ahmed. Parametric polymorphism through run-time sealing, or, theorems for low, low prices! In European Symposium on Programming (ESOP), Mar. 2008. [21] E. Moggi. Notions of computation and monads. Inform. And Computation, 93(1), 1991. [22] G. Neis, D. Dreyer, and A. Rossberg. Non-parametric parametricity. In International Conference on Functional Programming (ICFP), pages 135–148, Sept. 2009. [23] P. W. O’Hearn and R. D. Tennent. Parametricity and local variables. Journal of the ACM, 42(3):658–709, May 1995. 29 [24] A. M. Pitts. Relational properties of domains. Information and Computation, 127(2):66 – 90, 1996. [25] G. Plotkin and M. Abadi. A logic for parametric polymorphism. Typed Lambda Calculi and Applications, pages 361–375, 1993. [26] D. Scott. Data types as lattices. Siam Journal on computing, 5(3):522–587, 1976. [27] M. Shulman. Framed bicategories and monoidal fibrations. Theory and Applications of Categories, 20(18):650–738, 2008. [28] J. Siek, M. Vitousek, M. Cimini, and J. T. Boyland. Refined criteria for gradual typing. In 1st Summit on Advances in Programming Languages, SNAPL 2015, 2015. [29] J. G. Siek and W. Taha. Gradual typing for functional languages. In Scheme and Functional Programming Workshop (Scheme), pages 81–92, Sept. 2006. [30] J. G. Siek and P. Wadler. Threesomes, with and without blame. In ACM Symposium on Principles of Programming Languages (POPL), pages 365–376, 2010. [31] M. B. Smyth and G. D. Plotkin. The category-theoretic solution of recursive domain equations. SIAM Journal on Computing, 11(4), 1982. [32] S. Staton and P. B. Levy. Universal properties of impure programming languages. In ACM Symposium on Principles of Programming Languages (POPL), 2013. [33] S. Tobin-Hochstadt and M. Felleisen. Interlanguage migration: From scripts to programs. In Dynamic Languages Symposium (DLS), pages 964–974, Oct. 2006. [34] S. Tobin-Hochstadt and M. Felleisen. The design and implementation of typed scheme. In ACM Symposium on Principles of Programming Languages (POPL), San Francisco, California, 2008. [35] P. Wadler and R. B. Findler. Well-typed programs can’t be blamed. In European Symposium on Programming (ESOP), pages 1–16, Mar. 2009. [36] M. Wand. Fixed-point constructions in order-enriched categories. Theoretical Computer Science, 8(1):13 – 30, 1979. [37] R. Wolff, R. Garcia, E. Tanter, and J. Aldrich. Gradual typestate. In Proceedings of the 25th European Conference on Object-oriented Programming, ECOOP’11, 2011. 30
6cs.PL
Transferring Knowledge from a RNN to a DNN William Chan∗1 , Nan Rosemary Ke∗1 , Ian Lane1,2 1 Carnegie Mellon University Electrical and Computer Engineering, 2 Language Technologies Institute ∗ Equal contribution [email protected], [email protected], [email protected] arXiv:1504.01483v1 [cs.LG] 7 Apr 2015 Abstract Deep Neural Network (DNN) acoustic models have yielded many state-of-the-art results in Automatic Speech Recognition (ASR) tasks. More recently, Recurrent Neural Network (RNN) models have been shown to outperform DNNs counterparts. However, state-of-the-art DNN and RNN models tend to be impractical to deploy on embedded systems with limited computational capacity. Traditionally, the approach for embedded platforms is to either train a small DNN directly, or to train a small DNN that learns the output distribution of a large DNN. In this paper, we utilize a state-of-the-art RNN to transfer knowledge to small DNN. We use the RNN model to generate soft alignments and minimize the Kullback-Leibler divergence against the small DNN. The small DNN trained on the soft RNN alignments achieved a 3.93 WER on the Wall Street Journal (WSJ) eval92 task compared to a baseline 4.54 WER or more than 13% relative improvement. Index Terms: Deep Neural Networks, Recurrent Neural Networks, Automatic Speech Recognition, Model Compression, Embedded Platforms 1. Introduction Deep Neural Networks (DNNs) combined with Hidden Markov Models (HMMs) have been shown to perform well across many Automatic Speech Recognition (ASR) tasks [1, 2, 3]. DNNs accept an acoustic context (e.g., a window of fMLLR features) as inputs and models the posterior distribution of the acoustic model. The “deep” in DNN is critical, state-of-the-art DNN models often contain multiple layers of non-linearities, giving it powerful modelling capabilities [4, 5]. Recently, Recurrent Neural Networks (RNNs) have demonstrated even more potential over its DNN counterparts [6, 7, 8]. RNN models are neural network models that contain recurrent connections or cycles in the connectivity graph. RNN models when unrolled, can actually be seen as a very special case of DNN. The recurrent nature of the RNN allows us to model temporal dependencies, which is often the case in speech sequences. In particular, the recurrent structure of the model allows us to store temporal information (e.g., the cell state in LSTM [9]) within the model. In [10], RNNs were shown to outperform DNNs in large commercial ASR systems. And in [8], RNNs have been shown to provide better performance over DNNs in robust ASR. Currently, there has been much industry interest in ASR for embedded platforms, for example, mobile phones, tablets and smart watches. However, these platforms tend to have limited computational capacity (e.g., no/limited GPU and/or low performance CPU), limited power availability (e.g., small bat- teries) and latency requirements (e.g., asking a GPS system for driving directions should be responsive). Unfortunately, many state-of-the-art DNN and RNN models are simply too expensive or impractical to run on embedded platforms. Traditionally, the approach is simply to use a small DNN, reducing the number of layers and the number of neurons per layer; however, such approaches often suffer from Word Error Rate (WER) performance degradations [11]. In our paper, we seek to improve the WER of small models which can be applied to embedded platforms. DNNs and RNNs are typically trained from forced alignments generated from a GMM-HMM system. We refer to this as a hard alignment, the posterior distribution is concentrated on a single acoustic state for each acoustic context. There has been evidence that these GMM alignment labels are not the optimal training labels as seen in [12, 13]. The GMM alignments make various assumptions of the data, such as independence of acoustic frames given states [12]. In this paper, we show soft distribution labels generated from an expert is potentially more informative over the GMM hard alignments leading to WER improvements. The effects of the poor GMM alignment quality may be hidden away in large deep networks, which have sufficient model capacity. However, in narrow shallow networks, training with the same GMM alignments often hurts our ASR performance [11]. One approach is to change the training criteria, rather than trying to match our DNN to the GMM alignments, we can instead try and match our DNN to the distribution of an expert model (e.g., a big DNN). In [14], a small DNN was trained to match the output distribution of a large DNN. The training data labels are generated by passing labelled and unlabelled data through the large DNN, and training the small DNN to match the output distribution. The results were promising, [14] achieved a 1.33% WER reduction over their baseline systems. Another approach is to train an model to match the softmax logits of an expert model. In [15], an ensemble of experts were trained and used to teach a (potentially smaller) DNN. Their motivation was inference (e.g., computational cost grows linearly to the number of ensemble models), however the principle of model compression applies [16]. [15] also generalized the framework, and showed that we can train the models to match the logits of the softmax, rather than directly modelling the distributions which could yield more knowledge transfer. In this paper, we want to maximize small DNN model performance targeted at embedded platforms. We transfer knowledge from a RNN expert to a small DNN. We first build a large RNN acoustic model, and we then let the small DNN model learn the distribution or soft alignment from the large RNN model. We show our technique will yield improvements in WER compared to the baseline models trained on the hard GMM alignments. The paper is structured as follows. Section 2, begins with an introduction of a state-of-the-art RNN acoustic model. In Section 3, we describe the methodology used to transfer knowledge from a large RNN model to a small DNN model. Section 4 is gives experiments, results and analysis. And we finish in Section 5 with our conclusion and future work discussions. 3.1. KL Divergence We can match the output distribution of our DNN to our RNN by minimizing the Kullback-Leibler (KL) divergence between the two distributions. Namely, given the RNN posterior distribution P and the DNN posterior distribution Q, we want to minimize the KL divergence DKL (P ||Q): DKL (P (s|x)||Q(s|x)) = X P (si |x) ln i 2. Deep Recurrent Neural Networks = H(P, Q) − H(P ) There exist many implementations of RNNs [17], and LSTM is a particular implementation of RNN that is easy to train and does not suffer from the vanishing or exploding gradient problem in Backpropagation Through Time (BPTT) [18]. We follow [19, 20] in our LSTM implementation: it ft ct ot ht = φ(Wxi xt + Whi ht−1 ) = φ(Wxf xt + Whf ht−1 ) = ft cst−1 + it tanh(Wxc xt + Whc ht−1 ) = φ(Wxo xt + Who ht−1 ) = ot tanh(ct ) P (si |x) Q(si |x) (1) (2) (3) (4) (5) This particular LSTM implementation omits the the bias and peephole connections. We also apply a cell clipping of 3 to ease the optimization to avoid exploding gradients. LSTMs can also be extended to be a Bidirectional LSTM (BLSTM), to capture temporal dependencies in both set of directions [7]. RNNs (and LSTMs) can be also be extended into deep RNN architectures [21]. There has been evidence that the deep RNN models can perform better than the shallow RNN models [7, 21, 20]. The additional layers of nonlinearities can give the network additional model capacity similar to the multiple layers of nonlinearities in a DNN. We follow [20], in building our deep RNN; to be exact, the particular RNN model is actually termed a TC-DNN-BLSTMDNN model. The architecture begins with a Time Convolution (TC) over the input features (e.g., fMLLR) [22]. This is followed by a DNN signal processor which can project the features into a higher dimensional space. The projected features are then consumed by a BLSTM, modelling the acoustic context sequence. Finally a DNN with a softmax layer is used to model the posterior distribution. [20]’s model gave more than 8% relative improvement over previous state-of-the-art DNNs in the Wall Street Journal (WSJ) eval92 task. In this paper, we use the TC-DNN-BLSTM-DNN model as our deep RNN to generate the training alignments from which the small DNN will learn from. 3. Methodology Our goal is to transfer knowledge from the RNN expert to a small DNN. We follow an approach similar to [14]. We transfer knowledge by training the DNN to match the RNN’s output distribution. Note that we train on the soft distribution of the RNN (e.g., top k states) rather than just the top-1 state (e.g., realigning the model with the RNN). In this paper we will show the distribution generated by the RNN is more informative over the GMM alignments. We will also show the soft distribution of the RNN is more informative over taking just the top-1 state generated by the RNN. (6) (7) where si ∈ s are the acoustic states, H(P, Q) = P |x) ln Q(si |x) is the cross entropy term and i −P (siP H(P ) = i P (si |x) ln P (si |x) is the entropy term. We can safely ignore the H(P ) entropy term since its gradient is zero with respect to the small DNN parameters. Thus, minimizing the KL divergence is equivalent to minimizing the Cross Entropy Error (CSE) between the two distributions: X H(P, Q) = −P (si |x) ln Q(si |x) (8) i which we can easily differentiate and compute the pre-softmax activation a (e.g., the softmax logits) derivative: ∂J = Q(si |x) − P (si |x) ∂ai (9) 3.2. Alignments In most ASR scenarios, DNNs and RNNs are typically trained with forced alignments generated from GMM-HMM models to model the posterior distribution. We refer this alignment as a hard GMM alignment because the probability is concentrated on only a single state. Furthermore, the alignment labels generated from GMM-HMM model are not always the optimal for training DNNs [12]. The GMM-HMM makes various assumptions that may not be true (e.g., independence of frames). One possible solution is to use labels or alignments from another expert model, for example in [15] an ensemble of experts was used to teach one model. In this paper, we generate labels from an expert RNN which provide better training targets compared to the GMM alignments. One possibility is to generate hard alignments from a RNN expert. This is done by first training the RNN with hard alignments from the GMM-HMM model. After the DNN is trained, we then realign the data by taking hard alignments (e.g., top1 probability state) from the trained RNN. The alignment is hard as it takes only the most probable phoneme state for each acoustic context, and the probability is concentrated on a single phoneme state. On the other hand, we could utilize the full distribution or soft alignment associated with each acoustic frame. More precisely, for each acoustic context, we take the full distribution of the phonetic states and their probabilities. However, this suffers from several problems. First, during training, we need to either run the RNN in parallel or pre-cache the distribution on disk. Running the RNN in parallel is an expensive operation and undesirable. The alternative is caching the distribution on disk, which would require obscene amounts of storage (e.g., we typically have several thousand acoustic states). For example, in WSJ, it would take over 30 TiB to store the full distribution of the si284 dataset. We also run into bandwidth issues when loading the training samples from the disk cache. Finally, the entire distribution may not be useful, as there will be many states with GMM Hard Alignments GMM-HMM RNN Soft Alignments RNN Expert Small DNN Figure 1: We use the hard GMM alignments to first train a RNN, after which we use the soft alignments from the RNN to train our small DNN. near zero values; intuition suggests we can just discard those states (e.g., lossy compression). Our solution sits inbetween the two extremes of taking only the top-1 state or taking the full distribution. We find that the posterior distributions are typically concentrated on only a few states. Therefore, we can make use of almost the full distribution by storing only a small portion of the states probability distribution. We take the states that contains the top 98% of the probability distribution. Note, this is different than taking the top-k states, we take at least n states where we can capture at least 98% of the distribution, and n will vary per frame. We then re-normalize the probability per frame to ensure the distribution sums up to 1. This lossy compression method losses up to 2% of the original probability mass. 4. Experiments and Results We experiment with the WSJ dataset; we use si284 with approximately 81 hours of speech as the training set, dev93 as our development set and eval92 as our test set. We observe the WER of our development set after every epoch, we stop training once the development set no longer improves. We report the converged dev93 and the corresponding eval92 WERs. We use the same fMLLR features generated from the Kaldi s5 recipe [23], and our decoding setup is exactly the same as the s5 recipe (e.g., big dictionary and trigram pruned language model). We use the tri4b GMM alignments as our hard forced alignment training targets, and there are a total of 3431 acoustic states. The GMM tri4b baseline achieved a dev and test WER of 9.39 and 5.39 respectively. 4.1. Optimization In our DNN and RNN optimization procedure, we initialized our networks randomly (e.g., no pretraining) and we used Stochastic Gradient Descent (SGD) with a minibatch size of 128. We apply no gradient clipping or gradient projection in our LSTM. We experimented with constant learning rates of [0.1, 0.01, 0.001] and geometric decayed learning rates with initial values of [0.1, 0.01] with a decay factor of 0.5. We report the best WERs out of these learning rate hyperparameter optimizations. 4.2. Big DNN and RNN We first built several baseline (big) DNN and RNN systems. These are the large networks and not suitable for deployment on mobile platforms. We followed the Kaldi s5 recipe and built a 7 layer DNN and 2048 neurons per hidden layer with DBN pretraining and achieves a eval92 WER of 3.81 [23]. We also followed [20] and built a 5 layer ReLU DNN with 2048 neurons per hidden layer and achieves a eval92 WER of 3.79. Our RNN model follows [20], consists of 2048 neurons per layer for the DNN layers, and 256 bidirectional cells for the BLSTM. The RNN model achieves a eval92 WER of 3.47, significantly better Table 1: models. Wall Street Journal WERs for big DNN and RNN Model GMM Kaldi DNN Kaldi s5 DNN ReLU RNN [20] dev93 WER 9.39 6.68 6.84 6.58 eval92 WER 5.39 3.81 3.79 3.47 than both big DNN models. Each network has a softmax output of 3431 states matching the GMM model. Table 1 summarizes the results for our baseline big DNN and big RNN experiments. 4.3. Small DNN We want to build a small DNN that is easily computable by an embedded device. We decided on a 3 layer network (2 hidden layers), wherein each hidden layer has 512 ReLU neurons and a final softmax of 3431 acoustic states matching the GMM. Since Matrix-Matrix Multiplication (MMM) is an O(n3 ) operation, the effect is approximately a 128 times reduction in number of computations for the hidden layers (when comparing the 4 hidden layers of 2048 neurons vs. a 2 hidden layers of 512 neurons). This will allow us to perform fast interference on embedded platforms with limited CPU/GPU capacity. We first trained a small ReLU DNN using the hard GMM alignments. We achieved a 4.54 WER compared to 3.79 WER of the big ReLU DNN model on the eval92 task. The dev93 WER is 8.00 for small model vs 6.84 for the large model; the big gap in dev93 WER suggests the big DNN model is able to optimize substantially better. The large DNN model has significantly more model capacity, and thus yielding its better results over the small DNN. Next, we experimented with the hard RNN alignment. We take the top-1 state of the RNN model and train our DNN towards this alignment. We did not see any improvement, while the dev93 WER improves from 8.00 to 7.83, the eval92 WER degrades from the 4.54 to 4.63. This suggests, the RNN hard alignments are worse labels than the original GMM alignments. The information provided by the RNN when looking at only the top state is no more informative over the GMM hard alignments. One hypothesis is our DNN model overfits towards the RNN hard alignments, since the dev93 WER was able to improve, while the model is unable to generalize the performance to the eval92 test set. We now experiment with the RNN soft alignment, wherein we can add the soft distribution characteristics of the RNN to the small DNN. We take the top 98% percentile of probabilities of from the RNN distribution and renormalize them (e.g., ensure the distribution sums up to 1). We minimize the KL divergence between the RNN soft alignments and the small DNN. We see a significant improvement in WER. We achieve a dev93 WER of 7.38 and eval92 3.93. In the eval92 scenario, our WER Table 2: Small DNN WERs for Wall Street Journal based on different training alignments. Alignment Hard GMM Hard RNN Soft RNN Soft DNN dev93 WER 8.00 7.83 7.38 7.43 eval92 WER 4.54 4.63 3.93 4.27 improves by over 13% relative compared to the baseline GMM hard alignment. We were almost able to match the WER of the big DNN of 3.79 (off by 3.6% relative), despite the big DNN have many more layers and neurons. The RNN soft alignment adds considerable information to the training labels over the GMM hard alignments or the RNN hard alignments. We also experimented training on the big DNN soft alignments. The big DNN model is the DNN ReLU model mentioned in table 1, wherein it achieved a eval92 WER of 3.79. Once again, we generate the soft alignments and train our small DNN to minimize the KL divergence. We achieved a dev93 WER of 7.43 and eval92 WER of 4.27. There are several things to note, first, we once again improve over the GMM baseline by 5.9% relative. Next, the dev93 WER is very close to the RNN soft alignment (less than 1% relative), however, the gap widens when we look at the eval92 WER (more than 8% relative). This suggests the model overfits more under the big DNN soft alignments, and the RNN soft alignments provide more generalization. The quality of the RNN soft alignments are much better than big DNN soft alignments. Table 2 summarizes the WERs for the small DNN model using different training alignments. 4.4. Cross Entropy Error We compute the CSE of our various models against the GMM alignment for the dev93 dataset. We measure the CSE against dev93 since that is our stopping criteria and that is the optimization loss. The CSE will give us a better indication of the optimization procedure, and how our models are overfitting. Table 3 summarizes our CSE measurements. There are several observations, first the big RNN is able to achieve a lower CSE compared to the big DNN. The RNN model is able to optimize better than the DNN as seen with the better WERs the RNN model provides. This is as expected since the big RNN model achieves the best WER. The next observation is that the small DNNs trained off the soft alignment from the large DNN or RNN achieved a lower CSE and compared to the small DNN trained on the GMM hard alignment. This suggests the soft alignment labels are indeed better training labels in optimizing the model. The extra information contained in the soft alignment helps us optimize better towards our dev93 dataset. The small DNN trained on the soft RNN alignments and soft DNN alignments give interesting results. These models achieved a lower CSE compared to the large RNN and large DNN models trained on the GMM alignments. However, the WERs are worse than the large RNN and large DNN models. This suggests the small model trained on the soft distribution is overfitting, it is unclear if the overfitting occurs because the smaller model can not generalize as well as the large model, or if the overfitting occurs because of the quality of the soft alignment labels. Table 3: Cross Entropy Error (CSE) on WSJ dev93 over our various models. Alignment GMM GMM Hard RNN Soft RNN Soft DNN Model Big RNN Big DNN Small DNN Small DNN Small DNN CSE 1.27620 1.28431 1.52135 1.24617 1.24723 5. Conclusion and Discussions The motivation and application of our work is to extend ASR onto embedded platforms, where there is limited computational capacity. In this paper we have introduced a method to transfer knowledge from a RNN to a small DNN. We minimize the KL divergence between the two distributions to match the DNN’s output to the RNN’s output. We improve the WER from 4.54 trained on GMM forced alignments to 3.93 on the soft alignments generated by the RNN. Our method has resulted in more than 13% relative improvement in WER with no additional inference cost. One question we did not answer in this paper is whether the small DNN’s model capacity or the RNN’s soft alignment is the bottleneck of further WER performance. We did not measure the effect of the small DNN’s model capacity on the WER, would we get similar WERs if we increased or decreased the small DNN’s size? If the bottleneck is in the quality of the soft alignments, then in princple we could reduce the small DNN’s size further without impacting WER (much), however, if model capacity is the issue, then we should not use smaller networks. On a similar question, we did not investigate the impact of the top probability selection in the RNN alignment. We threshold the top 98% of the probabilities out of convenience, however, how would selecting more or less probabilities affect the quality of the alignments. In the extreme case, wherein we only selected the top-1 probability, we found the model to perform much worse compared to the 98% soft alignments, and even worse than the GMM alignments, this evidence definitely shows the importance of the information contained in the soft alignment. We could also extend our work similar to [14] and utilize vast amounts of unlabelled data to improve our small DNN. In [14], they applied unlabelled data to their large DNN expert to generate vast quantities of soft alignment labels for the small DNN to learn from. In principle, one could extend this to an infinite amount of training data with synthetic data generation, which has been shown to improve ASR performance [24]. Finally, we did not experiment with sequence training [25], sequence training has almost always shown to help [26], it would be interesting to see the effects of sequence training on these small models, and whether we can further improve the ASR performance. 6. Acknowledgements We thank Won Kyum Lee for helpful discussions and proofreading this paper. 7. References [1] G. E. Dahl, D. Yu, L. Deng, and A. Acero, “Context-Dependent Pre-Trained Deep Neural Networks for Large-Vocabulary Speech Recognition,” IEEE Transactions on Audio, Speech, and Language Processing, vol. 20, pp. 30–42, January 2012. [2] L. Deng, J. Li, J.-T. Huang, K. Yao, D. Yu, F. Seide, M. Seltzer, G. Zweig, X. He, J. Williams, Y. Gong, and A. Acero, “Recent advances in deep learning for speech research at microsoft,” May 2013. [3] H. Soltau, G. Saon, and T. Sainath, “Joint Training of Convoutional and Non-Convoutional Neural Networks,” in IEEE International Conference on Acoustics, Speech and Signal Processing, 2014. [4] M. Zeiler, M. Ranzato, R. Monga, M. Mao, K. Yang, Q. V. Le, P. Nguyen, A. Senior, V. Vanhoucke, J. Dean, and G. E. Hinton, “On Rectified Linear Units for Speech Processing,” in IEEE International Conference on Acoustics, Speech and Signal Processing, 2013. [5] G. E. Dahl, T. N. Sainath, and G. E. Hinton, “Improving Deep Neural Networks for LVCSR Using Rectified Linear Units and Dropout,” in IEEE International Conference on Acoustics, Speech and Signal Processing, 2013. [6] A. Graves, A. rahman Mohamed, and G. Hinton, “Speech Recognition with Deep Recurrent Neural Networks,” in IEEE International Conference on Acoustics, Speech and Signal Processing, 2013. [7] A. Graves, N. Jaitly, and A. rahman Mohamed, “Hybrid Speech Recognition with Bidirectional LSTM,” in Automatic Speech Recognition and Understanding Workshop, 2013. [8] C. Weng, D. Yu, S. Watanabe, and F. Jung, “Recurrent Deep Neural Networks for Robust Speech Recognition,” in IEEE International Conference on Acoustics, Speech and Signal Processing, 2014. [9] S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, November 1997. [10] H. Sak, A. Senior, and F. Beaufays, “Long Short-Term Memory Recurrent Neural Network Architectures for Large Scale Acoustic Modeling,” in INTERSPEECH, 2014. [11] X. Lei, A. Senior, A. Gruenstein, and J. Sorensen, “Accurate and Compact Large Vocabulary Speech Recognition on Mobile Devices,” in INTERSPEECH, 2013. [12] N. Jaitly, V. Vanhoucke, and G. Hinton, “Autoregressive product of multi-frame predictions can improve the accuracy of hybrid models,” in INTERSPEECH, 2014. [13] A. Senior, G. Heigold, M. Bacchiani, and H. Liao, “GMM-Free DNN Training,” in IEEE International Conference on Acoustics, Speech and Signal Processing, 2014. [14] J. Li, R. Zhao, J.-T. Huang, and Y. Gong, “Learning SmallSize DNN with Output-Distribution-Based Criteria,” in INTERSPEECH, 2014. [15] G. Hinton, O. Vinyals, and J. Dean, “Distilling the Knowledge in a Neural Network,” in Neural Information Processing Systems: Workshop Deep Learning and Representation Learning Workshop, 2014. [16] C. Bucila, R. Caruana, and A. Niculescu-Mizil, “Model Compression,” in ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2006. [17] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio, “Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling,” in Neural Information Processing Systems: Workshop Deep Learning and Representation Learning Workshop, 2014. [18] S. Hochreiter, Y. Bengio, P. Frasconi, and J. Schmidhuber, “Gradient Flow in Recurrent Nets: the Difficulty of Learning Long-Term Dependencies,” 2011. [19] O. Vinyals, A. Toshev, S. Bengio, and D. Erhan, “Show and Tell: A Neural Image Caption Generator,” in arXiv:1411.4555, 2014. [20] W. Chan and I. Lane, “Deep Recurrent Neural Networks for Acoustic Modelling,” in INTERSPEECH (submitted), 2015. [21] R. Pascanu, C. Gulcehre, K. Cho, and Y. Bengio, “How to Construct Deep Recurrent Neural Networks,” in International Conference on Learning Representations, 2014. [22] W. Chan and I. Lane, “Deep Convolutional Neural Networks for Acoustic Modeling in Low Resource Languages,” in IEEE International Conference on Acoustics, Speech and Signal Processing, 2015. [23] D. Povey, A. Ghoshal, G. Boulianne, L. Burget, O. Glembek, N. Goel, M. Hannenmann, P. Motlicek, Y. Qian, P. Schwarz, J. Silovsky, G. Stemmer, and K. Vesely, “The Kaldi Speech Recognition Toolkit,” in Automatic Speech Recognition and Understanding Workshop, 2011. [24] A. Hannun, C. Case, J. Casper, B. Catanzaro, G. Diamos, E. Elsen, R. Prenger, S. Satheesh, S. Sengupta, A. Coates, and A. Ng, “Deep Speech: Scaling up end-to-end speech recognition,” in arXiv:1412.5567, 2014. [25] K. Vesely, A. Ghoshal, L. Burget, and D. Povey, “Sequencediscriminative training of deep neural networks,” in INTERSPEECH, 2013. [26] H. Sak, O. Vinyals, G. Heigold, A. Senior, E. McDermott, R. Monga, and M. Mao, “Sequence Discriminative Distributed Training of Long Short-Term Memory Recurrent Neural Networks,” in INTERSPEECH, 2014.
9cs.NE
Feature-Fused SSD: Fast Detection for Small Objects Guimei Cao, Xuemei Xie, Wenzhe Yang, Quan Liao, Guangming Shi, Jinjian Wu School of Electronic Engineering, Xidian University, China [email protected] ABSTRACT Small objects detection is a challenging task in computer vision due to its limited resolution and information. In order to solve this problem, the majority of existing methods sacrifice speed for improvement in accuracy. In this paper, we aim to detect small objects at a fast speed, using the best object detector Single Shot Multibox Detector (SSD) with respect to accuracy-vs-speed trade-off as base architecture. We propose a multi-level feature fusion method for introducing contextual information in SSD, in order to improve the accuracy for small objects. In detailed fusion operation, we design two feature fusion modules, concatenation module and element-sum module, different in the way of adding contextual information. Experimental results show that these two fusion modules obtain higher mAP on PASCAL VOC2007 than baseline SSD by 1.6 and 1.7 points respectively, especially with 2-3 points improvement on some small objects categories. The testing speed of them is 43 and 40 FPS respectively, superior to the state of the art Deconvolutional single shot detector (DSSD) by 29.4 and 26.4 FPS. Keywords: Small object detection, feature fusion, real-time, single shot multi-box detector. 1. INTRODUCTION Reliably detecting small objects is a quite challenging task due to their limited resolution and information in images. Considering this problem, many existing methods [1-4] have demonstrated considerable improvement brought by exploiting the contextual information. For example, in Fig. 1, it is quite difficult to recognize the sailing boats without taking the sea into account. Besides, both the people and bike provide an evidence for the existing of the bottle and the person, which have a relationship in some extent. Another common method used for small object detection is enlarging the small regions [5] for better fitting the features of pre-trained network. Since the enlarging method would increase the computation greatly, we do not consider it. Figure 1. The scene of sea, person, and bike provide the evidence of the existence of the sailing boats, bottle, and person. When considering real-time detection, most of these studies are based on region-based object detection architecture, including RCNN [6], SPPnet [7], Fast RCNN [8], Faster RCNN [9], which cannot detect small objects in a fast way. The fast detector Single Shot Multibox Detector (SSD [10]) presents large improvement in speed, for eliminating region proposals and the subsequent pixel resampling stage. To improve accuracy for small objects, Deconvolutional Single Shot Detector (DSSD [4]) uses the SSD architecture as baseline. Since it is concentrated on improving accuracy by using the base network residual-101 [11], it sacrifices lot of speed inevitably. Thus, for small object detection, accuracy-vsspeed trade-off is still hard to balance currently, remaining a challenging problem to be solved. In this paper, we aim to obtain fast detection for small objects. To achieve this, we use the best object detector SSD with respect to accuracy-vs-speed trade-off as our base architecture, which can do real-time detection. We propose a multi-level feature fusion method for adding contextual information in SSD baseline, in order to improve the accuracy for small objects. In detailed fusion operation, we instantiate this feature fusion method carefully with two modules, concatenation module and element-sum module. Since context may introduce useless background noises, it is not always useful for small object detection. In detail, concatenation module uses a 1×1 convolution layer for learning the weights of the fusion of the target information and contextual information, which can reduce the interference of useless background noises. Element-sum module uses equivalent weights set manually and fuses the multi-level features in a compulsory way, which can enhance the effectiveness of useful context. Experimental results show that our two feature fusion modules obtain higher mAP on PASCAL VOC2007 than baseline SSD by 1.6 and 1.7 points respectively, especially with 2-3 points improvement on some small objects categories, such as aero, bird, boat, pot plant, TV monitor and so on. The testing speed of them is 43 and 40 FPS respectively, which is in a real-time fashion. 2. RELATED WORK Context: Many previous studies have demonstrated that contextual information plays an important role in object detection task, especially for small objects. The common method for introducing contextual information is exploiting the combined feature maps within a ConvNet for prediction. For example, ION [2] extracts VGG16 [12] features from multiple layers of each region proposal using ROI pooling [8], and concatenate them as a fixed-size descriptor for final prediction. HyperNet [3], GBD-Net [13] and AC-CNN [14] also adopt a similar method that use the combined feature descriptor of each region proposal for object detection. Because the combined features come from different layers, they have different levels of abstraction of input image. So that the feature descriptors of each region proposal contain finegrained local features and contextual features. However, these methods are all based on region proposal method and pool the feature descriptors from combined feature maps, which increases the memory footprint as well as decreases the speed of detection. Multi-scale representation: Multi-scale representation has been proven useful for many detection tasks. Many previous detection architectures use single-scale representation, such as RCNN [6], Fast RCNN [8], Faster RCNN [9], and YOLO [15]. They predict confidence and localization from the features extracted by the top-most layer within a ConvNet, which increases the heavy burden of the last layer. Differently, SSD [10] uses multi-scale representation that detect objects with different scales and aspect ratios from multiple layers. With smaller object detection, SSD uses the features from the shallower layers, while exploits the features from the deeper layers for bigger objects detection. In order to further improve the accuracy of SSD, especially for small objects, DSSD adds extra deconvolution layers in the end of SSD. By integrating every prediction layer and its deconvolution layer, the contextual information is injected, which makes the predictions for small objects more accurate. Since the methods for introducing contextual information into region-based object detectors are also multi-scale representation, they are quite different from SSD in the way of predicting objects localization and confidence. 3. MULTI-LEVEL FEATURE FUSION MODULE IN SSD We extract the multi-level features from SSD model, which is the state of the art object detector with respect to accuracy-vs-speed trade-off. In this section, we introduce the SSD briefly and then illustrate the two multi-level feature fusion modules in detail, which exploit the useful local context for final classification and regression. Feature fusion module Conv3_x Conv4_x Conv5_x Prediction layer + Fc_x SSD layers Conv2_x Conv1_x VGG16 layers Figure 2. Feature-fused SSD architecture. 3.1 Single Shot Multibox Detector The Single shot multibox detector (SSD) is based on the VGG16 base network and ends with several newly added layers. Our model is illustrated in Fig. 2. Instead of using the last feature map of the ConvNet, SSD uses the pyramidal feature hierarchy in multiple layers within a ConvNet to predict objects with different scales. That is using shallower layers to predict smaller objects, while using deeper layers to predict bigger objects, thus it can reduce the prediction burden of the whole model. However, shallower layers often lack of semantic information which is important supplement for small object detection. Therefore, passing the semantic information captured in convolutional forward computation back to the shallower layers will improve the detection performance of small objects. Which layers to combine? We exploit the proper Conv layers to provide useful contextual information since that too large receptive field would often introduce large useless background noise. Because of SSD predicting small objects with its shallower layers, such as conv4_3, we do not use the feature fusion module for large objects in the deeper layers for less decrease of speed. For choosing the proper feature fusion layers, effective receptive fields in different layers are explored with deconvolution method. As shown in Fig. 3, take boats for example, the effective receptive field of the nearer boat within the SSD architecture is quite proper in conv4_3. Conv5_3 and fc6 have larger effective receptive fields. However, fc6, where uses dilated convolution, would introduce more background noise than conv5_3. (a) Image (b) Conv3_3 (c) Conv4_3 (d) Conv5_3 (e) Fc6 Figure 3. Effective receptive fields in SSD architecture. (a) is the input image, and (b), (c), (d), (e) show the effective fields of conv3_3, conv4_3, conv5_3 and fc6, respectively, shown with enhancement. In order to inject the contextual information into the shallower layers (conv4_3) which lacks of sematic information, we design two different modules for feature fusion, named as concatenation module and element-sum module. 3.2 Concatenation Module The concatenation fusion module is shown in Fig. 4. In order to make the feature maps of conv5_3 layer the same size as conv4_3 layer, the conv5_3 layer is followed by a deconvolution layer, which is initialized by bilinear upsample. Two 3×3 convolutional layers are used after conv4_3 layer and conv5_3 layer for learning the better features to fuse. Then normalization layers are following with different scales respectively, i.e. 10, 20, before concatenating them along their channel axis. The final fusion feature maps are generated by a 1×1 convolutional layer for dimension reduction as well as feature recombination. 3.3 Element-Sum Module Another solution to fuse feature maps of two layers is using element-sum module. This module is illustrated in Fig. 5. It is the same as concatenation module except the fusion type. In this module, two feature maps contained different level features are summarized point to point with equivalent weights. In practice, this operation works well due to the two convolution layers used before, which learns features from conv4_3 and conv5_3 adaptively for better fusion effects. This module is inspired by DSSD [4] based on residual-101, which uses the learned deconvolution layer and elementwise operation. Conv4_3 (512x38x38) ReLU Normalize(20) Conv 3x3x512 ReLU Conv 1x1x512 Concat loc conf ReLU Normalize(10) Conv 3x3x512 Deconv 2x2x512 Fusion_conv43_conv53 Fusion (512x38x38) (1024x38x38) Conv5_3 (512x19x19) Figure 4. Illustration of the concatenation module. Conv4_3 (512x38x38) Normalize(20) Conv 3x3x512 ReLU Eltw SUM loc conf Normalize(10) Conv 3x3x512 Deconv 2x2x512 Fusion_conv43_conv53 (512x38x38) Conv5_3 (512x19x19) Figure 5. Illustration of the element-sum module. Concatenation module fuses multi-level features with learning weights implemented by 1×1 convolutional layer, while element-sum module uses the equivalent weights set manually. With this difference, concatenation module can reduce the interference caused by useless background noises, and element-sum module can enhance the importance of the contextual information. 4. EXPERIMENTAL RESULTS We evaluate our feature-fused SSD model on PASCAL VOC 2007 and 2012. In this section, the detection results of two feature fusion modules are compared with SSD and DSSD. In addition, the detection performance for small objects is shown and the comparisons are analyzed carefully. And we illustrate the testing speed of our two models in the end. 4.1 Experimental Setup The feature-fused SSD is implemented based on SSD built on the Caffe [16] framework, and the VGG16 architecture, all of which are available online. The VGG16 model pre-trained on ImageNet dataset for the task of image classification, is reduced of fully connected layers when used as the base network of SSD. The baseline SSD is trained with the batch size of 16, and with the input size of 300×300. The training process starts with the learning rate at 10-3 for the first 80K iterations, which decreases to 10-4 and 10-5 at 10K and 12K. 4.2 PASCAL VOC2007 We train our models on the union of PASCAL VOC2007 and PASCAL VOC2012, which contain 20 categories in 9,963 and 22,531 images, respectively. Both of the two feature fusion models are fine-tuned upon the well-trained SSD baseline for another 10K iterations. The learning rate is 10-3 for the first 60K iterations and then decreases to 10-4 and 105 at 60K and 70K iterations respectively. All newly added layers initialized with “xavier”. We take several necessary tries when designing the most effective feature fusion modules. Firstly, we explore the proper layers to fuse with experimental results, which has been discussed in Figure 3 theoretically. As shown in Table 1, the mAP on general objects of PASCAL VOC 2007 is considerable. But we select the conv4_3 and conv5_3 layers to fuse, since fc6 has a larger receptive field than conv5_3 for small objects which would introduce much more background noises. In addition, we try different numbers of kernels when designing the modules. In Table 2, we show that our module can work well even if the number of kernels reducing to 128, which means smaller and faster. Table 2. Detection results of different number of kernels Table 1. Detection results of different fusion layers layers concat Conv4_3 Eltsum 77.27 Kernel number concat Eltsum 512 78.76 78.53 384 78.63 78.92 Conv4_3+conv5_3 78.76 78.53 256 78.70 78.83 Conv4_3+fc6 78.56 78.51 128 78.68 78.67 Conv3_3+Conv4_3+conv5_3 78.48 78.39 64 78.44 78.37 32 78.05 78.14 General objects detection: In Table 3, we report the detection performance of the proposed modules. The two feature-fused SSD methods are both improved compared with their baseline SSD with respect to general objects detection. The feature-fused SSD with concatenation module obtains 78.8 mAP, while 78.9 mAP with element-sum module, which are 1.6 and 1.7 points higher than original SSD respectively. Moreover, our results are comparable with the state of the art performance DSSD 321. Table 3. Results on PASCAL VOC2007 test set (with IOU=0.5) Method mAP Aero bike bird boat bottle bus car cat chair cow SSD300 77.2 78.8 85.3 75.7 71.5 49.1 85.7 86.4 87.8 60.6 82.7 DSSD321 78.6 81.9 84.9 80.5 68.4 53.9 85.6 86.2 88.9 61.1 83.5 Elt_sum 78.9 82.0 86.5 78.0 71.7 52.9 86.6 86.9 88.3 63.2 83.0 Concat 78.8 82.4 85.7 77.8 73.8 52.3 87.5 86.8 87.6 62.6 82.1 Method mAP table dog horse mbike person plant sheep sofa train tv SSD300 77.2 76.5 84.9 86.7 84.0 79.2 51.3 77.5 78.7 86.7 76.3 DSSD321 78.6 78.7 86.7 88.7 86.7 79.7 51.7 78.0 80.9 87.2 79.4 Elt_sum 78.9 76.8 86.1 88.5 87.5 80.4 53.9 80.6 79.5 88.2 77.9 Concat 78.8 76.6 86.1 88.2 86.6 80.3 53.7 78.0 80.1 87.3 78.0 Small objects detection: Since VOC2007 dataset contains 20 categories and every category may have small objects, we manually select 181 images mainly including small objects for evaluating our models better. These two methods achieve 3.6 and 2.0 mAP improvement compared with original SSD model, with respect to concatenation module and element-sum module. Detection results are shown in Fig. 6. We find that the detection performance of small objects with specific background improved obviously, such as small car, aero, bird and so on. And objects which often appear together with relative objects are detected more accurate. For example, the people in a car as well as the bike beside a person provide supplementary evidence for the existence of each other. Performance comparison of two fusion modules: Consider small object detection. When looking into the difference of these two feature-fused SSD methods, we analyze fusion methods and their detection results carefully. In Fig. 7, a pot plant is occluded by a desk bump, which is not the useful contextual information of it. Since the concatenation module uses learned weights to combine the target feature and the contextual feature, it can select useful contextual information and weaken the interference of the background noises. Unfortunately, element-sum model combines both target features and context in an equivalent way, thus it cannot select the useful contextual information adaptively. On the contrary, in Fig. 8, cars are blurry in the scene, so that the context is necessary for detection. In this case, element-sum module works better than the concatenation module, because the latter has much more choice that may not learn the relationship between the target and context well. (a) SSD detection results (b) Concatenation model detection results (c) Element-sum model detection results Figure 6. Detection results of feature-fused SSD. (a), (b), and (c) are detection results of original SSD, feature-fused SSD with concatenation module, and with element-sum module, respectively. All the images in four columns show that useful contextual information provide evidence for the existence of the small objects. Figure 7. Left: Detection results of concatenation model. Right: Detection results of element-sum model. The pot plant is occluded by a desk bump, and concatenation model can weaken the interference of background noises, while element-sum model cannot. Figure 8. Left: Detection results of concatenation model. Right: Detection results of element-sum model. The cars in this image is small and blurry, so that the contextual information is necessary for their detection. Element-sum model exploits this context quite well, while concatenation model cannot. 4.3 Running Time We evaluate running time for these two feature fusion methods on PASCAL VOC 2007 test dataset, as shown in Table 4. The detection speed of the two methods, concatenation module and element-sum module, is 40 FPS and 43 FPS respectively, slower than SSD original model because of the extra feature fusion layers. However, our methods still achieve real-time detection. Compared with the DSSD321 with 13.6 FPS, faster detection speed is obtained by our methods, with comparable accuracy 78.8 and 78.9. Because DSSD321 uses Residual-101 network as base network, while our methods exploit VGG16.The concatenation model uses three convolution layers with 512 kernels in each layer, and element-sum module uses two convolution layers with 384 kernels in each layer. Thus, the element-sum model is faster than the concatenation model by 3 FPS. Table 4. The running time illustration of different models Method Base Network mAP FPS SSD300[10] VGG16[12] 77.2 50 78.6 13.6 DSSD321 [4] Residual-101 [11] Proposed concatenation model VGG16 78.8 40 Proposed element-sum model VGG16 78.9 43 5. CONCLUSION We have presented a feature fusion method in SSD obtains a fast and accurate detection for small objects. Compared with the state of the art object detector for small objects, our method achieves faster detection speed, with comparable accuracy. With the two fusion operations, we have shown the advantages of them in different cases. Since context is not always useful information for small object detection, which may introduce useless background noises sometimes, controlling the information transmission will be the further work to study. ACKNOWLEDGMENT This work is supported by Natural Science Foundation (NSF) of China (61472301, 61632019). REFERENCES [1] C. Chen, M. Liu, O. Tuzel, J. Xiao, “R-cnn for small object detection,” Asian Conference on Computer Vision, 214230, (2016) [2] S. Bell, C. Lawrence Zitnick, K. Bala, R. Girshick, “Inside-outside net: Detecting objects in context with skip pooling and recurrent neural networks,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2874-2883, (2016) [3] T. Kong, A. Yao, Y. Chen, F. Sun, “HyperNet: Towards accurate region proposal generation and joint object detection,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, (2016) [4] C. Fu, W. Liu, A. Ranga, A. Tyagi, A. Berg, “DSSD: Deconvolutional single shot detector,” arXiv preprint arXiv:1701.06659, (2017) [5] P. Hu, D. Ramanan, “Finding tiny faces,” arXiv preprint arXiv:1612.04402, (2016) [6] R. Girshick, J. Donahue, T. Darrell, J. Malik, “Rich feature hierarchies for accurate object detection and semantic segmentation,” Proceedings of the IEEE conference on computer vision and pattern recognition, 580-587, (2014) [7] K. He, X. Zhang, S. Ren, J. Sun, “Spatial pyramid pooling in deep convolutional networks for visual recognition,” European Conference on Computer Vision, 346-361, (2014) [8] R. Girshick, “Fast r-cnn,” Proceedings of the IEEE international conference on computer vision, 1440-1448, (2015) [9] S. Ren, K. He, R. Girshick, J. Sun, “Faster R-CNN: Towards real-time object detection with region proposal networks,” Advances in neural information processing systems, 91-99, (2015) [10] W. Liu, D. Anguelov, D. Erhan, C. Szegedy, S. Reed, C. Fu, A. Berg, “SSD: Single shot multibox detector,” European conference on computer vision, 21-37, (2016) [11] K. He, X. Zhang, S. Ren, J. Sun, “Deep residual learning for image recognition,” Proceedings of the IEEE conference on computer vision and pattern recognition, 770-778, (2016) [12] K. Simonyan, A. Zisserman, “Very deep convolutional networks for large-scale image recognition,” arXiv preprint arXiv:1409.1556, (2014). [13] X. Zeng, W. Ouyang, J. Yan, H. Li, T. Xiao, K. Wang, Y. Liu, Y. Zhou, B. Yang, Z. Wang, H. Zhou, X. Wang, “Crafting GBD-Net for Object Detection,” arXiv preprint arXiv:1610.02579, (2016) [14] J. Li, Y. Wei, X. Liang, J. Dong, T. Xu, J. Feng, S. Yan, “Attentive contexts for object detection,” IEEE Transactions on Multimedia, 19(5): 944-954, (2017) [15] J. Redmon, S. Divvala, R. Girshick, A. Farhadi, “You only look once: Unified, real-time object detection,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 779-788, (2016) [16] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, T. Darrell, “Caffe: Convolutional architecture for fast feature embedding,” Proceedings of the 22nd ACM international conference on Multimedia, 675-678, (2014)
7cs.IT
1 Energy-Efficient Resource Allocation in NOMA Heterogeneous Networks Haijun Zhang, Senior Member, IEEE, Fang Fang, Student Member, IEEE, Julian arXiv:1801.04552v1 [cs.IT] 14 Jan 2018 Cheng, Senior Member, IEEE, Keping Long, Senior Member, IEEE, Wei Wang, Senior Member, IEEE, and Victor C.M. Leung, Fellow, IEEE Abstract Non-orthogonal multiple access (NOMA) has attracted much recent attention owing to its capability for improving the system spectral efficiency in wireless communications. Deploying NOMA in heterogeneous network can satisfy users’ explosive data traffic requirements, and NOMA will likely play an important role in the fifth-generation (5G) mobile communication networks. However, NOMA brings new technical challenges on resource allocation due to the mutual cross-tier interference in heterogeneous networks. In this article, to study the tradeoff between data rate performance and energy consumption in NOMA, we examine the problem of energy-efficient user scheduling and power optimization in 5G NOMA heterogeneous networks. The energy-efficient user scheduling and power allocation schemes are introduced for the downlink 5G NOMA heterogeneous network for perfect and imperfect channel state information (CSI) respectively. Simulation results show that the resource allocation schemes can significantly increase the energy efficiency of 5G NOMA heterogeneous network for both cases of perfect CSI and imperfect CSI. Haijun Zhang and Keping Long are with the Engineering and Technology Research Center for Convergence Networks, University of Science and Technology Beijing, Beijing, 100083, China (e-mail: [email protected], [email protected]). Fang Fang and Julian Cheng are with School of Engineering, The University of British Columbia, Kelowna, BC, V1X 1V7, Canada (e-mail: [email protected], [email protected]). Wei Wang is with the College of Information Science and Electronic Engineering, Zhejiang University, Hangzhou 310027, China, and also with the Zhejiang Provincial Key Laboratory of Information Processing, Communication and Networking, Hangzhou 310027, China (e-mail: [email protected]). Victor C.M. Leung is with the Department of Electrical and Computer Engineering, The University of British Columbia, Vancouver, BC V6T 1Z4 Canada (e-mail: [email protected]). January 16, 2018 DRAFT 2 I. I NTRODUCTION In order to meet the explosive growth of wireless traffic data requirement and overcome the shortage of the frequency resource, non-orthogonal multiple access (NOMA) has been proposed as a promising technique in the fifth generation (5G) of wireless communication systems [1]. Different from orthogonal frequency division multiple access (OFDMA) technique using orthogonal subcarriers, NOMA enables multiple users to be multiplexed on the same frequency band by applying the successive interference cancelation (SIC) technique at the receivers [2]. According to the NOMA protocol, the user who has worse channel state information (CSI) is assigned more power than the user who has better CSI [3], [4]. This protocol guarantees the weak users’ access by successively decoding the signals from the received signals in the decreasing order of power. It was shown that the NOMA scheme can achieve higher spectral efficiency and higher data rate than the traditional OFDMA scheme [5]. Driven by the rapid increase of wireless terminal equipments and wide usage of mobile Internet, heterogeneous networks have emerged as one of the most promising network infrastructures to provide high system throughput and large coverage of indoor and cell edge scenarios in 5G wireless communication systems [6]. In such an architecture, a macrocell is overlaid by several small cells, e.g., microcell, picocell and femtocell, to significantly improve the system throughput and the spectral efficiency. For heterogeneous networks, frequency band sharing between macrocell and small cells is viable, and it is also more efficient to reuse the frequency bands within a macrocell [7]. However, the cross-tier interference can severely degrade the quality of the wireless transmission. The advantage of the heterogeneous network also comes with some fundamental challenges on cross-tier interference mitigation, which have been studied in previous research by some techniques, e.g. precoding technique and resource management [7]. In this article, we apply NOMA with SIC technology to heterogeneous networks in order to alleviate the cross-tier interference and improve the system energy efficiency via resource optimization. In the traditional OFDMA heterogeneous networks, the frequency band can be divided into several sub frequency bands, and users in the macro cell and small cells are assigned to different sub frequency bands in order to avoid the cross-tier interference [7]. However, in NOMA heterogeneous networks, SIC is applied at the receivers to allow multiple users to be multiplexed on the same sub frequency band and the strong users with higher CSI can cancel the interference from the weak user with lower CSI multiplexed on the same sub frequency band. January 16, 2018 DRAFT 3 With the overwhelming increase of the traffic data and mobile devices, the energy cost has rapidly increased and become an important issue in the green cellular network because of the increasing amount of CO2 emission levels caused by energy consumption [8]–[11]. Thus, fast growing energy consumption and limited global energy resources are the important motivation for the research on energy efficient communications in NOMA heterogeneous networks. Different from the existing works in NOMA networks, in this article, we focus on the energy efficient wireless communications for the downlink 5G NOMA heterogeneous networks via resource optimization. More specifically, we study user scheduling and power allocation by considering both perfect CSI and imperfect CSI. We first present network architecture of a 5G NOMA heterogeneous network. Then we describe an effective resource allocation scheme in 5G NOMA heterogeneous networks to improve the system energy efficiency with perfect CSI. A user scheduling and power optimization scheme with imperfect CSI is also introduced. Finally, we conclude this article. II. R ESOURCE O PTIMIZATION FOR NOMA H ETEROGENEOUS N ETWORKS In NOMA heterogeneous networks, a macrocell with one macro base station (BS) is overlaid by several small cells where each small cell implements NOMA technique. In this system, macrocell users (MUEs) and small cell users (SUEs) can be served on the same sub frequency band at the same time to achieve high spectral efficiency. In other words, the overlay frequency band sharing model implies that macrocell users can access the sub frequency band freely and efficiently under the minimum data rate requirement determined by the quality of service (QoS). High data rate can be achieved by allocating more power to the UEs; however, this will incur high power consumption. Hence, finding the tradeoff between the data rate improvement and power consumption has become an important and inevitable trend in the next generation of wireless communication systems. For energy efficient wireless communications, we aim to design a resource scheduling scheme to balance the system sum rate improvement and the power consumption. A. NOMA Overview We now present an overview of the resource allocation for NOMA systems. Different from the conventional OFDMA technique, multiple users in NOMA system can share the same frequency band instead of using orthogonal spectrum. By applying SIC technique at the receivers, a user in January 16, 2018 DRAFT 4 NOMA system can successively extract the intended signal from the received aggregated signals. In [12], SIC was exploited to decode the signals from the received signals in the decreasing order of power. Therefore, the user who has higher channel gain can cancel the interference signal from the user who has lower channel gain. NOMA can be combined with MIMO to further improve capacity [13]. Particularly, the pioneering work of beamspace MIMO-NOMA was firstly proposed to integrate NOMA for millimeter wave massive MIMO systems in [3], where a dynamic power allocation scheme with low complexity was proposed by solving the challenging joint power optimization problem. The statistical channel information was applied at the transmitter to achieve the maximum of system energy efficiency. The energy-efficient resource allocation for a downlink NOMA single cell network has been investigated in [14]. The authors in [14] applied matching theory to assign the users to the different subchannels, and utilized difference of convex functions (DC) programming to allocate different levels of power to the multiplexed users and the subchannels. To reduce the complexity of the decoding at receivers, the number of users allocated on the same sub-band was limited to two. The NOMA system equipped with the proposed resource allocation scheme can achieve higher sum rate and higher energy efficiency than the traditional OFDMA system. In OFDMA heterogeneous networks, users in the same small cell are not allowed to share the same frequency band in order to avoid the inter-cell interference [15]. In the NOMA heterogeneous networks, NOMA can be implemented in each small cell, which means that the users in the same small cell are allowed to share the same sub frequency band. Different from NOMA single cell system, users in the same small cell can share the same subband with the users in macrocell. The interference signal from the users in the small cell can be detected with the superposition coding technique and removed by the strong users in the macrocell via SIC at the receivers. B. NOMA Heterogeneous Network Model In this system, we assume each small cell occupies one sub frequency band. It means that all the users in the same small cell can be multiplexed on the same sub frequency band. The MUEs can be co-multiplexed on the same sub frequency band with SUEs. Each BS is responsible for frequency bands assignment (user scheduling), access procedures and power allocation. In the following, we use sub-band to replace sub frequency band for the sake of simplicity. In NOMA heterogeneous networks, each UE can receive different signals from the macro BS and a January 16, 2018 DRAFT 5 OFDMA MUE Power UE1 MUE UE5 UE3 UE2 UE4 MUE UE6 UE7 NOMA: Superposition & power allocation Frequency Femtocell Macro BS MUE MUE MUE Small RRH MUE UE Picocell UE MUE Wireless link Optical fiber Fig. 1. NOMA based Heterogeneous Networks. small BS simultaneously. Furthermore, each BS transmits signals to UEs by using superposition coding. As shown in Fig. 1, we consider a downlink NOMA heterogeneous network where a primary macrocell hosts a macro base station (MBS) with K overlaid small cells. Let M denote the total number of active MUEs in the macrocell. Each small cell hosts one small BS (SBS) and F SUEs that are randomly distributed within the small cell. The MBS transmits signals to M MUEs through these K sub-bands. The total bandwidth of the system is denoted as B, which is divided into K sub-bands and each sub-band occupies bandwidth of B/K. The transmit power for the entire system is Ps . Because the transmit power for MBS should be higher than SBS, we assume that both the MBS and all the SBSs have transmit power Ps /2 and each SBS has transmit power Ps /(2K). A block fading channel is considered in the system model, where the channel fading of each subcarrier is assumed to be the same within a sub-band, but it varies independently across different sub-bands. In this system, the MUEs can share the same frequency band with the small cells. The cross-tier interference caused by the primary macrocell will be effectively mitigated by applying the NOMA technique. Note that interference between small cells is neglected because different small cells will occupy different sub-bands and the sub-bands are independent with each other. The small cell is allocated lower power than the macrocell and the signal within the small cell can suffer severe wall penetration loss [15]. Therefore, the co-tier January 16, 2018 DRAFT 6 inter-small cell interference is negligible when compared with cross-tier interference [15]. We assume that MBS and SBS are connected by the wired links, thus the backhaul will not be considered in this article. The resource optimization problem is formulated as an energy efficiency maximization problem for the downlink NOMA heterogeneous networks. Our goal is to maximize the total system sum rate with a unit power through resource scheduling. In other words, in order to guarantee amount of system data rate, we aim to reduce the power consumption as much as possible. In our study, energy efficiency is defined as the ratio of the system sum rate and total power consumption. The total power consumption includes both circuitry-consumed power of the mobile devices and transmission power. Therefore, we use bits per Joule to measure the system energy efficiency performance. The energy-efficient resource optimization problem can be formulated as the maximization of the energy efficiency. In this problem, user scheduling and power allocation are coupled each other. In order to solve this problem efficiently, the resource allocation for energy efficiency maximization problem can be divided into user scheduling and power allocation sub-problems. In the following, we will discuss the resource optimization for NOMA heterogeneous networks based on two cases: perfect CSI and imperfect CSI. III. E NERGY E FFICIENT R ESOURCE O PTIMIZATION N ETWORKS WITH FOR NOMA H ETEROGENEOUS P ERFECT CSI We first consider the BSs have knowledge of channel state information. For user scheduling, matching theory can be utilized to match different UEs with different sub-bands. In the proposed energy efficient subchannel assignment framework [14] for a downlink NOMA single cell network, the utility function of each user is defined as the summation of each subchannel energy efficiency which can be described as the ratio of the subchannel data rate and power consumption. The power consumption for each subchannel includes circuit power and transmission power on this subchannel. In the NOMA heterogeneous networks, we define our user scheduling optimization sub-problem as the summation of small cells energy efficiency. For user scheduling scheme design, we first assume equal power allocation on each sub-band. This user scheduling optimization is a non-convex mixed integer programming problem. The global optimal user scheduling scheme can be obtained by an exhaustive search. However, the complexity of the exhaustive search is extremely high and this approach is infeasible in practice. Assume we have M MUEs and N small cells. The scheduler needs to search January 16, 2018 (M )! 2N combinations. Therefore, a DRAFT 7 suboptimal user scheduling scheme can be designed for this system by using a matching theory. In the sub-optimal scheme, the complexity of the worst case is O(N 2 M). Taking natural logarithm of the complexity, the logarithm complexity is O(ln M). Since O(ln M) < O(M ln M). The complexity of the sub-optimal scheme is much less than the exhaustive searching. In the proposed user scheduling scheme, we consider all the UEs as a user set, and consider K sub-bands as a sub-band set. The user scheduling process can be described as the two-sided dynamic matching between the user set and the sub-band set. For each sub-band, we set a maximum number of users that can be multiplexed on one sub-band in order to reduce the decoding complexity at the receivers. Therefore, the energy efficiency of the overall system can be formulated as the maximization of energy efficiency under the constraints of maximal transmission power, the minimum user data rate as well as the maximum number of users can be allocated on one subband. Fig. 2 describes the resource optimization procedure including user scheduling and power allocation. A. User Scheduling In user scheduling, we consider the SUEs scheduling and the MUEs scheduling separately. Since NOMA is implemented in each small cell, all the SUEs in one small cell can only multiplex on one sub-band. Then SUEs scheduling can also be called small cells scheduling. In the small cells scheduling, since the scheduler has the perfect CSI, each sub-band has preferred sequence of small cells to assign. This preferred sequence is generated according to the channel gains between SBS and SUEs within each small cell. Assume, for the time being, the equal power allocation among SUEs in the small cell, the energy efficiency of the small cell on each subband can be calculated by the scheduler. The scheduler chooses the sub-band with the highest channel gain and schedule the corresponding small cell on this sub-band. After all the small cells have occupied sub-bands, the scheduler schedules the MUEs on these occupied sub-bands, and the MUEs scheduling depends on the energy efficiency that the MUE can provide for the sub-bands. Therefore, the SUEs and MUEs co-multiplex on these sub-bands. In the MUEs scheduling scheme, each sub-band has a preferred allocation list of MUEs in a decreasing order of the channel gains between MBS and MUEs. For each sub-band, the scheduler finds the highest channel gain and schedule its corresponding MUE onto this sub-band. According to the condition of the maximum number of sub-band users, the MUE allocates on the sub-band directly when the number of the multiplexed users on this sub-band is less than the maximum number. However, January 16, 2018 DRAFT 8 Yes No No Yes Fig. 2. Energy efficient resource optimization procedure. when the number of the multiplexed users on this sub-band equals the maximum, the scheduler compares the energy efficiency of users and assign the sub-band to the users who can provide the highest energy efficiency. In the energy efficiency calculation, we assume the power of MUEs equals the power of small cell on this sub-band and each SUE has the equal power. The MUEs matching process terminates when all the UEs have been multiplexed on the sub-bands. The optimal sub-band matching can only be obtained by searching all matching combinations of users and sub-bands. This procedure comes with extremely high complexity and is not practical. The above proposed sub-optimal user scheduling has lower complexity than the optimal solution. January 16, 2018 DRAFT 9 B. Power Allocation In user scheduling, we have assumed the equal power allocation across sub-bands and equal power for small cells and MUEs on the same sub-band. In order to further improve the system energy efficiency, sophisticated power allocation schemes can be proposed to replace the equal power allocation scheme. In the NOMA heterogeneous networks, the energy efficiency optimization problem is non-convex. To solve this problem, DC programming approach and time-sharing method can be used to transform the non-convex combinatorial optimization problem into a convex optimization problem. In this article, we exploit fractional transmit power allocation (FTPA) to further allocate powers among users and across sub-bands [14]. Due to its low computational complexity, FTPA has been widely adopted in the OFDMA and NOMA systems. 8 Total Energy Efficiency of System (bits/Joule) 3.5 x 10 EE_OFDM_HetNet_EQ EE_NOMA_HetNet_EQ EE_NOMA_HetNet_FTPA 3 2.5 2 1.5 1 0.5 0 10 20 30 40 Number of SBS Per MBS 50 Fig. 3. Energy efficiency vs. number of small cells. Figure 3 shows the performance of the system energy efficiency versus the number of the small cells. The bandwidth is limited to 10 MHz, and we set the peak power of the entire system to be 20 W and circuit power to be 0.1 W on each sub-band. Figure 3 indicates that the total energy efficiency increases when the number of the small cells increases. From Fig. 3, we can observe that NOMA heterogeneous network (NOMA HetNet) outperforms the OFDM heterogeneous network (OFDM HetNet) because OFDM HetNet cannot fully utilize the spectrum resources. January 16, 2018 DRAFT 10 1 0.95 0.9 CDF 0.85 0.8 0.75 0.7 0.65 CDF_NOMA_HetNet_EQ CDF_OFDM_HetNet_EQ 1 2 3 4 User Throughput 5 6 6 x 10 Fig. 4. CDF of data rate for NOMA HetNet and OFDMA HetNet. Fig. 4 shows the cumulative distribution function (CDF) of user average data rate comparison between NOMA HetNet and OFDM HetNet with equal power allocation scheme. In Fig. 4, the CDF of user average data rate in NOMA HetNet is always below that in OFDM HetNet. This means that, given a target data rate, the number of users whose average data rate is larger than this target data rate in NOMA HetNet is less than that in NOMA HetNet system. This is because NOMA technique has higher spectrum efficiency than the OFDMA scheme. IV. E NERGY E FFICIENT R ESOURCE O PTIMIZATION N ETWORK FOR WITH I MPERFECT NOMA H ETEROGENEOUS CSI In this subsection, we study the energy efficient resource allocation for the downlink NOMA heterogeneous network with imperfect CSI. In practice, the perfect CSI at the transmitter is difficult to achieve due to channel estimation errors, feedback and quantization errors. To maximize the energy efficiency, we can formulate the energy efficient resource allocation as a probabilistic mixed non-convex optimization problem, under the constraints of outage probability limitation, the maximum transmitted power and the number of multiplexed users on one sub-band. January 16, 2018 DRAFT 11 The resource allocation scheme is optimized based on the imperfect CSI. To solve this problem, we decouple the problem into user scheduling and power allocation sub-problems separately to maximize the system energy efficiency. We assume that the BSs have the estimated value of the CSI. In this situation, the user data rate may not meet the minimum data requirement determined by QoS. Therefore, an outage probability requirement is considered for the resource scheduling to maximize the system energy efficiency. The energy efficient optimization problem is formulated as a probabilistic mixed non-convex optimization problem. In order to efficiently solve the optimization problem, we can first transform the probabilistic mixed non-convex optimization problem to a non-probabilistic optimization problem. The outage probability constraint can be transformed to minimum power constraints for each UEs sharing the same sub-band. In this transformed problem, we can treat user scheduling and power allocation separately. The user scheduling starts with assigning equal power allocation on sub-bands. The optimal solution to the user scheduling sub-problem is challenging to obtain in practice as it requires to search all the possible combinations. A sub-optimal user scheduling algorithm can be obtained by using the estimated CSI. In order to cancel the interference from the other small cells, we assign each small cell a sub-band. MUEs multiplex on these sub-bands, and hence the small cell users not interfere with each other. The MUE with high channel gain is chosen to multiplex on its corresponding sub-band. For the each sub-band, we set the maximum number of multiplexed users to reduce the complexity of decoding at the receivers. The user scheduling terminates if there is no MUE left to be allocated. During the user scheduling, the power allocation for the multiplexed users on one sub-band can be determined by FTPA. The complexity of the proposed sub-optimal algorithm is less than the optimal solution that can only be obtained by the exhaustive search. Given the user scheduling scheme, the underlying optimization problem can be shown to be convex function respect to the power variable under the constraint of the maximum power of the system. Therefore, a unique optimal solution can be found by a gradient assisted binary search algorithm. Therefore, the new power allocation scheme can replace the equal power allocation to further improve the system energy efficiency. Figure 5 shows the energy efficiency versus the number of the small cells with the channel gain estimation error variance 0.05. As shown, the energy efficiency increases when the number of the small cells grows. From Fig. 5, the NOMA HetNet outperforms OFDM HetNet in terms of energy efficiency, and the energy efficiency of NOMA HetNet with FTPA is higher than that of scheme with equal power allocation. January 16, 2018 DRAFT 12 8 Total Energy Efficiency of System (bits/Joule) 7 x 10 EE_OFDM_HetNet_EQ_ImperfectCSI EE_NOMA_HetNet_EQ_ImperfectCSI EE_NOMA_HetNet_FTPA_ImperfectCSI 6 5 4 3 2 1 0 10 20 30 40 Number of SBS Per MBS 50 Fig. 5. Energy efficiency of the system vs. the number of the small cell. Figure 6 shows the energy efficiency of the NOMA HetNet performance with different estimation error variances. In both OFDM HetNet and NOMA HetNet schemes, the system energy efficiency deteriorates when the error variances increases. The NOMA HetNet always outperforms OFDM HetNet. For example, when the number of small cells is 20, the energy efficiency of NOMA HetNet with FTPA power allocation scheme is 27% more than that of the OFDM HetNet with the equal power (EQ) allocation scheme under the imperfect channel CSI. V. O PEN I SSUES , AND C HALLENGES Resource allocation is one of the methods to improve the energy efficiency of 5G NOMA networks. Small cell in HetNet can also be energy efficient because low power is typically required due to the short distance between transmitter and receiver. However, there are still many challenges and open issues in energy-efficient 5G NOMA networks. 1) NOMA with MIMO: Not only user scheduling and power allocation, but also beamforming can be considered in the energy efficient resource allocation. Furthermore, different configuration of antennas for macrocell and small cell in HetNet makes the problem more complex. Finding effective ways to combine NOMA and massive MIMO is a challenging but important topic in future research works. 2) January 16, 2018 DRAFT 13 8 Total Energy Efficiency of System (bits/Joule) 4.4 x 10 4.2 4 3.8 3.6 3.4 3.2 EE_OFDM_HetNet_EQ_Var(error)=0.1 EE_OFDM_HetNet_EQ_Var(error)=0.01 EE_OFDM_HetNet_EQ_Var(error)=0 EE_NOMA_HetNet_FTPA_Var(error)=0.1 EE_NOMA_HetNet_FTPA_Var(error)=0.01 EE_NOMA_HetNet_FTPA_Var(error)=0 3 2.8 2.6 10 20 30 40 50 Number of SBS Per MBS 60 70 80 Fig. 6. Energy efficiency of the system vs. the number of the small cell. NOMA with energy harvesting: To save more energy, 5G NOMA HetNet is expected to harvest energy from solar, wind, thermoelectric, and so on. One open problem is how to manage those renewable energy source because they are intermittent over time and space. 3) NOMA with game theory: User pairing is key research direction in energy-efficient 5G NOMA networks. Matching game theory can be an effective tools to distributed model and optimize the user pairing of energy-efficient 5G NOMA networks. 4) NOMA with open/closed access small cells: There are three access modes in small cell networks, open access, closed access, and hybrid access. Different access mode of NOMA small cells requires different energy saving methods. VI. C ONCLUSION We introduced the concept of NOMA heterogeneous network and examined the problem of energy efficient user scheduling and power allocation in 5G NOMA heterogeneous network by considering both perfect CSI and imperfect CSI. We solved the resource optimization problem with the help of convex optimization. Based on the obtained results, we proposed a two-step user scheduling and power optimization scheme. The effectiveness of the proposed schemes was compared to the existing scheme and verified by simulations in terms of energy efficiency. It is January 16, 2018 DRAFT 14 envisioned that a joint user scheduling and power allocation approach can further enhance the energy efficiency of the overall system. R EFERENCES [1] L. Dai, B. Wang, Y. Yuan, S. Han, C.-L. I, and Z. Wang, “Non-orthogonal multiple access for 5G: Solutions, challenges, opportunities, and future research trends,” IEEE Commun. Mag., vol. 53, no. 9, pp. 74–81, Sept. 2015. [2] Z. Ding, Y. Liu, J. Choi, Q. Sun, M. Elkashlan, and H. V. Poor, “Application of non-orthogonal multiple access in LTE and 5G networks,” IEEE Commun. Mag., vol. 55, no. 2, pp. 185–191, Feb. 2017. [3] B. Wang, L. Dai, Z. Wang, N. Ge, and S. Zhou, “Spectrum and energy efficient beamspace MIMO-NOMA for millimeterwave communications using lens antenna array,” IEEE J. Sel. Areas Commun., vol. 35, no. 10, pp. 2370–2382, Oct. 2017. [4] S. Chen, B. Ren, Q. Gao, S. Kang, S. Sun, and K. Niu, “Pattern division multiple access-A novel nonorthogonal multiple access for fifth-generation radio networks,” IEEE Trans. Veh. Technol., vol. 66, no. 4, pp. 3185–3196, Apr. 2017. [5] Z. Yang, Z. Ding, P. Fan, and N. Al-Dhahir, “A general power allocation scheme to guarantee quality of service in downlink and uplink NOMA systems,” IEEE Trans. Wireless Commun., vol. 15, no. 11, pp. 7244–7257, Nov. 2016. [6] H. Zhang, H. Liu, J. Cheng, and V. Leung “Downlink energy efficiency of power allocation and wireless backhaul bandwidth allocation in heterogeneous small cell networks” IEEE Trans. Commun., 2017. [7] H. Zhang, C. Jiang, N. C. Beaulieu, X. Chu, X. Wang, and T. Quek, “Resource allocation for cognitive small cell networks: A cooperative bargaining game theoretic approach,” IEEE Trans. Wireless Commun., vol. 14, no. 6, pp. 3481–3493, June 2015. [8] A. Fehske, G. Fettweis, J. Malmodin, and G. Biczok, “The global footprint of mobile communications: The ecological and economic perspective,” IEEE Commun. Mag., vol. 49, no. 8, pp. 55–62, Aug. 2011. [9] Y. Chen, S. Zhang, S. Xu, and G. Y. Li, “Fundamental tradeoffs on green wireless networks,” IEEE Commun. Mag., vol. 49, no. 6, pp. 30–37, June 2011. [10] G. Auer, V. Giannini, C. Desset, I. Godor, P. Skillermark, M. Olsson, M.A. Imran, D. Sabella, M.J. Gonzalez, O. Blume, and A. Fehske, “How much energy is needed to run a wireless network?” IEEE Wireless Commun., vol. 18, no. 5, pp. 40–49, Oct. 2011. [11] W. Hao, M. Zeng, Z. Chu and S. Yang, “Energy-efficient power allocation in millimeter wave massive MIMO with non-orthogonal multiple access,” IEEE Wireless Commun. Lett., vol. 6, no. 6, pp. 782–785, Dec. 2017. [12] Y. Sun, D. W. K. Ng, Z. Ding, and R. Schober, “Optimal joint power and subcarrier allocation for full-duplex multicarrier non-orthogonal multiple access systems,” IEEE Trans. Commun., vol. 65, no. 3, pp. 1077-1091, Mar. 2017. [13] Z. Ding, L. Dai, and H. V. Poor, “MIMO-NOMA design for small packet transmission in the internet of things,” IEEE Access, vol. 4, pp. 1393-1405, 2016. [14] F. Fang, H. Zhang, J. Cheng, and V. C. M. Leung, “Energy-efficient resource allocation for downlink non-orthogonal multiple access (NOMA) network,” IEEE Trans. Commun., vol. 64, no. 9, pp. 3722–3732, Sept. 2016. [15] H. Zhang, S. Huang, C. Jiang, K. Long, V. C. M. Leung, and H. Vincent Poor,, “Energy efficient user association and power allocation in millimeter wave based ultra dense networks with energy harvesting base stations,” IEEE J. Sel. Areas Commun., vol. 35, no. 9, pp. 1936–1947, June 2017. January 16, 2018 DRAFT Yes No
7cs.IT
Learning to recognize Abnormalities in Chest X-Rays with Location-Aware Dense Networks Sebastian Gündel1,2 , Sasa Grbic1 , Bogdan Georgescu1 , S. Kevin Zhou1 , Ludwig Ritschl3 , Andreas Maier2 and Dorin Comaniciu1 arXiv:1803.04565v1 [cs.CV] 12 Mar 2018 2 1 Siemens Imaging Technologies, Siemens Healthineers, Princeton NJ, USA Pattern Recognition Lab, Friedrich-Alexander-Universität, Erlangen, Germany 3 Siemens Healthcare, Forchheim, Germany Abstract. Chest X-ray is the most common medical imaging exam used to assess multiple pathologies. Automated algorithms and tools have the potential to support the reading workflow, improve efficiency, and reduce reading errors. With the availability of large scale data sets, several methods have been proposed to classify pathologies on chest X-ray images. However, most methods report performance based on random image based splitting, ignoring the high probability of the same patient appearing in both training and test set. In addition, most methods fail to explicitly incorporate the spatial information of abnormalities or utilize the high resolution images. We propose a novel approach based on location aware Dense Networks (DNetLoc), whereby we incorporate both high-resolution image data and spatial information for abnormality classification. We evaluate our method on the largest data set reported in the community, containing a total of 86,876 patients and 297,541 chest X-ray images. We achieve (i) the best average AUC score for published training and test splits on the single benchmarking data set (ChestX-Ray14 [1]), and (ii) improved AUC scores when the pathology location information is explicitly used. To foster future research we demonstrate the limitations of the current benchmarking setup [1] and provide new reference patient-wise splits for the used data sets. This could support consistent and meaningful benchmarking of future methods on the largest publicly available data sets. 1 Introduction Chest X-ray is the most common medical imaging exam with over 35 million taken every year in the US alone [2]. They allow for inexpensive screening of several pathologies including masses, pulmonary nodules, effusions, cardiac abnormalities and pneumothorax. Due to increasing workload pressures, many radiologists today have to read more than 100 X-ray studies daily. Therefore, automated tools trained to predict the risk of specific abnormalities given a particular X-ray image have the potential to support the reading workflow of the radiologist. Such a system could be used to enhance the confidence of the radiologist or prioritize the reading list where critical cases would be read first. 2 Gündel S., Grbic S., Georgescu B., Zhou K., et al Due to the recent availability of a large scale data set [1], several works have been proposed to automatically detect abnormalities in chest X-rays. The only peer-reviewed published work is by Wang et al. [1] which evaluated the performance using four standard Convolutional Neural Networks (CNN) architectures (AlexNet, VGGNet, GoogLeNet and ResNet [3]). The following not peer-reviewed papers can be found on arXiv. In [4], a slightly modified DenseNet architecture was used. Yao et al. [5] utilized a variant of DenseNet and Longshort Term Memory Networks (LSTM) to exploit the dependencies between abnormalities. In [6], Guan et al. proposed an attention guided CNN whereby disease specific regions are first estimated before focusing the classification task on a reduced field of view. However most of the current work on arXiv shows results by splitting the data randomly for training, validation and testing [6,5] which is problematic as the average image count per patient for the ChestXRay14 [1] data set is 3.6. Thus the same patient is likely to appear in both training and test set. Additionally there is a significant variability in the classification performance between splits due to the class imbalance, thus making performance comparisons problematic. The solely prior work containing publicly released patient-wise splits is the work by Wang et al[1]. In this paper, we propose a location aware Dense Network (DNetLoc) to detect pathologies in chest X-ray images. We incorporate the spatial information of chest X-ray pathologies and exploit high resolution X-ray data effectively by utilizing high-resolution images during training and testing. Moreover, we benchmark our method on the largest data set reported in the community with 86,876 patients and about 297,541 images, utilizing both the ChestX-Ray14 [1] and PLCO [7] data sets. In addition we propose a new benchmarking set-up on this data set, including published patient-wise training and test splits, supporting the ability to effectively compare future algorithm performance on the largest public chest X-ray data set. We achieve the best performance reported on the existing ChestX-Ray14 benchmarking data set where both patient-wise train and test splits are published. 2 Datasets The ChestX-Ray14 data set [1] contains 30,805 patients and 112,120 chest X-ray images. The size of each image is 1024 × 1024 with 8 bits gray-scale values. The corresponding report includes 14 pathology classes. In the PLCO data set [7], there are 185,421 images from 56,071 patients. The original size of each image is 2500×2100 with 16 bit gray-scale values. We choose 12 most prevalent pathology labels, among which 5 pathology labels contain also the spatial information. The details of such spatial information are described in Section 3.3. Across both data sets, there are 6 labels which share the same name. However, in our experiment, we avoid combining the images of similar labels as we cannot guaratee the same label definition. Additionally we assume there is no patient overlap between these two datasets. 3 Fig. 1. Representation of the image numbers of the 2 datasets. The chart excludes the number of images where none of these pathologies appear. The pathology labels are highly imbalanced. This is clearly illustrated in Fig. 1, which displays the total number of images across all pathologies in the 2 data sets. This poses a challenge to any learning algorithm. 3 3.1 Method Multi-label Setup We use a variant of DenseNet with 121 layers [8]. Each output is normalized with a sigmoid function to [0,1]. The network is initialized with the pre-trained ImageNet model [9]. At first we focus on the ChestX-Ray14 dataset. The labels consist of a C dimensional vector [l1 , l2 . . . lC ] where C=14 with binary values, representing either the absence (0) or the presence (1) of a pathology. As a multi-label problem, we treat all labels during the classification independently by defining C binary cross entropy loss functions. As the data set is highly imbalanced, we incorporate additional weights within the loss functions, based on the label frequency within each batch: L(X, ln ) = −(wP ∗ ln log(p) + wN ∗ (1 − ln )log(1 − p)), (1) n n where wP = PnP+N and wN = PnN+N , with Pn and Nn indicating the number n n of presence and absence samples, respectively. 4 Gündel S., Grbic S., Georgescu B., Zhou K., et al During training, we use a batch size of 128. Larger batch sizes increase the probability to contain samples of each class and increase the weight scale of wP and wN . The original images are normalized based on the ImageNet pre-trained model [9] with 3 input channels. We increase the global average pooling layer before the final layer to 8 × 8. The Adam optimizer [10] (β1 = 0.9, β2 = 0.999,  = 10−8 ) is used with an adaptive learning rate: The learning rate is initialized with 10−3 and reduced 10x when the validation loss plateaus. 3.2 Leveraging High-Resolution Images and Spatial Knowledge Two strided convolutional layers with 3 filters of 3 × 3 and a stride of 2 are added as the first layers to effectively exploit the high-resolution chest X-ray images. The filter weights of both layers are initialized equal to a Gaussian down-sampling operation. We use an image size of 1024 × 1024 as input to our network. Fig. 2. Spatial Ground Truth Labels: Left: Chest X-ray image, Middle: Lung side (information whether disease is in the left lung, right lung or neither), Right: Splitting of the lung in fifth (more detailed information where disease is located) Contrary to the ChestX-Ray14 [1] data set the PLCO data set [7] includes consistent spatial location labels for many pathologies. We include 12 pathology labels of the PLCO data set in our experiments (see Fig. 1, right side). The location information is available for 5 pathologies. The location information contains the information about the side (right lung, left lung), finer localization in each lung (divided in equal fifth), including an additional label for diffuse disease. The exact position information of multiple and diffused diseases is not provided. Therefore, we create 9 additional classes: 6 are responsible for the lobe position (equally split in five parts and a “wildcard” label for multiple diseases: E.g. if the image contains nodules in multiple lung parts, only this label is present), 2 for the lung side (left and right), and 1 for diffused diseases over multiple lung parts. Fig. 2 illustrates the label definition based on spatial information. 5 Fig. 3. Architecture of the proposed network (DNetLoc): The current image is provided in 3 channels, followed by 2 strided convolutional layer and the DenseNet-121. Then, the classes are triggered depending on the data set the current sample originates from. The spatial location labels are trained as binary and independent classes with cross entropy functions. The number of present class labels depend on the number of diseases that contain location information. 3.3 Dataset Pooling We combine the ChestX-Ray14 and the PLCO datasets. The training and validation set includes images from both data sets. Several classes share similar class labels. However, we do not know if both data sets are created based on the same label definition. Due to this fact, we treat the labels independently and create different classes. We normalize brightness and contrast of the PLCO dataset images by applying histogram normalization. All images are normalized based on the mean and the standard deviation to match the ImageNet definition. Each batch contains images from both data sets. Combining both datasets (C=35 ), we compute the loss function L(X) = − C 1 X w(wP ∗ ln log(p) + wN ∗ (1 − ln )log(1 − p)), C n=1 (2) where w is either 0 or 1, depending which dataset the image is coming from and whether the spatial information exists. 3.4 Global Architecture Overall, we create a local aware Dense Network that adaptively deals with label availability during training. The final network consists of 35 labels, 14 from 6 Gündel S., Grbic S., Georgescu B., Zhou K., et al the ChestX-Ray14 dataset, and 21 from PLCO dataset. Fig. 3 illustrates the architecture of the network (DNetLoc). 4 Experimental Results The ChestX-Ray14 dataset contains an average of 3.6 images per patient and PLCO 3.3 images per patient. Thus, there is a high probability the same patient appears in all 3 subsets if a random image-split is used. This paper uses only patient-wise splits. All splits used in this paper are published on GitHub [11]. For all experiments we separate the data as follows: 70% for training, 10% for validation, and 20% for testing. Below we present our experimental results. First, we show the state-of-theart results on the ChestX-Ray14 dataset, following the official patient-wise split. Then, we present the results on the PLCO data set, illustrating the value of using location information and data pooling. Method Official Split Atelectasis Cardiomegaly Effusion Infiltration Mass Nodule Pneumonia Pneumothorax Consolidation Edema Emphysema Fibrosis Pleural Thick. Hernia Mean Wang et al. [1] Our DNet Our DNet Yes Yes No 0.7003 0.8100 0.7585 0.6614 0.6933 0.6687 0.6580 0.7993 0.7032 0.8052 0.8330 0.7859 0.6835 0.8717 0.7451 0.767 0.883 0.828 0.709 0.821 0.758 0.731 0.846 0.745 0.835 0.895 0.818 0.761 0.896 0.807 0.826 0.911 0.885 0.716 0.854 0.774 0.765 0.872 0.806 0.892 0.925 0.820 0.785 0.941 0.841 Table 1. We demonstrate improved AUC scores using our method on the official ChestX-Ray14 test set. Right column shows our method on a more representative random patient split where the mean AUC score increases to 0.841. Table 1 shows the best AUC scores obtained on the ChestX-Ray dataset using the official test set. Our network increases the mean AUC score by over 5% compared to the previous work. We observed several limitations with the official split where training and test data sets have different characteristics. This can be either the large label inconsistency or the fact that there are on average 3 times more images per patient in the test set compared with the training set. Thus we computed several random patient-splits each leading better performance 7 Method Nodule Mass Granuloma Infiltrate Scaring Fibrosis Bone/Soft Tissue Lesion Cardiac Abnormality COPD Effusion Atelectasis Hilar Abnormality Mean (Location) Mean Our DNet Our DNetLoc 0.817 0.845 0.888 0.875 0.841 0.873 0.853 0.927 0.881 0.933 0.831 0.812 0.836 0.865 0.831 0.878 0.888 0.880 0.850 0.875 0.845 0.926 0.882 0.926 0.867 0.841 0.859 0.874 Table 2. Test results on the PLCO data set: DNetLoc achieves the best AUC scores on the PLCO dataset. Both DNet and DNetLoc networks were trained on the combined ChestX-Ray14 and PLCO dataset. DNetLoc uses spatial information of 5 pathologies. The bold values in this table are pathologies which are supported by spatial knowledge. with average 0.831 AUC with 0.019 standard deviation. Detailed performance for the novel benchmarking patient-wise split is shown in Table 1 and in Fig. 4 left). Overall, significant label variance of the follow-up exams are noticeable across the ChestX-Ray14 data set. This might be due to the circumstance that many follow-ups are generated with a specific question, e.g did the Pneumothorax disappear. Thus repeated and consistant labeling of other abnormalities in follow-up studies varies. As the ChestX-Ray14 labels are generated from reports this would introduce incomplete labeling for many follow-ups. Finally we evaluate our method on the PLCO data. The results in Table 2 show that location information and leveraging high resolution images improve the classification accuracy for most pathologies. For a subset of pathologies where location information is provided (marked in bold), the performance increases by an average of 2.3%. Moreover, the training time was reduced by a factor of 2 when location information is used. For the PLCO data set we reach a final mean AUC score of 87.4%. Fig. 4 shows the performance of our method for both the ChestX-Ray14 and the PLCO test set. 5 Conclusion We presented a novel method based on location aware Dense Networks to classify pathologies in chest X-ray images, effectively exploiting high-resolution data and incorporating spatial information of pathologies to improve the classification accuracy. We showed that for pathologies where the location information is present the classification accuracy improved significantly. The algorithm is 8 Gündel S., Grbic S., Georgescu B., Zhou K., et al Fig. 4. The Area under Curve (AUC) scores for chest X-ray pathologies: Left: Results corresponding to Table 1 righ column on the ChestX-Ray14 dataset using DNet, Right: Results corresponding to Table 2 righ column on the PLCO dataset using DNetLoc. trained and validated on the largest chest X-ray data set containing 86,876 patients and 297,541 images. Our system has the potential to support the current high throughput reading workflow of the radiologist by enabling him to gain more confidence by asking an AI system for a second opinion or flag ”critical” patients for closer examination. In addition we have shown the limitations in the validation strategy of previous works and propose a novel setup using the largest public data set and provide patient-wise splits which will facilitate a principled benchmark for future methods in the space of abnormality detection on chest X-ray imaging. Disclaimer: This feature is based on research, and is not commercially available. Due to regulatory reasons, its future availability cannot be guaranteed. References 1. Wang, X., Peng, Y., Lu, L., Lu, Z., Bagheri, M., Summers, R.: Chestx-ray8: Hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases. In: Proc. CVPR. (2017) 3462–71 2. Kamel, S.I., Levin, D.C., Parker, L., Rao, V.M.: Utilization trends in noncardiac thoracic imaging, 2002-2014. JACR 14(3) (2017) 337–42 3. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proc. CVPR. (2016) 770–778 4. Rajpurkar, P., Irvin, J., Zhu, K., Yang, B., Mehta, H., Duan, T., Ding, D., Bagul, A., Langlotz, C., Shpanskaya, K., et al.: Chexnet: Radiologist-level pneumonia detection on chest x-rays with deep learning. arXiv:1711.05225 (2017) 5. Yao, L., Poblenz, E., Dagunts, D., Covington, B., Bernard, D., Lyman, K.: Learning to diagnose from scratch by exploiting dependencies among labels. arXiv:1710.10501 (2017) 6. Guan, Q., Huang, Y., Zhong, Z., Zheng, Z., Zheng, L., Yang, Y.: Diagnose like a Radiologist: Attention Guided Convolutional Neural Network for Thorax Disease Classification. ArXiv e-prints (January 2016) 9 7. Gohagan, J.K., Prorok, P.C., Hayes, R.B., Kramer, B.S.: The prostate, lung, colorectal and ovarian (plco) cancer screening trial of the national cancer institute: history, organization, and status. Controlled clinical trials 21(6) (2000) 251S–272S 8. Huang, G., Zhang, L., van der Maaten, L., Weinberger, K.Q.: Densely Connected Convolutional Networks. ArXiv e-prints (August 2016) 9. Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S., Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein, M., Berg, A.C., Fei-Fei, L.: ImageNet large scale visual recognition challenge. IJCV 115(3) (December 2015) 211–252 10. Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. ArXiv e-prints (December 2014) 11. ***: Patient-wise splits used in this work will be published on github before sep 2018
2cs.AI
CUSPIDAL CHARACTERS AND AUTOMORPHISMS arXiv:1702.08012v2 [math.RT] 12 Sep 2017 GUNTER MALLE Abstract. We investigate the action of outer automorphisms of finite groups of Lie type on their irreducible characters. We obtain a definite result for cuspidal characters. As an application we verify the inductive McKay condition for some further infinite families of simple groups at certain primes. 1. Introduction An important open problem in the ordinary representation theory of finite groups of Lie type is to determine the action of outer automorphisms on the set of their irreducible characters, and more generally to determine the irreducible character degrees of the corresponding almost (quasi-)simple groups. While the action of diagonal automorphisms and the corresponding extension problems are well understood by the work of Lusztig [13], based on the fact that such extensions can be studied in the framework of finite reductive groups, much less is known in the case of field and also of graph automorphisms. The most elusive situation seems to be the one where irreducible characters not stable under diagonal automorphisms are concerned. In [15] we obtained a certain reduction of this problem to the case of cuspidal characters. This is the situation we solve here by applying methods and results from block theory and Deligne–Lusztig theory (see Section 4): Theorem 1. Let G be a quasi-simple finite group of Lie type. For any cuspidal character ρ of G there is a semisimple character χ in the rational Lusztig series of ρ having the same stabiliser as ρ in the automorphism group of G. Observe that the action on semisimple characters is well-understood by the theory of Gelfand–Graev characters, see [19]. For linear and unitary groups this result was obtained by Cabanes and Späth [6] and we use it in our proof, for symplectic groups it follows from recent work of Cabanes–Späth [7] and of Taylor [20]; for the other types it is new. For the proof we first consider quasi-isolated series, see Sections 2 and 3. Here, we connect ρ to χ either via a sequence of Brauer trees, in which case we also obtain information on maximal extendibility (see Corollary 3.3), or of Deligne–Lusztig characters. As an application we verify the inductive McKay condition for some series of simple groups of Lie type and suitable primes ℓ (see Section 5): Theorem 2. Let q be a prime power and S a finite simple group 2E6 (q), E7 (q), Bn (q) or Cn (q). Let ℓ ≡ 3 (mod 4) be a prime with ℓ|(q 2 − 1). Then S satisfies the inductive McKay condition at ℓ. In particular, the inductive McKay condition holds for S at ℓ = 3. Date: September 13, 2017. 2010 Mathematics Subject Classification. Primary 20C15, 20C33; Secondary 20G40. Key words and phrases. McKay conjecture, automorphisms, action on cuspidal characters. The author acknowledges financial support by ERC Advanced Grant 291512 and by DFG TRR 195. 1 2 GUNTER MALLE This is a contribution to a programme to prove McKay’s 1972 conjecture on characters of ℓ′ -degree based on its reduction to properties of quasi-simple groups, an approach which has recently led to the completion of the proof in the case when ℓ = 2 (see [15]). Acknowledgement: I thank David Craven for his remark that the consideration of Brauer trees might be useful, and the Institut Mittag-Leffler, where this remark was made, for its hospitality. I also thank Frank Lübeck for help in compiling Table 2, Britta Späth and Jay Taylor for their comments on an earlier version, and the anonymous referee for helpful comments which led to a substantial clarification of several proofs. 2. Cuspidal characters in classical groups Throughout the paper we fix the following notation. We let G be a simple simply connected linear algebraic group over an algebraically closed field of characteristic p with a Frobenius map F : G → G inducing an Fq -structure, and we set G := GF the finite group of fixed points under F . It is well-known that G then is a finite quasi-simple group in all but finitely many cases (see [16, Thm. 24.17]), and furthermore all but finitely many quasi-simple finite groups of Lie type can be obtained as G/Z for some suitable central subgroup Z ≤ Z(G) (the exceptions being the Tits simple group and a few exceptional covering groups, see e.g. [16, Tab. 24.3]). For us, a “finite group of Lie type” is any nearly simple group whose non-abelian composition factor is neither sporadic nor alternating. e be a regular embedding; thus G e is a connected reductive group with Let G ֒→ G e → G e of connected centre and derived subgroup equal to G. For an extension F : G F ∗ e . We choose a group G e dual to G, e with the Frobenius map on G we let G̃ := G ∗ e corresponding Frobenius map again denoted by F , and an epimorphism π : G → G∗ e and we write G̃∗ = G e ∗F and G∗ = G∗F for the dual to the regular embedding G ֒→ G, e G∗ , . . . we will F -fixed points. Throughout, for closed F -stable subgroups H of G, G, F write H := H (in roman font) for their group of fixed points. Let us recall the description of automorphisms of a finite simple group of Lie type: any automorphism of S = G/Z(G) is a product of an inner, a diagonal, a graph and a field automorphism. Here, the diagonal automorphisms are those induced by the embedding G ֒→ G̃, the graph automorphisms come from symmetries of the Dynkin diagram of G commuting with F and field automorphisms are induced by Frobenius maps on G defining a structure over some subfield Fq′ of Fq some power of which is F (see e.g. [16, Thm. 24.24]). 2.1. Cuspidal unipotent characters on Brauer trees. One crucial tool in our determination of the action of automorphisms is the observation that cuspidal unipotent characters of classical groups lie in blocks of cyclic defect for suitable primes. Lusztig gave a parametrisation of the unipotent characters of groups G of classical type in terms of combinatorial objects called symbols. According to this classification a classical group has at most one cuspidal unipotent character, as recalled in Table 1, which is thus in particular fixed by all automorphisms of G. (The parameter dG occurring in the table will be used in the statement of Lemmas 2.1 and 2.2.) The symbols parametrising unipotent characters behave very much like partitions; in particular one can define hooks and cohooks, and the degrees of the associated unipotent CUSPIDAL CHARACTERS AND AUTOMORPHISMS G An−1 2 An−1 Dn 2 a even  0 ... 2a−1 2 Bn , Cn n 1 a(a + 1)/2 label () (a, a − 1, . . . , 1) a(a + 1)  0 ... 2a dG − 2(2a − 1) 4a − 3 2 − Dn a odd  0 ... 2a−1 − 2(2a − 1) 2(2a − 1) Table 1. Cuspidal unipotent characters in classical groups characters can be given in terms of a combinatorial expression, called the hook formula (see e.g. [18]). Recall that for every prime power q and any integer d > 2 with (q, d) 6= (2, 6) there exists a prime dividing q d − 1 but no q f − 1 for f < d called Zsigmondy (primitive) prime of degree d. The following is easily checked from the hook formula: Lemma 2.1. Let ρ be a cuspidal unipotent character of a quasi-simple group G of classical type. Then ρ is of defect zero for every Zsigmondy prime of odd degree, as well as for those of even degree d > dG . The blocks of cyclic defect and their Brauer trees for groups G of classical type have been determined by Fong and Srinivasan [10]: assume that ℓ 6= 2 is an odd prime and write d = dℓ (q) for the order of q modulo ℓ. First assume that d is odd. Then a unipotent character of G lies in an ℓ-block of cyclic defect if and only if the associated symbol has at most one d-hook, and two unipotent characters lie in the same ℓ-block if their symbols have the same d-core. If d = 2d′ is even, the same statements hold with d replaced by d′ , “hook” replaced by “cohook” and “core” replaced by “cocore”. Let us write Φd for the dth cyclotomic polynomial over Q. Lemma 2.2. Let ρ be a cuspidal unipotent character of a quasi-simple group G of classical type. Then there exist sequences of unipotent characters ρ = ρ1 , . . . , ρm = 1G of G and of Zsigmondy primes ℓi 6= p of either odd degree di > 2 or even degree di ≥ dG such that ρi , ρi+1 lie in the same ℓi -block of cyclic defect of G, for i = 1, . . . , m − 1, except when G = D4 (2). Proof. The claim is clear for type A0 as here the cuspidal character is the trivial character. For G of type 2An−1 , n ≥ 3, there exists a cuspidal unipotent character ρ if and only if n = a(a + 1)/2 for some a ≥ 2 (see Table 1). This is labelled by the triangular partition δa = (a, . . . , 1) of n, which has a unique hook of length 2a − 1. By the hook formula (see e.g. [18]) this implies that |G|/ρ(1) is divisible by Φd (q) exactly once, where d = 2(2a−1). So by [10] ρ lies in an ℓ1 -block of cyclic defect for any Zsigmondy prime divisor ℓ1 of q 2a−1 + 1. (Such a prime ℓ1 exists unless (q, a) = (2, 2), in which case n = 3, but 2A2 (2) is solvable.) Moreover, the partition (3a − 3, a − 3, . . . , 1) has the same 2a − 1-core as δa , so the unipotent character ρ2 labelled by it lies in the same ℓ1 -block as ρ1 = ρ. The latter partition has a unique 4a − 4-hook, and arguing as before, we conclude that ρ2 lies in the same ℓ2 -block of cyclic defect as the character ρ3 labelled by (5a − 10, a − 5, . . . , 1), for ℓ2 a Zsigmondy prime divisor of q 4a−4 + 1. Continuing inductively we arrive at ρ2a+1 = 1G with label the partition (n). Groups of type Bn and Cn , n ≥ 2, have a cuspidal unipotent character ρ if and only if  n = a(a + 1) for some a ≥ 1. This is labelled by the symbol 0 ...−2a , which has a single 4 GUNTER MALLE 2a-cohook. So ρ lies in a block of cyclic defect for any Zsigmondy prime divisor ℓ1 of q 2a + 1 (see again [10]). Furthermore this block also contains the unipotent character   ρ2 0 ... 2a−2 0 ... 2a−2 labelled by 0 4a−1 . This has a unique 4a − 2-hook, whose removal gives , and 0 1  0 ... 2a−3 6a−4 adding a suitable 4a − 2-hook we find , the symbol of a unipotent character 0 1 ρ3 lying on the same Brauer tree as ρ2 for primes ℓ3 dividing q 4a−2 − 1. The Zsigmondy exception a = 2 can be avoided by working with 5-hooks instead of  6-hooks in this step. Continuing this way, after m = a steps we arrive at the symbol −n labelling ρa+1 = 1G . For groups of type Dn or 2Dn , n ≥ 4, a cuspidal unipotent character exists only if n = a2  0 ... 2a−1 for some a ≥ 2. It is labelled by the symbol . This has a single 2a − 1-cohook − and thus lies in an ℓ1 -block of cyclic defect for ℓ1 any primitive prime divisor of q 2a−1 + 1. (Such a prime ℓ1 exists unless (q, a) = (2, 2), which leads  to the stated exception.) This 0 ... 2a−3 block also contains the character ρ2 labelled by 0 4a−3 . The latter symbol has a unique  6a−7 4a − 4-hook; removing this and adding a different one leads to the symbol 0 ... 2a−4 0 1 of a unipotent character ρ3 . Again, a straightforward induction completes the proof.  2.2. Constituents of Lusztig induction. Recall from [8, 11.1] that for any F -stable Levi subgroup L of a parabolic subgroup of G, Lusztig defines a linear map RLG : Z Irr(LF ) −→ Z Irr(GF ), called Lusztig induction. (In fact, this map might depend on the choice of parabolic subgroup containing L, but it does not in the case of unipotent characters, see e.g. [3, Thm. 1.33].) Also recall from [3] that an F -stable torus T ≤ G is called a d-torus (for some d ≥ 1) if T is split over Fqd but no non-trivial F -stable subtorus of T splits over any smaller field. The centralisers in G of d-tori are the d-split Levi subgroups. They are F -stable Levi subgroups of suitable parabolic subgroups of G. Lemma 2.3. Let G be quasi-simple of classical type Bn , Cn , Dn or 2Dn and ρ be a cuspidal unipotent character of G. Let L ≤ G be a 2-split Levi subgroup of G • of twisted type 2An−1 (q).Φ2 in types Bn and Cn ; or • of twisted type 2An−2 (q).Φ22 in types Dn and 2Dn . There exist sequences of unipotent characters ρ = ρ1 , . . . , ρm = 1G of G and ψ1 , . . . , ψm−1 of L such that ρi , ρi+1 both occur with multiplicity ±1 in RLG (ψi ) for i = 1, . . . , m − 1. Here, as in later results and tables, a notation like 2An−1 (q).Φ2 is meant to indicate not the precise group theoretic structure of the finite group, but rather the root system of the underlying algebraic group (not its isogeny type) together with the action of the Frobenius: in our example the underlying group has a root system of type An−1 on which F acts by the non-trivial graph automorphism, and its center is a 1-dimensional 2-torus. Proof. First consider types Bn and Cn . So by Table 1, n = a(a + 1) for some a ≥ 1, and ρ is parametrised by the symbol S = 0 ...−2a . Observe that all unipotent characters of groups of type A are uniform, so that RLG (ρ) for any unipotent character ρ of L can be G expressed in terms of Deligne–Lusztig characters RT (1T ) for various F -stable maximal tori T of G. The decomposition of Deligne–Lusztig characters has been determined explicitly by Lusztig, and from this our claim can be checked by direct computation. CUSPIDAL CHARACTERS AND AUTOMORPHISMS 5 To do this, we appeal to [3, Thm. 3.2], which shows that Lusztig induction of unipotent characters from 2-split Levi subgroups is, up to signs, the same as induction in the corresponding relative Weyl groups. Since the symbol S has exactly n 1-cohooks, its 1-cocore is trivial and so ρ lies in the principal 2-series. The relative Weyl group for the principal 2-Harish-Chandra series of G is W =W (Bn ), the one for L is its maximal parabolic subgroup WL = Sn . Determination of the 2-quotient of the symbol S shows that it corresponds to the character with label (δa ; δa ) of W , with δa = (a, . . . , 1) the triangular partition. Let ψ be the unipotent character of L parametrised by the partition 2δa = (2a, 2a − 2, . . . , 2). The constituents of IndW WL (2δa ) are exactly those bipartitions whose parts (including zeroes) can be added up so as to obtain the partition 2δa , with multiplicity one if this is possible in a unique way. Thus it contains (δa ; δa ) exactly once, but also (2a, 2a − 4, . . . ; 2a − 2, 2a − 6, . . .). This in turn is contained once in IndW WL ((4a − 2, 4a − 10, . . .)), and so on. Continuing in this way we reach the symbol (a(a + 1); −) which parametrises the trivial character of G. For G of type Dn , by Table 1 a cuspidal unipotent character exists if n = a2 for some 2a−1 even a ≥ 2, and it is labelled by the symbol 0 ... − . Again, this character lies in the principal 2-series of G, and by [3, Thm. 3.2] the decomposition of RLG can be computed in the relative Weyl groups WL = Sn−1 ≤ W = W (Dn ). Here, ρ corresponds to the character of W with label (δa ; δa−1 ). Let W1 = Sn ≤ W (Dn ) be a maximal parabolic subgroup of W (Dn ) containing WL . For ψ ∈ Irr(WL ) labelled by λ = (δa + δa−1 ) \ {1}, 1 IndW WL (λ) contains all characters whose label is obtained by adding one box to the Young W W1 diagram of λ. Then IndW WL (λ) = IndW1 IndWL (λ) can be computed as before. It ensues that the multiplicities of the characters labelled by (δa ; δa−1 ) and by (2a, 2a − 5, . . . ; 2a − 3, 2a − 7, . . .) in IndW WL (λ) are both 1. Again, an easy induction gives the claim. The same type of reasoning applies for 2Dn with n an odd square.  2.3. Brauer trees and automorphisms. The following result of Feit on Brauer trees will also provide some information on extendibility. Let ℓ be a prime. Lemma 2.4. Let B be an ℓ-block of a finite group H with cyclic defect. Let γ be an automorphism of H fixing some non-exceptional character in B. Then γ fixes every nonexceptional character in B. Proof. Assume that χ ∈ Irr(B) is non-exceptional and fixed by γ. Then by [9, Thm. 2.4] all nodes in the Brauer tree of B are fixed by γ, hence in particular all non-exceptional characters in B.  Corollary 2.5. Let N E H be finite groups with H/N solvable and of order prime to ℓ. Let χ, χ′ be non-exceptional characters on the same ℓ-Brauer tree for N. Then χ extends to H if and only if χ′ does. Proof. As H/N is solvable, there is a sequence of subgroups N = N1 E · · · E Nr = H with Ni /Ni−1 cyclic of prime order. Assume that χ extends to χ̃ ∈ Irr(H), and let χi = χ̃|Ni , 1 ≤ i ≤ r, a system of compatible extensions of χ to Ni . Assume that we have extended χ′ to a character χ′i of Ni on the same ℓ-Brauer tree as χi . Since χi extends to H, it is invariant in Ni+1 , hence by Lemma 2.4 the same is true 6 GUNTER MALLE for χ′i . So χ′i also extends to Ni+1 (as Ni+1 /Ni is cyclic), and clearly we may choose an extension χ′i+1 in the same ℓ-block as χi+1 . So the claim follows by induction.  Remark 2.6. We can now lay out two types of arguments we will use to relate the stabilisers in Aut(G) of two characters ρ, χ ∈ Irr(G): (a) Assume there is a sequence ρ = ρ1 , . . . , ρm = χ of irreducible characters of G, a sequence of primes ℓ1 , . . . , ℓm−1 and a sequence of ℓi -blocks B1 , . . . , Bm−1 of G with cyclic defect such that ρi , ρi+1 ∈ Irr(Bi ) are non-exceptional for all i. Then by Lemma 2.4 any automorphism fixing ρ = ρ1 also fixes ρm = χ and vice versa. (b) Similarly, assume there is a Levi subgroup L of G and sequences ρ = ρ1 , . . . , ρm = χ of irreducible characters of G, ψ1 , . . . , ψm−1 of L satisfying the conclusion of Lemma 2.3. Assume that γ is an automorphism of G stabilising L and fixing all ρi and all ψi , and that there are γ-invariant normal subgroups L′ ≤ L, G′ ≤ G such that all ρi , ψi have exactly two constituents upon restriction. Then if γ does not fix the constituents of ρ1 , it cannot fix those of ρm and vice versa. In our arguments we will have to `deal not only with unipotent characters. Recall that Lusztig gives a partition Irr(G) = s E(G, s) of the set of irreducible characters of G into rational Lusztig series E(G, s) indexed by semisimple elements s ∈ G∗ up to conjugacy (see [2, Thm. 11.8]). Moreover, for any such s the Lusztig series E(G, s) is in bijection with the unipotent characters of CG∗ (s), where, as customary, a character of CG∗ (s) is called F ◦ has unipotent constituents (see [13, Prop. 5.1]). unipotent if its restriction to CG ∗ (s) We will be particularly interested in semisimple characters. Recall our regular embedding e with dual epimorphism G e ∗ → G∗ and let s̃ ∈ G e ∗F be a preimage of s. The G ֒→ G semisimple character χ̃s in E(G̃, s̃) can be defined as an explicit linear combination of Deligne–Lusztig characters (see [2, (15.6)]); the semisimple characters in E(G, s) are then just the constituents of the restriction of χ̃s to G, see [2, (15.8)]. We will need the following properties of Jordan decomposition: Lemma 2.7. In the above situation we have: (a) Jordan decomposition sends semisimple characters to semisimple characters. (b) E(G, s) contains a cuspidal character if and only if CG∗ (s) has a cuspidal unipotent character and moreover Z ◦ (CG∗ (s)) and Z ◦ (G) have the same Fq -rank. In this case, Jordan decomposition induces a bijection between cuspidal characters. Proof. As explained above the semisimple character χ̃s ∈ E(G̃, s̃) is uniform. Jordan decomposition preserves uniform functions, so χ̃s is sent to the semisimple character in E(CG̃∗ (s̃), 1). As the Deligne–Lusztig characters of G are obtained by restriction from those of G̃, the claim in (a) follows from our definition of semisimple characters in E(G, s). Part (b) is pointed out for example in [11, Rem. 2.2(1)].  2.4. Cuspidal characters in quasi-isolated series. We now study the action of automorphisms on cuspidal characters in quasi-isolated series of classical groups. Let s ∈ G∗ be semisimple. Recall that s is quasi-isolated in G∗ if CG∗ (s) is not contained F ◦ is a product of classical groups, in any proper F -stable Levi subgroup of G∗ . If CG ∗ (s) then it has a unique cuspidal unipotent character (see Table 1), so the cuspidal characters in E(G, s) form a single orbit under diagonal automorphisms. In particular, E(G, s) can CUSPIDAL CHARACTERS AND AUTOMORPHISMS 7 contain cuspidal characters not fixed by some automorphism of G stabilising E(G, s) only if CG∗ (s) is not connected. Theorem 2.8. Let G be quasi-simple of classical type B, C, D or 2D, let s ∈ G∗ be quasiisolated and ρ ∈ E(G, s) cuspidal. Then there is a semisimple character χ ∈ E(G, s) with the same stabiliser in Aut(G) as ρ. Proof. Let γ ∈ Aut(G). If γ does not stabilise E(G, s), then it lies neither in the stabiliser of ρ nor of any semisimple character in E(G, s). So we may assume that E(G, s) is γ-stable. F ◦ then E(G, s) contains a unique cuspidal and a unique Moreover, if CG∗ (s)F = CG ∗ (s) ◦ semisimple character, and again we are done. Thus, as |CG∗ (s) : CG ∗ (s)| divides |Z(G)|, which is a 2-power and prime to p, we have in particular that q is odd. We discuss the remaining possibilities case-by-case. The classes of quasi-isolated elements in G∗ were classified by Bonnafé [1, Tab. 2]. The ◦ various rational types are worked out in Table 2. Here A(s) := CG∗ (s)/CG ∗ (s) denotes the group of components of the centraliser, o(s) is the order of s and the structure of the abelian group A(s) is indicated by giving the orders with multiplicities of its cyclic factors. F ◦ ◦ is a product of Our strategy of proof is as follows. In each case, [CG ∗ (s), CG∗ (s)] classical groups G1 · · · Gr . By Lemma 2.7(b), the Lusztig series E(G, s) contains a cuspidal character only if each of these factors Gi has a cuspidal unipotent character ρi . If all factors are non-isomorphic, then for the factor of largest rank, say G1 , take a Zsigmondy prime ℓ as in Lemma 2.2. (Note that the exception D4 (2) does not occur here as q is odd.) Then ρ1 lies in an ℓ-block of cyclic defect, while all the other ρi are of ℓ-defect 0. As Jordan decomposition preserves blocks with cyclic defect and their Brauer trees (see [10]), the Jordan correspondent ρ of ρ1 ⊗ · · · ⊗ ρr then also lies in a block of cyclic defect. So we conclude with Remark 2.6(a) using the sequence of characters from Lemma 2.2. For example, in G = Sp2n (q) centralisers of quasi-isolated elements s in G∗ = SO2n+1 (q) δ ◦ with |CG∗ (s) : CG ∗ (s)| = 2 have types Dd (q)Bn−d (q) for 1 ≤ d ≤ n and δ ∈ {±}. These possess a cuspidal unipotent character ρd ⊗ ρn−d only if d = a2 and n − d = b(b + 1) for some a, b ≥ 1. Now for a > b the cuspidal unipotent character ρd of δDd (q) lies in a Brauer tree for primitive prime divisors ℓ of q 2a−1 + 1, while ρn−d is of ℓ-defect zero in Bn−d (q); and for a ≤ b we have that ρn−d lies in a Brauer tree for primitive prime divisors ℓ of q 2b + 1, and ρd is of ℓ-defect zero. Thus we are only left with those cases when CG∗ (s) has two isomorphic quasi-simple factors, and these are the factors of largest rank. The corresponding lines are marked (1)–(5) in the last column of Table 2. We discuss them individually. Cases 2, 4 and 5: Note that here cuspidal characters only arise when ǫ = −, so when q ≡ 3 (mod 4). But then q is not a square and so field automorphisms have odd order. In Case 2 the outer automorphism group of G is the direct product of the diagonal automorphism group A of order 2 with an odd order group of field automorphisms. So the latter must act trivially on all A-orbits in E(G, s). The cuspidal characters as well as the semisimple characters both lie in A-orbits of length 2, so we are done. Dn (q) (n ≥ 4) 2 8 GUNTER MALLE Dn (q) (n ≥ 4) 2 2 2 2 4 4 4 4 4 4 2 2 2 4 4 4 4 4 4 Dd (q). Dn−d (q) Dn/2 (q)2 Dn/2 (q 2 ) (2×) δ An−1 (q).(q − δ1) (2×) δ Dd (q)2 .ǫAn−2d−1 (q).(q − ǫ1) Dd (q 2 ).−ǫAn−2d−1 (q).(q + ǫ1) (2×) δ Dd (q)2 .An−2d−1 (q).(q − 1) 2 Dd (q 2 ).2An−2d−1 (q).(q + 1) (2×) Dd (q).2Dd (q).2An−2d−1 (q).(q + 1) Dd (q 2 ).An−2d−1 (q).(q − 1) δ Dd (q).−δDn−d (q) Dn/2 (q).2Dn/2 (q) 2 Dn/2 (q 2 ) Dd (q).2Dd (q).ǫAn−2d−1 (q).(q − ǫ1) 2 Dd (q 2 ).−ǫAn−2d−1 (q).(q + ǫ1) Dd (q).2Dd (q).An−2d−1 (q).(q − 1) Dd (q 2 ).2An−2d−1 (q).(q + 1) δ Dd (q)2 .2An−2d−1 (q).(q + 1) 2 Dd (q 2 ).An−2d−1 (q).(q − 1) (2×) δ 2 22 22 2 22 22 4 4 2 2 2 2 2 2 2 2 2 4 4 1≤d< 2 n even n even n even n even, 1 ≤ d < n2 n even, 1 ≤ d < n2 n odd, 1 ≤ d < n2 , n odd, 1 ≤ d < n2 , n odd, 1 ≤ d < n2 , n odd, 1 ≤ d < n2 , 1 ≤ d < n/2 n even n even n even, 1 ≤ d < n2 n even, 1 ≤ d < n2 n odd, 1 ≤ d < n2 , n odd, 1 ≤ d < n2 , n odd, 1 ≤ d < n2 , n odd, 1 ≤ d < n2 , ǫ=+ ǫ=+ ǫ=− ǫ=− ǫ=+ ǫ=+ ǫ=− ǫ=− d = , n − d =  n = 2 3) n = 2 δ = −, n = △ d = , ǫ=−, n − 2d = △ 4) d = , ǫ=+, n − 2d = △ never d = , n − 2d = △ d = 1, n − 2 = △ never d = , n − d =  never n = 2 d = 1, ǫ=−, n − 2 = △ d = , ǫ=+, n − 2d = △ never d = , n − 2d = △ d = , n − 2d = △ 5) never Here ǫ ∈ {±} is such that q ≡ ǫ1 (4), δ ∈ {±}, ±D1 (q) denotes a torus of order q ∓ 1,  a square, △ a triangular number. CUSPIDAL CHARACTERS AND AUTOMORPHISMS 9 In Case 5 a Sylow 2-subgroup A of the outer automorphism group of G consists of the diagonal automorphism group A0 of order 4 extended by the cyclic group of graphfield automorphisms. This has as quotient a dihedral group of order 8, as the graph-field automorphism of Spin− 2n (q) centralises a subgroup Spin2n−1 (q) and so acts non-trivially on the centre. Clearly automorphisms of odd order must act trivially on any A0 -orbit in CG (s) which they fix. Now let γ ∈ A be an automorphism of 2-power order moving a cuspidal character ρ. As there is just one class of elements s with the relevant centraliser, the image of ρ must lie in the A0 -orbit R of ρ, and A acts faithfully on R. The same then holds for the A-orbit of semisimple characters in E(G, s). In particular γ also moves some semisimple character and vice versa. The same argument applies to Case 4: again a Sylow 2-subgroup of the outer automorphism group has a dihedral quotient as the graph automorphism interchanges the two half-spin groups. Case 1: Here, cuspidal characters occur if n = 2r = 2a(a + 1). Let L ≤ G be an F -stable Levi subgroup of twisted type 2An−1 (q).Φ2 containing a Sylow 2-torus of CG∗ (s), with dual e be L∗ ≤ G∗ . Then CL∗ (s) is disconnected of type CL∗ (s)F = (2Ar−1 (q).Φ2 )≀2. Let G ֒→ G e = LZ(G). e Let s̃ be an F -stable preimage of s in G e ∗ . Then our regular embedding, and L e2 eF e2 eF CG e ∗ (s̃) = G1 is connected with G1 of type Cr (q), and CL e ∗ (s̃) = L1 is connected with L1 of type 2Ar−1 (q).Φ2 . By Lemma 2.3(1) there is a chain of unipotent characters ψ1,i of L̃1 and of unipotent characters ρ1 = ρ1,1 , . . . , ρ1,m = χ1 of G̃1 connecting the cuspidal unipotent e1 character ρ1 to the semisimple character χ1 = 1G1 such that RLG e (ψ1,i ) contains ρ1,i , ρ1,i+1 1 exactly once. Jordan decomposition maps E(G̃, s̃) to E(G̃1 , 1) × E(G̃1 , 1), and it maps E(L̃, s̃) to E(L̃1 , 1) × E(L̃1 , 1). As Lusztig induction of unipotent characters commutes e2 G ⊗2 ⊗2 with products, this implies that RLe 21 (ψ1,i ) contains ρ⊗2 1,i and ρ1,i+1 exactly once. 1 Let ρ̃i ∈ Irr(G̃) correspond to ρ⊗2 1,i under Jordan decomposition, and ψ̃i ∈ Irr(L̃) cor⊗2 e is of type A, all of its unipotent characters are uniform. Now respond to ψ1,i . As L e Jordan decomposition commutes with Deligne–Lusztig induction, so RLG e (ψ̃i ) contains ρ̃i and ρ̃i+1 exactly once. By their description above, the restriction of ψ̃i to L splits into two constituents ψi , ψi′ , and the restriction of ρ̃i to G splits into two constituents ρi , ρ′i . Let γ be an automorphism of G, then we may choose L to be γ-stable, and all characters e s̃) and E(L, e s̃) are γ-stable. We are thus in the situation of in the Lusztig series E(G, Remark 2.6(b) and may conclude. Case 3: The argument here is very similar, using a Levi subgroup L ≤ G of type D2 (q).2An−3 (q).Φ2 with CL∗ (s) disconnected of type 2Ar−2 (q)2 .Φ42 .22 where n = 2r = 2a2 , and applying Lemma 2.3(2). Observe that n 6= 4 so that there are no triality automorphisms and L can again be chosen γ-invariant.  Remark 2.9. By [6] the conclusion of Theorem 2.8 also holds for G of type An . For type Cn our result also follows from the recent work of Cabanes–Späth [7] and of Taylor [20]. 10 GUNTER MALLE 3. Cuspidal characters in exceptional groups We now turn to groups of exceptional type. Here, there exist Lusztig series containing more than one cuspidal character even for groups with connected centre, which makes the situation somewhat more involved. 3.1. Automorphisms in type E6 . We start by considering G simple simply connected of type E6 . Then G has a graph automorphism of order 2 which we may choose to commute with F . The interesting case occurs when there exist non-trivial diagonal automorphisms of G. If F is untwisted, so G = GF = E6 (q)sc , this happens when q = pf ≡ 1 (mod 3). Then Out(G) ∼ = S3 × Cf , with the first factor inducing diagonal and graph automorphisms, the second the field automorphisms if p ≡ 1 (mod 3), respectively the product of the field automorphism by the graph automorphism if p ≡ 2 (mod 3). If F is twisted, so G = 2E6 (q)sc , we have non-trivial diagonal automorphisms for q = pf ≡ −1 (mod 3). Then q is not a square, so f is odd, and again Out(G) ∼ = S3 × Cf , with the symmetric group S3 inducing the diagonal automorphisms and the graph-field automorphism γ, and the cyclic group Cf inducing the field automorphisms. We need the following elementary observation. Lemma 3.1. The group S3 × Cf has a unique action up to permutation equivalence on a set of three elements in such a way that the elements of order 3 in the first factor act non-trivially. Proof. If the elements of order 3 in the S3 -factor act non-trivially, then the whole S3 factor must act faithfully, via its natural permutation representation. As the cyclic factor Cf must centralise the S3 -factor in this action, it can only act trivially. So the action is unique up to permutation equivalence.  Thus we see that if X ∈ Irr(G) is an orbit (of length 3) under diagonal automorphisms which is stable under the graph respectively graph-field automorphism, then the action of Aut(G)X on X is uniquely determined. 3.2. Cuspidal characters in quasi-isolated series. Next, we consider cuspidal characters in quasi-isolated series in exceptional type groups. Let G be simple simply connected e be a regular with dual G∗ such that G = GF is of exceptional type, and let G ֒→ G embedding. Theorem 3.2. Let G be quasi-simple of exceptional type, s ∈ G∗ quasi-isolated and ρ ∈ E(G, s) cuspidal. Then there is a semisimple character χ ∈ E(G, s) with the same stabiliser as ρ in Aut(G). Proof. The quasi-isolated elements s ∈ G∗ were classified by Bonnafé [1]. We deal with the various possibilities case-by-case. First consider elements with connected centraliser C = CG∗ (s). Here we claim that cuspidal characters in E(G, s) are fixed by all automorphisms. If s = 1, so ρ ∈ E(G, 1) is cuspidal unipotent then by results of Lusztig ρ is invariant under all automorphisms of G, see e.g. [14, Thm. 2.5], as is the semisimple character 1G ∈ E(G, 1). Next assume that s 6= 1. If C has only components of classical type and CF does not involve 3D4 , then each such component has at most one cuspidal unipotent CUSPIDAL CHARACTERS AND AUTOMORPHISMS 11 character and one semisimple character in any Lusztig series, and hence by Lemma 2.7(a) the same is true for E(G, s). The claim then follows trivially. Connected centralisers of isolated elements s 6= 1 with an exceptional component are of type E6 in E7 , or of types E6 .A2 or E7 .A1 in type E8 . Now, the cuspidal unipotent characters of E6 (q) lie on a Brauer tree for Zsigmondy primes dividing Φ9 together with the trivial character. Thus they lie on such a Brauer tree together with the semisimple character if they occur in quasi-isolated series of type E6 or E6 .A2 . Our claim thus follows from Lemma 2.6(a). Similarly two of the three cuspidal unipotent characters of 2E6 (q) lie on the Φ18 -Brauer tree, and the third one is uniquely determined by its degree; and the two cuspidal unipotent characters of E7 (q) lie on a Φ18 -Brauer tree and we conclude as before. Thus we may now assume that CG∗ (s) is not connected. As centralisers of semisimple elements are connected in a group whose dual has connected centre, we are in one of three situations: q ≡ 1 (mod 3) for G = E6 (q)sc , q ≡ −1 (mod 3) for G = 2E6 (q)sc , or q is odd for G = E7 (q)sc . The various rational forms of the occurring types of disconnected centralisers CG∗ (s) with cuspidal unipotent characters can be computed using Chevie; they are collected in Table 3, depending on certain congruence conditions on q. The column labelled “|E(G, s)|” gives the number of regular orbits (of length 3 or 2) under the group of diagonal automorphisms and of orbits of length 1 respectively, and similar the last column gives the same information for the subset of cuspidal characters. Note that we only need to concern ourselves with the regular orbits under diagonal automorphisms, and that the semisimple characters always form a regular orbit. G∗ CG∗ (s)F q |E(G, s)| 3 (2×) ≡ 1 (3) 8 × 3 E6 (q) D4 (q).Φ3 .3 2 2 3 E6 (q) A2 (q) .3 ≡ 2 (3) 3 × 3 + 8 × 1 2 A2 (q 3 ).3 (2×) ≡ 2 (3) 3 × 3 D4 (q).Φ22 .3 ≡ 2 (3) 8 × 3 + 2 × 1 3 D4 (q).Φ6 .3 (2×) ≡ 2 (3) 8 × 3 E7 (q) 2E6 (q).Φ2 .2 ≡ 1 (2) 30 × 2 2 D4 (q).A1 (q) .Φ2 .2 ≡ 3 (4) 20 × 2 + 18 × 1 2 A2 (q)3 .Φ2 .2 ≡ 5 (6) 9 × 2 + 9 × 1 |Ecusp (G, s)| 2×3 1×3 1×3 1×3 2×3 3×2 1×2 1×2 Table 3. Cuspidal characters in Lusztig series of quasi-isolated elements with disconnected centralisers in exceptional types We consider these in turn, starting with G = E6 (q)sc . It can be checked by direct computation in Chevie (see [17]) that the two classes of quasi-isolated elements are invariant under the graph automorphism. In particular the corresponding Lusztig series must be invariant under the graph automorphism of G. Moreover, the G̃-orbits of cuspidal characters in those series are invariant by degree reasons. So our claim follows from Lemma 3.1. The situation is entirely similar for the six quasi-isolated series in 2E6 (q)sc . In G = E7 (q)sc , in the second case the cuspidal and the semisimple characters are contained in Brauer trees for Zsigmondy primes for Φ6 (note that q 6= 2 as q is odd). By the Bonnafé–Rouquier Morita equivalence these characters are non-exceptional, so Remark 2.6 applies. 12 GUNTER MALLE In the first case, let L∗ ≤ G∗ be a Levi subgroup of type A2 (q).A1 (q 3 ).Φ3 belonging to the nodes 1, 2, 3, 5, 7 of the Dynkin diagram in the standard Bourbaki numbering used for example in Chevie. A Chevie-calculation shows that its dual Levi subgroup L ≤ G has disconnected centre, and CL∗ (s) is of type A2 (q).Φ2 Φ3 Φ6 .2. Application of [3, e 2 Thm. 3.2] gives that RLG e (ψ) contains the cuspidal character ρ with label E6 [1] as well as the semisimple character in E(G̃, s̃) exactly once, where ψ is the semisimple character in E(L̃, s̃). So the claim holds for ρ by Remark 2.6(b). The two other cuspidal characters in this series lie on a Brauer tree for Zsigmondy primes dividing Φ18 and we can use Lemma 2.4. Finally, for the last case, take a 6-split Levi subgroup L∗ ≤ G∗ for the nodes 2, 5, 7, of type A1 (q 3 ).Φ26 , whose dual again has disconnected centre, and with CL∗ (s) of type e (q 3 + 1)Φ26 .2. Then RLG e (ψ) contains the cuspidal character in E(G̃, s̃) as well as the semisimple character exactly once and we conclude as before.  Corollary 3.3. Let ρ be a cuspidal character of a quasi-simple group G of Lie type in a quasi-isolated series and assume we are neither in cases (3) or (4) of Table 2 nor in the first case of Table 3. Then some G̃-conjugate of ρ extends to its inertia group in the extension Ĝ of G by graph and field automorphisms. In particular ρ satisfies part (ii) of the inductive McKay condition from [15, Thm. 2.1]. Proof. For groups of types An and 2An this has been shown by Cabanes–Späth [6]. For the other types, by the proofs of Theorem 2.8 and 3.2 we have connected ρ via a sequence of Brauer trees or of Deligne–Lusztig characters to a semisimple character χ in the same Lusztig series. According to [19, Prop. 3.4(c)] there exists a semisimple character χ′ in the G̃-orbit of χ that satisfies the cited condition (ii) and thus in particular extends to its inertia group I in Ĝ. Thus, the corresponding G̃-conjugate ρ′ of ρ also has inertia group I. If ρ, χ (and hence ρ′ , χ′ ) are connected via Brauer trees, ρ′ extends to I by Corollary 2.5. In the other cases not excluded in the statement, all Sylow subgroups of Ĝ/G are cyclic, and so ρ′ also extends by elementary character theory. This yields part (ii) of the inductive McKay condition.  4. Proof of Theorem 1 We are now ready to prove our main result. Here, for finite groups U EV with characters χ ∈ Irr(V ), ψ ∈ Irr(U) we write Irr(U | χ) for the constituents of χ|U , and Irr(V | ψ) for those of ψ V . Lemma 4.1. Let G be a connected reductive group with Frobenius map F and G0 E G a closed F -stable normal subgroup such that [G, G] = [G0 , G0 ]. Let χ0 ∈ Irr(GF0 ) and χ ∈ Irr(GF ) be semisimple characters. Then: (a) All characters in Irr(GF | χ0 ) and in Irr(GF0 | χ) are semisimple. F (b) Let π : G∗ → G∗0 be the dual epimorphism and s0 ∈ G∗F 0 such that χ0 ∈ E(G0 , s0 ). Then |E(GF , s) ∩ Irr(GF | χ0 )| = 1 for all s ∈ G∗F with π(s) = s0 . e then G0 ֒→ G ֒→ G e is also regular. The Proof. Choose a regular embedding G ֒→ G, first statement now follow immediately from the definition of semisimple characters as the CUSPIDAL CHARACTERS AND AUTOMORPHISMS 13 Alvis–Curtis duals of regular characters, see [2, §15A]. For part (b) set G := GF , G0 := F ◦ GF0 , and AG (s) := (CG∗ (s)/CG ∗ (s)) . By Lusztig’s result [2, Thm. 11.12] the induction G IndG0 (χ0 ) is multiplicity-free and by [2, Prop. 15.13] it has exactly |G : G0 |/|AG0 (s0 ) : AG (s)| constituents. On the other hand, by direct counting this is exactly the number of semisimple classes of G∗F lying above the class of s0 . By [2, Prop. 11.7] and part (a) any corresponding Lusztig series will contain a character from Irr(GF | χ0 ). The pigeonhole principle now shows that each such series will contain exactly one such character.  Proof of Theorem 1. Let G be simple, simply connected and F : G → G such that G = GF is quasi-simple. Let ρ ∈ Irr(G) be cuspidal and s ∈ G∗ such that ρ ∈ E(G, s). Let L∗ ≤ G∗ be a minimal F -stable Levi subgroup of G∗ containing CG∗ (s) with dual L. According to [20, Thm. 9.5] the Jordan decomposition between E(G, s) and E(L, s) induced by RLG commutes with any γ ∈ Aut(G)s , and by Lemma 2.7 it sends cuspidal characters to cuspidal characters and semisimple characters to semisimple ones. Here Aut(G)s denotes the stabiliser in Aut(G) of E(G, s). Note that by construction s is quasi-isolated in L∗ . Thus we have reduced our question to the corresponding one for quasi-isolated series in L. Let L0 := [L, L] and let s0 ∈ L∗0 be the image of s under the natural epimorphism ∗ L → L∗0 induced by the embedding L0 ≤ L. Clearly s0 is quasi-isolated in L∗0 . As G is of simply connected type, so is L0 (see [16, Prop. 12.14]), hence a direct product L1 · · · Lr of F -orbits Li , 1 ≤ i ≤ r, of simple components of L0 . Correspondingly, we have LF0 = L1 · · · Lr with quasi-simple finite groups of Lie type Li . Any irreducible character χ of L0 is an outer tensor product of irreducible characters χi of the Li , which are cuspidal, respectively semisimple, if and only if χ is. Moreover, if χ ∈ E(L0 , s0 ) then χi ∈ E(Li , si ), with si the image of s0 under the epimorphism L∗0 → L∗i induced by the embedding Li ֒→ L0 . Again, the si are quasi-isolated in L∗i . Now for cuspidal characters in quasiisolated series of quasi-simple groups, our claim holds: For groups of types An and 2An it follows from [6], for the other groups of classical type it is contained in Theorem 2.8 and for groups of exceptional type all relevant cases have been dealt with in Theorem 3.2. It remains to deduce the claim for L from the one for L0 . First, for χ ∈ E(L, s) and χ0 ∈ Irr(L0 | χ), we have by Lemma 4.1(a) that χ is semisimple if and only χ0 is, and by the definition of cuspidality, χ is cuspidal if and only if χ0 is. Furthermore, for χ semisimple we have Irr(L | χ0 ) ∩ E(L, s) = {χ} by Lemma 4.1(b). Thus χ is uniquely determined by χ0 (given its Lusztig series). Since our claim holds for L0 , any cuspidal character χ0 ∈ E(L0 , s0 ) has the same stabiliser in L as the semisimple characters in this series, and so again Irr(L | χ0 ) ∩ E(L, s) = {χ} and χ is uniquely determined by χ0 and s. Now note that L0 is invariant under all automorphisms of L. But then our claim for the Lusztig series E(L, s) follows from the corresponding one for the Lusztig series E(L0 , s0 ) of L0 .  Example 4.2. Let F ′ : G → G be a Frobenius endomorphism commuting with F and ′ such that Z(G) ⊂ GF . Let s ∈ G∗ such that E(G, s) is stable under the field or graphfield automorphism σ of G induced by F ′ . Then any cuspidal character ρ ∈ E(G, s) is σinvariant. Indeed, by [4, Thm. 3.5] any such σ fixes all regular characters in E(G, s), hence by [20, Thm. 9.5] the (Alvis–Curtis dual) semisimple characters, hence ρ by Theorem 1. 14 GUNTER MALLE 5. On the inductive McKay condition We apply our previous result to verify the inductive McKay condition for several series of simple groups at suitable primes. Let still G be simple of simply connected type, with e and dual epimorphism π : G e ∗ → G∗ . By definition G̃ induces regular embedding G ֒→ G the full group of diagonal automorphisms of G. Let D be the group of automorphisms of G̃ induced by inner, graph and field automorphisms of G. We investigate the following property of characters χ̃ ∈ Irr(G̃): there exists χ ∈ Irr(G | χ̃) which is DIrr(G|χ̃) -stable; (†) here DIrr(G|χ̃) denotes the stabiliser in D of the set of irreducible characters of G below χ̃. The following is known: Lemma 5.1. Regular and semisimple characters of G̃ satisfy (†). Proof. First let χ̃ ∈ Irr(G̃) be a semisimple character. Then the claim is just [19, Prop. 3.4(c)]. Regular characters are the images of semisimple characters under the Alvis–Curtis duality (see [8, 14.39]), whose construction commutes with automorphism, so we conclude by the previous consideration.  In the next result, Irrℓ′ (G) denotes the set of irreducible characters of G of ℓ′ -degree. Proposition 5.2. Let G = 2E6 (q)sc for a prime power q and ℓ|(q + 1) be a prime. Then any χ̃ ∈ Irr(G̃ | Irrℓ′ (G)) satisfies (†). CG∗ (s) q |E(G, s)| 2 3 A2 (q ).3 (2×) ≡ 2 (3) 3 × 3 D4 (q).Φ22 .3 ≡ 2 (3) 8 × 3 + 2 × 1 4 2 A1 (q) .Φ2 .3 ≡ 5 (6) 4 × 3 + 4 × 1 A1 (q)3 .Φ32 .3 ≡ 2 (3) 2 × 3 + 2 × 1 5 A1 (q).Φ2 .3 ≡ 2 (3) 2 × 3 Φ62 .3 ≡ 2 (3) 1 × 3 Table 4. Some ℓ′ -series in 2E6 (q)sc , ℓ|(q + 1) Proof. Let s̃ ∈ G̃∗ be semisimple such that χ̃ ∈ E(G̃, s̃), and let s = π(s̃). If χ̃ restricts irreducibly to G, the claim holds trivially. So we may assume CG∗ (s) is not connected and hence that 3|(q + 1). From the list of character degrees of 2E6 (q)sc provided by Lübeck [12], we obtain the Table 4 of conjugacy classes of semisimple elements s ∈ G∗ with F ◦ and such that E(G, s) contains characters of ℓ′ -degree. As in Table 3 CG∗ (s)F 6= CG ∗ (s) we also give the number of G̃-orbits in E(G, s) (this is implicit in the data in [12]). In the first three entries of Table 4 the element s is quasi-isolated, and the claim follows with Lemma 3.1 as in the proof of Theorem 3.2. In the other three cases the non-invariant characters are either regular or semisimple, so they all satisfy (†) by Lemma 5.1.  Thus we can prove our second main result: CUSPIDAL CHARACTERS AND AUTOMORPHISMS 15 Proof of Theorem 2. If ℓ|(q − 1) the claim is contained in [15, Thm. 6.4(a)]. So now assume that q ≡ −1 (mod ℓ). For S = 2E6 (q) all χ̃ ∈ Irr(G̃ | Irrℓ′ (G)) satisfy property (†) by Proposition 5.2. As moreover here D/ Inn(G) is cyclic, all such characters χ̃ satisfy condition (ii)(1) in [15, Thm. 2.1] and thus the result follows from [15, Thm. 6.4(c)]. For the other families of groups, we have that q ≡ −1 (mod ℓ) with ℓ ≡ 3 (mod 4), so q is not a square. Thus S has no even order field automorphisms, whence Out(G) is cyclic. The claim then again follows from [15, Thm. 6.4(c)].  It was shown in [5, Cor. 7.3] that the inductive McKay condition holds for 2E6 (q) at all primes ℓ ≥ 5 if q 6≡ −1 (mod 3), as well as for E7 (q), Bn (q) (and so Cn (q)) if q is even. References [1] C. Bonnafé, Quasi-isolated elements in reductive groups. Comm. Algebra 33 (2005), 2315–2337. [2] C. Bonnafé Sur les caractères des groupes réductifs finis a centre non connexe : applications aux groupes spéciaux linéaires et unitaires. Astérisque 306 (2006). [3] M. Broué, G. Malle, J. Michel, Generic blocks of finite reductive groups. Astérisque 212 (1993), 7–92. [4] O. Brunat, F. Himstedt, On equivariant bijections relative to the defining characteristic. J. Algebra 334 (2011), 150–174. [5] M. Cabanes, B. Späth, Equivariance and extendibility in finite reductive groups with connected center. Math. Z. 275 (2013), 689–713. [6] M. Cabanes, B. Späth, Equivariant character correspondences and inductive McKay condition for type A. J. Reine Angew. Math. 728 (2017), to appear, doi: 10.1515/crelle-2014-0104. [7] M. Cabanes, B. Späth, Inductive McKay condition for finite simple groups of type C. Represent. Theory 21 (2017), 61–81. [8] F. Digne, J. Michel, Representations of Finite Groups of Lie Type. Volume 21 of London Mathematical Society Student Texts. Cambridge University Press, Cambridge, 1991. [9] W. Feit, Possible Brauer trees. Illinois J. Math. 28 (1984), 43–56. [10] P. Fong, B. Srinivasan, Brauer trees in classical groups. J. Algebra 131 (1990), 179–225. [11] R. Kessar, G. Malle, Lusztig induction and ℓ-blocks of finite reductive groups. Pacific J. Math. 279 (2015), 267–296. [12] F. Lübeck, Character degrees and their multiplicities for some groups of Lie type of rank < 9. Available at http://www.math.rwth-aachen.de/∼Frank.Luebeck/chev/DegMult/ [13] G. Lusztig, On the representations of reductive groups with disconnected centre. Astérisque 168 (1988), 157–166. [14] G. Malle, Extensions of unipotent characters and the inductive McKay condition. J. Algebra 320 (2008), 2963–2980. [15] G. Malle, B. Späth, Characters of odd degree. Ann. of Math. (2) 184 (2016), 869–908. [16] G. Malle, D. Testerman, Linear Algebraic Groups and Finite Groups of Lie Type. Cambridge Studies in Advanced Mathematics, 133, Cambridge University Press, Cambridge, 2011. [17] J. Michel, The development version of the CHEVIE package of GAP3. J. Algebra 435 (2015), 308–336. [18] J. Olsson, Remarks on symbols, hooks and degrees of unipotent characters. J. Combin. Theory Ser. A 42 (1986), 223–238. [19] B. Späth, Inductive McKay condition in defining characteristic. Bull. Lond. Math. Soc. 44 (2012), 426–438. [20] J. Taylor, Action of automorphisms on irreducible characters of symplectic groups. ArXiv: 1612.03138, 2016. FB Mathematik, TU Kaiserslautern, Postfach 3049, 67653 Kaiserslautern, Germany. E-mail address: [email protected]
4math.GR
Linear approach to the orbiting spacecraft thermal problem José Gaite and Germán Fernández-Rico arXiv:1202.4372v1 [cs.CE] 20 Feb 2012 IDR, ETSI Aeronáuticos, Universidad Politécnica de Madrid, Pza. Cardenal Cisneros 3, E-28040 Madrid, Spain (Dated: January 18, 2012) We develop a linear method for solving the nonlinear differential equations of a lumped-parameter thermal model of a spacecraft moving in a closed orbit. Our method, based on perturbation theory, is compared with heuristic linearizations of the same equations. The essential feature of the linear approach is that it provides a decomposition in thermal modes, like the decomposition of mechanical vibrations in normal modes. The stationary periodic solution of the linear equations can be alternately expressed as an explicit integral or as a Fourier series. We apply our method to a minimal thermal model of a satellite with ten isothermal parts (nodes) and we compare the method with direct numerical integration of the nonlinear equations. We briefly study the computational complexity of our method for general thermal models of orbiting spacecraft and conclude that it is certainly useful for reduced models and conceptual design but it can also be more efficient than the direct integration of the equations for large models. The results of the Fourier series computations for the ten-node satellite model show that the periodic solution at the second perturbative order is sufficiently accurate. Keywords: spacecraft thermal control, lumped-parameter models, perturbation methods Nomenclature Ai C Ci ea eaj F (t) F̂ (m) F̂ ∗ Fa (t) Ḟa (t) Fi (t) F̂i (m) G(t) J Jij k K KR KiR Kij R Kij n N P Pia q Q̇i (t) hQ̇i i Ri Rij = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = outward-facing area of ith-node, m2 thermal capacitance diagonal matrix, J/K thermal capacitance of ith-node, J/K eigenvector of C 1/2 JC −1/2 , K j th-component of eigenvector ea , K driving function vector, K/s mth Fourier coefficient of F (t), K/s complex conjugate of F̂ , K/s driving function for ath-mode, K/s time derivative of Fa (t), K/s2 driving function for ith-node, K/s mth Fourier coefficient of Fi (t), K/s driving function for second order temperature vector, K/s Jacobian matrix, s−1 Jacobian matrix ij -element, s−1 number of steps in numerical integration of ODEs conduction coupling matrix, W/K matrix of conductances from linearized radiation coupling terms, W/K ith-node conductance from linearized environment-radiation terms, W/K conduction coupling matrix ij -element, W/K ij -element of conductance matrix from linearized radiation terms, W/K number of samples for discrete Fourier transform number of nodes eigenvector matrix for J, K ith-component of J-eigenvector for ath-mode, K auxiliary heat input vector, K/s heat input to ith-node, W mean value of Q̇i (t) over period T , W ith-node coefficient of radiation to the environment, W/K4 radiation coupling matrix, W/K4 2 t T ∆T Te Ti T0 T(n)j T∞ ∞ T(n) Ṫi Tei T U αs δab δA δAij εi ǫ λa δλa σ = = = = = = = = = = = = = = = = = = = = = = time, s (min in figures) temperature vector, K vector of “errors” w.r.t. ESATANTM solution, K steady-state temperature vector, K temperature of i-node, K cosmic microwave background radiation temperature, K nth order term in j th-node temperature expansion, K stationary solution temperature vector, K nth order of stationary solution temperature vector, K time derivative of ith-node temperature, K/s steady-state temperature of ith-node, K orbital period, s matrix of independent solutions to homogeneous equations, K solar absorptivity Kronecker’s delta antisymmetric part of C 1/2 JC −1/2 , s−1 ij -element of δA, s−1 infrared emissivity of ith-node outward-facing surface perturbation parameter eigenvalue of J for ath mode, s−1 perturbation of J -eigenvalue for ath mode, s−1 Stefan-Boltzmann constant, 5.67 × 10−8 W m−2 K−4 I. INTRODUCTION The thermal control of a spacecraft ensures that the temperatures of its various parts are kept within their appropriate ranges [1–4]. The simulation and prediction of temperatures in a spacecraft during a mission are usually carried out by commercial software packages. These software packages employ “lumped parameter” models that describe the spacecraft as a discrete network of nodes, with one energy-balance equation per node. The equations for the thermal state evolution are coupled nonlinear first-order differential equations, which can be integrated numerically. Given the thermal parameters of the model and its initial thermal state, the numerical integration of the differential equations yields the solution of the problem, namely, the evolution of the node temperatures. However, a detailed model with many nodes is difficult to handle, and its integration for a sufficiently long time of evolution can take considerable computer time and resources. Therefore, it is very useful to study simplified models and approximate methods of integrating the differential equations. Many spacecraft missions, in particular, satellite missions, consist of an initial transient part and then a stationary part, in which the spacecraft just goes around a closed orbit, in which the heat inputs are periodic. These periodic heat inputs are expected to induce periodic temperature variations, with a maximum and a minimum temperature in each orbit. This suggests a conservative approach that consists in computing only the temperatures for the hot and cold cases of the given orbit, defining them as the two steady cases with the maximum and minimum heat loads, respectively. Naturally, the real temperature variations in the orbit are smaller, because there is not enough time for the hot and cold cases to establish themselves. In fact, the temperature variations can be considerably smaller, to such a degree that it is necessary to integrate the differential equations, at least approximately. The differential equations for energy balance are nonlinear due to the presence of radiation couplings, which follow the Stefan-Boltzmann quartic law. A common approach to these equations involves a linearization of the radiation terms that approximate them by heat conduction terms [3, 5–7]. This approach transforms the nonlinear equations into standard linear heat conduction equations. But this approach has not been sufficiently justified, is of a heuristic nature and does not constitute a systematic approximation. In fact, nonlinear equations are very different from linear equations and, in particular, a periodic driving may not induce periodic solutions but much more complex solutions, namely, chaotic solutions. Therefore, we have carried out in preceding papers a full nonlinear analysis of spacecraft thermal models [8, 9]. The conclusion of the analysis is that the complexities of nonlinear dynamics, such as multiple equilibria and chaos, do not appear in these models. While the existence of only one equilibrium state can be proved in general, the absence of chaos under driving by variable external heat loads can only be proved for a limited range of magnitudes of the driving loads. This range presumably includes the magnitudes involved in typical spacecraft orbits. The proofs in Refs. 8 and 9 are constructive and are based on a perturbation method that is expected to be sound when the linear equations corresponding to the first 3 perturbative order constitute a good approximation of the nonlinear equations. This implies that the fully nonlinear solution describes a weakly nonlinear oscillator. Since the perturbative approximation is mathematically rigorous and systematic, it is worthwhile to study in detail the scope of the perturbative linear equations and, furthermore, to compare them with previous linear approaches of a heuristic nature. The main purpose of this paper is to study the linear method of predicting the thermal behavior of spacecraft in stationary orbits (Sect. II and III) and to test it on a minimally realistic thermal model of a satellite in a circular orbit. Since the general one and two-node models analyzed in Refs. 8 and 9, respectively, are too simple, we define in this paper a ten-node thermal model of a small Moon-orbiting satellite (Sect. IV). This model is simple enough to allow us to explicitly show all the quantities involved (thermal couplings and capacities, heat inputs, etc.) and it is sufficient for illustrating the main features of the linear approach. As realistic thermal models have many more nodes, we consider in Sect. V the important issue of scalability of the method and, hence, its practical applications. Computational aspects of the steady-state problem have been studied by Krishnaprakas [10, 11] and by Milman and Petrick [12], while computational aspects of the direct integration of the nonlinear equations for the unsteady problem have been studied by Krishnaprakas [13]. Here we focus on the linear equations for the stationary but unsteady case and survey its computational aspects. A note on notation: In the equations that contain matrix or vector quantities, sometimes we use component notation (with indices) while other times we use compact matrix notation (without indices), according to the nature of the equations. II. LINEARIZATION OF THE HEAT-BALANCE EQUATIONS A lumped-parameter thermal model of a continuous system consists of a discrete network of isothermal regions (nodes) that represent a partition of the total thermal capacitance and that are linked by thermal conduction and radiation couplings [1–5]. This discretization reduces the integro-differential heat-transfer equations to a set of energybalance ODEs, one per node, which control the evolution of the nodes’ temperatures [5]: Ci Ṫi = Q̇i (t) − N X   Kij (Ti − Tj ) + Rij (Ti4 − Tj4 ) − Ri (Ti 4 − T04 ), i = 1, . . . , N, (1) j=1 where N is the number of nodes and Q̇i (t) contains the total heat input to the ith-node from external radiation and from internal energy dissipation (if there is any). The conduction and radiation coupling matrices are denoted by K and R, respectively; they are symmetric (Kij = Kji and Rij = Rji ) and Kii = Rii = 0; so there are N (N − 1) independent coupling coefficients altogether, but many vanish, usually. The temperature T0 ≃ 3 K is the temperature of the environment, namely, the cosmic microwave background radiation. The ith-node coefficient of radiation to the environment is given by Ri = Ai εi σ, where Ai denotes the outward facing area, εi its (infrared) emissivity, and σ is the Stefan-Boltzmann constant. The constant term Ri T04 can be included in Q̇i (t) or ignored altogether, if each Ti ≫ T0 . Equations (1) coincide with the ones implemented in commercial software packages, for example, ESATANTM [14]. There is no systematic procedure for finding the analytical solution of a system of nonlinear differential equations, except in some particularly simple cases. Of course, nonlinear systems can always be integrated numerically with finite difference schemes. Methods of this kind are employed in commercial software packages. When a nonlinear system can be approximated by a linear system and, hence, an approximate analytic solution can be found, this solution constitutes a valuable tool. Actually, one can always resort to some kind of perturbation method to linearize a nonlinear system. Therefore, we now study the rigorous linearization of Eqs. (1) based on a suitable perturbation method, and we also describe, for the sake of a comparison, a heuristic linearization, which actually is best understood in light of the results of the perturbation method. A. Perturbative linearization If we assume that the heat inputs Q̇i (t) in the energy-balance Eqs. (1) are periodic, namely, that there is a time interval T such that Q̇i (t + T ) = Q̇i (t), then it seems sensible to study first the effect of the mean heat inputs in a period. This averaging method, introduced in Refs. 8 and 9, relies on the fact that the autonomous nonlinear system of ODEs for constant Q̇i can be thoroughly analyzed with analytical and numerical methods. For example, it is possible to determine that there is a unique steady thermal state and that it is (locally) stable [9, 12]. The actual values of the steady temperatures can be found efficiently with various numerical methods [10–12]. Furthermore, the eigenvalues and eigenvectors of the Jacobian matrix of the nonlinear system of ODEs provides us with useful information about 4 the dynamics, in particular, about the approach to steady-state: the eigenvectors represent independent thermal modes and the eigenvalues represent their relaxation times [9]. Once the averaged equations are solved, the variation of the heat inputs can be considered as a driving of the averaged solutions. Thus, we can define the driving function Fi (t) = Q̇i (t) − hQ̇i i , Ci i = 1, . . . , N, where hQ̇i i denotes the mean value of Q̇i (t) over the period of oscillation. A weak driving function must not produce a notable deviation from the averaged dynamics. In particular, the long-term thermal state of an orbiting spacecraft must oscillate about the corresponding steady-state. To embody this idea, we introduce a formal perturbation parameter ǫ, to be set to the value of unity at the end, and write Eqs. (1) as Ṫi = ǫ Fi (t) +  N  hQ̇i i X Kij Rij 4 Ri 4 − (Ti − Tj ) + (Ti − Tj4 ) − Ti , Ci C C Ci i i j=1 i = 1, . . . , N, (2) Then, we assume an expansion of the form Tj (t) = ∞ X ǫn T(n)j (t) . (3) n=0 When we substitute this expansion into Eqs. (2), we obtain for the zeroth order of ǫ Ṫ(0)i  N  hQ̇i i X Kij Rij 4 Ri 4 4 = − (T(0)i − T(0)j ) + (T(0)i − T(0)j ) − T , Ci Ci Ci Ci (0)i j=1 i = 1, . . . , N, (4) that is to say, the averaged equations. The initial conditions for these equations are the same as for the unaveraged equations. For the first order in ǫ, we obtain the following system of linear equations: Ṫ(1)i = N X Jij (t) T(1)j + Fi (t) , i = 1, . . . , N. (5) j=1 Here, Jij (t) is the Jacobian matrix Jij (t) = ∂ Ṫi (T ) ∂Tj , T =T(0) (t) where T(0) (t) is the solution of the zeroth order equation. Equations (5) are to be solved with the initial condition T(1) (0) = 0. The elements of the Jacobian matrix at a generic point in the temperature space are calculated to be:  (6) Jij = Ci−1 Kij + 4Rij Tj3 , if i 6= j, # " N X  (7) Kik + 4Rik Ti3 − 4Ri Ti 3 . Jii = Ci−1 − k=1 This matrix has interesting properties. First of all, it has negative diagonal and nonnegative off-diagonal elements. In other words, −J is a Z-matrix [15]. Furthermore, it fulfills a semipositivity condition that qualifies it as a nonsingular M -matrix [9]. Since the eigenvalues of an M -matrix have positive real parts, the opposite holds for J, namely, its eigenvalues have negative real parts. One more interesting property of −J, related to semipositivity, is that it possesses a form of diagonal dominance: it is similar to a diagonally dominant matrix and the similarity is given by a positive diagonal matrix. Naturally, this property is shared by J. These properties are useful to prove some desirable properties of the solutions of Eqs. (5). The chief property of J is that −J is a nonsingular M -matrix. In particular, it implies that −J −1 is non-negative and, therefore, that the Perron-Frobenius theory is applicable to it [15]. The relevant results to be applied are: (i) Perron’s theorem, which states that a strictly positive matrix has a unique real and positive eigenvalue with a positive 5 eigenvector and that this eigenvalue has maximal modulus among all the eigenvalues; (ii) a second theorem, stating that if a Z-matrix that is a nonsingular M -matrix is also “irreducible”, then its inverse is strictly positive. The irreducibility of J follows from the symmetry of the matrices Kij and Rij [9]. As the positive (Perron) eigenvector of −J −1 is the eigenvector of J that corresponds to its smallest magnitude eigenvalue, it defines the slowest relaxation mode (for a given set of temperatures). Therefore, in the evolution of temperatures given by Eqs. (4), steady-state is eventually approached from the zone corresponding to simultaneous temperature increments (or decrements). The matrix J(t) in Eqs. (5) is obtained by substituting T(0)j (t) for Tj in Eqs. (6) and (7). Then, the nonhomogeneous linear system with variable coefficients, Eqs. (5), can be solved by variation of parameters [9], yielding the expression: T(1) (t) = U (t) Z t 0 U (τ )−1 · F (τ ) dτ, (8) where U (t) is a matrix formed by columns that are linearly independent solutions of the corresponding homogeneous equation, with the condition that U (0) = I (the identity matrix). The difficulty in applying this formula lies in computing U (t), that is, in computing the solutions of the homogeneous equation. Moreover, this computation demands the previous computation of the solution for T(0) (t). Since we are only interested in the stationary solutions of the heat-balance equations rather than in transient thermal states, it is possible to find an expression of these solutions that is more manageable than Eq. (8). The transient thermal state relaxes exponentially to the stationary solution, which is a limit cycle of the nonlinear equations, technically speaking [8, 9]. Therefore, the stationary solution is given by the solution of Eqs. (5) with the constant Jacobian matrix calculated at the steady-state temperatures, which we name Tei , i = 1, . . . , N .1 This solution is simply [9]: T(1) (t) = Z t 0 exp [τ J] · F (t − τ ) dτ, (9) with J calculated at the point Te. Furthermore, the periodic stationary solution is obtained by extending the upper integration limit from t to infinity: Z ∞ ∞ exp [τ J] · F (t − τ ) dτ. (10) T(1) (t) = 0 This function is indeed periodic, unlike the one defined by Eq. (9), so it is determined by its values for t ∈ [0, T ]. ∞ Note that hT(1) (t)i = 0. For numerical computations, it can be convenient to express the integral from 0 to ∞ as an integral from 0 to T , taking advantage of the periodicity as follows: Z ∞ exp [τ J] · F (t − τ ) dτ = 0 ∞ X n=0 exp(nT J) Z 0 T ∞ Z X n=0 (n+1)T nT exp [τ J] · F (t − τ ) dτ = exp [τ J] · F (t − τ ) dτ = [I − exp(T J)]−1 Z T 0 exp [τ J] · F (t − τ ) dτ (the series converges because the eigenvalues of J have negative real parts). In the last integral, the argument of F can be transferred to the interval [0, T ]: Z 0 T exp [τ J] · F (t − τ ) dτ = Z 0 t exp [τ J] · F (t − τ ) dτ + Z t T exp [τ J] · F (t − τ + T ) dτ, where t ∈ [0, T ]. Note that the one-period shift in the argument of the last F is necessary for the argument to be in [0, T ]. Some remarks are in order. First of all, we have assumed that there is one asymptotic periodic solution of the nonlinear Eqs. (2) and only one (a unique limit cycle). Equivalently, we have assumed that the perturbation series converges. This assumption holds in an interval of the amplitude of heat input-variations F [9]. Besides, for the integrals in Eq. (10) and the following equations to make sense, it is required that exp [τ J] → 0 as τ → ∞. This is 1 The solution can also be derived as the limit of Eq. (8) in which U (t) = exp(Jt). 6 guaranteed, because the eigenvalues of J have negative real parts, as is necessary for the steady-state to be stable. In fact, the eigenvalues are expected to be negative real numbers and J is expected to be diagonalizable but both properties are not rigorously proven [9] (however, see Sect. II B). If J is diagonalizable, that is to say, there is a real matrix P such that P −1 JP is diagonal, then the calculation of the integrals is best carried out on the eigenvector basis, given by the matrix P . Using this basis, Eq. (10) is expressed as Z ∞ N N i h X X −1 ∞ Paj Fj (t − τ ) dτ, i = 1, . . . , N, (11) (t) = Pia T(1) exp [τ λa ] i 0 a=1 j=1 where the first sum runs over the eigenvectors and their corresponding eigenvalues λa . Expression (11) allows us to compare the contribution of the different thermal modes. In particular, for the fast modes, such that |λa | is large, we can use Watson’s lemma [16] to derive the asymptotic expansion:   Z ∞ 1 Fa (t) Ḟa (t) , − + exp [τ λa ] Fa (t − τ ) dτ = O 2 −λa λa λ3a 0 P −1 where Fa = j Paj Fj . When |λa | is large, the first term suffices (unless Ḟa (t) is also large, for some reason); and the first term is small, unless Fa (t) is large. In essence, if the fast modes are not driven strongly, they can be neglected in the sum over a in Eq. (11). 1. Second order perturbative equation For second order in ǫ, a straightforward calculation [9] yields the following linear equation: Ṫ(2) = J(t) · T(2) + G(t) , where J(t) is the same Jacobian matrix that appears in the first-order Eq. (5) and   N N X X 6 Rij 2 6 2 2 2  Gi = Rij + Ri  T(0)i T(1)i , i = 1, . . . , N. T(0)j T(1)j − C C i i j=1 j=1 (12) (13) The initial condition for Eq. (12) is T(2) (0) = 0, as for Eqs. (5). Therefore, the first-order and second-order equations have identical solutions in terms of their respective driving terms, although G, Eqs. (13), is a known function of t only when the lower order equations have been solved. The integral expression, Eqs. (10), of the stationary solution ∞ ∞ T(1) (t) is also valid for T(2) (t), after replacing F with G and using in Eq. (13) the stationary values T(0) (t) = Te and ∞ T(1) (t) = T(1) (t) (which make G periodic). It is possible to carry on the perturbation method to higher orders, and it always amounts to solving the same linear equation with increasingly complicated driving terms that involve the solutions of the lower order equations. ∞ ∞ The example of Sect. IV shows that, in a typical case, T(2) (t) is a small correction to T(1) (t), and further corrections are not necessary. This confirms that the perturbation method is reliable for a realistic case. B. Heuristic linearization A linearization procedure frequently used in problems of radiation heat transfer [3, 6, 7] consists of using the algebraic identity Ti4 − Tj4 = (Ti + Tj )(Ti2 + Tj2 )(Ti − Tj ) to define an effective conductance for the radiation coupling between nodes i and j. The equation R Rij (Ti4 − Tj4 ) = Kij (Ti − Tj ), defines the effective conductance R Kij = Rij (Ti + Tj )(Ti2 + Tj2 ) 7 for specified values of the node temperatures Ti and Tj . For an orbiting spacecraft, the natural base values of the node temperatures are the ones that correspond to the steady-state solution of the averaged equations, namely, Tei , i = 1, . . . , N. In the special case of radiation to the environment, Ri Ti4 can be replaced with linear terms KiR Ti such that KiR = 4Tei3 Ri , for i = 1, . . . , N. The resulting linear equations are: Ci Ṫi = Q̇i (t) − N X  R (Ti − Tj ) − KiR Ti , Kij + Kij j=1 i = 1, . . . , N, (14) These equations have only conduction couplings, so they are a discretization of the partial differential equations of heat conduction. As a linear system of ODEs, the standard form is Ṫi = X Jij Tj + j Q̇i (t) , Ci i = 1, . . . , N, (15) where J (the Jacobian matrix) is now given by:  R , if i 6= j, Jij = Ci−1 Kij + Kij # " N X  −1 R R − Jii = Ci Kik + Kik − Ki . (16) (17) k=1 The linear system of Eqs. (15) can be solved in the standard way, yielding:   Z t T (t) = exp [tJ] T (0) + exp [−τ J] · q(τ ) dτ , (18) 0 where we have introduced the vector q(t), with components qi (t) = Q̇i (t)/Ci . We can also express the solution in terms of the driving function F = q − hqi: T (t) = exp [tJ] T (0) + exp [tJ] T (0) + Z t exp [(t − τ )J] · (F (τ ) + hqi) dτ = (19) exp [(t − τ )J] · F (τ )dτ + J −1 (exp [tJ] − I)hqi (20) t 0 Z 0 For large t, this solution tends to the periodic stationary solution Z ∞ T ∞ (t) = exp [τ J] · F (t − τ )dτ − J −1 hqi, (21) 0 assuming that exp [tJ] → 0 as t → ∞. This is a consequence of the structure of J, as in the preceding section. In the present case, the eigenvalues of J, beyond having negative real parts, are actually negative real numbers, as we show below. The total conductance matrix K + K R is symmetric but this does not imply that J is symmetric. Nevertheless, if we define C = diag(C1 , . . . , CN ), the matrix C 1/2 · J · C −1/2 is symmetric, because its off-diagonal matrix elements are: R   Kij + Kij , = p C 1/2 J C −1/2 ij Ci Cj i = 1, . . . , N, j = 1, . . . , N, and i 6= j. Hence, the matrix C 1/2 JC −1/2 , similar to J, has real eigenvalues. Furthermore, C 1/2 JC −1/2 is diagonalized by an orthogonal transformation; that is to say, there is an orthogonal matrix O such that   Ot · C 1/2 J C −1/2 · O = (C −1/2 O)−1 · J · (C −1/2 O) is diagonal. Therefore, the thermal modes are actually normal; that is to say, the modes, which are the eigenvectors of J and hence the columns of the matrix P = C −1/2 O, are related to the eigenvectors of C 1/2 JC −1/2 , which are 8 normal and are given by the columns of O. Alternatively, one can say that the eigenvectors of J are normal in the “metric” defined by C; namely, N X Ci Pia Pib = δab , i=1 which can be written in matrix form as P t CP = I. Naturally, the orthogonality of modes greatly simplifies some computations. Furthermore, the symmetry of the conductance matrix implies that the sum in Eq. (14) can be written as the action of a graph Laplacian [17] on the temperature vector. Naturally, the graph is formed by the nodes and the linking conductances. A graph Laplacian is a discretization of the ordinary Laplacian and is conventionally defined with the sign that makes it positive semidefinite. The zero eigenvalue corresponds to a constant√function, that is, a constant temperature, in the present case. A vector with equal components, say, equal to 1/ N , is the positive (Perron) eigenvector of the matrix. With more generality, the Laplacian of a graph can be defined as a symmetric matrix with off-diagonal entries that are negative if the nodes are connected and null if they are not [18]. This definition does not constrain the diagonal entries and, therefore, does not imply that a graph Laplacian is positive semidefinite. It can be made positive definite (or just semidefinite) by adding to it a multiple of the identity matrix, which does not alter the eigenvectors. Of course, the eigenvector corresponding to the smallest eigenvalue does not have to be constant, but the Perron-Frobenius theorem [15] tells us that it is positive. By this general definition of a graph Laplacian, the matrix −C 1/2 JC −1/2 is a different Laplacian for the same graph, and Eqs. (15) contain the action of this Laplacian on the vector C 1/2 T . Notice that this general definition of a graph Laplacian is connected with the definition of a Z-matrix [15] and, actually, a symmetric Z-matrix is a graph Laplacian. If such a matrix is positive definite, then it is equivalent to a Stieltjes matrix, namely, a symmetric nonsingular M -matrix [15]. The general Jacobian obtained in Sect. II A is also such that −J and also −C 1/2 JC −1/2 are both nonsingular M -matrices, but they need not be symmetric. To investigate the accuracy of the approximation of the radiation terms by conduction terms, let us compare the periodic solution given by Eq. (21) with the first-order perturbative solution found in Sect. II A, namely, T ∞ (t) = ∞ Te + T(1) (t). Of course, the Jacobian matrices in the respective integrals differ, as do the temperature vectors added to the integrals, namely, Te or −J −1 hqi. While Te corresponds to the authentic steady-state of the nonlinear averaged equations, −J −1 hqi corresponds to the steady-state of Eqs. (14) after averaging, which is a state without significance, since we have already used the set of temperatures Te of the authentic steady-state to define the radiation conductances R ∞ Kij in Eq. (14). Therefore, the only sensible linear solution is the perturbative solution T ∞ (t) = Te + T(1) (t), even if we replace the Jacobian matrix given by Eq. (6) and (7) with the one given by Eq. (16) and (17). In our context, the notion of radiation conductance actually follows from the symmetry of the matrices CJ or R = 2Rij (Tei3 + Tej3 ), that C 1/2 JC −1/2 . Therefore, the most natural definition of radiation conductance probably is Kij is, the symmetrization of the term 4Rij Tej3 in Eq. (6). This symmetrization has been tested by Krishnaprakas [11], considering the steady-state problem for models with up to N = 1237 nodes and working with various resolution algorithms. He found that the effect of symmetrization is not appreciable. To estimate the effect of the antisymmetric part of the matrix 4Rij Tej3 , namely, 2Rij (Tei3 − Tej3 ), on the eigenvalue problem for the Jacobian, we proceed as follows. We formulate this eigenvalue problem in terms of the matrix C 1/2 JC −1/2 , so that it is an eigenvalue problem for a symmetric matrix perturbed by a small antisymmetric part. This problem is well conditioned, because the eigenvectors of the symmetric matrix (the columns of the matrix O) are orthogonal. In particular, the perturbed eigenvalues are still real. Furthermore, the first-order perturbation formula for the eigenvalue λa associated with an eigenvector ea [16] yields: δλa = N X δAij eai eaj = 0, i,j=1 vanishing because the perturbation matrix δA is antisymmetric. So the nonvanishing perturbative corrections begin at the second order in the perturbation matrix, and, in this sense, they are especially small. 9 III. FOURIER ANALYSIS OF THE PERIODIC SOLUTION ∞ Given that T(1) (t) is a periodic function, it can be expanded in a Fourier series. To derive this series, let us first introduce the Fourier series of F (t), F (t) = ∞ X F̂ (m) e2πimt/T . m=−∞ ∞ Inserting this series in the integral of Eq. (10) and integrating term by term, we obtain the Fourier series for T(1) (t). ∞ Alternatively, we can substitute the Fourier series for both T(1) (t) and F (t) into Eqs. (5), where J is taken to be ∞ constant; then we can solve for the Fourier coefficients of T(1) (t). The result is ∞ (t) = T(1) ∞ X m=−∞ −1 e2πimt/T (2πimI/T − J) · F̂ (m) , (22) The Fourier coefficients F̂ (m) are obtained by integration: 1 F̂ (m) = T Z T F (t) e−2πimt/T dt . (23) 0 Given that F (t) is a real function, F̂ (−m) = F̂ ∗ (m). (24) F̂ (0) = 0. (25) Furthermore, hF (t)i = 0 implies So F (t) is defined by the sequence of Fourier coefficients for positive m. This sequence must fulfill the requirement that limm→∞ F̂ (m) = 0, so a limited number of the initial coefficients may suffice. Actually, for numerical work, Eq. (23) can be conveniently replaced by the discrete Fourier transform F̂ (m) = n−1 1X F (kT /n) e−2πimk/n , n (26) k=0 which only requires sampling of the values for F (t), but also only defines a finite number of independent Fourier coefficients, because F̂ (m + n) = F̂ (m). Notice that we usually have available just a sampling of the heat inputs at regular time intervals, rather than the analytical form of Q̇i (t). To calculate the exact number of independent Fourier coefficients provided by Eq. (26), we must take into account Eqs. (24) and (25). If n is an odd number, the independent Fourier coefficients F̂ (m) are the ones with m = 1, . . . , (n − 1)/2; that is to say, there are n − 1 independent real numbers. If n is even, the independent Fourier coefficients are the ones with m = 1, . . . , n/2, and F̂ (n/2) = n−1 1X (−)k F (kT /n) n k=0 is real, so there are n − 1 independent real numbers as well. For definiteness, let n be odd. Then, we can express F (t) as   (n−1)/2 X F̂ (m) e2πimt/T  . F (t) = 2 Re  m=1 Of course, the values of F (t) at t = kT /n, k = 0, . . . , n − 1, are the sampled values employed in Eq. (26), but the expression is valid for any t ∈ [0, T ] and constitutes an interpolation of the sampled values. Naturally, the higher the sampling frequency n, the more independent Fourier coefficients we have and the more accurate the representation of F (t) is. 10 As is well known, the Fourier series of a function F (t) that is piecewise smooth converges to the function, except at its points of discontinuity, where it converges to the arithmetic mean of the two one-sided limits [19]. However, the convergence is not uniform, so that partial sums oscillate about the true value of the function near each point of discontinuity and “overshoot” the two one-sided limits in opposite directions. This overshooting is known as the Gibbs phenomenon, and, in our case, produces typical errors near the discontinuities of the driving function F . These discontinuities are due to the sudden obstructions of the radiation on parts of the aircraft that occur at certain orbital positions, for example, when the Sun is eclipsed.2 Section IV B shows that the Gibbs phenomenon at eclipse points can be responsible for the largest part of the error of the linear method when the discrete Fourier transform is used. ∞ The approximation of T(1) (t) provided by the n samples of F (t) is, of course,  ∞ T(1) (t) = 2 Re  (n−1)/2 X m=1 −1 e2πimt/T (2πimI/T − J)  · F̂ (m) , (27) ∞ and is valid for any t ∈ [0, T ]. However, if we are only interested in T(1) (t) at t = kT /n, k = 0, . . . , n − 1, we can compute these values with the inverse discrete Fourier transform ∞ (kT /n) = T(1)     −1  n−1 n−1 e2πimk/n 2πi mod m + I/T − J · F̂ (m) , ,n − 2 2 m=0 n−1 X (28) where, for m = (n + 1)/2, . . . , n − 1, F̂ (m) = F̂ (m − n) = F̂ ∗ (n − m), and where mod (·, n) gives the remainder of the integer division by n. This inverse discrete Fourier transform can be more convenient for a fast numerical computation. Regarding computational convenience, the discrete Fourier transform, be it direct or inverse, is best performed with a fast Fourier transform (FFT) algorithm. The classic FFT algorithm requires n to be a power of two [20, 21]; in particular, it has to be even. ∞ The function T(1) (t), computed by Fourier analysis from n samples of Q̇i (t), is to be compared with the one computed by a numerical approximation of the integral formula, Eq. (10), in terms of the same samples. Naturally, we can use instead of the integral over τ ∈ [0, ∞] the integral over τ ∈ [0, T ] below Eq. (10). This integral can be computed from the n samples of F (t) by an interpolation formula, say the trapezoidal rule. It is not easy to decide whether this procedure is more efficient than Fourier transforms. Considering that the substitution of the continuous Fourier transform, Eq. (23), by the discrete transform, Eq. (26), is equivalent to computing the former with the trapezoidal rule, the integral formula may seem more direct. In particular, this formula allows us to select the values ∞ of t for which we compute T(1) (t) independent of the sampling frequency, so we can choose just a few distinguished ∞ orbital positions and avoid the computation of all the n − 1 integrals (one is removed by the condition hT(1) (t)i = 0). Note that the computation of all of the independent F̂ (m) with Eq. (26) is equivalent to the computation of precisely n − 1 integrals. However, the efficiency of the FFT reduces the natural operation count of this computation, of order n2 , to order n log n; so its use can be advantageous, nevertheless. ∞ It goes without saying that the second-order perturbative contribution T(2) (t) to the stationary solution is given by the right-hand side of Eq. (27) with the Fourier coefficients F̂ (m) replaced by the Fourier coefficients of the function G(t) defined in Sect. II A 1. IV. TEN-NODE MODEL OF A MOON-ORBITING SATELLITE To test the previously explained methods, we construct a small thermal model of a simple spacecraft, namely, a ten-node model of a Moon-orbiting satellite. Our satellite ten-node model supports a basic thermal structure and is simple enough for allowing one to explicitly display the main mathematical entities, e.g., the matrices K, R and J. The satellite consists of a rectangular parallelepiped (a cuboid) of square base plus a small cylinder on one of its sides that simulates an observation instrument, as represented in Fig. 1. In addition, at a height of two thirds of the total height, there is an inner tray with the electronic equipment. The dimensions of the cuboid are 0.2 m × 0.2 m × 0.3 m, and the cylinder has a length of 0.1 m and a radius of 0.04 m. The satellite’s frame is made of aluminum alloy, using 2 Strictly speaking, the function Q̇i (t) is always continuous but it undergoes sharp variations at some times. These sharp variations can be considered as discontinuities, especially, if the function is sampled. 11 Node id. 6 Ext. Optical: Low ε t: 1 mm Node id. 4 Ext. Optical: Solar cells t: 2.25 mm Node id. 7 t: 2 mm Node id. 9 Node id. 2 Ext. Optical: Low ε t: 1 mm Node id. 10 Node id. 3 Ext. Optical: Solar cells t: 2.25 mm Node id. 8 Ext. Optical: Low ε t: 0.5 mm Node id. 5 Ext. Optical: White t: 2 mm FIG. 1: Satellite’s structure and node description. The front face, removed to see the interior, corresponds to node 1 and is equivalent to nodes 3 or 4. Node Ci (J/K) hQ̇i i (W) Tei (◦ C) 1 331.7 15.18 2.6 2 147.4 2.30 3.6 3 331.7 15.17 2.6 331.7 14.80 2.3 4 5 196.6 3.91 0.2 6 98.3 0.63 2.2 196.6 0 6.3 7 8 31.9 1.70 4.7 800.0 4.35 15.9 9 10 1400.0 6.15 11.1 TABLE I: Node capacities and mean heat inputs with their associated steady-state temperatures. plates 1 mm thick, except the bottom plate, which is 2 mm thick. This plate plays the role of a radiator and its outer surface is painted white to have high solar reflectance. The cylinder is made of the same aluminum alloy, as well as the tray; they are 0.5 mm and 2 mm thick, respectively. The sides of the satellite, except the one with the instrument, are covered with solar cells, which increase the sides’ thickness to 2.25 mm. The thermal model of the satellite assigns one node to each face of the cuboid, one more to the cylinder and another to the tray, that is, eight nodes altogether. Furthermore, to conveniently split the total heat capacitance of the electronic equipment, it is convenient to add two extra nodes with (large) heat capacitance but with no surface that could exchange heat by radiation. Nodes of this type are called “non-geometrical nodes”. In the present case, they represent two boxes with equipment placed above and below the tray, respectively. We order the ten nodes as shown in Fig. 1. The lower box (node 10) is connected to the radiator by a thermal strap. Given the satellite’s structure and assuming appropriate values of the specific heat capacities, it is possible to compute the capacitances Ci , i = 1 . . . , 10, with the result given in Table I. Using the value of the aluminum-alloy heat conductivity and assuming perfect contact between plates, we compute the conduction coupling constants Kij between nodes i, j = 1, . . . , 8. The remaining conduction coupling constants are given reasonable values, shown in Eq. (29). The computation of the radiation coupling constants Rij , i, j = 1, . . . , 8, and Ri , i = 1, . . . , 8, and indeed the computation of the external radiation heat inputs requires a detailed radiative model of the satellite, consisting of the geometrical view factors and the detailed thermo-optical properties of all surfaces. This radiative model allows us to compute the respective absorption factors [1]. The thermo-optical properties of the surfaces are assumed to be as realistic as possible, given the simplicity of the thermal model. All radiation reflection is assumed to be diffuse, as is common for many types of surfaces. The inner surfaces are painted black and have high emissivity, ε = 0.84, to favor the uniformization of the interior temperature. The outer surfaces are of three types. The three sides covered with solar cells also have high emissivity, ε = 0.84, to 12 Ε = 0.84 Α = 0.75, Ε = 0.84 Α = 0.2, Ε = 0.1 Α = 0.2, Ε = 0.8 FIG. 2: Thermo-optical properties of the satellite’s surfaces (details are given in the text). favor the cooling of the solar cells. On the other hand, they have high solar absorptivity, αs = 0.75. Of this 0.75, 0.18 is processed into electricity and the remaining 0.57 dissipates as heat in the solar cells. The top surface, the surface with the cylinder, and the cylinder itself (its two sides) have low emissivity, ε = 0.1, and low solar absorptivity, αs = 0.2, which are chosen to simulate the effect of a multilayer insulator. In contrast, the bottom surface simulates a radiator, with ε = 0.8 and αs = 0.2 (like an optical solar reflector). All of these thermo-optical properties are summarized in Fig. 2. For the computation of the corresponding absorption factors, we employ the ray-tracing Monte-Carlo simulation method provided by ESARADTM (ESATANTM ’s radiation module) [14]. Taking into account the above information, one obtains the following conduction (in W/K) and radiation (in W/K4 ) matrices:   0 3.47 0 5.64 2.86 2.00 4.50 0 0 0  3.47 0 3.47 0 1.67 1.33 3.50 3.00 0 0      0 0   0 3.47 0 5.64 2.86 2.00 4.50 0    5.64 0 5.64 0 2.86 2.00 4.50 0 0 0    1  2.86 1.67 2.86 2.86 0 0 0 0 0 3.00   , (29) (Kij ) = 10  0 0 0 0 0   2.00 1.33 2.00 2.00 0    0 0 0 4.50 6.00   4.50 3.50 4.50 4.50 0    0 3.00 0 0 0 0 0 0 0 0     0 0 0 0 0 0 4.50 0 0 0  0 0 0 0 3.00 0 6.00 0 0 0   0 5.06 4.63 5.05 3.68 2.71 6.39 0 0 0  5.06 0 5.05 4.63 3.68 2.70 6.39 0.13 0 0       4.63 5.05 0 5.06 3.69 2.71 6.39 0 0 0     5.05 4.63 5.06 0 3.69 2.70 6.38 0 0 0     0 0 3.57 0 0 0  −10  3.68 3.68 3.69 3.69 , (Rij ) = 10 (30)  2.71 2.70 2.71 2.70 0 0 7.19 0 0 0      0 0 0  6.39 6.39 6.39 6.38 3.57 7.19 0    0 0.13 0 0 0 0 0 0 0 0    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (Ri ) = 10−9 (2.86, 0.32, 2.86, 2.86, 1.81, 0.23, 0, 0.23, 0, 0). (31) The satellite’s thermal characteristics are defined by the data set {Ci , Kij , Rij , Ri }, but the radiation heat exchange depends on the nodal temperatures, which in turn depend on the heat input. As explained in Sect. II A, the appropriate set of nodal temperatures corresponds to the steady-state for averaged heat inputs, given by the algebraic equation 13 FIG. 3: The 111 positions of the satellite in its orbit. The sunlight comes along the x axis. that results from making Ṫ(0)i = 0 in Eq. (4). Since we need the external heat inputs and, therefore, the orbit, we proceed to define the orbit characteristics. We choose a circular equatorial orbit 26 926 m above the Moon’s surface, such that T = 6660 s. The radiation heat input to the satellite consists, on the one hand, of the solar irradiation and the Moon’s albedo, and, on the other hand, of the Moon’s constant IR radiation. We take 0.12 for the mean Moon’s albedo and 270 K for the blackbody equivalent temperature of the Moon. There is also heat produced by the dissipation of electrical power in the equipment (nodes 9 and 10). For the sake of simplicity, the dissipation rate is assumed to be constant, equal to the mean electrical power generated in an orbit. In a part of the orbit, the Moon eclipses the Sun, so the satellite receives no direct sunlight or albedo, although there is always IR radiation from the Moon. The satellite is stabilized such that the cylinder (the “observation instrument”) always points to the Moon and the longer edges are perpendicular to the orbit. The radiation heat input can be computed by taking into account the given orbital characteristics and the satellite’s thermo-optical characteristics, in particular, the absorption factors. It has been computed with ESARADTM , taking 111 positions on the orbit, that is, at intervals of one minute. In Fig. 3, all 111 positions are plotted. The initial position of the satellite is at the subsolar point and it moves towards the east. The total external radiation heat input to the first eight nodes (the ones that receive radiation) is plotted in Fig. 4 (only at every other position, for clarity). Note the symmetry between nodes 1 and 3, which denote the lateral faces, covered with solar cells. Node 4 corresponds to the back side, also covered with solar cells. So the external radiation load on it has a similar time variation, but it is displaced. The solar radiation absorbed by all solar cells results in an orbital mean power rate of 10.5 W, dissipated in the equipment and split between nodes 9 and 10, which receive 4.35 and 6.15 W, respectively. The external radiation absorbed by the side with the cylinder (node 2) is considerably smaller than the radiation absorbed by the sides with solar cells, due to the low value of αs (and of ε, as well) for the corresponding surface. The bottom and top outer surfaces, which belong to nodes 5 and 6, respectively, have view factors for the external radiation that are much less favorable than those of the side surfaces. Nevertheless, the amount of lunar IR radiation absorbed by the bottom surface, due to its high ε, is such that the orbital mean of the external heat input to node 5 is, in fact, larger than the one for node 2 (see Table I). Naturally, node 7, with no outer surfaces, does not absorb any external radiation. To determine the hot and cold cases of the orbit, we compute the total heat load on the satellite for each position in the orbit, finding a maximum of 90.59 W at position 14 and a minimum of 18.65 W at any position in the eclipse, during which all the heat loads stay constant. The solution of the corresponding steady-state problems at position 14 and at a position in the eclipse yields the two sets of nodal temperatures (for the given node order): Hot {29.0, 35.5, 41.2, 38.5, 30.2, 35.1, 39.1, 35.0, 48.7, 42.9} ◦ C. Cold {−46.8, −45.0, −46.8, −49.1, −45.7, −47.1, −42.8, −44.1, −33.2, −37.0} ◦ C. The results in Sect. IV A show that the periodic thermal state does not reach these extreme temperatures, which could endanger the performance of the satellite. 14 Q̇i (W) 50 40 30 20 Sfrag replacements Q̇i (W) ì ò 3 2 æææææææ ææææ æææ ææææ æææ æææ ææææææææææææææææææææææææææææææææ ò ò ò ò òò ò ò ò ò ò ò ò ò ò ò ò ò òòòòòòò òòòòòò ò æ PSfrag replacements ò ò æ ò æææææææææææ ì ììììììì ò ææææææææææææææææææææææææææææææ ì ì ììììììììììììììììììììììììììì ìììì ò àààààààààààààààà ò àààààààààààà àààààààààààààààààààààààààààà òòòòòòòòòòòòòòòòòòòòòòòòòòòò 20 4 æ ò ì 10 ææææ æ æ ò æ òò æ ò ò æò òæ ò æ ò æ ìì ìì ì ì ì òòò ì ò ò ì ò ì ò ìò ì ò ò ì 40 60 (a) nodes 1–4 80 100 1 t ààààààà àààà òòòòòòòòòòòòòòòòòòòòòòòòò ààà àààà ààà ààà àààààààààààààààààààààààààààààààà ìììììììììììììììììììììììììììììììììììììììììììììììììììììììì 20 40 60 (b) nodes 5–8 80 t 100 FIG. 4: Variation of the external heat input with time t (in minutes) along the orbit. For both plots, the node numbers are denoted by shape, in the order: dots (1,5), squares (2,6), diamonds (3,7), and triangles (4,8). A. Jacobian matrix and periodic solution We compute the averages hQ̇i i and substitute for them and the data set {Kij , Rij , Ri } in Eq. (4) to find the steady state temperatures. The results are given in Table I. Then, according to Eqs. (6) and (7), the Jacobian matrix is (in s−1 )   −6.99 1.18 0.12 1.83 0.95 0.67 1.52 0 0 0  2.64 −12.93 2.64 0.26 1.33 1.06 2.75 2.04 0 0      1.17 −6.99 1.83 0.95 0.67 1.52 0 0 0   0.12    1.83 0.12 1.83 −7.64 0.95 0.67 1.52 0 0 0     1.01 1.61 1.61 −8.26 0 0.16 0 0 1.53  −3  1.61 . J = 10  1.59 2.27 2.27 0 −9.20 0.64 0 0 0   2.27    2.06 2.56 2.56 0.15 0.31 −15.60 0 2.29 3.05   2.56    0 9.43 0 0 0 0 0 −10.05 0 0     0 0 0 0 0 0 0.56 0 −0.56 0  0 0 0 0 0.21 0 0.43 0 0 −0.64 By inspection, one can check that it has nonnegative off-diagonal P and negative diagonal elements, that is to say, −J is a Z-matrix. It is also diagonally dominant, namely, |Jii | ≥ j6=i |Jij |. The eigenvalues of J are −10−4 {182.20, 154.30, 103.40, 98.03, 86.12, 71.09, 71.04, 14.90, 5.70, 1.72}. Their inverses (in absolute value) give us the typical relaxation times of the corresponding thermal modes. Thus, we deduce that relaxation time of the fastest mode is about 55 s, whereas the relaxation time of the slowest one is 5 813 s. The latter time is similar to T = 6 660 s. The eigenvalues are real numbers and, furthermore, J is diagonalizable, because the eigenvalues are different. Both properties also follow from C 1/2 JC −1/2 being almost symmetric: its antisymmetric part, δA = (C 1/2 JC −1/2 − C −1/2 J t C 1/2 )/2, is relatively small, namely, kδAk/kC 1/2 JC −1/2 k < 10−3 , where the matrix norm is the Frobenius norm (other standard matrix norms yield similar values). Therefore, the notion of “radiation conductance” (Sect. II B) is appropriate in this case, as concerns its use in the linear equations. The thermal modes are almost normal, namely, the eigenvector matrix P is such that P t CP = I with an error < 0.002. The most interesting eigenvector of J is, of course, the positive (Perron) eigenvector, which corresponds to the slowest mode. The normalized positive eigenvector is (0.259, 0.276, 0.259, 0.257, 0.275, 0.267, 0.327, 0.264, 0.471, 0.423) K. Note that the temperature increments are of a similar magnitude, except the ones of node 7 and, especially, nodes 9 and 10, which are associated, respectively, for the tray and the boxes of electronic equipment. The next mode, 15 Ti∞ (◦ C) Ti∞ (◦ C) 30 20 Sfrag replacements 10 Q̇i (W) -10 ì ìììì ìì ìì ì ììòòòòòòòòòòò òòò ì ìòò ì 20 òò ì òæ ààà ì àæ à ææ òæ à ôôôôôôô òò òæ ôà à ì æ ô ò æ à ì òòò ààààì òòòòòòòò ô ô ò ò òò à ôô æì æ ôô òæ àì òò à òòæ ô ò òò ì ààà ô à à ò ì ô ôô òò ò àì ôô æ òæ ò ò à à æ òò ì ààà òò ì ô æ òæ à ô ìôô æ òæ ô à ì ì æ æ ì à æ à æ ì à ò òò òæ æ ô àì æ à ôôôôôô à ì æ ô ô ò àì òòòòòòòòòòòæ æ ô PSfrag replacements à ì ô ô æ æ àì 10 æìà ò àæ òô à ô ôææ ææææ ô àà æ æ ì ààì ô à ô æ à ô æ æ òô æ ôôô æ ôô ææææ ôô àì ì æ ò àà Q̇ ôæ æ æìàà ô ôô ì æ ì àì ì òì ôà ôôôô ì ô i (W) ôô ô æ ò àà ì ì à ô æ ô ô à æ à ô ô ôôôôôì ô æì à à ì ôà ô òì à æ àà æ ô à ì æ ì ô ì æ ô ò ì òì æôà à ìà ô t æìì ààà æôàà òì æ à ìà æ ôì æôôà æ ì 60ààà à æ 100 àòô100 ì 20 40 80 ì 20 40 òì 80 æ ôà 60 æ à ì à òì àòôì àà æì ôà æ ìì òì ààà ì à æ ôà æ à ôì ææ ì ôà òæ æì ôà ààì à æ òì ìì ôà æì òì àôô ôà òæ æ à æì ô ì à òì æ ô ôà òòæì ææì ææ ììì àôòì ôà -10 æ ôà ææì ôà òòì ææ ììì ôà ôà ææì ôô ì òòì æææ ìì æ ææì òòì ì æì ò ì òòì æ æ ææææ òòòò t (b) nodes 6–10 (a) nodes 1–5 FIG. 5: Variation of the ten nodal temperatures with time t (in minutes). For both plots, the node order is: dots (1,6), squares (2,7), diamonds (3,8), upward triangles (4,9), and downward triangles (5,10). corresponding to the eigenvalue −5.70 · 10−4, has one negative component (the ninth), and the remaining modes have more than one. ∞ To calculate T(1) (t), we choose the Fourier series of Eq. (27) or, rather, the inverse discrete Fourier transform of Eq. (28), which can be computed with a FFT algorithm. The Fourier coefficients F̂ (m) can also be computed with ∞ the FFT, according to Eq. (26). Once the vector T(1) at the 111 positions is available, the set of nodal temperatures corresponding to the first-order perturbative solution is T ∞ (t) = Tei + T ∞ (t), i = 1, . . . , 10, plotted in Fig. 5. A i (1)i measure of the accuracy of this perturbative calculation is given by the second-order calculation in the next section. The truncation of the Fourier series imposed by the sampling of F also is a source of error, unrelated to perturbation ∞ theory. The piecewise smoothness of the function T(1) (t) suggests that the error is small (but see Sect. IV B). It is also interesting to see if the first-order perturbative calculation is affected by neglecting the fastest modes: according to the analysis at the end of Sect. II A, these modes are expected to contribute in proportion to their relaxation times. The fastest mode relaxes in about 55 s, a short but non-negligible time. As a consequence, its ∞ contribution to T(1) , which we find to have a maximum magnitude of 0.8 K, is small but non-negligible. But we can deduce that still faster modes, which would appear in a thermal model of the satellite with more nodes, are hardly necessary. From the engineering standpoint, note that this satellite thermal model is successful, insofar as it predicts that all nodal temperatures stay within adequate ranges. In particular, nodes 9 and 10, corresponding to the boxes with electronic equipment, stay within the range from 4 to 23 ◦ C. These nodes are inner nodes with large thermal capacity and, hence, are protected against the larger changes in the external heat inputs. In contrast, the outer nodes are very exposed and undergo considerable variation in temperature, with especially sharp changes at the beginning and end of the eclipse. 1. Second-order correction ∞ According to Sect. II A 1, the second-order perturbative correction T(2) to the periodic stationary solution is obtained ∞ by the same procedure as that for T , but using a different driving function G that is computed from Te and from (1) ∞ T(1) itself. The computations are straightforward and they yield the correction plotted in Fig. 6. This correction is always negative, because the negative term in the expression for G, Eq. (13), dominates over the positive term. The ∞ ∞ ∞ ∞ equation (10) for T(1) and the corresponding equation for T(2) are both linear, so T(1) and T(2) are proportional to the respective driving functions; and we can compare their magnitudes by comparing those driving functions, say, ∞ 2 . This latter quantity can be roughly estimated as 6 · 2 · 10−9 · 3002 · 202 comparing typical values of Q̇ and 6Ri Tei2 T(1)i ∞ ∞ W ≃ 0.4 W, whereas Q̇ ≃ 10 W (Table I). Their ratio is about 25, which roughly agrees with the ratio of T(1) to T(2) , as can be seen by comparing Fig. 5 to Fig. 6. The order of magnitude of the second-order correction suggests that higher orders are not necessary, as we show next. 16 ∞ T(2)i (K) ∞ T(2)i (K) -0.8 Sfrag replacements Q̇i (W)-1.0 -1.2 Ti∞ (◦ C)-1.4 ìììììì ì ì ìì ìì ôôôà ìì ììì ì ôô ìì ôì ì ààà ìì ààààà ôì àà -0.7 à ì ôôô ì æ æ ôô à ôô æ ì æì ôà àà ææ ôô æææ æ ì àààì æ ì ôæ æ æ à à æ ô à ô à æ ô ì æ æ ì ì æ à òòò ì æ ì ô à ôà æ àôô ò òò ì ì æ æ ì à ô æà æ ì æ ôà ì à òà ô àààààà ì ì àà æ àà òæ ô æææ òò ææ à àæ òà æ ô ô òà æ ì æà òì ìææ ì æ à à ô àæ ô òì ò à ææææ àà ô æ ææ òì æ ì à ì æ à òà à æ æ à à ô ô æ ôôôô ô ò ôôô à ô ô ô æ ô à ô ì æ ò æ ò ô ì ô ô ì æ òòòò æ ôô ì æ àô àô ìà ô òì à òô æ òòòò æ -0.8 ô æ ò ò ô ò ì æ ò ò à ò ò æ æ ò æ ô ò ô æ ô ò ô à ò ò ô ò æ æ æôà à ôò òò ì àô æ à ôò òò ô ô ò àôô òòò ì òæì òòò æ à ô à ô ò ò ôô ôô ôòìreplacements ò ôô æ àPSfrag òò ôô òò ìæ ô æ ôà òò ì æìà òòòò òì òò òòò àô æ à òôì àô æ à ôô òò æ ìà òô ôò òô òò òô ôôà àôô ì òòòòòò òòò æ ôàòì ôò ôì òòô ìà òì ôô ôô òòô òòô ôôô æ àà æ à à æ ò à à à à ì Q̇ (W) æ æ -0.9 i à ì ì æì à òì ì æ æ ò àà àæ æìà òì ì àì à æì à ì à à ì ò ò ì àæ æì à à à ì à ì òì òì æ -1.0 æ àà ì ì ì æ ì æ ììì æ ì æ ∞ ◦ æ æ Ti ( C)-1.1 ì æì ì æ æ æ ì ì æì æ t æ ì ææ ì æ ì 20 ìì 40 60 80 100 20 (a) nodes 1–5 40 60 (b) nodes 6–10 80 t 100 FIG. 6: Second-order correction to the temperatures (same node order as in Fig. 5). B. Direct integration of the nonlinear equations Of course, the periodic solution T ∞ (t) can also be obtained by direct integration of the nonlinear Eqs. (1) with an adequate solver, based on Runge-Kutta or other methods [13]. Since the nonlinear analysis proves that the solution of Eqs. (1) will converge to the stationary periodic solution [9], the numerical solver must be run until this periodicity is established. Periodicity can be enforced by comparing the nodal temperatures at the beginning and the end of every period and demanding that they be equal, within some tolerance. To do this, ESATANTM provides the routine SOLCYC [14]. We have employed this routine to obtain the nonlinear equations’ cyclic solution (which is established in 10 periods if the tolerance is set to 0.001). nodes 1, 3 and 8 ∆Ti (K) à PSfrag replacements 0.4 Q̇i (W) æ à ì ì ì à à ì à ì ææ ì ààì ààì àì àì ì ææææì àì ààì ææ àì æì ì æææ àæàæì æ àì àæì æ æì àì àæì àæì ææ æ ææææææææææææì àì æì àì ææì æì æ àì æì ì àì àì æ ì æ ì ìàæì ì æì æì ì æì æ ì à æ ì ì æ ì ææææææææàæàæà ì æ ì æ ì à æ æ ì æ æ æ æ à ì æ ì æ à ì æ ì ì ì æ à à ∞ ◦ æ ì ì ì à æ à ì à æ à à æ à æ à à æ æ à à ì æ ì à à à à àì æ àì ìàààà æ àì ààà àì æ àì àì àì æ æì àì àì æ æì àì àì æ æ àì Ti ( C) àì ààì àì æ æ àì àìì ààì ààì àì æ æ àì àààààààààààààìàìàìì æ æ àì àì æ æ àì àì æ àì æ àìì àì æàæ æ ì àì ì à æ à æì ì 20 à 40 60 80 ì æ à 100 æì æ ì æ -0.2 ì ∞ æì T (K) 0.2 t (2)i à -0.4 æ FIG. 7: The error in the temperature computed up to the second order. Only showing nodes 1 (dots), 3 (squares), and 8 (diamonds), which give rise to the largest errors. To compare the cyclic solution obtained by the linear method with the “exact” solution T ∞ (t) obtained by SOLCYC, we quantify the deviation by the vector of “errors” i h ∞ ∞ (t) + T(2) (t) . ∆T (t) = T ∞ (t) − Te + T(1) The largest components of ∆T are plotted in Fig. 7 (the remaining components stay in the range [−0.1, 0.1] ◦C). There seem to be two branches for each node, but, in fact, it is an effect produced by the high-frequency oscillations ∞ ∞ (t); namely, |∆T (t)| ≪ |T(2) (t)| for of each ∆Ti (t). Notice that the error is generally small when compared with T(2) each t = kT /n, k = 0, . . . , n − 1, except near the two positions corresponding to the beginning and end of the eclipse, where the heat inputs have discontinuities (Fig. 4). These discontinuities induce oscillations of certain amplitude about the true values of T ∞ (t), due to the Gibbs phenomenon in the discrete Fourier transform (Sect. III). To suppress the oscillations, we would need a specific method for treating the Gibbs phenomenon; for example, we could use a smoother method for Fourier series summation, such as Cesàro summation [19] 17 V. SCALABILITY AND COMPLEXITY OF THE LINEAR METHOD The ten-node model studied in Sect. IV is too small to pose a computational problem, whether we employ the linear method or directly integrate nonlinear Eqs. (1). To assess the practical applicability of the linear method, we must study how it scales to realistic sizes and then compare it with the direct integration of Eqs. (1). Naturally, the first step in the method is to compute the steady-state temperature Tei , but this computation, arguably, is not a substantial part of the whole process and we do not consider it (it may take, say, between a few percent and one fith of the whole process, depending on the circumstances). The size of an orbiting spacecraft thermal model can be scaled with respect to the number of nodes, N , or the number of different positions in the orbit, n. However, while realistic models must have many nodes, an n of about one hundred can generally be suitable. Note, in particular, that the condition that N ≪ n in the ten-node model is likely to be reversed in realistic models. For these reasons, the scaling with respect to N is more relevant. For the moment, let us neglect any special feature of Eqs. (1), such as possible coefficient sparsity. Then, the computational complexity of numerically integrating those equations is of order N 2 k, where k is the number of time steps taken. On the other hand, the complexity of the numerical integration of linear Eqs. (5) is also of order N 2 k [excluding the computation of J(t)]. We can employ the explicit integral, Eq. (8), which can be calculated with the trapezoidal rule, for example, but this does not reduce the complexity of the computation. However, for the stationary solution, Eq. (10), its expression as an integral over a period T sets the number of time steps to n, which is advantageous if n < k, where k now is the number of steps necessary for some initial temperatures to relax to the stationary solution. Since we have to evaluate the integral in Eq. (10) for several times t, it is preferable to use the FFT, as discussed in Sect. III, so that the total operation count is of order N 2 n log n. However, we have not taken into account matrix operations of considerable complexity. For example, the discrete Fourier transform, Eq. (27), involves the inverse of an N × N matrix (−J plus a multiple of the identity matrix), and the inversion of a matrix is generally a process of order N 3 [20]. If we have to employ a process of order N 3 , we may as well diagonalize J, because the diagonalization of a matrix also is generally a process of order N 3 [20] and the diagonalization of J has several uses. Let us assume that we carry out this diagonalization and determine the independent thermal modes, which can then be employed to express Eq. (10) as Eq. (11) or to simplify the matrix operations in Eq. (27). If we roughly compare the computational complexity of order N 3 with the numerical integration complexity of order N 2 k, we deduce that the diagonalization is worthwhile when N < k. Using the above estimate n ∼ 100 and taking as relaxation time k ∼ 5n (the rough value for the ten-node model), we deduce that the determination of thermal modes can be useful just as a computational procedure for models with a few hundred nodes. Let us now consider that J is surely a sparse matrix, so iterative matrix methods can take advantage of this characteristic. In fact, there are two degrees of sparsity in J, associated with conduction or radiation coupling terms. The conductance matrix K has to be very sparse, because conduction is a local process, so each node can only be coupled to a few nodes. In contrast, radiation is a nonlocal process and couples any pair of nodes that has a nonvanishing view factor. In addition to the different sparsity of conduction and radiation coupling matrices, there are two other circumstances that make them different: (i) we are assuming that the conductive coupling matrix just depends on material properties, so it is independent of the reference temperatures Tei ; (ii) the conduction coupling terms are significantly larger than the radiation coupling terms for the natural values of those temperatures. All of this suggests separating the conduction and radiation parts of J, and then diagonalizing the conduction part. Based on the study in Sect. II B, the diagonalization of the conduction part of J boils down to the diagonalization of the (generalized) Laplacian matrix −C −1/2 KC −1/2 , and this matrix is sparse. Suitable iterative algorithms to perform this diagonalization are, for example, the Lanczos [21] or the Davidson [22] algorithms. These algorithms are particularly useful when only a few of the largest or smallest eigenvalues are needed. This is indeed our case, as only ∞ ∞ the slower modes are expected to contribute to T(1) and T(2) . Once the conduction part of J has been diagonalized, in the sense that the lowest eigenvalues and eigenvectors of the corresponding Laplacian matrix are known, the radiation part of J can be treated as a perturbation, using matrix perturbation methods [16, 21]. Iterative matrix methods, combined with matrix perturbation methods or other methods, if necessary, can reduce the order N 3 to N 2 or even to almost linear and so allow us to diagonalize the Jacobians for the largest values of N that appear in current thermal spacecraft models. Of course, the sparsity of thermal coupling matrices also facilitates the direct integration of the nonlinear Eqs. (1). However, their nonlinearity prevents one from taking advantage of the above mentioned approximations methods, for example, the reduction to the small subspace of slow modes, or the splitting into conduction and radiation in which the latter is treated as a matrix perturbation. Moreover, the linearization is useful in various respects. For example, the overall relaxation time, given by the eigenvalue of smallest magnitude, can be effectively bounded by inequalities [23] and some of these bounds can be found with little computational effort. 18 VI. SUMMARY AND DISCUSSION We have studied the evolution of the thermal state of an orbiting spacecraft and developed a linear approach to this problem that is based on a rigorous perturbative treatment of the exact nonlinear equations. The firstorder perturbation equations, Eqs. (5), constitute the basic linear system, which can be applied to higher orders after calculating the corresponding driving terms. As the Jacobian matrix of the nonlinear equations has negative eigenvalues, the linear equations describe the relaxation to a stationary thermal state, namely, a periodic solution that is independent of the initial conditions and only depends on the external heat input. This relaxation is similar to the relaxation to steady-state under constant external heat load. We have shown that the perturbative treatment reveals the scope of a common linearization procedure of a heuristic nature, in which the nonlinear equations are rendered linear by the definition of radiation conductances (Sect. II B). If one previously calculates, with the correct nonlinear Eqs. (4), the reference steady-state condition that corresponds to the average external heat input, the deviation from that steady-state is well approximated by the linear equations with radiation conductances. The Jacobian matrix corresponding to radiation conductances, obtained in Eqs. (16) and (17), is related to a symmetric matrix and, therefore, is easier to diagonalize. Furthermore, this relation implies that the thermal modes are normal, like the vibrational modes of a mechanical system. Although the notion of radiation conductance is just an approximation, it serves nonetheless to show that the Jacobian matrix is diagonalizable and has real eigenvalues. The diagonalization of the Jacobian matrix is useful for the computation of the stationary thermal state and also provides information on the relaxation to that state, because the relaxation times of the thermal modes are the inverses of the eigenvalues. These times span a considerable range, but the longest times are much more significant than the shortest times, because the latter depend on the details of the lumped-parameter thermal model employed whereas the former are essentially independent of it. In fact, a thermal model that has more nodes and therefore more details also has more thermal modes; but the slowest modes, which correspond to temperature changes in large parts of the spacecraft, are hardly affected by the details, whereas the fast modes can be significantly altered. The slowest mode, in particular, corresponds to a simultaneous but non-uniform increase (or decrease) of the temperature throughout the spacecraft and is hardly altered by small-scale changes. The computation of the stationary thermal state with the linear method relies on an explicit integral, Eq. (10), or a Fourier expansion, Eq. (27). Given a sampling of the thermal driving function at equal time intervals, the periodic solution can be obtained through two discrete Fourier transforms: a direct transform to get the Fourier coefficients of the driving function and an inverse transform of the coefficient vector multiplied by a suitable matrix (Sect. III). Of course, the discrete Fourier transforms are best performed with a FFT algorithm. This computation is more efficient than the numerical computation of the integral, Eq. (10), if we need the values of the temperatures at all the given sampling times. However, the Fourier transform presents the Gibbs phenomenon, associated with sudden variations of the heat loads, as occur at eclipse times, for example. The Gibbs phenomenon introduces errors, but these errors could be suppressed with special methods. The computation of the thermal modes and the stationary thermal state for a satellite ten-node thermal model confirms the validity of the linear method for a minimal but realistic model. The relaxation times span a considerable range, between 55 seconds and nearly one hundred minutes. Of course, the latter time must be almost independent of the particular thermal model used, whereas the former has no intrinsic significance, and, if the number of nodes grew, that time would shrink (thus further expanding the range of relaxation times). The slowest mode corresponds to node temperature increments with the same sign (positive by convention), whereas the increments corresponding to other modes have both signs. The periodic variation in the external heat input (Fig. 4) excites the thermal modes and produces a definite pattern of stationary temperature oscillations, well approximated by the first-order solution (Fig. 5). The second-order correction is small compared to the first-order solution, but it is worth computing, as it reaches 1.7 K. Higher order corrections are essentially negligible, but the error due to the Gibbs phenomenon at the eclipse positions reaches 0.6 K (at the most). Focusing on the computational aspects of the linear approach, we have studied how it scales with the number N of nodes and the number n of sampling positions on the orbit. If the Jacobian matrix is dense, the complexity of the corresponding matrix operations is of order N 3 . It is convenient to employ just one matrix operation, namely, the diagonalization of the Jacobian matrix, because then only a few of the slowest modes are needed for the remaining operations, so these have negligible complexity. The complexity of a direct numerical integration of the nonlinear equations is of order N 2 k, k being the number of time steps necessary for relaxation. For a low-altitude orbit, k is expected to be on the order of one thousand, as for our Moon-orbiting satellite. Therefore, the linear method would be computationally effective as just an integration method only for models with a few hundred nodes. At any rate, the Jacobian matrix can be assumed to be sparse, and its conduction part can be assumed to be especially sparse, in addition to being the larger part of the Jacobian matrix and also being independent of the orbit. As the orbit may be subjected to changes in the planning of a mission, a convenient strategy probably is to diagonalize the conduction 19 part at the outset and, when needed, add the radiation part within some approximation scheme. This strategy can be far more efficient than integrating the nonlinear equations each time. Moreover, the strength of the linear approach lies with the insight that it provides about the thermal behavior of the spacecraft, as embodied by the decomposition of its thermal modes, of which only the slowest ones are significant. These significant modes can actually be obtained with a reduced thermal model using few nodes. Therefore, the linear approach is especially useful in the context of reduced models. Furthermore, it provides a method for model reduction based on the mode decomposition: this decomposition can be used to group nodes. Indeed, there is a technique for graph partitioning based on the eigenvalues and eigenvectors of the Laplacian matrix of the graph [18, 24]. According to Sect. II B, this technique is applicable to the Jacobian matrix, but the details of this application are beyond the scope of the present paper and are left for future work. Finally, our linear approach can surely be applied to other cyclic heating processes that involve radiation heat transfer. Acknowledgments We thank Isabel Pérez-Grande for bringing Ref. 12 to our attention. References [1] F. Kreith, Radiation Heat Transfer for Spacecraft and Solar Power Plant Design. Intnal. Textbook Co., Scranton, Penn. (1962) [2] C.A. Wingate, Spacecraft Thermal Control. In: Fundamentals of Space Systems, V.L. Pisacane and R.G. Moore (eds.), Oxford Univ. Press (1994) [3] D.G. Gilmore (ed.), Spacecraft Thermal Control Handbook. The Aerospace Press, El Segundo (2002) [4] C.J. Savage, Thermal Control of Spacecraft. In: Spacecraft Systems Engineering, Third Edition, P. Fortescue, J. Stark and G. Swinerd (eds.), Wiley, Chichester (2003) [5] K. Oshima and Y. Oshima, An analytical approach to the thermal design of spacecrafts. Rep. No. 419, Inst. of Space and Aeronautical Science of Tokio (1968) [6] J.-R. Tsai, Overview of satellite thermal analytical model. Journal of Spacecraft and Rockets, 41, 120–125 (2004) [7] I. Pérez-Grande, A. Sanz-Andrés, C. Guerra and G. Alonso, Analytical study of the thermal behaviour and stability of a small satellite. Applied Thermal Engineering, 29, 2567–2573 (2009) [8] J. Gaite, A. Sanz-Andrés and I. Pérez-Grande, Nonlinear analysis of a simple model of temperature evolution in a satellite. Nonlinear Dynamics, 58, 405–415 (2009) [9] J. Gaite, Nonlinear analysis of spacecraft thermal models. Nonlinear Dynamics, 65, 283–300 (2011) [10] C.K. Krishnaprakas, Application of accelerated iterative methods for solution of thermal models of spacecraft. Journal of Spacecraft and Rockets, 32, 608–611 (1995) [11] C.K. Krishnaprakas, Efficient solution of spacecraft thermal models using preconditioned conjugate gradient methods. Journal of Spacecraft and Rockets, 35, 760–764 (1998) [12] M. Milman and W. Petrick, A note on the solution of a common thermal network problem encountered in heat-transfer analysis of spacecraft. Applied Mathematical Modelling, 24, 861–879 (2000) [13] C.K. Krishnaprakas, A comparison of ODE solution methods for spacecraft thermal problems. Heat Transfer Engineering, 19, 103–109 (1998) [14] ESATAN-TMS Thermal Engineering Manual and User Manual. Prepared by ITP Engines UK Ltd., Whetstone, Leicester, UK (2009) [15] A. Berman and R.J. Plemmons, Nonnegative Matrices in the Mathematical Sciences. Classics in Applied Mathematics, vol. 9, SIAM (1994) [16] E.J. Hinch, Perturbation methods, Cambridge Texts in Applied Mathematics (1991) [17] F.R.K. Chung, Spectral Graph Theory. Providence, RI: Amer. Math. Soc. (1997) [18] T. Biyikoglu, J. Leydold and P.F. Stadler, Laplacian Eigenvectors of Graphs: Perron-Frobenius and Faber-Krahn Type Theorems. Lecture Notes in Mathematics 1915, Springer (2007) [19] H.F. Davis, Fourier Series and Orthogonal Functions. Dover Publications (1989) [20] W.H. Press, S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery, Numerical Recipes: The Art of Scientific Computing. Cambridge University Press, 3rd edition (2007) [21] G.H. Golub and C.F. Van Loan, Matrix Computations. The Johns Hopkins U. Press, Baltimore (1996) [22] M. Crouzeix, B. Philippe and M. Sadkane, The Davidson Method. SIAM Journal on Scientific Computing, 15, 62–76 (1994) [23] G.-X. Tian and T.-Z. Huang, Inequalities for the minimum eigenvalue of M-matrices. Electronic Journal of Linear Algebra, 28, 291–302 (2010) 20 [24] U. Luxburg, A tutorial on spectral clustering. Statistics and Computing, 17, 395–416 (2007)
5cs.CE
A Neural Network Approach to ECG Denoising arXiv:1212.5217v1 [cs.CE] 20 Dec 2012 Rui Rodrigues ([email protected]) and Paula Couto ([email protected]) Departamento de Matemática da Faculdade de Ciencias e Tecnologia da UNL, 2829-516 Caparica, Portugal December 19,2012 Abstract We propose an ECG denoising method based on a feed forward neural network with three hidden layers. Particulary useful for very noisy signals, this approach uses the available ECG channels to reconstruct a noisy channel. We tested the method, on all the records from Physionet MITBIH Arrhythmia Database, adding electrode motion artifact noise. This denoising method improved the perfomance of publicly available ECG analysis programs on noisy ECG signals. This is an offline method that can be used to remove noise from very corrupted Holter records. 1 Introduction The ECG is often corrupted by different types of noise, namely, power line interference, electrode contact and motion artifacts, respiration, electrical activity of muscles in the vicinity of the electrodes and interference from other electronic devices. Analysis of noisy ECGs is difficult for humans and for computer programs. In this work we place ourselves in context of automatic and semi automatic ECG analysis: denoising should facilitate automatic ECG analysis. General denoising signal processing methods have been applied to ECG. Low pass linear filters are used for high frequency noise removal, namely power line interference and muscle activity artifacts. High pass linear filters can be applied to cancel baseline wander. The use of neural networks to ECG denoising has been, to our knowledge, limited to the removal of these two types of noise. Other denoising tools are median filter, wavelet transform methods, empirical mode decomposition, morphological filters, non linear bayesian filtering and template matching. We will focus on noise introduced by electrode motion which causes more difficulties in ECG analysis[16]. Our method adapts to each particular ECG channel and learns how to reproduce it from a noisy version of the different channels available. In the Physionet/Cinc Challenge 2010 it was shown that we can use some physiological signals to reconstruct another physiological signal, in particular an ECG [17, 20, 21]. This approach to reconstructing the noisy ECG channel is a simplified version, but equally effective, of the winning entry in that Challenge. 1 We show that the procedure is robust against noise in the input signals and can include, as an input, the channel we want to denoise. This noise removal method is another example of the power of deep neural networks [8, 10, 5, 1], in this case, applied to ECG signals. 2 Method noisy ECG channel 1, clean original channel 1, noisy ECG channel 2 denoised channel 1 Figure 1: Reconstructing the first channel from record 105 (MIT-BIH Arrhythmia Database), SNR=-6 db. In the lower section, noisy ECG, in the upper section, clean channel 1 and denoised channel 1. If an ECG channel we want to use for ECG analysis is, at some time segment, contaminated with noise, we call it the target channel in our denoising process. The method uses a feedforward neural network. A prerequisite for applying it is the target channel to be free from noise for some minutes, in order to train the neural network. The other channels used by the procedure may have noise in training time. If one channel has much more noise than others, it might be better not to use it for the reconstruction, even if it is the target channel. The neural network will receive the samples as input, from one or more channels, corresponding to time segments with a fixed length. The output will be the samples from the target channel corresponding to the time segment used in the input. We used time segments with lengths of between one and three seconds, depending on the channels we use for reconstruction: one second if we use the target channel and another channel, two seconds, if we do not use the 2 target channel, and three seconds, if we only use the target channel. To reconstruct one ECG channel we collected time segments, Tk from the ECG each one starting 16 samples after the preceding segment. After obtaining the output of the neural network, corresponding to each of the Tk , the value of the reconstruction on sample t0 will be the average value of the sample outputs corresponding to t0 , using all Tk that contain t0 . The proposed method could be applied to a Holter record, reconstructing those time segments where an important level of noise is identified and using the remaining time of the Holter record for training. 2.1 Neural network architecture and training We used a neural network with three hidden layers. The number of units on each of those layers was approximately 1000 in all experiments. To train the neural network, we constructed a sequence of time segments each one starting five samples after the beginning of the previous one. There is no need to use fiducial points to create input data to the neural network. We applied Geoffrey Hinton’s method [9, 8, 6] to learn the neural network weights: following initialization using a stack of Restricted Boltzmann Machines, we applied backpropagation algorithm to fine tune the weights. For details on the training procedure for Restricted Boltzmann Machines, we refer to Hinton [7]. As usual, when using feedforward neural networks, we normalized the input data, to accelerate the learning process. First we applied a moving average filter, with the window size equal to the sampling rate. Then we subtracted the result from the signal, thus reducing the baseline wander. In the output signal, instead of the moving average filter we applied a median filter: it is more effective in the removal of baseline wander. Finally, we scaled the output signal to have unit variance and multiplied the input signals by the same scale factor. We implemented our method using GNU Octave language and, to reduce training and reconstruction time, we ran most time consuming code on a Graphics Processing Unit. Our code is available at the first author’s web page. 2.2 Evaluating the method Evaluating ECG denoising methods is not an obvious task. A common way of doing it is to add add noise to an existing signal and measure the Root Mean Square Error (RMSE) of the denoised signal relative to the original signal. This approach has some disadvantages. Firstly, when using a large data base of ECGs, is difficult to avoid noise in the original signal, and we do not want to punish the denoising method for not reconstructing the noise in the original signal. Secondly, RMSE does not always reflect the difficulties in analysing a noisy ECG. For instance, a constant baseline shift in the reconstructed signal is not very disturbing, but might correspond to a high RMSE value. In this study we report RMSE in the reconstructed signal when we artificially add noise in the ECG, but we also evaluate our method using some publicly 3 original signal, reconstructed signal, Figure 2: Segment of first channel from record 202 (MIT-BIH Arrhythmia database): RMSE of recontructed signal is largely due to the noise in the original signal: baseline shift and high frequency noise. available programs that analyse the ECG: we compare the results of applying these programs with and without denoising the corrupted ECG. Although those programs alredy have a preprocessing stage to deal with noise, we show that, in the presence of noise, our denoising method improves their results. 2.2.1 Programs used to test this method gqrs is a recent QRS detector, not yet published: the author is George Moody. This program is open source and available with WFDB software, from Physionet. There is an accompaining post-processor ’gqpost’ intended to improve positive predictivity, at a cost of reduced sensitivity. We report the results of ’gqrs’ with and without using gqpost. ’gqpost’ uses a configuration file ’gqrs.conf’; we kept the default values of ’gqrs.conf’. The results of this program ’gqrs’ depend on the value of a threshold parameter; as we did not find a systematic way of determining, for each record, the best value for the threshold, we used the parameter’s default value. For this reason, we do not report the best possible results of this detector in the different records and therefore we should not use this study to compare the perfomance of the different qrs detectors. E.P. limited is an open source program written by Patrick S. Hamilton [4]. It performs QRS detection and classifies beats as ’normal’ or ’ventricular 4 ectopic’ (VEB). ecgpuwave It is an open source QRS detector and waveform limit locator, available as part of the PhysioToolkit [13, 12]. The authors are Pablo Laguna, Raimon Jan, Eudald Bogatell, and David Vigo Anglada. All the programs listed above act on a single ECG channel, we did not find publicly available methods using more than one channel. 2.3 Statistics used to describe the results of QRS detectors and the beat classifier For QRS detectors we used the following statistics: Sensitivity = TP TP , Positive Predictivity = TP + FN TP + FP FP + FN , [4] TP + FN where T P is the number of correctly detected beats, F P is the number of false detections and F P is the number of missed beats. For the beat classifier, we use, as in [11], the Sensitivity, Positive Predictivity, Error rate = False Positive Rate = FP TN + FP TN + TP TN + TP + FN + FP where T P , T P , F P and F N are defined as follows: and Classification Rate = • TP is the number of beats correctly classified as VEB. • TN is the number of non VEBs correctly classified. • FP is the number of beats wrongly classified as VEB, excluding fusion and unclassifiable beats. • FN is the number of true VEB not classified as such. 2.4 Adding noise to an existing ECG In most experiments, to test the behavior of our denoising method, we start with a ’clean’ ECG and add noise to it. For this we use the program nst, written by Geoge Moody [16]. The standard definition of signal to noise ratio (SNR), in decibels, is: S R where S and R are the power of signal and noise. We used a slightly different value for S and R, following the method used by the program ’nst’. Next we quote ’nst’ man page [18]: SN R = 10 log10 5 “ A measurement based on mean squared amplitude, for example, will be proportional to the square of the heart rate. Such a measurement bears little relationship to a detector’s ability to locate QRS complexes, which is typically related to the size of the QRS complex. A less significant problem is that unweighted measurements of noise power are likely to overestimate the importance of very low frequency noise, which is both common and (usually) not troublesome for detectors. In view of these issues, nst defines S as a function of the QRS amplitude, and N as a frequency-weighted noise power measurement. “ More details on the way ’nst’ computes SNR can be found on the man page of ’nst’. 3 3.1 Experiments MIT-BIH Arrhythmia Database noisy signal, denoised signal, clean original signal Figure 3: Reconstructing channel 1 from record 103 using only the same channel, SNR=0 db. At the bottom, noisy signal, in the middle denoised signal and at the top, clean signal. We added noise to both channels in all the 48 records from Physionet MITBIH Arrhythmia Database [15, 3], and applied our method to reconstruct the first channel. As it is well known [16, 2], from the three types of noise, baseline 6 wander, muscle artifact and electrode motion artifact, it is the last one that creates most difficulties to ECG analysis programs. We contaminated both channels of each record with electrode motion artifact noise, using the corresponding noise record from the MITBIH Noise Stress Test Database [16]. In all but one record, both channels were used as input to reconstruct the first channel. In record 103, the noise in the second channel is already very high, therefore, we chose to use only the target channel in the reconstruction. The clean record and corrupted noisy versions of the same record were used as input for training the neural network. We always used the clean target channel for the output. The default behavior of the program ’nst’ was followed to add noise to the records used in the tests: starting after the first five minutes from the beginning of each record, we added noise for two minutes, followed by two minutes without noise, repeating the process until the end of the record. In order to train the neural network, we used all those segments of time where noise was not added in test time. In this way, the parts of noise used during training and testing do not overlap: we kept the neural network from learning the noise used in the test. The amount of noise, used for testing, corresponds to SNR values of 24 db, 18 db, 12 db, 6 db, 0 db and -6 db. Table 1: Reconstruction Error: for each level of noise, we report the value of RMSE(denoised signal)/RMSE(noisy signal) over the 48 records of MIT-BIH Arrhythmia Database SNR 24db 18db 12db 6db 0db -6db 1.014 0.507 0.257 0.133 0.071 0.041 In table 1 we report the fraction of RMSE, in the noisy signal, present in the reconstructed signal: RMSE(denoised signal)/RMSE(noisy signal). As we can see in the table, there are no visible advantages, in terms of RMSE, in applying the denoising methods for low noise (SNR=24db), in fact, situations like the one in figure 2 introduce high values of RMSE because the method is not intended to learn to reproduce the noise of the original signal but just its main pattern. When the values of added noise increase, the errors in the reconstructed signal, due to noise in the original signal, lose their relative importance: for higher values of noise we notice an important reduction in the value of RMSE in the reconstructed signal.As supplementary material to this article, we present the detailed results for each record. We applied the programs ’gqrs’ and ’EPlimited’ to the first channel, in noisy versions of each record and in the reconstructed signal, to verify whether, after applying our method, there were significant improvements in the performance of those programs. The results are reported in tables 2, 3, 4, 5 . The first column indicates the SNR of the resulting ECG, the same value for both channels, after corrupting it with noise. The second column refers to the signal used when applying the program to the first channel: denoised means the reconstructed noisy first channel, using our method. The tables present the sensitivity, posi7 Table 2: Results of ’gqrs’ applied to the first channel, corrupted with noise and denoised using our method (MIT-BIH Arrhythmia, 48 records). positive error SNR channel 1 sensitivity predictivity rate noisy 0.9973 0.9963 0.0064 24 db denoised 0.9963 0.9992 0.0045 noisy 0.9973 0.9834 0.0195 18 db denoised 0.9964 0.9991 0.0045 noisy 0.9957 0.9054 0.1084 12 db denoised 0.9959 0.9991 0.0049 noisy 0.9881 0.7605 0.3231 6 db denoised 0.9941 0.9989 0.0071 noisy 0.9680 0.6471 0.5599 0 db denoised 0.9826 0.9922 0.0251 noisy 0.9523 0.5806 0.7357 -6 db denoised 0.9470 0.9466 0.1064 Table 3: Results of ’gqrs’ with post-processor ’gqpost’ applied to the first channel, corrupted with noise and denoised using our method (MIT-BIH Arrhythmia, 48 records). positive error SNR channel 1 sensitivity predictivity rate noisy 0.9970 0.9970 0.0060 24 db denoised 0.9961 0.9994 0.0045 noisy 0.9969 0.9868 0.0165 18 db denoised 0.9960 0.9993 0.0047 noisy 0.9921 0.9318 0.0806 12 db denoised 0.9957 0.9992 0.0050 noisy 0.9659 0.8282 0.2345 6 db denoised 0.9942 0.9988 0.0069 noisy 0.9121 0.7037 0.4720 0 db denoised 0.9838 0.9947 0.0215 noisy 0.8767 0.6301 0.6380 -6 db denoised 0.9493 0.9568 0.0935 tive predictivity, number of detection errors and error rate, in the case of QRS detectors, and VEB sensitivity, positive predictivity, false positive rate and classification rate, for the ’EP Limited’ beats classification. We used the following programs to report the results: ’bxb’, from WFDB software [14], in the case of ’gqrs’, and ’bxbep’, in the the case of ’EPLimited’. The numbers are relative to all the 48 records from the MIT-BIH Arrhythmia Database, 91225 beats, from which 6101 are VEBs: we started the test after the first 5 minutes and stopped one second before the end. In the case of EP limited we had to start the test 8 one second later because we could not configure ’bxbep’to behave in another way. Table 4: Results of EP Limited (QRS detection) applied to the first channel, corrupted with noise and denoised using our method(MIT-BIH Arrhythmia, 48 records). positive error SNR channel 1 sensitivity predictivity rate noisy 0.9977 0.9981 0.0042 24 db denoised 0.9961 0.9996 0.0043 noisy 0.9977 0.9945 0.0079 18 db denoised 0.9957 0.9995 0.0048 noisy 0.9969 0.9342 0.0733 12 db denoised 0.9955 0.9995 0.0050 noisy 0.9857 0.7943 0.2696 6 db denoised 0.9944 0.9993 0.0063 noisy 0.9432 0.7110 0.4401 0 db denoised 0.9865 0.9951 0.0184 noisy 0.8557 0.6568 0.5915 -6 db denoised 0.9531 0.9493 0.0977 Table 5: Beat clasification as Normal or Ventricular Ectopic Beat (VEB): results of EP Limited applied to the first channel, corrupted with noise and denoised using our method(MIT-BIH Arrhythmia, 48 records). VEB VEB positive VEB false classification SNR signal sensitivity predictivity positive rate rate noisy 0.9147 0.9589 0.0028 0.9916 24 db denoised 0.9142 0.9815 0.0013 0.9930 noisy 0.8873 0.9260 0.0051 0.9876 18 db denoised 0.9089 0.9759 0.0016 0.9923 noisy 0.8190 0.5935 0.0380 0.9530 12 db denoised 0.9032 0.9785 0.0014 0.9921 noisy 0.6977 0.2369 0.1291 0.8615 6 db denoised 0.8901 0.9778 0.0015 0.9912 noisy 0.6083 0.1308 0.2160 0.7751 0 db denoised 0.8567 0.9513 0.0032 0.9873 noisy 0.5720 0.0939 0.2994 0.6940 -6 db denoised 0.7663 0.7689 0.0166 0.9688 For QRS detectors, after applying our denoising procedure, there is always an improvement in positive predictivity in the tested programs, but, for high values of SNR there is a small reduction in the sensitivity: above 12 db for gqrs and above 6 db for EPLimited. Besides some ectopic beats not being well 9 reconstructed, the reduction in sensitivity is due to a smaller amplitude of the QRS complex in the reconstructed signal; this occurs in the first beat from figure 3. We could improve the sensitivity in the reconstructed signal, at the cost of a reduction in the positive predictivity, multiplying the reconstructed signal by a factor greater than 1.0, but we chose not to do it. For beat classification there is always a clear improvement after using the proposed method. As supplementary material to this article, we present the detailed results for each program and record. 3.2 Record mgh124 The MGH/MF Waveform Database [22, 3] is a collection of electronic recordings of hemodynamic and electrocardiographic waveforms. Typical records include three ECG leads. In the case of record mgh124, the first two ECG channels are sometimes strongly contaminated with noise, while the third ECG channel mantains a relatively good quality, therefore we have reliable QRS annotations. Using record mgh124, we tested our denoising method on a real ECG, without having to artificially add noise. In this case we reconstructed the second ECG channel, using only that same channel as input: we trained a neural network to produce a clean segment of the second channel given a corrupted version of the same segment. The clean parts of the channel 2 were used to obtain training data for the neural network. tables 6 and 7 show the results of ’gqrs’ and ’EP Limited’ on the original second ECG channel and on the reconstructed version. The total number of beats during testing time is 8573, from which 458 are classified as VEBs. Table 6: Results of ’gqrs’ applied to second ECG channel, corrupted with noise and denoised using our method (record mgh124). detection error positive lead 2 sensitivity errors rate predictivity noisy 1344 0.1568 85.06% 99.14% denoised 890 0.1038 0.8971 0.9990 3.3 record sele0106 from QT database Determination of peaks and limits of ECG waves is very important for ECG analysis: they are necessary for ECG measurements that are clinically relevant, namely, PQ interval, QRS duration, ST segment and QT interval. Physionet QT data base was created to test QT detection algorithms [19]. Each record contains at least 30 beats with manual annotations identifying the beginning, peak and end of the P-wave, the beginning and end of the QRScomplex and the peak and end of the T-wave. 10 denoised channel 2 channel 3 noisy ECG channel 2 Figure 4: Reconstruction of noisy channel 2 from record mgh124: channel 3 is shown as a reference, it is not used for denoising. We notice that although the first VEB is recognized as such, the next two are not. This ECG segment starts at sample 853318. Table 7: EP Limited: QRS detection and beat clasification as Normal or Ventricular Ectopic Beat (VEB), results on lead 2, corrupted with noise and denoised using our method(record mgh124). QRS detection QRS error QRS positive signal QRS sensitivity errors rate predictivity noisy 553 0.0645 0.9472 0.9878 denoised 463 0.0540 0.9470 0.9989 signal VEB sensitivity noisy recsignal 23.14% 36.68% VEB positive predictivity 17.82% 87.50% VEB false positive rate 6.305% 0.311% We used the program ’ecgpuwave’ to show that, in some situations, we can improve automatic ECG delineation by using a clean channel to reconstruct a very noisy one. Typically, the accuracy of ecgpuwave when detecting the limits or peak of some ECG characteristic wave is better in one of the channels. The best channel to locate one of those reference points changes with the different characteristic 11 points and also from record to record. Table 8 shows the results of ecgpuwave, on the two channels, when it locates P wave peak, P ending, QRS beginning and QRS ending. We are using the first annotator as reference. We can conclude that the error is smaller when ecgpuwave is applied to the second channel. Table 8: Accuracy of ecgpuwave, in ms, locating some characteristic points on the record sele0106(QT database): comparing results for the two leads. reference point channel mean error std error 1 9.33 4.54 P peak 2 2.93 2.72 1 15.73 10.06 P off 2 7.47 9.28 1 18.80 6.62 QRS on 2 7.87 4.32 1 13.33 4.17 QRS off 2 4.67 4.27 At this point we consider an easily imaginable situation, where the second channel is highly corrupted with noise, in such a way that it is better to use only the first channel for the reconstruction of the second channel. In this case we trained a neural network to produce a segment of channel 2 when it gets the corresponding segment of channel 1 as input. channel 1 original channel 2 reconstructed channel 2 Figure 5: reconstructing channel 2 from record sele0106(QT database) using only channel 1. We followed this procedure and applied ecpuwave to the reconstructed channel 2. The results are in table 9. One can see that we still get better results using reconstructed channel 2, from channel 1, than when applying ecgpuwave 12 to clean channel 1. Table 9: comparing results, in ms, of ecgpuwave for the channel 1 and reconstructed channel 2 reference point channel mean error std error 1 9.33 4.54 P peak reconstructed channel 2 2.80 2.76 1 15.73 10.06 P off reconstructed channel 2 7.20 6.54 1 18.80 6.62 QRS on reconstructed channel 2 7.33 4.63 1 13.33 4.17 QRS off reconstructed channel 2 6.40 4.21 4 Discussion of results and conclusions Adding noise to existing records, we carried out extensive experiments on all the records from the MIT-BIH Arrhythmia Database. In the presence of high noise, SNR equal to 12db and lower, the programs we tested showed much better perfomance when we applied our denoising method to the ECGs. For low noise, SNR above 12db, after applying our method, QRS detectors show a slight reduction in sensitivity although there is an improvement in the positive predictivity. The experiments with records mgh124 and sele0106, without artificially adding noise in the test, confirm the advantages of using our method on a real ECG, a Holter record, for example. The experiment with record sele0106 also shows that the result of reconstructing a noisy channel can be exceptionally good when clean channels are available. References [1] Yoshua Bengio and Yann Lecun. Scaling learning algorithms towards ai. In L. Bottou, O. Chapelle, D. Decoste, and J. Weston, editors, Large-Scale Kernel Machines. MIT Press, 2007. [2] Gartheeban Ganeshapillai and John V Guttag. Real Time Reconstruction of Multi Parameter Physiological Signals. EURASIP Journal on Advances in Signal Processing, 2012(173), 2012. [3] A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff, P. Ch. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation, 101(23):e215–e220, 2000 (June 13). Circulation Electronic Pages: http://circ.ahajournals.org/cgi/content/full/101/23/e215. 13 [4] P. S. Hamilton and W. J. Tompkins. Quantitative investigation of QRS detection rules using the MIT/BIH arrhythmia database. IEEE Trans. Biomed. Eng, BME-33:1158–1165, 1987. [5] G. E. Hinton. To recognize shapes, first learn to generate images. In T. Drew P. Cisek and J. Kalaska (Eds.), editors, Computational Neuroscience: Theoretical Insights into Brain Function, chapter 3, pages 400– 402. Elsevier, City, State of Publication, 1983. [6] G. E. Hinton. Learning Multiple Layers of Representations. Trends in cognitive Sciences, 11:428–434, 2007. [7] G. E. Hinton. A Practical Guide to Training Restricted Boltzmann Machines. Technical Report UTML TR 2010003, Dept. of Comp. Sci., University of Toronto, 2010. [8] G. E. Hinton. Reducing the dimensionality of data with neural networks. Science, 313(5785):504–507, July 2006. [9] Geoffrey E. Hinton. Learning to represent visual input. Phil. Trans. R. Soc. B, 365:177–184, 2010. [10] Geoffrey E. Hinton, Simon Osindero, and Yee-Whye Teh. A Fast learning Algorithm for Deep Belief Nets. Neural Comput., 18(7):1527–1554, 2006. [11] Yu Hen Hu, Surekha Palreddy, and Willis J. Tompkins. A PatientAdaptable ECG Beat Classifier Using a Mixture of Experts Approach. IEEE Transactions On Biomedical Engineering, 44(9):891–900, 1997. [12] R. Jané, A. Blasi, J. Garcı́a, and P. Laguna. Evaluation of an automatic threshold based detector of waveform limits in Holter ECG with the QT database. Computers in Cardiology, 24:295–298, 1997. [13] P. Laguna, R. Jané, and P. Caminal. Automatic Detection of Wave Boundaries in Multilead ECG Signals: Validation with the CSE Database. Computers and Biomedical Research, 27(1):45–60, 1994. [14] G. B. Moody, C. L. Feldman, and J. J. Bailey. Standards and applicable databases for long-term ECG monitoring. Journal of Electrocardiology, 26:Suppl:151–155, 1993. [15] G. B. Moody and R. G. Mark. The impact of the MIT-BIH Arrhythmia Database. IEEE Engineering in Medicine and Biology Magazine, 20(3):45– 50, 2001. [16] G. B. Moody, W. K. Muldrow, and R. G. Mark. A noise stress test for arrhythmia detectors. In Computers in Cardiology, pages 381–384, 1984. [17] George B. Moody. The PhysioNet/Computing in Cardiology Challenge 2010: Mind the Gap. In Computing in Cardiology 2010, volume 37, Belfast, 2010. 14 [18] Moody, George B. nst man page. physiotools/wag/nst-1.htm. http://www.physionet.org/ [19] Laguna P, Mark RG, Goldberger AL, and Moody GB. A Database for Evaluation of Algorithms for Measurement of QT and Other Waveform intervals in the ECG. In Computers in Cardiology, volume 24, pages 673– 676, 1997. [20] R. Rodrigues. Filling in the Gap: a General Method using Neural Networks. In Computers in Cardiology, volume 37, pages 453–456, 2010. [21] A.M. Sullivan, H. Xia, and X. Zhao. Reconstruction of Missing Physiological Signals Using Artificial Neural Networks . In Computers in Cardiology, volume 37, pages 317–320, 2010. [22] J. P. Welch, P. J. Ford, R. S. Teplick, and R. M. Rubsamen. The Massachusetts General Hospital-Marquette Foundation Hemodynamic and Electrocardiographic Database – Comprehensive collection of critical care waveforms. Journal of Clinical Monitoring, 7(1):96–97, 1991. 15
5cs.CE
On the I/O Costs of Some Repair Schemes for Full-Length Reed-Solomon Codes arXiv:1801.05101v1 [cs.IT] 16 Jan 2018 Hoang Dau Dept. ECSE, Monash University Email: [email protected] Iwan Duursma Dept. Mathematics, UIUC Email: [email protected] Abstract—Network transfer and disk read are the most time consuming operations in the repair process for node failures in erasure-code-based distributed storage systems. Recent developments on Reed-Solomon codes, the most widely used erasure codes in practical storage systems, have shown that efficient repair schemes specifically tailored to these codes can significantly reduce the network bandwidth spent to recover single failures. However, the I/O cost, that is, the number of disk reads performed in these repair schemes remains largely unknown. We take the first step to address this gap in the literature by investigating the I/O costs of some existing repair schemes for full-length Reed-Solomon codes. I. I NTRODUCTION Reed-Solomon (RS) codes [1], although widely used as erasure codes to protect distributed storage systems (DSS) from frequent node failures, were believed to have very poor performance in repairing single failures with respect to the repair bandwidth. In the conventional/naive repair scheme for RS codes, the whole file has to be retrieved in order to repair just one lost data chunk. This drawback of RS codes led to the proposals of several other repair-efficient families of erasure codes such as regenerating codes [2], [3], [4] and locally repairable codes [5], [6], [7]. Despite the introduction of all of those new codes, RS codes remain to be the most popular codes in practice, along with replication codes, thanks to numerous inherent advantages, including optimal storage overhead, widest range of code parameters, and simple implementation. They are core components of major distributed storage systems such as Google’s Colossus, Quantcast File System, Facebook’s f4, Yahoo Object Store, Baidu’s Atlas, Backblaze’s Vaults, and Hadoop Distributed File System. In a recent line of research on repairing RS codes [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], it has been shown that with carefully crafted repair schemes, the repair bandwidth can be significantly reduced for several families of RS codes. In this work, instead of focusing on the repair bandwidth, we investigate another important performance criterion for RS codes during the recovery process, that is, the (read) I/O cost of the repair schemes1 . The I/O cost of a repair scheme is defined as the total amount of information that needs to be read from the disks located at the helper nodes during the repair of one failed node. The open question of how well RS codes perform when taken into account the I/O cost was original raised by Guruswami and Wootters [9]. To motivate the study of the I/O cost for RS codes, let us consider the toy example in Fig. 1. The 4-node storage system employs a [4, 2] RS codes over F4 to store the file (a, b) ∈ F24 . To reconstruct the two bits stored at Node 3 in a bandwidth-optimal way, the replacement node may contact 1 As reported in [19], network transfer and disk read constitute more than 98% of the total reconstruction time in the Quantcast File System. It was also observed in another study [20] that disk read always takes at least nine times longer than computation during repair or degraded read. Hien Chu Dept. Mathematics, HCMUE Email: [email protected] BW: 3 bits I/O: 4 bits a1 a1 a2 NODE 1 b1 b2 NODE 2 b1 + b2 a1 + a2 + b2 a1 + b1 + b2 NODE 3 Read Unread a1 + a2 + b 1 a2 + b1 + b2 a1 + a2 + b1 NODE 4 Fig. 1: Illustration of repair bandwidth and I/O cost during the repair process of one node failure in a DSS based on a [4, 2]4 Reed-Solomon code. While the repair bandwidth is optimal (three bits), the I/O cost is four bits, which is as expensive as reading the whole file. three available nodes and downloads one bit of data from each. This results in a repair bandwidth of three bits, saving one bit compared to the conventional scheme, in which the replacement node contacts two nodes and downloads two bits from each. However, the number of bits being read from the three nodes is four, which is the same as the file size. Thus, in terms of I/O cost, this bandwidth-efficient repair scheme is as expensive as the conventional repair scheme. This observation raises an immediate question: when does this scenario happen? Our contribution. We show that the bandwidth-optimal repair schemes proposed in [9], [11], when applied to certain families of full-length RS codes, incur an I/O cost as high as that of the naive repair scheme (Section III). We also prove that such a high I/O cost is a necessary price to pay for the optimal bandwidth when the base field is F2 and the code has two parities (Section IV). II. P RELIMINARIES Let [n] denote the set {1, 2, . . . , n}. Let F = Fq be the finite field of q elements, for some prime power q. Let E = Fq` be an extension field of F , where ` ≥ 1, and let E ∗ = E \ {0}. We refer to the elements of E as symbols and the elements of F as sub-symbols. The field E may also be viewed as a vector space of dimension ` over F , i.e. E ∼ = F ` , and hence each symbol in E may be represented as a vector of length ` over F . We use spanF (U ) to denote the F -subspace of E spanned by a set of elements U of E. The (field) trace of any P`−1 i symbol α ∈ E over F is defined to be TrE/F (α) = i=0 αq . When clear from the context, we omit the subscript E/F . The support of a vector u = (u1 , . . . , u` ), denoted supp(u), is the set {j : uj 6= 0}. The (Hamming) weight of u, denoted wt(u), 4 is |supp(u)|. The support of a set of vectors U is supp(U ) = ∪u∈U supp(u). A linear [n, k] code C over E is an E-subspace of E n of dimension k. Each element of a code is referred to as a codeword. The dual of a code C, denoted C ⊥ , is the orthogonal complement of C in E n and has dimension r = n − k. Definition 1. Let E[x] denote the ring of polynomials over E. A Reed-Solomon code RS(A, k) ⊆ E n of dimension k over a finite field E with evaluation points A = {αj }nj=1 ⊆ E is defined as n o  RS(A, k) = f (α1 ), . . . , f (αn ) : f ∈ E[x], deg(f ) < k . The Reed-Solomon code is full length if n = |E|. It is well known that the dual of a full-length Reed-Solomon code RS(A, k) is another Reed-Solomon code RS(A, n − k) (as a corollary of [21, Chp. 10, Thm. 4]). Trace repair framework. First, note that each symbol in E can be recovered from its ` independent traces. More precisely, given a basis {βi }`i=1 of E over F , any α ∈ E can be uniquely P determined given the values of Tr(βi α) for i ∈ [`], ` i.e. α = i=1 Tr(βi α)βi∗ , where {βi∗ }`i=1 is the dual (traceorthogonal) basis of {βi }`i=1 (see, for instance [22, Ch. 2, Def. 2.30]). Let C be an [n, k] linear code over E and C ⊥ its dual. If ⊥ c = (c P1n, . . . , cn ) ∈ C and g = (g1 , . . . , gn ) ∈ C then c · ∗ g = j=1 cj gj = 0. Suppose cj is erased and needs to be recovered. In the trace repair framework, choose a set  of ` (i) dual codewords g (1) , . . . , g (`) such that dimF {gj ∗ }`i=1 = `. Since the trace is a linear map, we obtain the following ` equations X  (i)  (i) Tr gj cj , i ∈ [`]. (1) Tr gj ∗ cj ∗ = − j6=j ∗ In order to recover cj ∗ , one needs to retrieve sufficient information from {cj }j6=j ∗ to compute the right-hand sides of (1). We define, for every j ∈ [n], n o 4 (1) (`) ∗ Sj→j = spanF gj , . . . , gj (2) and refer to Sj→j ∗ as a column-space of the repair scheme when j 6= j ∗ . Then for each j 6= j ∗ , in order to (i) determine Tr(gj cj ) for all i ∈ [`], it suffices to retrieve dimF (Sj→j ∗ ) sub-symbols (in F ) only. Indeed, suppose {gjit }st=1 is an F -basis of Sj→j ∗ , then by retrieving just s traces Tr(gji1 cj ), . . . , Tr(gjis cj ) of cj , all other traces (i) Tr(gj cj ) can be computed as F -linear combinations of those (i) s traces without any knowledge of c. Finally, since {gj ∗ }`i=1 is F -linearly independent, cj ∗ can be recovered from its ` corresponding traces on the left-hand side of (1). We refer to such a scheme as a repair scheme based on {g (i) }`i=1 . It was known that this type of repair schemes includes every possible linear repair scheme for RS codes [9]. Lemma 1 (Guruswami-Wootters [9]). Suppose E = Fq` , F = Fq , C is an [n, k] linear code over E and C ⊥ is its dual. The repair scheme for cj ∗ based on ` dual codewords  (i) g (1) , . . . , g (`) , P where dimF {gj ∗ }`i=1 = `, incurs a repair bandwidth of j6=j ∗ dimF (Sj→j ∗ ) sub-symbols in F , where Sj→j ∗ is defined as in (2). I/O Cost of a Repair Scheme. Let B = {βi }`i=1 P be an F -basis of E. For each α ∈ E, we may write α = j αj βj , where αj ∈ F . The vector (α1 , . . . , α` ) ∈ F ` is the vector representation of α with respect to the basis B. We often write α = (α1 , . . . , α` )B or just α = (α1 , . . . , α` ) for brevity. We first define the I/O cost of a function and then proceed to describe the I/O cost of a repair scheme. The underlying assumption is that each sub-symbol αi of α can be read from the storage disk separately without accessing other subsymbols. Definition 2 (I/O cost of functions). The (read) I/O cost of a function f (·) with respect to a basis B is the minimum number of sub-symbols of α ∈ E needed for the computation of f (α). The I/O cost of a set of functions F is the minimum number of sub-symbols of α needed for the computation of {f (α) : f ∈ F}. Lemma 2. The following statements hold. 4 (a) The P I/O cost of a linear function fw (α) = w · α = j wj αj with respect to a basis B is wt(w) = |supp(w)|, where w = (w1 , . . . , w` ) ∈ E. (b) The I/O cost of a set of linear functions w1 · α, . . . , ws · α with respect to B is | ∪sj=1 supp(wj )|. (c) The I/O cost of the trace functional Trγ (·), defined by  4 γ,B Trγ (α) = Tr(γα), with respect to B is wt w , where  4 wγ,B = Tr(γβ1 ), . . . , Tr(γβ` ) . (3) (d) The I/O cost of the set of trace functionals {Trγ (·) : γ ∈ Γ} with respect to B is | ∪γ∈Γ supp(wγ,B )|. Proof. The statements (a) and (b) follow directly from DefiP nition 2. Statement (c) holds as Trγ (α) = i Tr(γβi )αi = wγ,B · α. The last statement follows from (b) and (c).  The following lemma is due to the linearity of trace.  4 Lemma 3. Let Γ = spanF {γi }`i=1 and {γi0 }si=1 be an F basis of Γ. Then the following statements hold. P` P` (a) If γ= i=1 ai γi , for ai ∈ F , then wγ,B = i=1 ai wγi ,B , and therefore, supp(wγ,B ) ⊆ ∪`i=1 supp(wγi ,B ). 0 (b) ∪`i=1 supp(wγi ,B )=∪γ∈Γ supp(wγ,B )=∪st=1 supp(wγi ,B ). The I/O cost of the repair scheme based on a set of dual codewords {g (i) }`i=1 is the minimum number of sub-symbols of cj ’s needed in the computation of the right-hand sides of (1). We provide the formal definition below. Definition 3 (I/O cost of a repair scheme). The I/O cost of the repair scheme based on a set of dual codewords {g (i) }`i=1 with respect to a basis B is the I/O costs of the  sum of the ` sets of trace functionals Fj = Trg(i) (·) i=1 , j ∈ [n] \ {j ∗ }. j Lemma 4. Suppose cj ∗ is lost and needs to be recovered. The I/O cost of the repair scheme based on ` dual codewords (i) (i)  (i) g = g1 , . . . , gn , i ∈ [`], with respect to a basis B is X  B supp Wj→j , ∗ j6=j ∗ where wγ,B is defined as in (3) and 4  B Wj→j wγ,B : γ ∈ Sj→j ∗ . ∗ = (4) Proof. By Lemma 2 (d), the I/O cost of the set of trace   (i) ` functionals Fj = Trg(i) (·) i=1 is ∪`i=1 supp wgj ,B for j each j 6= j ∗ . According to Lemma 3 (b) and the definition of Sj→j ∗ , this quantity is equal to | ∪γ∈Sj→j∗ supp(wγ,B )|, B which is the same as |supp(Wj→j ∗ )|. The lemma follows by summing up the I/O costs of the sets Fj , j ∈ [n] \ {j ∗ }.  III. I/O C OST OF ROTATIONAL R EPAIR S CHEMES A. Fixed Basis Suppose cj ∗ is lost and needs to be recovered, and a basis B is fixed for all storage nodes, which is the usual situation in practice. The ultimate goal is to find Pareto solutions to the following multiobjective optimization problem.  X X  B , dimF (Sj→j ∗ ), supp Wj→j min ∗ g (1) ,...,g (`) ∈C ⊥ dimF (Sj ∗ →j ∗ )=` j6=j ∗ j6=j ∗ (5) B where Sj→j ∗ and Wj→j ∗ are defined in (2) and (4), respectively. Note that if we ignore the second objective function on the I/O cost, this reduces to the previously studied problem of minimizing the repair bandwidth. Conversely, if we ignore the first objective function instead, the problem reduces to the one minimizing the I/O cost only. The problem (5), which seeks to minimize a multiobjective function consisting of bandwidth and I/O cost, appears to be challenging even for very particular sets of code parameters. Therefore, we start with a simpler task: to study the I/O costs of those repair schemes that achieve optimal repair bandwidth for certain families of full-length RS codes. Definition 4 (Rotational repair scheme). Let n = |E| = q ` . The repair scheme for cj ∗ based on a set of dual codewords {g (i) }`i=1 is called rotational if there exists an F -subspace S of E such that Sj→j ∗ = ρj S for every j 6= j ∗ and moreover, {ρj }j6=j ∗ = E ∗ . In other words, a repair scheme for cj ∗ is rotational if each of its column-space Sj→j ∗ , j 6= j ∗ , is a translate of a common F -subspace S of E with a different multiplier. As a consequence, in a rotational repair scheme, every columnspace has the same F -dimension. This common dimension is referred to as the column-dimension of the rotational repair scheme. Before presenting our main theorem on the I/O cost of a rotational repair scheme for full-length RS codes, a few auxiliary lemmas are needed. 4 Lemma 5. Let K = ker(Tr(·)) = {α ∈ E : Tr(α) = 0}. If {γt }st=1 ⊆ E is F -linearly independent then  dimF ∩st=1 K/γt = ` − s. Proof. Set Ks = ∩st=1 K/γt . We prove that dimF (Ks ) = ` − s by induction in s. Clearly, dimF (K1 ) = dimF (K/γ1 ) = dimF (ker(Tr)) = `−1. Suppose that dimF (Ks−1 ) = `−s+1. We aim to show that dimF (Ks ) = ` − s. Let L be the vector space of all q ` linear mappings from E to F and define an equivalence relation ↔ on L as follows: f ↔ g if f |Ks−1 ≡ g|Ks−1 . As dimF (Ks−1 ) = ` − s + 1, there are precisely q `−s+1 distinct linear mappings from Ks−1 to F . Therefore, there are q `−s+1 equivalence classes with respect to the relation ↔. Each of such classes contains q s−1 mappings. Hence, there are precisely q s−1 linear mappings f ∈ L satisfying f |Ks−1 ≡ 0, which consitute the equivalence class E0 containing the trivial mapping f ≡ 0. One can easily verify that Trγ (·) ∈ E0 for every  γ ∈ spanF {γt }s−1 . As {γt }s−1 t=1 t=1 is F -linearly indes−1 pendent, there are q such trace functionals. Therefore, E0 = Trγ (·): γ ∈ spanF {γt }s−1 . Hence, for γs ∈ / t=1 spanF {γt }s−1 , we have Tr (·) ∈ / E . That implies γs 0 t=1 ker(Trγs ) 6⊇ Ks−1 . Equivalently, K/γs 6⊇ Ks−1 . Thus,  \ K < dimF (Ks−1 ) = ` − s + 1, dimF (Ks ) = dimF Ks−1 γs which implies that dimF (Ks ) ≤ ` − s. To conclude, it remains to show that dimF (Ks ) ≥ ` − s. Indeed, consider the linear mapping σ : Ks−1 → F , defined as σ(κ) = Tr(γs κ) for κ ∈ Ks−1 . Then ker(σ) = Ks−1 ∩ (K/γs ) = Ks . Therefore, dimF (Ks ) = dimF (ker(σ)) ≥ dimF (Ks−1 ) − 1 = ` − s. This completes the proof.  Lemma 6. Suppose {γt }st=1 ⊆ E is an F -linearly independent set and ξ is ( a primitive element of E. Set 0, if Tr(γ1 ξ j ) = · · · = Tr(γs ξ j ) = 0, bj = 1, otherwise. Pq` −2 Then we have j=0 bj = q ` − q `−s . Proof. It suffices to show that |{j : bj = 0}| = q `−s − 1. We have s \ K , bj = 0 ⇐⇒ Tr(γ1 ξ j ) = · · · = Tr(γs ξ j ) = 0 ⇐⇒ ξ j ∈ γ t=1 t where K = ker(Tr). According to Lemma 5, \  s K dimF = ` − s. γ t=1 t ( ) Therefore, s \ K j = q `−s − 1, |{j : bj = 0}| = j : ξ ∈ γ t t=1 as desired. The proof follows.  Theorem 1. The I/O cost of a rotational repair scheme with column-dimension s for a full-length Reed-Solomon code over Fq` is `(q ` − q `−s ). Proof. Given a rotational repair scheme based on {g (i) }`i=1 with column-dimension s, according to Lemma 4, we need to P B ` `−s show that j6=j ∗ |supp(Wj→j ). ∗ )| = `(q − q To simplify the notation, without loss of generality, we may assume that j ∗ = n and Sj→j ∗ = ξ j−1 S, j ∈ [n − 1], where S is an s-dimensional F -subspace of E and ξ is a primitive element of E. Let {γt }st=1 be an F -basis of S. Then {ξ j−1 γt }st=1 forms an F -basis of Sj→j ∗ for every j ∈ [n − 1]. Therefore, by Lemma 3 (b), we have s [  [  j−1 B supp(Wj→j supp wγ,B = supp wξ γt ,B . ∗) = γ∈Sj→j ∗ t=1 Recall that  j−1 wξ γt ,B = Tr(ξ j−1 γt β1 ), . . . , Tr(ξ j−1 γt β` ) ∈ F ` . B Then |supp(Wj→j ∗ )| is precisely the number of nonzero j−1 columns in the s × ` maxtrix Wj whose rows are wξ γt ,B , t ∈ [s],  j−1  wξ γ1 ,B  ξj−1 γ2 ,B  w  4  Wj =  ..     . wξ j−1 γs ,B  Tr(ξ j−1 γ1 β1 ) · · · Tr(ξ j−1 γ1 βi ) · · · Tr(ξ j−1 γ1 β` ) Tr(ξ j−1 γ2 β1 ) · · · Tr(ξ j−1 γ2 βi ) · · · Tr(ξ j−1 γ2 β` )   = . .. .. .. .. ..   . . . . .  Tr(ξ j−1 γs β1 ) · · · Tr(ξ j−1 γs βi ) · · · Tr(ξ j−1 γs β` ) Therefore, the I/O cost of the repair scheme is equal to the total number of nonzero columns in the matrices W1 , . . . , Wn−1 . Thus, setting ( 0, if Tr(ξ j−1 γ1 βi ) = · · · = Tr(ξ j−1 γs βi ) = 0, 1, otherwise, the I/O cost of the repair scheme can be computed as bi,j = n−1 X B |supp(Wj→j ∗ )| = j=1 n−1 ` XX j=1 i=1 = ` X bi,j = ` n−1 X X bi,j i=1 j=1 (q ` − q `−s ) = `(q ` − q `−s ), i=1 where the third equality follows by applying Lemma 6 to the 4 F -linearly independent set {γt βi }st=1 and by setting bj = bi,j+1 , j = 0, . . . , q ` −2 = n−2. This completes the proof.  The bandwidth-optimal repair schemes for full-length RS codes proposed by Dau and Milenkovic [11], one of which directly generalizes the scheme proposed by Guruswami and Wootters [9], are both rotational. As a consequence, their I/O costs can be explicitly determined. We conclude that although these schemes achieve optimal repair bandwidth for RS codes, the I/O cost required is as high as that of the naive repair. Corollary 1. The repair schemes for full-length Reed-Solomon codes with n = q ` and r = n − k = q m , 1 ≤ m < `, proposed in [11], have the I/O cost k` sub-symbols in F . Proof. There are two repair schemes presented in [11], both of Q which are based on the subspace polynomial LW (x) = ω∈W (x − ω), where W is an m-dimensional F -subspace of E. In their Construction III, the set of dual codewords used to repair cj ∗ is given below, where {βi }`i=1 is an F -basis of E.   LW βi (αn −αj ∗ ) LW (βi (α1 −αj ∗ )) (i) ,..., , i ∈ [`]. g = α1 −αj ∗ αn −αj ∗ Let S = im(LW ), which is an (`−m)-dimensional F -subspace of E. The column-spaces in this repair scheme are (j 6= j ∗ )   LW (βi (αj −αj ∗ )) S Sj→j ∗ = spanF : i ∈ [`] = . ∗ αj −αj αj −αj ∗ For the last equality, note that as {βi (αj − αj ∗ )}`i=1 forms an F -basis of E and LW is a linear mapping from E to itself, ` the set LW βi (αj − αj ∗ ) i=1 indeed spans the subspace S = im(LW ). As for n = |E| we have {1/(αj − αj ∗ ) : j ∈ [n] \ {j ∗ }} = E ∗ , the corresponding repair scheme is a rotational one with column-dimension s = dimF (S) = ` − m. Thus, according to Theorem 1, the repair scheme in [11, Construction III] has an I/O cost of   ` q ` − q `−(`−m) = ` q ` − q m = `(n − r) = k`. The same conclusion applies to the repair scheme in [11, Construction II] using similar arguments.  B. Flexible Bases The choice of bases used to represent finite field elements, which clearly does not affect the repair bandwidth, may have an impact on the I/O cost of the repair scheme. For instance, suppose j, j ∗ ∈ [n] such that j 6= j ∗ , and Rj ∗ is a repair scheme for cj ∗ . Node j can easily choose a suitable basis B that minimizes the amount of data it needs to read according to Rj ∗ as follows. Let Sj→j ∗ be the column-space of Rj ∗ and {γt }st=1 one of its F -basis. We can extend this basis of Sj→j ∗ to a basis of E, namely {γi }`i=1 , and select B = {βi }`i=1 as its dual, i.e., Tr(γi βj ) = 1 if i = j and 0 otherwise. Then  wγt ,B = Tr(γt β1 ), . . . , Tr(γt β` ) =et =(0, . . . , 0, 1, 0, . . . , 0). | {z } t The number of sub-symbols of cj that Node j has to read is s [   B supp Wj→j = supp wγt ,B = s = dim(Sj→j ∗ ). ∗ t=1 Note that the I/O cost incurred at a particular node is always bounded from below by the bandwidth used at that node,  B ≥ dim(Sj→j ∗ ). Therefore, selecting this i.e. supp Wj→j ∗ basis, Node j is able to minimize the I/O cost incurred in repairing Node j ∗ . This particular choice of basis, however, may not work well for Node j in the repair process of other nodes. Therefore, given a collection of n repair schemes for every node, one could seek to minimize the average I/O cost at each storage node in the repair process of all other n − 1 nodes. The average I/O cost of a collection of repair schemes is defined as follows. n X X  4 1 B , (6) min supp Wj→j I (R) = ∗ n j=1 B ∗ j 6=j B where Wj→j ∗ is defined as in (4) and the collection of repair schemes R = {Rj ∗ }nj∗ =1 is given. Given that bandwidth is usually the most expensive resource, we find it reasonable to start out with a collection of repair schemes that are bandwidth efficient and then proceed to optimize its average I/O cost. Definition 5 (Symmetric repair schemes). A collection of n repair schemes R = {Rj ∗ }nj∗ =1 is said to be symmetric if Sj ∗ →j = Sj→j ∗ , for every j 6= j ∗ , j, j ∗ ∈ [n]. Theorem 2. The average I/O cost of a symmetric collection of rotational repair schemes with column-dimension s for a Reed-Solomon code of full length q ` is `(q ` − q `−s ). Proof. As the collection is symmetric, Sj ∗ →j = Sj→j ∗ , which B implies WjB∗ →j = Wj→j ∗ . Hence, the total I/O cost incurred at Node j ∗ during the repair of all other nodes is X X   B = `(q ` − q `−s ), supp Wj→j supp WjB∗ →j = ∗ j6=j ∗ j6=j ∗ where the last equality follows from Theorem 1, regardless of the choice of basis B at Node j ∗ . Thus, I (R) = `(q ` − q `−s ).  Since Sj ∗ →j = S/(αj ∗ − αj ) = S/(αj − αj ∗ ) = Sj→j ∗ , the collection of repair schemes proposed in [11, Construction III] is symmetric. Hence, even if different storage nodes are allowed to optimize their own bases, the average I/O cost is still k`. The same conclusion holds for [11, Construction II]. Corollary 2. The collection of repair schemes for full-length Reed-Solomon codes with n = q ` and r = n − k = q m , 1 ≤ m < `, proposed in [11], have the average I/O cost k`. IV. BANDWIDTH O PTIMALITY R EQUIRES H IGH I/O C OST In this section, we show that when r = q = 2, every bandwidth-optimal linear repair scheme for a full-length RS code over Fq` must be rotational, which in turn implies that high I/O cost is necessary to achieve optimal bandwidth. Note that as proved in [9], every linear repair scheme for an RS code can be described as in Section II. A fixed basis is assumed. A characterization of rotational repair schemes with columndimension s = ` − 1 is presented in Lemma 7. Lemma 7. A linear repair scheme for a full-length RS code over Fq` is rotational with column-dimension ` − 1 if and only if every (` − 1)-dimensional subspace of Fq` appears among the column-spaces of the scheme exactly q − 1 times. Proof. Note that there are precisely (q ` − 1)/(q − 1) Fq subspaces of Fq` of dimension ` − 1. Therefore, for any Fq subspace S of dimension ` − 1, the collection of Fq -subspaces {γS : γ ∈ F∗q` } covers each (` − 1)-dimensional Fq -subspace of Fq` precisely q − 1 times. That explains the lemma.  Lemma 8 states the fact that for full-length RS codes, to study repair bandwidth and I/O cost, it suffices to just examine repair schemes for the first component c1 = f (0), deg(f ) < k. This will significantly simplify our study. Recall that the dual of a full-length RS code is another RS code with dimension r.  Lemma 8. Let g (i) = gi (α1 ), . . . , gi (αn ) , i ∈ [`], where n = q ` , Fq` = {0 = α1 , α2 , . . . , αn }, and gi (x) ∈ Fq` [x] are 4 polynomials of degree at most r −1. Let hi (x) = gi (x + αj ∗ ) (i) (i) ` and h = hi (α1 ), . . . , hi (αn ) . Then {g }i=1 forms a repair scheme for cj ∗ if and only if {h(i) }`i=1 forms a repair scheme for c1 and moreover, these two schemes will have the same repair bandwidth and I/O cost. Proof. Since hi (α1 ) = hi (0) = gi (αj ∗ ), the set {gi (αj ∗ )}`i=1 is an Fq -basis of Fq` if and only if the set {hi (α1 )}`i=1 is an Fq -basis of Fq` . This explains the first statement of the lemma. For the second statement on repair bandwidth and I/O cost, note that as the code is full length, we have {α1 , . . . , αn } ≡ Fq` . Moreover, hi (αj ) = gi (αj +αj ∗ ), for j ∈ [n]. Hence, the collection of column-spaces of the repair scheme for c1 based on {h(i) }`i=1 is simply a rearrangement of the column-spaces of the repair scheme for cj ∗ based on {g (i) }`i=1 .  Lemma 9. Suppose B = {bi }`i=1 is an F2 -basis of F2` while A = {ai }`i=1 is not. Then there exists γ ∈ F∗2` so that A + 4 γB = {ai + γbi }`i=1 is also an F2 -basis of F2` . Proof. Set SA = spanF2 (A) and τ a mapping from F2` to SA P` P` defined by τ ( i=1 ηi bi ) = i=1 ηi ai , for every ηi ∈ F2 . Since A is linearly dependent over F2 , there exists u0 ∈ F∗2` 4 such that τ (u0 ) = 0. Therefore, the set C = {u−1 τ (u) : u ∈ ∗ F2` } contains 0. Moreover, it is clear that |C| ≤ |F∗2` | = 2` −1. Therefore, there exists a nonzero element γ 6∈ C. We now show that A + γB is linearly independent over F2 . Indeed, it sufficesPto show that for every (η1 , . . . , η`P ) 6≡ (0, . . . , 0), ` ` we have i=1 ηi (ai + γbi ) 6= 0. Let u = i=1 ηi bi , then because B is a basis, 6= 0. As γ 6∈ C, we have γu 6= τ (u), Pu ` which implies that i=1 ηi (ai + γbi ) 6= 0, as desired.  Lemma 10 is due to Proposition 1 and Corollary 1 in [11]. Lemma 10. In every bandwidth-optimal linear repair scheme for a full-length Reed-Solomon code with n = q ` , r = q m , and m ∈ [` − 1], the column-spaces all have dimension ` − 1. We are now ready to prove the main theorem of this section. Theorem 3. Every bandwidth-optimal linear repair scheme for full-length Reed-Solomon codes with n = 2` and r = 2 must be rotational. Thus, such a scheme must incur an I/O cost k`. Proof. By Lemma 8, it suffices to consider a bandwidthoptimal repair scheme for c1 . Supposed that this scheme is based on the dual codewords g (i) = gi (α1 ), . . . , gi (αn ) , i ∈ [`], where n = q ` , Fq` = {0 = α1 , α2 , . . . , αn }, and gi (x) ∈ F2` [x] are polynomials of degree at most one. Set bi = gi (0), then {bi }`i=1 is an F2 -basis of F2` since {g (i) }`i=1 forms a repair scheme for c1 . As the scheme is bandwidthoptimal, by Lemma 10, dimF2 (Sj→1 ) = `−1, for every j 6= 1. To prove by contradiction, we assume that the scheme is not rotational. Due to Lemma 7, as q = 2, this means that there exist two identical column-spaces. Without loss of generality, 4 we may assume that S23 = S2→1 ≡ S3→1 . Then gi (α2 ) = (i) (i) g2 ∈ S23 and gi (α3 ) = g3 ∈ S23 , for i ∈ [`]. Note that dimF2 (S23 ) = ` − 1. By interpolation, (i) gi (x) = (i) (i) (i) g + g3 x α3 g2 + α2 g3 + 2 x = bi + ai , α2 + α3 α2 + α3 α2 + α3 4 (i) (i) where ai = g2 + g3 ∈ S23 and bi = gi (0). Then A = {ai }`i=1 ⊆ S23 and B = {bi }`i=1 satisfy the condition of Lemma 9. Hence, there exists γ 6= 0 such that A + γB is an F2 -basis of F2` , which implies that B + γ −1 A is also a basis. αj Take j ∈ [n] such that α2 +α = γ −1 . Then αj 6= α1 = 0 and 3   Sj→1 = spanF2 {gi (αj )}`i=1 = spanF2 {bi +γ −1 ai }`i=1 = F2` . This contradicts the earlier statement that dimF2 (Sj→1 ) = `−1 whenever j 6= 1. Thus, such a scheme must be rotational. The conclusion on the I/O cost follows from Theorem 1.  Finally, we remark that the conclusion of Theorem 3 does not extend to full-length MDS codes. Indeed, one can easily find a repair scheme for a [4, 2]4 MDS code that is bandwidth optimal but not rotational. For instance, take g (1) = (1, 0, 1, 1) and g (2) = (ξ, 1, 0, 1), where F4 = {0, 1, ξ, ξ + 1}. ACKNOWLEDGMENT The authors thank Dung Duong for helpful discussions. R EFERENCES [1] I. S. Reed and G. Solomon, “Polynomial codes over certain finite fields,” J. Soc. Ind. Appl. Math., vol. 8, no. 2, pp. 300–304, 1960. [2] A. Dimakis, P. Godfrey, M. Wainwright, and K. Ramchandran, “Network coding for distributed storage systems,” in Proc. 26th IEEE Int. Conf. Comput. Commun. (INFOCOM), 2007, pp. 2000–2008. [3] A. Dimakis, P. Godfrey, Y. Wu, M. Wainwright, and K. Ramchandran, “Network coding for distributed storage systems,” IEEE Trans. Inform. Theory, vol. 56, no. 9, pp. 4539–4551, 2010. [4] A. Dimakis, K. Ramchandran, Y. Wu, and C. Suh, “A survey on network codes for distributed storage,” Proc. IEEE, vol. 99, no. 3, pp. 476–489, 2011. [5] F. Oggier and A. Datta, “Self-repairing homomorphic codes for distributed storage systems,” in Proc. IEEE Int. Conf. Comput. Commun. (INFOCOM), 2011, pp. 1215–1223. [6] P. Gopalan, C. Huang, H. Simitci, and S. Yekhanin, “On the locality of codeword symbols,” IEEE Trans. Inform. Theory, vol. 58, no. 11, pp. 6925–6934, 2012. [7] D. Papailiopoulos and A. Dimakis, “Locally repairable codes,” in Proc. IEEE Int. Symp. Inform. Theory (ISIT), 2012, pp. 2771–2775. [8] K. Shanmugam, D. S. Papailiopoulos, A. G. Dimakis, and G. Caire, “A repair framework for scalar MDS codes,” IEEE J. Selected Areas Comm. (JSAC), vol. 32, no. 5, pp. 998–1007, 2014. [9] V. Guruswami and M. Wootters, “Repairing Reed-Solomon codes,” in Proc. Annu. Symp. Theory Comput. (STOC), 2016. [10] M. Ye and A. Barg, “Explicit constructions of MDS array codes and RS codes with optimal repair bandwidth,” in Proc. IEEE Int. Symp. Inform. Theory (ISIT), 2016, pp. 1202–1206. [11] H. Dau and O. Milenkovic, “Optimal repair schemes for some families of Reed-Solomon codes,” in Proc. IEEE Int. Symp. Inform. Theory (ISIT), 2017, pp. 346–350. [12] I. Duursma and H. Dau, “Low bandwidth repair of the RS(10,4) ReedSolomon code,” in Proc. Inform. Theory Applicat. Workshop (ITA), 2017. [13] A. Chowdhury and A. Vardy, “Improved schemes for asymptotically optimal repair of MDS codes,” in Proc. 55th Annual Allerton Conf. Comm Control Comput. (Allerton), 2017. [14] I. Tamo, M. Ye, and A. Barg, “Optimal repair of Reed-Solomon codes: Achieving the cut-set bound,” in Proc. 58th Annual IEEE Symp. Foundations Computer Sci. (FOCS), 2017. [15] H. Dau, I. Duursma, H. M. Kiah, and O. Milenkovic, “Repairing ReedSolomon codes with multiple erasures,” available at https://arxiv.org/abs/ 1612.01361. [16] ——, “Repairing Reed-Solomon codes with two erasures,” in Proc. IEEE Int. Symp. Inform. Theory (ISIT), 2017, pp. 351–355. [17] B. Bartan and M. Wootters, “Repairing multiple failures for scalar MDS codes,” in Proc. 55th Annual Allerton Conf. Comm Control Comput. (Allerton), 2017. [18] M. Ye and A. Barg, “Repairing Reed-Solomon codes: Universally achieving the cut-set bound for any number of erasures,” available at https://arxiv.org/abs/1710.07216. [19] S. Mitra, R. Panta, M.-R. Ra, and S. Bagchi, “Partial-parallel-repair (PPR): a distributed technique for repairing erasure coded storage,” in Proc. European Conf. Computer Syst. (EuroSys), 2016, article No. 30. [20] O. Khan, R. Burns, J. Plank, W. Pierce, and C. Huang, “Rethinking erasure codes for cloud file systems: Minimizing i/o for recovery and degraded reads,” in Proc. 13th USENIX Conf. File Storage Technol. (FAST), 2012. [21] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes. Amsterdam: North-Holland, 1977. [22] R. Lidl and H. Niederreiter, Introduction to Finite Fields and Their Applications. Cambridge University Press, 1986.
7cs.IT
SETH-Based Lower Bounds for Subset Sum and Bicriteria Path Amir Abboud1 , Karl Bringmann2 , Danny Hermelin3 , and Dvir Shabtay3 arXiv:1704.04546v1 [cs.DS] 14 Apr 2017 1 3 Department of Computer Science, Stanford University, CA, USA [email protected] 2 Max Planck Institute for Informatics, Saarland Informatics Campus, Germany [email protected] Department of Industrial Engineering and Management, Ben-Gurion University, Israel [email protected], [email protected] Abstract. Subset Sum and k-SAT are two of the most extensively studied problems in computer science, and conjectures about their hardness are among the cornerstones of fine-grained complexity. One of the most intriguing open problems in this area is to base the hardness of one of these problems on the other. Our main result is a tight reduction from k-SAT to Subset Sum on dense instances, proving that Bellman’s 1962 pseudo-polynomial O∗ (T )-time algorithm for Subset-Sum on n numbers and target T cannot be improved to time T 1−ε · 2o(n) for any ε > 0, unless the Strong Exponential Time Hypothesis (SETH) fails. This is one of the strongest known connections between any two of the core problems of fine-grained complexity. As a corollary, we prove a “Direct-OR” theorem for Subset Sum under SETH, offering a new tool for proving conditional lower bounds: It is now possible to assume that deciding whether one out of N given instances of Subset Sum is a YES instance requires time (N T )1−o(1) . As an application of this corollary, we prove a tight SETH-based lower bound for the classical Bicriteria s, t-Path problem, which is extensively studied in Operations Research. We separate its complexity from that of Subset Sum: On graphs with m edges and edge lengths bounded by L, we show that the O(Lm) pseudopolynomial time algorithm by Joksch from 1966 cannot be improved to Õ(L + m), in contrast to a recent improvement for Subset Sum (Bringmann, SODA 2017). 1 Introduction The field of fine-grained complexity is anchored around certain hypotheses about the exact time complexity of a small set of core problems. Due to dozens of ingenious reductions, we now know that the current algorithms for many important problems are optimal unless breakthrough algorithms for the core problems exist. A central challenge in this field is to understand the connections and relative difficulties among these core problems. In this work, we discover one of the strongest connections to date between two core problems: a tight reduction from k-SAT to Subset Sum. In the first part of the introduction we discuss this new reduction and how it affects the landscape of fine-grained complexity. Then, in Section 1.2, we highlight a corollary of this reduction which gives a new tool for proving conditional lower bounds. As an application, in Section 1.3, we prove the first tight bounds for the classical Bicriteria s, t-Path problem from Operations Research. Subset Sum. Subset Sum is one of the most fundamental problems in computer science. Its most basic form is: given n integers x1 , . . . , xn ∈ N, and a target value T ∈ N, decide whether there is a subset of the numbers that sums to T . The two most classical algorithms for the problem are the pseudo-polynomial O(T n) algorithm using dynamic programming [29], and the O(2n/2 · poly(n, log T )) algorithm via “meet-in-the-middle” [66]. A central open question in Exact Algorithms [111] is whether faster algorithms exist, e.g. can we combine the two approaches to get a T 1/2 · nO(1) time algorithm? Such a bound was recently found in a Merlin-Arthur setting [91]. n Open Question 1 Is Subset Sum in time T 1−ε · 2o(n) or 2(1−ε) 2 · T o(1) , for some ε > 0? The status of Subset Sum as a major problem has been established due to many applications, deep connections to other fields, and educational value. The O(T n) algorithm from 1957 is an illuminating example of dynamic programming that is taught in every undergraduate algorithms course, and the NP-hardness proof (from Karp’s original paper [75]) is a prominent example of a reduction to a problem on numbers. Interestingly, one of the earliest cryptosystems by Merkle and Hellman was based on Subset Sum [89], and was later extended to a host of Knapsack-type cryptosystems4 (see [103,32,94,46,68] and the references therein). The version of Subset Sum where we ask for k numbers that sum to zero (the k-SUM problem) is conjectured to have n⌈k/2⌉±o(1) time complexity. Most famously, the k = 3 case is the 3-SUM conjecture highlighted in the seminal work of Gajentaan and Overmars [56]. It has been shown that this problem lies at the core and captures the difficulty of dozens of problems in computational geometry. Searching in Google Scholar for “3sum-hard” reveals more than 250 papers (see [77] for a highly partial list). More recently, these conjectures have become even more prominent as core problems in fine-grained complexity since their interesting consequences have expanded beyond geometry into purely combinatorial problems [99,110,38,71,12,6,80,7,61,71]. Note that k-SUM inherits its hardness from Subset Sum, by a simple reduction: to answer Open Question 1 positively it is enough to solve k-SUM in T 1−ε · no(k) or nk/2−ε · T o(1) time. Entire books [88,76] are dedicated to the algorithmic approaches that have been used to attack Subset Sum throughout many decades, and, quite astonishingly, major algorithmic advances are still being discovered in our days, e.g. [85,67,27,51,14,105,74,60,44,16,17,82,55,23,91,79,34], not to mention the recent developments on generalized versions (see [25]) and other computational models (see [104,41]). Only at this upcoming STOC, an algorithm is presented that beats the trivial 2n bound while using polynomial space [23]. Slightly earlier, at SODA’17, we have seen the first improvements (beyond log factors [97]) over the O(T n) algorithm, reducing the bound to Õ(T + n) [79,34]. And a few years earlier, a surprising result celebrated by cryptographers [67,27] showed that 20.499 algorithms are possible on random instances. All this progress leads to the feeling that a positive resolution to Open Question 1 might be just around the corner. SETH. k-SAT is an equally fundamental problem (if not more) but of a Boolean rather than additive nature, where we are given a k-CNF formula on n variables and m clauses, and the task is to decide whether it is satisfiable. All known algorithms have a running time of the form O(2(1−c/k)n ) for some constant c > 0 [96,49,8], and the Strong Exponential Time Hypothesis (SETH) of Impagliazzo and Paturi [69,70,39] states that no O(2(1−ε)n ) time algorithms are possible for k-SAT, for some ε > 0 independent of k. Refuting SETH implies advances in circuit complexity [72], and is known to be impossible with popular techniques like resolution [26]. A seminal paper of Cygan, Dell, Lokshtanov, Marx, Nederlof, Okamoto, Paturi, Saurabh, and Wahlström [48] strives to classify the exact complexity of important NP-hard problems under SETH. 4 Cryptographers usually refer to Subset Sum as Knapsack. 2 The authors design a large collection of ingenious reductions and conclude that 2(1−ε)n algorithms for problems like Hitting Set, Set Splitting, and Not-All-Equal SAT are impossible under SETH. Notably, Subset Sum is not in this list nor any problem for which the known algorithms are nontrivial (e.g. require dynamic programming). As the authors point out: “Of course, we would also like to show tight connections between SETH and the optimal growth rates of problems that do have non-trivial exact algorithms.” Since the work of Cygan et al. [48], SETH has enjoyed great success as a basis for lower bounds in Parameterized Complexity [84] and for problems within P [109]. Some of the most fundamental problems on strings (e.g. [9,18,2,36,19,35]), graphs (e.g. [83,101,6,57]), curves (e.g. [33]), vectors [107,108,20,30] and trees [1] have been shown to be SETH-hard: a small improvement to the running time of these problems would refute SETH. Despite the remarkable quantity and diversity of these results, we are yet to see a (tight) reduction from SAT to any problem like Subset Sum, where the complexity comes from the hardness of analyzing a search space defined by addition of numbers. In fact, all hardness results for problems of a more number theoretic or additive combinatoric flavor are based on the conjectured hardness of Subset Sum itself. In this paper, we address one of the most intriguing open questions in the field of fine-grained complexity: Can we prove a tight SETH-based lower bound for Subset Sum? The standard NP-hardness√proofs imply loose lower bounds under SETH (in fact, under the weaker ETH) stating that 2o( n) algorithms are impossible. A stronger but still loose result of Patrascu and Williams [95] shows that if we solve k-SUM in no(k) or T o(1) time, then ETH is false. These results leave the possibility of O(T 0.001 ) algorithms and are not satisfactory from the viewpoint of fine-grained complexity. While it is completely open whether such algorithms imply new SAT algorithms, it has been shown that they would imply new algorithms for other famous problems. Bringmann [34] recently observed that a an O(T 0.78 ) algorithm for Subset-Sum implies a new algorithm for k-Clique, via a reduction of Abboud, Lewi, and Williams [5]. To get a tight lower bound ruling out O(T 1−ε poly(n)) algorithms, while overcoming the difficulty of reducing SETH to NP-hard problems with dynamic programming algorithms, Cygan et al. [48] were forced to introduce a new untested conjecture essentially stating that the Set Cover problem on m sets over a universe of size n cannot be solved in O(2(1−ε)n · poly(m)) time. More than five years after its introduction, this Set Cover Conjecture has not found other major consequences besides this lower bound for Subset Sum, and a lower bound for the Steiner Tree problem; other corollaries of the conjecture include tight lower bounds for less famous problems like Connected Vertex Cover, and Set Partitioning [48]. Whether this conjecture can be based on or replaced by the much more popular SETH remains a major open question. 1.1 Main Result The dream theorem in this context would be that SETH implies a negative resolution to Open Question 1. Our main result accomplishes half of this statement, showing a completely tight reduction from SAT to Subset Sum on instances where T = 2δn , also known as dense instances5 , ruling out T 1−ε · 2o(n) time algorithms under SETH. Theorem 1. Assuming SETH, for any ε > 0 there exists a δ > 0 such that Subset Sum is not in time O(T 1−ε 2δn ), and k-Sum is not in time O(T 1−ε nδk ). 5 The density of an instance is the ratio n . log2 max xi 3 Thus, Subset Sum is yet another SETH-hard problem. This is certainly a major addition to this list, and some people might even consider it the most exciting member. This also adds many other problems that have reductions from Subset Sum, e.g. the famous Knapsack problem, or from k-SUM (e.g. [54,31,4,43,78]). For some of these problems, to be discussed shortly, this even leads to better lower bounds. Getting a completely tight reduction that also rules out 2(1−ε)n/2 ·T o(1) algorithms under SETH is still a fascinating open question. Notably, the strongest possible reduction, ruling out n⌈k/2⌉−ε ·T o(1) algorithms for k-SUM, is provably impossible under the Nondeterministic SETH of Carmosino et al. [42], but there is no barrier for an nk/2−o(1) lower bound. Theorem 1 shows that the lower bound of Cygan et al. [48] can be based on SETH rather than the Set Cover Conjecture, which, in some sense, makes the latter conjecture a little less interesting. As a result, the only major problems that enjoy tight lower bounds under this conjecture, but not under SETH, are Steiner Tree and Set Cover itself. Our work highlights the following open question: Can we either prove SETH-based lower bounds for Set Cover and Steiner Tree, or find faster exact algorithms for them? A substantial technical barrier that we had to overcome when designing our reduction is the fact that there was no clear understanding of what the hard instances of Subset Sum should look like. Significant effort has been put into finding and characterizing the instances of Subset Sum and Knapsack that are hard to solve. This is challenging both from an experimental viewpoint (see the study of Pisinger [98]) and from the worst-case analysis perspective (see the discussion of Nederlof et al. [17]). Recent breakthroughs refute the common belief that random instances are maximally hard [67,27], and show that better upper bounds are possible for various classes of inputs. Our reduction is able to generate hard instances by crucially relying on a deep result on the combinatorics of numbers: the existence of dense sum-free sets. A surprising construction of these sets from 1946 due to Behrend [28] (see also [52,93]) has already lead to breakthroughs in various areas of theoretical computer science [45,47,10,64,50,3]. These are among the most non-random-like structures in combinatorics, and therefore allow our instances to bypass the easyness of random inputs. This leads us to a candidate distribution of hard instances for Subset Sum, which could be of independent interest: Start from hard instances of SAT (e.g. random formulas around the threshold) and map them with our reduction (the obtained distribution over numbers will be highly structured). Very recently, it was shown that the security of certain cryptographic primitives can be based on SETH [21,22]. We hope that our SETH-hardness for an already popular problem in cryptography will lead to further interaction between fine-grained complexity and cryptography. In particular, it would be exciting if our hard instances could be used for a new Knapsack-type cryptosystem. Such schemes tend to be much more computationally efficient than popular schemes like RSA [32,94,68], but almost all known ones are not secure (as famously shown by Shamir [103]). Even more recently, and independently, Bennett, Golovnev, and Stephens-Davidowitz [30] proved SETH hardness for another central problem from cryptography, the Closest-Vector-Problem (CVP). While CVP is a harder problem than Subset Sum, their hardness result addresses a different regime of parameters, and rules out O(2(1−ε)n ) time algorithms (when the numbers or dimension are large). It would be exciting to combine the two techniques and get a completely tight lower bound for CVP. 4 1.2 A Direct-OR Theorem for Subset Sum Some readers might find the above result unnecessary: What is the value in a SETH-based lower bound if we already believe the Set Cover Conjecture of Cygan et al.? The rest of this introduction discusses new lower bound results that, to our knowledge, would not have been possible without our new SETH lower bound. To clarify what we mean, consider the following ”Direct-OR” version of Subset Sum: Given N different and independent instances of Subset Sum, each on n numbers and each with a different target Ti ≤ T , decide whether any of them is a YES instance. It is natural to expect the time complexity of this problem to be (N T )1−o(1) , but how do we formally argue that this is the case? If we could assume that this holds, it would be a very useful tool for conditional lower bounds (as we show in Section 1.3). Many problems, like SAT, have a simple self-reduction proving that the direct-OR version is hard, assuming the problem itself is hard: To solve a SAT instance on n variables, it is enough to solve 2x instances on n − x variables. This is typically the case for problems where the best known algorithm is essentially matched with a brute force algorithm. But what about Subset Sum or Set Cover? Can we use an algorithm that solves N instances of Subset Sum in O(N 0.1 · T ) time to solve Subset Sum in O(T 1−ε ) time? We cannot prove such statements, however, we can prove that such algorithms would refute SETH. Corollary 1. Assuming SETH, for any ε > 0 and γ > 0 there exists a δ > 0 such that no algorithm can solve the OR of N given instances of Subset Sum on target values T1 , . . . , TN = O(N γ ) and at most δ log N numbers each, in total time O(N 1+γ−ε ). 1.3 The Fine-Grained Complexity of Bicriteria Path The Bicriteria s, t-Path problem is the natural bicriteria variant of the classical s, t-Path problem where edges have two types of weights and we seek an s, t-path which meets given demands on both criteria. More precisely, we are given a directed graph G where each edge e ∈ E(G) is assigned a pair of non-negative integers ℓ(e) and c(e), respectively denoting the length and cost of e, and two non-negative integers L and C representing our budgets. The goal is to determine whether there is , ek in G, between a given source and a target vertex s, t ∈ V (G), such that Pkan s, t-path e1 , . . .P k ℓ(e ) ≤ L and i i=1 i=1 c(ei ) ≤ C. This natural variant of s, t-Path has been extensively studied in the literature, by various research communities, and has many diverse applications in several areas. Most notable of these are perhaps the applications in the area of transportation networks [59], and the quality of service (QoS) routing problem studied in the context of communication networks [86,112]. There are also several applications for Bicriteria s, t-Path in Operations Research domains, in particular in the area of scheduling [37,81,90,102], and in column generation techniques [65,113]. Additional applications can be found in road traffic management, navigation systems, freight transportation, supply chain management and pipeline distribution systems [59]. A simple reduction proves that Bicriteria s, t-Path is at least as hard as Subset Sum (see Garey and Johnson [58]). In 1966, Joksch [73] presented a dynamic programming algorithm with pseudo-polynomial running time O(Lm) (or O(Cm)) on graphs with m edges. Extensions of this classical algorithm appeared in abundance since then, see e.g. [13,62,100] and the various FPTASs for the optimization variant of the problem [53,59,63,87,106]. The reader is referred to the survey by Garroppo et al. [59] for further results on Bicriteria s, t-Path. 5 Our SETH-based lower bound for Subset Sum easily transfers to show that a O(L1−ε 2o(n) ) time algorithm for Bicriteria s, t-Path refutes SETH. However, after the O(T n) algorithm for Subset Sum from 1960 was improved last year to Õ(T + n), it is natural to wonder if the similar O(Lm) algorithm for Bicriteria s, t-Path from 1966 can also be improved to Õ(L + m) or even just to O(Lm0.99 ). Such an improvement would be very interesting since the pseudo-polynomial algorithm is commonly used in practice, and since it would speed up the running time of the approximation algorithms. We prove that Bicriteria s, t-Path is in fact a harder problem than Subset Sum, and an improved algorithm would refute SETH. The main application of Corollary 1 that we report in this paper is a tight SETH-based lower bound for Bicriteria s, t-Path, which (conditionally) separates the time complexity of Bicriteria s, t-Path and Subset Sum. Theorem 2. Assuming SETH, for any ε > 0 and γ > 0 no algorithm solves Bicriteria s, t-Path on sparse n-node graphs and budgets L, C = Θ(nγ ) in time O(n(1+γ)(1−ε) ). Intuitively, our reduction shows how a single instance of Bicriteria s, t-Path can simulate multiple instances of Subset Sum and solve the ”Direct-OR” version of it. Our second application of Corollary 1 concerns the number of different edge-lengths and/or edge-costs in our given input graph. Let λ denote the former parameter, and χ denote the latter. Note that λ and χ are different from L and C, and each can be quite small in comparison to the size of the entire input. In fact, in many of the scheduling applications for Bicriteria s, t-Path discussed above it is natural to assume that one of these is quite small. We present a SETH-based lower bound that almost matches the O(nmin{λ,χ}+2 ) upper bound for the problem. Theorem 3. Bicriteria s, t-Path can be solved in O(nmin{λ,χ}+2 ) time. Moreover, assuming SETH, for any constants λ, χ ≥ 2 and ε > 0, there is no O(nmin{λ,χ}−1−ε ) time algorithm for the problem. Finally, we consider the case where we are searching for a path that uses only k internal vertices. This parameter is naturally small in comparison to the total input length in several applications of Bicriteria s, t-Path, for example the packet routing application discussed above. We show that this problem is equivalent to the k-Sum problem, up to logarithmic factors. For this, we consider an intermediate exact variant of Bicriteria s, t-Path, the Zero-Weight-k-Path problem, and utilize the known bounds for this variant to obtain the first improvement over the O(nk )-time brute-force algorithm, as well as a matching lower bound. Theorem 4. Bicriteria s, t-Path can be solved in Õ(n⌈(k−1)/2⌉ ) time. Moreover, for any ε > 0, there is no Õ(n⌈(k−1)/2⌉−ε )-time algorithm for the problem, unless k-Sum has an Õ(n⌈(k−1)/2⌉−ε )time algorithm. 2 Preliminaries For a fixed integer p, we let [p] denote the set of integers {1, . . . , p}. All graphs in this paper are, unless otherwise stated, simple, directed, and without self-loops. We use standard graph theoretic notation, e.g. for a graph G we let V (G) and E(G) denote the set of vertices and edges of G, respectively. Throughout the paper, we use the O ∗ (·) and Õ(·) notations to suppress polynomial and logarithmic factors. 6 Hardness Assumptions: The Exponential Time Hypothesis (ETH) and its strong variant (SETH) are conjectures about running time of any algorithm for the k-SAT problem: Given a boolean CNF formula φ, where each clause has at most k literals, determine whether φ has a satisfying assignment. Let sk = inf{δ : k-SAT can be solved in O ∗ (2δn ) time}. The Exponential Time Hypothesis, as stated by Impagliazzo, Paturi and Zane [70], is the conjecture that s3 > 0. It is known that s3 > 0 if and only if there is a k ≥ 3 such that sk > 0 [70], and that if ETH is true, the sequence {sk }∞ k=1 increases infinitely often [69]. The Strong Exponential Time Hypothesis, coined by Impagliazzo and Paturi [40,69], is the conjecture that limk→∞ sk = 1. In our terms, this can be stated in the following more convenient manner: Conjecture 1. For any ε > 0 there exists k ≥ 3 such that k-SAT on n variables cannot be solved in time O(2(1−ε)n ). We use the following standard tool by Impagliazzo, Paturi and Zane: Lemma 1 (Sparsification Lemma [70]). For any ε > 0 and k ≥ 3, there exists ck,ε > 0 and an algorithm that, given a k-SAT instance φ on n variables, computes k-SAT instances φ1 , . . . , φℓ with ℓ ≤ 2εn such that φ is satisfiable if and only if at least one φi is satisfiable. Moreover, each φi has n variables, each variable in φi appears in at most ck,ε clauses, and the algorithm runs in time poly(n)2εn . The k-SUM Problem: In k-SUM we are given sets Z1 , . . . , Zk of non-negative integers and a target T , and we want to decide whether there are z1 ∈ Z1 , . . . , zk ∈ Zk such that z1 + . . . + zk = T . This problem can be solved in time O(n⌈k/2⌉ ) [66], and it is somewhat standard by now to assume that this is essentially the best possible [4]. This assumption, which generalizes the more popular assumption of the k = 3 case [56,99], remains believable despite recent algorithmic progress [15,24,44,74,105]. Conjecture 2. k-Sum cannot be solved in time Õ(n⌈k/2⌉−ε ) for any ε > 0 and k ≥ 3. 3 From SAT to Subset Sum In this section we present our main result, the hardness of Subset Sum and k-Sum under SETH. Our reduction goes through three main steps: We start with an k-SAT formula φ that is the input to our reduction. This formula is then reduced to subexponentially many Constraint Satisfaction Programs (CSP) with a restricted structure. The main technical part is then to reduce these CSP instances to equivalent Subset Sum instances. The last part of our construction, reducing Subset Sum to k-Sum, is rather standard. In the final part of the section we provide a proof for Corollary 1, showing that Subset Sum admits the ”Direct-OR” property discussed in Section 1.2. 3.1 From k-SAT to Structured CSP We first present a reduction from k-SAT to certain structured instances of Constraint Satisfaction Programs (CSP). This is a standard combination of the Sparsification Lemma with well-known tricks. Lemma 2. Given a k-SAT instance φ on n variables and m clauses, for any ε > 0 and a ≥ 1 we can compute in time poly(n)2εn CSP instances ψ1 , . . . , ψℓ , with ℓ ≤ 2εn , such that φ is satisfiable if and only if some ψi is satisfiable. Each ψi has n̂ = ⌈n/a⌉ variables over universe [2a ] and m̂ = ⌈n/a⌉ constraints. Each variable is contained in at most ĉk,ε · a constraints, and each constraint contains at most ĉk,ε · a variables, for some constant ĉk,ε depending only on k and ε. 7 Proof. Let φ be an instance of k-SAT with n variables and m clauses. We start by invoking the Sparsification Lemma (Lemma 1). This yields k-SAT instances φ1 , . . . , φℓ with ℓ ≤ 2εn such that φ is satisfiable if and only if some φi is satisfiable, and where each φi has n variables, and each variable in φi appears in at most ck,ε clauses of φi , for some constant ck,ε . In particular, the number of clauses is at most ck,ε n. We combine multiple variables to a super-variable and multiple clauses to a super-constraint, which yields a certain structured CSP. Specifically, let a ≥ 1, and partition the variables into ⌈n/a⌉ blocks of length a. We replace each block of a variables by one super-variable over universe [2a ]. Similarly, we partition the clauses into ⌈n/a⌉ blocks, each containing γ := ack,ε clauses. We replace each block of γ clauses C1 , . . . , Cγ by one super-constraint C that depends on all super-variables containing variables appearing in C1 , . . . , Cγ . Clearly, the resulting CSP ψi is equivalent to φi . Since each variable appears in at most ck,ε clauses in φi , and we combine a variables to obtain a variable of ψi , each variable appears in ψi in at most ack,ε constraints. Similarly, each clause in φi contains at most k variables, and each superconstraint consists of γ = ack,ε clauses, so each super-constraint contains at most ĉk,ε a variables for ĉk,ε = kck,ε . This finishes the proof. ⊔ ⊓ 3.2 From Structured CSP to Subset Sum Next we reduce to Subset Sum. Specifically, we show the following. Theorem 5. For any ε > 0, given a k-SAT instance φ on n variables we can in time poly(n)2εn construct 2εn instances of Subset Sum on at most c̃k,ε n items and target at most 2(1+2ε)n such that φ is satisfiable iff at least one of the Subset Sum instances is a YES-instance. Here c̃k,ε is a constant depending only on k and ε. As discussed in Section 1.1, our reduction crucially relies on a construction of sum-free sets. For any k ≥ 2, a set S of integers is k-sum-free iff for all k′ ≤ k and (not necessarily distinct) x1 , . . . , xk′ +1 ∈ S with x1 + . . . + xk′ = k′ · xk′ +1 we have x1 = . . . = xk′ +1 . A surprising construction by Behrend [28] has been slightly adapted in [5], showing the following. Lemma 3. For any ε > 0, there exists c > 0 such that a k-sum-free set S of size n, with S ⊂ [0, (ckn)1+ε ], can be constructed in poly(n) time. While it seems natural to use this lemma when working with an additive problem like Subset Sum, the only other example of a reduction using this lemma we are aware of is a reduction from k-Clique to k2 -SUM on numbers in nk+o(1) [5]. Our result can be viewed as a significant boosting of this reduction, where we exploit the power of Subset Sum further. Morally, k-Clique is like MAX-2-SAT, since faster algorithms for k-Clique imply faster algorithms for MAX-2-SAT [107]. We show that even MAX-d-SAT, for any d, can be reduced to k-SUM, which corresponds to a reduction from Clique on hyper-graphs to k-SUM. Proof (of Theorem 5). We let a ≥ 1 be a sufficiently large constant depending only on k and ε. We need a λ-sum-free set, with λ := ĉk,ε a, where ĉk,ε is the constant from Lemma 2. Lemma 3 yields a λ-sum-free set S of size 2a consisting of non-negative integers bounded by B := (cλ2a )1+ε , for some constant c depending only on ε. We let f : [2a ] → [B] be any injective function mapping to S. Note that since a and B are constants constructing f takes constant time. 8 Run Lemma 2 to obtain CSP instances ψ1 , . . . , ψℓ with ℓ ≤ 2εn , each with n̂ = ⌈n/a⌉ variables over universe [2a ] and m̂ = n̂ constraints, such that each variable is contained in at most λ constraints and each constraint contains at most λ variables. Fix a CSP ψ = ψi . We create an instance (Z, T ) of Subset Sum, i.e., a set Z of positive integers and a target value T . We define these integers by describing blocks of their bits, from highest to lowest. The items in Z are naturally partitioned, as for each variable x of ψ there will be items of type x, and for each clause C of ψ there will be items of type C. We first ensure that any correct solution picks exactly one item of each type. To this end, we start with a block of O(log n̂) bits where each item has value 1, and the target value is n̂ + m̂, which ensures that we pick exactly n̂ + m̂ items. This is followed by n̂ + m̂ bits, where each position is associated to one type, and each item of that type has a 1 at this position and 0s at all other positions. The target T has all these bits set to 1. Together, these O(log n̂) + n̂ + m̂ bits ensure that we pick exactly one item of each type. The remaining n̂ blocks of bits correspond to the variables of ψ. For each variable we have a block consisting of ⌈log(2λB +1)⌉ = log B +log λ+O(1) bits. The target number T has bits forming the number λB in each block of each variable. Now we describe the items of type x, where x is a variable. For each assignment α ∈ [2a ] of x, there is an item z(x, α) of type x. In the block corresponding to variable x, the bits of z(x, α) form the number λB − d(x) · f (α), where d(x) is the number of clauses containing x. In all blocks corresponding to other variables, the bits of z(x, α) are 0. Next we describe the items of type C, where C is a constraint. Let x1 , . . . , xs be the variables that are contained in C. For any assignments α1 , . . . , αs ∈ [2a ] of x1 , . . . , xs that jointly satisfy the clause C, there is an item z(C, α1 , . . . , αs ) of type C. In the block corresponding to variable xi the bits of z(C, α1 , . . . , αs ) form the number f (αi ), for any 1 ≤ i ≤ s. In all blocks corresponding to other variables, the bits are 0. Correctness: Recall that the first O(log n̂) + n̂ + m̂ bits ensure that we pick exactly one item of each type. Consider any variable x and the corresponding block of bits. The item of type x picks an assignment α, resulting in the number λB − d(x) · f (α), where d(x) is the degree of x. The d(x) constraints containing x pick assignments α1 , . . . , αd(x) and contribute f (α1 ) + . . . + f (αd(x) ). Hence, the total contribution in the block is f (α1 ) + . . . + f (αd(x) ) − d(x) · f (α) + λB, where d(x) ≤ λ. Since f maps to a λ-sum-free set, we can only obtain the target λB if f (α1 ) = . . . = f (αd(x) ) = f (α). Since f is injective, this shows that any correct solution picks a coherent assignment α for variable x. Finally, this coherent choice of assignments for all variables satisfies all clauses, since clause items only exist for assignments satisfying the clause. Hence, we obtain an equivalent Subset Sum instance. Note that the length of blocks corresponding to variables is set so that there are no carries between blocks, which is necessary for the above argument. Indeed, the degree d(x) of any variable x is at most λ, so the clauses containing x can contribute at most λ · B to its block, while the item of type x also contributes 0 ≤ λB − d(x) · f (α) ≤ λB, which gives a number in [0, 2λB]. Size Bounds: Let us count the number of bits in the constructed numbers. We have O(log n̂)+ n̂+ m̂ bits from the first part ensuring that we pick one item of each type, and n̂ · (log B + log λ + O(1)) 9 bits from the second part ensuring to pick coherent and satisfying assignments. Plugging in B = (cλ2a )1+ε and λ = ĉk,ε a and using n̂ = m̂ = ⌈n/a⌉ yields a total number of bits of log T = O(log n̂) + n̂ + m̂ + n̂ · (log B + log λ + O(1)) = (1 + ε)n + Ok,ε (n log(a)/a), where the hidden constant depends only on k and ε. Since log(a)/a tends to 0 for a → ∞, we can choose a sufficiently large, depending on k and ε, to obtain log T ≤ (1 + ε)n + εn ≤ (1 + 2ε)n. Let us also count the number of constructed items. We have one item for each variable x and each assignment α ∈ [2a ], amounting to 2a n̂ ≤ 2a n items. Moreover, we have one item for each clause C and all assignments α1 , . . . , αs ∈ [2a ] that jointly satisfy the clause C, where s ≤ λ is the 2 number of variables contained in C. This amounts to up to 2aλ m̂ ≤ 2aλ n ≤ 2ĉk,ε a n items. Note that both factors only depend on k and ε, since a only depends on k and ε. Thus, the number of items is bounded by c̃k,ε n, where c̃k,ε only depends on k and ε. In total, we obtain a reduction that maps an instance φ of k-SAT on n variables to 2εn instances of Subset Sum with target at most 2(1+2ε)n on at most c̃k,ε n items. The running time of the reduction is clearly poly(n)2εn . ⊔ ⊓ Our main result (Theorem 1) now follows. Proof (of Theorem 1). Subset Sum: For any ε > 0 set ε′ := ε/5 and let k be sufficiently large so that ′ k-SAT has no O(2(1−ε )n ) algorithm; this exists assuming SETH. Set δ := ε′ /c̃k,ε′ , where c̃k,ε′ is the constant from Theorem 5. Now assume that Subset Sum can be solved in time O(T 1−ε 2δn ). We show that this contradicts SETH. Let φ be a k-SAT instance on n variables, and run Theorem 5 ′ ′ with ε′ to obtain 2ε n Subset Sum instances on at most c̃k,ε′ n items and target at most 2(1+2ε )n . Using the assumed O(T 1−ε 2δn ) algorithm on each Subset Sum instance, yields a total time for k-SAT of ′ ′ ′ poly(n)2ε n + 2ε n · 2(1+2ε )n 1−ε ′ ′ ′ ′ ′ 2δ·c̃k,ε′ n = 2(ε +(1+2ε )(1−5ε )+ε )n ≤ 2(1−ε )n , where we used the definitions of ε′ and δ as well as (1 + 2ε′ )(1 − 5ε′ ) ≤ 1 − 3ε′ . This running time contradicts SETH, yielding the lower bound for Subset Sum. k-SUM: The lower bound O(T 1−ε nδk ) for k-Sum now follows easily from the lower bound for Subset Sum. Consider a Subset Sum instance (Z, T ) on |Z| = n items and target T . Partition Z into sets Z1 , . . . , Zk of of equal size, up to ±1. For each set Zi , enumerate all subset sums Si of Zi , ignoring the subsets summing to larger than T . Consider the k-Sum instance (S1 , . . . , Sk , T ), where the task is to pick items si ∈ Si with s1 + . . . + sk = T . Since |Si | ≤ O(2n/k ), an O(T 1−ε nδk ) time algorithm for k-Sum now implies an O(T 1−ε 2δn ) algorithm for Subset Sum, thus contradicting SETH. ⊔ ⊓ 3.3 Direct-OR Theorem for Subset Sum We now provide a proof for Corollary 1. We show that deciding whether at least one of N given instances of Subset Sum is a YES-instance requires time (N T )1−o(1) , where T is a common upper bound on the target. Here we crucially use our reduction from k-SAT to Subset Sum, since the former has an easy self-reduction allowing us to tightly reduce one instance to multiple subinstances, while such a self-reduction is not known for Subset Sum. 10 Proof (of Corollary 1). Let ε > 0 and γ > 0, we will fix δ > 0 later. Assume that the OR of N given instances of Subset Sum on target values T1 , . . . , TN = O(N γ ) and at most δ log N numbers each, can be solved in total time O(N 1+γ−ε ). We will show that SETH fails. Let φ be an instance of k-SAT on n variables. Split the set of variables into X1 and X2 of size n1 and n2 , such that n2 = γ · n1 (up to rounding). Enumerate all assignments of the variables in X1 . For each such assignment α let φα be the resulting k-SAT instance after applying the partial assignment α. ′ For each φα , run the reduction from Theorem 5 with ε′ = min{1/2, 1/γ} · ε/2, resulting in 2ε n2 ′ instances of Subset Sum on at most c̃k,ε′ n2 items and target at most 2(1+2ε )n2 . In total, we obtain ′ at most 2n1 +ε n2 instances of Subset Sum, and φ is satisfiable iff at least one of these Subset Sum instances is a YES-instance. Set N := 2(1+ε/2)n1 and note that the number of instances is ′ ′ ′ ′ 2n1 +ε n2 = 2(1+γε )n1 ≤ N , and that the target bound is 2(1+2ε )n2 = 2(1+2ε )γn1 ≤ N γ . Thus, we constructed at most N instances of Subset Sum on target at most N γ , each having at most c̃k,ε′ n2 ≤ c̃k,ε′ n items. Using the assumed algorithm, the OR of these instances can be solved in total time O(N (1+γ)(1−ε) ). Since (1 + γ)n1 = n and (1 + ε/2)(1 − ε) ≤ 1 − ε/2, this running time is  (1+γ)(1−ε)   O N (1+γ)(1−ε) = O 2(1+ε/2)n1 = O 2(1−ε/2)n , which contradicts SETH. Specifically, for some k = k(ε) this running time is less than the time ⊔ ⊓ required for k-SAT. Setting δ := c̃k,ε′ finishes the proof. 4 The Bicriteria s, t-Path Problem In this section we apply the results of the previous section to the Bicriteria s, t-Path problem. We will show that the Bicriteria s, t-Path problem is in fact harder than Subset Sum, by proving that the classical pseudo-polynomial time algorithm for the problem cannot be improved on sparse graphs assuming SETH. We also prove Theorem 3 concerning a bounded number of different edgelengths λ and edge-costs χ in the input network, and Theorem 4 concerning a bounded number k of internal vertices in a solution path. 4.1 Sparse networks We begin with the case of sparse networks; i.e. input graphs on n vertices and O(n) edges. We embed multiple instances of Subset Sum into one instance of Bicriteria s, t-Path to prove Theorem 2, namely that there is no algorithm for Bicriteria s, t-Path on sparse graphs faster than the well-known O(min{nL, nC})-time algorithm. Proof (of Theorem 2). We show that for any ε > 0, γ > 0, an algorithm solving Bicriteria s, tPath on sparse n-node graphs and budgets L, C = Θ(nγ ) in time O(n(1+γ)(1−ε) ) contradicts SETH. As in Corollary 1, let (Z1 , T1 ), . . . , (ZN , TN ) be instances of Subset Sum on targets Ti ≤ N γ and number of items |Zi | ≤ δ log N for all i. Without loss of generality, we can assume that all sets Zi have the same size k = δ log N (e.g., by making Zi a multiset containing the number 0 multiple times). Fix an instance (Zi , Ti ) and let Zi = {z1 , . . . , zk }. We construct a graph Gi with nodes s, v1 , . . . , vk , t. Writing v0 := s for simplicity, for each j ∈ [k] we add an edge from vj−1 to vj with length zj and cost N γ − zj , and we add another6 edge from vj−1 to vj with length 0 and cost 6 Note that parallel edges can be avoided by subdividing all constructed edges. 11 N γ . Finally, we add an edge from vk to t with length N γ − Ti and cost Ti . Then the set of s, t-paths correspondsPto the power set of Zi , andPthe s, t-path corresponding to Y ⊆ Zi has total length N γ − Ti + y∈Y y and cost kN γ + Ti − y∈Y y. Hence, setting the upper bound on the length to L = N γ and on the cost to C = kN γ , there is an s, t-path respecting these bounds iff there is a subset Y of Zi summing to Ti , i.e., iff (Zi , Ti ) is a YES-instance. We combine the graphs G1 , . . . , GN into one graph G by identifying all source nodes s, identifying all target nodes t, and then taking the disjoint union of the remainder. With the common length bound L = N γ and cost bound C = kN γ , there is an s, t-path respecting these bounds in G iff some instance (Zi , Ti ) is a YES-instance. Furthermore, note that G has n = Θ(N log N ) vertices, is sparse, and can be constructed in time O(N log N ). Hence, an O(n(1+γ)(1−ε) ) time algorithm for Bicriteria s, t-Path would imply an O(N (1+γ)(1−ε) polylogN ) = O(N (1+γ)(1−ε/2) ) time algorithm for deciding whether at least one of N Subset Sum instances is a YES-instance, a contradiction to SETH by Corollary 1. Finally, let us ensure that L, C = Θ(nγ ). Note that the budgets L and C are both bounded by O(N γ log N ). If γ ≥ 1, then add a supersource s′ and one edge from s′ to s with length and cost equal to N γ logγ N , and add N γ logγ N to L and C. This results in an equivalent instance, and the new bounds L, C are Θ(N γ logγ N ) = Θ(nγ ). If γ < 1, then do the same where the length and cost from s′ to s is N γ log N , and then add N log1/γ N dummy vertices to the graph. Again we obtain budgets L, C = Θ(N γ log N ) = Θ((N log1/γ N )γ ) = Θ(nγ ). In both cases, the same running time ⊔ ⊓ analysis as in the last paragraph goes through. This completes the proof of Theorem 2. 4.2 Few different edge-lengths or edge-costs We next consider the parameters λ (the number of different edge-lengths) and χ (the number of different edge-costs). We show that Bicriteria s, t-Path can be solved in O(nmin{λ,χ}+2 ) time, while its unlikely to be solvable in O(nmin{λ,χ}−1−ε ) for any ε > 0, providing a complete proof for Theorem 3. The upper bound of this theorem is quite easy, and is given in the following lemma. Lemma 4. Bicriteria s, t-Path can be solved in O(nmin{λ,χ}+2 ) time. Proof. It suffices to give an O(nλ+2 ) time algorithm, as time O(nχ+2 ) is symmetric, and a combination of these two algorithms yields the claim. Let ℓ̃1 , . . . , ℓ̃λ be all different edge-length values. We compute a table T [v, i1 , . . . , iλ ], where v ∈ V (G) and i1 , . . . , iλ ∈ {0, . . . , n}, which stores the minimum cost of any s, v-path that has exactly ij edges of length ℓ̃j , for each j ∈ {1, . . . , λ}. For the base case of our computation, we set T [s, 0, . . . , 0] = 0 and T [s, i1 , . . . , iλ ] = ∞ for entries with some ij 6= 0. The remaining entries are computed via the following recursion: T [v, i1 , . . . , iλ ] = min min j∈{1,...,λ} (u,v)∈E(G), ℓ((u,v))=ℓ̃j . T [u, i1 , . . . , ij − 1, . . . , iλ ] + c((u, v)). It is easy to see that the above recursion is correct, since if e1 , . . . , ek is an optimal s, v-path corresponding to an entry T [v, i1 , . . . , iλ ] in T , with ek = (u, v) and ℓ(ek ) = ℓ̃j for some j ∈ {1, . . . , λ}, then e1 , . . . , ek−1 is an optimal s, u-path corresponding to the entry T [u, i1 , . . . , ij − 1, . . . , iλ ]. Thus, after computing table T , we can determineP whether there is a feasible s, t-path in G by checking whether there is an entry T [t, i1 , . . . , iλ ] with λj=1 ij · ℓ̃j ≤ L and T [t, i1 , . . . , iλ ] ≤ C. As there are O(nλ+1 ) entries in T in total, and each entry can be computed in O(n) time, the entire algorithm requires O(nλ+2 ) time. ⊔ ⊓ 12 We now turn to proving the lower-bound given in Theorem 3. The starting point is our lower bound for k-Sum ruling out O(T 1−ε nδk ) algorithms (Theorem 1). We present a reduction from k-Sum to Bicriteria s, t-Path, where the resulting graph in the Bicriteria s, t-Path instance has few different edge-lengths and edge-costs. Let (Z1 , . . . , Zk , T ) be an instance of k-Sum with Zi ⊂ [0, T ] and |Zi | ≤ n for all i, and we want to decide whether there are z1 ∈ Z1 , . . . , zk ∈ Zk with z1 + . . . + zk = T . We begin by constructing an acyclic multigraph G∗ , using similar ideas to those used for proving Theorem 2. The multigraph G∗ has k + 1 vertices s = v0 , . . . , vk = t, and is constructed as follows: For each i ∈ {1, . . . , k}, we add at most n edges from vi−1 to vi , one for each element in Zi . The length of an edge e ∈ E(G∗ ) corresponding to element zi ∈ Zi is set to ℓ(e) = zi , and its cost is set to c(e) = T − zi . Lemma 5. (Z1 , . . . , Zk , T ) has a solution iff G∗ has an s, t-path of length at most L = T and cost at most C = T (k − 1). Proof. Suppose there are z1 ∈ Z1 , . . . , zk ∈ Zk that sum to T . Consider Pk the s, t-path Pk e1 , . . . , ek in ∗ G , where ei is the edge from vi−1 to vi corresponding to zi . Then i=1 ℓ(ei ) = i=1 zi = T = L, P P and ki=1 c(ei ) = ki=1 T − zi = kT − T = C. Conversely, any s, t-path in G∗ has k edges e1 , . . . , ek , P where ei is an edge from vi−1 to vi . If such a path is feasible, meaning that ki=1 ℓ(ei ) ≤ L = T and Pk i=1 c(ei ) ≤ C = T (k − 1), then these two inequalities must be tight because c(ei ) = T − ℓ(ei ) for each i ∈ [k]. This implies that the integers z1 , . . . , zk corresponding to the edges e1 , . . . , ek of G∗ , sum to T . ⊔ ⊓ Let τ ≥ 1 be any constant and let B := ⌈T 1/τ ⌉. We next convert G∗ into a graph G̃ which has τ + 1 different edge-lengths and τ +1 different edge-costs, both taken from the set {0, B 0 , B 1 , . . . , B τ −1 }. Recall that V (G∗ ) = {v0 , . . . , vk }, and the length and cost of each edge in G∗ is non-negative and bounded by T . The vertex set of G̃ will include all vertices of G∗ , as well as additional vertices. Pτ −1 Pτ −1 bi B i , ai B i , and its cost as c(e) = i=0 For an edge e ∈ E(G∗ ), write its length as ℓ(e) = i=0 for integers a1 , . . . , aτ −1 , b1 , . . . , bτ −1 ∈ {0, . . , B − 1}. We replace the edge e of G∗ with a path in Pτ.−1 G̃ between the endpoints of e that has i=0 (ai + bi ) internal vertices. For each i ∈ {0, . . . , τ − 1}, we set ai edges in this path to have length B i and cost 0, and bi edges to have length 0 and cost B i . Replacing all edges of G∗ by paths in this way, we obtain the graph G̃ which has O(nB) vertices and edges (since k and τ are constant). As any edge in G∗ between vi and vi+1 corresponds to a path between these two vertices in G̃ with the same length and cost, we have: Lemma 6. Any s, t-path in G∗ corresponds to an s, t-path in G̃ with same length and cost, and vice-versa. Lemma 7. Assuming SETH, for any constant λ, χ ≥ 2 there is no O(nmin{λ,χ}−1−ε ) algorithm for Bicriteria s, t-Path for any ε > 0. Proof. Suppose Bicriteria s, t-Path has a O(nmin{λ,χ}−1−ε ) time algorithm. We use this algorithm to obtain a fast algorithm for k-Sum, contradicting SETH by Theorem 1. On a given input (Z1 , . . . , Zk , T ) of k-Sum on n items, for τ := min{λ, χ} − 1 we construct the instance (G̃, s, t, L, C) described above. Then G̃ is a directed acyclic graph with τ + 1 = min{λ, χ} different edge-lengths and edge-costs {0, B 0 , B 1 , . . . , B τ −1 }. Moreover, due to Lemmas 5 and 6, there are z1 ∈ Z1 , . . . , zk ∈ Zk summing to T iff G̃ has a feasible s, t-path. Thus, we can use our assumed Bicriteria s, t-Path algorithm on (G̃, s, t, L, C) to solve the given k-Sum instance. As 13 G̃ has O(nB) vertices and edges, where B = ⌈T 1/τ ⌉, an O(nmin{λ,χ}−1−ε ) algorithm runs in time O((nB)τ −ε ) = O(T 1−ε/τ nτ ) time on (G̃, s, t, L, C). For δ := δ(ε/τ ) from Theorem 1 and k set to τ /δ, this running time is O(T 1−ε/τ nδ(ε/τ )k ) and thus contradicts SETH by Theorem 1. ⊔ ⊓ 4.3 Solution paths with few vertices In this section we investigate the complexity of Bicriteria s, t-Path with respect to the number of internal vertices k in a solution path. Assuming k is fixed and bounded, we obtain a tight classification of the time complexity for the problem, up to sub-polynomial factors, under Conjecture 2. Our starting point is the Exact k-Path problem: Given an integer T ∈ {0, . . . , W }, and a directed graph G with edge weights, decide whether there is a simple path in G on k vertices in which the sum of the weights is exactly T . Thus, this is the ”exact” variant of Bicriteria s, tPath on graphs with a single edge criteria, and no source and target vertices. The Exact k-Path problem can be solved in Õ(n⌈(k+1)/2⌉ ) time by a “meet-in-the-middle” algorithm [4], where the Õ(·) notation suppresses poly-logarithmic factors in W . It is also known that Exact k-Path has no Õ(n⌈(k+1)/2⌉−ε ) time algorithm, for any ε > 0, unless the k-Sum conjecture is false [4]. We will show how to obtain similar bounds for Bicriteria s, t-Path by implementing a very efficient reduction between the two problems. To show that Exact k-Path can be used to solve Bicriteria s, t-Path, we will combine multiple ideas. The first is the observation that Exact k-Path can easily solve the Exact Bicriteria k-Path problem, a variant which involves bicriteria edge weights: Given a pair of integers (T1 , T2 ), and a directed graph G with two edge weight function w1 (·) and w2 (·), decide whether there is a simple path in G on k vertices in which the sum of the wi -weights is exactly Ti for i ∈ {1, 2}. Lemma 8. There is an O(n2 ) time reduction that reduces an instance of Exact Bicriteria kPath with edge weights in {0, 1, . . . , W }2 to an instance of Exact k-Path with edge weights in {0, 1, . . . , 2kW 2 + W }. Proof. Define a mapping of a pairs in {0, 1, . . . , W }2 to single integers {0, . . . , 2kW 2 + W } by setting f (w1 , w2 ) = w2 + w1 · 2kW that for any k pairs 2 ∈ {0, . . . , W }. Observe Pk Pk for ieach w1 , wP k i k k 1 1 (w1 , w2 ), . . . , (w1 , w2 ), we have ( i=1 w1 = T1 ∧ i=1 w2 = T2 ) iff i=1 f (w1i , w2i ) = f (T1 , T2 ). Therefore, given a graph as in the statement, we can map each pair of edge weights into a single edge weight, thus reducing to Exact k-Path without changing the answer. ⊔ ⊓ The next and more difficult step is to reduce Bicriteria s, t-Path to Exact Bicriteria k-Path. This requires us to reduce the question of whether there is a path of length and cost at most L and C, to questions about the existence of paths with length and cost equalling exactly T1 and T2 . A naive approach would be to check if there is a path of exact length and cost (T1 , T2 ) for all values T1 ≤ L and T2 ≤ C. Such a reduction will incur a very large O(LC) overhead. We will improve this to O(logO(1) (L + C)). In the remainder of this section, let W be the maximum of L and C. The idea behind our reduction is to look for the smallest x, y ∈ [log W ] such that if we restrict all edge lengths ℓ to the x most significant bits of ℓ, and all edge costs c to the y most significant bits of c, then there is a path that satisfies the threshold constraints with equality. To do this, we can check for every pair x, y, whether after restricting edge lengths and costs, there is a k-path with total weight exactly equal to the restriction of the vector (L, C), possibly minus the carry from the removed bits. Since 14 the carry from summing k numbers can be at most k, we will not have to check more than O(k2 ) “targets” per pair x, y ∈ [log W ]. To implement this formally, we will need the following technical lemma. The proof uses a bit scaling technique that is common in approximation algorithms. Previously, tight reductions that use this technique were presented by Vassilevska and Williams [110] (in a very specific setting), and by Nederlof et al. [92] (who proved a general statement). We will need a generalization of the result of [92] in which we introduce a parameter k, and show that the overhead depends only on k and W , and does not depend on n. Lemma 9. Let U be a universe of size n with two weight functions w1 , w2 : U → {0, . . . , W }, and let T1 , T2 ∈ {0, . . . , W } be two integers. Then, there is a polynomial time algorithm that returns (i) (i) (i) (i) a set of weight functions w1 , w2 : U → {0, . . . , W } and integers T1 , T2 ∈ {0, . . . , W }, for i ∈ [q] and q = O(k2 log2 W ), such that: For every subset X ⊆ U of size |X| = k it holds that (i) (i) (i) (i) (w1 (X) ≤ T1 ∧ w2 (X) ≤ T2 ) iff (w1 (X) = T1 ∧ w2 (X) = T2 ) for some i ∈ [q]. ⊔ ⊓ Proof. We will assume that a number in {0, . . . , W } is encoded in binary with log W bits in the standard way. For numbers a ∈ {0, . . . , W } and x ∈ [log W ] we let [a]x be the x-bit number that is obtained by taking the x most significant bits in a. Alternatively, [a]x = ⌊a/2log W −x ⌋. In what follows, we will construct weight functions and targets for each dimension independently and in a similar way. We will present the construction for the w1 ’s. (i) (i) First, we add the weight functions w1 = w1 , with target T1 = L − a for any a ∈ [4k]. Call these the initial (i)’s. Then, for any x ∈ [log W ] and a ∈ [2k], we add the weight function (i) (i) w1 (e) = [w1 (e)]x , and set the target to T1 = [L]x − k − a. This defines O(k log W ) new functions and targets, and we will show below that for any subset X ⊆ U we have that w1 (X) ≤ L iff for (i) (i) some i we have w1 (X) = T1 . Then, we apply the same construction for w2 , and take every pair of constructed functions and targets, to obtain a set of O(k2 log2 W ) functions and targets that satisfy the required property. The correctness will be based on the following bound, which follows because when summing k numbers the carry from removed least significant bits cannot be more than k. For any x ∈ [log W ], a1 , . . . , ak ∈ {0, . . . , W },     k k k X X X  aj  − k ≤ [aj ]x ≤  aj  j=1 x j=1 j=1 x (i) (i) Fix some X ⊂ U . For the first direction, assume that for some i, w1 (X) = T1 . If it is one of the initial (i)’s, then we immediately have that w1 (X) ≤ L. Otherwise, let X = {v1 , . . . , vk }, then we get that   k k X X (i) (i) [w1 (vj )]x + k = w1 (X) + k = T1 + k ≤ [L]x − 1 w1 (vj ) ≤ [w1 (X)]x =  j=1 x j=1 which implies that w1 (X) < L. For the other direction, assume that w1 (X) < L. If w1 (X) ≥ L − 4k then for one of the initial (i) (i) (i)’s we will have w1 (X) = w1 (X) = L − a = T1 for some a ∈ [4k]. Otherwise, let x be the 15 smallest integer in [log W ] for which [w1 (X)]x ≤ [L]x − k. Because x is the smallest, we also know that [w1 (X)]x ≥ [L]x − 2k. Therefore,   k k X X (i) w1 (vj ) ≤ [L]x − k [w1 (vj )]x ≤  w1 (X) = j=1 j=1 and x   k k X X (i) w1 (vj ) − k ≥ [L]x − 3k. [w1 (vj )]x ≥  w1 (X) = j=1 Therefore, for some a ∈ [2k], we will have that j=1 (i) w1 (X) x (i) = [L]x − k − a = T1 . ⊔ ⊓ We are now ready to present the main reduction of this section. Let (G, s, t, L, C) be a given instance of Bicriteria s, t-Path. Our reduction follows three general steps that proceed as follows: 1. Color coding: At the first step, we use the derandomized version of the color coding technique [11] (α) (α) to obtain p′ = O(lg n) partitions of the vertex set V (G) \ {s, t} into k classes V1 , . . . , Vk , α ∈ [p′ ], with the following property: If there is a feasible s, t-path P with k internal vertices (α) in G, we are guaranteed that for at least one partition we will have |V (P ) ∩ Vi | = 1 for each i ∈ [k]. By trying out all possible O(1) orderings of the classes in each partition, we can assume (α) that if P = s, v1 , . . . , vk , t, then V (P ) ∩ Vi = {vi } for each i ∈ [k]. Let p denote the total number of ordered partitions. For each ordered partition α ∈ [p], we (α) remove all edges between vertices inside the same class, and all edges (u, v) where u ∈ Vi , (α) (α) v ∈ Vj , and j 6= i + 1. We also remove all edges from s to vertices not in V1 , and all edges to t from vertices not in Vk . Let Gα denote the resulting graph, with α ∈ [p] for p = O(lg n). (α) 2. Removal of s and t: Next, we next remove s and t from each Gα . For every vertex v ∈ V1 , if v was connected with an edge from s of length ℓ and cost c, then we remove this edge and add this length ℓ and cost c to all the edges outgoing from v. Similarly, we remove the edge from (α) (α) v ∈ Vk to t, and add its length and cost to all edges ingoing to v. Finally, any vertex in V1 that was not connected with an edge from s is removed from the graph, and every vertex in (α) Vk that was not connected to t is removed. 3. Inequality to equality reduction: Now, for each Gα , we apply Lemma 9 with the universe U being the edges of Gα , and w1 , w2 : U → {0, . . . , W } being the lengths and costs of the edges. We get a set of q = O(log2 W ) weight functions and targets. For β ∈ [q], let Gα,β be the graph (β) (β) obtained from G by replacing the lengths and costs with new functions w1 , w2 . The final (β) (β) Exact Bicriteria k-Path is then constructed as (Gα,β , T1 , T2 ). Thus, we reduce our Bicriteria s, t-Path instance to at most O(log n log2 W ) instances of Exact Bicriteria k-Path. Note that if G contains a feasible s, t-path P = s, v1 , . . . , vk , t of length ℓP ≤ L and cost cP , then by correctness of the color coding technique, there is some (α) α ∈ [p] such that Gα contains P with V (P ) ∩ Vi = {vi } for each i ∈ [k]. Moreover, the total weight of v1 , . . . , vk in Gα is (ℓP , cP ). By Lemma 9, there is some β ∈ [q] for which the total (β) (β) (β) (β) weight of f v1 , . . . , vk in Gα,β is (T1 , T2 ). Thus, P is a solution for (Gα,β , T1 , T2 ). Conversely, 16 by the same line of arguments, any solution path for some Exact Bicriteria k-Path instance (β) (β) (Gα,β , T1 , T2 ) corresponds to a feasible s, t-path in G with k internal vertices. Thus, we have obtained a reduction from Bicriteria s, t-Path to Exact Bicriteria kPath. Combining this with reduction from Exact Bicriteria k-Path to Exact k-Path given in Lemma 8, we obtain the following. Lemma 10. Fix k ≥ 1, and let (G, s, t, L, C) be an instance of Bicriteria s, t-Path where G has n vertices. Set W = max{L, C}. Then one can determine whether (G, s, t, L, C) has a solution with k internal vertices by solving O(log n log2 W ) instances of Exact k-Path on graphs with O(n) vertices and edge weights bounded by W 2 . Corollary 2. There is an algorithm solving Bicriteria s, t-Path in Õ(n⌈(k+1)/2⌉ ) time. Proof. By Lemma 10, an instance of Bicriteria s, t-Path can be reduced to O(log n log2 W ) instances of Exact k-Path. Using the algorithm in [4], each of these Exact k-Path instances can be solved in Õ(n⌈(k+1)/2⌉ ) time. ⊔ ⊓ We next turn to proving our lower bound for Bicriteria s, t-Path. For this, we show a reduction in the other direction, from Exact k-Path to Bicriteria s, t-Path. Lemma 11. Let ε > 0. There is no Õ(n⌈(k+1)/2⌉−ε ) time algorithm for Bicriteria s, t-Path unless the k-Sum conjecture (Conjecture 2) is false. Proof. We show a reduction from Exact k-Path to Bicriteria s, t-Path. This proves the claim, as it is known that an Õ(n⌈(k+1)/2⌉−ε ) time algorithm for Exact k-Path, for any ε > 0, implies that the k-Sum conjecture is false [4]. Let (G, T ) be an instance of Exact k-Path, where G is an edgeweighted graph and T ∈ {0, . . . , W } is the target. We proceed as follows: As in the upper-bound reduction, we first apply the color-coding technique [11] to obtain p = O(log n) vertex-partitioned (α) (α) graphs G1 , . . . , Gp , V (Gα ) = V1 ⊎ · · · ⊎ Vk for each α ∈ [p], such that G has a solution path (α) P = v1 , . . . , vk iff for at least one graph Gα we have V (P ) = Vi ∩ {vi } for each i ∈ [k]. We then construct a new graph Hα from each graph Gα as follows: We first remove from Gα all (α) (α) (α) edges inside the same vertex class Vi , and all edges between vertices in Vi and vertices in Vj with j 6= i + 1. We then replace each remaining edge with weight x ∈ {0, . . . , W } in Gα with an edge with length x and cost W − x in Hα . Then, we add vertices s, t to Hα , connect s to all the (α) (α) vertices in V1 , connect all the vertices in Vk to t, and set the length and cost of all these edges to 0. To complete the proof, we argue that G has a simple path of weight exactly T iff some Hα contains a feasible s, t-path for L = T and C = (k − 1)W − T . Suppose P = v1 , . . . , vk is a simple path in G with w(P ) = T . Then there is some α ∈ [p] (α) such that P is a path in Gα with V (P ) = Vi ∩ {vi } for each i ∈ [k]. By construction of Hα , ′ P = s, v1 , . . . , vk , t is a path in Hα , and it has total length ℓ(P ′ ) = w(P ) = T ≤ L, and total cost c(P ′ ) = (k − 1)W − w(P ) = (k − 1)W − T ≤ C. Conversely, if P ′ = s, v1 , . . . , vk , t is a feasible s, t-path in some Hα with length ℓ(P ′ ) ≤ L and cost c(P ′ ) ≤ C, then P = v1 , . . . , vk is path in G. We know that the weight of P in G is bounded by above by w(P ) = ℓ(P ′ ) ≤ L = T . Furthermore, we have (k −1)W −w(P ) = (k −1)W −ℓ(P ′ ) = c(P ′ ) ≤ C = (k −1)W −T , implying that w(P ) ≥ T . These two inequalities imply w(P ) = T , and thus P is a solution for (G, T ). Thus, we can solve (G, T ) by solving O(lg n) instances of Bicriteria s, t-Path. This means that an Õ(n⌈(k+1)/2⌉−ε ) algorithm for Bicriteria s, t-Path, for ε > 0, would imply an algorithm 17 with the same running time for Exact k-Path. By the reductions in [4], this refutes the k-Sum conjecture. ⊔ ⊓ Theorem 4 now immediately follows from the upper and lower bounds given in Corollary 2 and Lemma 11 for finding a solution for a Bicriteria s, t-Path instance that has k internal vertices. Acknowledgements We would like to thank Jesper Nederlof for an inspiring discussion on Subset Sum. A.A. was supported by the grants of Virginia Vassilevska Williams: NSF Grants CCF-1417238, CCF-1528078 and CCF-1514339, and BSF Grant BSF:2012338. D.H. has received funding from the People Programme (Marie Curie Actions) of the European Union’s Seventh Framework Programme (FP7/2007-2013) under REA grant agreement number 631163.11, and by the ISRAEL SCIENCE FOUNDATION (grant No. 551145/). References 1. Amir Abboud, Arturs Backurs, Thomas Dueholm Hansen, Virginia Vassilevska Williams, and Or Zamir. Subtree isomorphism revisited. In Proc. of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1256–1271, 2016. 2. Amir Abboud, Arturs Backurs, and Virginia Vassilevska Williams. Tight hardness results for LCS and other sequence similarity measures. In Proc. of the 56th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 59–78, 2015. 3. Amir Abboud and Greg Bodwin. The 4/3 additive spanner exponent is tight. In Proc. of the 48th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 351–361, 2016. 4. Amir Abboud and Kevin Lewi. Exact weight subgraphs and the k-sum conjecture. In Proc. of the 40th International Colloquium on Automata, Languages, and Programming (ICALP), pages 1–12, 2013. 5. Amir Abboud, Kevin Lewi, and R. Ryan Williams. Losing weight by gaining edges. In Proc. of the 22th annual European Symposium on Algorithms (ESA), pages 1–12, 2014. 6. Amir Abboud and Virginia Vassilevska Williams. Popular conjectures imply strong lower bounds for dynamic problems. In Proc. of the 55th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 434–443, 2014. 7. Amir Abboud, Virginia Vassilevska Williams, and Huacheng Yu. Matching triangles and basing hardness on an extremely popular conjecture. In Proc. of the 47th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 41–50, 2015. 8. Amir Abboud, R. Ryan Williams, and Huacheng Yu. More applications of the polynomial method to algorithm design. In Proc. of the 26th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 218–230, 2015. 9. Amir Abboud, Virginia Vassilevska Williams, and Oren Weimann. Consequences of faster alignment of sequences. In Proc. of the 41st International Colloquium on Automata, Languages, and Programming (ICALP), pages 39–51, 2014. 10. Noga Alon, Michael Krivelevich, Eldar Fischer, and Mario Szegedy. Efficient testing of large graphs. In Proc. of the 40th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 656–666, 1999. 11. Noga Alon, Raphael Yuster, and Uri Zwick. Color-coding. Journal of the ACM, 42(4):844–856, 1995. 12. Amihood Amir, Timothy M. Chan, Moshe Lewenstein, and Noa Lewenstein. On hardness of jumbled indexing. In Proc. of the 41st International Colloquium on Automata, Languages, and Programming (ICALP), pages 114–125, 2014. 13. Yash P. Aneja and Kunhiraman P.K. Nair. The constrained shortest path problem. Naval Research Logistics Quarterly, 25:549–553, 1978. 14. Per Austrin, Petteri Kaski, Mikko Koivisto, and Jussi Määttä. Space–time tradeoffs for subset sum: An improved worst case algorithm. In International Colloquium on Automata, Languages, and Programming, pages 45–56, 2013. 18 15. Per Austrin, Petteri Kaski, Mikko Koivisto, and Jussi Määttä. Space–time tradeoffs for subset sum: An improved worst case algorithm. In Proc. of the 40th International Colloquium on Automata, Languages, and Programming (ICALP), pages 45–56, 2013. 16. Per Austrin, Petteri Kaski, Mikko Koivisto, and Jesper Nederlof. Subset sum in the absence of concentration. In Proc. of the 32nd International Symposium on Theoretical Aspects of Computer Science (STACS), pages 48–61, 2015. 17. Per Austrin, Petteri Kaski, Mikko Koivisto, and Jesper Nederlof. Dense subset sum may be the hardest. In Proc. of the 33rd Symposium on Theoretical Aspects of Computer Science (STACS), pages 13:1–13:14, 2016. 18. Arturs Backurs and Piotr Indyk. Edit Distance Cannot Be Computed in Strongly Subquadratic Time (unless SETH is false). In Proc. of the 47th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 51–58, 2015. 19. Arturs Backurs and Piotr Indyk. Which regular expression patterns are hard to match? In Proc. of the 57th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 457–466, 2016. 20. Arturs Backurs, Piotr Indyk, and Ludwig Schmidt. On the fine-grained complexity of empirical risk minimization: Kernel methods and neural networks. arXiv preprint arXiv:1704.02958, 2017. 21. Marshall Ball, Alon Rosen, Manuel Sabin, and Prashant Nalini Vasudevan. Average-case fine-grained hardness. In Proc. of the 49th Annual ACM SIGACT Symposium on Theory of Computing (STOC), to appear, 2017. 22. Marshall Ball, Alon Rosen, Manuel Sabin, and Prashant Nalini Vasudevan. Proofs of useful work. IACR Cryptology ePrint Archive, 2017:203, 2017. 23. Nikhil Bansal, Shashwat Garg, Jesper Nederlof, and Nikhil Vyas. Faster space-efficient algorithms for subset sum, k-sum and related problems. In Proc. of the 49th Annual ACM SIGACT Symposium on Theory of Computing (STOC), to appear, 2017. 24. Ilya Baran, Erik D. Demaine, and Mihai Pǎtraşcu. Subquadratic algorithms for 3SUM. Algorithmica, 50(4):584– 596, 2008. 25. Luis Barba, Jean Cardinal, John Iacono, Stefan Langerman, Aurélien Ooms, and Noam Solomon. Subquadratic algorithms for algebraic generalizations of 3SUM. CoRR, abs/1612.02384, 2016. 26. Christopher Beck and Russell Impagliazzo. Strong ETH holds for regular resolution. In Proc. of the 45th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 487–494, 2013. 27. Anja Becker, Jean-Sébastien Coron, and Antoine Joux. Improved generic algorithms for hard knapsacks. In Proc. of 30th Annual International Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT), pages 364–385, 2011. 28. Felix A. Behrend. On sets of integers which contain no three terms in arithmetical progression. Proceedings of the National Academy of Sciences of the United States of America, 32(12):331–332, 1946. 29. Richard E. Bellman. Dynamic programming. Princeton University Press, 1957. 30. Huck Bennett, Alexander Golovnev, and Noah Stephens-Davidowitz. On the quantitive hardness of cvp. CoRR, abs/1704.03928, 2017. 31. Arnab Bhattacharyya, Piotr Indyk, David P. Woodruff, and Ning Xie. The complexity of linear dependence problems in vector spaces. In Proc. of the 1st ACM Conference on Innovations in Theoretical Computer Science (ICS), pages 496–508, 2011. 32. Ernest F Brickell and Andrew M Odlyzko. Cryptanalysis: A survey of recent results. Proceedings of the IEEE, 76(5):578–593, 1988. 33. Karl Bringmann. Why walking the dog takes time: Frechet distance has no strongly subquadratic algorithms unless SETH fails. In Proc. of the 55th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 661–670, 2014. 34. Karl Bringmann. A near-linear pseudopolynomial time algorithm for subset sum. In Proc. of of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1073–1084, 2017. 35. Karl Bringmann, Allan Grønlund, and Kasper Green Larsen. A dichotomy for regular expression membership testing. CoRR, abs/1611.00918, 2016. 36. Karl Bringmann and Marvin Kunnemann. Quadratic conditional lower bounds for string problems and dynamic time warping. In Proc. of the 56th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 79–97, 2015. 37. Dirk Briskorn, Byung-Cheon Choi, Kangbok Lee, Joseph Y.-T. Leung, and Michael Pinedo. Complexity of single machine scheduling subject to nonnegative inventory constraints. European Journal of Operational Research, 207:605–619, 2010. 38. Ayelet Butman, Peter Clifford, Raphaël Clifford, Markus Jalsenius, Noa Lewenstein, Benny Porat, Ely Porat, and Benjamin Sach. Pattern matching under polynomial transformation. SIAM Journal on Computing, 42(2):611– 633, 2013. 19 39. Chris Calabro, Russell Impagliazzo, and Ramamohan Paturi. A duality between clause width and clause density for SAT. In Proc. of 21st Conference on Computational Complexity (CCC), pages 252–260, 2006. 40. Chris Calabro, Russell Impagliazzo, and Ramamohan Paturi. The complexity of satisfiability of small depth circuits. In Proc. of the 4th International Workshop on Parameterized and Exact Computation (IWPEC), pages 75–85, 2009. 41. Jean Cardinal, John Iacono, and Aurélien Ooms. Solving k-sum using few linear queries. In Proc. of the 24th Annual European Symposium on Algorithms (ESA), pages 25:1–25:17, 2016. 42. Marco L. Carmosino, Jiawei Gao, Russell Impagliazzo, Ivan Mihajlin, Ramamohan Paturi, and Stefan Schneider. Nondeterministic extensions of the strong exponential time hypothesis and consequences for non-reducibility. In Proc. of the 7th ACM Conference on Innovations in Theoretical Computer Science (ITCS), pages 261–270, 2016. 43. David Cattanéo and Simon Perdrix. The parameterized complexity of domination-type problems and application to linear codes. In Proc. of the 11th International Conference on Theory and Applications of Models of Computation (TAMC), pages 86–103, 2014. 44. Timothy M. Chan and Moshe Lewenstein. Clustered integer 3SUM via additive combinatorics. In Proc. of the 47th annual ACM Symposium on Theory Of Computing (STOC), pages 31–40, 2015. 45. Ashok K. Chandra, Merrick L. Furst, and Richard J. Lipton. Multi-party protocols. In Proc. of the 15th annual ACM Symposium on Theory Of Computing (STOC), pages 94–99, 1983. 46. Benny Chor and Ronald R. Rivest. A knapsack-type public key cryptosystem based on arithmetic in finite fields. IEEE Transactions on Information Theory, 34(5):901–909, 1988. 47. Don Coppersmith and Shmuel Winograd. Matrix multiplication via arithmetic progressions. Journal of symbolic computation, 9(3):251–280, 1990. 48. Marek Cygan, Holger Dell, Daniel Lokshtanov, Dániel Marx, Jesper Nederlof, Yoshio Okamoto, Ramamohan Paturi, Saket Saurabh, and Magnus Wahlström. On problems as hard as CNF-SAT. ACM Transactions on Algorithms, 12(3):41, 2016. 49. Evgeny Dantsin and Edward A. Hirsch. Worst-case upper bounds. In Handbook of Satisfiability, pages 403–424. 2009. 50. Holger Dell and Dieter Van Melkebeek. Satisfiability allows no nontrivial sparsification unless the polynomialtime hierarchy collapses. In Proc. of the 42th annual ACM Symposium on Theory Of Computing (STOC), pages 251–260, 2010. 51. Itai Dinur, Orr Dunkelman, Nathan Keller, and Adi Shamir. Efficient dissection of composite problems, with applications to cryptanalysis, knapsacks, and combinatorial search problems. In Proc. of the 32nd Annual Conference on Advances in Cryptology (CRYPTO), pages 719–740, 2012. 52. Michael Elkin. An improved construction of progression-free sets. In Proc. of the 21st Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 886–905, 2010. 53. Funda Ergun, Rakesh Sinha, and Lisa Zhang. An improved FPTAS for the restricted shortest path problem. Information Processing Letters, 83:287–291, 2002. 54. Jeff Erickson. New lower bounds for convex hull problems in odd dimensions. SIAM Journal on Computing, 28(4):1198–1214, 1999. 55. Ari Freund. Improved subquadratic 3SUM. Algorithmica, 77(2):440–458, 2017. 56. Anka Gajentaan and Mark H. Overmars. On a class of o(n2 ) problems in computational geometry. Computational Geometry, 5(3):165–185, 1995. 57. Jiawei Gao, Russell Impagliazzo, Antonina Kolokolova, and R. Ryan Williams. Completeness for first-order properties on sparse structures with algorithmic applications. In Proc. of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2162–2181, 2017. 58. Michael R. Garey and David S. Johnson. Computers and Intractability: A Guide to the Theory of NP Completeness. W.H. Freeman & Co., 1976. 59. Rosario G. Garroppo, Stefano Giordano, and Luca Tavanti. A survey on multi-constrained optimal path computation: Exact and approximate algorithms. Computer Networks, 54:3081–3107, 2010. 60. Omer Gold and Micha Sharir. Improved bounds for 3SUM, K-SUM, and linear degeneracy. CoRR, abs/1512.05279, 2015. 61. Isaac Goldstein, Tsvi Kopelowitz, Moshe Lewenstein, and Ely Porat. How hard is it to find (honest) witnesses? In Proc. of the 24th annual European Symposium on Algorithms (ESA), pages 45:1–45:16, 2016. 62. Pierre Hansen. Bicriterion path problems. In Proc. of the 3rd confernece om Multiple Criteria Decision Making Theory and Application, pages 109–127, 1980. 63. Refael Hassin. Approximation schemes for the restricted shortest path problem. Mathematics of Operations Research, 17:36–42, 1992. 20 64. Johan Håstad and Avi Wigderson. Simple analysis of graph tests for linearity and PCP. Random Structures & Algorithms, 22(2):139–160, 2003. 65. Kaj Holmberg and Di Yuan. A multicommodity network-flow problem with side constraints on paths solved by column generation. INFORMS Journal on Computing, 15(1):42–57, 2003. 66. Ellis Horowitz and Sartaj Sahni. Computing partitions with applications to the knapsack problem. Journal of the ACM, 21(2):277–292, 1974. 67. Nick Howgrave-Graham and Antoine Joux. New generic algorithms for hard knapsacks. In Proc. of 29th Annual International Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT), pages 235–256, 2010. 68. Russell Impagliazzo and Moni Naor. Efficient cryptographic schemes provably as secure as subset sum. Journal of cryptology, 9(4):199–216, 1996. 69. Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-SAT. Journal of Computer and System Sciences, 62(2):367 – 375, 2001. 70. Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? Journal of Computer and System Sciences, 63(4):512–530, 2001. 71. Zahra Jafargholi and Emanuele Viola. 3SUM, 3XOR, triangles. Algorithmica, 74(1):326–343, 2016. 72. Hamid Jahanjou, Eric Miles, and Emanuele Viola. Local reductions. In Proc. of the 42nd International Colloquium on Automata, Languages, and Programming (ICALP), pages 749–760, 2015. 73. Hans C. Joksch. The shortest route problem with constraints. Journal of Mathematical Analysis and Applications, 14:191–197, 1966. 74. Allan Grønlund Jørgensen and Seth Pettie. Threesomes, degenerates, and love triangles. In Proc. of the 55th Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 621–630, 2014. 75. Richard M. Karp. Reducibility among combinatorial problems. In Complexity of computer computations, pages 85–103. Springer, 1972. 76. Hans Kellerer, Ulrich Pferschy, and David Pisinger. Knapsack problems. Springer, 2004. 77. James King. A survey of 3SUM-hard problems. Not published, 2004. 78. Tomasz Kociumaka, Solon P. Pissis, and Jakub Radoszewski. Parameterizing PWM-and profile-matching and knapsack by the feasible-weight solutions count. arXiv:1604.07581, 2016. 79. Konstantinos Koiliaris and Chao Xu. A faster pseudopolynomial time algorithm for subset sum. In Proc. of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1062–1072, 2017. 80. Tsvi Kopelowitz, Seth Pettie, and Ely Porat. Higher lower bounds from the 3SUM conjecture. In Proc. of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1272–1287, 2016. 81. Kangbok Lee, Byung-Cheon Choi, Joseph Y.-T. Leung, and Michael L. Pinedo. Approximation algorithms for multi-agent scheduling to minimize total weighted completion time. Information Processing Letters, 109:913– 917, 2009. 82. Andrea Lincoln, Virginia Vassilevska Williams, Joshua R. Wang, and R. Ryan Williams. Deterministic timespace trade-offs for k-sum. In Proc. of the 43rd International Colloquium on Automata, Languages, and Programming (ICALP), pages 58:1–58:14, 2016. 83. Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Known algorithms on graphs on bounded treewidth are probably optimal. In Proc. of the 27th 2nd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 777–789, 2011. 84. Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Lower bounds based on the exponential time hypothesis. Bulletin of the EATCS, 105:41–72, 2011. 85. Daniel Lokshtanov and Jesper Nederlof. Saving space by algebraization. In Proc. of the 42nd Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 321–330, 2010. 86. Dean H. Lorenz and Ariel Orda. QoS routing on networks with uncertain parameters. IEEE/ACM Transactions on Networking, 6:768–778, 1998. 87. Dean H. Lorenz and Danny Raz. A simple efficient approximation scheme for the restricted shortest path problem. Operations Research Letters, 28:213–219, 2001. 88. Silvano Martello and Paolo Toth. Knapsack problems: algorithms and computer implementations. John Wiley & Sons, Inc., 1990. 89. Ralph Merkle and Martin Hellman. Hiding information and signatures in trapdoor knapsacks. IEEE transactions on Information Theory, 24(5):525–530, 1978. 90. Joseph Naor, Hadas Shachnai, and Tami Tamir. Real-time scheduling with a budget. Algorithmica, 47:343–364. 91. Jesper Nederlof. A short note on merlin-arthur protocols for subset sum. Information Processing Letters, 118:15–16, 2017. 21 92. Jesper Nederlof, Erik Jan van Leeuwen, and Ruben van der Zwaan. Reducing a target interval to a few exact queries. In Proc. of the 37th international symposium on Mathematical Foundations of Computer Science (MFCS), pages 718–727, 2012. 93. Kevin O’Bryant. Sets of integers that do not contain long arithmetic progressions. Electronic Journal of Combinatorics, 18(1):P59, 2011. 94. Andrew M. Odlyzko. The rise and fall of knapsack cryptosystems. Cryptology and computational number theory, 42:75–88, 1990. 95. Mihai Pătraşcu and Ryan Williams. On the possibility of faster sat algorithms. In Proceedings of the twenty-first annual ACM-SIAM symposium on Discrete Algorithms, pages 1065–1075. SIAM, 2010. 96. Ramamohan Paturi, Pavel Pudlák, Michael E. Saks, and Francis Zane. An improved exponential-time algorithm for k-SAT. Journal of the ACM, 52(3):337–364, 2005. 97. David Pisinger. Dynamic programming on the word RAM. Algorithmica, 35(2):128–145, 2003. 98. David Pisinger. Where are the hard knapsack problems? Computers & Operations Research, 32(9):2271–2284, 2005. 99. Mihai Pǎtraşcu. Towards polynomial lower bounds for dynamic problems. In Proc. of the 42nd Annual ACM Symposium on Theory Of Computing (STOC), pages 603–610, 2010. 100. Andrea Raith and Matthias Ehrgott. A comparison of solution strategies for biobjective shortest path problems. Computers & OR, 36(4):1299–1331, 2009. 101. Liam Roditty and Virginia Vassilevska Williams. Fast approximation algorithms for the diameter and radius of sparse graphs. In Proc. of the 45th Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 515–524, 2013. 102. Dvir Shabtay, Kfir Arviv, Yael Edan, and Helman Stern. A combined robot selection and scheduling problem for flow-shops with no-wait restrictions. Omega, 43:96–107, 2014. 103. Adi Shamir. A polynomial-time algorithm for breaking the basic merkle-hellman cryptosystem. IEEE transactions on information theory, 30(5):699–704, 1984. 104. Emanuele Viola. The communication complexity of addition. Combinatorica, 35(6):703–747, 2015. 105. Joshua R. Wang. Space-efficient randomized algorithms for k-sum. In Proc. of the 22th annual European Symposium on Algorithms (ESA), pages 810–829, 2014. 106. Arthur Warburton. Approximation of pareto optima in multiple-objective, shortest-path problems. Operations Research, 35(1):70–79, 1987. 107. R. Ryan Williams. A new algorithm for optimal 2-constraint satisfaction and its implications. Theoretical Computer Science, 348(2–3):357–365, 2005. 108. R. Ryan Williams and Huacheng Yu. Finding orthogonal vectors in discrete structures. In Proc. of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1867–1877, 2014. 109. Virginia Vassilevska Williams. Hardness of easy problems: basing hardness on popular conjectures such as the strong exponential time hypothesis (invited talk). In LIPIcs-Leibniz International Proceedings in Informatics, volume 43, 2015. 110. Virginia Vassilevska Williams and R. Ryan Williams. Finding, minimizing, and counting weighted subgraphs. In Proc. of the 41st Annual ACM Symposium on Theory Of Computing (STOC), pages 455–464, 2009. 111. Gerhard J. Woeginger. Open problems around exact algorithms. Discrete Applied Mathematics, 156(3):397–405, 2008. 112. O. Younis and S. Fahmy. Constraint-based routing in the internet: Basic principles and recent research. IEEE Communications Surveys and Tutorials, 5(1):2–13, 2003. 113. U. Zimmermann and M.E. Lübbecke. Computer aided scheduling of switching engines. In Willi Jäger and HansJoachim Krebs, editors, Mathematics — Key Technology for the Future: Joint Projects between Universities and Industry, pages 690–702. Springer Berlin Heidelberg, 2003. 22
8cs.DS
arXiv:1707.05711v2 [q-bio.PE] 19 Jul 2017 Efficient and consistent inference of ancestral sequences in an evolutionary model with insertions and deletions under dense taxon sampling ∗ Wai-Tong (Louis) Fan† Sebastien Roch‡ July 20, 2017 Abstract In evolutionary biology, the speciation history of living organisms is represented graphically by a phylogeny, that is, a rooted tree whose leaves correspond to current species and branchings indicate past speciation events. Phylogenies are commonly estimated from molecular sequences, such as DNA sequences, collected from the species of interest. At a high level, the idea behind this inference is simple: the further apart in the Tree of Life are two species, the greater is the number of mutations to have accumulated in their genomes since their most recent common ancestor. In order to obtain accurate estimates in phylogenetic analyses, it is standard practice to employ statistical approaches based on stochastic models of sequence evolution on a tree. For tractability, such models necessarily make simplifying assumptions about the evolutionary mechanisms involved. In particular, commonly omitted are insertions and deletions of nucleotides—also known as indels. Properly accounting for indels in statistical phylogenetic analyses remains a major challenge in computational evolutionary biology. Here we consider the problem of reconstructing ancestral sequences on a known phylogeny in a model of sequence evolution incorporating nucleotide substitutions, insertions and deletions, specifically the classical TKF91 process. We focus on the case of dense phylogenies of bounded height, which we refer to as the taxon-rich setting, where statistical consistency is achievable. We give the first polynomial-time ancestral reconstruction algorithm with provable guarantees under constant rates of mutation. Our algorithm succeeds when the phylogeny satisfies the “big bang” condition, a necessary and sufficient condition for statistical consistency in this context. ∗ Keywords: Phylogenetics, ancestral reconstruction, insertion/deletions. Department of Mathematics, UW–Madison. Work supported by NSF grant DMS–1149312 (CAREER) to SR. ‡ Department of Mathematics, UW–Madison. Work supported by NSF grants DMS-1149312 (CAREER) and DMS-1614242. † 1 Introduction Background In evolutionary biology, the speciation history of living organisms is represented graphically by a phylogeny, that is, a rooted tree whose leaves correspond to current species and branchings indicate past speciation events. Phylogenies are commonly estimated from molecular sequences, such as DNA sequences, collected from the species of interest. At a high level, the idea behind this inference is simple: the further apart in the Tree of Life are two species, the greater is the number of mutations to have accumulated in their genomes since their most recent common ancestor. In order to obtain accurate estimates in phylogenetic analyses, it is standard practice to employ statistical approaches based on stochastic models of sequence evolution on a tree. For tractability, such models necessarily make simplifying assumptions about the evolutionary mechanisms involved. In particular, commonly omitted are insertions and deletions of nucleotides—also known as indels. Properly accounting for indels in statistical phylogenetic analyses remains a major challenge in computational evolutionary biology. Here we consider the related problem of reconstructing ancestral sequences on a known phylogeny in a model of sequence evolution incorporating nucleotide substitutions as well as indels. The model we consider, often referred to as the TKF91 process, was introduced in the seminal work of Thorne et al. [TKF91] on the multiple sequence alignment problem (see also [TKF92]). Much is known about ancestral sequence reconstruction (ASR) in substitution-only models. See, e.g., [EKPS00, Mos01, Sly09] and references therein, as well as [Lib07] for applications in biology. In the presence of indels, however, the only previous ASR result was obtained in [ADHR12] for vanishingly small indel rates in a simplified version of the TKF91 process. (In related work, Daskalakis and Roch [DR13] devised the first polynomial-time phylogenetic tree reconstruction algorithm for sequences in the presence of indels.) The results in [ADHR12] concern what is known as “solvability”; roughly, a sequence is inferred that exhibits a correlation with the true root sequence bounded away from 0 uniformly in the depth of the tree. The ASR problem in the presence of indels is also related to the trace reconstruction problem. See, e.g., [M+ 09] and references therein. Our results A desirable property of a reconstruction method is statistical consistency, which roughly says that the reconstruction is correct with probability tending to one as the amount of data increases. It is known [EKPS00] that this is typically not information-theoretically achievable in the standard setting of the ASR problem. Here, however, we consider the taxon-rich context, in which we have a sequence of trees with uniformly bounded heights and growing number of leaves. Building on the work of Gascuel and Steel [GS10], a necessary and sufficient condition for consistent ancestral reconstruction was derived in [FR17, Theorem 1] in this context. In the current paper, we establish statistical consistency for the ASR problem in the TKF91 process in the taxon-rich context. In fact, an ASR statistical consistency result for the TKF91 process in the taxon-rich context is already implied by the general results of [FR17]. However, the estimator in [FR17] is not useful from a computational point of view. Indeed it relies on the computation of total variation distances between leaf distributions for different root states—and we are not aware of a tractable way to do these computations in TKF models. The main contribution here is the design of an estimator which is not only consistent but also computationally efficient. We obtain this estimator by first 2 estimating the length of the ancestral sequence, then estimating the sequence itself conditioned on the sequence length. The latter is achieved by deriving explicit formulas to invert the mapping from the root sequence to the distribution of the leaf sequences. (In statistics, this is known as an identifiability result.) Outline In Section 2, we first recall the definition of the TKF91 process and our key assumptions on the sequence of trees. We then describe our new estimator and state the main results. In Section 3, we give some intuition behind the definition of our estimator by giving a constructive proof of root-state identifiability for the TKF91 model. The proofs of the main results are given in Section B. Some basic properties of the TKF91 process are derived in Section A. 2 Definitions and main results Before stating our main results, we begin by describing the TKF91 model of Thorne, Kishino and Felsenstein [TKF91], which incorporates both substitutions and insertions/deletions (or indels for short) in the evolution of a DNA sequence on a phylogeny. For simplicity, we follow Thorne et al. and use the F81 model [Fel81] for the substitution component of the model, although our results can be extended beyond this simple model. For ease of reference, a number of useful properties of the TKF91 model are derived in Section A. 2.1 TKF91 process We first describe the Markovian dynamics on a single edge of the phylogeny. Conforming with the original definition of the model [TKF91], we use an “immortal link” as a stand-in for the empty sequence. Definition 1 (TKF91 sequence evolution model on an edge). The TKF91 edge process is a Markov process I = (It )t≥0 on the space S of DNA sequences together with an immortal link “•”, that is, [ S := “ • ” ⊗ {A, T, C, G}M , (1) M ≥0 where the notation above indicates that all sequences begin with the immortal link (and can otherwise be empty). We also refer to the positions of a sequence (including nucleotides and the immortal link) as sites. Let (ν, λ, µ) ∈ (0, ∞)3 with λ < µ and (πA , πT , πC , πG ) ∈ [0, ∞)4 with πA +πT +πC +πG = 1 be given parameters. The continuous-time Markovian dynamic is described as follows: if the current state is the sequence ~x, then the following events occur independently: • (Substitution) Each nucleotide (but not the immortal link) is substituted independently at rate ν > 0. When a substitution occurs, the corresponding nucleotide is replaced by A, T, C and G with probabilities πA , πT , πC and πG respectively. • (Deletion) Each nucleotide (but not the immortal link) is removed independently at rate µ > 0. 3 • (Insertion) Each site gives birth to a new nucleotide independently at rate λ > 0. When a birth occurs, a nucleotide is added immediately to the right of its parent site. The newborn site has nucleotide A, T, C and G with probabilities πA , πT , πC and πG respectively. The length of a sequence ~x = (•, x1 , x2 , · · · , xM ) is defined as the number of nucleotides in ~x and is denoted by |~x| = M (with the immortal link alone corresponding to M = 0). When M ≥ 1 we omit the immortal link for simplicity and write ~x = (x1 , x2 , · · · , xM ). The TKF91 process is reversible [TKF91]. Suppose furthermore that 0 < λ < µ, an assumption we make throughout. Then it has an stationary distribution Π, given by Π(~x) =  λ 1− µ   M Y M λ πxi µ i=1  for each ~x = (x1 , x2 , · · · , xM ) ∈ {A, T, C, G} where M ≥ 1, and Π(“ • ”) = 1 − . In words, under Π, the sequence length is geometrically distributed and, conditioned on the sequence length, all sites are independent with distribution (πσ )σ∈{A,T,C,G} . We run the TKF91 model on a tree. Let T = (V, E, ρ, ℓ) be a phylogeny (or, simply, tree), that is, a finite, edge-weighted, rooted tree, where V is the set of vertices, E is the set of edges oriented away from the root ρ, and ℓ : E → (0, +∞) is a positive edge-weighting function. We denote by ∂T the leaf set of T . No assumption is made on the degree of the vertices. We think of T as a continuous object, where each edge e is a line segment of length ℓe and whose elements γ ∈ e we refer to as points. We let ΓT be the set of points of T . We consider the following stochastic process indexed by the points of T . M  λ µ ~ ρ ∈ S, Definition 2 (TKF91 sequence evolution model on a tree). The root is assigned a state X which is drawn from the stationary distribution Π of the TKF91 edge process. The state is then evolved down the tree according to the following recursive process. Moving away from the root, ~ u , we run the TKF91 edge process as along each edge e = (u, v) ∈ E, conditionally on the state X ~ u for an amount of time ℓ(u,v) . We denote by X ~ γ the resulting described in Definition 1 started at X ~ γ )γ∈Γ a TKF91 process on tree T . state at γ ∈ e. We call the process (X T Our main interest is in the following statistical problem. 2.2 Root reconstruction and the big bang condition ~ ρ based on the leaf states In the root reconstruction problem, we seek to estimate the root state X ~ ∂T = {X ~ v : v ∈ ∂T } of a TKF91 process on a known tree T . More formally, we look here for X a consistent estimator, as defined next. Fix mutaton parameters (ν, λ, µ) ∈ (0, ∞)3 with λ < µ and (πA , πT , πC , πG ) ∈ [0, ∞)4 and let {T k = (V k , E k , ρk , ℓk )}k≥1 be a sequence of trees with ~ k )γ∈Γ be a TKF91 process on T k . |∂T k | → +∞. Let X k = (X γ Tk 4 Definition 3 (Consistent root estimator). A sequence of root estimators k Fk : S ∂T → S, is said to be consistent for {T k }k if i  h  k k ~ ~ lim inf P Fk X∂T k = Xρk = 1. k→+∞ One important remark: the mutation parameters and the sequence of trees are assumed to be known; that is, the estimators Fk may depend on them. On the other hand, the leaf sequences ~ k k are the only components of the process X k that are actually observed. X ∂T As shown in [FR17], in general a sequence of consistent estimators may fail to exist. Building upon the work of Gascuel and Steel [GS10], necessary and sufficient conditions for consistent root reconstruction are derived in [FR17, Theorem 1] in the context of bounded-height, nested tree sequences with a growing number of leaves, which we refer to as the taxon-rich setting. These conditions have a combinatorial component (the big bang condition) and a stochastic component (initial-state identifiability, to which we come back in Section 3). To state the combinatorial condition formally, we need a few more definitions: • (Nested trees) Let T = (V, E, ρ, ℓ) be a tree. For a subset of leaves L ⊂ ∂T , the restriction of T to L is the tree obtained from T by keeping only those points on a path between the root ρ and a leaf u ∈ L. We say that {T k }k is a nested sequence if for all k > 1, T k−1 is a restriction of T k . Without loss of generality, we assume that |∂T k | = k, so that T k is obtained by adding a leaf edge to T k−1. (More general sequences can be obtained as subsequences.) In a slight abuse of notation, we denote by ℓ the edge-weight function for all k. For γ ∈ ΓT , we denote by ℓγ the length of the unique path from the root ρ to γ. We refer to ℓγ as the distance from γ to the root. • (Bounded height) We further say that {T k }k has uniformly bounded height if h∗ := sup hk < +∞, (2) k where hk := max{ℓx : x ∈ ∂T k } is the height of T k . • (Big bang) For a tree T = (V, E, ρ, ℓ), let T (s) = {γ ∈ ΓT : ℓγ ≤ s} denote the tree obtained by truncating T at distance s from the root. We refer to T (s) as a truncation of T . (See the left side of Figure 1 for an illustration.) We say that a sequence of trees {T k }k satisfies the big bang condition if: for all s ∈ (0, +∞), we have |∂T k (s)| → +∞ as k → +∞. (See Figure 2 for an illustration.) Finally we are ready to state our main combinatorial assumption. Assumption 1 (Taxon-rich setting: big bang condition). We assume that {T k }k is a nested sequence of trees with common root ρ, has uniformly bounded height, and satisfies the big bang condition. In words, the big bang condition ensures the existence of a large number of leaves that are “almost conditionally independent” given the root state, which can be shown to be necessary for consistency [FR17]. 5 ρ v3 v2 ρ v3 v2 x v1 s s x∗ Figure 1: On the left side, T k (s) is shown for a T k on the right. The subtree T̃ k,s is highlighted. ρ ρ ρ v3 v2 v3 v2 v1 v2 v1 v1 ······ Figure 2: A sequence of trees {T k }k (from left to right) satisfying the big bang condition. The distance from vk to the root is 2−k . 2.3 Main results In our main result, we devise and analyze a sequence of computationally efficient and statistically consistent root estimators for the TKF91 model under Assumption 1. We first describe the root reconstruction algorithm. Root reconstruction algorithm The input data are the mutation parameters (ν, λ, µ) ∈ (0, ∞)3 ~v : and (πA , πT , πC , πG ) ∈ [0, ∞)4 and, for k ≥ 1, the tree T k together with the leaf states {X k v ∈ ∂T }. Our root reconstruction algorithm has three main steps: to control correlations among leaves, we follow [FR17] and extract a “well-spread” restriction of T k (Step 1); then, using only the leaf states on this restriction, we estimate the root sequence length (Step 2) and finally the root sequence itself (Step 3). Motivation behind the construction of the estimator will be given in the Section 3. We let (sk )k be an arbitrary sequence such that sk > 0 and sk ↓ 0 as k → +∞. We also fix 0 ≤ t1 < t2 < · · · < ∞ (e.g., tj = j will do). We need the following functions which arise naturally in the TKF91 process (see Section A for details) µ − µe(λ−µ)t , µ − λe(λ−µ)t    (1 − γη(t)) e−µt 1 − γη(t) (1 − e−νt ) + 1 − e−µt − η(t) , φ(t) = 1 − η(t) 2 ψ(t) = 1 − γη(t) e−(µ+ν)t , η(t) = 6 where γ = λ/µ. For simplicity, we write ηj = η(h∗ + tj ), φj = φ(h∗ + tj ) and ψj = ψ(h∗ + tj ). Finally, we use the notation [[x]] for the unique integer such that [[x]] − 1/2 ≤ x < [[x]] + 1/2. Root estimator • Step 1: Restriction - Fix s := sk and denote ∂T k (s) = {z1 , . . . , zm }. - For each zi , pick an arbitrary leaf xi ∈ ∂T[zki ] in the subtree T[zki ] of T k rooted at zi . - Set T̃ k,s to be the restriction of T k to {x1 , . . . , xm }. • Step 2: Length estimator – Compute the root sequence-length estimator ""  ## X  λ 1 ~ v |e(µ−λ)ℓv + |X (1 − e(µ−λ)ℓv ) . M k,∗ = k,s µ − λ |∂ T̃ | k,s v∈∂ T̃ • Step 3: Sequence estimator – Compute the conditional frequency estimator X 1 pσX~ v (tj + h∗ − ℓv ) fσk,s(tj ) = |∂ T̃ k,s | k,s (3) v∈∂ T̃ for 1 ≤ j ≤ M k,∗ and σ ∈ {A, T, C, G}, where |~ x| p~σx (t) X i−1  |~x|  1{xi =σ} η(t) + πσ γ η(t), = πσ φ(t) 1 − η(t) + ψ(t) (4) i=1 when ~x = (x1 , x2 , · · · , xM ). – Set U to be the M k,∗ × 4 matrix with entries  k,∗  Uj,σ = fσk,s (tj ) − πσ φj 1 − ηjM − πσ γ ηj , k,∗ M set Ψ to be the M k,∗ × M k,∗ diagonal matrix whose diagonal entries are {ψj }j=1 ; and k,∗ k,∗ set V := Vt1 ,··· ,tM k,∗ to be the M × M Vandermonde matrix   k,∗ 1 η1 η12 . . . η1M −1 k,∗ 1 η η22 . . . η2M −1  2   Vt1 ,··· ,tM k,∗ =  . . .   . k,∗ M −1 2 1 ηM k,∗ ηM . . . ηM k,∗ k,∗   ~ ∂T k to be a sequence in {A, T, C, G}M k,∗ such that the i-th site satisfies – Define Fk X h  i  ~ ∂T k Fk X ∈ arg max (V −1 Ψ−1 U)i,σ : σ ∈ {A, T, C, G} . (5) i If there is more than one choice, pick one uniformly at random. 7 Statement of results Finally, our main claim is Theorem 1 below, which asserts that the root estimator we just described provides a consistent root estimator in the sense of Definition 3. Recall the sequence space S defined in (1). Theorem 1 (Consistent root reconstruction). Suppose {T k }k satisfies Assumption 1. Then {Fk }k defined in (5) is a sequence of consistent root estimators for {T k }k . Our main novel contribution lies in Step 3 above, which is based on the derivation of explicit formulas to invert the mapping from the root sequence to the distribution of the leaf sequences. (In statistics, this is known as an identifiability result.) See Section 3 for an overview. We also derive a quantitative error bound. Theorem 2 (Error bound). Suppose {T k }k satisfies Assumption 1 and {Fk }k are the root estimators described in (5). Then, for any ǫ ∈ (0, ∞), there exist positive constants {Ci }3i=1 such that i h  ~ ∂T k ) 6= X ~ ρk ≤ ǫ + C1 exp −C2 |∂T k (s)| + C3 s (6) PΠ Fk (X for all s ∈ (0, h∗ /2] and k ≥ 1. 3 Key ideas in the construction of the root estimator In the more general context of continuous-time countable-space Markov chains on bounded-height nested trees [FR17], consistent root estimators were shown to exist under the big bang condition of Assumption 1 when, in addition, the edge process satisfies initial-state identifiability, i.e., the state of the process at time 0 is uniquely determined by the distribution of the state at any time t > 0. (In fact, these conditions are essentially necessary; see [FR17] for details.) Moreover, reversibility of the TKF91 process together with an observation of [FR17] implies that the TKF91 process does indeed satisfy initial-state identifiability. The root estimators implicit in [FR17], however, are not useful from an algorithmic point of view. They rely on the computation of the total variation distance between the leaf distribution conditioned on different root states—and we are not aware of a tractable way to do these computations in the TKF91 model. In our main contribution, we give explicit, computationally efficient root estimators that are consistent under Assumption 1. The estimators are defined in Section 2.3. In this section, we motivate these estimators by giving an alternative, constructive proof of initial-state identifiability in the TKF91 process. At a high level, Theorems 1 and 2 are then established along the following lines: the big bang condition ensures the existence of a large number of leaves whose states are almost independent conditioned on the root state, and concentration arguments imply that the sample version of the inversion formula derived in Lemma 1 below is close to the root state. See Section B for details. Let EM [|It |] be the expected length of the TKF91 edge process at time t starting from a sequence of length M, and p~σx (t) be the probability of observing the nucleotide σ ∈ {A, T, C, G} as the first nucleotide of a sequence at time t, under the TKF91 edge process with initial state ~x. Lemma 1 (Key lemma: a constructive proof of initial-state identifiability). For any t∗ ≥ 0, the following mappings are one-to-one and have explicit expressions for their inverses: 8 (1) (i) the mapping Φt∗ : Z+ → R+ defined by (1) Φt∗ (M) = EM [|It∗ |], (2) (ii) the mappings Φt∗ +t1 ,··· ,t∗ +tM : {A, T, C, G}M → [0, 1]4M defined by (2) Φt∗ +t1 ,··· ,t∗ +tM (~x) = (p~σx (t∗ + tj ))σ∈{A,T,C,G}, 1≤j≤M , (7) for any ~x with |~x| = M ≥ 1 and any 0 ≤ t1 < t2 < · · · < tM < ∞. Proof. (i) The sequence length of the TKF91 edge process is a well-studied stochastic process known as a continuous-time linear birth-death-immigration process (|It |)t≥0 . (We give more details on this process in Section A.) The expected sequence length, in particular, is known to satisfy the following differential equation d EM [|It |] = −(µ − λ)EM [|It |] + λ, dt with initial condition EM [|I0 |] = M, whose solution is given by EM [|It |] = Mβt + γ(1 − βt ) , 1−γ (8) (1) where βt = e−(µ−λ)t and γ = µλ . Solving (8) for M, we see that Φt is injective with inverse (1) (Φt )−1 (z) 1 = βt   γ(1 − βt ) z− . 1−γ (9) (ii) For Φ(2) , we make the following claim regarding the probability of observing σ as the first nucleotide of a sequence at time t under the TKF91 edge process starting at ~x with |~x| ≥ 1, which we denote by P~x (It = σ · · · ) . Recall the definition of p~xσ (t) in (4). Claim 1 (Probability of first nucleotide). We have P~x (It = σ · · · ) = p~σx (t), (10) for all nucleotide σ ∈ {A, T, C, G}, sequence ~x ∈ S and time t ∈ (0, ∞). Proof. We use some notation of [TKF91], where a nucleotide is also referred to as a “normal link” and a generic such nucleotide is denoted “ ⋆ ”. We define pk := pk (t) := P⋆ (normal link “ ⋆ ” survives and has k descendants including itself), p′k := p′k (t) := P⋆ (normal link “ ⋆ ” dies and has k descendants), ′′ ′′ pk := pk (t) := P• (immortal link “ • ” has k descendants including itself). 9 (Beware that we are not taking derivatives w.r.t. t.) These probabilities are explicitly found in [TKF91, equations (8)-(10)] by solving the ODEs governing these birth and death processes: ( p (t) = e−µt (1 − γη(t))[γη(t)]n−1 n p′n (t) = (1 − e−µt − η(t))(1 − γη(t))[γη(t)]n−1 ′′ pn (t) = (1 − γη(t))[γη(t)]n−1 for n ≥ 1, ( p (t) = 0 0 p′0 (t) = η(t) ′′ p0 (t) = 0. We decompose the event {It = σ · · · } according to whether the first nucleotide is the descendant of the immortal link “ • ” or the descendant of vi for 1 ≤ i ≤ |~v|. That is, P~v (It = σ · · · ) = |~ v| X P~v (It = σ · · · , first nucleotide descends from vi ) i=1 + P~v (It = σ · · · , first nucleotide descends from immortal link “ • ”). (11) We now compute each term on the RHS. The last term P~v (It = σ · · · , first nucleotide descends from immortal link “ • ”) ∞ ∞ X X ′′ = πσ pk = πσ (1 − γη) (γη)k−1 = πσ γη, k=2 (12) k=2 where the first equality is obtained by further decomposing the event according to the number of descendants of the ancestor of the first nucleotide. Similarly, for 1 ≤ i ≤ |~v|, we have P~v (It = σ · · · , first nucleotide descends from vi ) # " ∞ ∞ X X ′′ p′k pk + πσ = p1 (p′0 )i−1 fvi σ = ′′ p1 (p′0 )i−1 where k=1 k=1 h i −µt fvi σ e (1 − γη) + πσ (1 − e−µt − η) , (13) fij := fij (t) = πj (1 − e−νt ) + e−νt 1i=j is the transition probabilities that a nucleotide is of type j after time t, given that it is of type i initially. In the first equality (13), the term fvi σ pk is the probability that, during [0, t], vi survives and has k descendants including itself (and the first nucleotide of the sequence is σ); the term πσ p′k is the probability that vi dies and has k descendants (and the first nucleotide of the sequence is σ). From (11), (12) and (13) we have P~v (It = σ · · · ) = |~ v| X i=1 ′′ p1 (p′0 )i−1 h i −µt −µt fvi σ e (1 − γη) + πσ (1 − e − η) + πσ γη   |~ v| |~ v| X X ′′ ′′ = p1 e−µt (1 − γη)  (p′0 )i−1 fvi σ  + p1 (1 − e−µt − η)πσ (p′0 )i−1 + πσ γη i=1 i=1 10 which is exactly (10) upon further writing |~ v| X |~ v| (p′0 )i−1 fvi σ −st = πσ (1 − e i=1 X 1 − (p′0 )|~v| −st + e 1vi =σ (p′0 )i−1 . ) 1 − p′0 i=1 The proof is complete. We therefore have p~σx (t∗  + tj ) = πσ φj 1 − ηjM  + ψj M X 1{xi =σ} ηji−1 + πσ γ ηj , (14) i=1 for all σ ∈ {A, T, C, G} and 1 ≤ j ≤ M, where M = |~x|. We then solve (14) for ~x = (xi ) ∈ {A, T, C, G}M . System (14) is equivalent to the matrix equation H = Ψ V χ~x (15) where Ψ and V are the M × M matrices defined in Section 2.3, and 1. χ~x is the M × 4 matrix whose entries are 1{xj =σ} , and 2. H is the M × 4 matrix with entries   Hj,σ = p~σx (t∗ + tj ) − πσ φj 1 − ηjM − πσ γ ηj . It is well-known that the Vandermonde matrix V is invertible (see, e.g., [Gau62, Theorem 1]), so we can solve the system (15) to obtain χ~x = V −1 Ψ−1 H. (16) Sequence ~x ∈ {A, T, C, G}M is uniquely determined by χ~x . Hence, from (16), we get an explicit (2) inverse for the mappings Φt∗ +t1 ,··· ,t∗ +tM defined in (7). Heuristically, Steps 2 and 3 in the root estimator defined in Section 2.3 are the sample versions (1) (2) of the inverses of Φh∗ and Φh∗ +t1 ,··· ,h∗ +tM . That is, we replace the expectation E|~x| [|Ih∗ |] and probabilities (p~σx (h∗ + tj ))σ∈{A,T,C,G}, 1≤j≤M with their corresponding empirical averages. There is one further detail. The leaves of the tree are in fact at different distances from the root, rather than all at distance h∗ . Hence we take the empirical averages of the conditional expectation of the quantities at time h∗ given the values observed at the leaves. For this, we can use again the formulas (8) and (10). 11 References [ADHR12] Alexandr Andoni, Constantinos Daskalakis, Avinatan Hassidim, and Sebastien Roch. Global alignment of molecular sequences via ancestral state reconstruction. Stochastic Processes and their Applications, 122(12):3852–3874, 2012. [And91] William J. Anderson. Continuous-time Markov chains. Springer Series in Statistics: Probability and its Applications. Springer-Verlag, New York, 1991. An applicationsoriented approach. [DR13] Constantinos Daskalakis and Sebastien Roch. Alignment-free phylogenetic reconstruction: sample complexity via a branching process analysis. Ann. Appl. Probab., 23(2):693–721, 2013. [Dur96] Richard Durrett. Probability: theory and examples. Duxbury Press, Belmont, CA, second edition, 1996. [EKPS00] W. S. Evans, C. Kenyon, Y. Peres, and L. J. Schulman. Broadcasting on trees and the Ising model. Ann. Appl. Probab., 10(2):410–433, 2000. [Fel81] J. Felsenstein. Evolutionary trees from dna sequences: a maximum likelihood approach. J. Mol. Evol., 17:368–376, 1981. [FR17] W.-T. Fan and S. Roch. Necessary and sufficient conditions for consistent root state reconstruction in latent tree models. (in preparation). 2017. [Gau62] Walter Gautschi. On inverses of vandermonde and confluent vandermonde matrices. Numerische Mathematik, 4(1):117–123, 1962. [GS10] Olivier Gascuel and Mike Steel. Inferring ancestral sequences in taxon-rich phylogenies. Math. Biosci., 227(2):125–135, 2010. [Hoe63] Wassily Hoeffding. Probability inequalities for sums of bounded random variables. J. Amer. Statist. Assoc., 58:13–30, 1963. [KT81] Samuel Karlin and Howard E Taylor. A second course in stochastic processes. Elsevier, 1981. [Lib07] David A Liberles. Ancestral sequence reconstruction. Oxford University Press on Demand, 2007. [M+ 09] Michael Mitzenmacher et al. A survey of results for deletion channels and related synchronization channels. Probability Surveys, 6:1–33, 2009. [Mos01] E. Mossel. Reconstruction on trees: beating the second eigenvalue. Ann. Appl. Probab., 11(1):285–300, 2001. [Sly09] Allan Sly. Reconstruction for the potts model. In STOC, pages 581–590, 2009. 12 [Tha06] Bhalchandra D Thatte. Invertibility of the tkf model of sequence evolution. Mathematical biosciences, 200(1):58–75, 2006. [TKF91] Jeffrey L Thorne, Hirohisa Kishino, and Joseph Felsenstein. An evolutionary model for maximum likelihood alignment of dna sequences. Journal of Molecular Evolution, 33(2):114–124, 1991. [TKF92] Jeffrey L Thorne, Hirohisa Kishino, and Joseph Felsenstein. Inching toward reality: an improved likelihood model of sequence evolution. Journal of molecular evolution, 34(1):3–16, 1992. 13 A Some properties of the TKF91 length process Recall the TKF91 edge process I = (It )t≥0 in Definition 1, which has parameters (ν, λ, µ) ∈ (0, ∞)3 with λ < µ and (πA , πT , πC , πG ) ∈ [0, ∞)4 . The sequence length of the TKF91 edge process is a continuous-time linear birth-death-immigration process (|It |)t≥0 with infinitesimal generator Qi,i+1 = λ0 + iλ (for i ∈ Z+ ), Qi,i−1 = iµ (for i ≥ 1) and Qi,j = 0 otherwise. This is a well-studied process for which for the transition density pij (t) and probability P explicit forms j generating functions Gi (z, t) = ∞ p (t)z are known. See, for instance, [And91, Section 3.2] j=0 ij or [KT81, Chapter 4] for more details. This process was also analyzed in [Tha06] in the related context of phylogeny estimation. We collect here a few properties that will be useful in our analysis. The probability generating function is given by i  δ  1−γ 1 − β − z(γ − β) Gi (z, t) = 1 − βγ − γz(1 − β) 1 − βγ − γz(1 − β) for i ∈ Z+ and t > 0, where β = βt = e−(µ−λ)t , γ= λ , µ δ= λ0 . λ We only consider the case λ0 = λ (i.e. δ = 1) in this paper. Fix t ≥ 0 and let ϕi (θ) = Ei [eθ |It | ] be the characteristic function of |It | starting at i. Then for λ 6= µ (i.e. γ 6= 1), i    1−γ 1 − β − eθ (γ − β) θ ϕi (θ) = Gi (e , t) = 1 − βγ − γeθ (1 − β) 1 − βγ − γeθ (1 − β) Ai = (1 − γ) i+1 , (17) B where A = 1 − β − eθ (γ − β) and B = 1 − βγ − γeθ (1 − β). Differentiating with respect to θ gives  Ai−1 eθ i(β − γ) B − (i + 1)γ(β − 1) A ′ ϕi (θ) = (1 − γ) B i+2  Ai−1 eθ β(1 − γ)2 i + γ(1 − β)2 + eθ (γ − β)γ(β − 1) = (1 − γ) B i+2 i−1 A = i+2 (Ceθ + De2θ ), B (18) where C = (1 − γ)[β(1 − γ)2 i + γ(1 − β)2 ] and D = (1 − γ)(γ − β)γ(β − 1). Differentiating with respect to θ once more gives  o Ai−2 eθ n θ θ 2θ ϕ′′i (θ) = BA(C + 2De ) + (Ce + De ) (i − 1)B(β − γ) + (i + 2)Aγ(1 − β) B i+3 14 The expected value and the second moment are given by λ γ(1 − β) = iβ + (β − 1) and 1−γ λ−µ β(3γ + 1)(1 − β) (1 − β)γ[1 + (1 − 2β)γ] Ei [|It |2 ] = ϕ′′i (0) = i2 β 2 + i + 1−γ (1 − γ)2 Ei [|It |] = ϕ′i (0) = iβ + From these we also have the variance Vari (|It |) = Ei [|It |2 ] − (Ei [|It |])2 2  γ(1 − β) β(3γ + 1)(1 − β) (1 − β)γ[1 + (1 − 2β)γ] + − iβ + =i β +i 1−γ (1 − γ)2 1−γ γ(1 − β)(1 − βγ) β(1 − β)(1 + 3γ − 2β) + . (19) =i 1−γ (1 − γ)2 2 2 Consider the function ϕ′i (θ) ϕi (θ) γ(1 − β) Ceθ + De2θ = iβ + − 1−γ (1 − γ)AB   θ γ(1 − β) C1 e C2 eθ + De2θ i+ = β− − (1 − γ)AB 1−γ (1 − γ)AB   2 θ γ(1 − β) γ(1 − β)2 eθ + (γ − β)γ(β − 1) e2θ β(1 − γ) e i+ − = β− AB 1−γ AB = F (θ)i + G(θ) ψi (θ) = ϕ′i (0) − where we wrote C = C1 i + C2 , with C1 = β(1 − γ)3 and C2 = (1 − γ)γ(1 − β)2 , and the last line is a definition. Functions F and G can be simplified to (eθ − 1)β(1 − β)[(1 − βγ) − eθ γ(γ − β)] AB θ (e − 1)γ(1 − β)(1 − βγ)[(1 − β) − eθ (γ − β)] G(θ) = − . (1 − γ)AB F (θ) = − (20) (21) Since ϕi (0) = 1, we have ψ(0) = 0. We consider the case µ ∈ (λ, ∞), that is, γ ∈ (0, 1). Then both A and B are strictly positive for all t ∈ [0, ∞), provided that eθ < µ/λ. Moreover, F and G are continuous on [0, µ/λ), smooth on (0, µ/λ) and F (0) = G(0) = 0. B Proofs To prove Theorem 2 (and Theorem 1 from which it follows), that is, to obtain the desired upper bound, (6), on i i X h h ~ x k Π ~ ~ ~ (22) P Fk (X∂T k ) 6= ~x Π(~x), P Fk (X∂T k ) 6= Xρ = ~ x∈S 15 we first observe that from the construction of Fk in Section 2.3, if the estimator is wrong, then either the estimated length is wrong or the length is correct but the sequence is wrong. Hence we have h i h i   ~ ∂T k ) 6= ~x ≤ P|~x| M k,∗ 6= |~x| + P~x F (|~x|) (X ~ ∂T k ) 6= ~x , (23) P~x Fk (X k for all ~x ∈ S \ {“ • ”}, where P~x denotes the probability law when the root state is ~x. The proof involves bounding the first and second terms on the RHS of (23), formulated as Propositions 1 and 2 respectively in the next two subsections. B.1 Reconstructing the sequence length In this subsection, we bound the first term on the RHS of (23), which is the probability of incorrect estimation of the root sequence length. Proposition 1 is a quantitative statement about how this error tends to zero exponentially fast in m := |∂T k (s)|, as k → ∞ and s → 0. Proposition 1 (Sequence length estimation error). There exist constants C1 , C2 ∈ (0, ∞) which depend only on h∗ , µ and λ such that  P0 (M k,∗ 6= 0) ≤ 2 exp −C1 |∂T k (s)| + C2 s and   −C1 |∂T k (s)| k,∗ + C2 (M + 1) s PM (M 6= M) ≤ 2 exp M for all s ∈ (0, h∗ /2], k ∈ N and M ∈ N. Outline of the proof of Proposition 1 Fix k ≥ 1 and s > 0. For convenience, we let m := |∂T k (s)|. Our sequence length estimator M k,∗ is correct if the empirical average Ak,s = 1 X E|X~ v | [|Ih∗ −ℓv |] m k,s v∈∂ T̃ is close to it expectation. Indeed, all terms E|X~ v | [|Ih∗ −ℓv |], for v ∈ ∂ T̃ k,s , have mean νM , where by Markov property and formula (8) νM := EM [|Ih∗ |] = Mβh∗ + γ(1 − βh∗ ) , 1−γ where recall that βt = e−(µ−λ)t and γ= (24) λ . µ (1) Formula (8) also tells us that the function M 7→ Φh∗ (M) is linear with slope βh∗ . So if |Ak,s − νM | < βh∗ /2 then (1) (1) [[ (Φh∗ )−1 (Ak,s ) ]] = [[ (Φh∗ )−1 (νM ) ]] = M. Hence, the error probability satisfies PM (M k,∗ 6= M) ≤ PM  k,s A 16  − νM |] ≥ βh∗ /2 , (25) for all M ≥ 0. To bound of the RHS of (25), we first note that the terms E|X~ v | [|Ih∗ −ℓv |], for v ∈ ∂ T̃ k,s , are correlated. However, the construction of T̃ k,s guarantees that this correlation is “small” as the paths to the root from any two leaves of the restriction overlap only “above level s.” ~ ∂T (s) = {X ~v : v ∈ To control the correlation, we condition on the leaf states of the truncation X ∂T (s)}. By the Markov property h i ~ ∂T (s) = 1 EM Ak,s X m X E|X~ u | [|Ih∗ −s |]. (26) u∈∂T k (s) We first bound the probability that this conditional expectation is close to its expectation, which is also νM . Then, conditioned on this event, we establish concentration of Ak,s based on conditional independence. We detail the above argument in Steps A-C as follows. We use some properties of the length process derived in Section A. (A) Decomposition from conditioning on level s For ǫ > 0, δ ∈ (0, ∞) and s ∈ (0, h∗ ), we have   c PM Ak,s − νM ≥ ǫ ≤ PM { Ak,s − νM ≥ ǫ} ∩ Eδ,s + PM (Eδ,s), (27) where Eδ,s := n h o i ~ ∂T (s) − νM > δ . EM Ak,s X (28) As we shall see, Proposition 1 is then be obtained by taking δ = ǫ/2 = βh∗ /4. (B) Bounding PM (Eδ,s) The second term on the RHS of (27) is treated in Lemma 2 below. Because of the correlation above level s, we use Chebyshev’s inequality to control the deviation of the conditional expectation. Lemma 2 (Conditional expectation given level s). For all M ∈ Z+ , δ ∈ (0, ∞) and s ∈ (0, h∗ ), we have PM (Eδ,s ) ≤ δ −2 C (M + 1) s, where C ∈ (0, ∞) is a constant which depends only on h∗ , µ and λ. Proof. By (26) and Chebyshev’s inequality,   X E|X~ u | [|Ih∗ −s |] − mνM > mδ  PM (Eδ,s) =PM  u∈∂T k (s) ≤ 1 m2 δ 2  EM  X u∈∂T k (s) 17 2 E|X~ u | [|Ih∗ −s |] − νM  (29) The numerator, by Cauchy-Schwarz, symmetry, (8) and (19), is bounded as follows  2 X E|X~ u | [|Ih∗ −s |] − νM  EM  u∈∂T k (s) X = X u∈∂T k (s) ũ∈∂T k (s)  ≤ X u∈∂T k (s) r h  i EM E|X~ u | [|Ih∗ −s |] − νM E|X~ ũ | [|Ih∗ −s |] − νM VarM  2  E|X~ u | [|Ih∗ −s |]    = m2 VarM E|X~ u | [|Ih∗ −s |] ~ u |) = m2 βh2∗ −s VarM (|X   γ(1 − βs )(1 − βs γ) βs (1 − βs )(1 + 3γ − 2βs ) 2 2 + = m βh∗ −s M 1−γ (1 − γ)2 ≤ m2 (1 − βs ) C (M + 1), where C ∈ (0, ∞) is a constant which depends only on h∗ , µ and λ, where we used that γ < 1 and βt is decreasing. Putting the above inequality into (29), we obtain the desired inequality. (C1) Deviation of Ak,s conditioned on Eδ,s The key step of the analysis is to control the first term on the RHS of (27) by taking advantage of the conditional independence of the leaves of the ~ ∂T k (s) (done in (30)). By the definition of Ak,s , that term is equal to restriction given X     \  X c  Eδ,s (30) E|X~ v | [|Ih∗ −ℓv |] − mνM ≥ mǫ PM    k,s v∈∂ T̃ which, by the Markov property and conditional independence, is further equal to ! m   X X (ui ) ~ P |x |h∗ −s − mνM ≥ mǫ PM |X∂T k (s) | = ~u , c u∈Zδ,s ~ (31) i=1 where the set Zδ,s is analogous to Eδ,s and defined as o n X ∗ E [|I |] − mν > mδ , Zδ,s := ~u = (u1, · · · , um) ∈ Zm : ui h −s M + i and {|x(ui ) |}m i=1 are, under probability P, independent copies of the birth-death process |It | starting m from {ui }i=1 respectively. By the triangle inequality, we have for all s ∈ (0, h∗ ), P (31) ≤ max c ~ u∈Zδ,s P ≤ max c ~ u∈Zδ,s m  X i=1 m X i=1  |x(ui ) |h∗ −s − mνM ≥ mǫ !  |x(ui ) |h∗ −s − Eui [|Ih∗ −s |] ≥ m(ǫ − δ) . 18 (32) Write t = h∗ − s for convenience. A typical term in the sum of the last display is ξi = |x(ui ) |t − Eui [|It |], which are mean zero, unbounded random variables. To control the deviation, we bound the exponential moment generating function of |It | under Pui . Although this type of argument is standard in large deviations theory (see, e.g., [Dur96]), a non-trivial requirement here is to obtain a bound c that is uniform in (u1, · · · , um) ∈ Zδ,s . Note that the condition ~u ∈ Zδc is equivalent to m βt X γ(1 − βt ) − νM ≤ δ. ui + m i=1 1−γ (33) (C2) Uniform control of moment generating function Let δ = ǫ/2 = βh∗ /4 and fix ~u ∈ Zδc . Write t = h∗ − s for convenience. The moment generating function ϕM (θ) := EM [eθ |It | ] of the length process |It | starting at M ∈ Z+ is given in (17) in Section A. Markov’s inequality and the independence of {ξi }s yields, for all a ∈ (0, ∞) and θ ∈ R, ! ! ! m m X X P ξi ≥ m a = P exp θ ξi ≥ eθ m a i=1 i=1 ≤ e−θ m a m Y E[eθ ξi ] i=1 = e−θ m a m Y exp (−θ Eui [|It |]) ϕui (θ) i=1 = exp (− m Φ(θ)), where m Φ(θ) := θ a + (34) m 1 X θ X ′ ϕui (0) − log ϕui (θ). m i=1 m i=1 (35) Standard calculations easily give Φ(θ̂) > 0 for some θ̂ ∈ (0, ∞) small enough. However, we need to show that θ̂ ∈ (0, ∞) can be chosen to be independent of the vector ~u = (u1 , · · · , um ) ∈ Zδc and t ∈ (h∗ /2, h∗ ). Recall that definitions of the functions F and G in (20) and (21). It holds that Φ(0) = 0, Φ is continuous at 0 and differentiable on (0, ∞) with derivative  m  ϕ′ui (θ) 1 X ′ Φ (θ) = a + ϕui (0) − m i=1 ϕui (θ) ′ m F (θ) X ui m i=1   F (θ) γ(1 − βt ) ≥ a + G(θ) + νM − +δ , βt 1−γ = a + G(θ) + 19 (36) for θ ∈ [0, θ1∗ ], where in the second last inequality we have used condition (33) and the fact that F (θ) ≤ 0 for all t ∈ (h∗ /2, h∗ ) and θ ∈ [0, θ1∗ ] for some θ1∗ > 0 which depends only on µ, λ and h∗ . Recall that t = h∗ − s and take a = ǫ − δ = βh∗ /4. From (24) and (36) and the fact that both F and G are continuously differentiable and tend to 0 as θ → 0, we have   γ(βt − βh∗ ) βh∗ βh∗ F (θ) ′ Φ (θ) ≥ Mβh∗ − + G(θ) + + 4 βt 1−γ 4   βh∗ F (θ) βh∗ Mβh∗ + + G(θ) + ≥ 4 βt 4 βh∗ ∗ + F (θ) (M + 1) e(λ−µ)h /2 , (37) ≥ 8 for θ ∈ [0, θ∗ ] and s ∈ [0, s∗ ], where s∗ ∈ [0, h∗ /2] and θ∗ > 0 are constants which depend only on µ, λ and h∗ , but not on M. Again, we also used that F (θ) is non-positive for small θ. Note that, when t ∈ [h∗ /2, h∗ ], we have F (θ) ∝ (1 − eθ ) up to a constant depending on µ, λ and h∗ . More precisely, there exists C∗ ∈ (0, ∞) which depends only on µ, λ, and h∗ , but not on M, s ∈ (0, h∗ /2) or ~u ∈ Zδc , such that e(λ−µ)h − 16 ∗ /2 =− βh∗ ∗ /2 (λ−µ)h 16 e ≤ (M + 1)F (θ) ≤ 0 for all θ ∈ [0, C∗ /M], where C∗ takes care of the factor F (θ)/(1 − eθ ) (which is between positive constant for t ∈ [h∗ /2, h∗ ] and small θ) and the LHS is chosen in view of the expression in (37). Therefore, from (37), we have inf∗ inf s∈(0, h /2) θ∈[0, C∗ /M ] Φ′ (θ) ≥ βh∗ . 16 (38) From (34) and (38) we obtain P m X i=1 ! ξi ≥ m a ≤ exp P   − m βh∗ C∗ . 16M m i=1 ξi  ≤ −m a by replacing ξi by −ξ in the The same inequality can be obtained for P above arguments. Hence from (32) we finally obtain   − m βh∗ C∗ (30) ≤ 2 exp . 16M (39) Proof of Proposition 1. Take δ = ǫ/2 = βh∗ /4. Then apply (39) to the first term on the RHS of (27) and Lemma 2 to the second term on the RHS of (27). The proof of Proposition 1 is complete by collecting inequalities (25) and (27). 20 B.2 Reconstructing root sequence given sequence length In this subsection, we bound the second term on the RHS of (23), which is the probability of incorrectly reconstructing the root sequence, given its length. Suppose we assume (or know) that the ancestral sequence length is M ≥ 1, that is, the ancestral state is an element of {A, T, C, G}M . (M ) Let Fk denote the estimator in (5) when M k,s = M. Formally, we prove the following. Proposition 2 (Sequence reconstruction error). For all M ∈ Z+ , ~x ∈ {A, T, C, G}M and s ∈ (0, h∗ ),     i h k − |∂T (s)| (M ) ~ x ~ ∂T k 6= ~x ≤ 8M exp + C M 4 Ĉ s X P Fk 8 Ĉ −1 −1 2 where Ĉ := kV Ψ k∞→∞ ∈ (0, ∞) is a constant which depends only on µ, λ, h∗ and {tj }M j=1 , and C ∈ (0, ∞) is a constant which depends only on ν, µ and λ. Outline of the proof of Proposition 2 Fix k ≥ 1, s = sk > 0, M ≥ 1 and {tj }M j=1 in the  (M ) (M ) (M ) ~ X∂T k ∈ construction of Fk . By the construction of Fk in (5), our sequence estimator Fk {A, T, C, G}M is correct if it is close to the argmax over the columns of the matrix V −1 Ψ−1 U. By the definitions of U, Ψ, V , our analysis boils down to bounding the deviations of the empirical frequencies fσk,s (tj ) from their expectations p~σx (h∗ +tj ). This is established using similar arguments to that of Proposition 1. Here is an outline. (i) Reduction from deviation of matrices to deviation of frequencies Recall that χ~x is the  (M ) ~ X∂T k = ~x is implied by kV −1 Ψ−1 U − M × 4 matrix whose entries are 1{xj =σ} . By (5), Fk χ~x kmax < 1/2, where kAkmax := maxi,j |aij | is the maximum among the absolute values of all entries of A. On the other hand, kV −1 Ψ−1 U − χ~x kmax = kV −1 Ψ−1 (U − Ψ V χ~x )kmax ≤ kV −1 Ψ−1 k∞→∞ kU − Ψ V χ~x kmax , (40) P where kAk∞→∞ := maxi j |aij | is the maximum absolute row sum of a matrix A = (aij ). The above two facts give   i h   (M ) x ~ ~ X∂T k 6= ~x ≤ P ~x kV −1 Ψ−1 U − χ~x kmax ≥ 1/2 P Fk   1 ~ x x ~ ≤ P kU − Ψ V χ kmax ≥ . 2 kV −1 Ψ−1 k∞→∞ By definitions of U, Ψ, V , we have kU − Ψ V χ~x kmax = max fσk,s (tj ) − p~σx (h∗ + tj ) . max σ∈{A,T,C,G} 1≤j≤M Therefore we can bound the target probability by the probabilities of deviations of empirical frequencies fσk,s (tj ) as follows   i h (M ) ~ ∂T k 6= ~x X P ~x Fk   M X X 1 k,s σ ∗ ~ x fσ (tj ) − p~x (h + tj ) ≥ ≤ P . (41) −1 Ψ−1 k 2 kV ∞→∞ j=1 σ∈{A,T,C,G} 21 (ii) Estimating deviation of frequencies We then bound each term on the RHS of (41) using similar arguments to that of Proposition 1. As before we let m := |∂T k (s)| for convenience. Recall from (3) that for t ∈ [0, ∞) fσk,s(t) = 1 m X pσX~ v (t + h∗ − ℓv ). v∈∂ T̃ k,s All the terms pσX~ (t + h∗ − ℓv ), for v ∈ ∂ T̃ k,s , have expectation p~xσ (h∗ + t) under P~x , by the Markov v property. Therefore, for ǫ ∈ (0, ∞) and t ∈ [0, ∞), we have   X  1 yv > ǫ (42) P~x |fσk,s (t) − p~σx (h∗ + t)| > ǫ = P~x  m k,s v∈∂ T̃ where yv := pσX~ v (t + h∗ − ℓv ) − p~σx (h∗ + tj ) for v ∈ ∂ T̃ k,s , are centered but correlated random variables under P~x . To bound (42) we use the same method that we used to bound (25), namely by considering the conditional expectation of fσk,s (t) given the ~ ∂T (s) = {X ~ v : v ∈ ∂T (s)}, which by the Markov property is equal to states X h i 1 k,s ~ E fσ (t) X∂T (s) = m ~ x X pσX~ u (h∗ + t − s). (43) u∈∂T k (s) As before we first bound the probability of the event that this conditional expectation is close to its expectation (which is also p~σx (h∗ + t)), then conditioned on this event we establish a concentration inequality for fσk,s (t), based on conditional independence. Since all ηv are bounded between 1 and -1, we apply Hoeffding’s inequality [Hoe63] for this purpose. We detail the above argument in Steps A-C as follows. (A) Decomposition by conditioning on level s Similarly to (27) we have    t t c ), P~x |fσk,s (t) − p~σx (h∗ + t)| > ǫ ≤ P~x |fσk,s (t) − p~σx (h∗ + t)| > ǫ (Fδ,s ) + P~x (Fδ,s where t Fδ,s := n i o h ~ ∂T (s) − pσ (h∗ + t) > δ . E~x fσk,s(t) X ~ x (44) (45) We then control the two terms on the RHS of (44). As we will see, the proof of Proposition 2 will be completed by taking ǫ= 1 , 2 kV −1 Ψ−1 k∞→∞ δ := ǫ/2 in (44) and combining with (41). 22 and t = tj . (46) t (B) Bounding PM (Fδ,s ) The second term on the RHS of (44) is treated in Lemma 3 below. Lemma 3. There exists a constant C ∈ (0, ∞) which depends only on λ, ν and µ such that for all ~x ∈ {A, T, C, G}M , δ ∈ (0, ∞) and s ∈ (0, h∗ ), we have t sup P~x (Fδ,s ) ≤ δ −2 CMs, t∈(0,∞) t where event Fδ,s is defined in (45). Proof. P Similarly to the proof of Lemma 2 we use Chebyshev’s inequality to control the deviation of u∈∂T k (s) pσX~ (h∗ + t − s). By the Cauchy-Schwarz inequality, the variance can be bounded as u follows   X Var~x  pσX~ u (h∗ + t − s) u∈∂T k (s) = X X X X u∈∂T k (s) v∈∂T k (s) ≤ x∈∂T k (s) y∈∂T k (s) i  h ∗ σ ∗ ∗ σ ∗ σ σ pX~ v (h + t − s) − p~x (h + t) E pX~ u (h + t − s) − p~x (h + t) i r i i h h Var~x pσX~ (h∗ + t − s) Var~x pσX~ (h∗ + t − s) v u h i = m2 Var~x pσX~ u (h∗ + t − s) . (47) Using the explicit formula (14) and the general inequality Var(X + Y ) ≤ 2 (Var(X) + Var(Y )) (which can be seen by applying Cauchy-Schwarz to the covariance and then the AM-GM inequality), we have i h Var~x pσX~ u (h∗ + t − s)   ~ u| |X X ~ = Var~x −πσ φ(h∗ + t − s) A|Xu | + ψ(h∗ + t − s) 1{Xu,i =σ} Ai−1  i=1   ~ u| |X h i X ~ 1{Xu,i =σ} Ai−1  , ≤ 2 πσ2 φ2 (h∗ + t − s) Var~x A|Xu | + 2 ψ 2 (h∗ + t − s) Var~x  (48) i=1 where A := η(h∗ + t − s). (Note that the A here is distinct from that in Section A.) i h ~ The term Var~x A|Xu | can be bounded as follows. Fix u ∈ ∂T k (s) and let Eu be the event that the sequence never left state ~x along the unique path from the root to u. Then P~x (Eu ) = e−qM s , and where qM := Mν + (M + 1)λ + Mµ, h i i h ~ ~ E~x A|Xu | = AM P~x (Eu ) + E~x A|Xu | ; Euc . 23 Since A ∈ [0, 1], we have h i ~ 0 ≤ E~x A|Xu | − AM e−qM s ≤ 1 − e−qM s . Similarly, i h ~ 0 ≤ E~x A2|Xu | − A2M e−qM s ≤ 1 − e−qM s . The last two displays give h i h i  h i2 ~ ~ ~ Var~x A|Xu | = E~x A2|Xu | − E~x A|Xu |  ≤ A2M e−qM s + 1 − e−qM s − (AM e−qM s )2 = A2M e−qM s (1 − e−qM s ) + 1 − e−qM s ≤ 2(1 − e−qM s ), (49) where we used that A ∈ [0, 1] on the last line. For the second variance term in (48), a similar argument gives   ~ u| |X X E~x  1{Xu,i =σ} Ai−1  i=1 M X = 1{xi =σ} Ai−1 i=1   ~ u| |X X ~ u | ≥ 1} . P~x (Eu ) + E~x  1{Xu,i =σ} Ai−1 ; Euc ∩ {|X ! i=1 Observe that almost surely ~ 0≤ | Xu | X 1{Xu,i =σ} Ai−1 ≤ i=1 ∗ 1 , 1−A (50) because A ∈ (0, 1) when h + t − s > 0. Hence we obtain   ! ~ u| |X M X X 1 − e−qM s 0 ≤ E~x  1{Xu,i =σ} Ai−1  − 1{xi =σ} Ai−1 e−qM s ≤ . 1 − A i=1 i=1 Similarly we have ~ x  0 ≤ E  ~ | Xu | X i=1 2  i−1  1{Xu,i =σ} A − M X i=1 i−1 1{xi =σ} A !2 e−qM s ≤ 1 − e−qM s (1 − A)2 From the above two displays and (50), we obtain, as in (49), the following estimate   ~ u| |X X 2(1 − e−qM s ) . Var~x  1{Xu,i =σ} Ai−1  ≤ 2 (1 − A) i=1 24 (51) From (48)-(51) we have i h ∗ σ Var~x pX~ u (h + t − s) 1 − e−qM s ≤ 4 πσ2 φ2 (h∗ + t − s) (1 − e−qM s ) + 4 ψ 2 (h∗ + t − s) (1 − A)2   ψ 2 (h∗ + t − s) −qM s 2 2 ∗ = 4 (1 − e ) πσ φ (h + t − s) + (1 − η(h∗ + t − s))2   γ2 ≤ 4 (1 − e−qM s ) kφk2∞ πσ2 + (1 − γ)2 ≤ C1 Ms for all s ∈ (0, h∗ ) and t ∈ (0, ∞), where C1 ∈ (0, ∞) is a constant which depends only on λ, ν and µ. In the second to last inequality, we used the following facts that follow directly from the definitions: (i) η is a strictly increasing function with η(0) = 0 and limt→∞ η(t) = 1/γ, (ii) the supremum norm kφk∞ < ∞ and (iii) ψ(t) is a decreasing function bounded above by 1. The result follows by (47) and Chebyshev’s inequality. t (C) Deviation of fσk,s (t) conditioned on Fδ,s By the Markov property and conditional independence as in (32), the first term on the RHS of (44) is equal to   k,s σ ∗ t c (52) P~x |fσ (t) − p~x (h + t)| > ǫ (Fδ,s )   X t c ) pσX~ v (t + h∗ − ℓv ) − m p~xσ (h∗ + t) > mǫ (Fδ,s = P~x  v∈∂ T̃ k,s ≤ max m P c (~ ui )i=1 ∈Zδ,s m  X i=1 where c Zδ,s := n (~ui )m i=1 ∈S m :  pσX~ (~ui ) (h∗ −s) (t) − m p~σx (h∗ + t) ≥ mǫ . m X pσ~ui (h∗ + t − s) − m p~σx (h∗ + t) ≤ mδ i=1 (53) o ~ (~ui ) (h∗ − s)}m are independent copies of the TKF91 process starting from {~ui }m respecand {X i=1 i=1 tively, evaluated at time h∗ −s. By the triangle inequality and then Hoeffding’s inequality [Hoe63], we have ! m   X P pσX~ (~ui ) (h∗ −s) (t) − pσ~ui (h∗ + t − s) ≥ m(ǫ − δ) (53) ≤ max m c (~ ui )i=1 ∈Zδ,s i=1  ≤ 2 exp −2m (ǫ − δ)2 . (54) Proof of Proposition 2. As pointed out in (46), we will take ǫ= 2 kV −1 1 , Ψ−1 k∞→∞ δ := ǫ/2 25 and t = tj . From (54) we have (53) ≤ 2 exp  −m −1 8 kV Ψ−1 k2∞→∞  . Taking t ∈ {tj } in (44), we see that a typical term on the RHS of (41) is   1 k,s σ ∗ ~ x fσ (tj ) − p~x (h + tj ) ≥ P 2 kV −1 Ψ−1 k∞→∞   i h −m tj ≤ 2 exp + P F ~ x δ,s . 8 kV −1 Ψ−1 k2∞→∞ (55) The proof of Proposition 2 is completed upon applying Lemma 3 and plugging into (41). B.3 Proof of Theorem 2 Applying Propositions 1 and 2 to the first and the second terms on the RHS of (23) respectively, we obtain constants C1 , C2 , C3 ∈ (0, ∞) which depend only on h∗ , µ and λ such that   h i k −C |∂T (s)| 1 ~ x ~ ∂T k ) 6= ~x ≤ 2 exp + C2 M s P Fk (X M   − |∂T k (s)| + C3 M 4 Ĉ s (56) + 8M exp 8 Ĉ for all s ∈ (0, h∗ /2] and k ∈ N, where M = |~x| and Ĉ := kV −1 Ψ−1 k2∞→∞ ∈ (0, ∞) is a constant which depends only on µ, λ, h∗ and {tj }M j=1 . P For any ǫ ∈ (0, ∞), there exists Mǫ such that {~x: |~x|>Mǫ} Π(~x) < ǫ/2. Hence i i h h X ǫ ~ x ~k < ~ ~ ∂T k ) 6= X ) = 6 ~ x Π(~x) + P F ( X PΠ Fk (X k k ∂T ρ 2 {~ x: |~ x|≤Mǫ } h i ~ ∂T k ) 6= ~x + ǫ . ≤ max P~x Fk (X {~ x: |~ x|≤Mǫ } 2 ǫ From (56), there exist constants C4 , C5 ∈ (0, ∞) which depend only on µ, λ, h∗ , Mǫ and {tj }M j=1 such that   h i − |∂T k (s)| ~ x ~ + C5 s max P Fk (X∂T k ) 6= ~x ≤ 16Mǫ exp {~ x: |~ x|≤Mǫ } C4 for all s ∈ (0, h∗ /2] and k ∈ N. Inequality (6) follows from this. The proof of Theorem 2 is complete. B.4 Proof of Theorem 1 Theorem 1 follows from Theorem 2 upon taking sequences ǫm ↓ 0 and sm ↓ 0 and then a subsequence km → +∞ such that the error in (6) goes to 0. This is possible thanks to the big bang condition, which guarantees |∂T k (sm )| → +∞ as k → ∞. 26 Our estimator runs in time polynomial in the size of the input data. Indeed the length estimator is linear in the length of the longest input sequence and the matrix manipulations in the sequence estimator are polynomial in that quantity. 27
10math.ST
Saarland University Faculty of Natural Sciences and Technology I Department of Computer Science Master Thesis Index Search Algorithms for Databases and Modern CPUs submitted by Florian Gross submitted November 15, 2010 Supervisor Prof. Dr. Jens Dittrich Reviewers Prof. Dr. Jens Dittrich Prof. Dr. Sebastian Hack ii Statement in Lieu of an Oath Declaration of Consent I hereby confirm that I have written this thesis on my own and that I have not used any other media or materials than the ones referred to in this thesis. Ich erkläre an Eides Statt, dass ich die vorliegende Arbeit selbstständig verfasst und keine anderen als die angegebenen Quellen und Hilfsmittel verwendet habe. I agree to make both versions of my thesis (with a passing grade) accessible to the public by having them added to the library of the Computer Science Department. Ich bin damit einverstanden, dass meine (bestandene) Arbeit in beiden Versionen in die Bibliothek der Informatik aufgenommen und damit veröffentlicht wird. Saarbrücken, November 15, 2010 (Datum / Date) (Unterschrift / Signature) iii iv Abstract Over the years, many different indexing techniques and search algorithms have been proposed, including CSS-trees, CSB+ -trees, k-ary binary search, and fast architecture sensitive tree search. There have also been papers on how best to set the many different parameters of these index structures, such as the node size of CSB+ -trees. These indices have been proposed because CPU speeds have been increasing at a dramatically higher rate than memory speeds, giving rise to the Von Neumann CPU–Memory bottleneck. To hide the long latencies caused by memory access, it has become very important to well-utilize the features of modern CPUs. In order to drive down the average number of CPU clock cycles required to execute CPU instructions, and thus increase throughput, it has become important to achieve a good utilization of CPU resources. Some of these are the data and instruction caches, and the translation lookaside buffers. But it also has become important to avoid branch misprediction penalties, and utilize vectorization provided by CPUs in the form of SIMD instructions. While the layout of index structures has been heavily optimized for the data cache of modern CPUs, the instruction cache has been neglected so far. In this paper, we present NitroGen, a framework for utilizing code generation for speeding up index traversal in main memory database systems. By bringing together data and code, we make index structures use the dormant resource of the instruction cache. We show how to combine index compilation with previous approaches, such as binary tree search, cache-sensitive tree search, and the architecture-sensitive tree search presented by Kim et al. v vi Acknowledgments This work would not have been completed without the help and support of the many individual people who have helped me along the way. Particularly: Prof. Dr. Jens Dittrich for providing me with the opportunity of pursuing this research idea under his guidance, for advising me over the course of it, and for being the first to encourage me to get involved in research. Prof. Dr. Sebastian Hack for serving as my second reviewer, and for his valuable suggestions. To Dr. Martin Theobald for offering his advise. To Stefan Richter, and Christoph Pinkel for offering me excellent feedback on draft copies of this work. To Alekh, Jorge, Jörg, Stefan, Pascal, and Julian for helping out with bits and ends. To the many friends and my family for their constant support. Lastly, I am deeply indebted to Katrin for her understanding, patience, and encouragement throughout the long process of work that went into this thesis. vii viii Contents 1 Introduction 1 1.1 On Index Search Algorithms . . . . . . . . . . . . . . . . . . . 2 1.2 Overview of Modern Hardware Architecture . . . . . . . . . . 4 1.3 Motivation of this Work . . . . . . . . . . . . . . . . . . . . . 7 1.4 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.4.1 Performance surveys . . . . . . . . . . . . . . . . . . . 9 1.4.2 Traditional index structures . . . . . . . . . . . . . . . 9 1.4.3 CPU-optimized index structures . . . . . . . . . . . . 10 1.4.4 Compilation in Database Systems . . . . . . . . . . . 12 Description of Remaining Chapters . . . . . . . . . . . . . . . 12 1.5 2 Traditional Index Structures and Search Algorithms 2.1 2.2 What’s wrong with Binary Search? . . . . . . . . . . . . . . . B-trees and B+ -trees . . . . . . . . . . . . . . . . . . . . . . . 3 CPU-optimized Index Structures and Search Algorithms 13 14 17 21 3.1 CSS-Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2 CSB+ -Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.3 k-ary Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.4 Fast Architecture Sensitive Tree Search . . . . . . . . . . . . 29 ix 4 The NitroGen Approach 33 4.1 The Fundamental Idea of NitroGen . . . . . . . . . . . . . . . 35 4.2 Current Status . . . . . . . . . . . . . . . . . . . . . . . . . . 36 4.2.1 NitroGen for Binary Search . . . . . . . . . . . . . . . 37 4.2.2 NitroGen for CSS-Tree Search . . . . . . . . . . . . . 38 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 4.3 5 Experimental Evaluation 41 5.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 42 5.2 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . 46 5.2.1 Binary Search, CSS-Tree Search, and NitroGen . . . . 46 5.2.2 Effect of Internal Node Size in CSS-Trees . . . . . . . 47 5.2.3 Performance of FAST reimplementation . . . . . . . . 48 6 Conclusion 49 6.1 Statement of Results . . . . . . . . . . . . . . . . . . . . . . . 49 6.2 Statement of Problems left unresolved . . . . . . . . . . . . . 50 x List of Figures 1.1 Classes of search algorithms . . . . . . . . . . . . . . . . . . . 3 1.2 Cache hierarchy of modern CPUs . . . . . . . . . . . . . . . . 5 1.3 Traditional utilization of caches in modern CPUs . . . . . . . 8 2.1 Sample run of binary search . . . . . . . . . . . . . . . . . . . 15 2.2 Cache behavior for sample run of binary search . . . . . . . . 16 2.3 Logical and physical layout of B- and B+ -trees . . . . . . . . 19 3.1 Logical and physical layout of CSS-trees . . . . . . . . . . . . 23 3.2 Logical and physical layout of CSB+ -trees . . . . . . . . . . . 25 3.3 Sample run of k-ary search on a sorted array . . . . . . . . . 27 3.4 Sample run of k-ary search on a linearized tree . . . . . . . . 28 3.5 Layout of FAST-trees . . . . . . . . . . . . . . . . . . . . . . 30 4.1 Sample run of NitroGen for linear search . . . . . . . . . . . . 35 4.2 Sample run of NitroGen for binary search . . . . . . . . . . . 37 4.3 Sample run of NitroGen for CSS-tree search . . . . . . . . . . 38 4.4 Preamble of NitroGen CSS-tree search code . . . . . . . . . . 39 5.1 Effect of NitroGen on CSS-tree and binary search . . . . . . . 46 5.2 Effect of keys per node on CSS performance . . . . . . . . . . 47 5.3 Performance of FAST reimplementation . . . . . . . . . . . . 48 xi xii List of Algorithms 2.1 Iterative binary search algorithm . . . . . . . . . . . . . . . . . 17 2.2 B+ -tree search algorithm . . . . . . . . . . . . . . . . . . . . . 18 3.1 CSS-tree search algorithm . . . . . . . . . . . . . . . . . . . . . 24 3.2 CSB+ -tree search algorithm . . . . . . . . . . . . . . . . . . . . 26 xiii xiv List of Tables 4.1 Code size for index search implementations . . . . . . . . . . 34 5.1 Configuration of hardware systems . . . . . . . . . . . . . . . 42 5.2 Parameters of traditional search algorithms . . . . . . . . . . 43 5.3 Parameters of CPU-optimized search algorithms . . . . . . . 44 xv xvi Chapter 1 Introduction “[T]here is a direct tradeoff between capacity and speed in DRAM chips, and the highest priority has been for increasing capacity. The result is that from the perspective of the processor, memory has been getting slower at a dramatic rate. This affects all computer systems, making it increasingly difficult to achieve high processor efficiencies.” — Stefan Manegold et al. [MBK00] This chapter will start out with a brief description of the problem of index search, and the different classes of algorithms involved therein. The main focus will be on a subset of representative index search problems with some restrictions, e.g. assuming read-intensive workloads, such as the ones commonly seen in online analytical processing. Most of the ideas presented, however, apply to index search in general and can be adapted for other types of index search problems with relative ease. After giving a definition for index search, we will give a brief overview of modern hardware architecture, present a motivation for this work, and describe the contribution of this work. This chapter will then discuss related work, and conclude by describing the structure of the remaining chapters. 1 1.1 On Index Search Algorithms “An index makes the query fast.” — Markus Winand [Win10] Just like the searching chapter of Knuth’s book on the Art of Computer Programming [Knu98], most of this thesis is devoted to the study of a very fundamental search problem: how to find the data item that has been stored with a specific identification key. This is sufficient for solving a wide assortment of search problems like finding the values of a mathematical function for some specific set of arguments, looking up the definition of a word in a dictionary, or the telephone number of a person based on that person’s name in a telephone book. In fact the only thing this view of index search requires is a set of records. Some part of each of those records should be designated as the key, used for identifying that record in the search index. It is possible to have multiple indices on the same data, keyed with different parts of the records. For example, there could be two indices for the same list of students: One of the indices allows finding students by their student ID number, and the other allows finding them based on their last name. In this work, we will not consider finding multiple records at the same time. The algorithms given in pseudo-code will not directly support range queries. In case there is multiple matching records for the same key, the algorithms will only return one of the matching records. For most of the algorithms given here, it is however simple to extend them for range queries, or returning all of the records matching a key. We also will not consider set queries, where all records matching a set of keys are returned from one search operation. There is some potential for follow-up work in this area — most of the index search algorithms discussed 2 in this work are not explicitly concerned with that case. However, there is potential for performing better than just sequentially probing the index for all of the keys in the set. Current commercial database systems already know when to switch from index probing to a full table scan. There might be some potential for performing better than both of those when explicitly considering this case in index structures. The algorithms given in pseudo-code in this work will return one specific value in case there is a match for the specified key, or the special value of nil in case there was no match. One can think of the value as being either some concrete part of a record (such as the definition of a word), the full record itself, or some kind of identifier that can be used for reading the full record from somewhere else. In either case, it does not change the semantics of the algorithms. Motivation - Search algorithms Figure 1.1 illustrates one possible classification of search algorithms: inear search • Linear search just linearly searches through an array of key-value data, – Linear complexity stopping at the first match. It works on any key-value data without ! " – Useful for small datasets any kind of build-time preparation. Its run time is in the order of O n Motivation - Search algorithms where n is the size of the key-value data. Hash-based search h(x) – Constant (best) complexity • Linear search searchat build time uses a hashing function to distribute • Hash-based – Additional space requirements – Linear complexity Motivation - Searchnalgorithms tuples of the key-value data into k buckets. The hashing function – Bad performance for the range/nearest-key – Useful for smallqueries datasets should yield an uniform distribution even for non-uniformly distributed • Hash-based search search rree-based search h(x) key data. At search time it only needs to check the key-data in the – Constant (best) complexity complexity – Search Logarithmic complexity -ear algorithms – Additional space requirements bucket belonging to the search key. Its asymptotic run time is in the eful for small datasets – Good update properties – Bad performance for range/nearest-key queries based search • Tree-based search h(x) Sort-based search nstant (best) complexity – Logarithmic complexity ditional space requirements – Logarithmic complexity – Good update properties d performance for range/nearest-key queries – No additional space requirements Linear Search Hash-based Search Sort-based Search Tree-based Search • Sort-based search based search – Cache-conscious range scans 1.1: Classes of search algorithms [SGL09] –Figure Logarithmic complexity garithmic complexity /28/2009 od update properties nts based search /nearest-key queries garithmic complexity additional space requirements che-conscious range scans ments ns h(x) – No additional space k-Ary Search on Modern Processors requirements – Cache-conscious range 3 scans 6/28/2009 k-Ary Search on Modern Processors k-Ary Search on Modern Processors Slide 3 Slide 3 Slide 3 ! " ! " order of O n/k . For a large enough k this can result in O 1 . • Sort-based search at build time sorts the array of n key-value pairs by ! " key, saving time at search. Asymptotic run time is O log n . • Tree-based search creates an index tree out of the n key-value pairs at build time. At run time, it traverses that tree to find the specified key. ! " Asymptotic run time is in the order of O log n . All of these approaches have two operations in common: Index build-up1 , and search operations. This work is mainly concerned with sort-based and tree-based search algorithms. There is potential for optimizing hash-based search for modern CPUs [Ros07]. We will assume that index modification will be done through a full rebuild of the index, due to focusing on read-intensive workloads, such as the ones commonly seen in online analytical processing. There is some potential for optimizing this. We will briefly talk about it later. 1.2 Overview of Modern Hardware Architecture “Reading from L1 cache is like grabbing a piece of paper from your desk (3 seconds), L2 cache is picking up a book from a nearby shelf (14 seconds), main system memory is taking a 4-minute walk down the hall to buy a Twix bar, and waiting for a hard drive seek is like leaving the building to roam the earth for one year and three months.” — Gustavo Duarte [Dua08] CPU speed has increased at a much faster pace than main memory speed. To avoid CPUs spending most of their time idly waiting for data to arrive 1 Which is an empty operation for linear search. 4 from main memory, CPU vendors have added significant amounts of very fast cache organized into multiple layers [Int10]. Whenever a CPU instruction needs to fetch data from main memory, it first checks the caches to see if a copy of the data has already been stored here. If that is the case, it can load the data from the cache, which is much faster than needing to go through main memory. Otherwise the data is fetched from main memory, and a copy of the data is kept in the cache, potentially evicting other data that was already in the cache. The primary cache resources of a typical modern CPU are displayed in Figure 1.2. It can be seen that fetching data from the Level 1 and Level 2 caches carries a much lower latency than needing to read data from main memory. Level 1 Cache is split into separate data and code parts: The only way of getting things into the instruction cache is through executing code. Requests missing the Level 1 caches go to Level 2 Cache, which is unified: Size: 128 Bytes Small Registers Level 1 Code Cache Size: 32 KB + 32 KB Fast Level 1 Data Cache Big Main Memory Latency: 0 Cycles Latency: 3 Cycles Level 2 Unified Cache Size: 6 MB Size: 16 GB CPU Latency: 15 Cycles Slow Latency: ~200 Cycles Figure 1.2: The cache hierarchy of modern CPUs: Storage at the top is faster, but smaller. Storage at the bottom is slower, but larger. 5 There is no separation of data and instructions in Level 2 Cache. In addition to the primary cache resources that are directly used to store copies of data and code, modern CPUs also include a translation lookaside buffer: Every memory access must go through a virtual-to-physical address translation, which is in the critical path of program execution. To improve translation speed, a translation look aside buffer (TLB) is used to cache translation of most frequently accessed pages. If the translation is not found in the TLB, processor pipeline stalls until the TLB miss is served [KCS+ 10]. TLB misses carry the same penalty that uncached reads from main memory would carry. This means, that for a single read of data from main memory we can potentially trigger two cache misses and read requests needing to be served by main memory: One request for fetching the physical page address, and one request for fetching the actual data. Current hardware offers support for prefetching data. The automatic prefetching done by hardware is not effective for irregular memory accesses like tree traversal, because the hardware can not predict complex access patterns. Software prefetching instructions are hard to insert for tree traversal, tree nodes far down from the current node can create a large fan out and prefetching all tree elements down wastes memory bandwidth significantly since only one of prefetches will be useful [KCS+ 10]. If data structures are too big to fit in caches, we should ensure that a cache line brought from the memory is fully utilized before being evicted out of caches [KCS+ 10]. Current hardware also offers SIMD instruction support, allowing us to use one instruction for executing the same task on multiple data elements in a single clock cycle. If it were not for SIMD, we would have to use one instruction per data element. Effectively we can save clock cycles by doing more in one cycle. 6 1.3 Motivation of this Work Searching is the most time-consuming part of many programs, and using a good search method instead of a bad one often leads to a substantial increase in speed [Knu98]. One of the most critical database primitives is tree-structured index search, which is used for a wide range of applications where low latency and high throughput matter, such as data mining, financial analysis, scientific workloads and more [KCS+ 10]. Since searching is the most time-consuming part of many programs [Knu98], much time has been invested into finding good algorithms for it. The earliest search algorithm — binary search — was first mentioned by John Mauchly more than six decades ago, 25 years before the advent of relational databases [Mau46, Cod70, Knu98]. When only considering the number of comparisons needed to find a key inside an index, binary search on a sorted array is the optimal search algorithm. However, it is not true that all key comparisons come at the same cost — some comparisons are more expensive than others because of the effects of cache misses and seeks. Binary search is not optimal in reality. Databases have traditionally wanted to avoid random access to disk at all cost due to the high seek latency of platter-based hard disk drives which vastly overshadows the computational cost of key comparison [BM72]. Index structures like B+ -trees reduce the number of expensive seeks required to find a key inside the index [Com79]. In recent years, as main memory continued to get much bigger and cheaper [McC09], the size of main memory available to databases has kept increasing. For most workloads, it has become possible to simply keep all data in main memory [MKB09, HAMS08, SMA+ 07]. Hard disk latencies have become much less important. However, it is still not the case that all key comparisons needed for index search come at the same cost [Kam10]. If there is a cache miss for a key 7 Size: 128 Bytes Size: 32 KB + 32 KB CPU Registers Level 1 Code Cache Level 1 Data Cache Size: 6 MB Level 2 Unified Cache Size: 16 GB Main Memory Latency: 0 Cycles Latency: 3 Cycles Latency: 15 Cycles Latency: ~200 Cycles Figure 1.3: Utilization of CPU caches in traditional index search approaches. Blue parts are utilized by index search, gray parts are not utilized by index search. Instruction cache remains underutilized. comparison, it can take up to ∼70× the amount of time a key comparison without a cache miss would need. To avoid waiting for slow main memory, databases should well utilize these cache resource [MKB09]. Cache optimization in a main memory databases is similar to main memory optimization in disk-based ones [RR99]. Prior research has focused mainly on how best to optimize the data layout of index structures for the data cache [KCS+ 10, RR00, RR99]. However, modern CPUs split the Level 1 cache into data cache (which is well-utilized by existing approaches) and instruction cache (which is not, see Figure 1.3). 8 1.4 Related Work In the following we are going to briefly outline the most important pieces of work related to the ideas behind NitroGen, and index structures and algorithms. 1.4.1 Performance surveys Ailamaki et al. [ADHW99] show that the optimizations found in contemporary commercial database systems did not help with taking advantage of advancements in modern CPU architecture. They report that commercial database systems spend as much as half of their execution time in stalls, not actively making use of CPU resources. Interestingly, memory stalls occur two times more frequently when using index search instead of a sequential scan in query evaluation for finding records satisfying query predicates. Unsurprisingly, a performance evaluation done eight years later by Stonebraker et al. shows that commercial database systems still employ diskoptimized techniques for a main memory market and can be beat by up to two orders of magnitude by specialized main memory systems even in the last of their remaining application areas [SMA+ 07]. Manegold et al. note that a promising way of overcoming these limitations and cross the chasms between L1/L2 cache and RAM as well as utilize the processing speeds of multi-core systems is by improving the design of algorithms and data structures involved in database systems [MKB09]. 1.4.2 Traditional index structures The fundamental index structure used in database systems are B-trees. Btrees were originally designed as an improvement over binary tree search with the goal of avoiding slow random hard disk access as much as possible [BM72]. 9 It achieves that goal by grouping multiple nodes of a binary search tree into bigger nodes. Whereas binary tree search executes just one comparison per tree node, B-trees can do multiple comparisons before moving onto the next node and imposing the cost of another hard disk seek. The same basic approach can be used for reducing the number of cache line misses in main memory. B+ -trees [Com79] increase the efficiency of B-trees by only storing key and node pointers (no value data) inside the internal nodes. This effectively lets them store more keys per node with the same node size. Leaf nodes are linked into a list to efficiently support range scans. 1.4.3 CPU-optimized index structures Cache sensitive search trees [RR99] are similar to B+ -trees without internal node pointers. Instead, all nodes are stored in one single contiguous block of memory. In node traversal the location of the next node inside this block of memory is obtained by index arithmetic. This increases efficiency, allowing more keys to be stored per node with the same node size. Node size is tuned to match the size of a cache line, drastically reducing the number of L1/L2 cache misses. Due to all the nodes being stored in one contiguous block of memory, insertion is a costly operation. CSS-trees are best suited for read-intensive work loads such as those of decision support systems. CSB+ -trees [RR00] are a compromise between the read performance of CSS-trees and the insertion performance of unmodified B+ -trees. By storing all children of a node of the search tree together in one contiguous block of memory, only one node pointer needs to be stored per internal node. While this does not achieve exactly the same level of efficiency as CSS-trees, CSB+ -trees are much easier to update than CSS-trees and still much more efficient in exploiting the cache of modern CPUs than unmodified B+ -trees. Hankins and Patel [HP03] report that by tuning the node size of a CSB+ 10 tree to be significantly bigger than cache line size they are able to reduce the number of instructions executed, TLB misses and branch mispredictions. They report that the run time effects of this overshadow the additional cache misses introduced by the bigger node size, obtaining performance of up to 1.21× the performance of CSB+ -trees with cache line sized nodes. We have not been able to observe a similar effect when increasing the node size of CSS-trees on present hardware architecture. This is consistent with the findings by Büttcher and Clarke [BC07]. In 1999 Intel extended the instruction set of their Pentium III processors by adding single-instruction multiple-data operations under the name of SSE. In the context of index search problems, CPUs with 128-bit registers can essentially compare four 32-bit integers in the same amount of time it would take to do a single comparison. Zhou and Ross [ZR02] propose taking advantage of this: Instead of only comparing the search key against a single separator element, they utilize SIMD to compare the search key against the separator and its neighbors. Schlegel et al. [SGL09] improve upon this: Instead of picking only one separator and splitting data into two partitions, they propose picking k − 1 unconnected partitioning elements and splitting the elements into k partitions. Due to SIMD not supporting unconnected load operations, they reorder the key array to match the order of a linearized k-ary search tree. Fast architecture sensitive tree search [KCS+ 10] combines together the ideas of CSS search trees [RR99] and k-ary SIMD search [SGL09]. By employing a hierarchical blocking where the data is first blocked into groups matching SIMD register width, secondly blocked into groups matching cache line size, and lastly, blocked into groups matching page size Kim et al. can utilize the speed-up of SIMD, reduce data cache misses with cache line blocking, and reduce TLB misses with page blocking which is a novelty. They 11 also optimize their tree search algorithm for GPUs and employ compression and query pipelining to further increase throughput. 1.4.4 Compilation in Database Systems Previous research by Rao et al. has used run-time compilation in database systems to reduce the overhead of passing data between the operators of a query plan [RPML06] which is similar to context threading for efficiently interpreting dynamic programming languages [BVZB05]. Earlier research proposed the use of buffer operators for reducing branch misses and thus avoid some of the overhead of passing data between operators [ZR04]. 1.5 Description of Remaining Chapters Chapter 2 is concerned with the most basic search techniques used in database systems. They were developed at a time when all main memory available to a database system had the size of cache resources available in today’s CPUs. Consequently, those techniques are not optimized for modern hardware. Chapter 3 then deals with search techniques which were specifically optimized for modern CPU architecture, such as CSS-Trees, CSB+ -Trees, k-ary Search, and FAST-Tree search. Our contribution, NitroGen, will be covered in Chapter 4. It encompasses a detailed description of the idea of index compilation, the current status of its implementation, and future work. Chapter 5 covers the experimental evaluation of existing indexing approaches, and our new technique of using code generation to speed up index search. Finally, Chapter 6 concludes this work by summarizing its most important results, as well as briefly describing problems left unresolved. 12 Chapter 2 Traditional Index Structures and Search Algorithms “We are concerned with the process of collecting information in a computer’s memory, in such a way that the information can subsequently be recovered as quickly as possible.” — Donald Knuth [Knu98] All index structures are founded on one very simple idea: When a lot of time is spent searching inside the same large set of information, then it makes a lot of sense to invest a little time upfront, and organize the information in a suitable way, such that less time needs to be spent searching later on. The goal is to organize data for fast retrieval of individual pieces of information. Less time spent searching allows us to have faster database systems. This chapter is concerned with the most basic search techniques used in database systems. They were developed at a time when all main memory available to a database system had the size of cache resources available in today’s CPUs. Consequently, these search techniques are not optimized for modern hardware. Yet, one of them is used as a part of all the more modern 13 techniques we will focus on in Chapter 3, and the other one already uses principles very similar to those of the more modern techniques1 . In the following, I will first briefly outline why binary search on a sorted array performs sub-optimally for searching large main memory databases on modern hardware by not optimally utilizing modern hardware resources. I will then give a quick overview of B-trees and B+ -trees, which were designed to work well with large disk-based databases. I will show that they perform better than binary search on modern hardware, but still fail to optimally utilize the resources of modern hardware. 2.1 What’s wrong with Binary Search? Binary search operates on a linear array of sorted data, shrinking the search area by around half of the remaining keys on each search step [Mau46]. Figure 2.1 shows a sample run of binary search. When only considering the number of comparisons needed to find a key inside an index, binary search on a sorted array is the optimal search algorithm, provably requiring the minimal possible number of comparisons. Algorithm 2.1 shows one possible implementation of binary search. However, in order to compare the search key against an index key, we first need to fetch that index key into a CPU register. Traditionally, this fetching meant waiting for a very slow hard disk. Recently, it has become possible to keep an increasingly larger amount of data in main memory. While it is not as slow as waiting for disks, a read from main memory is still much slower than accessing data already present in a CPU register or already available in CPU cache due to previous memory reads. 1 The first one is binary search and the other one is B+ -tree search. 14 Modern CPUs fetch data from main memory in units of cache lines [Int10]. Reading multiple elements of data from the same cache line is much faster than reading the equivalent amount of data spread over many cache lines: The first read of data from a cache line will fetch that data to the cache if it is not already there. Subsequent reads will be able to directly read the data from cache instead of needing to go to main memory, when the temporal distance of all the reads is sufficiently low. Because of the large distance between search keys compared in step n of binary search and keys compared in step n + 1 of binary search, one full cache line is read in step n, but only one of its keys is accessed. In step n + 1 another full cache line is read, but again only one of its keys is accessed. Figure 2.2 shows that even for the simple sample run from Figure 2.1 where only four key comparisons are made in total, there are three cache Using binary search to search for key 12 2 3 6 B C D 2 3 6 B C D 12 14 17 19 21 22 27 28 29 30 40 47 48 52 Step 1 12 ≤ 22 J R O Y E P W Q H L A T S G 12 14 17 19 21 22 Step 2 12 ≤ 14 2 3 6 B C D J R O Y E P 12 14 Step 3 12 > 6 J R 12 14 Step 4 12 = 12 J R Legend 12 2 B 22 J key value pivot key Result Figure 2.1: Binary search decreases search area by 50% after each comparison until no keys remain to be compared or a matching value is found. 15 misses for a cache size of four key-value pairs. Cache misses mean that we have to read data from main memory. Fetching data from main memory into registers takes much more time than the comparison of two integer numbers. The memory loads dominate actual comparison costs. While the number of comparisons performed by binary search is optimal, the total computational time needed is clearly suboptimal when considering the effects of cache behavior in modern CPUs. Binary search does not map well to cache architecture of modern CPUs. Throughput could be much higher if subsequent reads of keys had some cache locality. This is very similar to why pure binary search is not traditionally used when reading data from disk. The same ideas used to improve disk locality can be used to improve cache locality in main memory databases. 2 3 6 12 14 17 19 21 22 27 28 29 30 40 47 48 B C D J R P L 2 3 6 12 14 17 19 21 22 27 28 29 B C D J R P Step 1 O Y E W Q H A T S Step 2 O Y E W Q H Legend 2 3 6 12 B C D J 14 17 19 21 Step 3 R O Y E 2 3 6 12 B C D J cache miss data in cache or cache hit cache line 2 3 6 12 B C D J 14 17 19 21 Step 4 R O Y E 2 B 22 key value pivot key Figure 2.2: Cache behavior for a sample run of binary search: Three out of four key references cause slow cache misses. 16 input: Key to search for key input: Number of data items n input: Array of keys keys, array of values vals, both of size n low ← 0; high ← n − 1; mid ← midKey ← nil; while low < high do mid ← (low + high)/2; midKey ← keys[mid]; if key > midKey then low ← mid + 1; else high ← mid; end end if midKey = key then return vals[mid]; else return nil ; end Algorithm 2.1: An iterative implementation of binary search. 2.2 B-trees and B+ -trees Instead of only fetching and comparing a single index key per search step like in binary search, B-tree2 search compares and fetches blocks of multiple index keys3 per search step with the motivation of reducing hard disk seeks. The idea of grouping multiple items into nodes was originally used to reduce the number of hard disk seeks per index lookup in traditional database systems [BM72]. It can, however, be used in main memory databases to reduce the number of page misses for an index lookup as well. B+ -trees [Com79] are an improvement over B-trees in that they do not 2 The etymology of the name seems to be unknown: B-trees were developed by Bayer et al. at Boeing. They are balanced, broader than binary trees, and bushy. 3 Bayer et al. call these blocks “pages” in their paper on B-trees [BM72]. 17 store value data in leaf nodes, allowing better storage utilization and higher node fanout. Additionally, B+ -trees arrange leaf nodes as a linked list in order to allow fast handling of range queries. Algorithm 2.2 shows a sample implementation of the B+ -tree search algorithm. That algorithm refers to a binary search on key ranges: The idea behind this is to perform a binary search on the keys of the node using the ≤ operator to compare keys, instead of using the = operator: If key ≤ node.keys[0], we branch to the first child node. If node.keys[0] ≤ key ≤ node.keys[1], we branch to the second child node etc. If the key is larger than the last of the node keys, we branch to the last child node4 . In addition to storing keys in internal nodes, B+ -trees also need to store one pointer per child node. This was not necessary in binary search due to using one contiguous array of main memory: The index of the next key 4 This is a common operation in search trees, but it appears that it does not have a proper name so far. input: Key to search for key input: Root node of tree root node ← root; while node is not a leaf node do childIdx ← perform binary search on key ranges for key in keys of node; node ← node.children[childIdx]; end keyIdx ← perform binary search for key in keys of node; if keyIdx ̸= nil then return node.values[keyIdx]; else return nil ; end Algorithm 2.2: An implementation of the B+ -tree search algorithm. 18 to compare could simply be computed from the index of the previously compared key. Figure 2.3 shows the logical and physical layouts of B+ -trees and B-trees. Here each page node has three levels of binary nodes, resulting in seven keys and eight child page node pointers per page node. Storing one pointer per child node imposes significant space overhead in B+ -trees: Assuming 32-bit-width integer keys and 32-bit-width pointers, more than 50% of storage space is wasted for storing internal pointer data. As a consequence, more than 50% of cache space is not used for caching actual data. (a) 100 50 25 ptra (b) ptra 75 ptrc ptrb 25 150 Node 1 ptrb + B -trees: 50 ptrc 75 125 ptrd ptre 175 ptrf ptrg ptrh ptrd 100 ptre 125 ptrf 150 ptrg 175 ptrh 7 keys + 8 pointers = 15 items of data overhead = 8 / 15 = 53% (c) ptra 25 B-trees: B ptrb 50 C ptrc 75 D ptrd 100 J ptre 125 R ptrf 150 O ptrg 175 7 keys + 7 values + 8 pointers = 22 items of data overhead = 15 / 22 = 68% Figure 2.3: Logical and physical layout of B- and B+ -trees. (a) Logical layout: Binary nodes are grouped into pages (red triangles). (b) Physical layout of B+ -tree Node 1: More than 50% of space is wasted. (c) Physical layout of B-tree Node 1: More than 66% of space is wasted. 19 Y ptrh 20 Chapter 3 CPU-optimized Index Structures and Search Algorithms “Would you believe me if I claimed that an algorithm that has been on the books as “optimal” for 46 years, which has been analyzed in excruciating detail by geniuses like Knuth and taught in all computer science courses in the world, can be optimized to run 10 times faster?” — Poul-Henning Kamp [Kam10] Taking into account the concrete properties and functionality of hardware in algorithm design leads to better performance of algorithms. Traditional search algorithms have not taken into account things such as the vast difference in speed between CPUs and main memory, which can be narrowed by good use of CPU cache resources, or the advent of SIMD technology, which allows us to perform an operation on multiple data items in the same time it would take to complete the operation for one single data item. This chapter is concerned with search techniques that take into account the properties and functionality of modern hardware. In the following, 21 we briefly outline how CSS-tree search [RR99] is similar to B+ -tree search [Com79], but with the benefit of making more efficient use of CPU caches. This comes at the cost of less flexibility in the structure of the trees, making incremental updates impossible, and requiring a full rebuild of the index structure on most changes. They are, however, still a good match for OLAP workloads. Subsequently we will show how CSB+ -trees [RR00] overcome that limitation while still making much better use of CPU caches than B+ -trees could. They are more suitable than CSS-trees [RR99] for update-heavy workloads, such as the ones that seen in OLTP environments. Next we will show how k-ary search [SGL09] elegantly makes use of SIMD instructions to speed up search in a sorted array, cutting in half the number of steps required for finding a key when compared to binary search when specialized for modern CPUs. However, as non-consecutive fetching of data from memory to SIMD registers is fairly expensive1 , we will see that it makes more sense to reorganize the underlying key array into a linearized tree that closely resembles the consecutive node storage already seen in CSS-tree search [RR99]. We will then show that it is desirable to have the benefits of CSS-tree search and k-ary search both at the same time to obtain optimal utilization of cache- and SIMD-resources. We will then see how fast architecture sensitive tree search [KCS+ 10] achieves both goals at the same time, while also adding optimal utilization of translation-lookaside buffers to further reduce the cost of memory reads in the average case. 1 Not possible in current CPU generations without doing one separate read per data item plus costs for recombination of the data items. 22 3.1 CSS-Trees Cache sensitive search trees (CSS-trees, [RR99]) are an implicit data structure form of B+ -trees [Com79]: The parent-child hierarchy of the tree structure is mapped to a linearized array. Figure 3.1 shows the structure of an example CSS-tree. Dashed lines represent references to children that need not be physically stored as pointers. The index of the next child node to process can be calculated from the index of the current node. By encoding all the tree structure in one contiguous array, pointers to children no longer need to be stored. We can still think of the tree as being composed of nodes, they have just been linearized into a sequential array of nodes. The size of the nodes should be optimized for two factors: a) matching the size of cache line as closely as possible to drive down cache accessing costs, and b) decreasing computational overhead costs in node processing. By not having to store any child pointers, the amount of necessary storage (a) 100 50 25 (b) 25 50 75 150 Node 1 75 125 175 100 125 150 175 CSS-trees: 7 keys, no overhead Figure 3.1: Logical and physical layout of CSS-trees. (a) Logical layout: Binary nodes are grouped into nodes (red triangles). References to child nodes are virtual: No pointer is stored. (b) Physical layout of CSS-tree Node 1: Only the keys are stored. 23 shrinks to 50% of the storage needed by B+ -trees for storing the same amount of data2 . The benefit of this is a better utilization of storage space, and much more importantly, better utilization of cache space. This leads to fewer cache misses and faster index lookups. Index search in CSS-trees works much the same as in B+ -trees: The main difference is using node index calculation instead of pointers to traverse the tree. Algorithm 3.1 shows the resulting algorithm. However, due to the removal of pointers and storing everything in one consecutive array of data, CSS-tree structure is more ‘rigid’: CSS-trees cannot grow dynamically. Insert, delete, and update operations are handled is by means of a full rebuild of the tree. For usage in online analytical processing where write operations are processed overnight in batches this is viable. But it does mean that special care needs to be exercised when using CSS-trees in write-heavy online transactional processing. Possible improvements are using techniques like differential indexing to batch together updates [SL76]. 2 Assuming 32-bit integer keys and 32-bit child pointers. input: Key to search for key input: Array of node data nodes input: Maximum number of node children f anout nodeIdx ← 0; while nodeIdx does not refer to a leaf node do childIdx ← perform binary range search for key in keys of node nodes[nodeIdx]; nodeIdx ← nodeIdx ∗ f anout + childIdx + 1; end keyIdx ← perform binary search for key in keys of node nodes[nodeIdx]; if keyIdx ̸= nil then return nodes[nodeIdx].values[keyIdx]; else return nil ; end Algorithm 3.1: An implementation of the CSS-tree search algorithm. 24 CSB+ -Trees 3.2 Another way to overcome the inflexibility of CSS-trees is by changing the structure to a hybrid scheme: Cache-sensitive B+ -trees (CSB+ -trees, [RR00]) are an interesting compromise between CSS-trees and B+ -trees. Figure 3.2 shows the structure of CSB+ -trees, which is similar to the structure of CSS- and B+ -trees. Solid lines between nodes visualize physical pointers that need to be stored as part of the physical layout. Dashed lines between nodes visualize virtual references to child nodes: The exact address of a child node needs to be calculated based on the index of the child and the pointer to the first child node. By storing all children of a node together in one contiguous memory area, (a) 100 50 25 150 Node 1 75 125 175 ptra (b) ptra 25 50 75 100 125 150 175 + CSB -trees: 7 keys + 1 pointer = 8 items of data overhead = 1 / 8 = 12.5% Figure 3.2: Logical and physical layout of CSB+ -trees. (a) Logical layout: Binary nodes are grouped into nodes (red triangles). References to all but the first child nodes are virtual: No pointer is stored. (b) Physical layout of Node 1: Only one pointer is stored per node. 25 input: Key to search for key input: Root node of tree root node ← root; while node is not a leaf node do childIdx ← perform binary range search for key in keys of node; node ← ∗(node.firstChild + childIdx ∗ childSize)3 ; end keyIdx ← perform binary search for key in keys of node; if keyIdx ̸= nil then return node.values[keyIdx]; else return nil ; end Algorithm 3.2: Implementation of the CSB+ -tree search algorithm. they only need to store one pointer for all children. At the same time it is still possible for parts of the tree to grow in size without needing to perform a full rebuild of the CSB+ -tree. This means that CSB+ -trees can support incremental updates in a fashion similar to B+ -trees, but with much lower space and cache utilization overhead than B+ -trees, making them a good match for update-frequent workloads, for example in OLTP. In particular, they are a better match than CSS-trees for those workloads. Algorithm 3.2 shows the implementation of CSB+ -tree search. Apart from the arithmetic needed to calculate the address of child nodes, it is identical with B+ -tree search. 3 Note: If this is implemented in C and node.firstChild is appropriately typed then adding n to that automatically advances n full child items – the multiplication by childSize would need to be removed. It is just used in the algorithm pseudo-code because it is not C. 26 3.3 k-ary Search Binary search does only one comparison at a time to split the search domain into two partitions. This is optimal from an asymptotic point of view. Modern CPUs provide support for SIMD instructions. These allow us to execute multiple parallel operations with one CPU instruction. Currently, they allow us to do four 32-bit integer comparisons in one cycle [Int10]. However, binary search only performs one comparison per cycle. It only utilizes one of four comparisons that the CPU could be doing in one cycle, throwing away computational power by not utilizing it. The idea behind k-ary search [SGL09] is simple: Instead of performing only one comparison and obtaining two partitions, it performs k comparisons and obtains k + 1 partitions. For current CPU generations the optimal value for k is 4. Figure 3.3 shows a sample run of k-ary search on the same sorted data that binary search was run on in Figure 2.1 on page 15. Binary search needs four steps to completion; k-ary search needs only two. But there is a big issue with directly running k-ary search on a sorted array: SIMD instructions require all of the data to be present contiguously in one SIMD register. While it is possible to load data that is not contiguous in main memory into a SIMD register, this is very inefficient. It is much faster when all four 32-bit integer numbers, which we want to compare against the Using k-ary search on a sorted array to search for key 12 with k = 4 2 3 6 B C D 12 14 17 19 21 22 27 28 29 30 40 47 48 52 J Step 1 12 ≤ 12 2 3 6 12 B C D J Step 2 R O Y E P W Q H L A T S G 12 = 12 Legend 12 2 B 22 J key value pivot key Result Figure 3.3: k-ary search with k = 4 decreases search area by 75% after each step until no keys remain to be compared or a matching value is found. 27 search key in one step, are kept contiguously in memory. This is easy to achieve when we reorganize the elements of the key array before running the algorithm. Figure 3.4 shows a run of k-ary search with a reorganized array. Interestingly, the array we obtain by this reorganization is very similar to the linearized tree representation of CSS search: In fact both have the very same underlying structure; the only difference is in the size of nodes. Let us briefly summarize existing approaches before moving on: k-ary search performs better than binary search. Binary search just reads and compares one key per step. k-ary search on a linearized tree representation reads and compares k consecutive keys per step. k-ary search shares one of binary search’s problems: What happens when k is smaller than the number of keys that could fit into one cache line?4 The CPU will fetch a full cache line, but we will only look at a part of it before requesting the next cache line and only using part of it again. CSS search reorganizes key data into blocks of cache-line-sized nodes. k-ary search reorganizes key data into blocks of SIMD-register-sized nodes. On current hardware, cache line size is four times that of SIMD registers. With these approaches we can either have cache-optimal or SIMD-optimal behavior, but not both. Is there a way of unifying them, obtaining cacheand SIMD-optimal behavior at the same time? 4 This is already the case for modern CPUs. Current CPUs use cache line sizes of 128 bytes. k-ary search with k = 4 and 32-bit integer keys would only read 32 bytes at a time, wasting 75% of the data in a cache line. Using k-ary search on a linearized tree to search for key 12 with k = 4 12 19 28 40 2 3 6 B C D 12 14 17 19 21 22 27 28 29 30 40 47 48 52 J Step 1 12 ≤ 12 J Y Q A 2 3 6 12 B C D J Step 2 R O Y E P W Q H L A T S G 12 = 12 Legend 12 2 B 22 J key value pivot key Result Figure 3.4: Reorganizing the key array allows us to use contiguous SIMD register loads, which are much faster than manual scatter-gather loading. 28 3.4 Fast Architecture Sensitive Tree Search Fast architecture sensitive tree search (FAST, [KCS+ 10]) unifies the optimality properties of CSS-tree search and k-ary search. Just like those two approaches, it uses a binary tree and organizes it inside of a single contiguous array in such a way that the resulting node access sequence is closely optimized to features of modern hardware architecture. In contrast to those earlier approaches, however, it can actually optimize for multiple hardware architecture features at the same time. The ideas behind FAST are new: They have only recently been published in June at SIGMOD 2010, just three months before the publication of this thesis. Unfortunately, despite requests, the reference implementation is not available. All of the following information is from the paper and our own reimplementation of the ideas presented therein. In addition to optimizing data layout for SIMD register size and cache line size, FAST also optimizes data layout for page size. Virtual memory management on modern hardware works by using virtual addresses for every memory request. Virtual addresses are split into a page selector and an offset into that page. Before it can actually read the data for a memory request, the CPU needs to look up the physical start address of that page in memory. The mapping of a page selector to a physical page start address is done by lookup in the page table, which is also located in memory. In order to speed up the process of virtual address translation, CPUs have a so called translation lookaside buffer where the physical start addresses of most recently accessed pages are stored5 . The goal of page-, cache-line-, and SIMD-blocking in FAST is to keep memory requests inside the same memory page, cache line, and SIMD data for as long as possible. Page blocking allows FAST to make optimal use of the translation lookaside buffer, cache line blocking allows FAST to optimally utilize data cache resources, and SIMD blocking allows for using k-ary SIMD search with fast SIMD register loading from contiguous memory. The way this is achieved is by multi-level reordering of key data: Figure 3.5 shows the structure of nodes inside a single page node employed by FAST. 5 This was in fact the first cache that became part of CPUs. 29 100 50 150 Legend 1… 100 … … … …256 … … page node cache line node simd node key data … linearisation sequence Figure 3.5: Intra-page layout of FAST-trees with sketch of inter-page layout. Page nodes themselves form a tree and do have other page nodes as children, but these are only sketched at the bottom of Figure 3.5. All page nodes have the same structure as the one displayed. In the figure and the following explanation we decided to use the following parameters for the hierarchical blocking. These are not the optimal parameters from a run-time point of view — they are, however, the ones that make the principles underlying the hierarchical blocking easily comprehensible: • SIMD nodes are composed of two levels of binary search key nodes. Note that this results in only three keys per SIMD node, and only three comparisons at a time in k-ary SIMD search. Current CPU generations could actually perform four comparisons, however. SIMD nodes have a fanout of four SIMD child nodes. SIMD node size is 12 bytes6 . This is consistent with the parameters from Kim et al.7 • Cache line nodes are composed of two levels of SIMD nodes. This results in a total of five SIMD nodes per cache line node, of which two 6 Assuming 32-bit integer keys. Our reimplementation actually supports the general case of an arbitrary number of SIMD keys. If we let the underlying key nodes have a fanout of three, we obtain SIMD nodes with four keys and five SIMD child nodes. 7 30 … … … … are visited per search. There is a total of fifteen keys per cache line node. Cache line node size is 60 bytes6 . The typical cache line size of current CPUs is 64 bytes. Cache line nodes have a fanout of sixteen cache line child nodes. This is consistent with the parameters from the paper. • In this example, page nodes are composed of two levels of cache line nodes. This results in a total of 17 cache line nodes per page node, of which two are visited per search. There is a total of 85 SIMD nodes per page node, of which four are visited per search. This results in a total of 255 keys per page node, and a page node size of 1020 bytes6 . Page nodes have a fanout of 256 page child nodes. These values are not optimal, but make it easier to explain hierarchical blocking. The original paper uses page node depths of 10, or 19 binary search key nodes8 . A typical value for page size in current operating systems is 4096 bytes. A page node depth of 10 binary search key nodes would result in a total page node size of 4092 bytes. Keys are laid out from largest to smallest block units: • First, the data is split into page nodes. Page nodes are processed level by level, starting from the top of the tree to the bottom of the tree. • Inside each page node, data is split into cache line nodes. Cache line nodes inside of the current page node are again processed level by level, starting from the top of the page node’s subtree to the bottom of the page node’s subtree. • Finally, cache line nodes are split into SIMD nodes. SIMD nodes inside of the current cache line node are processed level by level, starting from the top of the cache line node’s subtree to the bottom of the subtree. The resulting processing order is also visualized by the faded, dashed arrow in Figure 3.5. In search the layout allows us to process data in block units, hierarchically proceeding from the largest to the smallest block unit: 8 The depth of 19 is only used when the operating system offers support for huge memory pages. This results in even less TLB misses. 31 1. At the beginning, we find a full page node at the start of the key array. We process this page node. (a) At the start of this page node, we find a full cache line node. We process this cache line node. i. At the start of this cache line node, we find a full SIMD node. We process this SIMD node. We use k-ary search to find the branch index of the SIMD node child of the current SIMD node that we should next process. ii. We process this SIMD node. We use k-ary search to find the index of the appropriate child branch. By combining together the two SIMD child branch indices from steps 1(a)i and 1(a)ii, we find the branch index of the cache line node child of the current cache line node that we should next process. (b) At the start of this cache line node, we find a full SIMD node... i. Process this SIMD node. Find the next SIMD node to process. ii. Process this SIMD node. Find the next SIMD child branch. By combining together the two SIMD child branch indices from steps 1(b)i and 1(b)ii, we find the next cache line branch index. By combining together the two cache line branch indices from steps 1a and 1b, we find the branch index of the page node children of the current page node that we should next process. We have just processed the first page node. 2. We can use the same approach to process the next page node, and the cache line nodes inside that page node, and the SIMD nodes inside that cache line nodes, and so on until we reach the end of the page node hierarchy. We can then combine together the page branch indices, to find the index of the leaf node potentially containing the search key. 3. Inside that leaf node, we can then use regular SIMD search to find the position of the search key, if it exists. 32 Chapter 4 The NitroGen Approach “In programming, we deal with two kinds of elements: Procedures and data. (Later we will discover that they are really not so distinct.)”1 — Abelson & Sussman [AS96] All of the CPU-optimized index structures we have seen so far have dealt with optimizing the layout of the involved index structures in such a way that the CPU’s caches are optimally utilized2 . In achieving that goal they have focused solely on the data caches and the translation-lookaside buffer of modern CPUs. However, all modern CPUs also come with fast instruction caches for caching an application’s code. Table 4.1 shows the size of the code responsible for performing the index search operations in implementations of select index structures and search algorithms. These numbers ignore code that is not part of the index search itself, such as the code for bulk-loading data into an index etc. These numbers have been obtained by analyzing the executables produced by GNU’s C compiler with the objdump tool for Linux and otool for Mac OS X. They take into account the concrete encoding of machine instructions. The executables 1 Or, more extremely: “Data is just dumb code, and code is just smart data.” k-ary index search has focused on the orthogonal goal of utilizing non-cache CPU resources. Binary search is not optimized for modern CPUs. 2 33 Algorithm Tuned for Size Binary Search Performance Code size 193 byte 128 byte Remaining Instruction Cache3 99.4% 99.6% CSS-tree Search Performance Code size 686 byte 348 byte 97.9% 98.9% FAST-tree Search Performance Code size 1503 byte 1503 byte4 95.4% 95.4% Table 4.1: Code size for index search implementations: The instruction cache of modern CPUs is largely under-utilized in index search. have been tuned with flags -Os for code size and -O3 for performance. As can be seen in Table 4.1 the size of the code used in index lookup operations tends to be much smaller than the available instruction cache size. Instruction cache remains largely under-utilized during index search. In all of the approaches discussed so far, instruction cache has been completely ignored. Nobody has thought of ways for optimizing index structures to take into account instruction cache. Instruction cache remains the only CPU cache resource that index structures have not been optimized for so far. However, there is no way of directly loading data from main memory into or through the instruction cache. It has been designed to be used for caching code. The only way of getting code into the instruction cache is through executing the code. So one question remains: Is there a way of utilizing the instruction cache for storing the actual data of our index structures when it has only been designed to be used for caching code? 3 Assuming an instruction cache size of 32 KB, which is the case for current generations of Intel CPUs. Current generations of AMD CPUs use 64 KB of instruction cache. 4 Telling GCC to tune this code for size actually results in bigger code than telling it to tune for speed, resulting in 2056 bytes of code. This is because the additional inlining it performs when tuning for speed allows it to throw away unused portions of code that it would otherwise have to keep around. 34 4.1 The Fundamental Idea of NitroGen The NitroGen framework aims to add utilization of instruction caches to the repertoire of existing index structures and algorithms. As it is only possible to store code in the instruction cache, and the only way of getting code there is by executing it, NitroGen achieves its goal by using code generation to transform data into code. It needs to create a copy of the functions used in index search and specialize those copies with the actual key data. By transforming the top of an index structure into code specialized with concrete data, the top of the index can then be stored in the CPU’s instruction cache. We can just execute the dynamically created code to search the top of the tree, and switch back to the generic non-specialized version of the algorithm to search through the remaining data. Figure 4.1 shows one sample application of NitroGen. To illustrate the concepts by example we use NitroGen to add instruction cache utilization to the simplest possible search algorithm: Linear search on unsorted arrays (a) (b) Index Compilation Traditional Approach Code Code fused with Data !"#$%&'()$*+,-.&/)*0&1 &&&&23$&+,-.&,&4&56&,&7&8,9)6&,::0&1 &&&&&&&&,2&+/)*&44&/)*8;,<0&1 &&&&&&&&&&&&$).($-&=#>()8;,<6 &&&&&&&&? &&&&? !"#$%&'()$*+,-.&/)*0&1 &&&&,2&+/)*&33&450&&$).($-&6768 &&&&,2&+/)*&33&9:0&&$).($-&6;68 &&&&,2&+/)*&33&<=0&&$).($-&6>68 &&&&,2&+/)*&33&5?0&&$).($-&6@68 &&&&,2&+/)*&33&:=0&&$).($-&6A68 &&&&$).($-&@ABB6 ? &&&&$).($-&BCDD8 E Data Keys 12 47 30 26 70 Values G A D J M Figure 4.1: Sample run of NitroGen for linear search. 35 of key and value data. Figure 4.1a shows the index search code and data for one sample instance of unmodified linear search. Figure 4.1b shows the result of using NitroGen to merge together the index search code with the concrete data for this sample instance of linear search. Just like CSS- and FAST-trees, NitroGen is heavily optimized for readintensive workloads, such as the ones commonly seen in OLAP environments. This is because every update triggers run-time code generation. Compared to OLTP index structures like B+ -trees, updates are more expensive. NitroGen however only converts the top n levels of the index tree into code. The top of an index tree changes less frequently than the lower levels, due to the way node splits propagate up the tree. Update costs can further be decreased by using JIT run-time code generation libraries to directly generate machine instructions instead of generating C code at run time and invoking a compiler. Due to usage of jmp instructions, it is also possible to split the generated code into pieces allocated in separate memory, and only update the affected pieces. This can further reduce the cost of update operations. In order to obtain the biggest possible performance gain from the available instruction cache, it is imperative to efficiently encode the data into code. The better the encoding, the more data can be fit into the instruction cache. 4.2 Current Status In the following, we briefly describe the current state of our implementation of NitroGen for different base index structures and algorithms. We will start with describing the implementation of NitroGen for binary search, which is reasonably simple. Our current prototype implementations do not yet employ run-time code generation. To ease initial development and experimental exploration, we decided to use a static upfront code generation scheme implemented in a high level programming language. This allowed us to quickly move through 36 iterations of the implementation process, experimenting with different ways of implementing the conceptual ideas. It requires all of the data to be available at compile time. Our prototype implementations are evaluated in Chapter 5. 4.2.1 NitroGen for Binary Search For binary search it turned out to be viable to make our prototype directly emit C code, and use GCC to generate the resulting machine code instructions. The prototype of the code generator could be implemented in only 270 lines of high level programming language code. Figure 4.2 shows the code resulting from using NitroGen to fuse a sample instance of binary search together with its data into code. The implementation of binary search that was used is based on Algorithm 2.1 described on page 17. The structure of the resulting code (Figure 4.2a) is very similar to that of the key-value data array (Figure 4.2b). Key Val (a) !"#$%&'(!)*+,-!",.*/0%12!"#$3*45$%1/066$7/)8$9 (b) $$$$!"#$0*.:)#;$$$$$$$$$$$$<6$=/">*$?@5$AB$CCCCCCCC$6< 0 G $$$$!D$23*4$EF$G8$9$$$$$$$$$$$$<6$=/">*$?@5$GB$CCCC$6< $$$$$$$$!D$23*4$EF$H8$9$$$$$$$$$$<6$=/">*$?@5$HB$CC$6< $$$$$$$$$$$$!D$2@$FF$3*48$9$0*.:)#$F$IJI;$>&#&$+&"*;$K $$$$$$$$$$$$!D$2H$FF$3*48$9$0*.:)#$F$ILI;$>&#&$+&"*;$K $$$$$$$$K$*).*$9$$$$$$$$$$$$$$$$$<6$=/">*$?M5$GB$CC$6< $$$$$$$$$$$$!D$2M$FF$3*48$9$0*.:)#$F$INI;$>&#&$+&"*;$K $$$$$$$$$$$$!D$2G$FF$3*48$9$0*.:)#$F$IOI;$>&#&$+&"*;$K $$$$$$$$K $$$K$*).*$9$$$$$$$$$$$$$$$$$$$$<6$=/">*$?P5$AB$CCCC$6< $$$$$$$$!D$23*4$EF$Q8$9$$$$$$$$$$<6$=/">*$?P5$QB$CC$6< $$$$$$$$$$$$!D$2P$FF$3*48$9$0*.:)#$F$IRI;$>&#&$+&"*;$K $$$$$$$$$$$$!D$2Q$FF$3*48$9$0*.:)#$F$ISI;$>&#&$+&"*;$K $$$$$$$$K$*).*$9$$$$$$$$$$$$$$$$$<6$=/">*$?T5$AB$CC$6< $$$$$$$$$$$$!D$2T$FF$3*48$9$0*.:)#$F$IUI;$>&#&$+&"*;$K $$$$$$$$$$$$!D$2A$FF$3*48$9$0*.:)#$F$IVI;$>&#&$+&"*;$K $$$$$$$$K $$$$K 1 A 2 D 3 F 4 C 5 H 6 E 7 B Legend $$$$0*#:0"$@; +&"*W $$$$67/)$F$0*.:)#; $$$$0*#:0"$H; K 2 B key value Figure 4.2: Sample run of NitroGen for binary search. 37 4.2.2 NitroGen for CSS-Tree Search Our initial prototype implementation for CSS-tree search also directly generated C code, and used GCC to generate the resulting machine code instructions. However, this soon turned out to be much too slow to carry out any serious experimental evaluation of the performance of the resulting code5 . So we replaced the prototype implementation emitting C code. Instead we decided to emit assembler code, and use the GNU assembler to turn that into machine code instructions. This allowed us to compile code that took GCC more than 20 hours to compile in less than half an hour. Figure 4.3 shows the code resulting from using NitroGen to fuse a sample instance of CSS-tree search together with its data into code. The underlying implementation of CSS-tree which was used here is based on 5 For reasonably sized input data sizes (e.g. 128 MB), GCC took more than 20 hours of time to compile the code. For slightly bigger inputs (but still < 1 GB), it was possible for GCC to run out of virtual memory while compiling, despite running on a machine with 10 GB of main memory, and despite turning off compiler optimizations with the -O0 flag. (a) !"#$%&' ? !"#$%&'($)* +,%$()* !"#$%&'($-. +,%$()+ !"#$%&'($*/0 +,%$(), !"#$%&'($*12 +,%$()+"#$(). ? ()*' !"#$%&'($1 +,%$()*)* !"#$%&'($*2 +,%$()*)+ !"#$%&'($*. +,%$()*), !"#$%&'($2+,%$()*)+"#$()*). ()+' !"#$%&'($)3 +,%$()+)* !"#$%&'($00 +,%$()+)+ !"#$%&'($41 +,%$()+), !"#$%&'($-) +,%$()+)+"#$()+). (),'/0 ()-'/0 ().'/0 ? ? ()*)*' "56$%7'($898 !"#$%&'($2 +,%$()*)*)123 "56$%7'($8:8 !"#$%&'($1 ()*)*)123' ;%<$ (b) ! 5 2 78 12 G 104 ! 152 ? ()*)+' "56$%7'($8@8 !"#$%&'($** +,%$()*)+)123 "56$%7'($8A8 !"#$%&'($*2 ()*)+)123' ;%< ()*),' "56$%7'($8=8 !"#$%&'($*0 +,%$()*),)123 "56$%7'($8>8 !"#$%&'($*. ()*),)123' ;%< ! 31 18 ! 27 " 39 5 A ! 11 44 D 65 12 73 0 " F 14 C 18 H Figure 4.3: Sample run of NitroGen for CSS-tree search. 38 Algorithm 3.1 described on page 24. The structure of the resulting code (Figure 4.3a) is very similar to that of the base CSS-tree (Figure 4.3b). To achieve good efficiency in encoding data to code, we use some interesting tricks. Figure 4.4 shows the preamble, which is called for each lookup of a key in the NitroGen indexcompiled CSS-tree. It then calls the generated SEARCH !"#$%&'()!"**!*(+,"-. !"#$%&'! ()*%&'!+%&#! ,%()*-%.-/%0&1"(-23%3)%-045 ,%6(!%&-1%7-80"93#%3)%-04%:;%9-##%'/3-# ()*%-04+%-7< ,%!-&8)&(%#-0&6$ 6099%/01234 ,%<8%.-/%2)3%8)"27+%&-3"&2%*09"-%=<99%'-%> ()*%-04+%> ,%8901%&-1<#3-&#%#3<99%#-3%8&)(%?@ABCD E2-%0567 ,%<8%.-/%8)"27+%&-3"&2%*09"-%=<99%'-%F ()*%-04+%F ,%027%2--7%3)%#3)&-%*09"-%<2%*09"-%!)<23-& ()*%G&#<H+%-64 0567. 9-0*&-3 code from Figure 4.3 which Figure 4.4: Preamble of NitroGen CSS-tree encodes the actual data. By search code: Careful setup allows for a more intricate setup of the pream- efficient encoding of the generated search code. ble, we can reduce the size of the generated search code. Let us examine some of the optimizations: 1. The preamble uses call to invoke the search code: This lets the SEARCH use ret (instead of jmp) in leaf nodes to end the search. A ret instruction can be encoded as 1 byte, a jmp needs 3 bytes if the target address is nearby. Otherwise it needs 5 bytes. In this case we would need to jump back to the very beginning of the preamble, which would not be nearby. We save four out of five bytes, or 80%. 2. The checks for whether the key was found or not, and the logic for handling those cases is entirely contained in the preamble. The search code in leaf nodes just keeps comparing keys until it reaches the end of the leaf node. In case it finds a key larger than or equal to the requested search key, it directly jumps to the end of the leaf node. 39 On every comparison (done with cmp) the CPU updates the so called flag register which contains the result of the last comparison. The contents of the flag register are set to the result of the last comparison when returning from the search code back to the preamble. At the end of the leaf node, the last comparison will have been against the first key ≥ the search key. The preamble can then use the flag register to check whether the last compared key is equal to the search key, and do the right thing. This allows us to save more than 20 bytes per leaf node, equivalent to around two key-value pairs. 3. By storing the search key in register eax we can use a more efficient encoding for the cmp instructions, saving 1 byte per comparison. 4. The search code unconditionally moves the value into a CPU register, without checking whether it actually belongs to the search key. Wrong values just get overridden later on. At the very end, the preamble can check whether the last written value corresponds to the search key by checking the CPU flag register. This allows us to save one conditional jump per pair of key-value data, which is equivalent to 4 bytes. Assuming a leaf node size of 64 key-value-pairs, this results in roughly 14 bytes to store one single key-value pair as code. Assuming an internal node size of 32 keys, this results in roughly 10 bytes to store one key as code. There is still potential for optimizing the encoding, for example by introducing k-ary SIMD comparison. 4.3 Future Work NitroGen shows potential for improving existing index structures and algorithms. We next intend to implement a variant of it for FAST-tree search, making use of k-ary SIMD comparison, and adding optimizations for the page size employed by the operating system. 40 Chapter 5 Experimental Evaluation This chapter is concerned with evaluating the performance of index structures and search algorithms on concrete modern hardware systems. We will have an in-depth look at the configuration of the hardware used to run the experiments, examine the parameter space of index search algorithms, pick a subset of index search algorithms to evaluate in detail, pick experiments to run, and present the results of running them, all in the hope of answering some basic questions on index search algorithms: • What are the optimal parameters of the index search approaches we discussed in Chapters 2 and 3? What is the difference between optimal parameters for different platforms? • How do these index search approaches perform when parametrized with those optimal parameters on concrete instances of modern hardware? • Is it possible to improve these base approaches with index compilation? • How do we pick the parameters of index compilation? • What can be gained by applying index compilation to these base approaches? • What is the effect of the node size on index search approaches? • What is the effect of key skew on index response times? 41 5.1 Experimental Setup For our evaluation of index search algorithms, we used two differently configured hardware systems, whose most important properties are described in Table 5.1. System A is a Intel Xeon system utilizing the Xeon E5430 CPU, which was released at the end of 2007. System B is an AMD Opteron system with an Opteron 2378, released at the end of 2008. Both are running SUSE Linux with recent versions of the Linux kernel and GCC. System A has a slightly larger amount of main memory than System B (10 GB vs. 8 GB). System A has a slightly higher CPU clock than A (2.6 GHz vs. 2.4 GHz). It also has a larger amount of second and third level CPU cache (12 MB vs. 8 MB). In contrast, System B has more Level 1 cache than System A (128 KB vs. 64 KB in total). Both use the same cache line and SIMD register sizes. There is a large space of algorithms and parameters in index search. Property System A System B CPU Vendor & Model: Intel Xeon E5430 AMD Opteron 2378 CPU Architecture: Harpertown (45 nm) Shanghai (45 nm) CPU Release Date: November 11, 2007 November 13, 2008 CPU Frequency: 2.6 GHz 2.4 GHz CPU Cores: 4 cores 4 cores Main Memory: 10 GB 8 GB L1 Data Cache: 32 KB 64 KB L1 Instruction Cache: 32 KB 64 KB L2 Unified Cache: 12 MB 2 MB L3 Unified Cache: None 6 MB Cache Line Size: 64 byte 64 byte TLB Size: 512 4 KB pages 1024 4 KB pages SIMD Register Size: 128 bytes per register 128 bytes per register Operating System: SUSE Linux 2.6.34.7 SUSE Linux 2.6.34.12 Compiler: GCC 4.5.0 GCC 4.5.0 Table 5.1: Configuration of hardware systems used in experiments. 42 Approach Parameters Common: • Key element size • Pointer size • Workload parameters1 • Hardware parameters2 Binary Search: • Implementation parameters3 B+ -Tree and B-Tree Search: • Keys per internal node, and resulting fanout • Internal node layout • Binary search strategy for internal nodes • Key-value pairs per leaf node • Leaf node layout • Binary search strategy for leaf nodes Table 5.2: List of traditional search algorithms and their parameters. Table 5.2 lists the parameters for the index search algorithms which we have seen in Chapter 2. Even for a relatively simple algorithm such as B+ -tree search we have to pick optimal values for internal node size, leaf node size, if and how to arrange keys in leaf nodes, and what binary search strategies to use in leaf and internal nodes. For binary search we are going to use a straightforward iterative C implementation based on Algorithm 2.1 from page 17, but with one significant change: We are going to use a cutoff, and switch to linear search when there is less than a specific amount of elements remaining in the key range. Our experiments confirmed the expectation of this being faster than running regular binary search to completion. We are not going to evaluate B+ -tree search, nor B-tree search. 1 Such as the size of the input data, the number of queries, the key distribution in queries, other access pattern parameters of queries, and the input key distribution. 2 Especially page size, cache line size, SIMD register size, CPU clock, memory clock, and memory size, but see Table 5.1 for a more complete list. 3 This includes questions such as these: Does the implementation use iteration or recursion? At what number of remaining elements do we switch over to linear search? Is the case of key equality handled for each comparison, or when the search range has been shrunk to one element? See [Knu98] for a good overview of such details. 43 Approach Parameters CSS-Tree Search: Same as B+ -Tree Search CSB+ -Tree Search: Same as CSS-Tree Search k-ary Search: • Choice of k • Alignment of keys • Whether to use tree layout or discontinuous loads • Implementation parameters similar to binary search FAST-Tree Search: • Keys per SIMD node, and resulting fanout • Parameters of k-ary search in SIMD nodes • Depth of cache line nodes in SIMD nodes • Depth of page nodes in SIMD nodes • Key-value pairs per leaf node • Leaf node layout • Search strategy for leaf nodes • Whether to use SIMD search in internal nodes • Whether to perform cache line blocking • Whether to perform page blocking NitroGen: • Number of index-compiled internal node levels • Code layout for internal nodes • Code layout for leaf nodes • Choice of base approach • Parameters of base approach in index-compiled levels4 • Parameters of base approach in non-compiled levels Table 5.3: List of CPU-optimized search algorithms and their parameters. Table 5.2 lists the parameters for the more complex CPU-optimized index search algorithms from Chapters 3 and 4. There is many parameters involved in optimally configuring these approaches. To ensure a fair comparison of the approaches, we will tune the parameters of the algorithms for the hardware systems from Table 5.1. 4 It makes sense for these to picked independently of the base approach parameters in non-compiled levels as the optimal values can be quite different. 44 For the evaluation of CSS-trees we are using the implementation from the original paper by Rao et al. [RR99], which has been published as a part of their implementation of CSB+ -trees [RR00]. Out of those two approaches, we are only going to evaluate CSS-trees, due to our focus on OLAP and to the paper on CSB+ -trees measuring the read performance of CSB+ -trees to be quite similar to one of CSS-trees. We decided not to evaluate the non-tree-based form of k-ary search. We consider the tree-based form to be more interesting as it does not require the use of SIMD register loading from discontiguous memory access which is quite slow in current CPU hardware generations [SGL09]. We only evaluate k-ary search as part of our reimplementation of FAST-tree search. We would have liked to use the original implementation of FAST-tree search as described by Kim et al. [KCS+ 10], and have tried to obtain a copy of their implementation. Unfortunately, despite requests, the reference implementation is not available. We have implemented index-compilation as part of the NitroGen framework for binary search, and CSS-trees. We are currently working on also implementing index-compilation for FAST-tree search, and intend to make this available as a part of the NitroGen framework. To summarize, we are going to evaluate binary search, CSS-tree search, FAST-tree search, index-compiled binary search, and index-compiled CSStree search. For FAST-tree search we are going to use a custom reimplementation based on the ideas from the paper by Kim et al. [KCS+ 10]. We use the original implementation of CSS-trees [RR99], and a tuned implementation of binary search as the base lines. We are going to run the following experiments: An experiment measuring the effect of NitroGen on the performance of CSS-tree and binary search with random and skewed access patterns, an experiment measuring the effect of the keys per internal node has on the performance of index search for 32 MB of input data, and an experiment measuring the performance of the first version our reimplementation of FAST. 45 5.2 5.2.1 Experimental Results Binary Search, CSS-Tree Search, and NitroGen Figure 5.1 shows the performance of CSS-tree search, as well as binary search, both with and without NitroGen index compilation. There is two copies of the lines: The top group of lines represents uniformly random key references in index lookups. The bottom group obtains more realistic key access patterns, by using frequencies modeled after a Zipf distribution. The gain of index compilation on binary search can be a performance improvement of up to 33%. With this first prototype, we obtain a performance improvement of 6–10% for CSS-tree search, depending on input size and access pattern. 1000.00 Regular Binary Search Index Compiled Binary Search Regular CSS Search Index Compiled CSS Search Run Time per Lookup (ns) 800.00 600.00 400.00 200.00 0.00 0 16 32 48 64 80 96 Data Size (megabytes) Figure 5.1: The performance of CSS-tree search and binary search, both with and without NitroGen. The top four lines represent random key access patterns. The bottom four lines represent key access pattern with key frequencies modeled after Zipf distribution. 46 5.2.2 Effect of Internal Node Size in CSS-Trees Figure 5.2 shows the effect of the keys per internal node parameter on performance in CSS-tree search for 32 MB of input data as measured on System A. Whereas the optimal value for CSS-tree search is 32 keys per internal node (equivalent to two cache lines), the optimal value for NitroGen CSS-tree search is 16 keys per internal node. This is consistent with the overhead of turning internal node key data into code. In this case NitroGen CSS search outperforms regular CSS search by 5% for 16 keys per node. Search Time [clock cycles] Base CSS-Tree Search NitroGen CSS-Tree Search 2401 2436 1788 1519 1621 1386 1273 1225 1364 1311 1291 1327 1229 1213 8 16 32 64 128 256 512 Keys per internal node Figure 5.2: The effect of the keys per internal node parameter on performance in CSS-tree search for 32 MB of input data as measured on System A. 47 5.2.3 Performance of FAST reimplementation Figure 5.3 compares the performance of our reimplementation of FAST against the performance numbers reported in the original paper. The original graph reports the relative performance gain obtained by individual features. We also report absolute cycle numbers. These absolute numbers are comparable to those of the original paper. The relative performance gains due to individual features differ. This could be due to a variety of reasons, for example due to different choice of implementation details, hardware architectural differences, or suboptimal algorithmic tuning. Without access to the reference implementation, it is impossible to tell with certainty. It will be interesting to see how performance is affected after incomplete nodes are handled in the same way in both of the implementations. Platform Core i7 GTX 280 Peak GFlops 103.0 933.3 Peak BW 30 141.7 Total Frequency 12.8 39 Platform Peak GFlops Peak BW Total Frequency Platform Peak GFlopscompute Peak Total 12.8 Frequency Core i7 103.0 30BW (GFlops), Peak bandwidth (GB/sec), Core280 i7 103.0 30 12.8 GTX 933.3 141.7 39 quency on the Core GTX 280 (Cores 933.3 * GHz) 141.7 39 i7 and the GTX 280. Table 1: Peak compute (GFlops), bandwidth (GB/sec), and total freTable Peak*compute (GB/sec), quency1: (Cores GHz) on (GFlops), the Core i7bandwidth and the GTX 280. and total frequency (Cores * GHz) on the Core i7 and the GTX 280. Table 1: (a) and total fre- (b) Search Time [clock cycles] Default + Page Blocking + Cache line Blocking + SIMD 1 363 1339 1279 1252 Figure 7: 0.8 Comparison between the CPU 1243search and the GPU search. 306 298GPU 7: Comparison between the CPU search and ”CPU-BW” shows the throughput when search beFigure 7: Comparison between theprojection CPUFigure search andCPU the search. comes memory bandwidth bound 0.6shows ”CPU-BW” the throughput projection when CPU search ”CPU-BW” showsbe-250 the throughput projection when comes memory bandwidth bound the GP CPU s memory bound Finally, the0.4 software pipelining techniquecomes with prefetch relaxesbandwidth the impact instruction and further hides cacherelaxes misses.the Finally,ofthe pipelining technique with prefetch 0.2software dependency 311 307 Our final search performance is 4.8X faster for large trees and 283 impact of instruction dependency and further hides cache misses.252 Finally, the 2.5X faster smallperformance trees than theisbest reported numbers [28]. 0search Our finalfor 4.8X faster for largesoftware trees As and pipelining technique with prefetch r Figure 6: Normalized search time with various architectural optishown in Figure 6, ourtree scalar performance with page cache (512 MB data) small tree (512 KBline ofAsdata)dependency and further hides cache 2.5X faster forlarge small trees than theofbest reported numbers [28]. impact ofandinstruction mization techniques (lower is faster). The fastest reported performance Figure 6: Normalized search time with various architectural optiblocking outperforms the best reported SIMD search by around shown in Figure 6, our scalar performance with page and cache line on CPUs techniques [28] and GPUs [2]isisfaster). also shown comparison). Our final search mization (lower The (for fastest reported performance 1.6X. Thisoutperforms emphasizes the the fact SIMDSIMD is onlysearch beneficial once performance is 4.8X faster for large blocking best that reported by around * not bound by various on CPUs [28] andline GPUs [2] is also the search is compute bound, and Cache line depth isSIMD 22.5X Cache depth is 2shown (for comparison). •emphasizes • faster for small 1.6X. Thisalgorithm the fact that is only beneficial once trees than the best reported numbers (core count · frequency) the two platforms are shown Table Figure 6:is 5ofNormalized search time with1. various architectural other architectural latencies. that latency Page depth isApplications 5*bound,shown Page depth (+ large page support ininOS) the search is opticompute and notare bound by bound various •algorithm in Figure 6, our scalar performance with page and c We•generate 32-bit (key,ofrid) tuples, with both keys andinrids gendo not architectural exploitperformance the additional compute resources provided by SIMD * (core count · frequency) the two platforms are shown Table 1. other latencies. Applications that are latency bound mization techniques (lower is faster). The fastest reported Internal nodes have 4 keys, 5 children Internal nodes have 3sorted keys,based 4 children • Also •generate erated randomly. The tuples onkeys the key and instructions. note that ourcompute comparison numbers are based on a blocking outperforms the best reported SIMD search b We 32-bit (key, rid)are tuples, with both andvalue rids gendo not exploit the additional resources provided by SIMD * 6 Leaf nodes have 64 keyswith the best reported Unknown leaf node layout • Also we •varyrandomly. the CPUs number oftuples tuples from 64Kbased to[2] 64M .the Thekey search on and GPUs is shown (for comparison). single-thread (for our fair comparison erated The[28] are sorted on also valuekeys and instructions. execution note that comparison are emphasizes based on a This the fact that SIMD is only benefi are •alsoPartial wide, andare generated at6random. Random Partial nodes are not1.6X. yetnumbers avoided nodes avoided CPU number). When we execute independent search queries on • execution we vary 32-bit the number of tuples from uniformly 64K to 64M . The search keys single-thread (for fair comparison with the best reported search keys exercise the worst case for index tree search with no multiple cores, we achieve near-linear speedup (3.9X onalgorithm 4-cores). the search is compute bound, and not bound b * Optimal are also 32-bit wide, and generated uniformly at random. Random CPU number). When we execute independent search queries on values, obtained from parameter tuning coherence between tree traversals of subsequent queries. The default GPU search (Fig. 6) executes one independent binary (core count frequency) of the two platforms are shown search keys exercise the ·worst case for index tree search with no multiple cores,in weTable achieve 1. near-linear speedup (3.9X on 4-cores). latencies. Applications that are laten other architectural We first show the impact of various architecture techniques on search per SIMD lane, for a total of 32 searches for SIMD execucoherence tree traversals of (key, subsequent queries. Thekeys defaultand GPUrids searchgen(Fig. 6) executes one independent binary Webetween generate 32-bit tuples,search with both search performance for both CPUs and GPUsrid) and compare exploit the additional compute resources provided tion. Unlike CPU search, GPU search isdo lessnot sensitive to blocking We first show the impact of various architecture techniques on search per SIMD lane, for a total of 32 searches for SIMD execuperformance withrandomly. the best reported number on each architecture. We do not report the number for cache line blocking erated The sorted based for onlatency. the key value and search performance for both CPUs and tuples GPUs andare compare search instructions. Also note that our comparison numbers are b tion. Unlike CPU search, GPU search is less sensitive to blocking Then, we compare the throughput of CPU search and GPU search since the cache line size is not disclosed. While the default GPU +do not keys performance with the reported number on each architecture. for 6latency. report32the number for SIMD cache line blocking we the vary thebestnumber of for tuples from 64K to 64M . suffers The We search and analyze performance bottlenecks each architecture. single-thread execution (for fair comparison with the bes search from gathering tree elements, blocking alThen, we compare the throughput of CPU search and GPU search sincereading the cache size is not disclosed. While the thus default GPU dataline from contiguous memory locations removare the also 32-bit wide, and uniformlylows at random. Random CPU number). When we execute independent search q and analyze performance bottlenecks forgenerated each architecture. search suffers from gathering 32the tree elements, SIMD isblocking al5.3.1 Impact of Various Optimizations ing the overhead of gather. Since overhead of gather more sigsearch keys exercise the worst case for indexnificant treereading search with no lows datatrees, from contiguous memory locations thus removmultiple we achieve near-linear speedup (3.9X on for large our GPU search obtains 1.7X cores, performance Figure 6 shows the normalized search time, measured in cycles 5.3.1 Impact of Various Optimizations ing the overhead of gather. the overhead of gather is more sigimprovement for large trees,Since and 1.4X improvement for small trees coherence tree traversals of subsequent queries. per query on CPUs and between GPUs by applying optimization techniques The default GPU search (Fig. 6) executes one independe nificant forblocking. large trees, our GPU search obtainsis1.7X performance 6 shows the show normalized searchsearch time, when measured in cycles with SIMD Our GPU implementation compute bound. oneFigure by one. We first the default no optimizaWe first show the impact of various architecture techniques on search per SIMD lane, for a total of 32 searches for SIM improvement for large trees, and 1.4X improvement for small trees per on CPUs and GPUs applying optimization techniques tionquery technique is applied and aby simple binary search is used. Then, 5.3.2 CPU search GPU search blocking. OurVS. GPU implementation is computeCPU bound.search, GPU search is less sensitive to one by search one. We first default search when no optimizaperformance for both CPUs and andSIMD compare search we incrementally applyshow pagethe blocking, cache line blocking, SIMDGPUswith tion. Unlike tion technique is applied and a simple binary search is used. Then, Weeach compare the performance of search optimized for CPU and blocking, and software pipelining with prefetch. The label of “+SW performance with the best reported number on architecture. 5.3.2 CPU search VS. GPU search for latency. We do not report the number for cache line we incrementally page blocking, cache blocking, SIMD GPU architectures. Figure 7 shows the throughput of search with Pipelining” showsapply the final relative search timeline when all optimizaThen, weapplied. compare theprefetch. throughput CPU GPU search We and compare the performance search optimized for and size is not disclosed. While the def blocking, and software pipelining with Theon label of “+SW various tree sizes from 64K keys of to 64M keys. When the CPU tree fits tion techniques are We report our timings theof two ex- search since the cache line GPU Figure 7 shows of This search with Pipelining” the final relative searchand time when all(with optimizain the architectures. LLC, CPUs outperform GPUsthebythroughput around 2X. result treme cases small trees (with 64K keys) large trees 64M for each and–shows analyze the performance bottlenecks architecture. search suffers from various tree 64K keys to 64M keys. When the tree fits gathering 32 tree elements, SIMD blo tion techniques are applied. We report our timingstree onsizes the two matches wellsizes with from analytically computed performance difference. keys). The relative performance for intermediate fall exin in described the LLC, in CPUs outperform GPUs lows byour around 2X. This result treme cases small trees (with 64K andreported. large trees (with 64M reading data As the previous subsections, optimized search re- from contiguous memory locations thu between the–two analyzed cases, andkeys) are not matches wellper with analytically performance difference. keys). The relative intermediate treetechnique sizes fall is in quires 4 ops level per query computed for both CPUs and GPUs. Since For CPU search, performance the benefit offoreach architecture ing4X the overhead of gather. Since the overhead of gather is As described in the per previous subsections, optimized search reGPUs take 4 cycles op, they consume our more cycles per op between the two for analyzed cases, andsmall are not reported. more noticeable large trees than trees because large trees nificant large trees, our GPU search obtains 1.7X per Figure 6 shows normalized search measured cycles as compared CPU. the other hand, GPUs have 3X more quires 4 ops to perthein level perOn query for both CPUs andfor GPUs. Since areFor more latency bound. First, we observe that search gets 33%is time, CPU search, the benefit ofthe each architecture technique total frequency than CPUs (Table Onimprovement small GPUs take 4 cycles per op, they 1). consume 4Xtrees, moreCPUs cyclesare pernot op faster noticeable with blocking, which translates to around 1.5X speedup more for large trees than smallGPUs trees because large trees optimization for large trees, and 1.4X improvement for s perpage query on CPUs and by applying techniques bound by memory andthecan operate the maximum inin throughput. Adding cache linewe blocking on that top of page gets blocking as compared to thelatency CPU. On other hand,onGPUs have 3X more are more latency bound. First, observe search 33% blocking. Our GPU implementation is compu one byblocking, one. We firstThis show theof1.5X default when no than optimizastruction throughput rate. CPUs can multiple resultswith in anpage overall speedup of 2.2X. reduction search timesearch total frequency CPUsUnlike (TableGPUs, 1). Onwith smallSIMD trees,issue CPUs are not faster which translates to around speedup per cyclelatency and weand observe IPC ofonaround 1.5. Therecomes from average TLB misses and misses sigbound byis memory can an operate the maximum inin throughput. Addingthe cache lineapplied blocking on top of page blocking tionreducing technique is and aLLC simple binary instructions search used. Then, fore, the total throughout ratio evaluates to around (1.5*4/3) ∼2X nificantly – especially when traversing the lower levels of the tree. struction throughput rate. Unlike GPUs, CPUs can issue multiple results in an overall speedup of 2.2X. This reduction of search time wepage incrementally page blocking, cache ininstructions line blocking, the favor ofper CPUs. However, blocking cacheapply linemisses blocking not misses help small cycleSIMD and we observe an IPC of around 1.5. Therecomes from reducing theand average TLB anddo LLC sigAs the size grows, CPUs suffer from TLB/LLC misses ∼2X and trees because there areand no TLB and cache misses the first place; fore, the tree total throughout ratio evaluates toWe around (1.5*4/3) compare the performance of search optimized for nificantly – especially when traversing the lower in levels of the tree. blocking, software pipelining with prefetch. The label of “+SW get lower instruction throughput rate. The dotted line, labeled “CPUin fact, cache line blocking results in a slight increase of instrucin the favor of CPUs. However, page blocking and cache line blocking do not help small GPUTLB/LLC architectures. Figure 7 shows the throughput of se Pipelining” shows theOnce final time when all optimizaBW” thesize throughput projection searchmisses becomes tions because with extra address computations. therelative impact of search latency Asshows the tree grows, CPUs sufferwhen from CPU and trees there are no TLB and cache misses in the first place; memory bound. projection shows that CPUs arefrom 64K keys to 64M keys. When th is reduced, SIMD provarious tree sizes techniques are data-level applied. We report our timings on the two ex-Thisrate. get lowerbandwidth instruction throughput The dotted line, labeled “CPUin fact, tion cache lineblocking blockingexploits results in a slightparallelism increase ofand instruccompute bound small trees and become to bandwidth vides with an additional 20% computations. – 30% gain for Once both small and large trees. BW” shows the on throughput projection when closer CPU search becomes tions extra address the impact of latency Figure 5.3: Performance of FAST reimplementation: (a) Performance as measured in experiments by Kim et al. [KCS 10] (b) Performance of our reimplementation 48 5.3.1 Impact of Various Optimizations 5.3.2 CPU search VS. GPU search Chapter 6 Conclusion 6.1 Statement of Results We have discussed the backgrounds and advantages of a wide array of index structures and search algorithms. We have evaluated a representative subset against each other, and discussed the merits of a novel idea: The use of code generation to speed up index structures. We have engineered a prototype implementation, NitroGen, of index compilation for two widely-deployed index search algorithms, and obtained encouraging initial results. There is ongoing work on a reimplementation of the state of the art index search algorithm, FAST, and ways of utilizing index compilation to make it utilize the instruction caches of modern CPUs, and, ideally, make it even faster. 49 6.2 Statement of Problems left unresolved Due to the timing of the publication of FAST, we have only had very limited time to discuss some of the results we obtained. It would be interesting to come up with a model for predicting the performance impact of index compilation based on hardware events, such as cache misses. There is ongoing work on reimplementing a regular and an index-compiled version of FAST. Additionally, there seems to be a wide array of opportunities for follow-up work in the area of index structures, such as the effects of fusing together multiple index structures to obtain best of both worlds hybrid index structures optimized for both OLAP and OLTP. Is it viable to use a read-optimized index structure to represent the root levels of an index, which are less likely to change, while using one supporting inexpensive update operations for the lower levels of the same index, which are more likely to change? 50 Bibliography [ADHW99] Anastassia Ailamaki, David J. DeWitt, Mark D. Hill, and David A. Wood. DBMSs on a modern processor: Where does time go? In VLDB, pages 266–277, 1999. [AS96] Harold Abelson and Gerald Jay Sussman. Structure and Interpretation of Computer Programs. MIT Press, Cambridge, second edition, 1996. [BC07] Stefan Büttcher and Charles L. A. Clarke. Index compression is good, especially for random access. In CIKM, pages 761–770. ACM, 2007. [BM72] Rudolf Bayer and Edward M. McCreight. Organization and maintenance of large ordered indexes. Acta Informatica, pages 245–262, 1972. [BVZB05] Marc Berndl, Benjamin Vitale, Mathew Zaleski, and Angela Demke Brown. Context threading: A flexible and efficient dispatch technique for virtual machine interpreters. In CGO, pages 15–26. IEEE Computer Society, 2005. 51 [Cod70] Edgar F. Codd. A relational model of data for large shared data banks. CACM, 13(6):387, 1970. [Com79] Douglas Comer. Ubiquitous B-tree. ACM Computing Surveys, 11(2):121–137, 1979. [Dua08] Gustavo Duarte. What your computer does while you wait. http://duartes.org/gustavo/blog/post/what-your-computer, 2008. [HAMS08] Stavros Harizopoulos, Daniel J. Abadi, Samuel Madden, and Michael Stonebraker. OLTP through the looking glass, and what we found there. In SIGMOD, pages 981–992. ACM, 2008. [HP03] Richard A. Hankins and Jignesh M. Patel. Effect of node size on the performance of cache-conscious B+-trees. In SIGMETRICS, page 294. ACM, 2003. [Int10] Intel Corporation. Intel 64 and IA-32 Architectures Software Developer’s Manual. 2010. [Kam10] Poul-Henning Kamp. You’re doing it wrong. CACM, 53(7):55–59, 2010. [KCS+ 10] Changkyu Kim, Jatin Chhugani, Nadathur Satish, Eric Sedlar, Anthony D. Nguyen, Tim Kaldewey, Victor W. Lee, Scott A. Brandt, and Pradeep Dubey. FAST: fast architecture sensitive tree search on modern CPUs and GPUs. In SIGMOD, pages 339–350. ACM, 2010. [Knu98] Donald E. Knuth. The Art of Computer Programming, volume 3: Sorting and Searching. Addison Wesley, 1998. 52 [Mau46] John Mauchly. Theory and techniques for the design of electronic digital computers. 1946. [MBK00] Stefan Manegold, Peter A. Boncz, and Martin L. Kersten. Optimizing database architecture for the new bottleneck: memory access. In VLDB, pages 231–246. Springer, 2000. [McC09] John C. McCallum. Memory Prices from 1957 to 2010. http://www.jcmit.com/memoryprice.htm, July 2009. [MKB09] Stefan Manegold, Martin L. Kersten, and Peter Boncz. Database architecture evolution: mammals flourished long before dinosaurs became extinct. VLDB, pages 1648–1653, 2009. [Ros07] K.A. Ross. Efficient hash probes on modern processors. In Data Engineering, 2007. ICDE 2007. IEEE 23rd International Conference on, pages 1297–1301. IEEE, 2007. [RPML06] Jun Rao, Hamid Pirahesh, C. Mohan, and Guy Lohman. Compiled query execution engine using JVM. In ICDE, pages 23–35, 2006. [RR99] Jun Rao and Kenneth A. Ross. Cache Conscious Indexing for Decision-Support in Main Memory. In VLDB, pages 78–89, 1999. [RR00] Jun Rao and Kenneth A. Ross. Making B+-trees cache conscious in main memory. In SIGMOD, pages 475–486. ACM, 2000. [SGL09] Benjamin Schlegel, Rainer Gemulla, and Wolfgang Lehner. k-ary search on modern processors. In DaMoN, pages 52–60. ACM, 2009. 53 [SL76] Dennis G. Severance and Guy M. Lohman. Differential files: their application to the maintenance of large databases. ACM Transactions on Database Systems, 1(3):256–267, 1976. [SMA+ 07] Michael Stonebraker, Samuel Madden, Daniel J. Abadi, Stavros Harizopoulos, Nabil Hachem, and Pat Helland. The end of an architectural era (it’s time for a complete rewrite). In VLDB, pages 1150–1160, 2007. [Win10] Markus Winand. Use the index, luke! — a guide to database performance. http://use-the-index-luke.com/, 2010. [ZR02] Jingren Zhou and Kenneth A. Ross. Implementing database operations using SIMD instructions. In SIGMOD, pages 145–156, New York, NY, USA, 2002. ACM. [ZR04] Jingren Zhou and Kenneth A. Ross. Buffering database operations for enhanced instruction cache performance. In SIGMOD, pages 191–202. ACM, 2004. 54
8cs.DS
arXiv:1608.07352v1 [cs.SY] 26 Aug 2016 Connectivity-Aware Traffic Phase Scheduling for Heterogeneously Connected Vehicles Shanyu Zhou Hulya Seferoglu University of Illinois at Chicago University of Illinois at Chicago [email protected] [email protected] ABSTRACT We consider a transportation system of heterogeneously connected vehicles, where not all vehicles are able to communicate. Heterogeneous connectivity in transportation systems is coupled to practical constraints such that (i) not all vehicles may be equipped with devices having communication interfaces, (ii) some vehicles may not prefer to communicate due to privacy and security reasons, and (iii) communication links are not perfect and packet losses and delay occur in practice. In this context, it is crucial to develop control algorithms by taking into account the heterogeneity. In this paper, we particularly focus on making traffic phase scheduling decisions. We develop a connectivity-aware traffic phase scheduling algorithm for heterogeneously connected vehicles that increases the intersection efficiency (in terms of the average number of vehicles that are allowed to pass the intersection) by taking into account the heterogeneity. The simulation results show that our algorithm significantly improves the efficiency of intersections as compared to the baselines. Keywords Cyber-physical systems, transportation systems, connected vehicles, heterogeneous communication. 1. INTRODUCTION The increasing population and growing cities introduce several challenges in metropolitan areas, and one of the most challenging areas is transportation systems. In particular, the rapidly increasing number of vehicles in metropolitan transportation systems, has introduced several challenges including higher traffic congestion, delay, accidents, energy consumption, and air pollution. For example, the average of yearly delay per auto commuter due to congestion was 38 hours, and it was as high as 60 hours in large metropolitan areas in 2011 [21]. The congestion caused 2.9 billion gallons of wasted fuel in 2011, and this figure keeps increasing yearly [21], e.g., the increase was 3.8% in Illinois between years 2011 and 2012 [1]. This trend poses a challenge for Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. CarSys’16, October 03-07, 2016, New York City, NY, USA c 2016 ACM. ISBN 978-1-4503-4250-6/16/10. . . $15.00 DOI: http://dx.doi.org/10.1145/2980100.2980105 (a) Phase I (φ = 1) (b) Phase II (φ = 2) (c) Phase III (φ = 3) (d) Phase IV (φ = 4) Figure 1: An example intersection with four possible traffic phases. efficient transportation systems, so new traffic management mechanisms are needed to address the ever increasing transportation challenges. Fortunately, advances in communication and networking theories offer vast amount of opportunities to address ever increasing challenges in transportation systems. In particular, connected vehicles, i.e., vehicles that are connected to the Internet via cellular connections and to each other via device-to-device (D2D) connections such as Bluetooth or WiFi-Direct [2], are able to transmit and receive information to improve the control and management of traffic, which has potential of reducing congestion, delay, energy, and improving reliability. In this context, it is crucial to understand how heterogeneous communication affects the performance of transportation systems. Heterogeneity in transportation systems is coupled to practical constraints such that (i) not all vehicles may be equipped with devices having communication interfaces, (ii) some vehicles may not prefer to communicate due to privacy and security reasons, and (iii) communication links are not perfect and packet losses and delay occur in practice. It is crucial to develop control algorithms by taking into account the heterogeneity. In this paper, we particularly focus on making traffic phase scheduling decisions. The next two examples illustrate the traffic phase scheduling problem and the impact of heterogeneous communications on the scheduling. L L (a) Only the first vehicle (b) Only the second vehicle communicates communicates Figure 2: An example single-lane intersection, where vehicles are going straight, turning left and turning right respectively. Example 1. Let us consider Fig. 1, which shows an isolated intersection, and all four possible traffic light phases. Traffic lights could be configured in four different phases: Phases I, II, III, and IV. E.g., Phase I corresponds to the case that only north-south and south-north bounds are allowed to pass through the intersection. The traffic light scheduling determines the phase that should be activated. Note that only one phase could be activated at a time. It is clear that scheduling decisions should be made based on the congestion levels of different directions (or traffic bounds). For example, selecting either Phase I or Phase III in the specific example of Fig. 1 looks a better decision as compared to Phase II or Phase IV, because Phase I and Phase III have a larger number of vehicles in their corresponding queues. Example 1 is a widely known problem in network control and optimization theory, and the optimal solution to this problem is the popular max-weight algorithm [22]. The broader idea behind max-weight algorithm is to prioritize the scheduling decisions with larger weights, which corresponds to congestion level, loss probabilities, and link qualities. The max-weight idea is applied to transportation systems as well in previous work [7, 24, 25, 27] that schedules traffic phases according to congestion levels, which has potential of allowing more vehicles to pass and reduce waiting times at intersections. This approach works well in a scenario that the directions of all vehicles are known a-priori. For example, if all devices communicate with the traffic light in terms of their intentions about their directions (e.g., turn right, go straight, etc.), the traffic light determines which phase to activate using the max-weight scheduling algorithm. However, due to heterogeneity of communication in connected vehicles, only a percentage of vehicles communicate their intentions. In this heterogeneous setup, new connectivity-aware traffic phase scheduling algorithms are needed as illustrated in the next example. Example 2. Let us consider Fig. 2, which shows one of the four incoming traffic lanes in an intersection. This is a one-way single-lane road, where we call the first vehicle at the intersection as the head-of-line (HoL) vehicle. In Fig. 2(a), the HoL vehicle has communication ability, and the vehicles are going straight, turning left, and turning right, respectively. In this case, the traffic light knows that the HoL vehicle is going straight (because the HoL vehicle communicates), so it arranges its phase accordingly. Now let us consider Fig. 2(b), where the directions of vehicles are the same; i.e., straight, left, and right. Yet, in this scenario HoL vehicle does not communicate, but only the vehicle behind HoL communicates. In this case, although the traffic light knows that the second vehicle is going to the left, it has no idea of the HoL vehicle’s intention. If the traffic phase, possibly determined as a solution to the maxweight algorithm, does not match the intention of the HoL vehicle, then the HoL vehicle blocks the other vehicles at the intersection, and no vehicles can pass. Similarly, HoL blocking can be observed in more involved multiple-lane scenarios [28]. As seen, the max-weight algorithm may not be optimal in some scenarios due to heterogeneous connectivity, which makes the development of new scheduling algorithms, by taking into account heterogeneity, crucial. ✷ In this paper, we develop a connectivity-aware traffic phase scheduling algorithm by taking into account heterogeneous communications of connected vehicles. Our approach follows a similar idea to the max-weight scheduling algorithm, which makes scheduling decisions based on congestion levels at intersections. However, our algorithm, which we name Connectivity-Aware Max-Weight (CAMW), is fundamentally different from the max-weight as we take into account heterogeneous communications while determining congestion levels. In particular, CAMW has two critical components to determine congestion: (i) Expectation: This component calculates the expected number of vehicles that can pass through the intersection at every phase based on the number of vehicles, and the percentage of communicating vehicles at the intersection. (ii) Learning: This component learns the directions of vehicles even if the vehicles do not directly communicate with the traffic light. The expectation and learning components of our algorithm operate together in harmony to make better decision on traffic phase scheduling. The simulation results demonstrate that CAMW algorithm significantly improves the intersection efficiency (in terms of the average number of vehicles that are allowed to pass the intersection) over the baseline algorithm; maxweight. The following are the key contributions of this work: • We investigate the impact of heterogeneous communication on traffic phase scheduling problem in transportation networks. We develop a connectivity-aware traffic scheduling algorithm, which we name ConnectivityAware Max-Weight (CAMW), by taking into account the congestion levels at intersections and the heterogeneous communications. • The crucial parts of CAMW are expectation and learning components. In the expectation component, we characterize the expected number of vehicles that can pass through the intersections by taking into account the heterogeneous connectivity. In the learning component, we infer the directions of vehicles even if they do not directly communicate. The expectation and learning components collectively determine the number of vehicles that can pass through the intersections. • We evaluate CAMW via simulations, which confirm our analysis, and show that our algorithm significantly improves intersection efficiency as compared to the baseline; the max-weight algorithm. The structure of the rest of this paper is as follows. Section 2 presents the related work. Section 3 introduces the system model. Section 4 develops our connectivity-aware traffic phase scheduling algorithm by taking into account heterogeneous communications. Section 5 presents the simulation results. Section 6 concludes the paper. 2. RELATED WORK This work combines ideas from traffic phase scheduling, queuing theory, and network optimization. In this section, we discuss the most relevant literature from these areas. Traffic phase scheduling: Design and development of traffic phase scheduling algorithms have a long history; more than 50 years [14]. Thus, there is huge literature in the area, especially on the design of optimal pre-timed policies [14, 6, 3], which activate traffic phases according to a time-periodic pre-defined schedule. These policies do not meet expectations under changing arrival times, which require adaptive control [15]. The adaptive control mechanisms including [4], [6], [10], [11], [13] and [16], optimize control variables, such as traffic phases, based on traffic measures, and apply them on short term. Queueing theory: Using queuing theory to analyze transportation systems has also very long history [26]. E.g., [14, 19, 9] considered one-lane queues and calculated the expected queue length and arrivals using probability generation functions. Other modeling strategies are also studied; such as the queuing network model [20], cell transmission model [12], store-and-forward [2], and petri-nets [5]. Network optimization and its applications to transportation systems: Max-weight scheduling algorithm and backpressure routing and scheduling algorithms [22] arising from network optimization area has triggered significant research in wireless networks [17, 18]. This topic has also inspired research in transportation systems [7, 24, 25, 27]. Feedback control algorithms to ensure maximum stability are proposed both under deterministic arrivals [25] and stochastic arrivals [23, 27] following backpressure idea. The infinite buffer assumption of backpressure framework is studied by capacity aware back-pressure algorithm in [8]. Our work in perspective: As compared to the previous work briefly summarized above, our work focuses on connected vehicles and investigates the scenario where vehicles communicate heterogeneously. In this scenario, we develop an efficient connectivity-aware traffic phase scheduling algorithm by employing expectation and learning of congestion levels at intersections. Our previous work [28] investigates the impact of the blocking problem at intersections, characterizes the waiting times, and develops a shortest delay routing algorithm in transportation systems. As compared to this work, in this paper, we develop a connectivity-aware traffic phase scheduling algorithm by taking into account heterogeneous communications. 3. SYSTEM MODEL In this section, we present our system model including traffic lights and phases as well as our queuing models of the traffic. Traffic lights and phases: In our system model, we focus on an intersection controlled by a traffic light. The four traffic phases we consider in this paper are shown in Fig. 1. We define φ as a phase decision, e.g., φ = 1 corresponds to Phase I in Fig. 1. The set of phases is Φ, and φ ∈ Φ. We consider that time is slotted, and at each time slot t, a phase decision is made. Each traffic phase lasts for n time slots. Vehicles have a chance to pass the intersection only when the corresponding traffic phase is active, i.e., ON. For instance, vehicles in the south-north bound lanes may pass the intersection only when phase φ = 1 is ON in Fig. 1. λ1 λ2 λ2 L S R L R S R S L S λ1 (a) Queue I S L L (b) Queue II Figure 3: Two queuing models considered in this paper, where λ1 and λ2 are the arrival rates of straightgoing and left-turning traffic, respectively.(a) Singlelane traffic model. (b) One+two lane model. Modeling intersections with queues: We model the isolated intersection as a set of queues following [28]. Typically, there are four queues for each direction (for south-north, north-south, west-east, and east-west bound) at an intersection. We specifically focus on one direction and model it using two models: Queue I, which is one-lane model shown in Fig. 3(a) and Queue II; which is a one+two lane model shown in Fig. 3(b). Note that for both of Queue I and Queue II, we can consider straight-continuing and right-turning traffic as the same traffic, since they share the similar right of way. Thus, to demonstrate the analysis in a simple way, we simply consider that the right-turning and straight-continuing traffics are combined together, and we call both right-turning and straight-continuing vehicles as straight-going vehicles. At each slot, vehicles arrive into intersections, where λ1 and λ2 are the average arrival rates of straight-going and left-turning vehicles, respectively. In our analysis, the arrivals can follow any i.i.d. distribution. In this setup, when a vehicle enters the intersection, it can connect to the traffic light either using cellular or vehicle-to-vehicle communications. Thus, it can communicate its intention with the traffic light about its destination, i.e., turning left, going straight, etc. The probability of communication for each vehicle is ρ. If a vehicle does not communicate, we model their intentions probabilistically, where p1 is the probability that a vehicle (which does not communicate its intention) will go straight, while p2 is the probability that it will turn left. 4. CONNECTIVITY-AWARE TRAFFIC PHASE SCHEDULING 4.1 CAMW: Connectivity-Aware Max-Weight In this section, we develop our connectivity-aware traffic phase scheduling algorithm by taking into account heterogeneous communications. We consider the setup shown in Fig. 1 for phases. Our scheduling algorithm, which we call Connectivity-Aware Max-Weight (CAMW), determines the phase φ by optimizing X Qi (t)Ẽ(Kiφ (t)) max φ i∈{1,...4} s.t. φ ∈ Φ. (1) where Qi (t) is the number of vehicles in the ith incoming queue at time slot t, and Ẽ(Kiφ (t)) is the estimated number of vehicles that can pass the intersection from the ith n n-2 7 6 5 4 3 21 4.2 Expectation 4.2.1 Calculation of E(Kiφ (t)) for Queue I Let us focus on phase φ ∈ Φ and the ith queue, where i ∈ {1, 2, 3, 4}. In this setup, T (t) (T (t) ≤ n) denotes the number of vehicles that have communication abilities at time slot t, and vl (t) (l = 1, 2, · · · , T ) denotes the location of the lth communicating vehicle in the queue. For example, v2 (t) = 3 means that the second communicating vehicle in the queue is actually the third vehicle in the queue. Fig. 4 illustrates an example locations of communicating vehicles. Note that the vehicles that do not communicate are not assigned any location labels. Now, let us define two conditions; C1 and C2 . The first condition C1 requires that all communicating vehicles would like to go to the same direction and aligned with the traffic phase, while the second condition C2 corresponds to the case that the first communicating vehicle that is not aligned with the traffic phase is in the location of vL (t) (L = 1, 2, · · · , T ). Note that the conditions C1 and C2 are complementary. The next theorem characterizes the expected number of vehicles that would leave queue i at phase φ. Theorem 1. Assume that all the queues in an intersec- L E (a) Conf. I Figure 4: An illustrative example of communicating vehicles in a queue at a time slot. Communicating vehicles are at labeled locations; v1 , v2 , · · · , vT . incoming queue under traffic phase φ ∈ Φ. Note that one active phase lasts for n time slots and it takes one time slot for a vehicle to pass the intersection. In other words, at most n vehicles in a queue can pass the intersection during one green light phase. The optimization problem in (1) applies to all queuing models (i.e., includes both Queue I and Queue II ). Note that (1) determines the phase by taking into account Qi (t) and Ẽ(Kiφ (t)). The queue size information Qi (t) can be easily determined by traffic lights using sensors that count the number of approaching vehicles. In other words, (1) prioritizes phases with larger Qi (t) values. This is an approach followed by the classical max-weight algorithm. However, as we discussed earlier, using Qi (t) alone is not sufficient when vehicles heterogeneously communicate with traffic lights. In this case, since each device has different destinations, blocking can occur. I.e., even if Qi (t) is large, the number of vehicles that can pass through the intersection could be small due to blocking. Thus, to reflect this fact, we include the term Ẽ(Kiφ (t)) in the optimization problem. Ẽ(Kiφ (t)) is the estimated number of vehicles that can pass the intersection from the ith incoming queue under traffic phase φ ∈ Φ. Ẽ(Kiφ (t)) is found using two steps: expectation and learning. The key idea behind expectation part is to calculate the expected number of vehicles, which is E(Kiφ (t)), that can pass the intersection at phase φ, while the key idea of the learning part is to fine tune E(Kiφ (t)) and find Ẽ(Kiφ (t)) by learning the directions of vehicles that do not communicate. In the next two sections, we present the expectation and learning components of CAMW. L L v1 v2 v3 vT n-1 (b) Conf. II S S L S S L (c) Conf. III S E (d) Conf. IV Figure 5: Four possible configurations (Conf. I to Conf IV) for the first three vehicles in Queue II, where L and S denote that the intention of the vehicle is to turn left or go straight, respectively, while E denotes that the location is empty (due to previous blocking). tion follow Queue I. The expected number of vehicles that would leave the ith queue and pass the intersection at traffic phase φ ∈ Φ is characterized by  PT (t) p1−l v (t)−1  1  ((p1 + p2 vl (t))p1l  l=0 p2   vl+1 (t)−2   ) +(1 − 2p1 − p2 vl+1 (t))p1    n−T (t)   , if C1 holds +np1 E(Kiφ (t)) =   PL−1 p1−l v (t)−1  1  ((p1 + p2 vl (t))p1l  l=0 p2   v (t)−2   ) +(1 − 2p1 − p2 vl+1 (t))p1l+1    +(v (t) − 1)pvL (t)−L , if C2 holds. L 1 (2) Proof. The proof is provided in Appendix A. 4.2.2 Calculation of E(Kiφ (t)) for Queue II Queue II assumes that there are dedicated lanes for leftturning and straight-going vehicles, which makes it fundamentally different than Queue I. In this setup, we consider that traffic lights can sense whether the HoL location of each dedicated lane is empty or not. Thus, in Queue II, the first two vehicles in the queue will indirectly communicate their intentions to the traffic light. Fig. 5 demonstrates four possible configurations for HoL vehicles. For example, in Fig. 5(a), HoL position of the straight going lane is empty (shown with E), the traffic light will know that two vehicles in the queue will turn left. On the other hand, in Fig. 5(b), the traffic light knows that in the dedicated lanes, one vehicle will go straight, and the other will turn left, but it does not know the intentions of the other vehicles as long as they do not explicitly communicate with the traffic light. The crucial observation with Queue II is that if the vehicles that indirectly communicate with the traffic light are separated from the queue, the rest of the vehicles form a sub-queue. For example, all the vehicles other than (i) the first two left-turning vehicles in Fig. 5(a), and (ii) the two vehicles that are going straight and turning left in Fig. 5(b), form a sub-queue. The important property of the sub-queue is that it follows Queue I, and can be modeled using the location labels as shown in Fig. 4. Thus, we can calculate E(Kiφ (t)) of Queue II using the similar analysis we have in Section 4.2.1. Next, we provide the details of our E(Kiφ (t)) calculation. Let T (t) denotes the number of communicating vehicles in the sub-queue at time t, C3 is the condition that all communicating vehicles in the sub-queue go to the same direction aligned with the traffic phase, and C4 denotes the condition that the first communicating vehicle in the sub-queue that goes to a different direction than what the traffic phase allows is at location vL (t) (L = 1, 2, · · · , T ). The next theorem characterizes the expected number of vehicles that would leave queue i at phase φ for model Queue II. Theorem 2. Assume that all the queues in an intersection follow Queue II. Then, if the first three vehicles of the ith incoming queue are in the form of Fig. 5(a) or Fig. 5(d), the expected number of transmittable vehicles is characterized by  PT (t) p1−l   2 + l=0 1p2 ((p1 + p2 vl (t))    v (t)−1   + (1 − 2p1 − p2 vl+1 (t)) p l   v1 (t)−2  n−2−T (t) l+1   ) + (n − 2)p1 , if C3 holds p1 φ E(Ki (t)) =   P p1−l  1 2 + L−1 ((p1 + p2 vl (t))  l=0 p2   vl (t)−1   + (1 − 2p1 − p2 vl+1 (t)) p  1   pvl+1 (t)−2 ) + (v (t) − 1)pvL (t)−L , if C holds 1 L 1 4 (3) where T (t) ≤ n − 2. And if the first three vehicles of the ith incoming queue are in the form of Fig. 5(b) or Fig. 5(c), the expected number of transmittable vehicles is characterized by  PT (t) p1−l   1 + l=0 p1 2 ((p1 + p2 vl (t))    v (t)−1   + (1 − 2p1 − p2 vl+1 (t)) p l   v1 (t)−2  n−1−T (t) l+1   , if C3 holds p ) + (n − 1)p1  1 φ E(Ki (t)) =   P p1−l  1 1 + L−1 ((p1 + p2 vl (t))  l=0 p2   vl (t)−1   + (1 − 2p1 − p2 vl+1 (t)) p  1   pvl+1 (t)−2 ) + (v (t) − 1)pvL (t)−L , if C holds 1 L 1 4 (4) where T (t) ≤ n − 1. Proof. The number of vehicles that can be guaranteed to pass the intersection under certain traffic phase depends on the configuration of the first three vehicles in the queue. First, we consider the case that the first three vehicles are in the form of Fig. 5(a) or Fig. 5(d). In this case, at least two vehicles can pass the intersection for the corresponding traffic phase, so we need to consider the rest of the vehicles, i.e., n − 2 vehicles assuming that n is the queue size. Noting that n − 2 vehicles form a sub-queue in this setup, and assuming that T (t) (T (t) ≤ n − 2) vehicles communicate the sub-queue, it is clear that the sub-queue is represented by Queue I. Thus, (3) is obtained by adding two to (2). On the other hand, if the first three vehicles are in the form of Fig. 5(b) or Fig. 5(c), at least one vehicle can pass the intersection at any traffic phase configuration. In this scenario, one vehicle is considered as guaranteed to be transmitted, and the rest of the vehicles (n − 1 vehicles) form a sub-queue. Similar to above discussion, the sub-queue follows Queue I, so (4) is obtained by adding one to (2). This concludes the proof. 4.3 Learning In the previous section, we characterized the expected number of vehicles E(Kiφ (t)) that can pass an intersection at phase φ from queue i. However, in our CAMW algorithm, which solves (1), we do not use E(Kiφ (t)). The reason is that E(Kiφ (t)) is an expected value and its granularity is poor. In other words, if we use E(Kiφ (t)) in (1), we may end up with choosing a traffic phase that allows no vehicles passing the intersection. In this case, the intersection is blocked. More importantly, once the intersection is blocked, if we keep using E(Kiφ (t)) in (1), we may end up with choosing the wrong traffic phase next time with high probability, which leads to a deadlock. To address this issue, we introduce the learning mechanism, which works in the following way. We assume that traffic lights can infer if blocking occurs at intersections, and use this information in future decisions. For example, assume that the selected traffic phase at time t − 1 is φ = 1 (as shown in Fig. 1(a)), and Ẽ(Kiφ=1 (t − 1)) = E(Kiφ=1 (t − 1)). If blocking occurs, then the traffic light can learn that both of the HoL vehicles in south-north bound queues must go left. Using this information, Ẽ(Kiφ=1 (t)) is set to zero at time t so that φ = 1 is not selected again. Ẽ(Kiφ=1 (t+∆)) is set to E(Kiφ=1 (t+∆)) again immediately after some vehicles are transmitted from the queues. This may take ∆ time slots. This learning mechanism applies to both Queue I and Queue II, but in Queue II, separate lanes for each direction makes the learning process by default. I.e., in Queue II, Ẽ(Kiφ (t)) = E(Kiφ (t)), ∀t. 5. PERFORMANCE EVALUATION In this section, we consider an intersection controlled by a traffic light. Each arriving vehicle to the intersection can communicate with probability ρ. Each green phase lasts for one or more time slots. We assume that the arrival rate to each queue in the intersection is the same; i.e., λ1 and λ2 are the same ∀i ∈ {1, 2, 3, 4}. We present the simulation results of our Connectivity-Aware Max-Weight (CAMW) algorithm for both of Queue I and Queue II, as compared to the baseline, the max-weight algorithm, which is briefly described next. 5.1 The baseline: max-weight algorithm The max-weight scheduling algorithm determines a traffic phase as a solution to max ρ 4 X Qi (t)Kiφ (t) i=1 s.t. φ ∈ Φ, (5) where Kiφ (t) is value of Kiφ (t) the weight of queue i for phase φ.1 The depends on the intersection type and the corresponding queuing models, which is explained next. First, let us consider Queue I. If the HoL vehicle in the ith queue can communicate, then Kiφ (t) = 1 for the phase that is aligned with the direction of the HoL vehicle and Kiφ (t) = 0 for the other three phases. If the HoL vehicle 1 Note that Kiφ (t) = 1 in the original max-weight algorithm, while it varies in (5) as explained in this section. Thus, although we call this baseline the max-weight algorithm, it is actually the improved version of the classical max-weight algorithm. 1 2500 2000 1500 1000 250 200 ρ=0.4 150 ρ=0.7 100 ρ=1.0 50 1 CAMW Max−weight 0.8 Intersection efficiency Average queue size 3000 Average queue size ρ=0.4 ρ=0.7 ρ=1.0 Intersection efficiency 300 3500 0.6 0.4 0.2 CAMW Max−weight 0.8 0.6 0.4 0.2 500 2000 4000 6000 8000 Time (a) Max-weight 10000 0 0 2000 4000 6000 8000 0 0 10000 cannot communicate, max-weight considers Kiφ (t) = 1 for the phases that control the ith queue if the queue length is larger than zero. Second, we assume that all the queues in the intersection follow Queue II. In this setup, we take into account the first two vehicles in the dedicated lanes. For example, if the first two vehicles from the ith incoming queue are in the form of Fig. 5(a), then Kiφ (t) = 1 for the left turning phase, and Kiφ (t) = 0 for the other phases. On the other hand, if the first two vehicles are in the form of Fig. 5(b), then Kiφ (t) = 1 for both the left-turning and straight-going phases. 0.4 0.6 0.8 0 0 1 0.8 5.3 Evaluation of CAMW for Queue II In this section, we assume all the queues in the intersection follow Queue II. The evolution of the average queue size of the intersection using CAMW and max-weight algo- 0.8 1 0.6 0.4 0.2 0.2 0.4 0.6 0.8 CAMW Max−weight 0.8 0.6 0.4 0.2 0 1 0.2 0.4 0.6 0.8 1 Total arrival rate to each queue Total arrival rate to each queue (c) ρ = 0.7 (d) ρ = 1.0 Figure 7: Intersection efficiency versus total arrival rate to each queue with different communication probability ρ for Queue I . Each green phase lasts for two time slots and each queue has the same arrival rate and λ1 = 1.5λ2 . 50 60 CAMW Max−weight Average queue size Average queue size I We first assume all the queues in the intersection follow Queue I, and evaluate our CAMW algorithm as compared to the baseline; max-weight. The evolution of the average queue size of the intersection for different scheduling algorithms is presented in Fig. 6. Each green phase lasts for two time slots. The arrival rate is λ1 = 0.18 and λ2 = 0.12 to each of the queue in the intersection. It can be observed that when the communication probability is ρ = 1.0, both of the algorithms have the similar performance. This is because every vehicle can communicate, so the max-weight algorithm, since the traffic light can communicate with the HoL vehicle, can align the phases with the direction of HoL vehicle. However, when the communication probability reduces to ρ = 0.7, max-weight cannot stabilize the queues, while CAMW stabilizes. When ρ = 0.4, neither CAMW nor max-weight can stabilize the queues, because the arrival rates fall out of the stability region. As can be seen CAMW supports higher traffic rates than the max-weight algorithm thanks to exploiting connectivity of vehicles. Fig. 7 presents the intersection efficiency versus total arrival rate to each queue for different communication probability ρ. The intersection efficiency is defined as the ratio of departing traffic to arrival traffic. In this setup, each green phase lasts for two time slots. Each queue has the same arrival rate, and λ1 = 1.5λ2 . It can be observed that when ρ = 1.0, both of the algorithms can achieve very similar intersection efficiency. However, if ρ 6= 1, the intersection efficiency of max-weight scheduling algorithm drops almost to zero, while CAMW can still achieve satisfying intersection efficiency thanks to taking into account heterogeneous communication probabilities. 0.6 1 CAMW Max−weight 60 5.2 Evaluation of CAMW for Queue 0.4 (b) ρ = 0.4 1 0 0 0.2 Total arrival rate to each queue (a) ρ = 0.1 (b) CAMW Figure 6: The average queue size versus time for Queue I . Each green phase lasts for two time slots. The arrival rate is λ1 = 0.18 and λ2 = 0.12 to each of the queue in the intersection. 0.2 Total arrival rate to each queue Time Intersection efficiency 0 Intersection efficiency 0 40 30 20 10 0 0 2000 4000 6000 Time (a) ρ = 0.1 8000 10000 50 CAMW Max−weight 40 30 20 10 0 0 2000 4000 6000 Time 8000 10000 (b) ρ = 0.9 Figure 8: The evolution of the average queue size of the intersection using our algorithm and max-weight algorithm for different communication probability ρ for Queue II. The arrival rate to each queue is λ1 = λ2 = 0.2 and each green phase lasts for two time slots. rithm for different communication probability ρ is presented in Fig. 8. The arrival rate to each queue is λ1 = λ2 = 0.2 and each green phase lasts for two time slots. It can be observed from Fig. 8(a) that when communicating probability ρ is small, CAMW is slightly better than the max-weight algorithm, which is because both of the two algorithm select traffic phases in a similar way when ρ is small. The average queue sizes over 10,000 time slots when ρ = 0.1 using maxweight and CAMW are 10.6601 and 9.0236, respectively. It can be observed from Fig. 8(b) that when communicating probability ρ is large, our algorithm improves much over max-weight algorithm. This is because the estimation accuracy in our algorithm improves as ρ increases, which allows more vehicles to pass at each green phase. When ρ = 0.9, the average queue size over 10,000 time slots using maxweight and CAMW is 10.6601 and 4.3873, respectively. Note that CAMW performs better than max-weight when ρ increases in Queue II, which is against the observation we had in Queue I. The reason is that while ρ affects max-weight’s decision about HoL vehicles as explained in (5) in Queue I, it does not have any effect in Queue II. Fig. 9 presents the intersection efficiency versus total arrival rate to each queue for different communication prob- 1 CAMW Max−weight Intersection efficiency Intersection efficiency 1 0.9 0.8 0.7 0.6 0.5 0.4 0 0.2 0.4 0.6 0.8 Total arrival rate to each queue 0.9 0.7 0.6 0.5 (a) ρ = 0.1 0.2 0.4 0.6 0.8 Total arrival rate to each queue 1 [7] 1 Intersection efficiency CAMW Max−weight 0.9 0.8 0.7 0.6 0.5 0.4 0 0.2 0.4 0.6 0.8 Total arrival rate to each queue (c) ρ = 0.7 1 0.9 CAMW Max−weight 0.8 0.7 [8] 0.6 0.5 0.4 0 0.2 0.4 0.6 0.8 Total arrival rate to each queue 1 (d) ρ = 1.0 Figure 9: Intersection efficiency versus total arrival rate to each queue with different communication probability ρ for Queue II. Each queue has the same total arrival rate and λ1 = λ2 , and each green phase lasts for two time slots. abilities ρ. Each queue has the same total arrival rate and λ1 = λ2 . Each green phase lasts for two time slots. It can be observed that the performance of our algorithm improves as the communicating probability ρ increases, while maxweight has the same performance as ρ changes. The reason is that the estimation accuracy in our algorithm improves as ρ increases, so CAMW performs better than the max-weight algorithm as ρ increases. Note that CAMW improves over max-weight by 14%, which is significant. 6. [9] [10] [11] [12] [13] CONCLUSION In this paper, we considered a transportation system of heterogeneously connected vehicles, where not all vehicles are able to communicate. For this setup, we developed a connectivity-aware max-weight scheduling (CAMW) algorithm by taking into account the connectivity of vehicles. The crucial components of CAMW are expectation and learning components, which determine the estimated number of vehicles that can pass through the intersections by taking into account the heterogeneous communications. The simulations results show that CAMW algorithm significantly improves the intersection efficiency over max-weight. 7. [6] (b) ρ = 0.4 1 Intersection efficiency [5] 0.8 0.4 0 1 CAMW Max−weight REFERENCES [1] Transportation energy databook, edition 26. Time Magazine. http://cta.ornl.gov/data/new for edition26.shtml. [2] K. Aboudolas, M. Papageorgiou, and E. Kosmatopoulos. Store-and-forward based methods for the signal control problem in large-scale congested urban road networks. Transp. Res.-C., 17(2):163–174, April 2009. [3] E. Cascetta, M. Gallo, and B. Montella. Models and algorithms for the optimization of signal settings on urban networks with stochastic assignment models. Ann. Oper. Res., 144(1):301–328, May 2006. [4] C. Diakaki, M. Papageorgiou, and K. Aboudolas. A multivariable regulator approach to traffic-responsive [14] [15] [16] [17] [18] [19] [20] [21] [22] network-wide signal control. Control Eng. Practice, 10(2):183–195, February 2002. A. D. Febbraro, D. Giglio, and N. Sacco. On applying petri nets to determine optimal offsets for coordinated traffic light timings. In Proc. IEEE 5th Int. Conf. Intell. Transportation Syst., pages 773–778, September 2002. N. H. Gartner. Opac: A demand-responsive strategy for traffic signal control. Transp. Res. Rec., (906):75–81, December 1983. J. Gregoire, E. Frazzoli, A. de La Fortelle, and T. Wongpiromsarn. Backpressure traffic signal control with unknown routing rates. In Proc. of IFAC World Congress, August 2014. J. Gregoire, X. Qian, E. Frazzoli, A. Fortelle, and T. Wongpiromsarn. Capacity-aware backpressure traffic signal control. IEEE Trans. Control Netw. Syst., 2(2):164–173, June 2015. D. Heidemann. Queue length and delay distributions at traffic signals. Transp. Res.-B., 28(5):377–389, October 1994. J.-J. Henry, J.-L. Farges, and J. Tuffal. The prodyn real time traffic algorithm. In Proc. of the 4th IFAC/IFORS Conference on Control in Transportation Systems. Baden-Baden, Federal Republic of Germany, April 1983. P. Hunt, D. Robertson, R. Bretherton, and M. Royle. The scoot on-line traffic signal optimisation technique. Traffic Eng. Control, 23(4), 1982. H. K. Lo, E. Chang, and Y. C. Chan. Dynamic network traffic control. Transp. Res.-A., 35(8):721–744, September 2001. P. Lowrie. Scats, sydney co-ordinated adaptive traffic system: A traffic responsive method of controlling urban traffic. Roads and Traffic Authority NSW, 1990. A. J. Miller. Settings for fixed-cycle traffic signals. Oper. Res. Q., 14(4):373–386, December 1963. P. B. Mirchanadani and N. Zou. Queuing models for analysis of traffic adaptive signal control. IEEE Trans. Intell. Transp. Syst., 8(1):50–59, March 2007. P. Mirchandani and L. Head. A real-time traffic signal control system: architecture, algorithms, and analysis. Transp. Res.-C., 9(6):415–432, December 2001. M. J. Neely. Dynamic power allocation and routing for satellite and wireless networks with time varying channels. PhD thesis, Massachusetts Institute of Technology, PhD thesis, LIDS, 2003. M. J. Neely, E. Modiano, and C. E. Rohrs. Dynamic power allocation and routing for time-varying wireless networks. IEEE J. Sel. Areas Commun., 23(1):89–103, January 2005. G. F. Newell. Approximation methods for queues with applications to the fixed-cycle traffic light. SIAM Rev., 7(2):223–240, April 1965. C. Osorio and M. Bierlaire. A surrogate model for traffic optimization of congested networks: an analytic queueing network approach. Report TRANSP-OR, 90825:1–23, August 2009. D. Schrank, B. Eisele, and T. Lomax. Urban mobility report. December 2012. L. Tassiulas and A. Ephremides. Stability properties [23] [24] [25] [26] [27] [28] of constrained queueing systems and scheduling policies for maximum throughput in multihop radio networks. IEEE Trans. Autom. Control, 37(12):1936–1948, December 1992. P. Varaiya. A universal feedback control policy for arbitrary networks of signalized intersections. tech. rep., September 2009. P. Varaiya. Max pressure control of a network of signalized intersections. Transp. Res.-C., 36:177–195, November 2013. P. Varaiya. The max-pressure controller for arbitrary networks of signalized intersections. Advances in Dynamic Network Modeling in Complex Transportation Systems, Springer, 2013. F. V. Webster. Traffic signal settings. Road Res. Lab., Ministry Transport, HMSO, London, U.K., pages 1–43, 1958. T. Wongpiromsarn, T. Uthaicharoenpong, Y. Wang, E. Frazzoli, and D. Wang. Distributed traffic signal control for maximum network throughput. In 2012 15th Int. Conf. Intell. Transportation syst. (ITSC), pages 588–595. Anchorage, Alaska, USA, September 2012. S. Zhou and H. Seferoglu. Blocking avoidance in transportation systems. arXiv:1508.06173v2 [cs.SY], August 2015. APPENDIX A. PROOF OF THEOREM 1 In this section, we specifically focus on the calculation of E(Kiφ=1 (t)), where φ = 1 corresponds to the phase in Fig. 1(a) to explain our the proof in an easier way. Note that E(Kiφ=1 (t)) calculation can be directly generalized to E(Kiφ (t)), ∀φ ∈ Φ. We first derive the calculation of E(Kiφ=1 (t)) when all communicating vehicles are going straight. The calculation of E(Kiφ=1 (t)) for other cases will be obtained based on this derivation. If all communicating vehicles are going straight at time slot t, we can consider the queue as divided into (T + 1) blocks by the T communicating vehicles. (Note that T is the number of communicating vehicles in a queue). Let a random variable J denote the number of vehicles that can pass the intersection. The probability that j vehicles pass the intersection is P [J = j], and it behaves similarly to the geometric distribution. However, the probability distribution is different when j falls into different blocks due to the communicating vehicles that go straight. To be more precise, we have  pj1 p2 ,   j−1   p   1 p2 , .. P [J = j] = .     pj−T p 2,  1  pn−T , 1 1 ≤ j ≤ v1 − 2 v1 ≤ j ≤ v2 − 2 Using (6), we can obtain the expected number of vehicles that can pass the intersection as E(Kiφ=1 (t)) when all communicating vehicles are going straight. I.e., v1 −2 E(Kiφ=1 (t)) = vT ≤ j ≤ n − 1 j=n Note that P [J = v1 − 1], P [J = v2 − 1], · · · , P [J = vT − 1] are all 0. The reason is that the communicating vehicles at locations v1 , v2 , · · · , vT are all going straight, and if vl − 1 vehicles can pass the intersection. Then, vl vehicles can pass the intersection for sure (l = 1, 2, · · · , T ). v2 −2 jpj1 p2 + j=1 X jpj−1 p2 + · · · 1 j=v1 n−1 X jpj−T p2 + npn−T 1 1 (7) 1−l jpj−l p2 1 p2 can be expressed as p1 Pvl+1 −2 + j=vT In (7), jpj−1 1 Pvl+1 −2 j=vl = p1−l 1 p2 ∂( Pvl+1 −2 j p1 ) j=v = l ∂p1 v −2 p2 vl+1 )p1l+1 ). p1−l 1 p2 ((p1 + v −1 p2 vl )p1l j=vl + (1 − 2p1 − Thus, we can obtain E(Kiφ=1 (t)) when all communicating vehicles are going straight as E(Kiφ=1 (t)) = T X p1−l v −1 1 ((p1 + p2 vl )p1l p 2 l=0 v +(1 − 2p1 − p2 vl+1 )p1l+1 −2 ) + npn−T 1 (8) Note that we have v0 = 1, vT +1 = n + 1 in (8) to make it consistent with (7). When there are some communicating vehicles going left, let vL (t) be the location of the first communicating vehicle that goes left. There are (L − 1) communicating vehicles in front of vL (t) that going straight and (T − L) communicating vehicles behind vL (t) which will be blocked for sure. Now, we only focus on the vehicles between the location 1 to (vL (t) − 1). There are (L − 1) communicating vehicles among them, and all of the communicating vehicles are going straight. Thus, we can use the similar analysis as used in (7) except that now the maximum number of vehicles that can pass the intersection is (vL (t) − 1) instead of n. Therefore, we have the expected number of vehicles that can pass the intersection E(Kiφ=1 (t)) when the first communicating vehicle that turns left is at location vL (t). Thus, E(Kiφ=1 (t)) = L−1 X p1−l 1 ((p1 + p2 vl )pv1l −1 + p2 l=0 v −2 (1 − 2p1 − p2 vl+1 )p1l+1 v (t)−L (9) ) + (vL (t) − 1)p1L By taking into account all the (T + 1) situations, we conclude that  1−l PT (t) p1 ((p1 + p2 v (t))pvl (t)−1  l  1 l=0 p2   vl+1 (t)−2   +(1 − 2p ) 1 − p2 vl+1 (t))p1    n−T (t)   , if C1 holds +np  1 E(Kiφ (t)) =   P p1−l v (t)−1  1  L−1 ((p1 + p2 vl (t))p1l  l=0 p2   vl+1 (t)−2   +(1 − 2p1 − p2 vl+1 (t))p1 )    +(v (t) − 1)pvL (t)−L , if C holds. L (6) X 1 2 (10) By following the same analysis, we can obtain for φ = 2, 3, 4. This concludes the proof. E(Kiφ (t))
3cs.SY
Object Recognition by Using Multi-level Feature Point Extraction Yang Cheng, Timeo Dubois arXiv:1710.10522v1 [cs.CV] 28 Oct 2017 1 Abstract In this paper, we present a novel approach for object recognition in real-time by employing multilevel feature analysis and demonstrate the practicality of adapting feature extraction into a Naive Bayesian classification framework that enables simple, efficient, and robust performance. We also show the proposed method scales well as the number of level-classes grows. To effectively understand the patches surrounding a keypoint, the trained classifier uses hundreds of simple binary features and models class posterior probabilities. In addition, the classification process is computationally cheap under the assumed independence between arbitrary sets of features. Even though for some particular scenarios, this assumption can be invalid. We demonstrate that the efficient classifier nevertheless performs remarkably well on image datasets with a large variation in the illumination environment and image capture perspectives. The experiment results show consistent accuracy can be achieved on many challenging dataset while offer interactive speed for large resolution images. The method demonstrates promising results that outperform the state-of-the-art methods on pattern recognition. 1 2 Introduction In the literature, one common idea image feature extraction is to focus on finding strong features that is robust enough to deal with perspective changes, lighting variations, such as SIFT local patterns detection and combines the output of the classifiers. Plagemann et al.6 create a novel interest point detector for catching body components from depth images. Identifying textured patches surrounding keypoints across images acquired under widely varying poses and lightning conditions is at the heart of many Computer Vision algorithms 1 . The resulting correspondences can be used to register different views of the same scene, extract 3D shape information, or track objects across video frames. Correspondences also play a major role in object category recognition and image retrieval applications 2 . Because of its strength to fractional impediments and computational proficiency, acknowledgment of picture patches removed around distinguished key focuses is critical for some vision issues. Therefore, two fundamental classes of methodologies have been produced to accomplish power to point of view and lighting changes 3 . The primary family depends on nearby descriptors intended to be invariant, or possibly hearty, to particular classes of distortions 4 . An inferior depends on measurable learning procedures to figure a probabilistic model of the fix. 2 3 A Semi-naive Bayesian approach to patch recognition Picture patches can be perceived on the premise of extremely straightforward and arbitrarily picked double tests that are gathered into choice trees and recursively parcel the space of all conceivable patches. By and by, no single tree is sufficiently discriminative when there are many classes. In any case, utilizing various trees and averaging their votes yields great outcomes in light of the fact that everyone parcels the component space in an unexpected way 5 . Formulation of Feature Combination Given the patch surrounding a key point detected in an image, our task is to assign it to the most likely class. Let Ci, I= 1, H Be the set of classes and let fj, j= 1, N Be the set of binary features that will be calculated over the patch we are trying to classify. Formally, we are looking for Ci = argC imaxP (C = ci |f 1, f 2, ..., fN ) Where C is a random variable that represents the class. Bayes’s formula yields P (C = ci |f 1, f 2, ..., fN ) = c)P (C = ci ) p(f 1, f 2, ..., fN ) [As the denominator is simply a scaling factor, it can be reduced to] 3 Ci = argC imaxP (C = ci |f 1, f 2, ..., fN ) fj =     1if I(dj ,1 ) < I(dj ,2 )    0otherwise Where I represents the image patch 7 . (As the features specified are pretty simple, so N 300. So) P (f 1, f 2, ....., fN |C = ci ) = N Y P (fj |C = ci ) j=1 4 Comparison With Randomized Trees As shown in Figures 3 and 4, Ferns can be considered as simplified trees. To compare RTs and Ferns, we experimented with the three images of Figure 5. Greeneries vary from trees in two vital regards: The probabilities are increased in a NaiveBayesian manner as opposed to being arrived at the midpoint of and the various leveled structure is supplanted by a level one. The preparation set is acquired by arbitrarily twisting pictures of Figure 5. To play out these 4 examinations, we speak to relative picture disfigurements as 22 networks of the shape. R0 R− ∅diag(λ1, λ2)R∅ Where diag (?1, ?2) is a corner to corner 2 2 framework and R? speaks to a revolution of point ? . Both to prepare and to test our greeneries, we distorted the first pictures utilizing such misshapenness registered by arbitrarily picking ? and f in the [0: 2p] territory and ?1 and ?2 in the 5 [0.6: 1.5] territory. Fig. 6 delineates patches encompassing individual intrigue focuses first in the first pictures and after that in the distorted ones 7 . We utilized 30 irregular relative distortions for each level of pivot to create 10800 pictures. For the most part the test set is acquired by creating a different arrangement of 1000 pictures in a similar relative twisting extent and including clamor. In Figure 7, we plot the outcomes as an element of the quantity of trees or Ferns being utilized. We first note that utilizing either level Fern or progressive tree structures does not influence 6 the acknowledgment rate, which was not out of the ordinary as the components are taken totally at irregular. Moreover as the scramble plots of Figure 7 appear, for the Naive-Bayesian blend the acknowledgment rate on individual twisted pictures never falls beneath a worthy rate. 5 Experiments It is hard to play out a totally reasonable speed examination between our Ferns and SIFT for a few reasons 16 . Filter reuses moderate information from the key guide extraction toward register canonic scale and introductions and the descriptors, while greeneries can depend on a minimal effort key-point extraction 8 . Ferns vs SIFT to detect 3D objects So far we have considered that the key-focuses lie on a planar protest and assessed the heartiness of Ferns concerning viewpoint impacts. This rearranges preparing as a solitary view is adequate and the known 2D geometry can be utilized to figure ground truth correspondences. However most protests have really three dimensional appearance, which suggests that self-impediments and complex enlightenments impacts must be considered to effectively assess the execution of any key-point coordinating calculation 9 . Figure 11 shows such pictures traversing a 70? camera revolution go. We utilized this picture database to assess the execution of Ferns for an assortment of 3D items. We look at our outcomes against the SIFT identifier/descriptor match which has been found to perform extremely well on this database. The key-focuses and the descriptors are registered utilizing an indistinguishable programming from some time recently. We acquired the ground truth by utilizing simply geometric strategies, which is conceivable on the grounds that the cameras and the turn table are adjusted 7 10 . The underlying correspondences are acquired by utilizing the trifocal geometry between the top/base cameras in the inside view and each other camera as outlined by Figure 12 15 . We then reproduce the 3D focuses for each such correspondence in the base/focus camera arrange casing and utilize these to frame the underlying tracks that traverse the-35?/+35?rotation territory around a focal view. At last to build power against spurious tracks framed by anomalies, we take out tracks covering less than 30percent of the perspectives and the rest of the tracks shape the ground 8 truth for the assessment 13 , which is free of exceptions. Test ground truth information is portrayed by Figure 13, which demonstrates the mind boggling varieties in fix appearance incited by the 3D structure of the items 11 . 6 Panorama and 3D Scene Annotation With the current expansion of cell phones with huge handling power, there has been a surge of enthusiasm for building genuine applications that can consequently explain the photographs and give helpful data about spots of intrigue. We have tried Ferns on two such applications, comment of display scenes and parts of a verifiable working with 3D structure 14 . Both applications run easily at casing rate utilizing a standard portable PC and an of the rack web camera. By applying standard improvements for implanted equipment, we have ported this execution onto a cell phone that keeps running at a couple outlines for every second. 9 7 Conclusion We have introduced an intense strategy for picture fix acknowledgment that performs well even within the sight of extreme viewpoint twisting. A key part of our approach is the Naive-Bayesian blend of classifiers that obviously beats the averaging of probabilities we utilized as a part of prior work. We have demonstrated that such a credulous mix methodology is a beneficial option when the particular issue is not excessively delicate to the suggested autonomy suspicions. 8 References 1. Thomas Mrwald, Markus Liu, ”Self-monitoring to improve robustness of 3D object tracking for robotics”, Robotics and Biomimetics (ROBIO) 2011 IEEE International Conference on, pp. 10 2830-2837, 2013. 2. Jun-Sik Kim, Makoto Lee, Joo Xavier, Pedro Aguiar, Takeo Kanade, ”6D pose estimation of textureless shiny objects using random ferns for bin-picking”, Intelligent Robots and Systems (IROS) 2012 IEEE/RSJ International Conference on, pp. 3334-3341, 2002, ISSN 2153-0858. 3. J. Shen and J. Yang, “Automatic human animation for non-humanoid 3d characters,” International Conference on Computer-Aided Design and Computer Graphics (CAD/Graphics), pp. 220-221, 2015. 4. Wei Xiong, Shue Ching Chia, Yue Chen, Weimin Huang, Jiayin Zhou, Yufeng Zhou, Wilson Gao, Kae Jack Tay, Henry Ho, ”Prostate boundary segment extraction using cascaded shape regression and optimal surface detection”, Engineering in Medicine and Biology Society (EMBC) 2014 36th Annual International Conference of the IEEE, pp. 2886-2889, 2010, ISSN 1557170X. 5. Dominik Sibbing, Bastian Liu, Leif Kobbelt, ”SIFT-Realistic Rendering”, 3DTV-Conference 2013 International Conference on, pp. 56-63, 2015. 6. Shu Wang, Mei Xie, ”Iris matching using ferns classifier”, Wavelet Active Media Technology and Information Processing (ICWAMTIP) 2012 International Conference on, pp. 109-112, 2014. 7. Ronny Hnsch, Xiaohong Zhao, ”Machine-learning based detection of corresponding interest points in optical and SAR images”, Geoscience and Remote Sensing Symposium (IGARSS) 2014 IEEE International, pp. 1492-1495, 2016, ISSN 2153-7003. 11 8. Shaoguo Zhang, Yiyi Wei, Chunhong Pan, ”BB-Homography: Joint Binary Features and Bipartite Graph Matching for Homography Estimation”, Circuits and Systems for Video Technology IEEE Transactions on, vol. 25, pp. 239-250, 2011, ISSN 1051-8215. 9. J. Shen and S. C. S. Cheung, “Layer Depth Denoising and Completion for Structured-Light RGB-D Cameras,” IEEE Conference on Computer Vision and Pattern Recognition, pp. 11871194, 2013. 10. Hideaki Uchiyama, Jia Li, Eric Marchand, ”Toward augmenting everything: Detecting and tracking geometrical features on planar objects”, Mixed and Augmented Reality (ISMAR) 2011 10th IEEE International Symposium on, pp. 17-25, 2015. 11. J. Shen, P. C. Su, S. c. S. Cheung, J. Zhao, “Virtual mirror rendering with stationary rgb-d cameras and stored 3-d background,” IEEE Transactions on Image Processing, vol. 22, no. 9, pp. 3433-3448, 2013. 12. Taiki Fuji, Toshio Moriya, ”Furniture layout AR application using floor plans based on planar object tracking”, RO-MAN 2012 IEEE, pp. 670-675, 2002, ISSN 1944-9445. 13. Yasue Mitsukura, Wei Xiong, Yue Wang, Shue Ching Chia, Wenyu Chen, Jia Du, Ying Gu, Victor Ter Shen Kow, ”CHORD: Cascaded and a contrario method for hole crack detection”, Image Processing (ICIP) 2015 IEEE International Conference on, pp. 3300-3304, 2011. 14. Victor Eruhimov, Y. Konishi, C. Beltran, V. Murino, A. Del Bue, ”Fast 6D pose from a single RGB image using Cascaded Forests Templates”, Intelligent Robots and Systems (IROS) 2016 IEEE/RSJ International Conference on, pp. 4062-4069, 2010, ISSN 2153-0866. 12 15. E. Muoz, Wim Meeussen, ”Outlet detection and pose estimation for robot continuous operation”, Intelligent Robots and Systems (IROS) 2011 IEEE/RSJ International Conference on, pp. 2941-2946, 2010, ISSN 2153-0858. 16. J. Shen and W. Tan, “Image-based indoor place-finder using image to plane matching,” IEEE International Conference on Multimedia and Expo, pp. 1-6, 2013. 13
1cs.CV
Strategically Knowing How arXiv:1705.05254v1 [cs.AI] 15 May 2017 Raul Fervari Universidad Nacional de Córdoba, and CONICET, Argentina Andreas Herzig University of Toulouse, IRIT, Toulouse, France Abstract In this paper, we propose a single-agent logic of goal-directed knowing how extending the standard epistemic logic of knowing that with a new knowing how operator. The semantics of the new operator is based on the idea that knowing how to achieve φ means that there exists a (uniform) strategy such that the agent knows that it can make sure φ. We give an intuitive axiomatization of our logic and prove the soundness, completeness and decidability of the logic. The crucial axioms relating knowing that and knowing how illustrate our understanding of knowing how in this setting. This logic can be used in representing both knowledgethat and knowledge-how. 1 Introduction Standard epistemic logic focuses on reasoning about propositional knowledge expressed by knowing that φ [Hintikka, 1962]. However, in natural language, various other knowledge expressions are also frequently used, such as knowing what, knowing how, knowing why, and so on. In particular, knowing how receives much attention in both philosophy and AI. Epistemologists debate about whether knowledge-how is also propositional knowledge [Fantl, 2008], e.g., whether knowing how to swim can be rephrased using knowing that. In AI, it is crucial to let autonomous agents know how to fulfill certain goals in robotics, game playing, decision making, and multi-agent systems. In fact, a large body of AI planning can be viewed as finding algorithms to let the autonomous planner know how to achieve some propositional goals, i.e., to obtain goaldirected knowledge-how [Gochet, 2013]. Here, both propositional knowledge and knowledge-how matter, especially in the planning problems where initial uncertainty and nondeterministic actions are present. From a logician’s point of view, it is interesting to see how knowing how interact with knowing that, and how they differ in their reasoning patterns. A logic of knowing how also helps us to find a consistency notion regarding knowledge database with knowing how expressions. ∗ corresponding author, [email protected] Yanjun Li University of Groningen The Netherlands test s1 : p, ¬q // s3 : p, ¬q Yanjing Wang∗ Peking University, China pills // s5 : ¬p, ¬q pills test s2 : p, q // s4  : p, q surgery ,, 11 s6 : ¬p, q pills Figure 1: A scenario representing how to cure the pain. Example 1.1. Consider the scenario where a doctor needs a plan to treat a patient and cure his pain (p), under the uncertainty about some possible allergy (q). If there is no allergy (¬q) then simply taking some pills can cure the pain, and the surgery is not an option. On the other hand, in presence of the allergy, the pills may cure the pain or have no effect at all, while the surgery can cure the pain for sure. The model from Figure 1 represents this scenario with an additional action of testing whether q. The dotted line represents the initial uncertainty about q, and the test on q can eliminate this uncertainty (there is no dotted line between s3 and s4 ). According to the model, to cure the pain (guarantee ¬p) at the end, it makes sense to take the surgery if the result of the test of whether q is positive and take the pills otherwise. We can say the doctor in this case knows how to cure the pain. How to formalize the knowledge-how of the agent in such scenarios with uncertainty? Already since the early days of AI, people have been looking at it in the setting of logics of knowledge and action [McCarthy and Hayes, 1969; McCarthy, 1979; Moore, 1985; Lespérance et al., 2000; van der Hoek et al., 2000]. However, there has been no consensus on how to capture the logic of “knowing how” formally (cf. the recent surveys [Gochet, 2013] and [Ågotnes et al., 2015]). The difficulties are well discussed in [Jamroga and Ågotnes, 2007] and [Herzig, 2015] and simply combining the existing modalities for “knowing that” and “ability” in a logical language like ATEL [van der Hoek and Wooldridge, 2003] does not lead to a genuine notion of “knowing how”, e.g., knowing how to achieve p is not equivalent to knowing that there exists a strategy to make sure p. It does not work even when we replace the strategy by uniform strategy where the agent has to choose the same action on indistinguishable states [Jamroga and Ågotnes, 2007]. Let φ(x) express that x is a way to make sure some goal is achieved, and let K be the standard knowledge-that modal- ity. There is a crucial distinction between the de dicto reading of knowing how (K∃xφ(x)) and the desired de re reading (∃xKφ(x)) endorsed also by linguists and philosophers [Stanley and Williamson, 2001]. The latter implies the former, but not the other way round. For example, consider a variant of Example 1.1 where no test is available: then the doctor has de dicto knowledge-how to cure, but not the de re one. Proposals to capture the de re reading have been discussed in the literature, such as making the knowledge operator more constructive [Jamroga and Ågotnes, 2007], making the strategy explicitly specified [Herzig et al., 2013; Belardinelli, 2014], or inserting K in-between an existential quantifier and the ability modality in see-to-that-it (STIT) logic [Broersen and Herzig, 2015]. In [Wang, 2015; Wang, 2016b], a new approach is proposed by introducing a single new modality Kh of (conditional) goal-directed knowing how, instead of breaking it down into other modalities. This approach is in line with other de re treatments of non-standard epistemic logics of knowing whether, knowing what and so on (cf. [Wang, 2016a] for a survey). The semantics of Kh is inspired by the idea of conformant planning based on linear plans [Smith and Weld, 1998; Yu et al., 2016]. It is shown that Kh is not a normal modality, e.g, knowing how to get drunk and knowing how to drive does not entail knowing how to drive when drunk. The work is generalized further in [Li and Wang, 2017; Li, 2017]. However, in these previous works, there was no explicit knowing that modality K in the language and the semantics of Kh is based on linear plans, which does not capture the broader notion allowing branching plans or strategies that are essential in the scenarios like Example 1.1. In this paper, we extend this line of work largely in the following aspects: • Both the knowing how modality Kh and knowing that modality K are in the language. • In contrast to the state-independent semantics [Wang, 2015; Wang, 2016b], we interpret Kh locally w.r.t. the current uncertainty. • Instead of linear plans in [Wang, 2015], the semantics of our Kh operator is based on strategies (branching plans). The intuitive idea behind our semantics of Kh is that the agent knows how to achieve φ iff (s)he has an executable uniform strategy σ such that the agent knows that: • σ guarantees φ in the end given the uncertainty; • σ always terminates after finitely many steps. Note that for an agent to know how to make sure φ, it is not enough to find a plan which works de facto, but the agent should know it works in the end. This is a strong requirement inspired by planning under uncertainty, where the collection of final possible outcomes after executing the plan is required to be a subset of the collection of the goal states [Geffner and Bonet, 2013]. Technically, our contributions are summarized as follows: • A logical language with both Kh and K operators with a semantics which fleshes out formally the above intuitions about knowing how. • A complete axiomatization with intuitive axioms. • Decidability of our logic. The paper is organized as follows: Section 2 lays out the language and semantics of our framework; Section 3 proposes the axiomatization and proves its soundness; We prove the completeness of our proof system and show the decidability of the logic in Section 4 before we conclude with future work. 2 Language and Semantics Let PROP be a countable set of propositional symbols. Definition 2.1 (Language). The language is defined by the following BNF where p ∈ PROP: φ := p | ¬φ | (φ ∧ φ) | Kφ | Khφ. We use ⊥, ∨, → as usual abbreviations and write K̂ for ¬K¬. Definition 2.2 (Models). A model M is a quintuple a hW, ACT, ∼, {− →| a ∈ ACT}, V i where: • W is a non-empty set, • ACT is a set of actions, • ∼ ⊆ W × W is an equivalence relation on W , a • − → ⊆ W × W is a binary relation on W , and • V : W → 2PROP is a valuation. Note that the labels in ACT do not appear in the language. The graph in Example 1.1 represents a model with omitted self-loops of ∼ (dotted lines), and the equivalence classes induced by ∼ are {s1 , s2 }, {s3 }, {s4 }, {s5 }, {s6 }. In this paper a we do not require any properties between ∼ and − → to lay out the most general framework. We will come back to particular assumptions like perfect recall at the end of the paper. Given a a model and a state s, if there exists t such that s − → t, we say that a is executable at s. Also note that the actions can be non-deterministic. For each s ∈ W , we use [s] to denote the equivalence class {t ∈ W | s ∼ t}, and use [W ] to denote the collection of all the equivalence classes on W w.r.t. ∼. a We use [s] − → [t] to indicate that there are s′ ∈ [s] and t′ ∈ [t] a a → t′ . If there is t ∈ W such that [s] − → [t], we such that s′ − say a is executable at [s]. Definition 2.3 (Strategies). Given a model, a (uniformly executable) strategy is a partial function σ : [W ] → ACT such that σ([s]) is executable at all s′ ∈ [s]. Particularly, the empty function is also a strategy, the empty strategy. Note that the executability is as crucial as uniformity, without which the knowledge-how may be trivialized. We use dom(σ) to denote the domain of σ. Function σ can be seen as a binary relation such that ([s], a), ([s], b) ∈ σ implies a = b. Therefore, if τ is a restriction of σ, i.e. τ ⊆ σ, it follows that dom(τ ) ⊆ dom(σ), and τ ([s]) = σ([s]) for all [s] ∈ dom(τ ). Definition 2.4 (Executions). Given a strategy σ w.r.t a model M, a possible execution of σ is a possibly infinite sequence σ([si ]) of equivalence classes δ = [s0 ][s1 ] · · · such that [si ] −−−−→ [si+1 ] for all 0 ≤ i < |δ|. Particularly, [s] is a possible execution if [s] 6∈ dom(σ). If the execution is a finite sequence [s0 ] · · · [sn ], we call [sn ] the leaf-node, and [si ](0 ≤ i < n) an inner-node w.r.t. this execution. If it is infinite, then all [si ](i ∈ N) are inner-nodes. A possible execution of σ is complete if it is infinite or its leaf-node is not in dom(σ). Given δ = [s0 ] · · · [sn ] and µ = [t0 ] · · · [tm ], we use δ ⊑ µ to denote that µ extends δ, i.e., n ≤ m and [si ] = [ti ] for all 0 ≤ i ≤ n. If δ ⊑ µ, we define δ ⊔ µ = µ. We use CELeaf(σ, s) to denote the set of all leaf-nodes of all the σ’s complete executions (can be many due to non-determinism) starting from [s], and CEInner(σ, s) to denote the set of all the inner-nodes of σ’s complete executions starting from [s]. CELeaf(σ, s) ∩ CEInner(σ, s) = ∅ since if [s] is a leaf-node of a complete execution then σ is not defined at [s]. Definition 2.5 (Semantics). Given a pointed model M, s, the satisfaction relation  is defined as follows: M, s  p ⇐⇒ p ∈ V(s) M, s  ¬φ ⇐⇒ M, s 2 φ M, s  φ ∧ ψ ⇐⇒ M, s  φ and M, s  ψ M, s  Kφ ⇐⇒ for all s′ : s∼s′ implies M, s′  φ M, s  Khφ ⇐⇒ there exists a strategy σ such that 1.[t]⊆JφK for all [t]∈CELeaf(σ, s) 2. all its complete executions starting from [s] are finite, where JφK = {s ∈ W | M, s  φ}. Note that the two conditions for σ in the semantics of Kh reflect our two intuitions mentioned in the introduction. The implicit role of K in Kh will become more clear when the axioms are presented. Going back to Example 1.1, we can verify that Kh¬p holds on s1 and s2 due to the strategy σ = {{s1 , s2 } 7→ test, {s3 } 7→ pills, {s4 } 7→ surgery}. Note that CELeaf(σ, s) = {[s5 ], [s6 ]} = {{s5 }, {s6 }} and J¬pK = {s5 , s6 }. On the other hand, Kh¬q is not true on s1 : although the agent can guarantee ¬q de facto on s1 by taking a strategy such that {s1 , s2 } 7→ test and {s3 } 7→ pills, he cannot know it beforehand since nothing works at s2 to make sure ¬q. Readers may also verify that Kh(p ↔ q) holds at s1 and s2 (hint: a strategy is a partial function). 3 Axiomatization 3.1 The proof system System SKH Axioms TAUT DISTK T 4 5 AxKtoKh AxKhtoKhK AxKhtoKKh AxKhKh AxKhbot Rules: MP MONOKh all axioms of propositional logic Kp ∧ K(p → q) → Kq Kp → p Kp → KKp ¬Kp → K¬Kp Kp → Khp Khp → KhKp Khp → KKhp KhKhp → Khp Kh⊥ → ⊥ ϕ, ϕ → ψ ψ ϕ→ψ Khϕ → Khψ NECK SUB ϕ Kϕ ϕ(p) ϕ[ψ/p] Note that we have S5 axioms for K. AxKtoKh says if p is known then you know how to achieve p by doing nothing (we allow the empty strategy). AxKhtoKhK reflects the first condition in the semantics that the goal is known after the executions. We will come back to this axiom at the end of the paper. Note that the termination condition is not fully expressible in our language but AxKhbot captures part of it by ruling out strategies that have no terminating executions at all. AxKhKh essentially says that the strategies can be composed. Its validity is quite involved, to which we devote the next subsection. Finally, AxKhtoKKh is the positive introspection axiom for Kh, whose validity is due to uniformity of the strategies on indistinguishable states. The corresponding negative introspection can be derived by using AxKhtoKKh, 5 and T: Proposition 3.1. ⊢ ¬Khp → K¬Khp. Proof. (1) ¬KKhp → ¬Khp (2) K¬KKhp → K¬Khp (3) ¬KKhp → K¬KKhp (4) ¬KKhp → K¬Khp (5) ¬Khp → ¬KKhp (6) ¬Khp → K¬Khp AxKhtoKKh (1), NECK 5 (2), (3), MP T (4), (5), MP Note that we do not have the K axiom for Kh. Instead, we have the monotonicity rule MONOKh. In fact, the logic is not normal, as desired, e.g., Khp ∧ Khq → Kh(p ∧ q) is not valid: the existence of two different strategies for different goals does not imply the existence of a unified strategy to realize both goals. 3.2 Validity of AxKhKh AxKhKh is about the “sequential” compositionality of strategies. Suppose on some pointed model there is a strategy σ to guarantee that we end up with the states where on each s of them we have some other strategy σs to make sure p (KhKhp). Since the strategies are uniform, we only need to consider some σ[s] for each [s]. Now to validate AxKhKh, we need to design a unified strategy to compose σ and those σ[s] into one strategy to still guarantee p (Khp). The general idea is actually simple: first ordering those leafnodes [s] (using Axiom of Choice); then by transfinite induction adjust σ[s] one by one to make sure these strategies can fit together as a unified strategy θ; finally, merge the relevant part of σ with θ into the desired strategy. We make this idea precise below. First we need an observation: Proposition 3.2. Given strategies τ and σ with τ ⊆ σ, if [s] ∈ dom(τ ) and dom(σ) ∩ CELeaf(τ, s) = ∅, then a sequence is σ’s complete execution from [s] if and only if it is τ ’s complete execution from [s]. Proof. Left to Right: Let [s0 ] · · · [sn ] · · · be a σ’s complete execution from [s]. We will show it is also a τ ’s complete execution from [s]. Firstly, we show it is a possible execution give τ from [s]. If it is not, there exists [si ] such that [si ] is not the leaf-node of this execution and that [si ] 6∈ dom(τ ). Let [sj ] be the minimal equivalence class in the sequence with such properties. It follows that [sj ] ∈ CELeaf(τ, s) and [sj ] ∈ dom(σ). These are contradictory with dom(σ) ∩ CELeaf(τ, s) = ∅. Next we will show that [s0 ] · · · [sn ] · · · be a τ ’s complete execution from [s]. It is obvious if the sequence is infinite. If it is finite, let the leaf-node is [sm ]. It follows that [sm ] 6∈ dom(σ). Since τ ⊆ σ, it follows [sm ] 6∈ dom(τ ). Therefore, the execution is complete given τ . Right to Left: Let [s0 ] · · · [sn ] · · · be a τ ’s complete execution from [s], we will show it is also a σ’s complete execution from [s]. Since τ ⊆ σ, it is also a possible execution given σ. If the execution is infinite, it is obvious. If it is finite, let the leaf-node is [sm ]. It follows that [sm ] ∈ CELeaf(τ, s). Since dom(σ) ∩ CELeaf(τ, s) = ∅, it follows that [sm ] 6∈ dom(σ). Therefore, the execution is also complete give σ. Proposition 3.3.  KhKhφ → Khφ. Proof. Supposing M, s  KhKhφ, we will show that M, s  Khφ. It follows by the semantics that there exists a strategy σ such that all σ’s complete executions from [s] are finite and [t] ⊆ JKhφK for all [t] ∈ CELeaf(σ, s) (∗). If [s] 6∈ dom(σ), then CELeaf(σ, s) = {[s]}, and then it is trivial that M, s  Khφ. Next we focus on the case of [s] ∈ dom(σ). According to well-ordering theorem (equivalent to Axiom of Choice), we assume CELeaf(σ, s) = {Si | i < γ} where γ is an ordinal number and γ ≥ 1. Let si be an element in Si ; then [si ] = Si . Since M, si  Khφ for each i < γ, it follows that for each [si ] there exists a strategy σi such that all σi ’s complete executions from [si ] are finite and [v] ⊆ JφK for all [v] ∈ CELeaf(σi , si ) (◭). Next, in order to show M, s  Khφ, we need to define a strategy τ . The definition consists of the following steps. Step I. By induction on i, we will define S a set of strategies τi where 0 ≤ i < γ. Let fi = β<i τβ and Di = CEInner(σi , si ) \ (dom(fi ) ∪ {[v] ∈ CELeaf(fi , t) | [t] ∈ dom(fi )}) we define: • τ0 = σ0 |CEInner(σ0 ,s0 ) ; • τi = fi ∪ (σi |Di ) for i > 0. Claim 3.3.1. We have the following results: 1. For each 0 ≤ i < γ, τj ⊆ τi if j < i; 2. For each 0 ≤ i < γ, τi is a partial function; 3. For each 0 ≤ i < γ, dom(τi ) ∩ CELeaf(τj , t) = ∅ where t ∈ dom(τj ) if j < i; 4. For each 0 ≤ i < γ, if δ = [t0 ] · · · is a τi ’s complete execution from [t] ∈ dom(τi ) then |δ| = n for some n ∈ N and [tn ] ⊆ JφK; 5. For each 0 ≤ i < γ, [si ] ∈ dom(τi ) or [si ] ⊆ JφK. Proof of claim 3.3.1: 1. It is obvious. 2. We prove it by induction on i. For the case of i = 0, it is obvious. For the case of i = α > 0, it follows by the IH that τβ is a partial function for each β < α. Furthermore, it follows by 1. that τS β1 ⊆ τβ2 for all β1 < β2 < α. Thus, we have fα = β<α τβ is a partial function. Since σα is a partial function, in order to show τα is a partial function, we only need to show that dom(fα ) ∩ Dα = ∅. Since Dα = CEInner(σα , sα ) \ dom(fα ) \ {[v] ∈ CELeaf(fα , t) | t ∈ dom(fα )}, it is obvious that dom(fα ) ∩ Dα = ∅. 3. We prove it by induction on i. It is obvious for the case of i = 0. For the case of i = α > 0, given j < α and t ∈ dom(τj ), we need to show that dom(τα ) ∩ CELeaf(τj , t) = ∅. Supposing [v] ∈ CELeaf(τj , t), we will show that [v] 6∈ dom(τα ), namely [v] 6∈ dom(fα ) ∪ S Dα . Since j < α and fα = β<α τα , it follows t ∈ dom(fα ). Moreover, due to Dα = CEInner(σα , sα ) \ dom(fα ) \ {[v] ∈ CELeaf(fα , t) | t ∈ dom(fα )}, it follows [v] 6∈ Dα . Next, we only need to show [v] 6∈ dom(fα ). Assuming [v] ∈ dom(fα ), it follows that [v] ∈ dom(τβ ) for some β < α. There are two cases: j < β or j ≥ β. If j < β, it follows by the IH that dom(τβ ) ∩ CELeaf(τj , t) = ∅. Contradiction. If j ≥ β, it follows by 1. that τβ ⊆ τj . Due to [v] ∈ dom(τβ ), it follows [v] ∈ dom(τj ). It is contradictory with [v] ∈ CELeaf(τj , t). Thus, we have [v] 6∈ dom(fα ). 4. We prove it by induction on i. For the case of i = 0, due to dom(τ0 ) = CEInner(σ0 , s0 ), it follows that there is a σ0 ’s possible execution [s0 ] · · · [sm ] such that m ∈ N and [sm ] = [t]. Let µ = [s0 ] · · · [sm−1 ] ◦ δ. (If m = 0 then µ = δ). Since δ is a τ0 ’s complete execution from [t], it follows that µ is a σ0 ’s complete execution from [s0 ]. It follows by (◭) that µ is finite. Thus, δ = [t0 ] · · · [tn ] for some n ∈ N. Since [tn ] ∈ CELeaf(σ0 , s0 ), it follows by (◭) that [tn ] ⊆ JφK. For the case of i = α > 0, there are two situations: [t] ∈ dom(fα ) or [t] ∈ Dα . If [t] ∈ dom(fα ), it follows that [t] ∈ dom(τβ ) for some β < α. By 3, we have dom(τα )∩CELeaf(τβ , t) = ∅. Since δ is a τα ’s complete execution, it follows by Proposition 3.2 that δ is also a τβ ’s complete execution from [t]. It follows by the IH that |δ| = n for some n ∈ N and [tn ] ⊆ JφK. If [t] ∈ Dα , there are two cases: there exist k < |δ| and β < α s.t. [tk ] ∈ dom(τβ ), or there do not exist such k and β. (Please note that |δ| > 1 due to the fact that δ = [t0 ] · · · is τα ’s complete execution from [t] ∈ dom(τα )). – [tk ] ∈ dom(τβ ) for some k < |δ| and some β < α: It follows that µ = [tk ] · · · is a τα ’s complete execution from [tk ]. By 3. and Proposition 3.2, µ is a τβ ’s complete execution from [tk ]. By IH, µ = [tk ] · · · [tk+n ] for some n ∈ N and [tk+n ] ⊆ JφK. Therefore, |δ| = k + n. – If there do not exist k < |δ| and β < α s.t. [tk ] ∈ dom(τβ ), it follows that δ = [t0 ] · · · is a σα ’s possible execution from [t]. Since [t] ∈ Dα ⊆ CEInner(σα , sα ), then there is a σα ’s possible execution [s0 ] · · · [sm ] s.t. m ∈ N, [s0 ] = [sα ] and [sm ] = [t]. Let µ = [s0 ] · · · [sm−1 ] ◦ δ. (If m = 0 then µ = δ). It follows that µ is σα ’s possible execution from sα . By (◭), all σα ’s complete executions from sα are finite. Thus, µ is finite. Therefore, δ = [t0 ] · · · [tn ] for some n ∈ N. We continue to show that [tn ] ⊆ JφK. Since δ = [t0 ] · · · [tn ] is a τα ’s complete execution from t and it is also a σα ’s possible execution from t, there are two cases: [tn ] ∈ CELeaf(fα , t′ ) for some t′ ∈ dom(fα ), or δ is a σα ’s complete execution from t. If [tn ] ∈ CELeaf(fα , t′ ) for some t′ ∈ dom(fα ), then there exists β < α s.t. [t] ∈ CELeaf(τβ , t′ ) and [t′ ] ∈ dom(β). By IH, [tn ] ⊆ JφK. If δ is a σα ’s complete execution from t, it follows that µ is a σα ’s complete execution from [sα ]. Then by (◭), we have [tn ] ⊆ JφK. 5. If [si ] 6∈ dom(σi ), it follows by (◭) that [si ] ⊆ JφK. Otherwise, there are two cases: i = 0 or i = α > 0. If i = 0, it follows by [s0 ] ∈ dom(σ0 ) that [s0 ] ∈ CEInner(σ0 , s0 ). Thus, [s0 ] ∈ dom(τ0 ). If i = α > 0 and [sα ] ∈ dom(σα ), we will show that if [sα ] 6∈ dom(τα ) then [sα ] ⊆ JφK. Firstly, we have that [si ] ∈ CEInner(σα , sα ). Since [sα ] 6∈ dom(τα ), it follows that [sα ] ∈ CELeaf(fα , t) for some [t] ∈ dom(fα ). It follows that there exists β < α such that [sα ] ∈ CELeaf(τβ , t) and t ∈ dom(τβ ). It follows by 4. that [si ] ⊆ JφK.  S Step II. We define τγ = i<γ τi . It follows by 1. and 2. of Claim 3.3.1 that τγ is indeed a partial function. Then we prove the following claim. Claim 3.3.2. If δ = [t0 ] · · · is a τγ ’s complete execution from [t] ∈ dom(τγ ) then |δ| = n for some n ∈ N and [tn ] ⊆ JφK Proof of claim 3.3.2: Since [t] ∈ dom(τγ ), it follows that [t] ∈ dom(τi ) for some i < γ. It follows by 5. of Claim 3.3.1 that all τi ’s complete executions from [t] are finite. Thus, there exists µ ⊑ δ such that |µ| = n for some n ∈ N and µ is τi ’s complete execution from [t]. It follows by 5. of Claim 3.3.1 that [tn ] ⊆ JφK. Next, we only need to show δ = µ. If not, then δ = [t0 ] · · · [tn ][tn+1 ] · · · . We then have that there exists j < γ such that {tk | 0 ≤ k ≤ n} ⊆ dom(τj ). It cannot be that j ≤ i. Otherwise, µ is not τi ’s complete execution since τj ⊆ τi by 1. of Claim 3.3.1. Thus, we have j > i. Since we also have that [tn ] ∈ dom(τj ), [tn ] ∈ CELeaf(τi , t) and t ∈ dom(τi ), this is contradictory with 3. of Claim 3.3.1. Therefore, we have δ = µ.  Step III. We define τ as τ = τγ ∪ (σ|C ) where C = CEInner(σ, s) \ (dom(τγ ) ∪ {[v] ∈ CELeaf(τ ′ , t) | [t] ∈ dom(τγ )}) and σ is the strategy mentioned at (∗). Since both τγ and σ|C are partial functions, τ is also a partial function. We then prove the following claim. Claim 3.3.3. If δ = [t0 ] · · · is a τ ’s complete execution from [t] ∈ dom(τ ) then |δ| = n for some n ∈ N and [tn ] ⊆ JφK. Proof of claim 3.3.3: Since dom(τ ) = dom(τγ ) ∪ C, there are two cases: [t] ∈ dom(τγ ) or [t] ∈ C. If [t] ∈ dom(τγ ), it follows that CELeaf(τγ , t) ∩ C = ∅. Moreover, we have CELeaf(τγ , t) ∩ dom(τγ ) = ∅. Thus, we have CELeaf(τγ , t) ∩ dom(τ ) = ∅. It follows by Proposition 3.2 that δ is a τγ ’s complete execution from from [t]. It follows by Claim 3.3.2 |δ| = n for some n ∈ N and [tn ] ⊆ JφK If [t] ∈ C, there are two cases: there exists k < |δ| such that [tk ] ∈ dom(τγ ), or there does not exists such k. (Please note that |δ| > 1 due to the fact that δ = [t0 ] · · · is τ ’s complete execution from [t] ∈ dom(τ )). • [tk ] ∈ dom(τγ ) for some k < |δ|: It follows that µ = [tk ] · · · is a τ ’s complete execution from [tk ]. Since dom(τ ) ∩ CELeaf(τγ , tk ) = ∅. It follows by Proposition 3.2 that µ is a τγ ’s complete execution from [tk ]. It follows by Claim 3.3.2 that µ = [tk ] · · · [tk+n ] for some n ∈ N and [tk+n ] ⊆ JφK. Therefore, |δ| = k + n. • If there does not exist k < |δ| s.t. [tk ] ∈ dom(τγ ), then δ = [t0 ] · · · is a σ’s possible execution from [t]. Since [t] ∈ C ⊆ CEInner(σ, s), then there is a σ’s possible execution [s0 ] · · · [sm ] s.t. m ∈ N, [s0 ] = [s] and [sm ] = [t]. Let µ = [s0 ] · · · [sm−1 ]◦δ. (If m = 0 then µ = δ). It follows that µ is σ’s possible execution from s. By (∗), all σ’s complete executions from s are finite. Thus, µ is finite. Therefore, δ = [t0 ] · · · [tn ] for some n ∈ N. We continue to show that [tn ] ⊆ JφK. Since δ = [t0 ] · · · [tn ] is a τ ’s complete execution from t and it is also a σ’s possible execution from t, there are two cases: [tn ] ∈ CELeaf(τγ , t′ ) for some t′ ∈ dom(τγ ), or δ is a σ’s complete execution from t. If [tn ] ∈ CELeaf(τγ , t′ ) for some [t′ ] ∈ dom(τγ ), it follows by Claim 3.3.2 that [tn ] ⊆ JφK. If δ is a σ’s complete execution from t, it follows that µ is a σ’s complete execution from [s]. It follows that [tn ] = Si for some 0 ≤ i < γ. Since δ = [t0 ] · · · [tn ] is τ ’s complete execution from [t] ∈ dom(τγ ), it follows [tn ] 6∈ dom(τγ ). We then have [tn ] 6∈ dom(τi ), namely Si 6∈ τi . It follows by 5. of Claim 3.3.1 that Si ⊆ JφK, namely [tn ] ⊆ JφK.  Next, we continue to show that M, s  Khφ with the assumption that [s] ∈ dom(σ). Since [s] ∈ dom(σ), we have [s] ∈ CEInner(σ, s). There are two cases: [s] ∈ dom(τ ) or not. If [s] ∈ dom(τ ), it follows by claim 3.3.3 that M, s  Khφ. If [s] 6∈ dom(τ ), due to [s] ∈ CEInner(σ, s), it follows that [s] ∈ CELeaf(τγ , t) for some [t] ∈ dom(τγ ). It follows by Claim 3.3.2 that [s] ⊆ JφK. It follows that M, s  Kφ. It is obvious that M, s  Khφ. Theorem 3.4 (Soundness). If ⊢ φ then  φ. 4 Completeness and Decidability Let Φ be a subformula-closed set of formulas. It is obvious that Φ is countable since the whole language itself is countable. Given a set of formulas ∆, let: ∆|K = {Kφ | Kφ ∈ ∆}, ∆|¬K = {¬Kφ | ¬Kφ ∈ ∆}, ∆|Kh = {Khφ | Khφ ∈ ∆}, ∆|¬Kh = {¬Khφ | ¬Khφ ∈ ∆}. Below we define the closure of Φ, and use it to build a canonical model w.r.t. Φ. We will show that when Φ is finite then we can build a finite model. Definition 4.1. cl(Φ) is defined as: cl(Φ) = Φ ∪ {Kφ | φ ∈ Φ}. Definition 4.2 (Atom). Let cl(Φ) = {ψi | i ∈ N}. The formula set ∆ = {Yi | i ∈ N} is an atom of cl(Φ) if • Yi = ψi or Yi = ¬ψi for all ψi ∈ cl(Φ); • ∆ is consistent. Note that if Φ is the whole language then an atom is simply a maximal consistent set. By a standard inductive construction, we can obtain the Lindenbaum-like result in our setting (which is useful to show the existence lemma for K): Proposition 4.3. Let ∆ be an atom of cl(Φ), Γ ⊆ ∆ and φ ∈ cl(Φ). If Γ ∪ {±φ} is consistent then there is an atom ∆′ of cl(Φ) such that (Γ ∪ {±φ}) ⊆ ∆′ , where ±φ = φ or ±φ = ¬φ. Proof. Let Γ = {φk | k ∈ N}. Since ∆ is an atom and Γ ⊆ ∆, it follows that there is a set Γ′ = {χk ∈ cl(Φ) | k ∈ N} such that φk = χk or φk = ¬χk for all k ∈ N. Let ψ1 , · · · , ψn , · · · be all the formulas in cl(Φ) \ Γ′ \ {φ}. We define Γi as below. Γ0 = Γ ∪ {±φ}  Γi ∪ {ψi } if Γi ∪ {ψi } is consistent Γi+1 = Γi ∪ {¬ψi } else Firstly, we will show Γi is consistent for all i ∈ N. Since Γ0 is consistent, we only need to show that if Γi is consistent then Γi+1 is consistent, i.e. either Γi ∪ {ψi } or Γi ∪ {¬ψi } is consistent. Assuming both Γi ∪ {ψi } and Γi ∪ {¬ψi } are not consistent, it follows that Γi ⊢ ¬ψi and Γi ⊢ ψi . That is, Γi is inconsistent. Contradiction. Therefore, either Γi ∪ {ψi } or Γi ∪ {¬ψi } isSconsistent. Let ∆′ = i∈N Γi . It follows that ∆′ is consistent. It is obvious that either ψ ∈ ∆′ or ¬ψ ∈ ∆′ for all ψ ∈ cl(Φ). Therefore, ∆′ is an atom of cl(Φ). Definition 4.4. Given a subformula-closed Φ, the canonical x model MΦ = hW, ACT, ∼, {− →| x ∈ ACT}, V i is defined as: • W = {∆ | ∆ is an atom of cl(Φ)}; • ACT = {φ | Khφ ∈ Φ}; • ∆ ∼ ∆′ iff ∆|K = ∆′ |K ; φ • for each φ ∈ ACT, ∆ − → ∆′ iff Khφ, ¬Kφ ∈ ∆ and ′ Kφ ∈ ∆ ; • for each p ∈ Φ, p ∈ V (∆) iff p ∈ ∆. Note that we use formulas that the agent knows how to achieve as the action labels, and we introduce an action transition if it is necessary, i.e., Khφ but ¬Kφ (empty strategy does not work). Requiring Kφ ∈ ∆′ is to reflect the first condition in the semantics of Kh. Using NECK, DISTK and Proposition 4.3, it is routine to show the existence lemma for K: Proposition 4.5. Let ∆ be a state in MΦ , and Kφ ∈ cl(Φ). If Kφ 6∈ ∆ then there exists ∆′ ∈ [∆] such that ¬φ ∈ ∆′ . Proof. Let Γ = ∆|K ∪ ∆|¬K ∪ {¬φ}. Γ is consistent. If not, there are Kφi , · · · , Kφn and ¬Kψ1 , · · · , ¬Kψm in ∆ such that ⊢ Kφ1 ∧ · · · ∧ Kφn ∧ ¬Kψ1 ∧ · · · ∧ ¬Kψm → φ. Following by NECK and DISTK, we have ⊢ K(Kφi ∧ · · · ∧ Kφn ∧ ¬Kψ1 ∧ · · · ∧ ¬Kψm ) → Kφ. Since the epistemic operator K is distributive over ∧ and ⊢ KKφi ↔ Kφi for all 1 ≤ i ≤ n and ⊢ K¬Kψi ↔ ¬Kψi for all 1 ≤ i ≤ m, we have ⊢ Kφi ∧ · · · ∧ Kφn ∧ ¬Kψ1 ∧ · · · ∧ ¬Kψm → Kφ. Since Kφi , · · · , Kφn and ¬Kψ1 , · · · , ¬Kψm are all in ∆ and Kφ ∈ cl(Φ), it follows that Kφ ∈ ∆. It is contradictory with the assumption that Kφ 6∈ ∆. Therefore, Γ is consistent. It follows by Proposition 4.3 that there exists an atom ∆′ of cl(Φ) such that Γ ⊆ ∆′ . Since (∆|K ∪ ∆|¬K ) ⊆ ∆′ , we have ∆′ ∼ ∆, that is, ∆′ ∈ [∆]. Proposition 4.6. Let ∆ and ∆′ be two states in MΦ such that ∆ ∼ ∆′ . We have ∆|Kh = ∆′ |Kh . Proof. For each Khφ ∈ ∆, by Definition 4.1, Khφ ∈ Φ. Then KKhφ ∈ cl(Φ). For each Khφ ∈ ∆, by Axiom AxKhtoKKh, we have KKhφ ∈ ∆. Since ∆ ∼ ∆′ , then KKhφ ∈ ∆′ , and by Axiom T, Khφ ∈ ∆′ . Then we showed that Khφ ∈ ∆ implies Khφ ∈ ∆′ . Similarly we can prove Khφ ∈ ∆′ implies Khφ ∈ ∆. Hence, ∆|Kh = ∆′ |Kh . The following is a crucial observation for the latter proofs. Proposition 4.7. Let ∆ be a state in MΦ and ψ ∈ ACT be ψ executable at [∆]. If Khφ ∈ ∆′ for all ∆′ with [∆] − → [∆′ ] then Khφ ∈ ∆. Proof. First, we show that Kψ is not consistent with ¬Khφ. It is obvious that Khφ ∈ cl(Φ). Since ψ is executable at [∆], ψ → Γ2 . Then Kψ ∈ Γ2 . there are atoms Γ1 and Γ2 s.t. Γ1 − Assuming that Kψ is consistent with ¬Khφ, by Proposition 4.3 there exists an atom Γ of cl(Φ) s.t. {Kψ, ¬Khφ} ⊆ Γ. Since ψ ∈ ACT is executable at [∆], then by definition of ψ − →, ∼ and Proposition 4.6, Khψ, ¬Kψ ∈ ∆. It follows that ψ ψ ∆ − → Γ, then [∆] − → [Γ]. This is contradictory with the ψ assumption that Khφ ∈ ∆′ for all ∆′ with [∆] − → [∆′ ]. Then Kψ is not consistent with ¬Khφ. Hence, ⊢ Kψ → Khφ. Since ⊢ Kψ → Khφ, it follows by Rule MONOKh and Axiom AxKhtoKhK that ⊢ Khψ → KhKhφ. Moreover, it follows by Axiom AxKhKh that ⊢ Khψ → Khφ. Since ψ is exψ ecutable at [∆], it follows by the definition of − → and Proposition 4.6 that Khψ ∈ ∆. Therefore, we have Khφ ∈ ∆. Lemma 4.8. For each φ ∈ cl(Φ), MΦ , ∆  φ iff φ ∈ ∆. Proof. We prove it by induction on φ. We only focus on the case of Khφ; the other cases are straightforward, e.g., Kφ case can proved based on Proposition 4.5. Note that if Khφ ∈ cl(Φ) then φ ∈ cl(Φ) thus by Definition 4.1 Kφ ∈ cl(Φ). Right to Left: If Khφ ∈ ∆, we will show MΦ , ∆  Khφ. Firstly, there are two cases: Kφ ∈ ∆ or Kφ 6∈ ∆. If Kφ ∈ ∆, then Kφ, φ ∈ ∆′ for all ∆′ ∈ [∆]. Since φ ∈ Φ, it follows by IH that MΦ , ∆′  φ for all ∆′ ∈ [∆]. Therefore, MΦ , ∆  Kφ. It follows by Axiom AxKtoKh and the soundness of SKH that MΦ , ∆  Khφ. If ¬Kφ ∈ ∆, we first show that Kφ is consistent. If not, namely ⊢ Kφ → ⊥, it follows by Rule MONOKh that ⊢ KhKφ → Kh⊥. It follows by Axiom AxKhbot that ⊢ KhKφ → ⊥. Since Khφ ∈ ∆, it follows by Axiom AxKhtoKhK that ∆ ⊢ ⊥, which is contradictory with the fact that ∆ is consistent. Therefore, Kφ is consistent. By Proposition 4.3 there exists an atom ∆′ s.t. Kφ ∈ ∆′ . φ φ Note that φ ∈ ACT. Thus, we have ∆ − → ∆′ , then [∆] − → φ [∆′ ]. Let [∆′′ ] be an equivalence class s.t. [∆] − → [∆′′ ], φ which indicates Γ − → Γ′′ for some Γ ∈ [∆] and Γ′′ ∈ [∆′′ ]. φ By definition of − → and ∼ we get Kφ ∈ Θ for all Θ ∈ [∆′′ ]. By IH, MΦ , Θ  φ for all Θ ∈ [∆′′ ], namely [∆′′ ] ⊆ JφK. φ Moreover, − → is not a loop on [∆] because ¬Kφ ∈ ∆. Thus, the partial function σ = {[∆] 7→ φ} is a strategy s.t. all its complete executions starting from [∆] are finite and [∆′′ ] ⊆ JφK for each [∆′′ ] ∈ CELeaf(σ, ∆). Then, MΦ , ∆  Khφ. Left to Right: Suppose MΦ , ∆  Khφ, we will show Khφ ∈ ∆. By the semantics, there exists a strategy σ s.t. all σ’s complete executions starting from [∆] are finite and [Γ] ⊆ JφK for all [Γ] ∈ CELeaf(σ, ∆). By IH, φ ∈ Γ′ for all Γ′ ∈ [Γ] and [Γ] ∈ CELeaf(σ, ∆). By Proposition 4.5, we get Kφ ∈ Γ for all [Γ] ∈ CELeaf(σ, ∆). By Axiom AxKtoKh and Proposition 4.6, Khφ ∈ Γ for all [Γ] ∈ CELeaf(σ, ∆). If [∆] 6∈ dom(σ), it is obvious that Khφ ∈ ∆ because [∆] ∈ CELeaf(σ, ∆). Next, we consider the case of [∆] ∈ dom(σ), then [∆] ∈ CEInner(σ, ∆). In order to show Khφ ∈ ∆, we will show a more strong result that Khφ ∈ ∆′ for all [∆′ ] ∈ CEInner(σ, ∆). Firstly, we show the following claim: Claim 4.8.1. If there exists [∆′ ] ∈ CEInner(σ, ∆) such that ¬Khφ ∈ ∆′ then there exists an infinite execution of σ starting from [∆]. Proof of claim 4.8.1: Let X be the set {[Θ] ∈ CEInner(σ, ∆) | ¬Khφ ∈ Θ}. It follows that [∆′ ] ∈ X and X ⊆ dom(σ). We define a binary relation R on X as σ([Θ]) R = {([Θ], [Θ′ ]) | [Θ] −−−−→ [Θ′ ]}. For each [Θ] ∈ X, we have that σ([Θ]) is executable at [Θ]. Since ¬Khφ ∈ Θ, by Proposition 4.7 there exists an atom Θ′ σ([Θ]) s.t. [Θ] −−−−→ [Θ′ ] and ¬Khφ ∈ Θ′ . Since Khφ ∈ Γ for all [Γ] ∈ CELeaf(σ, ∆) and [Θ] ∈ CEInner(σ, ∆),we have [Θ′ ] ∈ CEInner(σ, ∆). Then [Θ′ ] ∈ X. Therefore, R is an entire binary relation on X, namely for each [Θ] ∈ X there is [Θ′ ] ∈ X such that ([Θ], [Θ′ ]) ∈ R. Then by Axiom of Dependent Choice there exists an infinite sequence [Θ0 ][Θ1 ] · · · s.t. ([Θn ], [Θn+1 ]) ∈ R for all n ∈ N. From the definition of R, [Θ0 ][Θ1 ] · · · is a complete execution of σ starting from [Θ0 ]. Since [Θ0 ] ∈ CEInner(σ, ∆) and all complete execution of σ from [∆] are finite, there is a possible execution [∆0 ] · · · [∆j ] for some j ∈ N s.t. [∆0 ] = [∆] and [∆j ] = [Θ0 ]. Therefore, [∆0 ] · · · [∆j ][Θ1 ] · · · is an infinite complete execution of σ from [∆].  Therefore, we have Khφ ∈ ∆′ for all [∆′ ] ∈ CEInner(σ, s). Otherwise, by claim 4.8.1 there is an infinite complete execution given σ from [∆]. This is contradictory with all σ’s complete execution from [∆] are finite, then Khφ ∈ ∆′ for all [∆′ ] ∈ CEInner(σ, s). Since [∆] ∈ dom(σ), we get [∆] ∈ CEInner(σ, ∆). Then Khφ ∈ ∆. Now let Φ be the set of all formulas, then each maximal consistent set ∆ is actually an atom which satisfies all its formulas in MΦ , according to the above truth lemma. Completeness then follows immediately. Theorem 4.9. SKH is strongly complete. Note that if Φ is the set of all subformulas of a given formula φ, then cl(Φ) is still finite. Due to the soundness of SKH and Proposition 4.3, a satisfiable formula φ must be consistent thus appearing in some atom, and thus φ is satisfiable in MΦ . It is not hard to see that |MΦ | ≤ 22|φ| where 2|φ| is the bound on the size of cl(Φ). This gives us a small model property of our logic, then decidability follows. Theorem 4.10. SKH is decidable. 5 Conclusion In this paper we propose an epistemic logic of both (goaldirected) knowing how and knowing that, and capture the interaction of the two. We also present an proof system SKH for this logic. We have shown that SKH is sound and complete w.r.t. the semantics, and that SKH is decidable. We hope the axioms are illuminating towards a better understanding of knowing how. Note that we do not impose any special properties between a the interaction of − → and ∼ in the models so far. In the future, it would be interesting to see whether assuming properties of perfect recall and/or no learning (cf. e.g., [Fagin et al., 1995; Wang and Li, 2012]) can change the logic or not. Our notion of knowing how is relatively strong, particularly evidenced by the axiom AxKhtoKhK : Khφ → KhKφ, which is due to the first condition of our semantics for Kh, inspired by planning with uncertainty. We believe it is reasonable for the scenarios where the agent has perfect recall (or, say, never forgets), which is usually assumed implicitly in the discussions on planning (cf. [Yu et al., 2016]). However, for a forgetful agent it may not be intuitive anymore, e.g., I know how to get drunk when sober but I may not know how to get to the state that I know I am drunk, assuming drunk people do not know they are drunk. The axiom AxKhKh is also interesting in distinguishing different types of knowing how. We have been focusing on the goal-directed knowing how [Gochet, 2013], but for other types of knowing how such as knowing how to swim, the axiom may not be reasonable anymore, e.g., I know how to let myself to know how to swim (by registering an excellent swimming course) does not mean that I know how to swim right now. We leave the discussion of other types of knowing how in the future. Another obvious next step is to consider knowing how in multi-agent settings. References [Ågotnes et al., 2015] Thomas Ågotnes, Valentin Goranko, Wojciech Jamroga, and Michael Wooldridge. Knowledge and ability. In Hans van Ditmarsch, Joseph Halpern, Wiebe van der Hoek, and Barteld Kooi, editors, Handbook of Epistemic Logic, chapter 11, pages 543–589. College Publications, 2015. [Belardinelli, 2014] Francesco Belardinelli. Reasoning about knowledge and strategies: Epistemic strategy logic. In Proceedings of SR 2014, pages 27–33, 2014. [Broersen and Herzig, 2015] Jan Broersen and Andreas Herzig. Using STIT theory to talk about strategies. In Johan van Benthem, Sujata Ghosh, and Rineke Verbrugge, editors, Models of Strategic Reasoning: Logics, Games, and Communities, pages 137–173. Springer, 2015. [Fagin et al., 1995] R. Fagin, J. Halpern, Y. Moses, and M. Vardi. Reasoning about knowledge. MIT Press, 1995. [Fantl, 2008] Jeremy Fantl. Knowing-how and knowingthat. Philosophy Compass, 3(3):451–470, 2008. [Geffner and Bonet, 2013] Hector Geffner and Blai Bonet. A concise introduction to models and methods for automated planning. Synthesis Lectures on Artificial Intelligence and Machine Learning, 8(1):1–141, 2013. [Gochet, 2013] Paul Gochet. An open problem in the logic of knowing how. In J. Hintikka, editor, Open Problems in Epistemology. The Philosophical Society of Finland, 2013. [Herzig et al., 2013] Andreas Herzig, Emiliano Lorini, and Dirk Walther. Reasoning about actions meets strategic logics. In Proceedings of LORI 2013, pages 162–175, 2013. [Herzig, 2015] Andreas Herzig. Logics of knowledge and action: critical analysis and challenges. Autonomous Agents and Multi-Agent Systems, 29(5):719–753, 2015. [Hintikka, 1962] J. Hintikka. Knowledge and Belief: An Introduction to the Logic of the Two Notions. Cornell University Press, Ithaca N.Y., 1962. [Jamroga and Ågotnes, 2007] Wojciech Jamroga and Thomas Ågotnes. Constructive knowledge: what agents can achieve under imperfect information. Journal of Applied Non-Classical Logics, 17(4):423–475, 2007. [Lespérance et al., 2000] Yves Lespérance, Hector J. Levesque, Fangzhen Lin, and Richard B. Scherl. Ability and knowing how in the situation calculus. Studia Logica, 66(1):165–186, 2000. [Li and Wang, 2017] Yanjun Li and Yanjing Wang. Achieving while maintaining: A logic of knowing how with intermediate constraints. In Proceedings of ICLA’17, 2017. [Li, 2017] Yanjun Li. Stopping means achieving: A weaker logic of knowing how. Studies in Logic, 9(4):34–54, 2017. [McCarthy and Hayes, 1969] John McCarthy and Patrick J. Hayes. Some philosophical problems from the standpoint of artificial intelligence. In Machine Intelligence, pages 463–502. Edinburgh University Press, 1969. [McCarthy, 1979] John McCarthy. First-Order theories of individual concepts and propositions. Machine Intelligence, 9.:129–147, 1979. [Moore, 1985] Robert C Moore. A formal theory of knowledge and action. In Jerry R. Hobbs and Robert C. Moore, editors, Formal Theories of the Commonsense World. Ablex Publishing Corporation, 1985. [Smith and Weld, 1998] David E. Smith and Daniel S. Weld. Conformant graphplan. In AAAI 98, pages 889–896, 1998. [Stanley and Williamson, 2001] Jason Stanley and Timothy Williamson. Knowing how. The Journal of Philosophy, pages 411–444, 2001. [van der Hoek and Wooldridge, 2003] Wiebe van der Hoek and Machael Wooldridge. Cooperation, knowledge, and time: Alternating-time temporal epistemic logic and its applications. Studia Logica, (1):125–157, 2003. [van der Hoek et al., 2000] Wiebe van der Hoek, Bernd van Linder, and John-Jules Ch. Meyer. On agents that have the ability to choose. Studia Logica, 66(1):79–119, 2000. [Wang and Li, 2012] Yanjing Wang and Yanjun Li. Not all those who wander are lost: Dynamic epistemic reasoning in navigation. In Proceedings of AiML 2012, pages 559– 580, 2012. [Wang, 2015] Yanjing Wang. A logic of knowing how. In Proceedings of LORI 2015, pages 392–405, 2015. [Wang, 2016a] Yanjing Wang. Beyond knowing that: a new generation of epistemic logics. In Hans van Ditmarsch and Gabriel Sandu, editors, Jaakko Hintikka on knowledge and game theoretical semantics. Springer, 2016. forthcoming. [Wang, 2016b] Yanjing Wang. A logic of goal-directed knowing how. Synthese, pages 1–21, 2016. in press. [Yu et al., 2016] Quan Yu, Yanjun Li, and Yanjing Wang. A dynamic epistemic framework for conformant planning. In Proceedings of TARK’15, pages 298–318. EPTCS, 2016.
2cs.AI
S URVEY M AN: Programming and Automatically Debugging Surveys Emma Tosch Emery D. Berger arXiv:1406.5572v1 [cs.PL] 21 Jun 2014 School of Computer Science University of Massachusetts, Amherst Amherst, MA 01003 {etosch,emery}@cs.umass.edu Abstract Surveys can be viewed as programs, complete with logic, control flow, and bugs. Word choice or the order in which questions are asked can unintentionally bias responses. Vague, confusing, or intrusive questions can cause respondents to abandon a survey. Surveys can also have runtime errors: inattentive respondents can taint results. This effect is especially problematic when deploying surveys in uncontrolled settings, such as on the web or via crowdsourcing platforms. Because the results of surveys drive business decisions and inform scientific conclusions, it is crucial to make sure they are correct. We present S URVEY M AN, a system for designing, deploying, and automatically debugging surveys. Survey authors write their surveys in a lightweight domain-specific language aimed at end users. S URVEY M AN statically analyzes the survey to provide feedback to survey authors before deployment. It then compiles the survey into JavaScript and deploys it either to the web or a crowdsourcing platform. S URVEY M AN’s dynamic analyses automatically find survey bugs, and control for the quality of responses. We evaluate S URVEY M AN’s algorithms analytically and empirically, demonstrating its effectiveness with case studies of social science surveys conducted via Amazon’s Mechanical Turk. 1. Introduction Surveys and polls are widely used to conduct research for industry, politics, and the social sciences. Businesses use surveys to perform market research to inform their spending and product strategies [4]. Political and news organizations use surveys to gather public opinion, which can influence political decisions and political campaigns. A wide range of social scientists, including psychologists, economists, health professionals, political scientists, and sociologists, make extensive use of surveys to drive their research [3, 6, 13, 20]. In the past, surveys were traditionally administered via mailings, phone calls, or face-to-face interviews [8]. Over the last decade, web-based surveys have become increasingly popular as they make it possible to reach large and diverse populations at low cost [5, 27, 32, 33]. Crowdsourcing platforms like Amazon’s Mechanical Turk make it possible for researchers to post surveys and recruit participants at scales that would otherwise be out of reach. Unfortunately, the design and deployment of surveys can seriously threaten the validity of their results: Question order effects. Placing one question before another can lead to different responses than when their order is reversed. For example, a Pew Research poll found that people were more likely to favor civil unions for gays when this question was asked after one about whether they favored or opposed gay marriage [23]. Question wording effects. Different question variants can inadvertently elicit wildly different responses. For example, in 2003, Pew Research found that American support for possible U.S. military action in Iraq was 68%, but this support dropped to 43% when the question mentioned possible American casualties [24]. Even apparently equivalent questions can yield quite different responses. In a 2005 survey, 51% of respondents favored “making it legal for doctors to give terminally ill patients the means to end their lives” but only 44% favored “making it legal for doctors to assist terminally ill patients in committing suicide.” [24] Survey abandonment. Respondents often abandon a survey partway through, a phenomenon known as breakoff. This effect may be due to survey fatigue, when a survey is too long, or because a particular question is ambiguous, lacks an appropriate response, or is too intrusive. If an entire group of survey respondents abandon a survey, the result can be selection bias: the survey will exclude an entire group from the population being surveyed. [Copyright notice will appear here once ’preprint’ option is removed.] 1 2014/6/24 Inattentive or random respondents. Some respondents are inattentive and make arbitrary choices, rather than answering the question carefully. While this problem can arise in all survey scenarios, it is especially acute in an on-line setting where there is no direct supervision. To make matters worse, there is no “right answer” to check against for surveys, making controlling for quality difficult. Downs et al. found that nearly 40% of survey respondents on Amazon’s Mechanical Turk answered randomly [9]. So-called attention check questions aimed at screening inattentive workers are ineffective because they are easily recognized. An unfortunately typical situation is that described by a commenter on a recent article about taking surveys on Mechanical Turk: If the requester is paying very little, I will go as fast as I can through the survey making sure to pass their attention checks, so that I’m compensated fairly. Conversely, if the requester wants to pay a fair wage, I will take my time and give a more thought out and non random response. [11] SURVEYMAN$ staFc$analysis$ (§3)$ SURVEY.CSV" (§2)$ Compile()me*errors* Survey*sta)s)cs* SURVEYMAN$ dynamic$ analysis$ (§5)$ SURVEYMAN$ compiler$&$ runFme$ (§4)$ RESULTS.CSV Survey*errors* Random* respondents* Web$or$Crowdsourcing$Pla3orm$ Figure 1: Overview of the S URVEY M AN system. VEY M AN ’s dynamic analysis operates on information from the static analysis and the results of the survey to identify survey errors and inattentive respondents. Table 1 summarizes the analyses that S URVEY M AN performs. While all of the above problems are known to practitioners [19], there is currently no way to address them automatically. The result is that current practice in deploying surveys is generally limited to an initial pilot study followed by a full deployment, with no way to control for the potentially devastating impact of survey errors and inattentive respondents. From our perspective, this is like writing a program, making sure it compiles, and then shipping it—to run on a system with hardware problems. 1.1 SURVEYMAN*system* S URVEY M AN In this paper, we adopt the view that surveys are effectively programs, complete with logic, control flow, and bugs. We describe S URVEY M AN, which aims to provide a scientific footing for the development of surveys and the analysis of their results. Using S URVEY M AN, survey authors use a lightweight domain-specific language to create their surveys. S URVEY M AN then deploys their surveys over the Internet, either by hosting it as a website, or via crowdsourcing platforms. The key idea behind S URVEY M AN is that by giving survey authors a way to write their surveys that steers them away from unnecessary ordering constraints, we can apply static analysis, randomization, and statistical dynamic analysis to locate survey errors and ensure the quality of responses. Overview: Figure 1 depicts the S URVEY M AN workflow. Survey authors create surveys using the S URVEY M AN programming language. The S URVEY M AN static analyzer checks the S URVEY M AN program for validity and reports key statistics about the survey prior to deployment. If the program is correct, S URVEY M AN’s runtime system can then deploy the survey via the web or a crowdsourcing platform: each respondent sees a differently-randomized version. S UR 2 Domain-Specific Language. We designed the S URVEYM AN language in concert with social scientists to ensure its usability and accessibility to non-programmers (§2). The approach we take leverages the tools that our target audiences use: because social scientists extensively use both Excel and R, which both feature native support for comma-separated value files, we adopt a tabular format that can be entered directly in a spreadsheet and saved as a .csv file. S URVEY M AN’s domain-specific language is simple but captures most features needed by survey authors, including a variety of answer types and branching based on answers to particular questions. In addition, because S URVEY M AN’s error analysis depends on randomization, its language is designed to maximize S URVEY M AN’s freedom to randomize question order, question variants, and answers. A user writing a survey with S URVEY M AN can optionally specify a partial order over questions by grouping questions into blocks, identified by number. All questions within the same block may be asked in any order, but must strictly precede the following block (i.e., all the questions in block 1 precede those in block 2, and so on). Static Analysis. S URVEY M AN statically analyzes the survey to verify that it meets certain criteria, such as that all branches point to a target, and that there are no cycles (§3). It also provides additional feedback to the survey designer, indicating potential problems with the survey that it locates prior to deployment. Compiler and Runtime System. S URVEY M AN can then deploy the survey either on the web with S URVEY M AN acting as a webserver, or by posting jobs to a crowdsourcing platform such as Amazon’s Mechanical Turk (§4). Each survey is delivered as a JavaScript and JSON payload that 2014/6/24 Static Analyses Well-formedness Survey statistics Entropy §3.1 §3.2 §3.2 Ensures survey is a DAG and other correctness checks Min, max, and avg. # questions in survey; finds short-circuits and guides pricing Measures information content of survey; higher is better Correlated Questions Question Order Bias Question Wording Variant Bias Breakoff Inattentive or Random Respondents §5.1 §5.2 §5.3 §5.4 §5.5 Reports redundant questions which can be eliminated to reduce survey length Reports questions whose results depend on the order in which they are asked Reports questions whose results depend on the way they are worded Finds problematic questions that lead to survey abandonment Identifies unconscientious respondents so they can be excluded in analysis Dynamic Analyses Table 1: The analyses that S URVEY M AN performs on surveys and their deployment. manages presentation and flow through the survey, and performs per-user randomization of question and answer order subject to constraints placed by the survey author. When a respondent completes or abandons a survey, S URVEY M AN collects the survey’s results for analysis. Dynamic Analyses. To find errors in a deployed survey, S URVEY M AN performs statistical analyses that take into account the survey’s static control flow, the partial order on questions, and collected results (§5). These analyses can identify a range of possible survey errors, including question order bias, wording variant bias, questions that lead to breakoff, and survey fatigue. S URVEY M AN reports each error with its corresponding question, when applicable. It also identifies inattentive and random respondents. The survey author can then use the resulting report to refine their survey and exclude random respondents. Note that certain problems with surveys are beyond the scope of any tool to address [33]. These include coverage error, when the respondents do not include the target population of interest; sampling error, when the make-up of the respondents is not representative of the target of interest; and non-response bias, when respondents to a survey are different from those who choose not to or are unable to participate in a survey. S URVEY M AN can help survey designers limit non-response bias due to abandonment by diagnosing and fixing its cause (breakoff or fatigue). Evaluation. Our collaborators in the social sciences developed a number of surveys in S URVEY M AN, which were deployed on Amazon’s Mechanical Turk (§6). We describe these experiences with S URVEY M AN and the results of the deployment, which identified a number of errors in the surveys as well as random respondents. 1.2 Contributions The contributions of this paper are the following: • Domain-Specific Language. We introduce the S URVEY- M AN domain-specific language for writing surveys, which enables error detection and quality control by relaxing ordering constraints (§2, §4). 3 • Static Analyses. We present static analyses for identify- ing structural problems in surveys (§3). • Dynamic Analyses. We present dynamic analyses to identify a range of important survey errors, including question variant bias, order bias, and breakoff, as well as inattentive or random respondents (§5). • Experimental Results. We report on a deployment of S URVEY M AN with social scientists and demonstrate its utility (§6). 2. S URVEY M AN Domain-Specific Language 2.1 Overview The S URVEY M AN programming language is a tabular, lightweight language aimed at end users. In particular, it is designed to both make it easy for survey authors without programming experience to create simple surveys, and let more advanced users create sophisticated surveys. Because of its tabular format, S URVEY M AN users can enter their surveys directly in a spreadsheet application, such as Microsoft Excel. Unlike text editors or IDEs, spreadsheet applications are tools that our target audience knows well. S URVEY M AN can read in .csv files, which it then checks for validity (§3), compiles and deploys (§4), and reports results, including errors (§5). A key distinguishing feature of S URVEY M AN’s language is its support for randomization, including question order, question variants, and answers. From S URVEY M AN’s perspective, more randomization is better, both because it makes error detection more effective and because it provides experimental control for possible biases (§5). S URVEY M AN is designed so that survey authors must go out of their way to state when randomization is not to be used. This approach encourages authors to avoid imposing unnecessary ordering constraints. Basic Surveys: To create a basic survey, a survey author simply lists questions and possible answers in a sequence of rows. When the survey is deployed, all questions are presented in a random order, and the order of all answers is also randomized. 2014/6/24 B LOCK 1 1 1 1 1 1 Q UESTION What is your gender? O PTIONS Male Female Other United States India Other What country do you live in? E XCLUSIVE O RDERED 2 3 3 2 2 2 2 2 What state do you live in? Alabama Alaska Arizona Arkansas California TRUE TRUE TRUE TRUE TRUE 3 3 3 3 3 3 3 3 3 3 3 3 3 How much time do you spend on Mechanical Turk? Less than 1 hour per week. 1-2 hours per week. 2-4 hours per week. 4-8 hours per week. 8-20 hours per week. 20-40 hours per week. More than 40 hours per week. Fruitful way to spend time. Primary source of income. Secondary source of income. To kill time. I find the tasks to be fun. I am currently unemployed. TRUE TRUE TRUE TRUE TRUE TRUE TRUE Check all the reasons why you use Mechanical Turk. B RANCH FALSE FALSE FALSE FALSE FALSE FALSE Figure 2: An example survey written using the S URVEY M AN domain-specific language, adapted from Ipeirotis [16]. For clarity, a horizontal line separates each question, and a double horizontal line separates distinct blocks, which optionally define a partial order: all questions in block i appear in random order before questions in blocks j > i. When blocks are not specified, all questions may appear in a random order. This relaxed ordering enables S URVEY M AN’s error analyses. Ordering Constraints: Survey authors can assign numbers to questions that they wish to order; we use the terminology of the survey literature and call these numbers blocks. Multiple questions can have the same number, which causes them to appear in the same block. Every question in the same block will be presented in a random order to each respondent. All questions inside blocks of a lower number will be presented before questions inside higher-numbered blocks. S URVEY M AN’s block construct has additional features that can give advanced survey authors finer-grained control over ordering (§2.3). Logic and Control Flow: S URVEY M AN also includes both logic and control flow in the form of branches depending on the survey taker’s responses. Each answer can contain a target branch (a block), which is taken if the survey taker chooses that answer. 2.2 Syntax Figure 2 presents a sample S URVEY M AN program, a survey from a Mechanical Turk demographic survey modified to illustrate S URVEY M AN’s features [16]. Every S URVEY M AN program contains a first row of column headers, which indicate the contents of the following rows. The only mandatory columns are Q UESTION and O PTIONS; all other columns are optional. If a given column is not present, its default value is used. The columns may appear in any order. 4 Column Q UESTION O PTIONS B LOCK E XCLUSIVE O RDERED B RANCH R ANDOMIZE F REETEXT C ORRELATED Description The text for a question Answer choices, one per row Numbers used to partially order questions Only one choice allowed (default) Present options in order For this response, go to this block Randomize option orders (default) Allow text entry, optionally constrained Used to indicate questions are correlated Table 2: Columns in S URVEY M AN. All except the first two (Q UESTION and O PTIONS) are optional. Blocks. Each question can have an optional B LOCK number associated with it. Blocks establish a partial order. Questions with the same block number may appear in any order, but must precede all questions with a higher block number. If no block column is specified, all questions are placed in the same block, meaning that they can appear in any order. Questions and Answers. The Q UESTION column contains the question text, which may include HTML. Users may wish to specify multiple variants of the same question to control for or detect question wording bias. To do this, users place all of the variants in a particular block and have every question branch to the same target. 2014/6/24 The survey author specifies each question as a series of consecutive rows. A row with the Q UESTION column filled in indicates the end of the previous question and the start of a new one. All other rows leave this column empty (as in Figure 2). O PTIONS are the possible answers for a question. S UR VEY M AN treats a row with an empty question text field as belonging to the question above it. These may be rendered as radio buttons, checkboxes, or freetext. If there is only one option listed and the cell is empty, this question text is presented to the respondent as instructions. Radio Button or Checkbox Questions. By default, all options are E XCLUSIVE: the respondent can only choose one. These correspond to “radio button” questions. If the user specifies a E XCLUSIVE column and fills it with false, the respondent can choose multiple options, which are displayed as “checkbox” questions. Ordering. By default, options are unordered; this corresponds to nominal data like a respondent’s favorite food, where there is no ordering relationship. Ordered options include so-called Likert scales, where respondents rate their level of agreement with a statement; when the options comprise a ranking (e.g., from 1 to 5); and when ordering is necessary for navigation (e.g., for a long list of countries). When options are unordered, they are presented to each respondent as one of m! possible permutations of the answers, where m is the number of options. To order the options, the user must fill in a O RDERED column with the value T RUE. When they are ordered, they can still be randomized: they are either presented in the forward or backwards order. The user can only force the answers to appear in exactly the given order by also including a R ANDOMIZE column and filling in the value FALSE. Unordered options eliminate option order bias, because the position of each option is randomized. They also make inattentive respondents who always click on a particular option choice indistinguishable from random respondents. This property lets S URVEY M AN’s quality control algorithm simultaneously identify both inattentive and random responses. Branches. The B RANCH column provides control flow through the survey when the survey designer wants respondents who answer a particular question one way to take one path through the survey, while respondents who answer differently take a different path. For example, in the survey shown in Figure 2, only when respondents answer that they live in the United States will they be asked what state they live in. During the survey, branching is deferred until the end of a block, as Figure 3(a) depicts. By avoiding premature branching, this approach ensures that all users answer the same questions, regardless of randomization. It also avoids the biasing of question order that would result by forcing branches to appear in a fixed position. 5 Branching from a particular question response must go to a higher numbered block, preventing cycles. 2.3 Advanced Features S URVEY M AN several advanced features to give survey authors more control over their surveys and their interaction with S URVEY M AN. Correlated questions. S URVEY M AN lets authors include a C ORRELATED column to assist in quality control. S UR VEY M AN checks for correlations between questions to see if any redundancy can be removed, since shorter surveys help reduce survey fatigue. However, sometimes correlations are desired, whether to confirm a hypothesis or as a form of quality control. S URVEY M AN thus lets authors mark sets of questions as correlated by filling in the column with arbitary text: all questions with the same text are assumed to be correlated. S URVEY M AN will then only report if the answers to these questions are not correlated. If not, this information can be used to help identify inattentive or adversarial respondents. Advanced Blocks Notation So far, we have described blocks as if they were limited to non-negative integers. In fact, S URVEY M AN’s block syntax is more general1 . There are three kinds of blocks: top-level blocks, indicated by a single number; nested blocks, indicated by numbers separated by periods; and floating blocks, indicated by alphanumerics, which can move around inside their parent blocks. We describe each in terms of their interaction with other blocks and with branches. Figure 3(b) gives an example of each. Top-level Blocks. A survey is composed of blocks. If there are no blocks (i.e., the survey is completely flat), we say that all questions belong to a single, top-level block (block 1). Only one branch question is allowed per top-level block. Additionally, branch question targets must also be top-level blocks, though they cannot be floating blocks (described below). Nested Blocks. As with outlines, a period in a block indicates hierarchy: we can think of blocks numbered 1.1 and 1.2 as being contained within block 1. All questions numbered 1.1 precede all questions numbered 1.2, and both strictly precede blocks with numbers 2 or higher. Floating Blocks. Survey authors may want certain questions to be allowed to appear anywhere within a containing block. For example, a survey author might want questions to appear within block 1, but does not care whether they appear before or after other questions contained in that block (e.g., questions with block numbers 1.1 and 1.2). Such questions can be placed in floating blocks. A question is marked as 1 Formally, the syntax of blocks is given by the following regular expression: [1-9][0-9]*(.[a-z1-9][0-9]*)*. 2014/6/24 BLOCK&1& BLOCK&1& Q1& Q3& &(a)&branch'to'2' '(b)&branch'to'3& BLOCK&1& BLOCK&1.B& BLOCK&1.1& BLOCK&1.1& BLOCK&1.B& BLOCK&1.2& BLOCK&1.2& Q2& BLOCK&2& BLOCK&2& BLOCK&2& BLOCK&3& (a) In this example of survey branches, the respondent is asked the branching question (Q3) as the second question. The execution of this branch is deferred until the respondent answers Q2, the last question in the block. (b) Two different instances of a survey with top-level blocks (1 and 2), nested blocks (1.1 and 1.2), and a floating block (1.B). The floating block can move anywhere within block 1, while the other blocks retain their relative orders (§2.3). Figure 3: Examples of branches and blocks. floating by using a block name that is an alphanumeric string rather than a number. In this case, the survey author could give a floating question the block number 1.A. That block is contained within block 1, and the question is free to float anywhere within that block. The string itself has no effect on ordering; for example, blocks 1.A and 1.B can appear in any order inside block 1. All questions in the same floating block float together inside their containing block. 3. 3.2 Static Analyses S URVEY M AN provides a number of static analyses that check the survey for validity and identify potential issues. 3.1 Consistent Block Branch Types: S URVEY M AN computes the branch type of every block. A block can contain no branches in the block (NONE) or exactly one branch question (ONE). It can also be a block where all of the questions have branches to the same destination (ALL). This is the approach used to express question variants, where just one of a range of semantically-identical questions is chosen. In this case, questions can only differ in their text; only one of the variants (chosen randomly) will be asked. Well-Formedness After successfully parsing its .csv input, the S URVEY M AN analyzer verifies that the input program itself is well-formed and issues warnings, if appropriate. It checks that the header contains the required Q UESTION and O PTION columns. It warns the programmer if it finds any unrecognized headers, since these may be due to typographical errors. S URVEY M AN also issues a warning if it finds any duplicate questions. It then performs more detailed analysis of branches: Top-Level Branch Targets Only: S URVEY M AN verifies that the target of each branch in the survey is a top-level block; that is, it cannot branch into a nested block. This check takes constant time. Survey Statistics and Entropy If a program passes all of the above checks, S URVEY M AN produces a report of various statistics about the survey, including an analysis of paths through the survey. If we view a path through the survey as the series of questions seen and answered, the computation of paths would be intractable. Consider a survey with 16 randomizable blocks, each having four variants and no branching. We thus have 16! total block orderings; since we choose from four different questions, we end up with 216! unique paths. Fortunately, the statistics we need require only computations of the length of paths rather than the contents of the path. The number of questions in each block can be computed statically. We thus only need to consider the branching between these blocks when computing path lengths. Forward Branches: Since the survey must be a DAG, all branching must be to higher-numbered blocks. S URVEY M AN verifies that each branch target id is larger than the id of the block that the branch question belongs to. Minimum Path Length: Branching in surveys is typically related to some kind of division in the underlying population. When surveys have sufficient branching, it may be possible for some respondents to answer far fewer questions than the survey designer intended – they may short circuit the survey. Sometimes this is by design: for a survey only interested in curly-haired respondents, the survey can be designed so that answering “no” to “Do you have curly hair?” sends the 6 2014/6/24 respondent straight to the end. In other cases, this may not be the intended effect and could be either a typographical error or a case of poor survey design. S URVEY M AN reports the minimum number of questions a survey respondent could answer while completing the survey. Maximum Path Length: A survey that is too long can lead to survey fatigue. Surveys that are too long are also likelier to lead to inattentive responses. S URVEY M AN reports the number of questions in the longest path through the survey to alert authors to this risk. Average Path Length: Backends such as Amazon Mechanical Turk require the requester to provide a time limit on surveys and a payment. The survey author can use the average path length through the survey to estimate the time it would take to complete, and from that compute the baseline payment. S URVEY M AN computes this average by generating a large number of random responses to the survey (currently, 5000) and reports the mean length. Maximum Entropy: Finally, S URVEY M AN reports the entropy of the survey. This number roughly corresponds to the complexity of the survey. If the survey has very low entropy (few questions or answers), the survey will require many respondents for S URVEY M AN to be able to identify inattentive respondents. Surveys with higher entropy provide S URVEYM AN with greater discriminatory power. For a survey of n questions each with mi responses, S URVEY M AN computes a conservative upper bound on the entropy on the survey as n log2 (max{mi |1 ≤ i ≤ n}). 4. Compiler and Runtime System Once a survey passes the validity checks described in Section 3.1, the S URVEY M AN compiler transforms it into a payload that runs inside a web page (§4.1). S URVEY M AN then deploys the survey, either by acting as a webserver itself, or by posting the page to a crowdsourcing platform and collecting responses (§4.2). Display of questions and flow through the survey are managed by an interpreter written in JavaScript (§4.3). After all responses have been collected, S URVEY M AN performs the dynamic analyses described in Section 5. 4.1 Compilation inside an XML payload which is handled by AMT. The embedded interpreter handles randomization, the presentation of questions and answers, and communication with the S URVEY M AN runtime. 4.2 Survey Execution We describe how surveys appear to a respondent on Amazon’s Mechanical Turk; their appearance on a webserver is similar. When a respondent navigates to the webpage displaying the survey, they first see a consent form in the HIT preview. After accepting the HIT, they begin the survey. The user then sees the first question and the answer options. When they select some answer (or type in a text box), the next button and a S UBMIT E ARLY button appear. If the question is instructional and is not the final question in the survey, only the next button appears. When the respondent reaches the final question, only a S UBMIT button appears. Each user sees a different ordering of questions. However, each particular user’s questions are always presented in the same order. The random number generator is seeded with the user’s session or assignment id. This means that if the user navigates away from the page and returns to the HIT, the question order will be the same upon second viewing. S URVEY M AN displays only one question at a time. This design decision is not purely aesthetic; it also makes measuring breakoff more precise, because there is never any confusion as to which question might have led someone to abandon a survey. 4.3 Interpreter Execution of the survey is controlled by an interpreter that manages the underlying evaluation and display. This interpreter contains two key components. The first handles survey logic; it runs in a loop, displaying questions and processing responses. The second layer handles display information, updating the HTML in response to certain events. In addition to the functions that implement the state machine, the interpreter maintains three global variables: • Block Stack: Since the path through a survey is deter- mined by branching over blocks, and since only forward branches are permitted, the interpreter maintains blocks on a stack. • Question Stack: Once a decision has been made as S URVEY M AN transforms the survey into a minimal JSON representation wrapped in HTML, which is executed by the interpreter described in Section 4.3. The JSON representation contains only the bare minimum information required by the JavaScript interpreter for execution, with analysis-related information stripped out. Surveys can be targeted to run on different platforms; S URVEY M AN supports any platform that allows the use of arbitrary HTML. When the platform is the local webserver, the HTML is the final product. When posting to Amazon’s Mechanical Turk (AMT), S URVEY M AN wraps the HTML The S URVEY M AN interpreter is first initialized with the survey JSON, which is parsed into an internal survey representation and then randomized using a seeded random number 7 2014/6/24 to which block is being executed (e.g., after a random selection of a block), the appropriate questions for that block are placed on the question stack. • Branch Reference Cell: If a block contains a branch, this value stores its target. The interpreter defers executing the branch until all of the questions in the block have been answered. generator. This randomization preserves necessary invariants like the partial order over blocks. It then pushes all of the top-level blocks onto the block stack. It then pops off the first block and initializes the question stack, and starts the survey. One question appears at a time, and the interpreter manages control flow to branches depending on the answers given by the respondent. 5. Dynamic Analyses After collecting all results, S URVEY M AN performs a series of tests to identify survey errors and inattentive or random respondents. Table 3 provides an overview of the statistical tests used for each error and each possible combination of question types tested. Different tests are required depending on whether the questions have answers that are ordered or unordered. This section assumes some basic familiarity with standard statistical tests as well as non-parametric statistical tests; for the latter, we refer readers to Efron’s classic paper on the bootstrap method [10] and Wasserman’s excellent text on non-parametric statistics [35]. 5.1 Correlated Questions S URVEY M AN analyzes correlation in two ways. The C OR RELATED column can be used to indicate sets of questions that the survey author expects to have statistical correlation. Flagged questions can be used to validate or reject hypotheses and to help detect bad actors. Alternatively, if a question not marked as correlated is found to have a statistically significant correlation, then S URVEY M AN flags it. Questions are compared pair-wise. S URVEY M AN supports automated correlation analysis only between exclusive (radio button) questions. These questions may be ordered or unordered. For two questions such that at least one of them is unordered, S URVEY M AN returns the χ2 statistic, its p-value, and computes Cramer’s V to determine correlation. It also uses Cramer’s V when comparing an unordered and an ordered question. Ordered questions are compared using Spearman’s ρ. In practice, S URVEY M AN rarely has sufficient data to return confidence intervals on such point estimates. Instead, it simply flags the pair of questions. This survey author can act on this information in two ways. First, the survey author may decide to shorten the survey by removing one or more of the correlated questions. It is ultimately the responsibility of the survey author to use good judgement and domain knowledge when deciding to remove questions. Second, the survey author could use discovered correlations to assist in identification of cohorts or bad actors by updating the entries in the C ORRELATED column appropriately. 5.2 Question Order Bias To compute order bias, S URVEY M AN uses the MannWhitney U test for ordered questions and the χ2 statistic 8 for unordered questions. In each case, S URVEY M AN attempts to rule out the null hypothesis that the distributions of responses are the same regardless of question order. For each question pair (qi , qj ), where i 6= j, S URVEYM AN partitions the sample into two sets: Si<j , the set of questions where qi precedes qj , and Sj<i , the set of questions where qi follows qj . S URVEY M AN assumes each set is independent. We outline below how to test for bias in qi when qj precedes it (the other case is symmetric), both for ordered and unordered questions. Ordered Questions: Mann-Whitney U Statistic 1. Assign ranks to each of the options. For example, in a Likert-scale question having options Strongly Disagree, Disagree, Agree, and Strongly Agree, assign each the values 1 through 4. 2. Convert each answer to qi in Si<j to its rank, assigning average ranks to ties. 3. Convert each answer to qj in Sj<i to its rank, assigning average ranks to ties. 4. Compute the U statistic over the two sets of ranks. If the probability of computing U is less than the critical value, there is a significant difference in the ordering. Unordered Questions: χ2 Statistic 1. Compute frequencies fi<j for the answer options of qi in the set of responses Si<j . We use these values to compute the estimator. 2. Compute frequencies fj<i for answer options qi in the set of responses Sj<i . These form our observations. 3. Compute the χ2 statistic on the data set. The degrees of freedom will be one less than the number of answer options, squared. If the probability of computing such a number is less than the value at the χ2 distribution with these parameters, there is a significant difference in the ordering. S URVEY M AN computes these values for every unique question pair, and reports questions with an identified order bias. 5.3 Question Wording Variant Bias Wording bias uses almost the same analysis approach as order bias. Instead of comparing two sets of responses, S URVEYM AN compares k sets of responses, where k corresponds to the number of variants. As with order bias, S URVEY M AN reports questions whose wording variants lead to a statistically significant difference in responses. 5.4 Breakoff vs. Fatigue S URVEY M AN identifies and distinguishes two kinds of breakoff: breakoff triggered at a particular position in the survey, and breakoff at a particular question. Breakoff by position is often an indicator that the survey is too long. 2014/6/24 E RROR Correlated Questions Question Order Bias Question Wording Variant Bias Inattentive or Random Respondents B OTH O RDERED Spearman’s ρ Mann-Whitney U-Test Mann-Whitney U-Test Nonparametric bootstrap over empirical entropy B OTH U NORDERED Cramer’s V χ2 χ2 Nonparametric bootstrap over empirical entropy O RDERED -U NORDERED Cramer’s V N/A N/A N/A N/A Table 3: The statistical tests used to find particular errors. Tests are conducted pair-wise across questions; each column indicates whether the pairs of questions both have answers that are ordered, both unordered, or a mix. Breakoff by question may indicate that a question is unclear, offensive, or burdensome to the respondent. Since S URVEY M AN randomizes the order of questions whenever possible, it can generally distinguish between positional breakoff and question breakoff without the need for any statistical tests. To identify both forms of breakoff, S UR VEY M AN reports ranked lists of the number of respondents who abandoned the survey by position and by question. A cluster around a position indicates fatigue or that the compensation for the survey, if any, is inadequate. A high number of abandonments at a particular question indicates a problem with the question itself. Please say both words aloud. Which one would you say? definitely antidote-athon probably antidote-athon probably antidote-thon definitely antidote-thon Figure 4: An example question used in the phonology case study (§6.1). • Research Question 1: Is S URVEY M AN usable by sur- vey authors and sufficiently expressive to describe their surveys? • Research Question 2: Is S URVEY M AN able to identify 5.5 survey errors? Inattentive or Random Respondents When questions are unordered, inattentive respondents (who, for example, always click on the first choice) are indistinguishable from random respondents. The same analysis thus identifies both types of respondents automatically. This analysis is most effective when the survey itself has a reasonable maximum entropy, which S URVEY M AN computes in its static analysis phase (§3.2). The longer a survey is and the more question options it has, the greater the dimensionality of the space. Random respondents will exhibit higher entropy than non-random respondents, because they will uniformly fill the space. We thus employ an entropy-based test to identify them. S URVEY M AN first removes all respondents who did not complete the survey, since their entropy is artificially low and would appear to be non-random respondents. S URVEY M AN then computes the empirical probabilities for each question’s answer options. Then for every response r, it calculates a score based on entropy: scorer = Pn p(o r,qi ) log2 (p(or,qi )). S URVEY M AN uses the booti=1 strap method to define a one-sided 95% confidence interval. It then reports any respondents whose score falls outside this interval. 6. Evaluation We evaluate S URVEY M AN’s usefulness in a series of case studies with surveys produced by our social scientist colleagues. We address the following research questions: 9 • Research Question 3: Is S URVEY M AN able to identify random or inattentive respondents? 6.1 Case Study 1: Phonology The first case study is a phonological survey that tests the rules by which English-speakers are believed to form certain word combinations. This survey was written in S URVEY M AN by a colleague in the Linguistics department at the University of Massachusetts with limited guidance from us (essentially an abbreviated version of Section 2). The first block asks demographic questions, including age and whether the respondent is a native speaker of English. The second block contains 96 Likert-scale questions. The final block consists of one freetext question, asking the respondent to provide any feedback they might have about the survey. Each of the 96 questions in the second block asks the respondent to read aloud an English word suffixed with either of the pairs “-thon/-athon” or “licious/-alicious” and judge which sounds more like an English word. An example appears in Figure 4. Our colleague first ran this survey in a controlled experiment (in-person, without S URVEY M AN) that provides a goldstandard data set. We ran this survey four times on Amazon’s Mechanical Turk between September 2013 and March 2014 to test our techniques. Static Analysis: This survey has a maximum entropy of 195.32; the core 96 questions have a maximum entropy of 192 bits. There is no branching in this survey, so without 2014/6/24 How odd is the number 3? Not very odd. Somewhat not odd. Somewhat odd. Very odd. Figure 5: An example question used in the psycholinguistics case study (§6.2). breakoff, the minimum, maximum, and average path lengths are all 99 questions long. Dynamic Analysis: The first run of the survey was early in S URVEY M AN’s development and functioned primarily as a proof of concept. There was no quality control in place. We sent the results of this survey to our colleagues, who verfied that random respondents were a major issue and were tainting the results, demonstrating the need for quality control. The latter three runs were performed at different times of day under slightly different conditions (e.g., time of day); all three permitted breakoff. S URVEY M AN detected random respondents in all three cases. S URVEY M AN found approximately 6% of the respondents to the first two surveys were inattentive or random. We used minimal Mechanical Turk qualifications (at least one HIT done with an 80% or higher approval rate) to filter the first survey, so we expected to see fewer random respondents. Somewhat surprisingly, we found that qualifications made no difference: the second run, launched in the morning on a work day without qualifications, produced similar results to the first. The third run was launched on a weekend night and approximately 15% of respondents were identified as responding randomly. Upon looking closely at these respondents, we saw strong positional preferences (i.e., respondents were repeatedly clicking the same answer), corroborating S URVEY M AN’s findings. Because the survey lacks structure—effectively it consists of only one large block, with no branching—and consists of roughly uniform questions, we did not expect to find any biases or other errors, and S URVEY M AN did not report any. Every question in one of these floating blocks has slightly different wording for both question and options. The other block contains one question asking the respondent about their native language. Because the first block is floating, this question can appear either at the beginning or the end of the survey. We launched this survey on a weekday morning. It took about a day to reach our requested level of 150 respondents. Static Analysis: The maximum entropy for the survey is 34 bits. Since there is no true branching in the survey, every respondent sees the same number of questions, unless they submit early. The maximum, minimum, and average survey lengths are all 17 questions. Dynamic Analysis: S URVEY M AN found no significant breakoff or order bias, but it did find that several questions exhibited marked wording variant bias. These were for the numbers 463, 158, 2. For the number 463, these pairs had significantly different responses: 1. How well does the number 463 represent the category of odd numbers? and How odd is the number 463? 2. How well does the number 463 represent the category of odd numbers? and How good an example of an odd number is the number 463? 3. How odd is the number 463? and How good an example of an odd number is the number 463? While these questions may have appeared to the survey author to be semantically identical, they in fact lead to substantial differences in the responses. This result confirms our colleagues’ hypothesis, which is that previous studies are flawed because they do not take question variant wording bias into account. 6.3 Case Study 3: Labor Economics The second case study is a test of what psychologists call prototypicality and was written in the S URVEY M AN language by another one of our colleagues in the Linguistics department; as with our other colleague, she wrote this survey with only minimal guidance from us. In this survey, respondents are asked to use a scale to rank how well a number represents its parity (e.g., “how odd is this number?”). The goal is to test how people respond to a categorical question (since numbers are only either even or odd) when given a range of subjective responses. There are 65 questions in total. The survey is composed of two blocks. The first block is a floating block that contains 16 floating subblocks of type A LL; that is, only one randomlychosen question from the possible variants will be asked. Our final case study is a survey about wage negotiation, conducted with a colleague in Labor Studies. The original design was completely flat with no blocks or branching. There were 38 questions that were a mix of Likert scales, checkbox, and other unordered questions. The survey asked for demographic information, work history, and attitudes about wage negotiation. Our collaborator was interested in seeing whether complete randomization would have an impact on the quality of results. We worked with her to write a version of the survey that comprised both a completely randomized version and a completely static version: a respondent is randomly given one of the two versions. This approach lets us to collect data under nearly identical conditions, since each respondent is equally likely to see the randomized or the static version. We launched this survey on a Saturday and obtained 69 respondents. We observed extreme survey abandonment: none of the respondents completed the survey. The maximum number of questions answered was 26. 10 2014/6/24 6.2 Case Study 2: Psycholinguistics Static Analysis: S URVEY M AN reports that this survey has a maximum entropy of 342 bits, which is extremely high; some questions have numerous options, such as year of birth. Every path is of length 40, as expected. the only survey specification language we are aware of that is extensible, open source, and has an active community of users. Unlike S URVEY M AN, none of these provide for randomization or error analyses. Dynamic Analysis: The analysis of breakoff revealed both positional and question breakoff. 72.5% of the breakoff occurred in the first six positions, suggesting that the compensation for the survey was insufficient ($0.10 USD). 52% of the instances of breakoff also occurred in just five of the questions, shown in Table 6. These results illustrate the impact of randomization on diagnosing breakoff. If question order were fixed for the whole population, we would not be able to determine whether question or position was causing breakoff. In the ordered version, the seven questions are all demographic. It is reasonable to conclude that some respondents find these demographic questions to be problematic, leading them to abandon the survey. This suggests that the survey author should consider placing these questions at the end of the survey, or omitting them if possible. 7.2 7. Related Work 7.1 Survey Languages Table 4 provides an overview of previous survey languages and constrasts them with S URVEY M AN. Standalone DSLs. Blaise is a language for designing survey logic and layout [22]. Blaise programs consist of named blocks that contain question text, unique identifiers, and response type information. Control flow is specified in a rules block, where users list the questions by unique identifier in their desired display order. This rules block may also contain data validation rules, such that an Age field be greater than 18. Similarly, QPL is a language and deployment tool for web surveys sponsored by the U.S. Government Accountability Office [34]. Neither language supports randomization or identifies survey errors. Embedded DSLs. Topsl [17] and websperiment [18] embed survey structure specifications in general-purpose programming languages (PLT Scheme and Ruby, respectively). Topsl is a library of macros to express the content, control flow, and layout of surveys; Websperiment provides similar functionality. Both provide only logical structures for surveys and a means for customizing their presentation. Neither one can detect survey errors or do quality control. Web Survey Tools There are numerous tools for deploying web-based surveys, including Qualtrics, SurveyMonkey, instant.ly, and Google Consumer Surveys [12, 15, 26, 31]. Because these survey tools impose a strict order on questions and offer no way to express variants, they cannot control for question ordering or question choice bias. Some of these systems, like Google Consumer Surveys, offer the ability to randomize the order of answers, but not questions [12]. None of these systems address the problem of debugging survey errors or inattentive respondents. 7.3 Survey Analyses Despite the fact that surveys are a well-studied topic—a key survey text from 1978 has over 11,000 citations [8])—there has been surprisingly little work on approaches to automatically address survey errors. We are aware of no previous work on identifying any other errors beyond breakoff. Peytchev et al. observe that there is little scholarly work on identifying breakoff and attribute this to a lack of variation in question characteristics or randomization of question order, which S URVEY M AN provides [25]. Inattentive Respondents. Several researchers have proposed post hoc analyses to identify inattentive respondents, also known as insufficent effort responding [14]. Meade et al. describe a technique based on multivariate outlier analysis (Mahalanobis distance) that identifies respondents who are consistently far from the mean of a set of items [21]. Unfortunately, this technique assumes that legitimate survey responses will all form one cluster. This assumption can easily be violated if survey respondents constitute multiple clusters. For example, politically conservative individuals might answer questions on a health care survey quite differently from politically liberal individuals. In any event, there is no compelling reason to believe clusters will be distributed normally around the mean. Other ad hoc techniques aimed at identifying random or low-effort respondents include measuring the amount of time spent completing a survey, adding CAPTCHAs, and measuring the entropy of responses, assuming that low-effort respondents either choose one option or alternate between options regularly [36]; none of these reliably distinguish lazy or random respondents from real respondents. XML-Based Specifications. At least two attempts have been made to express survey structure using XML. The first is SuML; the documentation for this schema is no longer available and its specification is not described in its paper [1]. A recent XML implementation of survey design is SQBL [29, 30]. SQBL is available with a WYSIWYG editor for designing surveys [28]. It offers default answer options, looping structures, and reusable components. It is As far as we are aware, S URVEY M AN’s language is the first to combine branches with randomized control flow. Dijkstra’s Guarded Command notation requires non-deterministic choice among any true cases in conditionals [7]. It should 11 2014/6/24 7.4 Randomized Control Flow Question Please choose one. In which country were you born? In what year were you born? In which country do you live in now? In the past, have you ever asked your manager or boss for an increase in pay or higher wage? Count 12 12 5 4 3 Version All Static Static Static Fully Randomized Figure 6: The top five question breakoffs found in the psycholinguistics case study (§6.3). L ANGUAGE T YPE Blaise [22] QPL [34] Topsl [17] websperiment [18] SuML [1] SQBL [30] S URVEY M AN Standalone DSL Standalone DSL Embedded DSL Embedded DSL XML schema XML schema Standalone DSL L OOPS Q UESTION R ANDOMIZATION E RROR D ETECTION R ANDOM R ESPONDENT D ETECTION 3 3 3 3 3 3 Table 4: Feature comparison of previous survey languages and S URVEY M AN. come as no surprise that Dijkstra’s language does not support G OTO statements; S URVEY M AN supports branches from and to randomized blocks. 7.5 Crowdsourcing and Quality Control Barowy et al. describe AUTO M AN, an embedded domainspecific language that integrates digital and human computation via crowdsourcing platforms [2]. Both AUTO M AN and S URVEY M AN have shared goals, including automatically ensuring quality control of respondents. However, AUTO M AN’s focus is on obtaining a single correct result for each human computation. S URVEY M AN instead collects distributions of responses, which requires an entirely different approach. 8. Conclusion and Future Work This paper reframes surveys and their errors as a programming language problem. It presents S URVEY M AN, a programming language and runtime system for implementing surveys and identifying survey errors and inattentive respondents. Pervasive randomization prevents small biases from being magnified and enables statistical analyses, letting S UR VEY M AN identify serious flaws in survey design. We believe that this research direction has the potential to have significant impact on the reliability and reproducibility of research conducted with surveys. S URVEY M AN is available for download at http://www.surveyman.org. Acknowledgments Presley Pizzo, and Brian Smith; John Foley, Molly McMahon, Alex Passos, and Dan Stubbs; and fellow PLASMA lab members Dan Barowy, Charlie Curtsinger, and John Vilk for valuable discussions during the evolution of this project. References [1] M. Barclay, W. Lober, and B. Karras. SuML: A survey markup language for generalized survey encoding. In Proceedings of the AMIA Symposium, page 970. American Medical Informatics Association, 2002. [2] D. W. Barowy, C. Curtsinger, E. D. Berger, and A. McGregor. AUTO M AN: A platform for integrating human-based and digital computation. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA ’12, pages 639–654, New York, NY, USA, 2012. ACM. [3] A. J. Berinsky, G. A. Huber, and G. S. Lenz. Evaluating online labor markets for experimental research: Amazon.com’s Mechanical Turk. Political Analysis, 20(3):351–368, 2012. [4] G. A. Churchill Jr and D. Iacobucci. Marketing research: methodological foundations. Cengage Learning, 2009. [5] M. P. Couper. Designing Effective Web Surveys. Cambridge University Press, New York, NY, USA, 1st edition, 2008. [6] D. De Vaus. Surveys in social research. Psychology Press, 2002. [7] E. W. Dijkstra. Guarded commands, nondeterminacy and formal derivation of programs. Commun. ACM, 18(8):453– 457, Aug. 1975. [8] D. A. Dillman. Mail and telephone surveys, volume 3. Wiley New York, 1978. This material is based upon work supported by the National Science Foundation under Grant No. CCF-1144520. The authors would like to thank our social science collaborators at the University of Massachusetts, Sara Kingsley, Joe Pater, [9] J. S. Downs, M. B. Holbrook, S. Sheng, and L. F. Cranor. Are your participants gaming the system?: Screening Mechanical Turk workers. In Proceedings of the SIGCHI Conference on 12 2014/6/24 Human Factors in Computing Systems, CHI ’10, pages 2399– 2402, New York, NY, USA, 2010. ACM. [29] S. Spencer. A case against the skip statement, 2013. Unpublished. [10] B. Efron. Bootstrap Methods: Another Look at the Jackknife. The Annals of Statistics, 7(1):pp. 1–26, 1979. [30] S. Spencer. The simple questionnaire building language, 2013. [31] SurveyMonkey, Inc. Surveymonkey. http://surveymonkey. com, 2013. [11] G. Emanuel. Post A Survey On Mechanical Turk And Watch The Results Roll In: All Tech Considered: NPR. http: //n.pr/1gqklTx, Mar. 2014. [32] R. Tourangeau, F. Conrad, and M. Couper. The Science of Web Surveys. Oxford University Press, 2013. [12] I. Google. Google consumer surveys. http://www.google. com/insights/consumersurveys/home, 2013. [33] P. D. Umbach. Web surveys: Best practices. New Directions for Institutional Research, 2004(121):23–38, 2004. [13] J. J. Horton, D. G. Rand, and R. J. Zeckhauser. The online laboratory: Conducting experiments in a real labor market. Experimental Economics, 14(3):399–425, 2011. [34] U.S. Government Accountability Office. Questionnaire programming language. http://qpl.gao.gov/qpl6ref/01. php, 2009. [14] J. L. Huang, P. G. Curran, J. Keeney, E. M. Poposki, and R. P. DeShon. Detecting and deterring insufficient effort responding to surveys. Journal of Business and Psychology, 27(1):99–114, 2012. [35] L. Wasserman. All of Nonparametric Statistics (Springer Texts in Statistics). Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2006. [15] Instant.ly. Instant.ly. http://instant.ly, 2013. [16] P. Ipeirotis. Demographics of Mechanical Turk. Technical Report NYU working paper no. CEDER-10-01, 2010. [36] D. Zhu and B. Carterette. An analysis of assessor behavior in crowdsourced preference judgments. In Proceedings of the SIGIR 2010 Workshop on Crowdsourcing for Search Evaluation (CSE 2010), pages 21–26, 2010. [17] M. MacHenry and J. Matthews. Topsl: A domainspecific language for on-line surveys. In O. Shivers and O. Waddell, editors, Proceedings of the Fifth ACM SIGPLAN Workshop on Scheme and Functional Programming, pages 33–39, Snowbird, Utah, Sept. 22, 2004. Technical report TR600, Department of Computer Science, Indiana University. http://www.cs.indiana.edu/cgi-bin/ techreports/TRNNN.cgi?trnum=TR600. [18] G. MacKerron. Implementation, implementation, implementation: Old and new options for putting surveys and experiments online. Journal of Choice Modelling, 4:20–48, 2011. [19] E. Martin. Survey questionnaire construction. Technical Report Survey Methodology #2006-13, Director’s Office, U.S. Census Bureau, 2006. [20] W. Mason and S. Suri. Conducting behavioral research on Amazon’s Mechanical Turk. Behavior research methods, 44(1):1–23, 2012. [21] A. W. Meade and S. B. Craig. Identifying careless responses in survey data. Psychological methods, 17(3):437, 2012. [22] S. Netherlands. Blaise : Survey software for professionals. http://www.blaise.com/ShortIntroduction, 2013. [23] Pew Research Center. Question Order | Pew Research Center for the People and the Press. http://www.people-press.org/methodology/ questionnaire-design/question-order/, 2014. [24] Pew Research Center. Question Wording | Pew Research Center for the People and the Press. http://www.people-press.org/methodology/ questionnaire-design/question-wording/, 2014. [25] A. Peytchev. Survey breakoff. Public Opinion Quarterly, 73(1):74–97, 2009. [26] I. Qualtrics. Qualtrics.com. http://qualtrics.com, 2013. [27] D. J. Solomon. Conducting web-based surveys, August 2001. [28] S. Spencer. Canard question module editor. https://github. com/LegoStormtroopr/canard, 2013. 13 2014/6/24
6cs.PL
1 Capacity Comparison between MIMO-NOMA and MIMO-OMA with Multiple Users in a Cluster arXiv:1706.02731v1 [cs.IT] 8 Jun 2017 Ming Zeng, Animesh Yadav, Octavia A. Dobre, Georgios I. Tsiropoulos and H. Vincent Poor Abstract In this paper, the performance of multiple-input multiple-output non-orthogonal multiple access (MIMO-NOMA) is investigated when multiple users are grouped into a cluster. The superiority of MIMO-NOMA over MIMO orthogonal multiple access (MIMO-OMA) in terms of both sum channel capacity and ergodic sum capacity is proved analytically. Furthermore, it is demonstrated that the more users are admitted to a cluster, the lower is the achieved sum rate, which illustrates the tradeoff between the sum rate and maximum number of admitted users. On this basis, a user admission scheme is proposed, which is optimal in terms of both sum rate and number of admitted users when the signal-to-interferenceplus-noise ratio thresholds of the users are equal. When these thresholds are different, the proposed scheme still achieves good performance in balancing both criteria. Moreover, under certain conditions, it maximizes the number of admitted users. In addition, the complexity of the proposed scheme is linear to the number of users per cluster. Simulation results verify the superiority of MIMO-NOMA over MIMO-OMA in terms of both sum rate and user fairness, as well as the effectiveness of the proposed user admission scheme. I. I NTRODUCTION Non-orthogonal multiple access (NOMA) has attracted considerable attention recently due to its superior spectral efficiency [1]–[7]. Specifically, NOMA adopts superposition coding (SC) at the transmitter and successive interference cancellation (SIC) at the receiver. Moreover, the This research was supported in part by the Natural Sciences and Engineering Research Council of Canada (NSERC) through its Discovery program and the U.S. National Science Foundation under Grants CCF-1420575 and CNS-1456793. O. A. Dobre, A. Yadav, and M. Zeng are with Memorial University, St. John’s, NL A1B 3X9, Canada (e-mail: odobre, animeshy, [email protected]). G. I. Tsiropoulos is with National Technical University of Athens, 10682, Athens, Greece (e-mail: [email protected]). H. V. Poor is with Princeton University, Princeton, NJ 08544 USA (e-mail: [email protected]). June 12, 2017 DRAFT 2 transmitted power allocated to the users is inversely proportional to their channel gains. This way, the user with better channel gain can handle the interference from its counterpart, while its interference to the counterpart remains comparatively small. Thus, NOMA achieves a better balance between sum rate and fairness when compared with conventional orthogonal multiple access (OMA) scheme, in which more power is assigned to the users with better channel conditions to increase the sum rate [8]. It is of great interest to conduct comparisons between NOMA and OMA. Early works mainly focus on single-input single-output (SISO) systems. For instance, simulation results in [1] show that a larger sum rate is achieved by NOMA, whereas in [9], it is proved that NOMA strictly dominates OMA via the achievable rate region. However, no analytical proof is provided in [1] and [9]. In [10], the performance of NOMA is investigated in a cellular downlink scenario with randomly deployed users, and the developed analytical results show that NOMA can achieve superior performance in terms of ergodic sum rate. In [8], the problem of maximizing the fairness among users of a NOMA downlink system is studied in terms of data rate under full channel state information (CSI) and outage probability under average CSI. Simulation results verify the efficiency of NOMA, which also achieves improved fairness when compared to time division multiple access. Emerging research activities in future mobile wireless networks study the performance of NOMA under multiple-input multiple-output (MIMO) channels. In [11], the authors explore the two user power allocation problem of a NOMA scheme by maximizing the ergodic sum capacity of MIMO channel under the total transmit power, minimum rate requirement and partial CSI availability constraints. Optimal and lower complexity power allocation schemes are proposed, and numerical results show that MIMO-NOMA obtains a larger ergodic sum capacity when compared to MIMO-OMA. In [12], [13], Ding et al. investigate the performance of MIMONOMA when there are multiple clusters in the system and, through simulations, validate the superiority of MIMO-NOMA over MIMO-OMA. Specifically, [12] studies the downlink (DL) with limited feedback at the base station (BS), while [13] considers both DL and uplink with full CSI at the user side and BS. Additionally, for each cluster, multiple users can be admitted into [12], whereas [13] can only support two users performing signal alignment. However, neither [12] nor [13] provides an analytical comparison between MIMO-NOMA and MIMO-OMA in terms of sum rate. Based on the system model proposed in [12], [14] conducts the sum rate comparison between them when there are only two users in each cluster. It is shown analytically that for any DRAFT June 12, 2017 3 rate pair achieved by MIMO-OMA, there is a power split for MIMO-NOMA whose rate pair is larger. Despite the attractiveness of the result, its main issue is that the authors use the Jensen’s inequality and concavity of log(·) inappropriately to obtain the upper bound sum rate for MIMOOMA. In [15], it is shown that for a simple scenario of two users, MIMO-NOMA dominates MIMO-OMA in terms of sum rate. Furthermore, for a more practical scenario of multiple users, with two users paired into a cluster and sharing a common transmit beamforming vector, the conclusion still holds. Most of the existing works in MIMO-NOMA focus on the case of two users in each cluster [3], [11]–[16], which leads to a less-studied alternative in the case of multiple users [12], [17]. In order to serve more users simultaneously, it is of great significance to investigate the performance of MIMO-NOMA with multiple users per cluster. Although [12] can support multiple users per cluster, the authors focus on user pairing and power allocation for the two user case. In [17], the proposed MIMO-NOMA scheme requires only one-bit feedback, but power allocation is not addressed, and there is no theoretical comparison of the performance of MIMO-NOMA and MIMO-OMA. In this paper, we aim to analytically compare the performance of MIMO-NOMA with MIMO-OMA in terms of the sum channel capacity and ergodic sum capacity rather than merely providing simulation results, when there are multiple users in a cluster. Furthermore, the study of the way the sum rate varies as the number of admitted users increases in each cluster is conducted. To the best of our knowledge, this paper is the first to address this issue under MIMO-NOMA systems. Following this, optimal user admission is investigated in terms of the number of admitted users and sum rate, when the target signal-to-interference-plus-noise ratio (SINR) of each user is given. Compared with the existing works, the main contribution of this paper lies in: • We prove analytically that MIMO-NOMA outperforms MIMO-OMA in terms of both sum channel capacity and ergodic sum capacity when there are multiple users in a cluster. We show that for any power split in MIMO-OMA, a larger sum rate can be achieved by MIMO-NOMA via simply assigning the same power coefficient to the latter. In addition, for the case of two users per cluster, we derive the power split that maximizes the sum rate gap between MIMO-NOMA and MIMO-OMA. Meanwhile, numerical results validate that MIMO-NOMA also achieves higher user fairness than MIMO-OMA when there are two or three users in a cluster. • We demonstrate that as more users are admitted to a cluster, the sum rate decreases. This June 12, 2017 DRAFT 4 illustrates that a tradeoff has to be considered between the sum rate and number of admitted users. On this basis, we propose a user admission scheme, which aims to maximize the number of admitted users under given SINR thresholds. The proposed scheme is shown to be optimal when the SINR thresholds for users in the same cluster are equal. Otherwise, it achieves a good balance between the sum rate and number of admitted users. Furthermore, under certain conditions, the proposed scheme maximizes the number of admitted users. Additionally, its complexity is linear. The rest of the paper is organized as follows. The system model is introduced in Section II. In Section III, the capacity comparison between MIMO-NOMA and MIMO-OMA is conducted. The proposed user admission scheme is introduced in Section IV, while simulation results are shown in Section V. In Section VI, conclusions are drawn. II. S YSTEM M ODEL A downlink multiuser MIMO system is considered in this paper, where the BS with M antennas transmits data to multiple receivers, each with N antennas. There are a total of ML users in the system, which are randomly grouped into M clusters with L (L ≥ 2) users per cluster. The links between the BS and users are assumed to be quasi-static independent and identically distributed (i.i.d.) fading channels. Specifically, Hm,l ∈ CN ×M and nm,l ∈ CN ×1 respectively represent the channel matrix and the additive white Gaussian noise vector for the lth user in the mth cluster, i.e., user (m, l) (m ∈ {1, . . . , M}, l ∈ {1, . . . , L}). Additionally, P ∈ CM ×M denotes the precoding matrix used by the BS, while vm,l ∈ CN ×1 denotes the detection vector for user (m, l). The precoding matrices and detection vectors are designed as follows [12]: a) P = IM , where IM denotes the M × M identity matrix; b) |vm,l |2 = 1 and H vm,l Hm,l pk = 0 for any k 6= m, where pk is the kth column of P. The number of antennas at the user is assumed to be equal or larger than that at the BS to ensure the feasibility of vm,l . H On this basis, for user (m, l), only a scalar value |vm,l Hm,l pm |2 needs to be fed back to the BS. Moreover, the interference from the users in all the other clusters can be removed even when there are multiple users in a cluster [12]. The performance of two multiple access schemes are compared, namely, MIMO-NOMA and MIMO-OMA. DRAFT June 12, 2017 5 A. MIMO-NOMA For MIMO-NOMA scheme, SC is employed at the transmitter side, i.e., the transmitted signals share the same frequency and time resources but vary in power. Thus, the signals transmitted from the BS are given by x = Ps, (1) where the information-bearing vector s ∈ CM ×1 can be expressed as  p  p Ω1,1 s1,1 + · · · + Ω1,L s1,L     .. s= , . p  p ΩM,1 sM,1 + · · · + ΩM,L sM,L (2) where sm,l and Ωm,l are the signal and the corresponding power allocation coefficient intended P for user (m, l), satisfying Ll=1 Ωm,l = 1, ∀m ∈ {1, . . . , M}. Without loss of generality, we set the total power to 1 for the convenience of analysis. Further, the received signal at user (m, l) is given by ym,l = Hm,l Ps + nm,l . (3) By applying the detection vector vm,l on the received signal, we can easily obtain H H vm,l ym,l = vm,l Hm,l pm L X p Ωm,l sm,l + l=1 M X H H nm,l , vm,l Hm,l pk sk +vm,l (4) k=1,k6=m | {z } interference from other clusters where sk denotes the kth row of s. H Due to the constraint1 on the detection vector, i.e., vm,l Hm,l pk = 0 for any k 6= m, the above equation can be simplified as H vm,l ym,l = H vm,l Hm,l pm L X p H Ωm,l sm,l + vm,l nm,l . (5) l=1 Without loss of generality, the effective channel gains are rearranged as H H |vm,1 Hm,1 pm |2 ≥ · · · ≥ |vm,L Hm,L pm |2 . 1 H Owing to the specific selection of P, this constraint is further reduced to vm,l H̃m,l (6) = 0, where H̃m,l = [h1,ml · · · hm−1,ml hm+1,ml · · · hM,ml ] and hi,ml is the ith column of Hm,l [12]. Hence, vm,l can be expressed as Um,l wm,l , where Um,l is the matrix consisting of the left singular vectors of H̃m,l corresponding to the non-zero singular values, and H wm,l is the maximum ratio combining vector expressed as UH m,l hm,ml /|Um,l hm,ml |. June 12, 2017 DRAFT 6 At the receiver side, SIC will be conducted by user (m, l) to remove the interference from the users with worse channel gains, i.e., (m, l + 1), . . . , (m, L). At this juncture, the following lemma is helpful to understand the efficient performance of SIC at user (m, l). Lemma 1: The interference from user (m, k), ∀k ∈ {l + 1, . . . , L} can be removed at user (m, l). Proof: Refer to Appendix A. Remark: Lemma 1 shows that under the given system model, the interference from users with worse channel conditions can be removed. Consequently, the achieved data rate at user (m, l) is given by NOMA Rm,l  = log2 1 + 2 H H ρΩm,l |vm,l m,l pm | Pl−1 H H 2 1+ρ k=1 Ωm,k |vm,l m,l pm |  , (7) where ρ = 1/σn2 , with σn2 as the noise variance. We assume that the noise variance is the same for all users. B. MIMO-OMA For the OMA scheme, the same power coefficients are allocated to the L users per cluster as for the case of MIMO-NOMA for the sake of comparison, i.e., Ωm,1 , . . . , Ωm,L . In addition, the degrees of freedom (time or frequency) are split amongst the L users per cluster, i.e., user (m, l) P is assigned a fraction of the degrees of freedom, denoted by λm,l , satisfying Ll=1 λm,l = 1. Accordingly, the achieved data rate at user (m, l) is given by [9]  OMA Rm,l = λm,l log2 1 + 2 H H ρΩm,l |vm,l m,l pm | λm,l  . (8) The following lemma gives the sum rate upper bound when two users are paired in a cluster. OMA Lemma 2: The sum rate for two users Sm,2 is bounded by [15] OMA Sm,2 ≤ log2 (1 + 2 X l=1 H ρΩm,l |vm,l Hm,l pm |2 ), (9) where the equality holds when λm,l = P2 H Ωm,l |vm,l Hm,l pm |2 k=1 DRAFT H Ωm,k |vm,k Hm,k pm |2 , l ∈ {1, 2}. (10) June 12, 2017 7 Remark: Lemma 2 gives the maximum sum rate of two users for MIMO-OMA. On this basis, the bound of the sum rate for the mth cluster can be derived, when there are L users. Theorem 1: The sum rate in the mth cluster is upper bounded by OMA Sm,L ≤ log2 (1 + L X l=1 H ρΩm,l |vm,l Hm,l pm |2 ), (11) where the equality holds when H Ωm,l |vm,l Hm,l pm |2 λm,l = PL , l ∈ {1, . . . , L}. H 2 k=1 Ωm,k |vm,k Hm,k pm | (12) Proof: Refer to Appendix B. Remark: Theorem 1 shows that once the power allocation coefficients are ascertained, the optimal allocation of degrees of freedom can be obtained accordingly to ensure that the maximum OMA sum rate for the mth cluster Sm,L is achieved. III. C APACITY C OMPARISON BETWEEN MIMO-NOMA AND MIMO-OMA In this section, both sum channel capacity and ergodic sum capacity for the mth cluster achieved by MIMO-NOMA are compared to that achieved by MIMO-OMA. A. Sum Channel Capacity The sum rate for MIMO-OMA has already been obtained, i.e., (11) and (12). Now, the sum P NOMA NOMA rate for the mth cluster in MIMO-NOMA is considered, which is Sm,L = Ll=1 Rm,l , and can be easily expressed as NOMA Sm,L = L X l=1  log2 1 + 2 H H ρΩm,l |vm,l m,l pm | Pl−l H 1+ρ k=1 Ωm,k |vm,l Hm,l pm |2  . (13) Lemma 3: The lower bound of the sum rate for MIMO-NOMA is given by NOMA Sm,L ≥ log2 (1 + ρ L X l=1 H Ωm,l |vm,l Hm,l pm |2 ). (14) Proof: Refer to Appendix C. Theorem 2: For any power split in MIMO-OMA, a larger sum rate can be achieved by MIMONOMA via assigning the same power split to the latter. In particular, when the power split is optimal for MIMO-OMA, a larger sum channel capacity can be achieved by MIMO-NOMA. June 12, 2017 DRAFT 8 Proof: Combining Theorem 1 and Lemma 3, i.e., (11) and (14), we obtain NOMA OMA Sm,L ≥ Sm,L , (15) which proves the superiority of MIMO-NOMA over MIMO-OMA in terms of sum rate for any power split. OMA When the power split is optimal for MIMO-OMA, the sum channel capacity, denoted as Cm,L , is achieved if (12) is met. Let us assign the same power split to MIMO-NOMA and denote its ′ NOMA NOMA sum rate as Sm,L . We also denote the sum channel capacity for MIMO-NOMA as Cm,L , ′ NOMA NOMA which satisfies Cm,L ≥ Sm,L . Thus, we have ′ NOMA NOMA OMA Cm,L ≥ Sm,L ≥ Cm,L , (16) where the second inequality comes from (15). Therefore, MIMO-NOMA achieves a larger sum channel capacity than MIMO-OMA. In summary, it is proved analytically that for any instantaneous channel gain Hm,l (m ∈ {1, . . . , M}, l ∈ {1, . . . , L}), given the power split in MIMO-OMA, a larger sum rate can be achieved by MIMO-NOMA via simply allocating the same power split to the latter. Note that there is no constraint on the value of the power split, which means that the conclusion is true for any power split. Therefore, we can conclude that even when there are multiple users per cluster, MIMO-NOMA strictly outperforms MIMO-OMA in terms of the sum rate under any instantaneous channel gain Hm,l and any power split. On this basis, it is shown that MIMONOMA also achieves a larger sum channel capacity than MIMO-OMA. Furthermore, when there are only two users per cluster, the following lemma provides the power allocation coefficient such that the gap between the sum rate of MIMO-NOMA and MIMO-OMA is maximized. Lemma 4: The sum rate gap for two users between MIMO-NOMA and MIMO-OMA is maximized, when the following equation is satisfied Ωm,1 = DRAFT q H ρ|vm,1 Hm,1 pm |2 + 1 − 1 H ρ|vm,1 Hm,1 pm |2 . (17) June 12, 2017 9 Proof: According to (9) and (13), the sum rate gap between MIMO-NOMA and MIMOOMA is given by H △Sm,2 = log2 {1 + ρΩm,1 |vm,1 Hm,1 pm |2 }   H ρΩm,2 |vm,2 Hm,2 pm |2 + log2 1 + H 1 + ρΩm,1 |vm,2 Hm,2 pm |2 − log2 (1 + 2 X l=1 H ρΩm,l |vm,l Hm,l pm |2 ). (18) After replacing Ωm,2 with 1 − Ωm,1 , the only variable is Ωm,1 . It can that √ beH easily proved 2 +1−1 H p | ρ|v m m,1 ∂△Sm,2 ∂△Sm,2 m,1 , and = 0. Moreover, ∂Ωm,1 > 0 when Ωm,1 < when (17) is satisfied, ∂Ωm,1 ρ|vH Hm,1 pm |2 m,1 ∂△Sm,2 ∂Ωm,1 < 0, otherwise. Therefore, the sum rate gap is maximized when (17) holds. In addition, √ H ρ|vm,1 Hm,1 pm |2 +1−1 H 2 since ρ|vm,1 Hm,1 pm | > 0, it can be easily proven that 0 < < 1, which fits ρ|vH Hm,1 pm |2 m,1 the range of Ωm,1 . Accordingly, for the two user case, we can calculate the maximum sum rate gap between MIMO-NOMA and MIMO-OMA by substituting the value of Ωm,1 from (17) into (18). Remark: It is somewhat surprising that the power coefficient maximizing the sum rate gap is only determined by the channel of the first user. Moreover, according to (17), it can be H H easily verified that Ωm,1 declines with ρ|vm,1 Hm,1 pm |2 . Specifically, when ρ|vm,1 Hm,1 pm |2 → 0, H Ωm,1 → 0.5, and ρ|vm,1 Hm,1 pm |2 → ∞, Ωm,1 → 0. Thus, it can be further concluded that H Ωm,1 < 0.5 for any value of ρ|vm,1 Hm,1 pm |2 . This is consistent with the concept of NOMA, in which a larger proportion of power should be allocated to the user with worse channel condition. B. Ergodic Sum Capacity Corollary 1: For any power split in MIMO-OMA, a larger ergodic sum rate can be achieved by MIMO-NOMA via assigning the same power split to the latter. In particular, when the power split is optimal for MIMO-OMA, a larger ergodic sum capacity can be achieved by MIMO-NOMA. Proof: As shown in the previous section, MIMO-NOMA strictly outperforms MIMO-OMA in terms of sum rate under any instantaneous channel gains of Hm,l . By applying the expectation operator, it is straightforward to claim that the ergodic sum rate of MIMO-NOMA is always larger than that of MIMO-OMA. Likewise, it is easy to verify that the ergodic sum capacity of MIMO-NOMA is always larger than that of MIMO-OMA. Additionally, it is worth noticing that the conclusions hold regardless of the distribution of Hm,l . June 12, 2017 DRAFT 10 To summarize, the same conclusion as for the sum channel capacity holds true for the ergodic sum capacity. Thus, even for the case of multiple users per cluster, MIMO-NOMA strictly outperforms MIMO-OMA in terms of both sum channel capacity and ergodic sum capacity. IV. U SER A DMISSION Analytical results obtained in the previous section validate that MIMO-NOMA strictly outperforms MIMO-OMA in terms of both sum rate and ergodic sum rate, even when there are multiple users in a cluster. Does this mean we should group a large number of users in a cluster to increase the system capacity in terms of the number of users? Clearly, SIC at the receiver becomes increasingly complicated when more users are included in a cluster, which limits the practical number of users per cluster. Furthermore, the study of how the sum rate varies with the number of admitted users is of interest, which we explore in the following section. A. Sum Rate versus Number of Users Here the MIMO-NOMA sum rate between the case of l and l + 1 users in the mth cluster is compared. For notational simplicity, the index of the cluster, m, and the NOMA superscript are omitted. The power allocation coefficients for 1-to-l and 1-to-(l + 1) users are denoted P P as Ω1 , . . . , Ωl and Θ1 , . . . , Θl+1 respectively, satisfying lk=1 Ωk = l+1 k=1 Θk = 1, and Ωk ≥ Θk , ∀k ∈ {1, . . . , l}. Additionally, we set Ξk = ρ|vkH Hk p|2 , k ∈ {1, . . . , l + 1} for notational simplicity, and the effective channel of the users follow the order in (6), i.e., Ξ1 ≥ · · · ≥ Ξl+1 . According to (7), the sum rate up to l users can be easily re-written as S (l) = l X (l) Rk k=1 = log2 (1 + Ω1 Ξ1 ) + l X log2 k=2  1+ 1+ (l) Pk i=1 Ωi Ξk Pk−1 i=1 Ωi Ξk  , (19) where Rk denotes the rate of the kth user for the case of l users in total. Likewise, the sum rate for the l + 1 users can be expressed as S (l+1) = l+1 X (l+1) Rk k=1 = log2 (1 + Θ1 Ξ1 ) + l X log2 k=2 + log2 DRAFT 1 + Ξl+1 , Pl 1 + i=1 Θi Ξl+1 1+ 1+ Pk i=1 Pk−1 i=1 Θ i Ξk Θ i Ξk (20) June 12, 2017 11 (l+1) where Rk denotes the rate of the kth user for the case of l + 1 users in total. Combining (19) and (20), the difference between the two sum rates, denoted by Λ = S (l+1) − S (l) , can be expressed as 1 + Ξl+1 1 + Θ 1 Ξ1 + log2 Pl 1 + Ω1 Ξ1 1 + i=1 Θi Ξl+1 Pk−1 P l X 1 + i=1 Ωi Ξk 1 + ki=1 Θi Ξk × + log2 Pk−1 Pk 1 + i=1 Θi Ξk 1 + i=1 Ωi Ξk k=2 Λ = log2 1 + Θ 1 Ξ1 1 + Ξl+1 + log2 Pl 1 + Ω1 Ξ1 1 + i=1 Θi Ξl+1 Pk−1 P l X 1 + i=1 Ωi Ξk 1 + ki=1 Θi Ξk × + log2 Pk Pk−1 1 + i=1 Ωi Ξk 1 + i=1 Θi Ξk k=2  1 + Θ 1 Ξ1 1 + Ξl+1 = log2 × Pl 1 + Ω1 Ξ1 1 + i=1 Θi Ξl+1 P Pk−1  l Y 1 + ki=1 Θi Ξk 1 + i=1 Ωi Ξk × × Pk Pk−1 Ω Ξ 1 + 1 + i k i=1 i=1 Θi Ξk k=2  1 + Θ1 Ξ1 1 + Ω1 Ξ2 = log2 × 1 + Ω1 Ξ1 1 + Θ1 Ξ2 {z } | = log2 Λ1 × × l−1 Y |k=2 1+ 1+ 1+ 1+ | Pl Pk Θ i Ξk Pi=1 k i=1 Ωi Ξk Θ i Ξl Pi=1 l i=1 Ωi Ξl × {z Λ2 1+ 1+ Pk Pki=1 i=1 Ωi Ξk+1 Θi Ξk+1 }  1 + Ξl+1 . × P 1 + li=1 Θi Ξl+1 {z } (21) Λ3 First, let us consider Λ1 , which is given by Λ1 = 1 + Θ1 Ξ1 + Ω1 Ξ2 + Θ1 Ξ1 Ω1 Ξ2 . 1 + Ω1 Ξ1 + Θ1 Ξ2 + Ω1 Ξ1 Θ1 Ξ2 Due to (Ξ1 − Ξ2 )(Θ1 − Ω1 ) ≤ 0, it can be easily shown that Λ1 ≤ 1. Likewise, the same method for Λ2 can be applied. Indeed, owing to (22) Pk i=1 (Θi − Ωi )(Ξk − Ξk+1 ) ≤ 0, it can be easily verified that each element in Λ2 does not exceed 1. Thus, it is obtained Λ2 ≤ 1. As for Λ3 , by applying June 12, 2017 Pl Ωi = 1, we have P P 1 + li=1 Θi Ξl + Ξl+1 + li=1 Θi Ξl Ξl+1 . Λ3 = P P 1 + li=1 Θi Ξl+1 + Ξl + li=1 Θi Ξl Ξl+1 i=1 (23) DRAFT 12 As (Ξl − Ξl+1 )( Pl i=1 Θi − 1) ≤ 0, then Λ3 ≤ 1. By combining the results for Λ1 , Λ2 and Λ3 in (21), it leads to Λ ≤ 0. To conclude, the more users are admitted, the lower the sum rate is obtained. This requires further consideration of the tradeoff between the sum rate and number of admitted users. We will thus consider the problem of maximizing the user admission when the users SINR thresholds are given. B. Proposed User Admission Scheme The SINR thresholds of the L users in the mth cluster are denoted as Γ1 , . . . , ΓL . In addition, the maximum number of admitted users is represented as l, l ∈ {0, 1, . . . , L}. Further, the l admitted users are denoted as a1 , a2 , . . . , al . Accordingly, the problem can be formulated as max l (24a) s.t. γk ≥ Γk , k ∈ {a1 , a2 , . . . , al } al X Ωk ≤ 1, (24b) Ω (24c) k=a1 where Ω = [Ω1 , . . . , ΩL ] is the vector whose elements are the power allocation coefficients, and γk is the SINR of the kth admitted user, given by ρΩk |vkH Hk p|2 . γk = Pk−1 Ωi |vkH Hk p|2 1 + ρ i=1 (25) By combining (24b) and (25), we have Ωk > Γk k−1 X i=1 where variables are only Pk−1 i=1 Ωi + Γk , H ρ|vk Hk p|2 (26) Ωi , since the other parameters, i.e., ρ, Γk , and |vkH Hk p|2 , are known at the BS. Therefore, if the power coefficient among users is allocated in an ascending order, i.e., from the 1st user to the Lth user sequentially, we can obtain the power coefficient Pk−1 for the kth user easily, since i=1 Ωi is already known. Specifically, the power coefficient for the 1st user is calculated as Ω1 = DRAFT Γ1 . H ρ|v1 H1 p|2 (27) June 12, 2017 13 Sequentially and iteratively, when the power coefficient of the 1st user is known, it is employed to allocate the power coefficient to the 2nd user. According to (26), we have Ω2 = Γ2 Ω1 + Γ2 . H ρ|v2 H2 p|2 (28) Likewise, the power coefficient for the kth user can be expressed as Ωk = Γk k−1 X Ωi + i=1 Γk . H ρ|vk Hk p|2 (29) Obviously, power allocation for all users can be obtained according to (29). However, it should be noted that the total power constraint has not been considered yet during the user admission process above. Thus, when calculating the power coefficient for the kth user, we also need to P ensure that the total power assigned to users, ki=1 Ωi , does not exceed 1. This is obtained by Pk−1 Pk−1 Ωi during each allocation phase. Whenever Ωi + ρ|vHΓHk p|2 with 1 − i=1 comparing Γk i=1 k k Pk−1 Pk−1 Γk Γk i=1 Ωk + ρ|vH H p|2 < 1 − i=1 Ωi , it implies that there is not enough power left to be k k assigned to the kth user to satisfy its SINR requirement. Therefore, the user admission process stops and the allocated power for the kth user is zero. Evidently, the same holds for {k+1, . . . , L} users, i.e., Ωi = 0, i ∈ {k, . . . , L}. The admitted users are 1st user, 2nd user, . . . , (k − 1)th user, with the allocated power coefficient given by (29). As for the optimality of the proposed user admission scheme, the following theorem and corollary provide the results. Theorem 3: The proposed scheme maximizes the number of admitted users when the SINR thresholds of the users satisfy the following conditions: Γ1 H |v1 H1 p|2 ≤ ··· ≤ Γl H |vl Hl p|2 Γm ≤ Γn , ∀m ∈ {1, . . . , l}, n ∈ {l + 1, . . . , L}, (30a) (30b) where l represents the total number of admitted users under the proposed scheme. Proof: Refer to Appendix D. Corollary 2: The proposed user admission scheme is optimal in terms of both sum rate and number of admitted users when the SINR thresholds of the users are equal. Proof: According to the channel ordering, namely (6), it is easy to verify that Γk = Γ, k ∈ {1, . . . , L} satisfies both (30a) and (30b). Thus, one can conclude that the proposed June 12, 2017 DRAFT 14 user admission scheme is optimal in terms of the number of admitted users based on Theorem 3. In addition, since the SINR thresholds of the users are equal, maximizing the number of admitted users also leads to the maximization of the sum rate. Remark: When the SINR thresholds of the users are different, the proposed scheme still achieves good performance in balancing the tradeoff between sum rate and number of admitted users. Specifically, when (30a) and (30b) are met, the proposed scheme maximizes the number of admitted users, although the sum rate may be suboptimal. On the other hand, when (30a) is met, but (30b) is violated, namely, the SINR thresholds of the admitted users are higher than that of the remaining users, the proposed scheme may be suboptimal in terms of the number of admitted users, while the sum rate is still high due to two reasons: a) the admitted users have higher SINR thresholds; b) as less users are admitted, less interference among users is introduced; therefore, an increased sum rate is obtained. In addition, the computational complexity of the proposed user admission scheme is only linear to the number of users per cluster. Proof: For the proposed scheme, the user admission is carried out sequentially from the 1st user to the Lth user, and for each user admission process, a constant term of operations, i.e., O(1),2 is required. In all, the computational complexity is only linear to the number of users per cluster, i.e., O(L). TABLE I S IMULATION PARAMETERS . 2 Parameters Value Number of antennas Channel bandwidth Thermal noise density Path-loss model M = 3, N = 3 10 [MHz] −174 [dBm] 114 + 38 log10 (d), d in kilometer For the kth user, the calculation of Pk−1 i=1 Ωi seems to require k − 1 operations. However, if we set Sp = Pk−1 i=1 Ωi , Sp can be updated through Sp = Sp + Ωk , and only one operation is needed. Thus, according to (29), only 5 operations (2 ′ +′ , 2 ′ ×′ , and 1 ′ /′ ) are needed to obtain Ωk . DRAFT June 12, 2017 15 9 NOMA 8 Sum Rate [bps/Hz] 7 NOMA with 2 users OMA with 2 users NOMA with 3 users OMA with 3 users OMA 6 5 4 3 2 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Power Coefficient Ωm,1 Fig. 1. Sum rate achieved by MIMO-NOMA and MIMO-OMA as the power coefficient varies. V. N UMERICAL R ESULTS In this section, simulation results are presented to verify the performance of MIMO-NOMA over MIMO-OMA, and validate the accuracy of the developed theoretical results. The parameters used in the simulations are listed in Table I. Fig. 1 compares the sum rate of MIMO-NOMA and MIMO-OMA in two cases: with two users and three users per cluster, respectively. The total power is set to 35 dBm in simulations, and Ωm,1 denotes the power coefficient for the first user. For the case of two users, the remaining power is allocated to the second user. For three users, the remaining power is equally divided between the second and third user. Note that the scenario that the remaining power is arbitrarily divided between the second and third user is shown in Fig. 2. Clearly, the sum rate of both MIMO-NOMA and MIMO-OMA in two cases increases with Ωm,1 , which is due to the fact that more power is allocated to the user with better channel gain. Specifically, when Ωm,1 = 0, for the two user case, the same sum rate is achieved for both MIMO-NOMA and MIMO-OMA, since only the second user is being served. On the other hand, for the three users case, MIMONOMA is slightly larger than MIMO-OMA, since two users are being served. In contrast, when June 12, 2017 DRAFT 10 10 8 8 Sum Rate [bps/Hz] Sum Rate [bps/Hz] 16 6 4 2 6 4 2 0 0 1 1 0.95 0.8 0.5 a) MIMO-NOMA ,1 m ,2 0 Ω 0.4 0.2 m ,2 m 0 0.6 Ω' Ω' 0.4 0.2 0.95 0.8 0.5 0.6 0 0 Ω ,1 m b) MIMO-OMA Fig. 2. Sum rate achieved by: a) MIMO-NOMA; b) MIMO-OMA for 3 users as the power coefficients vary. Ωm,1 = 1, the sum rate of both MIMO-NOMA and MIMO-OMA in two cases is the same since only the first user is served. In addition, for any other power split, MIMO-NOMA outperforms MIMO-OMA for both cases, which coincides with our result that MIMO-NOMA always has a larger sum rate than MIMO-OMA, even when there are multiple users in a cluster. Furthermore, for MIMO-NOMA, the two user case always has a larger sum rate when compared with the three users case, which matches the finding that when more users are admitted into a cluster, a lower sum rate is obtained. Further, Fig. 2 generalizes the case for three users from Fig. 1, since now an arbitrary power split is provided for all three users. Thus, a three-dimensional figure is displayed, in which the y-axis scaled by 1 − Ωm,1 represents the power coefficient of the second user, i.e., Ωm,2 = ′ Ωm,2 (1−Ωm,1 ).3 Additionally, the remaining power is allocated to the third user. For both MIMONOMA and MIMO-OMA, the sum rate increases significantly with Ωm,1 . Meanwhile, when Ωm,1 is fixed, both sum rates grow gradually with Ωm,2 . These again illustrate that when more power is 3 Note that in Fig. 2, Ωm,1 does not reach 1. The case of Ωm,1 = 1 can be seen in Fig. 1, when the sum rates for NOMA and OMA are the same. DRAFT June 12, 2017 17 1 NOMA OMA 0.95 Jain's Fairness Index 0.9 0.85 0.8 0.75 0.7 0.65 0.6 0.55 0.5 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Ωm,1 Fig. 3. Fairness comparison between MIMO-NOMA and MIMO-OMA for two users as the power coefficient varies. 0.7 Jain's Fairness Index Jain's Fairness Index 0.7 0.6 0.5 0.4 0.6 0.5 0.4 0.3 0.3 1 1 0.95 0.8 0.5 a) MIMO-NOMA Ω m ,2 0 ,1 0.4 0.2 m ,2 m 0 0.6 Ω' Ω' 0.4 0.2 0.95 0.8 0.5 0.6 0 0 Ω ,1 m b) MIMO-OMA Fig. 4. Fairness comparison between MIMO-NOMA and MIMO-OMA for three users as the power coefficients vary. June 12, 2017 DRAFT 18 12 NOMA NOMA with 2 users OMA with 2 users NOMA with 3 users OMA with 3 users Sum Rate [bps/Hz] 10 8 6 4 OMA 2 0 10 15 20 25 30 35 40 45 50 Transmit Power [dBm] Fig. 5. Sum rate for MIMO-NOMA and MIMO-OMA vs. the transmit power. allocated to the user with better channel, a higher sum rate is achieved. On the other hand, when comparing Figs. 2a) and 2b), it can be seen that MIMO-NOMA always obtains a higher sum rate than MIMO-OMA for any power split among the users, which is in accordance with Theorem 2. Indeed, the maximum gap between MIMO-NOMA and MIMO-OMA is 2.04 bps/Hz, which is obtained at the point with Ωm,1 = 0.05, Ωm,2 = 0.95. In this case, only two users are admitted, and this can be explained by the fact that the two user case has a larger sum rate, which is likely to lead to a larger gap. For the two user case, the power allocation coefficients are consistent H with the conclusion of Lemma 4, since during the simulation, ρ|vm,1 Hm,1 pm |2 = 321, and thus we have Ωm,1 = 0.053, which is close to 0.05. Figs. 3 and 4 compare the Jain’s fairness index (JFI) [16] of MIMO-NOMA and MIMO′ OMA when there are two and three users in a cluster, respectively. Note that Ωm,2 has the same meaning as in Fig. 2. For both MIMO-NOMA and MIMO-OMA, for the two users case, the JFI first increases with the power coefficient to the first user (Ωm,1 ). After a certain point, i.e., around 0.1, the JFI decreases as Ωm,1 grows. This trend is expected, as when Ωm,1 is small, increasing its value leads to a more balanced rate distribution between the two users. After the point where DRAFT June 12, 2017 19 14 NOMA with 2 users OMA with 2 users NOMA with 3 users OMA with 3 users Ergodic Sum Rate [bps/Hz] 12 NOMA 10 8 6 OMA 4 2 0 10 15 20 25 30 35 40 45 50 Transmit Power [dBm] Fig. 6. Ergodic sum rate for MIMO-NOMA and MIMO-OMA vs. the transmit power. the data rate of the first user reaches that of the second user, increasing Ωm,1 results in less fair rate distribution. For the three user case, as shown in Fig. 4, the JFI exhibits the same trend as Ωm,1 varies. When Ωm,1 is fixed, the relationship between JFI and Ωm,2 is more complex, and depends on the specific value of Ωm,1 . In all, it can be seen that MIMO-NOMA dominates MIMO-OMA in both cases, which validates that MIMO-NOMA exhibits better fairness when compared with MIMO-OMA. Figs. 5 and 6 respectively investigate the sum rate and ergodic sum rate variation with the transmit power for MIMO-NOMA and MIMO-OMA. Although there exists some fluctuation in Fig. 5, due to the variation of the wireless channel, it is still quite clear that the sum rate of both MIMO-NOMA and MIMO-OMA grows with the transmit power. This trend becomes more obvious in Fig. 6, since the ergodic operation reduces the fluctuation of the channel. Moreover, in both two and three user cases, the sum rate and ergodic sum rate of MIMO-NOMA is larger than that of MIMO-OMA, which further validates our finding in Theorem 2. Meanwhile, as for MIMO-NOMA, the two user case always has a larger sum rate and ergodic sum rate than the three users case, which also verifies our point that as the number of admitted users increases in June 12, 2017 DRAFT 20 Number of Admitted Users in Each Cluster 7 P t =30 dBm P t =40 dBm 6 P t =50 dBm 5 4 3 2 1 5 10 15 20 25 30 Target SINR [dB] Fig. 7. Number of admitted users vs. target SINR. a cluster, the sum rate decreases. In Figs. 7, 8 and 9, we focus on the performance of the proposed user admission scheme. As shown in Fig. 7, the number of admitted users per cluster declines with the target SINR regardless of the transmit power level. This can be easily explained by the fact that as the target SINR increases, more power is needed to satisfy each admitted user. Since the total transmit power is fixed, the number of admitted users decreases accordingly. On the other hand, if the total transmit power increases, more users can be admitted, which is verified by the difference in the number of admitted users when the total transmit power is 30 dBm, 40 dBm and 50 dBm, respectively. When the target SINR is 5 dB, about 4 users can be admitted into each cluster even when the total transmit power is 30 dBm, which indicates the effectiveness of the proposed user admission scheme. Further, when the total transmit power is 50 dBm, about 6.5 users on average are admitted to each cluster. Figs. 8 and 9 illustrate how the number of admitted users per cluster varies with that of the requesting users per cluster. Specifically, Fig. 8 shows results for different transmit powers, while Fig. 9 displays results for different target SINRs. Note that the target SINR is set to 10 dB in DRAFT June 12, 2017 21 Number of Admitted Users in Each Cluster 6 P =30 dBm 5.5 t P t =40 dBm 5 P t =50 dBm 4.5 4 3.5 3 2.5 2 1.5 5 6 7 8 9 10 11 12 13 14 15 Number of Requesting Users in Each Cluster Fig. 8. Number of admitted users vs. number of requesting users with different transmit power. Number of Admitted Users in Each Cluster 6 Target SINR=5 dB Target SINR=10 dB Target SINR=15 dB 5.5 5 4.5 4 3.5 3 2.5 2 1.5 5 6 7 8 9 10 11 12 13 14 15 Number of Requesting Users in Each Cluster Fig. 9. Number of admitted users vs. number of requesting users with different target SINR. June 12, 2017 DRAFT 22 5 16 PA: 5 dB ES: 5 dB PA: 10 dB ES: 10 dB PA: 15 dB ES: 15 dB 14 12 4 Sum Rate [bps/Hz] Number of Admitted Users in Each Cluster 6 3 2 PA: 5 dB ES: 5 dB PA: 10 dB ES: 10 dB PA: 15 dB ES: 15 dB 10 8 6 1 0 10 4 20 30 40 2 10 50 Transmit Power [dBm] 20 30 40 50 Transmit Power [dBm] Fig. 10. Proposed algorithm vs. exhaustive search when the target SINRs of the users are equal. 16 4 PA ES PA ES 14 3.5 Sum Rate [bps/Hz] Number of Admitted Users in Each Cluster 4.5 3 2.5 12 10 8 2 6 1.5 1 10 20 30 40 Transmit Power [dBm] 50 4 10 20 30 40 50 Transmit Power [dBm] Fig. 11. Proposed algorithm vs. exhaustive search when the user target SINRs are different. DRAFT June 12, 2017 23 Fig. 8, whereas the total transmit power is set to 35 dBm in Fig. 9. From these figures, it can be observed that the number of admitted users per cluster grows with that of the requesting users. This is due to the fact that with more users requesting admission, more users are likely to have a better channel. According to the proposed user admission scheme, i.e., (29), less power is required to admit one user when it has a good channel gain. Therefore, more users can be admitted with the same total transmit power. Further, as expected, results in Figs. 8 and 9 show that the number of admitted users per cluster grows with the total transmit power, while it decreases with the target SINR, respectively. In Figs. 10 and 11, the performance of the proposed algorithm and exhaustive search is compared. Specifically, the exhaustive search is conducted as follows: first, we consider all possible combinations of the users; then, for each combination, we use (29) to allocate the power coefficient to each user, and decide whether this combination is feasible or not; among all feasible combinations, we select the ones with the largest number of users; lastly, from the selected ones, the one with the highest sum rate is chosen. In simulations, the number of requesting users is 8, and results are obtained from 1000 trials. Note that PA and ES in the legend represent the proposed algorithm and exhaustive search, respectively. In Fig. 10, the target SINR of all users is equal, and the number in the legend represents its value. According to Fig. 10, it can be seen that the performance of the proposed algorithm is the same as the one of the exhaustive search in terms of both sum rate and number of admitted users for all three target SINRs. In addition, the number of admitted users decreases with the target SINRs, while the sum rate exhibits an opposite trend. The former can be easily explained, whereas the latter is due to the fact that the increase in the data rate of the admitted users dominates the decrease in the number of admitted users. Furthermore, in Fig. 11, the comparison is conducted when the target SINRs are different. Specifically, each user is randomly assigned a target SINR value of 5, 10, or 15 dB. As can be seen from Fig. 11, the exhaustive search achieves better result in terms of the number of admitted users per cluster. However, the gap between the proposed algorithm and exhaustive search is minor. In particular, when the transmit power is 50 dBm, the gap reaches a peak, which is only 0.27. On the other hand, as for the sum rate, a similar performance is achieved. Additionally, the complexity of exhaustive search is N!, while the proposed algorithm has a low complexity, i.e., linear to the number of users per cluster. To conclude, these results verify the effectiveness of the proposed algorithm also when the users’ target SINRs are different. June 12, 2017 DRAFT 24 VI. C ONCLUSION We have compared the capacity of MIMO-NOMA with that of MIMO-OMA, when multiple users are grouped into a cluster. First, we have demonstrated the superiority of MIMO-NOMA over MIMO-OMA in terms of both sum channel capacity and ergodic sum capacity. Furthermore, we have derived the power coefficient value that maximizes the sum rate gap between MIMO-NOMA and MIMO-OMA, when there are two users per cluster. Meanwhile, for two and three users per cluster, numerical results also verify that MIMO-NOMA dominates MIMO-OMA in terms of user fairness. We have also proved that the more users are admitted to the same cluster, the lower is the achieved sum rate, which implies a tradeoff between sum rate and number of admitted users. On this basis, we have proposed a user admission scheme, which achieves optimal results in terms of both sum rate and number of admitted users when the SINR thresholds of the users are equal. When the SINR thresholds of the users are different, the proposed scheme still achieves good performance in balancing both criteria. Furthermore, the proposed scheme is of low complexity, i.e., linear in the number of users in each cluster. Finally, the developed analytical results have been validated by simulation results. A PPENDIX I P ROOF OF L EMMA 1 At the receiver side of user (m, l), the following constraint has to be satisfied in order to implement SIC effectively: k NOMA Rm,l ≥ Rm,k , ∀k ∈ {l + 1, . . . , L}, (31) k NOMA where Rm,l denotes the data rate of user (m, k) achieved at the receiver (m, l), whereas Rm,k represents the achievable data rate of user (m, k) at its receiver side. Indeed, the above equation guarantees that user (m, l) can remove the interference of those users with worse channel gains, i.e., (m, l + 1), . . . , (m, L). According to the order of the effective channel gains, i.e., H H |vm,l Hm,l pm |2 ≥ |vm,k Hm,k pm |2 , ∀k ≥ l, we have   2 H H ρΩm,k |vm,l m,l pm | k Rm,l = log2 1 + 1+ρ Pk−1 Ω |vH H p |2 m,i m,l m,l m i=1   2 H H ρΩm,k |vm,k m,k pm | ≥ log2 1 + 1+ρ Pk−1 Ω |vH H p |2 i=1 NOMA = Rm,k . DRAFT m,i m,k m,k m (32) June 12, 2017 25 k NOMA Thus, Rm,l ≥ Rm,k , ∀k ∈ {l + 1, . . . , L} is always true. Consequently, the use of SIC is always guaranteed at the receiver (m, l) owing to the ordering of the effective channel gains, and this puts no extra constraints on the system. A PPENDIX II P ROOF OF T HEOREM 1 H For simplicity of notation, let Kl = ρΩm,l |vm,l Hm,l pm |2 , l ∈ {1, . . . , L}. Theorem 1 can be proved via mathematical induction, and the hypothesis is PL1 L1 X Kl OMA Sm,L1 ≤ ( λm,l ) log2 (1 + PLl=1 ), 1 l=1 λm,l l=1 (33) OMA where Sm,L represents the sum rate for the first L1 users, L1 ∈ {1, . . . , L}. Obviously, the first 1 OMA OMA = Rm,1 = λm,1 log2 (1 + user satisfies the hypothesis, since Sm,1 K1 ). λm,1 Then, let us consider the case of L2 = L1 + 1, and we have OMA Sm,L 2 OMA = Sm,L + λm,L2 log2 (1 + 1 λm,l PL1 L1 X Kl KL 2 ) + λm,L2 log2 (1 + ) λm,l ) log2 (1 + PLl=1 1 λ λ m,L2 m,l l=1 l=1 PL1 PL2 PL1 L2 X λm,l l=1 λm,l l=1 Kl λm,l ) PL2 =( log2 (1 + PL2 ) PLl=1 1 λ λ λ m,l m,l m,l l=1 l=1 l=1 l=1 PL2  KL λm,L l=1 λm,l log2 (1 + PL2 2 ) . + PL2 2 λ ( l=1 λm,l ) λ m,L 2 m,l l=1 ≤( PL1 KL 2 ) λm,L2 λm,L2 . PL2 λm,l ) ( l=1 PL1 In addition, let K1′ = PL2 The polynomial in the bracket can be reformulated as λ log2 (1 + K1′ ) λ Let λ = l=1 PL2 l=1 λm,l , then 1 − λ = l=1 Kl l=1 λm,l (34) KL2 . PL2 l=1 λm,l ′ K2 λ) log2 (1 + 1−λ ), and K2′ = + (1 − which has the same form as [15, eq. (12)]. According to Lemma 2, it can be written as log2 (1 + PL2 PL1 PL2 PL2 KL2 Kl OMA l=1 Kl l=1 Kl ), satisfying PLl=1 ), . Thus, we have = S ≤ ( λ ) log (1 + PL2 P L2 m,l 2 m,L2 l=1 1 λm,L l=1 λm,l l=1 λm,l l=1 λm,l 2 which also fits the hypothesis. P OMA Lastly, we consider the case for L users. Due to Ll=1 λm,l = 1, we have Sm,L ≤ log2 (1 + PL PL H 2 l=1 Kl ) = log2 (1 + l=1 ρΩm,l |vm,l Hm,l pm | ). Here Theorem 1 is proved. Moreover, it is easy to conclude that the equality is achieved when Correspondingly, we have λm,l = June 12, 2017 H H 2 Ωm,1 |vm,1 m,1 pm | λm,1 2 H H Ωm,l |vm,l m,l pm | PL ,∀ H 2 1 Ωm,l |vm,l Hm,l pm | = ··· = 2 H H Ωm,l |vm,L m,L pm | . λm,L l ∈ {1, . . . , L}. DRAFT 26 A PPENDIX III P ROOF OF L EMMA 3 H H According to inequality (6), we have ρΩm,k |vm,k Hm,k pm |2 ≥ ρΩm,k |vm,l Hm,l pm |2 , ∀k ≤ l. Consequently, it can be concluded that 1+ Pl H 2 k=1 Ωm,k |vm,k Hm,k pm | P H Hm,l pm |2 ρ lk=1 Ωm,k |vm,l 1+ρ ≥ 1, l ∈ {1, . . . , L}. (35) Further, the above equation can be used to obtain the lower bound for the sum rate for MIMONOMA via mathematical induction, and the hypothesis is that the sum rate for the first l users, NOMA denoted as Sm,l is bounded by NOMA Sm,l ≥ log2 (1 + ρ l X k=1 H Ωm,k |vm,k Hm,k pm |2 ). (36) NOMA NOMA H Clearly, the first user satisfies (36), since Sm,1 = Rm,1 = log2 (1+ρΩm,1 |vm,1 Hm,1 pm |2 ) ≥ H log2 (1 + ρΩm,1 |vm,1 Hm,1 pm |2 ). Next, the case for l + 1 users is proved as follows: NOMA NOMA NOMA Sm,l+1 = Sm,l + Rm,l+1 ≥ log2 (1 + ρ + log2 (1 + l X k=1 H Ωm,k |vm,k Hm,k pm |2 ) H ρΩm,l+1 |vm,l+1 Hm,l+1 pm |2 ) Pl H 1 + ρ k=1 Ωm,k |vm,l+1 Hm,l+1 pm |2 = log2 (1 + ρ l X k=1 H Ωm,k |vm,k Hm,k pm |2 H + ρΩm,l+1 |vm,l+1 Hm,l+1 pm |2 P H Hm,k pm |2 ) (1 + ρ lk=1 Ωm,k |vm,k ) × P H 1 + ρ lk=1 Ωm,k |vm,l+1 Hm,l+1 pm |2 ≥ log2 (1 + ρ l+1 X k=1 H Ωm,k |vm,k Hm,k pm |2 ), (37) where the last inequality comes from (35). NOMA ≥ log2 (1+ρ Thus, when all L users are considered, we have Sm,L Hence, Lemma 3 is proved. DRAFT PL k=1 H Ωm,k |vm,k Hm,k pm |2 ). June 12, 2017 27 A PPENDIX IV P ROOF OF T HEOREM 3 Consider the case in which only l users can be admitted to the mth cluster when employing the proposed user admission scheme. Suppose there exists an alternate scheme, which also admits l users, denoted as a1 , a2 , . . . , al . Theorem 3 can be proved through contradiction. Specifically, the proof consists of two steps: 1) it is shown that the sum power required by the alternate scheme always exceeds that of the proposed scheme; and 2) based on (1), assume that the alternate scheme can admit an extra user, this user should also be admitted by the proposed scheme, which conflicts with the proposition that only l users can be admitted by the proposed scheme. Consequently, no other scheme can admit a larger number of users than the proposed one. Step 1: The power coefficients of the proposed scheme and the alternate one are denoted as Ω1 , Ω2 , . . . , Ωl , and Ωa1 , Ωa2 , . . . , Ωal , respectively. For notational simplicity, let Gk = |vkH Hk p|2 , k ∈ {1 , 2 , . . . , l}, and Gak = |vaHk Hak p|2 , ak ∈ {a1 , a2 , . . . , al }. Without loss of generality, the admitted l users for the alternate scheme are also ranked in a descending order according to their channel gains, i.e., Ga1 ≥ · · · ≥ Gal . Thus, it can be easily observed that Gak ≤ Gk , since k ≤ ak due to the channel order and user admission order of both schemes. Moreover, according Pk−1 Pk−1 Γ Γk Ωi + ρG , respectively. to (26) and (29), we have Ωak ≥ Γak i=1 Ωai + ρGaak , and Ωk = Γk i=1 k k After some algebraic manipulations, the sums of the power coefficients for the proposed scheme and the alternate one can be expressed as Ψ= l l X Γk Y (Γi + 1) ρG k k=1 i=k+1 al X Γak Ψa ≥ ρGak a =1 k al Y (Γai + 1), (38a) (38b) ai =ak +1 where Ψ and Ψa denote the sums of the power coefficients for the proposed scheme and the alternate one, respectively. Ql Γak Γk , and ≤ By using (30a), (30b) and Gak ≤ Gk , it can be easily obtained that G i=k+1 (Γi + Ga k k Qal 1) ≤ ai =ak +1 (Γai + 1). Thus, Ψ ≤ Ψa , which means that to admit the same number of users, the proposed scheme requires the minimum power. Step 2: Suppose the alternate scheme can admit an extra user, al+1 , whose power coefficient and channel gain are denoted as Ωal+1 and Gal+1 , respectively. According to (26) and (24b), we have Γa Ωal+1 ≥ Γal+1 Ψa + ρGal+1 , which must satisfy Ωal+1 + Ψa ≤ 1. On this basis, it is easy to verify l+1 June 12, 2017 DRAFT 28 that user al+1 can also be admitted by the proposed scheme, since Ω′al+1 + Ψ ≤ Ωal+1 + Ψa ≤ 1, where Ω′al+1 = Γal+1 Ψ + Γal+1 ρGal+1 denotes the power coefficient of user al+1 under the proposed scheme. Clearly, this conflicts with the proposition that only l users can be admitted by the proposed scheme. R EFERENCES [1] Y. Saito, Y. Kishiyama, A. Benjebbour, T. Nakamura, A. Li, and K. Higuchi, “Non-orthogonal multiple access (NOMA) for cellular future radio access,” in Proc. IEEE Veh. Technol. Conf., Dresden, Germany, Jun. 2013, pp. 1–5. [2] L. Dai, B. Wang, Y. Yuan, S. Han, C. l. I, and Z. Wang, “Non-orthogonal multiple access for 5G: Solutions, challenges, opportunities, and future research trends,” IEEE Commun. Mag., vol. 53, no. 9, pp. 74–81, Sep. 2015. [3] S. M. R. Islam, N. Avazov, O. A. Dobre, and K. S. Kwak, “Power-domain non-orthogonal multiple access (NOMA) in 5G systems: Potentials and challenges,” IEEE Commun. Surv. Tuts., vol. pp, no. 99, pp. 1–1, Oct. 2016. [4] M. Zeng, G. I. Tsiropoulos, O. A. Dobre, and M. H. Ahmed, “Power allocation for cognitive radio networks employing non-orthogonal multiple access,” in Proc. IEEE Global Telecommun. Conf., Washington DC, USA, Dec. 2016. [5] M. Al-Imari, P. Xiao, M. A. Imran, and R. Tafazolli, “Uplink non-orthogonal multiple access for 5G wireless networks,” in Proc. Int. Symp. Wireless Commun. Systems, Barcelona, Spain, Aug. 2014, pp. 781–785. [6] Z. Ding, Y. Liu, J. Choi, Q. Sun, M. Elkashlan, and H. V. Poor, “Application of non-orthogonal multiple access in LTE and 5G networks,” IEEE Commun. Mag. Feature Topic on LTE Evolution, to appear. arXiv preprint arXiv:1511.08610, 2015. [7] S. M. R. Islam, M. Zeng, and O. A. Dobre, “Noma in 5G systems: Exciting possibilities for enhancing spectral efficiency,” IEEE 5G Tech. Focus, to appear, 2017. [8] S. Timotheou and I. Krikidis, “Fairness for non-orthogonal multiple access in 5G systems,” IEEE Signal Process. Lett., vol. 22, no. 10, pp. 1647–1651, Oct. 2015. [9] D. Tse and P. Viswanath, Fundamentals of Wireless Communication. Cambridge, UK: Cambridge University Press, 2005. [10] Z. Ding, Z. Yang, P. Fan, and H. V. Poor, “On the performance of non-orthogonal multiple access in 5G systems with randomly deployed users,” IEEE Signal Process. Lett., vol. 21, no. 12, pp. 1501–1505, Dec. 2014. [11] Q. Sun, S. Han, I. Chin-Lin, and Z. Pan, “On the ergodic capacity of MIMO NOMA systems,” IEEE Wireless Commun. Lett., vol. 4, no. 4, pp. 405–408, Dec. 2015. [12] Z. Ding, F. Adachi, and H. V. Poor, “The application of MIMO to non-orthogonal multiple access,” IEEE Trans. Wireless Commun., vol. 15, no. 1, pp. 537–552, Jan. 2016. [13] Z. Ding, R. Schober, and H. V. Poor, “A general MIMO framework for NOMA downlink and uplink transmission based on signal alignment,” IEEE Trans. Wireless Commun., vol. 15, no. 6, pp. 4438–4454, Jun. 2016. [14] Y. Liu, G. Pan, H. Zhang, and M. Song, “On the capacity comparison between MIMO-NOMA and MIMO-OMA,” IEEE Access, vol. 4, no. 6, pp. 2123–2129, Jul. 2016. [15] M. Zeng, Y. Animesh, O. A. Dobre, G. I. Tsiropoulos, and H. V. Poor, “On the sum rate of MIMO-NOMA and MIMOOMA systems,” IEEE Wireless Commun. Lett., DOI: 10.1109/LWC.2017.2712149. [16] Z. Yang, Z. Ding, P. Fan, and N. Al-Dhahir, “A general power allocation scheme to guarantee quality of service in downlink and uplink NOMA systems,” IEEE Trans. Wireless Commun., vol. 15, no. 11, pp. 7244–7257, Nov. 2016. [17] Z. Ding and H. V. Poor, “Design of massive-MIMO-NOMA with limited feedback,” IEEE Signal Process. Lett., vol. 23, no. 5, pp. 629–633, May 2016. DRAFT June 12, 2017
7cs.IT
Just-in-Time Batch Scheduling Problem with Two-dimensional Bin Packing Constraints S. Polyakovskiy1 , A. Makarowsky1 , and R. M’Hallah2 arXiv:1703.07290v2 [cs.DS] 27 Jul 2017 1 Optimisation and Logistics Group, School of Computer Science, University of Adelaide, Australia. 2 Department of Statistics and Operations Research, College of Science, Kuwait University, Kuwait. July 28, 2017 Abstract This paper introduces and approximately solves a multi-component problem where small rectangular items are produced from large rectangular bins via guillotine cuts. An item is characterized by its width, height, due date, and earliness and tardiness penalties per unit time. Each item induces a cost that is proportional to its earliness and tardiness. Items cut from the same bin form a batch, whose processing and completion times depend on its assigned items. The items of a batch have the completion time of their bin. The objective is to find a cutting plan that minimizes the weighted sum of earliness and tardiness penalties. We address this problem via a constraint programming (CP) based heuristic (CPH) and an agent based modelling heuristic (ABH). CPH is an impact-based search strategy, implemented in the general-purpose solver IBM CP Optimizer. ABH is constructive. It builds a solution through repeated negotiations between the set of agents representing the items and the set representing the bins. The agents cooperate to minimize the weighted earlinesstardiness penalties. The computational investigation shows that CPH outperforms ABH on small-sized instances while the opposite prevails for larger instances. 1 Introduction Multi-component problems are increasingly suscitating the interest of Evolutionary Computation (EC) and Operations Research (OR) communities [12, 4]. Not only do they combine several combinatorial optimisation aspects into a single problem but they also emanate from the compounded complexity of conflicting issues in areas like logistics and supply chain management. Solving them requires a thorough understanding of both their compounded and their individual natures. In practice, solving a multi-component problem is harder than separately tackling its components. This paper focuses on a relevant multi-component problem occurring in make-to-order industries that adopt a pull production strategy. A production 1 station requests some parts from preceding stages, and specifies when it needs each part. The preceding stages react by producing the parts on time in order to avoid handling, transfer, and temporary storage when parts are completed early and starving of subsequent stations and delays when parts are finished tardy. Synchronizing the production requires that every stage complete its workload on time. The problem we consider involves the cutting of raw material at one of its production stages. It occurs in furniture, wood, and plastic industries. The cutting stage produces a set N = {1, . . . , n} of n small rectangular items from a set B = {1, . . . , m} of large identical rectangular sheets of raw material, referred to hereafter as bins. It uses a single guillotine cutting machine whose cuts are parallel to the edges of the sheets. That is, every item is obtained by a series of edge to edge parallel straight cuts. Item i ∈ N is characterized by its width wi , height hi , due date di , which defines when i should be ideally produced, a per time unit earliness cost i , and a per unit tardiness cost τi . Depending on the items’ dimensions, it is possible to cut more than one item from a bin. A bin k ∈ B is characterized by its width W and height H. The number of bins m ≤ n. That is, at worst, each item is packed in a single bin. A subset Nk ⊆ N of items assigned to a bin k ∈ B can not overlap and should be completely contained in the bin. The subset forms a batch whose processing time is a function f (Nk ) of Nk and whose completion time is ck . The completion time ci of item i ∈ Nk equals ck . When produced earlier than di , item i generates earliness Ei = max {0, di − ci } yielding an earliness penalty i Ei . On the other hand, it has a tardiness Ti = max {0, ci − di } and a tardiness cost τi Ti when produced later than di . This problem, denoted JIT with BP, searches for (i) a feasible guillotine packing of N into bins of B, and (ii) Pits bin cutting schedule that minimizes the total weighted earliness-tardiness i∈N (i Ei + τi Ti ). Applications combining bin packing and scheduling range from steel manufacturing [17, 1] to ship lock scheduling [19] to wood cutting [13]. However, to the best of our knowledge, no research deals with JIT with BP introduced in this paper. The problem is motivated by the specificity of make-to-order industries, which are characterised by low-volume high-mix orders with fixed due dates [2]. To be flexible, such industries don’t produce large batches of identical items. Their production plans are a function of the demands’ due dates and the items’ earliness and tardiness penalties. JIT with BP is very challenging. It combines/extends two N P-hard combinatorial optimization problems. Its first component is a two-dimensional packing problem that has been extensively addressed via a panoply of techniques varying from OR to Artificial Intelligence (AI) to EC [9, 5, 15, 18]. Its second component is a just in time single machine batch scheduling problem [7] that has been tackled via different EC approaches with the most prominent ones enumerated in [11]. It incorporates non-overlap, containment, assignment, disjunctive, and sequencing constraints whose simultaneous satisfaction is difficult. In addition, its search space, as for most packing related problems, contains a large number of infeasible and of symmetrical solutions. Optimizing JIT with BP is further complicated by the non-traditional interdependence of its two components. Relaxing the packing density (by assigning a single item per bin) does not reduce earliness-tardiness penalties while a dense production plan that cuts multiple items from a bin gives not only a tighter packing, but also smaller cutting times. In fact, a faster production of the items supports the minimiza2 tion of the earliness-tardiness. In summary, determining the optimal number of bins is not trivial. We address JIT with BP via two approximate approaches: CPH and ABH. CPH is a constraint programming (CP) search that explores constraint propagation. CP generates feasible solutions efficiently thanks to its flexible modelling framework, which exploits the structure of a model to direct and accelerate the search. Here, CPH adopts the impact-based search strategy, implemented in the general-purpose solver IBM CP Optimizer [16]. ABH, on the other hand, is a hybrid constructive heuristic that searches the solution space via agent based modelling, identifies a feasible packing via CP techniques and optimally schedules the bins via linear programming. It builds a solution through repeated negotiations between the set of agents representing the items and the set representing the bins. The agents cooperate to minimize the weighted earliness-tardiness penalties. The choice of an agentbased modelling technique is motivated by (i) its success in application to bin packing [15] and just-in-time scheduling [14] problems, (ii) the numerous infeasible and symmetric solutions encountered during the search, and (iii) the reported computational results, which confirm its efficiency in comparison to several enumerative techniques. Sections 2 and 3 detail CPH and ABH. Section 4 discusses the results. Section 5 is a summary. 2 Constraint Programming Search Because CP search techniques are prominent for bin packing and scheduling problems, we formulate JIT with BP as a CP model that combines both components and that we approximately solve with a general-purpose commercial solver. In CP, a problem is defined via a set of variables X and a set of constraints C given on X [3, 8]. A variable xi ∈ X can assume any value of its domain D(xi ). To find an optimum, CP enumerates solutions subject to the constraint store C using a search tree where every variable xi ∈ X is examined within some node. When xi is instantiated, the search inspects those constraints that share xi . In CP, each constraint is viewed as a special-purpose procedure that operates on a solution space. In fact, each procedure is a filtering algorithm that excludes, from the domains of the variables, those values that lead to infeasible solutions. CP relies on constraint propagation. Fixing the value of xi may eliminate some values from the domains of other variables that are connected to xi via one or more constraints of C. That is, constraints sharing some common variables are linked to each other. Subsequently, the results of one filtering procedure are propagated to the others. CP calls the filtering algorithms repeatedly in order to achieve a certain level of consistency. When it yields at some stage D(xi ) = ∅, the filtering signals an infeasible solution (i.e., an inconsistent set of constraints). When |D(xi )| > 1, CP branches on xi by partitioning D(xi ) into unique values, each corresponding to a branch. As the search descends into the tree, constraint propagation reduces the size of the domains of the variables. CP obtains a feasible solution when |D(xi )| = 1 for all xi . When emphasis is on optimality, the search continues until either the optimum is found, or the exploration of the whole search tree is unsuccessful. 3 H hi H Rit hi r i R i a) wi Rit Rir i W b) wi W Figure 1: Illustrating the free regions resulting from a horizontal (when variable vi = 0) and a vertical (when vi = 1) cut The performance of a CP model depends on its solver; specifically, on the filtering algorithms and on the search strategies it applies. Here, we resort to IBM ILOG CP Optimizer 12.6.2 with its searching algorithm set to the restart mode. This mode adopts a general purpose search strategy [16] inspired from integer programming techniques and based on the concept of the impact of a variable. The impact measures the importance of a variable in reducing the search space. The impacts, which are learned from the observation of the domains’ reduction during the search, help the restart mode dramatically improve the performance of the search. 2.1 Decision Variables The CP model for JIT with BP explores the features of the problem. First, any item i ∈ N can be obtained from a bin (or from any region of a bin) via a sequence of horizontal and vertical cuts, as Figure 1 illustrates. When the first  applied cut is horizontal, as depicted in Figure 1.a, the bin W , H is split into   two regions: Rit of size W , H −hi at the top of i, and Rir of size W −wi , hi at the right of i. Hereafter, we refer to this case as a cutting pattern a. When the first cut is vertical, as shown in  Figure 1.b, the cutting of the bin produces  two regions: Rit of size wi , H −hi at the top of i and Rir of size W −wi , H at the right of i. Herein, we designate this pattern as b. Therefore, the extraction of any item always generates two regions: one to the top and one to the right of the item. Clearly, some of the regions may get a zero area if W = wi or H = hi . Suppose that the number of bins m = n. The set R of possible regions where the n items may be positioned has 3n regions: the first n regions emanate from the n initial empty bins, the second n regions correspond to R1t , . . . , Rnt , and the last n regions to R1r , . . . , Rnr . In fact, the last 2n regions result from extracting the n items. Thus, R = {R1 , . . . , Rn , R1t , . . . , Rnt , R1r , . . . , Rnr }, where  R1 = . . . = Rn = W , H . Evidently, this assumes that at most one item can be assigned to a region. Let r = (r1 , . . . , r3n ) be an integer-valued vector variable whose jth entry rj , j = 1, . . . , 3n, is the item packed in the jth region; i.e., rj = i if region j contains item i and 0 if j contains no item. Its domain is therefore D(rj ) = {0, . . . , n} , j ∈ R (1) When j ∈ {1, . . . , n}, item rj is the first item in bin j. When j ∈ {n + 1, . . . , 2n} , rj t t is placed into Rj−n on top of item j − n. rj 6= (j − n) since Rj−n is the result of cutting off item (j − n) . Thus, the domain D(rj ) excludes j − n : rj 6= j −n, j ∈ {n+1, . . . , 2n} 4 (2) r Finally, when j ∈ {2n + 1, . . . , 3n} , rj is placed in Rj−2n ; that is, at the right of item (j − 2n) and D(rj ) is free of element j − 2n : rj 6= j −2n, j ∈ {2n+1, . . . , 3n} (3) We compute lbfs , the lower bound of Fekete and Schepers [6] on the number of bins required to cut the n items. We force the first lbfs regions to have exactly one item. Therefore the domain D(rj ) of rj , j = 1, . . . , lbf s , excludes {0}: rj 6= 0, j ∈ {1, . . . , lbfs } (4) This rule partially excludes symmetrical solutions arising when a filled bin k empties all its items into an empty bin k 0 that precedes or succeeds bin k on the cutting machine. This exchange of items produces a different solution but the same objective function value. An empty bin has a zero processing time. Similarly, let e = (e1 , . . . , en ) be an integer-valued vector of variables reflecting the assignment of regions to items such that ei = j if item i is positioned in region j. When ei ∈ {1, . . . , n} , i is the first packed item into its bin. On the other hand, when ei ∈ {n + 1, . . . , 2n} or ei ∈ {2n + 1, . . . , 3n} , i is located in region Ret i −n at the top of item (ei − n) or in region Reri −2n at the top of item ei − 2n, respectively. The domain of variable ei is D(ei ) = {1, . . . , 3n} , i ∈ N (5) Because item i can not be packed into Rn+i and R2n+i , which are respectively Rit and Rir , the following holds (ei 6= n+i)∧(ei 6= 2n+i) , i ∈ N (6) Along with the aforementioned variables and constraints, the CP model uses an additional five sets of variables. 3n 3n The first set has two integer-valued vectors W ∈ {N≥0 } and H ∈ {N≥0 } representing the widths and heights of the regions, where (Wj , Hj ) , j = 1, . . . , 3n, is the size of Rj ∈ R. Because Ri = (W , H), Rn+i = Rit , and R2n+i = Rir , for i = 1, . . . , n, D(Wj ) = W , D(Hj ) = H, j ∈ {1, . . . , n}   D(Wj ) = wj−n , . . . , W , D(Hj ) = 0, . . . , H −hj−n ,  D(Wj ) = 0, . . . , W −wj−2n j ∈ {n+1, . . . , 2n}  , D(Hj ) = hj−2n , . . . , H , j ∈ {2n+1, . . . , 3n} 3n (7) (8) (9) 3n The second set has x ∈ {N≥0 } and y ∈ {N≥0 } , two integer-valued vectors representing the bottom-left corner coordinates of the regions, where (xj , yj ) , j = 1, . . . , 3n, refers to the coordinates of Rj ∈ R. These variables abide to the conditions: D(xj ) = 0, D(yj ) = 0, j ∈ {1, . . . , n}   D(xj ) = 0, . . . , W − wj−n , D(yj ) = hj−n , . . . , H , (10) j ∈ {n+1, . . . , 2n}  D(xj ) = {wj−2n , . . . , W }, D(xj ) = 0, . . . , H −hj−2n , (11) j ∈ {2n+1, . . . , 3n} 5 (12) 3n The third set has an integer-valued vector s ∈ {1, . . . , n} where sj = k when region Rj ∈ R belongs to bin k ∈ B. The first n regions correspond to the empty bins: D(sj ) = {1, . . . , n} , j ∈ {1, . . . , 3n} sj = j, j ∈ {1, . . . , n} (13) (14) n The fourth set has v ∈ {0, 1} a binary vector defining the cutting pattern used to extract the item: vi = 0 if the first cut that yields item i is horizontal (cf. Figure 1.a), and 1 otherwise. Thus, D(vi ) = {0, 1} , i ∈ N n (15) n The fifth set has t ∈ {N≥0 } and c ∈ {N≥0 } , two integer-valued vectors that define the processing times and the completion times of the bins. Let tmax and cmax be upper bounds on the maximal processing and completion time of a bin, respectively. Then D(tk ) = {0, . . . , tmax } , k ∈ B D(ck ) = {0, . . . , cmax } , k ∈ B 2.2 (16) (17) CP Model The CP model uses constraint AllDifferent[g1 , . . . , gn ] , which ensures that the variables of [g1 , . . . , gn ] take distinct values. Additionally, the model uses three expressions: Equals(g, h) , which returns 1 or true if g = h and 0 or f alse otherwise; Element(g, h) , which returns the hth variable in the list of variables g; and Count(g, h) , which counts the number of variables of g taking the value h. The CP model follows. min P i∈N P k∈B Equals(Element(s, ei ), k) · (i·max{0,di −ck }+τi·max{0,ck −di }) s.t. (1)-(17) Element(r, ei ) = i AllDifferent[e1 , . . . , en ] Count(r, i) = 1 wi ≤ Element(W, ei ) hi ≤ Element(H, ei ) Wn+i ≤ Element(W, ei ) · (1−vi )+wi vi Hn+i ≤ Element(H, ei )−hi W2n+i ≤ Element(W, ei )−wi H2n+i ≤ hi (1−vi )+Element(H, ei ) · vi xn+i = Element(x, ei ) yn+i = Element(y, ei )+hi x2n+i = Element(x, ei )+wi y2n+i = Element(y, ei ) sn+i = Element(s, ei ) s2n+i = Element(s, ei ) P Equals(rk , 0) → n l=k+1 rl = 0 (18) i ∈ N (19) (20) i ∈ N (21) i ∈ N (22) i ∈ N (23) i ∈ N (24) i ∈ N (25) i ∈ N (26) i ∈ N (27) i ∈ N (28) i ∈ N (29) i ∈ N (30) i ∈ N (31) i ∈ N (32) i ∈ N (33)  k∈ lbfs+1,...,n  tk = f ∪n i=1 {ei: Equals(Element(s, ei ), k)} ck ≤ ck+1 −pk+1 c1 ≥ p 1 6 (34) k ∈ B (35) k∈ B \{m} (36) (37) Expression (18) calculates the objective value as the weighted sum of earlinesstardiness penalties. Because ei is the region to which item i is assigned, Element(s, ei ) in Eq. (18) gives the index of the bin where i is packed. When Equals(Element(s, ei ), k) confirms that i is assigned to bin k, the expression computes the weighted earliness tardiness of i based on ck . Constraint (19) establishes a dual notation by forcing region rei to contain item i when i is assigned to ei . Constraint (20) verifies that all the items are assigned to different regions. Constraint (21) ensures that exactly one region contains item i. Constraints (22) and (23) guarantee that ei , which holds item i, is large enough to fit i. Constraints (24) and (25) bound the size of the top residual area Rit obtained when cutting item i. When the first cut generating i is horizontal (i.e., vi = 0), Eq. (24) limits the width of Rit to the width of region ei where i is positioned. On the other hand, when the first cut generating i is vertical (i.e., vi = 1), Eq. (24) limits the width of Rit to the width wi . Constraint (25) bounds the height of Rit by the difference between the height of ei and hi . Indeed, it does not depend on the cutting pattern. Similarly, constraints (26) and (27) bound the size of Rir with Constraint (26) delimiting the width of Rir by the difference between the width of ei and wi and Constraint (27) limiting the height of Rir to hi when i is extracted with respect to pattern a (i.e., vi = 0) and to the height of ei when i is positioned and cut according to pattern b. Constraint (28) sets the x-coordinate of region Rit to ei ’s x-coordinate. Constraint (29) computes the y-coordinate of region Rit as the sum of the y-coordinate of region ei and hi . Constraint (30) computes the x-coordinate of region Rir as the sum of the x-coordinate of region ei and xi . Constraint (31) sets the y-coordinate of region Rir to the y-coordinate of region ei . Constraints (32) and (33) define, respectively, the bin to which regions Rit and Rir belong. Constraint (34) implies that no bin succeeding bin k can hold a region if k is empty. This is a symmetry breaking constraint that prohibits filling a bin (k+1) if bin k is not filled. Constraint (35) calculates the processing time of bin k. Constraint (36) guarantees the no overlap of the processing windows of two consecutive bins. Finally, constraint (37) ensures that the schedule starts after time zero. This CP model solves JIT with BP exactly even with the restart mode. However, CPH uses it to find an approximate solution as it presets its runtime. Within the search, items are assigned to regions in the ascending order of their due dates. The solver instantiates e1 , . . . , en ; then applies its default strategy to the other variables. Our extensive study shows that such an order gives the best results fast. 3 Agent-Based Heuristic ABH is a constructive heuristic that packs items into bins through negotiation, and schedules the packed bins optimally using a linear program. It uses a packing procedure PACK that searches for a feasible guillotine packing of a set of items into a single bin via a reduced version of CPH. Because it solves a feasibility problem, PACK omits Eq. (18) and drops the s, t and c variables along with their related constraints, i.e. Eqs. (13-14,16-17,32-37). PACK is solved via IBM ILOG’s CP Optimizer, which is allocated a preset threshold runtime. It either returns a feasible packing or signals the infeasibility of the grouping of the items in a bin. 7 n Suppose that m is fixed and that an integer-valued vector x ∈ {N≥0 } represents an assignment of items to bins such that xi = k if item i ∈ Nk . For a given x, the processing time of bin k ∈ B is known. Thus, the completion times that minimize the weighted earliness tardiness of the items is the optimal solution to the linear program WET(N ) whose decision variables are: ck ≥ 0, Ti ≥ 0 and Ei ≥ 0 for k ∈ B and i ∈ N . WET(N ) follows. P min i∈N (i Ei + τi Ti ) s.t. (36)-(37) Ti − Ei = ck − di Ti , Ei ∈ R≥0 ck ∈ R≥0 (38) i ∈ N, k ∈ B : xi = k (39) i ∈ N (40) k ∈ B (41) WET(N ) schedules the bins on the single cutter and inserts idle time between successive bins if this decreases the total weighted earliness tardiness, defined by Eq. (38). Eq. (36) determines the completion time of each bin ensuring that the processing periods of two successive bins do not overlap in time. Eq. (37) guarantees that the schedule starts after time zero. Eq. (39) calculates the tardiness Ti and the earliness Ei of job i when i is assigned to bin k. Finally, Eqs. (40-41) declare the variables positive. WET(N ) is a linear program that can be solved via IBM ILOG’s CPLEX. 3.1 Initial Partial Solution ABH starts with constructing a partial solution. First, ABH computes the lower bound lbfs of Fekete and Schepers [6] on the number of bins required to pack the n items. Then ABH constructs a partial solution with m = lbfs empty bins. Second, ABH uses a peak clustering algorithm [20] that identifies items with close due dates. These items constitute a bottleneck on the machine. The idea is that a bin groups a set of items such that its completion time lies at the centre of the due dates of the items. Assigning items causing a bottleneck to the same bin reduces the lateness of the items; in particular when the items’ per unit earliness tardiness penalties are symmetric. The clustering algorithm finds the kth cluster by evaluating, for i ∈ N, a clustering function P   |di −di0 |2  , if k = 1  i0 ∈N exp − (.5r) 2   φki = |di −di∗ |2  − φk−1 , if k > 1 exp − (.5r)k−1 φk−1 2 i i∗ k−1 where r is the parameter that governs the width of the peak function. It then selects i∗k , the item with the largest peak function value: φki∗ = maxi∈N {φki }. k It removes i∗k from N and places it in a list U of highly bottleneck items. It updates the modified peak function and iterates the process until it has removed m bottleneck items. The n − m unpacked items constitute the set U . 3.2 Completing a Partial Solution Let WET(i∗ , k) = X X i ·max {0, di −ck0 }+τi ·max {0, ck0 −di } 0 0 i∈U ∪{i∗ } k ∈B:xi =k 8 denote the objective value of the current partial solution augmented by {i∗ } were i∗ to leave U and be packed in k. WET(i∗ , k) is the value of the optimum of WET U ∪{i∗ } . The items in U and the filled bins act as individual greedy agents that undertake negotiation actions. A bin k seeks to attract the best item i∗ ∈ U , defined as the item which minimises WET(i∗ , k). Likewise, item i ∈ U seeks the best bin k ∗ where k ∗ minimises WET(i, k ∗ ) should i leave U and join k ∗ . The item-attraction and bin-seeking negotiation actions, named as GroupFormation and GroupJoin respectively, continue until all items are assigned to bins (U = ∅) or none of the remaining items of U are packable into existing bins. At this point, a repacking procedure is triggered. Every time a bin’s GroupFormation action completes successfully, ABH runs a local search that obtains an optimised partial solution before ABH undertakes its next assignment decision. Differently stated, the local search downsizes the myopia of the greedy actions of the agents and keeps the partial solution balanced during the construction phase. It employs two operators: insertion, which moves an item from bin k to its neighbouring bin k+1 or vice versa, and swap, which exchanges two items, i ∈ Nk and i0 ∈ Nk+1 , from two neighbouring bins. A move or exchange is adopted when it improves the current solution and maintains its feasibility. The local search applies the operators sequentially until it obtains a better solution. It operates on neighboring bins only in order to have a short run time. However, it may consider a larger neighbourhood when the earliness and tardiness costs are highly asymmetric. 3.2.1 GroupFormation The GroupFormation action, detailed in Algorithm 1, considers the items in U in ascending order of their i Ei + τi Ti , where Ei and Ti are computed with respect to the current ck of bin k. Evidently, the current ck is an estimate of the true ck , which changes as items of U are assigned to k. For each of the first ρ items of U , the GroupFormation action of bin k computes, using WET(N ), the true ck were this item to join k. It considers the ρ most prominent items first to reduce its run time. Next, the GroupFormation action of a bin k chooses the candidate i∗ which induces the smallest WET(i∗ , k) were i∗ to join k. It checks whether k can append i∗ . If the lbfs lower bound for Nk ∪{i∗ }, denoted as lbfs (Nk ∪{i∗ }) , is less than or equal to 1, i∗ may be packed in k. Therefore, the GroupFormation action triggers PACK, which searches for a feasible guillotine packing of i∗ and the items already assigned to k. When PACK returns a valid packing, k sends a join request to i∗ , which has independently undertaken its own GroupJoin action. When i∗ accepts the request, the GroupFormation action assigns i∗ to k, and terminates successfully. PACK may fail to find a further packing i∗ into k either because it runs out of time or it has exhausted all possible packing possibilities. In this case, the GroupFormation action of k removes i∗ from the list of candidates items and selects the next item, say i∗∗ , that minimizes WET(i∗∗ , k) were i∗∗ to join k. When k fails to append any of the ρ candidate items, it iteratively considers the next item of U , compute the true ck were this item to join k and checks the feasibility of packing this item into k. If it still fails to append any of the items of U , the GroupFormation action terminates unsuccessfully. When all available bins fail their GroupFormation actions while U 6= ∅, the repacking 9 Algorithm 1 GroupFormation action of bin k Sort U in the ascending order of i Ei +τi Ti , i∈U , with respect to ck ; Initialise the list of candidates Γ = ∅ and the list of examined items ∆ = ∅; Select the first ρ items in U and add them to Γ; while (true) do for (∀i ∈ Γ) do if (αki = −1) then αki = WET(i, k); Select i∗ = mini∈Γ {αki } if (lbfs (Nk ∪{i∗ }) ≤ 1) then if (λki∗ = −1) then λki∗ = PACK (Nk ∪{i∗ }); if (λki∗ = 1) then if (the GroupJoin action of i∗ returns true) then Append i∗ to Nk and remove it from U ; for (∀αk0 i ∈ A : k0 ∈ B, i ∈ N ) do Set αk0 i = −1; for (∀λki ∈ Λ : i ∈ N ) do Set λki = −1; Return true; Add i∗ to ∆ and remove it from Γ; if (Γ = ∅) then if (∆ = U ) then Return f alse; Set Γ = U \ ∆; procedure of Section 3.2.3 is applied. 3.2.2 GroupJoin The bin and item agents act individually and greedily. This can result in lowpenalty items being attached to bins whose completion times are far from the items’ due dates. This might also be problematic when the per unit penalties of the items assigned to a bin are highly asymmetric. It can quickly lead to a ripple effect, as these low-penalty items may force items with higher penalties not to be in their most proximal bins due to packing constraints. This, in turn, forces more items to be packed into less proximal bins; yielding a large increase of the penalties and an overall degeneration in solution quality. To avoid such a scenario, an item i declines an attachment offer from bin k if it can be packed into bin k 0 and the overlap of [di − pi , di ] with [ck0 − pk0 , ck0 ] is larger than the overlap of [di − pi , di ] with [ck − pk , ck ], where [di − pi , di ] is the ideal processing time of i and pi is the processing time of a bin containing only item i. Each item i ∈ U is interested in joining a bin whose processing time window overlaps its own ideal processing window. Let Oi denote the set of such bins. The GroupJoin action sorts the bins of Oi in descending order of the overlap, and chooses the bin k 0 ∈ Oi with the largest overlap. If k 0 is the bin that sent i the attachment offer, i accepts the joining request. Otherwise, the GroupJoin action checks whether i can be packed in k 0 . If lbfs (Nk0 ∪{i}) ≤ 1, it calls PACK. If the packing of i in k 0 is feasible, i declines the invitation of k; otherwise, the GroupJoin action considers the next bin of Oi . When the GroupJoin action exhausts all bins of Oi without packing i, it proceeds to the following alternative plan. For each bin k 0 ∈ B \Oi , it computes the penalty WET(i, k 0 ) were i to join k 0 . It first forms the set of bins B 0 such that W ET (i, k 0 ) ≤ W ET (i, k) and sorts it in ascending order of W ET (i, k 0 ). Then, it iteratively scans B 0 ⊆ B\Oi . 10 Algorithm 2 GroupJoin action of item i when a join request from bin k is received Initialise the list of bins Oi = ∪k0 ∈B {k0 : [di −pi , di ]∩[ck0 −pk0 , ck0 ] 6= ∅}; Sort Oi in the descending order of the overlap [ck0 − pk0 , ck0 ] ∩ [di − pi , di ]; for (∀k0 ∈ Oi ) do if (k0 = k) then Return true if (lbfs (Nk0 ∪{i}) ≤ 1) then if (λk0 i = −1) then Set λk0 i = PACK (Nk0 ∪{i}); if (λk0 i = 1) then Return f alse; for (∀k0 ∈ B \ Oi ) do if (αk0 i = −1) then αk0 i = WET(i, k0 ); Form the list of bins B 0 = ∪k0 ∈B\Oi {k0 : WET(i, k0 ) ≤ WET(i, k)}; Sort B 0 in ascending order of WET(i, k0 ), k0 ∈ B 0 ; for (∀k0 ∈ B 0 ) do if (k0 = k) then Return true; if (lbfs (Nk0 ∪{i}) ≤ 1) then if (λk0 i = −1) then λk0 i = PACK (Nk0 ∪{i}); if (λk0 i = 1) then Return f alse; Return true; If k = k 0 , k 0 ∈ B 0 , i accepts the invitation of k and the GroupJoin action ends successfully. Otherwise, it tests whether i is packable in k 0 with a lower earliness tardiness penalty. If lbfs (Nk0 ∪{i}) ≤ 1 and PACK returns a feasible packing, the GroupJoin action declines the invitation of k whereas the GroupJoin action checks the next bin of B 0 when packing is impossible. The GroupJoin action ends successfully when it checks all the bins of B 0 and does not find a bin proposing a placement yielding smaller earliness-tardiness penalties. Algorithm 2 details the GroupJoin action. 3.2.3 Repacking When there remain unpacked items (i.e., U 6= ∅) while the GroupFormation actions of all the bins fail, ABH triggers a repacking procedure. It identifies a bin k ∗ whose completion time ck∗ is the closest to the due date of the first unpacked item i ∈ U . It empties bin k ∗ along with bins (k ∗ − 1) and (k ∗ + 1) (if they exist), and inserts their unpacked items into set U . It inserts a new bin immediately following bin k, increments the number of bins by one, and resumes the GroupFormation actions. 3.2.4 Caching ABH reduces its runtime by nearly an order of magnitude by caching results from previous objective function calls and packing feasibility checks. Consider bin k ∈ B sending a join request to item i ∈ U . ABH doesn’t recompute the total scheduling penalty resulting from i joining k if this penalty was computed previously and the schedule has since been unchanged. Similarly, ABH doesn’t rerun PACK for Nk ∪ {i} if it was obtained at a prior stage and the content of the bin k has since been unchanged. ABH proceeds similarly for the GroupJoin actions when an item requests to join a bin. 11 m×n Matrix Λ ∈ {−1, 0, 1} stores packing feasibility check results such that its element λki , k ∈ B, i ∈ N, equals 0 if the packing of i into k is infeasible, equals 1 if it is feasible, and -1 if the result is unknown. Every time an item is added to a bin k ∈ B, all the elements of the row associated with k are changed to the default unknown packing state; i.e., to −1. Penalty computation results are stored in matrix A ∈ Rm×n ≥−1 whose element αki , k ∈ B, i ∈ N, equals the total penalty generated by attaching i to k. Unlike the feasibility checks, every entry of A is reset to the unknown state −1 when any bin adds a new item as this addition may alter the total scheduling penalty. 4 Computational Results CPH and ABH are implemented in C#, with CP models solved via IBM’s ILOG Optimisation Studio’s CP solver version 12.6.2. They are run on a personal computer with 4GB of RAM and a 3.06GHz Dual Core processor. Their performances are compared on instances that are randomly generated as follows: • n =20, 40, 60, 80, and 100; • i and τi following the uniform[1, 5]; • theP processing time function of non-empty bin k is f (Nk ) = tl + th · |Nk | + c t · i∈Nk (wi +hi ), where bin loading time tl = 100, the item’s handling time th = 30, and the cutting time tc = 0.02; • items’ due dates distributed according to: a normal with mean λ and standard P tl h w i∈N i i ; and deviation 0.1λ, or a uniform[0, 2λ] where λ = 2W H • classes of instance as given in Table 1. They are those of the most known benchmark set for two-dimensional bin packing [10]. Classes 7-10 involve four types of items whose dimensions follow uniform distributions whose ranges are respectively:    − − − − type type type type 1: 23 W ,W , 1, 12 H ;    2: 1, 12 W , 23 H,H ; 1  1  3: 2 W ,W , 2 H,H ; and    4: 1, 12 W , 1, 21 H . The instances are grouped according to their bin to item size ratios, which reflect the average number of items that can be packed into a bin: A low bin density set L with relatively large items and a high bin density set S with small items. As in real life furniture manufacturing, a bin’s processing time accounts for its size and that of its items. For each class, problem size, and type of due date distribution, 10 instances are generated. The resulting 1000 problems, which will serve as benchmark instances for future research1 . ABH is run with r = 40 and ρ = 3. Both values are set as a result of extensive experiments. r is not very influential but instance-dependent. Setting r should avoid both very large and very small values. When r is too large, the peak function accounts for too many due dates; consequently, the selection of bottlenecks becomes problematic as the clustering algorithm will tend to detect a single cluster rather than bottlenecks. Similarly, when r is too small, the clustering algorithm identifies too many bottlenecks; consequently, finding the bottleneck with the largest impact is hard. On the other hand, the value of ρ is not critical as it slightly speeds up 1 The full set of test instances is available at http://cs.adelaide.edu.au/∼optlog/ 12 Table 1: Generation of the widths and heights of items Density L S L S L S L Class 1 2 3 4 5 6 7 W =H 10 30 40 100 100 300 100 L 8 100 L 9 100 S 10 100 (wi , hi )) uniform[1, 10] uniform[1, 10] uniform[1, 35] uniform[1, 35] uniform[1, 100] uniform[1, 100] type 1 with probability 70%; probability 10% each type 2 with probability 70%; probability 10% each type 3 with probability 70%; probability 10% each type 4 with probability 70%; probability 10% each type 2, 3, 4 with type 1, 3, 4 with type 1, 2, 4 with type 1, 2, 3 with the GroupFormation computations. ABH allocates a 0.5 s runtime to the constraint program PACK that checks for the feasibility of a packing. All statistical inferences are valid at a 5% significance level. H Figure 2 displays the heat map of the performance ratio zzbest , H∈H= {CPH10 , CPH30 , ABH}, where CPH10 and CPH30 denote CPH when allocated 10 and 30 minutes of runtime respectively, zbest = minH∈H {zH }, and a dark blue color signals a better objective function value. It suggests that allocating a longer runtime to CPH enhances its mean performance ratio; in particular when n > 20. This enhancement occurs in about 80% of instances. The percent of times CPH10 equals CPH30 decreases as n increases, as illustrated by Figure 3. This is further supported by a paired statistical test and by Figure 4.a-b, which displays the mean performance ratios as a function of size and class. It is unlikely that increasing the runtime of CPH beyond 30 minutes for larger instances will induce further improvements shortly because of the large size of the search space. ABH outperforms CPH for instances with more than 60 items whereas CPH performs better than ABH when the number of items is 20 or 40. For n = 60, ABH outperforms CPH for set L while being outperformed by CPH for set S. CPH investigates a substantially higher portion of the solution space when the search space is small than when the search space is large. As n increases, CPH struggles to reduce the search space (thus, to converge to lowpenalty solutions) whereas ABH reaches such solutions for the larger instances progressively thanks to its general rules of thumb that aim at minimizing the incremental weighted earliness tardiness as ABH assigns items to bins. Analysis of variance tests further show that the mean performance ratio is not sensitive to the distribution of the due dates but is sensitive to both the class and the problem size. For single machine scheduling, problems with normally distributed due dates are harder to solve; however, for the problem at hand, clusters of items with very close due dates can be scheduled in the same bin. On the other hand, processing items with uniformly distributed due dates in a single batch increases the objective function value, and constitutes an additional difficulty to the problem. This is reflected by slightly lower solution quality of CPH and ABH and slightly larger run times. A hypothesis test infers that there is not enough statistical evidence to claim that the mean runtime of ABH is larger when the due dates are normally distributed than when they are uniformly generated. A one-way analysis of variance further confirms that the runtime of ABH is not sensitive to the distribution 13 Class 1 2 3 4 5 6 7 8 9 10 Size CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH CPH10 CPH30 ABH 20 1.03 1.00 1.46 1.00 1.00 1.31 1.02 1.00 1.30 1.00 1.00 1.26 1.01 1.00 1.34 1.00 1.00 1.25 1.00 1.00 1.34 1.00 1.00 1.32 1.01 1.00 1.32 1.01 1.00 1.24 Normal 40 60 80 1.32 1.54 1.79 1.00 1.11 1.33 1.24 1.01 1.00 1.21 2.33 2.35 1.00 1.00 1.16 1.23 1.06 1.00 1.51 1.74 2.06 1.00 1.09 1.28 1.24 1.00 1.00 1.30 1.51 1.87 1.00 1.00 1.17 1.25 1.04 1.00 1.32 1.51 1.67 1.00 1.09 1.33 1.26 1.00 1.00 1.15 1.50 1.67 1.00 1.00 1.15 1.23 1.10 1.00 1.10 1.35 1.76 1.00 1.06 1.32 1.32 1.02 1.00 1.09 1.62 1.62 1.00 1.06 1.28 1.35 1.01 1.01 1.03 1.06 1.07 1.00 1.00 1.02 1.26 1.10 1.06 1.41 1.82 2.01 1.00 1.06 1.39 1.29 1.01 1.00 Distribution 100 2.02 1.60 1.00 2.42 1.40 1.00 2.20 1.60 1.00 2.45 1.41 1.00 2.08 1.54 1.00 1.76 1.38 1.00 1.86 1.54 1.00 2.07 1.55 1.00 1.26 1.14 1.01 2.50 1.58 1.00 20 1.01 1.00 1.42 1.00 1.00 1.31 1.00 1.00 1.27 1.00 1.00 1.28 1.00 1.00 1.30 1.00 1.00 1.28 1.00 1.00 1.33 1.01 1.00 1.37 1.02 1.00 1.41 1.01 1.00 1.26 Uniform 40 60 80 1.27 1.83 2.02 1.01 1.12 1.35 1.16 1.00 1.00 1.73 2.44 2.33 1.00 1.00 1.11 1.22 1.12 1.00 1.35 1.87 2.29 1.00 1.08 1.33 1.13 1.00 1.00 1.12 1.70 1.71 1.00 1.00 1.10 1.25 1.10 1.00 1.17 1.58 1.90 1.00 1.14 1.35 1.16 1.00 1.00 1.16 1.52 1.62 1.00 1.00 1.06 1.23 1.10 1.01 1.16 1.61 2.11 1.00 1.04 1.36 1.18 1.01 1.00 1.01 1.64 1.92 1.00 1.14 1.33 1.20 1.00 1.00 1.15 1.11 1.13 1.00 1.00 1.01 1.33 1.14 1.06 1.33 1.71 2.28 1.00 1.14 1.40 1.13 1.00 1.00 Figure 2: Heat map of performance ratio Percent 35 30 25 20 15 10 5 0 20 40 60 80 100 20 Normal 40 60 80 100 Uniform Figure 3: Percent of times CPH10 equals CPH30 by size. 14 100 2.31 1.66 1.00 2.37 1.31 1.00 2.48 1.63 1.00 2.40 1.28 1.00 2.38 1.60 1.00 1.71 1.25 1.00 2.30 1.61 1.00 2.40 1.65 1.00 1.34 1.16 1.00 2.60 1.66 1.00 Mean performance ratio Mean performance ratio 200 2.0 2.2 2.0 1.8 1.8 Mean runtime (s) 200 150 150 100 100 50 50 Mean runtime (s) 1.6 1.6 1.4 1.4 1.2 1.2 1.0 n 20 30 40 50 60 CPH10 Normal CPH10 Uniform CPH30 Normal 70 80 CPH30 ABH ABH 1.0 1 90 100 Uniform Normal Uniform 2 3 4 5 CPH10 Normal CPH10 Uniform CPH30 Normal a) 6 7 8 9 10 CPH30 Uniform ABH Normal ABH Uniform Class 0 20 40 1 2 3 4 b) 60 Class n 100 80 5 6 7 0 20 40 8 9 10 1 2 3 4 c) 60 Class 80 5 6 7 100 n 8 9 10 d) Figure 4: Mean performance ratio as a function of size (a) and class (b). Mean runtime (s) of ABH for instances with normally (c) and uniformly distributed (d) due dates. Mean runtime (s) 160 140 120 100 80 60 40 20 0 n Density 20 40 60 H 80 100 20 40 60 L 80 100 Normal 20 40 60 H 80 100 20 40 60 L 80 100 Uniform Figure 5: 95% confidence intervals for the mean runtime (s) of ABH for instances with low and high density bins. of due dates. That is, processing the items in batches desensitizes ABH to the clustering of the due dates. The mean runtime of ABH is on the other hand dependent on the problem size and class as illustrated by Figure 4.c-d, which shows the main interaction of size, class, and distribution of due dates on the mean runtime of ABH. The maximal mean runtime of 203 s of ABH is far less than the allocated 10 minutes of CPH10 . The larger the bin to item size, the larger the run time of ABH is. This is particularly apparent for larger instances of classes 2, 4, 6 and 10, which all have high bin to item size ratios. As the number of items per bin increases, the number of potential arrangements of items increases too; making it harder to determine whether the packing of a given item set to the bin is feasible. Unfortunately, increasing the threshold of the runtime of the constraint program PACK did not enhance the performance of ABH for those classes of instances. Indeed, the feasibility problem remains too hard to solve when solutions lay “on the edge of feasibility”. Figure 5, which displays the 95% confidence intervals of the mean runtime (s) of ABH as a function of size for sets L and S, provides further computational proof that ABH runs faster on the instances with relatively large items. ABH performs consistently better for instances with low bin to item size ratios than for instances with high ratios. This is most likely due to the “ripple effect”, which arises from low-penalty items forcing items with higher penalties away from their most proximal bins. While the search for ideal processing windows favors the assignment of items to their most proximal bins, the asymmetric nature of the per unit penalties  and τ does not guarantee low earliness tar15 diness to all items assigned to a bin. As filled bins near their full capacity, the greedy GroupJoin and GroupFormation actions may result in locally-optimal scenarios where small, low-penalty items prohibit large, high-penalty items from being packed into their proximal bins; thus, force them into bins that are far away from their due dates. This occurs more often in instances with high bin to item ratios because bins can pack more items (which are not necessarily homogeneous). 5 Conclusions This paper introduces a very pertinent industrial problem that combines two very hard combinatorial optimization problems: a two-dimensional guillotine bin packing / cutting, and a single machine weighted earliness tardiness batch scheduling. It defines the problem, and models it using two different approaches: one based on constraint programming and one based on agent based modeling where items and bins act as cooperating negotiating agents. The computational results on randomly generated instances that will serve as benchmark sets for future research show that the constraint programming approach is more promising when the problem size is small while the agent based model gives better results for larger instances thanks to the common sense rules that govern the negotiations of the agents. The first heuristic can be enhanced with additional selection / dominance rules that will prune large parts of the search space while the second can be improved with a neighborhood search. In addition to improving these two heuristics, future research can focus on applying and adapting enumerative approaches, such as genetic algorithms, to the specificities of this problem. In fact, it would be interesting to design/adapt a high-performing evolutionary technique that can cope with the large number of infeasible solutions it would encounter during its search. Moreover, the problem can be extended to more complex manufacturing set ups such as flow shops and job shops, to cutting problems with more complex shapes and constraints as in apparel manufacturing, to three dimensional shapes as in transportation, or to the variable-sized variable-cost bin packing problem. Acknowledgments This work has been supported by the ARC Discovery Project DP130104395. References [1] Arbib, C., & Marinelli, F. (2014). On cutting stock with due dates. Omega, 46 , 11 – 20. [2] BenBassat, M. (2016). Production chain optimization for wood frame manufacturers. www.plataine.com/production-chain-optimization-for-wood-frame-manufacturers, . [Online; accessed December 2016]. [3] Bockmayr, A., & Hooker, J. N. (2005). Constraint programming. In G. N. K. Aardal, & R. Weismantel (Eds.), Discrete Optimization (pp. 559 – 600). 16 Elsevier volume 12 of Handbooks in Operations Research and Management Science. [4] Bonyadi, M. R., & Michalewicz, Z. (2016). Evolutionary computation for real-world problems. In Challenges in Computational Statistics and Data Mining (pp. 1–24). [5] Burke, E. K., Hyde, M. R., Kendall, G., & Woodward, J. (2012). Automating the packing heuristic design process with genetic programming. Evol. Comput., 20 , 63–89. [6] Fekete, S. P., & Schepers, J. (2004). A general framework for bounds for higher-dimensional orthogonal packing problems. Math. Meth. of OR, 60 , 311–329. [7] Hazır, Ö., & Kedad-Sidhoum, S. (2014). Batch sizing and just-in-time scheduling with common due date. Annals of Operations Research, 213 , 187–202. [8] Hooker, J. N. (2002). Logic, optimization, and constraint programming. INFORMS Journal on Computing, 14 , 295 – 321. [9] Lodi, A., Martello, S., Monaci, M., & Vigo, D. (2014). Two-dimensional bin packing problems. In Paradigms of Combinatorial Optimization (pp. 107–129). John Wiley & Sons, Inc. [10] Lodi, A., Martello, S., & Vigo, D. (2002). Recent advances on twodimensional bin packing problems. Discrete Applied Mathematics, 123 , 379 – 396. [11] M’Hallah, R., & Alhajraf, A. (2015). Ant colony systems for the singlemachine total weighted earliness tardiness scheduling problem. Journal of Scheduling, (pp. 1–15). [12] Polyakovskiy, S., Bonyadi, M. R., Wagner, M., Michalewicz, Z., & Neumann, F. (2014). A comprehensive benchmark set and heuristics for the traveling thief problem. In Proceedings of the 2014 Annual Conference on Genetic and Evolutionary Computation GECCO ’14 (pp. 477–484). New York, NY, USA: ACM. [13] Polyakovskiy, S., & M’Hallah, R. (2011). An intelligent framework to online bin packing in a just-in-time environment. In Modern Approaches in Applied Intelligence (pp. 226–236). Springer volume 6704 of LNCS . [14] Polyakovskiy, S., & M’Hallah, R. (2014). A multi-agent system for the weighted earliness tardiness parallel machine problem. Computers & Operations Research, 44 , 115 – 136. [15] Polyakovsky, S., & M’Hallah, R. (2009). An agent-based approach to the two-dimensional guillotine bin packing problem. European Journal of Operational Research, 192 , 767 – 781. [16] Refalo, P. (2004). Impact-based search strategies for constraint programming. In Principles and Practice of Constraint Programming – CP 2004 (pp. 557–571). Springer. 17 [17] Reinertsen, H., & Vossen, T. W. (2010). The one-dimensional cutting stock problem with due dates. European Journal of Operational Research, 201 , 701 – 711. [18] Sim, K., Hart, E., & Paechter, B. (2015). A lifelong learning hyper-heuristic method for bin packing. Evolutionary Computation, 23 , 37–67. [19] Verstichel, J., Kinable, J., Causmaecker, P. D., & Berghe, G. V. (2015). A Combinatorial Benders’ decomposition for the lock scheduling problem. Computers & Operations Research, 54 , 117 – 128. [20] Yager, R., & Filev, D. (1984). Essentials of Fuzzy Modeling and Control . John Wiley. 18
8cs.DS
Towards a Framework for Behavioral Specifications of OSGi Components Jan Olaf Blech fortiss GmbH, Munich, Germany We present work on behavioral specifications of OSGi components. Our behavioral specifications are based on finite automata like formalisms. Behavioral specifications can be used to find appropriate components to interact with, detect incompatibilities between communication protocols of components and potential problems resulting from the interplay of non-deterministic component specifications. These operations can be carried out during development and at runtime of a system. Furthermore, we describe work carried out using the Eclipse based implementation of our framework. 1 Introduction Traditional software component systems come – if at all – with a basic typing that indicates possible values at the component interface. In our work, we are extending this view to specify possible behavior of components in addition to the basic typing. We use a typing that encapsulates protocols specified by finite automata based descriptions. We present a first version of an implementation for the OSGi [19] framework. OSGi allows dynamic reconfiguration of Java based software systems. We demonstrate a tool based approach that allows the specification of method call based communication protocols, and the formalization of creation and deletion of components during a system’s lifetime. We check possible behavior of interacting components for behavioral compatibility including deadlocks. We can resolve possible incompatibilities by choosing options from non-deterministic behavioral specifications and – after discovery of a potential incompatibility – reacting inside the components accordingly. This work describes efforts towards an operationalization and an implementation of a behavioral types framework for OSGi. It realizes parts of our vision described in [6]. Unlike our work presented in [7], it is realized entirely using Java technology and is aimed towards the OSGi component system. A more comprehensive version of our OSGi semantics is described in a report [5]. In this paper, we primarily address protocol based behavior of components. The new contributions of this work comprise: • A formal definition of the OSGi semantics that is suitable for the abstract view that our behavioral types provide on OSGi. • A first implementation of a finite automata based behavioral type system for OSGi that integrates different tools and workflows into a framework. • Early versions of editors and related code for supporting adaption and checking. • An exemplarily integration of behavioral type checkers comprising minimization, normalization and comparison. One checker has been implemented in plain Java. Additionally we have integrated a checker and synthesis tool presented in [12] for deciding compatibility, deadlock freedom and detecting conflicts in non-deterministic specifications at runtime and development time. • Usage scenarios (interaction protocols) of our behavioral types for OSGi at runtime and development time. • The modeling of an example system: a booking system to show different usage scenarios. B. Buhnova, L. Happe, J. Kofroň: Formal Engineering Approaches to Software Components and Architectures 2013 (FESCA’13) EPTCS 108, 2013, pp. 79–93, doi:10.4204/EPTCS.108.6 80 Behavioral Specifications for OSGi Development Phase Eclipse Based Tool Support requirements model or text based documents Behavioral Type specification implementation deployment Java project / file bundle with behavior Figure 1: Behavioral types at development time 1.1 Our Setting Figure 1 shows the development chain supported by our framework. The development of our Eclipse based development process for OSGi bundles can roughly be divided into four phases. Bundles are toplevel OSGi components that aggregate classes, Java packages and deployment information. The four phases are supported by our behavioral descriptions in the following way. • In the requirements and specification phase, after the component / bundle structure has been determined, one can start using our tools for behavioral types. Requirements on components and specified protocols for component interaction can be described by using the automata like specification mechanisms provided by our behavioral types. • During the implementation, one creates bundles which contain the OSGi bundle information: static dependencies, classically typed interface descriptions, objects to be created at start of the bundle and Eclipse specific plugin information, e.g., extensions to the user interface. In addition to this we add our behavioral descriptions. These are given as files and can become accessible through the OSGi registration service. The OSGi registration service keeps tracks of objects / services provided by bundles and their properties. • At deployment and runtime of the system one has bundles including their behavioral specifications. These are 1) registered at the OSGi infrastructure and 2) can be used to discover appropriate components. Components can further use these (as shown in Figure 2) to decide 3) whether and how they want to interact, to discover potential incompatibilities and ways to resolve them. Decision may be based on algorithms and tools which are provided as separate bundles. 1.2 Related Work Interface automata [1] are one form of behavioral types. Like in this work, component descriptions are based on automata. The focus is on communication protocols between components which is one aspect J. O. Blech 81 1) start of a bundle 2) discover components bundle with behavior bundle with behavior register behavioral descriptions ask for specification OSGi infrastructure bundle with behavior get behavior compatibility checker (bundle) bundle with behavior 3) checking compatibility and reacting Figure 2: Behavioral types at runtime that we also address in this paper. Interface automata are especially aimed at compatibility checks of different components interacting at compile time of a system. Behavioral types have also been used in the Ptolemy framework [18] with a focus on real-time systems. Specification and contract languages for component based systems have been studied in the context of web services. A process algebra like language and deductive techniques are studied in [9]. Another process algebra based contract language for web services is studied in [8]. Emphasize in the formalism is put on compliance, a correctness guaranty for properties like deadlock and livelock freedom. Another algebraic approach to service composition is featured in [14]. JML [11] provides assertions, pre- and postconditions for Java programs. It can be used to specify aspects of behavior for Java methods. A similar description mechanism has been used for systems specified in synchronous dataflow languages like Lustre [13]. Assertion like behavioral specifications have also been studied in the context of access permissions [10]. Behavioral types as means for behavioral checks at runtime for component based systems have been investigated in [3]. In this work, the focus is rather put on the definition of a suitable formal representation to express types and investigate their methodical application in the context of a model-based development process. A language for behavioral specification of components, in particular of object oriented systems – but not OSGi –, is introduced in [16]. Compared to the requirement-based descriptions proposed in our paper, the specifications used in [16] are still relatively close to an implementation. Recent work regarding refinement of automata based specifications is, e.g., studied in [20]. To the best of our knowledge, existing work does describe OSGi and its semantics only at a very high level. Other behavioral type like frameworks do not exist for OSGi up till now. A specification of the OSGi semantics based on process algebras is featured in [22]. Some investigations on the relation 82 Behavioral Specifications for OSGi bundle bundle service service service ... ... OSGi framework implementation Operating System Figure 3: OSGi framework between OSGi and some more formal component models have been done in [17]. Means for ensuring OSGi compatibility of bundles realized by using an advanced versioning system for OSGi bundles based on their type information is studied in [4]. Aspects on formal security models for OSGi have been studied in [15]. 1.3 Overview We present OSGi and our formalization of its semantics in Section 2. Section 3 introduces our automata based behavioral types specification mechanism. Operations on behavioral types at development and at runtime are described in Section 4 for the OSGi framework. Implementation of the framework using Eclipse / OSGi techniques is described in Section 5. Section 6 exemplifies the use of behavioral types and its operations for a booking system and a conclusion is given in Section 7. 2 OSGi and its Semantics We present an overview on OSGi following our description in [6] and present a formalization of the semantics based on our more detailed report [5]. The OSGi framework is a component and service platform for Java. It allows the aggregation of Java packages and classes into bundles (cf. Figure 3) and comes with additional deployment information. The deployment information triggers the registration of services for the OSGi framework. Bundles provide means for dynamically configuring services, their dependencies and usages. OSGi bundles are used as the basis for Eclipse plugins but also for embedded applications including solutions for the automotive domain, home automation and industrial automation. Bundles can be installed and uninstalled during the runtime. For example, they can be replaced by newer versions. Hence, possible interactions between bundles can in general not be determined statically. Bundles are deployed as .jar files containing extra OSGi information. This extra information is stored in a special file inside the .jar file. Bundles generally contain a class implementing an OSGi interface that contains code for managing the bundle, e.g., code that is executed upon activation and stopping of the bundle. Upon activation, a bundle can register its services to the OSGi framework and make it available for use by other bundles. Services are implemented in Java. The bundle may itself start to use existing services. Services can be found using dictionary-like mechanisms provided by the OSGi framework. Typically one can search for a service which is provided using an object with a specified Java interface. J. O. Blech 83 In the context of this paper, we use the term OSGi component as a subordinate concept for bundles, objects and services provided by bundles. The OSGi standard only specifies the framework including the syntactical format specifying what bundles should contain. Different implementations exist for different application domains like Equinox1 for Eclipse, Apache Felix2 or Knopflerfish3 . If bundles do not depend on implementation specific features, OSGi bundles can run on different implementations of the OSGi framework. A Method-Call Semantics In the following we provide a formal semantics for OSGi. We concentrate on capturing behavior originating from method calls between different bundles and objects. Memory and exchange of data between these bundles and objects is not taken into account. Thus, we provide an overapproximation – in the sense of possible behavior – and abstraction of a real system. Object and method definitions An object is defined as a tuple (m0 , ..., mn ) comprising constructor and method definitions m0 , ..., mn . Since we incorporate constructors into this tuple it cannot be empty. The semantics of an object is given by the semantic interpretation of its methods and its object state. The semantics of a method is giving by an automaton (L, E, l0 ) comprising a set of locations L an initial location l0 ∈ L and edges E = (li , M, l j ) between locations. An addition to source and target location li and l j an edge comprises a set (can be ordered) of method calls and special calls M. These can be tuples (m, o, b) ∈ M comprising a method definition m of an object o that is associated with a bundle b. Furthermore, M can contain special calls for: adding and removing bundles, and creating and deleting objects. Each transition from E represents an action that is atomic or non-terminating to the method but not to the OSGi system. It can represent a memory update, but also other method calls. A method call can itself trigger a non-terminating method in the same or in other objects. Therefore a transition does not necessarily represent a terminating operation. An object state is a set of tuples {(mn , lni , idn , csn ), ..., (m p , l p j , id p , cs p )} comprising active method status states (mn , lni , idn , csn ), ..., (m p , l p j , id p , cs p ). Each tuple represents a method call, consisting of a method definition, its actual locations, an identifier id and a call state cs. The call state is part of an active method status state. It is a set of method definitions and method id plus status information for which the active method is waiting to return. The id is used to distinguish different calls to the same method. Bundles From an operational semantics point of view, bundles aggregate objects into units that are enumerated in the OSGi system and can be loaded and removed during runtime by user commands or from other bundles. A bundle is a set of objects {oactivator , ...} comprising an object oactivator = (..., mstart , mstop , ...) which is created on activation. It comprises two distinguished methods mstart , mstop which are called during activation and deactivation. In an implemented OSGi system, the oactivator object has to implement the BundleActivator interface defined in org.osgi.framework. It comprises two methods with signatures: void start(BundleContext context) throws java.lang.Exception 1 http://www.eclipse.org/equinox/ 2 http://felix.apache.org/site/index.html 3 http://www.knopflerfish.org/ 84 Behavioral Specifications for OSGi and void stop(BundleContext context) throws java.lang.Exception The semantical definition of bundle states aggregates its object states. A bundle state is defined as a set of object states {soi , ..., sok } for object states soi , ..., sok . Like for bundles, objects, and methods, we distinguish between a system state and a system definition – capturing a systems architecture. Both can change during the lifetime of a system. A standard OSGi system has one (as, e.g., in the Equinox framework implementation) or more bundles which are active at startup. OSGi systems and OSGi system states An OSGi system is a set of bundles. It comprises a distinguished bundle binit which is activated at start-up. Analog to object and bundle state, we define an OSGi system state. A system state is defined as a set of bundle states {sbi , ..., sbk } for bundle states sbi , ..., sbk . The initial state of an OSGi system comprises the start of the start method in the activator object of the initial bundle. The initial state of an OSGi system is defined as sinit = {sbinit } with sbinit = {oactivator } and / oactivator = {(mstart , lstart 0 , 0, 0)}. Dynamic architecture of OSGi systems An important aspect of our formalization is the impact on OSGi operations that can change the structure of OSGi systems. Such operations can be triggered by OSGi methods themselves, e.g., comprising adding and removing objects and bundles. Another option is to perform these operations by a command line interface (e.g., starting Eclipse with the console option using Equinox) at runtime on the OSGi framework. Here, we distinguish the following structure changing operations on OSGi systems: Starting / loading a system, adding a bundle and activating it, removing a bundle (and deactivating it), adapting a bundle and its services, closing / removing a system. Characteristic for these operations is the fact that new behavior becomes possible or is removed at runtime of the OSGi system. Thus, the semantics of an OSGi system and possible events can in general not be determined statically at the start of a system. State transitions in OSGi State transitions can modify both, structure of a system and the state of objects, bundles and a system. They are made up from local transitions appearing within methods and from handling terminated methods. In general state transitions are highly non-deterministic and define a relation of previous system state × previous system definition × next system state × next system definition For an OSGi system S = {..., b, ...}: We regard the system state s = {..., sb , ...} with so ∈ sb and (m, li , id, cs) ∈ so . From here, the following basic state transition cases can be distinguished: • Calling a method m0 of object o0 from a bundle b0 : We regard a transition (li , M, l j ) ∈ o with o ∈ b. The following steps are performed. 1. The step can be performed under the preconditions that (m0 , o0 , b0 ) ∈ M and o0 and b0 exist in S. 2. cs is updated by adding the method call indicating its bundle, object and id. 3. A new element (m0 , l00 , id 0 , 0) / is added to the object state where m0 belongs to o0 . id 0 is a new identifier for the method m0 . • Executing a method step: We regard a transition (li , M, l j ) ∈ o with o ∈ b. J. O. Blech 85 1. The step can be performed under the precondition that cs = 0. / 2. so is updated as s0o = so /(m, li , id, cs) ∪ {(m, l j , id, cshandle(M))}. Thus, (m, li , id, cs) is removed and (m, l j , id, cshandle(M)) is added instead. cshandle transforms M into a representation that indicates which methods have been called and keeps track of their ids. Furthermore, cshandle takes care of special operations that modify the system definition. • Returning from a method call: Any method status state with cs = 0/ and no edge that may lead to a possible succeeding state can be processed in the following way: 1. The method status state is removed. 2. The call state of any method that m has called is updated such that the entry for the m call is removed. Furthermore, the following operations are handled: • Adding a bundle : The cs from any object state so with (m, li , id, cs) ∈ so can contain a special operation (denoted: add bundle b0 ) for adding a bundle b0 and changing the system definition from S into S0 = S ∪ {b0 }. • Removing a bundle: The cs from any object state so with (m, li , id, cs) ∈ so can contain a special operation for removing a bundle b0 (denoted: remove bundle b0 ) and changing the system definition from S into S0 = S/{b0 }. • Creating an object. The cs from any object state so with (m, li , id, cs) ∈ so can contain a special operation (denoted: create object (o0 , b)) for adding an object o0 and changing a bundle definition b ∈ S to b0 = b ∪ {o0 }. The system definition is, thus, changed from S into S0 = S/b ∪ {b0 }. • Deleting an object: The cs from any object state so with (m, li , id, cs) ∈ so can contain a special operation (denoted: delete object (o0 , b)) for deleting an object o0 and changing a bundle definition b ∈ S to b0 = b/o0 . The system definition is, thus, changed from S into S0 = S/b ∪ {b0 }. Key characteristics of the OSGi semantics The method call semantics described above features some key-characteristics of OSGi: • State transitions in bundles and objects are triggered out of the bundles and objects themselves. They only involve the component where they originate from and components that are interacted with during a state transition. The rest of the system remains untouched with respect to the underlying abstractions of our semantics. • Different components run asynchronously as long as there is no method call between them. • Method calls provide synchronization points between components. • Method calls are blocking. 3 Behavioral Types as Specification Mechanism Our framework essentially supports finite automata for specifying expected incoming, potential outgoing method calls, the creation and deletion of components during a time span and other events that may occur in the lifetime of a system. A component’s behavior can be specified by one or multiple automata each one describing a behavioral aspect. Formally, we have an alphabet of labels Σ, a set of locations L, an initial location l0 and a set of transition edges E where each transition is a tuple (l, σ , l 0 ) with l, l 0 ∈ L and σ ∈ Σ. These are aggregated into a tuple to form a behavioral specification: 86 Behavioral Specifications for OSGi a) Outgoing calls b) Expected incoming calls l1 l0 ... l0’ newPrtcl oldPrtcl l2 newPrtcl l1’ ... ... Figure 4: Supporting different protocol versions (Σ, L, l0 , E) This view abstracts from the specifications given in Section 2. Our intention is to define interaction protocols or some aspects of them like the expected order of incoming and outgoing method calls for a component. Specifications for different components are independent of each other as long as there is no method call (e.g., indicated by the same label name) in the specifications. Example: Two components interacting Specifications can be used for different behavioral aspects. Figure 4 shows two excerpts of automata for outgoing and expected method calls from two different component specifications: ({newPrtcl, oldPrtcl, ...}, {l0, l1, l2, ...}, l0, {(l0, newPrtcl, l1), (l0, oldPrtcl, l2), ...}) and ({newPrtcl, ...}, {l0, l1, ...}, l0, {(l0, newPrtcl, l1), ...}) Here, the first component can do two different method calls in its initial state: newPrtcl, oldPrtcl. The second component expects one method call newPrtcl in its initial state. In this case both components may interact with each other, if both components use the newPrtcl. 4 Checking Compatibility and Making Components Compatible We describe operations that can be used at development and at runtime of a system. The operations use behavioral types from Section 3. Furthermore, we briefly describe the handling of potential incompatibilities discovered by type comparison at runtime within a software system. 4.1 Simple Behavioral Type Checking We have developed and implemented different operations for handling and comparing behavioral types, for deciding compatibility and for deadlock freedom. Simple comparison for equality of types and comparison for refinement between two automata based specifications involves the following steps. • A basis for the comparison of two types is the establishment of a set of semantical artifacts (e.g., method calls) that shall be considered. The default is to use the union of all semantical artifacts that are used in the two types. Comparison for refinement is achieved by eliminating certain semantical artifacts from this set. For consistency this also requires eliminating associated transitions from the types or, depending on the desired semantics, replacing an edge with an empty or τ label. • It is convenient to complete specifications for further comparison: Specification writer may only have specified method calls or other semantical artifacts that trigger a state change. Here, we J. O. Blech 87 automatically add an error location. We collect possible labels and for locations that do not have an edge for a label leading to another location indicating a possible semantical artifact, we add edges with the missing label to the error location. • In case of specifications which have been completed and that have no locations with two outgoing edges with the same labels, we perform a minimization of automata based specifications. This way, we merge locations and get rid of unnecessary complexity automatically. • Normalization of automata based specifications. This, involves the ordering of edges and in some cases locations with respect to the lexicographic order of their labels / location names. • Checking for equality involves the checking of equality of the labels on edges. Optionally, one can also consider the equality of location names of an automaton. Location names may imply some semantics but in our standard settings they only serve as ids. When location names serve only as ids, we construct a mapping between location names of the two automata involved in the comparison operation. These operations have been implemented in Java. They do not need additional tools or non-standard plugins. 4.2 Deciding Compatibility and Deadlock-Freedom In addition to the operations described in Section 4.1 we have adapted a SAT and game-based tool – VissBIP presented in [12] – to serve as a compatibility and deadlock checker for our behavioral types for OSGi. Our framework uses VissBIP to support the checking of the following properties: • Deadlocks checking: deadlocks resulting from potential sequences of method calls can be detected. • Compatibility: A component anticipating a certain behavior of incoming method calls matches potential behavior of outgoing method calls by other components. VissBIP uses a simplified version of the BIP semantics [21]. A system comprises concurrent automata with labeled edges. The automata synchronize with each other by performing edges with the same labels in parallel. Otherwise, the default case is that automata do not synchronize with each other. For comparing method call based behavioral specifications we use VissBIP on specifications that comprise expected incoming and outgoing method calls of components. In OSGi synchronization between components happens only when one component calls a method of the other component as indicated in the behavioral specification and the OSGi semantics. On the VissBIP side this corresponds to same labels in the automata that represent the behavior. In addition to the label compatibility checking, VissBIP is able to perform the introduction of priorities. 4.3 Runtime Adaption of Systems One way of runtime adaption is the reaction to potential deadlocks or incompatibilities. Recall Figure 4: it shows behavioral specifications of two components which intend to communicate with each other. Possible outgoing method calls of one component and expected incoming method calls of the other component are shown. It can be seen that the first component is able to communicate using two different protocols: one starts by calling an initialization method newPrtcl, the other one starts by calling an initialization method oldPrtcl. The other component expects the newPrtcl call. When we give these two specifications to VissBIP, it will return a list of priorities where the newPrtcl edge is favored over the oldPrtcl edge in the first specification. In a Java implementation the first component can use this to dynamically decide at runtime which protocol to use. 88 Behavioral Specifications for OSGi • First, the component loads its own behavioral specification and the specification of the expected method calls of the second component. Technically, we support loading files and the registration of models as properties / attributes of bundles as provided by the OSGi framework. • Next, we invoke VissBIP or another checking routine. Passing the behavioral specifications as parameters. • The checking routine gives us a list of priorities. In the Java code we have a switch statement as a starting point for handling the different protocols. We check the priorities and go to the case for the appropriate protocol. Thus, in addition to deadlock detection, we can use behavioral specifications for coping with different versions of components and desired interacting protocols. 4.4 Component Discovery at Runtime A central feature of our behavioral descriptions for OSGi components is registering them to a central OSGi instance. In order to inform other components of the existence of a bundle with behavioral offers and needs, we register its behavioral properties using the OSGi service registry belonging to a BundleContext which is accessible for all bundles in the OSGi system: registerService(java.lang.String[] clazzes, java.lang.Object service, java.util.Dictionary<java.lang.String,?> properties) Here, we register a collection of behavioral objects as properties for a service representing a bundle under a String based key. In our framework, we register a collection of behavioral models as ”BEHAVIOR”. The behavioral models are loaded from XML files that are integrated into the bundle. The behavioral models come with meta information which identify the parts of the behavior of a bundle which they describe. The service itself is represented as an object. Additional interface information is passed using the clazzes argument. 5 Tool Support during Development and at Runtime The features described in this paper have been implemented in Eclipse. Our framework offers the following ingredients and is build using the following concepts: • EMF/.ecore based meta model of behavioral descriptions for easy interactions with other Eclipse based tools. Each specification is associated with a description which classifies what is actually specified, e.g., incoming method calls, outgoing method calls, component creation and deletion or something mixed. • Editors for behavioral descriptions. Figure 5 shows a screenshot of an editor for automata based specifications. • Other operations like abstractions, minimization and comparison of behavioral types (some of them are described in Section 4.1) are implemented. They can be used by referencing one of our plugins and can be extended. • An integration of the VissBIP checker as Eclipse plugin / OSGi bundle and transformations for using it with our behavioral types are offered. J. O. Blech 89 Figure 5: Specifying behavior using our editors in Eclipse While the editors are only invoked at development time, the specifications and operations on them are used both: at development time and at runtime of the system for reconfiguration. At development time, they are invoked using the Eclipse front-end. At runtime, they are invoked using method calls to plugins that realize the operations and are deployed as OSGi bundles. 6 Behavioral Types for a Booking System We present the use of behavioral types to highlight some features and usages of our work on an example: a flight booking system. Figure 6 shows the main ingredients of our flight booking system. Clients are served by middleware processes which are created and managed by a coordination process. Middleware processes use concurrently a flight database and a payment system. The described system is an example inspired by realistic systems where the middleware is implemented using Java/OSGi. In addition to the middleware components we describe databases and parts of the frontend using our behavioral types to make checks of these parts possible. The following means of behavioral interaction can be distinguished: • Component calls between methods / communication protocol In our flight booking system, a client can call a coordination process and middleware processes. Middleware processes can call 90 Behavioral Specifications for OSGi ... Client middleware process ... middleware process Client coordination process flight database payment subsystem Figure 6: Components of our flight booking system methods providing access to the flight database and the payment subsystem. The method calls need to respect a distinct protocol which can be encoded using our behavioral types. • Creation and deletion of new components The coordination process creates and removes middleware process such that there is one process per client. Providing support for analysis of such dynamic aspects is a long term goal for our behavioral types but not in the scope of this work. • Concurrent access to shared resources Middleware processes perform reservations, cancellations, rebookings, seat reservations and related operations on the flight database. These operations do require the locking of parts of the data while an operation is performed. For example, during a seat reservation a certain amount of the available seats in an aircraft is locked so that a customer can chose one without having to fear that another customer will chose the same seat at the very same time. In the current state we are able to provide some behavioral types support here. Example: Specification of outgoing method calls of a middleware process Specifications of possible expected incoming and potential outgoing method calls give information about a communication protocol that is to be preserved. Typically different interaction sequences are possible, especially since we are dealing with abstractions of behavior. In the booking system, a middleware process communicates with a flightdatabase (db) and the payment system (pay). The expected order of method calls for a flight booking to these systems is shown in Figure 7. The figure shows only an excerpt of the possible states and transitions. In addition to this, the initial state allows the start of a seat reservation process and a cancellation process. Moreover, Figure 7 shows only the state changing method calls of the behavioral specification of the booking process. Our real behavioral specification completely lists all possible method calls in each state. This way, we can further analyze compatibility issues for example with database systems that do not support all possible method calls of a middleware process. In comparison to the outgoing method calls of a middleware process, the incoming method call specification is much simpler: A constructor call is performed by the coordination process upon initialization. After that, the communication with the client is done using a webserver interface – comprising method calls that send raw request data to the middleware process and return raw response data that trigger, J. O. Blech 91 db.listFlights db.selectFlight db.abort db.finalize db.transmitCustomerData pay.handlePayment Figure 7: Outgoing method calls of a middleware process initialize init reserveSeat low reserveSeat middle cancelSeat reserveSeat cancelSeat reserveSeat high cancelSeat reserveSeat cancelSeat full cancelSeat reserveSeat cancelSeat Figure 8: Behavioral model for seat reservation of a flight e.g., displaying selected flights by the client – where no states in the communication process can be distinguished. Example: Specification of database elements Access to our database is done using method calls to a database process and is formalized using our automata based specification formalisms. The method calls result in locking and unlocking database elements. Seat reservation in a flight requires that a certain partition of the available seats is blocked during the selection process so that a client can make a choice. Figure 8 shows our behavioral model of seat reservation for a single flight. Different loads are distinguished: low means that many seats are still available, while high means that only a few seats are available. The full state indicates that no additional seat reservations can be made, only cancellations are possible. The model is an abstraction of the reality since instead of treating each seat – potentially hundreds of available seats – independently we only distinguish their partitioning into four equivalence classes: low, medium, high and full. Example: Database elements and deadlocks Access to the flight database can result in deadlocks. The model from Figure 8 can serve as a basis for deadlock analysis. Consider the scenario shown in Figure 9: For each flight a different instance of the seat reservation model exists. Given three airports A, B and C: Suppose two people – person 1 and person 2 – want to fly from A to C via B. Seats for two flights need to be reserved: from A to B and from B to C. It is not desirable to reserve a seat from B to C if no seat is available for the flight to A to B. Otherwise, it might not be desirable to fly from A to B if no seat is available for the flight from B to C. During the seat reservation a deadlock may occur: If person 1 reserves the last seat for the A to B flight before doing reservations for the B to C flight and person 2 reserves the last seat for the B to C flight before a seat reservation for the A to B flight a deadlock may occur, which may result in the cancellation of both journeys although one person could have taken the journey. 92 Behavioral Specifications for OSGi Flight order A Seat reservation order B C Client 1 A B Client 2 B B C A B C deadlock? time Figure 9: Concurrent seat reservation on two flights If it is known before to the seat reservation system that person 1 and person 2 will fly from A to C – which is a reasonable assumption given the fact that they have entered their desired start and end destination into the system – we are able to detect such deadlocks. They can occur if both behavioral models of the seat reservation system are already in the high state – given that no other participants are doing reservations at this time we may also take compensating actions. Evaluation Modeling of the flight booking system has been carried out in several versions with several degrees of detail in our behavioral types framework plugins. Behavioral models are described as independent files. We have used our implemented operations on these files. Compatibility and deadlock checking can be performed without problems for several components interacting together. For our compatibility checking, we do not use all specifications of the entire system together but pick those that are relevant for a certain communication aspect. 7 Conclusion We presented a first version of a framework for behavioral types for OSGi systems. In this paper, the main focus is on the OSGi semantics, the specification of behavior and checking the compatibility of specifications. Handling and reacting to specifications at runtime is another topic. We have described our implementation and its architecture. So far, we are concentrating on Eclipse / OSGi systems. Other application areas for the future comprise 1) work towards behavioral types for distributed software services 2) work towards real-time embedded systems. This might require leaving the Java / OSGi setting, since these applications typically involve C code which communicates directly with – if at all – an operating system. There is, however, work on extensions for real-time applications of OSGi using real-time Java (e.g., [2]). Additional specification formalisms and the integration of new checking techniques are another challenge. References [1] L. de Alfaro, T.A. Henzinger. Interface automata. Symposium on Foundations of Software Engineering, ACM , 2001. doi:10.1145/503271.503226 [2] J. C. Américo, W. Rudametkin, and D. Donsez. Managing the dynamism of the OSGi Service Platform in real-time Java applications. Proceedings of the 27th Annual ACM Symposium on Applied Computing, ACM, 2012. doi:10.1145/2245276.2231952 J. O. Blech 93 [3] F. Arbab. Abstract Behavior Types: A Foundation Model for Components and Their Composition. Formal Methods for Components and Objects. vol. 2852 of LNCS, Springer-Verlag, 2003. doi:10.1007/978-3-54039656-7 2 [4] J. Bauml and P. Brada. Automated Versioning in OSGi: A Mechanism for Component Software Consistency Guarantee. 35th Euromicro Conference on Software Engineering and Advanced Applications, 2009. doi:10.1109/SEAA.2009.80 [5] J. O. Blech. Towards a Formalization of the OSGi Component Framework. http://arxiv.org/abs/1208.2563v1. arXiv.org 2012. [6] J. O. Blech, Y. Falcone, H. Rueß, Bernhard Schätz Behavioral Specification based Runtime Monitors for OSGi Services. Leveraging Applications of Formal Methods, Verification and Validation (ISoLA), 2012. doi:10.1007/978-3-642-34026-0 30 [7] J. O. Blech, B. Schätz. Towards a formal foundation of behavioral types for UML state-machines. In: Proceedings of the 5th International Workshop UML and Formal Methods, 2012. doi:10.1145/2237796.2237814 [8] M. Bravetti, G. Zavattaro. A theory of contracts for strong service compliance. Mathematical Structures in Computer Science 19(3): 601-638, 2009. doi:10.1017/S0960129509007658 [9] G. Castagna, N. Gesbert, L. Padovani. A theory of contracts for Web services. ACM Trans. Program. Lang. Syst. 31(5), 2009. doi:10.1145/1538917.1538920 [10] N. Cataño and I Ahmed. Lightweight Verification of a Multi-Task Threaded Server: A Case Study With The Plural Tool. Proceeding of Formal Methods for Industrial Critical Systems (FMICS), vol 6959 of LNCS, Springer, 2011. doi:10.1007/978-3-642-24431-5 3 [11] P. Chalin, J.R. Kiniry, G.T. Leavens, E. Poll. Beyond assertions: Advanced specification and verification with JML and ESC/Java2. Formal Methods for Components and Objects, FMCO, vol. 4111 of LNCS, Springer 2005. doi:10.1007/11804192 16 [12] C. Cheng, H. Rueß, A. Knoll, C. Buckl. Synthesis of fault-tolerant embedded systems using games: from theory to practice. Verification, Model Checking, and Abstract Interpretation, vol. 6538 of LNCS, Springer 2011. doi:10.1007/978-3-642-18275-4 10 [13] J.-L. Colaço and M. Pouzet. Clocks as first class abstract types. EMSOFT, vol. 2855 of LNCS, Springer, 2003. doi:10.1007/978-3-540-45212-6 10 [14] J. L. Fiadeiro, A. Lopes. Consistency of Service Composition. Fundamental Approaches to Software Engineering (FASE), vol. 7212 of LNCS, Springer, 2012. doi:10.1007/978-3-642-28872-2 5 [15] O. Gadyatskaya, F. Massacci, A. Philippov. Security-by-Contract for the OSGi Platform. Information Security and Privacy Conference, SEC, Springer, 2012. doi:10.1007/978-3-642-30436-1 30 [16] E. B. Johnsen and R. Hähnle and J. Schäfer and Rudolf Schlatte and Martin Steffen. ABS: A Core Language for Abstract Behavioral Specification. Post Conf. Proceedings 9th Intl. Symposium on Formal Methods for Components and Objects 2010. Springer-Verlag 2010. doi:10.1007/978-3-642-25271-6 8 [17] M. Mueller, M. Balz, M. Goedicke. Representing Formal Component Models in OSGi. Proc. of Software Engineering, Paderborn, Germany, 2010. [18] E.A. Lee, Y. Xiong. A behavioral type system and its application in ptolemy ii. Formal Aspects of Computing, 2004. doi:10.1007/s00165-004-0043-8 [19] OSGi Alliance. OSGi service platform core specification (2011) Version 4.3. [20] C. Prehofer. Behavioral refinement and compatibility of statechart extensions. Formal Engineering approaches to Software Components and Architectures. Electronic Notes in Theoretical Computer Science, 2012. [21] J. Sifakis. A framework for component-based construction – Extended Abstract. Software Engineering and Formal Methods, IEEE Computer Society, 2005. doi:10.1109/SEFM.2005.3 [22] H.A.M. Tchinda, N. Stouls, J. Ponge. Spécification et substitution de services osgi. Technical report, Inria (2011) http://hal.inria.fr/inria-00619233.
6cs.PL
Principles for Verification Tools: Separation Logic Brijesh Dongol, Victor B. F. Gomes, and Georg Struth arXiv:1410.4439v1 [cs.LO] 16 Oct 2014 Department of Computer Science, University of Sheffield {b.dongol,v.gomes,g.struth}@shefield.ac.uk Abstract. A principled approach to the design of program verification and construction tools is applied to separation logic. The control flow is modelled by power series with convolution as separating conjunction. A generic construction lifts resource monoids to assertion and predicate transformer quantales. The data flow is captured by concrete store/heap models. These are linked to the separation algebra by soundness proofs. Verification conditions and transformation laws are derived by equational reasoning within the predicate transformer quantale. This separation of concerns makes an implementation in the Isabelle/HOL proof assistant simple and highly automatic. The resulting tool is correct by construction; it is explained on the classical linked list reversal example. 1 Introduction Separation logic yields an approach to program verification that has received considerable attention over the last decade. It is designed for local reasoning about a system’s states or resources, allowing one to isolate the part of a system that an action affects from the remainder, which is unaffected. This capability is provided by the idiosyncratic separating conjunction operator together with the frame inference rule, which makes local reasoning modular. A key application is program verification with pointer data structures [21, 19]; but the method has also been used for modular reasoning about concurrent programs [17, 23] or fractional permissions [10]. Separation logic is currently supported by a large number of tools; so large that listing them is beyond the scope of this paper. Implementations in higher-order interactive proof assistants [24, 22, 8, 12] are particularly relevant to this article. In comparison to automated tools or tools for decidable fragments, they can express more program properties, but are less effective for proof search. Ultimately, an integration seems desirable. This article adds to this tool chain (and presents another implementation in the Isabelle/HOL theorem proving environment [16]). However, our approach is different in several respects. It focusses almost entirely on making the control flow layer as simple as possible and on separating it cleanly from the data flow layer. This supports the integration of various data flow models and modular reasoning about these two layers, with assignment laws providing and interface. To achieve this separation of concerns, we develop a novel algebraic approach to separation logic, which aims to combine the simplicity of original logical approaches [19] with the abstractness and elegance of O’Hearn and Pym’s categorical logic of bunched implications [18] in a way suitable for formalisation in Isabelle. Our approach is based 2 Brijesh Dongol, Victor B. F. Gomes, and Georg Struth on power series [7], as they have found applications in formal language and automata theory [4, 9]. Their use in the context of separation logic is a contribution in itself. In a nutshell, a power series is a function f : M → Q from a partial monoid M into a quantale Q. Defining addition of power series by lifting addition pointwise from the quantale, and multiplication as convolution X (f ⊗ g) x = f y ⊙ g z, x=y◦z it turns out that the function space QM of power series forms itself a quantale [7]. In the particular case that M is commutative (a resource monoid) and Q formed by the booleans B (with ⊙ as meet), one can interpret power series as assertions or predicates over M . Separating conjunction then arises as a special case of convolution, and, in fact, as a language product over resources. The function space BM is the assertion quantale of separation logic. The approach generalises to power series over program states modelled by store-heap pairs. This generalisation is needed for applications. Using lifting results for power series again, we construct the quantale-like algebraic semantics of predicate transformers over assertion quantales. We characterise the monotone predicate transformers and derive the inference rules of Hoare logic (without assignment) in generic fashion within this subalgebra. Furthermore, we derive the frame rule of separation logic on the subalgebra of local monotone predicate transformers. We use these rules for automated verification condition generation with our tool. Formalising Morgan’s specification statement [15] on the quantale structures, we obtain tools for program construction and refinement with a frame law with minimal effort. The predicate transformer semantics for separation logic, instead of the usual state transformer ones [5], fits well into the power series approach and simplifies the development. The formalisation of the algebraic hierarchy from resource monoids to predicate transformer algebras benefits from Isabelle’s excellent libraries for functions and, in particular, its integration of automated theorem provers and SMT-solvers via the Sledgehammer tool. These are optimised for equational reasoning and make the entire development mostly automatic. In addition, Isabelle’s reconstruction of proof outputs provided by the external tools makes our verification tools correct by construction. At the data flow level, we currently use Isabelle’s extant infrastructure for the store, the heap and pointer-based data structures. An interface to the control flow algebra is provided by the assignment and mutation laws of separation logic and their refinement counterparts. Isabelle’s data flow models are linked formally with our abstract separation algebra by soundness proofs. Algebraic facts are then picked up automatically by Isabelle for reasoning in the concrete model. The verification examples in the last section of this article show that, at this layer, proofs may require some user interaction, but a Sledgehammer-style integration of optimised efficient provers and solvers for the data flow is an avenue of future work. The entire technical development has been formalised in Isabelle; all proofs have been formally verified. For this reason we show only some example proofs which demonstrate the simplicity of algebraic reasoning. The complete executable Isabelle theories can be found online1 . 1 https://github.com/vborgesfer/sep-logic Principles for Verification Tools: Separation Logic 3 2 Partial Monoids, Quantales and Power Series This section presents the algebraic structures that underlie our approach to separation logic. Further details on power series and lifting constructions can be found in [7]. A partial monoid is a structure (M, ·, 1, ⊥) such that (M, ·, 1) is a monoid and x · ⊥ = ⊥ = ⊥ · x holds for all x ∈ M ∪ {1, ⊥}. We often do not mention ⊥ in definitions. A partial monoid M is commutative if x · y = y · x for all x, y ∈ M . Henceforth · is used for a general and ∗ for a commutative multiplication. A quantale is a structure (Q, ≤, ·, 1) such that (Q, ≤) is a complete lattice, (Q, ·) is a monoid and the distributivity axioms X X X X ( xi ) · y = xi · y, x·( yi ) = (x · yi ) i∈I i∈I P i∈I i∈I Q hold, where X denotes the supremum of a set X ⊆ Q. Similarly, we write X for the infimum of X, and 0 for the least and U for the greatest element of the lattice. The monotonicity laws x ≤ y ⇒ z · x ≤ z · y and x ≤ y ⇒ x · z ≤ y · z follow from distributivity. A quantale and partial if the Qmonoid is. It is Q underlying P P is commutative (x + yi ). In yi ) = i∈IP distributive if x ⊓ ( i∈I yi ) = i∈I (x ⊓ yi ) and x + ( i∈I P that case, the annihilation laws x · 0 = 0 = 0 · x follow from i∈∅ xi = ∅ = 0. A boolean quantale is a complemented distributive quantale. The boolean quantale B of the booleans, where multiplication coincides with join, is an important example. A power series is a function f : M → Q, from a partial monoid M into a quantale Q. For f, g : M → Q and a family of functions fi : M → Q, i ∈ I we define X X X (f · g) x = f y · g z, ( fi ) x = fi x. x=y·z i∈I i∈I The composition f · g is called convolution; the multiplication symbol is overloaded to be used on M , Q and the function space QM . The idea behind convolution is simple: element x is split into y and z, f y and g z are calculated in parallel, and their results are composed to form a value for the summation with respect to all possible splits of x. Because x ranges over M , the constant ⊥ ∈ / M is excluded as a value. Hence undefined splittings of x do not contribute to convolutions. In addition, (f +g) x = f x+g x arises as a special case of the supremum. Finally, we define the power series O : M → Q as O = λx. 0 and 1 : M → Q as 1 = λx. if (x = 1) then 1 else 0. The quantale structure lifts from Q to the function space QM of power series. Theorem 2.1 ([7]). Let M be a partial monoid. If Q is a boolean quantale, then so is (QM , ≤, ·, 1). If M and Q are commutative, then so is QM . The power series approach generalises from one to n dimensions [7]. For separation logic, the two-dimensional case with power series f : S × M → Q from set S and partial commutative monoid M into the commutative quantale Q is needed. Now X X X f (x, y1 ) ∗ g (x, y2 ), ( fi ) (x, y) = (f ∗ g) (x, y) = fi (x, y). y=y1 ∗y2 i∈I i∈I The convolution f ∗ g acts solely on the second coordinate. Finally, we define twodimensional units as O = λx, y. 0 and 1 = λx, y. if (y = 1) then 1 else 0. 4 Brijesh Dongol, Victor B. F. Gomes, and Georg Struth Theorem 2.2 ([7]). Let S be a set and M a partial commutative monoid. If Q is a commutative boolean quantale, then so is QS×M . We have implemented partial monoids and quantale by using Isabelle’s type class and local infrastructure for engineering mathematical structures, building on existing libraries for monoids, quantales and complete lattices. 3 Assertion Quantales In language theory, power series have been introduced for modelling formal languages. In that case, S is the free monoid X ∗ and Q can be taken as a semiring (Q, +, ·, 0, 1), because there are only finitely many ways of splitting words into prefix/suffix pairs in convolutions. In the particular case of the boolean semiring B, where · is conjunction, power series f : X ∗ → B are interpreted as characteristic functions or predicates that indicate whether or not a word is P in a set. Since, in this case, sets are languages, convolution specialises to (f · g) x = x=yz f x ⊓ g y, hence, identifying predicates with their extensions, to the language product p · q = {yz | y ∈ p ∧ z ∈ q}. More generally, we consider power series S → B from a partial monoid S into the boolean quantale B and set up the connection with separation logic. There, one is interested in modelling assertions or predicates over the memory heap. The heap can be represented abstractly by a resource monoid [5], which is simply a partial commutative monoid. In analogy to the language case, an assertion p of separation logic is a booleanvalued function from a resource monoid M , hence a power series p : M → B. Then Theorem 2.1 applies. Corollary 3.1. The assertions BM over resource monoid M form a commutative boolean quantale with convolution as separating conjunction. The logical structure of the assertion quantale BM is as follows. The predicate O is a contradiction whereas 1 holds of the empty resource and is false otherwise. The operations Σ and Π correspond to existential and universal quantification; their finite cases yield conjunctions and disjunctions. The order ≤ is implication. Convolution becomes X (p ∗ q) x = p y ⊓ q z. x=y∗z By x = y ∗ z, resource x is separated into resources y and z. By p y ⊓ q z, the value of predicate p on y is conjoined with that of q on z. Finally, the supremum is true if one of the conjunctions holds for some splitting of x. As for languages, one can again identify predicates with their extensions. Then p ∗ q = {y ∗ z ∈ M | y ∈ p ∧ z ∈ q}, and separating conjunction becomes a language product over resources. The analogy to language theory is even more striking when considering multisets over a finite set X as resources, which form the free commutative monoids over X. Applications of separation logic, however, require program states which are storeheap pairs. Now Theorem 2.2 applies. Principles for Verification Tools: Separation Logic 5 Corollary 3.2. The assertions BS×M over set S (the store) and resource monoid M form a commutative boolean quantale with convolution as separating conjunction. For all p, q : S × M → B, s ∈ S and h ∈ M , (p ∗ q) (s, h) = X p (s, h1 ) ⊓ q (s, h2 ). h=h1 ∗h2 Quantales carry a rich algebraic structure. Their distributivity laws give rise to continuity or co-continuity properties. Therefore, many functions constructed from the quantale operations have adjoints as well as fixpoints, which can be iterated to the first limit ordinal. This is well known in denotational semantics and important for our approach to program verification. In particular, separating conjunction ∗ distributes over arbitrary suprema in BM and BS×M and therefore has an upper adjoint: the magic wand operation −∗ , which is widely used in separation logic. In the quantale setting, the adjunction gives us theorems for the magic wand for free. One can think of the power series approach to separation logic as a simple account of the category-theoretical approach to O’Hearn and Pym’s logic of bunched implication [18] in which convolution generalises to coends and the quantale lifting is embodied by Day’s construction [6]. For the design of verification tools and our implementation in Isabelle, this simplicity is certainly an advantage. 4 Predicate Transformer Quantales Our algebraic approach to separation logic is based on predicate transformers (cf. [3]). This is in contrast to previous state-transformer-based approaches and implementations [5, 12, 22]. First of all, predicate transformers are more amenable to algebraic reasoning [3]—simply because their source and target types are similar. Second, the approach is more coherent within our framework. Predicate transformers can be seen once more as power series and instances of Theorem 2.1 describe their algebras. A state transformer fR : A → 2B is often associated with a relation R ⊆ A × B from set A to set B by defining fR a =S{b | (a, b) ∈ R}. It can be lifted to a function hRi : 2A → 2B defined by hRiX = a∈X fR a for all X ⊆ A. More importantly, state transformers are lifted to predicate transformers [R] : 2B → 2A by defining [R] Y = {x | fR x ⊆ Y } for all Y ⊆ B. The modal box and diamond notation is justified by the correspondance between diamond operators and Hoare triples as well as box operators and weakest liberal precondition operators in the context of modal semirings [14]. In fact we obtain the adjunction hRiX ⊆ Y ⇔ X ⊆ [R]Y from the above definitions. B Predicate transformers in (2A )2 form complete distributive lattices [3]. In the power series setting, this follows from Theorem 2.1 in two steps, ignoring the monoidal structure. Since B forms a complete distributive lattice, so do 2B ∼ = BA = BB and 2A ∼ A 2B in the first step, and so does (2 ) in the second one. 6 Brijesh Dongol, Victor B. F. Gomes, and Georg Struth A In addition, predicate transformers in (2A )2 form a monoid under function composition and the identity function as the unit. It follows that those predicate transformers form a distributive near-quantale, whereas the monotone predicate transformers in A (2A )2 , which satisfy p ≤ q ⇒ f p ≤ f q, form a distributive pre-quantale [3]. P P Here, near-quantale means a quantale where x · ( i∈I yi ) = i∈I (x · yi ), the left distributivity law, need not hold. We call pre-quantale a near-quantale in which the left monotonicity law x ≤ y ⇒ z · x ≤ z · y holds. In these cases, the monoidal parts of the lifting are not obtained with the power series technique because function composition is not a convolution. Adapting these results to separation logic requires the consideration of assertion quantales BM or BS×M with store S and resource monoid M instead of the powerset algebra over a set A. But these quantales can be lifted as boolean algebras—disregarding a convolution on predicate transformers, which is not needed for separation logic— and combined with the monoidal structure of function composition as previously. This yields the following result. Theorem 4.1. Let S be a set, M a resource monoid and BS×M an assertion quantale. The monotone predicate transformers over BS×M form a distributive pre-quantale. The proof requires showing that the predicate transformers over BS×M form a near quantale and checking that the monotone predicate transformers form a subalgebra of this near-quantale. In fact, the unit predicate transformer is monotone—which is the case—and that the quantale operations of suprema, infima and composition preserve monotonicity. This is implied by properties such as [R ∪ S] = [R] ⊓ [S], [R; S] = [R] · [S] = λx. [R] ([S] x). Monotone predicate transformers are powerful enough to derive the standard inference rules of Hoare logic as verification conditions (Section 5) and the usual rules of Morgan’s refinement calculus (Section 6). Derivation of the frame rule of separation logic, however, requires a smaller class of predicate transformers defined as follows. A state transformer f is local [5] if f (x∗y) ≤ (f x)∗{y} for x∗y 6= ⊥. Intuitively, this means that the effect of such a state transformer is restricted to a part of the heap; see [5] for further discussion. Analogously, we call a predicate transformer F local if (F p) ∗ q ≤ F (p ∗ q).p It is easy to show that the two definitions are compatible. Lemma 4.2. State transformer fR is local iff predicate transformer [R] is local. The final theorem in this section establishes the local monotone predicate transformers as a suitable algebraic framework for separation logic. Theorem 4.3. Let S be a set and M a resource monoid. The local monotone predicate transformers over the assertion quantale BS×M form a distributive pre-quantale. Once again it must be checked that the zero predicate transformer is local—which is the case—and that the quantale operations preserve locality and monotonicity. Principles for Verification Tools: Separation Logic 7 We have implemented the whole approach in Isabelle; all theorems have been formally verified, using mainly Theorem 2.1 for lifting to predicate transformers. An alternative Isabelle implementation of predicate transformers as lattices and Boolean algebras with operators is due to Preoteasa [20]. 5 Verification Conditions The pre-quantale of local monotone predicate transformers supports the derivation of verification conditions by equational reasoning. A standard set of such conditions are the inference rules of Hoare logic. For sequential programs, Hoare logic provides one inference rule per program construct. This suffices to eliminate the control structure of a program and generate verification conditions for the data flow. The quantale setting also guarantees that the finite iteration F ∗ of a predicate transformer is well defined. This supports a shallow algebraic embedding of a simple while language with the usual pseudocode for the verification of imperative programs. First we lift predicates to predicate transformers [3]: [p] = λq. p + q. With predicates modelled as relational subidentities, this definition is justified by the lifting from the previous section: (s, s) ∈ [p] q iff (s, s) ∈ p ⇒ (s, s) ∈ q. Second, we change notation, to use descriptive while program syntax for predicate transformers. We write skip for the quantale unit (the identity function) and ; for function composition. We encode the semantics of conditionals and while loops as if p then F else G fi = [p] · F + [p] · G, while p do F od = ([p] · F )∗ · [p]. Third, we provide the standard assertions notation for programs via Hoare triple syntax: {p} F {q} ⇔ p ≤ F q. Box notation shows that {p} [R] {q} ⇔ p ≤ [R]q for relational program R. Thus [R]q = wlp(R, q) is the standard weakest liberal precondition of program R and postcondition q. It also explains our slight abuse of relational or imperative notation for predicate transformers: e.g. we write [R]; [S] instead of [R] · [S] because the latter expression is equal to [R; S], as indicated in the previous section. Proposition 5.1. Let p, q, r, p′ , q ′ ∈ BS×M be predicates. Let F, G, H be monotone predicate transformers over BS×M , with H being local. Then the rules of propositional Hoare logic (no assignment rule) and the frame rule of separation logic are derivable. {p} skip {p}, ′ ′ ′ ′ p ≤ p ∧ q ≤ q ∧ {p } F {q } ⇒ {p} F {q}, {p} F {r} ∧ {r} G {q} ⇒ {p} F ; G {q}, {p ⊓ r} F {G} ∧ {p ⊓ r} G {q} ⇒ {p} if r then F else G fi {q}, {p ⊓ q} F {p} ⇒ {p} while q do F od {b ⊓ p}, {p} H {q} ⇒ {p ∗ r} H {q ∗ r}. 8 Brijesh Dongol, Victor B. F. Gomes, and Georg Struth Proof. We derive the frame rule as an example. Suppose p ≤ H q. Then, by isotonicity of ∗ and locality, p ∗ r ≤ (H q) ∗ r ≤ H(q ∗ r). ⊓ ⊔ The remaining derivations are equally simple and fully automatic in Isabelle. 6 Refinement Laws To demonstrate the power of the predicate transformer approach to separation logic we now outline its applicability to local reasoning in program construction and transformation. More precisely, we show that the standard laws of Morgan’s refinement calculus [15] plus an additional framing law for resources can be derived with little effort. It only requires defining one single additional concept—Morgan’s specification statement—which already exists in every predicate transformer quantale. Formally, for predicates p, q ∈ BS×M , we define the specification statement as X [[p, q]] = {F | p ≤ F q}. It models the most general predicate transformer or program which links postcondition q with precondition p. It is easy to see that {p} F {q} ⇔ p ≤ F q, which entails the characteristic properties {p} [[p, q]] {q} and {p} F {q} ⇒ F ≤ [[p, q]] of the specification statement: program [[p, q]] relates precondition p with postcondition q whenever it terminates; and it is the largest program with that property. It is easy to check that specification statements over the pre-quantale of local monotone predicate transformers are themselves local and monotone. Like Hoare logic, Morgan’s basic refinement calculus provides one refinement law per program construct. Once more we ignore assignments at this stage. We also switch to standard refinement notation with refinement order ⊑ being the converse of ≤. Proposition 6.1. For p, q, r, p′ , q ′ ∈ BS×M , and predicate transformer F the following refinement laws are derivable in the algebra of local monotone predicate transformers. p ≤ q ⇒ [[p, q]] ⊑ skip, ′ p ≤ p ∧ q ≤ q ′ ⇒ [[p, q]] ⊑ [[p′ , q ′ ]], [[0, 1]] ⊑ F, F ⊑ [[1, 0]], [[p, q]] ⊑ [[p, r]]; [[r, q]], [[p, q]] ⊑ if b then [[b ⊓ p, q]] else [[b ⊓ p, q]] fi, [[p, b ⊓ p]] ⊑ while b do [[b ⊓ p, p]] od, [[p ∗ r, q ∗ r]] ⊑ [[p, q]]. Proof. Using the frame rule, we derive the framing law as an example: {p} [[p, q]] {q} ⇒ {p ∗ r} [[p, q]] {q ∗ r} ⇔ [[p ∗ r, q ∗ r]] ⊑ [[p, q]] ⊓ ⊔ The proofs of the other refinement laws are equally simple, using the corresponding Hoare rules in their proofs. They are fully automatic in Isabelle. Principles for Verification Tools: Separation Logic 9 7 Principles of Tool Design The previous sections have introduced a new algebraic approach to separation logic based on power series and quantales with separating conjunction modelled algebraically as convolution, that is, a language product over resources. The theory hierarchy from partial monoids to predicate transformer quantales has been formalised in Isabelle/HOL, much of which was highly automatic and required only a moderate effort. It benefits, to a large extent, from Isabelle’s integrated first-order theorem proving, SMT-solving and counterexample generation technology. These tools are highly optimised for equational reasoning, interacting efficiently with the algebraic layer. algebra intermediate semantics concrete semantics control flow abstract data flow concrete data flow verification conditions - verification tools transformation laws - construction tools Fig. 1. Principles of Tool Design Another important feature is that the mathematical structures formalised in Isabelle are all polymorphic—their elements can have various types. Isabelle’s type classes and locales, which have been used for implementing mathematical hierarchies, then allow us to link these abstract algebras with various concrete models, that is, quantales with predicate transformers, predicate transformers with binary relations and functions which update program states. In particular, abstract resource monoids are linked with various concrete models for resources, including the heap. By formalising these soundness results in Isabelle, theorems are automatically propagated across classes and models. Those proved for quantales, for instance, become available automatically for predicate transformers over concrete detailed store-heap models. Finally, our development can build on excellent Isabelle libraries and decades-long experience in reasoning with functions and relations, all sorts of data structures and data types. In particular, for program construction and verification with separation logic, Isabelle provides support for reasoning with pointers and the heap [13, 24]. These features suggest a principled approach to program verification and construction in Isabelle in which the control flow layer is cleanly separated from the data flow layer. The control flow is modelled in a lightweight way within suitable algebras, which makes tool design fast, simple and automatic, including the development of verification conditions, transformation and refinement laws. Their application can then be automated by programming Isabelle tactics. The data flow can, by and large, rely on existing Isabelle libraries, which have previously been designed for verification purposes. The interface between these layers is provided, at an abstract level, by soundness theorems 10 Brijesh Dongol, Victor B. F. Gomes, and Georg Struth and, at the concrete level, by assignment laws and similar laws that link data and control. The approach has previously been applied to simple while programs [2] and the rely-guarantee approach [1]. Its basic features a summarised in Figure 1. For separation logic, the algebraic structures used are partial monoids, quantales and power series. The intermediate semantics is provided by predicate transformers over assertion quantales based on stores and resource monoids. The concrete models yield detailed descriptions of the store and heap. These are explained in the remaining sections of this article. 8 Integration of Data Flow This section describes the integration of the data flow layer into our Isabelle tools for program verification and construction. As previously mentioned, program states are store-heap pairs (s, h). Program stores are implemented in Isabelle as records of program variables, each of which has a retrieve and an update function. This approach is polymorphic and supports variables of any Isabelle type. For instance, Isabelle’s built-in list data type and list libraries can be used to reason about list-based programs. Heaps have been modelled in Isabelle as partial functions on N [13, 24]; they therefore have type nat → nat option. We implement assignments first as functions from states to states, (‘x := e) = λ(s, h). (x update s e, h), where ‘x is a program variable, x update the update function for ‘x, (s, h) a state and e an evaluated expression of the same type as ‘x. Separation logic also requires a notion of mutation or heap update. In Isabelle, it is first implemented in similar fashion as (@e := e′ ) = λ(s, h). (s, h[e 7→ e′ ]), where e and e′ are expressions that evaluate to natural numbers, and h[e 7→ e′ ] is the function that maps e to e′ and is the same as h for the remaining expressions. Secondly, we lift assignment and mutation functions to predicate transformers as [f ] = λq. q · f, where · denotes function composition, as usual. This is consistent with the definition of lifting in Section 4. As previously, we generally do not write the lifting brackets explicitly, identifying program pseudocode with predicate transformers to simplify verification notation. With this infrastructure in place we can prove Hoare’s assignment rule and Reynolds’ mutation rule for separation logic in the concrete heap model. Proposition 8.1. The following rules are derivable in the concrete store-heap model: p ≤ q[e/‘x] ⇒ {p} (‘x := e) {q}, {(e 7→ −) ∗ r} (@e := e′ ) {(e 7→ e′ ) ∗ r}, writing q[e/‘x] for the substitution of variable ‘x by expression e in q as well as e 7→ e′ and e 7→ − for the singleton heaps mapping e to e′ and to any value, respectively. Principles for Verification Tools: Separation Logic 11 The resulting set of inference rules for separation logic allows us to implement the Isabelle proof tactic hoare, which generates all verification conditions automatically and eliminate the entire control structure when the invariants of while loops are annotated. One can use the assignment rule to derive its refinement counterparts: p ≤ q[e/‘x] ⇒ [[p, q]] ⊑ (‘x := e), q ′ ≤ q[e/‘x] ⇒ [[p, q]] ⊑ [[p, q ′ ]]; (‘x := e), p′ ≤ p[e/‘x] ⇒ [[p, q]] ⊑ (‘x := e); [[p′ , q]]. The second and third laws are called the following and leading refinement law for assignments [15]. They are useful for program construction. We have derived analogous laws for mutation. We have also implemented the tactic refinement, which automatically tries to apply all the rules of this refinement calculus in construction steps of pointer programs. 9 Examples To show our approach at work, we present the obligatory correctness proof of the classical in situ linked-list reversal algorithm. The post-hoc verification of this algorithm in Isabelle has been considered before [13, 24]. However, we follow Reynolds [21], who gave an informal annotated proof, and reconstruct his proof step-by-step in refinement style. As usual for verification with interactive theorem provers, functional specifications are related to imperative data structures. The former are defined recursively and hence amenable to proof by induction. First, we define two inductive predicates on the heap. The first one creates a contiguous heap from a position e using Isabelle’s functional lists as its representation. That is, by induction on the structure of the list, e [7→] [ ] = emp, e [7→] (t#ts) = (e 7→ t) ∗ (e + 1 [7→] ts), where [ ] denotes the empty list, t#ts denotes concatenation of element t with list ts, e 7→ t is again a singleton heap predicate and emp states that the heap is empty. The second predicate indicates whether or not a heap, starting from position i, contains the linked list represented as a functional list: list i [ ] = (i = 0) ∧ emp, list i (j#js) = (i 6= 0) ∧ (∃k. i [7→] [j, k] ∗ list k js). This is Reynolds’ definition, it uses separating conjunction instead of plain conjunction. We can now reconstruct Reynolds’ proof relative to the standard recursive function rev for functional list reversal. The initial specification statement is [[list ‘i A0 , list ‘j (rev A0 )]], where A0 is the input list and ‘i and ‘j are pointers to the head of the list on the heap. 12 Brijesh Dongol, Victor B. F. Gomes, and Georg Struth [[ list ‘i A0 , list ‘j (rev A0 ) ]] ⊑ ‘j := 0; [[ ∃A B. (list ‘i A ∗ list ‘j B ) ∧ (rev A0 ) = (rev A) @ B, list ‘j (rev A0 ) ]] ⊑ ‘j := 0; while ‘i 6= 0 do [[(∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] od [[(∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ [[(∃a A B k. (‘i [7→] [a,k] ∗ list k A ∗ list ‘j B) ∧ (rev A0 ) = (rev (a#A)) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ ‘k := @(‘i + 1); [[(∃a A B. (‘i [7→] [a,‘k] ∗ list ‘k A ∗ list ‘j B) ∧ (rev A0 ) = (rev (a#A)) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ ‘k := @(‘i + 1); @(‘i + 1) := ‘j; [[(∃a A B. (‘i [7→] [a,‘j] ∗ list ‘k A ∗ list ‘j B) ∧ (rev A0 ) = (rev (a#A)) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ ‘k := @(‘i + 1); @(‘i + 1) := ‘j; [[(∃a A B. (list ‘k A ∗ ‘i [7→] [a,‘j] ∗ list ‘j B) ∧ (rev A0 ) = (rev (a#A)) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ ‘k := @(‘i + 1); @(‘i + 1) := ‘j; [[(∃a A B. (list ‘k A ∗ list ‘i (a#B) ) ∧ (rev A0 ) = (rev A) @ (a#B) ) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ ‘k := @(‘i + 1); @(‘i + 1) := ‘j; [[(∃A B. (list ‘k A ∗ list ‘i B) ∧ (rev A0 ) = (rev A) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ ‘k := @(‘i + 1); @(‘i + 1) := ‘j; ‘j := ‘i; [[(∃A B. (list ‘k A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B) ∧ ‘i 6= 0, ∃A B. (list ‘i A ∗ list ‘j B) ∧ (rev A0 ) = (rev A) @ B ]] ⊑ ‘k := @(‘i + 1); @(‘i + 1) := ‘j; ‘j := ‘i; ‘i := ‘k (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Fig. 2. In situ list reversal by refinement. The first block shows the refinement up to the introduction of the while-loop. The second block shows the refinement of the body of that loop. Principles for Verification Tools: Separation Logic 13 The main idea behind Reynolds’ proof is to split the heap into two lists, initially A0 and an empty list, and then iteratively swing the pointer of the first element of the first list to the second list. The full proof is shown in Figure 2; we now explain its details. In (1), we strengthen the precondition, splitting the heap into two lists A and B, and inserting a variable ‘j initially assigned to 0 (or null). The equation (rev A0 ) = (rev A) @ B then holds of these lists, where @ denotes the append operation on linked lists. Justifying this step in Isabelle requires calling the refinement tactic from Section 7, which applies the leading law for assignment. This obliges us to prove that the lists A and B de facto exist, which is discharged automatically by calling Isabelle’s force tactic. In fact, 8 out of the 10 proof steps in our construction are essentially automatic: they only require calling refinement followed by Isabelle’s force or auto provers. The new precondition generated then becomes the loop invariant of the algorithm. It allows us to refine our specification statement to a while loop in step (2), where we iterate ‘i until it becomes 0. Calling the refinement tactic applies the while law for refinement. From step (3) to (10), we refine the inside part of the while loop and do not display the outer part of the program. Because now ‘i 6= 0, the list A has at least an element a. We can thus expand the definition of list in step (3). Next, we assign the value pointed to by ‘i + 1 to ‘k—our first list now starts at ‘k and ‘i points to [a, ‘k]. Isabelle then struggles to discharge the generated proof goal automatically. In this predicate, the heap is divided in three parts. One needs to prove first that ‘i + 1 really points to the same value when considering just the first part of the heap or the entire heap. After that, the proof is automatic. Step (5) performs a mutation on the heap, changing the cell ‘i+1 to ‘j, consequently ‘i points now to [a, ‘j]. Because ∗ is commutative, we can strengthen the precondition accordingly in step (6). We now work backwards, folding the definition of list in step (7) and removing the existential of a in step (8). This step requires again interaction: we need to indicate to Isabelle how to properly split the heap. Lastly, to establish the invariant, we only need to swap the pointers ‘j to ‘i and ‘i to ‘k in steps (9) and (10). The resulting algorithm is highlighted in Figure 2. Using our tool we have also post-hoc verified this algorithm with separation logic in two different ways. The first one, previously taken by Weber [24], uses Reynolds’ list predicate, as we have used it in the above refinement proof. The second one follows Nipkow in using separating conjunction in the pre- and postcondition, but not in the definition of the list predicate. Since our approach is modular with respect to the underlying data model, it was straightforward to replay all the steps of Nipkow’s proof in our setting. The degree of proof automation with our tool is comparable for both proofs. Interestingly, however, none of the list reversal proofs have used the frame rule or its refinement counterpart. We have therefore tested this rule separately on a small example, where a verification without the frame rule would be difficult. The following Isabelle code fragment shows the Hoare triple used for verification. ⊢{ x [7→] [-, j] ∗ list j as } @x := a { x [7→] [a, j] ∗ list j as } Calling the hoare tactic for verification condition generation was sufficient for proving the correctness of this simple example automatically. Internally, the frame and the mutation rule have been applied. The Isabelle code for all these proofs is available online. 14 Brijesh Dongol, Victor B. F. Gomes, and Georg Struth In sum, our approach supports the program construction and verification of pointerbased programs with separation logic, but more case studies need to be performed to assess the performance of our tool. In the future, a Sledgehammer-style integration of optimised provers and solvers for the data level seems desirable for increasing the general degree of automation. 10 Conclusion A principled approach to the design of program verification and construction tools for separation logic with the Isabelle theorem proving environment has been presented. This approach has been used previously for implementing tools for the construction and verification of simple while programs [2] and rely-guarantee based concurrent programs [1]. It aims at a clean separation of concern between the control flow and the data flow of programs and focusses on developing a lightweight algebraic layer from which verification conditions or transformation and refinement laws can be developed by simple equational reasoning. In the case of while programs, this layer is provided by Kleene algebras with tests; in the rely-guarantee case, new algebraic foundations based on concurrent Kleene algebras were required. Our approach to separation logic uses a conceptual reconstruction of separation logic beyond a mere implementation as well, which forms a contribution in its own right. Though strongly inspired by abstract separation logic [5] and the logic of bunched implications [18], we aim at a different combination of simplicity and mathematical abstraction. In contrast to the logic of bunched implication, we use power series instead of categories, and in contrast to abstract separation logic we use predicate transformers instead of state transformers. These design choices allow us to use power series, quantales and generic lifting constructions throughout the approach, which leads to a small and highly automated Isabelle implementation. The main contribution of this approach is probably the view on separating conjunction as a notion of convolution and language product over resources. Our tool prototype has so far allowed us to verify some simple pointer-based program with a relatively high degree of automation. It is certainly a useful basis for educational and research purposes, but extension and optimisation beyond the mere proof of concept are desirable. This includes the consideration of error states [5] or of the cons and dispose operations, the development of more sophisticated proof tactics, and the integration of tools for automatic data-level reasoning in Sledgehammer style. Other opportunities for future work lie in the consolidation with previous approaches to predicate transformers in Isabelle [20], in a further abstraction of the control flow layer by defining modal Kleene algebras over assertion quantales [14] for which some Isabelle infrastructure already exists [11], in a combination with our rely-guarantee tool into RGSep-style tools for concurrency verification [23], and in the exploration of the language connection of separating conjunction in terms of representability and decidability results. Acknowledgements. We are grateful for support by EPSRC grant EP/J003727/1 and the CNPq. The third author would like to thank Tony Hoare, Peter O’Hearn and Matthew Parkinson for discussions on separation logic. Principles for Verification Tools: Separation Logic 15 References [1] A. Armstrong, V. B. F. Gomes, and G. Struth. Algebraic principles for rely-guarantee style concurrency verification tools. In C. B. Jones, P. Pihlajasaari, and J. Sun, editors, FM 2014, volume 8442 of LNCS, pages 78–93. Springer, 2014. [2] A. Armstrong, V. B. F. Gomes, and G. Struth. Lightweight program construction and verification tools in Isabelle/HOL. In D. Giannakopoulou and G. Salaün, editors, SEFM 2014, volume 8702 of LNCS, pages 5–19. Springer, 2014. [3] R.-J. Back and J. von Wright. Refinement calculus. Springer, 1999. [4] J. Berstel and C. Reutenauer. Les séries rationnelles et leurs langagues. Masson, 1984. [5] C. Calcagno, P. W. O’Hearn, and H. Yang. Local action and abstract separation logic. In LICS 2007, pages 366–378. IEEE Computer Society, 2007. [6] B. Day. On closed categories of functors. In Reports of the Midwest Category Seminar IV, volume 137 of Lecture Notes in Mathematics, pages 1–38. Springer, 1970. [7] B. Dongol, I. J. Hayes, and G. Struth. Convolution, separation and concurrency. CoRR, 2014. [8] A. Chlipala et al. Effective interactive proofs for higher-order imperative programs. In Graham Hutton and Andrew P. Tolmach, editors, ICFP 2009, pages 79–90. ACM, 2009. [9] M. Droste et al., editor. Handbook of Weighted Automata. Springer, 2009. [10] R. Bornat et al. Permission accounting in separation logic. In J. Palsberg and M. Abadi, editors, POPL 2005, pages 259–270. ACM, 2005. [11] W. Guttmann, G. Struth, and T. Weber. Automating algebraic methods in Isabelle. In S. Qin and Z. Qiu, editors, ICFEM 2011, volume 6991 of LNCS, pages 617–632. Springer, 2011. [12] G. Klein, R. Kolanski, and A. Boyton. Mechanised separation algebra. In L. Beringer and A. P. Felty, editors, ITP 2012, volume 7406 of LNCS, pages 332–337. Springer, 2012. [13] F. Mehta and T. Nipkow. Proving pointer programs in higher-order logic. Information and Computation, 199(1-2):200–227, 2005. [14] B. Möller and G. Struth. Algebras of modal operators and partial correctness. Theoretical Computer Science, 351(2):221–239, 2006. [15] C. Morgan. Programming from Specifications. Prentice-Hall, 1998. [16] T. Nipkow, L. C. Paulson, and M. Wenzel. Isabelle/HOL — A Proof Assistant for HigherOrder Logic, volume 2283 of LNCS. Springer, 2002. [17] P. W. O’Hearn. Resources, concurrency, and local reasoning. Theoretical Computer Science, 375(1-3):271–307, 2007. [18] P. W. O’Hearn and D. J. Pym. The logic of bunched implications. Bulletin of Symbolic Logic, 5(2):215–244, 1999. [19] P. W. O’Hearn, J. C. Reynolds, and H. Yang. Local reasoning about programs that alter data structures. In L. Fribourg, editor, CSL 2001, volume 2142 of LNCS, pages 1–19. Springer, 2001. [20] V. Preoteasa. Algebra of monotonic boolean transformers. In A. da S. Simão and C. Morgan, editors, SBMF 2011, volume 7021 of LNCS, pages 140–155. Springer, 2011. [21] J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, pages 55–74. IEEE Computer Society, 2002. [22] T. Tuerk. A Separation Logic Framework for HOL. PhD thesis, Computer Laboratory, University of Cambridge, 2011. [23] V. Vafeiadis. Modular Fine-Grained Concurrency Verificaiton. PhD thesis, Computer Laboratory, University of Cambridge, 2007. [24] T. Weber. Towards mechanized program verification with separation logic. In J. Marcinkowski and A. Tarlecki, editors, CSL 2004, volume 3210 of LNCS, pages 250– 264. Springer, 2004.
6cs.PL
KSR: A Semantic Representation of Knowledge Graph within a Novel Unsupervised Paradigm arXiv:1608.07685v6 [cs.LG] 16 Dec 2017 Han Xiao♠ State Key Lab. of Intelligent Technology and Systems, National Lab. for Information Science and Technology, Dept. of Computer Science and Technology, Tsinghua University, Beijing 100084, PR China [email protected]; ♠ Correspondence Author: http://www.semantics.top Abstract Knowledge representation is a long-history topic in AI, which is very important. A variety of models have been proposed for knowledge graph embedding, which projects symbolic entities and relations into continuous vector space. However, most related methods merely focus on the datafitting of knowledge graph, and ignore the interpretable semantic expression. Thus, traditional embedding methods are not friendly for applications that require semantic analysis, such as question answering and entity retrieval. To this end, this paper proposes a semantic representation method for knowledge graph (KSR), which imposes a two-level hierarchical generative process that globally extracts many aspects and then locally assigns a specific category in each aspect for every triple. Since both aspects and categories are semantics-relevant, the collection of categories in each aspect is treated as the semantic representation of this triple. Extensive experiments show that our model outperforms other state-of-the-art baselines substantially. 1 Introduction To facilitate the application of knowledge in statistical learning methods, continuous vectorial representations of entities/relations are necessary. Thus, knowledge graph embedding (KGE) is proposed to fulfill this motivation. Specifically, KGE represents a symbolic triple (h, r, t) as real-valued vector (h, r, t), each of which corresponds to head entity, relation and tail entity, respectively. Currently, a variety of embedding methods are emerging, including translation-based models such as TransE [Bordes et al., 2013] and many following variants, neural network based models such as NTN [Socher et al., 2013], generative models such as TransG [Xiao et al., 2016b] etc. As a major methodology of knowledge representation, translation-based models (e.g., TransE), adopt the principle of geometric translation, formally as h + r ≈ t. Intuitively, the corresponding objective aims at fitting the translation-based principle for knowledge representations by minimizing the data fitting error. Though these models have achieved great success, the representation of these models is still not semantically interpretable, which may be a major flaw and harm the potential applications. As a known fact, in the traditional methods, it is almost impossible to exactly extract the specific semantics from geometric points. For the example of TransE, the representation of “Table” is (0.82, 0.51, ...), which could hardly tell anything meaningful, such as being a furniture, being a daily tool, not an animal, etc. However, without semantics, the gap between knowledge and language remains, limiting the task of knowledge applications and natural language understanding (NLU). For an instance, in Freebase, Stanford University is represented as an abstract symbol “/m/06pwq”, while a semantically interpretable representation for this entity is more preferred as Stanford University = (University:Yes, Animal:No, Location: Palo Alto, ...). Such representation can be extremely useful in many areas, such as question answering over knowledge base. For example, there is a query “Which private university is famous in Palo Alto?”. First, the linguistic features such as University, Private and Palo Alto are extracted from the query. Then, by matching the linguistic features of query with the semantic knowledge representations such as (University:Yes, Type:Private, Location:Palo Alto,...), the answer of entity Stanford University is retrieved. In summary, knowledge benefits computational linguistics with our semantic representation. Notably, we introduce a term knowledge feature to describe some knowledge semantic aspects, such as being a university or not (University), geographical position (Location), etc. To semantically represent knowledge, our model leverages a two-level hierarchical generative process for entity/relation representations. In next paragraph, we introduce the principal idea of our model, that a novel unsupervised paradigm, exemplified in Figure 1. Applying this paradigm into knowledge representation, we propose our method KSR, which is specifically presented in Figure 2. Referring to Figure 1, there exists a question “How to categorize these objects?”. Addressed by the Shape of objects, two clusters are grouped as “Square(S)” and “Star(T)”, while focused on the feature Content, three clusters are generated as “Hallow(H)”, “Slash(L)” and “Solid(D)”. In summary, Shape and Content are the distinguished views for clustering, which are also called knowledge feature (i.e. Feature = View). By Figure 1: This figure illustrates the principal idea, described in Introduction. Simply, we leverage the cluster ambiguity in the manner of multi-view clustering to construct semantic representation. gathering the information of clusters in each view/feature, the semantic representations are formed. For the instance in the right-bottom figure, (S,D) indicates a solid square, where the first/second dimension corresponds to Shape/Content feature in a latent manner. Similarly as the above principal paradigm, our methodology leverages a two-level hierarchical generative process for semantic representation. Figure 2 illustratively exemplifies the generative process of our model. First, the first-level process generates many knowledge features/views with different semantics, such as University and Location. Then, the second-level process groups the entities/relations/triples, according to the corresponding semantic features/views. Last, summarizing the cluster identification within each feature/view, KSR constructs the semantic representation of knowledge elements. For the example of Tsinghua University, the Yes category (a.k.a cluster identification) is assigned for University feature, while the Beijing category (a.k.a cluster identification) is assigned for Location feature. By exploiting the multi-view clustering form, knowledge are semantically organized, as Tsinghua University = (University:Yes, Location:Beijing). It is noted that, cluster identification could be in various forms, and in this model, it is the membership degree for clusters (i.e. a probabilistic distribution), rather than the linguistic lexicons (e.g. Yes, Beijing, etc.). Besides, all the knowledge features (e.g. University) are latent concepts, such as the first dimension of learned vectors. This exemplified dimension corresponds to the semantics of University in a latent style rather than in a linguistic description. However, with the aid of entity description, we can easily map the latent features and categories into the human-readable words. Contributions: (1.) We have proposed a novel unsupervised paradigm for semantic representation, which leverages the ambiguity of clustering by multi-view methodology. (2.) Inspired by this novel paradigm, we have proposed a new Figure 2: This figure demonstrates the generative process of KSR from the clustering perspective. The original knowledge are semantically clustered from multiple views or knowledge features. Specifically, knowledge features such as Location, are generated from the first-level generative process, denoting the types of the clusters. The category such as Beijing in each knowledge feature, is generated from the second-level generative process. model to represent knowledge graph with good semantic interpretation. (3.) We have proposed a semantic method for entity retrieval with our knowledge representation, which provides a potential application for jointing knowledge and language. 2 Related Work TransE [Bordes et al., 2013] is a pioneering work for the translation-based methods, which translates the head entity to the tail one by the relation vector, formally as h + r ≈ t. This geometric principle has been adopted by many following works. The following variants transform entities into different subspaces, almost based on the same principle. ManifoldE [Xiao et al., 2016a] opens a classic branch, where the translation is applied based on a manifold. TransH [Wang et al., 2014] leverages the relation-specific hyperplane to embed the entities. TransR [Lin et al., 2015b] utilizes the relationrelated matrix to rotate the embedding space. Similar researches also contain TransG [Xiao et al., 2016b], TransA [Xiao et al., 2015], TransD [Ji et al., 2016] and TransM [Fan et al., 2014]. Further researches incorporate additional structural information into embedding. PTransE [Lin et al., 2015a] takes relation paths into account, simultaneously involving the information and confidence level of the path in knowledge graph. [Wang et al., 2015] leverages the rules to concentrate on the embeddings for the complex relation types such as 1-N, N1 and N-N. SSE [Guo et al., 2015] aims at analyzing the geometric structure of embedding topologies and then based on these discoveries, designs a semantically smoothing score function. Also, KG2E [He et al., 2015] involves Gaussian analysis to characterize the uncertain concepts of knowledge graph. [Zhong et al., 2015a] aligns the knowledge graph with the corpus and then jointly conducts knowledge and word embedding. However, the necessity of the alignment information limits this method both in performance and practice. Thus, [Zhong et al., 2015b] proposes a joint method that only aligns the freebase entity to the corresponding wiki-page. SSP [Xiao et al., 2017] extends the translation-based embedding methods from the triple-specific model to the TextAware model by encoding textual descriptions of entities. There are also some other work such as HOLE [Nickel et al., 2015], SE [Bordes et al., 2011], NTN [Socher et al., 2013] and RESCAL [Nickel et al., 2012], etc. 3 Methodology 3.1 Model Description We leverage a two-level hierarchical generative process to semantically represent the knowledge elements (entities/relations/triples) as follows. For each triple (h, r, t) ∈ ∆: (First-Level) Draw a knowledge feature fi from P(fi |r): 1. (Second-Level) Draw a subject-specific category zi from P(zi ) ∝ P(zi |h)P(zi |r)P(zi |t, fi ) 2. (Second-Level) Draw an object-specific category yi from P(yi ) ∝ P(yi |t)P(yi |r)P(yi |zi , fi ) In the above process, ∆ is the set of golden triples. All the parameters of P(fi |r), P(zi |h), P(zi |r), P(yi |t), P(zi |r), P(yi |r) are learned by the training procedure, and P(f ), P(h), P(r), P(t) are uniformly distributed, indicating that they can be safely omitted with simple mathematical manipulation. The head-specific category (zi ) and tail-specific category (yi ) are discriminated as the active and passive forms respectively, or the subject- and object-relevant expressions. For example, Shakespeare Did Write (subject-related) and Macbeth Was Written By (object-related) of (Shakespeare, Write, Macbeth) are semantically differentiated as subject- and objectspecific. Thus, it is better to sample the category from the head and tail entities of fact triples, respectively. However, for a single entity e, the subject- and objectcategory should be consistent, mathematically P (zi |e) = P (yi |e). Because, no matter the entity (e.g. Standford University) is a subject or an object, the semantics is identical. Also, it is noteworthy that the terms involved with relations are distinguished for being subject or objective, stated in the last paragraph. Regarding P(zi |yi , fi ), since one triple is too short to imply more facts, the head- and tail-specific semantics or both distributions over categories should be proximal enough to represent this exact triple fact. To this end, we constrain the category generation and impose a Laplace prior for the category distributions. Figure 3: The probabilistic graph of generative process. The outer navy plate corresponds to the first-level and the inner red one corresponds to the second-level. The specific form of each factor is introduced in Methodology. Firstly, we enforce that zi and yi correspond to the same category. Thus, the case that zi 6= yi is forbidden in our model, so P(zi |yi , fi ) = δzi ,yi ♠ . For the example of Location feature of the triple (Yangtze River, Event, Battle of Red Cliffs), we assume that the i-th feature is location. The situation where zi is location:China and yi is location:America, is not allowed in our model, because one triple is so short that it could only talk about one exact thing as usual. Thus, only the case such as “zi is location:China and yi is the same as zi (location:China)”, can be accepted. Secondly, as argued, the generative process should sample the same category for the subject- and object-specific positions, but with different probabilities. Formally, though zi = yi is guaranteed, due to P(zi |h, r, t) 6= P(yi |h, r, t), we should also discuss the corresponding sampling probabilities rather than the sampled category, which is the point of this paragraph. The difference between sampling probabilities and sampled items is illustrated in [Murphy, 2012]. For the example in last paragraph, if the head entity suggests the subject-specific location feature samples the category of China with probability 95% (P(zlocation = China) = 0.95) and America with 5% (P(zlocation = America) = 0.05), then the tail is supposed to suggest the object-specific feature to be sampled as China category with much higher probability than America, (P(ylocation = China)  P(ylocation = America)). We expect the head and tail could tell one exact story, so we should guarantee the coherence between the sampling distributions, or P(zi ) ≈ P(yi ). Thus, a Laplace prior is imposed to approximate both distributions, or mathi |t)| )δzi ,yi , ematically: P(zi |t, fi , σ) ∝ exp(− |P(zi )−P(y σ |P(zi )−P(yi )| P(yi |zi , fi , σ) ∝ exp(− )δzi ,yi , where σ is σ hyper-parameter for Laplace Distribution and P(zi ), P(yi ) are presented in the generative process. Figure 2 is the corresponding probabilistic graph model, with which we could work out the joint probability. Notably, as some statistical literature introduced, for brevity, we re♠ δzi ,yi is 1 only if zi = yi , otherwise, it is 0. [h, r, t, zk , yk |f =k , σ] = [zk |h][zk |r][yk |t][yk |r][zk , yk |f =k , r, σ] (1) F irst−Level:F eature M ixture }| z [h, r, t] = n X ( [f =k |σ] k=1 d X ) [h, r, t, zk=i , yk=j |f =k , σ] = i,j=1 . place P(a|b) = [a|b] . The formulation is presented with the equations of (1) and (2), n is the total knowledge feature number and d is the category number for each feature. Notably, the generative probability [h, r, t] of the triple (h, r, t) is our score function. It is natural to adopt the most possible category in the specific knowledge features as the semantic representation. Suggested by the probabilistic graph (Figure 3), the exactly inferred representation for an entity Se = (Se,1 , Se,2 , ..., Se,n ) or a relation Sr = (Sr,1 , Sr,2 , ..., Sr,n ) is Se,i = arg maxdc=1 [zi = c|e] and Sr,i = arg maxdc=1 [zi = c|r][yi = c|r]. 3.2 Objective & Training The maximum data likelihood principle is employed for training. We maximize the ratio of likelihood of the true triples to that of the false ones. Our objective is as follows♥ : X X ln[h, r, t] − ln[h0 , r0 , t0 ] (3) (h,r,t)∈∆ (h0 ,r 0 ,t0 )∈∆0 where ∆ is the set of golden triples and ∆0 is the set of false triples, generating from negative sampling. The specific formula of [h, r, t] is presented in the previous subsection (Equation 2) and all the unknown distribution parameters such as [zi |r] should be learned by SGD. This training procedure is very similar to that in [Xiao et al., 2016a]. As to the efficiency, theoretically, the time complexity of our training algorithm is O(nd) where n is the feature number and d is the category number for each feature. If nd ≈ d0 where d0 is the embedding dimension of TransE, our method is comparative to TransE in terms of efficiency while this condition is practically satisfied. In the real-word dataset FB15K, regarding the training time, TransE costs 11.3m and KSR costs 13.4m, which is almost the same. Also, for a comparison, in the same setting, TransR needs 485.0m and KG2E costs 736.7m. Note that TransE is almost the fastest embedding method, which demonstrates that our method is nearly the most efficient. 3.3 Analysis from the Clustering Perspective (Focus on Comprehensibility) Essentially, regarding the mixture form of Equations (1) and (2), our method takes the spirit of mixture model at both first♥ For numerical computation reasons, in fact, we optimize the Pn Pd lower bound of score function as k=1 [fk |σ]ln( i,j=1 [zk = i, yk = j|fk , σ][h, r, t|zk = i, yk = j, fk , σ]). ♠ =i zk is short for zk = i, and it is similar for other cases. Second−Level:Category M ixture n X z( [f =k |σ] k=1 d X }| [zk=i , yk=j |f =k , σ][h, r, t|zk=i , yk=j , f =k , σ] { ){ ♠ (2) i,j=1 and second-level, which could be further analyzed from the clustering perspective. The second-level generative process clusters the knowledge elements (entities/relations/triples) according to knowledge feature/view. These features/views stem from the first-level process, mathematically according to all the probabilistic terms involved with f =i . Furthermore, the first-level generative process adjusts different knowledge feature spaces with the feedback from the second-level. Mathematically, the feed-back corresponds to [z1...n , y1...n , f |h, r, t]. In essence, knowledge are semantically organized in a multi-view clustering form, Thus, by modeling the multi-view clustering nature, KSR is semantically interpretable. According to Figure 2, the knowledge features are generated from the first-level process, which means discovering different features/views for clustering. Then, in each knowledge feature, a specific category is assigned for every entity/relation/triple, which is the second-level process. And this process is equivalently explained as calculating the cluster identifications by grouping entities/relations in different features/views. Last, summarizing the cluster identification within each feature/view, KSR constructs the semantic representation of knowledge elements. For example, Tsinghua University belongs to Yes cluster in University feature/view and belong to Beijing cluster in Location feature/view. In summary, our model represents this entity semantically, as Tsinghua University = (University:Yes, Location: Beijing). 4 4.1 Experiments Experimental Settings Datasets. Our experiments are conducted on public benchmark datasets that are the subsets of Freebase. About the statistics of these datasets, we refer the readers to [Xiao et al., 2016a] and [Xie et al., 2016]. The entity descriptions of FB15K are the same as DKRL [Xie et al., 2016], each of which is a small part of the corresponding wiki-page. Implementation. We implemented TransE, TransH, TransR, TransG and ManifoldE for comparison, we directly reproduce the claimed results with the reported optimal parameters. The optimal settings of KSR are the learning factor α = 0.01, margin γ = 2.5 and Laplace hyper-parameter σ = 0.04. For a fair comparison within the same parameter quantity, we adopt three settings for dimensions: S1(n = 10, d = 10), S2(n = 20, d = 10) and S3(n = 90, d = 10) where n denotes the number of knowledge features and d indicates the number of semantic categories. We train the model until convergence but stop at most 2,000 rounds. However, regarding TransG and ManifoldE, which are trained Table 1: Evaluation results of Entity Classification. Metrics Random TransE TransH TransR ManifoldE KSR(S1) KSR(S2) KSR(S3) T@25 39.5 82.7 82.2 82.4 86.4 90.7 91.4 90.2 T@50 30.5 77.3 71.5 76.8 82.2 85.6 87.6 86.1 T@75 26.0 74.2 71.4 73.6 79.6 83.3 85.1 83.1 Table 2: Evaluation results of Knowledge Graph Completion. FB15K Methods TransE TransH KSR(S1) HOLE KSR(S2) TransR KG2E TransG∗ ManifoldE∗ KSR(S3) MRR (Filter) Head Tail 35.6 40.1 33.9 39.1 36.5 42.6 37.8 44.2 25.1 30.0 34.2 40.0 40.0 45.5 HITS@10(%) Raw Filter 48.5 66.1 45.7 64.4 51.2 70.4 73.9 52.6 75.8 48.2 68.7 47.5 71.5 53.1 79.7 52.1 79.8 52.9 82.1 more than 10,000 rounds for convergence, we have re-trained these models within 2,000 rounds for a fair comparison. 4.2 Entity Classification Motivation. To testify our semantics-specific performance, we conduct the entity classification prediction. Since the entity type such as Human Language, Artist and book Author represents some semantics-relevant sense, thus this task could justify KSR indeed addressed the semantic representation. Regarding Evaluation Protocol, please refer to [Xiao et al., 2017]. Results. Evaluation results are reported in Table 1, noting that S1, S2 and S3 means different settings for knowledge features and semantic categories. We could observe that: KSR outperforms all the baselines in a large margin, demonstrating the effectiveness of KSR. Entity types represent some level of semantics, thus the better results illustrate that our method is indeed more semantics-specific. 4.3 Knowledge Graph Completion Motivation. This task is a benchmark task, a.k.a “Link Prediction”, which concerns the identification ability for triples. Many NLP tasks could benefit from Link Prediction, such as relation extraction [Hoffmann et al., 2011]. Regarding Evaluation Protocol, please refer to [Xiao et al., 2016b]. ∗ These models are retrained within 2,000 rounds for a fair comparison. Results. Evaluation results are reported in Table 2, we could observe that: (1) KSR outperforms all the baselines substantially, justifying the effectiveness of our model. Theoretically, the effectiveness originates from the semanticsspecific modeling of KSR. (2) Within the same parameter scale (i.e., the number of total parameters in these models are comparable), compared to TransE, KSR improves 6.5% relatively, while compared to TransR, KSR improves 19.5%. The comparison illustrates KSR benefits from high-dimensional settings on knowledge features and categories. 4.4 Semantic Analysis: A Case Study We conduct a case study to analyze the semantics of our model. For brevity, we explore the FB15K datasets with KSR (n = 10, d = 3) which employs 10 knowledge features and for each feature assigns 3 categories. In fact, FB15K is more complex to approach than this setting, thus many minor features and categories have to be suppressed. The consideration of this setting is to facilitate visualization presentation. First, we analyze the specific semantics of each feature. We leverage the entity descriptions to calculate the joint probability by the corresponding occurrence number of word w in the textual descriptions of an entity e and the inferred feature-category Se,i of that entity. There=j =c fore, P [w , zi ] ∝ # {∃e ∈ E, wj ∈ De ∧ Se,i = c} = δ e∈E wj ∈De and Se,i =c , where De is the set of words in the description of entity e, and regarding Se,i the reader could refer to the subsection of Model Description. Then, we list the significant words in each category for each feature. In this way, the semantics of features and categories could be explicitly interpreted. We directly list the results in Table 3. There are six significant features, which are presented with categories and significant words as evidence. This result strongly justifies our motivation of KSR. Notably, the other four features are too vague to be recognized, because KSR is a latent space method similar to LDA. Finally, we present the semantic representations for three entities of different types: Film, Sport and Person. (1.) (Star Trek) = (Film:Related, American:Related, Sports:Unrelated, Person:Unrelated, Location :Unrelated, Drama:Related). Star Trek is a television series produced in American. Thus our semantic representations are quite coherent to the semantics of the entity. (2.) (Football Club Illichivets Mariupol) = (Film:Unrelated, American:Unrelated, Sports:Related, Art:Unrelated, Persons:Multiple, Location:Related). Its textual description is “Football Club Illichivets Mariupol is a Ukrainian professional football club based in Mariupol”, which is accordant with the semantic representation. Note that, football club as a team is composed by multiple persons, which is the reason for Multiple Persons Related. (3.) (Johnathan Glickman)=(Film:Related, American:Unrelated, Sports:Unrelated, Art:Unrelated, Person:Single, Location:Unrelated). This person is a film producer, while we could not search out any nationality information about this person, but our semantic representation could still be interpretable. Finally, we also present the semantic representations for relation. For example, (Country Capital) = (Film:Unrelated, Table 3: Features with Significant Semantics in Semantic Analysis. Notably, No corresponds to other meaningless or uninterpreted words, such as Is, The, Of, Lot, Good, Well, ... No. Features Categories (Significant Words) 1 Film Yes (Film, Director, Season, Writer), Yes (Awarded, Producer, Actor), No 2 American No, No, Yes (United, States, Country, Population, Area) 3 Sports No, No, Yes (Football, Club, League, Basketball, World Cup) 4 Art Yes(Drama, Music, Voice, Acting), Yes (Film, Story, Screen Play), No 5 Persons No, Multiple (Team, League, Roles), Single(She, Actress, Director, Singer) 6 Location Yes (British, London, Canada, Europe, England), No, No Film is highly correlated with Art and Person, which is accordant with our common knowledge. Location indicates the geographical position outside U.S., thus it is loosely related to American. 4.6 Figure 4: The heatmap of correlations between knowledge features in KSR. Darker color indicates higher correlation. American:Unrelated, Sports:Unrelated, Art:Unrelated, Person:Unrelated, Location:Related). As a common sense, a capital is a location, not sports or art, thus our semantic representations are reasonable. 4.5 Semantic Analysis: Statistic Justification We conduct statistical analysis in the same setting as the previous subsection. Firstly, we randomly select 100 entities and manually check out the correctness of semantic representations by common knowledge. There are 68 entities, the semantic representations for which are totally correct and also 19 entities, the representations for which are incorrect at only one feature. There are just 13 entities in which the corresponding representations are incorrect at more than one feature. Thus, the result proves the strong semantic expressive ability of KSR. Secondly, if two features (both with category Yes) co-occur in a semantic representation of an entity/relation, this knowledge element (entity/relation) contributes to the correlation between the two features. We make a statistics of the correlation and draw a heatmap in Figure 4, where the darker color corresponds to higher correlation. Looking into the details, those Sports:Related entities would distribute all over the world, so they are almost American:Unrelated. The result shows that correlation between the two features is loose. Entity Retrieval In this subsection, we motivate an application of language processing with semantic knowledge representation. Simply, given a sentence regarded with an entity, the task is to retrieve the specific entity. According to section 4.4, we have obtained the joint distribution of [w, zi ]. As to a specific sentence as s = (w1 , w2Q , ...wn ), we employ a naive Bayesian n assumption:[s, zi ] = t=1 [w=wt , zi ], and take [zi |s] as the semantic representation of this sentence. Last, we retrieve the entity with the cosine similarity between the semantic representations of sentence and entities. Totally, there are three sub-tasks: single factoid, multiple factoid and inferential factoid. Single factoid task deals with the descriptions which recall only one entity. There list some cases. (1.) Who proposes the Relativity Theory? Albert Einstein. (2.) Which company is best at Multi-Media? Adobe Systems Incorporated. (3.) What is the Chinese province with capital Taiyuan? Shan-Xi. Multiple factoid task processes the sentences which involve several entities. There list some cases. (1.) Which provinces are the neighbor of Beijing? Tianjin, Hebei. (2.) Which countries are the neighbor of China? Burma, Vietnam, India. Inferential factoid task requires strong reasoning ability, which means the answer is not a direct snip of current corpus. There lists one case. (1.) The people in which Chinese province are richest? Macao, Su-Zhou, Hong Kong, JiangSu, Zhe-Jiang. The results of entity retrieval demonstrates the potentials of semantic representations, which are founded on the effectiveness of KSR. This method provides a potential for jointing knowledge and language. 5 Conclusion We propose a new model for Knowledge Semantic Representation (KSR), which is a two-level hierarchical generative process to semantically represent knowledge. The model is able to produce interpretable representations. We also evaluate our method with extensive studies. Experimental results justify the effectiveness and the capability of semantic expressiveness. References [Bordes et al., 2011] Antoine Bordes, Jason Weston, Ronan Collobert, Yoshua Bengio, et al. Learning structured embeddings of knowledge bases. In Proceedings of the Twenty-fifth AAAI Conference on Artificial Intelligence, 2011. [Bordes et al., 2013] Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in Neural Information Processing Systems, pages 2787–2795, 2013. [Fan et al., 2014] Miao Fan, Qiang Zhou, Emily Chang, and Thomas Fang Zheng. Transition-based knowledge graph embedding with relational mapping properties. In Proceedings of the 28th Pacific Asia Conference on Language, Information, and Computation, pages 328–337, 2014. [Guo et al., 2015] Shu Guo, Quan Wang, Bin Wang, Lihong Wang, and Li Guo. Semantically smooth knowledge graph embedding. In Proceedings of ACL, 2015. [He et al., 2015] Shizhu He, Kang Liu, Guoliang Ji, and Jun Zhao. Learning to represent knowledge graphs with gaussian embedding. In Proceedings of the 24th ACM International on Conference on Information and Knowledge Management, pages 623–632. ACM, 2015. [Hoffmann et al., 2011] Raphael Hoffmann, Congle Zhang, Xiao Ling, Luke Zettlemoyer, and Daniel S Weld. Knowledge-based weak supervision for information extraction of overlapping relations. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies-Volume 1, pages 541–550. Association for Computational Linguistics, 2011. [Ji et al., 2016] Guoliang Ji, Shizhu He, Liheng Xu, Kang Liu, and Jun Zhao. Knowledge graph embedding via dynamic mapping matrix. 2016. [Lin et al., 2015a] Yankai Lin, Zhiyuan Liu, and Maosong Sun. Modeling relation paths for representation learning of knowledge bases. Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing (EMNLP). Association for Computational Linguistics, 2015. [Lin et al., 2015b] Yankai Lin, Zhiyuan Liu, Maosong Sun, Yang Liu, and Xuan Zhu. Learning entity and relation embeddings for knowledge graph completion. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, 2015. [Murphy, 2012] Kevin P Murphy. Machine learning: a probabilistic perspective. MIT press, 2012. [Nickel et al., 2012] Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. Factorizing yago: scalable machine learning for linked data. In Proceedings of the 21st international conference on World Wide Web, pages 271–280. ACM, 2012. [Nickel et al., 2015] Maximilian Nickel, Lorenzo Rosasco, and Tomaso Poggio. Holographic embeddings of knowledge graphs. arXiv preprint arXiv:1510.04935, 2015. [Socher et al., 2013] Richard Socher, Danqi Chen, Christopher D Manning, and Andrew Ng. Reasoning with neural tensor networks for knowledge base completion. In Advances in Neural Information Processing Systems, pages 926–934, 2013. [Wang et al., 2014] Zhen Wang, Jianwen Zhang, Jianlin Feng, and Zheng Chen. Knowledge graph embedding by translating on hyperplanes. In Proceedings of the TwentyEighth AAAI Conference on Artificial Intelligence, pages 1112–1119, 2014. [Wang et al., 2015] Quan Wang, Bin Wang, and Li Guo. Knowledge base completion using embeddings and rules. In Proceedings of the 24th International Joint Conference on Artificial Intelligence, 2015. [Xiao et al., 2015] Han Xiao, Minlie Huang, Yu Hao, and Xiaoyan Zhu. TransA: An adaptive approach for knowledge graph embedding. arXiv preprint arXiv:1509.05490, 2015. [Xiao et al., 2016a] Han Xiao, Minlie Huang, and Xiaoyan Zhu. From one point to a manifold: Knowledge graph embedding for precise link prediction. In Proceedings of the 25th International Joint Conference on Artificial Intelligence, 2016. [Xiao et al., 2016b] Han Xiao, Minlie Huang, and Xiaoyan Zhu. TransG : A generative model for knowledge graph embedding. In Proceedings of the 29th international conference on computational linguistics. Association for Computational Linguistics, 2016. [Xiao et al., 2017] Han Xiao, Minlie Huang, Lian Meng, and Xiaoyan Zhu. SSP: Semantic space projection for knowledge graph embedding with text description. In Proceedings of the THIRTY-FIRST AAAI Conference on Artificial Intelligence, 2017. [Xie et al., 2016] Ruobing Xie, Zhiyuan Liu, Jia Jia, Huanbo Luan, and Maosong Sun. Representation learning of knowledge graphs with entity descriptions. 2016. [Zhong et al., 2015a] Huaping Zhong, Jianwen Zhang, Zhen Wang, Hai Wan, and Zheng Chen. Aligning knowledge and text embeddings by entity descriptions. In Proceedings of EMNLP, pages 267–272, 2015. [Zhong et al., 2015b] Huaping Zhong, Jianwen Zhang, Zhen Wang, Hai Wan, and Zheng Chen. Aligning knowledge and text embeddings by entity descriptions. In Proceedings of EMNLP, pages 267–272, 2015.
2cs.AI