l3lab/ntp-mathlib huggingface dataset:
/-- The substructure of elements `x : M` such that `f x = g x` -/
def eqLocus (f g : M →[L] N) : Substructure L M where
  carrier := { x : M | f x = g x }
  fun_mem {n} fn x hx := by
    have h : f ∘ x = g ∘ x := by
      ext
      repeat' 

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f g : M →[L] N
n : ℕ
fn : Functions L n
x : Fin n → M
hx : ∀ (i : Fin n), x i ∈ {x | f x = g x}
x✝ : Fin n
⊢ (⇑f ∘ x) x✝ = (⇑g ∘ x) x✝

Next tactic:
rw [Function.comp_apply]
/-- The substructure of elements `x : M` such that `f x = g x` -/
def eqLocus (f g : M →[L] N) : Substructure L M where
  carrier := { x : M | f x = g x }
  fun_mem {n} fn x hx := by
    have h : f ∘ x = g ∘ x := by
      ext
      repeat' 

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f g : M →[L] N
n : ℕ
fn : Functions L n
x : Fin n → M
hx : ∀ (i : Fin n), x i ∈ {x | f x = g x}
x✝ : Fin n
⊢ f (x x✝) = (⇑g ∘ x) x✝

Next tactic:
rw [Function.comp_apply]
/-- The substructure of elements `x : M` such that `f x = g x` -/
def eqLocus (f g : M →[L] N) : Substructure L M where
  carrier := { x : M | f x = g x }
  fun_mem {n} fn x hx := by
    have h : f ∘ x = g ∘ x := by
      ext
      repeat' 

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f g : M →[L] N
n : ℕ
fn : Functions L n
x : Fin n → M
hx : ∀ (i : Fin n), x i ∈ {x | f x = g x}
x✝ : Fin n
⊢ f (x x✝) = g (x x✝)

Next tactic:
rw [Function.comp_apply]
/-- The substructure of elements `x : M` such that `f x = g x` -/
def eqLocus (f g : M →[L] N) : Substructure L M where
  carrier := { x : M | f x = g x }
  fun_mem {n} fn x hx := by
    have h : f ∘ x = g ∘ x := by
      ext
      repeat' rw [Function.comp_apply]
      

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f g : M →[L] N
n : ℕ
fn : Functions L n
x : Fin n → M
hx : ∀ (i : Fin n), x i ∈ {x | f x = g x}
x✝ : Fin n
⊢ f (x x✝) = g (x x✝)

Next tactic:
apply hx
/-- The substructure of elements `x : M` such that `f x = g x` -/
def eqLocus (f g : M →[L] N) : Substructure L M where
  carrier := { x : M | f x = g x }
  fun_mem {n} fn x hx := by
    have h : f ∘ x = g ∘ x := by
      ext
      repeat' rw [Function.comp_apply]
      apply hx
    

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f g : M →[L] N
n : ℕ
fn : Functions L n
x : Fin n → M
hx : ∀ (i : Fin n), x i ∈ {x | f x = g x}
h : ⇑f ∘ x = ⇑g ∘ x
⊢ funMap fn x ∈ {x | f x = g x}

Next tactic:
simp [h]
/-- A first-order embedding `f : M → N` whose values lie in a substructure `p ⊆ N` can be restricted
to an embedding `M → p`. -/
def codRestrict (p : L.Substructure N) (f : M ↪[L] N) (h : ∀ c, f c ∈ p) : M ↪[L] p where
  toFun := f.toHom.codRestrict p h
  inj' a b ab := f.injective (Subtype.mk_eq_mk.1 ab)
  map_fun' {n} F x := (f.toHom.codRestrict p h).map_fun' F x
  map_rel' {n} r x := by
    

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
p : Substructure L N
f : M ↪[L] N
h : ∀ (c : M), f c ∈ p
n : ℕ
r : Relations L n
x : Fin n → M
⊢ RelMap r
      ({ toFun := ⇑(Hom.codRestrict p (toHom f) h),
            inj' :=
              (_ : ∀ (a b : M), (Hom.codRestrict p (toHom f) h) a = (Hom.codRestrict p (toHom f) h) b → a = b) }.toFun ∘
        x) ↔
    RelMap r x

