File: Mathlib/LinearAlgebra/Span.lean

full_name: Submodule.span
code: /-- The span of a set `s ⊆ M` is the smallest submodule of M that contains `s`. -/
def span (s : Set M) : Submodule R M 
goal: Submodule R M

full_name: Submodule.IsPrincipal.principal'
code: /-- An `R`-submodule of `M` is principal if it is generated by one element. -/
@[mk_iff]
class IsPrincipal (S : Submodule R M) : Prop where
  principal' : ∃ a, S = span R {a}
goal: ∃ a, S = Submodule.span R {a}

full_name: Submodule.IsPrincipal
code: /-- An `R`-submodule of `M` is principal if it is generated by one element. -/
@[mk_iff]
class IsPrincipal (S : Submodule R M) : Prop where
  principal' : ∃ a, S = span R {a}
goal: Prop

full_name: Submodule.isPrincipal_iff
code: /-- An `R`-submodule of `M` is principal if it is generated by one element. -/
@[mk_iff]
class IsPrincipal (S : Submodule R M) : Prop where
  principal' : ∃ a, S = span R {a}
goal: S.IsPrincipal ↔ ∃ a, S = Submodule.span R {a}

full_name: Submodule.IsPrincipal.principal
code: theorem IsPrincipal.principal (S : Submodule R M) [S.IsPrincipal] :
    ∃ a, S = span R {a} 
goal: ∃ a, S = Submodule.span R {a}

full_name: Submodule.mem_span
code: theorem mem_span : x ∈ span R s ↔ ∀ p : Submodule R M, s ⊆ p → x ∈ p 
goal: x ∈ Submodule.span R s ↔ ∀ (p : Submodule R M), s ⊆ ↑p → x ∈ p

full_name: Submodule.subset_span
code: @[aesop safe 20 apply (rule_sets := [SetLike])]
theorem subset_span : s ⊆ span R s 
goal: s ⊆ ↑(Submodule.span R s)

full_name: Submodule.span_le
code: theorem span_le {p} : span R s ≤ p ↔ s ⊆ p 
goal: Submodule.span R s ≤ p ↔ s ⊆ ↑p

full_name: Submodule.span_mono
code: theorem span_mono (h : s ⊆ t) : span R s ≤ span R t 
goal: Submodule.span R s ≤ Submodule.span R t

full_name: Submodule.span_monotone
code: theorem span_monotone : Monotone (span R : Set M → Submodule R M) 
goal: Monotone (Submodule.span R)

full_name: Submodule.span_eq_of_le
code: theorem span_eq_of_le (h₁ : s ⊆ p) (h₂ : p ≤ span R s) : span R s = p 
goal: Submodule.span R s = p

full_name: Submodule.span_eq
code: theorem span_eq : span R (p : Set M) = p 
goal: Submodule.span R ↑p = p

full_name: Submodule.span_eq_span
code: theorem span_eq_span (hs : s ⊆ span R t) (ht : t ⊆ span R s) : span R s = span R t 
goal: Submodule.span R s = Submodule.span R t

full_name: Submodule.coe_span_eq_self
code: /-- A version of `Submodule.span_eq` for subobjects closed under addition and scalar multiplication
and containing zero. In general, this should not be used directly, but can be used to quickly
generate proofs for specific types of subobjects. -/
lemma coe_span_eq_self [SetLike S M] [AddSubmonoidClass S M] [SMulMemClass S R M] (s : S) :
    (span R (s : Set M) : Set M) = s 
goal: ↑(Submodule.span R ↑s) = ↑s

full_name: Submodule.span_coe_eq_restrictScalars
code: /-- A version of `Submodule.span_eq` for when the span is by a smaller ring. -/
@[simp]
theorem span_coe_eq_restrictScalars [Semiring S] [SMul S R] [Module S M] [IsScalarTower S R M] :
    span S (p : Set M) = p.restrictScalars S 
goal: Submodule.span S ↑p = Submodule.restrictScalars S p

full_name: Submodule.image_span_subset
code: /-- A version of `Submodule.map_span_le` that does not require the `RingHomSurjective`
assumption. -/
theorem image_span_subset (f : F) (s : Set M) (N : Submodule R₂ M₂) :
    f '' span R s ⊆ N ↔ ∀ m ∈ s, f m ∈ N 
goal: ⇑f '' ↑(Submodule.span R s) ⊆ ↑N ↔ ∀ m ∈ s, f m ∈ N

full_name: Submodule.image_span_subset_span
code: theorem image_span_subset_span (f : F) (s : Set M) : f '' span R s ⊆ span R₂ (f '' s) 
goal: ⇑f '' ↑(Submodule.span R s) ⊆ ↑(Submodule.span R₂ (⇑f '' s))

full_name: Submodule.map_span
code: theorem map_span [RingHomSurjective σ₁₂] (f : F) (s : Set M) :
    (span R s).map f = span R₂ (f '' s) 
goal: Submodule.map f (Submodule.span R s) = Submodule.span R₂ (⇑f '' s)

full_name: Submodule.map_span_le
code: theorem map_span_le [RingHomSurjective σ₁₂] (f : F) (s : Set M) (N : Submodule R₂ M₂) :
    map f (span R s) ≤ N ↔ ∀ m ∈ s, f m ∈ N 
goal: Submodule.map f (Submodule.span R s) ≤ N ↔ ∀ m ∈ s, f m ∈ N

full_name: Submodule.span_insert_zero
code: @[simp]
theorem span_insert_zero : span R (insert (0 : M) s) = span R s 
goal: Submodule.span R (insert 0 s) = Submodule.span R s

