l3lab/ntp-mathlib huggingface dataset:
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    

Proof state:
case refine'_1.cons
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as : List α
head✝ : α
tail✝ : List α
tail_ih✝ : pure tail✝ ≤ traverse 𝓝 tail✝
⊢ pure (head✝ :: tail✝) ≤ traverse 𝓝 (head✝ :: tail✝)

Next tactic:
case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as : List α
a : α
l : List α
ih : pure l ≤ traverse 𝓝 l
⊢ pure (a :: l) ≤ traverse 𝓝 (a :: l)

Next tactic:
case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as : List α
a : α
l : List α
ih : pure l ≤ traverse 𝓝 l
⊢ pure (a :: l) ≤ traverse 𝓝 (a :: l)

Next tactic:
suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as : List α
a : α
l : List α
ih : pure l ≤ traverse 𝓝 l
this : (Seq.seq (List.cons <$> pure a) fun x => pure l) ≤ Seq.seq (List.cons <$> 𝓝 a) fun x => traverse 𝓝 l
⊢ pure (a :: l) ≤ traverse 𝓝 (a :: l)

Next tactic:
simpa only [functor_norm] using this
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as : List α
a : α
l : List α
ih : pure l ≤ traverse 𝓝 l
⊢ (Seq.seq (List.cons <$> pure a) fun x => pure l) ≤ Seq.seq (List.cons <$> 𝓝 a) fun x => traverse 𝓝 l

Next tactic:
exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · 

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as : List α
⊢ ∀ (a : List α), ∀ s ∈ traverse 𝓝 a, ∃ t ∈ traverse 𝓝 a, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
intro l s hs
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as l : List α
s : Set (List α)
hs : s ∈ traverse 𝓝 l
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    

Proof state:
case refine'_2.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
as l : List α
s : Set (List α)
hs : s ∈ traverse 𝓝 l
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
clear as hs
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    

Proof state:
case refine'_2.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
s : Set (List α)
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    

Proof state:
case this
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
s : Set (List α)
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
⊢ ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l v ∧ sequence v ⊆ s
case refine'_2.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
s : Set (List α)
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
this : ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l v ∧ sequence v ⊆ s
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
induction hu generalizing s
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    

Proof state:
case this.nil
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
u : List (Set α)
s : Set (List α)
hus : sequence [] ⊆ s
⊢ ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) [] v ∧ sequence v ⊆ s
case this.cons
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
u : List (Set α)
a✝² : α
b✝ : Set α
l₁✝ : List α
l₂✝ : List (Set α)
a✝¹ : b✝ ∈ 𝓝 a✝²
a✝ : List.Forall₂ (fun b s => s ∈ 𝓝 b) l₁✝ l₂✝
a_ih✝ : ∀ (s : Set (List α)), sequence l₂✝ ⊆ s → ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l₁✝ v ∧ sequence v ⊆ s
s : Set (List α)
hus : sequence (b✝ :: l₂✝) ⊆ s
⊢ ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) (a✝² :: l₁✝) v ∧ sequence v ⊆ s
case refine'_2.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
s : Set (List α)
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
this : ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l v ∧ sequence v ⊆ s
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    

Proof state:
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
_hs : TopologicalSpace β
l : List α
u : List (Set α)
s : Set (List α)
hus : sequence [] ⊆ s
⊢ ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) [] v ∧ sequence v ⊆ s

Next tactic:
case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      

Proof state:
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
_hs : TopologicalSpace β
l : List α
u : List (Set α)
s : Set (List α)
hus : sequence [] ⊆ s
⊢ ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) [] v ∧ sequence v ⊆ s

Next tactic:
exists []
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      

Proof state:
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
_hs : TopologicalSpace β
l : List α
u : List (Set α)
s : Set (List α)
hus : sequence [] ⊆ s
⊢ List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) [] [] ∧ sequence [] ⊆ s

Next tactic:
simp only [List.forall₂_nil_left_iff, exists_eq_left]
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      

Proof state:
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
_hs : TopologicalSpace β
l : List α
u : List (Set α)
s : Set (List α)
hus : sequence [] ⊆ s
⊢ True ∧ sequence [] ⊆ s