Next tactic:
simp only
/-- A first-order embedding `f : M → N` whose values lie in a substructure `p ⊆ N` can be restricted
to an embedding `M → p`. -/
def codRestrict (p : L.Substructure N) (f : M ↪[L] N) (h : ∀ c, f c ∈ p) : M ↪[L] p where
  toFun := f.toHom.codRestrict p h
  inj' a b ab := f.injective (Subtype.mk_eq_mk.1 ab)
  map_fun' {n} F x := (f.toHom.codRestrict p h).map_fun' F x
  map_rel' {n} r x := by
    simp only
    

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
p : Substructure L N
f : M ↪[L] N
h : ∀ (c : M), f c ∈ p
n : ℕ
r : Relations L n
x : Fin n → M
⊢ RelMap r (⇑(Hom.codRestrict p (toHom f) h) ∘ x) ↔ RelMap r x

Next tactic:
rw [← p.subtype.map_rel]
/-- A first-order embedding `f : M → N` whose values lie in a substructure `p ⊆ N` can be restricted
to an embedding `M → p`. -/
def codRestrict (p : L.Substructure N) (f : M ↪[L] N) (h : ∀ c, f c ∈ p) : M ↪[L] p where
  toFun := f.toHom.codRestrict p h
  inj' a b ab := f.injective (Subtype.mk_eq_mk.1 ab)
  map_fun' {n} F x := (f.toHom.codRestrict p h).map_fun' F x
  map_rel' {n} r x := by
    simp only
    rw [← p.subtype.map_rel]
    

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
p : Substructure L N
f : M ↪[L] N
h : ∀ (c : M), f c ∈ p
n : ℕ
r : Relations L n
x : Fin n → M
⊢ RelMap r (⇑(subtype p) ∘ ⇑(Hom.codRestrict p (toHom f) h) ∘ x) ↔ RelMap r x

Next tactic:
change RelMap r (Hom.comp p.subtype.toHom (f.toHom.codRestrict p h) ∘ x) ↔ _
/-- A first-order embedding `f : M → N` whose values lie in a substructure `p ⊆ N` can be restricted
to an embedding `M → p`. -/
def codRestrict (p : L.Substructure N) (f : M ↪[L] N) (h : ∀ c, f c ∈ p) : M ↪[L] p where
  toFun := f.toHom.codRestrict p h
  inj' a b ab := f.injective (Subtype.mk_eq_mk.1 ab)
  map_fun' {n} F x := (f.toHom.codRestrict p h).map_fun' F x
  map_rel' {n} r x := by
    simp only
    rw [← p.subtype.map_rel]
    change RelMap r (Hom.comp p.subtype.toHom (f.toHom.codRestrict p h) ∘ x) ↔ _
    

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
p : Substructure L N
f : M ↪[L] N
h : ∀ (c : M), f c ∈ p
n : ℕ
r : Relations L n
x : Fin n → M
⊢ RelMap r (⇑(Hom.comp (toHom (subtype p)) (Hom.codRestrict p (toHom f) h)) ∘ x) ↔ RelMap r x

Next tactic:
rw [Hom.subtype_comp_codRestrict, ← f.map_rel]
/-- A first-order embedding `f : M → N` whose values lie in a substructure `p ⊆ N` can be restricted
to an embedding `M → p`. -/
def codRestrict (p : L.Substructure N) (f : M ↪[L] N) (h : ∀ c, f c ∈ p) : M ↪[L] p where
  toFun := f.toHom.codRestrict p h
  inj' a b ab := f.injective (Subtype.mk_eq_mk.1 ab)
  map_fun' {n} F x := (f.toHom.codRestrict p h).map_fun' F x
  map_rel' {n} r x := by
    simp only
    rw [← p.subtype.map_rel]
    change RelMap r (Hom.comp p.subtype.toHom (f.toHom.codRestrict p h) ∘ x) ↔ _
    rw [Hom.subtype_comp_codRestrict, ← f.map_rel]
    

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
p : Substructure L N
f : M ↪[L] N
h : ∀ (c : M), f c ∈ p
n : ℕ
r : Relations L n
x : Fin n → M
⊢ RelMap r (⇑(toHom f) ∘ x) ↔ RelMap r (⇑f ∘ x)

