Atomic diffusion and mixing in old stars – VIII. Chemical abundance variations in the globular cluster M4 (NGC 6121)

ABSTRACT Variations in chemical abundances with evolutionary phase have been identified among stars in globular and open clusters with a wide range of metallicities. In the metal-poor clusters, these variations compare well with predictions from stellar structure and evolution models considering the internal diffusive motions of atoms and ions, collectively known as atomic diffusion, when moderated by an additional mixing process with a fine-tuned efficiency. We present here an investigation of these effects in the Galactic globular cluster NGC 6121 (M4) ([Fe/H] = −1.13) through a detailed chemical abundance analysis of 86 stars using high-resolution ESO Very Large Telescope (VLT) Fibre Large Array Multi Element Spectrograph (FLAMES) spectroscopy. The stars range from the main-sequence turnoff point (TOP) to the red giant branch (RGB) just above the bump. We identify C-N-O and Mg-Al-Si abundance anticorrelations, and confirm the presence of a bimodal population differing by 1 dex in nitrogen abundance. The composition of the second-generation stars imply pollution from both massive (20–40 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{upgreek} \usepackage{mathrsfs} \setlength{\oddsidemargin}{-69pt} \begin{document} $\rm M_{\odot }$\end{document}) and asymptotic giant branch stars. We find evolutionary variations in chemical abundances between the TOP and RGB, which are robust to uncertainties in stellar parameters and modelling assumptions. The variations are weak, but match predictions well when employing efficient additional mixing. Without correcting for Galactic production of lithium, we derive an initial lithium abundance 2.63 ± 0.10, which is marginally lower than the predicted primordial big-bang nucleosynthesis value.


INTRODUCTION
The chemical evolution of the Milky Way is believed to be imprinted in the elemental abundance patterns of late-type stars (spectral types F to K). Due to their long lifetimes, these stars are of particular importance when it comes to studying the build-up of elements during the early times of our Galaxy.The chemical composition of the atmospheric layers of such stars is thought to resemble the gas from which they were formed.However, observations of globular clusters over the past several decades have revealed a somewhat more complicated picture.Not only have spectroscopic studies revealed a spread in the abundance of light elements in stars of all globular clusters (GCs) (Gratton et al. 2012, and references therein), the studies also indicate that there are processes at work in these stars that alter the surface compositions.The sum of these element-separating effects is collectively referred to as atomic diffusion (Michaud et al. 1984).The effects are responsible for an exchange of material between a star's interior and its atmosphere during the main sequence, but can be counteracted as long as convection is efficient.This means that the largest abundance effects are expected for the hotter stars in an old stellar population, i.e. the F-type main-sequence (MS) turnoff-point ★ Stromlo Fellow † E-mail: Thomas.Nordlander@anu.edu.au(TOP) stars.As the stars evolve off the MS, the deepening outer convection zone will restore the original surface composition and null the diffusion effects effectively restoring the stars' original composition.Prone to proton capture, the element lithium departs from this pciture.As a star ascends the subgiant branch (SGB), the convection zone deepens such that the surface layers dilute with lithium-free material from the interior, causing the surface lithium abundance to drop by an order of magnitude.
The observed abundance variations are remarkably similar to the ones predicted by stellar evolution models including AD.However, in both cases the observations are not matched by the predictions of AD from first principles, but only when counteracted by an additional mixing mechanism (AddMix).This additional transport process beyond the formal extent of the convection zone is also needed to explain the properties of the Spite plateau of lithium (Spite & Spite 1982) which shows a constant Li abundance in warm Population II stars.Different transport processes have been investigated like those due to mass loss (Vauclair & Charbonnel 1995;Vick et al. 2013), rotation (Deal & Martins 2021) or turbulent mixing (Richard et al. 2002a(Richard et al. , 2005)).
The additional mixing is incorporated in the stellar evolution models as an ad-hoc parametric turbulent diffusion coefficient (Richer et al. 2000) so that the structure of the model star is modified by mixing a certain depth range.The density dependence ( −3 ) is suggested by the Be abundance on the Sun (Proffitt & Michaud 1991).The only free parameter is the reference temperature 0 that sets the overall efficiency of the AddMix.This family of models uses a shorthand convention T , where refers to log 0 .At 0 , the Ad-dMix diffusion coefficient is set to 400 times the atomic-diffusion coefficient for helium (see Richer et al. 2000, for the analytic expression of the coefficient).With this parameterisation, Richard et al. (2005) were able to reproduce the Spite plateau using a range of models from T6.0 to T6.25.These are also the models explored in this series of papers where we find that the abundance trends in M30 at [Fe/H] = −2.3 are best reproduced by the T6.1-6.2 models, NGC 6397 at [Fe/H] = −2.1 by the T6.0 models, and NGC 6752 at [Fe/H] = −1.6 by the T6.2 models.In all three cases we find diffusion-corrected Li abundances that are compatible with, but systematically lower than, predictions of standard Big-Bang Nucleosynthesis (BBN): (Li) = 2.69 ± 0.06 (Yeh et al. 2021).These predictions are based on cosmological parameters from observations of the microwave background radiation (CMB) by the P satellite (Planck Collaboration et al. 2020) and do not involve free parameters fitting predictions to observations of the BBN.Given these results, it seems as if the efficiency of AddMix varies with metallicity in a way that is difficult to predict and extrapolate, which could be due to the limited number of observations.To investigate the validity of this hypothesis we here investigate the Galactic GC M4 (NGC 6121) at [Fe/H] = −1.13 and an age of about 12 Gyr (Bedin et al. 2009;VandenBerg et al. 2013;Jang et al. 2019).
M4 is the nearest GC to the Sun, at a distance of 1.8 kpc (Hendricks et al. 2012).Unfortunately, it is located at low Galactic latitude in the Galactic disk behind the Sco-Oph cloud complex, and thus suffers from significant interstellar extinction ( = 1.39,Hendricks et al. 2012) and strong spatial differential reddening (Cudworth & Rees 1990;Drake et al. 1994;Ivans et al. 1999).Deriving effective temperatures ( eff ) from photometry thus becomes a cumbersome task.There have nonetheless been several high-quality spectroscopic studies that took these issues into account.Marino et al. (2008Marino et al. ( , 2011) ) presented evidence for multiple popula- tions along the RGB and HB, while Monelli et al. (2013) demonstrated the presence of two distinct sequences on the RGB.Other high-resolution spectroscopic studies have derived abundances for RGB stars, e.g the lithium content of RGB stars was studied by D'Orazi et al. ( 2010) and Monaco et al. (2012).M4 has also been the topic of a controversy around the absence or presence of second-generation stars amongst its AGB stars.MacLean et al. (2016MacLean et al. ( , 2018) ) analysed high-resolution spectra for a sample of 106 RGB and 15 AGB stars and concluded that there are no second generation stars among the AGB stars.Lardo et al. (2017), on the other hand, showed that the AGB is populated by second generation stars using the C , , = ( − ) − ( − ) index, with further support by the spectroscopic and UV photometric study of Marino et al. (2017).
The AD effects on Fe and Li abundances of stars along the evolutionary sequence in M4 was addressed by Mucciarelli et al. (2011).Although the literature on M4 reveals a tendency that metallicities for TOP stars generally come out lower than those derived for RGB stars (see Table 1), Mucciarelli et al. (2011) do not find a trend in iron abundance with eff , i.e. evolutionary stage.They do, however, need AD and very efficient AddMix in order to explain the observed evolution of Li in the cluster.Given the small size of the expected AD trends for Fe and the temperature-sensitivity of Fe, it is not unlikely that the AD effect on Fe would go undetected.As AD affects all elements, we here revisit M4 and derive abundances for 14 elements, to determine whether AD signatures are present.
This paper is organised as follows: The observations are shortly summarised in Sect. 2. In Sect. 3 we outline the derivation of the stellar parameters and discuss our methodology.The results are presented in Sect. 4 followed by a scientific discussion in Sect. 5. We conclude the paper with a summary in Sect.6.

OBSERVATIONS
We used high-resolution spectroscopic observations of 86 stars in M4 that were obtained with FLAMES/GIRAFFE (Pasquini et al. 2003) under ESO programme 081.D-0356, i.e. from the same data set as used in Mucciarelli et al. (2011, hereafter Mu11).The spectroscopic targets were selected by Lovisi et al. (2010), with a selection informed by proper motions and radial velocities.They used proper motions from Anderson et al. (2006), which clearly separated cluster members from field stars; membership was identified by selecting stars with differential proper motions within 8.5 mas yr −1 of the cluster average.Lovisi et al. (2010) determined a cluster mean radial velocity based on the giant stars of 71.25 ± 0.43 km s −1 ( = 4.08 km s −1 ), and all targets used in this work were found to lie within the envelope of the Gaussian fit to the histogram.In addition, we have used astrometry from Gaia DR3 (Gaia Collaboration et al. 2021;Lindegren et al. 2021) to reject unresolved binaries and nonmembers.We identified an additional six stars (IDs 42574, 50403, 53956, 46510, 30922 and 41899) with a poor astrometric solution (RUWE > 1.4) indicating potential binarity, discrepant parallax ), or having a second resolved source within 1 ′′ .The reduced data set used in this work were obtained from the Paris-GIRAFFE archive (Royer et al. 2012).Observations used the HR15N, HR18 and HR22 settings, providing the Li doublet at 6707.8 Å, several Fe lines, the O triplet at 7771-7775 Å and the C 9111.8 Å line, as well as lines for ten other chemical elements we analysed.The stars cover a range in evolution from the TOP to the RGB and are shown in the ( − )-colour magnitude diagram (CMD) in Fig. 1.Reduced broadband photometry of M4 was kindly provided by Y. Momany (priv. comm.;see Momany et al. 2003 for further information; the same photometry was previously used by Marino et al. 2008).

