code: def casoratian(seqs, n, zero=True):
      """Given linear difference operator L of order 'k' and homogeneous
      equation Ly = 0 we want to compute kernel of L, which is a set
      of 'k' sequences: a(n), b(n), ... z(n).
  
      Solutions of L are linearly independent iff their Casoratian,
      denoted as C(a, b, ..., z), do not vanish for n = 0.
  
      Casoratian is defined by k x k determinant::
  
                 +  a(n)     b(n)     . . . z(n)     +
                 |  a(n+1)   b(n+1)   . . . z(n+1)   |
                 |    .         .     .        .     |
                 |    .         .       .      .     |
                 |    .         .         .    .     |
                 +  a(n+k-1) b(n+k-1) . . . z(n+k-1) +
  
      It proves very useful in rsolve_hyper() where it is applied
      to a generating set of a recurrence to factor out linearly
      dependent solutions and return a basis:
  
      >>> from sympy import Symbol, casoratian, factorial
      >>> n = Symbol('n', integer=True)
  
      Exponential and factorial are linearly independent:
  
      >>> casoratian([2**n, factorial(n)], n) != 0
      True
  
      """
  
      seqs = list(map(sympify, seqs))
  
      if not zero:
          f = lambda i, j: seqs[j].subs(n, n + i)
      else:
          f = lambda i, j: seqs[j].subs(n, i)
  
      k = len(seqs)
  
      return Matrix(k, k, f).det()
  
imports: import random
  from sympy.core.basic import Basic
  from sympy.core.singleton import S
  from sympy.core.symbol import Symbol
  from sympy.core.sympify import sympify
  from sympy.functions.elementary.trigonometric import cos, sin
  from sympy.utilities.decorator import doctest_depends_on
  from sympy.utilities.exceptions import sympy_deprecation_warning
  from sympy.utilities.iterables import is_sequence
  from .exceptions import ShapeError
  from .decompositions import _cholesky, _LDLdecomposition
  from .matrixbase import MatrixBase
  from .repmatrix import MutableRepMatrix, RepMatrix
  from .solvers import _lower_triangular_solve, _upper_triangular_solve
label_desc: Use image node_id 13 for calling a global function with example usage: casoratian(seqs, n, zero) and returns: Matrix