assumables atom can be made assumable by including assumable(ain the knowledge base knowledge base that can include assumables is declared with kba logicassumables py -definite clauses with assumables from logicproblem import clauseaskablekbyes class assumable(object)"""an askable atom"" def __init__(self,atom)"""clause with atom head and lost of atoms body""self atom atom def __str__(self)"""returns the string representation of clause ""return "assumable self atom class kba(kb)""" knowledge base that can include assumables""def __init__(self,statements)self assumables [ atom for in statements if isinstance(cassumable)kb __init__(self,statementsthe top-down horn clause interpreterprove all ass returns list of the sets of assumables that imply ans body this list will contain all of the minimal sets of assumablesbut can also find non-minimal setsand repeated setsif they can be generated with separate proofs the set assumed is the set of assumables already assumed logicassumables py -(continued def prove_all_ass(selfans_bodyassumed=set())"""returns list of sets of assumables that extends assumed to imply ans_body from self ans_body is list of atoms (it is the body of the answer clauseassumed is set of assumables already assumed ""if ans_bodyselected ans_body[ select first atom from ans_body if selected in self askablesif yes(input("is "+selected+true"))return self prove_all_ass(ans_body[ :],assumedelsereturn [no answers elif selected in self assumablesreturn self prove_all_ass(ans_body[ :],assumed|{selected}elsereturn [ass version june