l3lab/ntp-mathlib huggingface dataset:
instance : Inf (StructureGroupoid H) :=
  ⟨fun G G' => StructureGroupoid.mk
    (members := G.members ∩ G'.members)
    (trans' := fun e e' he he' =>
      ⟨G.trans' e e' he.left he'.left, G'.trans' e e' he.right he'.right⟩)
    (symm' := fun e he => ⟨G.symm' e he.left, G'.symm' e he.right⟩)
    (id_mem' := ⟨G.id_mem', G'.id_mem'⟩)
    (locality' := by
      intro e hx
      apply (mem_inter_iff e G.members G'.members).mpr
      refine And.intro (G.locality' e ?_) (G'.locality' e ?_)
      all_goals
        intro x hex
        rcases hx x hex with ⟨s, hs⟩
        use s
        refine And.intro hs.left (And.intro hs.right.left ?_)
      · 

Proof state:
case h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G G' : StructureGroupoid H
e : PartialHomeomorph H H
hx : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ G.members ∩ G'.members
x : H
hex : x ∈ e.source
s : Set H
hs : IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ G.members ∩ G'.members
⊢ PartialHomeomorph.restr e s ∈ G.members

Next tactic:
exact hs.right.right.left
instance : Inf (StructureGroupoid H) :=
  ⟨fun G G' => StructureGroupoid.mk
    (members := G.members ∩ G'.members)
    (trans' := fun e e' he he' =>
      ⟨G.trans' e e' he.left he'.left, G'.trans' e e' he.right he'.right⟩)
    (symm' := fun e he => ⟨G.symm' e he.left, G'.symm' e he.right⟩)
    (id_mem' := ⟨G.id_mem', G'.id_mem'⟩)
    (locality' := by
      intro e hx
      apply (mem_inter_iff e G.members G'.members).mpr
      refine And.intro (G.locality' e ?_) (G'.locality' e ?_)
      all_goals
        intro x hex
        rcases hx x hex with ⟨s, hs⟩
        use s
        refine And.intro hs.left (And.intro hs.right.left ?_)
      · exact hs.right.right.left
      · 

Proof state:
case h
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
G G' : StructureGroupoid H
e : PartialHomeomorph H H
hx : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ G.members ∩ G'.members
x : H
hex : x ∈ e.source
s : Set H
hs : IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ G.members ∩ G'.members
⊢ PartialHomeomorph.restr e s ∈ G'.members

Next tactic:
exact hs.right.right.right
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ (e e' : PartialHomeomorph H H), e ∈ ⋂ s ∈ S, s.members → e' ∈ ⋂ s ∈ S, s.members → e ≫ₕ e' ∈ ⋂ s ∈ S, s.members

Next tactic:
simp only [mem_iInter]
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ (e e' : PartialHomeomorph H H), (∀ i ∈ S, e ∈ i.members) → (∀ i ∈ S, e' ∈ i.members) → ∀ i ∈ S, e ≫ₕ e' ∈ i.members

Next tactic:
intro e e' he he' i hi
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
e e' : PartialHomeomorph H H
he : ∀ i ∈ S, e ∈ i.members
he' : ∀ i ∈ S, e' ∈ i.members
i : StructureGroupoid H
hi : i ∈ S
⊢ e ≫ₕ e' ∈ i.members

Next tactic:
exact i.trans' e e' (he i hi) (he' i hi)
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ e ∈ ⋂ s ∈ S, s.members, PartialHomeomorph.symm e ∈ ⋂ s ∈ S, s.members

Next tactic:
simp only [mem_iInter]
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ (e : PartialHomeomorph H H), (∀ i ∈ S, e ∈ i.members) → ∀ i ∈ S, PartialHomeomorph.symm e ∈ i.members

Next tactic:
intro e he i hi
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
e : PartialHomeomorph H H
he : ∀ i ∈ S, e ∈ i.members
i : StructureGroupoid H
hi : i ∈ S
⊢ PartialHomeomorph.symm e ∈ i.members

Next tactic:
exact i.symm' e (he i hi)
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ PartialHomeomorph.refl H ∈ ⋂ s ∈ S, s.members

Next tactic:
simp only [mem_iInter]
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ i ∈ S, PartialHomeomorph.refl H ∈ i.members

Next tactic:
intro i _
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
i : StructureGroupoid H
i✝ : i ∈ S
⊢ PartialHomeomorph.refl H ∈ i.members

Next tactic:
exact i.id_mem'
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ ⋂ s ∈ S, s.members) → e ∈ ⋂ s ∈ S, s.members

Next tactic:
simp only [mem_iInter]
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ ∀ i ∈ S, PartialHomeomorph.restr e s ∈ i.members) → ∀ i ∈ S, e ∈ i.members

Next tactic:
intro e he i hi
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      intro e he i hi
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
e : PartialHomeomorph H H
he : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ ∀ i ∈ S, PartialHomeomorph.restr e s ∈ i.members
i : StructureGroupoid H
hi : i ∈ S
⊢ e ∈ i.members

Next tactic:
refine i.locality' e ?_
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      intro e he i hi
      refine i.locality' e ?_
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
e : PartialHomeomorph H H
he : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ ∀ i ∈ S, PartialHomeomorph.restr e s ∈ i.members
i : StructureGroupoid H
hi : i ∈ S
⊢ ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ i.members

Next tactic:
intro x hex
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      intro e he i hi
      refine i.locality' e ?_
      intro x hex
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
e : PartialHomeomorph H H
he : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ ∀ i ∈ S, PartialHomeomorph.restr e s ∈ i.members
i : StructureGroupoid H
hi : i ∈ S
x : H
hex : x ∈ e.source
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ i.members

Next tactic:
rcases he x hex with ⟨s, hs⟩
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      intro e he i hi
      refine i.locality' e ?_
      intro x hex
      rcases he x hex with ⟨s, hs⟩
      

Proof state:
case intro
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
e : PartialHomeomorph H H
he : ∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ ∀ i ∈ S, PartialHomeomorph.restr e s ∈ i.members
i : StructureGroupoid H
hi : i ∈ S
x : H
hex : x ∈ e.source
s : Set H
hs : IsOpen s ∧ x ∈ s ∧ ∀ i ∈ S, PartialHomeomorph.restr e s ∈ i.members
⊢ ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ i.members

Next tactic:
exact ⟨s, ⟨hs.left, ⟨hs.right.left, hs.right.right i hi⟩⟩⟩
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      intro e he i hi
      refine i.locality' e ?_
      intro x hex
      rcases he x hex with ⟨s, hs⟩
      exact ⟨s, ⟨hs.left, ⟨hs.right.left, hs.right.right i hi⟩⟩⟩)
    (eq_on_source' := by
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ (e e' : PartialHomeomorph H H), e ∈ ⋂ s ∈ S, s.members → e' ≈ e → e' ∈ ⋂ s ∈ S, s.members

Next tactic:
simp only [mem_iInter]
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      intro e he i hi
      refine i.locality' e ?_
      intro x hex
      rcases he x hex with ⟨s, hs⟩
      exact ⟨s, ⟨hs.left, ⟨hs.right.left, hs.right.right i hi⟩⟩⟩)
    (eq_on_source' := by
      simp only [mem_iInter]
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
⊢ ∀ (e e' : PartialHomeomorph H H), (∀ i ∈ S, e ∈ i.members) → e' ≈ e → ∀ i ∈ S, e' ∈ i.members

Next tactic:
intro e e' he he'e
instance : InfSet (StructureGroupoid H) :=
  ⟨fun S => StructureGroupoid.mk
    (members := ⋂ s ∈ S, s.members)
    (trans' := by
      simp only [mem_iInter]
      intro e e' he he' i hi
      exact i.trans' e e' (he i hi) (he' i hi))
    (symm' := by
      simp only [mem_iInter]
      intro e he i hi
      exact i.symm' e (he i hi))
    (id_mem' := by
      simp only [mem_iInter]
      intro i _
      exact i.id_mem')
    (locality' := by
      simp only [mem_iInter]
      intro e he i hi
      refine i.locality' e ?_
      intro x hex
      rcases he x hex with ⟨s, hs⟩
      exact ⟨s, ⟨hs.left, ⟨hs.right.left, hs.right.right i hi⟩⟩⟩)
    (eq_on_source' := by
      simp only [mem_iInter]
      intro e e' he he'e
      

Proof state:
H : Type u
H' : Type u_1
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝ : TopologicalSpace H
S : Set (StructureGroupoid H)
e e' : PartialHomeomorph H H
he : ∀ i ∈ S, e ∈ i.members
he'e : e' ≈ e
⊢ ∀ i ∈ S, e' ∈ i.members

Next tactic:
exact fun i hi => i.eq_on_source' e e' (he i hi) he'e
/-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid. -/
instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
  PartialOrder.lift StructureGroupoid.members fun a b h ↦ by
    

Proof state:
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

Next tactic:
cases a
/-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid. -/
instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
  PartialOrder.lift StructureGroupoid.members fun a b h ↦ by
    cases a
    

Proof state:
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 (PartialHomeomorph H H)
trans'✝ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝
symm'✝ : ∀ e ∈ members✝, PartialHomeomorph.symm e ∈ members✝
id_mem'✝ : PartialHomeomorph.refl H ∈ members✝
locality'✝ :
  ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ members✝) → e ∈ members✝
eq_on_source'✝ : ∀ (e e' : PartialHomeomorph 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

Next tactic:
cases b
/-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid. -/
instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
  PartialOrder.lift StructureGroupoid.members fun a b h ↦ by
    cases a
    cases b
    

Proof state:
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 (PartialHomeomorph H H)
trans'✝¹ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝¹ : ∀ e ∈ members✝¹, PartialHomeomorph.symm e ∈ members✝¹
id_mem'✝¹ : PartialHomeomorph.refl H ∈ members✝¹
locality'✝¹ :
  ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝¹ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹
members✝ : Set (PartialHomeomorph H H)
trans'✝ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝
symm'✝ : ∀ e ∈ members✝, PartialHomeomorph.symm e ∈ members✝
id_mem'✝ : PartialHomeomorph.refl H ∈ members✝
locality'✝ :
  ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ members✝) → e ∈ members✝
eq_on_source'✝ : ∀ (e e' : PartialHomeomorph 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'✝ }

Next tactic:
dsimp at h
/-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid. -/
instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
  PartialOrder.lift StructureGroupoid.members fun a b h ↦ by
    cases a
    cases b
    dsimp at h
    

Proof state:
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 (PartialHomeomorph H H)
trans'✝¹ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝¹ : ∀ e ∈ members✝¹, PartialHomeomorph.symm e ∈ members✝¹
id_mem'✝¹ : PartialHomeomorph.refl H ∈ members✝¹
locality'✝¹ :
  ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝¹ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹
members✝ : Set (PartialHomeomorph H H)
trans'✝ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝ → e' ∈ members✝ → e ≫ₕ e' ∈ members✝
symm'✝ : ∀ e ∈ members✝, PartialHomeomorph.symm e ∈ members✝
id_mem'✝ : PartialHomeomorph.refl H ∈ members✝
locality'✝ :
  ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ members✝) → e ∈ members✝
eq_on_source'✝ : ∀ (e e' : PartialHomeomorph 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'✝ }

Next tactic:
induction h
/-- Partial order on the set of groupoids, given by inclusion of the members of the groupoid. -/
instance StructureGroupoid.partialOrder : PartialOrder (StructureGroupoid H) :=
  PartialOrder.lift StructureGroupoid.members fun a b h ↦ by
    cases a
    cases b
    dsimp at h
    induction h
    

Proof state:
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 (PartialHomeomorph H H)
trans'✝¹ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝¹ : ∀ e ∈ members✝¹, PartialHomeomorph.symm e ∈ members✝¹
id_mem'✝¹ : PartialHomeomorph.refl H ∈ members✝¹
locality'✝¹ :
  ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝¹ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝¹ → e' ≈ e → e' ∈ members✝¹
members✝ : Set (PartialHomeomorph H H)
trans'✝ : ∀ (e e' : PartialHomeomorph H H), e ∈ members✝¹ → e' ∈ members✝¹ → e ≫ₕ e' ∈ members✝¹
symm'✝ : ∀ e ∈ members✝¹, PartialHomeomorph.symm e ∈ members✝¹
id_mem'✝ : PartialHomeomorph.refl H ∈ members✝¹
locality'✝ :
  ∀ (e : PartialHomeomorph H H),
    (∀ x ∈ e.source, ∃ s, IsOpen s ∧ x ∈ s ∧ PartialHomeomorph.restr e s ∈ members✝¹) → e ∈ members✝¹
eq_on_source'✝ : ∀ (e e' : PartialHomeomorph 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'✝ }

Next tactic:
rfl
/-- The trivial groupoid, containing only the identity (and maps with empty source, as this is
necessary from the definition). -/
def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
  members := {PartialHomeomorph.refl H} ∪ { e : PartialHomeomorph H H | e.source = ∅ }
  trans' e e' he he' := by
    

Proof state:
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' : PartialHomeomorph H H
he : e ∈ {PartialHomeomorph.refl H} ∪ {e | e.source = ∅}
he' : e' ∈ {PartialHomeomorph.refl H} ∪ {e | e.source = ∅}
⊢ e ≫ₕ e' ∈ {PartialHomeomorph.refl H} ∪ {e | e.source = ∅}

Next tactic:
cases' he with he he
/-- The trivial groupoid, containing only the identity (and maps with empty source, as this is
necessary from the definition). -/
def idGroupoid (H : Type u) [TopologicalSpace H] : StructureGroupoid H where
  members := {PartialHomeomorph.refl H} ∪ { e : PartialHomeomorph H H | e.source = ∅ }
  trans' e e' he he' := by
    cases' he with he he
    · 

Proof state:
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' : PartialHomeomorph H H
he' : e' ∈ {PartialHomeomorph.refl H} ∪ {e | e.source = ∅}
he : e ∈ {PartialHomeomorph.refl H}
⊢ e ≫ₕ e' ∈ {PartialHomeomorph.refl H} ∪ {e | e.source = ∅}

Next tactic:
simpa only [mem_singleton_iff.1 he, refl_trans]