Alain Desdoigts
email: adesdoigts@free.fr.

Fernando Jaramillo
email: fer-nando.jaramillo71@urosario.edu.co.

Micael Castanheira

Simon Gilchrist

Paolo Guarda

Fabien Moizeau

Jean- Philippe Tropeano

Trade, demand spillovers, and industrialization: The emerging global middle class in perspective

Keywords: Trade, demand spillovers, and industrialization: The emerging global middle class in perspective Trade, Spillovers, Nonhomothetic preferences, World income distribution JEL classification: F10, O11, O14

published or not. The documents may come

Introduction

Brazil, Russia, India and China (BRIC) form the core of an emerging global middle class. In this paper, we investigate how a global middle class may influence trade flows of goods and services and the pattern of global production. We focus on international demand spillovers which contribute to expand production and achieve increasing returns to scale. Much as technical externalities propagate increasing returns across industries and national borders, global demand spillovers may also generate such effects. There are potential benefits to the world economy from the emergence of a large number of consumers whose tastes will change as their living standards catch up with those in advanced nations. According to the World Bank, the emergence of a global middle class will cause a major change in the demand for goods, creating huge markets 1 . A new age of mass consumption is likely to accompany the next wave of globalization.

Conversely, the emergence of BRIC countries on the international economic scene poses a challenge to both advanced nations and smaller emerging countries. If China's economic performance is in line with the Japanese integration experience, the size of the former will have a particularly important impact on the modernization or decline of industrial activities across regions of the globe (see Winters and Yusuf 2007). Competition spans increasingly diversified activities. The sheer size of these newcomers means that these spillover effects may dwarf the comparison with either Japan or South Korea.

On the one hand, trade theory traditionally concentrates on the supply side. One standard assumption is that preferences are identical across trade partners and homothetic, i.e., as income increases, consumption of each good increases proportionately. As a result, demand-side effects are neutralized as 1 Their last projections are eloquent (see Global Economic Prospects 2007, Chapter 3, p. 69): "In 2030, 16.1 percent of the world population will belong to what can be called a 'global middle class' up from 7.6 percent in 2000. That is, in 2030 more than a billion people in developing countries will buy cars, engage in international tourism, demand world-class products... Compare that with only 400 million people in developing countries who had access to these kinds of living standards in 2005... This large middle class will create rapidly growing markets for international products and services..." a determinant of the composition of trade. This is in contradiction to the stylized facts. In reality, differences in purchasing power lead different goods to be consumed (see, among others, [START_REF] Francois | Aggregate demand shifts, income distribution, and the Linder hypothesis[END_REF][START_REF] Francois | Aggregate demand shifts, income distribution, and the Linder hypothesis[END_REF]Dalgin, Mitra, andTrindade 2004).

On the other hand, there is a long tradition in development economics, going back to the parable of the shoe factory by Rosentein-Rodan (1943), that emphasizes how a positive sectoral shock may stimulate the development of other sectors through market-size externalities linked to increasing returns to scale. However, it was not until the end of the Eighties that Rosentein-Rodan's arguments describing economic development as a virtuous circle driven by external economies, were formalized by Murphy et al. in two companion papers (1989a,b). In the first paper, they model the socalled 'big push' which produces industrial modernization as the outcome of coordinated investments which propagate increasing returns across industries. In the second paper (henceforth MSV), pecuniary externalities work via the buying power of the middle class to eventually determine the extent of horizontal complementarity across all industries of the economy. In the words of Matsuyama (1995, p. 703): "... Suppose the [middle class] increases its demand for monopolistically competitive goods... Because prices exceed marginal costs, such a shift in demand would increase the level of monopoly profits in the economy and thus national income. This increased income would generate additional demand for monopolistically competitive goods, which further raises profits and income and so on..."

This kind of argument which captures how 'one thing leads to another', does not generalize directly to an integrated world economy. Our contribution focuses on such a form of complementarity and allows domestic demand to potentially spill over to any rival foreign industry, giving rise to a global profit-multiplier process. In MSV, such a multiplier is limited to the home market and determined only by the size of the domestic middle class. We extend their closed-economy general equilibrium model to a two-country framework where goods produced in both countries are substitutes and differentiated by their country of origin. According to the relative size of the domestic markets and the competitiveness of home and foreign rival firms, each product may be produced domestically under internal increasing returns by a monopolist or by a competitive fringe under constant returns to scale. Eventually, the magnitude and direction of international demand spillovers determine the strength of increasing returns and as a result, the importance of the cumulative processes in each country2 .

The market size for each good depends on the number of agents that can purchase it, which itself depends on the distribution of purchasing power both across and within trade partners. Under free trade, the domestic middle class is a relative notion which is not internationally comparable. A middle class household in its own country may be rich enough to belong to the upper class of the world income distribution. Conversely, a household may be rich by national standards but belong to the global middle class. In a closed economy, all profits and wages distributed to the domestic middle class return as demand addressed to the home industries. By opening to trade, they become a component of demand for either the home good or the substitute produced abroad, depending on the level of international competitiveness. This, in turn, affects real national incomes and welfare. Thus international trade leads the global middle class purchasing power to interact with increasing returns making them stronger or weaker depending upon asymmetries in domestic income distribution, labor efficiency, and labor force size.

First, we show that export-competing industries in the unequal country can take advantage of the larger middle class in the more egalitarian trade partner, so that trade integration tends to equalize average income of trade partners who differ only in their income distribution.

Secondly, when trade partners differ only in their labor efficiency, free trade exacerbates international disparities in real average income and makes increasing returns weaker in the technically backward country which might be tempted to revert to autarky. This dampens the local market-size externalities' argument by MSV and revives the argument for protection. The intuition behind this pattern is easy to grasp. First, terms of trade must adjust to reflect labor efficiency differences, penalizing the ability of firms in the lagging country to compete in the global market. Secondly, the top-middle class of the lagging country becomes the bottom-middle class in the global context. A large proportion of its consumers becomes a source of increasing returns in the advanced country, boosting production in the area of goods with lower income elasticities of demand. In the lagging country, the higher advanced country's middle class purchasing power benefits sectors producing goods with relatively higher income elasticities of demand and mostly subject to constant returns to scale. Examples we have in mind concern the toy industry in China and tourism.

Thirdly, we explore how worldwide demand complementarities influence trade patterns and industrialization between countries differing only in the size of their labor force. We show that trade integration favors the small economy because international demand spillovers lead the large country's middle class buying power to strengthen increasing returns in the small trade partner's industries.

Finally, we investigate the consequences of a technically backward trade partner narrowing its technological gap under the free trade regime, as well as trade between a large emerging country and a smaller industrialized country. Technological catch-up yields a decline in export prices in the emerging country's firms which become relatively more competitive. A larger variety of goods is produced under increasing returns because of the increased buying power of the emerging global middle class, brought about by lower prices. Eventually, demand complementarities propagate increasing returns across national boundaries, so that the rise in average productivity in the emerging country spills over to those industries in the advanced country which produce goods with high income elasticities of demand.

To our knowledge, the papers most closely related to our study are those by [START_REF] Matsuyama | A Ricardian model with a continuum of goods under nonhomothetic preferences: demand complementarities, income distribution, and North-South trade[END_REF] and [START_REF] Mitra | Inequality and trade[END_REF]. Matsuyama incorporates international demand complementarities in a Ricardian model à la Dornbusch et al. (1977), i.e., with a continuum of industries. The assumed pattern of comparative advantage leads the technological leader to completely specialize in goods with higher income elasticities of demand, whereas the developing country exports more basic goods. Matsuyama then discusses the impact of market size and technology differences on trade flows. However, by adopting a Ricardian framework, he considers neither international competition nor demand complementarities as a source of increasing returns. The same limitation applies to Mitra and Trindade's contribution. They adopt a 2 × 2 Heckscher-Ohlin framework where trade partners are identical in every respect except for their income distribution. With homothetic preferences, this means that a move from autarky to free trade has no consequence on either trade partners. With non-homothetic preferences though, the more unequal (equal) country has a higher demand for labor-(capital-) intensive good which, by assumption, is characterized by a lower (higher) income elasticity of demand. This yields 'specialization in consumption, not production'.

One implication of increasing returns to scale for international trade is the possibility of losses from trade for one country therefore justifying protection. This argument was introduced into the trade literature by [START_REF] Graham | Some aspects of protection further considered[END_REF], and formalized by [START_REF] Ethier | Decreasing costs in international trade and Frank Graham's argument for protection[END_REF] in a two-country (alike in every respect except for size), two-sector model in which one is subject to increasing returns and the other to constant returns to scale. Our paper is also related to that strand of the literature which deals with increasing returns and gains from trade as covered by [START_REF] Helpman | Increasing returns, imperfect markets, and trade theory[END_REF] and [START_REF] Helpman | Market Structure and Foreign Trade[END_REF]. It examines the impact of demand for the goods produced under increasing returns on gains from trade, by combining internal increasing returns and trade in differentiated goods. Note first that this rules out perfect competition and thus differs from Ethier's setting which considers trade in homogeneous goods and external increasing returns to scale. Secondly, in contrast to the trade literature dealing with differentiated goods under monopolistic competition and the home market effect of [START_REF] Krugman | Scale economies, product differentiation, and the pattern of trade[END_REF], there will be no trade-off between increasing returns and the number of varieties produced by the domestic industry. Our variable of interest is not the implicit zero-profit number of firms in each industry, but the profits realized in each industry. A larger market for a particular industry is not synonymous with more firms, it rather yields higher profits which translate into a larger multiplier.

Lastly, [START_REF] Hirschman | The Strategy of Economic Development[END_REF] concept of backward and forward linkages is very much related to Rosentein-Rodan's (1943) ideas in that it also involves the interaction between market size and increasing returns to scale arising from externalities. Until recently, their arguments suffered from a lack of interest by the profession (see [START_REF] Krugman | Development, Geography, and Economic Theory[END_REF]. In this respect, it is worth pointing out another line of research pioneered by [START_REF] Rodríguez-Clare | Multinationals, linkages, and economic development[END_REF] who offers a formal treatment in a two-country model of Hirschman's linkages by focusing on their generation by multinationals.

