l3lab/ntp-mathlib huggingface dataset:
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    

Proof state:
case a
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
x : M
hx : x ∈ dualSubmodule B (Submodule.span R (Set.range ⇑b))
⊢ (Finset.sum Finset.univ fun i => ((dualBasis B hB b).repr x) i • (dualBasis B hB b) i) ∈
    Submodule.span R (Set.range ⇑(dualBasis B hB b))

Next tactic:
apply sum_mem
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    

Proof state:
case a.h
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
x : M
hx : x ∈ dualSubmodule B (Submodule.span R (Set.range ⇑b))
⊢ ∀ c ∈ Finset.univ,
    ((dualBasis B hB b).repr x) c • (dualBasis B hB b) c ∈ Submodule.span R (Set.range ⇑(dualBasis B hB b))

Next tactic:
rintro i -
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    

Proof state:
case a.h
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
x : M
hx : x ∈ dualSubmodule B (Submodule.span R (Set.range ⇑b))
i : ι
⊢ ((dualBasis B hB b).repr x) i • (dualBasis B hB b) i ∈ Submodule.span R (Set.range ⇑(dualBasis B hB b))

Next tactic:
obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    

Proof state:
case a.h.intro
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
x : M
hx : x ∈ dualSubmodule B (Submodule.span R (Set.range ⇑b))
i : ι
r : R
hr : (Algebra.linearMap R S) r = bilin B x (b i)
⊢ ((dualBasis B hB b).repr x) i • (dualBasis B hB b) i ∈ Submodule.span R (Set.range ⇑(dualBasis B hB b))

Next tactic:
simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    

Proof state:
case a.h.intro
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
x : M
hx : x ∈ dualSubmodule B (Submodule.span R (Set.range ⇑b))
i : ι
r : R
hr : (Algebra.linearMap R S) r = bilin B x (b i)
⊢ r • (dualBasis B hB b) i ∈ Submodule.span R (Set.range ⇑(dualBasis B hB b))

Next tactic:
apply Submodule.smul_mem
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    

Proof state:
case a.h.intro.h
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
x : M
hx : x ∈ dualSubmodule B (Submodule.span R (Set.range ⇑b))
i : ι
r : R
hr : (Algebra.linearMap R S) r = bilin B x (b i)
⊢ (dualBasis B hB b) i ∈ Submodule.span R (Set.range ⇑(dualBasis B hB b))

Next tactic:
exact Submodule.subset_span ⟨_, rfl⟩
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · 

Proof state:
case a
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
⊢ Submodule.span R (Set.range ⇑(dualBasis B hB b)) ≤ dualSubmodule B (Submodule.span R (Set.range ⇑b))

Next tactic:
rw [Submodule.span_le]
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    

Proof state:
case a
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
⊢ Set.range ⇑(dualBasis B hB b) ⊆ ↑(dualSubmodule B (Submodule.span R (Set.range ⇑b)))

Next tactic:
rintro _ ⟨i, rfl⟩ y hy
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨i, rfl⟩ y hy
    

Proof state:
case a.intro
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
i : ι
y : M
hy : y ∈ Submodule.span R (Set.range ⇑b)
⊢ bilin B ((dualBasis B hB b) i) y ∈ 1

Next tactic:
obtain ⟨f, rfl⟩ := (mem_span_range_iff_exists_fun _).mp hy
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨i, rfl⟩ y hy
    obtain ⟨f, rfl⟩ := (mem_span_range_iff_exists_fun _).mp hy
    

Proof state:
case a.intro.intro
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
i : ι
f : ι → R
hy : (Finset.sum Finset.univ fun i => f i • b i) ∈ Submodule.span R (Set.range ⇑b)
⊢ bilin B ((dualBasis B hB b) i) (Finset.sum Finset.univ fun i => f i • b i) ∈ 1

Next tactic:
simp only [sum_right, bilin_smul_right]
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨i, rfl⟩ y hy
    obtain ⟨f, rfl⟩ := (mem_span_range_iff_exists_fun _).mp hy
    simp only [sum_right, bilin_smul_right]
    

Proof state:
case a.intro.intro
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
i : ι
f : ι → R
hy : (Finset.sum Finset.univ fun i => f i • b i) ∈ Submodule.span R (Set.range ⇑b)
⊢ (Finset.sum Finset.univ fun i_1 => bilin B ((dualBasis B hB b) i) (f i_1 • b i_1)) ∈ 1

Next tactic:
apply sum_mem
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨i, rfl⟩ y hy
    obtain ⟨f, rfl⟩ := (mem_span_range_iff_exists_fun _).mp hy
    simp only [sum_right, bilin_smul_right]
    apply sum_mem
    

