File: Mathlib/LinearAlgebra/BilinearForm/Orthogonal.lean

full_name: LinearMap.BilinForm.IsOrtho
code: /-- The proposition that two elements of a bilinear form space are orthogonal. For orthogonality
of an indexed set of elements, use `BilinForm.iIsOrtho`. -/
def IsOrtho (B : BilinForm R M) (x y : M) : Prop 
goal: Prop

full_name: LinearMap.BilinForm.isOrtho_def
code: theorem isOrtho_def {B : BilinForm R M} {x y : M} : B.IsOrtho x y ↔ B x y = 0 
goal: B.IsOrtho x y ↔ (B x) y = 0

full_name: LinearMap.BilinForm.isOrtho_zero_left
code: theorem isOrtho_zero_left (x : M) : IsOrtho B (0 : M) x 
goal: B.IsOrtho 0 x

full_name: LinearMap.BilinForm.isOrtho_zero_right
code: theorem isOrtho_zero_right (x : M) : IsOrtho B x (0 : M) 
goal: B.IsOrtho x 0

full_name: LinearMap.BilinForm.ne_zero_of_not_isOrtho_self
code: theorem ne_zero_of_not_isOrtho_self {B : BilinForm K V} (x : V) (hx₁ : ¬B.IsOrtho x x) : x ≠ 0 
goal: x ≠ 0

full_name: LinearMap.BilinForm.IsRefl.ortho_comm
code: theorem IsRefl.ortho_comm (H : B.IsRefl) {x y : M} : IsOrtho B x y ↔ IsOrtho B y x 
goal: B.IsOrtho x y ↔ B.IsOrtho y x

full_name: LinearMap.BilinForm.IsAlt.ortho_comm
code: theorem IsAlt.ortho_comm (H : B₁.IsAlt) {x y : M₁} : IsOrtho B₁ x y ↔ IsOrtho B₁ y x 
goal: B₁.IsOrtho x y ↔ B₁.IsOrtho y x

full_name: LinearMap.BilinForm.IsSymm.ortho_comm
code: theorem IsSymm.ortho_comm (H : B.IsSymm) {x y : M} : IsOrtho B x y ↔ IsOrtho B y x 
goal: B.IsOrtho x y ↔ B.IsOrtho y x

full_name: LinearMap.BilinForm.iIsOrtho
code: /-- A set of vectors `v` is orthogonal with respect to some bilinear form `B` if and only
if for all `i ≠ j`, `B (v i) (v j) = 0`. For orthogonality between two elements, use
`BilinForm.IsOrtho` -/
def iIsOrtho {n : Type w} (B : BilinForm R M) (v : n → M) : Prop 
goal: Prop

full_name: LinearMap.BilinForm.iIsOrtho_def
code: theorem iIsOrtho_def {n : Type w} {B : BilinForm R M} {v : n → M} :
    B.iIsOrtho v ↔ ∀ i j : n, i ≠ j → B (v i) (v j) = 0 
goal: B.iIsOrtho v ↔ ∀ (i j : n), i ≠ j → (B (v i)) (v j) = 0

full_name: LinearMap.BilinForm.isOrtho_smul_left
code: @[simp]
theorem isOrtho_smul_left {x y : M₄} {a : R₄} (ha : a ≠ 0) :
    IsOrtho G (a • x) y ↔ IsOrtho G x y 
goal: G.IsOrtho (a • x) y ↔ G.IsOrtho x y

full_name: LinearMap.BilinForm.isOrtho_smul_right
code: @[simp]
theorem isOrtho_smul_right {x y : M₄} {a : R₄} (ha : a ≠ 0) :
    IsOrtho G x (a • y) ↔ IsOrtho G x y 
goal: G.IsOrtho x (a • y) ↔ G.IsOrtho x y

full_name: LinearMap.BilinForm.linearIndependent_of_iIsOrtho
code: /-- A set of orthogonal vectors `v` with respect to some bilinear form `B` is linearly independent
  if for all `i`, `B (v i) (v i) ≠ 0`. -/
