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
    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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · 

Proof state:
case refine'_2.intro.intro.intro.intro.refine'_1
α : 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
⊢ List.Forall₂ (fun b c => id c ∈ 𝓝 b) l v

Next tactic:
exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · 

Proof state:
case refine'_2.intro.intro.intro.intro.refine'_2
α : 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
⊢ ∀ a' ∈ sequence v, s ∈ traverse 𝓝 a'

Next tactic:
intro u 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⟩
      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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      

Proof state:
case refine'_2.intro.intro.intro.intro.refine'_2
α : 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
u : List α
hu : u ∈ sequence v
⊢ s ∈ traverse 𝓝 u

Next tactic:
have hu := (List.mem_traverse _ _).1 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⟩
      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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      have hu := (List.mem_traverse _ _).1 hu
      

Proof state:
case refine'_2.intro.intro.intro.intro.refine'_2
α : 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
u : List α
hu✝ : u ∈ sequence v
hu : List.Forall₂ (fun b a => b ∈ id a) u v
⊢ s ∈ traverse 𝓝 u

Next tactic:
have : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v := by
        refine' List.Forall₂.flip _
        replace hv := hv.flip
        simp only [List.forall₂_and_left, flip] at hv ⊢
        exact ⟨hv.1, hu.flip⟩
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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      have hu := (List.mem_traverse _ _).1 hu
      have : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v := by
        

Proof state:
α : 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
u : List α
hu✝ : u ∈ sequence v
hu : List.Forall₂ (fun b a => b ∈ id a) u v
⊢ List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v

Next tactic:
refine' List.Forall₂.flip _
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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      have hu := (List.mem_traverse _ _).1 hu
      have : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v := by
        refine' List.Forall₂.flip _
        

Proof state:
α : 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
u : List α
hu✝ : u ∈ sequence v
hu : List.Forall₂ (fun b a => b ∈ id a) u v
⊢ List.Forall₂ (flip fun a s => IsOpen s ∧ a ∈ s) v u

Next tactic:
replace hv := hv.flip
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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      have hu := (List.mem_traverse _ _).1 hu
      have : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v := by
        refine' List.Forall₂.flip _
        replace hv := hv.flip
        

Proof state:
α : 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 α)
hvs : sequence v ⊆ s
u : List α
hu✝ : u ∈ sequence v
hu : List.Forall₂ (fun b a => b ∈ id a) u v
hv : List.Forall₂ (fun s a => IsOpen s ∧ a ∈ s) v l
⊢ List.Forall₂ (flip fun a s => IsOpen s ∧ a ∈ s) v u

Next tactic:
simp only [List.forall₂_and_left, flip] at hv ⊢
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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      have hu := (List.mem_traverse _ _).1 hu
      have : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v := by
        refine' List.Forall₂.flip _
        replace hv := hv.flip
        simp only [List.forall₂_and_left, flip] at hv ⊢
        

Proof state:
α : 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 α)
hvs : sequence v ⊆ s
u : List α
hu✝ : u ∈ sequence v
hu : List.Forall₂ (fun b a => b ∈ id a) u v
hv : (∀ a ∈ v, IsOpen a) ∧ List.Forall₂ (fun a b => b ∈ a) v l
⊢ (∀ a ∈ v, IsOpen a) ∧ List.Forall₂ (fun a b => b ∈ a) v u

Next tactic:
exact ⟨hv.1, hu.flip⟩
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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      have hu := (List.mem_traverse _ _).1 hu
      have : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v := by
        refine' List.Forall₂.flip _
        replace hv := hv.flip
        simp only [List.forall₂_and_left, flip] at hv ⊢
        exact ⟨hv.1, hu.flip⟩
      

Proof state:
case refine'_2.intro.intro.intro.intro.refine'_2
α : 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
u : List α
hu✝ : u ∈ sequence v
hu : List.Forall₂ (fun b a => b ∈ id a) u v
this : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v
⊢ s ∈ traverse 𝓝 u

