"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 20:31:37.609013
"""

```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.

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

    def get_facts(self) -> List[str]:
        """Get all facts stored in the knowledge base.

        :return: A list of strings, each representing a fact.
        """
        return list(self.knowledge.keys())

    def add_rule(self, rule: str) -> None:
        """Add a new rule to infer additional facts from existing ones.

        :param rule: A string representing a logical rule.
        """
        if '=>' in rule:
            premise, conclusion = rule.split('=>')
            self.add_fact(conclusion.strip())
            for fact in premise.split():
                if fact not in self.knowledge:
                    self.knowledge[fact] = []

    def infer_facts(self) -> List[str]:
        """Infer new facts based on existing rules.

        :return: A list of strings, representing newly inferred facts.
        """
        inferred_facts = []
        for rule in self.knowledge.keys():
            if '=>' in rule:
                premise, conclusion = rule.split('=>')
                premises = [fact.strip() for fact in premise.split()]
                if all(fact in self.knowledge and conclusion not in self.knowledge[other_fact] for other_fact in premises):
                    inferred_facts.append(conclusion)
        return inferred_facts

def reasoning_engine(kb: KnowledgeBase) -> None:
    """Improve the reasoning sophistication by inferring new facts from existing knowledge.

    :param kb: An instance of KnowledgeBase containing stored facts and rules.
    """
    print("Infering new facts...")
    inferred = kb.infer_facts()
    for fact in inferred:
        if fact not in kb.get_facts():
            kb.add_fact(fact)
            print(f"Newly inferred fact: {fact}")

# Example usage
kb = KnowledgeBase()
kb.add_fact('A')
kb.add_rule('B => A')
kb.add_rule('C => B')

print("Initial facts:", kb.get_facts())
reasoning_engine(kb)
print("Facts after inference:", kb.get_facts())
```

This code creates a `KnowledgeBase` class to store and manage knowledge, including adding new facts and rules. The `reasoning_engine` function then infers additional facts based on the provided rules and adds them to the knowledge base if they are not already present.