"""Create fact_checker
Generated by Phi-Octopus Eden
2025-11-07 16:01:20.588127
"""

```python
from typing import List, Tuple
from dataclasses import dataclass

@dataclass
class Fact:
    statement: str
    source: str = None

def create_fact_checker(facts: List[Fact]) -> callable:
    """
    Create a fact-checking function that verifies the given statements against a predefined list of facts.

    Args:
        facts (List[Fact]): A list of facts to be used for checking. Each fact has a statement and optionally a source.

    Returns:
        callable: A function that takes a statement and checks if it matches any existing fact.
    """
    fact_dict = {fact.statement.lower(): fact for fact in facts}

    def check_statement(statement: str) -> Tuple[bool, Fact]:
        """Check if the provided statement is supported by any of the given facts."""
        lower_statement = statement.lower()
        matched_fact = fact_dict.get(lower_statement)
        return (matched_fact is not None, matched_fact or Fact("No matching fact found"))

    return check_statement


# Example usage
if __name__ == "__main__":
    # Define some sample facts
    sample_facts = [
        Fact("The capital of France is Paris"),
        Fact("Earth orbits the Sun", "Astronomy 101 textbook"),
        Fact("Water freezes at 0 degrees Celsius")
    ]

    # Create a fact-checker with these facts
    fact_checker = create_fact_checker(sample_facts)

    # Test some statements
    print(fact_checker("The capital of France is Paris"))  # Should return (True, Fact object)
    print(fact_checker("What is the capital of Italy?"))   # Should return (False, Fact object)
    print(fact_checker("Water boils at 100 degrees Celsius"))  # Should return (True, Fact object)
```