File: Mathlib/GroupTheory/FreeGroup/IsFreeGroup.lean

full_name: FreeGroupBasis.ofRepr
code: /-- A free group basis `FreeGroupBasis ι G` is a structure recording the isomorphism between a
group `G` and the free group over `ι`. One may think of such a basis as a function from `ι` to `G`
(which is registered through a `FunLike` instance) together with the fact that the morphism induced
by this function from `FreeGroup ι` to `G` is an isomorphism. -/
structure FreeGroupBasis (ι : Type*) (G : Type*) [Group G] where
  /-- `FreeGroupBasis.ofRepr` constructs a basis given an equivalence with a free group. -/
  ofRepr ::
    /-- `repr` is the isomorphism between the group `G` and the free group generated by `ι`. -/
    repr : G ≃* FreeGroup ι
goal: FreeGroupBasis ι G

full_name: FreeGroupBasis.repr
code: /-- A free group basis `FreeGroupBasis ι G` is a structure recording the isomorphism between a
group `G` and the free group over `ι`. One may think of such a basis as a function from `ι` to `G`
(which is registered through a `FunLike` instance) together with the fact that the morphism induced
by this function from `FreeGroup ι` to `G` is an isomorphism. -/
structure FreeGroupBasis (ι : Type*) (G : Type*) [Group G] where
  /-- `FreeGroupBasis.ofRepr` constructs a basis given an equivalence with a free group. -/
  ofRepr ::
    /-- `repr` is the isomorphism between the group `G` and the free group generated by `ι`. -/
    repr : G ≃* FreeGroup ι
goal: G ≃* FreeGroup ι

full_name: FreeGroupBasis
code: /-- A free group basis `FreeGroupBasis ι G` is a structure recording the isomorphism between a
group `G` and the free group over `ι`. One may think of such a basis as a function from `ι` to `G`
(which is registered through a `FunLike` instance) together with the fact that the morphism induced
by this function from `FreeGroup ι` to `G` is an isomorphism. -/
structure FreeGroupBasis (ι : Type*) (G : Type*) [Group G] where
  /-- `FreeGroupBasis.ofRepr` constructs a basis given an equivalence with a free group. -/
  ofRepr ::
    /-- `repr` is the isomorphism between the group `G` and the free group generated by `ι`. -/
    repr : G ≃* FreeGroup ι
goal: Type (max u_1 u_2)

full_name: IsFreeGroup
code: /-- A group is free if it admits a free group basis. In the definition, we require the basis to
be in the same universe as `G`, although this property follows from the existence of a basis in
any universe, see `FreeGroupBasis.isFreeGroup`. -/
class IsFreeGroup (G : Type u) [Group G] : Prop where
  nonempty_basis : ∃ (ι : Type u), Nonempty (FreeGroupBasis ι G)
goal: Prop

full_name: IsFreeGroup.nonempty_basis
code: /-- A group is free if it admits a free group basis. In the definition, we require the basis to
be in the same universe as `G`, although this property follows from the existence of a basis in
any universe, see `FreeGroupBasis.isFreeGroup`. -/
class IsFreeGroup (G : Type u) [Group G] : Prop where
  nonempty_basis : ∃ (ι : Type u), Nonempty (FreeGroupBasis ι G)
goal: ∃ ι, Nonempty (FreeGroupBasis ι G)

full_name: FreeGroupBasis.instFunLike
code: /-- A free group basis for `G` over `ι` is associated to a map `ι → G` recording the images of
the generators. -/
instance instFunLike : FunLike (FreeGroupBasis ι G) ι G 
goal: FunLike (FreeGroupBasis ι G) ι G

full_name: FreeGroupBasis.repr_apply_coe
code: @[simp] lemma repr_apply_coe (b : FreeGroupBasis ι G) (i : ι) : b.repr (b i) = FreeGroup.of i 
goal: b.repr (b i) = FreeGroup.of i

full_name: FreeGroupBasis.ofFreeGroup
code: /-- The canonical basis of the free group over `X`. -/
def ofFreeGroup (X : Type*) : FreeGroupBasis X (FreeGroup X) 
goal: FreeGroupBasis X (FreeGroup X)

full_name: FreeGroupBasis.ofFreeGroup_apply
code: @[simp] lemma ofFreeGroup_apply {X : Type*} (x : X) :
    FreeGroupBasis.ofFreeGroup X x = FreeGroup.of x 
goal: (FreeGroupBasis.ofFreeGroup X) x = FreeGroup.of x