Stellar evolutionary models
We computed a grid of stellar evolutionary models to construct isochrones, using the Montréal-Montpellier stellar evolution code (Richard et al. 2002a).The physics of these models are identical to those used previously in this series of papers (see Richard et al. 2005;Korn et al. 2007, and discussion in the Introduction).
We used the Grevesse & Noels (1993) solar composition and the Turcotte et al. (1998) solar calibration.We adopted an initial chemical composition with = 0.2382, [Fe/H] = −1.1 and [ /Fe] = +0.3(corresponding to = 0.00268).We interpolated the isochrones to an age of 12 Gyr, consistent with estimates from the white dwarf cooling sequence and isochrone fits to the main-sequence turnoff and horizontal branch (Bedin et al. 2009;VandenBerg et al. 2013;Jang et al. 2019).We calculated models with AD and AddMix efficiencies of log 0 = 6.0, 6.2, 6.25 and 6.3, with masses in the range 0.55-0.87M ⊙ , covering evolutionary states from the lower main sequence to the base of the RGB.We also calculated models with no atomic diffusion, covering masses in the range 0.55-0.874M ⊙ , and note that the absence of diffusion of He into the stellar core requires a higher stellar mass by about 0.01 M ⊙ to reach the TOP at the same age.

Photometry
The line of sight towards M4 is heavily affected by interstellar dust due to its location behind the Sco-Oph cloud complex.This results in significant differential reddening across the face of the cluster (Ivans et al. 1999), at an average level of = 1.39 or ( − ) = 0.37 (Hendricks et al. 2012).Estimates of the peakto-peak differences within a distance of 10' of the cluster centre ranges from ( − ) 0.05 (Cudworth & Rees 1990) to ( − ) = 0.25 (Mu11).The effect of differential reddening is an apparently broader evolutionary sequence in the cluster CMD than expected from photometric uncertainties alone.This broadening will depend on the angle between the sequence and the reddening vector, e.g., / ( − ), which is illustrated in Fig. 1 together with the observed and dereddened cluster CMD.
To correct for the spatially differential reddening across the face of the cluster, we followed a method similar to that of Milone et al. (2012) and Donati et al. (2014) and previously applied to M4 by Lardo et al. (2017).We determined a fiducial sequence by eye, and derived the selective extinction in ( − ) in eff -space by comparison to a 12 Gyr isochrone (described in Sect.3.1).We derived eff values from − colours using the relations from Ramírez & Meléndez (2005), which are calibrated on the infrared flux method (IRFM, Blackwell et al. 1986).We derived a mean selective extinction for cluster members of ( − ) = 0.63.
A reference sample of stars was constructed by computing the distance along the reddening vector to the fiducial sequence for all stars located near the main-sequence turnoff point, 16.7 ≤ ≤ 18.3.For each star, we determine the average reddening by median filtering amongst the nearest ≤ 35 neighbouring reference stars within a distance of 60 ′′ on the sky.The spatial differential extinction in (Δ ) across the cluster as derived empirically from the comparison to ( − )-fiducial sequences is visualised in Fig. 2. The surface has been binned to cells of 10 ′′ by 10 ′′ .Each cell represents the median Δ for all stars that fall in the coordinate range and for which a reddening value has been assigned by the method described above.In the map, red and blue colours indicate regions with a reddening value above or below the overall mean reddening of the cluster.The map is qualitatively consistent with the ( − ) reddening maps of Hendricks et al. (2012) and Monelli et al. (2013).
A corresponding dereddening in the − colour index was also derived.As Ramírez & Meléndez (2005)  , relative to the cluster average.Spectroscopic targets are marked by black crosses, while X marks the centre of the cluster.The blue colour indicates areas with less reddening, while red coloured areas are affected by a higher degree of reddening.The coordinate system is normalised to the cluster centre at R.A. = 16 h 26 m 45.12 s , Dec = 26 • 18 ′ 35.4 ′′ .
(see their Table 3) were used to obtain ( − ) = 1.06 from the derived ( − ).The − reddening map is qualitatively similar to that derived from − .The influence of the differences, between the two maps, on derived stellar parameters will be examined further in Sect.3.4.The good correspondence between the two reddening maps, and the significantly decreased scatter along the RGB in Fig. 1 validates the accuracy of the dereddening procedure.We note that while Gaia DR3 provides homogeneous reddening values based on the analysis of BP/RP spectrophotometry (Andrae et al. 2022), these reddening estimates are marred by significant correlations with the stellar parameters, in particular eff , and cannot straightforwardly be used.

Spectrum synthesis
We performed an automated spectroscopic analysis using a modified version of the spectrum synthesis code Spectroscopy Made Easy (SME, Valenti & Piskunov 1996;Valenti & Fischer 2005;Piskunov & Valenti 2017).Briefly, stellar parameters ( eff , log , [Fe/H], and mic ), linelists (Piskunov et al. 1995;Kupka et al. 1999), and line and continuum masks are supplied to SME.The code allows non-LTE (NLTE) line formation using precomputed grids of departure coefficients, and uses a grid of MARCS plane-parallel and spherically symmetric model atmospheres (Gustafsson et al. 2008), all with scaled solar abundances, and alpha-enhancement of 0.4 dex when [Fe/H] < −1.SME, like MARCS, adopts the solar chemical composition of Grevesse et al. (2007).SME performs a numerical comparison between observations and synthetic spectra computed on the fly.The optimum is found through a non-linear optimisation algorithm (Marquardt 1963).Rather than a line-by-line approach, we determine all abundances simultaneously by synthesising all three spectral settings for each star.This ensures a consistent abundance table for each star, where all known line blends are explicitly taken into account.
We applied NLTE corrections in our line synthesis routine using precomputed grids of departure coefficients for ten elements: lithium (Lind et al. 2009b), carbon (Alexeeva & Mashonkina 2015), oxygen (Sitnova et al. 2013), magnesium (Osorio et al. 2015;Osorio & Barklem 2016), aluminium (Nordlander & Lind 2017), silicon (Shi et al. 2008), calcium (Mashonkina et al. 2007), iron (Bergemann et al. 2012;Lind et al. 2012) and barium (Mashonkina et al. 1999).We refer the reader to each paper for details on the particular NLTE treatment, and to Piskunov & Valenti (2017) for details on the implementation of NLTE departure coefficients in SME.While the grids employed in this work are largely proprietary, we note that publicly available grids for several elements have been made available by Amarsi et al. (2020) and Gerber et al. (2023), and that several online tools are available 2 .Other elements and species including CN, K , Ti and Ni were computed in LTE.

Photometric stellar parameters
We used the − colour-temperature calibration from Ramírez & Meléndez (2005), assuming [Fe/H] = −1.1 for all stars, and the dereddened − photometry as described in Sect.3.2.The uncertainty of the dereddened colours can be evaluated by comparing results when dereddening using the independent − and − reddening maps.Differences are rather small, 7 ± 34 K and 10 ± 73 K for giants and dwarfs, respectively.The scatter about the − fiducial sequence corresponds to 45 and 135 K, for giants and dwarfs.The median absolute deviation when executing the nearest neighbour filtering is just 0.032 mag in , corresponding to 0.015 mag in − .The latter corresponds to a change in eff of 36 and 68 K for giants and dwarfs, respectively.This corresponds well to the scatter in the difference between the two reddening maps, and is comparable to the scatter about the fiducial sequence for giants.Taking into account the statistical uncertainties present, we adopt representative uncertainties of 50 and 100 K in eff for giants and dwarfs, respectively.
We show in Fig. 3 that there is little correlation between our inferred stellar parameters and the adopted differential reddening.The average differential reddening is Δ ( − ) = −0.013± 0.032 mag, where warm stars with eff > 5800 K are slightly more reddened (−0.010 ± 0.028 mag) than cool stars with eff < 5200 K (−0.018 ± 0.037 mag).Compared to the mean for the spectroscopic targets, warm stars are thus more highly reddened by just 0.002 mag and cool stars less by 0.005 mag.Offsets of 0.005 mag in − correspond to just 12 K and 27 K for warm and cool stars, respectively, and systematic errors in differential reddening of this type are therefore unlikely to be significant.
Compared to the eff scale of Mu11, results are in agreement for turnoff stars (our temperatures are higher by 17 ± 129 K for stars with eff > 5800 K), while the values for giants ( eff < 5200 K) differ by −58 ± 21 K. Large differences are found on the SGB (intermediate eff ), −115 ± 121 K.We derived photometric surface gravities from the dereddened absolute magnitudes, assuming a distance modulus = 11.28 (Hendricks et al. 2012), and with bolometric corrections from Alonso et al. (1999Alonso et al. ( , 2001)).For a 12 Gyr isochrone with AD (results are not sensitive to the choice of AddMix), we found a mass of 0.84 M ⊙ at the TOP and 0.87 M ⊙ on the RGB.The resulting values of log range from 4.2 at eff = 6100 K (TOP) to 2.2 at eff = 4700 K (RGB).The resulting stellar parameters, along with observational parameters, are given in Table 2.
As outlined in Gruyters et al. (2014), uncertainties in eff are expected to dominate relative errors in log .For example, an error of +100 K in eff translates into +0.03dex in log .An effect of this size on log would require, e.g., an increase in stellar mass by 0.06 M ⊙ , or an increase in magnitude by 0.075 mag.We note that our mass estimate is in good agreement with the average of asteroseismic measurements for RGB stars in this cluster, 0.83 ± 0.01 (Howell et al. 2022) or 0.87 ± 0.01 (Tailo et al. 2022).For the 8 and 5 stars that overlap, respectively, the seismic measurements indicate 0.81 ± 0.09 M ⊙ and 0.79 ± 0.29 M ⊙ .Our expected precision of 0.03 mag in magnitude and 50 and 100 K in eff for giants and dwarfs, respectively, thus translates into at most 0.03 and 0.05 dex in log for giants and dwarfs, respectively.A shift in stellar masses, the overall reddening of the cluster, or its distance, would have similar effects on all stars with only minor differential effects.

