This file defines the @[simps] attribute, to automatically generate simp-lemmas reducing a definition when projections are applied to it.
structures, projections, simp, simplifier, generates declarations
Add a lemma with nm stating that lhs = rhs. type is the type of both lhs and rhs, args is the list of local constants occurring, and univs is the list of universe variables. If add_simp then we make the resulting lemma a simp-lemma.
Derive lemmas specifying the projections of the declaration. If todo is non-empty, it will generate exactly the names in todo.
simps_tac derives simp-lemmas for all (nested) non-Prop projections of the declaration. If todo is non-empty, it will generate exactly the names in todo. If short_nm is true, the generated names will only use the last projection name.
The parser for simps. Pattern: 'lemmas_only'? ident*
@[simps] def refl (α) : α ≃ α := ⟨id, λ x, x, λ x, rfl, λ x, rfl⟩
derives two simp-lemmas:
@[simp] lemma refl_to_fun (α) (x : α) : (refl α).to_fun x = id x
@[simp] lemma refl_inv_fun (α) (x : α) : (refl α).inv_fun x = x
attribute [simps to_fun] refl