File: Mathlib/LinearAlgebra/FreeProduct/Basic.lean

full_name: DirectSum.induction_lon
code: /--A variant of `DirectSum.induction_on` that uses `DirectSum.lof` instead of `.of`-/
theorem induction_lon {R : Type*} [Semiring R] {ι: Type*} [DecidableEq ι]
    {M : ι → Type*} [(i: ι) → AddCommMonoid <| M i] [(i : ι) → Module R (M i)]
    {C: (⨁ i, M i) → Prop} (x : ⨁ i, M i)
    (H_zero : C 0)
    (H_basic : ∀ i (x : M i), C (lof R ι M i x))
    (H_plus : ∀ (x y : ⨁ i, M i), C x → C y → C (x + y)) : C x 
goal: C x

full_name: RingQuot.algEquiv_quot_algEquiv
code: /--If two `R`-algebras are `R`-equivalent and their quotients by a relation `rel` are defined,
then their quotients are also `R`-equivalent.

(Special case of the third isomorphism theorem.)-/
def algEquiv_quot_algEquiv
    {R : Type u} [CommSemiring R] {A B : Type v} [Semiring A] [Semiring B]
    [Algebra R A] [Algebra R B] (f : A ≃ₐ[R] B) (rel : A → A → Prop) :
    RingQuot rel ≃ₐ[R] RingQuot (rel on f.symm) 
goal: RingQuot rel ≃ₐ[R] RingQuot (rel on ⇑f.symm)

full_name: RingQuot.equiv_quot_equiv
code: /--If two (semi)rings are equivalent and their quotients by a relation `rel` are defined,
then their quotients are also equivalent.

(Special case of `algEquiv_quot_algEquiv` when `R = ℕ`, which in turn is a special
case of the third isomorphism theorem.)-/
def equiv_quot_equiv {A B : Type v} [Semiring A] [Semiring B] (f : A ≃+* B) (rel : A → A → Prop)  :
    RingQuot rel ≃+* RingQuot (rel on f.symm) 
goal: RingQuot rel ≃+* RingQuot (rel on ⇑f.symm)

full_name: LinearAlgebra.FreeProduct.instModuleDirectSum
code: instance : Module R (⨁ i, A i) 
goal: Module R (⨁ (i : I), A i)

full_name: LinearAlgebra.FreeProduct.FreeTensorAlgebra
code: /--The free tensor algebra over a direct sum of `R`-algebras, before
taking the quotient by the free product relation.-/
abbrev FreeTensorAlgebra 
goal: Type (max v w u)

full_name: LinearAlgebra.FreeProduct.PowerAlgebra
code: /--The direct sum of tensor powers of a direct sum of `R`-algebras,
before taking the quotient by the free product relation.-/
abbrev PowerAlgebra 
goal: Type (max (max w u) v)

full_name: LinearAlgebra.FreeProduct.powerAlgebra_equiv_freeAlgebra
code: /--The free tensor algebra and its representation as an infinite direct sum
of tensor powers are (noncomputably) equivalent as `R`-algebras.-/
@[reducible] noncomputable def powerAlgebra_equiv_freeAlgebra :
    PowerAlgebra R A ≃ₐ[R] FreeTensorAlgebra R A 
goal: LinearAlgebra.FreeProduct.PowerAlgebra R A ≃ₐ[R] LinearAlgebra.FreeProduct.FreeTensorAlgebra R A

full_name: LinearAlgebra.FreeProduct.rel
code: /--The generating equivalence relation for elements of the free tensor algebra
that are identified in the free product.-/
inductive rel : FreeTensorAlgebra R A → FreeTensorAlgebra R A → Prop
  | id  : ∀ {i : I}, rel (ι R <| lof R I A i 1) 1
  | prod : ∀ {i : I} {a₁ a₂ : A i},
      rel
        (tprod R (⨁ i, A i) 2 (fun | 0 => lof R I A i a₁ | 1 => lof R I A i a₂))
        (ι R <| lof R I A i (a₁ * a₂))
goal: LinearAlgebra.FreeProduct.FreeTensorAlgebra R A → LinearAlgebra.FreeProduct.FreeTensorAlgebra R A → Prop