Microturbulence
Microturbulent velocities are derived from a set of 17 Fe lines, as the spectra contain only two rather weak Fe lines.The Fe lines span a range in equivalent widths of 20-150 mÅ and 5-80 mÅ, corresponding to log / = −5.5 to −4.6 and −6.5 to −4.9, for the coolest and hottest stars in our sample.
We find that dwarfs follow an essentially linear relation of mic increasing with eff , while giants exhibit mic values decreasing linearly with log .The RMS scatter about the linear relation for giant stars is just 0.048 km s −1 , while that for the dwarfs is considerably higher and amounts to 0.43 km s −1 .Among the 20 hottest TOP stars ( eff > 6080 K), which are the faintest and thus exhibit the lowest S/N values, we find a scatter of 0.8 km s −1 , and values higher than 3 km s −1 in several stars.This indicates that we cannot robustly determine mic for all stars in our sample, due to the influence of noise on the weaker lines.
To alleviate this shortcoming, we also analyse coadded spectra, generated by grouping stars according to their stellar parameters.We opted to perform this grouping according to log for the giants but according to eff for dwarfs, due to the different slopes in these different parts of the HR diagram.The characteristics of each groupaveraged spectrum is given in Table 3.These mic values follow a similar relation to those determined from individual giant stars, where their slopes as a function of log agree to within 1 , indicating that the approach is viable.For dwarfs, we find a linear relation as a function of eff with a scatter of just 0.075 km s −1 .Adopting the two relations leads to mic values increasing with eff and ranging between 1.2 and 1.7 km s −1 for the dwarfs ( eff > 5500 K) while the giants ( eff < 5500 K, log < 3.8) have mic values decreasing with log , between 1.1 and 1.5 km s −1 .

Spectroscopic eff scales
We compare iron abundances derived from lines of Fe and Fe , to predictions from evolutionary models with AD in Fig. 4. Significant differences indicate potential problems with either the photometric stellar parameters or the spectroscopic method.In the giants, iron abundances derived from Fe lines appear to correlate with effective temperature.Abundances in the coolest stars ( eff < 5000 K) from Fe lines are lower than those from Fe lines by 0.04 dex.The warmer giants, subgiants and dwarfs exhibit better agreement between the ionization stages, with a possible bias of lower abundances of Fe than Fe by just 0.03 dex.
The abundances we derive from lines of Fe are found to be in agreement within the error bars, with predictions from evolutionary models.The abundance trend in titanium as deduced from a Ti line is likewise in very good agreement with predictions.Lines of ionised iron and titanium are known to form under conditions close to LTE, with very small sensitivity to hydrodynamic effects (see Sect. 3.8), and are rather insensitive to changes in eff .Our small estimated uncertainties in log and the weak sensitivity to mic likewise indicate these results to be robust.We thus suspect that the uncovered deviation from ionisation equilibrium is due to inaccuracies in the temperature scale, which the lines of Fe are susceptible to.
The wings of the broad H line are commonly used in the literature, and are known to yield accurate stellar parameters for dwarf stars (Fuhrmann et al. 1993;Barklem et al. 2002;Nissen et al. 2007;Ruchti et al. 2013;Amarsi et al. 2018;Giribaldi et al. 2021).However, the sensitivity of these lines decreases significantly on the RGB, where Mucciarelli et al. (2011) estimated uncertainties of at least 300 K.
Another commonly used method is that of the excitation equilibrium of iron, which should be suitable here as our set of Fe lines span a range of excitation energies between 2.5 and 4.5 eV.However, we find that due to the limited number of lines and the limited quality of our spectra among the turnoff stars, differences compared to the photometric temperatures exhibit large scatter with individual differences as large as 550 K.
We therefore adopt a novel method, and refer to the resulting temperature scale as eff, ion : we enforce the ionisation equilibrium by matching for each star the iron abundance based on Fe lines (in NLTE) to the average Fe-trend deduced for all stars from lines of Fe .As this average trend is very similar to that predicted by stellar evolution models including AD with AddMix, on the extreme ends of the temperature scale, where we have the largest number of stars to compare to, we adopt the predicted trend from a T6.2 isochrone at each evolutionary stage.At low S/N, this fitting method is more robust than the excitation equilibrium.On average the eff, ion scale is cooler than the photometric scale, eff, phot , by 56 ± 65 K, 150 ± 86 K and 29 ± 31 K for turnoff stars, subgiants, and giants, respectively.
To avoid circular arguments with respect to AD, we also generate a corresponding scale that we refer to as eff, flat , under the assumption  that all stars must indicate the same iron abundance.This eff scale is cooler than eff, phot , differing by −9 ± 70 K, −87 ± 67 K and −34 ± 30 K for dwarfs, subgiants and giants, respectively.Compared to eff, ion , this temperature scale differs by +66 ± 28, +50 ± 21 K and −34 ± 30 K for dwarfs, subgiants and giants, respectively.We will discuss the effect of the different eff scales on the inferred abundances in Sect.5.3.

Deriving chemical abundances
We simultaneously determine the abundances of 14 elements, on each of the three eff scales discussed in Sects.3.4 and 3.5.2.We analyse the light elements lithium using the Li resonance line at 6707.8 Å, carbon using the C line at 9111.8 Å, oxygen using the O triplet at 7771-7775 Å, magnesium using the Mg lines at 7691.5 and 7811.1 Å and aluminium using the Al doublets at 6696-6698 Å and 7835-7836 Å.We also determine abundances for the -elements silicon from two Si lines, calcium from five Ca and two Ca lines, and titanium from the Ti line at 6491.5 Å.The iron-peak is represented by iron using 18 Fe and two Fe lines considered separately (where our final abundance analysis is based only on Fe ), and nickel using 12 Ni lines.Finally, we determine abundances for potassium using the K resonance line at 7699 Å, and the heavy neutron-capture elements barium using the Ba line at 6496.9 Å. Atomic and molecular line data for full spectrum synthesis were retrieved from the Vienna Atomic Line Database (VALD3, Piskunov et al. 1995;Kupka et al. 1999;Ryabchikova et al. 2015).For aluminium, we use the TOPbase oscillator strengths and new broadening data from Nordlander & Lind (2017).We note that newer oscillator strengths are available for some elements, including the O triplet (Bautista et al. 2022) and several lines of Mg (Pehlivan Rhodin et al. 2017).As this work primarily focuses on differential abundances, the effect of these updated oscillator strengths should be negligible.
As weak CN lines are present over most of the available spectral regions, the nitrogen abundance is also left as a free parameter during the abundance determination for the giant stars.We shall investigate the influence of uncertainties in the abundances of nitrogen on other species in the next section.

Abundance uncertainties
We adopt statistical uncertainties based on 2 minimisation, representing photon-noise statistics.These do not take into account uncertainties in continuum placement, nor systematic modelling uncertainties.We show in Table 4 the average effect on the derived abundances from systematic changes to stellar parameters.We note that these are based on a simultaneous abundance analysis of all 14 elements, and therefore include second-order effects due to blends and competition in the molecular equation of state.
The latter is particularly important as the the presence of weak CN lines in most of the spectral regions produce additional systematic uncertainties, especially in the cooler stars.We investigate this uncertainty by executing abundance analyses where we assume different abundances of nitrogen.The effect of changing the assumed nitrogen abundance by 0.5 dex is roughly 0.02 dex in lithium and 0.01 dex in magnesium and titanium, while most other elements are unaffected on the level of 0.01 dex.The exception is for carbon and oxygen, which show a somewhat complicated behaviour: The relative abundances of carbon, nitrogen and oxygen determines the relative concentrations of different C-, N-and O-laden molecules in the equation of state.In addition, if the abundances of carbon and oxygen are derived while assuming a perturbed nitrogen abundance, then the weak CN lines will present erroneous strengths.In the RGB stars, the CN lines tend to dominate the 2 minimization as a function of carbon abundance, with much larger influence than the atomic carbon lines themselves.Setting the nitrogen abundance as a free parameter circumvents this problem, and allows an accurate fit of the atomic carbon lines independent of the CN line strengths.Additionally, the adopted nitrogen abundance does not seem to control the concentration of free atomic carbon and oxygen, especially in the atmospheric layers where the observed high-excitation lines form, as the influence on the strength of the atomic lines of carbon and oxygen is similar to the effects on lines of magnesium and titanium.We thus conclude that potential uncertainties in the abundance of nitrogen do not significantly affect results for other species.