The paper proceeds as follows. Section 2 presents the model. Section 3 describes the world general equilibrium under free trade. Our main results are derived in Section 4, where we analyze the impact of asymmetries in, successively, (i) income inequality, (ii) labor efficiency, and (iii) labor force size on the global industrial activity and trade patterns. Finally, in Section 5, we investigate the impact of a change in labor efficiency, extending our analysis to free trade between an industrialized country and a larger emerging country, e.g., US versus China. Section 6 concludes.

The model

Our model is a two-country framework, 1 and 2, where subscripts i and j are used as non specific references to 1 and 2 ({i, j} = {1, 2}). When two subscripts are attached to a variable, the former identifies the country of origin of the good while the latter denotes the country in which it is consumed.

Preferences

Households are heterogeneous with respect to the utility they incur from buying the domestic or foreign variety of a given good. We follow the ideal product approach (see [START_REF] Lancaster | Variety, Equity, and Efficiency[END_REF]) and attach a value m i to each household which measures the utility from purchasing a good produced in country i. It is assumed that m 1 = m is a random variable from a uniform distribution on the interval (0, 1] and m 2 = 1 -m.

We define a utility function of a type-m household over an infinite continuous range of indivisible goods q ∈ (0, ∞), by

V m = ∞ 0 (1 + q) -σ m δ i X q i + (1 -m i ) δ X q j dq, i, j = 1, 2 and i = j, (1)
where X q i +X q j ≤ 1, and parameters δ, σ > 0. Each good q is differentiated on the basis of the country of origin.

Let X q i be an indicator function which takes the form

X q i =
1 if the household buys country i's variety of good q 0 otherwise .

Our preference modelling has a number of implications. First, households must choose their most preferred good or 'ideal product' out of each industry q, where at most only two varieties (home and foreign) of each good q may be available in the global market. A single household either buys home or foreign goods but never a combination of the two. Secondly, there is satiability of preferences and a household's utility increases with the range of goods (0, q) it consumes and not with the consumption of a single good q. Thirdly, the proportion of income that households spend on lower-indexed goods or on goods with lower income elasticities of demand, decreases with a household's income. Hence, richer households can consume more than the bundle of goods available to poorer households.

For a type-m household, the country i-product variety of good q is preferred if

m δ i p q i > m δ j p q j ⇔ m i > (p q i ) 1/δ (p q i ) 1/δ + (p q j ) 1/δ , i, j = 1, 2 and i = j, (2)
where p q i is the price of good q produced in country i. On the one hand, suppose p q i > p q j and δ = 0, all households are better off by acquiring the cheapest variety. On the other hand, if δ approaches infinity, the fraction of households purchasing home goods equals one half, irrespective of their price. Thus, δ measures the relative price sensitivity of demand.

Technology

Human capital is the only input in production and the stock of human capital in country i is equal to h i L i , where L i is the size of the labor force and h i is the average level of human capital. In each country, two technologies are available to produce each variety of good. One technology is assumed to exhibit constant returns to scale (CRS). It requires α/A i units of human capital, with α > 1, to produce one unit of good q. A i acts as an index of productivity of the labor force in country i and differs by a uniform amount across trade partners, i.e., A i (q)/A j (q), i = j, is identical for all q. The alternative technology is characterized by increasing returns to scale (IRS). It requires 1/A i units of human capital to produce one unit of good q plus a fixed setup of F/A i units of human capital. A firm switching from the CRS to the IRS technology is used as a metaphor for industrial modernization. All firms in each country may serve both their domestic and export market.

Income inequality and the budget constraint

Households also differ in terms of their income. Following MSV, we assume that there is an exogenous nondegenerate distribution of assets G j (γ) in country j with γ ∈ [γ j , ∞) and γ j ≥ 0, the minimum share of ownership. Within the present framework, γ j acts as a threshold which must be interpreted as the poverty line above which one finds two categories of households, where each household is a member by country j standards of either the middle or the upper class.

We define a class γ of households' income (y γ j ) in country j as follows

y γ j = γ(w j h j L j + π j ), j = 1, 2, (3)
where π j denotes aggregate profits, w j is the wage per unit of human capital, and γ is the extent of ownership of all profit-making firms located in country j held by type-γ households.

For analytical convenience, G j (γ) is assumed to be perfectly correlated with the distribution of the human capital endowment and a type-γ household supplies γh j L j units of human capital inelastically. Let (0, q γ ) be the bundle of goods purchased by the household with a share in the profits γ in country j. Since there is preference satiability and goods are indivisible, its budget constraint is given by

q γ 0 i p q i X q i dq = γ(w j h j L j + π j ), j = 1, 2. (4)
3 International general equilibrium

Effective demand size and minimum efficient scale

We begin by restating the MSV's price equilibrium strategy in a closed economy. Each good q may be produced either by a competitive fringe with the CRS technology or by a monopolist with the IRS technology if demand is high enough to cover fixed costs. When it is produced with the CRS technology, the free entry zero-profit condition ensures that the price is equal to average cost, i.e., p q i = αw i /A i . Suppose that in each sector in either country, there is only one firm with access to IRS technology. MSV show that under a plausible assumption on G j (γ), the unique Nash equilibrium is for domestic monopolists in some subset of sectors (0, q) to enter and to keep prices at αw i /A i . They neither cut prices, nor do they benefit from increasing them.

When there is no technology transfer and countries trade freely, we show that the Nash equilibrium price strategy for monopolists in countries 1 and 2 entering the global marketplace is also to keep prices at respectively αw 1 /A 1 and αw 2 /A 2 . A sufficient condition is that the world distribution of real income be sufficiently smooth, i.e., 'without large peaks or discrete spikes' (see Appendix for details). A key implication for our model is that trade between countries of different size and/or factor efficiency can be closely related to a standard world price equilibrium along the lines of a Ricardian model.

As long as L i > F/(α -1), we have the following break-even condition: A good q is produced in country i with the IRS technology if the demand for that good (D q i ) satisfies

(α -1)w i A i D q i - F w i A i ≥ 0 ⇔ D q i ≥ F α -1 , i = 1, 2, (5)
with the minimum efficient scale defined by D * i = F/(α -1). Let q * i denote the good produced at that minimum efficient scale in country i. Then, industries which produce lower-(higher-) indexed goods use IRS (CRS) technologies. Thus, q * i measures the variety of goods produced using IRS in country i. We define γ * ij as the share ownership of the marginal household living in country j and whose purchasing power allows it to buy (0, q * i ):

q * i = γ * ij (w j h j L j + π j ) p i = A j α p j p i γ * ij h j L j + π j w j , i, j = 1, 2. (6)
Country 1's labor force can be divided into: (i) households which have enough buying power to purchase all goods produced under IRS in country 1 (0, q * 1 ) plus some higher-indexed goods which are produced under CRS, i.e., γ ≥ γ * 11 , and (ii) poorer households which cannot acquire such a range of goods, i.e., γ 1 ≤ γ < γ * 11 . Country 1's labor force can also be divided into: (iii) households which are rich enough to buy all goods produced under IRS in country 2 (0, q * 2 ) plus some higher-indexed goods which are produced with the CRS technology, i.e., γ ≥ γ * 21 , and (iv) poorer households which cannot acquire such a range of goods, i.e., γ 1 ≤ γ < γ * 21 . The global middle class by the standards of country i brings together households of type

γ j ≤ γ < γ * ij , i, j = 1, 2.
We define the global upper class by country i standards with

N * ij = (1 -G j (γ * ij ))L j , i, j = 1, 2. (7)
Finally, in equilibrium, one household of type m consumes either domestic or foreign goods (but never a combination of the two). Given Eq. ( 2), the proportion of households in the world which consume country i-products is

λ i = 1 -λ j = p 1/δ j p 1/δ i + p 1/δ j ⇔ p i p j = 1 -λ i λ i δ , i, j = 1, 2 and i = j, (8)
where 1 -λ i is also the proportion of income in country i spent on imported products. Consequently, the width of the market for the producer of q * i (D * i ) depends on both the terms of trade and the size of the global upper class by country i standards. It is given by

D * i = λ i j (1 -G j (γ * ij ))L j = F α -1 , i = 1, 2. (9)
Note that all households characterized by γ * ij are able to consume exactly q * i ; they have similar purchasing power in terms of goods produced in country i. Thus, a household of type γ in country j may be rich enough in its own country to belong to the domestic upper class although from a global perspective it belongs to the world middle class.

Trade balance and the global profit-multiplier

The aggregate profit function in country i is the sum of profits in all industries q ∈ (0, q * i ):

π i = (α -1) w i A i q * i 0 D q i dq - q * i 0 w i F α dq, i = 1, 2,
with the demand for good q produced in country i defined by

D q i = j D q ij = λ i j (1 -G j (γ q ij ))L j , i = 1, 2, (10)
and where γ q ij = p i q/(w j h j L j + π j ) is the share ownership of the poorest household in country j which can purchase (0, q). Using Eqs. ( 6) and ( 7), the above expression for profits can be integrated by change of variable and then by parts to yield

π i p i = α -1 α λ i j T ij (w j h j L j + π j ) p i , i = 1, 2, (11)
with

T ij = L j γ * ij γ j
γdG j (γ) denoting the share of income held by this middle class living in country j which could potentially contribute to increase profits made by industries in country i. Thus, country i profits depend on middle class real income in both trade partners expressed in terms of the price of country i-products, T ij (w j h j L j + π j )/p i , and the proportion of the global middle class which consumes i-products (λ i ) multiplied by the markup (α -1)/α. In the open economy, the combination of a large global middle class and price competitiveness sets the conditions for a relatively affluent consumer economy.

Our model ignores international borrowing and lending. Therefore, balanced trade requires

p i ∞ 0 D q ij dq = p j ∞ 0 D q ji dq ⇔ λ i (w j h j L j +π j ) = λ j (w i h i L i +π i ), i, j = 1, 2 and i = j.
(12) Expenditure on goods produced in country i by households living in country j (left-hand side) equals expenditure on goods produced in country i by households living in country j (right-hand side). Because of Walras' Law, the clearing condition in Eq. ( 12) also ensures equality of demand and supply of labor within each trade partner.

