l3lab/ntp-mathlib huggingface dataset:
lemma OpenEmbedding.functor_isContinuous (h : OpenEmbedding f) :
    h.isOpenMap.functor.IsContinuous (Opens.grothendieckTopology X)
      (Opens.grothendieckTopology Y) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
h : OpenEmbedding ⇑f
⊢ Functor.IsContinuous (IsOpenMap.functor (_ : IsOpenMap ⇑f)) (Opens.grothendieckTopology ↑X)
    (Opens.grothendieckTopology ↑Y)

Next tactic:
apply Functor.isContinuous_of_coverPreserving
lemma OpenEmbedding.functor_isContinuous (h : OpenEmbedding f) :
    h.isOpenMap.functor.IsContinuous (Opens.grothendieckTopology X)
      (Opens.grothendieckTopology Y) := by
  apply Functor.isContinuous_of_coverPreserving
  · 

Proof state:
case hF₁
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
h : OpenEmbedding ⇑f
⊢ CompatiblePreserving (Opens.grothendieckTopology ↑Y) (IsOpenMap.functor (_ : IsOpenMap ⇑f))

Next tactic:
exact h.compatiblePreserving
lemma OpenEmbedding.functor_isContinuous (h : OpenEmbedding f) :
    h.isOpenMap.functor.IsContinuous (Opens.grothendieckTopology X)
      (Opens.grothendieckTopology Y) := by
  apply Functor.isContinuous_of_coverPreserving
  · exact h.compatiblePreserving
  · 

Proof state:
case hF₂
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
h : OpenEmbedding ⇑f
⊢ CoverPreserving (Opens.grothendieckTopology ↑X) (Opens.grothendieckTopology ↑Y) (IsOpenMap.functor (_ : IsOpenMap ⇑f))

Next tactic:
exact h.isOpenMap.coverPreserving
theorem TopCat.Presheaf.isSheaf_of_openEmbedding (h : OpenEmbedding f) (hF : F.IsSheaf) :
    IsSheaf (h.isOpenMap.functor.op ⋙ F) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : Presheaf C Y
h : OpenEmbedding ⇑f
hF : IsSheaf F
⊢ IsSheaf ((IsOpenMap.functor (_ : IsOpenMap ⇑f)).op ⋙ F)

Next tactic:
have := h.functor_isContinuous
theorem TopCat.Presheaf.isSheaf_of_openEmbedding (h : OpenEmbedding f) (hF : F.IsSheaf) :
    IsSheaf (h.isOpenMap.functor.op ⋙ F) := by
  have := h.functor_isContinuous
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : Presheaf C Y
h : OpenEmbedding ⇑f
hF : IsSheaf F
this :
  Functor.IsContinuous (IsOpenMap.functor (_ : IsOpenMap ⇑f)) (Opens.grothendieckTopology ↑X)
    (Opens.grothendieckTopology ↑Y)
⊢ IsSheaf ((IsOpenMap.functor (_ : IsOpenMap ⇑f)).op ⋙ F)

Next tactic:
exact Functor.op_comp_isSheaf _ _ _ ⟨_, hF⟩
instance : RepresentablyFlat (Opens.map f) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
⊢ RepresentablyFlat (Opens.map f)

Next tactic:
constructor
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  

Proof state:
case cofiltered
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
⊢ ∀ (X_1 : Opens ↑X), IsCofiltered (StructuredArrow X_1 (Opens.map f))

Next tactic:
intro U
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  intro U
  

Proof state:
case cofiltered
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑X
⊢ IsCofiltered (StructuredArrow U (Opens.map f))

Next tactic:
refine @IsCofiltered.mk _ _ ?_ ?_
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  intro U
  refine @IsCofiltered.mk _ _ ?_ ?_
  · 

Proof state:
case cofiltered.refine_1
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑X
⊢ IsCofilteredOrEmpty (StructuredArrow U (Opens.map f))

Next tactic:
constructor
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  intro U
  refine @IsCofiltered.mk _ _ ?_ ?_
  · constructor
    · 

Proof state:
case cofiltered.refine_1.cone_objs
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑X
⊢ ∀ (X_1 Y_1 : StructuredArrow U (Opens.map f)), ∃ W x x, True

Next tactic:
intro V W
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  intro U
  refine @IsCofiltered.mk _ _ ?_ ?_
  · constructor
    · intro V W
      

