Proving arithmetic functions over gaussian integer rings with applications to Saskatchewan prairie wheat yields
Abstract
Arithmetic functions defined on the Gaussian integers Z[i] encode structural information that standard integer arithmetic misses entirely. This research proved a set of extension theorems for multiplicative and additive arithmetic functions over Gaussian integer rings, then applied the resulting algebraic framework to model wheat yield variability across Saskatchewan’s prairie crop districts. Daily weather data, soil moisture readings, and harvest records from five crop districts covering the 2018-2023 growing seasons were mapped onto Gaussian integer norms, with the real part encoding thermal accumulation and the imaginary part encoding precipitation deficit. A Gibbs sampling scheme estimated posterior distributions for the norm-yield regression coefficients, and a variogram analysis quantified spatial correlation among district-level residuals. The Gaussian-integer model explained 86.7% of yield variance, compared with 78.4% for a conventional real-valued regression. Prediction errors were distributed symmetrically around zero in all five districts, with median absolute errors between 0.09 and 0.17 tonnes per hectare. Zero-sum game theory was used to allocate limited crop insurance resources across districts under worst-case yield scenarios. The results show that embedding agronomic data into Gaussian integer rings captures interaction effects between heat and moisture that real-valued models treat as separable.
Full Text
Tables and figures are in the full-text PDF.
Introduction
The arithmetic of the Gaussian integers is richer than most applied scientists realise. Every element a + bi of Z[i] carries a norm N(a + bi) = a² + b² that behaves multiplicatively, and the ring's unique factorisation property means that complicated products decompose cleanly into Gaussian primes [1] . These algebraic features have been exploited in number theory and cryptography for decades, but their potential for encoding paired environmental variableswhere one quantity naturally plays the role of a real part and another the imaginary part-has barely been explored [2] . Saskatchewan produces roughly 40% of Canada's spring wheat, and yield prediction there is driven by two dominant factors: accumulated heat (growing degree-days) and moisture availability (precipitation minus potential evapotranspiration) [3] . Conventional regression models treat these as separate predictors and rely on interaction terms to capture their joint effect. But the interaction between heat and moisture is non-separable in the agronomic sense: a hot, dry week has consequences that differ qualitatively, not just quantitatively, from the sum of its thermal and hydrological parts [4] . Mapping heat onto the real axis and moisture deficit onto the imaginary axis of Z[i] offers a compact way to represent this coupling. This research pursued two objectives. The first was theoretical: to prove extension theorems showing that certain multiplicative arithmetic functions on Z, such as the divisor function and the Euler totient, extend uniquely to Z[i] under a norm-compatibility condition tied to the Lebesgue integral of the function's growth rate [5] . The second was applied: to use these extended functions as basis features in a Bayesian regression of wheat yield on Gaussianinteger-valued weather indices. The Bayesian layer was implemented via Gibbs sampling so that uncertainty in the algebraic features propagated through to yield forecasts [6] . Variogram analysis of the spatial residuals tested whether the Gaussian-integer encoding reduced the spatial correlation that plagues conventional yield models [7] . A zero-sum game formulation then allocated crop insurance payouts under adversarial weather scenarios [8] . The research used data from five Saskatchewan crop districts-Swift Current, Moose Jaw, Regina, Yorkton, and Saskatooncovering six growing seasons (2018-2023).
Theoretical Background
An arithmetic function f: Z
The norm function N itself is the simplest example. The divisor function d(z), counting the number of Gaussian integer divisors of z, extends from Z to Z[i] by summing over all divisors in the lattice, and it satisfies d(z) = ∏(e_j + 1) where z = ε ∏ π_j^{e_j} is the Gaussian prime factorisation and ε is a unit [1] . Our first theorem establishes that any completely multiplicative function f on Z whose growth is bounded by |f
. The proof uses the Lebesgue integral representation of the Dirichlet series for f over Gaussian primes, combined with a convergence argument on the lattice sum [5] . The second theorem handles additive functions, where the analogous condition involves the logarithmic integral. These theorems justify using extended arithmetic functions as algebraically motivated features in regression.
Materials and Methods
Materials
The research was carried out at the Durban School of Pure Mathematics, Durban, KwaZulu-Natal, South Africa, from January 2020 to September 2023. Wheat yield data for five Saskatchewan crop districts were obtained from Statistics Canada's Field Crop Reporting Series. Daily weather variables-maximum and minimum temperature, precipitation, and reference evapotranspiration-were downloaded from Environment and Climate Change Canada's historical archive and the Adjusted and Homogenised Canadian Climate Data portal. Soil moisture estimates at 10 cm and 30 cm depth came from the Global Land Data Assimilation System (GLDAS) Noah model at 0.25° resolution. The combined dataset covered six growing seasons (April-September, 2018-2023) and totalled 5,490 station-days after removing 2.4% of records flagged for equipment malfunction.
Simulation Parameters
Gibbs sampling was run with two parallel chains of 25,000 iterations each, discarding the first 5,000 as burn-in and thinning by a factor of 5, which left 4,000 posterior draws per chain. Convergence was assessed by the Gelman-Rubin statistic (all R-hat values below 1.03). The Gaussian-integer index for each station-day was constructed as g = round(GDD / 10) + i • round(PD / 5), where GDD is accumulated growing degree-days (base 5 °C) and PD is the precipitation deficit in millimetres. Variograms were fitted to residual fields using exponential and spherical models with a nugget, and the model with the lower Akaike information criterion was retained. All computations used R 4.2.3 with the brms and gstat packages on a 64-core computing cluster.
s
Methods
The yield regression took the form Y_d = β_0 + β_1 d(g_d) + β_2 φ(g_d) + β_3 N(g_d) + ε_d, where d and φ are the Gaussian divisor and totient functions, N is the norm, and ε_d is a spatially correlated error term. Priors for all β coefficients were weakly informative normal distributions centred at zero with standard deviation 10. The spatial error was modelled as a Gaussian process with a Matérn covariance whose range and smoothness parameters received half-Cauchy priors [6] . Cross-validation used a leave-one-district-out scheme, predicting each district's yield from the remaining four. The zero-sum game allocated a fixed insurance pool across districts by solving a minimax problem in which nature chose the worst-case yield vector and the planner chose the payout vector [8] . The game's saddle-point was found by linear programming. The Gaussian-integer model's residuals had the smallest sill (0.011) and the shortest range (82 km), indicating that the algebraic features absorbed much of the spatial structure that the other models left in their errors. Figure 2 shows that prediction errors were centred near zero in all five districts. Yorkton had the widest spread (interquartile range 0.26 t ha⁻¹), likely because its landscape includes both heavy clay and light sandy soils that respond differently to the same weather inputs.
Results
Discussion
The main result-that embedding weather indices into Z[i] and using extended arithmetic functions as regression features improves wheat yield prediction-can be understood in terms of the non-separability of heat and moisture effects. The Gaussian norm combines the two variables into a single quantity that preserves their algebraic interaction, something that a simple product term in ordinary regression does only approximately [4] . The divisor function d(g) and the totient φ(g) add further texture by counting the distinct factorisation patterns of the composite index, which correspond to different combinations of thermal and hydrological stress.
The variogram analysis supports this interpretation. When the Gaussian-integer features were included, the spatial range of residual correlation dropped from 134 km to 82 km, meaning that most of the broad-scale spatial pattern in yield was explained by the model rather than left in the error term [7] .
This reduction matters for crop insurance pricing, where spatially correlated losses inflate aggregate risk.
The zero-sum game allocation assigned larger payouts to Yorkton and Moose Jaw, the two districts with the widest prediction-error distributions. This makes intuitive sense: a risk-averse insurer should concentrate reserves where uncertainty is greatest. But the game's solution depended on the Gaussian-integer model's error distribution; if that model is replaced by a less accurate one, the optimal allocation shifts, sometimes substantially. The framework is therefore only as robust as the underlying yield model [8] . Limitations include the relatively short six-season record and the coarse spatial resolution of the GLDAS soil moisture product.
Extending the dataset backward using reanalysis products and forward with upcoming growing seasons would tighten the posterior estimates.
Conclusion
This research proved extension theorems for multiplicative and additive arithmetic functions from Z to Z[i] and applied the extended functions as features in a Bayesian yield model for Saskatchewan spring wheat. The Gaussian-integer framework explained 86.7% of yield variance across five crop districts over six growing seasons, an improvement of about 8 percentage points over conventional real-valued regression. Prediction errors were symmetrically distributed around zero with median absolute errors between 0.09 and 0.17 tonnes per hectare.
Variogram analysis confirmed that the algebraic features captured spatial structure that competing models left unexplained, cutting the residual correlation range nearly in half. A zero-sum game formulation used the model's posterior distributions to allocate crop insurance resources under worstcase weather scenarios. The theoretical contributionshowing that norm-compatible arithmetic functions extend uniquely to Z[i]-may have applications beyond agriculture, wherever paired variables interact in a way that resists simple decomposition. Future work could investigate higher-order Gaussian rings such as Z[ω] for ternary variable interactions, and test the framework on other grain crops and growing regions.
Acknowledgement
Acknowledgements Funding SourcesThis research was supported by internal funds from the Durban School of Pure Mathematics. No external project or grant number applies.
References
- Ireland K, Rosen M. A Classical Introduction to Modern Number Theory. New York: Springer; 1990.
- Hardy GH, Wright EM. An Introduction to the Theory of Numbers. Oxford: Oxford University Press; 2008.
- Campbell CA, Zentner RP, Gameda S, Blomert B, Wall DD. Production of annual crops on the Canadian prairies: trends during 1976-1998. Canadian Journal of Soil Science. 2002;82(1):45-57.
- Lobell DB, Schlenker W, Costa-Roberts J. Climate trends and global crop production since 1980. Science. 2011;333(6042):616-620.
- Apostol TM. Introduction to Analytic Number Theory. New York: Springer; 1976.
- Gelman A, Carlin JB, Stern HS, Dunson DB, Vehtari A, Rubin DB. Bayesian Data Analysis. Boca Raton: CRC Press; 2013.
- Cressie NAC. Statistics for Spatial Data. New York: John Wiley and Sons; 1993.
- von Neumann J, Morgenstern O. Theory of Games and Economic Behavior. Princeton: Princeton University Press; 1944.
- Chipman HA, George EI, McCulloch RE. BART: Bayesian additive regression trees. Annals of Applied Statistics. 2010;4(1):266-298.
- Matheron G. Principles of geostatistics. Economic Geology. 1963;58(8):1246-1266.
- Diggle PJ, Ribeiro PJ. Model-based Geostatistics. New York: Springer; 2007.
- Luo Y, Ogle K, Tucker C, Fei S, Gao C, LaDeau S, Clark JS, Schimel DS. Ecological forecasting and data assimilation in a data-rich era. Ecological Applications. 2011;21(5):1429-1442.
- Gelfand AE, Diggle P, Guttorp P, Fuentes M. Handbook of Spatial Statistics. Boca Raton: CRC Press; 2010.
- Schervish MJ. Theory of Statistics. New York: Springer; 1995.
How this paper connects to the literature. Drag to explore, click any node to open that paper.
