l3lab/ntp-mathlib huggingface dataset:
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    

Proof state:
case mp
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
⊢ LinearMap.range S.f = LinearMap.ker S.g

Next tactic:
ext x
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    

Proof state:
case mp.h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x : ↑S.X₂
⊢ x ∈ LinearMap.range S.f ↔ x ∈ LinearMap.ker S.g

Next tactic:
constructor
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    constructor
    · 

Proof state:
case mp.h.mp
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x : ↑S.X₂
⊢ x ∈ LinearMap.range S.f → x ∈ LinearMap.ker S.g

Next tactic:
rintro ⟨y, hy⟩
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    constructor
    · rintro ⟨y, hy⟩
      

Proof state:
case mp.h.mp.intro
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x : ↑S.X₂
y : ↑S.X₁
hy : S.f y = x
⊢ x ∈ LinearMap.ker S.g

Next tactic:
rw [← hy]
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    constructor
    · rintro ⟨y, hy⟩
      rw [← hy]
      

Proof state:
case mp.h.mp.intro
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x : ↑S.X₂
y : ↑S.X₁
hy : S.f y = x
⊢ S.f y ∈ LinearMap.ker S.g

Next tactic:
simp only [LinearMap.mem_ker, moduleCat_zero_apply]
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    constructor
    · rintro ⟨y, hy⟩
      rw [← hy]
      simp only [LinearMap.mem_ker, moduleCat_zero_apply]
    · 

Proof state:
case mp.h.mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x : ↑S.X₂
⊢ x ∈ LinearMap.ker S.g → x ∈ LinearMap.range S.f

Next tactic:
intro hx
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    constructor
    · rintro ⟨y, hy⟩
      rw [← hy]
      simp only [LinearMap.mem_ker, moduleCat_zero_apply]
    · intro hx
      

Proof state:
case mp.h.mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.ker S.g ≤ LinearMap.range S.f
x : ↑S.X₂
hx : x ∈ LinearMap.ker S.g
⊢ x ∈ LinearMap.range S.f

Next tactic:
exact h hx
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    constructor
    · rintro ⟨y, hy⟩
      rw [← hy]
      simp only [LinearMap.mem_ker, moduleCat_zero_apply]
    · intro hx
      exact h hx
  · 

Proof state:
case mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ LinearMap.range S.f = LinearMap.ker S.g → LinearMap.ker S.g ≤ LinearMap.range S.f

Next tactic:
intro h
lemma moduleCat_exact_iff_range_eq_ker :
    S.Exact ↔ LinearMap.range S.f = LinearMap.ker S.g := by
  rw [moduleCat_exact_iff_ker_sub_range]
  constructor
  · intro h
    ext x
    constructor
    · rintro ⟨y, hy⟩
      rw [← hy]
      simp only [LinearMap.mem_ker, moduleCat_zero_apply]
    · intro hx
      exact h hx
  · intro h
    

Proof state:
case mpr
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
h : LinearMap.range S.f = LinearMap.ker S.g
⊢ LinearMap.ker S.g ≤ LinearMap.range S.f

Next tactic:
rw [h]
lemma Exact.moduleCat_range_eq_ker (hS : S.Exact) :
    LinearMap.range S.f = LinearMap.ker S.g := by
  

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
hS : Exact S
⊢ LinearMap.range S.f = LinearMap.ker S.g

