"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-08 05:54:26.041562
"""

```python
from typing import List, Union


class FactChecker:
    """
    A simple fact-checking system that verifies if a statement is true based on predefined facts.
    
    This class supports checking statements against a set of known truths and provides basic reasoning capabilities
    to determine the validity of composite statements (AND, OR).
    
    Attributes:
        facts: A dictionary where keys are strings representing propositions and values are boolean indicating truth.
        
    Methods:
        add_fact(fact: str, is_true: bool) -> None: Adds or updates a fact in the system.
        check_statement(statement: Union[str, List[Union[str, dict]]]) -> bool: Checks if a statement is true based on current facts.
    """
    
    def __init__(self):
        self.facts = {}
        
    def add_fact(self, fact: str, is_true: bool) -> None:
        """Add or update a fact in the system."""
        self.facts[fact] = is_true
        
    def check_statement(self, statement: Union[str, List[Union[str, dict]]]) -> bool:
        """
        Check if a statement is true based on current facts.
        
        Args:
            statement: A string representing a simple proposition or a list with a logical operation (AND, OR) and propositions.
            
        Returns:
            bool: True if the statement is valid according to the system's knowledge base, False otherwise.
        """
        if isinstance(statement, str):
            return self.facts.get(statement, False)
        
        op = statement[0]
        operands = [self.check_statement(opd) for opd in statement[1:]]

        match op:
            case 'AND':
                return all(operands)
            case 'OR':
                return any(operands)
            case _:
                raise ValueError("Unsupported operation")
            
# Example usage
if __name__ == "__main__":
    fact_checker = FactChecker()
    fact_checker.add_fact('It_is_raining', True)
    
    # Simple fact check
    print(fact_checker.check_statement('It_is_raining'))  # Output: True
    
    # Logical AND operation
    complex_statement = ['AND', 'It_is_raining', 'The_ground_is_wet']
    fact_checker.add_fact('The_ground_is_wet', True)
    print(fact_checker.check_statement(complex_statement))  # Output: True

    # Logical OR operation with a false statement
    complex_statement_or = ['OR', 'It_is_sunny', 'The_ground_is_dry']
    fact_checker.add_fact('It_is_sunny', False)
    print(fact_checker.check_statement(complex_statement_or))  # Output: False
```