[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
a b : StructureGroupoid H
h : a.members = b.members
⊢ a = b
[PROOFSTEP]
cases a
[GOAL]
case mk
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
b : StructureGroupoid H
members✝ : Set (LocalHomeomorph H H)
trans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝
symm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝ → LocalHomeomorph.symm e ∈ members✝
id_mem'✝ : LocalHomeomorph.refl H ∈ members✝
locality'✝ :
  ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝) → e ∈ members✝
eq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ≈ e → e' ∈ members✝
h :
  { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,
        eq_on_source' := eq_on_source'✝ }.members =
    b.members
⊢ { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,
      eq_on_source' := eq_on_source'✝ } =
    b
[PROOFSTEP]
cases b
[GOAL]
case mk.mk
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
members✝¹ : Set (LocalHomeomorph H H)
trans'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝¹ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹
id_mem'✝¹ : LocalHomeomorph.refl H ∈ members✝¹
locality'✝¹ :
  ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹
members✝ : Set (LocalHomeomorph H H)
trans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝
symm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝ → LocalHomeomorph.symm e ∈ members✝
id_mem'✝ : LocalHomeomorph.refl H ∈ members✝
locality'✝ :
  ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝) → e ∈ members✝
eq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ≈ e → e' ∈ members✝
h :
  { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,
        eq_on_source' := eq_on_source'✝¹ }.members =
    { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,
        eq_on_source' := eq_on_source'✝ }.members
⊢ { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,
      eq_on_source' := eq_on_source'✝¹ } =
    { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,
      eq_on_source' := eq_on_source'✝ }
[PROOFSTEP]
dsimp at h 
[GOAL]
case mk.mk
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
members✝¹ : Set (LocalHomeomorph H H)
trans'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝¹ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹
id_mem'✝¹ : LocalHomeomorph.refl H ∈ members✝¹
locality'✝¹ :
  ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹
members✝ : Set (LocalHomeomorph H H)
trans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝
symm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝ → LocalHomeomorph.symm e ∈ members✝
id_mem'✝ : LocalHomeomorph.refl H ∈ members✝
locality'✝ :
  ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝) → e ∈ members✝
eq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝ → e' ≈ e → e' ∈ members✝
h : members✝¹ = members✝
⊢ { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,
      eq_on_source' := eq_on_source'✝¹ } =
    { members := members✝, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,
      eq_on_source' := eq_on_source'✝ }
[PROOFSTEP]
induction h
[GOAL]
case mk.mk.refl
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
members✝¹ : Set (LocalHomeomorph H H)
trans'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝¹ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹
id_mem'✝¹ : LocalHomeomorph.refl H ∈ members✝¹
locality'✝¹ :
  ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝¹ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹
members✝ : Set (LocalHomeomorph H H)
trans'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝ : ∀ (e : LocalHomeomorph H H), e ∈ members✝¹ → LocalHomeomorph.symm e ∈ members✝¹
id_mem'✝ : LocalHomeomorph.refl H ∈ members✝¹
locality'✝ :
  ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝ : ∀ (e e' : LocalHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹
⊢ { members := members✝¹, trans' := trans'✝¹, symm' := symm'✝¹, id_mem' := id_mem'✝¹, locality' := locality'✝¹,
      eq_on_source' := eq_on_source'✝¹ } =
    { members := members✝¹, trans' := trans'✝, symm' := symm'✝, id_mem' := id_mem'✝, locality' := locality'✝,
      eq_on_source' := eq_on_source'✝ }
[PROOFSTEP]
rfl
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
he' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
cases' he with he he
[GOAL]
case inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
he : e ∈ {LocalHomeomorph.refl H}
⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
simpa only [mem_singleton_iff.1 he, refl_trans]
[GOAL]
case inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
he : e ∈ {e | e.source = ∅}
⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
have : (e ≫ₕ e').source ⊆ e.source := sep_subset _ _
[GOAL]
case inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
he : e ∈ {e | e.source = ∅}
this : (e ≫ₕ e').toLocalEquiv.source ⊆ e.source
⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
rw [he] at this 
[GOAL]
case inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
he : e ∈ {e | e.source = ∅}
this : (e ≫ₕ e').toLocalEquiv.source ⊆ ∅
⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
have : e ≫ₕ e' ∈ {e : LocalHomeomorph H H | e.source = ∅} := eq_bot_iff.2 this
[GOAL]
case inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he' : e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
he : e ∈ {e | e.source = ∅}
this✝ : (e ≫ₕ e').toLocalEquiv.source ⊆ ∅
this : e ≫ₕ e' ∈ {e | e.source = ∅}
⊢ e ≫ₕ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
exact (mem_union _ _ _).2 (Or.inr this)
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ LocalHomeomorph.symm e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
cases' (mem_union _ _ _).1 he with E E
[GOAL]
case inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
E : e ∈ {LocalHomeomorph.refl H}
⊢ LocalHomeomorph.symm e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
simp [mem_singleton_iff.mp E]
[GOAL]
case inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
E : e ∈ {e | e.source = ∅}
⊢ LocalHomeomorph.symm e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
right
[GOAL]
case inr.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
E : e ∈ {e | e.source = ∅}
⊢ LocalHomeomorph.symm e ∈ {e | e.source = ∅}
[PROOFSTEP]
simpa only [e.toLocalEquiv.image_source_eq_target.symm, mfld_simps] using E
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
cases' e.source.eq_empty_or_nonempty with h h
[GOAL]
case inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
h : e.source = ∅
⊢ e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
right
[GOAL]
case inl.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
h : e.source = ∅
⊢ e ∈ {e | e.source = ∅}
[PROOFSTEP]
exact h
[GOAL]
case inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
h : Set.Nonempty e.source
⊢ e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
left
[GOAL]
case inr.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
h : Set.Nonempty e.source
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
rcases h with ⟨x, hx⟩
[GOAL]
case inr.h.intro
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
rcases he x hx with ⟨s, open_s, xs, hs⟩
[GOAL]
case inr.h.intro.intro.intro.intro
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
have x's : x ∈ (e.restr s).source := by
  rw [restr_source, open_s.interior_eq]
  exact ⟨hx, xs⟩
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
[PROOFSTEP]
rw [restr_source, open_s.interior_eq]
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ x ∈ e.source ∩ s
[PROOFSTEP]
exact ⟨hx, xs⟩
[GOAL]
case inr.h.intro.intro.intro.intro
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
cases' hs with hs hs
[GOAL]
case inr.h.intro.intro.intro.intro.inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H}
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
replace hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
[GOAL]
case hs
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H}
⊢ LocalHomeomorph.restr e s = LocalHomeomorph.refl H
[PROOFSTEP]
simpa only using hs
[GOAL]
case inr.h.intro.intro.intro.intro.inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
have : (e.restr s).source = univ := by
  rw [hs]
  simp
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
⊢ (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
[PROOFSTEP]
rw [hs]
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
⊢ (LocalHomeomorph.refl H).toLocalEquiv.source = univ
[PROOFSTEP]
simp
[GOAL]
case inr.h.intro.intro.intro.intro.inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
this : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
have : e.toLocalEquiv.source ∩ interior s = univ := this
[GOAL]
case inr.h.intro.intro.intro.intro.inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
this✝ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
this : e.source ∩ interior s = univ
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
have : univ ⊆ interior s := by
  rw [← this]
  exact inter_subset_right _ _
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
this✝ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
this : e.source ∩ interior s = univ
⊢ univ ⊆ interior s
[PROOFSTEP]
rw [← this]
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
this✝ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
this : e.source ∩ interior s = univ
⊢ e.source ∩ interior s ⊆ interior s
[PROOFSTEP]
exact inter_subset_right _ _
[GOAL]
case inr.h.intro.intro.intro.intro.inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
this✝¹ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
this✝ : e.source ∩ interior s = univ
this : univ ⊆ interior s
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
have : s = univ := by rwa [open_s.interior_eq, univ_subset_iff] at this 
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
this✝¹ : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
this✝ : e.source ∩ interior s = univ
this : univ ⊆ interior s
⊢ s = univ
[PROOFSTEP]
rwa [open_s.interior_eq, univ_subset_iff] at this 
[GOAL]
case inr.h.intro.intro.intro.intro.inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s = LocalHomeomorph.refl H
this✝² : (LocalHomeomorph.restr e s).toLocalEquiv.source = univ
this✝¹ : e.source ∩ interior s = univ
this✝ : univ ⊆ interior s
this : s = univ
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
simpa only [this, restr_univ] using hs
[GOAL]
case inr.h.intro.intro.intro.intro.inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s ∈ {e | e.source = ∅}
⊢ e ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
exfalso
[GOAL]
case inr.h.intro.intro.intro.intro.inr.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : LocalHomeomorph.restr e s ∈ {e | e.source = ∅}
⊢ False
[PROOFSTEP]
rw [mem_setOf_eq] at hs 
[GOAL]
case inr.h.intro.intro.intro.intro.inr.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
x : H
hx : x ∈ e.source
s : Set H
open_s : IsOpen s
xs : x ∈ s
x's : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
hs : (LocalHomeomorph.restr e s).toLocalEquiv.source = ∅
⊢ False
[PROOFSTEP]
rwa [hs] at x's 
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he : e ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
he'e : e' ≈ e
⊢ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
cases' he with he he
[GOAL]
case inl
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
⊢ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
left
[GOAL]
case inl.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
⊢ e' ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
have : e = e' := by refine' eq_of_eq_on_source_univ (Setoid.symm he'e) _ _ <;> rw [Set.mem_singleton_iff.1 he] <;> rfl
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
⊢ e = e'
[PROOFSTEP]
refine' eq_of_eq_on_source_univ (Setoid.symm he'e) _ _
[GOAL]
case refine'_1
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
⊢ e.source = univ
[PROOFSTEP]
rw [Set.mem_singleton_iff.1 he]
[GOAL]
case refine'_2
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
⊢ e.target = univ
[PROOFSTEP]
rw [Set.mem_singleton_iff.1 he]
[GOAL]
case refine'_1
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
⊢ (LocalHomeomorph.refl H).toLocalEquiv.source = univ
[PROOFSTEP]
rfl
[GOAL]
case refine'_2
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
⊢ (LocalHomeomorph.refl H).toLocalEquiv.target = univ
[PROOFSTEP]
rfl
[GOAL]
case inl.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {LocalHomeomorph.refl H}
this : e = e'
⊢ e' ∈ {LocalHomeomorph.refl H}
[PROOFSTEP]
rwa [← this]
[GOAL]
case inr
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {e | e.source = ∅}
⊢ e' ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
[PROOFSTEP]
right
[GOAL]
case inr.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he : e ∈ {e | e.source = ∅}
⊢ e' ∈ {e | e.source = ∅}
[PROOFSTEP]
have he : e.toLocalEquiv.source = ∅ := he
[GOAL]
case inr.h
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹ : TopologicalSpace H✝
H : Type u
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
he'e : e' ≈ e
he✝ : e ∈ {e | e.source = ∅}
he : e.source = ∅
⊢ e' ∈ {e | e.source = ∅}
[PROOFSTEP]
rwa [Set.mem_setOf_eq, EqOnSource.source_eq he'e]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
⊢ ∀ (a : StructureGroupoid H), ⊥ ≤ a
[PROOFSTEP]
intro u f hf
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf : f ∈ ⊥.members
⊢ f ∈ u.members
[PROOFSTEP]
have hf : f ∈ {LocalHomeomorph.refl H} ∪ {e : LocalHomeomorph H H | e.source = ∅} := hf
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f ∈ {LocalHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ f ∈ u.members
[PROOFSTEP]
simp only [singleton_union, mem_setOf_eq, mem_insert_iff] at hf 
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f = LocalHomeomorph.refl H ∨ f.source = ∅
⊢ f ∈ u.members
[PROOFSTEP]
cases' hf with hf hf
[GOAL]
case inl
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f = LocalHomeomorph.refl H
⊢ f ∈ u.members
[PROOFSTEP]
rw [hf]
[GOAL]
case inl
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f = LocalHomeomorph.refl H
⊢ LocalHomeomorph.refl H ∈ u.members
[PROOFSTEP]
apply u.id_mem
[GOAL]
case inr
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f.source = ∅
⊢ f ∈ u.members
[PROOFSTEP]
apply u.locality
[GOAL]
case inr
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f.source = ∅
⊢ ∀ (x : H), x ∈ f.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr f s ∈ u
[PROOFSTEP]
intro x hx
[GOAL]
case inr
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f.source = ∅
x : H
hx : x ∈ f.source
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr f s ∈ u
[PROOFSTEP]
rw [hf, mem_empty_iff_false] at hx 
[GOAL]
case inr
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
u : StructureGroupoid H
f : LocalHomeomorph H H
hf✝ : f ∈ ⊥.members
hf : f.source = ∅
x : H
hx : False
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr f s ∈ u
[PROOFSTEP]
exact hx.elim
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
he' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ e ≫ₕ e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
[PROOFSTEP]
constructor
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
he' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ property PG (↑(e ≫ₕ e')) (e ≫ₕ e').toLocalEquiv.source
[PROOFSTEP]
apply PG.comp he.1 he'.1 e.open_source e'.open_source
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
he' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ IsOpen (e.source ∩ ↑e ⁻¹' e'.source)
[PROOFSTEP]
apply e.continuous_toFun.preimage_open_of_open e.open_source e'.open_source
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
he' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ property PG (↑(LocalHomeomorph.symm (e ≫ₕ e'))) (e ≫ₕ e').toLocalEquiv.target
[PROOFSTEP]
apply PG.comp he'.2 he.2 e'.open_target e.open_target
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
he' : e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ IsOpen (e'.target ∩ ↑(LocalHomeomorph.symm e') ⁻¹' e.target)
[PROOFSTEP]
apply e'.continuous_invFun.preimage_open_of_open e'.open_target e.open_target
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
[PROOFSTEP]
constructor
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ property PG (↑e) e.source
[PROOFSTEP]
refine' PG.locality e.open_source fun x xu ↦ _
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.source
⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑e) (e.source ∩ v)
[PROOFSTEP]
rcases he x xu with ⟨s, s_open, xs, hs⟩
[GOAL]
case left.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.source
s : Set H
s_open : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑e) (e.source ∩ v)
[PROOFSTEP]
refine' ⟨s, s_open, xs, _⟩
[GOAL]
case left.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.source
s : Set H
s_open : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ property PG (↑e) (e.source ∩ s)
[PROOFSTEP]
convert hs.1 using 1
[GOAL]
case h.e'_5
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.source
s : Set H
s_open : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ e.source ∩ s = (LocalHomeomorph.restr e s).toLocalEquiv.source
[PROOFSTEP]
dsimp [LocalHomeomorph.restr]
[GOAL]
case h.e'_5
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.source
s : Set H
s_open : IsOpen s
xs : x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ e.source ∩ s = e.source ∩ interior s
[PROOFSTEP]
rw [s_open.interior_eq]
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ property PG (↑(LocalHomeomorph.symm e)) e.target
[PROOFSTEP]
refine' PG.locality e.open_target fun x xu ↦ _
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.target
⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ v)
[PROOFSTEP]
rcases he (e.symm x) (e.map_target xu) with ⟨s, s_open, xs, hs⟩
[GOAL]
case right.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.target
s : Set H
s_open : IsOpen s
xs : ↑(LocalHomeomorph.symm e) x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ ∃ v, IsOpen v ∧ x ∈ v ∧ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ v)
[PROOFSTEP]
refine' ⟨e.target ∩ e.symm ⁻¹' s, _, ⟨xu, xs⟩, _⟩
[GOAL]
case right.intro.intro.intro.refine'_1
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.target
s : Set H
s_open : IsOpen s
xs : ↑(LocalHomeomorph.symm e) x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ IsOpen (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s)
[PROOFSTEP]
exact ContinuousOn.preimage_open_of_open e.continuous_invFun e.open_target s_open
[GOAL]
case right.intro.intro.intro.refine'_2
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.target
s : Set H
s_open : IsOpen s
xs : ↑(LocalHomeomorph.symm e) x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s))
[PROOFSTEP]
rw [← inter_assoc, inter_self]
[GOAL]
case right.intro.intro.intro.refine'_2
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.target
s : Set H
s_open : IsOpen s
xs : ↑(LocalHomeomorph.symm e) x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ property PG (↑(LocalHomeomorph.symm e)) (e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s)
[PROOFSTEP]
convert hs.2 using 1
[GOAL]
case h.e'_5
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.target
s : Set H
s_open : IsOpen s
xs : ↑(LocalHomeomorph.symm e) x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s = (LocalHomeomorph.restr e s).toLocalEquiv.target
[PROOFSTEP]
dsimp [LocalHomeomorph.restr]
[GOAL]
case h.e'_5
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e : LocalHomeomorph H H
he :
  ∀ (x : H),
    x ∈ e.source →
      ∃ s,
        IsOpen s ∧
          x ∈ s ∧
            LocalHomeomorph.restr e s ∈
              {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
x : H
xu : x ∈ e.target
s : Set H
s_open : IsOpen s
xs : ↑(LocalHomeomorph.symm e) x ∈ s
hs : LocalHomeomorph.restr e s ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
⊢ e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' s = e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' interior s
[PROOFSTEP]
rw [s_open.interior_eq]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
ee' : e' ≈ e
⊢ e' ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
[PROOFSTEP]
constructor
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
ee' : e' ≈ e
⊢ property PG (↑e') e'.source
[PROOFSTEP]
apply PG.congr e'.open_source ee'.2
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
ee' : e' ≈ e
⊢ property PG (fun x => ↑e x) e'.source
[PROOFSTEP]
simp only [ee'.1, he.1]
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
ee' : e' ≈ e
⊢ property PG (↑(LocalHomeomorph.symm e')) e'.target
[PROOFSTEP]
have A := EqOnSource.symm' ee'
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
ee' : e' ≈ e
A : LocalHomeomorph.symm e' ≈ LocalHomeomorph.symm e
⊢ property PG (↑(LocalHomeomorph.symm e')) e'.target
[PROOFSTEP]
apply
  PG.congr e'.symm.open_source
    A.2
      -- Porting note: was
            -- convert he.2
            -- rw [A.1]
            -- rfl
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
ee' : e' ≈ e
A : LocalHomeomorph.symm e' ≈ LocalHomeomorph.symm e
⊢ property PG (fun x => ↑(LocalHomeomorph.symm e) x) (LocalHomeomorph.symm e').toLocalEquiv.source
[PROOFSTEP]
rw [A.1, symm_toLocalEquiv, LocalEquiv.symm_source]
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he : e ∈ {e | property PG (↑e) e.source ∧ property PG (↑(LocalHomeomorph.symm e)) e.target}
ee' : e' ≈ e
A : LocalHomeomorph.symm e' ≈ LocalHomeomorph.symm e
⊢ property PG (fun x => ↑(LocalHomeomorph.symm e) x) e.target
[PROOFSTEP]
exact he.2
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG₁ PG₂ : Pregroupoid H
h : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s
⊢ Pregroupoid.groupoid PG₁ ≤ Pregroupoid.groupoid PG₂
[PROOFSTEP]
refine' StructureGroupoid.le_iff.2 fun e he ↦ _
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG₁ PG₂ : Pregroupoid H
h : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s
e : LocalHomeomorph H H
he : e ∈ Pregroupoid.groupoid PG₁
⊢ e ∈ Pregroupoid.groupoid PG₂
[PROOFSTEP]
rw [mem_groupoid_of_pregroupoid] at he ⊢
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG₁ PG₂ : Pregroupoid H
h : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s
e : LocalHomeomorph H H
he : Pregroupoid.property PG₁ (↑e) e.source ∧ Pregroupoid.property PG₁ (↑(LocalHomeomorph.symm e)) e.target
⊢ Pregroupoid.property PG₂ (↑e) e.source ∧ Pregroupoid.property PG₂ (↑(LocalHomeomorph.symm e)) e.target
[PROOFSTEP]
exact ⟨h _ _ he.1, h _ _ he.2⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he' : e ≈ e'
he : Pregroupoid.property PG (↑e) e.source
⊢ Pregroupoid.property PG (↑e') e'.source
[PROOFSTEP]
rw [← he'.1]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
PG : Pregroupoid H
e e' : LocalHomeomorph H H
he' : e ≈ e'
he : Pregroupoid.property PG (↑e) e.source
⊢ Pregroupoid.property PG (↑e') e.source
[PROOFSTEP]
exact PG.congr e.open_source he'.eqOn.symm he
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
⊢ ∀ (e e' : LocalHomeomorph H H),
    e ∈ {e | ∃ s h, e ≈ ofSet s h} → e' ∈ {e | ∃ s h, e ≈ ofSet s h} → e ≫ₕ e' ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
rintro e e' ⟨s, hs, hse⟩ ⟨s', hs', hse'⟩
[GOAL]
case intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hse : e ≈ ofSet s hs
s' : Set H
hs' : IsOpen s'
hse' : e' ≈ ofSet s' hs'
⊢ e ≫ₕ e' ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
refine' ⟨s ∩ s', IsOpen.inter hs hs', _⟩
[GOAL]
case intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hse : e ≈ ofSet s hs
s' : Set H
hs' : IsOpen s'
hse' : e' ≈ ofSet s' hs'
⊢ e ≫ₕ e' ≈ ofSet (s ∩ s') (_ : IsOpen (s ∩ s'))
[PROOFSTEP]
have := LocalHomeomorph.EqOnSource.trans' hse hse'
[GOAL]
case intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hse : e ≈ ofSet s hs
s' : Set H
hs' : IsOpen s'
hse' : e' ≈ ofSet s' hs'
this : e ≫ₕ e' ≈ ofSet s hs ≫ₕ ofSet s' hs'
⊢ e ≫ₕ e' ≈ ofSet (s ∩ s') (_ : IsOpen (s ∩ s'))
[PROOFSTEP]
rwa [LocalHomeomorph.ofSet_trans_ofSet] at this 
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
⊢ ∀ (e : LocalHomeomorph H H), e ∈ {e | ∃ s h, e ≈ ofSet s h} → LocalHomeomorph.symm e ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
rintro e ⟨s, hs, hse⟩
[GOAL]
case intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hse : e ≈ ofSet s hs
⊢ LocalHomeomorph.symm e ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
refine' ⟨s, hs, _⟩
[GOAL]
case intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hse : e ≈ ofSet s hs
⊢ LocalHomeomorph.symm e ≈ ofSet s hs
[PROOFSTEP]
rw [← ofSet_symm]
[GOAL]
case intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hse : e ≈ ofSet s hs
⊢ LocalHomeomorph.symm e ≈ LocalHomeomorph.symm (ofSet s hs)
[PROOFSTEP]
exact LocalHomeomorph.EqOnSource.symm' hse
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
⊢ LocalHomeomorph.refl H ≈ ofSet univ (_ : IsOpen univ)
[PROOFSTEP]
simp only [mfld_simps, refl]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
⊢ ∀ (e : LocalHomeomorph H H),
    (∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}) →
      e ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
intro e h
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
⊢ e ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
refine' ⟨e.source, e.open_source, by simp only [mfld_simps], _⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
⊢ e.source = (ofSet e.source (_ : IsOpen e.source)).toLocalEquiv.source
[PROOFSTEP]
simp only [mfld_simps]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
⊢ EqOn (↑e) (↑(ofSet e.source (_ : IsOpen e.source))) e.source
[PROOFSTEP]
intro x hx
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
x : H
hx : x ∈ e.source
⊢ ↑e x = ↑(ofSet e.source (_ : IsOpen e.source)) x
[PROOFSTEP]
rcases h x hx with ⟨s, hs, hxs, s', hs', hes'⟩
[GOAL]
case intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
x : H
hx : x ∈ e.source
s : Set H
hs : IsOpen s
hxs : x ∈ s
s' : Set H
hs' : IsOpen s'
hes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'
⊢ ↑e x = ↑(ofSet e.source (_ : IsOpen e.source)) x
[PROOFSTEP]
have hes : x ∈ (e.restr s).source := by
  rw [e.restr_source]
  refine' ⟨hx, _⟩
  rw [hs.interior_eq]
  exact hxs
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
x : H
hx : x ∈ e.source
s : Set H
hs : IsOpen s
hxs : x ∈ s
s' : Set H
hs' : IsOpen s'
hes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'
⊢ x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
[PROOFSTEP]
rw [e.restr_source]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
x : H
hx : x ∈ e.source
s : Set H
hs : IsOpen s
hxs : x ∈ s
s' : Set H
hs' : IsOpen s'
hes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'
⊢ x ∈ e.source ∩ interior s
[PROOFSTEP]
refine' ⟨hx, _⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
x : H
hx : x ∈ e.source
s : Set H
hs : IsOpen s
hxs : x ∈ s
s' : Set H
hs' : IsOpen s'
hes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'
⊢ x ∈ interior s
[PROOFSTEP]
rw [hs.interior_eq]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
x : H
hx : x ∈ e.source
s : Set H
hs : IsOpen s
hxs : x ∈ s
s' : Set H
hs' : IsOpen s'
hes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'
⊢ x ∈ s
[PROOFSTEP]
exact hxs
[GOAL]
case intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
h : ∀ (x : H), x ∈ e.source → ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr e s ∈ {e | ∃ s h, e ≈ ofSet s h}
x : H
hx : x ∈ e.source
s : Set H
hs : IsOpen s
hxs : x ∈ s
s' : Set H
hs' : IsOpen s'
hes' : LocalHomeomorph.restr e s ≈ ofSet s' hs'
hes : x ∈ (LocalHomeomorph.restr e s).toLocalEquiv.source
⊢ ↑e x = ↑(ofSet e.source (_ : IsOpen e.source)) x
[PROOFSTEP]
simpa only [mfld_simps] using LocalHomeomorph.EqOnSource.eqOn hes' hes
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
⊢ ∀ (e e' : LocalHomeomorph H H), e ∈ {e | ∃ s h, e ≈ ofSet s h} → e' ≈ e → e' ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
rintro e e' ⟨s, hs, hse⟩ hee'
[GOAL]
case intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e e' : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hse : e ≈ ofSet s hs
hee' : e' ≈ e
⊢ e' ∈ {e | ∃ s h, e ≈ ofSet s h}
[PROOFSTEP]
exact ⟨s, hs, Setoid.trans hee' hse⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
⊢ ∀ {e : LocalHomeomorph H H},
    e ∈ idRestrGroupoid → ∀ (s : Set H), IsOpen s → LocalHomeomorph.restr e s ∈ idRestrGroupoid
[PROOFSTEP]
rintro e ⟨s', hs', he⟩ s hs
[GOAL]
case intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s' : Set H
hs' : IsOpen s'
he : e ≈ ofSet s' hs'
s : Set H
hs : IsOpen s
⊢ LocalHomeomorph.restr e s ∈ idRestrGroupoid
[PROOFSTEP]
use s' ∩ s, IsOpen.inter hs' hs
[GOAL]
case h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s' : Set H
hs' : IsOpen s'
he : e ≈ ofSet s' hs'
s : Set H
hs : IsOpen s
⊢ LocalHomeomorph.restr e s ≈ ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))
[PROOFSTEP]
refine' Setoid.trans (LocalHomeomorph.EqOnSource.restr he s) _
[GOAL]
case h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s' : Set H
hs' : IsOpen s'
he : e ≈ ofSet s' hs'
s : Set H
hs : IsOpen s
⊢ LocalHomeomorph.restr (ofSet s' hs') s ≈ ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))
[PROOFSTEP]
exact ⟨by simp only [hs.interior_eq, mfld_simps], by simp only [mfld_simps, eqOn_refl]⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s' : Set H
hs' : IsOpen s'
he : e ≈ ofSet s' hs'
s : Set H
hs : IsOpen s
⊢ (LocalHomeomorph.restr (ofSet s' hs') s).toLocalEquiv.source =
    (ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))).toLocalEquiv.source
[PROOFSTEP]
simp only [hs.interior_eq, mfld_simps]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
e : LocalHomeomorph H H
s' : Set H
hs' : IsOpen s'
he : e ≈ ofSet s' hs'
s : Set H
hs : IsOpen s
⊢ EqOn (↑(LocalHomeomorph.restr (ofSet s' hs') s)) (↑(ofSet (s' ∩ s) (_ : IsOpen (s' ∩ s))))
    (LocalHomeomorph.restr (ofSet s' hs') s).toLocalEquiv.source
[PROOFSTEP]
simp only [mfld_simps, eqOn_refl]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
⊢ ClosedUnderRestriction G ↔ idRestrGroupoid ≤ G
[PROOFSTEP]
constructor
[GOAL]
case mp
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
⊢ ClosedUnderRestriction G → idRestrGroupoid ≤ G
[PROOFSTEP]
intro _i
[GOAL]
case mp
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
⊢ idRestrGroupoid ≤ G
[PROOFSTEP]
apply StructureGroupoid.le_iff.mpr
[GOAL]
case mp
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
⊢ ∀ (e : LocalHomeomorph H H), e ∈ idRestrGroupoid → e ∈ G
[PROOFSTEP]
rintro e ⟨s, hs, hes⟩
[GOAL]
case mp.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hes : e ≈ ofSet s hs
⊢ e ∈ G
[PROOFSTEP]
refine' G.eq_on_source _ hes
[GOAL]
case mp.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hes : e ≈ ofSet s hs
⊢ ofSet s hs ∈ G
[PROOFSTEP]
convert closedUnderRestriction' G.id_mem hs
[GOAL]
case h.e'_4
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hes : e ≈ ofSet s hs
⊢ ofSet s hs = LocalHomeomorph.restr (LocalHomeomorph.refl H) s
[PROOFSTEP]
ext
[GOAL]
case h.e'_4.h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hes : e ≈ ofSet s hs
x✝ : H
⊢ ↑(ofSet s hs) x✝ = ↑(LocalHomeomorph.restr (LocalHomeomorph.refl H) s) x✝
[PROOFSTEP]
rw [LocalHomeomorph.restr_apply, LocalHomeomorph.refl_apply, id, ofSet_apply, id_eq]
[GOAL]
case h.e'_4.hinv
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hes : e ≈ ofSet s hs
x✝ : H
⊢ ↑(LocalHomeomorph.symm (ofSet s hs)) x✝ =
    ↑(LocalHomeomorph.symm (LocalHomeomorph.restr (LocalHomeomorph.refl H) s)) x✝
[PROOFSTEP]
simp [hs]
[GOAL]
case h.e'_4.hs.h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
_i : ClosedUnderRestriction G
e : LocalHomeomorph H H
s : Set H
hs : IsOpen s
hes : e ≈ ofSet s hs
x✝ : H
⊢ x✝ ∈ (ofSet s hs).toLocalEquiv.source ↔ x✝ ∈ (LocalHomeomorph.restr (LocalHomeomorph.refl H) s).toLocalEquiv.source
[PROOFSTEP]
simp [hs.interior_eq]
[GOAL]
case mpr
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
⊢ idRestrGroupoid ≤ G → ClosedUnderRestriction G
[PROOFSTEP]
intro h
[GOAL]
case mpr
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
h : idRestrGroupoid ≤ G
⊢ ClosedUnderRestriction G
[PROOFSTEP]
constructor
[GOAL]
case mpr.closedUnderRestriction
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
h : idRestrGroupoid ≤ G
⊢ ∀ {e : LocalHomeomorph H H}, e ∈ G → ∀ (s : Set H), IsOpen s → LocalHomeomorph.restr e s ∈ G
[PROOFSTEP]
intro e he s hs
[GOAL]
case mpr.closedUnderRestriction
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
h : idRestrGroupoid ≤ G
e : LocalHomeomorph H H
he : e ∈ G
s : Set H
hs : IsOpen s
⊢ LocalHomeomorph.restr e s ∈ G
[PROOFSTEP]
rw [← ofSet_trans (e : LocalHomeomorph H H) hs]
[GOAL]
case mpr.closedUnderRestriction
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
h : idRestrGroupoid ≤ G
e : LocalHomeomorph H H
he : e ∈ G
s : Set H
hs : IsOpen s
⊢ ofSet s hs ≫ₕ e ∈ G
[PROOFSTEP]
refine' G.trans _ he
[GOAL]
case mpr.closedUnderRestriction
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
h : idRestrGroupoid ≤ G
e : LocalHomeomorph H H
he : e ∈ G
s : Set H
hs : IsOpen s
⊢ ofSet s hs ∈ G
[PROOFSTEP]
apply StructureGroupoid.le_iff.mp h
[GOAL]
case mpr.closedUnderRestriction.a
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G : StructureGroupoid H
h : idRestrGroupoid ≤ G
e : LocalHomeomorph H H
he : e ∈ G
s : Set H
hs : IsOpen s
⊢ ofSet s hs ∈ idRestrGroupoid
[PROOFSTEP]
exact idRestrGroupoid_mem hs
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SecondCountableTopology H
s : Set M
hs : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ
hsc : Set.Countable s
⊢ SecondCountableTopology M
[PROOFSTEP]
haveI : ∀ x : M, SecondCountableTopology (chartAt H x).source := fun x ↦
  (chartAt (H := H) x).secondCountableTopology_source
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SecondCountableTopology H
s : Set M
hs : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ
hsc : Set.Countable s
this : ∀ (x : M), SecondCountableTopology ↑(chartAt H x).toLocalEquiv.source
⊢ SecondCountableTopology M
[PROOFSTEP]
haveI := hsc.toEncodable
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SecondCountableTopology H
s : Set M
hs : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ
hsc : Set.Countable s
this✝ : ∀ (x : M), SecondCountableTopology ↑(chartAt H x).toLocalEquiv.source
this : Encodable ↑s
⊢ SecondCountableTopology M
[PROOFSTEP]
rw [biUnion_eq_iUnion] at hs 
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : SecondCountableTopology H
s : Set M
hs : ⋃ (x : ↑s), (chartAt H ↑x).toLocalEquiv.source = univ
hsc : Set.Countable s
this✝ : ∀ (x : M), SecondCountableTopology ↑(chartAt H x).toLocalEquiv.source
this : Encodable ↑s
⊢ SecondCountableTopology M
[PROOFSTEP]
exact secondCountableTopology_of_countable_cover (fun x : s ↦ (chartAt H (x : M)).open_source) hs
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
inst✝¹ : SecondCountableTopology H
inst✝ : SigmaCompactSpace M
⊢ SecondCountableTopology M
[PROOFSTEP]
obtain ⟨s, hsc, hsU⟩ : ∃ s, Set.Countable s ∧ ⋃ (x) (_ : x ∈ s), (chartAt H x).source = univ :=
  countable_cover_nhds_of_sigma_compact fun x : M ↦ chart_source_mem_nhds H x
[GOAL]
case intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
inst✝¹ : SecondCountableTopology H
inst✝ : SigmaCompactSpace M
s : Set M
hsc : Set.Countable s
hsU : ⋃ (x : M) (_ : x ∈ s), (chartAt H x).toLocalEquiv.source = univ
⊢ SecondCountableTopology M
[PROOFSTEP]
exact ChartedSpace.secondCountable_of_countable_cover H hsU hsc
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
⊢ LocallyCompactSpace M
[PROOFSTEP]
have :
  ∀ x : M,
    (𝓝 x).HasBasis (fun s ↦ s ∈ 𝓝 (chartAt H x x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s ↦
      (chartAt H x).symm '' s :=
  fun x ↦ by
  rw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]
  exact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset (chart_target_mem_nhds H x)).map _
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
x : M
⊢ HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>
    ↑(LocalHomeomorph.symm (chartAt H x)) '' s
[PROOFSTEP]
rw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
x : M
⊢ HasBasis (map (↑(LocalHomeomorph.symm (chartAt H x))) (𝓝 (↑(chartAt H x) x)))
    (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>
    ↑(LocalHomeomorph.symm (chartAt H x)) '' s
[PROOFSTEP]
exact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset (chart_target_mem_nhds H x)).map _
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>
      ↑(LocalHomeomorph.symm (chartAt H x)) '' s
⊢ LocallyCompactSpace M
[PROOFSTEP]
refine locallyCompactSpace_of_hasBasis this ?_
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>
      ↑(LocalHomeomorph.symm (chartAt H x)) '' s
⊢ ∀ (x : M) (i : Set H),
    i ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact i ∧ i ⊆ (chartAt H x).toLocalEquiv.target →
      IsCompact (↑(LocalHomeomorph.symm (chartAt H x)) '' i)
[PROOFSTEP]
rintro x s ⟨_, h₂, h₃⟩
[GOAL]
case intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    HasBasis (𝓝 x) (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).toLocalEquiv.target) fun s =>
      ↑(LocalHomeomorph.symm (chartAt H x)) '' s
x : M
s : Set H
left✝ : s ∈ 𝓝 (↑(chartAt H x) x)
h₂ : IsCompact s
h₃ : s ⊆ (chartAt H x).toLocalEquiv.target
⊢ IsCompact (↑(LocalHomeomorph.symm (chartAt H x)) '' s)
[PROOFSTEP]
exact h₂.image_of_continuousOn ((chartAt H x).continuousOn_symm.mono h₃)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyConnectedSpace H
⊢ LocallyConnectedSpace M
[PROOFSTEP]
let e : M → LocalHomeomorph M H := chartAt H
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyConnectedSpace H
e : M → LocalHomeomorph M H := chartAt H
⊢ LocallyConnectedSpace M
[PROOFSTEP]
refine'
  locallyConnectedSpace_of_connected_bases (fun x s ↦ (e x).symm '' s)
    (fun x s ↦ (IsOpen s ∧ e x x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) _ _
[GOAL]
case refine'_1
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyConnectedSpace H
e : M → LocalHomeomorph M H := chartAt H
⊢ ∀ (x : M),
    HasBasis (𝓝 x) ((fun x s => (IsOpen s ∧ ↑(e x) x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) x)
      ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x)
[PROOFSTEP]
intro x
[GOAL]
case refine'_1
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyConnectedSpace H
e : M → LocalHomeomorph M H := chartAt H
x : M
⊢ HasBasis (𝓝 x) ((fun x s => (IsOpen s ∧ ↑(e x) x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) x)
    ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x)
[PROOFSTEP]
simpa only [LocalHomeomorph.symm_map_nhds_eq, mem_chart_source] using
  ((LocallyConnectedSpace.open_connected_basis (e x x)).restrict_subset
        ((e x).open_target.mem_nhds (mem_chart_target H x))).map
    (e x).symm
[GOAL]
case refine'_2
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyConnectedSpace H
e : M → LocalHomeomorph M H := chartAt H
⊢ ∀ (x : M) (i : Set H),
    (fun x s => (IsOpen s ∧ ↑(e x) x ∈ s ∧ IsConnected s) ∧ s ⊆ (e x).target) x i →
      IsPreconnected ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x i)
[PROOFSTEP]
rintro x s ⟨⟨-, -, hsconn⟩, hssubset⟩
[GOAL]
case refine'_2.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyConnectedSpace H
e : M → LocalHomeomorph M H := chartAt H
x : M
s : Set H
hssubset : s ⊆ (e x).target
hsconn : IsConnected s
⊢ IsPreconnected ((fun x s => ↑(LocalHomeomorph.symm (e x)) '' s) x s)
[PROOFSTEP]
exact hsconn.isPreconnected.image _ ((e x).continuousOn_symm.mono hssubset)
[GOAL]
H✝ : Type u
H'✝ : Type u_1
M✝ : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁷ : TopologicalSpace H✝
inst✝⁶ : TopologicalSpace M✝
inst✝⁵ : ChartedSpace H✝ M✝
H : Type u_5
inst✝⁴ : TopologicalSpace H
H' : Type u_6
inst✝³ : TopologicalSpace H'
M : Type u_7
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H H'
inst✝ : ChartedSpace H' M
p : M
⊢ p ∈ ((fun p => chartAt H' p ≫ₕ chartAt H (↑(chartAt H' p) p)) p).source
[PROOFSTEP]
simp only [mfld_simps]
[GOAL]
H✝ : Type u
H'✝ : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
H : Type u_5
H' : Type u_6
α : Type u_7
f : H → α
⊢ (range fun p => (f p.fst, p.snd)) = range f ×ˢ univ
[PROOFSTEP]
rw [prod_range_univ_eq]
[GOAL]
H✝ : Type u
H'✝ : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
H : Type u_5
H' : Type u_6
α : Type u_7
f : H → α
⊢ (range fun p => (f p.fst, p.snd)) = range fun p => (f p.fst, p.snd)
[PROOFSTEP]
rfl
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace H M
inst✝² : TopologicalSpace H'
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
x : M × M'
⊢ prodChartedSpace H H H' H' = chartedSpaceSelf (H × H')
[PROOFSTEP]
ext1
[GOAL]
case atlas
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace H M
inst✝² : TopologicalSpace H'
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
x : M × M'
⊢ ChartedSpace.atlas = ChartedSpace.atlas
[PROOFSTEP]
simp [prodChartedSpace, atlas, ChartedSpace.atlas]
[GOAL]
case chartAt
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace H M
inst✝² : TopologicalSpace H'
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
x : M × M'
⊢ ChartedSpace.chartAt = ChartedSpace.chartAt
[PROOFSTEP]
ext1
[GOAL]
case chartAt.h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace H M
inst✝² : TopologicalSpace H'
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
x : M × M'
x✝ : H × H'
⊢ ChartedSpace.chartAt x✝ = ChartedSpace.chartAt x✝
[PROOFSTEP]
simp only [prodChartedSpace_chartAt, chartAt_self_eq, refl_prod_refl]
[GOAL]
case chartAt.h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁵ : TopologicalSpace H
inst✝⁴ : TopologicalSpace M
inst✝³ : ChartedSpace H M
inst✝² : TopologicalSpace H'
inst✝¹ : TopologicalSpace M'
inst✝ : ChartedSpace H' M'
x : M × M'
x✝ : H × H'
⊢ LocalHomeomorph.refl (H × H') = LocalHomeomorph.refl (ModelProd H H')
[PROOFSTEP]
rfl
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
⊢ IsOpen e.source
[PROOFSTEP]
apply TopologicalSpace.GenerateOpen.basic
[GOAL]
case a
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
⊢ e.source ∈ ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source}
[PROOFSTEP]
simp only [exists_prop, mem_iUnion, mem_singleton_iff]
[GOAL]
case a
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
⊢ ∃ i, i ∈ c.atlas ∧ ∃ i_1, IsOpen i_1 ∧ e.source = ↑i ⁻¹' i_1 ∩ i.source
[PROOFSTEP]
refine' ⟨e, he, univ, isOpen_univ, _⟩
[GOAL]
case a
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
⊢ e.source = ↑e ⁻¹' univ ∩ e.source
[PROOFSTEP]
simp only [Set.univ_inter, Set.preimage_univ]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
⊢ IsOpen e.target
[PROOFSTEP]
have E : e.target ∩ e.symm ⁻¹' e.source = e.target :=
  Subset.antisymm (inter_subset_left _ _) fun x hx ↦ ⟨hx, LocalEquiv.target_subset_preimage_source _ hx⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
he : e ∈ c.atlas
E : e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e.source = e.target
⊢ IsOpen e.target
[PROOFSTEP]
simpa [LocalEquiv.trans_source, E] using c.open_source e e he he
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ IsOpen
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.source
[PROOFSTEP]
convert c.open_source' he
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ IsOpen
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target
[PROOFSTEP]
convert c.open_target he
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ ContinuousOn
    ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.source
[PROOFSTEP]
letI : TopologicalSpace M := c.toTopologicalSpace
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ ContinuousOn
    ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.source
[PROOFSTEP]
rw [continuousOn_open_iff (c.open_source' he)]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ ∀ (t : Set H),
    IsOpen t →
      IsOpen
        (e.source ∩
          ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
                map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
                map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
                left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
                right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'
            t)
[PROOFSTEP]
intro s s_open
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
s : Set H
s_open : IsOpen s
⊢ IsOpen
    (e.source ∩
      ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'
        s)
[PROOFSTEP]
rw [inter_comm]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
s : Set H
s_open : IsOpen s
⊢ IsOpen
    (↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'
        s ∩
      e.source)
[PROOFSTEP]
apply TopologicalSpace.GenerateOpen.basic
[GOAL]
case a
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
s : Set H
s_open : IsOpen s
⊢ ↑{ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) } ⁻¹'
        s ∩
      e.source ∈
    ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source}
[PROOFSTEP]
simp only [exists_prop, mem_iUnion, mem_singleton_iff]
[GOAL]
case a
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
s : Set H
s_open : IsOpen s
⊢ ∃ i, i ∈ c.atlas ∧ ∃ i_1, IsOpen i_1 ∧ ↑e ⁻¹' s ∩ e.source = ↑i ⁻¹' i_1 ∩ i.source
[PROOFSTEP]
exact ⟨e, he, ⟨s, s_open, rfl⟩⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ ContinuousOn
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target
[PROOFSTEP]
letI : TopologicalSpace M := c.toTopologicalSpace
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ ContinuousOn
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun
    { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
        map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
        map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
        left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
        right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target
[PROOFSTEP]
apply continuousOn_open_of_generateFrom
[GOAL]
case h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
⊢ ∀ (t : Set M),
    t ∈ ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source} →
      IsOpen
        ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
              map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
              map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
              left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
              right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
          { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
                map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
                map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
                left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
                right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
            t)
[PROOFSTEP]
intro t ht
[GOAL]
case h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
ht : t ∈ ⋃ (e : LocalEquiv M H) (_ : e ∈ c.atlas) (s : Set H) (_ : IsOpen s), {↑e ⁻¹' s ∩ e.source}
⊢ IsOpen
    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
        t)
[PROOFSTEP]
simp only [exists_prop, mem_iUnion, mem_singleton_iff] at ht 
[GOAL]
case h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
ht : ∃ i, i ∈ c.atlas ∧ ∃ i_1, IsOpen i_1 ∧ t = ↑i ⁻¹' i_1 ∩ i.source
⊢ IsOpen
    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
        t)
[PROOFSTEP]
rcases ht with ⟨e', e'_atlas, s, s_open, ts⟩
[GOAL]
case h.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
⊢ IsOpen
    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
        t)
[PROOFSTEP]
rw [ts]
[GOAL]
case h.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
⊢ IsOpen
    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
        (↑e' ⁻¹' s ∩ e'.source))
[PROOFSTEP]
let f := e.symm.trans e'
[GOAL]
case h.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
f : LocalEquiv H H := LocalEquiv.symm e ≫ e'
⊢ IsOpen
    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
        (↑e' ⁻¹' s ∩ e'.source))
[PROOFSTEP]
have : IsOpen (f ⁻¹' s ∩ f.source) := by
  simpa [inter_comm] using
    (continuousOn_open_iff (c.open_source e e' he e'_atlas)).1 (c.continuous_toFun e e' he e'_atlas) s s_open
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
f : LocalEquiv H H := LocalEquiv.symm e ≫ e'
⊢ IsOpen (↑f ⁻¹' s ∩ f.source)
[PROOFSTEP]
simpa [inter_comm] using
  (continuousOn_open_iff (c.open_source e e' he e'_atlas)).1 (c.continuous_toFun e e' he e'_atlas) s s_open
[GOAL]
case h.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
f : LocalEquiv H H := LocalEquiv.symm e ≫ e'
this : IsOpen (↑f ⁻¹' s ∩ f.source)
⊢ IsOpen
    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
        (↑e' ⁻¹' s ∩ e'.source))
[PROOFSTEP]
have A :
  e' ∘ e.symm ⁻¹' s ∩ (e.target ∩ e.symm ⁻¹' e'.source) = e.target ∩ (e' ∘ e.symm ⁻¹' s ∩ e.symm ⁻¹' e'.source) :=
  by
  rw [← inter_assoc, ← inter_assoc]
  congr 1
  exact inter_comm _ _
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
f : LocalEquiv H H := LocalEquiv.symm e ≫ e'
this : IsOpen (↑f ⁻¹' s ∩ f.source)
⊢ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ (e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source) =
    e.target ∩ (↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source)
[PROOFSTEP]
rw [← inter_assoc, ← inter_assoc]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
f : LocalEquiv H H := LocalEquiv.symm e ≫ e'
this : IsOpen (↑f ⁻¹' s ∩ f.source)
⊢ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source =
    e.target ∩ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source
[PROOFSTEP]
congr 1
[GOAL]
case e_a
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
f : LocalEquiv H H := LocalEquiv.symm e ≫ e'
this : IsOpen (↑f ⁻¹' s ∩ f.source)
⊢ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ e.target = e.target ∩ ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s
[PROOFSTEP]
exact inter_comm _ _
[GOAL]
case h.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e✝ e : LocalEquiv M H
he : e ∈ c.atlas
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
this✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
t : Set M
e' : LocalEquiv M H
e'_atlas : e' ∈ c.atlas
s : Set H
s_open : IsOpen s
ts : t = ↑e' ⁻¹' s ∩ e'.source
f : LocalEquiv H H := LocalEquiv.symm e ≫ e'
this : IsOpen (↑f ⁻¹' s ∩ f.source)
A :
  ↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ (e.target ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source) =
    e.target ∩ (↑e' ∘ ↑(LocalEquiv.symm e) ⁻¹' s ∩ ↑(LocalEquiv.symm e) ⁻¹' e'.source)
⊢ IsOpen
    ({ toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
          map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
          map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
          left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
          right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.target ∩
      { toFun := ↑e, invFun := e.invFun, source := e.source, target := e.target,
            map_source' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → ↑e x ∈ e.target),
            map_target' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → LocalEquiv.invFun e x ∈ e.source),
            left_inv' := (_ : ∀ ⦃x : M⦄, x ∈ e.source → LocalEquiv.invFun e (↑e x) = x),
            right_inv' := (_ : ∀ ⦃x : H⦄, x ∈ e.target → ↑e (LocalEquiv.invFun e x) = x) }.invFun ⁻¹'
        (↑e' ⁻¹' s ∩ e'.source))
[PROOFSTEP]
simpa [LocalEquiv.trans_source, preimage_inter, preimage_comp.symm, A] using this
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
x : M
⊢ (fun x => ChartedSpaceCore.localHomeomorph c (chartAt c x) (_ : chartAt c x ∈ c.atlas)) x ∈
    ⋃ (e : LocalEquiv M H) (he : e ∈ c.atlas), {ChartedSpaceCore.localHomeomorph c e he}
[PROOFSTEP]
simp only [mem_iUnion, mem_singleton_iff]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
c : ChartedSpaceCore H M
e : LocalEquiv M H
src✝ : TopologicalSpace M := ChartedSpaceCore.toTopologicalSpace c
x : M
⊢ ∃ i h,
    ChartedSpaceCore.localHomeomorph c (chartAt c x) (_ : chartAt c x ∈ c.atlas) =
      ChartedSpaceCore.localHomeomorph c i (_ : i ∈ c.atlas)
[PROOFSTEP]
exact ⟨c.chartAt x, c.chart_mem_atlas x, rfl⟩
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H✝
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H✝ M
H : Type u_5
inst✝ : TopologicalSpace H
G : StructureGroupoid H
e e' : LocalHomeomorph H H
he : e ∈ atlas H H
he' : e' ∈ atlas H H
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
rw [chartedSpaceSelf_atlas] at he he' 
[GOAL]
H✝ : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H✝
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H✝ M
H : Type u_5
inst✝ : TopologicalSpace H
G : StructureGroupoid H
e e' : LocalHomeomorph H H
he : e = LocalHomeomorph.refl H
he' : e' = LocalHomeomorph.refl H
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
simp [he, he', StructureGroupoid.id_mem]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
⊢ HasGroupoid M (continuousGroupoid H)
[PROOFSTEP]
refine' ⟨fun _ _ ↦ _⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
e✝ e'✝ : LocalHomeomorph M H
x✝¹ : e✝ ∈ atlas H M
x✝ : e'✝ ∈ atlas H M
⊢ LocalHomeomorph.symm e✝ ≫ₕ e'✝ ∈ continuousGroupoid H
[PROOFSTEP]
rw [continuousGroupoid, mem_groupoid_of_pregroupoid]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
e✝ e'✝ : LocalHomeomorph M H
x✝¹ : e✝ ∈ atlas H M
x✝ : e'✝ ∈ atlas H M
⊢ Pregroupoid.property (continuousPregroupoid H) (↑(LocalHomeomorph.symm e✝ ≫ₕ e'✝))
      (LocalHomeomorph.symm e✝ ≫ₕ e'✝).toLocalEquiv.source ∧
    Pregroupoid.property (continuousPregroupoid H) (↑(LocalHomeomorph.symm (LocalHomeomorph.symm e✝ ≫ₕ e'✝)))
      (LocalHomeomorph.symm e✝ ≫ₕ e'✝).toLocalEquiv.target
[PROOFSTEP]
simp only [and_self_iff]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
refine' G.locality fun x hx ↦ _
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
set f := chartAt (H := H) (e.symm x)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
let s := e.target ∩ e.symm ⁻¹' f.source
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
have hs : IsOpen s := by apply e.symm.continuous_toFun.preimage_open_of_open <;> apply open_source
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
⊢ IsOpen s
[PROOFSTEP]
apply e.symm.continuous_toFun.preimage_open_of_open
[GOAL]
case hs
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
⊢ IsOpen (LocalHomeomorph.symm e).toLocalEquiv.source
[PROOFSTEP]
apply open_source
[GOAL]
case ht
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
⊢ IsOpen f.source
[PROOFSTEP]
apply open_source
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
have xs : x ∈ s := by
  simp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]
  exact ((mem_inter_iff _ _ _).1 hx).1
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
⊢ x ∈ s
[PROOFSTEP]
simp only [mem_inter_iff, mem_preimage, mem_chart_source, and_true]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
⊢ x ∈ e.target
[PROOFSTEP]
exact ((mem_inter_iff _ _ _).1 hx).1
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
refine' ⟨s, hs, xs, _⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
have A : e.symm ≫ₕ f ∈ G := (mem_maximalAtlas_iff.1 he f (chart_mem_atlas _ _)).1
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
have B : f.symm ≫ₕ e' ∈ G := (mem_maximalAtlas_iff.1 he' f (chart_mem_atlas _ _)).2
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
have C : (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' ∈ G := G.trans A B
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
C : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
have D : (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' ≈ (e.symm ≫ₕ e').restr s :=
  calc
    (e.symm ≫ₕ f) ≫ₕ f.symm ≫ₕ e' = e.symm ≫ₕ (f ≫ₕ f.symm) ≫ₕ e' := by simp only [trans_assoc]
    _ ≈ e.symm ≫ₕ ofSet f.source f.open_source ≫ₕ e' :=
      (EqOnSource.trans' (refl _) (EqOnSource.trans' (trans_self_symm _) (refl _)))
    _ ≈ (e.symm ≫ₕ ofSet f.source f.open_source) ≫ₕ e' := by rw [trans_assoc]
    _ ≈ e.symm.restr s ≫ₕ e' := by rw [trans_of_set']; apply refl
    _ ≈ (e.symm ≫ₕ e').restr s := by rw [restr_trans]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
C : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G
⊢ (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' =
    LocalHomeomorph.symm e ≫ₕ (f ≫ₕ LocalHomeomorph.symm f) ≫ₕ e'
[PROOFSTEP]
simp only [trans_assoc]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
C : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G
⊢ LocalHomeomorph.symm e ≫ₕ ofSet f.source (_ : IsOpen f.source) ≫ₕ e' ≈
    (LocalHomeomorph.symm e ≫ₕ ofSet f.source (_ : IsOpen f.source)) ≫ₕ e'
[PROOFSTEP]
rw [trans_assoc]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
C : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G
⊢ (LocalHomeomorph.symm e ≫ₕ ofSet f.source (_ : IsOpen f.source)) ≫ₕ e' ≈
    LocalHomeomorph.restr (LocalHomeomorph.symm e) s ≫ₕ e'
[PROOFSTEP]
rw [trans_of_set']
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
C : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e)
        ((LocalHomeomorph.symm e).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source) ≫ₕ
      e' ≈
    LocalHomeomorph.restr (LocalHomeomorph.symm e) s ≫ₕ e'
[PROOFSTEP]
apply refl
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
C : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e) s ≫ₕ e' ≈ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s
[PROOFSTEP]
rw [restr_trans]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
e e' : LocalHomeomorph M H
he : e ∈ maximalAtlas M G
he' : e' ∈ maximalAtlas M G
x : H
hx : x ∈ (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source
f : LocalHomeomorph M H := chartAt H (↑(LocalHomeomorph.symm e) x)
s : Set H := e.target ∩ ↑(LocalHomeomorph.symm e) ⁻¹' f.source
hs : IsOpen s
xs : x ∈ s
A : LocalHomeomorph.symm e ≫ₕ f ∈ G
B : LocalHomeomorph.symm f ≫ₕ e' ∈ G
C : (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ∈ G
D :
  (LocalHomeomorph.symm e ≫ₕ f) ≫ₕ LocalHomeomorph.symm f ≫ₕ e' ≈ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm e ≫ₕ e') s ∈ G
[PROOFSTEP]
exact G.eq_on_source C (Setoid.symm D)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
⊢ LocalHomeomorph.refl H ∈ atlas H H
[PROOFSTEP]
simp
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
f : LocalHomeomorph H H
hf : f ∈ G
⊢ f ∈ maximalAtlas H G
[PROOFSTEP]
rintro e (rfl : e = LocalHomeomorph.refl H)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝² : TopologicalSpace H
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
G : StructureGroupoid H
f : LocalHomeomorph H H
hf : f ∈ G
⊢ LocalHomeomorph.symm f ≫ₕ LocalHomeomorph.refl H ∈ G ∧ LocalHomeomorph.symm (LocalHomeomorph.refl H) ≫ₕ f ∈ G
[PROOFSTEP]
exact ⟨G.trans (G.symm hf) G.id_mem, G.trans (G.symm G.id_mem) hf⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
α : Type u_5
inst✝ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
x✝ : α
⊢ x✝ ∈ ((fun x => e) x✝).source
[PROOFSTEP]
rw [h]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
α : Type u_5
inst✝ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
x✝ : α
⊢ x✝ ∈ univ
[PROOFSTEP]
apply mem_univ
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
α : Type u_5
inst✝ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
x✝ : α
⊢ (fun x => e) x✝ ∈ {e}
[PROOFSTEP]
tauto
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
α : Type u_5
inst✝¹ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
G : StructureGroupoid H
inst✝ : ClosedUnderRestriction G
src✝ : ChartedSpace H α := singletonChartedSpace e h
⊢ ∀ {e_1 e' : LocalHomeomorph α H}, e_1 ∈ atlas H α → e' ∈ atlas H α → LocalHomeomorph.symm e_1 ≫ₕ e' ∈ G
[PROOFSTEP]
intro e' e'' he' he''
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
α : Type u_5
inst✝¹ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
G : StructureGroupoid H
inst✝ : ClosedUnderRestriction G
src✝ : ChartedSpace H α := singletonChartedSpace e h
e' e'' : LocalHomeomorph α H
he' : e' ∈ atlas H α
he'' : e'' ∈ atlas H α
⊢ LocalHomeomorph.symm e' ≫ₕ e'' ∈ G
[PROOFSTEP]
rw [e.singletonChartedSpace_mem_atlas_eq h e' he', e.singletonChartedSpace_mem_atlas_eq h e'' he'']
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
α : Type u_5
inst✝¹ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
G : StructureGroupoid H
inst✝ : ClosedUnderRestriction G
src✝ : ChartedSpace H α := singletonChartedSpace e h
e' e'' : LocalHomeomorph α H
he' : e' ∈ atlas H α
he'' : e'' ∈ atlas H α
⊢ LocalHomeomorph.symm e ≫ₕ e ∈ G
[PROOFSTEP]
refine' G.eq_on_source _ e.trans_symm_self
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
α : Type u_5
inst✝¹ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
G : StructureGroupoid H
inst✝ : ClosedUnderRestriction G
src✝ : ChartedSpace H α := singletonChartedSpace e h
e' e'' : LocalHomeomorph α H
he' : e' ∈ atlas H α
he'' : e'' ∈ atlas H α
⊢ ofSet e.target (_ : IsOpen e.target) ∈ G
[PROOFSTEP]
have hle : idRestrGroupoid ≤ G := (closedUnderRestriction_iff_id_le G).mp (by assumption)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
α : Type u_5
inst✝¹ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
G : StructureGroupoid H
inst✝ : ClosedUnderRestriction G
src✝ : ChartedSpace H α := singletonChartedSpace e h
e' e'' : LocalHomeomorph α H
he' : e' ∈ atlas H α
he'' : e'' ∈ atlas H α
⊢ ClosedUnderRestriction G
[PROOFSTEP]
assumption
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
α : Type u_5
inst✝¹ : TopologicalSpace α
e : LocalHomeomorph α H
h : e.source = univ
G : StructureGroupoid H
inst✝ : ClosedUnderRestriction G
src✝ : ChartedSpace H α := singletonChartedSpace e h
e' e'' : LocalHomeomorph α H
he' : e' ∈ atlas H α
he'' : e'' ∈ atlas H α
hle : idRestrGroupoid ≤ G
⊢ ofSet e.target (_ : IsOpen e.target) ∈ G
[PROOFSTEP]
exact StructureGroupoid.le_iff.mp hle _ (idRestrGroupoid_mem _)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s : Opens M
x : { x // x ∈ s }
⊢ (fun x => subtypeRestr (chartAt H ↑x) s) x ∈ ⋃ (x : { x // x ∈ s }), {subtypeRestr (chartAt H ↑x) s}
[PROOFSTEP]
simp only [mem_iUnion, mem_singleton_iff]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s : Opens M
x : { x // x ∈ s }
⊢ ∃ i, subtypeRestr (chartAt H ↑x) s = subtypeRestr (chartAt H ↑i) s
[PROOFSTEP]
use x
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
⊢ ∀ {e e' : LocalHomeomorph { x // x ∈ s } H},
    e ∈ atlas H { x // x ∈ s } → e' ∈ atlas H { x // x ∈ s } → LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
rintro e e' ⟨_, ⟨x, hc⟩, he⟩ ⟨_, ⟨x', hc'⟩, he'⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
he : e ∈ w✝¹
x : { x // x ∈ s }
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
he' : e' ∈ w✝
x' : { x // x ∈ s }
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
haveI : Nonempty s := ⟨x⟩
[GOAL]
case intro.intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
he : e ∈ w✝¹
x : { x // x ∈ s }
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
he' : e' ∈ w✝
x' : { x // x ∈ s }
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
have asdf := he
[GOAL]
case intro.intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
he : e ∈ w✝¹
x : { x // x ∈ s }
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
he' : e' ∈ w✝
x' : { x // x ∈ s }
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
asdf : e ∈ w✝¹
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
rw [hc.symm, mem_singleton_iff] at he 
[GOAL]
case intro.intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
x : { x // x ∈ s }
he : e = subtypeRestr (chartAt H ↑x) s
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
he' : e' ∈ w✝
x' : { x // x ∈ s }
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
asdf : e ∈ w✝¹
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
rw [hc'.symm, mem_singleton_iff] at he' 
[GOAL]
case intro.intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
x : { x // x ∈ s }
he : e = subtypeRestr (chartAt H ↑x) s
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
x' : { x // x ∈ s }
he' : e' = subtypeRestr (chartAt H ↑x') s
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
asdf : e ∈ w✝¹
⊢ LocalHomeomorph.symm e ≫ₕ e' ∈ G
[PROOFSTEP]
rw [he, he']
[GOAL]
case intro.intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
x : { x // x ∈ s }
he : e = subtypeRestr (chartAt H ↑x) s
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
x' : { x // x ∈ s }
he' : e' = subtypeRestr (chartAt H ↑x') s
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
asdf : e ∈ w✝¹
⊢ LocalHomeomorph.symm (subtypeRestr (chartAt H ↑x) s) ≫ₕ subtypeRestr (chartAt H ↑x') s ∈ G
[PROOFSTEP]
refine' G.eq_on_source _ (subtypeRestr_symm_trans_subtypeRestr s (chartAt H x) (chartAt H x'))
[GOAL]
case intro.intro.intro.intro.intro.intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
x : { x // x ∈ s }
he : e = subtypeRestr (chartAt H ↑x) s
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
x' : { x // x ∈ s }
he' : e' = subtypeRestr (chartAt H ↑x') s
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
asdf : e ∈ w✝¹
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm (chartAt H ↑x) ≫ₕ chartAt H ↑x')
      ((chartAt H ↑x).toLocalEquiv.target ∩ ↑(LocalHomeomorph.symm (chartAt H ↑x)) ⁻¹' ↑s) ∈
    G
[PROOFSTEP]
apply closedUnderRestriction'
[GOAL]
case intro.intro.intro.intro.intro.intro.he
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
x : { x // x ∈ s }
he : e = subtypeRestr (chartAt H ↑x) s
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
x' : { x // x ∈ s }
he' : e' = subtypeRestr (chartAt H ↑x') s
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
asdf : e ∈ w✝¹
⊢ LocalHomeomorph.symm (chartAt H ↑x) ≫ₕ chartAt H ↑x' ∈ G
[PROOFSTEP]
exact G.compatible (chart_mem_atlas _ _) (chart_mem_atlas _ _)
[GOAL]
case intro.intro.intro.intro.intro.intro.hs
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁴ : TopologicalSpace H
inst✝³ : TopologicalSpace M
inst✝² : ChartedSpace H M
G : StructureGroupoid H
inst✝¹ : HasGroupoid M G
s : Opens M
inst✝ : ClosedUnderRestriction G
e e' : LocalHomeomorph { x // x ∈ s } H
w✝¹ : Set (LocalHomeomorph { x // x ∈ s } H)
x : { x // x ∈ s }
he : e = subtypeRestr (chartAt H ↑x) s
hc : (fun x => {subtypeRestr (chartAt H ↑x) s}) x = w✝¹
w✝ : Set (LocalHomeomorph { x // x ∈ s } H)
x' : { x // x ∈ s }
he' : e' = subtypeRestr (chartAt H ↑x') s
hc' : (fun x => {subtypeRestr (chartAt H ↑x) s}) x' = w✝
this : Nonempty { x // x ∈ s }
asdf : e ∈ w✝¹
⊢ IsOpen ((chartAt H ↑x).toLocalEquiv.target ∩ ↑(LocalHomeomorph.symm (chartAt H ↑x)) ⁻¹' ↑s)
[PROOFSTEP]
exact preimage_open_of_open_symm (chartAt _ _) s.2
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
⊢ ↑(LocalHomeomorph.symm (chartAt H (inclusion hUV x))) =ᶠ[𝓝 (↑(chartAt H (inclusion hUV x)) (inclusion hUV x))]
    inclusion hUV ∘ ↑(LocalHomeomorph.symm (chartAt H x))
[PROOFSTEP]
set i := Set.inclusion hUV
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
i : ↑↑U → ↑↑V := inclusion hUV
⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))
[PROOFSTEP]
set e := chartAt H (x : M)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
i : ↑↑U → ↑↑V := inclusion hUV
e : LocalHomeomorph M H := chartAt H ↑x
⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))
[PROOFSTEP]
haveI : Nonempty U := ⟨x⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
i : ↑↑U → ↑↑V := inclusion hUV
e : LocalHomeomorph M H := chartAt H ↑x
this : Nonempty { x // x ∈ U }
⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))
[PROOFSTEP]
haveI : Nonempty V := ⟨i x⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
i : ↑↑U → ↑↑V := inclusion hUV
e : LocalHomeomorph M H := chartAt H ↑x
this✝ : Nonempty { x // x ∈ U }
this : Nonempty { x // x ∈ V }
⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))
[PROOFSTEP]
have heUx_nhds : (e.subtypeRestr U).target ∈ 𝓝 (e x) :=
  by
  apply (e.subtypeRestr U).open_target.mem_nhds
  exact e.map_subtype_source (mem_chart_source _ _)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
i : ↑↑U → ↑↑V := inclusion hUV
e : LocalHomeomorph M H := chartAt H ↑x
this✝ : Nonempty { x // x ∈ U }
this : Nonempty { x // x ∈ V }
⊢ (subtypeRestr e U).toLocalEquiv.target ∈ 𝓝 (↑e ↑x)
[PROOFSTEP]
apply (e.subtypeRestr U).open_target.mem_nhds
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
i : ↑↑U → ↑↑V := inclusion hUV
e : LocalHomeomorph M H := chartAt H ↑x
this✝ : Nonempty { x // x ∈ U }
this : Nonempty { x // x ∈ V }
⊢ ↑e ↑x ∈ (subtypeRestr e U).toLocalEquiv.target
[PROOFSTEP]
exact e.map_subtype_source (mem_chart_source _ _)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
G : StructureGroupoid H
inst✝ : HasGroupoid M G
s U V : Opens M
hUV : U ≤ V
x : { x // x ∈ U }
i : ↑↑U → ↑↑V := inclusion hUV
e : LocalHomeomorph M H := chartAt H ↑x
this✝ : Nonempty { x // x ∈ U }
this : Nonempty { x // x ∈ V }
heUx_nhds : (subtypeRestr e U).toLocalEquiv.target ∈ 𝓝 (↑e ↑x)
⊢ ↑(LocalHomeomorph.symm (chartAt H (i x))) =ᶠ[𝓝 (↑(chartAt H (i x)) (i x))] i ∘ ↑(LocalHomeomorph.symm (chartAt H x))
[PROOFSTEP]
exact Filter.eventuallyEq_of_mem heUx_nhds (e.subtypeRestr_symm_eqOn_of_le hUV)
[GOAL]
H : Type u
H' : Type u_1
M✝ : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁹ : TopologicalSpace H
inst✝⁸ : TopologicalSpace M✝
inst✝⁷ : ChartedSpace H M✝
inst✝⁶ : TopologicalSpace M'
inst✝⁵ : TopologicalSpace M''
G : StructureGroupoid H
inst✝⁴ : ChartedSpace H M'
inst✝³ : ChartedSpace H M''
M : Type u_5
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : HasGroupoid M G
src✝ : M ≃ₜ M := Homeomorph.refl M
c c' : LocalHomeomorph M H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M
⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G
[PROOFSTEP]
change LocalHomeomorph.symm c ≫ₕ LocalHomeomorph.refl M ≫ₕ c' ∈ G
[GOAL]
H : Type u
H' : Type u_1
M✝ : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁹ : TopologicalSpace H
inst✝⁸ : TopologicalSpace M✝
inst✝⁷ : ChartedSpace H M✝
inst✝⁶ : TopologicalSpace M'
inst✝⁵ : TopologicalSpace M''
G : StructureGroupoid H
inst✝⁴ : ChartedSpace H M'
inst✝³ : ChartedSpace H M''
M : Type u_5
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : HasGroupoid M G
src✝ : M ≃ₜ M := Homeomorph.refl M
c c' : LocalHomeomorph M H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M
⊢ LocalHomeomorph.symm c ≫ₕ LocalHomeomorph.refl M ≫ₕ c' ∈ G
[PROOFSTEP]
rw [LocalHomeomorph.refl_trans]
[GOAL]
H : Type u
H' : Type u_1
M✝ : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁹ : TopologicalSpace H
inst✝⁸ : TopologicalSpace M✝
inst✝⁷ : ChartedSpace H M✝
inst✝⁶ : TopologicalSpace M'
inst✝⁵ : TopologicalSpace M''
G : StructureGroupoid H
inst✝⁴ : ChartedSpace H M'
inst✝³ : ChartedSpace H M''
M : Type u_5
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : HasGroupoid M G
src✝ : M ≃ₜ M := Homeomorph.refl M
c c' : LocalHomeomorph M H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M
⊢ LocalHomeomorph.symm c ≫ₕ c' ∈ G
[PROOFSTEP]
exact G.compatible hc hc'
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
src✝ : M' ≃ₜ M := Homeomorph.symm e.toHomeomorph
⊢ ∀ (c : LocalHomeomorph M' H) (c' : LocalHomeomorph M H),
    c ∈ atlas H M' →
      c' ∈ atlas H M → LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G
[PROOFSTEP]
intro c c' hc hc'
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
src✝ : M' ≃ₜ M := Homeomorph.symm e.toHomeomorph
c : LocalHomeomorph M' H
c' : LocalHomeomorph M H
hc : c ∈ atlas H M'
hc' : c' ∈ atlas H M
⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G
[PROOFSTEP]
have : (c'.symm ≫ₕ e.toHomeomorph.toLocalHomeomorph ≫ₕ c).symm ∈ G := G.symm (e.mem_groupoid c' c hc' hc)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
src✝ : M' ≃ₜ M := Homeomorph.symm e.toHomeomorph
c : LocalHomeomorph M' H
c' : LocalHomeomorph M H
hc : c ∈ atlas H M'
hc' : c' ∈ atlas H M
this : LocalHomeomorph.symm (LocalHomeomorph.symm c' ≫ₕ Homeomorph.toLocalHomeomorph e.toHomeomorph ≫ₕ c) ∈ G
⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G
[PROOFSTEP]
rwa [trans_symm_eq_symm_trans_symm, trans_symm_eq_symm_trans_symm, symm_symm, trans_assoc] at this 
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
⊢ ∀ (c : LocalHomeomorph M H) (c' : LocalHomeomorph M'' H),
    c ∈ atlas H M →
      c' ∈ atlas H M'' → LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G
[PROOFSTEP]
intro c c' hc hc'
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
⊢ LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c' ∈ G
[PROOFSTEP]
refine' G.locality fun x hx ↦ _
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
let f₁ := e.toHomeomorph.toLocalHomeomorph
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
let f₂ := e'.toHomeomorph.toLocalHomeomorph
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
let f := (e.toHomeomorph.trans e'.toHomeomorph).toLocalHomeomorph
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
have feq : f = f₁ ≫ₕ f₂ :=
  Homeomorph.trans_toLocalHomeomorph _
    _
      -- define the atlas g around y
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
let y := (c.symm ≫ₕ f₁) x
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
let g := chartAt (H := H) y
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
have hg₁ := chart_mem_atlas (H := H) y
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
have hg₂ := mem_chart_source (H := H) y
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
let s := (c.symm ≫ₕ f₁).source ∩ c.symm ≫ₕ f₁ ⁻¹' g.source
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
have open_s : IsOpen s := by apply (c.symm ≫ₕ f₁).continuous_toFun.preimage_open_of_open <;> apply open_source
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
⊢ IsOpen s
[PROOFSTEP]
apply (c.symm ≫ₕ f₁).continuous_toFun.preimage_open_of_open
[GOAL]
case hs
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
⊢ IsOpen (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source
[PROOFSTEP]
apply open_source
[GOAL]
case ht
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
⊢ IsOpen g.source
[PROOFSTEP]
apply open_source
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
have : x ∈ s := by
  constructor
  · simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
    rw [trans_source] at hx 
    exact hx.1
  · exact hg₂
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
⊢ x ∈ s
[PROOFSTEP]
constructor
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
⊢ x ∈ (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source
[PROOFSTEP]
simp only [trans_source, preimage_univ, inter_univ, Homeomorph.toLocalHomeomorph_source]
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
⊢ x ∈ (LocalHomeomorph.symm c).toLocalEquiv.source
[PROOFSTEP]
rw [trans_source] at hx 
[GOAL]
case left
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx :
  x ∈
    (LocalHomeomorph.symm c).toLocalEquiv.source ∩
      ↑(LocalHomeomorph.symm c) ⁻¹'
        (Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
⊢ x ∈ (LocalHomeomorph.symm c).toLocalEquiv.source
[PROOFSTEP]
exact hx.1
[GOAL]
case right
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
⊢ x ∈ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
[PROOFSTEP]
exact hg₂
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
⊢ ∃ s,
    IsOpen s ∧
      x ∈ s ∧
        LocalHomeomorph.restr
            (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
          G
[PROOFSTEP]
refine' ⟨s, open_s, this, _⟩
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
    G
[PROOFSTEP]
let F₁ := (c.symm ≫ₕ f₁ ≫ₕ g) ≫ₕ g.symm ≫ₕ f₂ ≫ₕ c'
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
    G
[PROOFSTEP]
have A : F₁ ∈ G := G.trans (e.mem_groupoid c g hc hg₁) (e'.mem_groupoid g c' hg₁ hc')
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
    G
[PROOFSTEP]
let F₂ := (c.symm ≫ₕ f ≫ₕ c').restr s
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
    G
[PROOFSTEP]
have : F₁ ≈ F₂ :=
  calc
    F₁ ≈ c.symm ≫ₕ f₁ ≫ₕ (g ≫ₕ g.symm) ≫ₕ f₂ ≫ₕ c' := by simp only [trans_assoc, _root_.refl]
    _ ≈ c.symm ≫ₕ f₁ ≫ₕ ofSet g.source g.open_source ≫ₕ f₂ ≫ₕ c' :=
      (EqOnSource.trans' (_root_.refl _)
        (EqOnSource.trans' (_root_.refl _) (EqOnSource.trans' (trans_self_symm g) (_root_.refl _))))
    _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ ofSet g.source g.open_source) ≫ₕ f₂ ≫ₕ c' := by simp only [trans_assoc, _root_.refl]
    _ ≈ (c.symm ≫ₕ f₁).restr s ≫ₕ f₂ ≫ₕ c' := by rw [trans_of_set']
    _ ≈ ((c.symm ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c').restr s := by rw [restr_trans]
    _ ≈ (c.symm ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c').restr s := by simp only [EqOnSource.restr, trans_assoc, _root_.refl]
    _ ≈ F₂ := by simp only [feq, _root_.refl]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
⊢ F₁ ≈ LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ (g ≫ₕ LocalHomeomorph.symm g) ≫ₕ f₂ ≫ₕ c'
[PROOFSTEP]
simp only [trans_assoc, _root_.refl]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
⊢ LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ ofSet g.source (_ : IsOpen g.source) ≫ₕ f₂ ≫ₕ c' ≈
    ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ ofSet g.source (_ : IsOpen g.source)) ≫ₕ f₂ ≫ₕ c'
[PROOFSTEP]
simp only [trans_assoc, _root_.refl]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
⊢ ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ ofSet g.source (_ : IsOpen g.source)) ≫ₕ f₂ ≫ₕ c' ≈
    LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f₁) s ≫ₕ f₂ ≫ₕ c'
[PROOFSTEP]
rw [trans_of_set']
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f₁) s ≫ₕ f₂ ≫ₕ c' ≈
    LocalHomeomorph.restr ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c') s
[PROOFSTEP]
rw [restr_trans]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
⊢ LocalHomeomorph.restr ((LocalHomeomorph.symm c ≫ₕ f₁) ≫ₕ f₂ ≫ₕ c') s ≈
    LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c') s
[PROOFSTEP]
simp only [EqOnSource.restr, trans_assoc, _root_.refl]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ (f₁ ≫ₕ f₂) ≫ₕ c') s ≈ F₂
[PROOFSTEP]
simp only [feq, _root_.refl]
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this✝ : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
this : F₁ ≈ F₂
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
    G
[PROOFSTEP]
have : F₂ ∈ G := G.eq_on_source A (Setoid.symm this)
[GOAL]
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace M'
inst✝² : TopologicalSpace M''
G : StructureGroupoid H
inst✝¹ : ChartedSpace H M'
inst✝ : ChartedSpace H M''
e : Structomorph G M M'
e' : Structomorph G M' M''
src✝ : M ≃ₜ M'' := Homeomorph.trans e.toHomeomorph e'.toHomeomorph
c : LocalHomeomorph M H
c' : LocalHomeomorph M'' H
hc : c ∈ atlas H M
hc' : c' ∈ atlas H M''
x : H
hx : x ∈ (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c').toLocalEquiv.source
f₁ : LocalHomeomorph M M' := Homeomorph.toLocalHomeomorph e.toHomeomorph
f₂ : LocalHomeomorph M' M'' := Homeomorph.toLocalHomeomorph e'.toHomeomorph
f : LocalHomeomorph M M'' := Homeomorph.toLocalHomeomorph (Homeomorph.trans e.toHomeomorph e'.toHomeomorph)
feq : f = f₁ ≫ₕ f₂
y : M' := ↑(LocalHomeomorph.symm c ≫ₕ f₁) x
g : LocalHomeomorph M' H := chartAt H y
hg₁ : chartAt H y ∈ atlas H M'
hg₂ : y ∈ (chartAt H y).toLocalEquiv.source
s : Set H := (LocalHomeomorph.symm c ≫ₕ f₁).toLocalEquiv.source ∩ ↑(LocalHomeomorph.symm c ≫ₕ f₁) ⁻¹' g.source
open_s : IsOpen s
this✝¹ : x ∈ s
F₁ : LocalHomeomorph H H := (LocalHomeomorph.symm c ≫ₕ f₁ ≫ₕ g) ≫ₕ LocalHomeomorph.symm g ≫ₕ f₂ ≫ₕ c'
A : F₁ ∈ G
F₂ : LocalHomeomorph H H := LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ f ≫ₕ c') s
this✝ : F₁ ≈ F₂
this : F₂ ∈ G
⊢ LocalHomeomorph.restr (LocalHomeomorph.symm c ≫ₕ Homeomorph.toLocalHomeomorph (Homeomorph.mk src✝.toEquiv) ≫ₕ c') s ∈
    G
[PROOFSTEP]
exact this
