awhecmu/canonical-drafter-extract-mathlib huggingface dataset:
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
e : E
he : e ∈ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
e' : E
he' : e' ∈ U (idx e he) ∩ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
h :
  e' ∉
    {x : E |
      (fun (x : E) ↦
          Eq (α := ι) ((fun (x : E) ↦ idx e he) x)
            ((fun (x : E) ↦ (if he : f x ∈ V then idx x he else Classical.arbitrary ι : ι)) x))
        x}
⊢ f e' ∈ V

Tactic:
exact he'.2

Premises used: And.right
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
e : E
he : e ∈ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
e' : E
he' : e' ∈ U (idx e he) ∩ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
h :
  e' ∉
    {x : E |
      (fun (x : E) ↦
          Eq (α := ι) ((fun (x : E) ↦ idx e he) x)
            ((fun (x : E) ↦ (if he : f x ∈ V then idx x he else Classical.arbitrary ι : ι)) x))
        x}
refine_1 : e' ∈ U (idx e he) ⊓ U (idx e' ⋯)
⊢ e' ∈ U (idx e he) ⊓ U (if he : f e' ∈ V then idx e' he else Classical.arbitrary ι)

Tactic:
rw [dif_pos (by exact he'.2)]

Premises used: dif_pos
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
e : E
he : e ∈ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
e' : E
he' : e' ∈ U (idx e he) ∩ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
h :
  e' ∉
    {x : E |
      (fun (x : E) ↦
          Eq (α := ι) ((fun (x : E) ↦ idx e he) x)
            ((fun (x : E) ↦ (if he : f x ∈ V then idx x he else Classical.arbitrary ι : ι)) x))
        x}
⊢ e' ∈ U (idx e he) ⊓ U (idx e' ⋯)

Tactic:
⟨he'.1, idx_U ..⟩

Premises used: Set.Mem, setOf, Set.inter, And.left, And.intro
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
e : E
he : e ∈ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
e' : E
he' : e' ∈ U (idx e he) ∩ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
h :
  e' ∉
    {x : E |
      (fun (x : E) ↦
          Eq (α := ι) ((fun (x : E) ↦ idx e he) x)
            ((fun (x : E) ↦ (if he : f x ∈ V then idx x he else Classical.arbitrary ι : ι)) x))
        x}
⊢ e' ∈ U (idx e he) ⊓ U (idx e' ⋯)

Tactic:
exact ⟨he'.1, idx_U ..⟩
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
e : E
he : e ∈ PartialEquiv.source.{u_1, max u_2 ?u.94810} F
refine_2 : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F ∩ U (idx e he))
refine_2₁ refine_2₂ refine_2₃ refine_2₄ : IsOpen[inst_1] V
⊢ IsOpen[inst] (U (idx e he) ∩ PartialEquiv.source.{u_1, max u_2 ?u.94810} F)

Tactic:
rwa [Set.inter_comm, ← open_iff _ subset_rfl]

Premises used: Set.inter_comm, subset_rfl
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
refine_3 :
  ContinuousOn.{u_2, u_1} (Y := E) (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x)
    {a : X | a ∈ V}
⊢ ContinuousOn.{u_2, u_1} (Y := E) (fun (x : X) ↦ PartialEquiv.invFun.{u_1, max ?u.94810 u_2} F (x, i))
    {a : X | Membership.mem.{max ?u.94810 u_2, max u_2 ?u.94810} (PartialEquiv.target.{u_1, max ?u.94810 u_2} F) (a, i)}

Tactic:
simp_rw [F, Set.prodMk_mem_set_prod_eq, Set.mem_univ, and_true]

Premises used: and_true, Set.prodMk_mem_set_prod_eq, Set.mem_univ
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
⊢ ContinuousOn.{u_2, u_1} (Y := E) (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x)
    {a : X | a ∈ V}

Tactic:
(continuousOn_open_iff open_V).mpr fun W open_W ↦ ?_

