File: Mathlib/GroupTheory/FreeAbelianGroup.lean

full_name: FreeAbelianGroup
code: /-- The free abelian group on a type. -/
def FreeAbelianGroup : Type u 
goal: Type u

full_name: FreeAbelianGroup.addCommGroup
code: instance FreeAbelianGroup.addCommGroup : AddCommGroup (FreeAbelianGroup α) 
goal: AddCommGroup (FreeAbelianGroup α)

full_name: instInhabitedFreeAbelianGroup
code: instance : Inhabited (FreeAbelianGroup α) 
goal: Inhabited (FreeAbelianGroup α)

full_name: instUniqueFreeAbelianGroupOfIsEmpty
code: instance [IsEmpty α] : Unique (FreeAbelianGroup α) 
goal: Unique (FreeAbelianGroup α)

full_name: FreeAbelianGroup.of
code: /-- The canonical map from `α` to `FreeAbelianGroup α`. -/
def of (x : α) : FreeAbelianGroup α 
goal: FreeAbelianGroup α

full_name: FreeAbelianGroup.lift
code: /-- The map `FreeAbelianGroup α →+ A` induced by a map of types `α → A`. -/
def lift {β : Type v} [AddCommGroup β] : (α → β) ≃ (FreeAbelianGroup α →+ β) 
goal: (α → β) ≃ (FreeAbelianGroup α →+ β)

full_name: FreeAbelianGroup.lift.of
code: @[simp]
protected theorem of (x : α) : lift f (of x) = f x 
goal: (FreeAbelianGroup.lift f) (FreeAbelianGroup.of x) = f x

full_name: FreeAbelianGroup.lift.unique
code: protected theorem unique (g : FreeAbelianGroup α →+ β) (hg : ∀ x, g (of x) = f x) {x} :
    g x = lift f x 
goal: g x = (FreeAbelianGroup.lift f) x

full_name: FreeAbelianGroup.lift.ext
code: /-- See note [partially-applied ext lemmas]. -/
@[ext high]
protected theorem ext (g h : FreeAbelianGroup α →+ β) (H : ∀ x, g (of x) = h (of x)) : g = h 
goal: g = h

full_name: FreeAbelianGroup.lift.map_hom
code: theorem map_hom {α β γ} [AddCommGroup β] [AddCommGroup γ] (a : FreeAbelianGroup α) (f : α → β)
    (g : β →+ γ) : g (lift f a) = lift (g ∘ f) a 
goal: g ((FreeAbelianGroup.lift f) a) = (FreeAbelianGroup.lift (⇑g ∘ f)) a

full_name: FreeAbelianGroup.of_injective
code: theorem of_injective : Function.Injective (of : α → FreeAbelianGroup α) 
goal: Function.Injective FreeAbelianGroup.of

full_name: FreeAbelianGroup.induction_on
code: @[elab_as_elim]
protected theorem induction_on {C : FreeAbelianGroup α → Prop} (z : FreeAbelianGroup α) (C0 : C 0)
    (C1 : ∀ x, C <| of x) (Cn : ∀ x, C (of x) → C (-of x)) (Cp : ∀ x y, C x → C y → C (x + y)) :
    C z 
goal: C z

full_name: FreeAbelianGroup.lift.add'
code: theorem lift.add' {α β} [AddCommGroup β] (a : FreeAbelianGroup α) (f g : α → β) :
    lift (f + g) a = lift f a + lift g a 
goal: (FreeAbelianGroup.lift (f + g)) a = (FreeAbelianGroup.lift f) a + (FreeAbelianGroup.lift g) a

full_name: FreeAbelianGroup.liftAddGroupHom
code: /-- If `g : FreeAbelianGroup X` and `A` is an abelian group then `liftAddGroupHom g`
is the additive group homomorphism sending a function `X → A` to the term of type `A`
corresponding to the evaluation of the induced map `FreeAbelianGroup X → A` at `g`. -/
@[simps!]  -- Porting note: Changed `simps` to `simps!`.
def liftAddGroupHom {α} (β) [AddCommGroup β] (a : FreeAbelianGroup α) : (α → β) →+ β 
goal: (α → β) →+ β

