Documentation

LeanCert.Tactic.Refute

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 #

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:

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 #

    Configuration for the refute tactic

    • maxIterations :

      Maximum iterations for optimization

    • taylorDepth :

      Taylor depth for evaluation

    • tolerance :

      Tolerance for optimization

    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        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.
          Instances For