In string theory with ten dimensions, all Dp-branes are constructed from D0-branes whose action has two-dimensional brackets of Lie 2-algebra. Also, in M-theory, with 11 dimensions, all Mp-branes are built from M0-branes whose action contains three-dimensional brackets of Lie 3-algebra. In these theories, the reason for difference between bosons and fermions is unclear and especially in M-theory there is not any stable object like stable M3-branes on which our universe would be formed on it and for this reason it cannot help us to explain cosmological events. For this reason, we construct G-theory with M dimensions whose branes are formed from G0-branes with N-dimensional brackets. In this theory, we assume that at the beginning there is nothing. Then, two energies, which differ in their signs only, emerge and produce 2M degrees of freedom. Each two degrees of freedom create a new dimension and then M dimensions emerge. M-N of these degrees of freedom are removed by symmetrically compacting half of M-N dimensions to produce Lie-N-algebra. In fact, each dimension produces a degree of freedom. Consequently, by compacting M-N dimensions from M dimensions, N dimensions and N degrees of freedom is emerged. These N degrees of freedoms produce Lie-N-algebra. During this compactification, some dimensions take extra i and are different from other dimensions, which are known as time coordinates. By this compactification, two types of branes, Gp and anti-Gp-branes, are produced and rank of tensor fields which live on them changes from zero to dimension of brane. The number of time coordinates, which are produced by negative energy in anti-Gp-branes, is more sensible to number of times in Gp-branes. These branes are compactified anti-symmetrically and then fermionic superpartners of bosonic fields emerge and supersymmetry is born. Some of gauge fields play the role of graviton and gravitino and produce the supergravity. The question may arise that what is the physical reason which shows that this theory is true. We shown that G-theory can be reduced to other theories like nonlinear gravity theories in four dimensions. Also, this theory, can explain the physical properties of fermions and bosons. On the other hand, this theory explains the origin of supersymmetry. For this reason, we can prove that this theory is true. By reducing the dimension of algebra to three and dimension of world to 11 and dimension of brane to four, G-theory is reduced to F(R)-gravity.