Skip to content

Commit

Permalink
feat(algebra/group/type_tags): finite & infinite instances for additi…
Browse files Browse the repository at this point in the history
…ve/multiplicative group type tags (#16662)

- adds finite & infinite instances for additive/multiplicative group type tags
  • Loading branch information
mlavrent committed Sep 27, 2022
1 parent 6f9edf5 commit a652850
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/algebra/group/type_tags.lean
Expand Up @@ -5,6 +5,7 @@ Authors: Mario Carneiro
-/
import algebra.hom.group
import logic.equiv.basic
import data.finite.defs
/-!
# Type tags that turn additive structures into multiplicative, and vice versa
Expand Down Expand Up @@ -69,6 +70,12 @@ end multiplicative
instance [inhabited α] : inhabited (additive α) := ⟨additive.of_mul default⟩
instance [inhabited α] : inhabited (multiplicative α) := ⟨multiplicative.of_add default⟩

instance [finite α] : finite (additive α) := finite.of_equiv α (by refl)
instance [finite α] : finite (multiplicative α) := finite.of_equiv α (by refl)

instance [infinite α] : infinite (additive α) := by tauto
instance [infinite α] : infinite (multiplicative α) := by tauto

instance [nontrivial α] : nontrivial (additive α) :=
additive.of_mul.injective.nontrivial

Expand Down

0 comments on commit a652850

Please sign in to comment.