Substituting the balanced trade condition (12) into the profit expression (11) yields profits per wage unit

π i w i = α-1 α h i L i j λ j T ij 1 -α-1 α j λ j T ij , i = 1, 2, (13)
where the global profit-multiplier (M i ) is defined to be 1/(1-α-1 α [ j λ j T ij ]).

Trade equilibrium

We first combine the balanced trade condition in Eq. ( 12) and the definition of q * i as provided by Eq. ( 6). This yields the following relationship linking the shares of industrial profits in the hands of home and foreign marginal households with similar real income in terms of goods produced in country i:

γ * ii = 1 -λ i λ i γ * ij , i = 1, 2 and i = j. (14)
Secondly, we use Eqs. ( 8) and ( 13) to rewrite the market clearing condition (12) as follows

A 1 A 2 = M 2 M 1 L 2 L 1 λ 1 1 -λ 1 1+δ , (15)
where A i = A i h i measures labor efficiency in country i. The trade equilibrium values of γ * 11 , γ * 12 , γ * 22 , γ * 21 , and λ 1 = 1 -λ 2 are determined by solving jointly Eqs. ( 9), ( 14), and (15). Let G j (γ) be the Pareto income distribution 3 in country j. We are now in a position to show how international differences in income distribution, labor efficiency, or labor force size may produce either gains or losses from trade. Indeed, substituting Eq. ( 14) into Eq. ( 9) allows us to express γ *

ii as an implicit function of λ 1 . The right-hand side of Eq. ( 15) can then be expressed as a one-variable function Ψ(λ 1 ) which can be shown to be strictly increasing as long as δ > α -2, ensuring that the trade equilibrium is unique under relatively mild conditions.

Average income, industrialization, and welfare

In autarky, all profits that are distributed to the domestic middle class return as demand addressed to the home sectors. This implies the closed economy profit-multiplier

M i = 1/(1 -α-1 α T i ) in country i with T i = L i γ * i γ i
γdG i (γ) and γ * i the marginal household by country i standards such that the breakeven condition F/(α -1) = N * i = (1 -G i (γ * i ))L i , is exactly satisfied. Average income, the proportion of human capital employed in firms operating under IRS in country i, and welfare, all of which depend on the global profit-multiplier, can now be calculated under free trade and compared to their corresponding value under autarky. First, the average productivity in country i is proportional to the multiplier

y i = w i h i L i + π i p i L i = 1 1 -α-1 α j λ j T ij A i α , i = 1, 2. ( 16
)
3 We specify G j (γ) = 1 -(γ j /γ) β j with β j > 1 and γ ≥ γ j > 0, where γ j is the minimum share ownership of all domestic profit-making firms in country j. Note that ∞ γ j γdG j (γ) = 1/L j which implies γ j = (β j -1)/β j L j , so we have:

T ij = L i γ * ij γ j γdG j (γ) = 1 - β j -1 β j L j γ * ij β j -1 , i, j = 1, 2.
Secondly, in addition to the variety of goods produced under conditions of increasing returns (q * i ), MSV suggest preferring an alternative measure of industrialization, namely, the proportion of human capital employed in country i firms with access to IRS technology (h IRS i /h i L i ). If we omit the human capital required to start production (F A -1 i q * i ), it is equal to

h IRS i h i L i = λ i hi A i j γ * ij N * ij + T ij w j h j L j + π j p i L i , i = 1, 2. (17)
Finally, given Eqs. ( 1), (4), and (8), the average welfare across each income class γ of households living in country j is given by

V γ j = i (1 + q γ ij ) 1-σ -1 1 -σ 1 1-λ i m δ i dm i , j = 1, 2
, and dm 2 = -dm 1 , (18) with q γ ij = γ(w j h j L j + π j )/p i . Let us consider two identical countries. From Eqs. ( 9) and ( 15), there is a unique solution:

λ 1 = λ 2 = 1/2 and γ * 11 = γ * 12 = γ * 22 = γ * 21 , ∀ δ.
In country j, using Eq. ( 18), we obtain

1/2 0 (1 -m j ) δ dm j + 1 1/2 (m j ) δ dm j - 1 0 (m j ) δ dm j > 0, j = 1, 2.
Hence, trade between two symmetric countries implies positive welfare gains from variety for both trade partners.

Comparative statics 4.1 Differences in income distribution

In this section, countries 1 and 2 differ only by their distribution of share ownership and human capital endowments G j (γ), i.e., labor efficiency is the same ( A 1 = A 2 ) and labor force is the same (L 1 = L 2 ). Country 1 (2) is characterized by a more (less) equal income distribution (β 1 > β 2 ). The equilibria under autarky and free trade are illustrated in Figure 1, where the lower left-hand quadrant depicts (1 -G j (γ))L j together with the break even conditions, and the upper right-hand quadrant displays the corresponding Lorenz curve.

F/(α-1) 1 Pareto 1 Pareto 2 T 1 T 2 γ 1 * γ 2 * T 21= T 11 T 12= T 22 γ 11 * γ 22 * γ (1-G j (γ))L j G j (γ) L(G j (γ)) Lorenz 2 Lorenz 1 45°1 -N 12 * /L 2 1-N 11 * /L 1
Figure 1: Equilibrium under autarky and free trade with differences in inequality.

In the no-trade equilibrium, the more equal trade partner is characterized by a larger mass of households who are able to contribute to the domestic profit-multiplier. As shown in Figure 1, the break even conditions yield

N * 1 = N * 2 which implies T 1 > T 2 .
Therefore, the profit-multiplier is higher in country 1 which leads ceteris paribus to both a higher average productivity and a greater proportion of human capital employed in firms with access to IRS technologies. These differences across countries simply reflect the observation by MSV: a large middle class encourages mass production because it boosts the cumulative processes 4 .

The exposure of domestic industries to foreign competition modifies the customer base in each sector. Because labor efficiency and the size of the labor force are identical across countries, real wages are equalized under free trade. The simultaneous solution to Eqs. ( 9), ( 14) and ( 15) is λ 1 = λ 2 = 1/2. Using Eqs. ( 9) and ( 14), it is then easily verified that the integrated world equilibrium also satisfies γ

* 11 = γ * 12 = γ * 21 = γ * 22 whatever γ * 1 γ * 2 .
There are no longer two income distributions, but one global distribution of income where each type-γ class of household spends its income equally on countries 1 and 2 products.

What are the effects of trade on country 1's profit-multiplier? First, using (9), and given that N * 1 = N * 2 under autarky, we have

|N * 11 -N * 1 | = |N * 12 -N * 1 |.
Secondly, recall that the Lorenz curve is convex, and its slope in G j (γ) is equal to γL j . This allows us to conclude for country 1:

γ * 1 γ * 2 ⇒ γ * 11 ⋚ γ * 1 ⇒ T 1 T 11 , N 11 N 1 , and T 22 = T 12 T 2 ⇒ |T 1 -T 11 | |N * 11 -N * 1 | γ * 11 = γ * 12 |T 12 -T 2 | |N * 2 -N * 12 | ⇒ T 11 + T 12 < T 1 + T 2 ⇒ 1 2 (T 11 + T 12 ) < T 1 .
Trade shifts country 1's middle class demand away from goods produced in country 1, which weakens its multiplier. Country 1 thus sees the shrinking of those markets where increasing returns to scale are strongest under autarky, thereby lowering human capital employed in country 1 firms operating under IRS. Even though the upper class is larger in country 2, it mainly contributes to increasing the demand for goods with the highest income elasticities of demand produced in country 1. Since most of them are produced with the CRS technology, their increased output cannot outweigh the decrease in the average productivity in country 1.

The opposite occurs in country 2, thanks to the mass middle class in country 1 which contributes to enlarging the market share of goods produced 4 Note that the alternative case where (1 -G 1 (γ))L 1 crosses (1 -G 2 (γ))L 2 somewhere above F/(α-1), implies γ * 1 < γ * 2 and, therefore, q * 1 may be smaller than q * 2 despite country 1 being more equal than country 2. Nevertheless, whatever γ * 1 γ * 2 , we still have

T 1 > T 2 , y 1 > y 2 , and h IRS 1 / h1 L 1 > h IRS 2 / h2 L 2 .
under conditions of increasing returns. Whatever γ * 1 γ * 2 , we have

1 2 (T 22 + T 21 ) > 1 2 T 22 + L 2 γ c γ 2 γdG 2 (γ) > T 2 ,
where γ c is defined by

γ c γ 2 dG 2 (γ) = 1 -N * 11 /L 1 .
Hence, the benefits from trade for country 2 increase with the degree of equality in the income distribution in country 1.

Equations ( 16) and ( 18) are now used to solve the output and welfare levels of the two income classes. As long as A 1 = A 2 and L 1 = L 2 , the world market shares of home and foreign products and the preference parameter m of the marginal household which is indifferent between the home and the foreign variety, are equal to 1/2.

In country 2, all households can purchase a larger range of goods in the trade equilibrium. Moreover, each household can pick its ideal variety of any good q which means a complementary source of positive gains from trade for half of them. Hence, all households favor trade independently of their relative standing on the domestic income scale and of their preference for domestic versus foreign goods.

In country 1, all households now consume a smaller range of goods. Both varieties of each good q are offered at the same price, so for households which rate domestic goods higher than foreign goods, product variety is not a source of gains from trade. Free trade is welfare-reducing for these households. Those which prefer foreign products may not all be compensated by variety gains. In the light of (18), whatever the value of γ, the household which is indifferent between the domestic and the foreign variety, i.e., m 1 = m 2 = 1/2, differs from the marginal household which prefers trade. Even though the mass of households is equally split between households which buy the domestic good and those which prefer the corresponding foreign substitute, less than half of them favor trade. More specifically, the higher the relative price sensitivity of demand (δ), the more the gains from variety outweigh the losses in the range of goods they can purchase under free trade.

Differences in labor efficiency

Now we discuss the relationship between international demand spillovers and the growth (or decline) of industrial activities in economies that differ only by their labor efficiency. In this section, country 1 has a technological advantage in producing all goods: A 1 > A 2 . In autarky, each household in country 1 has a higher purchasing power which originates from higher labor efficiency and not from a larger domestic profit-multiplier. Hence, in terms of human capital employed in firms where IRS technology is implemented, country 1 does better than country 2.

