Documentation

Mathlib.Tactic.Linter.OldObtain

The oldObtain linter, against stream-of-conciousness obtain #

The oldObtain linter flags any occurrences of "stream-of-conciousness" obtain, i.e. uses of the obtain tactic which do not immediately provide a proof.

Example #

There are six different kinds of obtain uses. In one example, they look like this.

theorem foo : True := by
  -- These cases are fine.
  obtain := trivial
  obtain h := trivial
  obtain : True := trivial
  obtain h : True := trivial
  -- These are linted against.
  obtain : True
  · trivial
  obtain h : True
  · trivial

We allow the first four (since an explicit proof is provided), but lint against the last two.

Why is this bad? #

This is similar to removing all uses of Tactic.Replace and Tactic.Have from mathlib: in summary,

Whether a syntax element is an obtain tactic call without a provided proof.

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

    The oldObtain linter emits a warning upon uses of the "stream-of-conciousness" variants of the obtain tactic, i.e. with the proof postponed.

    The oldObtain linter: see docstring above

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