Next tactic:
rfl
/-- The equivalence between a substructure `s` and its image `s.map f.toHom`, where `f` is an
  embedding. -/
noncomputable def substructureEquivMap (f : M ↪[L] N) (s : L.Substructure M) :
    s ≃[L] s.map f.toHom where
  toFun := codRestrict (s.map f.toHom) (f.domRestrict s) fun ⟨m, hm⟩ => ⟨m, hm, rfl⟩
  invFun n := ⟨Classical.choose n.2, (Classical.choose_spec n.2).1⟩
  left_inv := fun ⟨m, hm⟩ =>
    Subtype.mk_eq_mk.2
      (f.injective
        (Classical.choose_spec
            (codRestrict (s.map f.toHom) (f.domRestrict s) (fun ⟨m, hm⟩ => ⟨m, hm, rfl⟩)
                ⟨m, hm⟩).2).2)
  right_inv := fun ⟨n, hn⟩ => Subtype.mk_eq_mk.2 (Classical.choose_spec hn).2
  map_fun' {n} f x := by aesop
  map_rel' {n} R x := by 

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f : M ↪[L] N
s : Substructure L M
n : ℕ
R : Relations L n
x : Fin n → ↥s
⊢ RelMap R
      ({
            toFun :=
              ⇑(codRestrict (Substructure.map (toHom f) s) (domRestrict f s)
                  (_ : ∀ (x : ↥s), (domRestrict f s) x ∈ Substructure.map (toHom f) s)),
            invFun := fun n =>
              { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s),
                property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s) ∈ ↑s) },
            left_inv :=
              (_ :
                ∀ (x : ↥s),
                  (fun n =>
                        { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s),
                          property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s) ∈ ↑s) })
                      ((codRestrict (Substructure.map (toHom f) s) (domRestrict f s)
                          (_ : ∀ (x : ↥s), (domRestrict f s) x ∈ Substructure.map (toHom f) s))
                        x) =
                    x),
            right_inv :=
              (_ :
                ∀ (x : ↥(Substructure.map (toHom f) s)),
                  (codRestrict (Substructure.map (toHom f) s) (domRestrict f s)
                        (_ : ∀ (x : ↥s), (domRestrict f s) x ∈ Substructure.map (toHom f) s))
                      ((fun n =>
                          { val := Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s),
                            property := (_ : Classical.choose (_ : ↑n ∈ Substructure.map (toHom f) s) ∈ ↑s) })
                        x) =
                    x) }.toFun ∘
        x) ↔
    RelMap R x

Next tactic:
aesop
/-- The equivalence between the domain and the range of an embedding `f`. -/
noncomputable def equivRange (f : M ↪[L] N) : M ≃[L] f.toHom.range where
  toFun := codRestrict f.toHom.range f f.toHom.mem_range_self
  invFun n := Classical.choose n.2
  left_inv m :=
    f.injective (Classical.choose_spec (codRestrict f.toHom.range f f.toHom.mem_range_self m).2)
  right_inv := fun ⟨n, hn⟩ => Subtype.mk_eq_mk.2 (Classical.choose_spec hn)
  map_fun' {n} f x := by 

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f✝ : M ↪[L] N
n : ℕ
f : Functions L n
x : Fin n → M
⊢ Equiv.toFun
      { toFun := ⇑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), (toHom f✝) x ∈ Hom.range (toHom f✝))),
        invFun := fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)),
        left_inv :=
          (_ :
            ∀ (m : M),
              (fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)))
                  ((codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), (toHom f✝) x ∈ Hom.range (toHom f✝))) m) =
                m),
        right_inv :=
          (_ :
            ∀ (x : ↥(Hom.range (toHom f✝))),
              (codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), (toHom f✝) x ∈ Hom.range (toHom f✝)))
                  ((fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝))) x) =
                x) }
      (funMap f x) =
    funMap f
      ({ toFun := ⇑(codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), (toHom f✝) x ∈ Hom.range (toHom f✝))),
            invFun := fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)),
            left_inv :=
              (_ :
                ∀ (m : M),
                  (fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝)))
                      ((codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), (toHom f✝) x ∈ Hom.range (toHom f✝))) m) =
                    m),
            right_inv :=
              (_ :
                ∀ (x : ↥(Hom.range (toHom f✝))),
                  (codRestrict (Hom.range (toHom f✝)) f✝ (_ : ∀ (x : M), (toHom f✝) x ∈ Hom.range (toHom f✝)))
                      ((fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f✝))) x) =
                    x) }.toFun ∘
        x)