NLTE effects
We performed our abundance analysis using departure coefficients directly implemented in the spectrum synthesis code.In order to estimate the magnitude of the NLTE effects, we also derived abundances using LTE line synthesis.The differences in derived abundances using NLTE line synthesis compared to the LTE case, Δ (X)(NLTE − LTE), for TOP / RGB stars are illustrated in Fig. 5.The values are typically −0.07 / +0.08 dex (lithium), −0.22 / −0.19 dex (carbon), −0.14 / −0.10 dex (oxygen), +0.09 / +0.05 dex (magnesium), +0.02 / −0.07 dex (aluminium) −0.04 / −0.04 dex (silicon), −0.14 / −0.12 dex (calcium), +0.03 / +0.02 dex (neutral iron), and −0.22 / −0.21 dex (barium).Save for lithium and aluminium, effects are similar on dwarfs and giants.Titanium abundances were derived from a single Ti line likely formed under near-LTE conditions, hence we assume the abundances are unaffected by NLTE (Bergemann 2011).We have examined NLTE corrections for potassium by interpolating the grid of NLTE abundance corrections by Takeda et al. (2002).We find corrections of −0.67 dex and −0.57dex for stellar parameters representative of our TOP and RGB stars.For nickel, we note the recent publicly available grid by Gerber et al. (2023), which appeared after the initial submission of this work.An earlier version of this NLTE model was presented by by Bergemann et al. (2021), and applied to the solar nickel abundance by Magg et al. (2022).They found that NLTE effects for diagnostic lines were of the order 0.01 dex, but noted that departures from LTE may be underestimated due to the lack of accurate photoionisation and collisional data (Bergemann et al. 2021).These have since been updated in the work of Gerber et al. (2023).

3D hydrodynamic effects
Three-dimensional (3D) hydrodynamic model atmospheres differ from their 1D counterparts in typically having steeper average temperature stratification, as well as exhibiting horizontal inhomogeneities (granulation).The former will tend to exaggerate differences in line formation under LTE, as this is dictated by the Planck function.In NLTE, however, line formation depends primarily on the average radiation field, which is much more similar in the 1D and 3D cases.This point is illustrated in, e.g., Bergemann et al. (2012, see their Fig. 6).We therefore investigate differences between both 3D LTE and 3D NLTE, and 1D LTE modelling, where this is available in the literature.
Detailed comparisons of LTE line formation in 1D and 3D have been performed by Dobrovolskas (2013) and Dobrovolskas et al. (2013).They compared synthetic spectra of models whose stellar parameters broadly agree with our TOP and RGB groups, and find generally vanishing 3D corrections for weak synthetic lines similar in excitation potential (but not necessarily strength) to those analysed in this work.
None of the relevant elements exhibit 3D corrections larger than 0.05 dex, and differential effects, Δ (X)(TOP − RGB), are found to be less than 0.05 dex.Their tabulations (V.Dobrovolskas, priv comm.)indicate that highly excited lines of neutral carbon and oxygen have 3D-1D abundance corrections of 0.00 dex at the TOP, and small (−0.03 dex) corrections on the RGB.We note however that some of the lines of both elements used in this work are on the verge of saturation (equivalent widths, , up to 60 mÅ).Additionally, the excitation potential of the oxygen triplet is higher than what they investigated, which may result in a larger negative correction for weak lines in RGB models.The neutral lines of silicon, again on the verge of saturation ( ∼ 50 mÅ), exhibit identical +0.05 dex 3D corrections for the TOP and RGB models.Magnesium and aluminium ( ∼ 50 mÅ) were examined only for an RGB model, indicating slight 3D corrections (+0.04 and +0.03 dex).The ionised lines of titanium ( < 50 mÅ) and iron ( < 40 mÅ) exhibit slight positive 3D corrections in the TOP model (+0.03 dex), but essentially none in the RGB model.The neutral lines of iron and nickel, as well as the neutral and ionised lines of calcium and the ionised line of barium analysed in this work come in a wide range of strengths, most of which are unsuitably strong for these estimates.Finally, the very weak lines of the CN molecule exhibited essentially no 3D corrections.
These 3D corrections should be seen as indicative of the related uncertainties, rather than quantitative, for two reasons.Firstly, lines analysed in this work are often saturated rather than weak, which affects the contribution functions.
Full 3D NLTE calculations have been performed in the analysis of very metal-poor TOP stars by Lind et al. (2013) for lithium, sodium and calcium.Their NLTE corrections for calcium may be compared to the 1D case presented by Mashonkina et al. (2007), whose corrections are adopted in this work.While these two studies use different atomic models for calcium, they adopt the same inelastic hydrogen collision rates based on Drawin (1968), rescaled using H = 0.1.In both studies, the excitation and ionisation equilibria are fulfilled, indicating that NLTE-corrected abundance analyses perform similarly well under 1D and 3D.The four lines in common for the two studies have NLTE corrections which are either comparable, or significantly larger in the 3D case, indicating that 3D LTE line formation may in fact be less physically realistic than 1D NLTE.
Full 3D NLTE calculations have also been performed for an ultrametal poor RGB star by Nordlander et al. (2017) for lithium, sodium, magnesium, aluminium, calcium and iron.They find similar abun-dances under 1D NLTE and 3D NLTE, with typically stronger NLTE effects in 3D.For these six elements they found that either the NLTE effects are mostly negligible (lithium and sodium) with very similar results in 3D NLTE and 1D NLTE or they are substantial (magnesium, aluminium, calcium and iron) with significantly larger abundance corrections in 3D NLTE by as much as 0.3 dex.Again, their results indicate that when NLTE effects are expected to be large, they are likely to dominate over the 3D effects such that 1D NLTE synthesis is preferable over 3D LTE synthesis.
A comprehensive grid of 3D NLTE abundance corrections has been calculated for lithium by Wang et al. (2021).We have derived indicative abundance corrections through using a representative equivalent width, and calculated (3D NLTE)-(1D LTE) abundance corrections using their provided routines.The abundance corrections are rather constant for our stars and range between −0.07 and −0.05 for the entire sample.While this agrees very well with our 1D NLTE abundance corrections for the warmer stars, these corrections are of the opposite sign to 1D NLTE corrections for the cooler stars, implying that our RGB abundances of lithium are overestimated by as much as 0.15 dex.
Grids of 3D NLTE abundance corrections exist for atomic lines of carbon and oxygen (Amarsi et al. 2019).For carbon, 3D NLTE abundance corrections range from −0.05 for our TOP stars, to −0.09 for our RGB stars; this implies abundances are underestimated for dwarfs by roughly 0.17 dex and for giants by 0.10 dex.For oxygen, corrections are −0.16dex for both TOP and RGB stars, in very close agreement to our 1D NLTE calculations for dwarfs but lower by 0.06 dex for giants.

RESULTS
In what follows, the derived chemical abundances are addressed for the sample of 86 stars.The focus will predominately lie on the abundances derived from the group-averaged spectra as we consider the S/N for the warmer TOP stars too low to derive accurate perstar abundances from weak lines, as can be seen in the large scatter we find for the TOP stars compared to the RGB stars.Results are based on our preferred photometric temperature scale, eff, phot .The stellar parameters and abundance results for group-averaged spectra are presented in Table A1.

Abundance variations
Abundances derived from the group-averaged spectra generally appear to increase gradually toward lower eff values.The average trends are defined as Δ (X) = TOP − RGB , where is the investigated element, TOP the average abundance of the three TOP groups, and RGB the average abundance of the three RGB groups.The difference in stellar parameters between the two groups is about 1000 K in eff and 1.3 dex in log .The significance of the trend is based on the standard deviation in the two groups.The abundance trends are of the order 0.1 dex, although some elements such as carbon, oxygen, aluminium and barium seem to exhibit stronger trends (> 0.2 dex).Although the individual trends are of low significance (1-2 ), the fact that we find consistent trends in different elements is intriguing.We will address the interpretation of these trends in Sect. 5.For now we will continue by describing the various elemental abundances.

