Comparing AIC of Tensor Product Smooths versus Thin Plate Splines I'm comparing the AIC of these two models.
Tensor Product Smooth vs. Thin Plate Spline both fit using REML
library(mgcv)

ThinPlateSpline <- gam(Z ~ s(X1, X2, bs="tp", k = 17), data = DF,  method="REML")
TensorProductSmooth <- gam(Z ~ te(X1, X2, k = 6), data = DF,  method="REML")

AIC(ThinPlateSpline, TensorProductSmooth)

Is the AIC comparison mathematically justifiable, if not, why not?

AIC is valid for my question. It's confirmed in the book:
Generalized Additive Models: An Introduction with R (SECOND EDITION), by Simon Wood
BRAIN IMAGING EXAMPLE:
m2 <- gam(medFPQ~s(Y,X,k=100),data=brain,family=Gamma(link=log))
tm <- gam(medFPQ~te(Y,X,k=10),data=brain,family=Gamma(link=log))
tm1 <- gam(medFPQ ~ s(Y,k=10,bs="cr") + s(X,bs="cr",k=10) + ti(X,Y,k=10), data=brain, family=Gamma(link=log))
AIC(m1,m2,m3)

