l3lab/ntp-mathlib huggingface dataset:
/-- An orthogonal basis with respect to a left-separating bilinear form has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] R} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingLeft)
    (i : n) : ¬B.IsOrtho (v i) (v i) := by
  intro ho
  refine' v.ne_zero i (hB (v i) fun m ↦ _)
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum]
  apply Finset.sum_eq_zero
  rintro j -
  rw [map_smulₛₗ]
  suffices : B (v i) (v j) = 0
  · 

Proof state:
case intro.h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : Nontrivial R
B : M →ₛₗ[I] M →ₛₗ[I'] R
v : Basis n R M
h : IsOrthoᵢ B ⇑v
hB : SeparatingLeft B
i : n
ho : IsOrtho B (v i) (v i)
vi : n →₀ R
j : n
this : (B (v i)) (v j) = 0
⊢ I' (vi j) • (B (v i)) (v j) = 0

Next tactic:
rw [this, smul_eq_mul, mul_zero]
/-- An orthogonal basis with respect to a left-separating bilinear form has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] R} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingLeft)
    (i : n) : ¬B.IsOrtho (v i) (v i) := by
  intro ho
  refine' v.ne_zero i (hB (v i) fun m ↦ _)
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum]
  apply Finset.sum_eq_zero
  rintro j -
  rw [map_smulₛₗ]
  suffices : B (v i) (v j) = 0
  · rw [this, smul_eq_mul, mul_zero]
  

Proof state:
case this
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : Nontrivial R
B : M →ₛₗ[I] M →ₛₗ[I'] R
v : Basis n R M
h : IsOrthoᵢ B ⇑v
hB : SeparatingLeft B
i : n
ho : IsOrtho B (v i) (v i)
vi : n →₀ R
j : n
⊢ (B (v i)) (v j) = 0

Next tactic:
obtain rfl | hij := eq_or_ne i j
/-- An orthogonal basis with respect to a left-separating bilinear form has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] R} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingLeft)
    (i : n) : ¬B.IsOrtho (v i) (v i) := by
  intro ho
  refine' v.ne_zero i (hB (v i) fun m ↦ _)
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum]
  apply Finset.sum_eq_zero
  rintro j -
  rw [map_smulₛₗ]
  suffices : B (v i) (v j) = 0
  · rw [this, smul_eq_mul, mul_zero]
  obtain rfl | hij := eq_or_ne i j
  · 

Proof state:
case this.inl
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : Nontrivial R
B : M →ₛₗ[I] M →ₛₗ[I'] R
v : Basis n R M
h : IsOrthoᵢ B ⇑v
hB : SeparatingLeft B
i : n
ho : IsOrtho B (v i) (v i)
vi : n →₀ R
⊢ (B (v i)) (v i) = 0

Next tactic:
exact ho
/-- An orthogonal basis with respect to a left-separating bilinear form has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingLeft [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] R} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingLeft)
    (i : n) : ¬B.IsOrtho (v i) (v i) := by
  intro ho
  refine' v.ne_zero i (hB (v i) fun m ↦ _)
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum]
  apply Finset.sum_eq_zero
  rintro j -
  rw [map_smulₛₗ]
  suffices : B (v i) (v j) = 0
  · rw [this, smul_eq_mul, mul_zero]
  obtain rfl | hij := eq_or_ne i j
  · exact ho
  · 

Proof state:
case this.inr
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : Nontrivial R
B : M →ₛₗ[I] M →ₛₗ[I'] R
v : Basis n R M
h : IsOrthoᵢ B ⇑v
hB : SeparatingLeft B
i : n
ho : IsOrtho B (v i) (v i)
vi : n →₀ R
j : n
hij : i ≠ j
⊢ (B (v i)) (v j) = 0

Next tactic:
exact h hij
/-- An orthogonal basis with respect to a right-separating bilinear form has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingRight [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] R} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingRight)
    (i : n) : ¬B.IsOrtho (v i) (v i) := by
  

