l3lab/ntp-mathlib huggingface dataset:
/-- Every set open in the lower topology is a lower set. -/
theorem isLowerSet_of_isOpen (h : IsOpen s) : IsLowerSet s := by
  -- porting note: `rw` leaves a shadowed assumption
  replace h := isOpen_iff_generate_Ici_compl.1 h
  induction h
  case basic u h' => obtain ⟨a, rfl⟩ := h'; exact (isUpperSet_Ici a).compl
  case univ => exact isLowerSet_univ
  case inter u v _ _ hu2 hv2 => exact hu2.inter hv2
  

Proof state:
case sUnion
α : Type u_1
β : ?m.7606
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
S✝ : Set (Set α)
a✝ : ∀ s ∈ S✝, GenerateOpen {t | ∃ a, (Ici a)ᶜ = t} s
a_ih✝ : ∀ s ∈ S✝, IsLowerSet s
⊢ IsLowerSet (⋃₀ S✝)

Next tactic:
case sUnion _ _ ih => exact isLowerSet_sUnion ih
/-- Every set open in the lower topology is a lower set. -/
theorem isLowerSet_of_isOpen (h : IsOpen s) : IsLowerSet s := by
  -- porting note: `rw` leaves a shadowed assumption
  replace h := isOpen_iff_generate_Ici_compl.1 h
  induction h
  case basic u h' => obtain ⟨a, rfl⟩ := h'; exact (isUpperSet_Ici a).compl
  case univ => exact isLowerSet_univ
  case inter u v _ _ hu2 hv2 => exact hu2.inter hv2
  

Proof state:
α : Type u_1
β : ?m.7606
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
S✝ : Set (Set α)
a✝ : ∀ s ∈ S✝, GenerateOpen {t | ∃ a, (Ici a)ᶜ = t} s
ih : ∀ s ∈ S✝, IsLowerSet s
⊢ IsLowerSet (⋃₀ S✝)

Next tactic:
case sUnion _ _ ih => exact isLowerSet_sUnion ih
/-- Every set open in the lower topology is a lower set. -/
theorem isLowerSet_of_isOpen (h : IsOpen s) : IsLowerSet s := by
  -- porting note: `rw` leaves a shadowed assumption
  replace h := isOpen_iff_generate_Ici_compl.1 h
  induction h
  case basic u h' => obtain ⟨a, rfl⟩ := h'; exact (isUpperSet_Ici a).compl
  case univ => exact isLowerSet_univ
  case inter u v _ _ hu2 hv2 => exact hu2.inter hv2
  case sUnion _ _ ih => 

Proof state:
α : Type u_1
β : ?m.7606
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
S✝ : Set (Set α)
a✝ : ∀ s ∈ S✝, GenerateOpen {t | ∃ a, (Ici a)ᶜ = t} s
ih : ∀ s ∈ S✝, IsLowerSet s
⊢ IsLowerSet (⋃₀ S✝)

Next tactic:
exact isLowerSet_sUnion ih
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  

Proof state:
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
⊢ IsTopologicalBasis (lowerBasis α)

Next tactic:
convert isTopologicalBasis_of_subbasis (topology_eq α)
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  

Proof state:
case h.e'_3
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
⊢ lowerBasis α = (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ {s | ∃ a, (Ici a)ᶜ = s}}

Next tactic:
simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  

Proof state:
case h.e'_3
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
⊢ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s} = (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ {s | ∃ a, (Ici a)ᶜ = s}}

Next tactic:
ext s
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  

Proof state:
case h.e'_3.h
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s✝ s : Set α
⊢ s ∈ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s} ↔
    s ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ {s | ∃ a, (Ici a)ᶜ = s}}

Next tactic:
constructor
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · 

Proof state:
case h.e'_3.h.mp
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s✝ s : Set α
⊢ s ∈ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s} →
    s ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ {s | ∃ a, (Ici a)ᶜ = s}}

Next tactic:
rintro ⟨F, hF, rfl⟩
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    

Proof state:
case h.e'_3.h.mp.intro.intro
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s F : Set α
hF : Set.Finite F
⊢ ⋂ i ∈ F, (Ici i)ᶜ ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ {s | ∃ a, (Ici a)ᶜ = s}}

Next tactic:
refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
    