Lithium
The line doublet at 6707.8 Å used to derived the Li abundance consist of two fine-structure components, separated by merely 0.15 Å and thus unresolved at the resolution of GIRAFFE ( = 17 000).Our atomic data takes both fine structure (and isotopic splitting) into account.
The abundances are primarily sensitive to eff since Li is mostly ionised in these stars.Given our eff precision of 100 and 50 K in dwarfs and giants, we estimate corresponding systematic abundance uncertainties of 0.08 and 0.06 dex.This dominates the systematic error budget over those due to uncertainties in gravity, metallicity and microturbulence which are only of order 0.01 dex.
We find the highest lithium abundances in the TOP stars, eff > 5900 K, which can be identified with the field star Spite plateau.Their mean abundance (Li) = 2.32 ± 0.10 is perfectly consistent with that indicated by the coadded group-averaged spectra, 2.32 ± 0.03 as well as with the study by Mu11, who derived (Li) = 2.30 ± 0.02 ( = 0.10).We will discuss the evolution of Li in greater depth in Sect.5.2.

and iron-peak elements
Abundances of Si, Ca, Ti, Fe and Ni all show weak abundance trends based on the group-averaged spectra.The sizes of the trends for Ca, Ti, Fe and Ni are summarised in Table 5.The most significant trends are found for calcium and nickel (but see discussion below), both of which are well behaved and significant on the 2 level.The influence of errors in stellar parameters (see Table 4), given our estimated uncertainties, indicates that these systematic uncertainties cannot have spuriously created the trends.
The trends for silicon, titanium and iron are somewhat less compelling.The latter are deduced from one weak Ti and two weak Fe lines, meaning that they may be susceptible to the limited data quality of the spectra.As the S/N degrades towards the warmer end of the temperature range, the abundance scatter increases in line with it.This leads to a less precise TOP average abundance and at most marginally significant trends: Δ(TOP − RGB) = −0.06± 0.06, −0.07 ± 0.07 and −0.11 ± 0.11 dex for silicon, titanium and iron, respectively.The abundance trend in iron is somewhat smaller than those between MS and RGB stars found in the literature (see Table 1).However, our abundance trend in iron differs from the null result reported by Mu11 who analysed the same spectra.Differences in stellar parameters (17 ± 129 K for dwarfs, −58 ± 21 K for giant stars) are not sufficient to explain the difference, which is more likely to stem from our use of group-averaged spectra and lines of ionised species, while Mu11 analysed lines of neutral species (in LTE) of individual stars.We note that since the abundances of Fe and Ti are derived from lines of the ionised (majority) species, the trends are rather robust to errors in the eff scale, as well as essentially immune to 3D and NLTE effects (see Sect. 3.8.2 and 3.8.1).The same holds for Si.

C, N, and O
We derived carbon and oxygen abundances simultaneously from neutral atomic lines, along with nitrogen abundances from a large number of vanishingly weak CN features in the cool giants (see the discussion in Sect.3.7).Although the individual CN lines are weak, their combined influence on the 2 minimisation appears sufficient to broadly classify stars as either rich or poor in nitrogen.We find the best constraints on the N abundance in our coolest RGB stars.We do not fit nitrogen abundances in the dwarfs, given the weakness of the CN features.We illustrate the variation found in these features in Fig. 6, comparing the spectra of stars with similar stellar parameters but different abundances of carbon, nitrogen and oxygen.
Amongst the giant stars, carbon and oxygen abundances both exhibit a tip-to-tip scatter of 0.5 dex ( = 0.12 and 0.11 dex).Abundances derived from the group-averaged spectra show similar, strong, trends with evolutionary phase: Δ(TOP − RGB) = −0.24± 0.10 and −0.27 ± 0.04 for C and O, respectively.
Comparing our C abundances, derived in NLTE from the neutral line at 9112 Å, with those in the literature derived from CN lines or the CH G-band reveals large offsets.The lowest C abundances were found in rather evolved stars by Ivans et al. (1999), [C/Fe] = −0.50(or −0.35 when adjusted to the solar abundance scale of Grevesse et al. 2007), while Villanova & Geisler (2011) found a slightly higher value, [C/Fe] = −0.28.Our average value in the RGB stars, [C/Fe] = 0.05 ± 0.15, is significantly higher, and does not appear to change systematically over the intrinsic scatter in the most evolved giants.We note that the NLTE correction for the C line at 9112 Å in our work typically reduces the abundance by 0.2 dex.The abundance corrections from Amarsi et al. ( 2019) are more positive by roughly 0.1 dex, implying a minor systematic shift in our abundances, thus further increasing the difference with the literature.We note however that comparisons of C and N abundances amongst red giants stars crucially depend on the precise evolutionary state of the star, as dredge-up significantly alters these surface abundances in a way that is not well predicted from first principles (e.g., Placco et al. 2014;Henkel et al. 2017;Lagarde et al. 2019).
The oxygen abundances we find are again somewhat higher than those previously reported in the literature.For our RGB stars, we find a mean [O/Fe] = 0.67 ± 0.10 dex, which is higher than the results of line at 6300 Å, which in metal-poor stars is understood to be nearly immune to NLTE and 3D effects (Amarsi et al. 2016) and to the blend with Ni that is otherwise influential in solar-metallicity stars (Bergemann et al. 2021).We note that on the alternative temperature scale eff, ion , our average [O/Fe] = 0.58 ± 0.09 is in excellent agreement with the results of Yong et al. (2008b).This agreement lends support to the accuracy of temperatures derived from this form of the ionisation equilibrium, which thanks to the ease with which the average [Fe/H] can be measured, as compared to abundances of individual lines in the excitation equilibrium, may be suitable in general for spectroscopy of faint cluster members and especially at low S/N and low resolution.
Abundance ratios are compared in Fig. 7.A bimodal distribution of nitrogen abundances among the giants is apparent, with a gap near [N/Fe] ∼ 0.5.The sample thus splits into two well separated groups having different light-element contents.This behaviour was previously noted by Marino et al. (2008), and confirmed by Villanova & Geisler (2011).Both authors found also that sodium abundances correlated well with nitrogen.From their findings, they concluded that M4 has two distinct chemical populations.We confirm this conclusion and find 10 N-poor giants which belong to the first generation, and 30 N-rich giants belonging to the second generation.This indicates that 25 ± 7 % of our stars belong to the first generation, in good agreement with the study by Carretta et al. (2013, 20 %), as well as the general consensus that about 1/3 of the stars    2008) and Villanova & Geisler (2011) have found, which generally supports the N abundances we derive.We calculated the total C+N+O abundance, where possible, and find it to be constant as expected from stellar evolution, with a mean value of 8.32 ± 0.08.This is somewhat higher than was found by Villanova & Geisler (2011) and Ivans et al. (1999), who derived 8.16 and 8.24 respectively.Table 6 gives the average abundances for the N-poor and N-rich sub-populations.Based on this abundance data, we find that the two sub-populations identified according to [N/Fe] have significant abundance differences in their abundances of C and O, and possibly Al, but no significant differences in Li, C+N+O, Mg, Si, Ca, Ti, Fe, Ni and Ba.We will return to this in Sect.4.4.2 and 4.5 below.

Mg, Al and K
Besides the light elements C, N and O, we also derive abundances for magnesium, aluminium and potassium.The Al abundances show large variations of up to 0.5 dex measured tip-to-tip ( = 0.11 dex).Mg and K show hardly any intrinsic variation, with tip-to-tip differences of just 0.2 dex ( = 0.04 and 0.09 dex).All elements again show evidence for a gradual increase in abundances with decreasing eff in the group-averaged spectra.The size of the abundance trends of Mg and K is comparable to that found for Si.Al, on the other hand, shows a stronger trend, more comparable to that of carbon or oxygen.
From studies on chemical populations in globular clusters, we expect magnesium to be anti-correlated with sodium.Unfortunately we do not have information on sodium in our spectra.In massive clusters   such as NGC 6752, NGC 2808 and NGC 7078, (anti-)correlations linking Mg-Al and Si-Al have also been observed (Yong et al. 2005;Carretta et al. 2009).M4, however, does not show evidence of a Mg-Al anti-correlation in our data.The (anti-)correlations between Al and O, Mg and Si for the giants are illustrated in Fig. 8 where we make a distinction between N-rich and N-poor stars, defined by a separation at [N/Fe] = 0.5.We find a clear Si-Al correlation and O-Al anti-correlation, both significant on the 3 level (taking into account errors on both values, using the IDL routine _ , see Kelly 2007) but no Mg-Al anti-correlation.
Low Al and Si abundances are only found in the N-poor stars, suggesting that a N-Al correlation is present.The average Al abundances for the two sub-populations differ by 0.13 ± 0.18 dex, where the large dispersion in the N-poor group dominates the uncertainty and thus precludes us from drawing any firm conclusion, although an anti-correlation is formally highly significant at 4 .We find that the stars with the lowest Al abundance are characterised by low abundances of N and correspondingly high C and O in line with several previous studies (Ivans et al. 1999;Marino et al. 2008;Carretta et al. 2013;Nataf et al. 2019;Mészáros et al. 2020).Villanova & Geisler (2011), on the other hand, did not find N-Al or Si-Al correlations and argue that a possible N-Al correlation may be spuriously caused by an unrecognised molecular line (possibly CN) blended with the Al lines at 6696-6698Å.Our inclusion of two additional Al lines at 7835-7836 Å should help diminish such effects.By visually inspecting the agreement of the two Al doublets in both N-rich and N-poor stars, we conclude that the variation in Al is real, and that the N-Al and Si-Al correlations are plausible.Interesting to note are the large variations in Al and Si observed in the N-poor stars.We will discuss this further in Sect.5.4.