Proof state:
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : Nontrivial R
B : M →ₛₗ[I] M →ₛₗ[I'] R
v : Basis n R M
h : IsOrthoᵢ B ⇑v
hB : SeparatingRight B
i : n
⊢ ¬IsOrtho B (v i) (v i)

Next tactic:
rw [isOrthoᵢ_flip] at h
/-- An orthogonal basis with respect to a right-separating bilinear form has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingRight [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] R} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingRight)
    (i : n) : ¬B.IsOrtho (v i) (v i) := by
  rw [isOrthoᵢ_flip] at h
  

Proof state:
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : Nontrivial R
B : M →ₛₗ[I] M →ₛₗ[I'] R
v : Basis n R M
h : IsOrthoᵢ (flip B) ⇑v
hB : SeparatingRight B
i : n
⊢ ¬IsOrtho B (v i) (v i)

Next tactic:
rw [isOrtho_flip]
/-- An orthogonal basis with respect to a right-separating bilinear form has no self-orthogonal
elements. -/
theorem IsOrthoᵢ.not_isOrtho_basis_self_of_separatingRight [Nontrivial R]
    {B : M →ₛₗ[I] M →ₛₗ[I'] R} {v : Basis n R M} (h : B.IsOrthoᵢ v) (hB : B.SeparatingRight)
    (i : n) : ¬B.IsOrtho (v i) (v i) := by
  rw [isOrthoᵢ_flip] at h
  rw [isOrtho_flip]
  

Proof state:
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : Nontrivial R
B : M →ₛₗ[I] M →ₛₗ[I'] R
v : Basis n R M
h : IsOrthoᵢ (flip B) ⇑v
hB : SeparatingRight B
i : n
⊢ ¬IsOrtho (flip B) (v i) (v i)

Next tactic:
exact h.not_isOrtho_basis_self_of_separatingLeft (flip_separatingLeft.mpr hB) i
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  

Proof state:
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
⊢ SeparatingLeft B

Next tactic:
intro m hB
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  

Proof state:
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
m : M
hB : ∀ (y : M), (B m) y = 0
⊢ m = 0

Next tactic:
obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  

Proof state:
case intro
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
hB : ∀ (y : M), (B ((LinearEquiv.symm v.repr) vi)) y = 0
⊢ (LinearEquiv.symm v.repr) vi = 0

Next tactic:
rw [LinearEquiv.map_eq_zero_iff]
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  

Proof state:
case intro
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
hB : ∀ (y : M), (B ((LinearEquiv.symm v.repr) vi)) y = 0
⊢ vi = 0

Next tactic:
ext i
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  

Proof state:
case intro.h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
hB : ∀ (y : M), (B ((LinearEquiv.symm v.repr) vi)) y = 0
i : n
⊢ vi i = 0 i

Next tactic:
rw [Finsupp.zero_apply]
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  

Proof state:
case intro.h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
hB : ∀ (y : M), (B ((LinearEquiv.symm v.repr) vi)) y = 0
i : n
⊢ vi i = 0

Next tactic:
specialize hB (v i)
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  specialize hB (v i)
  

Proof state:
case intro.h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
i : n
hB : (B ((LinearEquiv.symm v.repr) vi)) (v i) = 0
⊢ vi i = 0

Next tactic:
simp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂,
    smul_eq_mul] at hB
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  specialize hB (v i)
  simp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂,
    smul_eq_mul] at hB
  

Proof state:
case intro.h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
i : n
hB : ∑ x in vi.support, (RingHom.id R) (vi x) * (B (v x)) (v i) = 0
⊢ vi i = 0

Next tactic:
rw [Finset.sum_eq_single i] at hB
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  specialize hB (v i)
  simp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂,
    smul_eq_mul] at hB
  rw [Finset.sum_eq_single i] at hB
  · 

Proof state:
case intro.h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
i : n
hB : (RingHom.id R) (vi i) * (B (v i)) (v i) = 0
⊢ vi i = 0

Next tactic:
exact eq_zero_of_ne_zero_of_mul_right_eq_zero (h i) hB
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  specialize hB (v i)
  simp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂,
    smul_eq_mul] at hB
  rw [Finset.sum_eq_single i] at hB
  · exact eq_zero_of_ne_zero_of_mul_right_eq_zero (h i) hB
  · 