Next tactic:
exact ⟨trivial, hus⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
    -- porting note -- renamed reordered variables based on previous types
    

Proof state:
case this.cons
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
u : List (Set α)
a✝² : α
b✝ : Set α
l₁✝ : List α
l₂✝ : List (Set α)
a✝¹ : b✝ ∈ 𝓝 a✝²
a✝ : List.Forall₂ (fun b s => s ∈ 𝓝 b) l₁✝ l₂✝
a_ih✝ : ∀ (s : Set (List α)), sequence l₂✝ ⊆ s → ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l₁✝ v ∧ sequence v ⊆ s
s : Set (List α)
hus : sequence (b✝ :: l₂✝) ⊆ s
⊢ ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) (a✝² :: l₁✝) v ∧ sequence v ⊆ s
case refine'_2.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
s : Set (List α)
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
this : ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l v ∧ sequence v ⊆ s
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
case cons a s as ss hts h ht _ ih =>
      rcases mem_nhds_iff.1 ht with ⟨u, hut, hu⟩
      rcases ih _ Subset.rfl with ⟨v, hv, hvss⟩
      exact
        ⟨u::v, List.Forall₂.cons hu hv,
          Subset.trans (Set.seq_mono (Set.image_subset _ hut) hvss) hus⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
    -- porting note -- renamed reordered variables based on previous types
    

Proof state:
α : Type u_1
β : Type u_2
a : TopologicalSpace α
s✝ : TopologicalSpace β
l : List α
u : List (Set α)
as : α
ss : Set α
hts : List α
h : List (Set α)
ht : ss ∈ 𝓝 as
a✝ : List.Forall₂ (fun b s => s ∈ 𝓝 b) hts h
ih : ∀ (s : Set (List α)), sequence h ⊆ s → ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) hts v ∧ sequence v ⊆ s
s : Set (List α)
hus : sequence (ss :: h) ⊆ s
⊢ ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) (as :: hts) v ∧ sequence v ⊆ s

Next tactic:
case cons a s as ss hts h ht _ ih =>
      rcases mem_nhds_iff.1 ht with ⟨u, hut, hu⟩
      rcases ih _ Subset.rfl with ⟨v, hv, hvss⟩
      exact
        ⟨u::v, List.Forall₂.cons hu hv,
          Subset.trans (Set.seq_mono (Set.image_subset _ hut) hvss) hus⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
    -- porting note -- renamed reordered variables based on previous types
    case cons a s as ss hts h ht _ ih =>
      

Proof state:
α : Type u_1
β : Type u_2
a : TopologicalSpace α
s✝ : TopologicalSpace β
l : List α
u : List (Set α)
as : α
ss : Set α
hts : List α
h : List (Set α)
ht : ss ∈ 𝓝 as
a✝ : List.Forall₂ (fun b s => s ∈ 𝓝 b) hts h
ih : ∀ (s : Set (List α)), sequence h ⊆ s → ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) hts v ∧ sequence v ⊆ s
s : Set (List α)
hus : sequence (ss :: h) ⊆ s
⊢ ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) (as :: hts) v ∧ sequence v ⊆ s

Next tactic:
rcases mem_nhds_iff.1 ht with ⟨u, hut, hu⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
    -- porting note -- renamed reordered variables based on previous types
    case cons a s as ss hts h ht _ ih =>
      rcases mem_nhds_iff.1 ht with ⟨u, hut, hu⟩
      

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
a : TopologicalSpace α
s✝ : TopologicalSpace β
l : List α
u✝ : List (Set α)
as : α
ss : Set α
hts : List α
h : List (Set α)
ht : ss ∈ 𝓝 as
a✝ : List.Forall₂ (fun b s => s ∈ 𝓝 b) hts h
ih : ∀ (s : Set (List α)), sequence h ⊆ s → ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) hts v ∧ sequence v ⊆ s
s : Set (List α)
hus : sequence (ss :: h) ⊆ s
u : Set α
hut : u ⊆ ss
hu : IsOpen u ∧ as ∈ u
⊢ ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) (as :: hts) v ∧ sequence v ⊆ s