full_name: Submodule.span_preimage_le
code: theorem span_preimage_le (f : F) (s : Set M₂) :
    span R (f ⁻¹' s) ≤ (span R₂ s).comap f 
goal: Submodule.span R (⇑f ⁻¹' s) ≤ Submodule.comap f (Submodule.span R₂ s)

full_name: Submodule.closure_subset_span
code: theorem closure_subset_span {s : Set M} : (AddSubmonoid.closure s : Set M) ⊆ span R s 
goal: ↑(AddSubmonoid.closure s) ⊆ ↑(Submodule.span R s)

full_name: Submodule.closure_le_toAddSubmonoid_span
code: theorem closure_le_toAddSubmonoid_span {s : Set M} :
    AddSubmonoid.closure s ≤ (span R s).toAddSubmonoid 
goal: AddSubmonoid.closure s ≤ (Submodule.span R s).toAddSubmonoid

full_name: Submodule.span_closure
code: @[simp]
theorem span_closure {s : Set M} : span R (AddSubmonoid.closure s : Set M) = span R s 
goal: Submodule.span R ↑(AddSubmonoid.closure s) = Submodule.span R s

full_name: Submodule.span_induction
code: /-- An induction principle for span membership. If `p` holds for 0 and all elements of `s`, and is
preserved under addition and scalar multiplication, then `p` holds for all elements of the span of
`s`. -/
@[elab_as_elim]
theorem span_induction {p : M → Prop} (h : x ∈ span R s) (mem : ∀ x ∈ s, p x) (zero : p 0)
    (add : ∀ x y, p x → p y → p (x + y)) (smul : ∀ (a : R) (x), p x → p (a • x)) : p x 
goal: p x

full_name: Submodule.span_induction₂
code: /-- An induction principle for span membership. This is a version of `Submodule.span_induction`
for binary predicates. -/
theorem span_induction₂ {p : M → M → Prop} {a b : M} (ha : a ∈ Submodule.span R s)
    (hb : b ∈ Submodule.span R s) (mem_mem : ∀ x ∈ s, ∀ y ∈ s, p x y)
    (zero_left : ∀ y, p 0 y) (zero_right : ∀ x, p x 0)
    (add_left : ∀ x₁ x₂ y, p x₁ y → p x₂ y → p (x₁ + x₂) y)
    (add_right : ∀ x y₁ y₂, p x y₁ → p x y₂ → p x (y₁ + y₂))
    (smul_left : ∀ (r : R) x y, p x y → p (r • x) y)
    (smul_right : ∀ (r : R) x y, p x y → p x (r • y)) : p a b 
goal: p a b

full_name: Submodule.span_induction'
code: /-- A dependent version of `Submodule.span_induction`. -/
@[elab_as_elim]
theorem span_induction' {p : ∀ x, x ∈ span R s → Prop}
    (mem : ∀ (x) (h : x ∈ s), p x (subset_span h))
    (zero : p 0 (Submodule.zero_mem _))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (Submodule.add_mem _ ‹_› ‹_›))
    (smul : ∀ (a : R) (x hx), p x hx → p (a • x) (Submodule.smul_mem _ _ ‹_›)) {x}
    (hx : x ∈ span R s) : p x hx 
goal: p x hx

full_name: Submodule.span_eq_closure
code: theorem span_eq_closure {s : Set M} : (span R s).toAddSubmonoid = closure (@univ R • s) 
goal: (Submodule.span R s).toAddSubmonoid = AddSubmonoid.closure (Set.univ • s)

full_name: Submodule.closure_induction
code: /-- A variant of `span_induction` that combines `∀ x ∈ s, p x` and `∀ r x, p x → p (r • x)`
into a single condition `∀ r, ∀ x ∈ s, p (r • x)`, which can be easier to verify. -/
@[elab_as_elim]
theorem closure_induction {p : M → Prop} (h : x ∈ span R s) (zero : p 0)
    (add : ∀ x y, p x → p y → p (x + y)) (smul_mem : ∀ r : R, ∀ x ∈ s, p (r • x)) : p x 
goal: p x

full_name: Submodule.closure_induction'
code: /-- A dependent version of `Submodule.closure_induction`. -/
@[elab_as_elim]
theorem closure_induction' {p : ∀ x, x ∈ span R s → Prop}
    (zero : p 0 (Submodule.zero_mem _))
    (add : ∀ x hx y hy, p x hx → p y hy → p (x + y) (Submodule.add_mem _ ‹_› ‹_›))
    (smul_mem : ∀ (r x) (h : x ∈ s), p (r • x) (Submodule.smul_mem _ _ <| subset_span h)) {x}
    (hx : x ∈ span R s) : p x hx 
goal: p x hx

full_name: Submodule.span_span_coe_preimage
code: @[simp]
theorem span_span_coe_preimage : span R (((↑) : span R s → M) ⁻¹' s) = ⊤ 
goal: Submodule.span R (Subtype.val ⁻¹' s) = ⊤

full_name: Submodule.span_setOf_mem_eq_top
code: @[simp]
lemma span_setOf_mem_eq_top :
    span R {x : span R s | (x : M) ∈ s} = ⊤ 
goal: Submodule.span R {x | ↑x ∈ s} = ⊤

full_name: Submodule.span_nat_eq_addSubmonoid_closure
code: theorem span_nat_eq_addSubmonoid_closure (s : Set M) :
    (span ℕ s).toAddSubmonoid = AddSubmonoid.closure s 
goal: (Submodule.span ℕ s).toAddSubmonoid = AddSubmonoid.closure s

full_name: Submodule.span_nat_eq
code: @[simp]
theorem span_nat_eq (s : AddSubmonoid M) : (span ℕ (s : Set M)).toAddSubmonoid = s 
goal: (Submodule.span ℕ ↑s).toAddSubmonoid = s

full_name: Submodule.span_int_eq_addSubgroup_closure
code: theorem span_int_eq_addSubgroup_closure {M : Type*} [AddCommGroup M] (s : Set M) :
    (span ℤ s).toAddSubgroup = AddSubgroup.closure s 
goal: (Submodule.span ℤ s).toAddSubgroup = AddSubgroup.closure s

full_name: Submodule.span_int_eq
code: @[simp]
theorem span_int_eq {M : Type*} [AddCommGroup M] (s : AddSubgroup M) :
    (span ℤ (s : Set M)).toAddSubgroup = s 
goal: (Submodule.span ℤ ↑s).toAddSubgroup = s

full_name: Submodule.gi
code: /-- `span` forms a Galois insertion with the coercion from submodule to set. -/
protected def gi : GaloisInsertion (@span R M _ _ _) (↑) 
goal: GaloisInsertion (Submodule.span R) SetLike.coe

full_name: Submodule.span_empty
code: @[simp]
theorem span_empty : span R (∅ : Set M) = ⊥ 
goal: Submodule.span R ∅ = ⊥

full_name: Submodule.span_univ
code: @[simp]
theorem span_univ : span R (univ : Set M) = ⊤ 
goal: Submodule.span R Set.univ = ⊤

full_name: Submodule.span_union
code: theorem span_union (s t : Set M) : span R (s ∪ t) = span R s ⊔ span R t 
goal: Submodule.span R (s ∪ t) = Submodule.span R s ⊔ Submodule.span R t

full_name: Submodule.span_iUnion
code: theorem span_iUnion {ι} (s : ι → Set M) : span R (⋃ i, s i) = ⨆ i, span R (s i) 
goal: Submodule.span R (⋃ i, s i) = ⨆ i, Submodule.span R (s i)

full_name: Submodule.span_iUnion₂
code: theorem span_iUnion₂ {ι} {κ : ι → Sort*} (s : ∀ i, κ i → Set M) :
    span R (⋃ (i) (j), s i j) = ⨆ (i) (j), span R (s i j) 
goal: Submodule.span R (⋃ i, ⋃ j, s i j) = ⨆ i, ⨆ j, Submodule.span R (s i j)

full_name: Submodule.span_attach_biUnion
code: theorem span_attach_biUnion [DecidableEq M] {α : Type*} (s : Finset α) (f : s → Finset M) :
    span R (s.attach.biUnion f : Set M) = ⨆ x, span R (f x) 
goal: Submodule.span R ↑(s.attach.biUnion f) = ⨆ x, Submodule.span R ↑(f x)

full_name: Submodule.sup_span
code: theorem sup_span : p ⊔ span R s = span R (p ∪ s) 
goal: p ⊔ Submodule.span R s = Submodule.span R (↑p ∪ s)

full_name: Submodule.span_sup
code: theorem span_sup : span R s ⊔ p = span R (s ∪ p) 
goal: Submodule.span R s ⊔ p = Submodule.span R (s ∪ ↑p)

full_name: Submodule.«_aux_Mathlib_LinearAlgebra_Span___macroRules_Submodule_term_∙__1»
code: notation:1000
  /- Note that the character `∙` U+2219 used below is different from the scalar multiplication
character `•` U+2022. -/
R " ∙ " x => span R (singleton x)
goal: Lean.Macro

full_name: Submodule._aux_Mathlib_LinearAlgebra_Span___unexpand_Submodule_span_1
code: notation:1000
  /- Note that the character `∙` U+2219 used below is different from the scalar multiplication
character `•` U+2022. -/
R " ∙ " x => span R (singleton x)
goal: Lean.PrettyPrinter.Unexpander

full_name: Submodule.span_eq_iSup_of_singleton_spans
code: theorem span_eq_iSup_of_singleton_spans (s : Set M) : span R s = ⨆ x ∈ s, R ∙ x 
goal: Submodule.span R s = ⨆ x ∈ s, Submodule.span R {x}

full_name: Submodule.span_range_eq_iSup
code: theorem span_range_eq_iSup {ι : Sort*} {v : ι → M} : span R (range v) = ⨆ i, R ∙ v i 
goal: Submodule.span R (Set.range v) = ⨆ i, Submodule.span R {v i}

full_name: Submodule.span_smul_le
code: theorem span_smul_le (s : Set M) (r : R) : span R (r • s) ≤ span R s 
goal: Submodule.span R (r • s) ≤ Submodule.span R s

full_name: Submodule.subset_span_trans
code: theorem subset_span_trans {U V W : Set M} (hUV : U ⊆ Submodule.span R V)
    (hVW : V ⊆ Submodule.span R W) : U ⊆ Submodule.span R W 
goal: U ⊆ ↑(Submodule.span R W)

full_name: Submodule.span_smul_eq_of_isUnit
code: /-- See `Submodule.span_smul_eq` (in `RingTheory.Ideal.Operations`) for
`span R (r • s) = r • span R s` that holds for arbitrary `r` in a `CommSemiring`. -/
theorem span_smul_eq_of_isUnit (s : Set M) (r : R) (hr : IsUnit r) : span R (r • s) = span R s 
goal: Submodule.span R (r • s) = Submodule.span R s

full_name: Submodule.coe_iSup_of_directed
code: @[simp]
theorem coe_iSup_of_directed {ι} [Nonempty ι] (S : ι → Submodule R M)
    (H : Directed (· ≤ ·) S) : ((iSup S : Submodule R M) : Set M) = ⋃ i, S i 
goal: ↑(iSup S) = ⋃ i, ↑(S i)

full_name: Submodule.mem_iSup_of_directed
code: @[simp]
theorem mem_iSup_of_directed {ι} [Nonempty ι] (S : ι → Submodule R M) (H : Directed (· ≤ ·) S) {x} :
    x ∈ iSup S ↔ ∃ i, x ∈ S i 
goal: x ∈ iSup S ↔ ∃ i, x ∈ S i

full_name: Submodule.mem_sSup_of_directed
code: theorem mem_sSup_of_directed {s : Set (Submodule R M)} {z} (hs : s.Nonempty)
    (hdir : DirectedOn (· ≤ ·) s) : z ∈ sSup s ↔ ∃ y ∈ s, z ∈ y 
goal: z ∈ sSup s ↔ ∃ y ∈ s, z ∈ y

full_name: Submodule.coe_iSup_of_chain
code: @[norm_cast, simp]
theorem coe_iSup_of_chain (a : ℕ →o Submodule R M) : (↑(⨆ k, a k) : Set M) = ⋃ k, (a k : Set M) 
goal: ↑(⨆ k, a k) = ⋃ k, ↑(a k)

full_name: Submodule.coe_scott_continuous
code: /-- We can regard `coe_iSup_of_chain` as the statement that `(↑) : (Submodule R M) → Set M` is
Scott continuous for the ω-complete partial order induced by the complete lattice structures. -/
theorem coe_scott_continuous :
    OmegaCompletePartialOrder.Continuous' ((↑) : Submodule R M → Set M) 
goal: OmegaCompletePartialOrder.Continuous' SetLike.coe

full_name: Submodule.mem_iSup_of_chain
code: @[simp]
theorem mem_iSup_of_chain (a : ℕ →o Submodule R M) (m : M) : (m ∈ ⨆ k, a k) ↔ ∃ k, m ∈ a k 
goal: m ∈ ⨆ k, a k ↔ ∃ k, m ∈ a k

full_name: Submodule.mem_sup
code: theorem mem_sup : x ∈ p ⊔ p' ↔ ∃ y ∈ p, ∃ z ∈ p', y + z = x 
goal: x ∈ p ⊔ p' ↔ ∃ y ∈ p, ∃ z ∈ p', y + z = x

full_name: Submodule.mem_sup'
code: theorem mem_sup' : x ∈ p ⊔ p' ↔ ∃ (y : p) (z : p'), (y : M) + z = x 
goal: x ∈ p ⊔ p' ↔ ∃ y z, ↑y + ↑z = x

full_name: Submodule.exists_add_eq_of_codisjoint
code: lemma exists_add_eq_of_codisjoint (h : Codisjoint p p') (x : M) :
    ∃ y ∈ p, ∃ z ∈ p', y + z = x 
goal: ∃ y ∈ p, ∃ z ∈ p', y + z = x

full_name: Submodule.coe_sup
code: theorem coe_sup : ↑(p ⊔ p') = (p + p' : Set M) 
goal: ↑(p ⊔ p') = ↑p + ↑p'

full_name: Submodule.sup_toAddSubmonoid
code: theorem sup_toAddSubmonoid : (p ⊔ p').toAddSubmonoid = p.toAddSubmonoid ⊔ p'.toAddSubmonoid 
goal: (p ⊔ p').toAddSubmonoid = p.toAddSubmonoid ⊔ p'.toAddSubmonoid

full_name: Submodule.sup_toAddSubgroup
code: theorem sup_toAddSubgroup {R M : Type*} [Ring R] [AddCommGroup M] [Module R M]
    (p p' : Submodule R M) : (p ⊔ p').toAddSubgroup = p.toAddSubgroup ⊔ p'.toAddSubgroup 
goal: (p ⊔ p').toAddSubgroup = p.toAddSubgroup ⊔ p'.toAddSubgroup

full_name: Submodule.mem_span_singleton_self
code: theorem mem_span_singleton_self (x : M) : x ∈ R ∙ x 
goal: x ∈ Submodule.span R {x}

full_name: Submodule.nontrivial_span_singleton
code: theorem nontrivial_span_singleton {x : M} (h : x ≠ 0) : Nontrivial (R ∙ x) 
goal: Nontrivial ↥(Submodule.span R {x})

full_name: Submodule.mem_span_singleton
code: theorem mem_span_singleton {y : M} : (x ∈ R ∙ y) ↔ ∃ a : R, a • y = x 
goal: x ∈ Submodule.span R {y} ↔ ∃ a, a • y = x

full_name: Submodule.le_span_singleton_iff
code: theorem le_span_singleton_iff {s : Submodule R M} {v₀ : M} :
    (s ≤ R ∙ v₀) ↔ ∀ v ∈ s, ∃ r : R, r • v₀ = v 
goal: s ≤ Submodule.span R {v₀} ↔ ∀ v ∈ s, ∃ r, r • v₀ = v

full_name: Submodule.span_singleton_eq_top_iff
code: theorem span_singleton_eq_top_iff (x : M) : (R ∙ x) = ⊤ ↔ ∀ v, ∃ r : R, r • x = v 
goal: Submodule.span R {x} = ⊤ ↔ ∀ (v : M), ∃ r, r • x = v

full_name: Submodule.span_zero_singleton
code: @[simp]
theorem span_zero_singleton : (R ∙ (0 : M)) = ⊥ 
goal: Submodule.span R {0} = ⊥

full_name: Submodule.span_singleton_eq_range
code: theorem span_singleton_eq_range (y : M) : ↑(R ∙ y) = range ((· • y) : R → M) 
goal: ↑(Submodule.span R {y}) = Set.range fun x => x • y

full_name: Submodule.span_singleton_smul_le
code: theorem span_singleton_smul_le {S} [Monoid S] [SMul S R] [MulAction S M] [IsScalarTower S R M]
    (r : S) (x : M) : (R ∙ r • x) ≤ R ∙ x 
goal: Submodule.span R {r • x} ≤ Submodule.span R {x}

full_name: Submodule.span_singleton_group_smul_eq
code: theorem span_singleton_group_smul_eq {G} [Group G] [SMul G R] [MulAction G M] [IsScalarTower G R M]
    (g : G) (x : M) : (R ∙ g • x) = R ∙ x 
goal: Submodule.span R {g • x} = Submodule.span R {x}

full_name: Submodule.span_singleton_smul_eq
code: theorem span_singleton_smul_eq {r : R} (hr : IsUnit r) (x : M) : (R ∙ r • x) = R ∙ x 
goal: Submodule.span R {r • x} = Submodule.span R {x}

full_name: Submodule.disjoint_span_singleton
code: theorem disjoint_span_singleton {K E : Type*} [DivisionRing K] [AddCommGroup E] [Module K E]
    {s : Submodule K E} {x : E} : Disjoint s (K ∙ x) ↔ x ∈ s → x = 0 
goal: Disjoint s (Submodule.span K {x}) ↔ x ∈ s → x = 0

full_name: Submodule.disjoint_span_singleton'
code: theorem disjoint_span_singleton' {K E : Type*} [DivisionRing K] [AddCommGroup E] [Module K E]
    {p : Submodule K E} {x : E} (x0 : x ≠ 0) : Disjoint p (K ∙ x) ↔ x ∉ p 
goal: Disjoint p (Submodule.span K {x}) ↔ x ∉ p

full_name: Submodule.mem_span_singleton_trans
code: theorem mem_span_singleton_trans {x y z : M} (hxy : x ∈ R ∙ y) (hyz : y ∈ R ∙ z) : x ∈ R ∙ z 
goal: x ∈ Submodule.span R {z}

full_name: Submodule.span_insert
code: theorem span_insert (x) (s : Set M) : span R (insert x s) = (R ∙ x) ⊔ span R s 
goal: Submodule.span R (insert x s) = Submodule.span R {x} ⊔ Submodule.span R s

full_name: Submodule.span_insert_eq_span
code: theorem span_insert_eq_span (h : x ∈ span R s) : span R (insert x s) = span R s 
goal: Submodule.span R (insert x s) = Submodule.span R s

full_name: Submodule.span_span
code: theorem span_span : span R (span R s : Set M) = span R s 
goal: Submodule.span R ↑(Submodule.span R s) = Submodule.span R s

full_name: Submodule.mem_span_insert
code: theorem mem_span_insert {y} :
    x ∈ span R (insert y s) ↔ ∃ a : R, ∃ z ∈ span R s, x = a • y + z 
goal: x ∈ Submodule.span R (insert y s) ↔ ∃ a, ∃ z ∈ Submodule.span R s, x = a • y + z

full_name: Submodule.mem_span_pair
code: theorem mem_span_pair {x y z : M} :
    z ∈ span R ({x, y} : Set M) ↔ ∃ a b : R, a • x + b • y = z 
goal: z ∈ Submodule.span R {x, y} ↔ ∃ a b, a • x + b • y = z

full_name: Submodule.span_le_restrictScalars
code: /-- If `R` is "smaller" ring than `S` then the span by `R` is smaller than the span by `S`. -/
theorem span_le_restrictScalars [Semiring S] [SMul R S] [Module S M] [IsScalarTower R S M] :
    span R s ≤ (span S s).restrictScalars R 
goal: Submodule.span R s ≤ Submodule.restrictScalars R (Submodule.span S s)

full_name: Submodule.span_subset_span
code: /-- A version of `Submodule.span_le_restrictScalars` with coercions. -/
@[simp]
theorem span_subset_span [Semiring S] [SMul R S] [Module S M] [IsScalarTower R S M] :
    ↑(span R s) ⊆ (span S s : Set M) 
goal: ↑(Submodule.span R s) ⊆ ↑(Submodule.span S s)

full_name: Submodule.span_span_of_tower
code: /-- Taking the span by a large ring of the span by the small ring is the same as taking the span
by just the large ring. -/
theorem span_span_of_tower [Semiring S] [SMul R S] [Module S M] [IsScalarTower R S M] :
    span S (span R s : Set M) = span S s 
goal: Submodule.span S ↑(Submodule.span R s) = Submodule.span S s

full_name: Submodule.span_eq_bot
code: theorem span_eq_bot : span R (s : Set M) = ⊥ ↔ ∀ x ∈ s, (x : M) = 0 
goal: Submodule.span R s = ⊥ ↔ ∀ x ∈ s, x = 0

full_name: Submodule.span_singleton_eq_bot
code: @[simp]
theorem span_singleton_eq_bot : (R ∙ x) = ⊥ ↔ x = 0 
goal: Submodule.span R {x} = ⊥ ↔ x = 0

full_name: Submodule.span_zero
code: @[simp]
theorem span_zero : span R (0 : Set M) = ⊥ 
goal: Submodule.span R 0 = ⊥

full_name: Submodule.span_singleton_le_iff_mem
code: @[simp]
theorem span_singleton_le_iff_mem (m : M) (p : Submodule R M) : (R ∙ m) ≤ p ↔ m ∈ p 
goal: Submodule.span R {m} ≤ p ↔ m ∈ p

full_name: Submodule.span_singleton_eq_span_singleton
code: theorem span_singleton_eq_span_singleton {R M : Type*} [Ring R] [AddCommGroup M] [Module R M]
    [NoZeroSMulDivisors R M] {x y : M} : ((R ∙ x) = R ∙ y) ↔ ∃ z : Rˣ, z • x = y 
goal: Submodule.span R {x} = Submodule.span R {y} ↔ ∃ z, z • x = y

full_name: Submodule.span_image
code: theorem span_image [RingHomSurjective σ₁₂] (f : F) :
    span R₂ (f '' s) = map f (span R s) 
goal: Submodule.span R₂ (⇑f '' s) = Submodule.map f (Submodule.span R s)

full_name: Submodule.span_image'
code: @[simp] -- Should be replaced with `Submodule.span_image` when `lean4#3701` is fixed.
theorem span_image' [RingHomSurjective σ₁₂] (f : M →ₛₗ[σ₁₂] M₂) :
    span R₂ (f '' s) = map f (span R s) 
goal: Submodule.span R₂ (⇑f '' s) = Submodule.map f (Submodule.span R s)

full_name: Submodule.apply_mem_span_image_of_mem_span
code: theorem apply_mem_span_image_of_mem_span [RingHomSurjective σ₁₂] (f : F) {x : M}
    {s : Set M} (h : x ∈ Submodule.span R s) : f x ∈ Submodule.span R₂ (f '' s) 
goal: f x ∈ Submodule.span R₂ (⇑f '' s)

full_name: Submodule.apply_mem_span_image_iff_mem_span
code: theorem apply_mem_span_image_iff_mem_span [RingHomSurjective σ₁₂] {f : F} {x : M}
    {s : Set M} (hf : Function.Injective f) :
    f x ∈ Submodule.span R₂ (f '' s) ↔ x ∈ Submodule.span R s 
goal: f x ∈ Submodule.span R₂ (⇑f '' s) ↔ x ∈ Submodule.span R s

full_name: Submodule.map_subtype_span_singleton
code: @[simp]
theorem map_subtype_span_singleton {p : Submodule R M} (x : p) :
    map p.subtype (R ∙ x) = R ∙ (x : M) 
goal: Submodule.map p.subtype (Submodule.span R {x}) = Submodule.span R {↑x}

full_name: Submodule.not_mem_span_of_apply_not_mem_span_image
code: /-- `f` is an explicit argument so we can `apply` this theorem and obtain `h` as a new goal. -/
theorem not_mem_span_of_apply_not_mem_span_image [RingHomSurjective σ₁₂] (f : F) {x : M}
    {s : Set M} (h : f x ∉ Submodule.span R₂ (f '' s)) : x ∉ Submodule.span R s 
goal: x ∉ Submodule.span R s

full_name: Submodule.iSup_span
code: theorem iSup_span {ι : Sort*} (p : ι → Set M) : ⨆ i, span R (p i) = span R (⋃ i, p i) 
goal: ⨆ i, Submodule.span R (p i) = Submodule.span R (⋃ i, p i)

full_name: Submodule.iSup_eq_span
code: theorem iSup_eq_span {ι : Sort*} (p : ι → Submodule R M) : ⨆ i, p i = span R (⋃ i, ↑(p i)) 
goal: ⨆ i, p i = Submodule.span R (⋃ i, ↑(p i))

full_name: Submodule.iSup_toAddSubmonoid
code: theorem iSup_toAddSubmonoid {ι : Sort*} (p : ι → Submodule R M) :
    (⨆ i, p i).toAddSubmonoid = ⨆ i, (p i).toAddSubmonoid 
goal: (⨆ i, p i).toAddSubmonoid = ⨆ i, (p i).toAddSubmonoid

full_name: Submodule.iSup_induction
code: /-- An induction principle for elements of `⨆ i, p i`.
If `C` holds for `0` and all elements of `p i` for all `i`, and is preserved under addition,
then it holds for all elements of the supremum of `p`. -/
@[elab_as_elim]
theorem iSup_induction {ι : Sort*} (p : ι → Submodule R M) {C : M → Prop} {x : M}
    (hx : x ∈ ⨆ i, p i) (hp : ∀ (i), ∀ x ∈ p i, C x) (h0 : C 0)
    (hadd : ∀ x y, C x → C y → C (x + y)) : C x 
goal: C x

full_name: Submodule.iSup_induction'
code: /-- A dependent version of `submodule.iSup_induction`. -/
@[elab_as_elim]
theorem iSup_induction' {ι : Sort*} (p : ι → Submodule R M) {C : ∀ x, (x ∈ ⨆ i, p i) → Prop}
    (mem : ∀ (i) (x) (hx : x ∈ p i), C x (mem_iSup_of_mem i hx)) (zero : C 0 (zero_mem _))
    (add : ∀ x y hx hy, C x hx → C y hy → C (x + y) (add_mem ‹_› ‹_›)) {x : M}
    (hx : x ∈ ⨆ i, p i) : C x hx 
goal: C x hx

full_name: Submodule.singleton_span_isCompactElement
code: theorem singleton_span_isCompactElement (x : M) :
    CompleteLattice.IsCompactElement (span R {x} : Submodule R M) 
goal: CompleteLattice.IsCompactElement (Submodule.span R {x})

full_name: Submodule.finset_span_isCompactElement
code: /-- The span of a finite subset is compact in the lattice of submodules. -/
theorem finset_span_isCompactElement (S : Finset M) :
    CompleteLattice.IsCompactElement (span R S : Submodule R M) 
goal: CompleteLattice.IsCompactElement (Submodule.span R ↑S)

full_name: Submodule.finite_span_isCompactElement
code: /-- The span of a finite subset is compact in the lattice of submodules. -/
theorem finite_span_isCompactElement (S : Set M) (h : S.Finite) :
    CompleteLattice.IsCompactElement (span R S : Submodule R M) 
goal: CompleteLattice.IsCompactElement (Submodule.span R S)

full_name: Submodule.instIsCompactlyGenerated
code: instance : IsCompactlyGenerated (Submodule R M) 
goal: IsCompactlyGenerated (Submodule R M)

full_name: Submodule.submodule_eq_sSup_le_nonzero_spans
code: /-- A submodule is equal to the supremum of the spans of the submodule's nonzero elements. -/
theorem submodule_eq_sSup_le_nonzero_spans (p : Submodule R M) :
    p = sSup { T : Submodule R M | ∃ m ∈ p, m ≠ 0 ∧ T = span R {m} } 
goal: p = sSup {T | ∃ m ∈ p, m ≠ 0 ∧ T = Submodule.span R {m}}

full_name: Submodule.lt_sup_iff_not_mem
code: theorem lt_sup_iff_not_mem {I : Submodule R M} {a : M} : (I < I ⊔ R ∙ a) ↔ a ∉ I 
goal: I < I ⊔ Submodule.span R {a} ↔ a ∉ I

full_name: Submodule.mem_iSup
code: theorem mem_iSup {ι : Sort*} (p : ι → Submodule R M) {m : M} :
    (m ∈ ⨆ i, p i) ↔ ∀ N, (∀ i, p i ≤ N) → m ∈ N 
goal: m ∈ ⨆ i, p i ↔ ∀ (N : Submodule R M), (∀ (i : ι), p i ≤ N) → m ∈ N

full_name: Submodule.mem_sSup
code: theorem mem_sSup {s : Set (Submodule R M)} {m : M} :
    (m ∈ sSup s) ↔ ∀ N, (∀ p ∈ s, p ≤ N) → m ∈ N 
goal: m ∈ sSup s ↔ ∀ (N : Submodule R M), (∀ p ∈ s, p ≤ N) → m ∈ N

full_name: Submodule.mem_span_finite_of_mem_span
code: /-- For every element in the span of a set, there exists a finite subset of the set
such that the element is contained in the span of the subset. -/
theorem mem_span_finite_of_mem_span {S : Set M} {x : M} (hx : x ∈ span R S) :
    ∃ T : Finset M, ↑T ⊆ S ∧ x ∈ span R (T : Set M) 
goal: ∃ T, ↑T ⊆ S ∧ x ∈ Submodule.span R ↑T

full_name: Submodule.prod
code: /-- The product of two submodules is a submodule. -/
def prod : Submodule R (M × M') 
goal: Submodule R (M × M')

full_name: Submodule.prod_coe
code: @[simp]
theorem prod_coe : (prod p q₁ : Set (M × M')) = (p : Set M) ×ˢ (q₁ : Set M') 
goal: ↑(p.prod q₁) = ↑p ×ˢ ↑q₁

full_name: Submodule.mem_prod
code: @[simp]
theorem mem_prod {p : Submodule R M} {q : Submodule R M'} {x : M × M'} :
    x ∈ prod p q ↔ x.1 ∈ p ∧ x.2 ∈ q 
goal: x ∈ p.prod q ↔ x.1 ∈ p ∧ x.2 ∈ q

full_name: Submodule.span_prod_le
code: theorem span_prod_le (s : Set M) (t : Set M') : span R (s ×ˢ t) ≤ prod (span R s) (span R t) 
goal: Submodule.span R (s ×ˢ t) ≤ (Submodule.span R s).prod (Submodule.span R t)

full_name: Submodule.prod_top
code: @[simp]
theorem prod_top : (prod ⊤ ⊤ : Submodule R (M × M')) = ⊤ 
goal: ⊤.prod ⊤ = ⊤

full_name: Submodule.prod_bot
code: @[simp]
theorem prod_bot : (prod ⊥ ⊥ : Submodule R (M × M')) = ⊥ 
goal: ⊥.prod ⊥ = ⊥

full_name: Submodule.prod_mono
code: theorem prod_mono {p p' : Submodule R M} {q q' : Submodule R M'} :
    p ≤ p' → q ≤ q' → prod p q ≤ prod p' q' 
goal: p ≤ p' → q ≤ q' → p.prod q ≤ p'.prod q'

full_name: Submodule.prod_inf_prod
code: @[simp]
theorem prod_inf_prod : prod p q₁ ⊓ prod p' q₁' = prod (p ⊓ p') (q₁ ⊓ q₁') 
goal: p.prod q₁ ⊓ p'.prod q₁' = (p ⊓ p').prod (q₁ ⊓ q₁')

full_name: Submodule.prod_sup_prod
code: @[simp]
theorem prod_sup_prod : prod p q₁ ⊔ prod p' q₁' = prod (p ⊔ p') (q₁ ⊔ q₁') 
goal: p.prod q₁ ⊔ p'.prod q₁' = (p ⊔ p').prod (q₁ ⊔ q₁')

full_name: Submodule.span_neg
code: @[simp]
theorem span_neg (s : Set M) : span R (-s) = span R s 
goal: Submodule.span R (-s) = Submodule.span R s

full_name: Submodule.mem_span_insert'
code: theorem mem_span_insert' {x y} {s : Set M} :
    x ∈ span R (insert y s) ↔ ∃ a : R, x + a • y ∈ span R s 
goal: x ∈ Submodule.span R (insert y s) ↔ ∃ a, x + a • y ∈ Submodule.span R s

full_name: Submodule.instIsModularLattice
code: instance : IsModularLattice (Submodule R M) 
goal: IsModularLattice (Submodule R M)

full_name: Submodule.isCompl_comap_subtype_of_isCompl_of_le
code: lemma isCompl_comap_subtype_of_isCompl_of_le {p q r : Submodule R M}
    (h₁ : IsCompl q r) (h₂ : q ≤ p) :
    IsCompl (q.comap p.subtype) (r.comap p.subtype) 
goal: IsCompl (Submodule.comap p.subtype q) (Submodule.comap p.subtype r)

full_name: Submodule.comap_map_eq
code: theorem comap_map_eq (f : F) (p : Submodule R M) : comap f (map f p) = p ⊔ LinearMap.ker f 
goal: Submodule.comap f (Submodule.map f p) = p ⊔ LinearMap.ker f

full_name: Submodule.comap_map_eq_self
code: theorem comap_map_eq_self {f : F} {p : Submodule R M} (h : LinearMap.ker f ≤ p) :
    comap f (map f p) = p 
goal: Submodule.comap f (Submodule.map f p) = p

full_name: LinearMap.range_domRestrict_eq_range_iff
code: lemma _root_.LinearMap.range_domRestrict_eq_range_iff {f : M →ₛₗ[τ₁₂] M₂} {S : Submodule R M} :
    LinearMap.range (f.domRestrict S) = LinearMap.range f ↔ S ⊔ (LinearMap.ker f) = ⊤ 
goal: LinearMap.range (f.domRestrict S) = LinearMap.range f ↔ S ⊔ LinearMap.ker f = ⊤

full_name: LinearMap.surjective_domRestrict_iff
code: @[simp] lemma _root_.LinearMap.surjective_domRestrict_iff
    {f : M →ₛₗ[τ₁₂] M₂} {S : Submodule R M} (hf : Surjective f) :
    Surjective (f.domRestrict S) ↔ S ⊔ LinearMap.ker f = ⊤ 
goal: Function.Surjective ⇑(f.domRestrict S) ↔ S ⊔ LinearMap.ker f = ⊤

full_name: Submodule.biSup_comap_subtype_eq_top
code: @[simp]
lemma biSup_comap_subtype_eq_top {ι : Type*} (s : Set ι) (p : ι → Submodule R M) :
    ⨆ i ∈ s, (p i).comap (⨆ i ∈ s, p i).subtype = ⊤ 
goal: ⨆ i ∈ s, Submodule.comap (⨆ i ∈ s, p i).subtype (p i) = ⊤

full_name: Submodule.biSup_comap_eq_top_of_surjective
code: lemma biSup_comap_eq_top_of_surjective {ι : Type*} (s : Set ι) (hs : s.Nonempty)
    (p : ι → Submodule R₂ M₂) (hp : ⨆ i ∈ s, p i = ⊤)
    (f : M →ₛₗ[τ₁₂] M₂) (hf : Surjective f) :
    ⨆ i ∈ s, (p i).comap f = ⊤ 
goal: ⨆ i ∈ s, Submodule.comap f (p i) = ⊤

full_name: Submodule.biSup_comap_eq_top_of_range_eq_biSup
code: lemma biSup_comap_eq_top_of_range_eq_biSup
    {R R₂ : Type*} [Ring R] [Ring R₂] {τ₁₂ : R →+* R₂} [RingHomSurjective τ₁₂]
    [Module R M] [Module R₂ M₂] {ι : Type*} (s : Set ι) (hs : s.Nonempty)
    (p : ι → Submodule R₂ M₂) (f : M →ₛₗ[τ₁₂] M₂) (hf : LinearMap.range f = ⨆ i ∈ s, p i) :
    ⨆ i ∈ s, (p i).comap f = ⊤ 
goal: ⨆ i ∈ s, Submodule.comap f (p i) = ⊤

full_name: Submodule.wcovBy_span_singleton_sup
code: /-- There is no vector subspace between `p` and `(K ∙ x) ⊔ p`, `WCovBy` version. -/
theorem wcovBy_span_singleton_sup (x : V) (p : Submodule K V) : WCovBy p ((K ∙ x) ⊔ p) 
goal: p ⩿ Submodule.span K {x} ⊔ p

full_name: Submodule.covBy_span_singleton_sup
code: /-- There is no vector subspace between `p` and `(K ∙ x) ⊔ p`, `CovBy` version. -/
theorem covBy_span_singleton_sup {x : V} {p : Submodule K V} (h : x ∉ p) : CovBy p ((K ∙ x) ⊔ p) 
goal: p ⋖ Submodule.span K {x} ⊔ p

full_name: LinearMap.map_le_map_iff
code: protected theorem map_le_map_iff (f : F) {p p'} : map f p ≤ map f p' ↔ p ≤ p' ⊔ ker f 
goal: Submodule.map f p ≤ Submodule.map f p' ↔ p ≤ p' ⊔ LinearMap.ker f

full_name: LinearMap.map_le_map_iff'
code: theorem map_le_map_iff' {f : F} (hf : ker f = ⊥) {p p'} : map f p ≤ map f p' ↔ p ≤ p' 
goal: Submodule.map f p ≤ Submodule.map f p' ↔ p ≤ p'

full_name: LinearMap.map_injective
code: theorem map_injective {f : F} (hf : ker f = ⊥) : Injective (map f) 
goal: Function.Injective (Submodule.map f)

full_name: LinearMap.map_eq_top_iff
code: theorem map_eq_top_iff {f : F} (hf : range f = ⊤) {p : Submodule R M} :
    p.map f = ⊤ ↔ p ⊔ LinearMap.ker f = ⊤ 
goal: Submodule.map f p = ⊤ ↔ p ⊔ LinearMap.ker f = ⊤

full_name: LinearMap.toSpanSingleton_apply
code: /-- Given an element `x` of a module `M` over `R`, the natural map from
    `R` to scalar multiples of `x`. See also `LinearMap.ringLmapEquivSelf`. -/
@[simps!]
def toSpanSingleton (x : M) : R →ₗ[R] M 
goal: (LinearMap.toSpanSingleton R M x) b = b • x

full_name: LinearMap.toSpanSingleton
code: /-- Given an element `x` of a module `M` over `R`, the natural map from
    `R` to scalar multiples of `x`. See also `LinearMap.ringLmapEquivSelf`. -/
@[simps!]
def toSpanSingleton (x : M) : R →ₗ[R] M 
goal: R →ₗ[R] M

full_name: LinearMap.span_singleton_eq_range
code: /-- The range of `toSpanSingleton x` is the span of `x`. -/
theorem span_singleton_eq_range (x : M) : (R ∙ x) = range (toSpanSingleton R M x) 
goal: Submodule.span R {x} = LinearMap.range (LinearMap.toSpanSingleton R M x)

full_name: LinearMap.toSpanSingleton_one
code: theorem toSpanSingleton_one (x : M) : toSpanSingleton R M x 1 = x 
goal: (LinearMap.toSpanSingleton R M x) 1 = x

full_name: LinearMap.toSpanSingleton_zero
code: @[simp]
theorem toSpanSingleton_zero : toSpanSingleton R M 0 = 0 
goal: LinearMap.toSpanSingleton R M 0 = 0

full_name: LinearMap.toSpanSingleton_isIdempotentElem_iff
code: theorem toSpanSingleton_isIdempotentElem_iff {e : R} :
    IsIdempotentElem (toSpanSingleton R R e) ↔ IsIdempotentElem e 
goal: IsIdempotentElem (LinearMap.toSpanSingleton R R e) ↔ IsIdempotentElem e

full_name: LinearMap.isIdempotentElem_apply_one_iff
code: theorem isIdempotentElem_apply_one_iff {f : Module.End R R} :
    IsIdempotentElem (f 1) ↔ IsIdempotentElem f 
goal: IsIdempotentElem (f 1) ↔ IsIdempotentElem f

full_name: LinearMap.eqOn_span_iff
code: /-- Two linear maps are equal on `Submodule.span s` iff they are equal on `s`. -/
theorem eqOn_span_iff {s : Set M} {f g : F} : Set.EqOn f g (span R s) ↔ Set.EqOn f g s 
goal: Set.EqOn ⇑f ⇑g ↑(Submodule.span R s) ↔ Set.EqOn (⇑f) (⇑g) s

full_name: LinearMap.eqOn_span'
code: /-- If two linear maps are equal on a set `s`, then they are equal on `Submodule.span s`.

This version uses `Set.EqOn`, and the hidden argument will expand to `h : x ∈ (span R s : Set M)`.
See `LinearMap.eqOn_span` for a version that takes `h : x ∈ span R s` as an argument. -/
theorem eqOn_span' {s : Set M} {f g : F} (H : Set.EqOn f g s) :
    Set.EqOn f g (span R s : Set M) 
goal: Set.EqOn ⇑f ⇑g ↑(Submodule.span R s)

full_name: LinearMap.eqOn_span
code: /-- If two linear maps are equal on a set `s`, then they are equal on `Submodule.span s`.

See also `LinearMap.eqOn_span'` for a version using `Set.EqOn`. -/
theorem eqOn_span {s : Set M} {f g : F} (H : Set.EqOn f g s) ⦃x⦄ (h : x ∈ span R s) :
    f x = g x 
goal: f x = g x

full_name: LinearMap.ext_on
code: /-- If `s` generates the whole module and linear maps `f`, `g` are equal on `s`, then they are
equal. -/
theorem ext_on {s : Set M} {f g : F} (hv : span R s = ⊤) (h : Set.EqOn f g s) : f = g 
goal: f = g

full_name: LinearMap.ext_on_range
code: /-- If the range of `v : ι → M` generates the whole module and linear maps `f`, `g` are equal at
each `v i`, then they are equal. -/
theorem ext_on_range {ι : Sort*} {v : ι → M} {f g : F} (hv : span R (Set.range v) = ⊤)
    (h : ∀ i, f (v i) = g (v i)) : f = g 
goal: f = g

full_name: LinearMap.ker_toSpanSingleton
code: theorem ker_toSpanSingleton {x : M} (h : x ≠ 0) : LinearMap.ker (toSpanSingleton R M x) = ⊥ 
goal: LinearMap.ker (LinearMap.toSpanSingleton R M x) = ⊥

full_name: LinearMap.span_singleton_sup_ker_eq_top
code: theorem span_singleton_sup_ker_eq_top (f : V →ₗ[K] K) {x : V} (hx : f x ≠ 0) :
    (K ∙ x) ⊔ ker f = ⊤ 
goal: Submodule.span K {x} ⊔ LinearMap.ker f = ⊤

full_name: LinearEquiv.toSpanNonzeroSingleton
code: /-- Given a nonzero element `x` of a torsion-free module `M` over a ring `R`, the natural
isomorphism from `R` to the span of `x` given by $r \mapsto r \cdot x$. -/
noncomputable
def toSpanNonzeroSingleton : R ≃ₗ[R] R ∙ x 
goal: R ≃ₗ[R] ↥(Submodule.span R {x})

full_name: LinearEquiv.toSpanNonzeroSingleton_apply
code: @[simp] theorem toSpanNonzeroSingleton_apply (t : R) :
    LinearEquiv.toSpanNonzeroSingleton R M x h t =
      (⟨t • x, Submodule.smul_mem _ _ (Submodule.mem_span_singleton_self x)⟩ : R ∙ x) 
goal: (LinearEquiv.toSpanNonzeroSingleton R M x h) t = ⟨t • x, ⋯⟩

full_name: LinearEquiv.toSpanNonzeroSingleton_one
code: theorem toSpanNonzeroSingleton_one :
    LinearEquiv.toSpanNonzeroSingleton R M x h 1 =
      (⟨x, Submodule.mem_span_singleton_self x⟩ : R ∙ x) 
goal: (LinearEquiv.toSpanNonzeroSingleton R M x h) 1 = ⟨x, ⋯⟩

full_name: LinearEquiv.coord
code: /-- Given a nonzero element `x` of a torsion-free module `M` over a ring `R`, the natural
isomorphism from the span of `x` to `R` given by $r \cdot x \mapsto r$. -/
noncomputable
abbrev coord : (R ∙ x) ≃ₗ[R] R 
goal: ↥(Submodule.span R {x}) ≃ₗ[R] R

full_name: LinearEquiv.coord_self
code: theorem coord_self : (coord R M x h) (⟨x, Submodule.mem_span_singleton_self x⟩ : R ∙ x) = 1 
goal: (LinearEquiv.coord R M x h) ⟨x, ⋯⟩ = 1

full_name: LinearEquiv.coord_apply_smul
code: theorem coord_apply_smul (y : Submodule.span R ({x} : Set M)) : coord R M x h y • x = y 
goal: (LinearEquiv.coord R M x h) y • x = ↑y