theorem linearIndependent_of_iIsOrtho {n : Type w} {B : BilinForm K V} {v : n → V}
    (hv₁ : B.iIsOrtho v) (hv₂ : ∀ i, ¬B.IsOrtho (v i) (v i)) : LinearIndependent K v 
goal: LinearIndependent K v

full_name: LinearMap.BilinForm.orthogonal
code: /-- 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 orthogonal (B : BilinForm R M) (N : Submodule R M) : Submodule R M 
goal: Submodule R M

full_name: LinearMap.BilinForm.mem_orthogonal_iff
code: @[simp]
theorem mem_orthogonal_iff {N : Submodule R M} {m : M} :
    m ∈ B.orthogonal N ↔ ∀ n ∈ N, IsOrtho B n m 
goal: m ∈ B.orthogonal N ↔ ∀ n ∈ N, B.IsOrtho n m

full_name: LinearMap.BilinForm.orthogonal_bot
code: @[simp] lemma orthogonal_bot : B.orthogonal ⊥ = ⊤ 
goal: B.orthogonal ⊥ = ⊤

full_name: LinearMap.BilinForm.orthogonal_le
code: theorem orthogonal_le (h : N ≤ L) : B.orthogonal L ≤ B.orthogonal N 
goal: B.orthogonal L ≤ B.orthogonal N

full_name: LinearMap.BilinForm.le_orthogonal_orthogonal
code: theorem le_orthogonal_orthogonal (b : B.IsRefl) : N ≤ B.orthogonal (B.orthogonal N) 
goal: N ≤ B.orthogonal (B.orthogonal N)

full_name: LinearMap.BilinForm.orthogonal_top
code: lemma orthogonal_top (hB : B.Nondegenerate) (hB₀ : B.IsRefl) :
    B.orthogonal ⊤ = ⊥ 
goal: B.orthogonal ⊤ = ⊥

full_name: LinearMap.BilinForm.span_singleton_inf_orthogonal_eq_bot
code: theorem span_singleton_inf_orthogonal_eq_bot {B : BilinForm K V} {x : V} (hx : ¬B.IsOrtho x x) :
    (K ∙ x) ⊓ B.orthogonal (K ∙ x) = ⊥ 
goal: Submodule.span K {x} ⊓ B.orthogonal (Submodule.span K {x}) = ⊥

full_name: LinearMap.BilinForm.orthogonal_span_singleton_eq_toLin_ker
code: theorem orthogonal_span_singleton_eq_toLin_ker {B : BilinForm K V} (x : V) :
    B.orthogonal (K ∙ x) = LinearMap.ker (LinearMap.BilinForm.toLinHomAux₁ B x) 
goal: B.orthogonal (Submodule.span K {x}) = LinearMap.ker (B.toLinHomAux₁ x)

full_name: LinearMap.BilinForm.span_singleton_sup_orthogonal_eq_top
code: theorem span_singleton_sup_orthogonal_eq_top {B : BilinForm K V} {x : V} (hx : ¬B.IsOrtho x x) :
    (K ∙ x) ⊔ B.orthogonal (K ∙ x) = ⊤ 
goal: Submodule.span K {x} ⊔ B.orthogonal (Submodule.span K {x}) = ⊤

full_name: LinearMap.BilinForm.isCompl_span_singleton_orthogonal
code: /-- Given a bilinear form `B` and some `x` such that `B x x ≠ 0`, the span of the singleton of `x`
  is complement to its orthogonal complement. -/
theorem isCompl_span_singleton_orthogonal {B : BilinForm K V} {x : V} (hx : ¬B.IsOrtho x x) :
    IsCompl (K ∙ x) (B.orthogonal <| K ∙ x) 
goal: IsCompl (Submodule.span K {x}) (B.orthogonal (Submodule.span K {x}))

full_name: LinearMap.BilinForm.nondegenerate_restrict_of_disjoint_orthogonal
code: /-- The restriction of a reflexive bilinear form `B` onto a submodule `W` is
nondegenerate if `Disjoint W (B.orthogonal W)`. -/
theorem nondegenerate_restrict_of_disjoint_orthogonal (B : BilinForm R₁ M₁) (b : B.IsRefl)
    {W : Submodule R₁ M₁} (hW : Disjoint W (B.orthogonal W)) : (B.restrict W).Nondegenerate 