Proof state:
case a.intro.intro.h
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
i : ι
f : ι → R
hy : (Finset.sum Finset.univ fun i => f i • b i) ∈ Submodule.span R (Set.range ⇑b)
⊢ ∀ c ∈ Finset.univ, bilin B ((dualBasis B hB b) i) (f c • b c) ∈ 1

Next tactic:
rintro j -
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨i, rfl⟩ y hy
    obtain ⟨f, rfl⟩ := (mem_span_range_iff_exists_fun _).mp hy
    simp only [sum_right, bilin_smul_right]
    apply sum_mem
    rintro j -
    

Proof state:
case a.intro.intro.h
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
i : ι
f : ι → R
hy : (Finset.sum Finset.univ fun i => f i • b i) ∈ Submodule.span R (Set.range ⇑b)
j : ι
⊢ bilin B ((dualBasis B hB b) i) (f j • b j) ∈ 1

Next tactic:
rw [← IsScalarTower.algebraMap_smul S (f j), B.bilin_smul_right, apply_dualBasis_left,
      mul_ite, mul_one, mul_zero, ← (algebraMap R S).map_zero, ← apply_ite]
lemma dualSubmodule_span_of_basis {ι} [Fintype ι] [DecidableEq ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (Submodule.span R (Set.range b)) =
      Submodule.span R (Set.range <| B.dualBasis hB b) := by
  apply le_antisymm
  · intro x hx
    rw [← (B.dualBasis hB b).sum_repr x]
    apply sum_mem
    rintro i -
    obtain ⟨r, hr⟩ := hx (b i) (Submodule.subset_span ⟨_, rfl⟩)
    simp only [dualBasis_repr_apply, ← hr, Algebra.linearMap_apply, algebraMap_smul]
    apply Submodule.smul_mem
    exact Submodule.subset_span ⟨_, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨i, rfl⟩ y hy
    obtain ⟨f, rfl⟩ := (mem_span_range_iff_exists_fun _).mp hy
    simp only [sum_right, bilin_smul_right]
    apply sum_mem
    rintro j -
    rw [← IsScalarTower.algebraMap_smul S (f j), B.bilin_smul_right, apply_dualBasis_left,
      mul_ite, mul_one, mul_zero, ← (algebraMap R S).map_zero, ← apply_ite]
    

Proof state:
case a.intro.intro.h
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : Field S
inst✝⁶ : AddCommGroup M
inst✝⁵ : Algebra R S
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
hB : Nondegenerate B
b : Basis ι S M
i : ι
f : ι → R
hy : (Finset.sum Finset.univ fun i => f i • b i) ∈ Submodule.span R (Set.range ⇑b)
j : ι
⊢ (algebraMap R S) (if j = i then f j else 0) ∈ 1

Next tactic:
exact ⟨_, rfl⟩
lemma dualSubmodule_dualSubmodule_flip_of_basis {ι} [Fintype ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (B.flip.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
b : Basis ι S M
⊢ dualSubmodule B (dualSubmodule (flip B) (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
classical
  letI := FiniteDimensional.of_fintype_basis b
  rw [dualSubmodule_span_of_basis _ hB.flip, dualSubmodule_span_of_basis B hB,
    dualBasis_dualBasis_flip B hB]
lemma dualSubmodule_dualSubmodule_flip_of_basis {ι} [Fintype ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (B.flip.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  classical
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
b : Basis ι S M
⊢ dualSubmodule B (dualSubmodule (flip B) (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
letI := FiniteDimensional.of_fintype_basis b
lemma dualSubmodule_dualSubmodule_flip_of_basis {ι} [Fintype ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.dualSubmodule (B.flip.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  classical
  letI := FiniteDimensional.of_fintype_basis b
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
b : Basis ι S M
this : FiniteDimensional S M := FiniteDimensional.of_fintype_basis b
⊢ dualSubmodule B (dualSubmodule (flip B) (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
rw [dualSubmodule_span_of_basis _ hB.flip, dualSubmodule_span_of_basis B hB,
    dualBasis_dualBasis_flip B hB]
lemma dualSubmodule_flip_dualSubmodule_of_basis {ι} [Fintype ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.flip.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
b : Basis ι S M
⊢ dualSubmodule (flip B) (dualSubmodule B (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
classical
  letI := FiniteDimensional.of_fintype_basis b
  rw [dualSubmodule_span_of_basis B hB, dualSubmodule_span_of_basis _ hB.flip,
    dualBasis_flip_dualBasis B hB]
lemma dualSubmodule_flip_dualSubmodule_of_basis {ι} [Fintype ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.flip.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  classical
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
b : Basis ι S M
⊢ dualSubmodule (flip B) (dualSubmodule B (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
letI := FiniteDimensional.of_fintype_basis b
lemma dualSubmodule_flip_dualSubmodule_of_basis {ι} [Fintype ι]
    (hB : B.Nondegenerate) (b : Basis ι S M) :
    B.flip.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  classical
  letI := FiniteDimensional.of_fintype_basis b
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
b : Basis ι S M
this : FiniteDimensional S M := FiniteDimensional.of_fintype_basis b
⊢ dualSubmodule (flip B) (dualSubmodule B (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
rw [dualSubmodule_span_of_basis B hB, dualSubmodule_span_of_basis _ hB.flip,
    dualBasis_flip_dualBasis B hB]
lemma dualSubmodule_dualSubmodule_of_basis
    {ι} [Fintype ι] (hB : B.Nondegenerate) (hB' : B.IsSymm) (b : Basis ι S M) :
    B.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
hB' : IsSymm B
b : Basis ι S M
⊢ dualSubmodule B (dualSubmodule B (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
classical
  letI := FiniteDimensional.of_fintype_basis b
  rw [dualSubmodule_span_of_basis B hB, dualSubmodule_span_of_basis B hB,
    dualBasis_dualBasis B hB hB']
lemma dualSubmodule_dualSubmodule_of_basis
    {ι} [Fintype ι] (hB : B.Nondegenerate) (hB' : B.IsSymm) (b : Basis ι S M) :
    B.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  classical
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
hB' : IsSymm B
b : Basis ι S M
⊢ dualSubmodule B (dualSubmodule B (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
letI := FiniteDimensional.of_fintype_basis b
lemma dualSubmodule_dualSubmodule_of_basis
    {ι} [Fintype ι] (hB : B.Nondegenerate) (hB' : B.IsSymm) (b : Basis ι S M) :
    B.dualSubmodule (B.dualSubmodule (Submodule.span R (Set.range b))) =
      Submodule.span R (Set.range b) := by
  classical
  letI := FiniteDimensional.of_fintype_basis b
  

Proof state:
R : Type u_4
S : Type u_3
M : Type u_2
inst✝⁷ : CommRing R
inst✝⁶ : Field S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module R M
inst✝² : Module S M
inst✝¹ : IsScalarTower R S M
B : BilinForm S M
ι : Type u_1
inst✝ : Fintype ι
hB : Nondegenerate B
hB' : IsSymm B
b : Basis ι S M
this : FiniteDimensional S M := FiniteDimensional.of_fintype_basis b
⊢ dualSubmodule B (dualSubmodule B (Submodule.span R (Set.range ⇑b))) = Submodule.span R (Set.range ⇑b)

Next tactic:
rw [dualSubmodule_span_of_basis B hB, dualSubmodule_span_of_basis B hB,
    dualBasis_dualBasis B hB hB']
instance : AddCommGroup (S₁ ⟶ S₂) where
  add_assoc := fun a b c => by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.12095, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
a b c : S₁ ⟶ S₂
⊢ a + b + c = a + (b + c)

Next tactic:
ext
instance : AddCommGroup (S₁ ⟶ S₂) where
  add_assoc := fun a b c => by ext <;> 

Proof state:
case h₁
C : Type u_1
inst✝¹ : Category.{?u.12095, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
a b c : S₁ ⟶ S₂
⊢ (a + b + c).τ₁ = (a + (b + c)).τ₁

Next tactic:
apply add_assoc
instance : AddCommGroup (S₁ ⟶ S₂) where
  add_assoc := fun a b c => by ext <;> 

Proof state:
case h₂
C : Type u_1
inst✝¹ : Category.{?u.12095, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
a b c : S₁ ⟶ S₂
⊢ (a + b + c).τ₂ = (a + (b + c)).τ₂

Next tactic:
apply add_assoc
instance : AddCommGroup (S₁ ⟶ S₂) where
  add_assoc := fun a b c => by ext <;> 

Proof state:
case h₃
C : Type u_1
inst✝¹ : Category.{?u.12095, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
a b c : S₁ ⟶ S₂
⊢ (a + b + c).τ₃ = (a + (b + c)).τ₃

Next tactic:
apply add_assoc
instance : AddCommGroup (S₁ ⟶ S₂) where
  add_assoc := fun a b c => by ext <;> apply add_assoc
  add_zero := fun a => by ext <;> apply add_zero
  zero_add := fun a => by 

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.12095, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
a : S₁ ⟶ S₂
⊢ 0 + a = a

Next tactic:
ext