"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 15:27:53.127588
"""

```python
from typing import List, Dict


class KnowledgeBase:
    def __init__(self):
        self.knowledge = {}

    def add_fact(self, fact: str) -> None:
        """Add a new fact to the knowledge base."""
        self.knowledge[fact] = True

    def query(self, question: str) -> bool:
        """Check if a specific question is answered by the current facts."""
        return question in self.knowledge


class ReasoningEngine:
    def __init__(self):
        self.kb = KnowledgeBase()

    def add_knowledge(self, fact: str) -> None:
        """
        Add a new piece of knowledge to the engine's database.
        
        :param fact: A string representing a new fact to be added
        """
        self.kb.add_fact(fact)

    def infer(self, question: str) -> bool:
        """
        Infer if a given question can be answered positively based on existing facts.
        
        :param question: The question to answer with the current knowledge base
        :return: True if the question is answered affirmatively, False otherwise
        """
        return self.kb.query(question)

    def explain_reasoning(self) -> Dict[str, bool]:
        """
        Provide an explanation of why a certain query was or was not answered positively.
        
        :return: A dictionary where keys are facts and values indicate if the fact supports the answer
        """
        relevant_facts = {}
        for fact in self.kb.knowledge:
            if question in fact or fact in question:
                relevant_facts[fact] = True  # Simplistic explanation, all related facts support it.
        return relevant_facts


# Example usage
reasoning_engine = ReasoningEngine()
reasoning_engine.add_knowledge("All humans need water to survive.")
reasoning_engine.add_knowledge("Tom is a human.")

print(reasoning_engine.infer("Does Tom need water?"))  # Expected: True

explanation = reasoning_engine.explain_reasoning()
print(explanation)  # Expected output will depend on the simplistic implementation
```