The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V05. Groups

Mathlib.Algebra.Group.TransferInstance

51 declarations. Mathlib docs · Source

Transfer algebraic structures across Equivs

In this file we prove lemmas of the following form: if β has a group structure and α ≃ β then α has a group structure, and similarly for monoids, semigroups and so on.

Implementation notes

When adding new definitions that transfer type-classes across an equivalence, please use abbrev. See note [reducible non-instances].

def LibraryNote.instance_transfer_via_equivalence E1 #

Batteries.Util.LibraryNote

For many type classes, we have a definition that lets us transfer instances from one type to another using an equivalence, such as Equiv.mul for Mul. Constructing data instances in this way is discouraged because the resulting data is inefficient to unfold. To somewhat mitigate this problem, in these definitions we don't write the projections on Equiv in the usual way using Equiv.symm and DFunLike.coe, and instead use Equiv.toFun and Equiv.invFun directly. As a result, unification has to do less unfolding.

Note also that when constructing data instances in this way, it usually helps to use fast_instance% to get a faster instance.

abbrev Equiv.one E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [One β] → One α

Transfer One across an Equiv

abbrev Equiv.zero E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Zero β] → Zero α

Transfer Zero across an Equiv

theorem Equiv.zero_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Zero β], 0 = e.symm 0

theorem Equiv.one_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : One β], 1 = e.symm 1

abbrev Equiv.mul E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Mul β] → Mul α

Transfer Mul across an Equiv

abbrev Equiv.add E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Add β] → Add α

Transfer Add across an Equiv

theorem Equiv.add_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Add β] (x y : α), x + y = e.symm (e x + e y)

theorem Equiv.mul_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Mul β] (x y : α), x * y = e.symm (e x * e y)

abbrev Equiv.div E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Div β] → Div α

Transfer Div across an Equiv

abbrev Equiv.sub E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Sub β] → Sub α

Transfer Sub across an Equiv

theorem Equiv.sub_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Sub β] (x y : α), x - y = e.symm (e x - e y)

theorem Equiv.div_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Div β] (x y : α), x / y = e.symm (e x / e y)

abbrev Equiv.Inv E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Inv β] → Inv α

Transfer Inv across an Equiv

abbrev Equiv.Neg E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Neg β] → Neg α

Transfer Neg across an Equiv

theorem Equiv.inv_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Inv β] (x : α), x⁻¹ = e.symm (e x)⁻¹

theorem Equiv.neg_def E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Neg β] (x : α), -x = e.symm (-e x)

abbrev Equiv.pow E1 #

(M : Type u_1) → {α : Type u_2} → {β : Type u_3} → α ≃ β → [Pow β M] → Pow α M

Transfer Pow across an Equiv

abbrev Equiv.vadd E1 #

(M : Type u_1) → {α : Type u_2} → {β : Type u_3} → α ≃ β → [VAdd M β] → VAdd M α

Transfer VAdd across an Equiv

abbrev Equiv.smul E1 #

(M : Type u_1) → {α : Type u_2} → {β : Type u_3} → α ≃ β → [SMul M β] → SMul M α

Transfer SMul across an Equiv

theorem Equiv.pow_def E0 #

∀ {M : Type u_1} {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Pow β M] (n : M) (x : α), x ^ n = e.symm (e x ^ n)

theorem Equiv.smul_def E0 #

∀ {M : Type u_1} {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : SMul M β] (n : M) (x : α), n • x = e.symm (n • e x)

theorem Equiv.vadd_def E0 #

∀ {M : Type u_1} {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : VAdd M β] (n : M) (x : α), n +ᵥ x = e.symm (n +ᵥ e x)

def Equiv.mulEquiv E1 #

{α : Type u_2} →
  {β : Type u_3} →
    (e : α ≃ β) →
      [inst : Mul β] →
        have x := e.mul;
        α ≃* β

An equivalence e : α ≃ β gives a multiplicative equivalence α ≃* β where the multiplicative structure on α is the one obtained by transporting a multiplicative structure on β back along e.

def Equiv.addEquiv E1 #

{α : Type u_2} →
  {β : Type u_3} →
    (e : α ≃ β) →
      [inst : Add β] →
        have x := e.add;
        α ≃+ β

