"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 05:15:39.458853
"""

```python
from typing import List, Dict


class KnowledgeBase:
    def __init__(self):
        self.knowledge = {}

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

        :param fact: A string representing the fact.
        """
        if fact not in self.knowledge:
            self.knowledge[fact] = []

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

        :return: A list of strings representing the facts.
        """
        return list(self.knowledge.keys())

    def infer_conclusion(self, premise: str, rule_dict: Dict[str, str]) -> bool:
        """
        Infers a conclusion based on a given premise and a set of logical rules.

        :param premise: A string representing the premise to be checked.
        :param rule_dict: A dictionary where keys are premises and values are conclusions.
        :return: True if the conclusion can be inferred, False otherwise.
        """
        for key, value in rule_dict.items():
            if key == premise:
                return value
        return False


def create_reasoning_engine(facts: List[str], rules: Dict[str, str]) -> KnowledgeBase:
    """
    Creates and returns a reasoning engine with the given facts and inference rules.

    :param facts: A list of strings representing the initial set of facts.
    :param rules: A dictionary where keys are premises and values are conclusions.
    :return: A KnowledgeBase instance initialized with the provided data.
    """
    engine = KnowledgeBase()
    for fact in facts:
        engine.add_fact(fact)
    return engine


# Example usage
if __name__ == "__main__":
    # Define some initial facts and inference rules
    initial_facts = ["All humans are mortal.", "Socrates is a human."]
    inference_rules = {
        "All humans are mortal.": "Therefore, Socrates is mortal.",
        "Socrates is a human.": "Therefore, Socrates is mortal."
    }

    # Create the reasoning engine
    reasoning_engine = create_reasoning_engine(initial_facts, inference_rules)

    # Check if we can infer that Socrates is mortal based on the rules and facts
    conclusion = reasoning_engine.infer_conclusion("Socrates is a human.", inference_rules)
    print(f"Can we conclude 'Therefore, Socrates is mortal.'? {conclusion}")
```

This code defines a `KnowledgeBase` class to manage facts and perform simple inferences based on predefined rules. The `create_reasoning_engine` function initializes the knowledge base with given facts and rules, allowing for basic reasoning capabilities.