docstr: The ith simple root of G_2
  
  Every lie algebra has a unique root system.
  Given a root system Q, there is a subset of the
  roots such that an element of Q is called a
  simple root if it cannot be written as the sum
  of two elements in Q.  If we let D denote the
  set of simple roots, then it is clear that every
  element of Q can be written as a linear combination
  of elements of D with all coefficients non-negative.
  
  Examples
  ========
  
  >>> from sympy.liealgebras.cartan_type import CartanType
  >>> c = CartanType("G2")
  >>> c.simple_root(1)
  [0, 1, -1]
code: def simple_root(self, i):
      """The ith simple root of G_2
  
      Every lie algebra has a unique root system.
      Given a root system Q, there is a subset of the
      roots such that an element of Q is called a
      simple root if it cannot be written as the sum
      of two elements in Q.  If we let D denote the
      set of simple roots, then it is clear that every
      element of Q can be written as a linear combination
      of elements of D with all coefficients non-negative.
  
      Examples
      ========
  
      >>> from sympy.liealgebras.cartan_type import CartanType
      >>> c = CartanType("G2")
      >>> c.simple_root(1)
      [0, 1, -1]
  
      """
      if i == 1:
          return [0, 1, -1]
      else:
          return [1, -2, 1]
  
file_path: sympy/sympy/liealgebras/type_g.py
imports: from .cartan_type import Standard_Cartan
  from sympy.core.backend import Matrix
label_desc: Use image node_id 3 for calling the TypeG obj's underlying member method code with example usage: obj.simple_root(i) and returns: list, list