full_name: LinearAlgebra.FreeProduct.rel.prod
code: /--The generating equivalence relation for elements of the free tensor algebra
that are identified in the free product.-/
inductive rel : FreeTensorAlgebra R A → FreeTensorAlgebra R A → Prop
  | id  : ∀ {i : I}, rel (ι R <| lof R I A i 1) 1
  | prod : ∀ {i : I} {a₁ a₂ : A i},
      rel
        (tprod R (⨁ i, A i) 2 (fun | 0 => lof R I A i a₁ | 1 => lof R I A i a₂))
        (ι R <| lof R I A i (a₁ * a₂))
goal: LinearAlgebra.FreeProduct.rel R A
  ((TensorAlgebra.tprod R (⨁ (i : I), A i) 2) fun x =>
    match x with
    | 0 => (DirectSum.lof R I A i) a₁
    | 1 => (DirectSum.lof R I A i) a₂)
  ((TensorAlgebra.ι R) ((DirectSum.lof R I A i) (a₁ * a₂)))

full_name: LinearAlgebra.FreeProduct.rel.id
code: /--The generating equivalence relation for elements of the free tensor algebra
that are identified in the free product.-/
inductive rel : FreeTensorAlgebra R A → FreeTensorAlgebra R A → Prop
  | id  : ∀ {i : I}, rel (ι R <| lof R I A i 1) 1
  | prod : ∀ {i : I} {a₁ a₂ : A i},
      rel
        (tprod R (⨁ i, A i) 2 (fun | 0 => lof R I A i a₁ | 1 => lof R I A i a₂))
        (ι R <| lof R I A i (a₁ * a₂))
goal: LinearAlgebra.FreeProduct.rel R A ((TensorAlgebra.ι R) ((DirectSum.lof R I A i) 1)) 1

full_name: LinearAlgebra.FreeProduct.rel'
code: /--The generating equivalence relation for elements of the power algebra
that are identified in the free product. -/
@[reducible, simp] def rel' 
goal: (⨁ (n : ℕ), TensorPower R n (⨁ (i : I), A i)) → (⨁ (n : ℕ), TensorPower R n (⨁ (i : I), A i)) → Prop

full_name: LinearAlgebra.FreeProduct.rel_id
code: theorem rel_id (i : I) : rel R A (ι R <| lof R I A i 1) 1 
goal: LinearAlgebra.FreeProduct.rel R A ((TensorAlgebra.ι R) ((DirectSum.lof R I A i) 1)) 1

full_name: LinearAlgebra.FreeProduct
code: /--The free product of the collection of `R`-algebras `A i`, as a quotient of
`FreeTensorAlgebra R A`.-/
@[reducible] def _root_.LinearAlgebra.FreeProduct 
goal: Type (max (max u v) w)

full_name: LinearAlgebra.FreeProduct_ofPowers
code: /--The free product of the collection of `R`-algebras `A i`, as a quotient of `PowerAlgebra R A`-/
@[reducible] def _root_.LinearAlgebra.FreeProduct_ofPowers 
goal: Type (max (max u v) w)

full_name: LinearAlgebra.FreeProduct.equivPowerAlgebra
code: /--The `R`-algebra equivalence relating `FreeProduct` and `FreeProduct_ofPowers`-/
noncomputable def equivPowerAlgebra : FreeProduct_ofPowers R A ≃ₐ[R] FreeProduct R A 
goal: LinearAlgebra.FreeProduct_ofPowers R A ≃ₐ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.«_aux_Mathlib_LinearAlgebra_FreeProduct_Basic___macroRules_LinearAlgebra_FreeProduct_term_∘ₐ__1»
code: local infixr:60 " ∘ₐ " => AlgHom.comp
goal: Lean.Macro

full_name: LinearAlgebra.FreeProduct._aux_Mathlib_LinearAlgebra_FreeProduct_Basic___unexpand_AlgHom_comp_1
code: local infixr:60 " ∘ₐ " => AlgHom.comp
goal: Lean.PrettyPrinter.Unexpander

full_name: LinearAlgebra.FreeProduct.instSemiring
code: instance instSemiring : Semiring (FreeProduct R A) 
goal: Semiring (LinearAlgebra.FreeProduct R A)