Next tactic:
simpa only [moduleCat_exact_iff_range_eq_ker] using hS
/-- Constructor for short complexes in `ModuleCat.{v} R` taking as inputs
morphisms `f` and `g` and the assumption `LinearMap.range f ≤ LinearMap.ker g`. -/
@[simps]
def moduleCatMkOfKerLERange {X₁ X₂ X₃ : ModuleCat.{v} R} (f : X₁ ⟶ X₂) (g : X₂ ⟶ X₃)
    (hfg : LinearMap.range f ≤ LinearMap.ker g) : ShortComplex (ModuleCat.{v} R) :=
  ShortComplex.mk f g (by
    

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
X₁ X₂ X₃ : ModuleCat R
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
hfg : LinearMap.range f ≤ LinearMap.ker g
⊢ f ≫ g = 0

Next tactic:
ext
/-- Constructor for short complexes in `ModuleCat.{v} R` taking as inputs
morphisms `f` and `g` and the assumption `LinearMap.range f ≤ LinearMap.ker g`. -/
@[simps]
def moduleCatMkOfKerLERange {X₁ X₂ X₃ : ModuleCat.{v} R} (f : X₁ ⟶ X₂) (g : X₂ ⟶ X₃)
    (hfg : LinearMap.range f ≤ LinearMap.ker g) : ShortComplex (ModuleCat.{v} R) :=
  ShortComplex.mk f g (by
    ext
    

Proof state:
case h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
X₁ X₂ X₃ : ModuleCat R
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
hfg : LinearMap.range f ≤ LinearMap.ker g
x✝ : ↑X₁
⊢ (f ≫ g) x✝ = 0 x✝

Next tactic:
exact hfg ⟨_, rfl⟩
lemma Exact.moduleCat_of_range_eq_ker {X₁ X₂ X₃ : ModuleCat.{v} R}
    (f : X₁ ⟶ X₂) (g : X₂ ⟶ X₃) (hfg : LinearMap.range f = LinearMap.ker g) :
    (moduleCatMkOfKerLERange f g (by 

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
X₁ X₂ X₃ : ModuleCat R
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
hfg : LinearMap.range f = LinearMap.ker g
⊢ LinearMap.range f ≤ LinearMap.ker g

Next tactic:
rw [hfg]
lemma Exact.moduleCat_of_range_eq_ker {X₁ X₂ X₃ : ModuleCat.{v} R}
    (f : X₁ ⟶ X₂) (g : X₂ ⟶ X₃) (hfg : LinearMap.range f = LinearMap.ker g) :
    (moduleCatMkOfKerLERange f g (by rw [hfg])).Exact := by
  

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
X₁ X₂ X₃ : ModuleCat R
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
hfg : LinearMap.range f = LinearMap.ker g
⊢ Exact (moduleCatMkOfKerLERange f g (_ : LinearMap.range f ≤ LinearMap.ker g))

Next tactic:
simpa only [moduleCat_exact_iff_range_eq_ker] using hfg
/-- The canonical linear map `S.X₁ →ₗ[R] LinearMap.ker S.g` induced by `S.f`. -/
@[simps]
def moduleCatToCycles : S.X₁ →ₗ[R] LinearMap.ker S.g where
  toFun x := ⟨S.f x, S.moduleCat_zero_apply x⟩
  map_add' x y := by 

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
x y : ↑S.X₁
⊢ (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) (x + y) =
    (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) x +
      (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) y

Next tactic:
aesop
/-- The canonical linear map `S.X₁ →ₗ[R] LinearMap.ker S.g` induced by `S.f`. -/
@[simps]
def moduleCatToCycles : S.X₁ →ₗ[R] LinearMap.ker S.g where
  toFun x := ⟨S.f x, S.moduleCat_zero_apply x⟩
  map_add' x y := by aesop
  map_smul' a x := by 

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
a : R
x : ↑S.X₁
⊢ AddHom.toFun
      { toFun := fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) },
        map_add' :=
          (_ :
            ∀ (x y : ↑S.X₁),
              (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) (x + y) =
                (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) x +
                  (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) y) }
      (a • x) =
    (RingHom.id R) a •
      AddHom.toFun
        { toFun := fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) },
          map_add' :=
            (_ :
              ∀ (x y : ↑S.X₁),
                (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) (x + y) =
                  (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) x +
                    (fun x => { val := S.f x, property := (_ : S.g (S.f x) = 0) }) y) }
        x

Next tactic:
aesop
/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData where
  K := ModuleCat.of R (LinearMap.ker S.g)
  H := ModuleCat.of R (LinearMap.ker S.g ⧸ LinearMap.range S.moduleCatToCycles)
  i := (LinearMap.ker S.g).subtype
  π := (LinearMap.range S.moduleCatToCycles).mkQ
  wi := by
    

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ Submodule.subtype (LinearMap.ker S.g) ≫ S.g = 0

Next tactic:
ext ⟨_, hx⟩
/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData where
  K := ModuleCat.of R (LinearMap.ker S.g)
  H := ModuleCat.of R (LinearMap.ker S.g ⧸ LinearMap.range S.moduleCatToCycles)
  i := (LinearMap.ker S.g).subtype
  π := (LinearMap.range S.moduleCatToCycles).mkQ
  wi := by
    ext ⟨_, hx⟩
    

