The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Set
3 declarations. Mathlib docs · Source
The set tactic
This file defines the set tactic and its variant set!.
set a := t with h is a variant of let a := t. It adds the hypothesis h : a = t to
the local context and replaces t with a everywhere it can.
set a := t with ← h will add h : t = a instead.
set! a := t with h does not do any replacing.
def Mathlib.Tactic.setArgsRest E1 #
Lean.ParserDescr
def Mathlib.Tactic.setTactic E1 #
Lean.ParserDescr
set a := t with h is a variant of let a := t. It adds the hypothesis h : a = t to
the local context and replaces t with a everywhere it can.
set a := t with ← h will add h : t = a instead.
set! a := t with h does not do any replacing.
example (x : Nat) (h : x + x - x = 3) : x + x - x = 3 := by
set y := x with ← h2
sorry
/-
x : Nat
y : Nat := x
h : y + y - y = 3
h2 : x = y
⊢ y + y - y = 3
-/
def Mathlib.Tactic.tacticSet!_ E1 #
Lean.ParserDescr
set a := t with h is a variant of let a := t. It adds the hypothesis h : a = t to
the local context and replaces t with a everywhere it can.
set a := t with ← h will add h : t = a instead.
set! a := t with h does not do any replacing.
example (x : Nat) (h : x + x - x = 3) : x + x - x = 3 := by
set y := x with ← h2
sorry
/-
x : Nat
y : Nat := x
h : y + y - y = 3
h2 : x = y
⊢ y + y - y = 3
-/