Proof state:
case h.e'_3.h.mp.intro.intro
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s F : Set α
hF : Set.Finite F
⊢ (fun f => ⋂₀ f) ((fun a => (Ici a)ᶜ) '' F) = ⋂ i ∈ F, (Ici i)ᶜ

Next tactic:
simp only [sInter_image]
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
    simp only [sInter_image]
  · 

Proof state:
case h.e'_3.h.mpr
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s✝ s : Set α
⊢ s ∈ (fun f => ⋂₀ f) '' {f | Set.Finite f ∧ f ⊆ {s | ∃ a, (Ici a)ᶜ = s}} →
    s ∈ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s}

Next tactic:
rintro ⟨F, ⟨hF, hs⟩, rfl⟩
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
    simp only [sInter_image]
  · rintro ⟨F, ⟨hF, hs⟩, rfl⟩
    

Proof state:
case h.e'_3.h.mpr.intro.intro.intro
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
F : Set (Set α)
hF : Set.Finite F
hs : F ⊆ {s | ∃ a, (Ici a)ᶜ = s}
⊢ (fun f => ⋂₀ f) F ∈ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s}

Next tactic:
haveI := hF.to_subtype
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
    simp only [sInter_image]
  · rintro ⟨F, ⟨hF, hs⟩, rfl⟩
    haveI := hF.to_subtype
    

Proof state:
case h.e'_3.h.mpr.intro.intro.intro
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
F : Set (Set α)
hF : Set.Finite F
hs : F ⊆ {s | ∃ a, (Ici a)ᶜ = s}
this : Finite ↑F
⊢ (fun f => ⋂₀ f) F ∈ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s}

