l3lab/ntp-mathlib huggingface dataset:
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := 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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
⊢ IsAlt B ↔ B = -flip B

Next tactic:
constructor
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> 

Proof state:
case mp
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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
⊢ IsAlt B → B = -flip B

Next tactic:
intro h
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> 

Proof state:
case mpr
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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
⊢ B = -flip B → IsAlt B

Next tactic:
intro h
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> intro h
  · 

Proof state:
case mp
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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
h : IsAlt B
⊢ B = -flip B

Next tactic:
ext
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> intro h
  · ext
    

Proof state:
case mp.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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
h : IsAlt B
x✝¹ x✝ : M₁
⊢ (B x✝¹) x✝ = ((-flip B) x✝¹) x✝

Next tactic:
simp_rw [neg_apply, flip_apply]
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> intro h
  · ext
    simp_rw [neg_apply, flip_apply]
    

Proof state:
case mp.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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
h : IsAlt B
x✝¹ x✝ : M₁
⊢ (B x✝¹) x✝ = -(B x✝) x✝¹

Next tactic:
exact (h.neg _ _).symm
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> intro h
  · ext
    simp_rw [neg_apply, flip_apply]
    exact (h.neg _ _).symm
  

Proof state:
case mpr
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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
h : B = -flip B
⊢ IsAlt B

Next tactic:
intro x
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> intro h
  · ext
    simp_rw [neg_apply, flip_apply]
    exact (h.neg _ _).symm
  intro x
  

Proof state:
case mpr
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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
h : B = -flip B
x : M₁
⊢ (B x) x = 0

Next tactic:
let h' := congr_fun₂ h x x
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> intro h
  · ext
    simp_rw [neg_apply, flip_apply]
    exact (h.neg _ _).symm
  intro x
  let h' := congr_fun₂ h x x
  

Proof state:
case mpr
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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
h : B = -flip B
x : M₁
h' : (B x) x = ((-flip B) x) x := congr_fun₂ h x x
⊢ (B x) x = 0

Next tactic:
simp only [neg_apply, flip_apply, ← add_eq_zero_iff_eq_neg] at h'
theorem isAlt_iff_eq_neg_flip [NoZeroDivisors R] [CharZero R] {B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R} :
    B.IsAlt ↔ B = -B.flip := by
  constructor <;> intro h
  · ext
    simp_rw [neg_apply, flip_apply]
    exact (h.neg _ _).symm
  intro x
  let h' := congr_fun₂ h x x
  simp only [neg_apply, flip_apply, ← add_eq_zero_iff_eq_neg] at h'
  

Proof state:
case mpr
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✝⁴ : CommSemiring R₁
inst✝³ : AddCommMonoid M₁
inst✝² : Module R₁ M₁
I₁ I₂ I : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
B : M₁ →ₛₗ[I] M₁ →ₛₗ[I] R
h : B = -flip B
x : M₁
h' : (B x) x + (B x) x = 0
⊢ (B x) x = 0

Next tactic:
exact add_self_eq_zero.mp h'
/-- The orthogonal complement of a submodule `N` with respect to some bilinear form is the set of
elements `x` which are orthogonal to all elements of `N`; i.e., for all `y` in `N`, `B x y = 0`.

Note that for general (neither symmetric nor antisymmetric) bilinear forms this definition has a
chirality; in addition to this "left" orthogonal complement one could define a "right" orthogonal
complement for which, for all `y` in `N`, `B y x = 0`.  This variant definition is not currently
provided in mathlib. -/
def orthogonalBilin (N : Submodule R₁ M₁) (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R) : Submodule R₁ M₁
    where
  carrier := { m | ∀ n ∈ N, B.IsOrtho n m }
  zero_mem' x _ := B.isOrtho_zero_right x
  add_mem' hx hy n hn := 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✝² : CommRing R₁
inst✝¹ : AddCommGroup M₁
inst✝ : Module R₁ M₁
I₁ I₂ : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
N : Submodule R₁ M₁
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
a✝ b✝ : M₁
hx : a✝ ∈ {m | ∀ n ∈ N, LinearMap.IsOrtho B n m}
hy : b✝ ∈ {m | ∀ n ∈ N, LinearMap.IsOrtho B n m}
n : M₁
hn : n ∈ N
⊢ LinearMap.IsOrtho B n (a✝ + b✝)