Proof state:
case cofiltered.refine_1.cone_objs
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑X
V W : StructuredArrow U (Opens.map f)
⊢ ∃ W_1 x x, True

Next tactic:
exact ⟨⟨⟨PUnit.unit⟩, V.right ⊓ W.right, homOfLE $ le_inf V.hom.le W.hom.le⟩,
        StructuredArrow.homMk (homOfLE inf_le_left),
        StructuredArrow.homMk (homOfLE inf_le_right), trivial⟩
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  intro U
  refine @IsCofiltered.mk _ _ ?_ ?_
  · constructor
    · intro V W
      exact ⟨⟨⟨PUnit.unit⟩, V.right ⊓ W.right, homOfLE $ le_inf V.hom.le W.hom.le⟩,
        StructuredArrow.homMk (homOfLE inf_le_left),
        StructuredArrow.homMk (homOfLE inf_le_right), trivial⟩
    · 

Proof state:
case cofiltered.refine_1.cone_maps
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑X
⊢ ∀ ⦃X_1 Y_1 : StructuredArrow U (Opens.map f)⦄ (f_1 g : X_1 ⟶ Y_1), ∃ W h, h ≫ f_1 = h ≫ g

Next tactic:
exact fun _ _ _ _ ↦ ⟨_, 𝟙 _, by simp [eq_iff_true_of_subsingleton]⟩
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  intro U
  refine @IsCofiltered.mk _ _ ?_ ?_
  · constructor
    · intro V W
      exact ⟨⟨⟨PUnit.unit⟩, V.right ⊓ W.right, homOfLE $ le_inf V.hom.le W.hom.le⟩,
        StructuredArrow.homMk (homOfLE inf_le_left),
        StructuredArrow.homMk (homOfLE inf_le_right), trivial⟩
    · exact fun _ _ _ _ ↦ ⟨_, 𝟙 _, by 

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑X
x✝³ x✝² : StructuredArrow U (Opens.map f)
x✝¹ x✝ : x✝³ ⟶ x✝²
⊢ 𝟙 x✝³ ≫ x✝¹ = 𝟙 x✝³ ≫ x✝

Next tactic:
simp [eq_iff_true_of_subsingleton]
instance : RepresentablyFlat (Opens.map f) := by
  constructor
  intro U
  refine @IsCofiltered.mk _ _ ?_ ?_
  · constructor
    · intro V W
      exact ⟨⟨⟨PUnit.unit⟩, V.right ⊓ W.right, homOfLE $ le_inf V.hom.le W.hom.le⟩,
        StructuredArrow.homMk (homOfLE inf_le_left),
        StructuredArrow.homMk (homOfLE inf_le_right), trivial⟩
    · exact fun _ _ _ _ ↦ ⟨_, 𝟙 _, by simp [eq_iff_true_of_subsingleton]⟩
  · 

Proof state:
case cofiltered.refine_2
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑X
⊢ Nonempty (StructuredArrow U (Opens.map f))

Next tactic:
exact ⟨StructuredArrow.mk $ show U ⟶ (Opens.map f).obj ⊤ from homOfLE le_top⟩
theorem coverPreserving_opens_map : CoverPreserving (Opens.grothendieckTopology Y)
    (Opens.grothendieckTopology X) (Opens.map f) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
⊢ CoverPreserving (Opens.grothendieckTopology ↑Y) (Opens.grothendieckTopology ↑X) (Opens.map f)

Next tactic:
constructor
theorem coverPreserving_opens_map : CoverPreserving (Opens.grothendieckTopology Y)
    (Opens.grothendieckTopology X) (Opens.map f) := by
  constructor
  

Proof state:
case cover_preserve
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
⊢ ∀ {U : Opens ↑Y} {S : Sieve U},
    S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑Y) U →
      Sieve.functorPushforward (Opens.map f) S ∈
        GrothendieckTopology.sieves (Opens.grothendieckTopology ↑X) ((Opens.map f).obj U)

Next tactic:
intro U S hS x hx
theorem coverPreserving_opens_map : CoverPreserving (Opens.grothendieckTopology Y)
    (Opens.grothendieckTopology X) (Opens.map f) := by
  constructor
  intro U S hS x hx
  