When autarky ends and free trade begins, the more the labor force in country 1 is efficient in producing goods, the more competitive are firms located in country 1. The trade equilibrium is obtained when excess demand in the two countries is equal and opposite. Figure 2 (right-hand quadrant) illustrates the simultaneous solution to Eqs. ( 9), ( 14), and (15). When both trade partners share the same Pareto income distribution, i.e., β 1 = β 2 , using Eq. ( 14) and substituting Eq. ( 9) into Eq. ( 15) yields

A 1 A 2 = Ψ(λ 1 ) = λ 1 1 -λ 1 1+δ 1 α + α-1 α F α-1 β-1 β (φ 1 (λ 1 )) 1 β 1 α + α-1 α F α-1 β-1 β (φ 2 (1 -λ 1 )) 1 β L 2 L 1 , ( 19
)
where we used j λ

j T ij = 1 -(F/(α -1)) (β-1)/β φ i (λ i ) 1/β , with φ 1 (λ i ) = λ i L 1-β 1 +(1-λ i ) β λ 1-β i L 1-β 2 , φ 2 (λ i ) = λ i L 1-β 2 +(1-λ i ) β λ 1-β i L 1-β 1 , φ i (λ i ) = ∞ for λ i = 0, and φ i (λ i ) = L 1-β i for λ i = L i /(L i + L j ), i = j. The implicit function theorem then yields ∂λ 1 /∂( A 1 / A 2 ) > 0.
As shown in the right-hand quadrant of Figure 2 where Eq. ( 19) is depicted, balanced trade requires a terms-of-trade adjustment against country 1, where the fraction of world income spent on goods produced in country 1 (λ 1 ) increases with the widening of the technological gap ( A 1 / A 2 ). Under free trade, the more competitive trade partner captures a larger share of the whole range of global markets.

The left-hand quadrant of Figure 2 depicts Eq. ( 9) for countries 1 and 2 and the free trade equilibrium values of γ * 11 and γ * 22 , where

γ * ii = β -1 β α -1 F 1/β φ i (λ i ) 1/β , i = 1, 2. ( 20
)
First, if and only if

dφ i (λ i )/dλ i ⋚ 0, we have ∂γ * ii /∂λ i ⋚ 0. Given that d 2 φ i (λ i )/dλ 2 i > 0, φ i (λ i )
is therefore characterized by one minimum 5 . Second, the type of the marginal household in the no-trade equilibrium is given by

γ * i = β -1 β α -1 F 1/β L (1-β)/β i , i = 1, 2, (21)
which allows us to conclude

λ i ⋚ L i L i + L j ⇔ φ i (λ i ) L 1-β i ⇔ γ * ii γ * i , i, j = 1, 2 and i = j. ( 22
) γ Â 1 /Â 2 1 1/2 λ 1 =1-λ 2 γ 11 * δ γ 2 * Market clearing (Ψ(λ 1 )) γ 1 * γ 22 * (Â 1 /Â 2 ) Th φ 1 (λ 1 ) φ 2 (λ 1 ) argmin φ 1 (λ 1 )
Figure 2: International equilibrium with differences in labor efficiency.

We are now ready to derive the consequences of a move from autarky to free trade when A 1 > A 2 : markets clear with λ 1 > L 1 /(L 1 + L 2 ) which implies γ * 11 < γ * 1 and γ * 22 > γ * 2 . This yields an increase (decrease) in country 1 (2)'s multiplier6 . Global demand complementarities exacerbate international disparities. In terms of average income, trade penalizes the economy with the each other in λ 1 = λ 2 = 1/2. Moreover, using Eq. ( 20), it is easy to check that when L 2 /L 1 = 1, we have

arg min(φ 1 (λ 1 )) > 1/2 > arg min(φ 2 (λ 1 )) .
less efficient labor force and favors the technically more advanced country. Overall, the opening to trade raises the proportion of the labor force employed by firms with access to IRS technology in the advanced economy. It shrinks in the backward country even though the deterioration in the latter is not uniform across industries. Some are affected negatively while others are affected positively. In fact, labor market clearing in country 2 leads the variety of goods produced under IRS (q *

2 ) to rise, allowing firms which produce goods with relatively higher income elasticities of demand to benefit from country 1's middle-class buying power.

More to the point, the customer base of more competitive country 1 firms operating under IRS expands in the area of goods with low income elasticities of demand. A large proportion of households in country 2 contributes to boosting the production of low-indexed goods produced in country 1, strengthening IRS in these industries. This is at the expense of their less competitive counterparts in country 2. Note that the proportion of domestic income which may potentially buy goods produced in country 1 using IRS technologies is indeed greater in country 2 than in country 1. We have

γ * 12 > γ * 1 > γ * 11
, where type-γ * 12 households in country 2 have a purchasing power similar to that of type-γ * 11 households in country 1. Hence, there is a proportion

λ 1 of L 2 G 2 (γ * 12 ) and L 1 G 1 (γ * 11 ), where L 2 G 2 (γ * 12 ) > L 1 G 1 (γ * 11
), which contributes to increasing profits in country 1 firms operating under IRS. If the type-γ * 12 household is rich by country 2 standards, its spending pattern is similar to that of the middle class in country 1. Thus, country 1 producers of goods with the lowest income elasticities of demand produce at a more efficient scale and earn higher profits. The same reasoning applies to explain why there is a contraction of rival industries' activity in country 2. We have γ * 21 < γ * 2 < γ * 22 which yields T 21 < T 22 . Therefore, there is only a proportion λ 2 < 1/2 of L 1 G 1 (γ * 21 ), where γ * 21 < γ * 11 , and L 2 G 2 (γ * 22 ), where γ * 22 < γ * 12 , which contributes to profits made by country 2 firms using IRS technologies.