Heavy elements
We derived abundances for the neutron-capture element barium, whose production in the solar chemical composition is dominated by the s-process (Arlandini et al. 1999;Simmerer et al. 2004).We derived NLTE-corrected Ba abundances for all stars, and find a mean value when considering the group-averaged RGB spectra of [Ba/Fe] = 0.38 ± 0.08, or 0.22 ± 0.07 for the group-averaged TOP stars.The result for the RGB stars agrees well with three out of four values found in the literature, [Ba/Fe] = 0.60 ± 0.10, 0.41 ± 0.09, 0.50 ± 0.12 and 0.32 ± 0.04 from Ivans et al. (1999), Marino et al. (2008), D'Orazi et al. (2010) and Villanova & Geisler (2011), respectively.

Atomic diffusion trends
Abundance trends with eff for magnesium, calcium, titanium and iron are shown in Fig. 9.The squares in the figure represent the abundances derived from the coadded group-averaged spectra, while abundances for the individual stars are shown as grey diamonds.The observed abundances are compared to predictions from stellar evolution models that take into account the effects of atomic diffusion (AD) and additional mixing (AddMix), described in further detail in Sect.3.1.
The abundance trends in Fig. 9 are compared to AD models at three different efficiencies of AddMix.The T6.0 (log 0 = 6.0) grid of models represents models with low efficiency of AddMix, which has previously been found to well match observations in NGC 6397 (Korn et al. 2007;Lind et al. 2008;Nordlander et al. 2012).The stronger mixing of the T6.2 models counteracts the effects of AD more efficiently, resulting in weaker abundance trends as compared to the T6.0 models.This grid of models with higher efficiency was preferred to explain the trends observed in NGC 6752 (Gruyters et al. 2013(Gruyters et al. , 2014) ) and in M30 (Gavel et al. 2021).The present results prefer T6.2 over T6.0, primarily on the basis of the shallow abundance variations in Mg and Fe.We have also included models with very high efficiency of AddMix (T6.3), but note that these only differ significantly from the T6.2 models in the predicted evolution of lithium.The effects on surface abundances in TOP stars differ between the T6.2 and T6.3 models by just 0.02 dex for elements like carbon, oxygen, magnesium and silicon, but even less for calcium, titanium and iron-peak elements.Effects on lithium however differ by 0.4 dex, due to the large amount of burning caused by deeper mixing in the T6.3 grid of models.We thus prefer the T6.2 models over T6.3 on the grounds of remaining conservative in estimating the effects on lithium (see Sect. 5.2).
Given the consistent appearance of abundance trends in five elements, in good agreement with model predictions regarding both sign and magnitude, it seems unlikely that these trends are a spurious result of errors in measurements and stellar parameters, and modelling shortcomings.For example, due to the weak temperature sensitivity of lines of singly ionised species, flattening the abundance trend determined in iron would require, e.g., raising temperatures on the TOP by +450 K, or on the RGB by +250 K, in contrast to the estimated uncertainties of 100 and 50 K, respectively.Similarly, the (formally) required changes on the TOP by +0.2 dex in log or +1.7 km s −1 in mic , or on the RGB by −0.4 dex and +0.6 km s −1 are considered unlikely.Additionally, such changes could not simultaneously generate null trends in all five elements.

Evolution of lithium
We compare lithium abundances to model predictions in Fig. 10.While the models of low-efficiency AddMix, T6.0, predict a slight upturn in surface lithium abundances as stars evolve onto the SGB, the higher-efficiency model T6.2 instead predicts a slight decrease.This is a direct consequence of the depths where AddMix operates: In the low-efficiency models, gravitational settling causes the Li abundance to increase with depth below the convective zone during the main sequence, in layers where the temperature is not high enough to destroy Li.When the star evolves off the main sequence, the convection zone expands inwards and the settled material resurfaces (see Korn et al. 2006).By contrast, in the higher-efficiency T6.2 models AddMix operates over a larger extent inside the star, without significant deposition of Li below the convection zone (see section 3.4.3 of Richard et al. 2005 for details).As the convection zone expands inward, lithium-depleted material dilutes the surface composition.In the T6.3 models with highest efficiency of AddMix, lithium is brought directly to regions where temperatures are sufficient for nuclear burning, resulting in strongly depleted surface layers already at the TOP.
This same dilution mechanism is responsible for the rapid decrease in surface lithium abundances along the SGB, during the first dredge-up.Firstly, we find that abundances at the TOP-SGB transition, (Li) = 2.19 ± 0.04, are lower than those on the TOP, (Li) = 2.40 ± 0.09, which disfavours the lithium turn-up predicted by the low-efficiency AddMix model.Secondly, we find that the observed smooth decrease in lithium abundances during the first dredge-up match predictions reasonably well.Following the dredgeup, a plateau is reached on the RGB, with an average abundance of .Evolutionary abundance trends of Mg, Ca, Ti and Fe.Mg abundances are derived from neutral lines, while Ti and Fe are derived from lines of singly ionised species, and Ca is based on a mixture of lines of both neutral and singly ionised species.The trends are compared to predictions from stellar structure models including AD with additional mixing with different efficiencies, at an age of 12 Gyr.Horizontal, dashed lines represent the initial abundances of the models, which have been adjusted so that predictions match the observed abundance level of the coolest stars.Blue squares represent results for group-averaged coadded spectra, while gray diamonds represent results for individual stars.
(Li) = 1.09 ± 0.05.Finally, lithium abundances drop sharply on the cool end of the RGB, with three stars exhibiting values significantly below the plateau, averaging (Li) = 0.49± 0.05.The physics of this extra-mixing episode, likely caused by thermohaline mixing, are not included in our models, but are available and well described elsewhere (e.g., Dearborn et al. 2006;Charbonnel & Lagarde 2010;Henkel et al. 2017).
The evolution of Li is qualitatively consistent with that presented by Mu11.Comparing lithium abundances, their abundances are lower by 0.10 dex among the TOP stars, on the RGB by 0.17 dex and after the extra-mixing episode by 0.26 dex.The rather large difference for RGB stars cannot be explained by differences in stellar parameters (our eff values are lower by 58±21 K, leading to lower abundances by 0.07 dex) and NLTE corrections (their corrections are more positive by roughly 0.10 and 0.15-0.20 dex at the lower and upper stages on the RGB).
We correct the observed lithium abundances for the predicted amount of depletion using the T6.2 models, resulting in an average (weighted mean) initial lithium abundance of (Li) init = 2.70 ± 0.08 among the TOP stars.This is in fair agreement with the corresponding value recovered from the RGB plateau, 2.59 ± 0.07, with a difference Δ (Li) init (TOP − RGB) = 0.11, and for the full sample of stars (excluding the three brightest RGB), (Li) init = 2.63 ± 0.10.We adopt this latter result as our recommended value, and note its close agreement with values determined for NGC 6752 (2.58 ± 0.10 or 2.53 ± 0.10, Gruyters et al. 2013, 2014), NGC 6397 (2.57 ± 0.10, Nordlander et al. 2012) and M30 (2.48 ± 0.10, Gruyters et al. 2016).
Unfortunately, physical shortcomings of the stellar evolution models aside, additional uncertainty stems from the choice of AddMix efficiency.For example, selecting the weaker efficiency T6.0 results in an average (Li) init = 2.55 (with Δ (Li) init (TOP − RGB) = 0.09 dex) while higher efficiency, T6.25, results in (Li) init = 2.73 (with Δ (Li) init (TOP − RGB) = 0.17 dex), nevertheless, both values are in agreement with our recommended value.Increasing the AddMix efficiency even more to T6.3 results in (Li) init = 2.97 ± 0.16, albeit with considerably larger difference between the initial abundance deduced from TOP and RGB stars, Δ (Li) init (TOP−RGB) = 0.28 dex.This is because such high efficiency of AddMix leads to a lithium reduction at the TOP that is dominated by nuclear burning rather than deposition; the lithium gap between the TOP and RGB plateau therefore constrains the maximum efficiency of the mixing to a value less than T6.3.Mucciarelli et al. (2022) discovered a thin lithium plateau in metal-poor RGB stars, in addition to the lithium plateau.They found that models similar to ours, including AddMix, could reproduce both plateaus with the same value of AddMix throughout evolution, as we obtain for M4 in this work.We note that the 3D NLTE abundance corrections from Wang et al. (2021) lead to lower abundances derived from the RGB stars by roughly 0.15 dex, which would significantly worsen the agreement for all models and in particular these higher efficiency models.
As noted in the previous section, the evolutionary effects of Add-Mix efficiencies in the range T6.2-T6.3 on elements other than lithium are treacherously indistinguishable.This makes an accurate inference of the initial lithium abundance from RGB stars alone, as proposed by Mu11, difficult as the inferred initial abundances in our case using the T6.2-6.3 models cover the range (Li) init = 2.63-2.83(see also Korn 2012).As an alternative to RGB stars, Gao et al. (2020) have identified pristine Li abundances in warm main-sequence field stars with masses above 1.3 M ⊙ (i.e., significantly younger than M4) that appear to have neither undergone depletion, nor been enhanced by Galactic chemical evolution.They identified a small number of moderately metal-poor field stars with −1.0 < [Fe/H] < −0.5 in this group, and found that these exhibit surface abundances (Li) = 2.69 ± 0.06 that are compatible with BBN predictions.
We have not accounted for Galactic production of lithium when deriving the initial Li abundance content of the cluster.The empirical trends of Li abundance with metallicity are found to vary in the literature: Ryan et al. (1999) and Asplund et al. (2006) found trends as steep as 0.1 dex per 1 dex in [Fe/H], Meléndez & Ramírez (2004) and Shi et al. (2007) found no trend at all, Bensby & Lind (2018) found opposite slopes in the thin and thick disks of the Galaxy, and Romano et al. (2021) identified an additional trend with Galactocentric distance.On the theoretical side, Prantzos (2012) predicts a (Galactic) production of merely 0.05 dex at this metallicity, due mainly to -nucleosynthesis in core-collapse supernovae rather than spallation by cosmic rays, while Fields & Olive (2022) predict a cosmic ray production of close to 0.1 dex.Accounting for post-primordial production by applying, e.g., an 0.1 dex downward correction of the derived stellar lithium abundance would further weaken the agreement with the CMB-calibrated BBN primordial Li value.Such a revision would only be consistent with a more efficient AddMix, as discussed above.There are also numerous nonstandard BBN scenarios that could bridge this gap, e.g., a higher value of the fine-structure constant by only a few ppm at the BBN time (Clara & Martins 2020;Deal & Martins 2021).
Another possibility for the low stellar abundances compared to the BBN-predicted primordial Li abundance was suggested by Piau et al. (2006).They argue that part of the discrepancy of order 0.2-0.3dex is explained by Population III stars that efficiently depleted lithium.This scenario was criticised by Prantzos (2006) who argued that even a slight depletion of lithium would likely be accompanied by prohibitively large oxygen production in these stars.Furthermore, one would expect the amount of mixing through Population III stars to vary depending on the mass of the parent galaxy.Instead, lithium abundances in the Sagittarius globular cluster M54, in the remnant dwarf galaxy Centauri, and in accreted stars, are similar to those found in Galactic field stars (Monaco et al. 2010;Mucciarelli et al. 2014;Simpson et al. 2021).

