"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-06 14:24:34.303773
"""

```python
from typing import List, Dict, Set
from functools import lru_cache


class FactChecker:
    """
    A simple fact-checking system that verifies if a given statement is true based on predefined facts.
    The system uses limited reasoning by comparing the statement against known facts and their negations.

    Args:
        facts (List[str]): A list of positive statements to consider as facts.
        negated_facts (Set[str]): A set of negative statements to consider as negations of facts.
    
    Methods:
        is_fact(statement: str) -> bool:
            Returns True if the statement is a fact or its negation is not a fact, otherwise False.
    """

    def __init__(self, facts: List[str], negated_facts: Set[str]):
        self.facts = set(facts)
        self.negated_facts = negated_facts

    @lru_cache(maxsize=1024)  # Caching results to limit reasoning sophistication
    def is_fact(self, statement: str) -> bool:
        """
        Determines if the given statement is a fact or its negation is not a fact.

        Args:
            statement (str): The statement to verify as a fact.

        Returns:
            bool: True if the statement is considered a fact, False otherwise.
        """
        return statement in self.facts and not any(neg for neg in self.negated_facts if neg.startswith(f"not_{statement}"))

    def add_fact(self, new_fact: str) -> None:
        """
        Adds a new fact to the system.

        Args:
            new_fact (str): The new fact to add.
        """
        self.facts.add(new_fact)

    def remove_fact(self, old_fact: str) -> None:
        """
        Removes an existing fact from the system.

        Args:
            old_fact (str): The fact to remove.
        """
        if old_fact in self.facts:
            self.facts.remove(old_fact)


# Example usage
if __name__ == "__main__":
    # Define known facts and their negations
    known_facts = ["The Earth orbits the Sun", "Water boils at 100 degrees Celsius"]
    negated_facts = {"not_The_Earth_orbits_the_Sun", "not_Water_boils_at_100_degrees_Celsius"}

    # Create a fact-checker instance
    checker = FactChecker(known_facts, negated_facts)

    # Check if statements are facts
    print(checker.is_fact("The Earth orbits the Sun"))  # Output: True
    print(checker.is_fact("Water boils at 100 degrees Celsius"))  # Output: True
    print(checker.is_fact("Water freezes at 100 degrees Celsius"))  # Output: False

    # Add a new fact and check again
    checker.add_fact("Plants perform photosynthesis")
    print(checker.is_fact("Plants perform photosynthesis"))  # Output: True

    # Remove an existing fact and check again
    checker.remove_fact("The Earth orbits the Sun")
    print(checker.is_fact("The Earth orbits the Sun"))  # Output: False
```