G-theory and its reduction to F(R)-gravity in FRW universe