"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-08 15:52:12.897216
"""

```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 a 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, each representing a fact.
        """
        return list(self.knowledge.keys())

    def add_inference_rule(self, rule: str) -> None:
        """
        Adds an inference rule to the knowledge base which can be used for reasoning.

        :param rule: A string representing a rule that combines facts into inferences.
        """
        if rule not in self.knowledge:
            self.knowledge[rule] = []

    def infer(self, query: str) -> bool:
        """
        Attempts to infer the answer to a given query based on existing facts and inference rules.

        :param query: A string representing the question to be answered.
        :return: True if the query can be inferred from knowledge base; False otherwise.
        """
        return any(query in self.knowledge[rule] for rule in self.knowledge)


def create_reasoning_engine() -> KnowledgeBase:
    """
    Creates a basic reasoning engine with a knowledge base.

    :return: A newly instantiated KnowledgeBase object.
    """
    reasoning_engine = KnowledgeBase()
    
    # Adding some initial facts
    reasoning_engine.add_fact("Socrates is a philosopher.")
    reasoning_engine.add_fact("Philosophers are thinkers.")
    
    # Adding an inference rule
    reasoning_engine.add_inference_rule("If Socrates is a philosopher and philosophers are thinkers, then Socrates is a thinker.")
    
    return reasoning_engine


# Example usage:
reasoning_engine = create_reasoning_engine()
print(reasoning_engine.get_facts())  # Get the facts in the knowledge base
query_result = reasoning_engine.infer("Socrates is a thinker.")  # Infer if Socrates is a thinker based on existing knowledge
print(f"Can we infer that Socrates is a thinker? {query_result}")
```