An equivalence e : α ≃ β gives an additive equivalence α ≃+ β where the additive structure on α is the one obtained by transporting an additive structure on β back along e.

theorem Equiv.mulEquiv_apply E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Mul β] (a : α), e.mulEquiv a = e a

theorem Equiv.addEquiv_apply E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Add β] (a : α), e.addEquiv a = e a

theorem Equiv.addEquiv_symm_apply E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Add β] (b : β), (AddEquiv.symm e.addEquiv) b = e.symm b

theorem Equiv.mulEquiv_symm_apply E0 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Mul β] (b : β), (MulEquiv.symm e.mulEquiv) b = e.symm b

abbrev Equiv.semigroup E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Semigroup β] → Semigroup α

Transfer Semigroup across an Equiv

abbrev Equiv.addSemigroup E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [AddSemigroup β] → AddSemigroup α

Transfer add_semigroup across an Equiv

abbrev Equiv.commSemigroup E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [CommSemigroup β] → CommSemigroup α

Transfer CommSemigroup across an Equiv

abbrev Equiv.addCommSemigroup E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [AddCommSemigroup β] → AddCommSemigroup α

Transfer AddCommSemigroup across an Equiv

theorem Equiv.isLeftCancelMul E1 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Mul β] [IsLeftCancelMul β], IsLeftCancelMul α

Transfer IsLeftCancelMul across an Equiv

theorem Equiv.isLeftCancelAdd E1 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Add β] [IsLeftCancelAdd β], IsLeftCancelAdd α

Transfer IsLeftCancelAdd across an Equiv

theorem Equiv.isRightCancelMul E1 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Mul β] [IsRightCancelMul β], IsRightCancelMul α

Transfer IsRightCancelMul across an Equiv

theorem Equiv.isRightCancelAdd E1 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Add β] [IsRightCancelAdd β], IsRightCancelAdd α

Transfer IsRightCancelAdd across an Equiv

theorem Equiv.isCancelMul E1 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Mul β] [IsCancelMul β], IsCancelMul α

Transfer IsCancelMul across an Equiv

theorem Equiv.isCancelAdd E1 #

∀ {α : Type u_2} {β : Type u_3} (e : α ≃ β) [inst : Add β] [IsCancelAdd β], IsCancelAdd α

Transfer IsCancelAdd across an Equiv

abbrev Equiv.mulOneClass E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [MulOneClass β] → MulOneClass α

Transfer MulOneClass across an Equiv

abbrev Equiv.addZeroClass E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [AddZeroClass β] → AddZeroClass α

Transfer AddZeroClass across an Equiv

abbrev Equiv.monoid E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Monoid β] → Monoid α

Transfer Monoid across an Equiv

abbrev Equiv.addMonoid E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [AddMonoid β] → AddMonoid α

Transfer AddMonoid across an Equiv

abbrev Equiv.commMonoid E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [CommMonoid β] → CommMonoid α

Transfer CommMonoid across an Equiv

abbrev Equiv.addCommMonoid E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [AddCommMonoid β] → AddCommMonoid α

Transfer AddCommMonoid across an Equiv

abbrev Equiv.group E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [Group β] → Group α

Transfer Group across an Equiv

abbrev Equiv.addGroup E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [AddGroup β] → AddGroup α

Transfer AddGroup across an Equiv

abbrev Equiv.commGroup E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [CommGroup β] → CommGroup α

Transfer CommGroup across an Equiv

abbrev Equiv.addCommGroup E1 #

{α : Type u_2} → {β : Type u_3} → α ≃ β → [AddCommGroup β] → AddCommGroup α

Transfer AddCommGroup across an Equiv

theorem Finite.exists_type_univ_nonempty_mulEquiv E1 #

∀ (G : Type u) [inst : Group G] [Finite G], ∃ G' x x_1, Nonempty (G ≃* G')

Any finite group in universe u is equivalent to some finite group in universe v.

theorem Finite.exists_type_univ_nonempty_addEquiv E1 #

∀ (G : Type u) [inst : AddGroup G] [Finite G], ∃ G' x x_1, Nonempty (G ≃+ G')

Any finite group in universe u is equivalent to some finite group in universe v.