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

tactic: by_cases fin : FiniteDimensional K V
state_before: K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
⊢ span K (Set.range b) = ⊤

tactic: replace fin : FiniteDimensional _ _ := fin
state_before: case pos
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : FiniteDimensional K V
⊢ span K (Set.range b) = ⊤

tactic: by_contra ne_top
state_before: case pos
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : FiniteDimensional K V
⊢ span K (Set.range b) = ⊤

tactic: have lt_top : span K (Set.range b) < ⊤ := lt_of_le_of_ne le_top ne_top
state_before: case pos
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : FiniteDimensional K V
ne_top : ¬span K (Set.range b) = ⊤
⊢ False

tactic: exact ne_of_lt (Submodule.finrank_lt lt_top)
  (_root_.trans (finrank_span_eq_card lin_ind) card_eq)
state_before: case pos
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : FiniteDimensional K V
ne_top : ¬span K (Set.range b) = ⊤
lt_top : span K (Set.range b) < ⊤
⊢ False

tactic: exfalso
state_before: case neg
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : ¬FiniteDimensional K V
⊢ span K (Set.range b) = ⊤

tactic: apply ne_of_lt (Fintype.card_pos_iff.mpr hι)
state_before: case neg.h
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : ¬FiniteDimensional K V
⊢ False

tactic: symm
state_before: case neg.h
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : ¬FiniteDimensional K V
⊢ 0 = Fintype.card ι

tactic: replace fin := (not_iff_not.2 IsNoetherian.iff_fg).2 fin
state_before: case neg.h
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : ¬FiniteDimensional K V
⊢ Fintype.card ι = 0

tactic: calc
  Fintype.card ι = finrank K V := card_eq
  _ = 0 := dif_neg (mt IsNoetherian.iff_rank_lt_aleph0.mpr fin)
state_before: case neg.h
K : Type u
V : Type v
inst✝³ : DivisionRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
ι : Type u_1
hι : Nonempty ι
inst✝ : Fintype ι
b : ι → V
lin_ind : LinearIndependent K b
card_eq : Fintype.card ι = finrank K V
fin : ¬IsNoetherian K V
⊢ Fintype.card ι = 0