goal: (B.restrict W).Nondegenerate

full_name: LinearMap.BilinForm.iIsOrtho.not_isOrtho_basis_self_of_nondegenerate
code: /-- An orthogonal basis with respect to a nondegenerate bilinear form has no self-orthogonal
elements. -/
theorem iIsOrtho.not_isOrtho_basis_self_of_nondegenerate {n : Type w} [Nontrivial R]
    {B : BilinForm R M} {v : Basis n R M} (h : B.iIsOrtho v) (hB : B.Nondegenerate) (i : n) :
    ¬B.IsOrtho (v i) (v i) 
goal: ¬B.IsOrtho (v i) (v i)

full_name: LinearMap.BilinForm.iIsOrtho.nondegenerate_iff_not_isOrtho_basis_self
code: /-- Given an orthogonal basis with respect to a bilinear form, the bilinear form is nondegenerate
iff the basis has no elements which are self-orthogonal. -/
theorem iIsOrtho.nondegenerate_iff_not_isOrtho_basis_self {n : Type w} [Nontrivial R]
    [NoZeroDivisors R] (B : BilinForm R M) (v : Basis n R M) (hO : B.iIsOrtho v) :
    B.Nondegenerate ↔ ∀ i, ¬B.IsOrtho (v i) (v i) 
goal: B.Nondegenerate ↔ ∀ (i : n), ¬B.IsOrtho (v i) (v i)

full_name: LinearMap.BilinForm.toLin_restrict_ker_eq_inf_orthogonal
code: theorem toLin_restrict_ker_eq_inf_orthogonal (B : BilinForm K V) (W : Subspace K V) (b : B.IsRefl) :
    (B.domRestrict W).ker.map W.subtype = (W ⊓ B.orthogonal ⊤ : Subspace K V) 
goal: Submodule.map (Submodule.subtype W) (LinearMap.ker (LinearMap.domRestrict B W)) = W ⊓ B.orthogonal ⊤

full_name: LinearMap.BilinForm.toLin_restrict_range_dualCoannihilator_eq_orthogonal
code: theorem toLin_restrict_range_dualCoannihilator_eq_orthogonal (B : BilinForm K V)
    (W : Subspace K V) : (B.domRestrict W).range.dualCoannihilator = B.orthogonal W 
goal: (LinearMap.range (LinearMap.domRestrict B W)).dualCoannihilator = B.orthogonal W

full_name: LinearMap.BilinForm.ker_restrict_eq_of_codisjoint
code: lemma ker_restrict_eq_of_codisjoint {p q : Submodule R M} (hpq : Codisjoint p q)
    {B : LinearMap.BilinForm R M} (hB : ∀ x ∈ p, ∀ y ∈ q, B x y = 0) :
    LinearMap.ker (B.restrict p) = (LinearMap.ker B).comap p.subtype 
goal: LinearMap.ker (B.restrict p) = Submodule.comap p.subtype (LinearMap.ker B)

full_name: LinearMap.BilinForm.finrank_add_finrank_orthogonal
code: theorem finrank_add_finrank_orthogonal (b₁ : B.IsRefl) (W : Submodule K V) :
    finrank K W + finrank K (B.orthogonal W) =
      finrank K V + finrank K (W ⊓ B.orthogonal ⊤ : Subspace K V) 
goal: FiniteDimensional.finrank K ↥W + FiniteDimensional.finrank K ↥(B.orthogonal W) =
  FiniteDimensional.finrank K V + FiniteDimensional.finrank K ↥(W ⊓ B.orthogonal ⊤)

full_name: LinearMap.BilinForm.finrank_orthogonal
code: lemma finrank_orthogonal (hB : B.Nondegenerate) (hB₀ : B.IsRefl) (W : Submodule K V) :
    finrank K (B.orthogonal W) = finrank K V - finrank K W 
goal: FiniteDimensional.finrank K ↥(B.orthogonal W) = FiniteDimensional.finrank K V - FiniteDimensional.finrank K ↥W