full_name: FreeAbelianGroup.liftAddGroupHom_apply
code: /-- If `g : FreeAbelianGroup X` and `A` is an abelian group then `liftAddGroupHom g`
is the additive group homomorphism sending a function `X → A` to the term of type `A`
corresponding to the evaluation of the induced map `FreeAbelianGroup X → A` at `g`. -/
@[simps!]  -- Porting note: Changed `simps` to `simps!`.
def liftAddGroupHom {α} (β) [AddCommGroup β] (a : FreeAbelianGroup α) : (α → β) →+ β 
goal: (FreeAbelianGroup.liftAddGroupHom β a) f = (FreeAbelianGroup.lift f) a

full_name: FreeAbelianGroup.lift_neg'
code: theorem lift_neg' {β} [AddCommGroup β] (f : α → β) : lift (-f) = -lift f 
goal: FreeAbelianGroup.lift (-f) = -FreeAbelianGroup.lift f

full_name: FreeAbelianGroup.instMonad
code: instance : Monad FreeAbelianGroup.{u} 
goal: Monad FreeAbelianGroup

full_name: FreeAbelianGroup.induction_on'
code: @[elab_as_elim]
protected theorem induction_on' {C : FreeAbelianGroup α → Prop} (z : FreeAbelianGroup α) (C0 : C 0)
    (C1 : ∀ x, C <| pure x) (Cn : ∀ x, C (pure x) → C (-pure x))
    (Cp : ∀ x y, C x → C y → C (x + y)) : C z 
goal: C z

full_name: FreeAbelianGroup.map_pure
code: @[simp]
theorem map_pure (f : α → β) (x : α) : f <$> (pure x : FreeAbelianGroup α) = pure (f x) 
goal: f <$> pure x = pure (f x)

full_name: FreeAbelianGroup.map_zero
code: @[simp]
protected theorem map_zero (f : α → β) : f <$> (0 : FreeAbelianGroup α) = 0 
goal: f <$> 0 = 0

full_name: FreeAbelianGroup.map_add
code: @[simp]
protected theorem map_add (f : α → β) (x y : FreeAbelianGroup α) :
    f <$> (x + y) = f <$> x + f <$> y 
goal: f <$> (x + y) = f <$> x + f <$> y

full_name: FreeAbelianGroup.map_neg
code: @[simp]
protected theorem map_neg (f : α → β) (x : FreeAbelianGroup α) : f <$> (-x) = -f <$> x 
goal: f <$> (-x) = -f <$> x

full_name: FreeAbelianGroup.map_sub
code: @[simp]
protected theorem map_sub (f : α → β) (x y : FreeAbelianGroup α) :
    f <$> (x - y) = f <$> x - f <$> y 
goal: f <$> (x - y) = f <$> x - f <$> y

full_name: FreeAbelianGroup.map_of
code: @[simp]
theorem map_of (f : α → β) (y : α) : f <$> of y = of (f y) 
goal: f <$> FreeAbelianGroup.of y = FreeAbelianGroup.of (f y)

full_name: FreeAbelianGroup.pure_bind
code: theorem pure_bind (f : α → FreeAbelianGroup β) (x) : pure x >>= f = f x 
goal: pure x >>= f = f x

full_name: FreeAbelianGroup.zero_bind
code: @[simp]
theorem zero_bind (f : α → FreeAbelianGroup β) : 0 >>= f = 0 
goal: 0 >>= f = 0

full_name: FreeAbelianGroup.add_bind
code: @[simp]
theorem add_bind (f : α → FreeAbelianGroup β) (x y : FreeAbelianGroup α) :
    x + y >>= f = (x >>= f) + (y >>= f) 
goal: x + y >>= f = (x >>= f) + (y >>= f)

