"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 22:08:26.104424
"""

```python
from typing import List, Dict


class ReasoningEngine:
    """
    A basic reasoning engine designed to solve problems with limited reasoning sophistication.
    """

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

    def add_knowledge(self, statement: str, context: str) -> None:
        """
        Adds a statement and its context to the knowledge base.

        :param statement: A string representing the fact or rule.
        :param context: Additional information related to the statement.
        """
        self.knowledge_base[statement] = context

    def infer(self, target_statement: str) -> str:
        """
        Infers a conclusion based on existing knowledge in the knowledge base.

        :param target_statement: The statement we are trying to prove.
        :return: A string representing the inferred context or an explanation of why it couldn't be resolved.
        """
        if target_statement in self.knowledge_base:
            return f"Inferred from direct statement: {self.knowledge_base[target_statement]}"
        
        # Simple AND logic inference
        for known_stmt, context in self.knowledge_base.items():
            if "AND" in target_statement and all(substmt in known_stmt for substmt in target_statement.split(" AND ")):
                return f"Inferred using AND logic from: {known_stmt}, Context: {context}"
        
        # Simple OR logic inference
        or_results = [f"{known_stmt} -> {context}" for known_stmt, context in self.knowledge_base.items() if any(substmt in target_statement for substmt in known_stmt.split(" OR "))]
        if or_results:
            return f"Inferred using OR logic from: {'; '.join(or_results)}"
        
        return "Could not infer the statement based on current knowledge."

    def show_knowledge(self) -> Dict[str, str]:
        """
        Returns the current state of the knowledge base.

        :return: A dictionary representing the current knowledge.
        """
        return self.knowledge_base


# Example usage
engine = ReasoningEngine()
engine.add_knowledge("All humans are mortal.", "Philosophy")
engine.add_knowledge("Socrates is a human.", "History")

print(engine.infer("Socrates is mortal."))
print(engine.show_knowledge())
```

This code defines a simple reasoning engine that can add knowledge and infer statements based on basic logical rules like AND and OR, as well as direct matching of known facts.