full_name: LinearAlgebra.FreeProduct.instAlgebra
code: instance instAlgebra : Algebra R (FreeProduct R A) 
goal: Algebra R (LinearAlgebra.FreeProduct R A)

full_name: LinearAlgebra.FreeProduct.mkAlgHom
code: /--The canonical quotient map `FreeTensorAlgebra R A →ₐ[R] FreeProduct R A`,
as an `R`-algebra homomorphism.-/
abbrev mkAlgHom : FreeTensorAlgebra R A →ₐ[R] FreeProduct R A 
goal: LinearAlgebra.FreeProduct.FreeTensorAlgebra R A →ₐ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.ι'
code: /--The canonical linear map from the direct sum of the `A i` to the free product.-/
abbrev ι' : (⨁ i, A i) →ₗ[R] FreeProduct R A 
goal: (⨁ (i : I), A i) →ₗ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.ι_apply
code: @[simp] theorem ι_apply (x : ⨁ i, A i) :
  ⟨Quot.mk (Rel <| rel R A) (TensorAlgebra.ι R x)⟩ = ι' R A x 
goal: { toQuot := Quot.mk (RingQuot.Rel (LinearAlgebra.FreeProduct.rel R A)) ((TensorAlgebra.ι R) x) } =
  (LinearAlgebra.FreeProduct.ι' R A) x

full_name: LinearAlgebra.FreeProduct.identify_one
code: /--The injection into the free product of any `1 : A i` is the 1 of the free product.-/
theorem identify_one (i : I) : ι' R A (DirectSum.lof R I A i 1) = 1 
goal: (LinearAlgebra.FreeProduct.ι' R A) ((DirectSum.lof R I A i) 1) = 1

full_name: LinearAlgebra.FreeProduct.mul_injections
code: /--Multiplication in the free product of the injections of any two `aᵢ aᵢ': A i` for
the same `i` is just the injection of multiplication `aᵢ * aᵢ'` in `A i`.-/
theorem mul_injections (a₁ a₂ : A i) :
    ι' R A (DirectSum.lof R I A i a₁) * ι' R A (DirectSum.lof R I A i a₂)
      = ι' R A (DirectSum.lof R I A i (a₁ * a₂)) 
goal: (LinearAlgebra.FreeProduct.ι' R A) ((DirectSum.lof R I A i) a₁) *
    (LinearAlgebra.FreeProduct.ι' R A) ((DirectSum.lof R I A i) a₂) =
  (LinearAlgebra.FreeProduct.ι' R A) ((DirectSum.lof R I A i) (a₁ * a₂))

full_name: LinearAlgebra.FreeProduct.lof
code: /--The `i`th canonical injection, from `A i` to the free product, as
a linear map.-/
abbrev lof (i : I) : A i →ₗ[R] FreeProduct R A 
goal: A i →ₗ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.lof_map_one
code: /--`lof R A i 1 = 1` for all `i`.-/
theorem lof_map_one (i : I) : lof R A i 1 = 1 
goal: (LinearAlgebra.FreeProduct.lof R A i) 1 = 1

full_name: LinearAlgebra.FreeProduct.definition._@.Mathlib.LinearAlgebra.FreeProduct.Basic._hyg.2899
code: /--The `i`th canonical injection, from `A i` to the free product.-/
irreducible_def ι (i : I) : A i →ₐ[R] FreeProduct R A 
goal: A i →ₐ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.wrapped._@.Mathlib.LinearAlgebra.FreeProduct.Basic._hyg.2899
code: /--The `i`th canonical injection, from `A i` to the free product.-/
irreducible_def ι (i : I) : A i →ₐ[R] FreeProduct R A 
goal: Subtype (Eq @LinearAlgebra.FreeProduct.definition✝)

full_name: LinearAlgebra.FreeProduct.ι_def
code: /--The `i`th canonical injection, from `A i` to the free product.-/
irreducible_def ι (i : I) : A i →ₐ[R] FreeProduct R A 
goal: LinearAlgebra.FreeProduct.ι R A i = AlgHom.ofLinearMap (LinearAlgebra.FreeProduct.ι' R A ∘ₗ DirectSum.lof R I A i) ⋯ ⋯

full_name: LinearAlgebra.FreeProduct.ι
code: /--The `i`th canonical injection, from `A i` to the free product.-/
irreducible_def ι (i : I) : A i →ₐ[R] FreeProduct R A 
goal: A i →ₐ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.definition._@.Mathlib.LinearAlgebra.FreeProduct.Basic._hyg.3256
code: /--The family of canonical injection maps, with `i` left implicit.-/
irreducible_def of {i : I} : A i →ₐ[R] FreeProduct R A 
goal: A i →ₐ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.wrapped._@.Mathlib.LinearAlgebra.FreeProduct.Basic._hyg.3256
code: /--The family of canonical injection maps, with `i` left implicit.-/
irreducible_def of {i : I} : A i →ₐ[R] FreeProduct R A 
goal: Subtype (Eq @LinearAlgebra.FreeProduct.definition✝)

full_name: LinearAlgebra.FreeProduct.of
code: /--The family of canonical injection maps, with `i` left implicit.-/
irreducible_def of {i : I} : A i →ₐ[R] FreeProduct R A 
goal: A i →ₐ[R] LinearAlgebra.FreeProduct R A

full_name: LinearAlgebra.FreeProduct.of_def
code: /--The family of canonical injection maps, with `i` left implicit.-/
irreducible_def of {i : I} : A i →ₐ[R] FreeProduct R A 
goal: LinearAlgebra.FreeProduct.of R A = LinearAlgebra.FreeProduct.ι R A i

full_name: LinearAlgebra.FreeProduct.lift_symm_apply
code: /--Universal property of the free product of algebras:
for every `R`-algebra `B`, every family of maps `maps : (i : I) → (A i →ₐ[R] B)` lifts
to a unique arrow `π` from `FreeProduct R A` such that  `π ∘ ι i = maps i`.-/
@[simps] def lift : ({i : I} → A i →ₐ[R] B) ≃ (FreeProduct R A →ₐ[R] B) 
goal: (LinearAlgebra.FreeProduct.lift R A).symm π = π.comp (LinearAlgebra.FreeProduct.ι R A i)

full_name: LinearAlgebra.FreeProduct.lift
code: /--Universal property of the free product of algebras:
for every `R`-algebra `B`, every family of maps `maps : (i : I) → (A i →ₐ[R] B)` lifts
to a unique arrow `π` from `FreeProduct R A` such that  `π ∘ ι i = maps i`.-/
@[simps] def lift : ({i : I} → A i →ₐ[R] B) ≃ (FreeProduct R A →ₐ[R] B) 
goal: ({i : I} → A i →ₐ[R] B) ≃ (LinearAlgebra.FreeProduct R A →ₐ[R] B)

full_name: LinearAlgebra.FreeProduct.lift_apply
code: /--Universal property of the free product of algebras:
for every `R`-algebra `B`, every family of maps `maps : (i : I) → (A i →ₐ[R] B)` lifts
to a unique arrow `π` from `FreeProduct R A` such that  `π ∘ ι i = maps i`.-/
@[simps] def lift : ({i : I} → A i →ₐ[R] B) ≃ (FreeProduct R A →ₐ[R] B) 
goal: (LinearAlgebra.FreeProduct.lift R A) maps =
  (RingQuot.liftAlgHom R) ⟨(TensorAlgebra.lift R) (DirectSum.toModule R I B fun x => maps.toLinearMap), ⋯⟩

full_name: LinearAlgebra.FreeProduct.lift_comp_ι
code: /--Universal property of the free product of algebras, property:
for every `R`-algebra `B`, every family of maps `maps : (i : I) → (A i →ₐ[R] B)` lifts
to a unique arrow `π` from `FreeProduct R A` such that  `π ∘ ι i = maps i`.-/
theorem lift_comp_ι : (lift R A maps) ∘ₐ (ι R A i) = maps 
goal: ((LinearAlgebra.FreeProduct.lift R A) fun {i} => maps).comp (LinearAlgebra.FreeProduct.ι R A i) = maps

full_name: LinearAlgebra.FreeProduct.lift_unique
code: @[aesop safe destruct] theorem lift_unique
    (f : FreeProduct R A →ₐ[R] B) (h : ∀ i, f ∘ₐ ι R A i = maps) :
    f = lift R A maps 
goal: f = (LinearAlgebra.FreeProduct.lift R A) fun {i} => maps