Skip to content

Commit

Permalink
Use Sum.inl and Sum.inr
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanRenison committed Sep 18, 2024
1 parent 3d43f4c commit 30b1c57
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Mathlib/Combinatorics/SimpleGraph/Sum.lean
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected def Sum (G : SimpleGraph α) (H : SimpleGraph β) : SimpleGraph (α
| Sum.inl _, Sum.inr _ | Sum.inr _, Sum.inl _ => id
loopless u := by cases u <;> simp

@[simps]
@[simps!]
instance : HAdd (SimpleGraph α) (SimpleGraph β) (SimpleGraph (α ⊕ β)) := ⟨SimpleGraph.Sum⟩

variable {G : SimpleGraph α} {H : SimpleGraph β}
Expand All @@ -62,15 +62,15 @@ def SumAssoc {I : SimpleGraph γ} : (G + H) + I ≃g G + (H + I) := ⟨Equiv.sum

/-- The embedding of `G` into `G + H`. -/
@[simps]
def SumLeft : G ↪g G + H where
toFun u := Sum.inl u
protected def Sum.inl : G ↪g G + H where
toFun u := _root_.Sum.inl u
inj' u v := by simp
map_rel_iff' := by simp

/-- The embedding of `H` into `G + H`. -/
@[simps]
def SumRight : H ↪g G + H where
toFun u := Sum.inr u
protected def Sum.inr : H ↪g G + H where
toFun u := _root_.Sum.inr u
inj' u v := by simp
map_rel_iff' := by simp

Expand Down

0 comments on commit 30b1c57

Please sign in to comment.