Next tactic:
rw [LinearMap.IsOrtho, map_add, show B n _ = 0 from hx n hn, show B n _ = 0 from hy n hn,
      zero_add]
/-- The orthogonal complement of a submodule `N` with respect to some bilinear form is the set of
elements `x` which are orthogonal to all elements of `N`; i.e., for all `y` in `N`, `B x y = 0`.

Note that for general (neither symmetric nor antisymmetric) bilinear forms this definition has a
chirality; in addition to this "left" orthogonal complement one could define a "right" orthogonal
complement for which, for all `y` in `N`, `B y x = 0`.  This variant definition is not currently
provided in mathlib. -/
def orthogonalBilin (N : Submodule R₁ M₁) (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R) : Submodule R₁ M₁
    where
  carrier := { m | ∀ n ∈ N, B.IsOrtho n m }
  zero_mem' x _ := B.isOrtho_zero_right x
  add_mem' hx hy n hn := by
    rw [LinearMap.IsOrtho, map_add, show B n _ = 0 from hx n hn, show B n _ = 0 from hy n hn,
      zero_add]
  smul_mem' c x hx n hn := 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✝² : CommRing R₁
inst✝¹ : AddCommGroup M₁
inst✝ : Module R₁ M₁
I₁ I₂ : R₁ →+* R
B✝ : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
N : Submodule R₁ M₁
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₂] R
c : R₁
x : M₁
hx :
  x ∈
    {
          toAddSubsemigroup :=
            { carrier := {m | ∀ n ∈ N, LinearMap.IsOrtho B n m},
              add_mem' :=
                (_ :
                  ∀ {a b : M₁},
                    a ∈ {m | ∀ n ∈ N, LinearMap.IsOrtho B n m} →
                      b ∈ {m | ∀ n ∈ N, LinearMap.IsOrtho B n m} → ∀ n ∈ N, LinearMap.IsOrtho B n (a + b)) },
          zero_mem' := (_ : ∀ x ∈ N, LinearMap.IsOrtho B x 0) }.toAddSubsemigroup.carrier
n : M₁
hn : n ∈ N
⊢ LinearMap.IsOrtho B n (c • x)

Next tactic:
rw [LinearMap.IsOrtho, LinearMap.map_smulₛₗ, show B n x = 0 from hx n hn, smul_zero]
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := 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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
⊢ Submodule.span K₁ {x} ⊓ Submodule.orthogonalBilin (Submodule.span K₁ {x}) B = ⊥

Next tactic:
rw [← Finset.coe_singleton]
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  

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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
⊢ Submodule.span K₁ ↑{x} ⊓ Submodule.orthogonalBilin (Submodule.span K₁ ↑{x}) B = ⊥

Next tactic:
refine' eq_bot_iff.2 fun y h ↦ _
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y 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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
y : V₁
h : y ∈ Submodule.span K₁ ↑{x} ⊓ Submodule.orthogonalBilin (Submodule.span K₁ ↑{x}) B
⊢ y ∈ ⊥

Next tactic:
rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  

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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : ∑ i in {x}, μ i • i ∈ Submodule.span K₁ ↑{x} ⊓ Submodule.orthogonalBilin (Submodule.span K₁ ↑{x}) B
⊢ ∑ i in {x}, μ i • i ∈ ⊥

Next tactic:
replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁))
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  replace h := h.2 x (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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : ∑ i in {x}, μ i • i ∈ Submodule.span K₁ ↑{x} ⊓ Submodule.orthogonalBilin (Submodule.span K₁ ↑{x}) B
⊢ x ∈ Submodule.span K₁ ↑{x}

Next tactic:
simp [Submodule.mem_span]
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁))
  

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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : IsOrtho B x (∑ i in {x}, μ i • i)
⊢ ∑ i in {x}, μ i • i ∈ ⊥

