l3lab/ntp-mathlib huggingface dataset:
theorem right_invariance {s : Set H} {x : H} {f : H → H'} {e : PartialHomeomorph H H} (he : e ∈ G)
    (hxe : x ∈ e.source) : P (f ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P f s x := by
  refine' ⟨fun h ↦ _, hG.right_invariance' he hxe⟩
  have := hG.right_invariance' (G.symm he) (e.mapsTo hxe) h
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t u : Set H
x✝ : H
hG : LocalInvariantProp G G' P
s : Set H
x : H
f : H → H'
e : PartialHomeomorph H H
he : e ∈ G
hxe : x ∈ e.source
h : P (f ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x)
this :
  P ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑(PartialHomeomorph.symm (PartialHomeomorph.symm e)))
    (↑(PartialHomeomorph.symm (PartialHomeomorph.symm e)) ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s))
    (↑(PartialHomeomorph.symm e) (↑e x))
⊢ P f s x

Next tactic:
rw [e.symm_symm, e.left_inv hxe] at this
theorem right_invariance {s : Set H} {x : H} {f : H → H'} {e : PartialHomeomorph H H} (he : e ∈ G)
    (hxe : x ∈ e.source) : P (f ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P f s x := by
  refine' ⟨fun h ↦ _, hG.right_invariance' he hxe⟩
  have := hG.right_invariance' (G.symm he) (e.mapsTo hxe) h
  rw [e.symm_symm, e.left_inv hxe] at this
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t u : Set H
x✝ : H
hG : LocalInvariantProp G G' P
s : Set H
x : H
f : H → H'
e : PartialHomeomorph H H
he : e ∈ G
hxe : x ∈ e.source
h : P (f ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x)
this : P ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e) (↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s)) x
⊢ P f s x

Next tactic:
refine' hG.congr _ ((hG.congr_set _).mp this)
theorem right_invariance {s : Set H} {x : H} {f : H → H'} {e : PartialHomeomorph H H} (he : e ∈ G)
    (hxe : x ∈ e.source) : P (f ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P f s x := by
  refine' ⟨fun h ↦ _, hG.right_invariance' he hxe⟩
  have := hG.right_invariance' (G.symm he) (e.mapsTo hxe) h
  rw [e.symm_symm, e.left_inv hxe] at this
  refine' hG.congr _ ((hG.congr_set _).mp this)
  · 

Proof state:
case refine'_1
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t u : Set H
x✝ : H
hG : LocalInvariantProp G G' P
s : Set H
x : H
f : H → H'
e : PartialHomeomorph H H
he : e ∈ G
hxe : x ∈ e.source
h : P (f ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x)
this : P ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e) (↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s)) x
⊢ (f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e =ᶠ[𝓝 x] f

Next tactic:
refine' eventually_of_mem (e.open_source.mem_nhds hxe) fun x' hx' ↦ _
theorem right_invariance {s : Set H} {x : H} {f : H → H'} {e : PartialHomeomorph H H} (he : e ∈ G)
    (hxe : x ∈ e.source) : P (f ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P f s x := by
  refine' ⟨fun h ↦ _, hG.right_invariance' he hxe⟩
  have := hG.right_invariance' (G.symm he) (e.mapsTo hxe) h
  rw [e.symm_symm, e.left_inv hxe] at this
  refine' hG.congr _ ((hG.congr_set _).mp this)
  · refine' eventually_of_mem (e.open_source.mem_nhds hxe) fun x' hx' ↦ _
    

Proof state:
case refine'_1
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t u : Set H
x✝ : H
hG : LocalInvariantProp G G' P
s : Set H
x : H
f : H → H'
e : PartialHomeomorph H H
he : e ∈ G
hxe : x ∈ e.source
h : P (f ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x)
this : P ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e) (↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s)) x
x' : H
hx' : x' ∈ e.source
⊢ ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e) x' = f x'

