Skip to content

Commit

Permalink
feat(logic/basic): add auto_param.out and opt_param.out (#13599)
Browse files Browse the repository at this point in the history
  • Loading branch information
urkud committed Apr 22, 2022
1 parent 6729cca commit f7dac5e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/logic/basic.lean
Expand Up @@ -215,6 +215,16 @@ lemma fact_iff {p : Prop} : fact p ↔ p := ⟨λ h, h.1, λ h, ⟨h⟩⟩
Π i₂ j₂ i₁ j₁, φ i₁ j₁ i₂ j₂ :=
λ i₂ j₂ i₁ j₁, f i₁ j₁ i₂ j₂

/-- If `x : α . tac_name` then `x.out : α`. These are definitionally equal, but this can
nevertheless be useful for various reasons, e.g. to apply further projection notation or in an
argument to `simp`. -/
def auto_param.out {α : Sort*} {n : name} (x : auto_param α n) : α := x

/-- If `x : α := d` then `x.out : α`. These are definitionally equal, but this can
nevertheless be useful for various reasons, e.g. to apply further projection notation or in an
argument to `simp`. -/
def opt_param.out {α : Sort*} {d : α} (x : α := d) : α := x

end miscellany

open function
Expand Down

0 comments on commit f7dac5e

Please sign in to comment.