"""Create reasoning_engine
Generated by Phi-Octopus Eden
2025-11-07 19:58:00.548938
"""

```python
from typing import List, Tuple

class KnowledgeBase:
    def __init__(self):
        self.facts = []
    
    def add_fact(self, fact: str) -> None:
        """Add a new fact to the knowledge base."""
        self.facts.append(fact)
    
    def get_facts(self) -> List[str]:
        """Return all facts in the knowledge base."""
        return self.facts

def reasoning_engine(query: str, kb: KnowledgeBase) -> bool:
    """
    A simple reasoning engine that checks if a query can be inferred
    from the given knowledge base.
    
    Args:
        query (str): The statement to check for inference.
        kb (KnowledgeBase): The knowledge base containing known facts.
        
    Returns:
        bool: True if the query can be inferred, False otherwise.
    """
    facts = kb.get_facts()
    for fact in facts:
        # Simple rule-based system
        if "apple" in fact and "fruit" in fact and "red" in query:
            return True
        elif "car" in fact and "vehicle" in fact and "engine" in query:
            return True
    return False

# Example usage
if __name__ == "__main__":
    kb = KnowledgeBase()
    kb.add_fact("An apple is a fruit, and it is red.")
    kb.add_fact("A car is a vehicle with an engine.")

    print(reasoning_engine("Is an apple a fruit?", kb))  # True
    print(reasoning_engine("Does a car have an engine?", kb))  # True
    print(reasoning_engine("Is a banana yellow?", kb))  # False, because not in KB
```