Statistics for Derived Geometry and the Integrability Problem for G-Structures