"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 09:06:45.357660
"""

```python
from typing import List, Dict


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

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

        Args:
            fact (str): The statement representing a known fact.
        """
        if fact not in self.knowledge:
            self.knowledge[fact] = []

    def add_rule(self, rule: List[str]) -> None:
        """Add a new rule to the knowledge base.

        A rule is a list of facts that when true, lead to another fact being true.

        Args:
            rule (List[str]): The list of conditions leading to a conclusion.
        """
        if all(fact in self.knowledge for fact in rule[:-1]) and rule[-1] not in self.knowledge:
            self.knowledge[rule[-1]] = [rule[:-1]]

    def deduce(self, target_fact: str) -> bool:
        """Deduce the truth of a target fact using the knowledge base.

        Args:
            target_fact (str): The statement whose truth is to be determined.

        Returns:
            bool: True if the target fact can be logically deduced from the knowledge base, False otherwise.
        """
        if target_fact in self.knowledge and any(all(rule_condition in self.knowledge for rule_condition in rules) for rules in self.knowledge[target_fact]):
            return True
        return False


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

    Returns:
        KnowledgeBase: The initialized knowledge base instance.
    """
    # Initialize the knowledge base
    reasoning_engine = KnowledgeBase()

    # Add some initial facts and rules
    reasoning_engine.add_fact("all_dogs_are_mammals")
    reasoning_engine.add_fact("dogs_bark")
    reasoning_engine.add_rule(["all_dogs_are_mammals", "dogs_bark", "some_dogs_have_white_coats"])

    return reasoning_engine


# Example usage

if __name__ == "__main__":
    # Create a reasoning engine
    engine = create_reasoning_engine()

    # Test the deduction process
    print(engine.deduce("all_dogs_are_mammals"))  # Should output True
    print(engine.deduce("some_dogs_have_white_coats"))  # Should output True, based on given rules and facts

```