Next tactic:
aesop
/-- The equivalence between the domain and the range of an embedding `f`. -/
noncomputable def equivRange (f : M ↪[L] N) : M ≃[L] f.toHom.range where
  toFun := codRestrict f.toHom.range f f.toHom.mem_range_self
  invFun n := Classical.choose n.2
  left_inv m :=
    f.injective (Classical.choose_spec (codRestrict f.toHom.range f f.toHom.mem_range_self m).2)
  right_inv := fun ⟨n, hn⟩ => Subtype.mk_eq_mk.2 (Classical.choose_spec hn)
  map_fun' {n} f x := by aesop
  map_rel' {n} R x := by 

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f : M ↪[L] N
n : ℕ
R : Relations L n
x : Fin n → M
⊢ RelMap R
      ({ toFun := ⇑(codRestrict (Hom.range (toHom f)) f (_ : ∀ (x : M), (toHom f) x ∈ Hom.range (toHom f))),
            invFun := fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f)),
            left_inv :=
              (_ :
                ∀ (m : M),
                  (fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f)))
                      ((codRestrict (Hom.range (toHom f)) f (_ : ∀ (x : M), (toHom f) x ∈ Hom.range (toHom f))) m) =
                    m),
            right_inv :=
              (_ :
                ∀ (x : ↥(Hom.range (toHom f))),
                  (codRestrict (Hom.range (toHom f)) f (_ : ∀ (x : M), (toHom f) x ∈ Hom.range (toHom f)))
                      ((fun n => Classical.choose (_ : ↑n ∈ Hom.range (toHom f))) x) =
                    x) }.toFun ∘
        x) ↔
    RelMap R x

Next tactic:
aesop
theorem toHom_range (f : M ≃[L] N) : f.toHom.range = ⊤ := by
  

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f : M ≃[L] N
⊢ Hom.range (toHom f) = ⊤

Next tactic:
ext n
theorem toHom_range (f : M ≃[L] N) : f.toHom.range = ⊤ := by
  ext n
  

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f : M ≃[L] N
n : N
⊢ n ∈ Hom.range (toHom f) ↔ n ∈ ⊤

Next tactic:
simp only [Hom.mem_range, coe_toHom, Substructure.mem_top, iff_true_iff]
theorem toHom_range (f : M ≃[L] N) : f.toHom.range = ⊤ := by
  ext n
  simp only [Hom.mem_range, coe_toHom, Substructure.mem_top, iff_true_iff]
  

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S : Substructure L M
f : M ≃[L] N
n : N
⊢ ∃ y, f y = n

Next tactic:
exact ⟨f.symm n, apply_symm_apply _ _⟩
theorem range_subtype (S : L.Substructure M) : S.subtype.toHom.range = S := by
  

Proof state:
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S✝ S : Substructure L M
⊢ Hom.range (Embedding.toHom (subtype S)) = S

Next tactic:
ext x
theorem range_subtype (S : L.Substructure M) : S.subtype.toHom.range = S := by
  ext x
  

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S✝ S : Substructure L M
x : M
⊢ x ∈ Hom.range (Embedding.toHom (subtype S)) ↔ x ∈ S

