l3lab/ntp-mathlib huggingface dataset:
theorem liftPropAt_iff_comp_subtype_val (hG : LocalInvariantProp G G' P) {U : Opens M}
    (f : M → M') (x : U) :
    LiftPropAt P f x ↔ LiftPropAt P (f ∘ Subtype.val) x := by
  congrm ?_ ∧ ?_
  · simp_rw [continuousWithinAt_univ, U.openEmbedding'.continuousAt_iff]
  · apply hG.congr_iff
    

Proof state:
case a.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'
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✝ hG : LocalInvariantProp G G' P
U : Opens M
f : M → M'
x : ↥U
⊢ ↑(chartAt H' (f ↑x)) ∘ f ∘ ↑(PartialHomeomorph.symm (chartAt H ↑x)) =ᶠ[𝓝 (↑(chartAt H ↑x) ↑x)]
    ↑(chartAt H' ((f ∘ Subtype.val) x)) ∘ (f ∘ Subtype.val) ∘ ↑(PartialHomeomorph.symm (chartAt H x))

Next tactic:
exact (U.chartAt_subtype_val_symm_eventuallyEq).fun_comp (chartAt H' (f x) ∘ f)
theorem liftPropAt_iff_comp_inclusion (hG : LocalInvariantProp G G' P) {U V : Opens M} (hUV : U ≤ V)
    (f : V → M') (x : U) :
    LiftPropAt P f (Set.inclusion hUV x) ↔ LiftPropAt P (f ∘ Set.inclusion hUV : U → M') 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✝ hG : LocalInvariantProp G G' P
U V : Opens M
hUV : U ≤ V
f : ↥V → M'
x : ↥U
⊢ LiftPropAt P f (inclusion hUV x) ↔ LiftPropAt P (f ∘ inclusion hUV) x

Next tactic:
congrm ?_ ∧ ?_
theorem liftPropAt_iff_comp_inclusion (hG : LocalInvariantProp G G' P) {U V : Opens M} (hUV : U ≤ V)
    (f : V → M') (x : U) :
    LiftPropAt P f (Set.inclusion hUV x) ↔ LiftPropAt P (f ∘ Set.inclusion hUV : U → M') x := by
  congrm ?_ ∧ ?_
  · 

Proof state:
case a.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'
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✝ hG : LocalInvariantProp G G' P
U V : Opens M
hUV : U ≤ V
f : ↥V → M'
x : ↥U
⊢ ContinuousWithinAt f univ (inclusion hUV x) ↔ ContinuousWithinAt (f ∘ inclusion hUV) univ x

Next tactic:
simp_rw [continuousWithinAt_univ,
      (TopologicalSpace.Opens.openEmbedding_of_le hUV).continuousAt_iff]
theorem liftPropAt_iff_comp_inclusion (hG : LocalInvariantProp G G' P) {U V : Opens M} (hUV : U ≤ V)
    (f : V → M') (x : U) :
    LiftPropAt P f (Set.inclusion hUV x) ↔ LiftPropAt P (f ∘ Set.inclusion hUV : U → M') x := by
  congrm ?_ ∧ ?_
  · simp_rw [continuousWithinAt_univ,
      (TopologicalSpace.Opens.openEmbedding_of_le hUV).continuousAt_iff]
  · 

Proof state:
case a.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'
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✝ hG : LocalInvariantProp G G' P
U V : Opens M
hUV : U ≤ V
f : ↥V → M'
x : ↥U
⊢ P (↑(chartAt H' (f (inclusion hUV x))) ∘ f ∘ ↑(PartialHomeomorph.symm (chartAt H (inclusion hUV x))))
      (↑(PartialHomeomorph.symm (chartAt H (inclusion hUV x))) ⁻¹' univ)
      (↑(chartAt H (inclusion hUV x)) (inclusion hUV x)) ↔
    P (↑(chartAt H' ((f ∘ inclusion hUV) x)) ∘ (f ∘ inclusion hUV) ∘ ↑(PartialHomeomorph.symm (chartAt H x)))
      (↑(PartialHomeomorph.symm (chartAt H x)) ⁻¹' univ) (↑(chartAt H x) x)

Next tactic:
apply hG.congr_iff
theorem liftPropAt_iff_comp_inclusion (hG : LocalInvariantProp G G' P) {U V : Opens M} (hUV : U ≤ V)
    (f : V → M') (x : U) :
    LiftPropAt P f (Set.inclusion hUV x) ↔ LiftPropAt P (f ∘ Set.inclusion hUV : U → M') x := by
  congrm ?_ ∧ ?_
  · simp_rw [continuousWithinAt_univ,
      (TopologicalSpace.Opens.openEmbedding_of_le hUV).continuousAt_iff]
  · apply hG.congr_iff
    

Proof state:
case a.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'
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✝ hG : LocalInvariantProp G G' P
U V : Opens M
hUV : U ≤ V
f : ↥V → M'
x : ↥U
⊢ ↑(chartAt H' (f (inclusion hUV x))) ∘
      f ∘
        ↑(PartialHomeomorph.symm (chartAt H (inclusion hUV x))) =ᶠ[𝓝 (↑(chartAt H (inclusion hUV x)) (inclusion hUV x))]
    ↑(chartAt H' ((f ∘ inclusion hUV) x)) ∘ (f ∘ inclusion hUV) ∘ ↑(PartialHomeomorph.symm (chartAt H x))

Next tactic:
exact (TopologicalSpace.Opens.chartAt_inclusion_symm_eventuallyEq hUV).fun_comp
      (chartAt H' (f (Set.inclusion hUV x)) ∘ f)
theorem liftProp_subtype_val {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) (U : Opens M) :
    LiftProp Q (Subtype.val : U → M) := 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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U : Opens M
⊢ LiftProp Q Subtype.val

Next tactic:
intro x
theorem liftProp_subtype_val {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) (U : Opens M) :
    LiftProp Q (Subtype.val : U → M) := by
  intro x
  

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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U : Opens M
x : ↥U
⊢ LiftPropAt Q Subtype.val x

Next tactic:
show LiftPropAt Q (id ∘ Subtype.val) x
theorem liftProp_subtype_val {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) (U : Opens M) :
    LiftProp Q (Subtype.val : U → M) := by
  intro x
  show LiftPropAt Q (id ∘ Subtype.val) x
  

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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U : Opens M
x : ↥U
⊢ LiftPropAt Q (id ∘ Subtype.val) x

Next tactic:
rw [← hG.liftPropAt_iff_comp_subtype_val]
theorem liftProp_subtype_val {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) (U : Opens M) :
    LiftProp Q (Subtype.val : U → M) := by
  intro x
  show LiftPropAt Q (id ∘ Subtype.val) x
  rw [← hG.liftPropAt_iff_comp_subtype_val]
  

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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U : Opens M
x : ↥U
⊢ LiftPropAt Q id ↑x

Next tactic:
apply hG.liftProp_id hQ
theorem liftProp_inclusion {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) {U V : Opens M} (hUV : U ≤ V) :
    LiftProp Q (Set.inclusion hUV : U → V) := 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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U V : Opens M
hUV : U ≤ V
⊢ LiftProp Q (inclusion hUV)

Next tactic:
intro x
theorem liftProp_inclusion {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) {U V : Opens M} (hUV : U ≤ V) :
    LiftProp Q (Set.inclusion hUV : U → V) := by
  intro x
  

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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U V : Opens M
hUV : U ≤ V
x : ↑↑U
⊢ LiftPropAt Q (inclusion hUV) x

Next tactic:
show LiftPropAt Q (id ∘ inclusion hUV) x
theorem liftProp_inclusion {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) {U V : Opens M} (hUV : U ≤ V) :
    LiftProp Q (Set.inclusion hUV : U → V) := by
  intro x
  show LiftPropAt Q (id ∘ inclusion hUV) x
  

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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U V : Opens M
hUV : U ≤ V
x : ↑↑U
⊢ LiftPropAt Q (id ∘ inclusion hUV) x

Next tactic:
rw [← hG.liftPropAt_iff_comp_inclusion hUV]
theorem liftProp_inclusion {Q : (H → H) → Set H → H → Prop} (hG : LocalInvariantProp G G Q)
    (hQ : ∀ y, Q id univ y) {U V : Opens M} (hUV : U ≤ V) :
    LiftProp Q (Set.inclusion hUV : U → V) := by
  intro x
  show LiftPropAt Q (id ∘ inclusion hUV) x
  rw [← hG.liftPropAt_iff_comp_inclusion hUV]
  

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
Q : (H → H) → Set H → H → Prop
hG : LocalInvariantProp G G Q
hQ : ∀ (y : H), Q id univ y
U V : Opens M
hUV : U ≤ V
x : ↑↑U
⊢ LiftPropAt Q id (inclusion hUV x)

Next tactic:
apply hG.liftProp_id hQ
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := 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
inst✝ : ClosedUnderRestriction G
⊢ ∀ {s : Set H} {x : H} {u : Set H} {f : H → H},
    IsOpen u → x ∈ u → (IsLocalStructomorphWithinAt G f s x ↔ IsLocalStructomorphWithinAt G f (s ∩ u) x)

Next tactic:
intro s x u f hu hux
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      

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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
⊢ IsLocalStructomorphWithinAt G f s x ↔ IsLocalStructomorphWithinAt G f (s ∩ u) x

Next tactic:
constructor
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      constructor
      · 

Proof state:
case mp
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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
⊢ IsLocalStructomorphWithinAt G f s x → IsLocalStructomorphWithinAt G f (s ∩ u) x

Next tactic:
rintro h hx
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      constructor
      · rintro h hx
        

Proof state:
case mp
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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
h : IsLocalStructomorphWithinAt G f s x
hx : x ∈ s ∩ u
⊢ ∃ e ∈ G, EqOn f (↑e.toPartialEquiv) (s ∩ u ∩ e.source) ∧ x ∈ e.source

Next tactic:
rcases h hx.1 with ⟨e, heG, hef, hex⟩
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      constructor
      · rintro h hx
        rcases h hx.1 with ⟨e, heG, hef, hex⟩
        

Proof state:
case mp.intro.intro.intro
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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
h : IsLocalStructomorphWithinAt G f s x
hx : x ∈ s ∩ u
e : PartialHomeomorph H H
heG : e ∈ G
hef : EqOn f (↑e.toPartialEquiv) (s ∩ e.source)
hex : x ∈ e.source
⊢ ∃ e ∈ G, EqOn f (↑e.toPartialEquiv) (s ∩ u ∩ e.source) ∧ x ∈ e.source

Next tactic:
have : s ∩ u ∩ e.source ⊆ s ∩ e.source := by mfld_set_tac
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      constructor
      · rintro h hx
        rcases h hx.1 with ⟨e, heG, hef, hex⟩
        have : s ∩ u ∩ e.source ⊆ s ∩ e.source := 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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
h : IsLocalStructomorphWithinAt G f s x
hx : x ∈ s ∩ u
e : PartialHomeomorph H H
heG : e ∈ G
hef : EqOn f (↑e.toPartialEquiv) (s ∩ e.source)
hex : x ∈ e.source
⊢ s ∩ u ∩ e.source ⊆ s ∩ e.source

Next tactic:
mfld_set_tac
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      constructor
      · rintro h hx
        rcases h hx.1 with ⟨e, heG, hef, hex⟩
        have : s ∩ u ∩ e.source ⊆ s ∩ e.source := by mfld_set_tac
        

Proof state:
case mp.intro.intro.intro
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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
h : IsLocalStructomorphWithinAt G f s x
hx : x ∈ s ∩ u
e : PartialHomeomorph H H
heG : e ∈ G
hef : EqOn f (↑e.toPartialEquiv) (s ∩ e.source)
hex : x ∈ e.source
this : s ∩ u ∩ e.source ⊆ s ∩ e.source
⊢ ∃ e ∈ G, EqOn f (↑e.toPartialEquiv) (s ∩ u ∩ e.source) ∧ x ∈ e.source

Next tactic:
exact ⟨e, heG, hef.mono this, hex⟩
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      constructor
      · rintro h hx
        rcases h hx.1 with ⟨e, heG, hef, hex⟩
        have : s ∩ u ∩ e.source ⊆ s ∩ e.source := by mfld_set_tac
        exact ⟨e, heG, hef.mono this, hex⟩
      · 

Proof state:
case mpr
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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
⊢ IsLocalStructomorphWithinAt G f (s ∩ u) x → IsLocalStructomorphWithinAt G f s x

Next tactic:
rintro h hx
/-- For a groupoid `G` which is `ClosedUnderRestriction`, being a local structomorphism is a local
invariant property. -/
theorem isLocalStructomorphWithinAt_localInvariantProp [ClosedUnderRestriction G] :
    LocalInvariantProp G G (IsLocalStructomorphWithinAt G) :=
  { is_local := by
      intro s x u f hu hux
      constructor
      · rintro h hx
        rcases h hx.1 with ⟨e, heG, hef, hex⟩
        have : s ∩ u ∩ e.source ⊆ s ∩ e.source := by mfld_set_tac
        exact ⟨e, heG, hef.mono this, hex⟩
      · rintro h hx
        

Proof state:
case mpr
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
inst✝ : ClosedUnderRestriction G
s : Set H
x : H
u : Set H
f : H → H
hu : IsOpen u
hux : x ∈ u
h : IsLocalStructomorphWithinAt G f (s ∩ u) x
hx : x ∈ s
⊢ ∃ e ∈ G, EqOn f (↑e.toPartialEquiv) (s ∩ e.source) ∧ x ∈ e.source

Next tactic:
rcases h ⟨hx, hux⟩ with ⟨e, heG, hef, hex⟩