l3lab/ntp-mathlib huggingface dataset:
/-- Extended version of the local trivialization of a fiber bundle constructed from core,
registering additionally in its type that it is a local bundle trivialization. -/
def localTriv (i : ι) : Trivialization F Z.proj where
  baseSet := Z.baseSet i
  open_baseSet := Z.isOpen_baseSet i
  source_eq := rfl
  target_eq := rfl
  proj_toFun p _ := by
    simp only [mfld_simps]
    rfl
  open_source := Z.open_source' i
  open_target := (Z.isOpen_baseSet i).prod isOpen_univ
  continuousOn_toFun := by
    rw [continuousOn_open_iff (Z.open_source' i)]
    intro s s_open
    apply TopologicalSpace.GenerateOpen.basic
    simp only [exists_prop, mem_iUnion, mem_singleton_iff]
    exact ⟨i, s, s_open, rfl⟩
  continuousOn_invFun := by
    refine continuousOn_isOpen_of_generateFrom fun t ht ↦ ?_
    simp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht
    obtain ⟨j, s, s_open, ts⟩ : ∃ j s, IsOpen s ∧
      t = (localTrivAsPartialEquiv Z j).source ∩ localTrivAsPartialEquiv Z j ⁻¹' s := ht
    rw [ts]
    simp only [PartialEquiv.right_inv, preimage_inter, PartialEquiv.left_inv]
    let e := Z.localTrivAsPartialEquiv i
    let e' := Z.localTrivAsPartialEquiv j
    let f := e.symm.trans e'
    have : IsOpen (f.source ∩ f ⁻¹' s) := by
      rw [PartialEquiv.EqOnSource.source_inter_preimage_eq (Z.localTrivAsPartialEquiv_trans i j)]
      

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i✝ : ι
b : B
a : F
i : ι
t : Set (TotalSpace Z)
j : ι
s : Set (B × F)
s_open : IsOpen s
ts : t = (localTrivAsPartialEquiv Z j).source ∩ ↑(localTrivAsPartialEquiv Z j) ⁻¹' s
e : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z i
e' : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z j
f : PartialEquiv (B × F) (B × F) := PartialEquiv.trans (PartialEquiv.symm e) e'
⊢ IsOpen ((trivChange Z i j).toPartialEquiv.source ∩ ↑(trivChange Z i j).toPartialEquiv ⁻¹' s)

Next tactic:
exact (continuousOn_open_iff (Z.trivChange i j).open_source).1
        (Z.trivChange i j).continuousOn _ s_open
/-- Extended version of the local trivialization of a fiber bundle constructed from core,
registering additionally in its type that it is a local bundle trivialization. -/
def localTriv (i : ι) : Trivialization F Z.proj where
  baseSet := Z.baseSet i
  open_baseSet := Z.isOpen_baseSet i
  source_eq := rfl
  target_eq := rfl
  proj_toFun p _ := by
    simp only [mfld_simps]
    rfl
  open_source := Z.open_source' i
  open_target := (Z.isOpen_baseSet i).prod isOpen_univ
  continuousOn_toFun := by
    rw [continuousOn_open_iff (Z.open_source' i)]
    intro s s_open
    apply TopologicalSpace.GenerateOpen.basic
    simp only [exists_prop, mem_iUnion, mem_singleton_iff]
    exact ⟨i, s, s_open, rfl⟩
  continuousOn_invFun := by
    refine continuousOn_isOpen_of_generateFrom fun t ht ↦ ?_
    simp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht
    obtain ⟨j, s, s_open, ts⟩ : ∃ j s, IsOpen s ∧
      t = (localTrivAsPartialEquiv Z j).source ∩ localTrivAsPartialEquiv Z j ⁻¹' s := ht
    rw [ts]
    simp only [PartialEquiv.right_inv, preimage_inter, PartialEquiv.left_inv]
    let e := Z.localTrivAsPartialEquiv i
    let e' := Z.localTrivAsPartialEquiv j
    let f := e.symm.trans e'
    have : IsOpen (f.source ∩ f ⁻¹' s) := by
      rw [PartialEquiv.EqOnSource.source_inter_preimage_eq (Z.localTrivAsPartialEquiv_trans i j)]
      exact (continuousOn_open_iff (Z.trivChange i j).open_source).1
        (Z.trivChange i j).continuousOn _ s_open
    

Proof state:
case intro.intro.intro
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i✝ : ι
b : B
a : F
i : ι
t : Set (TotalSpace Z)
j : ι
s : Set (B × F)
s_open : IsOpen s
ts : t = (localTrivAsPartialEquiv Z j).source ∩ ↑(localTrivAsPartialEquiv Z j) ⁻¹' s
e : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z i
e' : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z j
f : PartialEquiv (B × F) (B × F) := PartialEquiv.trans (PartialEquiv.symm e) e'
this : IsOpen (f.source ∩ ↑f ⁻¹' s)
⊢ IsOpen
    ((localTrivAsPartialEquiv Z i).target ∩
      ((localTrivAsPartialEquiv Z i).invFun ⁻¹' (localTrivAsPartialEquiv Z j).source ∩
        (localTrivAsPartialEquiv Z i).invFun ⁻¹' (↑(localTrivAsPartialEquiv Z j) ⁻¹' s)))

Next tactic:
convert this using 1
/-- Extended version of the local trivialization of a fiber bundle constructed from core,
registering additionally in its type that it is a local bundle trivialization. -/
def localTriv (i : ι) : Trivialization F Z.proj where
  baseSet := Z.baseSet i
  open_baseSet := Z.isOpen_baseSet i
  source_eq := rfl
  target_eq := rfl
  proj_toFun p _ := by
    simp only [mfld_simps]
    rfl
  open_source := Z.open_source' i
  open_target := (Z.isOpen_baseSet i).prod isOpen_univ
  continuousOn_toFun := by
    rw [continuousOn_open_iff (Z.open_source' i)]
    intro s s_open
    apply TopologicalSpace.GenerateOpen.basic
    simp only [exists_prop, mem_iUnion, mem_singleton_iff]
    exact ⟨i, s, s_open, rfl⟩
  continuousOn_invFun := by
    refine continuousOn_isOpen_of_generateFrom fun t ht ↦ ?_
    simp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht
    obtain ⟨j, s, s_open, ts⟩ : ∃ j s, IsOpen s ∧
      t = (localTrivAsPartialEquiv Z j).source ∩ localTrivAsPartialEquiv Z j ⁻¹' s := ht
    rw [ts]
    simp only [PartialEquiv.right_inv, preimage_inter, PartialEquiv.left_inv]
    let e := Z.localTrivAsPartialEquiv i
    let e' := Z.localTrivAsPartialEquiv j
    let f := e.symm.trans e'
    have : IsOpen (f.source ∩ f ⁻¹' s) := by
      rw [PartialEquiv.EqOnSource.source_inter_preimage_eq (Z.localTrivAsPartialEquiv_trans i j)]
      exact (continuousOn_open_iff (Z.trivChange i j).open_source).1
        (Z.trivChange i j).continuousOn _ s_open
    convert this using 1
    

Proof state:
case h.e'_3
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i✝ : ι
b : B
a : F
i : ι
t : Set (TotalSpace Z)
j : ι
s : Set (B × F)
s_open : IsOpen s
ts : t = (localTrivAsPartialEquiv Z j).source ∩ ↑(localTrivAsPartialEquiv Z j) ⁻¹' s
e : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z i
e' : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z j
f : PartialEquiv (B × F) (B × F) := PartialEquiv.trans (PartialEquiv.symm e) e'
this : IsOpen (f.source ∩ ↑f ⁻¹' s)
⊢ (localTrivAsPartialEquiv Z i).target ∩
      ((localTrivAsPartialEquiv Z i).invFun ⁻¹' (localTrivAsPartialEquiv Z j).source ∩
        (localTrivAsPartialEquiv Z i).invFun ⁻¹' (↑(localTrivAsPartialEquiv Z j) ⁻¹' s)) =
    f.source ∩ ↑f ⁻¹' s

Next tactic:
dsimp [PartialEquiv.trans_source]
/-- Extended version of the local trivialization of a fiber bundle constructed from core,
registering additionally in its type that it is a local bundle trivialization. -/
def localTriv (i : ι) : Trivialization F Z.proj where
  baseSet := Z.baseSet i
  open_baseSet := Z.isOpen_baseSet i
  source_eq := rfl
  target_eq := rfl
  proj_toFun p _ := by
    simp only [mfld_simps]
    rfl
  open_source := Z.open_source' i
  open_target := (Z.isOpen_baseSet i).prod isOpen_univ
  continuousOn_toFun := by
    rw [continuousOn_open_iff (Z.open_source' i)]
    intro s s_open
    apply TopologicalSpace.GenerateOpen.basic
    simp only [exists_prop, mem_iUnion, mem_singleton_iff]
    exact ⟨i, s, s_open, rfl⟩
  continuousOn_invFun := by
    refine continuousOn_isOpen_of_generateFrom fun t ht ↦ ?_
    simp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht
    obtain ⟨j, s, s_open, ts⟩ : ∃ j s, IsOpen s ∧
      t = (localTrivAsPartialEquiv Z j).source ∩ localTrivAsPartialEquiv Z j ⁻¹' s := ht
    rw [ts]
    simp only [PartialEquiv.right_inv, preimage_inter, PartialEquiv.left_inv]
    let e := Z.localTrivAsPartialEquiv i
    let e' := Z.localTrivAsPartialEquiv j
    let f := e.symm.trans e'
    have : IsOpen (f.source ∩ f ⁻¹' s) := by
      rw [PartialEquiv.EqOnSource.source_inter_preimage_eq (Z.localTrivAsPartialEquiv_trans i j)]
      exact (continuousOn_open_iff (Z.trivChange i j).open_source).1
        (Z.trivChange i j).continuousOn _ s_open
    convert this using 1
    dsimp [PartialEquiv.trans_source]
    

Proof state:
case h.e'_3
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i✝ : ι
b : B
a : F
i : ι
t : Set (TotalSpace Z)
j : ι
s : Set (B × F)
s_open : IsOpen s
ts : t = (localTrivAsPartialEquiv Z j).source ∩ ↑(localTrivAsPartialEquiv Z j) ⁻¹' s
e : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z i
e' : PartialEquiv (TotalSpace Z) (B × F) := localTrivAsPartialEquiv Z j
f : PartialEquiv (B × F) (B × F) := PartialEquiv.trans (PartialEquiv.symm e) e'
this : IsOpen (f.source ∩ ↑f ⁻¹' s)
⊢ (localTrivAsPartialEquiv Z i).target ∩
      (↑(PartialEquiv.symm (localTrivAsPartialEquiv Z i)) ⁻¹' (localTrivAsPartialEquiv Z j).source ∩
        ↑(PartialEquiv.symm (localTrivAsPartialEquiv Z i)) ⁻¹' (↑(localTrivAsPartialEquiv Z j) ⁻¹' s)) =
    (localTrivAsPartialEquiv Z i).target ∩
        ↑(PartialEquiv.symm (localTrivAsPartialEquiv Z i)) ⁻¹' (localTrivAsPartialEquiv Z j).source ∩
      ↑(localTrivAsPartialEquiv Z j) ∘ ↑(PartialEquiv.symm (localTrivAsPartialEquiv Z i)) ⁻¹' s

Next tactic:
rw [← preimage_comp, inter_assoc]
/-- Extended version of the local trivialization of a fiber bundle constructed from core,
registering additionally in its type that it is a local bundle trivialization. -/
def localTriv (i : ι) : Trivialization F Z.proj where
  baseSet := Z.baseSet i
  open_baseSet := Z.isOpen_baseSet i
  source_eq := rfl
  target_eq := rfl
  proj_toFun p _ := by
    

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i✝ : ι
b : B
a : F
i : ι
p : TotalSpace Z
x✝ :
  p ∈
    { toPartialEquiv := localTrivAsPartialEquiv Z i, open_source := (_ : IsOpen (localTrivAsPartialEquiv Z i).source),
          open_target := (_ : IsOpen (baseSet Z i ×ˢ univ)),
          continuousOn_toFun :=
            (_ : ContinuousOn (↑(localTrivAsPartialEquiv Z i)) (localTrivAsPartialEquiv Z i).source),
          continuousOn_invFun :=
            (_ :
              ContinuousOn (localTrivAsPartialEquiv Z i).invFun
                (localTrivAsPartialEquiv Z i).target) }.toPartialEquiv.source
⊢ (↑{ toPartialEquiv := localTrivAsPartialEquiv Z i, open_source := (_ : IsOpen (localTrivAsPartialEquiv Z i).source),
            open_target := (_ : IsOpen (baseSet Z i ×ˢ univ)),
            continuousOn_toFun :=
              (_ : ContinuousOn (↑(localTrivAsPartialEquiv Z i)) (localTrivAsPartialEquiv Z i).source),
            continuousOn_invFun :=
              (_ : ContinuousOn (localTrivAsPartialEquiv Z i).invFun (localTrivAsPartialEquiv Z i).target) }
        p).1 =
    proj Z p

Next tactic:
simp only [mfld_simps]
/-- Extended version of the local trivialization of a fiber bundle constructed from core,
registering additionally in its type that it is a local bundle trivialization. -/
def localTriv (i : ι) : Trivialization F Z.proj where
  baseSet := Z.baseSet i
  open_baseSet := Z.isOpen_baseSet i
  source_eq := rfl
  target_eq := rfl
  proj_toFun p _ := by
    simp only [mfld_simps]
    

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i✝ : ι
b : B
a : F
i : ι
p : TotalSpace Z
x✝ :
  p ∈
    { toPartialEquiv := localTrivAsPartialEquiv Z i, open_source := (_ : IsOpen (localTrivAsPartialEquiv Z i).source),
          open_target := (_ : IsOpen (baseSet Z i ×ˢ univ)),
          continuousOn_toFun :=
            (_ : ContinuousOn (↑(localTrivAsPartialEquiv Z i)) (localTrivAsPartialEquiv Z i).source),
          continuousOn_invFun :=
            (_ :
              ContinuousOn (localTrivAsPartialEquiv Z i).invFun
                (localTrivAsPartialEquiv Z i).target) }.toPartialEquiv.source
⊢ (↑(localTrivAsPartialEquiv Z i) p).1 = p.proj

Next tactic:
rfl
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
⊢ Continuous
    (let_fun this := fun x => { proj := x, snd := v };
    this)

Next tactic:
refine continuous_iff_continuousAt.2 fun x => ?_
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
⊢ ContinuousAt
    (let_fun this := fun x => { proj := x, snd := v };
    this)
    x

Next tactic:
have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
  

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
A : baseSet Z (indexAt Z x) ∈ 𝓝 x
⊢ ContinuousAt
    (let_fun this := fun x => { proj := x, snd := v };
    this)
    x

Next tactic:
refine ((Z.localTrivAt x).toPartialHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
  refine ((Z.localTrivAt x).toPartialHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_
  · 

Proof state:
case refine_1
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
A : baseSet Z (indexAt Z x) ∈ 𝓝 x
⊢ (let_fun this := fun x => { proj := x, snd := v };
      this) ⁻¹'
      (localTrivAt Z x).toPartialHomeomorph.toPartialEquiv.source ∈
    𝓝 x

Next tactic:
exact A
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
  refine ((Z.localTrivAt x).toPartialHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_
  · exact A
  · 

Proof state:
case refine_2
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
A : baseSet Z (indexAt Z x) ∈ 𝓝 x
⊢ ContinuousAt
    (↑(localTrivAt Z x).toPartialHomeomorph ∘
      let_fun this := fun x => { proj := x, snd := v };
      this)
    x

Next tactic:
apply continuousAt_id.prod
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
  refine ((Z.localTrivAt x).toPartialHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_
  · exact A
  · apply continuousAt_id.prod
    

Proof state:
case refine_2
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
A : baseSet Z (indexAt Z x) ∈ 𝓝 x
⊢ ContinuousAt
    (fun x_1 =>
      coordChange Z
        (indexAt Z
          ((let_fun this := fun x => { proj := x, snd := v };
              this)
              x_1).proj)
        (indexAt Z x)
        ((let_fun this := fun x => { proj := x, snd := v };
            this)
            x_1).proj
        ((let_fun this := fun x => { proj := x, snd := v };
            this)
            x_1).snd)
    x

Next tactic:
simp only [(· ∘ ·), mfld_simps, localTrivAt_snd]
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
  refine ((Z.localTrivAt x).toPartialHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_
  · exact A
  · apply continuousAt_id.prod
    simp only [(· ∘ ·), mfld_simps, localTrivAt_snd]
    

Proof state:
case refine_2
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
A : baseSet Z (indexAt Z x) ∈ 𝓝 x
⊢ ContinuousAt (fun x_1 => coordChange Z (indexAt Z x_1) (indexAt Z x) x_1 v) x

Next tactic:
have : ContinuousOn (fun _ : B => v) (Z.baseSet (Z.indexAt x)) := continuousOn_const
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
  refine ((Z.localTrivAt x).toPartialHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_
  · exact A
  · apply continuousAt_id.prod
    simp only [(· ∘ ·), mfld_simps, localTrivAt_snd]
    have : ContinuousOn (fun _ : B => v) (Z.baseSet (Z.indexAt x)) := continuousOn_const
    

Proof state:
case refine_2
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
A : baseSet Z (indexAt Z x) ∈ 𝓝 x
this : ContinuousOn (fun x => v) (baseSet Z (indexAt Z x))
⊢ ContinuousAt (fun x_1 => coordChange Z (indexAt Z x_1) (indexAt Z x) x_1 v) x

Next tactic:
refine (this.congr fun y hy ↦ ?_).continuousAt A
/-- If an element of `F` is invariant under all coordinate changes, then one can define a
corresponding section of the fiber bundle, which is continuous. This applies in particular to the
zero section of a vector bundle. Another example (not yet defined) would be the identity
section of the endomorphism bundle of a vector bundle. -/
theorem continuous_const_section (v : F)
    (h : ∀ i j, ∀ x ∈ Z.baseSet i ∩ Z.baseSet j, Z.coordChange i j x v = v) :
    Continuous (show B → Z.TotalSpace from fun x => ⟨x, v⟩) := by
  refine continuous_iff_continuousAt.2 fun x => ?_
  have A : Z.baseSet (Z.indexAt x) ∈ 𝓝 x :=
    IsOpen.mem_nhds (Z.isOpen_baseSet (Z.indexAt x)) (Z.mem_baseSet_at x)
  refine ((Z.localTrivAt x).toPartialHomeomorph.continuousAt_iff_continuousAt_comp_left ?_).2 ?_
  · exact A
  · apply continuousAt_id.prod
    simp only [(· ∘ ·), mfld_simps, localTrivAt_snd]
    have : ContinuousOn (fun _ : B => v) (Z.baseSet (Z.indexAt x)) := continuousOn_const
    refine (this.congr fun y hy ↦ ?_).continuousAt A
    

Proof state:
case refine_2
ι : Type u_1
B : Type u_2
F : Type u_3
X : Type u_4
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
b : B
a v : F
h : ∀ (i j : ι), ∀ x ∈ baseSet Z i ∩ baseSet Z j, coordChange Z i j x v = v
x : B
A : baseSet Z (indexAt Z x) ∈ 𝓝 x
this : ContinuousOn (fun x => v) (baseSet Z (indexAt Z x))
y : B
hy : y ∈ baseSet Z (indexAt Z x)
⊢ coordChange Z (indexAt Z y) (indexAt Z x) y v = v

Next tactic:
exact h _ _ _ ⟨mem_baseSet_at _ _, hy⟩