l3lab/ntp-mathlib huggingface dataset:
/-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
When a (topological) vector bundle is smooth, then the composition of charts associated
to the vector bundle belong to this groupoid. -/
def smoothFiberwiseLinear : StructureGroupoid (B × F) where
  members :=
    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
  trans' := by
    simp only [mem_aux]
    rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
    refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
      exact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
          (U ∩ U')
      

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.refine'_2
𝕜 : Type u_1
B : Type u_2
F : Type u_3
inst✝⁷ : TopologicalSpace B
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
EB : Type u_4
inst✝³ : NormedAddCommGroup EB
inst✝² : NormedSpace 𝕜 EB
HB : Type u_5
inst✝¹ : TopologicalSpace HB
inst✝ : ChartedSpace HB B
IB : ModelWithCorners 𝕜 EB HB
e e' : PartialHomeomorph (B × F) (B × F)
φ : B → F ≃L[𝕜] F
U : Set B
hU : IsOpen U
hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U
h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U
heφ :
  PartialHomeomorph.EqOnSource e
    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)
      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))
φ' : B → F ≃L[𝕜] F
U' : Set B
hU' : IsOpen U'
hφ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ' x)) U'
h2φ' : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'
heφ' :
  PartialHomeomorph.EqOnSource e'
    (FiberwiseLinear.localHomeomorph φ' hU' (_ : ContinuousOn (fun x => ↑(φ' x)) U')
      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ' x))) U'))
⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
    (fun x => ContinuousLinearMap.comp ↑(ContinuousLinearEquiv.symm (φ x)) ↑(ContinuousLinearEquiv.symm (φ' x)))
    (U ∩ U')

Next tactic:
exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
/-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
When a (topological) vector bundle is smooth, then the composition of charts associated
to the vector bundle belong to this groupoid. -/
def smoothFiberwiseLinear : StructureGroupoid (B × F) where
  members :=
    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
  trans' := by
    simp only [mem_aux]
    rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
    refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
      exact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
          (U ∩ U')
      exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
    · apply FiberwiseLinear.source_trans_localHomeomorph
    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_localHomeomorph_apply
  -- porting note: without introducing `e` first, the first `simp only` fails
  symm' := fun e ↦ by
    

Proof state:
𝕜 : Type u_1
B : Type u_2
F : Type u_3
inst✝⁷ : TopologicalSpace B
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
EB : Type u_4
inst✝³ : NormedAddCommGroup EB
inst✝² : NormedSpace 𝕜 EB
HB : Type u_5
inst✝¹ : TopologicalSpace HB
inst✝ : ChartedSpace HB B
IB : ModelWithCorners 𝕜 EB HB
e : PartialHomeomorph (B × F) (B × F)
⊢ e ∈
      ⋃ φ,
        ⋃ U,
          ⋃ (hU : IsOpen U),
            ⋃ (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U),
              ⋃ (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),
                {e |
                  PartialHomeomorph.EqOnSource e
                    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)
                      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))} →
    PartialHomeomorph.symm e ∈
      ⋃ φ,
        ⋃ U,
          ⋃ (hU : IsOpen U),
            ⋃ (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U),
              ⋃ (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),
                {e |
                  PartialHomeomorph.EqOnSource e
                    (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)
                      (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}

Next tactic:
simp only [mem_iUnion]
/-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
When a (topological) vector bundle is smooth, then the composition of charts associated
to the vector bundle belong to this groupoid. -/
def smoothFiberwiseLinear : StructureGroupoid (B × F) where
  members :=
    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
  trans' := by
    simp only [mem_aux]
    rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
    refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
      exact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
          (U ∩ U')
      exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
    · apply FiberwiseLinear.source_trans_localHomeomorph
    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_localHomeomorph_apply
  -- porting note: without introducing `e` first, the first `simp only` fails
  symm' := fun e ↦ by
    simp only [mem_iUnion]
    

Proof state:
𝕜 : Type u_1
B : Type u_2
F : Type u_3
inst✝⁷ : TopologicalSpace B
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
EB : Type u_4
inst✝³ : NormedAddCommGroup EB
inst✝² : NormedSpace 𝕜 EB
HB : Type u_5
inst✝¹ : TopologicalSpace HB
inst✝ : ChartedSpace HB B
IB : ModelWithCorners 𝕜 EB HB
e : PartialHomeomorph (B × F) (B × F)
⊢ (∃ i i_1,
      ∃ (h : IsOpen i_1) (h_1 : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(i x)) i_1) (i_2 :
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1),
        e ∈
          {e |
            PartialHomeomorph.EqOnSource e
              (FiberwiseLinear.localHomeomorph i (_ : IsOpen i_1) (_ : ContinuousOn (fun x => ↑(i x)) i_1)
                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1))}) →
    ∃ i i_1,
      ∃ (h : IsOpen i_1) (h_1 : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(i x)) i_1) (i_2 :
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1),
        PartialHomeomorph.symm e ∈
          {e |
            PartialHomeomorph.EqOnSource e
              (FiberwiseLinear.localHomeomorph i (_ : IsOpen i_1) (_ : ContinuousOn (fun x => ↑(i x)) i_1)
                (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1))}

Next tactic:
rintro ⟨φ, U, hU, hφ, h2φ, heφ⟩
/-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
When a (topological) vector bundle is smooth, then the composition of charts associated
to the vector bundle belong to this groupoid. -/
def smoothFiberwiseLinear : StructureGroupoid (B × F) where
  members :=
    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
  trans' := by
    simp only [mem_aux]
    rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
    refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
      exact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
          (U ∩ U')
      exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
    · apply FiberwiseLinear.source_trans_localHomeomorph
    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_localHomeomorph_apply
  -- porting note: without introducing `e` first, the first `simp only` fails
  symm' := fun e ↦ by
    simp only [mem_iUnion]
    rintro ⟨φ, U, hU, hφ, h2φ, heφ⟩
    

Proof state:
case intro.intro.intro.intro.intro
𝕜 : Type u_1
B : Type u_2
F : Type u_3
inst✝⁷ : TopologicalSpace B
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
EB : Type u_4
inst✝³ : NormedAddCommGroup EB
inst✝² : NormedSpace 𝕜 EB
HB : Type u_5
inst✝¹ : TopologicalSpace HB
inst✝ : ChartedSpace HB B
IB : ModelWithCorners 𝕜 EB HB
e : PartialHomeomorph (B × F) (B × F)
φ : B → F ≃L[𝕜] F
U : Set B
hU : IsOpen U
hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U
h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U
heφ :
  e ∈
    {e |
      PartialHomeomorph.EqOnSource e
        (FiberwiseLinear.localHomeomorph φ (_ : IsOpen U) (_ : ContinuousOn (fun x => ↑(φ x)) U)
          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}
⊢ ∃ i i_1,
    ∃ (h : IsOpen i_1) (h_1 : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(i x)) i_1) (i_2 :
      SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1),
      PartialHomeomorph.symm e ∈
        {e |
          PartialHomeomorph.EqOnSource e
            (FiberwiseLinear.localHomeomorph i (_ : IsOpen i_1) (_ : ContinuousOn (fun x => ↑(i x)) i_1)
              (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (i x))) i_1))}

Next tactic:
refine' ⟨fun b => (φ b).symm, U, hU, h2φ, _, PartialHomeomorph.EqOnSource.symm' heφ⟩
/-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
When a (topological) vector bundle is smooth, then the composition of charts associated
to the vector bundle belong to this groupoid. -/
def smoothFiberwiseLinear : StructureGroupoid (B × F) where
  members :=
    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
  trans' := by
    simp only [mem_aux]
    rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
    refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
      exact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
          (U ∩ U')
      exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
    · apply FiberwiseLinear.source_trans_localHomeomorph
    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_localHomeomorph_apply
  -- porting note: without introducing `e` first, the first `simp only` fails
  symm' := fun e ↦ by
    simp only [mem_iUnion]
    rintro ⟨φ, U, hU, hφ, h2φ, heφ⟩
    refine' ⟨fun b => (φ b).symm, U, hU, h2φ, _, PartialHomeomorph.EqOnSource.symm' heφ⟩
    

Proof state:
case intro.intro.intro.intro.intro
𝕜 : Type u_1
B : Type u_2
F : Type u_3
inst✝⁷ : TopologicalSpace B
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
EB : Type u_4
inst✝³ : NormedAddCommGroup EB
inst✝² : NormedSpace 𝕜 EB
HB : Type u_5
inst✝¹ : TopologicalSpace HB
inst✝ : ChartedSpace HB B
IB : ModelWithCorners 𝕜 EB HB
e : PartialHomeomorph (B × F) (B × F)
φ : B → F ≃L[𝕜] F
U : Set B
hU : IsOpen U
hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U
h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U
heφ :
  e ∈
    {e |
      PartialHomeomorph.EqOnSource e
        (FiberwiseLinear.localHomeomorph φ (_ : IsOpen U) (_ : ContinuousOn (fun x => ↑(φ x)) U)
          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}
⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm ((fun b => ContinuousLinearEquiv.symm (φ b)) x))) U

Next tactic:
simp_rw [ContinuousLinearEquiv.symm_symm]
/-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
When a (topological) vector bundle is smooth, then the composition of charts associated
to the vector bundle belong to this groupoid. -/
def smoothFiberwiseLinear : StructureGroupoid (B × F) where
  members :=
    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
  trans' := by
    simp only [mem_aux]
    rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
    refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
      exact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
          (U ∩ U')
      exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
    · apply FiberwiseLinear.source_trans_localHomeomorph
    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_localHomeomorph_apply
  -- porting note: without introducing `e` first, the first `simp only` fails
  symm' := fun e ↦ by
    simp only [mem_iUnion]
    rintro ⟨φ, U, hU, hφ, h2φ, heφ⟩
    refine' ⟨fun b => (φ b).symm, U, hU, h2φ, _, PartialHomeomorph.EqOnSource.symm' heφ⟩
    simp_rw [ContinuousLinearEquiv.symm_symm]
    

Proof state:
case intro.intro.intro.intro.intro
𝕜 : Type u_1
B : Type u_2
F : Type u_3
inst✝⁷ : TopologicalSpace B
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
EB : Type u_4
inst✝³ : NormedAddCommGroup EB
inst✝² : NormedSpace 𝕜 EB
HB : Type u_5
inst✝¹ : TopologicalSpace HB
inst✝ : ChartedSpace HB B
IB : ModelWithCorners 𝕜 EB HB
e : PartialHomeomorph (B × F) (B × F)
φ : B → F ≃L[𝕜] F
U : Set B
hU : IsOpen U
hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U
h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U
heφ :
  e ∈
    {e |
      PartialHomeomorph.EqOnSource e
        (FiberwiseLinear.localHomeomorph φ (_ : IsOpen U) (_ : ContinuousOn (fun x => ↑(φ x)) U)
          (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}
⊢ SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U

Next tactic:
exact hφ
/-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local
homeomorphisms which are bi-smooth and fiberwise linear, and induce the identity on `B`.
When a (topological) vector bundle is smooth, then the composition of charts associated
to the vector bundle belong to this groupoid. -/
def smoothFiberwiseLinear : StructureGroupoid (B × F) where
  members :=
    ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U)
      (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U)
      (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U),
        {e | e.EqOnSource (FiberwiseLinear.localHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)}
  trans' := by
    simp only [mem_aux]
    rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩
    refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _,
      Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ' x).toContinuousLinearMap ∘L (φ x).toContinuousLinearMap) (U ∩ U')
      exact (hφ'.mono <| inter_subset_right _ _).clm_comp (hφ.mono <| inter_subset_left _ _)
    · show
        SmoothOn IB 𝓘(𝕜, F →L[𝕜] F)
          (fun x : B => (φ x).symm.toContinuousLinearMap ∘L (φ' x).symm.toContinuousLinearMap)
          (U ∩ U')
      exact (h2φ.mono <| inter_subset_left _ _).clm_comp (h2φ'.mono <| inter_subset_right _ _)
    · apply FiberwiseLinear.source_trans_localHomeomorph
    · rintro ⟨b, v⟩ -; apply FiberwiseLinear.trans_localHomeomorph_apply
  -- porting note: without introducing `e` first, the first `simp only` fails
  symm' := fun e ↦ by
    simp only [mem_iUnion]
    rintro ⟨φ, U, hU, hφ, h2φ, heφ⟩
    refine' ⟨fun b => (φ b).symm, U, hU, h2φ, _, PartialHomeomorph.EqOnSource.symm' heφ⟩
    simp_rw [ContinuousLinearEquiv.symm_symm]
    exact hφ
  id_mem' := by
    /- porting note: `simp_rw [mem_iUnion]` failed; expanding. Was:
    simp_rw [mem_iUnion]
    refine' ⟨fun b => ContinuousLinearEquiv.refl 𝕜 F, univ, isOpen_univ, _, _, ⟨_, fun b hb => _⟩⟩
    -/
    

Proof state:
𝕜 : Type u_1
B : Type u_2
F : Type u_3
inst✝⁷ : TopologicalSpace B
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
EB : Type u_4
inst✝³ : NormedAddCommGroup EB
inst✝² : NormedSpace 𝕜 EB
HB : Type u_5
inst✝¹ : TopologicalSpace HB
inst✝ : ChartedSpace HB B
IB : ModelWithCorners 𝕜 EB HB
⊢ PartialHomeomorph.refl (B × F) ∈
    ⋃ φ,
      ⋃ U,
        ⋃ (hU : IsOpen U),
          ⋃ (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(φ x)) U),
            ⋃ (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U),
              {e |
                PartialHomeomorph.EqOnSource e
                  (FiberwiseLinear.localHomeomorph φ hU (_ : ContinuousOn (fun x => ↑(φ x)) U)
                    (_ : ContinuousOn (fun x => ↑(ContinuousLinearEquiv.symm (φ x))) U))}

Next tactic:
refine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩
/-- An additive functor which preserves homology preserves finite limits. -/
noncomputable def preservesFiniteLimitsOfPreservesHomology
    [HasFiniteProducts C] [HasKernels C] : PreservesFiniteLimits F := by
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁸ : Category.{?u.289, u_1} C
inst✝⁷ : Category.{?u.293, u_2} D
inst✝⁶ : Preadditive C
inst✝⁵ : Preadditive D
F : C ⥤ D
inst✝⁴ : Additive F
inst✝³ : PreservesHomology F
inst✝² : HasZeroObject C
inst✝¹ : HasFiniteProducts C
inst✝ : HasKernels C
⊢ PreservesFiniteLimits F

Next tactic:
have := fun {X Y : C} (f : X ⟶ Y) => PreservesHomology.preservesKernel F f
/-- An additive functor which preserves homology preserves finite limits. -/
noncomputable def preservesFiniteLimitsOfPreservesHomology
    [HasFiniteProducts C] [HasKernels C] : PreservesFiniteLimits F := by
  have := fun {X Y : C} (f : X ⟶ Y) => PreservesHomology.preservesKernel F f
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁸ : Category.{?u.289, u_1} C
inst✝⁷ : Category.{?u.293, u_2} D
inst✝⁶ : Preadditive C
inst✝⁵ : Preadditive D
F : C ⥤ D
inst✝⁴ : Additive F
inst✝³ : PreservesHomology F
inst✝² : HasZeroObject C
inst✝¹ : HasFiniteProducts C
inst✝ : HasKernels C
this : {X Y : C} → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) F
⊢ PreservesFiniteLimits F

Next tactic:
have : HasBinaryBiproducts C := HasBinaryBiproducts.of_hasBinaryProducts
/-- An additive functor which preserves homology preserves finite limits. -/
noncomputable def preservesFiniteLimitsOfPreservesHomology
    [HasFiniteProducts C] [HasKernels C] : PreservesFiniteLimits F := by
  have := fun {X Y : C} (f : X ⟶ Y) => PreservesHomology.preservesKernel F f
  have : HasBinaryBiproducts C := HasBinaryBiproducts.of_hasBinaryProducts
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁸ : Category.{?u.289, u_1} C
inst✝⁷ : Category.{?u.293, u_2} D
inst✝⁶ : Preadditive C
inst✝⁵ : Preadditive D
F : C ⥤ D
inst✝⁴ : Additive F
inst✝³ : PreservesHomology F
inst✝² : HasZeroObject C
inst✝¹ : HasFiniteProducts C
inst✝ : HasKernels C
this✝ : {X Y : C} → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) F
this : HasBinaryBiproducts C
⊢ PreservesFiniteLimits F

Next tactic:
have : HasEqualizers C := Preadditive.hasEqualizers_of_hasKernels
/-- An additive functor which preserves homology preserves finite limits. -/
noncomputable def preservesFiniteLimitsOfPreservesHomology
    [HasFiniteProducts C] [HasKernels C] : PreservesFiniteLimits F := by
  have := fun {X Y : C} (f : X ⟶ Y) => PreservesHomology.preservesKernel F f
  have : HasBinaryBiproducts C := HasBinaryBiproducts.of_hasBinaryProducts
  have : HasEqualizers C := Preadditive.hasEqualizers_of_hasKernels
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁸ : Category.{?u.289, u_1} C
inst✝⁷ : Category.{?u.293, u_2} D
inst✝⁶ : Preadditive C
inst✝⁵ : Preadditive D
F : C ⥤ D
inst✝⁴ : Additive F
inst✝³ : PreservesHomology F
inst✝² : HasZeroObject C
inst✝¹ : HasFiniteProducts C
inst✝ : HasKernels C
this✝¹ : {X Y : C} → (f : X ⟶ Y) → PreservesLimit (parallelPair f 0) F
this✝ : HasBinaryBiproducts C
this : HasEqualizers C
⊢ PreservesFiniteLimits F

Next tactic:
have : HasZeroObject D :=
    ⟨F.obj 0, by rw [IsZero.iff_id_eq_zero, ← F.map_id, id_zero, F.map_zero]⟩