Theorem: scottContinuous_of_continuous
File: Mathlib/Topology/OmegaCompletePartialOrder.lean

tactic: have h : Monotone f := fun x y h ↦ by
  have hf : IsUpperSet {x | ¬f x ≤ f y} := ((notBelow_isOpen (f y)).preimage hf).isUpperSet
  simpa only [mem_setOf_eq, le_refl, not_true, imp_false, not_not] using hf h
state_before: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf : _root_.Continuous f
⊢ Continuous' f
state_after: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf : _root_.Continuous f
h : Monotone f
⊢ Continuous' f

tactic: refine ⟨h, fun c ↦ eq_of_forall_ge_iff fun z ↦ ?_⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf : _root_.Continuous f
h : Monotone f
⊢ Continuous' f
state_after: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z

tactic: rcases (notBelow_isOpen z).preimage hf with ⟨hf, hf'⟩
state_before: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : OmegaCompletePartialOrder.Continuous { toFun := fun x => x ∈ f ⁻¹' notBelow z, monotone' := hf }
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z

tactic: specialize hf' c
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : OmegaCompletePartialOrder.Continuous { toFun := fun x => x ∈ f ⁻¹' notBelow z, monotone' := hf }
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' :
  { toFun := fun x => x ∈ f ⁻¹' notBelow z, monotone' := hf } (ωSup c) =
    ωSup (c.map { toFun := fun x => x ∈ f ⁻¹' notBelow z, monotone' := hf })
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z

tactic: simp only [OrderHom.coe_mk, mem_preimage, notBelow, mem_setOf_eq] at hf'
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' :
  { toFun := fun x => x ∈ f ⁻¹' notBelow z, monotone' := hf } (ωSup c) =
    ωSup (c.map { toFun := fun x => x ∈ f ⁻¹' notBelow z, monotone' := hf })
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : (¬f (ωSup c) ≤ z) = ωSup (c.map { toFun := fun x => ¬f x ≤ z, monotone' := ⋯ })
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z

tactic: rw [← not_iff_not]
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : (¬f (ωSup c) ≤ z) = ωSup (c.map { toFun := fun x => ¬f x ≤ z, monotone' := ⋯ })
⊢ { toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ωSup (c.map { toFun := f, monotone' := h }) ≤ z
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : (¬f (ωSup c) ≤ z) = ωSup (c.map { toFun := fun x => ¬f x ≤ z, monotone' := ⋯ })
⊢ ¬{ toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ¬ωSup (c.map { toFun := f, monotone' := h }) ≤ z

tactic: simp only [ωSup_le_iff, hf', ωSup, iSup, sSup, mem_range, Chain.map_coe, Function.comp_apply,
  eq_iff_iff, not_forall, OrderHom.coe_mk]
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : (¬f (ωSup c) ≤ z) = ωSup (c.map { toFun := fun x => ¬f x ≤ z, monotone' := ⋯ })
⊢ ¬{ toFun := f, monotone' := h } (ωSup c) ≤ z ↔ ¬ωSup (c.map { toFun := f, monotone' := h }) ≤ z
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : (¬f (ωSup c) ≤ z) = ωSup (c.map { toFun := fun x => ¬f x ≤ z, monotone' := ⋯ })
⊢ (∃ a, (∃ y, ¬f (c y) ≤ z ↔ a) ∧ a) ↔ ∃ x, ¬f (c x) ≤ z

tactic: tauto
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
h : Monotone f
c : Chain (Scott α)
z : Scott β
hf : Monotone fun x => x ∈ f ⁻¹' notBelow z
hf' : (¬f (ωSup c) ≤ z) = ωSup (c.map { toFun := fun x => ¬f x ≤ z, monotone' := ⋯ })
⊢ (∃ a, (∃ y, ¬f (c y) ≤ z ↔ a) ∧ a) ↔ ∃ x, ¬f (c x) ≤ z
state_after: no goals

tactic: have hf : IsUpperSet {x | ¬f x ≤ f y} := ((notBelow_isOpen (f y)).preimage hf).isUpperSet
state_before: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf : _root_.Continuous f
x y : Scott α
h : x ≤ y
⊢ f x ≤ f y
state_after: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
x y : Scott α
h : x ≤ y
hf : IsUpperSet {x | ¬f x ≤ f y}
⊢ f x ≤ f y

tactic: simpa only [mem_setOf_eq, le_refl, not_true, imp_false, not_not] using hf h
state_before: α : Type u_1
β : Type u_2
inst✝¹ : OmegaCompletePartialOrder α
inst✝ : OmegaCompletePartialOrder β
f : Scott α → Scott β
hf✝ : _root_.Continuous f
x y : Scott α
h : x ≤ y
hf : IsUpperSet {x | ¬f x ≤ f y}
⊢ f x ≤ f y
state_after: no goals