Skip to content

Commit

Permalink
chore(algebra/group/pi): add pi.has_div
Browse files Browse the repository at this point in the history
Motivated by #4646
  • Loading branch information
urkud committed Oct 24, 2020
1 parent 2987a49 commit a819d1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/algebra/group/pi.lean
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ instance has_mul [∀ i, has_mul $ f i] : has_mul (Π i : I, f i) := ⟨λ f g i
@[to_additive] instance has_inv [∀ i, has_inv $ f i] : has_inv (Π i : I, f i) := ⟨λ f i, (f i)⁻¹⟩
@[simp, to_additive] lemma inv_apply [∀ i, has_inv $ f i] : x⁻¹ i = (x i)⁻¹ := rfl

instance has_div [Π i, has_div $ f i] : has_div (Π i : I, f i) := ⟨λ f g i, f i / g i⟩
@[simp] lemma div_apply [Π i, has_div $ f i] : (x / y) i = x i / y i := rfl

@[to_additive]
instance semigroup [∀ i, semigroup $ f i] : semigroup (Π i : I, f i) :=
by refine_struct { mul := (*), .. }; tactic.pi_instance_derive_field
Expand Down

0 comments on commit a819d1d

Please sign in to comment.