l3lab/ntp-mathlib huggingface dataset:
/-- `QuotientMap.lift` as an equivalence. -/
@[simps]
noncomputable def liftEquiv : { g : C(X, Z) // Function.FactorsThrough g f} ≃ C(Y, Z) where
  toFun g := hf.lift g g.prop
  invFun g := ⟨g.comp f, fun _ _ h ↦ by simp only [ContinuousMap.comp_apply]; rw [h]⟩
  left_inv := by 

Proof state:
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
hf : QuotientMap ⇑f
g : C(X, Z)
h : FactorsThrough ⇑g ⇑f
⊢ LeftInverse
    (fun g =>
      { val := ContinuousMap.comp g f,
        property := (_ : ∀ (x x_1 : X), f x = f x_1 → (ContinuousMap.comp g f) x = (ContinuousMap.comp g f) x_1) })
    fun g => lift hf ↑g (_ : FactorsThrough ⇑↑g ⇑f)

Next tactic:
intro
/-- `QuotientMap.lift` as an equivalence. -/
@[simps]
noncomputable def liftEquiv : { g : C(X, Z) // Function.FactorsThrough g f} ≃ C(Y, Z) where
  toFun g := hf.lift g g.prop
  invFun g := ⟨g.comp f, fun _ _ h ↦ by simp only [ContinuousMap.comp_apply]; rw [h]⟩
  left_inv := by intro; 

Proof state:
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
hf : QuotientMap ⇑f
g : C(X, Z)
h : FactorsThrough ⇑g ⇑f
x✝ : { g // FactorsThrough ⇑g ⇑f }
⊢ (fun g =>
        { val := ContinuousMap.comp g f,
          property := (_ : ∀ (x x_1 : X), f x = f x_1 → (ContinuousMap.comp g f) x = (ContinuousMap.comp g f) x_1) })
      ((fun g => lift hf ↑g (_ : FactorsThrough ⇑↑g ⇑f)) x✝) =
    x✝

Next tactic:
simp
/-- `QuotientMap.lift` as an equivalence. -/
@[simps]
noncomputable def liftEquiv : { g : C(X, Z) // Function.FactorsThrough g f} ≃ C(Y, Z) where
  toFun g := hf.lift g g.prop
  invFun g := ⟨g.comp f, fun _ _ h ↦ by simp only [ContinuousMap.comp_apply]; rw [h]⟩
  left_inv := by intro; simp
  right_inv := by
    

Proof state:
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
hf : QuotientMap ⇑f
g : C(X, Z)
h : FactorsThrough ⇑g ⇑f
⊢ Function.RightInverse
    (fun g =>
      { val := ContinuousMap.comp g f,
        property := (_ : ∀ (x x_1 : X), f x = f x_1 → (ContinuousMap.comp g f) x = (ContinuousMap.comp g f) x_1) })
    fun g => lift hf ↑g (_ : FactorsThrough ⇑↑g ⇑f)

Next tactic:
intro g
/-- `QuotientMap.lift` as an equivalence. -/
@[simps]
noncomputable def liftEquiv : { g : C(X, Z) // Function.FactorsThrough g f} ≃ C(Y, Z) where
  toFun g := hf.lift g g.prop
  invFun g := ⟨g.comp f, fun _ _ h ↦ by simp only [ContinuousMap.comp_apply]; rw [h]⟩
  left_inv := by intro; simp
  right_inv := by
    intro g
    

Proof state:
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
hf : QuotientMap ⇑f
g✝ : C(X, Z)
h : FactorsThrough ⇑g✝ ⇑f
g : C(Y, Z)
⊢ (fun g => lift hf ↑g (_ : FactorsThrough ⇑↑g ⇑f))
      ((fun g =>
          { val := ContinuousMap.comp g f,
            property := (_ : ∀ (x x_1 : X), f x = f x_1 → (ContinuousMap.comp g f) x = (ContinuousMap.comp g f) x_1) })
        g) =
    g

Next tactic:
ext a
/-- `QuotientMap.lift` as an equivalence. -/
@[simps]
noncomputable def liftEquiv : { g : C(X, Z) // Function.FactorsThrough g f} ≃ C(Y, Z) where
  toFun g := hf.lift g g.prop
  invFun g := ⟨g.comp f, fun _ _ h ↦ by simp only [ContinuousMap.comp_apply]; rw [h]⟩
  left_inv := by intro; simp
  right_inv := by
    intro g
    ext a
    

Proof state:
case h
X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : C(X, Y)
hf : QuotientMap ⇑f
g✝ : C(X, Z)
h : FactorsThrough ⇑g✝ ⇑f
g : C(Y, Z)
a : Y
⊢ ((fun g => lift hf ↑g (_ : FactorsThrough ⇑↑g ⇑f))
        ((fun g =>
            { val := ContinuousMap.comp g f,
              property :=
                (_ : ∀ (x x_1 : X), f x = f x_1 → (ContinuousMap.comp g f) x = (ContinuousMap.comp g f) x_1) })
          g))
      a =
    g a

Next tactic:
simpa using congrArg g (Function.rightInverse_surjInv hf.surjective a)
/-- Left inverse to a continuous map from a homeomorphism, mirroring `Equiv.symm_comp_self`. -/
@[simp]
theorem symm_comp_toContinuousMap :
    (f.symm : C(β, α)).comp (f : C(α, β)) = ContinuousMap.id α := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α ≃ₜ β
g : β ≃ₜ γ
⊢ ContinuousMap.comp (toContinuousMap (Homeomorph.symm f)) (toContinuousMap f) = ContinuousMap.id α

Next tactic:
rw [← coe_trans, self_trans_symm, coe_refl]
/-- Right inverse to a continuous map from a homeomorphism, mirroring `Equiv.self_comp_symm`. -/
@[simp]
theorem toContinuousMap_comp_symm :
    (f : C(α, β)).comp (f.symm : C(β, α)) = ContinuousMap.id β := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α ≃ₜ β
g : β ≃ₜ γ
⊢ ContinuousMap.comp (toContinuousMap f) (toContinuousMap (Homeomorph.symm f)) = ContinuousMap.id β

Next tactic:
rw [← coe_trans, symm_trans_self, coe_refl]
lemma finset_sup'_nhds [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (s.sup' hne f) l (𝓝 (s.sup' hne g)) := by
  

Proof state:
L : Type u_3
X : Type ?u.5785
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
hne : Finset.Nonempty s
hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (sup' s hne f) l (𝓝 (sup' s hne g))

Next tactic:
induction hne using Finset.Nonempty.cons_induction with
  | h₀ => simpa using hs
  | h₁ s ha hne ihs =>
    rw [forall_mem_cons] at hs
    simp only [sup'_cons, hne]
    exact hs.1.sup_nhds (ihs hs.2)
lemma finset_sup'_nhds [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (s.sup' hne f) l (𝓝 (s.sup' hne g)) := by
  induction hne using Finset.Nonempty.cons_induction with
  

Proof state:
case h₀
L : Type u_3
X : Type ?u.5785
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
a✝ : ι
hs : ∀ i ∈ {a✝}, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (sup' {a✝} (_ : Finset.Nonempty {a✝}) f) l (𝓝 (sup' {a✝} (_ : Finset.Nonempty {a✝}) g))

Next tactic:
| h₀ => simpa using hs
lemma finset_sup'_nhds [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (s.sup' hne f) l (𝓝 (s.sup' hne g)) := by
  induction hne using Finset.Nonempty.cons_induction with
  | h₀ => 

Proof state:
case h₀
L : Type u_3
X : Type ?u.5785
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
a✝ : ι
hs : ∀ i ∈ {a✝}, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (sup' {a✝} (_ : Finset.Nonempty {a✝}) f) l (𝓝 (sup' {a✝} (_ : Finset.Nonempty {a✝}) g))

Next tactic:
simpa using hs
lemma finset_sup'_nhds [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (s.sup' hne f) l (𝓝 (s.sup' hne g)) := by
  induction hne using Finset.Nonempty.cons_induction with
  | h₀ => simpa using hs
  

Proof state:
case h₁
L : Type u_3
X : Type ?u.5785
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s✝ : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
a✝ : ι
s : Finset ι
ha : a✝ ∉ s
hne : Finset.Nonempty s
ihs : (∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) → Tendsto (sup' s hne f) l (𝓝 (sup' s hne g))
hs : ∀ i ∈ cons a✝ s ha, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (sup' (cons a✝ s ha) (_ : Finset.Nonempty (cons a✝ s ha)) f) l
    (𝓝 (sup' (cons a✝ s ha) (_ : Finset.Nonempty (cons a✝ s ha)) g))

Next tactic:
| h₁ s ha hne ihs =>
    rw [forall_mem_cons] at hs
    simp only [sup'_cons, hne]
    exact hs.1.sup_nhds (ihs hs.2)
lemma finset_sup'_nhds [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (s.sup' hne f) l (𝓝 (s.sup' hne g)) := by
  induction hne using Finset.Nonempty.cons_induction with
  | h₀ => simpa using hs
  | h₁ s ha hne ihs =>
    

Proof state:
case h₁
L : Type u_3
X : Type ?u.5785
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s✝ : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
a✝ : ι
s : Finset ι
ha : a✝ ∉ s
hne : Finset.Nonempty s
ihs : (∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) → Tendsto (sup' s hne f) l (𝓝 (sup' s hne g))
hs : ∀ i ∈ cons a✝ s ha, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (sup' (cons a✝ s ha) (_ : Finset.Nonempty (cons a✝ s ha)) f) l
    (𝓝 (sup' (cons a✝ s ha) (_ : Finset.Nonempty (cons a✝ s ha)) g))

Next tactic:
rw [forall_mem_cons] at hs
lemma finset_sup'_nhds [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (s.sup' hne f) l (𝓝 (s.sup' hne g)) := by
  induction hne using Finset.Nonempty.cons_induction with
  | h₀ => simpa using hs
  | h₁ s ha hne ihs =>
    rw [forall_mem_cons] at hs
    

Proof state:
case h₁
L : Type u_3
X : Type ?u.5785
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s✝ : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
a✝ : ι
s : Finset ι
ha : a✝ ∉ s
hne : Finset.Nonempty s
ihs : (∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) → Tendsto (sup' s hne f) l (𝓝 (sup' s hne g))
hs : Tendsto (f a✝) l (𝓝 (g a✝)) ∧ ∀ x ∈ s, Tendsto (f x) l (𝓝 (g x))
⊢ Tendsto (sup' (cons a✝ s ha) (_ : Finset.Nonempty (cons a✝ s ha)) f) l
    (𝓝 (sup' (cons a✝ s ha) (_ : Finset.Nonempty (cons a✝ s ha)) g))

Next tactic:
simp only [sup'_cons, hne]
lemma finset_sup'_nhds [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (s.sup' hne f) l (𝓝 (s.sup' hne g)) := by
  induction hne using Finset.Nonempty.cons_induction with
  | h₀ => simpa using hs
  | h₁ s ha hne ihs =>
    rw [forall_mem_cons] at hs
    simp only [sup'_cons, hne]
    

Proof state:
case h₁
L : Type u_3
X : Type ?u.5785
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s✝ : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
a✝ : ι
s : Finset ι
ha : a✝ ∉ s
hne : Finset.Nonempty s
ihs : (∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) → Tendsto (sup' s hne f) l (𝓝 (sup' s hne g))
hs : Tendsto (f a✝) l (𝓝 (g a✝)) ∧ ∀ x ∈ s, Tendsto (f x) l (𝓝 (g x))
⊢ Tendsto (f a✝ ⊔ sup' s (_ : Finset.Nonempty s) f) l (𝓝 (g a✝ ⊔ sup' s (_ : Finset.Nonempty s) g))

Next tactic:
exact hs.1.sup_nhds (ihs hs.2)
lemma finset_sup'_nhds_apply [SemilatticeSup L] [ContinuousSup L]
    (hne : s.Nonempty) (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (fun a ↦ s.sup' hne (f · a)) l (𝓝 (s.sup' hne g)) := by
  

Proof state:
L : Type u_3
X : Type ?u.7640
α : Type u_2
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
hne : Finset.Nonempty s
hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (fun a => sup' s hne fun x => f x a) l (𝓝 (sup' s hne g))

Next tactic:
simpa only [← Finset.sup'_apply] using finset_sup'_nhds hne hs
lemma finset_sup_nhds [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) : Tendsto (s.sup f) l (𝓝 (s.sup g)) := by
  

Proof state:
L : Type u_3
X : Type ?u.12112
α : Type u_2
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (Finset.sup s f) l (𝓝 (Finset.sup s g))

Next tactic:
rcases s.eq_empty_or_nonempty with rfl | hne
lemma finset_sup_nhds [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) : Tendsto (s.sup f) l (𝓝 (s.sup g)) := by
  rcases s.eq_empty_or_nonempty with rfl | hne
  · 

Proof state:
case inl
L : Type u_3
X : Type ?u.12112
α : Type u_2
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
f : ι → α → L
g : ι → L
l : Filter α
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
hs : ∀ i ∈ ∅, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (Finset.sup ∅ f) l (𝓝 (Finset.sup ∅ g))

Next tactic:
simpa using tendsto_const_nhds
lemma finset_sup_nhds [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) : Tendsto (s.sup f) l (𝓝 (s.sup g)) := by
  rcases s.eq_empty_or_nonempty with rfl | hne
  · simpa using tendsto_const_nhds
  · 

Proof state:
case inr
L : Type u_3
X : Type ?u.12112
α : Type u_2
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))
hne : Finset.Nonempty s
⊢ Tendsto (Finset.sup s f) l (𝓝 (Finset.sup s g))

Next tactic:
simp only [← sup'_eq_sup hne]
lemma finset_sup_nhds [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) : Tendsto (s.sup f) l (𝓝 (s.sup g)) := by
  rcases s.eq_empty_or_nonempty with rfl | hne
  · simpa using tendsto_const_nhds
  · simp only [← sup'_eq_sup hne]
    

Proof state:
case inr
L : Type u_3
X : Type ?u.12112
α : Type u_2
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))
hne : Finset.Nonempty s
⊢ Tendsto (sup' s hne f) l (𝓝 (sup' s hne g))

Next tactic:
exact finset_sup'_nhds hne hs
lemma finset_sup_nhds_apply [SemilatticeSup L] [OrderBot L] [ContinuousSup L]
    (hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))) :
    Tendsto (fun a ↦ s.sup (f · a)) l (𝓝 (s.sup g)) := by
  

Proof state:
L : Type u_3
X : Type ?u.16061
α : Type u_2
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
s : Finset ι
f : ι → α → L
g : ι → L
l : Filter α
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
hs : ∀ i ∈ s, Tendsto (f i) l (𝓝 (g i))
⊢ Tendsto (fun a => Finset.sup s fun x => f x a) l (𝓝 (Finset.sup s g))

Next tactic:
simpa only [← Finset.sup_apply] using finset_sup_nhds hs
lemma ContinuousAt.finset_sup' (hne : s.Nonempty) (hs : ∀ i ∈ s, ContinuousAt (f i) x) :
    ContinuousAt (s.sup' hne f) x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hne : Finset.Nonempty s
hs : ∀ i ∈ s, ContinuousAt (f i) x
⊢ ContinuousAt (Finset.sup' s hne f) x

Next tactic:
simpa only [← Finset.sup'_apply] using finset_sup'_apply hne hs
lemma ContinuousWithinAt.finset_sup' (hne : s.Nonempty)
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) : ContinuousWithinAt (s.sup' hne f) t x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
inst✝¹ : SemilatticeSup L
inst✝ : ContinuousSup L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hne : Finset.Nonempty s
hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x
⊢ ContinuousWithinAt (Finset.sup' s hne f) t x

Next tactic:
simpa only [← Finset.sup'_apply] using finset_sup'_apply hne hs
lemma ContinuousAt.finset_sup (hs : ∀ i ∈ s, ContinuousAt (f i) x) :
    ContinuousAt (s.sup f) x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hs : ∀ i ∈ s, ContinuousAt (f i) x
⊢ ContinuousAt (Finset.sup s f) x

Next tactic:
simpa only [← Finset.sup_apply] using finset_sup_apply hs
lemma ContinuousWithinAt.finset_sup
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) : ContinuousWithinAt (s.sup f) t x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
inst✝² : SemilatticeSup L
inst✝¹ : OrderBot L
inst✝ : ContinuousSup L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x
⊢ ContinuousWithinAt (Finset.sup s f) t x

Next tactic:
simpa only [← Finset.sup_apply] using finset_sup_apply hs
lemma ContinuousAt.finset_inf' (hne : s.Nonempty) (hs : ∀ i ∈ s, ContinuousAt (f i) x) :
    ContinuousAt (s.inf' hne f) x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
inst✝¹ : SemilatticeInf L
inst✝ : ContinuousInf L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hne : Finset.Nonempty s
hs : ∀ i ∈ s, ContinuousAt (f i) x
⊢ ContinuousAt (Finset.inf' s hne f) x

Next tactic:
simpa only [← Finset.inf'_apply] using finset_inf'_apply hne hs
lemma ContinuousWithinAt.finset_inf' (hne : s.Nonempty)
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) : ContinuousWithinAt (s.inf' hne f) t x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝³ : TopologicalSpace L
inst✝² : TopologicalSpace X
ι : Type u_1
inst✝¹ : SemilatticeInf L
inst✝ : ContinuousInf L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hne : Finset.Nonempty s
hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x
⊢ ContinuousWithinAt (Finset.inf' s hne f) t x

Next tactic:
simpa only [← Finset.inf'_apply] using finset_inf'_apply hne hs
lemma ContinuousAt.finset_inf (hs : ∀ i ∈ s, ContinuousAt (f i) x) :
    ContinuousAt (s.inf f) x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
inst✝² : SemilatticeInf L
inst✝¹ : OrderTop L
inst✝ : ContinuousInf L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hs : ∀ i ∈ s, ContinuousAt (f i) x
⊢ ContinuousAt (Finset.inf s f) x

Next tactic:
simpa only [← Finset.inf_apply] using finset_inf_apply hs
lemma ContinuousWithinAt.finset_inf
    (hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x) : ContinuousWithinAt (s.inf f) t x := by
  

Proof state:
L : Type u_2
X : Type u_3
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_1
inst✝² : SemilatticeInf L
inst✝¹ : OrderTop L
inst✝ : ContinuousInf L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x
⊢ ContinuousWithinAt (Finset.inf s f) t x

Next tactic:
simpa only [← Finset.inf_apply] using finset_inf_apply hs
/-- Inductive construction of homotopies from `P q` to `𝟙 _` -/
noncomputable def homotopyPToId : ∀ q : ℕ, Homotopy (P q : K[X] ⟶ _) (𝟙 _)
  | 0 => Homotopy.refl _
  | q + 1 => by
    

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.42, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ Homotopy (P (q + 1)) (𝟙 K[X])

Next tactic:
refine'
      Homotopy.trans (Homotopy.ofEq _)
        (Homotopy.trans
          (Homotopy.add (homotopyPToId q) (Homotopy.compLeft (homotopyHσToZero q) (P q)))
          (Homotopy.ofEq _))
/-- Inductive construction of homotopies from `P q` to `𝟙 _` -/
noncomputable def homotopyPToId : ∀ q : ℕ, Homotopy (P q : K[X] ⟶ _) (𝟙 _)
  | 0 => Homotopy.refl _
  | q + 1 => by
    refine'
      Homotopy.trans (Homotopy.ofEq _)
        (Homotopy.trans
          (Homotopy.add (homotopyPToId q) (Homotopy.compLeft (homotopyHσToZero q) (P q)))
          (Homotopy.ofEq _))
    · 

Proof state:
case refine'_1
C : Type u_1
inst✝¹ : Category.{?u.42, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ P (q + 1) = P q + P q ≫ Hσ q

Next tactic:
simp only [P_succ, comp_add, comp_id]
/-- Inductive construction of homotopies from `P q` to `𝟙 _` -/
noncomputable def homotopyPToId : ∀ q : ℕ, Homotopy (P q : K[X] ⟶ _) (𝟙 _)
  | 0 => Homotopy.refl _
  | q + 1 => by
    refine'
      Homotopy.trans (Homotopy.ofEq _)
        (Homotopy.trans
          (Homotopy.add (homotopyPToId q) (Homotopy.compLeft (homotopyHσToZero q) (P q)))
          (Homotopy.ofEq _))
    · simp only [P_succ, comp_add, comp_id]
    · 

Proof state:
case refine'_2
C : Type u_1
inst✝¹ : Category.{?u.42, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q : ℕ
⊢ 𝟙 K[X] + P q ≫ 0 = 𝟙 K[X]

Next tactic:
simp only [add_zero, comp_zero]
theorem homotopyPToId_eventually_constant {q n : ℕ} (hqn : n < q) :
    ((homotopyPToId X (q + 1)).hom n (n + 1) : X _[n] ⟶ X _[n + 1]) =
      (homotopyPToId X q).hom n (n + 1) := by
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hqn : n < q
⊢ Homotopy.hom (homotopyPToId X (q + 1)) n (n + 1) = Homotopy.hom (homotopyPToId X q) n (n + 1)

Next tactic:
simp only [homotopyHσToZero, AlternatingFaceMapComplex.obj_X, Nat.add_eq, Homotopy.trans_hom,
    Homotopy.ofEq_hom, Pi.zero_apply, Homotopy.add_hom, Homotopy.compLeft_hom, add_zero,
    Homotopy.nullHomotopy'_hom, ComplexShape.down_Rel, hσ'_eq_zero hqn (c_mk (n + 1) n rfl),
    dite_eq_ite, ite_self, comp_zero, zero_add, homotopyPToId]
theorem homotopyPToId_eventually_constant {q n : ℕ} (hqn : n < q) :
    ((homotopyPToId X (q + 1)).hom n (n + 1) : X _[n] ⟶ X _[n + 1]) =
      (homotopyPToId X q).hom n (n + 1) := by
  simp only [homotopyHσToZero, AlternatingFaceMapComplex.obj_X, Nat.add_eq, Homotopy.trans_hom,
    Homotopy.ofEq_hom, Pi.zero_apply, Homotopy.add_hom, Homotopy.compLeft_hom, add_zero,
    Homotopy.nullHomotopy'_hom, ComplexShape.down_Rel, hσ'_eq_zero hqn (c_mk (n + 1) n rfl),
    dite_eq_ite, ite_self, comp_zero, zero_add, homotopyPToId]
  

Proof state:
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
q n : ℕ
hqn : n < q
⊢ Homotopy.hom (homotopyPToId X (q + 0)) n (n + 1) = Homotopy.hom (homotopyPToId X q) n (n + 1)

Next tactic:
rfl
/-- Construction of the homotopy from `PInfty` to the identity using eventually
(termwise) constant homotopies from `P q` to the identity for all `q` -/
@[simps]
def homotopyPInftyToId : Homotopy (PInfty : K[X] ⟶ _) (𝟙 _) where
  hom i j := (homotopyPToId X (j + 1)).hom i j
  zero i j hij := Homotopy.zero _ i j hij
  comm n := by
    

Proof state:
C : Type u_1
inst✝¹ : Category.{?u.44331, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
n : ℕ
⊢ HomologicalComplex.Hom.f PInfty n =
    (((dNext n) fun i j => Homotopy.hom (homotopyPToId X (j + 1)) i j) +
        (prevD n) fun i j => Homotopy.hom (homotopyPToId X (j + 1)) i j) +
      HomologicalComplex.Hom.f (𝟙 K[X]) n

Next tactic:
rcases n with _|n
/-- Construction of the homotopy from `PInfty` to the identity using eventually
(termwise) constant homotopies from `P q` to the identity for all `q` -/
@[simps]
def homotopyPInftyToId : Homotopy (PInfty : K[X] ⟶ _) (𝟙 _) where
  hom i j := (homotopyPToId X (j + 1)).hom i j
  zero i j hij := Homotopy.zero _ i j hij
  comm n := by
    rcases n with _|n
    · 

Proof state:
case zero
C : Type u_1
inst✝¹ : Category.{?u.44331, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ HomologicalComplex.Hom.f PInfty Nat.zero =
    (((dNext Nat.zero) fun i j => Homotopy.hom (homotopyPToId X (j + 1)) i j) +
        (prevD Nat.zero) fun i j => Homotopy.hom (homotopyPToId X (j + 1)) i j) +
      HomologicalComplex.Hom.f (𝟙 K[X]) Nat.zero

Next tactic:
simpa only [Homotopy.dNext_zero_chainComplex, Homotopy.prevD_chainComplex,
        PInfty_f, Nat.zero_eq, P_f_0_eq, zero_add] using (homotopyPToId X 2).comm 0