'True if left is a leftcorner of cat, where left can be a
terminal or a nonterminal.
:param cat: the parent of the leftcorner
:type cat: Nonterminal
:param left: the suggested leftcorner
:type left: Terminal or Nonterminal
:rtype: bool'

def is_leftcorner(self, cat, left):

    if is_nonterminal(left):
        return (left in self.leftcorners(cat))
    elif self._leftcorner_words:
        return (left in self._leftcorner_words.get(cat, set()))
    else:
        return any(((left in self._immediate_leftcorner_words.get(parent, set())) for parent in self.leftcorners(cat)))