full_name: FreeAbelianGroup.neg_bind
code: @[simp]
theorem neg_bind (f : α → FreeAbelianGroup β) (x : FreeAbelianGroup α) : -x >>= f = -(x >>= f) 
goal: -x >>= f = -(x >>= f)

full_name: FreeAbelianGroup.sub_bind
code: @[simp]
theorem sub_bind (f : α → FreeAbelianGroup β) (x y : FreeAbelianGroup α) :
    x - y >>= f = (x >>= f) - (y >>= f) 
goal: x - y >>= f = (x >>= f) - (y >>= f)

full_name: FreeAbelianGroup.pure_seq
code: @[simp]
theorem pure_seq (f : α → β) (x : FreeAbelianGroup α) : pure f <*> x = f <$> x 
goal: (Seq.seq (pure f) fun x_1 => x) = f <$> x

full_name: FreeAbelianGroup.zero_seq
code: @[simp]
theorem zero_seq (x : FreeAbelianGroup α) : (0 : FreeAbelianGroup (α → β)) <*> x = 0 
goal: (Seq.seq 0 fun x_1 => x) = 0

full_name: FreeAbelianGroup.add_seq
code: @[simp]
theorem add_seq (f g : FreeAbelianGroup (α → β)) (x : FreeAbelianGroup α) :
    f + g <*> x = (f <*> x) + (g <*> x) 
goal: (Seq.seq (f + g) fun x_1 => x) = (Seq.seq f fun x_1 => x) + Seq.seq g fun x_1 => x

full_name: FreeAbelianGroup.neg_seq
code: @[simp]
theorem neg_seq (f : FreeAbelianGroup (α → β)) (x : FreeAbelianGroup α) : -f <*> x = -(f <*> x) 
goal: (Seq.seq (-f) fun x_1 => x) = -Seq.seq f fun x_1 => x

full_name: FreeAbelianGroup.sub_seq
code: @[simp]
theorem sub_seq (f g : FreeAbelianGroup (α → β)) (x : FreeAbelianGroup α) :
    f - g <*> x = (f <*> x) - (g <*> x) 
goal: (Seq.seq (f - g) fun x_1 => x) = (Seq.seq f fun x_1 => x) - Seq.seq g fun x_1 => x

full_name: FreeAbelianGroup.seqAddGroupHom
code: /-- If `f : FreeAbelianGroup (α → β)`, then `f <*>` is an additive morphism
`FreeAbelianGroup α →+ FreeAbelianGroup β`. -/
def seqAddGroupHom (f : FreeAbelianGroup (α → β)) : FreeAbelianGroup α →+ FreeAbelianGroup β 
goal: FreeAbelianGroup α →+ FreeAbelianGroup β

full_name: FreeAbelianGroup.seq_zero
code: @[simp]
theorem seq_zero (f : FreeAbelianGroup (α → β)) : f <*> 0 = 0 
goal: (Seq.seq f fun x => 0) = 0

full_name: FreeAbelianGroup.seq_add
code: @[simp]
theorem seq_add (f : FreeAbelianGroup (α → β)) (x y : FreeAbelianGroup α) :
    f <*> x + y = (f <*> x) + (f <*> y) 
goal: (Seq.seq f fun x_1 => x + y) = (Seq.seq f fun x_1 => x) + Seq.seq f fun x => y

full_name: FreeAbelianGroup.seq_neg
code: @[simp]
theorem seq_neg (f : FreeAbelianGroup (α → β)) (x : FreeAbelianGroup α) : f <*> -x = -(f <*> x) 
goal: (Seq.seq f fun x_1 => -x) = -Seq.seq f fun x_1 => x

full_name: FreeAbelianGroup.seq_sub
code: @[simp]
theorem seq_sub (f : FreeAbelianGroup (α → β)) (x y : FreeAbelianGroup α) :
    f <*> x - y = (f <*> x) - (f <*> y) 
goal: (Seq.seq f fun x_1 => x - y) = (Seq.seq f fun x_1 => x) - Seq.seq f fun x => y

full_name: FreeAbelianGroup.instLawfulMonad
code: instance : LawfulMonad FreeAbelianGroup.{u} 
goal: LawfulMonad FreeAbelianGroup