Next tactic:
simp_rw [Function.comp_apply, e.left_inv hx']
theorem right_invariance {s : Set H} {x : H} {f : H → H'} {e : PartialHomeomorph H H} (he : e ∈ G)
    (hxe : x ∈ e.source) : P (f ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P f s x := by
  refine' ⟨fun h ↦ _, hG.right_invariance' he hxe⟩
  have := hG.right_invariance' (G.symm he) (e.mapsTo hxe) h
  rw [e.symm_symm, e.left_inv hxe] at this
  refine' hG.congr _ ((hG.congr_set _).mp this)
  · refine' eventually_of_mem (e.open_source.mem_nhds hxe) fun x' hx' ↦ _
    simp_rw [Function.comp_apply, e.left_inv hx']
  · 

Proof state:
case refine'_2
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t u : Set H
x✝ : H
hG : LocalInvariantProp G G' P
s : Set H
x : H
f : H → H'
e : PartialHomeomorph H H
he : e ∈ G
hxe : x ∈ e.source
h : P (f ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x)
this : P ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e) (↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s)) x
⊢ ↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s) =ᶠ[𝓝 x] s

Next tactic:
rw [eventuallyEq_set]
theorem right_invariance {s : Set H} {x : H} {f : H → H'} {e : PartialHomeomorph H H} (he : e ∈ G)
    (hxe : x ∈ e.source) : P (f ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P f s x := by
  refine' ⟨fun h ↦ _, hG.right_invariance' he hxe⟩
  have := hG.right_invariance' (G.symm he) (e.mapsTo hxe) h
  rw [e.symm_symm, e.left_inv hxe] at this
  refine' hG.congr _ ((hG.congr_set _).mp this)
  · refine' eventually_of_mem (e.open_source.mem_nhds hxe) fun x' hx' ↦ _
    simp_rw [Function.comp_apply, e.left_inv hx']
  · rw [eventuallyEq_set]
    

Proof state:
case refine'_2
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t u : Set H
x✝ : H
hG : LocalInvariantProp G G' P
s : Set H
x : H
f : H → H'
e : PartialHomeomorph H H
he : e ∈ G
hxe : x ∈ e.source
h : P (f ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x)
this : P ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e) (↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s)) x
⊢ ∀ᶠ (x : H) in 𝓝 x, x ∈ ↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s) ↔ x ∈ s

Next tactic:
refine' eventually_of_mem (e.open_source.mem_nhds hxe) fun x' hx' ↦ _
theorem right_invariance {s : Set H} {x : H} {f : H → H'} {e : PartialHomeomorph H H} (he : e ∈ G)
    (hxe : x ∈ e.source) : P (f ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P f s x := by
  refine' ⟨fun h ↦ _, hG.right_invariance' he hxe⟩
  have := hG.right_invariance' (G.symm he) (e.mapsTo hxe) h
  rw [e.symm_symm, e.left_inv hxe] at this
  refine' hG.congr _ ((hG.congr_set _).mp this)
  · refine' eventually_of_mem (e.open_source.mem_nhds hxe) fun x' hx' ↦ _
    simp_rw [Function.comp_apply, e.left_inv hx']
  · rw [eventuallyEq_set]
    refine' eventually_of_mem (e.open_source.mem_nhds hxe) fun x' hx' ↦ _
    

Proof state:
case refine'_2
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
P : (H → H') → Set H → H → Prop
s✝ t u : Set H
x✝ : H
hG : LocalInvariantProp G G' P
s : Set H
x : H
f : H → H'
e : PartialHomeomorph H H
he : e ∈ G
hxe : x ∈ e.source
h : P (f ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x)
this : P ((f ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑e) (↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s)) x
x' : H
hx' : x' ∈ e.source
⊢ x' ∈ ↑e ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s) ↔ x' ∈ s

Next tactic:
simp_rw [mem_preimage, e.left_inv hx']
theorem liftPropAt_iff {P : (H → H') → Set H → H → Prop} {f : M → M'} {x : M} :
    LiftPropAt P f x ↔
      ContinuousAt f x ∧ P (chartAt H' (f x) ∘ f ∘ (chartAt H x).symm) univ (chartAt H x x) := by
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
P : (H → H') → Set H → H → Prop
f : M → M'
x : M
⊢ LiftPropAt P f x ↔
    ContinuousAt f x ∧ P (↑(chartAt H' (f x)) ∘ f ∘ ↑(PartialHomeomorph.symm (chartAt H x))) univ (↑(chartAt H x) x)

Next tactic:
rw [LiftPropAt, LiftPropWithinAt, continuousWithinAt_univ, preimage_univ]
theorem liftProp_iff {P : (H → H') → Set H → H → Prop} {f : M → M'} :
    LiftProp P f ↔
      Continuous f ∧ ∀ x, P (chartAt H' (f x) ∘ f ∘ (chartAt H x).symm) univ (chartAt H x x) := by
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
P : (H → H') → Set H → H → Prop
f : M → M'
⊢ LiftProp P f ↔
    Continuous f ∧
      ∀ (x : M), P (↑(chartAt H' (f x)) ∘ f ∘ ↑(PartialHomeomorph.symm (chartAt H x))) univ (↑(chartAt H x) x)

Next tactic:
simp_rw [LiftProp, liftPropAt_iff, forall_and, continuous_iff_continuousAt]
theorem liftPropOn_univ : LiftPropOn P g univ ↔ LiftProp P g := by
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
⊢ LiftPropOn P g univ ↔ LiftProp P g

Next tactic:
simp [LiftPropOn, LiftProp, LiftPropAt]
/-- `LiftPropWithinAt P f s x` is equivalent to a definition where we restrict the set we are
  considering to the domain of the charts at `x` and `f x`. -/
theorem liftPropWithinAt_iff {f : M → M'} :
    LiftPropWithinAt P f s x ↔
      ContinuousWithinAt f s x ∧
        P (chartAt H' (f x) ∘ f ∘ (chartAt H x).symm)
          ((chartAt H x).target ∩ (chartAt H x).symm ⁻¹' (s ∩ f ⁻¹' (chartAt H' (f x)).source))
          (chartAt H x x) := by
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f✝ f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
f : M → M'
⊢ LiftPropWithinAt P f s x ↔
    ContinuousWithinAt f s x ∧
      P (↑(chartAt H' (f x)) ∘ f ∘ ↑(PartialHomeomorph.symm (chartAt H x)))
        ((chartAt H x).toPartialEquiv.target ∩
          ↑(PartialHomeomorph.symm (chartAt H x)) ⁻¹' (s ∩ f ⁻¹' (chartAt H' (f x)).toPartialEquiv.source))
        (↑(chartAt H x) x)

Next tactic:
refine' and_congr_right fun hf ↦ hG.congr_set _
/-- `LiftPropWithinAt P f s x` is equivalent to a definition where we restrict the set we are
  considering to the domain of the charts at `x` and `f x`. -/
theorem liftPropWithinAt_iff {f : M → M'} :
    LiftPropWithinAt P f s x ↔
      ContinuousWithinAt f s x ∧
        P (chartAt H' (f x) ∘ f ∘ (chartAt H x).symm)
          ((chartAt H x).target ∩ (chartAt H x).symm ⁻¹' (s ∩ f ⁻¹' (chartAt H' (f x)).source))
          (chartAt H x x) := by
  refine' and_congr_right fun hf ↦ hG.congr_set _
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f✝ f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
f : M → M'
hf : ContinuousWithinAt f s x
⊢ ↑(PartialHomeomorph.symm (chartAt H x)) ⁻¹' s =ᶠ[𝓝 (↑(chartAt H x) x)]
    (chartAt H x).toPartialEquiv.target ∩
      ↑(PartialHomeomorph.symm (chartAt H x)) ⁻¹' (s ∩ f ⁻¹' (chartAt H' (f x)).toPartialEquiv.source)

Next tactic:
exact PartialHomeomorph.preimage_eventuallyEq_target_inter_preimage_inter hf
    (mem_chart_source H x) (chart_source_mem_nhds H' (f x))
theorem liftPropWithinAt_indep_chart_source_aux (g : M → H') (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) (he' : e' ∈ G.maximalAtlas M) (xe' : x ∈ e'.source) :
    P (g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ P (g ∘ ↑(PartialHomeomorph.symm e)) (↑(PartialHomeomorph.symm e) ⁻¹' s) (↑e x) ↔
    P (g ∘ ↑(PartialHomeomorph.symm e')) (↑(PartialHomeomorph.symm e') ⁻¹' s) (↑e' x)

Next tactic:
rw [← hG.right_invariance (compatible_of_mem_maximalAtlas he he')]
theorem liftPropWithinAt_indep_chart_source_aux (g : M → H') (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) (he' : e' ∈ G.maximalAtlas M) (xe' : x ∈ e'.source) :
    P (g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
  rw [← hG.right_invariance (compatible_of_mem_maximalAtlas he he')]
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ P ((g ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')))
      (↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')) ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s))
      (↑(PartialHomeomorph.symm e ≫ₕ e') (↑e x)) ↔
    P (g ∘ ↑(PartialHomeomorph.symm e')) (↑(PartialHomeomorph.symm e') ⁻¹' s) (↑e' x)
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ ↑e x ∈ (PartialHomeomorph.symm e ≫ₕ e').toPartialEquiv.source

Next tactic:
swap
theorem liftPropWithinAt_indep_chart_source_aux (g : M → H') (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) (he' : e' ∈ G.maximalAtlas M) (xe' : x ∈ e'.source) :
    P (g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
  rw [← hG.right_invariance (compatible_of_mem_maximalAtlas he he')]
  swap; · 

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ ↑e x ∈ (PartialHomeomorph.symm e ≫ₕ e').toPartialEquiv.source

Next tactic:
simp only [xe, xe', mfld_simps]
theorem liftPropWithinAt_indep_chart_source_aux (g : M → H') (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) (he' : e' ∈ G.maximalAtlas M) (xe' : x ∈ e'.source) :
    P (g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
  rw [← hG.right_invariance (compatible_of_mem_maximalAtlas he he')]
  swap; · simp only [xe, xe', mfld_simps]
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ P ((g ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')))
      (↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')) ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s))
      (↑(PartialHomeomorph.symm e ≫ₕ e') (↑e x)) ↔
    P (g ∘ ↑(PartialHomeomorph.symm e')) (↑(PartialHomeomorph.symm e') ⁻¹' s) (↑e' x)

Next tactic:
simp_rw [PartialHomeomorph.trans_apply, e.left_inv xe]
theorem liftPropWithinAt_indep_chart_source_aux (g : M → H') (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) (he' : e' ∈ G.maximalAtlas M) (xe' : x ∈ e'.source) :
    P (g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
  rw [← hG.right_invariance (compatible_of_mem_maximalAtlas he he')]
  swap; · simp only [xe, xe', mfld_simps]
  simp_rw [PartialHomeomorph.trans_apply, e.left_inv xe]
  

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ P ((g ∘ ↑(PartialHomeomorph.symm e)) ∘ ↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')))
      (↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')) ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s)) (↑e' x) ↔
    P (g ∘ ↑(PartialHomeomorph.symm e')) (↑(PartialHomeomorph.symm e') ⁻¹' s) (↑e' x)

Next tactic:
rw [hG.congr_iff]
theorem liftPropWithinAt_indep_chart_source_aux (g : M → H') (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) (he' : e' ∈ G.maximalAtlas M) (xe' : x ∈ e'.source) :
    P (g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
  rw [← hG.right_invariance (compatible_of_mem_maximalAtlas he he')]
  swap; · simp only [xe, xe', mfld_simps]
  simp_rw [PartialHomeomorph.trans_apply, e.left_inv xe]
  rw [hG.congr_iff]
  · 

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ P ?m.17979 (↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')) ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s))
      (↑e' x) ↔
    P (g ∘ ↑(PartialHomeomorph.symm e')) (↑(PartialHomeomorph.symm e') ⁻¹' s) (↑e' x)

Next tactic:
refine' hG.congr_set _
theorem liftPropWithinAt_indep_chart_source_aux (g : M → H') (he : e ∈ G.maximalAtlas M)
    (xe : x ∈ e.source) (he' : e' ∈ G.maximalAtlas M) (xe' : x ∈ e'.source) :
    P (g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
  rw [← hG.right_invariance (compatible_of_mem_maximalAtlas he he')]
  swap; · simp only [xe, xe', mfld_simps]
  simp_rw [PartialHomeomorph.trans_apply, e.left_inv xe]
  rw [hG.congr_iff]
  · refine' hG.congr_set _
    

Proof state:
H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type u_5
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : PartialHomeomorph M H
f f' : PartialHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g✝ g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G' P
g : M → H'
he : e ∈ maximalAtlas M G
xe : x ∈ e.source
he' : e' ∈ maximalAtlas M G
xe' : x ∈ e'.source
⊢ ↑(PartialHomeomorph.symm (PartialHomeomorph.symm e ≫ₕ e')) ⁻¹' (↑(PartialHomeomorph.symm e) ⁻¹' s) =ᶠ[𝓝 (↑e' x)]
    ↑(PartialHomeomorph.symm e') ⁻¹' s

Next tactic:
refine' (eventually_of_mem _ fun y (hy : y ∈ e'.symm ⁻¹' e.source) ↦ _).set_eq