"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 06:30:42.285681
"""

```python
from typing import List, Dict, Any

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

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

        Args:
            fact (str): The fact to be added.
        """
        if fact not in self.knowledge:
            self.knowledge[fact] = []

    def query(self, question: str) -> List[str]:
        """Query the knowledge base for facts that answer the given question.

        Args:
            question (str): The question to answer based on existing facts.

        Returns:
            List[str]: A list of facts that can answer the question.
        """
        return [fact for fact in self.knowledge if question.lower() in fact.lower()]

class ReasoningEngine:
    def __init__(self, knowledge: KnowledgeBase):
        """Initialize a reasoning engine with a given knowledge base.

        Args:
            knowledge (KnowledgeBase): The knowledge base to use for reasoning.
        """
        self.knowledge = knowledge

    def infer(self, question: str) -> List[str]:
        """Infer an answer from the existing facts in the knowledge base.

        Args:
            question (str): The question to infer an answer for.

        Returns:
            List[str]: A list of inferred answers.
        """
        return self.knowledge.query(question)

# Example usage
def main() -> None:
    """Demonstrate how to use the ReasoningEngine."""
    kb = KnowledgeBase()
    kb.add_fact("A cat is a mammal.")
    kb.add_fact("All mammals breathe air.")
    kb.add_fact("Fish live in water.")

    reasoning_engine = ReasoningEngine(knowledge=kb)

    print(reasoning_engine.infer("Do cats breathe air?"))
    # Expected output: ['All mammals breathe air.', 'A cat is a mammal.']

if __name__ == "__main__":
    main()
```