Proof state:
case cover_preserve
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑Y
S : Sieve U
hS : S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑Y) U
x : ↑X
hx : x ∈ (Opens.map f).obj U
⊢ ∃ U_1 f_1, (Sieve.functorPushforward (Opens.map f) S).arrows f_1 ∧ x ∈ U_1

Next tactic:
obtain ⟨V, i, hi, hxV⟩ := hS (f x) hx
theorem coverPreserving_opens_map : CoverPreserving (Opens.grothendieckTopology Y)
    (Opens.grothendieckTopology X) (Opens.map f) := by
  constructor
  intro U S hS x hx
  obtain ⟨V, i, hi, hxV⟩ := hS (f x) hx
  

Proof state:
case cover_preserve.intro.intro.intro
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
U : Opens ↑Y
S : Sieve U
hS : S ∈ GrothendieckTopology.sieves (Opens.grothendieckTopology ↑Y) U
x : ↑X
hx : x ∈ (Opens.map f).obj U
V : Opens ↑Y
i : V ⟶ U
hi : S.arrows i
hxV : f x ∈ V
⊢ ∃ U_1 f_1, (Sieve.functorPushforward (Opens.map f) S).arrows f_1 ∧ x ∈ U_1

Next tactic:
exact ⟨_, (Opens.map f).map i, ⟨_, _, 𝟙 _, hi, Subsingleton.elim _ _⟩, hxV⟩
instance : (Opens.map f).IsContinuous (Opens.grothendieckTopology Y)
    (Opens.grothendieckTopology X) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
⊢ Functor.IsContinuous (Opens.map f) (Opens.grothendieckTopology ↑Y) (Opens.grothendieckTopology ↑X)

Next tactic:
apply Functor.isContinuous_of_coverPreserving
instance : (Opens.map f).IsContinuous (Opens.grothendieckTopology Y)
    (Opens.grothendieckTopology X) := by
  apply Functor.isContinuous_of_coverPreserving
  · 

Proof state:
case hF₁
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
⊢ CompatiblePreserving (Opens.grothendieckTopology ↑X) (Opens.map f)

Next tactic:
exact compatiblePreserving_opens_map f
instance : (Opens.map f).IsContinuous (Opens.grothendieckTopology Y)
    (Opens.grothendieckTopology X) := by
  apply Functor.isContinuous_of_coverPreserving
  · exact compatiblePreserving_opens_map f
  · 

Proof state:
case hF₂
C : Type u
inst✝ : Category.{v, u} C
X Y : TopCat
f : X ⟶ Y
F : TopCat.Presheaf C Y
⊢ CoverPreserving (Opens.grothendieckTopology ↑Y) (Opens.grothendieckTopology ↑X) (Opens.map f)

Next tactic:
exact coverPreserving_opens_map f
/-- A variant of `isTerminalOfEmpty` that is easier to `apply`. -/
def isTerminalOfEqEmpty (F : X.Sheaf C) {U : Opens X} (h : U = ⊥) :
    Limits.IsTerminal (F.val.obj (op U)) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type u_1
B : ι → Opens ↑X
F✝ : Presheaf C X
F' : Sheaf C X
h✝ : Opens.IsBasis (Set.range B)
F : Sheaf C X
U : Opens ↑X
h : U = ⊥
⊢ Limits.IsTerminal (F.val.obj (op U))

