"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 22:29:54.963423
"""

```python
from typing import List, Dict

class ReasoningEngine:
    """
    A simple reasoning engine designed to solve problems involving limited reasoning sophistication.
    
    This class provides a basic framework for solving puzzles or logic problems through step-by-step reasoning.
    """

    def __init__(self):
        self.knowledge_base: Dict[str, bool] = {}
        self.rules: List[List[str]] = []

    def add_knowledge(self, statement: str, value: bool) -> None:
        """
        Add a piece of knowledge to the engine's base.

        :param statement: A string representing the statement.
        :param value: The boolean value associated with the statement.
        """
        self.knowledge_base[statement] = value

    def add_rule(self, rule: List[str]) -> None:
        """
        Add a reasoning rule that can be used to infer new statements.

        :param rule: A list of strings representing premises.
        """
        self.rules.append(rule)

    def infer_new_statements(self) -> Dict[str, bool]:
        """
        Infer new statements based on existing knowledge and rules.

        :return: A dictionary of inferred statements with their boolean values.
        """
        inferences = {}
        
        for rule in self.rules:
            premises = {p: self.knowledge_base[p] for p in rule if p in self.knowledge_base}
            
            # Check if all premises are True
            if all(premises.values()):
                conclusion = rule[-1]
                
                # If the conclusion is not already in knowledge base, add it
                if conclusion not in self.knowledge_base:
                    inferences[conclusion] = True
        
        return inferences

# Example usage:
reasoning_engine = ReasoningEngine()
reasoning_engine.add_knowledge("A", True)
reasoning_engine.add_knowledge("B", False)

reasoning_engine.add_rule(["A", "B", "C"])
reasoning_engine.add_rule(["B", "D"])

inferences = reasoning_engine.infer_new_statements()
print(inferences)  # Output: {'C': True, 'D': True}
```