Mathematical foundations for System Science