Premises used: Iff.mpr, Set.Mem, setOf, continuousOn_open_iff
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
refine_3 :
  ∀ (W : Set E) (open_W : IsOpen[inst] W),
    IsOpen[inst_1] (V ∩ (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W)
⊢ ContinuousOn.{u_2, u_1} (Y := E) (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x)
    {a : X | a ∈ V}

Tactic:
refine (continuousOn_open_iff open_V).mpr fun W open_W ↦ ?_

Premises used: Iff.mpr, continuousOn_open_iff
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
W : Set E
open_W : IsOpen[inst] W
refine_3 :
  IsOpen[inst] (f ⁻¹' (V ∩ (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W) ∩ U i)
⊢ IsOpen[inst_1] (V ∩ (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W)

Tactic:
rw [open_iff i Set.inter_subset_left]

Premises used: Set.inter_subset_left
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
W : Set E
open_W : IsOpen[inst] W
⊢ IsOpen[inst] (f ⁻¹' V ∩ U i ∩ W)

Tactic:
((open_iff i subset_rfl).mp open_V).inter open_W

Premises used: IsOpen.inter, Iff.mp, subset_rfl
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
W : Set E
open_W : IsOpen[inst] W
h :
  f ⁻¹' (V ∩ (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W) ∩ U i =
    f ⁻¹' V ∩ U i ∩ W
⊢ IsOpen[inst] (f ⁻¹' (V ∩ (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W) ∩ U i)

Tactic:
convert! ((open_iff i subset_rfl).mp open_V).inter open_W using 1

Premises used: IsOpen.inter, Iff.mp, subset_rfl
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
W : Set E
open_W : IsOpen[inst] W
⊢ f ⁻¹' (V ∩ (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W) ∩ U i =
    f ⁻¹' V ∩ U i ∩ W

Tactic:
Set.ext fun e ↦ and_right_comm.trans (and_congr_right fun ⟨hV, hU⟩ ↦ ?_)

Premises used: Set.ext, Membership.mem, IsOpen.trivializationDiscrete.match_4, and_congr_right, dite, Iff, Set.preimage, and_right_comm, Classical.arbitrary, Iff.trans, Eq.refl, Eq.mpr_prop
-- Module: Mathlib.Topology.Covering.Basic
Goal:
E : Type u_1
X : Type u_2
inst : TopologicalSpace E
inst_1 : TopologicalSpace X
f : E → X
s : Set X
inst_2 : Nonempty (X → E)
ι : Type ?u.94810
inst_3 : Nonempty ι
inst_4 : TopologicalSpace ι
inst_5 : DiscreteTopology ι
U : ι → Set E
V : Set X
open_V : IsOpen[inst_1] V
open_iff : ∀ (i : ι) {W : Set X}, W ⊆ V → (IsOpen[inst_1] W ↔ IsOpen[inst] (f ⁻¹' W ∩ U i))
inj : ∀ (i : ι), Set.InjOn f (U i)
disjoint : Pairwise (Disjoint on U)
exhaustive' : f ⁻¹' V ⊆ ⋃ (i : ι), U i
idx : (x : E) → x ∈ f ⁻¹' V → ι
idx_U : ∀ (x : E) (a : x ∈ f ⁻¹' V), x ∈ U (idx x a)
inv : (i : ι) → ⦃a : X⦄ → a ∈ V → E
inv_U : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), inv i a_1 ∈ U i
f_inv : ∀ (i : ι) ⦃a : X⦄ (a_1 : a ∈ V), f (inv i a_1) = a
F : PartialEquiv.{u_1, max ?u.94810 u_2} E (X × ι) :=
  { toFun := fun (e : E) ↦ (f e, if he : f e ∈ V then idx e he else Classical.arbitrary ι),
    invFun := fun (x : X × ι) ↦ if hx : x.1 ∈ V then inv x.2 hx else Classical.arbitrary (X → E) x.1, source := f ⁻¹' V,
    target := SProd.sprod (β := Set ι) V Set.univ, map_source' := ⋯, map_target' := ⋯, left_inv' := ⋯, right_inv' := ⋯ }
open_preim : ∀ {W : Set X} (hWV : W ⊆ V) (open_W : IsOpen[inst_1] W), IsOpen[inst] (f ⁻¹' W)
open_source : IsOpen[inst] (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
cont_f : ContinuousOn f (PartialEquiv.source.{u_1, max u_2 ?u.94810} F)
i : ι
W : Set E
open_W : IsOpen[inst] W
h :
  ∀ (e : E),
    f e ∈ V ∧ e ∈ U i →
      ∀ (hV : f e ∈ V) (hU : e ∈ U i),
        Membership.mem (γ := Set X) ((fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W)
            (f e) ↔
          e ∈ W
⊢ f ⁻¹' (V ∩ (fun (x : X) ↦ if h : x ∈ V then inv i ⋯ else Classical.arbitrary (X → E) x) ⁻¹' W) ∩ U i =
    f ⁻¹' V ∩ U i ∩ W

Tactic:
refine Set.ext fun e ↦ and_right_comm.trans (and_congr_right fun ⟨hV, hU⟩ ↦ ?_)

Premises used: Set.ext, and_congr_right, and_right_comm, Iff.trans