class_docstr: This is a prover decorator that completes predicates before proving.
  
  If the assumptions contain "P(A)", then "all x.(P(x) -> (x=A))" is the completion of "P".
  If the assumptions contain "all x.(ostrich(x) -> bird(x))", then "all x.(bird(x) -> ostrich(x))" is the completion of "bird".
  If the assumptions don't contain anything that are "P", then "all x.-P(x)" is the completion of "P".
  
  walk(Socrates)
  Socrates != Bill
  + all x.(walk(x) -> (x=Socrates))
  ----------------
  -walk(Bill)
  
  see(Socrates, John)
  see(John, Mary)
  Socrates != John
  John != Mary
  + all x.all y.(see(x,y) -> ((x=Socrates & y=John) | (x=John & y=Mary)))
  ----------------
  -see(Socrates, Mary)
  
  all x.(ostrich(x) -> bird(x))
  bird(Tweety)
  -ostrich(Sam)
  Sam != Tweety
  + all x.(bird(x) -> (ostrich(x) | x=Tweety))
  + all x.-ostrich(x)
  -------------------
  -bird(Sam)
class_docstr_tok: ["This","is","a","prover","decorator","that","completes","predicates","before","proving",".","If","the","assumptions","contain","``","P","(","A",")","''",",","then","``","all","x",".","(","P","(","x",")","-",">","(","x=A",")",")","''","is","the","completion","of","``","P","''",".","If","the","assumptions","contain","``","all","x",".","(","ostrich","(","x",")","-",">","bird","(","x",")",")","''",",","then","``","all","x",".","(","bird","(","x",")","-",">","ostrich","(","x",")",")","''","is","the","completion","of","``","bird","''",".","If","the","assumptions","do","n't","contain","anything","that","are","``","P","''",",","then","``","all","x.-P","(","x",")","''","is","the","completion","of","``","P","''",".","walk","(","Socrates",")","Socrates","!","=","Bill","+","all","x",".","(","walk","(","x",")","-",">","(","x=Socrates",")",")","--","--","--","--","--","--","--","--","-walk","(","Bill",")","see","(","Socrates",",","John",")","see","(","John",",","Mary",")","Socrates","!","=","John","John","!","=","Mary","+","all","x.all","y",".","(","see","(","x",",","y",")","-",">","(","(","x=Socrates","&","y=John",")","|","(","x=John","&","y=Mary",")",")",")","--","--","--","--","--","--","--","--","-see","(","Socrates",",","Mary",")","all","x",".","(","ostrich","(","x",")","-",">","bird","(","x",")",")","bird","(","Tweety",")","-ostrich","(","Sam",")","Sam","!","=","Tweety","+","all","x",".","(","bird","(","x",")","-",">","(","ostrich","(","x",")","|","x=Tweety",")",")","+","all","x.-ostrich","(","x",")","--","--","--","--","--","--","--","--","--","-","-bird","(","Sam",")"]
code: def assumptions(self):
      assumptions = self._command.assumptions()
  
      predicates = self._make_predicate_dict(assumptions)
  
      new_assumptions = []
      for p in predicates:
          predHolder = predicates[p]
          new_sig = self._make_unique_signature(predHolder)
          new_sig_exs = [VariableExpression(v) for v in new_sig]
  
          disjuncts = []
  
          # Turn the signatures into disjuncts
          for sig in predHolder.signatures:
              equality_exs = []
              for v1, v2 in zip(new_sig_exs, sig):
                  equality_exs.append(EqualityExpression(v1, v2))
              disjuncts.append(reduce(lambda x, y: x & y, equality_exs))
  
          # Turn the properties into disjuncts
          for prop in predHolder.properties:
              # replace variables from the signature with new sig variables
              bindings = {}
              for v1, v2 in zip(new_sig_exs, prop[0]):
                  bindings[v2] = v1
              disjuncts.append(prop[1].substitute_bindings(bindings))
  
          # make the assumption
          if disjuncts:
              # disjuncts exist, so make an implication
              antecedent = self._make_antecedent(p, new_sig)
              consequent = reduce(lambda x, y: x | y, disjuncts)
              accum = ImpExpression(antecedent, consequent)
          else:
              # nothing has property 'p'
              accum = NegatedExpression(
                  self._make_antecedent(p, new_sig)
              )
  
          # quantify the implication
          for new_sig_var in new_sig[::-1]:
              accum = AllExpression(new_sig_var, accum)
          new_assumptions.append(accum)
  
      return assumptions + new_assumptions
  
imports: from collections import defaultdict
  from functools import reduce
  from nltk.inference.api import Prover, ProverCommandDecorator
  from nltk.inference.prover9 import Prover9, Prover9Command
  from nltk.sem.logic import AbstractVariableExpression, AllExpression, AndExpression, ApplicationExpression, BooleanExpression, EqualityExpression, ExistsExpression, Expression, ImpExpression, NegatedExpression, Variable, VariableExpression, operator, unique_variable
label_desc: Use image node_id 1 for calling the ClosedWorldProver obj's underlying member method code with example usage: obj.assumptions() and returns: unknown