Next tactic:
simp only [Hom.mem_range, Embedding.coe_toHom, coeSubtype]
theorem range_subtype (S : L.Substructure M) : S.subtype.toHom.range = S := by
  ext x
  simp only [Hom.mem_range, Embedding.coe_toHom, coeSubtype]
  

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S✝ S : Substructure L M
x : M
⊢ (∃ y, ↑y = x) ↔ x ∈ S

Next tactic:
refine' ⟨_, fun h => ⟨⟨x, h⟩, rfl⟩⟩
theorem range_subtype (S : L.Substructure M) : S.subtype.toHom.range = S := by
  ext x
  simp only [Hom.mem_range, Embedding.coe_toHom, coeSubtype]
  refine' ⟨_, fun h => ⟨⟨x, h⟩, rfl⟩⟩
  

Proof state:
case h
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S✝ S : Substructure L M
x : M
⊢ (∃ y, ↑y = x) → x ∈ S

Next tactic:
rintro ⟨⟨y, hy⟩, rfl⟩
theorem range_subtype (S : L.Substructure M) : S.subtype.toHom.range = S := by
  ext x
  simp only [Hom.mem_range, Embedding.coe_toHom, coeSubtype]
  refine' ⟨_, fun h => ⟨⟨x, h⟩, rfl⟩⟩
  rintro ⟨⟨y, hy⟩, rfl⟩
  

Proof state:
case h.intro.mk
L : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
S✝ S : Substructure L M
y : M
hy : y ∈ S
⊢ ↑{ val := y, property := hy } ∈ S