Proof state:
case h.mk
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
val✝ : ↑S.X₂
hx : val✝ ∈ LinearMap.ker S.g
⊢ (Submodule.subtype (LinearMap.ker S.g) ≫ S.g) { val := val✝, property := hx } = 0 { val := val✝, property := hx }

Next tactic:
exact hx
/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData where
  K := ModuleCat.of R (LinearMap.ker S.g)
  H := ModuleCat.of R (LinearMap.ker S.g ⧸ LinearMap.range S.moduleCatToCycles)
  i := (LinearMap.ker S.g).subtype
  π := (LinearMap.range S.moduleCatToCycles).mkQ
  wi := by
    ext ⟨_, hx⟩
    exact hx
  hi := ModuleCat.kernelIsLimit _
  wπ := by
    

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ IsLimit.lift (ModuleCat.kernelIsLimit S.g) (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0)) ≫
      Submodule.mkQ (LinearMap.range (moduleCatToCycles S)) =
    0

Next tactic:
ext (x : S.X₁)
/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData where
  K := ModuleCat.of R (LinearMap.ker S.g)
  H := ModuleCat.of R (LinearMap.ker S.g ⧸ LinearMap.range S.moduleCatToCycles)
  i := (LinearMap.ker S.g).subtype
  π := (LinearMap.range S.moduleCatToCycles).mkQ
  wi := by
    ext ⟨_, hx⟩
    exact hx
  hi := ModuleCat.kernelIsLimit _
  wπ := by
    ext (x : S.X₁)
    

Proof state:
case h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
x : ↑S.X₁
⊢ (IsLimit.lift (ModuleCat.kernelIsLimit S.g) (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0)) ≫
        Submodule.mkQ (LinearMap.range (moduleCatToCycles S)))
      x =
    0 x

Next tactic:
dsimp
/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData where
  K := ModuleCat.of R (LinearMap.ker S.g)
  H := ModuleCat.of R (LinearMap.ker S.g ⧸ LinearMap.range S.moduleCatToCycles)
  i := (LinearMap.ker S.g).subtype
  π := (LinearMap.range S.moduleCatToCycles).mkQ
  wi := by
    ext ⟨_, hx⟩
    exact hx
  hi := ModuleCat.kernelIsLimit _
  wπ := by
    ext (x : S.X₁)
    dsimp
    

Proof state:
case h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
x : ↑S.X₁
⊢ (Submodule.mkQ (LinearMap.range (moduleCatToCycles S)))
      ((IsLimit.lift (ModuleCat.kernelIsLimit S.g) (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0))) x) =
    0 x

Next tactic:
erw [Submodule.Quotient.mk_eq_zero]
/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData where
  K := ModuleCat.of R (LinearMap.ker S.g)
  H := ModuleCat.of R (LinearMap.ker S.g ⧸ LinearMap.range S.moduleCatToCycles)
  i := (LinearMap.ker S.g).subtype
  π := (LinearMap.range S.moduleCatToCycles).mkQ
  wi := by
    ext ⟨_, hx⟩
    exact hx
  hi := ModuleCat.kernelIsLimit _
  wπ := by
    ext (x : S.X₁)
    dsimp
    erw [Submodule.Quotient.mk_eq_zero]
    

Proof state:
case h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
x : ↑S.X₁
⊢ (IsLimit.lift (ModuleCat.kernelIsLimit S.g) (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0))) x ∈
    LinearMap.range (moduleCatToCycles S)

Next tactic:
rw [LinearMap.mem_range]
/-- The explicit left homology data of a short complex of modules that is
given by a kernel and a quotient given by the `LinearMap` API. -/
@[simps]
def moduleCatLeftHomologyData : S.LeftHomologyData where
  K := ModuleCat.of R (LinearMap.ker S.g)
  H := ModuleCat.of R (LinearMap.ker S.g ⧸ LinearMap.range S.moduleCatToCycles)
  i := (LinearMap.ker S.g).subtype
  π := (LinearMap.range S.moduleCatToCycles).mkQ
  wi := by
    ext ⟨_, hx⟩
    exact hx
  hi := ModuleCat.kernelIsLimit _
  wπ := by
    ext (x : S.X₁)
    dsimp
    erw [Submodule.Quotient.mk_eq_zero]
    rw [LinearMap.mem_range]
    

