"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 20:56:21.046288
"""

```python
from typing import List, Dict


class ReasoningEngine:
    """
    A simple reasoning engine that solves limited reasoning problems based on predefined rules.
    
    This class is designed to handle a specific problem domain where the solution requires a series of logical steps.
    """

    def __init__(self, rules: List[str], facts: List[str]):
        """
        Initialize the ReasoningEngine with a set of rules and initial facts.

        :param rules: A list of strings representing logical rules.
        :param facts: A list of strings representing initial facts known to the engine.
        """
        self.rules = {rule.split(' -> ')[0].strip(): rule.split(' -> ')[1].strip() for rule in rules}
        self.facts = set(fact.strip() for fact in facts)

    def add_fact(self, new_fact: str) -> None:
        """
        Add a new fact to the engine's knowledge base.

        :param new_fact: A string representing a new fact.
        """
        self.facts.add(new_fact.strip())

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

        :return: A dictionary of inferred facts with their validity status (True if valid, False otherwise).
        """
        new_inferences = {}
        for fact in self.facts:
            if fact in self.rules:
                result_fact = self.rules[fact]
                if all(part in self.facts or part == 'not ' + existing_fact for part in result_fact.split()):
                    new_inferences[fact] = True
                else:
                    new_inferences[fact] = False

        return {k: v for k, v in new_inferences.items() if v}

    def show_inferred_facts(self) -> None:
        """
        Print the inferred facts.
        """
        print("Inferred Facts:")
        for fact, is_valid in self.infer_new_facts().items():
            if is_valid:
                print(f"- {fact} (Valid)")
            else:
                print(f"- {fact} (Invalid)")


# Example usage
if __name__ == "__main__":
    rules = [
        "A -> B",
        "B -> C",
        "not C -> D"
    ]
    facts = ["A"]

    reasoning_engine = ReasoningEngine(rules, facts)
    print("Initial Facts:", reasoning_engine.facts)
    reasoning_engine.add_fact("C")
    reasoning_engine.show_inferred_facts()
```

This Python code defines a `ReasoningEngine` class that can handle simple logical inference based on predefined rules and known facts. The example usage demonstrates adding initial facts, applying rules to infer new facts, and displaying the results.