class_docstr: Class for the Kendall pre-shape space bundle.
class_docstr_tok: ["Class","for","the","Kendall","pre-shape","space","bundle","."]
docstr: Compute the fundamental tensor A of the submersion.
  
  The fundamental tensor A is defined for tangent vectors of the total
  space by [ONeill]_
  :math:`A_X Y = ver\nabla^M_{hor X}(hor Y) + hor \nabla^M_{hor X}(ver Y)`
  where :math:`hor, ver` are the horizontal and vertical projections.
  
  For the Kendall shape space, we have the closed-form expression at
  base-point P [Pennec]_:
  :math:`A_X E = P Sylv_P(E^\top hor(X)) + F + <F,P> P` where
  :math:`F = hor(X) Sylv_P(P^\top E)` and :math:`Sylv_P(B)` is the
  unique skew-symmetric matrix :math:`\Omega` solution of
  :math:`P^\top P \Omega + \Omega P^\top P = B - B^\top`.
  
  Parameters
  ----------
  tangent_vec_x : array-like, shape=[..., k_landmarks, m_ambient]
      Tangent vector at `base_point`.
  tangent_vec_e : array-like, shape=[..., k_landmarks, m_ambient]
      Tangent vector at `base_point`.
  base_point : array-like, shape=[..., k_landmarks, m_ambient]
      Point of the total space.
  
  Returns
  -------
  vector : array-like, shape=[..., k_landmarks, m_ambient]
      Tangent vector at `base_point`, result of the A tensor applied to
      `tangent_vec_x` and `tangent_vec_e`.
  
  References
  ----------
  .. [ONeill]  O’Neill, Barrett. The Fundamental Equations of a
      Submersion, Michigan Mathematical Journal 13, no. 4
      (December 1966): 459–69. https://doi.org/10.1307/mmj/1028999604.
  
  .. [Pennec] Pennec, Xavier. Computing the curvature and its gradient
      in Kendall shape spaces. Unpublished.