full_name: FreeGroupBasis.reindex
code: /-- Reindex a free group basis through a bijection of the indexing sets. -/
protected def reindex (b : FreeGroupBasis ι G) (e : ι ≃ ι') : FreeGroupBasis ι' G 
goal: FreeGroupBasis ι' G

full_name: FreeGroupBasis.reindex_apply
code: @[simp] lemma reindex_apply (b : FreeGroupBasis ι G) (e : ι ≃ ι') (x : ι') :
    b.reindex e x = b (e.symm x) 
goal: (b.reindex e) x = b (e.symm x)

full_name: FreeGroupBasis.map
code: /-- Pushing a free group basis through a group isomorphism. -/
protected def map (b : FreeGroupBasis ι G) (e : G ≃* H) : FreeGroupBasis ι H 
goal: FreeGroupBasis ι H

full_name: FreeGroupBasis.map_apply
code: @[simp] lemma map_apply (b : FreeGroupBasis ι G) (e : G ≃* H) (x : ι) :
    b.map e x = e (b x) 
goal: (b.map e) x = e (b x)

full_name: FreeGroupBasis.injective
code: protected lemma injective (b : FreeGroupBasis ι G) : Injective b 
goal: Function.Injective ⇑b

full_name: FreeGroupBasis.isFreeGroup
code: /-- A group admitting a free group basis is a free group. -/
lemma isFreeGroup (b : FreeGroupBasis ι G) : IsFreeGroup G 
goal: IsFreeGroup G

full_name: FreeGroupBasis.instIsFreeGroupFreeGroup
code: instance (X : Type*) : IsFreeGroup (FreeGroup X) 
goal: IsFreeGroup (FreeGroup X)

full_name: FreeGroupBasis.lift_apply_apply
code: /-- Given a free group basis of `G` over `ι`, there is a canonical bijection between maps from `ι`
to a group `H` and morphisms from `G` to `H`. -/
@[simps!]
def lift (b : FreeGroupBasis ι G) : (ι → H) ≃ (G →* H) 
goal: ∀ (a : ι → H) (a_1 : G), (b.lift a) a_1 = (FreeGroup.lift a) (b.repr a_1)

full_name: FreeGroupBasis.lift
code: /-- Given a free group basis of `G` over `ι`, there is a canonical bijection between maps from `ι`
to a group `H` and morphisms from `G` to `H`. -/
@[simps!]
def lift (b : FreeGroupBasis ι G) : (ι → H) ≃ (G →* H) 
goal: (ι → H) ≃ (G →* H)

full_name: FreeGroupBasis.lift_symm_apply
code: /-- Given a free group basis of `G` over `ι`, there is a canonical bijection between maps from `ι`
to a group `H` and morphisms from `G` to `H`. -/
@[simps!]
def lift (b : FreeGroupBasis ι G) : (ι → H) ≃ (G →* H) 
goal: ∀ (a : G →* H) (a_1 : ι), b.lift.symm a a_1 = a (b.repr.symm (FreeGroup.of a_1))

full_name: FreeGroupBasis.ext_hom
code: /-- If two morphisms on `G` coincide on the elements of a basis, then they coincide. -/
lemma ext_hom (b : FreeGroupBasis ι G) (f g : G →* H) (h : ∀ i, f (b i) = g (b i)) : f = g 
goal: f = g

full_name: FreeGroupBasis.ofLift
code: /-- If a group satisfies the universal property of a free group with respect to a given type, then
it admits a free group basis based on this type. Here, the universal property is expressed as
in `IsFreeGroup.lift` and its properties. -/
def ofLift {G : Type u} [Group G] (X : Type u) (of : X → G)
    (lift : ∀ {H : Type u} [Group H], (X → H) ≃ (G →* H))
    (lift_of : ∀ {H : Type u} [Group H], ∀ (f : X → H) (a), lift f (of a) = f a) :
    FreeGroupBasis X G 
goal: FreeGroupBasis X G

full_name: FreeGroupBasis.ofUniqueLift
code: /-- If a group satisfies the universal property of a free group with respect to a given type, then
it admits a free group basis based on this type. Here
the universal property is expressed as in `IsFreeGroup.unique_lift`.  -/
def ofUniqueLift {G : Type u} [Group G] (X : Type u) (of : X → G)
    (h : ∀ {H : Type u} [Group H] (f : X → H), ∃! F : G →* H, ∀ a, F (of a) = f a) :
    FreeGroupBasis X G 
goal: FreeGroupBasis X G

full_name: IsFreeGroup.Generators
code: /-- A set of generators of a free group, chosen arbitrarily -/
def Generators : Type _ 
goal: Type u_1

full_name: IsFreeGroup.definition._@.Mathlib.GroupTheory.FreeGroup.IsFreeGroup._hyg.1050
code: /-- Any free group is isomorphic to "the" free group. -/
irreducible_def mulEquiv : FreeGroup (Generators G) ≃* G 
goal: FreeGroup (IsFreeGroup.Generators G) ≃* G

full_name: IsFreeGroup.wrapped._@.Mathlib.GroupTheory.FreeGroup.IsFreeGroup._hyg.1050
code: /-- Any free group is isomorphic to "the" free group. -/
irreducible_def mulEquiv : FreeGroup (Generators G) ≃* G 
goal: Subtype (Eq IsFreeGroup.definition✝)

full_name: IsFreeGroup.mulEquiv_def
code: /-- Any free group is isomorphic to "the" free group. -/
irreducible_def mulEquiv : FreeGroup (Generators G) ≃* G 
goal: IsFreeGroup.mulEquiv G = ⋯.some.repr.symm

full_name: IsFreeGroup.mulEquiv
code: /-- Any free group is isomorphic to "the" free group. -/
irreducible_def mulEquiv : FreeGroup (Generators G) ≃* G 
goal: FreeGroup (IsFreeGroup.Generators G) ≃* G

full_name: IsFreeGroup.basis
code: /-- A free group basis of a free group `G`, over the set `Generators G`. -/
def basis : FreeGroupBasis (Generators G) G 
goal: FreeGroupBasis (IsFreeGroup.Generators G) G

full_name: IsFreeGroup.toFreeGroup
code: /-- Any free group is isomorphic to "the" free group. -/
@[simps!]
def toFreeGroup : G ≃* FreeGroup (Generators G) 
goal: G ≃* FreeGroup (IsFreeGroup.Generators G)

full_name: IsFreeGroup.toFreeGroup_symm_apply
code: /-- Any free group is isomorphic to "the" free group. -/
@[simps!]
def toFreeGroup : G ≃* FreeGroup (Generators G) 
goal: ∀ (a : FreeGroup (IsFreeGroup.Generators G)), (IsFreeGroup.toFreeGroup G).symm a = (IsFreeGroup.mulEquiv G) a

full_name: IsFreeGroup.toFreeGroup_apply
code: /-- Any free group is isomorphic to "the" free group. -/
@[simps!]
def toFreeGroup : G ≃* FreeGroup (Generators G) 
goal: ∀ (a : G), (IsFreeGroup.toFreeGroup G) a = (IsFreeGroup.mulEquiv G).symm a

full_name: IsFreeGroup.of
code: /-- The canonical injection of G's generators into G -/
def of : Generators G → G 
goal: IsFreeGroup.Generators G → G

full_name: IsFreeGroup.lift
code: /-- The equivalence between functions on the generators and group homomorphisms from a free group
given by those generators. -/
def lift : (Generators G → H) ≃ (G →* H) 
goal: (IsFreeGroup.Generators G → H) ≃ (G →* H)

full_name: IsFreeGroup.lift_of
code: @[simp]
theorem lift_of (f : Generators G → H) (a : Generators G) : lift f (of a) = f a 
goal: (IsFreeGroup.lift f) (IsFreeGroup.of a) = f a

full_name: IsFreeGroup.lift_symm_apply
code: @[simp]
theorem lift_symm_apply (f : G →* H) (a : Generators G) : (lift.symm f) a = f (of a) 
goal: IsFreeGroup.lift.symm f a = f (IsFreeGroup.of a)

full_name: IsFreeGroup.ext_hom
code: theorem ext_hom ⦃f g : G →* H⦄ (h : ∀ a : Generators G, f (of a) = g (of a)) : f = g 
goal: f = g

full_name: IsFreeGroup.unique_lift
code: /-- The universal property of a free group: A function from the generators of `G` to another
group extends in a unique way to a homomorphism from `G`.

Note that since `IsFreeGroup.lift` is expressed as a bijection, it already
expresses the universal property.  -/
theorem unique_lift (f : Generators G → H) : ∃! F : G →* H, ∀ a, F (of a) = f a 
goal: ∃! F, ∀ (a : IsFreeGroup.Generators G), F (IsFreeGroup.of a) = f a

full_name: IsFreeGroup.ofLift
code: /-- If a group satisfies the universal property of a free group with respect to a given type, then
it is free. Here, the universal property is expressed as in `IsFreeGroup.lift` and its
properties. -/
lemma ofLift {G : Type u} [Group G] (X : Type u) (of : X → G)
    (lift : ∀ {H : Type u} [Group H], (X → H) ≃ (G →* H))
    (lift_of : ∀ {H : Type u} [Group H], ∀ (f : X → H) (a), lift f (of a) = f a) :
    IsFreeGroup G 
goal: IsFreeGroup G

full_name: IsFreeGroup.ofUniqueLift
code: /-- If a group satisfies the universal property of a free group with respect to a given type, then
it is free. Here the universal property is expressed as in `IsFreeGroup.unique_lift`.  -/
lemma ofUniqueLift {G : Type u} [Group G] (X : Type u) (of : X → G)
    (h : ∀ {H : Type u} [Group H] (f : X → H), ∃! F : G →* H, ∀ a, F (of a) = f a) :
    IsFreeGroup G 
goal: IsFreeGroup G

full_name: IsFreeGroup.ofMulEquiv
code: lemma ofMulEquiv (e : G ≃* H) : IsFreeGroup H 
goal: IsFreeGroup H