Next tactic:
convert F.isTerminalOfEmpty
@[simp]
theorem extend_hom_app (α : (inducedFunctor B).op ⋙ F ⟶ (inducedFunctor B).op ⋙ F'.1) (i : ι) :
    (restrictHomEquivHom F F' h α).app (op (B i)) = α.app (op i) := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type u_1
B : ι → Opens ↑X
F : Presheaf C X
F' : Sheaf C X
h : Opens.IsBasis (Set.range B)
α : (inducedFunctor B).op ⋙ F ⟶ (inducedFunctor B).op ⋙ F'.val
i : ι
⊢ ((restrictHomEquivHom F F' h) α).app (op (B i)) = α.app (op i)

Next tactic:
nth_rw 2 [← (restrictHomEquivHom F F' h).left_inv α]
@[simp]
theorem extend_hom_app (α : (inducedFunctor B).op ⋙ F ⟶ (inducedFunctor B).op ⋙ F'.1) (i : ι) :
    (restrictHomEquivHom F F' h α).app (op (B i)) = α.app (op i) := by
  nth_rw 2 [← (restrictHomEquivHom F F' h).left_inv α]
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type u_1
B : ι → Opens ↑X
F : Presheaf C X
F' : Sheaf C X
h : Opens.IsBasis (Set.range B)
α : (inducedFunctor B).op ⋙ F ⟶ (inducedFunctor B).op ⋙ F'.val
i : ι
⊢ ((restrictHomEquivHom F F' h) α).app (op (B i)) =
    (Equiv.invFun (restrictHomEquivHom F F' h) (Equiv.toFun (restrictHomEquivHom F F' h) α)).app (op i)

Next tactic:
rfl
theorem hom_ext {α β : F ⟶ F'.1} (he : ∀ i, α.app (op (B i)) = β.app (op (B i))) : α = β := by
  

Proof state:
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type u_1
B : ι → Opens ↑X
F : Presheaf C X
F' : Sheaf C X
h : Opens.IsBasis (Set.range B)
α β : F ⟶ F'.val
he : ∀ (i : ι), α.app (op (B i)) = β.app (op (B i))
⊢ α = β

Next tactic:
apply (restrictHomEquivHom F F' h).symm.injective
theorem hom_ext {α β : F ⟶ F'.1} (he : ∀ i, α.app (op (B i)) = β.app (op (B i))) : α = β := by
  apply (restrictHomEquivHom F F' h).symm.injective
  

Proof state:
case a
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type u_1
B : ι → Opens ↑X
F : Presheaf C X
F' : Sheaf C X
h : Opens.IsBasis (Set.range B)
α β : F ⟶ F'.val
he : ∀ (i : ι), α.app (op (B i)) = β.app (op (B i))
⊢ (restrictHomEquivHom F F' h).symm α = (restrictHomEquivHom F F' h).symm β

Next tactic:
ext i
theorem hom_ext {α β : F ⟶ F'.1} (he : ∀ i, α.app (op (B i)) = β.app (op (B i))) : α = β := by
  apply (restrictHomEquivHom F F' h).symm.injective
  ext i
  

Proof state:
case a.w.h
C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ι : Type u_1
B : ι → Opens ↑X
F : Presheaf C X
F' : Sheaf C X
h : Opens.IsBasis (Set.range B)
α β : F ⟶ F'.val
he : ∀ (i : ι), α.app (op (B i)) = β.app (op (B i))
i : (InducedCategory (Opens ↑X) B)ᵒᵖ
⊢ ((restrictHomEquivHom F F' h).symm α).app i = ((restrictHomEquivHom F F' h).symm β).app i

Next tactic:
exact he i.unop
theorem isOrtho_zero_left (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R) (x) : IsOrtho B (0 : M₁) 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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R
x : M₂
⊢ IsOrtho B 0 x

Next tactic:
dsimp only [IsOrtho]
theorem isOrtho_zero_left (B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R) (x) : IsOrtho B (0 : M₁) x := by
  dsimp only [IsOrtho]
  

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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₂ →ₛₗ[I₂] R
x : M₂
⊢ (B 0) x = 0

Next tactic:
rw [map_zero B, zero_apply]
theorem isOrtho_flip {B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R} {x y} : B.IsOrtho x y ↔ B.flip.IsOrtho y 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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
x y : M₁
⊢ IsOrtho B x y ↔ IsOrtho (flip B) y x

Next tactic:
simp_rw [isOrtho_def, flip_apply]
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := 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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
⊢ IsOrthoᵢ B v ↔ IsOrthoᵢ (flip B) v

Next tactic:
simp_rw [isOrthoᵢ_def]
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
  simp_rw [isOrthoᵢ_def]
  

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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
⊢ (∀ (i j : n), i ≠ j → (B (v i)) (v j) = 0) ↔ ∀ (i j : n), i ≠ j → ((flip B) (v i)) (v j) = 0

Next tactic:
constructor
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
  simp_rw [isOrthoᵢ_def]
  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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
⊢ (∀ (i j : n), i ≠ j → (B (v i)) (v j) = 0) → ∀ (i j : n), i ≠ j → ((flip B) (v i)) (v j) = 0

Next tactic:
intro h i j hij
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
  simp_rw [isOrthoᵢ_def]
  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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
⊢ (∀ (i j : n), i ≠ j → ((flip B) (v i)) (v j) = 0) → ∀ (i j : n), i ≠ j → (B (v i)) (v j) = 0

Next tactic:
intro h i j hij
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
  simp_rw [isOrthoᵢ_def]
  constructor <;> intro h i j hij
  · 

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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
h : ∀ (i j : n), i ≠ j → (B (v i)) (v j) = 0
i j : n
hij : i ≠ j
⊢ ((flip B) (v i)) (v j) = 0

Next tactic:
rw [flip_apply]
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
  simp_rw [isOrthoᵢ_def]
  constructor <;> intro h i j hij
  · rw [flip_apply]
    

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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
h : ∀ (i j : n), i ≠ j → (B (v i)) (v j) = 0
i j : n
hij : i ≠ j
⊢ (B (v j)) (v i) = 0

Next tactic:
exact h j i (Ne.symm hij)
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
  simp_rw [isOrthoᵢ_def]
  constructor <;> intro h i j hij
  · rw [flip_apply]
    exact h j i (Ne.symm hij)
  

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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
h : ∀ (i j : n), i ≠ j → ((flip B) (v i)) (v j) = 0
i j : n
hij : i ≠ j
⊢ (B (v i)) (v j) = 0

Next tactic:
simp_rw [flip_apply] at h
theorem isOrthoᵢ_flip (B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R) {v : n → M₁} :
    B.IsOrthoᵢ v ↔ B.flip.IsOrthoᵢ v := by
  simp_rw [isOrthoᵢ_def]
  constructor <;> intro h i j hij
  · rw [flip_apply]
    exact h j i (Ne.symm hij)
  simp_rw [flip_apply] 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✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M₁
inst✝³ : Module R₁ M₁
inst✝² : CommSemiring R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
I₁ : R₁ →+* R
I₂ : R₂ →+* R
I₁' : R₁ →+* R
B : M₁ →ₛₗ[I₁] M₁ →ₛₗ[I₁'] R
v : n → M₁
h : ∀ (i j : n), i ≠ j → (B (v j)) (v i) = 0
i j : n
hij : i ≠ j
⊢ (B (v i)) (v j) = 0

Next tactic:
exact h j i (Ne.symm hij)
theorem ortho_smul_left {B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] K} {x y} {a : K₁} (ha : a ≠ 0) :
    IsOrtho B x y ↔ IsOrtho B (a • x) 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✝⁵ : Field K₁
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K₁ V₁
inst✝² : Field K₂
inst✝¹ : AddCommGroup V₂
inst✝ : Module K₂ V₂
I₁ : K₁ →+* K
I₂ : K₂ →+* K
I₁' : K₁ →+* K
J₁ J₂ : K →+* K
B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] K
x : V₁
y : V₂
a : K₁
ha : a ≠ 0
⊢ IsOrtho B x y ↔ IsOrtho B (a • x) y

Next tactic:
dsimp only [IsOrtho]
theorem ortho_smul_left {B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] K} {x y} {a : K₁} (ha : a ≠ 0) :
    IsOrtho B x y ↔ IsOrtho B (a • x) y := by
  dsimp only [IsOrtho]
  

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✝⁵ : Field K₁
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K₁ V₁
inst✝² : Field K₂
inst✝¹ : AddCommGroup V₂
inst✝ : Module K₂ V₂
I₁ : K₁ →+* K
I₂ : K₂ →+* K
I₁' : K₁ →+* K
J₁ J₂ : K →+* K
B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] K
x : V₁
y : V₂
a : K₁
ha : a ≠ 0
⊢ (B x) y = 0 ↔ (B (a • x)) y = 0

Next tactic:
constructor
theorem ortho_smul_left {B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] K} {x y} {a : K₁} (ha : a ≠ 0) :
    IsOrtho B x y ↔ IsOrtho B (a • x) y := by
  dsimp only [IsOrtho]
  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✝⁶ : Field K
inst✝⁵ : Field K₁
inst✝⁴ : AddCommGroup V₁
inst✝³ : Module K₁ V₁
inst✝² : Field K₂
inst✝¹ : AddCommGroup V₂
inst✝ : Module K₂ V₂
I₁ : K₁ →+* K
I₂ : K₂ →+* K
I₁' : K₁ →+* K
J₁ J₂ : K →+* K
B : V₁ →ₛₗ[I₁] V₂ →ₛₗ[I₂] K
x : V₁
y : V₂
a : K₁
ha : a ≠ 0
⊢ (B x) y = 0 → (B (a • x)) y = 0

Next tactic:
intro H