"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 18:34:29.493960
"""

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

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


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

    def add_rule(self, rule_str: str) -> None:
        """
        Add a new rule to the engine.
        
        Args:
            rule_str (str): A string representing the logical rule in a simple format
                            e.g., "IF A THEN B"
        """
        self.kb.add_fact(rule_str)

    def infer(self, fact: str) -> bool:
        """
        Infer if given fact can be derived from current knowledge.
        
        Args:
            fact (str): Fact to be inferred
        
        Returns:
            bool: True if the fact can be derived, False otherwise
        """
        return any(fact in rule for rule in self.kb.get_facts())


def create_reasoning_engine() -> RuleEngine:
    """
    Create a basic reasoning engine.

    The engine uses a simple knowledge base to store facts and rules.
    
    Returns:
        RuleEngine: A basic reasoning engine instance
    """
    kb = KnowledgeBase()
    rule_engine = RuleEngine(kb)
    
    # Adding some initial facts and rules for demonstration purposes
    rule_engine.add_rule("IF A THEN B")
    rule_engine.add_rule("IF B AND C THEN D")

    return rule_engine


# Example usage
if __name__ == "__main__":
    reasoning_engine = create_reasoning_engine()
    print(reasoning_engine.infer("B"))  # Should output: True
    print(reasoning_engine.infer("D"))  # Should output: False, as C is not added
```

This code defines a basic reasoning engine capable of storing facts and inferring new facts based on predefined rules. It includes a `KnowledgeBase` for managing facts and a `RuleEngine` for applying rules to infer new information. The example usage demonstrates how to create an instance of the reasoning engine and perform inferences.