Skip to content

Commit

Permalink
feat(logic/basic): ulift.down is injective (#12824)
Browse files Browse the repository at this point in the history
We also make the arguments to `plift.down_inj` inferred.
  • Loading branch information
vihdzp committed Mar 22, 2022
1 parent d71e06c commit e51377f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/logic/basic.lean
Expand Up @@ -155,9 +155,18 @@ assume ⟨h⟩, h.elim
lemma congr_arg_heq {α} {β : α → Sort*} (f : ∀ a, β a) : ∀ {a₁ a₂ : α}, a₁ = a₂ → f a₁ == f a₂
| a _ rfl := heq.rfl

lemma plift.down_inj {α : Sort*} : ∀ (a b : plift α), a.down = b.down → a = b
lemma ulift.down_injective {α : Sort*} : function.injective (@ulift.down α)
| ⟨a⟩ ⟨b⟩ rfl := rfl

@[simp] lemma ulift.down_inj {α : Sort*} {a b : ulift α} : a.down = b.down ↔ a = b :=
⟨λ h, ulift.down_injective h, λ h, by rw h⟩

lemma plift.down_injective {α : Sort*} : function.injective (@plift.down α)
| ⟨a⟩ ⟨b⟩ rfl := rfl

@[simp] lemma plift.down_inj {α : Sort*} {a b : plift α} : a.down = b.down ↔ a = b :=
⟨λ h, plift.down_injective h, λ h, by rw h⟩

-- missing [symm] attribute for ne in core.
attribute [symm] ne.symm

Expand Down

0 comments on commit e51377f

Please sign in to comment.