class_docstr: Represents a diagram in a certain category.
  
  Explanation
  ===========
  
  Informally, a diagram is a collection of objects of a category and
  certain morphisms between them.  A diagram is still a monoid with
  respect to morphism composition; i.e., identity morphisms, as well
  as all composites of morphisms included in the diagram belong to
  the diagram.  For a more formal approach to this notion see
  [Pare1970].
  
  The components of composite morphisms are also added to the
  diagram.  No properties are assigned to such morphisms by default.
  
  A commutative diagram is often accompanied by a statement of the
  following kind: "if such morphisms with such properties exist,
  then such morphisms which such properties exist and the diagram is
  commutative".  To represent this, an instance of :class:`Diagram`
  includes a collection of morphisms which are the premises and
  another collection of conclusions.  ``premises`` and
  ``conclusions`` associate morphisms belonging to the corresponding
  categories with the :class:`~.FiniteSet`'s of their properties.
  
  The set of properties of a composite morphism is the intersection
  of the sets of properties of its components.  The domain and
  codomain of a conclusion morphism should be among the domains and
  codomains of the morphisms listed as the premises of a diagram.
  
  No checks are carried out of whether the supplied object and
  morphisms do belong to one and the same category.
  
  Examples
  ========
  
  >>> from sympy.categories import Object, NamedMorphism, Diagram
  >>> from sympy import pprint, default_sort_key
  >>> A = Object("A")
  >>> B = Object("B")
  >>> C = Object("C")
  >>> f = NamedMorphism(A, B, "f")
  >>> g = NamedMorphism(B, C, "g")
  >>> d = Diagram([f, g])
  >>> premises_keys = sorted(d.premises.keys(), key=default_sort_key)
  >>> pprint(premises_keys, use_unicode=False)
  [g*f:A-->C, id:A-->A, id:B-->B, id:C-->C, f:A-->B, g:B-->C]
  >>> pprint(d.premises, use_unicode=False)
  {g*f:A-->C: EmptySet, id:A-->A: EmptySet, id:B-->B: EmptySet, id:C-->C: EmptyS >
  <BLANKLINE>
  > et, f:A-->B: EmptySet, g:B-->C: EmptySet}
  >>> d = Diagram([f, g], {g * f: "unique"})
  >>> pprint(d.conclusions,use_unicode=False)
  {g*f:A-->C: {unique}}
  
  References
  ==========
  
  [Pare1970] B. Pareigis: Categories and functors.  Academic Press, 1970.