full_name: FreeAbelianGroup.instCommApplicative
code: instance : CommApplicative FreeAbelianGroup.{u} 
goal: CommApplicative FreeAbelianGroup

full_name: FreeAbelianGroup.map
code: /-- The additive group homomorphism `FreeAbelianGroup α →+ FreeAbelianGroup β` induced from a
  map `α → β`. -/
def map (f : α → β) : FreeAbelianGroup α →+ FreeAbelianGroup β 
goal: FreeAbelianGroup α →+ FreeAbelianGroup β

full_name: FreeAbelianGroup.lift_comp
code: theorem lift_comp {α} {β} {γ} [AddCommGroup γ] (f : α → β) (g : β → γ) (x : FreeAbelianGroup α) :
    lift (g ∘ f) x = lift g (map f x) 
goal: (FreeAbelianGroup.lift (g ∘ f)) x = (FreeAbelianGroup.lift g) ((FreeAbelianGroup.map f) x)

full_name: FreeAbelianGroup.map_id
code: theorem map_id : map id = AddMonoidHom.id (FreeAbelianGroup α) 
goal: FreeAbelianGroup.map id = AddMonoidHom.id (FreeAbelianGroup α)

full_name: FreeAbelianGroup.map_id_apply
code: theorem map_id_apply (x : FreeAbelianGroup α) : map id x = x 
goal: (FreeAbelianGroup.map id) x = x

full_name: FreeAbelianGroup.map_comp
code: theorem map_comp {f : α → β} {g : β → γ} : map (g ∘ f) = (map g).comp (map f) 
goal: FreeAbelianGroup.map (g ∘ f) = (FreeAbelianGroup.map g).comp (FreeAbelianGroup.map f)

full_name: FreeAbelianGroup.map_comp_apply
code: theorem map_comp_apply {f : α → β} {g : β → γ} (x : FreeAbelianGroup α) :
    map (g ∘ f) x = (map g) ((map f) x) 
goal: (FreeAbelianGroup.map (g ∘ f)) x = (FreeAbelianGroup.map g) ((FreeAbelianGroup.map f) x)

full_name: FreeAbelianGroup.map_of_apply
code: @[simp]
theorem map_of_apply {f : α → β} (a : α) : map f (of a) = of (f a) 
goal: (FreeAbelianGroup.map f) (FreeAbelianGroup.of a) = FreeAbelianGroup.of (f a)

full_name: FreeAbelianGroup.mul
code: instance mul : Mul (FreeAbelianGroup α) 
goal: Mul (FreeAbelianGroup α)

full_name: FreeAbelianGroup.mul_def
code: theorem mul_def (x y : FreeAbelianGroup α) :
    x * y = lift (fun x₂ ↦ lift (fun x₁ ↦ of (x₁ * x₂)) x) y 
goal: x * y = (FreeAbelianGroup.lift fun x₂ => (FreeAbelianGroup.lift fun x₁ => FreeAbelianGroup.of (x₁ * x₂)) x) y

full_name: FreeAbelianGroup.of_mul_of
code: @[simp]
theorem of_mul_of (x y : α) : of x * of y = of (x * y) 
goal: FreeAbelianGroup.of x * FreeAbelianGroup.of y = FreeAbelianGroup.of (x * y)

full_name: FreeAbelianGroup.of_mul
code: theorem of_mul (x y : α) : of (x * y) = of x * of y 
goal: FreeAbelianGroup.of (x * y) = FreeAbelianGroup.of x * FreeAbelianGroup.of y

full_name: FreeAbelianGroup.distrib
code: instance distrib : Distrib (FreeAbelianGroup α) 
goal: Distrib (FreeAbelianGroup α)

full_name: FreeAbelianGroup.nonUnitalNonAssocRing
code: instance nonUnitalNonAssocRing : NonUnitalNonAssocRing (FreeAbelianGroup α) 
goal: NonUnitalNonAssocRing (FreeAbelianGroup α)

