Theorem: FiniteDimensional.eq_top_of_finrank_eq
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: haveI : IsNoetherian K V := iff_fg.2 inferInstance
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
⊢ S = ⊤

tactic: set bS := Basis.ofVectorSpace K S with bS_eq
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this : IsNoetherian K V
⊢ S = ⊤

tactic: have : LinearIndependent K ((↑) : ((↑) '' Basis.ofVectorSpaceIndex K S : Set V) → V) :=
  @LinearIndependent.image_subtype _ _ _ _ _ _ _ _ _ (Submodule.subtype S)
    (by simpa using bS.linearIndependent) (by simp)
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
⊢ S = ⊤

tactic: set b := Basis.extend this with b_eq
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
⊢ S = ⊤

tactic: letI i1 : Fintype (this.extend _) :=
  (finite_of_linearIndependent (by simpa using b.linearIndependent)).fintype
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ))) K
  V :=
  Basis.extend this
b_eq : b = Basis.extend this
⊢ S = ⊤

tactic: letI i2 : Fintype (((↑) : S → V) '' Basis.ofVectorSpaceIndex K S) :=
  (finite_of_linearIndependent this).fintype
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ))) K
  V :=
  Basis.extend this
b_eq : b = Basis.extend this
i1 : Fintype
  ↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
⊢ S = ⊤

tactic: letI i3 : Fintype (Basis.ofVectorSpaceIndex K S) :=
  (finite_of_linearIndependent (by simpa using bS.linearIndependent)).fintype
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ))) K
  V :=
  Basis.extend this
b_eq : b = Basis.extend this
i1 : Fintype
  ↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
⊢ S = ⊤

tactic: have : (↑) '' Basis.ofVectorSpaceIndex K S = this.extend (Set.subset_univ _) :=
  Set.eq_of_subset_of_card_le (this.subset_extend _)
    (by
      rw [Set.card_image_of_injective _ Subtype.coe_injective, ← finrank_eq_card_basis bS, ←
          finrank_eq_card_basis b, h])
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ))) K
  V :=
  Basis.extend this
b_eq : b = Basis.extend this
i1 : Fintype
  ↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
i3 : Fintype ↑(Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Basis.ofVectorSpaceIndex K { x // x ∈ S }))
⊢ S = ⊤

tactic: rw [← b.span_eq, b_eq, Basis.coe_extend, Subtype.range_coe, ← this, ← Submodule.coeSubtype,
  span_image]
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝¹ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this✝ : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
  K V :=
  Basis.extend this✝
b_eq : b = Basis.extend this✝
i1 : Fintype
  ↑(LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
i3 : Fintype ↑(Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Basis.ofVectorSpaceIndex K { x // x ∈ S }))
this :
  Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } =
    LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)
⊢ S = ⊤

tactic: have := bS.span_eq
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝¹ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this✝ : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
  K V :=
  Basis.extend this✝
b_eq : b = Basis.extend this✝
i1 : Fintype
  ↑(LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
i3 : Fintype ↑(Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Basis.ofVectorSpaceIndex K { x // x ∈ S }))
this :
  Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } =
    LinearIndependent.extend this✝ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)
⊢ S = Submodule.map (Submodule.subtype S) (span K (Basis.ofVectorSpaceIndex K { x // x ∈ S }))

tactic: rw [bS_eq, Basis.coe_ofVectorSpace, Subtype.range_coe] at this
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝² : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this✝¹ : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
  K V :=
  Basis.extend this✝¹
b_eq : b = Basis.extend this✝¹
i1 : Fintype
  ↑(LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
i3 : Fintype ↑(Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Basis.ofVectorSpaceIndex K { x // x ∈ S }))
this✝ :
  Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } =
    LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)
this : span K (Set.range ↑bS) = ⊤
⊢ S = Submodule.map (Submodule.subtype S) (span K (Basis.ofVectorSpaceIndex K { x // x ∈ S }))

tactic: rw [this, map_top (Submodule.subtype S), range_subtype]
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝² : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this✝¹ : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
  K V :=
  Basis.extend this✝¹
b_eq : b = Basis.extend this✝¹
i1 : Fintype
  ↑(LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
i3 : Fintype ↑(Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Basis.ofVectorSpaceIndex K { x // x ∈ S }))
this✝ :
  Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } =
    LinearIndependent.extend this✝¹ (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)
this : span K (Basis.ofVectorSpaceIndex K { x // x ∈ S }) = ⊤
⊢ S = Submodule.map (Submodule.subtype S) (span K (Basis.ofVectorSpaceIndex K { x // x ∈ S }))

tactic: simpa using bS.linearIndependent
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
⊢ LinearIndependent K fun x => ↑x

tactic: simp
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
⊢ Disjoint (span K (Basis.ofVectorSpaceIndex K { x // x ∈ S })) (LinearMap.ker (Submodule.subtype S))

tactic: simpa using b.linearIndependent
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ))) K
  V :=
  Basis.extend this
b_eq : b = Basis.extend this
⊢ LinearIndependent ?m.269753 Subtype.val

tactic: simpa using bS.linearIndependent
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ))) K
  V :=
  Basis.extend this
b_eq : b = Basis.extend this
i1 : Fintype
  ↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
⊢ LinearIndependent ?m.275223 Subtype.val

tactic: rw [Set.card_image_of_injective _ Subtype.coe_injective, ← finrank_eq_card_basis bS, ←
    finrank_eq_card_basis b, h]
state_before: K : Type u
V : Type v
inst✝⁵ : DivisionRing K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
V₂ : Type v'
inst✝² : AddCommGroup V₂
inst✝¹ : Module K V₂
inst✝ : FiniteDimensional K V
S : Submodule K V
h : finrank K { x // x ∈ S } = finrank K V
this✝ : IsNoetherian K V
bS : Basis (↑(Basis.ofVectorSpaceIndex K { x // x ∈ S })) K { x // x ∈ S } := Basis.ofVectorSpace K { x // x ∈ S }
bS_eq : bS = Basis.ofVectorSpace K { x // x ∈ S }
this : LinearIndependent K Subtype.val
b : Basis (↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ))) K
  V :=
  Basis.extend this
b_eq : b = Basis.extend this
i1 : Fintype
  ↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) :=
  Set.Finite.fintype
    (_ :
      Set.Finite
        (LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)))
i2 : Fintype ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S }))
i3 : Fintype ↑(Basis.ofVectorSpaceIndex K { x // x ∈ S }) :=
  Set.Finite.fintype (_ : Set.Finite (Basis.ofVectorSpaceIndex K { x // x ∈ S }))
⊢ Fintype.card
      ↑(LinearIndependent.extend this (_ : Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S } ⊆ Set.univ)) ≤
    Fintype.card ↑(Subtype.val '' Basis.ofVectorSpaceIndex K { x // x ∈ S })