File: Mathlib/LinearAlgebra/FreeModule/Basic.lean

full_name: Module.Free
code: /-- `Module.Free R M` is the statement that the `R`-module `M` is free. -/
class Module.Free : Prop where
  exists_basis : Nonempty <| (I : Type v) × Basis I R M
goal: Prop

full_name: Module.Free.exists_basis
code: /-- `Module.Free R M` is the statement that the `R`-module `M` is free. -/
class Module.Free : Prop where
  exists_basis : Nonempty <| (I : Type v) × Basis I R M
goal: Nonempty ((I : Type v) × Basis I R M)

full_name: Module.free_def
code: /-- If `M` fits in universe `w`, then freeness is equivalent to existence of a basis in that
universe.

Note that if `M` does not fit in `w`, the reverse direction of this implication is still true as
`Module.Free.of_basis`. -/
theorem Module.free_def [Small.{w,v} M] :
    Module.Free R M ↔ ∃ I : Type w, Nonempty (Basis I R M) 
goal: Module.Free R M ↔ ∃ I, Nonempty (Basis I R M)

full_name: Module.free_iff_set
code: theorem Module.free_iff_set : Module.Free R M ↔ ∃ S : Set M, Nonempty (Basis S R M) 
goal: Module.Free R M ↔ ∃ S, Nonempty (Basis (↑S) R M)

full_name: Module.Free.of_basis
code: theorem Module.Free.of_basis {ι : Type w} (b : Basis ι R M) : Module.Free R M 
goal: Module.Free R M

full_name: Module.Free.ChooseBasisIndex
code: /-- If `Module.Free R M` then `ChooseBasisIndex R M` is the `ι` which indexes the basis
  `ι → M`. Note that this is defined such that this type is finite if `R` is trivial. -/
def ChooseBasisIndex : Type _ 
goal: Type v

full_name: Module.Free.instDecidableEqChooseBasisIndex
code: /-- There is no hope of computing this, but we add the instance anyway to avoid fumbling with
`open scoped Classical`. -/
noncomputable instance : DecidableEq (ChooseBasisIndex R M) 
goal: DecidableEq (Module.Free.ChooseBasisIndex R M)

full_name: Module.Free.chooseBasis
code: /-- If `Module.Free R M` then `chooseBasis : ι → M` is the basis.
Here `ι = ChooseBasisIndex R M`. -/
noncomputable def chooseBasis : Basis (ChooseBasisIndex R M) R M 
goal: Basis (Module.Free.ChooseBasisIndex R M) R M

full_name: Module.Free.repr
code: /-- The isomorphism `M ≃ₗ[R] (ChooseBasisIndex R M →₀ R)`. -/
noncomputable def repr : M ≃ₗ[R] ChooseBasisIndex R M →₀ R 
goal: M ≃ₗ[R] Module.Free.ChooseBasisIndex R M →₀ R

full_name: Module.Free.constr
code: /-- The universal property of free modules: giving a function `(ChooseBasisIndex R M) → N`, for `N`
an `R`-module, is the same as giving an `R`-linear map `M →ₗ[R] N`.

This definition is parameterized over an extra `Semiring S`,
such that `SMulCommClass R S M'` holds.
If `R` is commutative, you can set `S := R`; if `R` is not commutative,
you can recover an `AddEquiv` by setting `S := ℕ`.
See library note [bundled maps over different rings]. -/
noncomputable def constr {S : Type z} [Semiring S] [Module S N] [SMulCommClass R S N] :
    (ChooseBasisIndex R M → N) ≃ₗ[S] M →ₗ[R] N 
goal: (Module.Free.ChooseBasisIndex R M → N) ≃ₗ[S] M →ₗ[R] N

full_name: Module.Free.noZeroSMulDivisors
code: instance (priority := 100) noZeroSMulDivisors [NoZeroDivisors R] : NoZeroSMulDivisors R M 
goal: NoZeroSMulDivisors R M

full_name: Module.Free.instNonemptyChooseBasisIndexOfNontrivial
code: instance [Nontrivial M] : Nonempty (Module.Free.ChooseBasisIndex R M) 
goal: Nonempty (Module.Free.ChooseBasisIndex R M)

full_name: Module.Free.infinite
code: theorem infinite [Infinite R] [Nontrivial M] : Infinite M 
goal: Infinite M

full_name: Module.Free.of_equiv
code: theorem of_equiv (e : M ≃ₗ[R] N) : Module.Free R N 
goal: Module.Free R N

full_name: Module.Free.of_equiv'
code: /-- A variation of `of_equiv`: the assumption `Module.Free R P` here is explicit rather than an
instance. -/
theorem of_equiv' {P : Type v} [AddCommMonoid P] [Module R P] (_ : Module.Free R P)
    (e : P ≃ₗ[R] N) : Module.Free R N 
goal: Module.Free R P → (P ≃ₗ[R] N) → Module.Free R N

full_name: Module.Free.self
code: /-- The module structure provided by `Semiring.toModule` is free. -/
instance self : Module.Free R R 
goal: Module.Free R R

full_name: Module.Free.prod
code: instance prod [Module.Free R N] : Module.Free R (M × N) 
goal: Module.Free R (M × N)

full_name: Module.Free.pi
code: /-- The product of finitely many free modules is free. -/
instance pi (M : ι → Type*) [Finite ι] [∀ i : ι, AddCommMonoid (M i)] [∀ i : ι, Module R (M i)]
    [∀ i : ι, Module.Free R (M i)] : Module.Free R (∀ i, M i) 
goal: Module.Free R ((i : ι) → M i)

full_name: Module.Free.matrix
code: /-- The module of finite matrices is free. -/
instance matrix {m n : Type*} [Finite m] [Finite n] : Module.Free R (Matrix m n M) 
goal: Module.Free R (Matrix m n M)

full_name: Module.Free.ulift
code: instance ulift [Free R M] : Free R (ULift M) 
goal: Module.Free R (ULift.{u_2, v} M)

full_name: Module.Free.function
code: /-- The product of finitely many free modules is free (non-dependent version to help with typeclass
search). -/
instance function [Finite ι] : Module.Free R (ι → M) 
goal: Module.Free R (ι → M)

full_name: Module.Free.finsupp
code: instance finsupp : Module.Free R (ι →₀ M) 
goal: Module.Free R (ι →₀ M)

full_name: Module.Free.of_subsingleton
code: instance (priority := 100) of_subsingleton [Subsingleton N] : Module.Free R N 
goal: Module.Free R N

full_name: Module.Free.of_subsingleton'
code: instance (priority := 100) of_subsingleton' [Subsingleton R] : Module.Free R N 
goal: Module.Free R N

full_name: Module.Free.dfinsupp
code: instance dfinsupp {ι : Type*} (M : ι → Type*) [∀ i : ι, AddCommMonoid (M i)]
    [∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] : Module.Free R (Π₀ i, M i) 
goal: Module.Free R (Π₀ (i : ι), M i)

full_name: Module.Free.directSum
code: instance directSum {ι : Type*} (M : ι → Type*) [∀ i : ι, AddCommMonoid (M i)]
    [∀ i : ι, Module R (M i)] [∀ i : ι, Module.Free R (M i)] : Module.Free R (⨁ i, M i) 
goal: Module.Free R (⨁ (i : ι), M i)

full_name: Module.Free.tensor
code: instance tensor : Module.Free S (M ⊗[R] N) 
goal: Module.Free S (M ⊗[R] N)