Next tactic:
exact hy
theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
    chartAt (ModelProd HB F) x =
      (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
        (chartAt HB x.proj).prod (PartialHomeomorph.refl F) := by
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝⁶ : TopologicalSpace F
inst✝⁵ : TopologicalSpace (TotalSpace F E)
inst✝⁴ : (x : B) → TopologicalSpace (E x)
HB : Type u_7
inst✝³ : TopologicalSpace HB
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
⊢ chartAt (ModelProd HB F) x =
    (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
      PartialHomeomorph.prod (chartAt HB x.proj) (PartialHomeomorph.refl F)

Next tactic:
dsimp only [chartAt_comp, prodChartedSpace_chartAt, FiberBundle.chartedSpace'_chartAt,
    chartAt_self_eq]
theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
    chartAt (ModelProd HB F) x =
      (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
        (chartAt HB x.proj).prod (PartialHomeomorph.refl F) := by
  dsimp only [chartAt_comp, prodChartedSpace_chartAt, FiberBundle.chartedSpace'_chartAt,
    chartAt_self_eq]
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝⁶ : TopologicalSpace F
inst✝⁵ : TopologicalSpace (TotalSpace F E)
inst✝⁴ : (x : B) → TopologicalSpace (E x)
HB : Type u_7
inst✝³ : TopologicalSpace HB
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
⊢ (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
      PartialHomeomorph.prod (chartAt HB (↑(trivializationAt F E x.proj).toPartialHomeomorph x).1)
        (PartialHomeomorph.refl F) =
    (trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
      PartialHomeomorph.prod (chartAt HB x.proj) (PartialHomeomorph.refl F)

Next tactic:
rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_baseSet_trivializationAt F E x.proj)]
theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace F E) (y : ModelProd HB F)
    (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
    ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 := by
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝⁶ : TopologicalSpace F
inst✝⁵ : TopologicalSpace (TotalSpace F E)
inst✝⁴ : (x : B) → TopologicalSpace (E x)
HB : Type u_7
inst✝³ : TopologicalSpace HB
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
y : ModelProd HB F
hy : y ∈ (chartAt (ModelProd HB F) x).toPartialEquiv.target
⊢ (↑(PartialHomeomorph.symm (chartAt (ModelProd HB F) x)) y).proj = ↑(PartialHomeomorph.symm (chartAt HB x.proj)) y.1

Next tactic:
simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy ⊢
theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace F E) (y : ModelProd HB F)
    (hy : y ∈ (chartAt (ModelProd HB F) x).target) :
    ((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 := by
  simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy ⊢
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝⁶ : TopologicalSpace F
inst✝⁵ : TopologicalSpace (TotalSpace F E)
inst✝⁴ : (x : B) → TopologicalSpace (E x)
HB : Type u_7
inst✝³ : TopologicalSpace HB
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
y : ModelProd HB F
hy :
  y ∈ (chartAt HB x.proj).toPartialEquiv.target ×ˢ univ ∧
    ↑(PartialEquiv.symm (PartialEquiv.prod (chartAt HB x.proj).toPartialEquiv (PartialEquiv.refl F))) y ∈
      (trivializationAt F E x.proj).toPartialHomeomorph.toPartialEquiv.target
⊢ (↑(PartialHomeomorph.symm (trivializationAt F E x.proj).toPartialHomeomorph)
        (↑(PartialHomeomorph.symm (PartialHomeomorph.prod (chartAt HB x.proj) (PartialHomeomorph.refl F))) y)).proj =
    ↑(PartialHomeomorph.symm (chartAt HB x.proj)) y.1

Next tactic:
exact (trivializationAt F E x.proj).proj_symm_apply hy.2
protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
    extChartAt (IB.prod 𝓘(𝕜, F)) x =
      (trivializationAt F E x.proj).toPartialEquiv ≫
        (extChartAt IB x.proj).prod (PartialEquiv.refl F) := by
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
⊢ extChartAt (ModelWithCorners.prod IB 𝓘(𝕜, F)) x =
    (trivializationAt F E x.proj).toPartialHomeomorph.toPartialEquiv ≫
      PartialEquiv.prod (extChartAt IB x.proj) (PartialEquiv.refl F)

Next tactic:
simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
    extChartAt (IB.prod 𝓘(𝕜, F)) x =
      (trivializationAt F E x.proj).toPartialEquiv ≫
        (extChartAt IB x.proj).prod (PartialEquiv.refl F) := by
  simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
  

Proof state:
𝕜 : Type u_1
B : Type u_2
B' : Type u_3
F : Type u_4
M : Type u_5
E : B → Type u_6
inst✝¹⁶ : NontriviallyNormedField 𝕜
inst✝¹⁵ : NormedAddCommGroup F
inst✝¹⁴ : NormedSpace 𝕜 F
inst✝¹³ : TopologicalSpace (TotalSpace F E)
inst✝¹² : (x : B) → TopologicalSpace (E x)
EB : Type u_7
inst✝¹¹ : NormedAddCommGroup EB
inst✝¹⁰ : NormedSpace 𝕜 EB
HB : Type u_8
inst✝⁹ : TopologicalSpace HB
IB : ModelWithCorners 𝕜 EB HB
E' : B → Type u_9
inst✝⁸ : (x : B) → Zero (E' x)
EM : Type u_10
inst✝⁷ : NormedAddCommGroup EM
inst✝⁶ : NormedSpace 𝕜 EM
HM : Type u_11
inst✝⁵ : TopologicalSpace HM
IM : ModelWithCorners 𝕜 EM HM
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace HM M
Is : SmoothManifoldWithCorners IM M
n : ℕ∞
inst✝² : TopologicalSpace B
inst✝¹ : ChartedSpace HB B
inst✝ : FiberBundle F E
x : TotalSpace F E
⊢ ((trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
          PartialHomeomorph.prod (chartAt HB x.proj) (PartialHomeomorph.refl F)).toPartialEquiv ≫
      (ModelWithCorners.prod IB 𝓘(𝕜, F)).toPartialEquiv =
    (trivializationAt F E x.proj).toPartialHomeomorph.toPartialEquiv ≫
      PartialEquiv.prod ((chartAt HB x.proj).toPartialEquiv ≫ IB.toPartialEquiv) (PartialEquiv.refl F)

Next tactic:
simp only [PartialEquiv.trans_assoc, mfld_simps]