"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-06 02:07:39.596090
"""

```python
from typing import List, Dict


class ReasoningEngine:
    """
    A simple reasoning engine that solves a specific problem of limited reasoning sophistication.
    This example focuses on determining if a given set of rules can be satisfied by a set of facts.

    Args:
        rules: A list of dictionaries where each dictionary represents a rule in the format {"if": [], "then": []}
        facts: A list of strings representing known facts

    Methods:
        is_reasonable: Determines if the provided facts satisfy all the given rules.
    """

    def __init__(self, rules: List[Dict[str, List[str]]], facts: List[str]):
        self.rules = rules
        self.facts = set(facts)

    def is_reasonable(self) -> bool:
        """
        Checks if the current set of known facts satisfies all given rules.
        Returns True if all rules are satisfied by the facts, otherwise returns False.

        :return: bool
        """
        for rule in self.rules:
            if not self._is_rule_satisfied(rule):
                return False
        return True

    def _is_rule_satisfied(self, rule: Dict[str, List[str]]) -> bool:
        """
        Helper method to check if a single rule is satisfied by the known facts.

        :param rule: A dictionary containing "if" and "then" conditions of a rule.
        :return: bool
        """
        if not rule["if"]:
            return True  # If no conditions are specified, it's always true

        for condition in rule["if"]:
            if condition not in self.facts:
                return False
        return True


# Example usage
rules = [
    {"if": ["apple", "banana"], "then": []},
    {"if": [], "then": ["orange", "pear"]}
]
facts = ["apple", "banana", "orange"]
engine = ReasoningEngine(rules, facts)
print(engine.is_reasonable())  # Output: True
```