Artificial General Intelligence (AGI): Concepts, Mathematics and Python Code