Next tactic:
rw [subset_def, Subtype.forall'] at hs
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
    simp only [sInter_image]
  · rintro ⟨F, ⟨hF, hs⟩, rfl⟩
    haveI := hF.to_subtype
    rw [subset_def, Subtype.forall'] at hs
    

Proof state:
case h.e'_3.h.mpr.intro.intro.intro
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
F : Set (Set α)
hF : Set.Finite F
hs : ∀ (x : { a // a ∈ F }), ↑x ∈ {s | ∃ a, (Ici a)ᶜ = s}
this : Finite ↑F
⊢ (fun f => ⋂₀ f) F ∈ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s}

Next tactic:
choose f hf using hs
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
    simp only [sInter_image]
  · rintro ⟨F, ⟨hF, hs⟩, rfl⟩
    haveI := hF.to_subtype
    rw [subset_def, Subtype.forall'] at hs
    choose f hf using hs
    

Proof state:
case h.e'_3.h.mpr.intro.intro.intro
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
F : Set (Set α)
hF : Set.Finite F
this : Finite ↑F
f : { a // a ∈ F } → α
hf : ∀ (x : { a // a ∈ F }), (Ici (f x))ᶜ = ↑x
⊢ (fun f => ⋂₀ f) F ∈ {s | ∃ t, Set.Finite t ∧ ⋂ i ∈ t, (Ici i)ᶜ = s}

Next tactic:
exact ⟨_, finite_range f, by simp_rw [biInter_range, hf, sInter_eq_iInter]⟩
protected theorem isTopologicalBasis : IsTopologicalBasis (lowerBasis α) := by
  convert isTopologicalBasis_of_subbasis (topology_eq α)
  simp_rw [lowerBasis, coe_upperClosure, compl_iUnion]
  ext s
  constructor
  · rintro ⟨F, hF, rfl⟩
    refine' ⟨(fun a => (Ici a)ᶜ) '' F, ⟨hF.image _, image_subset_iff.2 fun _ _ => ⟨_, rfl⟩⟩, _⟩
    simp only [sInter_image]
  · rintro ⟨F, ⟨hF, hs⟩, rfl⟩
    haveI := hF.to_subtype
    rw [subset_def, Subtype.forall'] at hs
    choose f hf using hs
    exact ⟨_, finite_range f, by 

Proof state:
α : Type u_1
β : ?m.8817
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
s : Set α
F : Set (Set α)
hF : Set.Finite F
this : Finite ↑F
f : { a // a ∈ F } → α
hf : ∀ (x : { a // a ∈ F }), (Ici (f x))ᶜ = ↑x
⊢ ⋂ i ∈ range f, (Ici i)ᶜ = (fun f => ⋂₀ f) F

Next tactic:
simp_rw [biInter_range, hf, sInter_eq_iInter]
/-- A function `f : β → α` with lower topology in the codomain is continuous provided that the
preimage of every interval `Set.Ici a` is a closed set.

TODO: upgrade to an `iff`. -/
lemma continuous_of_Ici [TopologicalSpace β] {f : β → α} (h : ∀ a, IsClosed (f ⁻¹' (Ici a))) :
    Continuous f := by
  

Proof state:
α : Type u_2
β : Type u_1
inst✝³ : Preorder α
inst✝² : TopologicalSpace α
inst✝¹ : IsLower α
s : Set α
inst✝ : TopologicalSpace β
f : β → α
h : ∀ (a : α), IsClosed (f ⁻¹' Ici a)
⊢ Continuous f

Next tactic:
obtain rfl := IsLower.topology_eq α
/-- A function `f : β → α` with lower topology in the codomain is continuous provided that the
preimage of every interval `Set.Ici a` is a closed set.

TODO: upgrade to an `iff`. -/
lemma continuous_of_Ici [TopologicalSpace β] {f : β → α} (h : ∀ a, IsClosed (f ⁻¹' (Ici a))) :
    Continuous f := by
  obtain rfl := IsLower.topology_eq α
  

Proof state:
α : Type u_2
β : Type u_1
inst✝² : Preorder α
s : Set α
inst✝¹ : TopologicalSpace β
f : β → α
h : ∀ (a : α), IsClosed (f ⁻¹' Ici a)
inst✝ : IsLower α
⊢ Continuous f

Next tactic:
refine continuous_generateFrom ?_
/-- A function `f : β → α` with lower topology in the codomain is continuous provided that the
preimage of every interval `Set.Ici a` is a closed set.

TODO: upgrade to an `iff`. -/
lemma continuous_of_Ici [TopologicalSpace β] {f : β → α} (h : ∀ a, IsClosed (f ⁻¹' (Ici a))) :
    Continuous f := by
  obtain rfl := IsLower.topology_eq α
  refine continuous_generateFrom ?_
  

Proof state:
α : Type u_2
β : Type u_1
inst✝² : Preorder α
s : Set α
inst✝¹ : TopologicalSpace β
f : β → α
h : ∀ (a : α), IsClosed (f ⁻¹' Ici a)
inst✝ : IsLower α
⊢ ∀ s ∈ {s | ∃ a, (Ici a)ᶜ = s}, IsOpen (f ⁻¹' s)

Next tactic:
rintro _ ⟨a, rfl⟩
/-- A function `f : β → α` with lower topology in the codomain is continuous provided that the
preimage of every interval `Set.Ici a` is a closed set.

TODO: upgrade to an `iff`. -/
lemma continuous_of_Ici [TopologicalSpace β] {f : β → α} (h : ∀ a, IsClosed (f ⁻¹' (Ici a))) :
    Continuous f := by
  obtain rfl := IsLower.topology_eq α
  refine continuous_generateFrom ?_
  rintro _ ⟨a, rfl⟩
  

Proof state:
case intro
α : Type u_2
β : Type u_1
inst✝² : Preorder α
s : Set α
inst✝¹ : TopologicalSpace β
f : β → α
h : ∀ (a : α), IsClosed (f ⁻¹' Ici a)
inst✝ : IsLower α
a : α
⊢ IsOpen (f ⁻¹' (Ici a)ᶜ)

Next tactic:
exact (h a).isOpen_compl
/-- The lower topology on a partial order is T₀. -/
instance (priority := 90) t0Space : T0Space α :=
  (t0Space_iff_inseparable α).2 fun x y h =>
    Ici_injective <| by 

Proof state:
α : Type ?u.14236
β : ?m.14233
inst✝² : PartialOrder α
inst✝¹ : TopologicalSpace α
inst✝ : IsLower α
x y : α
h : Inseparable x y
⊢ Ici x = Ici y

Next tactic:
simpa only [inseparable_iff_closure_eq, closure_singleton] using h
/-- If `α` is equipped with the upper topology, then it is homeomorphic to `WithUpper α`.
-/
def WithUpperHomeomorph : WithUpper α ≃ₜ α :=
  WithUpper.ofUpper.toHomeomorphOfInducing ⟨by 

Proof state:
α : Type ?u.14993
β : ?m.14990
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsUpper α
s : Set α
⊢ WithUpper.instTopologicalSpaceWithUpper = induced (⇑WithUpper.ofUpper) inst✝¹

Next tactic:
erw [topology_eq α, induced_id]
/-- If `α` is equipped with the upper topology, then it is homeomorphic to `WithUpper α`.
-/
def WithUpperHomeomorph : WithUpper α ≃ₜ α :=
  WithUpper.ofUpper.toHomeomorphOfInducing ⟨by erw [topology_eq α, induced_id]; 

Proof state:
α : Type ?u.14993
β : ?m.14990
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsUpper α
s : Set α
⊢ WithUpper.instTopologicalSpaceWithUpper = upper α

Next tactic:
rfl
theorem isOpen_iff_generate_Iic_compl : IsOpen s ↔ GenerateOpen { t | ∃ a, (Iic a)ᶜ = t } s := by
  

Proof state:
α : Type u_1
β : ?m.15348
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsUpper α
s : Set α
⊢ IsOpen s ↔ GenerateOpen {t | ∃ a, (Iic a)ᶜ = t} s

Next tactic:
rw [topology_eq α]
theorem isOpen_iff_generate_Iic_compl : IsOpen s ↔ GenerateOpen { t | ∃ a, (Iic a)ᶜ = t } s := by
  rw [topology_eq α]; 

Proof state:
α : Type u_1
β : ?m.15348
inst✝² : Preorder α
inst✝¹ : TopologicalSpace α
inst✝ : IsUpper α
s : Set α
⊢ IsOpen s ↔ GenerateOpen {t | ∃ a, (Iic a)ᶜ = t} s

Next tactic:
rfl
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    

Proof state:
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
⊢ instTopologicalSpaceProd = lower (α × β)

Next tactic:
refine' le_antisymm (le_generateFrom _) _
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · 

Proof state:
case refine'_1
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
⊢ ∀ s ∈ {s | ∃ a, (Ici a)ᶜ = s}, IsOpen s

Next tactic:
rintro _ ⟨x, rfl⟩
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      

Proof state:
case refine'_1.intro
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
x : α × β
⊢ IsOpen (Ici x)ᶜ

Next tactic:
exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
    

Proof state:
case refine'_2
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
⊢ lower (α × β) ≤ instTopologicalSpaceProd

Next tactic:
rw [(IsLower.isTopologicalBasis.prod
      IsLower.isTopologicalBasis).eq_generateFrom, le_generateFrom_iff_subset_isOpen,
      image2_subset_iff]
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
    rw [(IsLower.isTopologicalBasis.prod
      IsLower.isTopologicalBasis).eq_generateFrom, le_generateFrom_iff_subset_isOpen,
      image2_subset_iff]
    

Proof state:
case refine'_2
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
⊢ ∀ x ∈ IsLower.lowerBasis α, ∀ y ∈ IsLower.lowerBasis β, x ×ˢ y ∈ {s | IsOpen s}

Next tactic:
rintro _ ⟨s, hs, rfl⟩ _ ⟨t, ht, rfl⟩
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
    rw [(IsLower.isTopologicalBasis.prod
      IsLower.isTopologicalBasis).eq_generateFrom, le_generateFrom_iff_subset_isOpen,
      image2_subset_iff]
    rintro _ ⟨s, hs, rfl⟩ _ ⟨t, ht, rfl⟩
    

Proof state:
case refine'_2.intro.intro.intro.intro
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
s : Set α
hs : Set.Finite s
t : Set β
ht : Set.Finite t
⊢ (↑(upperClosure s))ᶜ ×ˢ (↑(upperClosure t))ᶜ ∈ {s | IsOpen s}

Next tactic:
dsimp
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
    rw [(IsLower.isTopologicalBasis.prod
      IsLower.isTopologicalBasis).eq_generateFrom, le_generateFrom_iff_subset_isOpen,
      image2_subset_iff]
    rintro _ ⟨s, hs, rfl⟩ _ ⟨t, ht, rfl⟩
    dsimp
    

Proof state:
case refine'_2.intro.intro.intro.intro
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
s : Set α
hs : Set.Finite s
t : Set β
ht : Set.Finite t
⊢ IsOpen ((↑(upperClosure s))ᶜ ×ˢ (↑(upperClosure t))ᶜ)

Next tactic:
simp_rw [coe_upperClosure, compl_iUnion, prod_eq, preimage_iInter, preimage_compl]
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
    rw [(IsLower.isTopologicalBasis.prod
      IsLower.isTopologicalBasis).eq_generateFrom, le_generateFrom_iff_subset_isOpen,
      image2_subset_iff]
    rintro _ ⟨s, hs, rfl⟩ _ ⟨t, ht, rfl⟩
    dsimp
    simp_rw [coe_upperClosure, compl_iUnion, prod_eq, preimage_iInter, preimage_compl]
    -- without `let`, `refine` tries to use the product topology and fails
    

Proof state:
case refine'_2.intro.intro.intro.intro
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
s : Set α
hs : Set.Finite s
t : Set β
ht : Set.Finite t
⊢ IsOpen ((⋂ i ∈ s, (Prod.fst ⁻¹' Ici i)ᶜ) ∩ ⋂ i ∈ t, (Prod.snd ⁻¹' Ici i)ᶜ)

Next tactic:
let _ : TopologicalSpace (α × β) := lower (α × β)
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
    rw [(IsLower.isTopologicalBasis.prod
      IsLower.isTopologicalBasis).eq_generateFrom, le_generateFrom_iff_subset_isOpen,
      image2_subset_iff]
    rintro _ ⟨s, hs, rfl⟩ _ ⟨t, ht, rfl⟩
    dsimp
    simp_rw [coe_upperClosure, compl_iUnion, prod_eq, preimage_iInter, preimage_compl]
    -- without `let`, `refine` tries to use the product topology and fails
    let _ : TopologicalSpace (α × β) := lower (α × β)
    

Proof state:
case refine'_2.intro.intro.intro.intro
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
s : Set α
hs : Set.Finite s
t : Set β
ht : Set.Finite t
x✝ : TopologicalSpace (α × β) := lower (α × β)
⊢ IsOpen ((⋂ i ∈ s, (Prod.fst ⁻¹' Ici i)ᶜ) ∩ ⋂ i ∈ t, (Prod.snd ⁻¹' Ici i)ᶜ)

Next tactic:
refine (hs.isOpen_biInter fun a _ => ?_).inter (ht.isOpen_biInter fun b _ => ?_)
instance instIsLowerProd [Preorder α] [TopologicalSpace α] [IsLower α]
    [OrderBot α] [Preorder β] [TopologicalSpace β] [IsLower β] [OrderBot β] :
    IsLower (α × β) where
  topology_eq_lowerTopology := by
    refine' le_antisymm (le_generateFrom _) _
    · rintro _ ⟨x, rfl⟩
      exact (isClosed_Ici.prod isClosed_Ici).isOpen_compl
    rw [(IsLower.isTopologicalBasis.prod
      IsLower.isTopologicalBasis).eq_generateFrom, le_generateFrom_iff_subset_isOpen,
      image2_subset_iff]
    rintro _ ⟨s, hs, rfl⟩ _ ⟨t, ht, rfl⟩
    dsimp
    simp_rw [coe_upperClosure, compl_iUnion, prod_eq, preimage_iInter, preimage_compl]
    -- without `let`, `refine` tries to use the product topology and fails
    let _ : TopologicalSpace (α × β) := lower (α × β)
    refine (hs.isOpen_biInter fun a _ => ?_).inter (ht.isOpen_biInter fun b _ => ?_)
    · 

Proof state:
case refine'_2.intro.intro.intro.intro.refine_1
α : Type ?u.17620
β : Type ?u.17649
inst✝⁷ : Preorder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : IsLower α
inst✝⁴ : OrderBot α
inst✝³ : Preorder β
inst✝² : TopologicalSpace β
inst✝¹ : IsLower β
inst✝ : OrderBot β
s : Set α
hs : Set.Finite s
t : Set β
ht : Set.Finite t
x✝¹ : TopologicalSpace (α × β) := lower (α × β)
a : α
x✝ : a ∈ s
⊢ IsOpen (Prod.fst ⁻¹' Ici a)ᶜ

Next tactic:
exact GenerateOpen.basic _ ⟨(a, ⊥), by simp [Ici_prod_eq, prod_univ]⟩