"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 21:55:48.338412
"""

```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 the fact.
        """
        if fact not in self.knowledge:
            self.knowledge[fact] = []

    def add_rule(self, rule: List[str]) -> None:
        """
        Adds a new rule to the knowledge base. A rule is a list of facts that imply another fact.

        :param rule: A list of strings representing the premises and conclusion.
        """
        premise, conclusion = rule[:-1], rule[-1]
        for p in premise:
            if p not in self.knowledge:
                self.knowledge[p] = []
            self.knowledge[p].append(conclusion)

    def infer(self, fact: str) -> List[str]:
        """
        Infer new facts from the knowledge base.

        :param fact: A string representing a known fact.
        :return: A list of strings representing inferred facts.
        """
        if fact in self.knowledge:
            return [f for p in self.knowledge[fact] for f in (p, ) + tuple(self.infer(p))]
        return []


def create_reasoning_engine() -> KnowledgeBase:
    """
    Creates a simple reasoning engine by initializing a knowledge base with some facts and rules.

    :return: A KnowledgeBase instance.
    """
    kb = KnowledgeBase()
    # Adding basic facts
    kb.add_fact("cat is an animal")
    kb.add_fact("dog is an animal")

    # Adding inference rules (example)
    kb.add_rule(["animal", "cat", "bird"])
    kb.add_rule(["mammal", "dog", "cat"])

    return kb


# Example usage:
reasoning_engine = create_reasoning_engine()
print(reasoning_engine.infer("dog"))  # Should infer ['mammal']
```