Next tactic:
refine' mem_of_superset _ 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⟩
    refine' ⟨sequence v, mem_traverse _ _ _, hvs, _⟩
    · exact hv.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha
    · intro u hu
      have hu := (List.mem_traverse _ _).1 hu
      have : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v := by
        refine' List.Forall₂.flip _
        replace hv := hv.flip
        simp only [List.forall₂_and_left, flip] at hv ⊢
        exact ⟨hv.1, hu.flip⟩
      refine' mem_of_superset _ hvs
      

Proof state:
case refine'_2.intro.intro.intro.intro.refine'_2
α : 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
u : List α
hu✝ : u ∈ sequence v
hu : List.Forall₂ (fun b a => b ∈ id a) u v
this : List.Forall₂ (fun a s => IsOpen s ∧ a ∈ s) u v
⊢ sequence v ∈ traverse 𝓝 u

Next tactic:
exact mem_traverse _ _ (this.imp fun a s ⟨hs, ha⟩ => IsOpen.mem_nhds hs ha)
@[simp]
theorem nhds_nil : 𝓝 ([] : List α) = pure [] := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
⊢ 𝓝 [] = pure []

Next tactic:
rw [nhds_list, List.traverse_nil _]
theorem nhds_cons (a : α) (l : List α) : 𝓝 (a::l) = List.cons <$> 𝓝 a <*> 𝓝 l := by
  

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

Next tactic:
rw [nhds_list, List.traverse_cons _, ← nhds_list]
theorem List.tendsto_cons {a : α} {l : List α} :
    Tendsto (fun p : α × List α => List.cons p.1 p.2) (𝓝 a ×ˢ 𝓝 l) (𝓝 (a::l)) := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a : α
l : List α
⊢ Tendsto (fun p => p.1 :: p.2) (𝓝 a ×ˢ 𝓝 l) (𝓝 (a :: l))

Next tactic:
rw [nhds_cons, Tendsto, Filter.map_prod]
theorem List.tendsto_cons {a : α} {l : List α} :
    Tendsto (fun p : α × List α => List.cons p.1 p.2) (𝓝 a ×ˢ 𝓝 l) (𝓝 (a::l)) := by
  rw [nhds_cons, Tendsto, Filter.map_prod]; 

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
a : α
l : List α
⊢ Filter.seq (Filter.map (fun a b => (a, b).1 :: (a, b).2) (𝓝 a)) (𝓝 l) ≤ Seq.seq (cons <$> 𝓝 a) fun x => 𝓝 l

Next tactic:
exact le_rfl
theorem tendsto_cons_iff {β : Type*} {f : List α → β} {b : Filter β} {a : α} {l : List α} :
    Tendsto f (𝓝 (a::l)) b ↔ Tendsto (fun p : α × List α => f (p.1::p.2)) (𝓝 a ×ˢ 𝓝 l) b := by
  

Proof state:
α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
b : Filter β
a : α
l : List α
⊢ Tendsto f (𝓝 (a :: l)) b ↔ Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) b

Next tactic:
have : 𝓝 (a::l) = (𝓝 a ×ˢ 𝓝 l).map fun p : α × List α => p.1::p.2 := by
    simp only [nhds_cons, Filter.prod_eq, (Filter.map_def _ _).symm,
      (Filter.seq_eq_filter_seq _ _).symm]
    simp [-Filter.map_def, (· ∘ ·), functor_norm]
theorem tendsto_cons_iff {β : Type*} {f : List α → β} {b : Filter β} {a : α} {l : List α} :
    Tendsto f (𝓝 (a::l)) b ↔ Tendsto (fun p : α × List α => f (p.1::p.2)) (𝓝 a ×ˢ 𝓝 l) b := by
  have : 𝓝 (a::l) = (𝓝 a ×ˢ 𝓝 l).map fun p : α × List α => p.1::p.2 := by
    

Proof state:
α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
b : Filter β
a : α
l : List α
⊢ 𝓝 (a :: l) = Filter.map (fun p => p.1 :: p.2) (𝓝 a ×ˢ 𝓝 l)