full_name: FreeAbelianGroup.one
code: instance one [One α] : One (FreeAbelianGroup α) 
goal: One (FreeAbelianGroup α)

full_name: FreeAbelianGroup.nonUnitalRing
code: instance nonUnitalRing [Semigroup α] : NonUnitalRing (FreeAbelianGroup α) 
goal: NonUnitalRing (FreeAbelianGroup α)

full_name: FreeAbelianGroup.ring
code: instance ring : Ring (FreeAbelianGroup α) 
goal: Ring (FreeAbelianGroup α)

full_name: FreeAbelianGroup.ofMulHom
code: /-- `FreeAbelianGroup.of` is a `MonoidHom` when `α` is a `Monoid`. -/
def ofMulHom : α →* FreeAbelianGroup α 
goal: α →* FreeAbelianGroup α

full_name: FreeAbelianGroup.ofMulHom_coe
code: @[simp]
theorem ofMulHom_coe : (ofMulHom : α → FreeAbelianGroup α) = of 
goal: ⇑FreeAbelianGroup.ofMulHom = FreeAbelianGroup.of

full_name: FreeAbelianGroup.liftMonoid
code: /-- If `f` preserves multiplication, then so does `lift f`. -/
def liftMonoid : (α →* R) ≃ (FreeAbelianGroup α →+* R) 
goal: (α →* R) ≃ (FreeAbelianGroup α →+* R)

full_name: FreeAbelianGroup.liftMonoid_coe_addMonoidHom
code: @[simp]
theorem liftMonoid_coe_addMonoidHom (f : α →* R) : ↑(liftMonoid f) = lift f 
goal: ↑(FreeAbelianGroup.liftMonoid f) = FreeAbelianGroup.lift ⇑f

full_name: FreeAbelianGroup.liftMonoid_coe
code: @[simp]
theorem liftMonoid_coe (f : α →* R) : ⇑(liftMonoid f) = lift f 
goal: ⇑(FreeAbelianGroup.liftMonoid f) = ⇑(FreeAbelianGroup.lift ⇑f)

full_name: FreeAbelianGroup.liftMonoid_symm_coe
code: @[simp]
-- Porting note: Added a type to `↑f`.
theorem liftMonoid_symm_coe (f : FreeAbelianGroup α →+* R) :
    ⇑(liftMonoid.symm f) = lift.symm (↑f : FreeAbelianGroup α →+ R) 
goal: ⇑(FreeAbelianGroup.liftMonoid.symm f) = FreeAbelianGroup.lift.symm ↑f

full_name: FreeAbelianGroup.one_def
code: theorem one_def : (1 : FreeAbelianGroup α) = of 1 
goal: 1 = FreeAbelianGroup.of 1

full_name: FreeAbelianGroup.of_one
code: theorem of_one : (of 1 : FreeAbelianGroup α) = 1 
goal: FreeAbelianGroup.of 1 = 1

full_name: FreeAbelianGroup.instCommRingOfCommMonoid
code: instance [CommMonoid α] : CommRing (FreeAbelianGroup α) 
goal: CommRing (FreeAbelianGroup α)

full_name: FreeAbelianGroup.pemptyUnique
code: instance pemptyUnique : Unique (FreeAbelianGroup PEmpty) 
goal: Unique (FreeAbelianGroup PEmpty.{u_1 + 1})

full_name: FreeAbelianGroup.punitEquiv
code: /-- The free abelian group on a type with one term is isomorphic to `ℤ`. -/
def punitEquiv (T : Type*) [Unique T] : FreeAbelianGroup T ≃+ ℤ 
goal: FreeAbelianGroup T ≃+ ℤ

full_name: FreeAbelianGroup.equivOfEquiv
code: /-- Isomorphic types have isomorphic free abelian groups. -/
def equivOfEquiv {α β : Type*} (f : α ≃ β) : FreeAbelianGroup α ≃+ FreeAbelianGroup β 
goal: FreeAbelianGroup α ≃+ FreeAbelianGroup β