Skip to content

Commit

Permalink
chore(data/quot): Add missing simp lemmas (#5372)
Browse files Browse the repository at this point in the history
These are called `lift_on'_beta` for consistency with `lift_on_beta`; even though we also have `map_mk'` etc in the same file.
  • Loading branch information
eric-wieser committed Dec 16, 2020
1 parent 78940f4 commit 6548be4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/data/quot.lean
Expand Up @@ -345,13 +345,21 @@ instance argument. -/
protected def lift_on' (q : quotient s₁) (f : α → φ)
(h : ∀ a b, @setoid.r α s₁ a b → f a = f b) : φ := quotient.lift_on q f h

@[simp]
protected lemma lift_on'_beta (f : α → φ) (h) (x : α) :
quotient.lift_on' (@quotient.mk' _ s₁ x) f h = f x := rfl

/-- A version of `quotient.lift_on₂` taking `{s₁ : setoid α} {s₂ : setoid β}` as implicit arguments
instead of instance arguments. -/
@[elab_as_eliminator, reducible]
protected def lift_on₂' (q₁ : quotient s₁) (q₂ : quotient s₂) (f : α → β → γ)
(h : ∀ a₁ a₂ b₁ b₂, @setoid.r α s₁ a₁ b₁ → @setoid.r β s₂ a₂ b₂ → f a₁ a₂ = f b₁ b₂) : γ :=
quotient.lift_on₂ q₁ q₂ f h

@[simp]
protected lemma lift_on₂'_beta (f : α → β → γ) (h) (a : α) (b : β) :
quotient.lift_on₂' (@quotient.mk' _ s₁ a) (@quotient.mk' _ s₂ b) f h = f a b := rfl

/-- A version of `quotient.ind` taking `{s : setoid α}` as an implicit argument instead of an
instance argument. -/
@[elab_as_eliminator]
Expand Down

0 comments on commit 6548be4

Please sign in to comment.