mathlib documentation

core.​init.​meta.​ref

core.​init.​meta.​ref

meta constant tactic.​ref  :
Type uType u

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

meta constant tactic.​using_new_ref {α : Type u} {β : Type v} :
α → (tactic.ref αtactic β)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.