Counter-Example Hunting Tactic #
This file provides a tactic for hunting counter-examples to bound claims.
Unlike interval_bound which proves bounds, interval_refute searches for
violations.
Main tactics #
interval_refute- Search for counter-examples to the current goal
Usage #
-- A false theorem: x² ≤ 3 on [-2, 2]
example : ∀ x ∈ Set.Icc (-2 : ℝ) 2, x * x ≤ 3 := by
interval_refute -- ERROR: Counter-example found at x = 2, value = 4
-- A true theorem (no counter-example found)
example : ∀ x ∈ Set.Icc (0 : ℝ) 1, x * x ≤ 1 := by
interval_refute -- INFO: No counter-example found, theorem appears true!
interval_bound -- Actually proves it
How it works #
interval_refute uses global optimization to search for violations:
- For
f(x) ≤ c: maximizesf(x), checks if max > c - For
c ≤ f(x): minimizesf(x), checks if min < c
A Verified counter-example is a rigorous proof of falsity. A Candidate counter-example might be a precision issue.
@[reducible, inline]
Equations
Instances For
Configuration #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Helper functions #
Main tactic implementation #
Syntax and tactic #
Syntax for the refute tactic
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.