Next tactic:
rcases ih _ Subset.rfl with ⟨v, hv, hvss⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
    -- porting note -- renamed reordered variables based on previous types
    case cons a s as ss hts h ht _ ih =>
      rcases mem_nhds_iff.1 ht with ⟨u, hut, hu⟩
      rcases ih _ Subset.rfl with ⟨v, hv, hvss⟩
      

Proof state:
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
a : TopologicalSpace α
s✝ : TopologicalSpace β
l : List α
u✝ : List (Set α)
as : α
ss : Set α
hts : List α
h : List (Set α)
ht : ss ∈ 𝓝 as
a✝ : List.Forall₂ (fun b s => s ∈ 𝓝 b) hts h
ih : ∀ (s : Set (List α)), sequence h ⊆ s → ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) hts v ∧ sequence v ⊆ s
s : Set (List α)
hus : sequence (ss :: h) ⊆ s
u : Set α
hut : u ⊆ ss
hu : IsOpen u ∧ as ∈ u
v : List (Set α)
hv : List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) hts v
hvss : sequence v ⊆ sequence h
⊢ ∃ v, List.Forall₂ (fun a_1 s => IsOpen s ∧ a_1 ∈ s) (as :: hts) v ∧ sequence v ⊆ s

Next tactic:
exact
        ⟨u::v, List.Forall₂.cons hu hv,
          Subset.trans (Set.seq_mono (Set.image_subset _ hut) hvss) hus⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
    -- porting note -- renamed reordered variables based on previous types
    case cons a s as ss hts h ht _ ih =>
      rcases mem_nhds_iff.1 ht with ⟨u, hut, hu⟩
      rcases ih _ Subset.rfl with ⟨v, hv, hvss⟩
      exact
        ⟨u::v, List.Forall₂.cons hu hv,
          Subset.trans (Set.seq_mono (Set.image_subset _ hut) hvss) hus⟩
    

Proof state:
case refine'_2.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
s : Set (List α)
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
this : ∃ v, List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l v ∧ sequence v ⊆ s
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
rcases this with ⟨v, hv, hvs⟩
theorem nhds_list (as : List α) : 𝓝 as = traverse 𝓝 as := by
  refine' nhds_mkOfNhds _ _ _ _
  · intro l
    induction l
    case nil => exact le_rfl
    case cons a l ih =>
      suffices List.cons <$> pure a <*> pure l ≤ List.cons <$> 𝓝 a <*> traverse 𝓝 l by
        simpa only [functor_norm] using this
      exact Filter.seq_mono (Filter.map_mono <| pure_le_nhds a) ih
  · intro l s hs
    rcases (mem_traverse_iff _ _).1 hs with ⟨u, hu, hus⟩
    clear as hs
    have : ∃ v : List (Set α), l.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) v ∧ sequence v ⊆ s
    induction hu generalizing s
    case nil _hs =>
      exists []
      simp only [List.forall₂_nil_left_iff, exists_eq_left]
      exact ⟨trivial, hus⟩
    -- porting note -- renamed reordered variables based on previous types
    case cons a s as ss hts h ht _ ih =>
      rcases mem_nhds_iff.1 ht with ⟨u, hut, hu⟩
      rcases ih _ Subset.rfl with ⟨v, hv, hvss⟩
      exact
        ⟨u::v, List.Forall₂.cons hu hv,
          Subset.trans (Set.seq_mono (Set.image_subset _ hut) hvss) hus⟩
    rcases this with ⟨v, hv, hvs⟩
    

Proof state:
case refine'_2.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
l : List α
s : Set (List α)
u : List (Set α)
hu : List.Forall₂ (fun b s => s ∈ 𝓝 b) l u
hus : sequence u ⊆ s
v : List (Set α)
hv : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) l v
hvs : sequence v ⊆ s
⊢ ∃ t ∈ traverse 𝓝 l, t ⊆ s ∧ ∀ a' ∈ t, s ∈ traverse 𝓝 a'

Next tactic:
refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