Next tactic:
simp only [nhds_cons, Filter.prod_eq, (Filter.map_def _ _).symm,
      (Filter.seq_eq_filter_seq _ _).symm]
theorem tendsto_cons_iff {β : Type*} {f : List α → β} {b : Filter β} {a : α} {l : List α} :
    Tendsto f (𝓝 (a::l)) b ↔ Tendsto (fun p : α × List α => f (p.1::p.2)) (𝓝 a ×ˢ 𝓝 l) b := by
  have : 𝓝 (a::l) = (𝓝 a ×ˢ 𝓝 l).map fun p : α × List α => p.1::p.2 := by
    simp only [nhds_cons, Filter.prod_eq, (Filter.map_def _ _).symm,
      (Filter.seq_eq_filter_seq _ _).symm]
    

Proof state:
α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
b : Filter β
a : α
l : List α
⊢ (Seq.seq (cons <$> 𝓝 a) fun x => 𝓝 l) = (fun p => p.1 :: p.2) <$> Seq.seq (Prod.mk <$> 𝓝 a) fun x => 𝓝 l

Next tactic:
simp [-Filter.map_def, (· ∘ ·), functor_norm]
theorem tendsto_cons_iff {β : Type*} {f : List α → β} {b : Filter β} {a : α} {l : List α} :
    Tendsto f (𝓝 (a::l)) b ↔ Tendsto (fun p : α × List α => f (p.1::p.2)) (𝓝 a ×ˢ 𝓝 l) b := by
  have : 𝓝 (a::l) = (𝓝 a ×ˢ 𝓝 l).map fun p : α × List α => p.1::p.2 := by
    simp only [nhds_cons, Filter.prod_eq, (Filter.map_def _ _).symm,
      (Filter.seq_eq_filter_seq _ _).symm]
    simp [-Filter.map_def, (· ∘ ·), functor_norm]
  

Proof state:
α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
b : Filter β
a : α
l : List α
this : 𝓝 (a :: l) = Filter.map (fun p => p.1 :: p.2) (𝓝 a ×ˢ 𝓝 l)
⊢ Tendsto f (𝓝 (a :: l)) b ↔ Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) b

Next tactic:
rw [this, Filter.tendsto_map'_iff]
theorem tendsto_cons_iff {β : Type*} {f : List α → β} {b : Filter β} {a : α} {l : List α} :
    Tendsto f (𝓝 (a::l)) b ↔ Tendsto (fun p : α × List α => f (p.1::p.2)) (𝓝 a ×ˢ 𝓝 l) b := by
  have : 𝓝 (a::l) = (𝓝 a ×ˢ 𝓝 l).map fun p : α × List α => p.1::p.2 := by
    simp only [nhds_cons, Filter.prod_eq, (Filter.map_def _ _).symm,
      (Filter.seq_eq_filter_seq _ _).symm]
    simp [-Filter.map_def, (· ∘ ·), functor_norm]
  rw [this, Filter.tendsto_map'_iff]; 

Proof state:
α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
b : Filter β
a : α
l : List α
this : 𝓝 (a :: l) = Filter.map (fun p => p.1 :: p.2) (𝓝 a ×ˢ 𝓝 l)
⊢ Tendsto (f ∘ fun p => p.1 :: p.2) (𝓝 a ×ˢ 𝓝 l) b ↔ Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) b

Next tactic:
rfl
theorem tendsto_nhds {β : Type*} {f : List α → β} {r : List α → Filter β}
    (h_nil : Tendsto f (pure []) (r []))
    (h_cons :
      ∀ l a,
        Tendsto f (𝓝 l) (r l) →
          Tendsto (fun p : α × List α => f (p.1::p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a::l))) :
    ∀ l, Tendsto f (𝓝 l) (r l)
  | [] => by 

Proof state:
α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
r : List α → Filter β
h_nil : Tendsto f (pure []) (r [])
h_cons : ∀ (l : List α) (a : α), Tendsto f (𝓝 l) (r l) → Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a :: l))
⊢ Tendsto f (𝓝 []) (r [])

Next tactic:
rwa [nhds_nil]