Proof state:
case h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
x : ↑S.X₁
⊢ ∃ y, (moduleCatToCycles S) y = (IsLimit.lift (ModuleCat.kernelIsLimit S.g) (KernelFork.ofι S.f (_ : S.f ≫ S.g = 0))) x

Next tactic:
apply exists_apply_eq_apply
lemma exact_iff_surjective_moduleCatToCycles :
    S.Exact ↔ Function.Surjective S.moduleCatToCycles := by
  

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ Exact S ↔ Function.Surjective ⇑(moduleCatToCycles S)

Next tactic:
rw [S.moduleCatLeftHomologyData.exact_iff_epi_f', moduleCatLeftHomologyData_f',
    ModuleCat.epi_iff_surjective]
lemma exact_iff_surjective_moduleCatToCycles :
    S.Exact ↔ Function.Surjective S.moduleCatToCycles := by
  rw [S.moduleCatLeftHomologyData.exact_iff_epi_f', moduleCatLeftHomologyData_f',
    ModuleCat.epi_iff_surjective]
  

Proof state:
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
⊢ Function.Surjective ⇑(moduleCatToCycles S) ↔ Function.Surjective ⇑(moduleCatToCycles S)

Next tactic:
rfl
instance (priority := 100) SmoothRing.toLieAddGroup (I : ModelWithCorners 𝕜 E H) (R : Type*)
    [Ring R] [TopologicalSpace R] [ChartedSpace H R] [SmoothRing I R] : LieAddGroup I R where
  compatible := StructureGroupoid.compatible (contDiffGroupoid ⊤ I)
  smooth_add := smooth_add I
  smooth_neg := by 

Proof state:
𝕜 : Type u_1
inst✝⁷ : NontriviallyNormedField 𝕜
H : Type u_2
inst✝⁶ : TopologicalSpace H
E : Type u_3
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
I : ModelWithCorners 𝕜 E H
R : Type u_4
inst✝³ : Ring R
inst✝² : TopologicalSpace R
inst✝¹ : ChartedSpace H R
inst✝ : SmoothRing I R
⊢ Smooth I I fun a => -a

