mathlib documentation

core / init.meta.ref

meta constant tactic.ref (α : Type u) :
Type u

A ref performs the role of a mutable variable within a tactic.

meta constant tactic.using_new_ref {α : Type u} {β : Type v} (a : α) (t : tactic.ref αtactic β) :

Create a new reference r with initial value a, execute t r, and then delete r.

meta constant tactic.read_ref {α : Type u} :
tactic.ref αtactic α

Read the value stored in the given reference.

meta constant tactic.write_ref {α : Type u} :
tactic.ref αα → tactic unit

Update the value stored in the given reference.