Our model thus identifies a demand-side channel through which trade integration contributes to the gap for countries lagging behind the technological frontier. In country 2 which is less productive, free trade introduces more competitive foreign industries generating the infant industry argument for protection. It was sometimes used in Brazil in the 1960s and 1970s and in India for most of the second half of the twentieth century to pursue importsubstitution policies relying on enormous domestic market to modernize their respective industries. Whereas, South Korea industrialized in the 1960s and 1970s by committing to an export-led growth strategy to compensate for its limited domestic demand7 . Both strategies have in common to utilize fixing of prices instead of letting them adjust to the free play of market forces (see [START_REF] Ray | Development Economics[END_REF].

Finally, we heuristically discuss welfare gains from trade. First, the terms of trade adjustment and parameter δ determine the proportion of world demand addressed to each sector and, therefore, the growth or decline of average productivity when countries engage in free trade. Secondly, according to their preferences and relative price, households may choose their ideal variety produced either at home or abroad. In country 1, average productivity increases. Since more than half the households buy domestic varieties, a majority gains from trade. To this proportion λ 1 > 1/2, one must add a positive proportion of the remaining households for which gains from variety more than outweigh the loss of purchasing power incurred by the higher relative price of the imported variety. In contrast, average productivity decreases in country 2. This loss is only partially offset by the gains from variety and by access to cheaper goods from abroad.

Differences in labor force size

We turn to the analysis of the impact of trade on economies which differ only in the size of their labor force. Let country 2 be the larger country (L 2 > L 1 ). Because IRS in autarky depend only on the domestic market size, they are stronger in country 2. For all goods q produced under IRS, the unit costs are lower in Country 2 where each industry produces a greater quantity than its foreign counterpart (D

q 2 = L 2 (1 -G 2 (γ q 2 )) > D q 1 = L 1 (1 -G 1 (γ q 1
)), ∀q). Now we question whether free trade is a good thing for each country or only for one of them? In which case, is it the small or the large country that loses from trade? Suppose there is an equal share of world income devoted to goods produced in each country, then there will be excess labor demand in country 1 requiring a terms of trade adjustment. To guarantee labor-market equilibrium in both trade partners, the proportion of households which consume country 1 goods (λ 1 ) must be less than 1/2. Interesting enough, λ 1 remains greater than L 1 /(L 1 +L 2 ) as long as the relative price sensitivity of demand is sufficiently low8 . Let country 1 import relatively cheaper varieties from country 2 in a proportion 1 -λ 1 with λ 1 = L 1 /(L 1 + L 2 ). For those households in country 1 which buy country 2 goods, this implies purchasing power gains which allow them to increase the range of goods they can import. Excess labor demand in country 2 results, which leads to an improvement in its terms of trade. Eventually, λ 1 rises above L 1 /(L 1 + L 2 ) which implies γ * 11 < γ * 1 (see Eq. ( 22)). Hence, country 1's multiplier rises by opening to trade while the opposite holds true in country 2 where λ 2 < L 2 /(L 1 + L 2 ) which implies a decrease in country 2's multiplier. International demand complementarities benefit the small economy at the expense of the larger trade partner.

The intuition as to why country 1 multiplier rises is that the trade-induced enlargement of demand for the small country's firms is biased towards those operating under IRS, thanks to the large number of country 2's relatively poor households in the world distribution of income. Given Eq. ( 14), γincome classes of households with similar purchasing power in terms of goods produced in country 1 (2), are such that γ * 11 > γ * 12 (γ * 22 < γ * 21 ). Since average productivity is greater in country 2 and using Eq. ( 20), this implies γ * 21 > γ * 11 > γ * 22 > γ * 12 . If the type-γ * 12 household is relatively poor by country 2 standards, it is middle class by country 1 standards. With L 1 < L 2 and λ 1 > L 1 /(L 1 + L 2 ), demand for goods produced by country 1 firms using IRS technologies is therefore higher under free trade, increasing profits. The counterpart in country 2 is a fall in IRS production activities at the aggregate level.

To sum up, the small country narrows the range of its domestic IRS industrial activities to concentrate more productively on fewer high-priority product niches, whereas in the large country, the range of industries operating under IRS increases.

It is not entirely surprising that our results contrast with those in [START_REF] Ethier | Decreasing costs in international trade and Frank Graham's argument for protection[END_REF] where the large country specializes in the IRS sector and always gains from trade whereas the small country may lose if it is not too small relative to its trade partner and IRS are sufficiently weak. Our settings differ markedly: trade in two homogeneous versus many differentiated goods, and external versus internal increasing returns. However, as long as A 1 = A 2 and L 1 < L 2 , we can stress that if country 2 in our framework is tempted by protection, the latter should be considered on a permanent basis which is the [START_REF] Graham | Some aspects of protection further considered[END_REF] case for protection as discussed in [START_REF] Ethier | Decreasing costs in international trade and Frank Graham's argument for protection[END_REF], not the infant industry argument for protection as discussed above.

Technological catch-up and convergence

We now trace out the consequences of a technically backward partner (country 2) narrowing its technological gap under the free trade regime. Suppose that A 1 > A 2 , L 1 = L 2 , and β 1 = β 2 . An increase in A 2 requires a fall in the relative price of country 2 goods to keep trade between the two countries in balance. It eventually translates into an increase in the range of goods the expanding global middle class can purchase: λ 1 and γ * 22 unambiguously decrease (see Figure 2) which implies a higher global profit-multiplier. Efficiency gains in country 2 allow its industries to sustain the rising demand for all the goods they produce. The larger customer base has two sources: (i) a larger share of world markets caused by the increase in λ 2 , (ii) a larger world market due not only to country 2's labor productivity increase, but also to magnified international demand complementarities which raise international demand.

There is an ambiguous impact of technological catch-up on the technically more advanced trade partner, depending on whether the initial technological gap starts above or below some threshold (( A 1 / A 2 ) T h ). Suppose that A 1 / A 2 < ( A 1 / A 2 ) T h as depicted in Figure 2. Gains in factor efficiency in the lagging trade partner lead the global profit-multiplier in the advanced country to fall (γ * 11 increases and ∂M 1 /∂γ * 11 < 0) while the opposite occurs if

A 1 / A 2 starts above ( A 1 / A 2 ) T h .
What is the intuition behind this ambiguous impact? Before technological catch-up, world demand for country 1 products is divided into three categories: (i) a range of goods with the lowest income elasticities of demand (0, q) that all households from both trade partners are able to purchase, (ii) an intermediate range of goods (q, q) which is acquired by all country 1 households and a smaller proportion of country 2 households, (iii) a range of goods with higher income elasticities of demand that only rich enough households from either trade partner can purchase. As far as the first range of goods is concerned, the world demand for country 1 products falls as a result of the decrease in λ 1 . The net impact on the second and third categories of an increase in A 2 depends on the extent of two effects which shift demand for these products in opposite directions: the decrease in the share of world income spent on goods produced by country 1 firms, and the increase in the purchasing power of the global middle class by country 1 standards.

Figure 2 displays the case where A 1 / A 2 is below ( A 1 / A 2 ) T h . In country 1, the loss of competitiveness mostly harms producers of goods with low income elasticities of demand. Aggregate profits fall because country 1 IRS firms producing goods with lower income elasticities of demand now produce at a less efficient scale. However, the rise in average productivity in country 2 spills over to country 1 sectors producing goods with higher income elasticities of demand. If the relative share of IRS firms' production in total output decreases, there is an increase in the range of country 1 firms that are able to implement IRS technologies. Indeed, the rising demand from the emerging global middle class which accompanies technological catch-up in country 2 spurs demand for goods with high income elasticities of demand.

In contrast to the Ricardian model with non-homothetic preferences in [START_REF] Matsuyama | A Ricardian model with a continuum of goods under nonhomothetic preferences: demand complementarities, income distribution, and North-South trade[END_REF], a scenario of immiserizing growth in country 2 is impossible here. In his framework, country 2 specializes in goods with low income elasticities whose demand does not increase in response to the fall in prices. Thus, it may lose from its terms of trade deterioration associated with a labor productivity improvement. In fact, the relatively cheaper goods imported from country 2 only provide the opportunity for rich households in country 1 to expand their consumption of goods with high income elasticity of demand that are only produced in country 1. In the present model, our preference assumptions together with international imperfect competition do not imply complete geographic specialization. Depending on δ and the terms of trade adjustments, technical catch-up enables the lagging trade partner to expand its scale of output and attain markup opportunities which are ruled out in a Ricardian analysis. Country 2 cannot lose from its productivity improvement, while its trade partner may either win or lose depending on the initial technological gap.

Finally, suppose that country 1 is not only more productive ( A 1 > A 2 ) but also smaller than country 2 (L 1 < L 2 ). Under autarky, the large emerging country benefits from a higher multiplier thanks to its population' size, while the small industrialized country has a higher income per capita because of its more efficient labor force. What is the impact of trade on countries 1 and 2's aggregates when β 1 is still assumed to be equal to β 2 9 ? Comparative statics in Sections 4.2 and 4.3 show that country 1 (country 2) must see its multiplier increase (shrink) while it moves from autarky to free trade, thereby raising (lowering) its average real income.

Consider now the effect of an increase in labor efficiency in country 2. First, terms of trade deteriorate in country 2. Secondly, recall that the Gini coefficient of the Pareto distribution is defined to be 1/(2β -1). Interestingly enough, using Eq. ( 20), we obtain 10 :

L 2 L 1 > (2β -1) 1/(β-1) ⇒ arg min(φ 1 (λ 1 )) < 1/2 and arg min(φ 2 (λ 1 )) < 1/2.
This allows us to conclude that as long as 1) , Eq. ( 20) is increasing where λ 1 clears markets, implying lower γ * 11 and γ * 22 . Technological catch-up in the large emerging country therefore yields an increase in both country 1 and country 2's global profit-multipliers and average real incomes. Moreover, convergence occurs with y 1 /y 2 falling relative to the above free trade baseline.

