"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 04:30:02.029463
"""

```python
from typing import List, Dict


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

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

        :param fact: A string representing a new piece of information.
        """
        if fact not in self.knowledge:
            self.knowledge[fact] = []

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

        :param question: A string representing the question to be answered.
        :return: A list of strings containing the relevant facts from the knowledge base.
        """
        return [fact for fact in self.knowledge if question in fact]


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

    def infer(self, premise: str) -> List[str]:
        """
        Infers new facts from the existing knowledge base based on a given premise.

        :param premise: A string representing the initial information.
        :return: A list of strings containing inferred facts.
        """
        inferred_facts = []
        for fact in self.kb.query(premise):
            if all(fact not in inferred for inferred in inferred_facts) and len(fact.split()) > 1:
                inferred_facts.append(fact)
        return inferred_facts


def create_reasoning_engine() -> ReasoningEngine:
    """
    Creates a reasoning engine that can infer new facts from existing knowledge.

    :return: A ReasoningEngine instance.
    """
    kb = KnowledgeBase()
    kb.add_fact("All humans are mortal.")
    kb.add_fact("Socrates is a human.")
    kb.add_fact("Therefore, Socrates is mortal.")

    return ReasoningEngine(kb)


# Example usage
reasoning_engine = create_reasoning_engine()
inferences = reasoning_engine.infer("All humans are mortal.")
print(inferences)  # Output: ['Socrates is mortal.']
`