Skip to content

Commit

Permalink
feat(order/rel_iso): Add subrel instances (#12758)
Browse files Browse the repository at this point in the history
  • Loading branch information
vihdzp committed Mar 18, 2022
1 parent fdd7e98 commit f6e85fc
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/order/rel_iso.lean
Expand Up @@ -504,10 +504,21 @@ protected def rel_embedding (r : α → α → Prop) (p : set α) :
@[simp] theorem rel_embedding_apply (r : α → α → Prop) (p a) :
subrel.rel_embedding r p a = a.1 := rfl

instance (r : α → α → Prop) [is_well_order α r]
(p : set α) : is_well_order p (subrel r p) :=
instance (r : α → α → Prop) [is_well_order α r] (p : set α) : is_well_order p (subrel r p) :=
rel_embedding.is_well_order (subrel.rel_embedding r p)

instance (r : α → α → Prop) [is_refl α r] (p : set α) : is_refl p (subrel r p) :=
⟨λ x, @is_refl.refl α r _ x⟩

instance (r : α → α → Prop) [is_symm α r] (p : set α) : is_symm p (subrel r p) :=
⟨λ x y, @is_symm.symm α r _ x y⟩

instance (r : α → α → Prop) [is_trans α r] (p : set α) : is_trans p (subrel r p) :=
⟨λ x y z, @is_trans.trans α r _ x y z⟩

instance (r : α → α → Prop) [is_irrefl α r] (p : set α) : is_irrefl p (subrel r p) :=
⟨λ x, @is_irrefl.irrefl α r _ x⟩

end subrel

/-- Restrict the codomain of a relation embedding. -/
Expand Down

0 comments on commit f6e85fc

Please sign in to comment.