Theorem: ofSet_mem_analyticGroupoid
File: Mathlib/Geometry/Manifold/AnalyticManifold.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ PartialHomeomorph.ofSet s hs ∈ analyticGroupoid I
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ PartialHomeomorph.ofSet s hs ∈
    contDiffGroupoid ⊤ I ⊓
      {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.groupoid
tactic: rw [analyticGroupoid]
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ PartialHomeomorph.ofSet s hs ∈
    contDiffGroupoid ⊤ I ⊓
      {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.groupoid
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ PartialHomeomorph.ofSet s hs ∈
    {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.groupoid.members
tactic: refine And.intro (ofSet_mem_contDiffGroupoid ∞ I hs) ?_
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ PartialHomeomorph.ofSet s hs ∈
    {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.groupoid.members
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.property
      (↑(PartialHomeomorph.ofSet s hs)) (PartialHomeomorph.ofSet s hs).source ∧
    {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.property
      (↑(PartialHomeomorph.ofSet s hs).symm) (PartialHomeomorph.ofSet s hs).target
tactic: apply mem_groupoid_of_pregroupoid.mpr
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.property
      (↑(PartialHomeomorph.ofSet s hs)) (PartialHomeomorph.ofSet s hs).source ∧
    {
          property := fun f s =>
            AnalyticOn 𝕜 (↑I ∘ f ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
              ↑I ∘ f ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I),
          comp := ⋯, id_mem := ⋯, locality := ⋯, congr := ⋯ }.property
      (↑(PartialHomeomorph.ofSet s hs).symm) (PartialHomeomorph.ofSet s hs).target
state_after: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ AnalyticOn 𝕜 (↑I ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
    ↑I ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I)
tactic: suffices h : AnalyticOn 𝕜 (I ∘ I.symm) (I.symm ⁻¹' s ∩ interior (range I)) ∧
      (I.symm ⁻¹' s ∩ interior (range I)).image (I ∘ I.symm) ⊆ interior (range I) by
    simp only [PartialHomeomorph.ofSet_apply, id_comp, PartialHomeomorph.ofSet_toPartialEquiv,
      PartialEquiv.ofSet_source, h, comp_apply, mem_range, image_subset_iff, true_and,
      PartialHomeomorph.ofSet_symm, PartialEquiv.ofSet_target, and_self]
    intro x hx
    refine mem_preimage.mpr ?_
    rw [← I.right_inv (interior_subset hx.right)] at hx
    exact hx.right
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ AnalyticOn 𝕜 (↑I ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ∧
    ↑I ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I)
state_after: case left
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ AnalyticOn 𝕜 (↑I ∘ ↑I.symm) (↑I.symm ⁻¹' s ∩ interior (range ↑I))

case right
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
H : Type u_3
inst✝¹ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝ : TopologicalSpace M
s : Set H
hs : IsOpen s
⊢ ↑I ∘ ↑I.symm '' (↑I.symm ⁻¹' s ∩ interior (range ↑I)) ⊆ interior (range ↑I)
tactic: apply And.intro