"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 11:35:42.056569
"""

```python
from typing import List, Dict


class ReasoningEngine:
    """
    A simple reasoning engine that evaluates a set of rules against given facts to deduce conclusions.
    """

    def __init__(self):
        self.rules = []

    def add_rule(self, rule: str) -> None:
        """
        Add a new rule to the engine.

        :param rule: The rule as a string. E.g., "if A and B then C"
        """
        self.rules.append(rule)

    def evaluate_facts(self, facts: Dict[str, bool]) -> List[str]:
        """
        Evaluate the provided facts against the rules to determine which conclusions can be drawn.

        :param facts: Dictionary of facts where keys are propositions and values are boolean.
        :return: A list of conclusions that follow from the given facts.
        """
        if not self.rules:
            return []

        conclusions = []
        for rule in self.rules:
            premises, conclusion = rule.split(" then ")
            premises = [premise.strip() for premise in premises.split(" and ")]
            if all(facts[premise] for premise in premises):
                if conclusion not in conclusions:  # Avoid redundant conclusions
                    conclusions.append(conclusion)

        return conclusions


# Example usage:

if __name__ == "__main__":
    engine = ReasoningEngine()
    engine.add_rule("if A and B then C")
    engine.add_rule("if B and D then E")

    facts = {"A": True, "B": True, "D": False}

    print(engine.evaluate_facts(facts))  # Should output: ['C']
```