Next tactic:
simpa only [neg_one_mul] using @smooth_mul_left 𝕜 _ H _ E _ _ I R _ _ _ _ (-1)
instance (priority := 100) fieldSmoothRing {𝕜 : Type*} [NontriviallyNormedField 𝕜] :
    SmoothRing 𝓘(𝕜) 𝕜 :=
  { normedSpaceLieAddGroup with
    smooth_mul := by
      

Proof state:
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
src✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup
⊢ Smooth (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) 𝓘(𝕜, 𝕜) fun p => p.1 * p.2

Next tactic:
rw [smooth_iff]
instance (priority := 100) fieldSmoothRing {𝕜 : Type*} [NontriviallyNormedField 𝕜] :
    SmoothRing 𝓘(𝕜) 𝕜 :=
  { normedSpaceLieAddGroup with
    smooth_mul := by
      rw [smooth_iff]
      

Proof state:
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
src✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup
⊢ (Continuous fun p => p.1 * p.2) ∧
    ∀ (x : 𝕜 × 𝕜) (y : 𝕜),
      ContDiffOn 𝕜 ⊤
        (↑(extChartAt 𝓘(𝕜, 𝕜) y) ∘
          (fun p => p.1 * p.2) ∘ ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)))
        ((extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x).target ∩
          ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)) ⁻¹'
            ((fun p => p.1 * p.2) ⁻¹' (extChartAt 𝓘(𝕜, 𝕜) y).source))

Next tactic:
refine' ⟨continuous_mul, fun x y => _⟩
instance (priority := 100) fieldSmoothRing {𝕜 : Type*} [NontriviallyNormedField 𝕜] :
    SmoothRing 𝓘(𝕜) 𝕜 :=
  { normedSpaceLieAddGroup with
    smooth_mul := by
      rw [smooth_iff]
      refine' ⟨continuous_mul, fun x y => _⟩
      

Proof state:
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
src✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup
x : 𝕜 × 𝕜
y : 𝕜
⊢ ContDiffOn 𝕜 ⊤
    (↑(extChartAt 𝓘(𝕜, 𝕜) y) ∘
      (fun p => p.1 * p.2) ∘ ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)))
    ((extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x).target ∩
      ↑(PartialEquiv.symm (extChartAt (ModelWithCorners.prod 𝓘(𝕜, 𝕜) 𝓘(𝕜, 𝕜)) x)) ⁻¹'
        ((fun p => p.1 * p.2) ⁻¹' (extChartAt 𝓘(𝕜, 𝕜) y).source))

Next tactic:
simp only [mfld_simps]
instance (priority := 100) fieldSmoothRing {𝕜 : Type*} [NontriviallyNormedField 𝕜] :
    SmoothRing 𝓘(𝕜) 𝕜 :=
  { normedSpaceLieAddGroup with
    smooth_mul := by
      rw [smooth_iff]
      refine' ⟨continuous_mul, fun x y => _⟩
      simp only [mfld_simps]
      

Proof state:
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
src✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup
x : 𝕜 × 𝕜
y : 𝕜
⊢ ContDiffOn 𝕜 ⊤ (fun p => p.1 * p.2) Set.univ

Next tactic:
rw [contDiffOn_univ]
instance (priority := 100) fieldSmoothRing {𝕜 : Type*} [NontriviallyNormedField 𝕜] :
    SmoothRing 𝓘(𝕜) 𝕜 :=
  { normedSpaceLieAddGroup with
    smooth_mul := by
      rw [smooth_iff]
      refine' ⟨continuous_mul, fun x y => _⟩
      simp only [mfld_simps]
      rw [contDiffOn_univ]
      

Proof state:
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
src✝ : LieAddGroup 𝓘(𝕜, 𝕜) 𝕜 := normedSpaceLieAddGroup
x : 𝕜 × 𝕜
y : 𝕜
⊢ ContDiff 𝕜 ⊤ fun p => p.1 * p.2

Next tactic:
exact contDiff_mul
theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by
  

Proof state:
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LE (α i)
a b : (i : ι) × α i
⊢ a ≤ b ↔ ∃ h, h ▸ a.snd ≤ b.snd

Next tactic:
constructor
theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by
  constructor
  · 

Proof state:
case mp
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LE (α i)
a b : (i : ι) × α i
⊢ a ≤ b → ∃ h, h ▸ a.snd ≤ b.snd

Next tactic:
rintro ⟨i, a, b, h⟩
theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    

Proof state:
case mp.fiber
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LE (α i)
i : ι
a b : α i
h : a ≤ b
⊢ ∃ h, h ▸ { fst := i, snd := a }.snd ≤ { fst := i, snd := b }.snd

Next tactic:
exact ⟨rfl, h⟩
theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · 

Proof state:
case mpr
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LE (α i)
a b : (i : ι) × α i
⊢ (∃ h, h ▸ a.snd ≤ b.snd) → a ≤ b

Next tactic:
obtain ⟨i, a⟩ := a
theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · obtain ⟨i, a⟩ := a
    

Proof state:
case mpr.mk
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LE (α i)
b : (i : ι) × α i
i : ι
a : α i
⊢ (∃ h, h ▸ { fst := i, snd := a }.snd ≤ b.snd) → { fst := i, snd := a } ≤ b

Next tactic:
obtain ⟨j, b⟩ := b
theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · obtain ⟨i, a⟩ := a
    obtain ⟨j, b⟩ := b
    

Proof state:
case mpr.mk.mk
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LE (α i)
i : ι
a : α i
j : ι
b : α j
⊢ (∃ h, h ▸ { fst := i, snd := a }.snd ≤ { fst := j, snd := b }.snd) → { fst := i, snd := a } ≤ { fst := j, snd := b }

Next tactic:
rintro ⟨rfl : i = j, h⟩
theorem le_def [∀ i, LE (α i)] {a b : Σi, α i} : a ≤ b ↔ ∃ h : a.1 = b.1, h.rec a.2 ≤ b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · obtain ⟨i, a⟩ := a
    obtain ⟨j, b⟩ := b
    rintro ⟨rfl : i = j, h⟩
    

Proof state:
case mpr.mk.mk.intro
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LE (α i)
i : ι
a b : α i
h : (_ : i = i) ▸ { fst := i, snd := a }.snd ≤ { fst := i, snd := b }.snd
⊢ { fst := i, snd := a } ≤ { fst := i, snd := b }

Next tactic:
exact le.fiber _ _ _ h
theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2 := by
  

Proof state:
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LT (α i)
a b : (i : ι) × α i
⊢ a < b ↔ ∃ h, h ▸ a.snd < b.snd

Next tactic:
constructor
theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2 := by
  constructor
  · 

Proof state:
case mp
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LT (α i)
a b : (i : ι) × α i
⊢ a < b → ∃ h, h ▸ a.snd < b.snd

Next tactic:
rintro ⟨i, a, b, h⟩
theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    

Proof state:
case mp.fiber
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LT (α i)
i : ι
a b : α i
h : a < b
⊢ ∃ h, h ▸ { fst := i, snd := a }.snd < { fst := i, snd := b }.snd

Next tactic:
exact ⟨rfl, h⟩
theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · 

Proof state:
case mpr
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LT (α i)
a b : (i : ι) × α i
⊢ (∃ h, h ▸ a.snd < b.snd) → a < b

Next tactic:
obtain ⟨i, a⟩ := a
theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · obtain ⟨i, a⟩ := a
    

Proof state:
case mpr.mk
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LT (α i)
b : (i : ι) × α i
i : ι
a : α i
⊢ (∃ h, h ▸ { fst := i, snd := a }.snd < b.snd) → { fst := i, snd := a } < b

Next tactic:
obtain ⟨j, b⟩ := b
theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · obtain ⟨i, a⟩ := a
    obtain ⟨j, b⟩ := b
    

Proof state:
case mpr.mk.mk
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LT (α i)
i : ι
a : α i
j : ι
b : α j
⊢ (∃ h, h ▸ { fst := i, snd := a }.snd < { fst := j, snd := b }.snd) → { fst := i, snd := a } < { fst := j, snd := b }

Next tactic:
rintro ⟨rfl : i = j, h⟩
theorem lt_def [∀ i, LT (α i)] {a b : Σi, α i} : a < b ↔ ∃ h : a.1 = b.1, h.rec a.2 < b.2 := by
  constructor
  · rintro ⟨i, a, b, h⟩
    exact ⟨rfl, h⟩
  · obtain ⟨i, a⟩ := a
    obtain ⟨j, b⟩ := b
    rintro ⟨rfl : i = j, h⟩
    

Proof state:
case mpr.mk.mk.intro
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → LT (α i)
i : ι
a b : α i
h : (_ : i = i) ▸ { fst := i, snd := a }.snd < { fst := i, snd := b }.snd
⊢ { fst := i, snd := a } < { fst := i, snd := b }

Next tactic:
exact lt.fiber _ _ _ h
protected instance preorder [∀ i, Preorder (α i)] : Preorder (Σi, α i) :=
  { Sigma.LE, Sigma.LT with
    le_refl := fun ⟨i, a⟩ => Sigma.le.fiber i a a le_rfl,
    le_trans := by
      

Proof state:
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → Preorder (α i)
src✝¹ : LE ((i : ι) × α i) := Sigma.LE
src✝ : LT ((i : ι) × α i) := Sigma.LT
⊢ ∀ (a b c : (i : ι) × α i), a ≤ b → b ≤ c → a ≤ c

Next tactic:
rintro _ _ _ ⟨i, a, b, hab⟩ ⟨_, _, c, hbc⟩
protected instance preorder [∀ i, Preorder (α i)] : Preorder (Σi, α i) :=
  { Sigma.LE, Sigma.LT with
    le_refl := fun ⟨i, a⟩ => Sigma.le.fiber i a a le_rfl,
    le_trans := by
      rintro _ _ _ ⟨i, a, b, hab⟩ ⟨_, _, c, hbc⟩
      

Proof state:
case fiber.fiber
ι : Type u_1
α : ι → Type u_2
inst✝ : (i : ι) → Preorder (α i)
src✝¹ : LE ((i : ι) × α i) := Sigma.LE
src✝ : LT ((i : ι) × α i) := Sigma.LT
i : ι
a b : α i
hab : a ≤ b
c : α i
hbc : b ≤ c
⊢ { fst := i, snd := a } ≤ { fst := i, snd := c }

Next tactic:
exact le.fiber i a c (hab.trans hbc)