l3lab/ntp-mathlib huggingface dataset:
/-- Restrict a `Trivialization` to an open set in the base. -/
protected def restrOpen (e : Trivialization F proj) (s : Set B) (hs : IsOpen s) :
    Trivialization F proj where
  toPartialHomeomorph :=
    ((e.isImage_preimage_prod s).symm.restr (IsOpen.inter e.open_target (hs.prod isOpen_univ))).symm
  baseSet := e.baseSet ∩ s
  open_baseSet := IsOpen.inter e.open_baseSet hs
  source_eq := by 

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e' : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e : Trivialization F proj
s : Set B
hs : IsOpen s
⊢ (PartialHomeomorph.symm
          (PartialHomeomorph.IsImage.restr
            (_ : PartialHomeomorph.IsImage (PartialHomeomorph.symm e.toPartialHomeomorph) (s ×ˢ univ) (proj ⁻¹' s))
            (_ :
              IsOpen
                ((PartialHomeomorph.symm e.toPartialHomeomorph).toPartialEquiv.source ∩
                  s ×ˢ univ)))).toPartialEquiv.source =
    proj ⁻¹' (e.baseSet ∩ s)

Next tactic:
simp [source_eq]
/-- Restrict a `Trivialization` to an open set in the base. -/
protected def restrOpen (e : Trivialization F proj) (s : Set B) (hs : IsOpen s) :
    Trivialization F proj where
  toPartialHomeomorph :=
    ((e.isImage_preimage_prod s).symm.restr (IsOpen.inter e.open_target (hs.prod isOpen_univ))).symm
  baseSet := e.baseSet ∩ s
  open_baseSet := IsOpen.inter e.open_baseSet hs
  source_eq := by simp [source_eq]
  target_eq := by 

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e' : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e : Trivialization F proj
s : Set B
hs : IsOpen s
⊢ (PartialHomeomorph.symm
          (PartialHomeomorph.IsImage.restr
            (_ : PartialHomeomorph.IsImage (PartialHomeomorph.symm e.toPartialHomeomorph) (s ×ˢ univ) (proj ⁻¹' s))
            (_ :
              IsOpen
                ((PartialHomeomorph.symm e.toPartialHomeomorph).toPartialEquiv.source ∩
                  s ×ˢ univ)))).toPartialEquiv.target =
    (e.baseSet ∩ s) ×ˢ univ

Next tactic:
simp [target_eq, prod_univ]
theorem frontier_preimage (e : Trivialization F proj) (s : Set B) :
    e.source ∩ frontier (proj ⁻¹' s) = proj ⁻¹' (e.baseSet ∩ frontier s) := by
  

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e' : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e : Trivialization F proj
s : Set B
⊢ e.source ∩ frontier (proj ⁻¹' s) = proj ⁻¹' (e.baseSet ∩ frontier s)

Next tactic:
rw [← (e.isImage_preimage_prod s).frontier.preimage_eq, frontier_prod_univ_eq,
    (e.isImage_preimage_prod _).preimage_eq, e.source_eq, preimage_inter]
/-- Given two bundle trivializations `e`, `e'` of `proj : Z → B` and a set `s : Set B` such that
the base sets of `e` and `e'` intersect `frontier s` on the same set and `e p = e' p` whenever
`proj p ∈ e.baseSet ∩ frontier s`, `e.piecewise e' s Hs Heq` is the bundle trivialization over
`Set.ite s e.baseSet e'.baseSet` that is equal to `e` on `proj ⁻¹ s` and is equal to `e'`
otherwise. -/
noncomputable def piecewise (e e' : Trivialization F proj) (s : Set B)
    (Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s)
    (Heq : EqOn e e' <| proj ⁻¹' (e.baseSet ∩ frontier s)) : Trivialization F proj where
  toPartialHomeomorph :=
    e.toPartialHomeomorph.piecewise e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
      (e.isImage_preimage_prod s) (e'.isImage_preimage_prod s)
      (by 

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e e' : Trivialization F proj
s : Set B
Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s
Heq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))
⊢ e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s)

Next tactic:
rw [e.frontier_preimage, e'.frontier_preimage, Hs]
/-- Given two bundle trivializations `e`, `e'` of `proj : Z → B` and a set `s : Set B` such that
the base sets of `e` and `e'` intersect `frontier s` on the same set and `e p = e' p` whenever
`proj p ∈ e.baseSet ∩ frontier s`, `e.piecewise e' s Hs Heq` is the bundle trivialization over
`Set.ite s e.baseSet e'.baseSet` that is equal to `e` on `proj ⁻¹ s` and is equal to `e'`
otherwise. -/
noncomputable def piecewise (e e' : Trivialization F proj) (s : Set B)
    (Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s)
    (Heq : EqOn e e' <| proj ⁻¹' (e.baseSet ∩ frontier s)) : Trivialization F proj where
  toPartialHomeomorph :=
    e.toPartialHomeomorph.piecewise e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
      (e.isImage_preimage_prod s) (e'.isImage_preimage_prod s)
      (by rw [e.frontier_preimage, e'.frontier_preimage, Hs]) (by 

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e e' : Trivialization F proj
s : Set B
Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s
Heq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))
⊢ EqOn (↑e.toPartialHomeomorph) (↑e'.toPartialHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))

Next tactic:
rwa [e.frontier_preimage]
/-- Given two bundle trivializations `e`, `e'` of `proj : Z → B` and a set `s : Set B` such that
the base sets of `e` and `e'` intersect `frontier s` on the same set and `e p = e' p` whenever
`proj p ∈ e.baseSet ∩ frontier s`, `e.piecewise e' s Hs Heq` is the bundle trivialization over
`Set.ite s e.baseSet e'.baseSet` that is equal to `e` on `proj ⁻¹ s` and is equal to `e'`
otherwise. -/
noncomputable def piecewise (e e' : Trivialization F proj) (s : Set B)
    (Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s)
    (Heq : EqOn e e' <| proj ⁻¹' (e.baseSet ∩ frontier s)) : Trivialization F proj where
  toPartialHomeomorph :=
    e.toPartialHomeomorph.piecewise e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
      (e.isImage_preimage_prod s) (e'.isImage_preimage_prod s)
      (by rw [e.frontier_preimage, e'.frontier_preimage, Hs]) (by rwa [e.frontier_preimage])
  baseSet := s.ite e.baseSet e'.baseSet
  open_baseSet := e.open_baseSet.ite e'.open_baseSet Hs
  source_eq := by 

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e e' : Trivialization F proj
s : Set B
Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s
Heq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))
⊢ (PartialHomeomorph.piecewise e.toPartialHomeomorph e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
          (_ : PartialHomeomorph.IsImage e.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
          (_ : PartialHomeomorph.IsImage e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
          (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))
          (_ :
            EqOn (↑e.toPartialHomeomorph) (↑e'.toPartialHomeomorph)
              (e.source ∩ frontier (proj ⁻¹' s)))).toPartialEquiv.source =
    proj ⁻¹' Set.ite s e.baseSet e'.baseSet

Next tactic:
simp [source_eq]
/-- Given two bundle trivializations `e`, `e'` of `proj : Z → B` and a set `s : Set B` such that
the base sets of `e` and `e'` intersect `frontier s` on the same set and `e p = e' p` whenever
`proj p ∈ e.baseSet ∩ frontier s`, `e.piecewise e' s Hs Heq` is the bundle trivialization over
`Set.ite s e.baseSet e'.baseSet` that is equal to `e` on `proj ⁻¹ s` and is equal to `e'`
otherwise. -/
noncomputable def piecewise (e e' : Trivialization F proj) (s : Set B)
    (Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s)
    (Heq : EqOn e e' <| proj ⁻¹' (e.baseSet ∩ frontier s)) : Trivialization F proj where
  toPartialHomeomorph :=
    e.toPartialHomeomorph.piecewise e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
      (e.isImage_preimage_prod s) (e'.isImage_preimage_prod s)
      (by rw [e.frontier_preimage, e'.frontier_preimage, Hs]) (by rwa [e.frontier_preimage])
  baseSet := s.ite e.baseSet e'.baseSet
  open_baseSet := e.open_baseSet.ite e'.open_baseSet Hs
  source_eq := by simp [source_eq]
  target_eq := by 

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e e' : Trivialization F proj
s : Set B
Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s
Heq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))
⊢ (PartialHomeomorph.piecewise e.toPartialHomeomorph e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
          (_ : PartialHomeomorph.IsImage e.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
          (_ : PartialHomeomorph.IsImage e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
          (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))
          (_ :
            EqOn (↑e.toPartialHomeomorph) (↑e'.toPartialHomeomorph)
              (e.source ∩ frontier (proj ⁻¹' s)))).toPartialEquiv.target =
    Set.ite s e.baseSet e'.baseSet ×ˢ univ

Next tactic:
simp [target_eq, prod_univ]
/-- Given two bundle trivializations `e`, `e'` of `proj : Z → B` and a set `s : Set B` such that
the base sets of `e` and `e'` intersect `frontier s` on the same set and `e p = e' p` whenever
`proj p ∈ e.baseSet ∩ frontier s`, `e.piecewise e' s Hs Heq` is the bundle trivialization over
`Set.ite s e.baseSet e'.baseSet` that is equal to `e` on `proj ⁻¹ s` and is equal to `e'`
otherwise. -/
noncomputable def piecewise (e e' : Trivialization F proj) (s : Set B)
    (Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s)
    (Heq : EqOn e e' <| proj ⁻¹' (e.baseSet ∩ frontier s)) : Trivialization F proj where
  toPartialHomeomorph :=
    e.toPartialHomeomorph.piecewise e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
      (e.isImage_preimage_prod s) (e'.isImage_preimage_prod s)
      (by rw [e.frontier_preimage, e'.frontier_preimage, Hs]) (by rwa [e.frontier_preimage])
  baseSet := s.ite e.baseSet e'.baseSet
  open_baseSet := e.open_baseSet.ite e'.open_baseSet Hs
  source_eq := by simp [source_eq]
  target_eq := by simp [target_eq, prod_univ]
  proj_toFun p := by
    

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e e' : Trivialization F proj
s : Set B
Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s
Heq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))
p : Z
⊢ p ∈
      (PartialHomeomorph.piecewise e.toPartialHomeomorph e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
            (_ : PartialHomeomorph.IsImage e.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
            (_ : PartialHomeomorph.IsImage e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
            (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))
            (_ :
              EqOn (↑e.toPartialHomeomorph) (↑e'.toPartialHomeomorph)
                (e.source ∩ frontier (proj ⁻¹' s)))).toPartialEquiv.source →
    (↑(PartialHomeomorph.piecewise e.toPartialHomeomorph e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
              (_ : PartialHomeomorph.IsImage e.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
              (_ : PartialHomeomorph.IsImage e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
              (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))
              (_ : EqOn (↑e.toPartialHomeomorph) (↑e'.toPartialHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))))
          p).1 =
      proj p

Next tactic:
rintro (⟨he, hs⟩ | ⟨he, hs⟩)
/-- Given two bundle trivializations `e`, `e'` of `proj : Z → B` and a set `s : Set B` such that
the base sets of `e` and `e'` intersect `frontier s` on the same set and `e p = e' p` whenever
`proj p ∈ e.baseSet ∩ frontier s`, `e.piecewise e' s Hs Heq` is the bundle trivialization over
`Set.ite s e.baseSet e'.baseSet` that is equal to `e` on `proj ⁻¹ s` and is equal to `e'`
otherwise. -/
noncomputable def piecewise (e e' : Trivialization F proj) (s : Set B)
    (Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s)
    (Heq : EqOn e e' <| proj ⁻¹' (e.baseSet ∩ frontier s)) : Trivialization F proj where
  toPartialHomeomorph :=
    e.toPartialHomeomorph.piecewise e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
      (e.isImage_preimage_prod s) (e'.isImage_preimage_prod s)
      (by rw [e.frontier_preimage, e'.frontier_preimage, Hs]) (by rwa [e.frontier_preimage])
  baseSet := s.ite e.baseSet e'.baseSet
  open_baseSet := e.open_baseSet.ite e'.open_baseSet Hs
  source_eq := by simp [source_eq]
  target_eq := by simp [target_eq, prod_univ]
  proj_toFun p := by
    rintro (⟨he, hs⟩ | ⟨he, hs⟩)
    -- porting note: was `<;> simp [*]`
    · 

Proof state:
case inl.intro
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e e' : Trivialization F proj
s : Set B
Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s
Heq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))
p : Z
he : p ∈ e.source
hs : p ∈ proj ⁻¹' s
⊢ (↑(PartialHomeomorph.piecewise e.toPartialHomeomorph e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
            (_ : PartialHomeomorph.IsImage e.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
            (_ : PartialHomeomorph.IsImage e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
            (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))
            (_ : EqOn (↑e.toPartialHomeomorph) (↑e'.toPartialHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))))
        p).1 =
    proj p

Next tactic:
simp [piecewise_eq_of_mem _ _ _ hs, *]
/-- Given two bundle trivializations `e`, `e'` of `proj : Z → B` and a set `s : Set B` such that
the base sets of `e` and `e'` intersect `frontier s` on the same set and `e p = e' p` whenever
`proj p ∈ e.baseSet ∩ frontier s`, `e.piecewise e' s Hs Heq` is the bundle trivialization over
`Set.ite s e.baseSet e'.baseSet` that is equal to `e` on `proj ⁻¹ s` and is equal to `e'`
otherwise. -/
noncomputable def piecewise (e e' : Trivialization F proj) (s : Set B)
    (Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s)
    (Heq : EqOn e e' <| proj ⁻¹' (e.baseSet ∩ frontier s)) : Trivialization F proj where
  toPartialHomeomorph :=
    e.toPartialHomeomorph.piecewise e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
      (e.isImage_preimage_prod s) (e'.isImage_preimage_prod s)
      (by rw [e.frontier_preimage, e'.frontier_preimage, Hs]) (by rwa [e.frontier_preimage])
  baseSet := s.ite e.baseSet e'.baseSet
  open_baseSet := e.open_baseSet.ite e'.open_baseSet Hs
  source_eq := by simp [source_eq]
  target_eq := by simp [target_eq, prod_univ]
  proj_toFun p := by
    rintro (⟨he, hs⟩ | ⟨he, hs⟩)
    -- porting note: was `<;> simp [*]`
    · simp [piecewise_eq_of_mem _ _ _ hs, *]
    · 

Proof state:
case inr.intro
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝ : TopologicalSpace B'
e e' : Trivialization F proj
s : Set B
Hs : e.baseSet ∩ frontier s = e'.baseSet ∩ frontier s
Heq : EqOn (↑e) (↑e') (proj ⁻¹' (e.baseSet ∩ frontier s))
p : Z
he : p ∈ e'.source
hs : p ∉ proj ⁻¹' s
⊢ (↑(PartialHomeomorph.piecewise e.toPartialHomeomorph e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ)
            (_ : PartialHomeomorph.IsImage e.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
            (_ : PartialHomeomorph.IsImage e'.toPartialHomeomorph (proj ⁻¹' s) (s ×ˢ univ))
            (_ : e.source ∩ frontier (proj ⁻¹' s) = e'.source ∩ frontier (proj ⁻¹' s))
            (_ : EqOn (↑e.toPartialHomeomorph) (↑e'.toPartialHomeomorph) (e.source ∩ frontier (proj ⁻¹' s))))
        p).1 =
    proj p

Next tactic:
simp [piecewise_eq_of_not_mem _ _ _ hs, *]
/-- Given two bundle trivializations `e`, `e'` of a topological fiber bundle `proj : Z → B`
over a linearly ordered base `B` and a point `a ∈ e.baseSet ∩ e'.baseSet` such that
`e` equals `e'` on `proj ⁻¹' {a}`, `e.piecewise_le_of_eq e' a He He' Heq` is the bundle
trivialization over `Set.ite (Iic a) e.baseSet e'.baseSet` that is equal to `e` on points `p`
such that `proj p ≤ a` and is equal to `e'` otherwise. -/
noncomputable def piecewiseLeOfEq [LinearOrder B] [OrderTopology B] (e e' : Trivialization F proj)
    (a : B) (He : a ∈ e.baseSet) (He' : a ∈ e'.baseSet) (Heq : ∀ p, proj p = a → e p = e' p) :
    Trivialization F proj :=
  e.piecewise e' (Iic a)
    (Set.ext fun x => and_congr_left_iff.2 fun hx => by
      

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace F
proj : Z → B
inst✝⁴ : TopologicalSpace Z
inst✝³ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x✝ : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝² : TopologicalSpace B'
inst✝¹ : LinearOrder B
inst✝ : OrderTopology B
e e' : Trivialization F proj
a : B
He : a ∈ e.baseSet
He' : a ∈ e'.baseSet
Heq : ∀ (p : Z), proj p = a → ↑e p = ↑e' p
x : B
hx : x ∈ frontier (Iic a)
⊢ x ∈ e.baseSet ↔ x ∈ e'.baseSet

Next tactic:
obtain rfl : x = a := mem_singleton_iff.1 (frontier_Iic_subset _ hx)
/-- Given two bundle trivializations `e`, `e'` of a topological fiber bundle `proj : Z → B`
over a linearly ordered base `B` and a point `a ∈ e.baseSet ∩ e'.baseSet` such that
`e` equals `e'` on `proj ⁻¹' {a}`, `e.piecewise_le_of_eq e' a He He' Heq` is the bundle
trivialization over `Set.ite (Iic a) e.baseSet e'.baseSet` that is equal to `e` on points `p`
such that `proj p ≤ a` and is equal to `e'` otherwise. -/
noncomputable def piecewiseLeOfEq [LinearOrder B] [OrderTopology B] (e e' : Trivialization F proj)
    (a : B) (He : a ∈ e.baseSet) (He' : a ∈ e'.baseSet) (Heq : ∀ p, proj p = a → e p = e' p) :
    Trivialization F proj :=
  e.piecewise e' (Iic a)
    (Set.ext fun x => and_congr_left_iff.2 fun hx => by
      obtain rfl : x = a := mem_singleton_iff.1 (frontier_Iic_subset _ hx)
      

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace F
proj : Z → B
inst✝⁴ : TopologicalSpace Z
inst✝³ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x✝ : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝² : TopologicalSpace B'
inst✝¹ : LinearOrder B
inst✝ : OrderTopology B
e e' : Trivialization F proj
x : B
He : x ∈ e.baseSet
He' : x ∈ e'.baseSet
Heq : ∀ (p : Z), proj p = x → ↑e p = ↑e' p
hx : x ∈ frontier (Iic x)
⊢ x ∈ e.baseSet ↔ x ∈ e'.baseSet

Next tactic:
simp [He, He']
/-- Given two bundle trivializations `e`, `e'` of a topological fiber bundle `proj : Z → B` over a
linearly ordered base `B` and a point `a ∈ e.baseSet ∩ e'.baseSet`, `e.piecewise_le e' a He He'`
is the bundle trivialization over `Set.ite (Iic a) e.baseSet e'.baseSet` that is equal to `e` on
points `p` such that `proj p ≤ a` and is equal to `((e' p).1, h (e' p).2)` otherwise, where
`h = e'.coord_change_homeomorph e _ _` is the homeomorphism of the fiber such that
`h (e' p).2 = (e p).2` whenever `e p = a`. -/
noncomputable def piecewiseLe [LinearOrder B] [OrderTopology B] (e e' : Trivialization F proj)
    (a : B) (He : a ∈ e.baseSet) (He' : a ∈ e'.baseSet) : Trivialization F proj :=
  e.piecewiseLeOfEq (e'.transFiberHomeomorph (e'.coordChangeHomeomorph e He' He)) a He He' <| by
    

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace F
proj : Z → B
inst✝⁴ : TopologicalSpace Z
inst✝³ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝² : TopologicalSpace B'
inst✝¹ : LinearOrder B
inst✝ : OrderTopology B
e e' : Trivialization F proj
a : B
He : a ∈ e.baseSet
He' : a ∈ e'.baseSet
⊢ ∀ (p : Z), proj p = a → ↑e p = ↑(transFiberHomeomorph e' (Trivialization.coordChangeHomeomorph e' e He' He)) p

Next tactic:
rintro p rfl
/-- Given two bundle trivializations `e`, `e'` of a topological fiber bundle `proj : Z → B` over a
linearly ordered base `B` and a point `a ∈ e.baseSet ∩ e'.baseSet`, `e.piecewise_le e' a He He'`
is the bundle trivialization over `Set.ite (Iic a) e.baseSet e'.baseSet` that is equal to `e` on
points `p` such that `proj p ≤ a` and is equal to `((e' p).1, h (e' p).2)` otherwise, where
`h = e'.coord_change_homeomorph e _ _` is the homeomorphism of the fiber such that
`h (e' p).2 = (e p).2` whenever `e p = a`. -/
noncomputable def piecewiseLe [LinearOrder B] [OrderTopology B] (e e' : Trivialization F proj)
    (a : B) (He : a ∈ e.baseSet) (He' : a ∈ e'.baseSet) : Trivialization F proj :=
  e.piecewiseLeOfEq (e'.transFiberHomeomorph (e'.coordChangeHomeomorph e He' He)) a He He' <| by
    rintro p rfl
    

Proof state:
ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁶ : TopologicalSpace B
inst✝⁵ : TopologicalSpace F
proj : Z → B
inst✝⁴ : TopologicalSpace Z
inst✝³ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
e'✝ : Trivialization F TotalSpace.proj
x' : TotalSpace F E
b : B
y : E b
B' : Type u_6
inst✝² : TopologicalSpace B'
inst✝¹ : LinearOrder B
inst✝ : OrderTopology B
e e' : Trivialization F proj
p : Z
He : proj p ∈ e.baseSet
He' : proj p ∈ e'.baseSet
⊢ ↑e p = ↑(transFiberHomeomorph e' (Trivialization.coordChangeHomeomorph e' e He' He)) p

Next tactic:
ext1