The eff scale
The magnitude of the abundance trends is a topic of debate and as shown by the discussion in Sect.3.5.2susceptible to errors in eff .To check whether the trends are spurious results of potential biases in the temperature scale, we executed the analysis on two other temperature scales.We refer to our main temperature scale, derived from the ( − )eff relations of Ramírez & Meléndez (2005) the spectroscopic eff scale constructed to uphold the ionisation equilibrium between Fe and Fe as eff, ion , and the spectroscopic eff scale constructed to produce a flat abundance trend deduced from Fe as eff, flat .We remind the reader that our reported abundance trend in [Fe/H] is based on lines of Fe , which are less sensitive to changes in eff .
The spectroscopic and photometric eff scales are affected by different types of biases.For example, the photometric eff scale obtained via calibration of observed photometric colours on the infrared flux method (IRFM) is largely insensitive to uncertainties in model atmospheres.It can, however, be affected by uncertainties in the photometry, non-linearities and discontinuities in the response of eff to photometric colour or chemical composition, lacking or uneven coverage in parameter space, uncertainties in reddening, etc.The spectroscopic eff scales are sensitive to modelling shortcomings for model atmospheres and line formation, as well as the quality of the spectra and the completeness of line lists.
Results of the three abundance analyses are compared in Table 7, and visualised in Fig. 11, where we also compare to model predictions.Compared to the photometric temperature scale, abundance trends on the spectroscopic eff scales eff, ion and eff, flat are systematically stronger and weaker, respectively, for magnesium, aluminium, potassium, calcium, nickel and barium, while carbon and oxygen show the opposite pattern.The abundances of silicon and of iron and titanium (based on ionised lines) remain essentially unchanged.
In summary, the trends in carbon, oxygen, aluminium, potassium, calcium, nickel and barium remain formally statistically significant, in that they deviate from no variation between TOP and RGB, by at least 1 on all three eff scales.This, in line with the reasoning in Sect.3.7, verifies that the observed abundance trends are indeed robust to uncertainties in the stellar parameters.(Gieles et al. 2018).Beyond the scenarios with multiple star-formation epochs, we note also the suggestion of late time accretion amongst coeval low-mass stars (Bastian et al. 2013).
The fact that M4 does not show evidence of a Mg-Al anticorrelation indicates that the Mg-Al burning cycle was not active in the polluting stars, implying that they did not reach core temperatures of 50 × 10 6 K that are required for the Mg-Al burning cycle.We use models from Decressin et al. (2007a) to derive an upper limit to the mass of fast-rotating massive stars (FRMS) in this scenario.Based on our range of [Mg/Al] ratios, we determine an upper limit to the mass of 20-40 M ⊙ .This is consistent with the upper-mass limit given by Villanova & Geisler (2011) based on the range in their [O/Na] ratios.Disregarding our very lowest abundances [N/Fe], our observed range in [C/N] is in line with predictions for the 40 M ⊙ model.This, together with the observed N-Al and Al-Si correlations, seems to suggest that the Mg-Al cycle was in fact active, especially since the Al-Si correlation is a direct result of leakage from the Mg-Al cycle on 28 Si which requires a temperature of at least 65 × 10 6 K (Carretta et al. 2009).Evidence for an active Mg-Al cycle was also presented by Marino et al. (2011).This suggests that the pollution scenario involves pollution by FRMS with masses of roughly 40 M ⊙ .However, the high [C/N] values detected in the N-poor stars seem to suggest that there is some other pollution mechanism at work as well.
Villanova & Geisler (2011) ruled out a pollution scenario in which the second generation of stars was born from material polluted by AGB stars.They found that the barium abundances they derived for a group of RGB stars in M4 do not show a bimodal behaviour, while the yttrium abundances do.They argued that, since their observations are not in line with AGB yields calculated by Karakas et al. (2010) which indicate a similar behaviour for the s-process elements if the pollution is driven by massive AGB stars, the AGB scenario is not plausible.Mészáros et al. (2020) argue the s-process enhancement must be unrelated to the light element abundance variations, i.e. the pollution must have been introduced after the clusters had already formed (see also Masseron et al. 2019).
We note that AGB stars may be able to produce Li through the  12. Abundances of lithium compared to the abundance ratios over iron of carbon (left), oxygen (middle) and aluminium (right).All abundances have been corrected for the evolutionary effects of atomic diffusion and dredge-up.The predicted primordial lithium abundance based on CMB-calibrated BBN calculations (see text) is indicated by the dotted line and shaded region.Symbols and colours are the same as in Fig. 7, with small blue squares representing dwarfs, and red crosses and black diamonds representing N-poor and N-rich giants, respectively.Cameron & Fowler (1971) mechanism.We have used the T6.2 stellar evolution models to remove the influence of AD on surface abundances to derive the initial abundances of Li, C, O and Al for our full sample of dwarfs and giants, and present these in Fig. 12.We do not uncover any clear (anti-)correlations with Li for any of the three elements, nor any systematic variation with N in the giant stars.It was argued by D'Orazi & Marino (2010) that the lack of correlations could be a sign of Li production.While AGB stars would be the most likely candidate for this, it should be noted that the Cameron-Fowler mechanism is susceptible to assumptions on mass-loss rates and quite some fine-tuning would be required to achieve uniform Li abundances in our sample.
In light of the findings here and in the literature we suggest a scenario in which the pollution is caused by both FRMS and AGB stars.We can envision a scenario where the massive stars (∼ 40 M ⊙ ) of the first generation are FRMS which are responsible for the initial pollution.As the evolution proceeds, intermediate-mass stars (∼ 10 M ⊙ ) enter the AGB phase and are responsible for another injection of processed material.To get to the bottom of this, we suggest a new study in which one combines information on s-process abundances in a homogeneous analysis with (anti-)correlation information on the light elements.

CONCLUSIONS
Our chemical abundance analysis indicates the existence of weak abundance trends along the subgiant branch in magnesium, silicon, calcium, titanium and iron.We find that these trends are robust to modelling uncertainties, as well as uncertainties in the eff scale.The observed trend in iron would, e.g., require changes of several hundred kelvin to flatten completely.Additionally, the trends are found to be in very good agreement with predictions from stellar structure models including atomic diffusion (AD) moderated by efficient additional mixing (AddMix).We also find statistically significant trends in carbon, oxygen, aluminium, potassium, nickel and barium, which are robust to uncertainties in the eff scale.We caution that some of these elements, such as K, may be significantly distorted by differential NLTE effects.
In the current formulation of the AddMix mechanism, its efficiency needs to be at least T6.2 in order to reproduce the observed trends.This is in agreement with results from NGC 6752 ([Fe/H] = −1.6,Gruyters et al. 2013Gruyters et al. , 2014) )  After correcting our measured lithium abundances for the predicted effects of AD and dredge-up, we determine an average initial lithium abundance of (Li) init = 2.63 ± 0.10.We note that results from the four globular clusters indicate consistent diffusion-corrected initial lithium abundances, in the very narrow range (Li) init = 2.48 (Gruyters et al. 2016) to 2.63 (this work), fully compatible with each other within the associated errors.
In order to constrain the properties of first-generation polluters in the cluster, we have compared abundances of elements that form under different conditions.The observed ranges of abundance ratios [Mg/Al] and [C/N] are consistent with an upper mass limit for the polluting stars of roughly 40 M ⊙ (Decressin et al. 2007a), in broad agreement with what Villanova & Geisler (2011) deduced from the same theoretical models using the corresponding range in [O/Na].We cannot, however, reconcile our non-detection of a Mg-Al anti-correlation with the detected N-Al and Al-Si correlations which indicate leakage from an active Mg-Al cycle.We thus ask stellar modellers to further investigate possible evolutionary scenarios which could generate these abundance patterns.
Table A1.Derived elemental abundances for the coadded group-averaged spectra.Abundance uncertainties are based on the statistical error as calculated by SME.The final column gives the abundance difference between TOP and RGB.The TOP and RGB abundances are the averages of results for the three respective coadded group-averaged spectra.The uncertainty on the trends is based on the standard deviation of the two averages.

