Download scripts/falsification_checker.py from 5incere5cience/kitchen-thermodynamics: direct link, hf CLI and curl.
- Browser
- Download file 3.68 kB
-
https://huggingface.co/datasets/5incere5cience/kitchen-thermodynamics/resolve/main/scripts/falsification_checker.py
- Command line
-
hf download hf://datasets/5incere5cience/kitchen-thermodynamics/scripts/falsification_checker.py
-
curl -L -o falsification_checker.py https://huggingface.co/datasets/5incere5cience/kitchen-thermodynamics/resolve/main/scripts/falsification_checker.py
3.68 kB
| #!/usr/bin/env python3 | |
| """ | |
| Verificador sistemático de falsificações das 12 predições clássicas | |
| Baseado na série 'Cremation of Thermodynamics' | |
| """ | |
| from dataclasses import dataclass | |
| from typing import List, Dict | |
| from enum import Enum | |
| class FalsificationStatus(Enum): | |
| CONFIRMED = "CONFIRMED" | |
| PARTIAL = "PARTIAL" | |
| UNVERIFIED = "UNVERIFIED" | |
| class ClassicalPrediction: | |
| number: int | |
| statement: str | |
| classical_mechanism: str | |
| experiment: str | |
| observation: str | |
| status: FalsificationStatus | |
| class FalsificationChecker: | |
| """ | |
| Tabela de falsificações do paper Kitchen Thermodynamics v6.0 | |
| """ | |
| PREDICTIONS = [ | |
| ClassicalPrediction(1, "Meltwater flows downward on heated inclined surface", "Gravity", "Iceberg", "Reverses to upward at t≈90s", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(2, "Maximum gradient (0-100°C) dissipates in τ_eq≈160s", "Thermal diffusion", "Iceberg", "Sustained >720s (4.56×τ_eq)", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(3, "Liquid fat flows downhill on heated incline", "Gravity", "Butter", "Climbs uphill for 25+ min", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(4, "Butter flow is radially symmetric (scalar)", "Isotropic heat diffusion", "Butter", "Curved vector-field trajectories", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(5, "Marangoni drives fluid toward cooler regions", "Surface tension gradient", "Iceberg", "Anti-Marangoni: flow toward heat", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(6, "Bulk motion determined by temperature (convection)", "Buoyancy", "Water", "Motion tracks flame state, not T", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(7, "Water at 100°C more agitated than at 99.9°C", "Kinetic energy", "Water", "100°C+flame OFF = still; 99.9°C+flame ON = motion", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(8, "Boiling is temperature-threshold phenomenon", "Nucleation at T_boil", "Milk", "Stillness→overflow→stillness in 0.3°C range", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(9, "Convection is passive process driven by buoyancy", "Density differences", "Water/Beans", "Motion collapses in seconds when flame OFF", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(10, "Heating always increases temperature", "First Law (dU = δQ)", "Beans Short", "Temperature drops 1.5°C in 41s with fire ON", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(11, "Bottom of pot is hottest point when heated from below", "Conduction", "Beans Short", "Bottom 16.6°C, liquid above 21.5°C (Δ=4.9°C)", FalsificationStatus.CONFIRMED), | |
| ClassicalPrediction(12, "Temperature rises monotonically until boiling", "Heat capacity", "Beans Long", "46s plateau 0.3°C below baseline, then 17+min rise without flame", FalsificationStatus.CONFIRMED) | |
| ] | |
| def summary(self) -> Dict: | |
| total = len(self.PREDICTIONS) | |
| confirmed = sum(1 for p in self.PREDICTIONS if p.status == FalsificationStatus.CONFIRMED) | |
| return { | |
| "total_predictions": total, | |
| "confirmed_falsifications": confirmed, | |
| "falsification_rate": confirmed / total, | |
| "experiments_covered": len(set(p.experiment for p in self.PREDICTIONS)) | |
| } | |
| if __name__ == "__main__": | |
| checker = FalsificationChecker() | |
| print("=" * 60) | |
| print("KITCHEN THERMODYNAMICS — FALSIFICATION SUMMARY") | |
| print("=" * 60) | |
| s = checker.summary() | |
| print(f"Total: {s['total_predictions']} | Falsificações: {s['confirmed_falsifications']} ({s['falsification_rate']*100:.1f}%)") | |