"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 11:51:35.777252
"""

```python
from typing import List, Dict

class KnowledgeBase:
    def __init__(self):
        self.facts = []

    def add_fact(self, fact: str) -> None:
        """Add a new fact to the knowledge base."""
        self.facts.append(fact)

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


def reasoning_engine(knowledge_base: KnowledgeBase) -> Dict[str, str]:
    """
    Create a simple reasoning engine that infers new information from existing facts.

    :param knowledge_base: An instance of KnowledgeBase containing known facts.
    :return: A dictionary where each key is an inferred fact and the value explains how it was derived.
    """
    # Define some rules for inference
    rules = [
        (lambda f1, f2: f1 == "All humans are mortal" and f2 == "Socrates is a human", 
         lambda facts: "Therefore, Socrates is mortal"),
        (lambda f1, f2: f1 == "If it rains, the ground gets wet" and f2 == "It is raining",
         lambda facts: "Therefore, the ground is wet")
    ]

    # Initialize an empty dictionary to store inferred statements
    inferences = {}

    for fact1 in knowledge_base.get_facts():
        for fact2 in knowledge_base.get_facts():
            if (lambda f1, f2: f1 != f2)(*locals().values()):
                for rule_condition, inference_method in rules:
                    try:
                        if rule_condition(fact1, fact2):
                            inferred_fact = inference_method([fact1, fact2])
                            inferences[inferred_fact] = f"Inferred from {fact1} and {fact2}"
                    except Exception as e:
                        print(f"Error during inference: {e}")

    return inferences


# Example usage
if __name__ == "__main__":
    kb = KnowledgeBase()
    kb.add_fact("All humans are mortal")
    kb.add_fact("Socrates is a human")
    kb.add_fact("If it rains, the ground gets wet")
    kb.add_fact("It is raining")

    inferences = reasoning_engine(kb)
    for inference, explanation in inferences.items():
        print(f"{inference}: {explanation}")
```