Figure 1 .
Figure 1.Observed ( − )-colour-magnitude diagram of M4 before and after correcting for differential reddening.The spectroscopic targets are marked by black squares.The reddening vector is given by the solid line in the top left corner.The solid blue line indicates the fiducial sequence.

Figure 2 .
Figure 2. Observed ( − )-reddening map of M4, indicating variations in extinction, Δ, relative to the cluster average.Spectroscopic targets are marked by black crosses, while X marks the centre of the cluster.The blue colour indicates areas with less reddening, while red coloured areas are affected by a higher degree of reddening.The coordinate system is normalised to the cluster centre at R.A. = 16 h 26 m 45.12 s , Dec = 26 • 18 ′ 35.4 ′′ .

Figure 3 .
Figure 3. Differential reddening Δ ( − ) deduced for spectroscopic targets, as a function of their effective temperature.The mean value −0.013 ± 0.032 mag is indicated by a solid blue line.Differential reddening values are on average slightly more negative for cooler stars (see text for further discussion).

Figure 4 .
Figure 4. Evolutionary abundance trends of iron derived from lines of Fe (left) and Fe (right) on the photometric eff scale.The blue squares indicate abundances derived from the coadded group-averaged spectra, while abundances of the individual stars are shown as grey diamonds.Overplotted are predictions from stellar structure models at an age of 12 Gyr, including atomic diffusion with different efficiencies of additional mixing.Note the different behaviour of the two trends, suggesting that the ionisation balance is not fulfilled in the coolest stars.

Figure 5 .
Figure 5. NLTE effects, taken as the average difference between NLTE and LTE abundance analyses of TOP (blue diamonds) and RGB stars (red crosses).Arrows indicate the net effect on abundance differences Δ (X ) (TOP−RGB), with positive values represented by upward arrows.

Figure 6 .
Figure 6.Comparison of the spectra of two RGB stars with similar stellar parameters, but very different abundances of carbon, nitrogen and oxygen.The synthetic (observed) spectra of M4-47719 are shown in black (grey) and for M4-57318 in red (magenta).Features of C , O and the CN molecule are indicated by vertical bars in each panel.The strong spurious feature at 7773 Å in M4-47719 was automatically flagged and ignored in the analysis of the spectrum.

Figure 7
Figure 7 shows the usual anti-correlations between C/O and N, where N-rich stars are characterised by low abundances of C/O, while N-poor stars exhibit high C/O abundances.In the third panel of the figure, the C-O correlation is displayed for giants and dwarfs.The relations are similar to what Marino et al. (2008) andVillanova & Geisler (2011)  have found, which generally supports the N abundances we derive.We calculated the total C+N+O abundance, where possible, and find it to be constant as expected from stellar evolution, with a mean value of 8.32 ± 0.08.This is somewhat higher than was found byVillanova & Geisler (2011)  andIvans et al. (1999), who derived 8.16 and 8.24 respectively.Table6gives the average abundances for the N-poor and N-rich sub-populations.Based on this abundance data, we find that the two sub-populations identified according to [N/Fe] have significant abundance differences in their abundances of C and O, and possibly Al, but no significant

Figure 7 .
Figure 7. Observed correlations between the light elements C, N and O. Red crosses indicate N-rich giants while N-poor giants are shown as black diamonds.We could not determine N-abundances in the dwarfs, and so compare only their abundances of C and O using blue squares.Typical uncertainties on the abundances are shown in the top right corner of the panels, in gray for giants and in black for dwarfs.

Figure 8 .
Figure 8. Observed correlations between aluminium and the light elements O, Mg and Si in giant stars.The symbols and colours are the same as in Fig. 7.The black cross in the top right corner of each panel represents the typical error on the abundances.
Figure9.Evolutionary abundance trends of Mg, Ca, Ti and Fe.Mg abundances are derived from neutral lines, while Ti and Fe are derived from lines of singly ionised species, and Ca is based on a mixture of lines of both neutral and singly ionised species.The trends are compared to predictions from stellar structure models including AD with additional mixing with different efficiencies, at an age of 12 Gyr.Horizontal, dashed lines represent the initial abundances of the models, which have been adjusted so that predictions match the observed abundance level of the coolest stars.Blue squares represent results for group-averaged coadded spectra, while gray diamonds represent results for individual stars.

Figure 10 .
Figure 10.Observed lithium abundances, compared to stellar evolution model predictions for different efficiencies of AddMix (see text).Measurements for individual stars are shown as grey diamonds, while squares correspond to the Li abundances derived from coadded spectra.The initial, i.e. diffusioncorrected, abundance of the models, (Li) = 2.63 ± 0.10, shown by the horizontal dashed line and shaded region, compares well to the predicted primordial lithium abundance, (Li) = 2.69, shown by the dotted horizontal line and shaded region.

COFigure 11 .
Figure 11.Elemental abundance trends on three different eff scales including our primary scale eff, phot .Abundances were determined from groupaveraged coadded spectra, and are shown connected by lines for clarity, with vertical lines indicating the standard deviation.Error bars shown are the statistical errors, added in quadrature for the TOP and RGB abundance measurements.The abundance of iron is based on Fe lines.The shaded background indicates the range of model predictions for different efficiencies of AddMix, with the T6.2 model indicated by a line.

Table 1 .
Spectroscopic metallicity determinations of evolved and unevolved stars in M4.

Table 2 .
Dereddened photometry, S/N measured in the continuum in all three spectrograph settings, and stellar parameters (complete table available electronically).

Table 3 .
Photometric stellar parameter selection and average photometric stellar parameters for the coadded group-averaged spectra.

Table 4 .
Abundance sensitivity to stellar parameters.Effects on abundances are shown for the hot and cool ends of our sample, i.e., the coadded spectra RGB1 and TOP3 in Table3.

Table 5 .
Average abundances based on the coadded spectra and obtained at two effective temperature points.

Table 6 .
Mean abundances of the two M4 sub-populations identified in the giant stars, and their combined mean values compared to literature values.

Table 7 .
Elemental abundance trends, derived on different eff scales including our primary scale eff, phot , and from stellar evolution models with three different values T for AddMix.Differences in abundances are based on the coadded spectra, and are given in the sense TOP-RGB.Average of individual star abundances rather than group averages, with eff, phot > 5900 K (TOP) and 4800 K < eff, phot < 5200 K (RGB).
Richard et al. 2002a0)o et al. ( , 2019) )er et al. 2012) NGC 6397 ([Fe/H] = −2.1,Kornetal.2007;Lindetal.2008;Nordlanderetal. 2012)where a weaker AddMix efficiency of T6.0 is required to match observations.Several open clusters with near-solar metallicity have been analysed in the literature.M67 (4 Gyr, [Fe/H] = 0.0) has been analysed by several authors:Önehag et al. (2014)found weak but systematic abundance differences between TOP and MS (using the solar twin M67-1194) at the level of just 0.03 dex, in excellent agreement with stellar evolution models without turbulent mixing;Gao et al. (2018)andLiu et al. (2019)found abundance differences of roughly 0.1 dex between TOP and SGB, which were in good agreement with the atomic diffusion models fromDotter et al. (2017); BertelliMotta et al. (2018)andSouto et al. (2018Souto et al. ( , 2019) )found abundance differences of typically 0.1-0.2dex between MS and RGB stars, in broad agreement with atomic diffusion both with and without AddMix.Semenova et al. (2020)analysed NGC 2420 (2.6 Gyr, [Fe/H] = −0.05),findingthatTOPstarsweredepletedby as much as 0.2 dex relative to lower-MS and RGB stars, in agreement with predictions with weak AddMix (T5.8).In binary field stars with broadly solar metallicity,Liu et al. (2021)found small but significant star-to-star abundance variations of a few 0.01 dex, in good agreement withDotter et al. (2017).In contrast to these solar-metallicity clusters that match predictions with weak or no AddMix, the solar A(Li) value is well predicted by a model with strong additional mixing (T6.2:Richard et al. 2002a).It is thus not clear how the trend in AddMix continues from [Fe/H] = −1.1 toward solar metallicity, and if there are other parameters to consider (e.g.stellar rotation).