Proof state:
case intro.h.h₀
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
i : n
hB : ∑ x in vi.support, (RingHom.id R) (vi x) * (B (v x)) (v i) = 0
⊢ ∀ b ∈ vi.support, b ≠ i → (RingHom.id R) (vi b) * (B (v b)) (v i) = 0

Next tactic:
intro j _hj hij
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  specialize hB (v i)
  simp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂,
    smul_eq_mul] at hB
  rw [Finset.sum_eq_single i] at hB
  · exact eq_zero_of_ne_zero_of_mul_right_eq_zero (h i) hB
  · intro j _hj hij
    

Proof state:
case intro.h.h₀
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
i : n
hB : ∑ x in vi.support, (RingHom.id R) (vi x) * (B (v x)) (v i) = 0
j : n
_hj : j ∈ vi.support
hij : j ≠ i
⊢ (RingHom.id R) (vi j) * (B (v j)) (v i) = 0

Next tactic:
replace hij : B (v j) (v i) = 0 := hO hij
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  specialize hB (v i)
  simp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂,
    smul_eq_mul] at hB
  rw [Finset.sum_eq_single i] at hB
  · exact eq_zero_of_ne_zero_of_mul_right_eq_zero (h i) hB
  · intro j _hj hij
    replace hij : B (v j) (v i) = 0 := hO hij
    

Proof state:
case intro.h.h₀
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
i : n
hB : ∑ x in vi.support, (RingHom.id R) (vi x) * (B (v x)) (v i) = 0
j : n
_hj : j ∈ vi.support
hij : (B (v j)) (v i) = 0
⊢ (RingHom.id R) (vi j) * (B (v j)) (v i) = 0

Next tactic:
rw [hij, RingHom.id_apply, mul_zero]
/-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is left-separating
if the basis has no elements which are self-orthogonal. -/
theorem IsOrthoᵢ.separatingLeft_of_not_isOrtho_basis_self [NoZeroDivisors R] {B : M →ₗ[R] M →ₗ[R] R}
    (v : Basis n R M) (hO : B.IsOrthoᵢ v) (h : ∀ i, ¬B.IsOrtho (v i) (v i)) : B.SeparatingLeft := by
  intro m hB
  obtain ⟨vi, rfl⟩ := v.repr.symm.surjective m
  rw [LinearEquiv.map_eq_zero_iff]
  ext i
  rw [Finsupp.zero_apply]
  specialize hB (v i)
  simp_rw [Basis.repr_symm_apply, Finsupp.total_apply, Finsupp.sum, map_sum₂, map_smulₛₗ₂,
    smul_eq_mul] at hB
  rw [Finset.sum_eq_single i] at hB
  · exact eq_zero_of_ne_zero_of_mul_right_eq_zero (h i) hB
  · intro j _hj hij
    replace hij : B (v j) (v i) = 0 := hO hij
    rw [hij, RingHom.id_apply, mul_zero]
  · 

Proof state:
case intro.h.h₁
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
M : Type u_5
M₁ : Type u_6
M₂ : Type u_7
Mₗ₁ : Type u_8
Mₗ₁' : Type u_9
Mₗ₂ : Type u_10
Mₗ₂' : Type u_11
K : Type u_12
K₁ : Type u_13
K₂ : Type u_14
V : Type u_15
V₁ : Type u_16
V₂ : Type u_17
n : Type u_18
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
I I' : R →+* R
inst✝ : NoZeroDivisors R
B : M →ₗ[R] M →ₗ[R] R
v : Basis n R M
hO : IsOrthoᵢ B ⇑v
h : ∀ (i : n), ¬IsOrtho B (v i) (v i)
vi : n →₀ R
i : n
hB : ∑ x in vi.support, (RingHom.id R) (vi x) * (B (v x)) (v i) = 0
⊢ i ∉ vi.support → (RingHom.id R) (vi i) * (B (v i)) (v i) = 0

Next tactic:
intro hi