docstr_tok: ["Compute","the","fundamental","tensor","A","of","the","submersion",".","The","fundamental","tensor","A","is","defined","for","tangent","vectors","of","the","total","space","by","[","ONeill","]","_",":","math",":","`","A_X","Y","=","ver\\nabla^M_","{","hor","X","}","(","hor","Y",")","+","hor","\\nabla^M_","{","hor","X","}","(","ver","Y",")","`","where",":","math",":","`","hor",",","ver","`","are","the","horizontal","and","vertical","projections",".","For","the","Kendall","shape","space",",","we","have","the","closed-form","expression","at","base-point","P","[","Pennec","]","_",":",":","math",":","`","A_X","E","=","P","Sylv_P","(","E^\\top","hor","(","X",")",")","+","F","+","<","F",",","P",">","P","`","where",":","math",":","`","F","=","hor","(","X",")","Sylv_P","(","P^\\top","E",")","`","and",":","math",":","`","Sylv_P","(","B",")","`","is","the","unique","skew-symmetric","matrix",":","math",":","`","\\Omega","`","solution","of",":","math",":","`","P^\\top","P","\\Omega","+","\\Omega","P^\\top","P","=","B","-","B^\\top","`",".","Parameters","--","--","--","--","--","tangent_vec_x",":","array-like",",","shape=","[","...",",","k_landmarks",",","m_ambient","]","Tangent","vector","at","`","base_point","`",".","tangent_vec_e",":","array-like",",","shape=","[","...",",","k_landmarks",",","m_ambient","]","Tangent","vector","at","`","base_point","`",".","base_point",":","array-like",",","shape=","[","...",",","k_landmarks",",","m_ambient","]","Point","of","the","total","space",".","Returns","--","--","--","-","vector",":","array-like",",","shape=","[","...",",","k_landmarks",",","m_ambient","]","Tangent","vector","at","`","base_point","`",",","result","of","the","A","tensor","applied","to","`","tangent_vec_x","`","and","`","tangent_vec_e","`",".","References","--","--","--","--","--","..","[","ONeill","]","O","\u2019","Neill",",","Barrett",".","The","Fundamental","Equations","of","a","Submersion",",","Michigan","Mathematical","Journal","13",",","no",".","4","(","December","1966",")",":","459\u201369",".","https",":","\/\/doi.org\/10.1307\/mmj\/1028999604",".","..","[","Pennec","]","Pennec",",","Xavier",".","Computing","the","curvature","and","its","gradient","in","Kendall","shape","spaces",".","Unpublished","."]
code: def integrability_tensor(
      self, tangent_vec_x, tangent_vec_e, base_point
  ):
      r"""Compute the fundamental tensor A of the submersion.
  
      The fundamental tensor A is defined for tangent vectors of the total
      space by [ONeill]_
      :math:`A_X Y = ver\nabla^M_{hor X}(hor Y) + hor \nabla^M_{hor X}(ver Y)`
      where :math:`hor, ver` are the horizontal and vertical projections.
  
      For the Kendall shape space, we have the closed-form expression at
      base-point P [Pennec]_:
      :math:`A_X E = P Sylv_P(E^\top hor(X)) + F + <F,P> P` where
      :math:`F = hor(X) Sylv_P(P^\top E)` and :math:`Sylv_P(B)` is the
      unique skew-symmetric matrix :math:`\Omega` solution of
      :math:`P^\top P \Omega + \Omega P^\top P = B - B^\top`.
  
      Parameters
      ----------
      tangent_vec_x : array-like, shape=[..., k_landmarks, m_ambient]
          Tangent vector at `base_point`.
      tangent_vec_e : array-like, shape=[..., k_landmarks, m_ambient]
          Tangent vector at `base_point`.
      base_point : array-like, shape=[..., k_landmarks, m_ambient]
          Point of the total space.
  
      Returns
      -------
      vector : array-like, shape=[..., k_landmarks, m_ambient]
          Tangent vector at `base_point`, result of the A tensor applied to
          `tangent_vec_x` and `tangent_vec_e`.
  
      References
      ----------
      .. [ONeill]  O’Neill, Barrett. The Fundamental Equations of a
          Submersion, Michigan Mathematical Journal 13, no. 4
          (December 1966): 459–69. https://doi.org/10.1307/mmj/1028999604.
  
      .. [Pennec] Pennec, Xavier. Computing the curvature and its gradient
          in Kendall shape spaces. Unpublished.
      """
      hor_x = self.horizontal_projection(tangent_vec_x, base_point)
      p_top = Matrices.transpose(base_point)
      p_top_p = gs.matmul(p_top, base_point)
  
      def sylv_p(mat_b):
          """Solves Sylvester equation for vertical component."""
          return gs.linalg.solve_sylvester(
              p_top_p, p_top_p, mat_b - Matrices.transpose(mat_b)
          )
  
      e_top_hor_x = gs.matmul(Matrices.transpose(tangent_vec_e), hor_x)
      sylv_e_top_hor_x = sylv_p(e_top_hor_x)
  
      p_top_e = gs.matmul(p_top, tangent_vec_e)
      sylv_p_top_e = sylv_p(p_top_e)
  
      return gs.matmul(base_point, sylv_e_top_hor_x) + gs.matmul(
          hor_x, sylv_p_top_e
      )
  
imports: import geomstats.backend
  from geomstats.geometry.base import LevelSet
  from geomstats.geometry.fiber_bundle import FiberBundle
  from geomstats.geometry.hypersphere import Hypersphere
  from geomstats.geometry.matrices import Matrices
  from geomstats.geometry.quotient_metric import QuotientMetric
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.integrator import integrate
  from geomstats.vectorization import get_batch_shape, repeat_out
label_desc: Use image node_id 4 for calling the PreShapeSpaceBundle obj's underlying member method code with example usage: obj.integrability_tensor(tangent_vec_x, tangent_vec_e, base_point) and returns: unknown, gs