A 1 / A 2 > ( A 1 / A 2 ) T h and L 2 /L 1 > (2β -1) 1/(β-

Conclusion

The literature on international trade and development has concentrated on international technology spillovers, but neglected international demand spillovers. Our contribution seeks to fill the gap. It presents a multi-industry and twocountry general equilibrium model in which demand spillovers contribute to propagate increasing returns to scale both across industries and national boundaries. We relax the traditional assumption of homothetic preferences to focus on the role played by the global income distribution, both in the 9 Based on the World Income Inequality data base, [START_REF] Mukhopadhaya | World income inequality data base (WIID) review[END_REF] classifies China and the US in the same group of countries where the group includes countries with Gini coefficients between 0.40 and 0.45.

10 The Penn World Tables (see [START_REF] Heston | Penn World Table Version 6.2[END_REF] indicate that China was about four times more populous than the United States in 2004. international structure of production and in the trade pattern between countries that differ in size. Despite the difficulty of testing some of the ideas presented above, empirical work is now needed to assess the importance of international demand spillovers at both aggregate and sectoral levels.

Our results raise additional questions which could profitably be addressed in the future. First, one implication of our model is that income transfers have very different effects depending on whether they are between or within countries or if they occur within a leader or a follower economy. Let us consider a policy that would promote a more equal distribution in country i of an amount τ (w i h i L i +π i )/L i among all households in country i, where τ is the marginal tax rate. Let γ τ = (1-τ )γ +τ /L i denote the associated post tax ownership share of a type-γ household. The redistribution eventually exerts a positive effect on the adoption of IRS technology in both trade partners, therefore demonstrating the potential benefits of reducing both across-and within-country inequalities.

Secondly, our contribution focuses on the dichotomy between autarky and free trade. Endogenous growth models with either variety-expanding or quality-upgrading of products, which introduce differing income elasticities of demand for different goods, have recently emerged in the literature. For example, [START_REF] Foellmi | Income distribution and demand-induced innovations[END_REF] examine the impact of non-homothetic preferences and therefore inequality on innovation and consequent economic growth. [START_REF] Solow | Reflections on growth theory[END_REF] expresses some surprise at the lack of attention to the interaction of demand-side and supply-side variations, i.e., to economics of the medium run, within multi-industry and multi-country growth frameworks. These interactions remain a valuable, open, and empirically relevant issue to be addressed.

Appendix: International price equilibrium

When entering the international market, the home firm with access to IRS technology in industry q may face competition from either the rival firm abroad with access to IRS technology or a competitive fringe of foreign firms. This Appendix shows that the unique Nash equilibrium price strategy for a country i monopolist entering the international market, is to set prices at αw i /A i provided that the world distribution of real income is smooth enough.

Proof.

A country 1 monopolist entering the global marketplace cannot set a price higher than the effective competitive price in country 1 (αw 1 /A 1 ) without giving way to a competitive fringe of domestic firms. Hence, the question to be solved is whether it may increase its profits by lowering its price unilaterally below p 1 = αw 1 /A 1 , i.e., while all other firms in the world economy keep their price unchanged. For the answer to be negative, the marginal profit should satisfy

∂π q 1 ∂ p q 1 = ∂ D q 1 ∂ p q 1 p q 1 - w 1 A 1 + D q 1 > 0 ⇔ - ∂ D q 1 ∂ p q 1 p q 1 D q 1 p q 1 -w 1 /A 1 p q 1 < 1, (23)
with p q 1 ≤ p 1 , and where D q 1 is the effective demand for the variety of good q produced in country 1 at p q 1 . In other words, the price elasticity of demand multiplied by the price-cost margin should not exceed unity.

Using Eq. ( 2), if the monopolist charges p q 1 , the country 1 variety of good q is preferred by a type-m household if

m δ 1 p q 1 (1 + q) -σ > (1 -m 1 ) δ p 2 (1 + q) -σ ⇔ m 1 > 1 -λ 1 ,
with λ 1 = p 1/δ 2 /(( p q 1 ) 1/δ + p 1/δ 2 ), and p 2 = αw 2 /A 2 . Note that p q 1 < p 1 implies λ 1 > λ 1 . The monopolist's ex post customer base may now be divided into two categories: households of type m 1 > 1 -λ 1 which prefer goods produced in country 1, and households of type 1 -λ 1 ≥ m 1 > 1 -λ 1 which prefer, other things being equal, product varieties produced in country 2, except for the country 1 variety of good q.

Let us define q ≤ q produced in country 1 such that m δ 1 p q

1

(1 + q) -σ = m δ 1 p 1 (1 + q) -σ ⇒ q = p 1 p q 1 -1/σ

(1 + q) -1.

Among the first category of households, customers for the country 1 variety of good q include all those which are rich enough to buy q, i.e., households of type γ ≥ γ q 1j , with γ q 1j = ( p q 1 ) 1/σ (p 1 ) (σ-1)/σ (1 + q) -p 1 w j h j L j + π j , j = 1, 2.

Similarly, we define q ≤ q produced in country 2 such that

m δ 1 p q 1 (1 + q) -σ = (1 -m 1 ) δ p 2 (1 + q) -σ ⇒ q = 1 -m 1 m 1 δ/σ p q 1 p 2 1/σ
(1 + q) -1.

Among the second category of households, the country 1 monopolist in sector q ends up with those characterized by γ ≥ γ q 1j , where

γ q 1j =
1 -m 1 m 1 δ/σ ( p q 1 ) 1/σ p (σ-1)/σ 2

(1 + q) -p 2 w j h j L j + π j , j = 1, 2.

Therefore, the effective demand for good q produced in country 1 at price p 1 , is

D q 1 = j D q 1j , with D q 1j = λ 1 (1 -G j (γ q 1j ))L j + 1-λ 1 1-λ 1
(1 -G j (γ q 1j ))L j dm 1 . Let g j (γ) be the density of type-γ households in country j and β j (γ) = g j (γ)γ/(1 -G j (γ)). The price elasticity of demand for good q can be written as follows

- ∂ D q 1 ∂ p q 1 p q 1 D q 1 = j λ 1 β j (γ q 1j )(1 -G j (γ q 1j ))L j σ D q 1 1 + 1 q (24) + 1-λ 1 1-λ 1 β j (γ q 1j )(1 -G j (γ q 1j ))L j σ D q 1 1 + 1 q dm 1 + λ 1 (1 -λ 1 )(1 -G j (γ q 2j
))L j δ D q 1 . We define β max = max(β j (γ)), γ min = min(γ j -), and observe that M 1 ≥ 1 implies q ≥ q ≥ q ≥ γ 1 -A 1 L 1 /α. Equation ( 24) can be shown to be smaller than

β max σ    1 + α γ 1 - A 1 L 1    + 1 -λ 1 δ j 1 -G j (γ q 2j ) L j j 1 -G j (γ q 1j ) L j
, which allows us to rewrite Eq. ( 23) as

   β max σ    1 + α γ 1 - A 1 L 1    + 1 -λ 1 δ j 1 -G j (γ q 2j ) L j j 1 -G j (γ q 1j ) L j    α -1 α < 1. (25)
In order to express Eq. ( 25) as a function of the set of parameters which govern the world distribution of real income, we need to specify G j (γ). We define G j (γ) to be the Pareto distribution which has the following useful properties: β j (γ) = β j , ∀γ, and γ j -= β j -1 / β j L j . First, we can show

that j 1 -G j (γ q 2j ) L j j 1 -G j (γ q 1j ) L j ≤ 1 -λ 1 λ 1 δβ max . ( 26
)
Secondly, given that α ≥ M j ≥ 1, Eq. ( 15) implies

1 -λ 1 λ 1 ≤ α A 2 L 2 A 1 L 1 1 1+δ . ( 27
)
Using Eqs. ( 25), ( 26), and ( 27), the following inequality provides a sufficient condition for ruling out price-cutting equilibria:    

β max σ 1 + β 1 α (β 1 -1) A 1 + 1 δ α A 2 L 2 A 1 L 1 1+δβ max 1+δ 1 + α A 2 L 2 A 1 L 1 1 1+δ     α -1 α < 1. (28)
As long as Eq. ( 23) is satisfied, when a firm in country 1 with access to IRS technology in industry q aims to cut the price below αw 1 /A 1 , it is not able to expand its customer base to such an extent as to compensate the loss in the rate of profit per customer, thus discouraging price-cutting. In our framework, such condition results in Eq. ( 28). Neither the domestic nor the world income distribution should degenerate around any type-γ, together with σ and δ being sufficiently above unity, for price-cutting to be ruled out. A similar sufficient condition applies to firms in country 2 with access to IRS technology.

Incidentally, MSV acknowledge that (p. 560): "This question gains particular significance in the open economy, where foreign competition might reduce [industrial modernization]... We have only focused on the income distribution as the determinant of market size. One can also consider other important determinants of market size, such as population size and average income, and ask various questions about industrialization in small versus large countries, as well as in poor versus rich countries."

As illustrated in the left-hand quadrant of Figure2, φ 1 (λ 1 ) and φ 2 (λ 1 ) must cross

Replacing Eqs. (20) and (21) in their profit-multiplier's definition under respectively free trade and autarky, we obtain similar functions M i (γ), where ∂M i (γ)/∂γ < 0, for either γ * i or γ * ii .

In the words of[START_REF] Irwin | Infant industry protection[END_REF]: "The [infant industry] argument holds that certain new industries should be protected from foreign competition in the expectation that they will eventually mature and successfully compete against more experienced foreign rivals... In the modern literature, [it] hinges on 'dynamic learning effects', which allow an industry that is not currently competitive to become so after a temporary period of protection." In a recent paper,[START_REF] Melitz | When and how should infant industries be protected[END_REF] shows that how and when infant industries should be protected depends on the industry's learning potential, the speed of learning, and the degree of substitutability between the domestic and foreign goods. In view of the static nature of our model, it lies beyond its scope to discuss this issue further.

Recall that Ψ(λ 1 ) is monotonically increasing with λ 1 . Then, for L 1 /L 2 < 1, A 1 / A 2 = 1, and δ > (β -1)/β, Equation (19) implies

ReferencesDalgin, M.,Mitra, D., Trindade, V., 2004. Inequality, nonhomothetic preferences, and trade: a gravity approach. NBER Working Paper No. 10800, revised May 2006, King's College.Dornbusch, R., Fischer, S., Samuelson, P.A., 1977. Comparative advantage,


Konstantinos Kogkalidis
email: k.kogkalidis@uu.nl

Michael Moortgat
email: m.j.moortgat@uu.nl

Richard Moot
email: richard.moot@lirmm.fr

SPINDLE: Spinning Raw Text into Lambda Terms with Graph Attention

ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

The transparency and formal well-behavedness of lambda calculi make them the ideal format for expressing compositional structures, a fact that has been duly emphasized by parsers and tools with a predominant focus on semantics. Lambda calculi form a key ingredient of type-logical grammars, where they find use as the computational counterpart of a so-called grammar logic, a substructural logic of the intuitionistic linear variety that is designed to capture (aspects of) natural language syntax and semantics [START_REF] Moortgat | Categorial type logics[END_REF]. For typelogical grammars, the Curry-Howard isomorphism guarantees a straightforward passage between logical rules, type constructors and term-forming operators; put simply, Parse ≡ Proof ≡ Program, and Category ≡ Proposition ≡ Type. The modus operandi 1 Stylized spind 2 λe and standing for spindle parses into dependency-decorated λ expressions. Source code and user instructions can be found at https://github.com/ konstantinosKokos/spindle. is straightforward: a lexicon associates words with logical formulas, and the logic's rules of inference decide how formulas may interact with one another.

By extension, words may only combine in a strict, well-typed manner, forming larger phrases in the process. Parsing becomes a process of logical deduction, at the end of which the result (a proof) gives rise to a recipe for meaning assembly (a program). This program is turned into executable code as soon as one plugs in appropriate interpretations for the lexical constants (words) and for the term operations (composition instructions). The set-up is general-purpose in that it readily accommodates different choices for these interpretations; valid targets can for instance be found in (truth-conditional) formal semantics, distributionalcompositional models [START_REF] Sadrzadeh | Static and dynamic vector semantics for lambda calculus models of natural language[END_REF], or tableau-based theorem provers [START_REF] Abzianidze | LangPro: Natural language theorem prover[END_REF].

In this work, we are interested in what happens prior to semantic execution; that is, we abstract away from lexical semantics and seek to reveal the compositional recipe underlying a natural language utterance. To that end, we employ a type grammar aimed at capturing two different syntactic axes, only rarely observed together in the wild: functionargument structures and dependency relations. To procure a derivation from an input phrase, we design and implement a system combining three distinct but communicating components. Component number one is the implementation of the grammar's type system -it comes packed with a number of useful facilities, most important being a static type checker that verifies the syntactic well-formedness of the analyses construed. Component number two is a supertagger responsible for assigning a type to each input word -the tagger is formulated on the basis of a hyper-efficient heterogeneous graph convolution kernel that boasts state-of-the-art accuracy among categorial grammar datasets. The third and last component is a neural permutation module that exploits the linearity constraint of the target logic to simplify proof search as optimal transport learning [START_REF] Peyré | Computational optimal transport: With applications to data science[END_REF] -this reformulation allows for a massively parallel and easily optimizable implementation, unobstructed by the structure manipulation breaks common in conventional parsers. The three components alternate roles through the processing pipeline, switching between phases of low level linear algebra routines and high level logical reasoning (GPU and CPU intensive, respectively). Their integration yields a lightspeed-fast and highly accurate neurosymbolic parser, neatly packaged and made publicly available.

System Decomposition

Type Grammar

The system's theoretical backbone is its type logic -a uniquely flavoured, semantics-first type-logical grammar that strays from the categorial norm in two major ways. First, it focuses on deep syntactic structure (or tectogrammar, in Curry's terms) rather than surface form; its functional types are therefore oblivious to directional or positional constraints, abiding only to the linearity condition: every occurrence of an atomic proposition must be used once and exactly once. Second, it dresses functional types up, so as to have them encode grammatical functions, making a three-way distinction between complements, heads and adjuncts.

A full exposition of the grammar is beyond the scope of this paper, but a superficial and simplified rundown should help shed light on what is to follow. Its first aspect, function-argument structures, is modeled using linear logic's implication arrow, , which gives us access to resource-conscious versions of function application and variable abstraction [START_REF] Girard | Linear logic[END_REF][START_REF] Abramsky | Computational interpretations of linear logic[END_REF]. In their linguistic usecase, functional types of the form A B denote predicates that consume a single occurrence of some object of type A, the result being a composite phrase of type B. Reasoning about gaps, ellipses and the like is accomplished with the aid of higherorder types, i.e. instances of the previous scheme where A is itself a function -these higher-order types launch a process of hypothetical reasoning, whereby we may temporarily assume the existence of a resource to produce a derivation locally, only to later withdraw the hypothesis, creating a new function in the process. The second aspect, dependency relations, are modeled using a labeled assortment of residuated pairs of unary operators

♦ δ I
Figure 1: Logical rules of inference used by the type grammar (subset). The id rule instantiates a fresh variable of arbitrary type A. The lex rule provides declares a constant c as being of type A, given type assignment c → A pulled from the lexicon L (or, in the post-neural era, the supertagger). Introduction rules are complex types constructors, elimination rules are destructors. The E rule says a term s of type A B derived from premises Γ can apply to a term t of type A derived from premises ∆, producing a complex term s t of type B derived from the merger of Γ and ∆. The I rule says that if the premises of some term s of type B include a variable x of type A, we can abstract over the latter, producing a term λx.s of type A B. The 2 δ E rule removes the box from a term s of type 2 δ A, producing term δ s of type A and enclosing the premises under brackets _ δ . Dually, the ♦ δ I rule puts a term s of type A under the scope of a diamond, producing term δ s of type ♦ δ A and again enclosing the premises under brackets _ δ . lent from temporal logic. Atomic types without any dependency decorations are assigned to linguistically autonomous units and phrases, e.g. NP for a noun phrase. Functional types denoting heads impose a diamond ♦ c on the complements they select for, label c being the dependency slot the complement is to occupy, e.g. ♦ su NP S main for an intransitive verb looking for a subject-marked noun phrase to produce a matrix clause. Dually, functional types denoting adjuncts are themselves decorated with a box 2 a , label a now being the dependency role projected by the adjunct prior to application, e.g. 2 mod (NP NP) for an adjective, promising to provide a function over noun phrases if one is to remove its box. Introducing a diamond or eliminating a box leaves a structural imprint that encloses complete phrases under brackets, and a computational imprint that calls for a special treatment of the wrapped term -both labeled by the grammatical function of the diamond (resp. box) that was introduced (resp. eliminated). The key logical rules of the type grammar and their isomorphic term operations are presented in Figure 1.

Wat c 0 ♦ whbody (♦ predc PRON SVI) WHQ lex is c 1 ♦ predc PRON ♦ su NP SVI lex x ♦ predc PRON id c 1 , x ♦ su NP SVI E die c 2 2 det (N NP) lex c 2 det N NP 2 det E rare c 3 2 mod (N N) lex c 3 mod N N 2 mod E tekening c 4 N lex c 3 mod , c 4 N E c 2 det , c 3 mod , c 4 NP E c 2 det , c 3 mod , c 4 su ♦ su NP ♦ su I c 1 , x, c 2 det , c 3 mod , c 4 su SVI E c 1 , c 2 det , c 3 mod , c 4 su ♦ predc PRON SVI I c 1 , c 2 det , c 3 mod , c 4 su whbody ♦ whbody (♦ predc PRON SVI) ♦ whbody I c 0 , c 1 , c 2 det , c 3 mod , c 4 su whbody c 0 whbody (λx.c 1 x su ( det (c 2 ) ( mod (c 3 ) c 4 )) : WHQ E Wat is die rare tekening whbody su mod det
Figure 2: Natural deduction proof for the sentence Wat is die rare tekening? 'What is that strange drawing?'. For space economy, compositional λ term is only explicitly written in the endsequent (bottom of the proof). From the antecedent structure of the endsequent, we may also recover a dependency tree. Color coding serves to informally differentiate between complement (red) vs. adjunct (green) structural brackets/dependency arcs.

Proof Representation

Proofs in the type logic are traditionally served in the tree-like natural deduction format. Proofs in natural deduction benefit from an easy translation to (i) λ expressions, by following the rules of Figure 1, and (ii) dependency trees, by simply casting structural brackets to dependency arcs, going from the head of each phrase to (the heads of) its dependents. Figure 2 presents a visual example. An alternative representation is in the far less verbose format of a proof net, a geometric construction that abstracts away from the bureaucratic book-keeping of hypothetical reasoning and tree-structured rule ordering. Figure 3 presents the proof net equivalent of the running example. Proof nets are easier to reason about in a neural setup by allowing us to treat parsing as the vastly simplified problem of matching each occurrence of an atomic proposition in negative position, i.e. a prerequisite of a conditional implication, with an occurrence in positive position, i.e. a (conditionally) proven statement. The parallel nature of proof nets allows the matching to occur simultaneously across the entire proof; that is, all decisions are done in a single instant, without the bottleneck of having to wait for conditionals to be satisfied in a bottom-up fashion.

On the other hand, proof nets are slightly underspecified compared to natural deduction proofs, being explicit only with respect to function-argument structures -translating from one format to another requires establishing some conventions on what constitutes a canonical proof.

Implementation

The syntax of the type system is implemented as a tiny DSL written in Python. 2 It is used as the representation format of AEthel (Kogkalidis et al., 2020a), a dataset of some 70 000 analyses of written Dutch, which also constitutes the system's training data. The implementation was originally designed to assert the type-safety of the dataset, to facilitate the conversion between natural deduction trees, λ terms and proof nets, and to ease thirdparty corpus analysis by providing niceties such as search and pretty printing utilities, cross compilation to L A T E X for visualization purposes, interfaces for proof transformations, etc. All these functionalities are imported unchanged. The conversion routines allow us to conduct neural proof search in the favorable regime of proof nets, and convert the result to natural deduction format only at the very end, just for the sake of presentation and/or sanity testing. Importantly, the type-checker is repurposed as a tool for verifying the correctness of analyses constructed -an analysis that does not amount to a valid proof will fail to pass the checker, throwing a type error and alerting us to the fact.

In other words, we can blindly trust anything the parser gives us as correct, at least in the sense of (proof-theoretic) syntactic validity.

Wat

♦ whbody ♦ predc PRON 0 S vi 1 WHQ 2 is ♦ predc ♦ su PRON 3 NP 4 S vi 5 die 2 det N 6 NP 7 rare 2 mod N 8 N 9 tekening N 10
Figure 3: Proof net equivalent of the proof of Figure 2, with unary diamonds (resp. boxes) fused with the implication dominating (resp. dominated by) them for depth compression. Atomic propositions are indexed by enumeration for identification purposes. Color coding here serves to differentiate between resources we have (green) and resources we need (red) -the rule is start green from the bottom, change (resp. keep) color for the left (resp. right) daughter of an implication. Bold edges denote the tree structure underlying type assignments. Dashed edges denote the correct matching between resources of opposite polarity.

Supertagging Module

Lexical type ambiguity and lexical type sparsity are common and pervasive problems for any categorial grammar. The de facto approach rests on a supertagger, a neural module replacing the fixed lexicon, traditionally formulated as a sequence classifier and trained to produce the most plausible type assignments for each word in the context of an input sentence. Here, these problems are exacerbated by the highly elaborated type system. Some 80% of AEthel's approx. 6 000 types are rare (i.e. have less than 10 occurrences in the corpus), and some 10% of the total sentences contain at least 1 such rare type. This necessitates a more ambitious treatment than the standard "set-and-forget" approach of completely discarding rare type assignments as inconsequential. The solution comes in the form of a constructive supertagger, an auto-regressive neural decoder that is trained to construct types on the fly according to their algebraic decomposition, rather than treat them as singular, opaque blocks [START_REF] Kogkalidis | Constructive type-logical supertagging with self-attention networks[END_REF]. This configuration enables the construction of valid types regardless of whether they have been seen before or not, extending coverage beyond the training data. The supertagger employed here follows a geometrically informed, task-specific decoding order, whereby types are represented as the structural unfolding of binary trees. Following [START_REF] Prange | Supertagging the long tail with tree-structured decoding of complex categories[END_REF], trees are decoded in parallel across the entire batch of input sequences, establishing an upper temporal bound on decoding that scales with the maximal tree depth -in practice, a constant. To circumvent the locality of a standard tree decoder, the target output being not a batch of trees but a batch of sequences of trees (see Figure 3), the supertagger is formulated as a a graph neural network, utilizing message-passing connections to transfer feedback from tree nodes to their lexical roots and from lexical roots to their neighbours, ensuring that decisions made at each decoding step are influenced by prior decisions across the entire output (Kogkalidis and Moortgat, 2022). As a result, it strikes the perfect balance between the speed and memory efficiency of a tree-shaped architecture, allowing for more training iterations and faster inference, and the stronger autoregressive properties of a seq2seq model, improving performance. Further, being inherently constrained to trees, its output is structurally correct-by-construction -under no circumstance can any of the types produced be ill-formed. Used in isolation, the architecture currently sits at the top of the accuracy leaderboard for categorial grammar supertagging across different formalisms and languages -the performance is marginally inferior in the multi-task training setup adopted here.

Permutation Module

Conducting search over proof nets is typically illadvised. The problem traditionally involves examining all possible bijections between positive and negative atomic propositions. The number of such bijections scales factorial to the number of atomic propositions, quickly becoming prohibitive.

To navigate this combinatorially explosive landscape, neural proof nets relax proof search into a continuous, differentiable problem, where finding the correct bijection is translated to a transportation problem (Kogkalidis et al., 2020b) learned by yet another graph neural network. Concretely, the representations of all occurrences of atomic propositions are extracted from the decoder and binned according to their sentential index, sign and polarity (e.g. a single bin would be all occurrences of a positive NP in sentence #13 of the input batch). Each bin is contrasted with its inverse polarity counterpart using some similarity metric (here a weighted inner product). The result is a collection of square matrices, each matrix containing attention weights (or similarity scores) in the cartesian product of positive and negative items of the same sign and sentence. These matrices are grouped by their cardinality, and the Sinkhorn operator [START_REF] Sinkhorn | Concerning nonnegative matrices and doubly stochastic matrices[END_REF] is used to push them towards binarity and bistochacity, yielding approximations of permutation matrices representing the goal bijections [START_REF] Mena | Learning latent permutations with gumbel-sinkhorn networks[END_REF].

To make things concrete using the running example of Figure 3, each of the atomic types S vi , NP and PRON has a single negative and a single positive occurrence, therefore their bijections are trivial (a testament to supertagging being almost parsing). The single positive occurrence of WHQ stands for the goal type of the phrase, and remains unmatched. Only N requires a decision, having two possible bijections. The correct candidate is encoded by the permutation table below, where rows enumerate positive and columns negative items: 6 8 9 10 Π N := This reformulation entails a tremendous speedup: the painstakingly slow problem of symbolic proof search is cast into simple, well-optimized and batchable matrix operations. The current parser builds on the insight that the permutation module is invariant to the source of atomic symbol representations, and in fact greatly benefits from the faster and more accurate task-adapted supertagger.

Integration

Neurosymbolic integration yields an end-to-end pipeline that consists of the following phases. First, the user inputs a list of sentences to be parsed. Contextualized token representations are obtained from a fine-tuned BERT BASE model, which are then aggregated according to the input's word boundaries. The resulting word representations act as initial seeds for decoding to begin on an empty canvas. During decoding, types are progressively constructed, while seeds are updated by exchanging messages with one another on the basis of their sequential proximity. After a small number of decoding steps, the process terminates, yielding a sequence of type assignments for each input sentence. A rudimentary invariance check is then performed, controlling whether each sequence counts an equal number of atomic propositions of each polarity. Sentences failing the invariance check are not eligible for proof search, and their analysis stops early. Passing sentences are symbolically processed to obtain a collection of sparse indexing tensors, used to gather the decoder's representations into the bins described earlier. Bins are batched and contrasted, and a small number of Sinkhorn iterations is employed as a 2-dimensional softmax analogue. The soft Sinkhorn distances are discretized using the Hungarian algorithm in order to enforce bijectivity [START_REF] Jonker | A shortest augmenting path algorithm for dense and sparse linear assignment problems[END_REF]. Bijections are reassociated with their origin symbols and sentences, using the reverse of the previous indexing operation. Control is then passed to the symbolic component, which attempts to traverse the candidate proof nets, verifying the correctness criteria of acyclicity and connectedness in the process [START_REF] Danos | The structure of multiplicatives[END_REF]. The traversal coincides with a translation to a natural deduction format, the construction of which corresponds to static type checking of the output [START_REF] Lamarche | Proof nets for intuitionistic linear logic: Essential nets[END_REF]. Assuming no type mismatches are caught, the output is a proof proper, which by Curry-Howard isomorphism is rewritten as a dependency-decorated λ term. The user is finally presented with an analysis for each input sentence -ideally, a λ term, but occasionally a rejected intermediate result together with an error description.

Evaluation

Performance

The system has been evaluated on the test set of AEthel. Without any pre-filtering or post-processing training wheels (i.e. no constraints on sentence length, type rarity/depth or cardinality of bijections), the parser produces a proof that satisfies strict syntactic equality with the ground truth in 3 191 of the 5 770 test set samples. This amounts to a significant 55.30% of the test sentences being analyzed without a single error with respect to type assignments, phrasal chunking, function-argument structures and dependency annotations produced3 In total, 4 901 sentences are assigned a passing analysis, which sets the coverage to a more modest 84.94%. The discrepancy between the high accuracy and low coverage is due to the rigidness of the type system: only 5 010 of the sentences satisfy the invariance check, being thus amenable to any proof. This signals that the performance bottleneck lies on the supertagger rather than the permutation module; a parse is assigned to 97.82% of parsable sentences, and it's also the perfect parse 75.30% of the time. These findings are summarized in Table 1 To obtain a more refined perspective on performance, we employ an adaptation of the parsing community's favorite F 1 -score. Concretely, we gather all samples for which a proof was produced, and decompose both prediction and ground truth into their respective sets of subproofs. We measure tp as the two sets' intersection, f p as the difference between predicted and correct subproofs and f n as the difference between correct and predicted subproofs, from which we may obtain precision as p = tp /(tp + f p), recall as r = tp /(tp + f n) and their harmonic mean as F 1 = 2pr /(p + r). On top of the vanilla versions of these metrics, we can also examine relaxations by incorporating a combination of two modulo factors. Relaxation one targets the functional core of the logic, applying a forgetful transformation that strips proofs of their modalities in order to examine typed function-argument structures in isolation. Relaxation two targets the modal enhancement of the logic, collapsing the set of atomic types into a single point (thus treating all functional types of the same shape as equal) in order to examine dependency structures in isolation. Relaxing on both axes at once is essentially casting proofs into the untyped λ calculus, where all we care about are the type-and dependency-agnostic function-argument structures -this is the metric most comparable to external theories. 4 Note that relaxations are performed only after inference -the point being that a strict proof must have been produced for its relaxations to be considered (i.e. lax accuracy is still bottlenecked by strict coverage). The results are averaged over covered samples5 and presented in Table 2 the order of 27 , being locked at an insubstantial 1ms prior to that.6

User Interface

The user interface is bare-bones, but simple and easy to use. The parser is currently packaged as a code repository, which, once downloaded, can be used as a python module. A front-end class wraps around the scary inner workings of the parser and provides easy access to an inference routine. Structure checking is handled internally and error handling is graceful: the user is guaranteed an output even in the case of a partial failure. The output implements the same protocols as samples of the AEthel corpus, and is thus compatible with all of the latter's bells and whistles. Proofs can be prettyprinted, interactively processed and transformed (e.g. for semantic applications), or visualized using L A T E X as a middlewoman. For the more ambitious, training and evaluation utilities are also available.

Conclusion & Future Work

Thus concludes the demonstration tour of spind 2 λe: a unique neurosymbolic parser that can accurately and efficiently convert raw text into λ expressions. Unlike cheaper alternatives, these λ expressions are not structureless ad-hoc imitations produced from arbitrary decoding, but executable, type-safe and 100% guaranteed correct programs. The software focuses on Dutch, but the universality of the intuitionistic linear core allows easy cross-lingual adaptation that essentially boils down to retraining with a new type lexicon; a French implementation is currently in the works [START_REF] De Pourtales | DeepGrail: Neural proof nets for French[END_REF].

As to what the future holds, the intention is to keep the module synchronized and up-to-date with AEthel: any upcoming major release of the latter will be reflected in an update of the former (be it soft patching or retraining). Compatibility aside, planned features include deploying the module as a web service, compiling it as a stand-alone package and documenting the annotations (so as to be more inclusive towards the type-uninitiated). Any performance, stability or efficiency improvements stemming from related research or moments of engineering inspiration are also likely to find their way to the user-facing front. Contributions and feedback are always welcome.

Limitations

The implementation described capitalizes on a disentanglement between neural and symbolic operations to improve efficiency. But doing so comes at the heavy price of a unidirectional data flow that lacks feedback. The symbolic component has the singular role of testing and verifying the neural output, but emits back no messages of its own. Failures may be caught, but they are nonetheless irrecoverable -a partial output that fails some structural constraint signifies an abrupt and non-negotiable end to the processing pipeline, significantly reducing coverage. A better operationalization would be to use the symbolic core to continuously ask for neural output as long as the structural constraints are not met (or the user is not satisfied with the parse provided). However, this would only be feasible if the neural components were to be extended with some notion of backtracking. In that sense, the parallel nature of both the supertagger and the parser becomes now a double-edged sword, hindering the potential applicability of standard heuristic algorithms like beam search.

More generally, the software carries the standard risks of any NLP architecture reliant on machine learning, namely linguistic biases inherited from the unsupervised pretraining of the incorporated language model and annotation biases derived from the supervised training over human-labeled data.

Figure 4 :

 4 Figure 4: User interaction example in python console.

Table 1 :

 1 . Sentential-level evaluation of the parser.

	parsability	coverage
	(some proof obtainable)	(some proof obtained)
	86.83	84.94
	types correct	accuracy
	(correct proof obtainable)	(correct proof obtained)
	56.88	55.30

Table 2 :

 2 . Decomposition metrics and relaxations.

			local metrics
	modulo	p	r	F1
	-	89.52 89.68 89.39
	modalities	90.93 91.13 90.85
	functional types	91.09 91.26 90.97
	both	92.31 92.52 92.24
	3.2 Efficiency
	Regarding efficiency, the architecture contains a
	non-negligible total of 117M parameters, 94% of
	which are inherited from the underlying BERT
	model. The memory footprint of the network's
	forward pass does not exceed 3.5GB on the test
	set with a batch size of 64, making it reasonably
	lightweight for use at home. Using a middle range
	laptop GPU, the network takes about 15 seconds
	to tag the full test set (i.e. 370 sents/sec or 6 000
	tokens/sec), and 80 seconds to tag and parse it
	(i.e. 70 sents/sec), including tokenization and post-
	processing. Note, however, that sentence-level
	batching is not yet implemented for inference mode
	proof search, i.e. sentences are tagged in parallel
	but proven sequentially. Cross-sentential padding
	and batching of Sinkhorn inputs is in the works
	-benchmarking shows that the asymptotic behav-
	ior of a forward pass over batches of 64 matrices
	only starts becoming apparent when they exceed

x : A x : A id (c → A) ∈ L c : A c : A lex Γ s : A B ∆ t : A Γ, ∆ s t : B E Γ, x : A s : B Γ λx.s : A B I Γ s : 2 δ A Γ δ δ s : A 2 δ E Γ s : A Γ δ δ s : ♦ δ A

Source code can be found at https://github.com/ konstantinosKokos/aethel.

This is comparable to the state-of-the-art for the similar (in fact simpler) problem of CCG parsing; see[START_REF] Clark | Something old, something new: Grammar-based CCG parsing with transformer models[END_REF] for an up-to-date overview.

Proofs are in β and η normal, so no free points from abstractions. Variables are only equal if they match in both name and type, so no free points from variable instantiations either.

Averaging over the full test set would artificially inflate p and deflate r scores, since no partial proofs are returned from failing samples.

To comprehend how extremely unrealistic 2

is, consider that this would amount to finding the correct bijection out of 2 7 ! = 3.9 × 10 215 possibilities across 64 pairs of sets in parallel.

Acknowledgements

This software described was developed with funds from the Dutch Research Council (NWO, grant nr. 360-89-070).