full_name: LinearMap.BilinForm.orthogonal_orthogonal
code: lemma orthogonal_orthogonal (hB : B.Nondegenerate) (hB₀ : B.IsRefl) (W : Submodule K V) :
    B.orthogonal (B.orthogonal W) = W 
goal: B.orthogonal (B.orthogonal W) = W

full_name: LinearMap.BilinForm.isCompl_orthogonal_iff_disjoint
code: lemma isCompl_orthogonal_iff_disjoint (hB₀ : B.IsRefl) :
    IsCompl W (B.orthogonal W) ↔ Disjoint W (B.orthogonal W) 
goal: IsCompl W (B.orthogonal W) ↔ Disjoint W (B.orthogonal W)

full_name: LinearMap.BilinForm.isCompl_orthogonal_of_restrict_nondegenerate
code: /-- A subspace is complement to its orthogonal complement with respect to some
reflexive bilinear form if that bilinear form restricted on to the subspace is nondegenerate. -/
theorem isCompl_orthogonal_of_restrict_nondegenerate
    (b₁ : B.IsRefl) (b₂ : (B.restrict W).Nondegenerate) : IsCompl W (B.orthogonal W) 
goal: IsCompl W (B.orthogonal W)

full_name: LinearMap.BilinForm.restrict_nondegenerate_iff_isCompl_orthogonal
code: /-- A subspace is complement to its orthogonal complement with respect to some reflexive bilinear
form if and only if that bilinear form restricted on to the subspace is nondegenerate. -/
theorem restrict_nondegenerate_iff_isCompl_orthogonal
    (b₁ : B.IsRefl) : (B.restrict W).Nondegenerate ↔ IsCompl W (B.orthogonal W) 
goal: (B.restrict W).Nondegenerate ↔ IsCompl W (B.orthogonal W)

full_name: LinearMap.BilinForm.orthogonal_eq_top_iff
code: lemma orthogonal_eq_top_iff (b₁ : B.IsRefl) (b₂ : (B.restrict W).Nondegenerate) :
    B.orthogonal W = ⊤ ↔ W = ⊥ 
goal: B.orthogonal W = ⊤ ↔ W = ⊥

full_name: LinearMap.BilinForm.eq_top_of_restrict_nondegenerate_of_orthogonal_eq_bot
code: lemma eq_top_of_restrict_nondegenerate_of_orthogonal_eq_bot
    (b₁ : B.IsRefl) (b₂ : (B.restrict W).Nondegenerate) (b₃ : B.orthogonal W = ⊥) :
    W = ⊤ 
goal: W = ⊤

full_name: LinearMap.BilinForm.orthogonal_eq_bot_iff
code: lemma orthogonal_eq_bot_iff
    (b₁ : B.IsRefl) (b₂ : (B.restrict W).Nondegenerate) (b₃ : B.Nondegenerate) :
    B.orthogonal W = ⊥ ↔ W = ⊤ 
goal: B.orthogonal W = ⊥ ↔ W = ⊤

full_name: LinearMap.BilinForm.inf_orthogonal_self_le_ker_restrict
code: lemma inf_orthogonal_self_le_ker_restrict (b₁ : B.IsRefl) :
    W ⊓ B.orthogonal W ≤ (LinearMap.ker <| B.restrict W).map W.subtype 
goal: W ⊓ B.orthogonal W ≤ Submodule.map W.subtype (LinearMap.ker (B.restrict W))

full_name: LinearMap.BilinForm.restrict_nondegenerate_orthogonal_spanSingleton
code: /-- The restriction of a reflexive, non-degenerate bilinear form on the orthogonal complement of
the span of a singleton is also non-degenerate. -/
theorem restrict_nondegenerate_orthogonal_spanSingleton (B : BilinForm K V) (b₁ : B.Nondegenerate)
    (b₂ : B.IsRefl) {x : V} (hx : ¬B.IsOrtho x x) :
    Nondegenerate <| B.restrict <| B.orthogonal (K ∙ x) 
goal: (B.restrict (B.orthogonal (Submodule.span K {x}))).Nondegenerate