Next tactic:
rw [Finset.sum_singleton] at h ⊢
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁))
  rw [Finset.sum_singleton] at h ⊢
  

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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : IsOrtho B x (μ x • x)
⊢ μ x • x ∈ ⊥

Next tactic:
suffices hμzero : μ x = 0
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁))
  rw [Finset.sum_singleton] at h ⊢
  suffices hμzero : μ x = 0
  · 

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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : IsOrtho B x (μ x • x)
hμzero : μ x = 0
⊢ μ x • x ∈ ⊥

Next tactic:
rw [hμzero, zero_smul, Submodule.mem_bot]
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁))
  rw [Finset.sum_singleton] at h ⊢
  suffices hμzero : μ x = 0
  · rw [hμzero, zero_smul, Submodule.mem_bot]
  

Proof state:
case hμzero
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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : IsOrtho B x (μ x • x)
⊢ μ x = 0

Next tactic:
rw [isOrtho_def, map_smulₛₗ, smul_eq_mul] at h
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁))
  rw [Finset.sum_singleton] at h ⊢
  suffices hμzero : μ x = 0
  · rw [hμzero, zero_smul, Submodule.mem_bot]
  rw [isOrtho_def, map_smulₛₗ, smul_eq_mul] at h
  

Proof state:
case hμzero
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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : J₁' (μ x) * (B x) x = 0
⊢ μ x = 0

Next tactic:
exact Or.elim (zero_eq_mul.mp h.symm)
      (fun y ↦ by simpa using y)
      (fun hfalse ↦ False.elim $ hx hfalse)
theorem span_singleton_inf_orthogonal_eq_bot (B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K) (x : V₁)
    (hx : ¬B.IsOrtho x x) : (K₁ ∙ x) ⊓ Submodule.orthogonalBilin (K₁ ∙ x) B = ⊥ := by
  rw [← Finset.coe_singleton]
  refine' eq_bot_iff.2 fun y h ↦ _
  rcases mem_span_finset.1 h.1 with ⟨μ, rfl⟩
  replace h := h.2 x (by simp [Submodule.mem_span] : x ∈ Submodule.span K₁ ({x} : Finset V₁))
  rw [Finset.sum_singleton] at h ⊢
  suffices hμzero : μ x = 0
  · rw [hμzero, zero_smul, Submodule.mem_bot]
  rw [isOrtho_def, map_smulₛₗ, smul_eq_mul] at h
  exact Or.elim (zero_eq_mul.mp h.symm)
      (fun y ↦ 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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V₁ →ₛₗ[J₁] V₁ →ₛₗ[J₁'] K
x : V₁
hx : ¬IsOrtho B x x
μ : V₁ → K₁
h : J₁' (μ x) * (B x) x = 0
y : J₁' (μ x) = 0
⊢ μ x = 0

Next tactic:
simpa using y
theorem orthogonal_span_singleton_eq_to_lin_ker {B : V →ₗ[K] V →ₛₗ[J] K} (x : V) :
    Submodule.orthogonalBilin (K ∙ x) B = LinearMap.ker (B x) := 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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V →ₗ[K] V →ₛₗ[J] K
x : V
⊢ Submodule.orthogonalBilin (Submodule.span K {x}) B = ker (B x)

Next tactic:
ext y
theorem orthogonal_span_singleton_eq_to_lin_ker {B : V →ₗ[K] V →ₛₗ[J] K} (x : V) :
    Submodule.orthogonalBilin (K ∙ x) B = LinearMap.ker (B x) := by
  ext y
  

Proof state:
case 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✝⁵ : Field K
inst✝⁴ : AddCommGroup V
inst✝³ : Module K V
inst✝² : Field K₁
inst✝¹ : AddCommGroup V₁
inst✝ : Module K₁ V₁
J : K →+* K
J₁ J₁' : K₁ →+* K
B : V →ₗ[K] V →ₛₗ[J] K
x y : V
⊢ y ∈ Submodule.orthogonalBilin (Submodule.span K {x}) B ↔ y ∈ ker (B x)

Next tactic:
simp_rw [Submodule.mem_orthogonalBilin_iff, LinearMap.mem_ker, Submodule.mem_span_singleton]