class_docstr_tok: ["Represents","a","diagram","in","a","certain","category",".","Explanation","===========","Informally",",","a","diagram","is","a","collection","of","objects","of","a","category","and","certain","morphisms","between","them",".","A","diagram","is","still","a","monoid","with","respect","to","morphism","composition",";","i.e.",",","identity","morphisms",",","as","well","as","all","composites","of","morphisms","included","in","the","diagram","belong","to","the","diagram",".","For","a","more","formal","approach","to","this","notion","see","[","Pare1970","]",".","The","components","of","composite","morphisms","are","also","added","to","the","diagram",".","No","properties","are","assigned","to","such","morphisms","by","default",".","A","commutative","diagram","is","often","accompanied","by","a","statement","of","the","following","kind",":","``","if","such","morphisms","with","such","properties","exist",",","then","such","morphisms","which","such","properties","exist","and","the","diagram","is","commutative","''",".","To","represent","this",",","an","instance","of",":","class",":","`","Diagram","`","includes","a","collection","of","morphisms","which","are","the","premises","and","another","collection","of","conclusions",".","``","premises","``","and","``","conclusions","``","associate","morphisms","belonging","to","the","corresponding","categories","with","the",":","class",":","`","~.FiniteSet","`","'s","of","their","properties",".","The","set","of","properties","of","a","composite","morphism","is","the","intersection","of","the","sets","of","properties","of","its","components",".","The","domain","and","codomain","of","a","conclusion","morphism","should","be","among","the","domains","and","codomains","of","the","morphisms","listed","as","the","premises","of","a","diagram",".","No","checks","are","carried","out","of","whether","the","supplied","object","and","morphisms","do","belong","to","one","and","the","same","category",".","Examples","========",">",">",">","from","sympy.categories","import","Object",",","NamedMorphism",",","Diagram",">",">",">","from","sympy","import","pprint",",","default_sort_key",">",">",">","A","=","Object","(","``","A","''",")",">",">",">","B","=","Object","(","``","B","''",")",">",">",">","C","=","Object","(","``","C","''",")",">",">",">","f","=","NamedMorphism","(","A",",","B",",","``","f","''",")",">",">",">","g","=","NamedMorphism","(","B",",","C",",","``","g","''",")",">",">",">","d","=","Diagram","(","[","f",",","g","]",")",">",">",">","premises_keys","=","sorted","(","d.premises.keys","(",")",",","key=default_sort_key",")",">",">",">","pprint","(","premises_keys",",","use_unicode=False",")","[","g","*","f",":","A","--",">","C",",","id",":","A","--",">","A",",","id",":","B","--",">","B",",","id",":","C","--",">","C",",","f",":","A","--",">","B",",","g",":","B","--",">","C","]",">",">",">","pprint","(","d.premises",",","use_unicode=False",")","{","g","*","f",":","A","--",">","C",":","EmptySet",",","id",":","A","--",">","A",":","EmptySet",",","id",":","B","--",">","B",":","EmptySet",",","id",":","C","--",">","C",":","EmptyS",">","<","BLANKLINE",">",">","et",",","f",":","A","--",">","B",":","EmptySet",",","g",":","B","--",">","C",":","EmptySet","}",">",">",">","d","=","Diagram","(","[","f",",","g","]",",","{","g","*","f",":","``","unique","''","}",")",">",">",">","pprint","(","d.conclusions",",","use_unicode=False",")","{","g","*","f",":","A","--",">","C",":","{","unique","}","}","References","==========","[","Pare1970","]","B.","Pareigis",":","Categories","and","functors",".","Academic","Press",",","1970","."]
docstr: Returns the premises of this diagram.
  
  Examples
  ========
  
  >>> from sympy.categories import Object, NamedMorphism
  >>> from sympy.categories import IdentityMorphism, Diagram
  >>> from sympy import pretty
  >>> A = Object("A")
  >>> B = Object("B")
  >>> f = NamedMorphism(A, B, "f")
  >>> id_A = IdentityMorphism(A)
  >>> id_B = IdentityMorphism(B)
  >>> d = Diagram([f])
  >>> print(pretty(d.premises, use_unicode=False))
  {id:A-->A: EmptySet, id:B-->B: EmptySet, f:A-->B: EmptySet}
docstr_tok: ["Returns","the","premises","of","this","diagram",".","Examples","========",">",">",">","from","sympy.categories","import","Object",",","NamedMorphism",">",">",">","from","sympy.categories","import","IdentityMorphism",",","Diagram",">",">",">","from","sympy","import","pretty",">",">",">","A","=","Object","(","``","A","''",")",">",">",">","B","=","Object","(","``","B","''",")",">",">",">","f","=","NamedMorphism","(","A",",","B",",","``","f","''",")",">",">",">","id_A","=","IdentityMorphism","(","A",")",">",">",">","id_B","=","IdentityMorphism","(","B",")",">",">",">","d","=","Diagram","(","[","f","]",")",">",">",">","print","(","pretty","(","d.premises",",","use_unicode=False",")",")","{","id",":","A","--",">","A",":","EmptySet",",","id",":","B","--",">","B",":","EmptySet",",","f",":","A","--",">","B",":","EmptySet","}"]
code: def premises(self):
      """
      Returns the premises of this diagram.
  
      Examples
      ========
  
      >>> from sympy.categories import Object, NamedMorphism
      >>> from sympy.categories import IdentityMorphism, Diagram
      >>> from sympy import pretty
      >>> A = Object("A")
      >>> B = Object("B")
      >>> f = NamedMorphism(A, B, "f")
      >>> id_A = IdentityMorphism(A)
      >>> id_B = IdentityMorphism(B)
      >>> d = Diagram([f])
      >>> print(pretty(d.premises, use_unicode=False))
      {id:A-->A: EmptySet, id:B-->B: EmptySet, f:A-->B: EmptySet}
  
      """
      return self.args[0]
  
imports: from sympy.core import S, Basic, Dict, Symbol, Tuple, sympify
  from sympy.core.symbol import Str
  from sympy.sets import Set, FiniteSet, EmptySet
  from sympy.utilities.iterables import iterable
label_desc: Use image node_id 4 for calling the Diagram obj's underlying member method code with example usage: obj.premises() and returns: self