The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.ByCases

1 declarations. Mathlib docs · Source

The by_cases! tactic

The by_cases! tactic is a variant of the by_cases tactic that also calls push Not on the generated hypothesis that is a negation.

def Mathlib.Tactic.ByCases.byCases! E1 #

Lean.ParserDescr

by_cases! h : p runs the by_cases h : p tactic, followed by push Not at h in the second subgoal. For example,

  • by_cases! h : a < b creates one goal with hypothesis h : a < b and another with h : b ≤ a.
  • by_cases! h : a ≠ b creates one goal with hypothesis h : a ≠ b and another with h : a = b.