"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-08 07:58:17.223117
"""

```python
from typing import List, Union
from functools import lru_cache

class FactChecker:
    """
    A class for checking facts against a predefined knowledge base.
    
    Attributes:
        knowledge_base (List[str]): The pre-defined set of facts to check against.
        
    Methods:
        __init__(self, knowledge_base: List[str])
        check_facts(self, statements: Union[str, List[str]]) -> bool
        _validate_input(self, statement: str)
    """
    
    def __init__(self, knowledge_base: List[str]):
        self.knowledge_base = set(knowledge_base)  # Convert to set for O(1) average time complexity lookups
    
    @lru_cache(maxsize=2048)
    def check_facts(self, statements: Union[str, List[str]]) -> bool:
        """
        Check if the given statements are true based on the knowledge base.
        
        Args:
            statements (Union[str, List[str]]): A single statement or a list of statements to verify.
            
        Returns:
            bool: True if all statements are true, False otherwise.
        """
        if isinstance(statements, str):
            statements = [statements]  # Convert to list for uniform processing
        
        return all(self._validate_input(statement) for statement in statements)
    
    def _validate_input(self, statement: str) -> bool:
        """
        Validate a single input statement against the knowledge base.
        
        Args:
            statement (str): The statement to validate.
            
        Returns:
            bool: True if the statement is true, False otherwise.
        """
        return statement in self.knowledge_base


# Example Usage
knowledge = ["The Earth orbits the Sun", "Water boils at 100 degrees Celsius"]
checker = FactChecker(knowledge)

print(checker.check_facts("The Earth orbits the Sun"))  # True
print(checker.check_facts(["The Earth orbits the Sun", "Water boils at 50 degrees Celsius"]))  # False
```

This `FactChecker` class allows for efficient checking of statements against a predefined knowledge base. It includes caching to improve performance on repeated checks and handles both single and multiple statements.