"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-07 09:06:53.849010
"""

```python
from typing import List, Union


class FactChecker:
    """
    A simple fact-checking tool that verifies if a given statement is true or false based on predefined rules.

    Args:
        statements: A list of strings representing the facts to be checked.
        truth_values: A list of booleans indicating the truth value of each corresponding fact in 'statements'.

    Methods:
        check_fact: Takes a new statement and returns True if it matches any known true fact, otherwise False.
    """

    def __init__(self, statements: List[str], truth_values: List[bool]):
        self.statements = statements
        self.truth_values = truth_values

    def check_fact(self, new_statement: str) -> bool:
        """
        Checks if the given statement matches any of the known true facts.

        Args:
            new_statement: The statement to be checked for its validity.

        Returns:
            True if the new statement is considered true based on existing rules, otherwise False.
        """
        for index, statement in enumerate(self.statements):
            if self._is_similar(statement, new_statement) and self.truth_values[index]:
                return True
        return False

    def _is_similar(self, known_fact: str, new_statement: str) -> bool:
        """
        Helper function to determine if two strings are similar based on a simple substring check.

        Args:
            known_fact: A string representing one of the predefined facts.
            new_statement: The statement to compare with 'known_fact'.

        Returns:
            True if the substrings match, otherwise False.
        """
        for fact in self.statements:
            if known_fact in new_statement or new_statement in fact:
                return True
        return False


# Example usage
if __name__ == "__main__":
    statements = ["Einstein developed general relativity", "Newton discovered gravity"]
    truth_values = [True, True]

    # Initialize the FactChecker with some predefined facts and their truth values.
    checker = FactChecker(statements, truth_values)

    # Test cases
    print(checker.check_fact("Einstein worked on relativity"))  # Expected: True
    print(checker.check_fact("Galileo discovered gravity"))    # Expected: False
```